diff --git a/.githooks/pre-commit b/.githooks/pre-commit index e5f27c4..a6116ed 100755 --- a/.githooks/pre-commit +++ b/.githooks/pre-commit @@ -148,8 +148,8 @@ fi # Ensure JavaScript files are minified. # ################################################################## -# Get the newly added and modified files. -mapfile -t all_changed_files < <(git diff --cached --name-only) +# Get the newly added and modified files, but not deleted files. +mapfile -t all_changed_files < <(git diff --cached --name-only --diff-filter=d) script_name=$(basename "$0") # Loop through all newly added or modified files. diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 7b17dbc..ce7da01 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1 +1,2 @@ * @welpo +i18n/ar.toml @TheAwiteb diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml new file mode 100644 index 0000000..b6d081d --- /dev/null +++ b/.github/FUNDING.yml @@ -0,0 +1 @@ +github: welpo diff --git a/.github/ISSUE_TEMPLATE/2_bug_report.yml b/.github/ISSUE_TEMPLATE/2_bug_report.yml new file mode 100644 index 0000000..95746f9 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/2_bug_report.yml @@ -0,0 +1,62 @@ +name: "🐛 Bug report" +description: "Did you run into an issue while using tabi?" +labels: ["bug"] +body: +- type: textarea + attributes: + label: "System information" + description: | + Please provide the following information: + - Zola version: Run `zola --version` + - tabi version or commit hash + placeholder: | + Zola version: + tabi version or commit: + validations: + required: true + +- type: textarea + attributes: + label: "Expected behaviour" + description: "Tell us what should have happened." + placeholder: "Describe what you expected tabi to do…" + validations: + required: true + +- type: textarea + attributes: + label: "Actual behaviour" + description: "Tell us what happens instead of the expected behavior." + placeholder: "Describe what actually happened…" + validations: + required: true + +- type: textarea + attributes: + label: "Steps to reproduce" + description: "Please provide detailed steps to reproduce the issue." + placeholder: | + 1. Set up `config.toml` with these settings: … + 2. Create content with this structure: … + 3. Run Zola with these arguments: … + 4. See the following error: … + validations: + required: true + +- type: textarea + attributes: + label: "Additional context" + description: > + Please provide any relevant configuration files, error messages, or screenshots that might help us understand the issue. + You can drag and drop files here to attach them. + validations: + required: false + +- type: checkboxes + attributes: + label: "Final checklist" + options: + - label: "I've checked that the issue isn't already reported." + required: true + - label: "I've tested with the latest version of tabi to check if the issue has already been fixed." + required: true diff --git a/.github/ISSUE_TEMPLATE/3_feature_request.yml b/.github/ISSUE_TEMPLATE/3_feature_request.yml new file mode 100644 index 0000000..44509e2 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/3_feature_request.yml @@ -0,0 +1,34 @@ +name: "✨ Feature request" +description: "Suggest an idea for tabi" +labels: ["enhancement"] +body: +- type: textarea + attributes: + label: "Summary and motivation" + description: "Briefly describe the feature and why it would be valuable for tabi users." + placeholder: | + Describe: + - What the feature is + - Why it would be useful + - Any examples from other projects + validations: + required: true + +- type: textarea + attributes: + label: "Implementation details" + description: "Share any ideas you have about how this could be implemented." + placeholder: "Technical suggestions, potential approaches, or specific requirements." + validations: + required: false + +- type: checkboxes + attributes: + label: "Checklist" + options: + - label: "I've searched existing issues to make sure this feature hasn't already been requested." + required: true + - label: "This feature aligns with tabi's philosophy (minimal JS, accessible…)" + required: true + - label: "I'm willing to contribute to the implementation of this feature." + required: false diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md deleted file mode 100644 index ec4cfdf..0000000 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ /dev/null @@ -1,24 +0,0 @@ ---- -name: Bug report -about: Did you run into an issue while using tabi? -title: '' -labels: bug -assignees: '' - ---- - -# Bug Report - -## Environment - -Zola version: -tabi version or commit: - -## Expected Behavior -Tell us what should have happened. - -## Current Behavior -Tell us what happens instead of the expected behavior. - -## Step to Reproduce -Please provide the steps to reproduce the issue. diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 0000000..48fd57e --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,5 @@ +blank_issues_enabled: false +contact_links: + - name: 💬 tabi discussions + url: https://github.com/welpo/tabi/discussions + about: If you have questions or need help, feel free to ask here~ diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md deleted file mode 100644 index c109080..0000000 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ /dev/null @@ -1,22 +0,0 @@ ---- -name: Feature request -about: Suggest an idea for this project. -title: '' -labels: enhancement -assignees: '' - ---- - -# Feature Request - -## Summary -Briefly describe what this feature request is about. - -## Motivation -Why should this feature be implemented? How will it benefit the project and its users? - -## Detailed Description -Please provide a detailed description of the proposed feature, including any suggestions you have for how it could be implemented. - -## Additional Context -Add any other context or screenshots about the feature request here. If this feature request is related to a problem, please describe it. diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 24ca7ea..643c368 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -58,6 +58,7 @@ If you need help, please ask! --> - [ ] I have verified the accessibility of my changes - [ ] I have tested all possible scenarios for this change - [ ] I have updated `theme.toml` with a sane default for the feature +- [ ] I have updated `config.toml` in [tabi-start](https://github.com/welpo/tabi-start) - [ ] I have made corresponding changes to the documentation: - [ ] Updated `config.toml` comments - [ ] Updated `theme.toml` comments diff --git a/.github/renovate.json b/.github/renovate.json index a2a9d39..65967b6 100644 --- a/.github/renovate.json +++ b/.github/renovate.json @@ -1,9 +1,13 @@ { "$schema": "https://docs.renovatebot.com/renovate-schema.json", "extends": ["config:recommended", ":automergeMinor", ":disableDependencyDashboard"], - "commitMessageAction": "chore(deps): update", "commitMessagePrefix": "⬆️", + "commitMessageAction": "chore(deps): update", + "commitMessageTopic": "{{{depName}}}", "labels": ["dependencies"], + "git-submodules": { + "enabled": true + }, "packageRules": [ { "updateTypes": ["pin"], @@ -16,6 +20,10 @@ { "updateTypes": ["rollback"], "commitMessagePrefix": "⬇️" + }, + { + "matchFileNames": ["scripts/release/**"], + "automerge": true } ] } diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index 89967a4..d038ece 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -8,12 +8,12 @@ on: jobs: deploy: name: Deploy and release - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 permissions: contents: write steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v5 with: fetch-depth: 0 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6142f76..0eae0c1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,29 +15,29 @@ jobs: if: github.event_name == 'pull_request' steps: - name: Checkout Code - uses: actions/checkout@v4 + uses: actions/checkout@v5 - name: Zola Build - uses: shalzz/zola-deploy-action@v0.18.0 + uses: shalzz/zola-deploy-action@v0.21.0 env: BUILD_ONLY: true - name: Zola Check - uses: shalzz/zola-deploy-action@v0.18.0 + uses: shalzz/zola-deploy-action@v0.21.0 env: BUILD_ONLY: true CHECK_LINKS: true build_and_deploy: name: Build and Deploy on Main Push - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 if: github.event_name == 'push' && github.ref == 'refs/heads/main' steps: - name: Checkout Code - uses: actions/checkout@v4 + uses: actions/checkout@v5 - name: Build and Deploy - uses: shalzz/zola-deploy-action@v0.18.0 + uses: shalzz/zola-deploy-action@v0.21.0 env: PAGES_BRANCH: gh-pages TOKEN: ${{ secrets.TOKEN }} diff --git a/.github/workflows/git-sumi.yml b/.github/workflows/git-sumi.yml index b1af84c..87c68e0 100644 --- a/.github/workflows/git-sumi.yml +++ b/.github/workflows/git-sumi.yml @@ -8,14 +8,21 @@ on: - synchronize - ready_for_review +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + permissions: pull-requests: read jobs: main: name: Run git-sumi - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 steps: + - name: Set header length for dependency updates + if: contains(github.event.pull_request.title, 'chore(deps)') + run: echo "GIT_SUMI_MAX_HEADER_LENGTH=80" >> $GITHUB_ENV - uses: welpo/git-sumi-action@main env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/upgrade-deps.yml b/.github/workflows/upgrade-deps.yml new file mode 100644 index 0000000..776ad9d --- /dev/null +++ b/.github/workflows/upgrade-deps.yml @@ -0,0 +1,89 @@ +name: Dependency upgrade +on: + workflow_dispatch: + inputs: + dependency: + description: 'Dependency to upgrade' + required: true + type: choice + options: + - all + - mermaid + - katex + schedule: + - cron: '32 4 * * *' + +jobs: + upgrade-dependency: + name: Upgrade dependency + runs-on: ubuntu-24.04 + permissions: + contents: write + pull-requests: write + strategy: + matrix: + dependency: ${{ github.event_name == 'schedule' && fromJson('["mermaid", "katex"]') || fromJson(format('["{0}"]', github.event.inputs.dependency)) }} + steps: + - name: Checkout repository + uses: actions/checkout@v5 + with: + fetch-depth: 0 + + - name: Set up environment + run: | + sudo apt-get update + sudo apt-get install -y jq npm curl git + npm install uglify-js -g + uglifyjs --version + + - name: Configure GPG key + run: | + echo -n ${{ secrets.GPG_PRIVATE_KEY }} | base64 --decode | gpg --import + + - name: Configure Git + run: | + git config --global user.signingkey 33EACFE956484C3940BFEEDCE4EC28F8DFB57474 + git config --global commit.gpgsign true + git config --global user.name "welpo" + git config --global user.email "welpo@users.noreply.github.com" + + - name: Check for existing branch + id: check_branch + run: | + if git ls-remote --heads origin deps/upgrade-${{ matrix.dependency }} | grep -q deps/upgrade-${{ matrix.dependency }}; then + echo "branch_exists=true" >> $GITHUB_OUTPUT + else + echo "branch_exists=false" >> $GITHUB_OUTPUT + fi + + - name: Handle existing branch + if: steps.check_branch.outputs.branch_exists == 'true' + run: | + echo "Branch deps/upgrade-${{ matrix.dependency }} already exists." + echo "Skipping upgrade as there's already an open PR" + exit 0 + + - name: Create and switch to new branch + run: | + git checkout -b deps/upgrade-${{ matrix.dependency }} + + - name: Run upgrade script + shell: bash + run: | + if [[ "${{ matrix.dependency }}" == "all" ]]; then + bash scripts/upgrade-deps --all + else + bash scripts/upgrade-deps --${{ matrix.dependency }} + fi + + - name: Push changes and create PR + shell: bash + run: | + if git diff --quiet HEAD origin/main; then + echo "No changes to push for ${{ matrix.dependency }}" + exit 0 + fi + git push -u origin deps/upgrade-${{ matrix.dependency }} + gh pr create --fill --base main --head deps/upgrade-${{ matrix.dependency }} --label "dependencies" + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..6fc8561 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "scripts/release"] + path = scripts/release + url = https://github.com/welpo/release.git diff --git a/CHANGELOG.md b/CHANGELOG.md index c7f3499..1e90c61 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,11 +4,409 @@ Welcome to the changelog for tabi. This document aims to provide a comprehensive We use Semantic Versioning (SemVer) for our version numbers, formatted as MAJOR.MINOR.PATCH. Major version changes involve significant (breaking) changes, minor versions introduce features and improvements in a backward compatible manner, and patch versions are for bug fixes and minor tweaks. +## [4.1.0](https://github.com/welpo/tabi/compare/v4.0.0..v4.1.0) - 2025-06-14 + +### ✨ Features + +- *(feed)* Add feed icon tag pages ([#522](https://github.com/welpo/tabi/issues/522)) by [@tzinm](https://github.com/tzinm) and [@welpo](https://github.com/welpo) +- *(i18n)* Add Finnish language ([#505](https://github.com/welpo/tabi/issues/505)) by [@axelkar](https://github.com/axelkar) and [@welpo](https://github.com/welpo) +- *(indieweb)* Add hidden h-card ([#506](https://github.com/welpo/tabi/issues/506)) by [@mmai](https://github.com/mmai) and [@welpo](https://github.com/welpo) +- *(socials)* Add itch.io icon ([#520](https://github.com/welpo/tabi/issues/520)) by [@mystal](https://github.com/mystal) +- *(webmentions)* Add hcard in post page ([#524](https://github.com/welpo/tabi/issues/524)) by [@mmai](https://github.com/mmai) and [@welpo](https://github.com/welpo) +- Add support for webmentions ([#485](https://github.com/welpo/tabi/issues/485)) by [@gortavoher](https://github.com/gortavoher), [@Jeremiah](https://github.com/Jeremiah) Russell, [@Henri](https://github.com/Henri) Bourcereau and [@welpo](https://github.com/welpo) +- Extend tabi `` and `` elements ([#528](https://github.com/welpo/tabi/issues/528)) by [@axis7818](https://github.com/axis7818) and [@welpo](https://github.com/welpo) +- Parse markdown in post summary & description ([#517](https://github.com/welpo/tabi/issues/517)) by [@rktjump](https://github.com/rktjump) and [@welpo](https://github.com/welpo) +- Cache bust images in shortcodes ([#504](https://github.com/welpo/tabi/issues/504)) by [@axelkar](https://github.com/axelkar) + +### 🐛 Bug fixes + +- *(feed)* Prioritise description > summary ([#525](https://github.com/welpo/tabi/issues/525)) by [@tzinm](https://github.com/tzinm) +- Render author HTML on page metadata ([7321fc5](https://github.com/welpo/tabi/commit/7321fc5a43fa50dc24c9fa87714612a2295b904a)) by [@welpo](https://github.com/welpo) +- Allow feed icon to be hidden ([#533](https://github.com/welpo/tabi/issues/533)) by [@bajacc](https://github.com/bajacc) +- Fix hcard html tags ([#508](https://github.com/welpo/tabi/issues/508)) by [@mmai](https://github.com/mmai) +- Fix external link icon breaking word wrapping ([#498](https://github.com/welpo/tabi/issues/498)) by [@welpo](https://github.com/welpo) +- Fix padding hover on links with code (custom font) ([#494](https://github.com/welpo/tabi/issues/494)) by [@clement-escolano](https://github.com/clement-escolano) + +### 💄 Styling + +- Remove extra spacing after author ([2e29782](https://github.com/welpo/tabi/commit/2e29782279d8154cb9c6f1df9a2401612ec77948)) by [@welpo](https://github.com/welpo) + +### ♻️ Refactor + +- Add "target_attribute" macro ([#515](https://github.com/welpo/tabi/issues/515)) by [@tzinm](https://github.com/tzinm) and @Óscar +- Improve error message when title is unset ([a384ac8](https://github.com/welpo/tabi/commit/a384ac80c8e6b8be46d4a335930fba697a523af9)) by [@welpo](https://github.com/welpo) + +### 🔧 Miscellaneous tasks + +- *(CI)* Fix Mermaid version detection ([e11186a](https://github.com/welpo/tabi/commit/e11186a8448f94494b350402f76a2cc5e5a98a97)) by [@welpo](https://github.com/welpo) +- *(README)* Add b1n.io to 'sites using tabi' ([#531](https://github.com/welpo/tabi/issues/531)) by [@b1nhack](https://github.com/b1nhack) +- *(README)* Fix broken link tag ([#516](https://github.com/welpo/tabi/issues/516)) by [@Olexandr88](https://github.com/Olexandr88) +- *(README)* Add tzinm's blog to 'sites using tabi' ([#496](https://github.com/welpo/tabi/issues/496)) by [@tzinm](https://github.com/tzinm) + +### 👥 New contributors + +🫶 [@gortavoher](https://github.com/gortavoher) made their first contribution in [#485](https://github.com/welpo/tabi/pull/485) + +🫶 [@bajacc](https://github.com/bajacc) made their first contribution in [#533](https://github.com/welpo/tabi/pull/533) + +🫶 [@axis7818](https://github.com/axis7818) made their first contribution in [#528](https://github.com/welpo/tabi/pull/528) + +🫶 [@b1nhack](https://github.com/b1nhack) made their first contribution in [#531](https://github.com/welpo/tabi/pull/531) + +🫶 [@tzinm](https://github.com/tzinm) made their first contribution in [#525](https://github.com/welpo/tabi/pull/525) + +🫶 [@mmai](https://github.com/mmai) made their first contribution in [#524](https://github.com/welpo/tabi/pull/524) + +🫶 [@rktjump](https://github.com/rktjump) made their first contribution in [#517](https://github.com/welpo/tabi/pull/517) + +🫶 [@mystal](https://github.com/mystal) made their first contribution in [#520](https://github.com/welpo/tabi/pull/520) + +🫶 [@axelkar](https://github.com/axelkar) made their first contribution in [#504](https://github.com/welpo/tabi/pull/504) + +🫶 [@clement-escolano](https://github.com/clement-escolano) made their first contribution in [#494](https://github.com/welpo/tabi/pull/494) + +## [4.0.0](https://github.com/welpo/tabi/compare/v3.1.0..v4.0.0) - 2025-02-16 + +### 💥 BREAKING CHANGES 💥 + +- *(archive)* Enforce chronological sorting ([#483](https://github.com/welpo/tabi/issues/483)) by [@welpo](https://github.com/welpo) +- Add tag filtering for projects ([#431](https://github.com/welpo/tabi/issues/431)) ([a783329](https://github.com/welpo/tabi/commit/a7833299fff4c753e35fa1f00667d8801f541f9a)) by [@welpo](https://github.com/welpo) + +### ✨ Features + +- *(archive)* [**‼️BREAKING‼️**] Enforce chronological sorting ([#483](https://github.com/welpo/tabi/issues/483)) by [@welpo](https://github.com/welpo) +- *(shortcodes)* Add 'aside' shortcode for side notes ([#452](https://github.com/welpo/tabi/issues/452)) by [@welpo](https://github.com/welpo) +- *(socials)* Add more Fediverse social icons ([89ad44c](https://github.com/welpo/tabi/commit/89ad44ce26d002f2f2c3baa6cf769fb8972551af)) by [@welpo](https://github.com/welpo) +- *(socials)* Add Letterboxd social icon ([0e0a391](https://github.com/welpo/tabi/commit/0e0a391ea84c3ed8b66931158ddef1e4cdd161f4)) by [@welpo](https://github.com/welpo) +- *(socials)* Add ORCID icon ([cf63855](https://github.com/welpo/tabi/commit/cf6385553c779710d1164509f3fc0d480e858ebd)) by [@welpo](https://github.com/welpo) +- Add `hide_from_main_feed` support ([#490](https://github.com/welpo/tabi/issues/490)) by [@welpo](https://github.com/welpo) +- Support Zola's native code block names ([#489](https://github.com/welpo/tabi/issues/489)) by [@welpo](https://github.com/welpo) +- Render markdown in page titles & descriptions ([#486](https://github.com/welpo/tabi/issues/486)) by [@stalkerGH](https://github.com/stalkerGH) and [@welpo](https://github.com/welpo) +- Add indicator to external links ([#443](https://github.com/welpo/tabi/issues/443)) by [@welpo](https://github.com/welpo) +- Allow setting post_listing_date per section ([a3ae897](https://github.com/welpo/tabi/commit/a3ae897c8310ba6a1da72db0fc81f19ca8993d6f)) by [@welpo](https://github.com/welpo) +- Render section content ([#484](https://github.com/welpo/tabi/issues/484)) by [@welpo](https://github.com/welpo) +- Support disabling header font-subset ([#458](https://github.com/welpo/tabi/issues/458)) by [@Nizzlay](https://github.com/Nizzlay) and [@welpo](https://github.com/welpo) +- Support using info-page.html for sections ([#455](https://github.com/welpo/tabi/issues/455)) by [@wischi-chr](https://github.com/wischi-chr) and [@welpo](https://github.com/welpo) +- Add `raw_path` parameter to image shortcodes ([#439](https://github.com/welpo/tabi/issues/439)) by [@welpo](https://github.com/welpo) +- [**‼️BREAKING‼️**] Add tag filtering for projects ([#431](https://github.com/welpo/tabi/issues/431)) ([a783329](https://github.com/welpo/tabi/commit/a7833299fff4c753e35fa1f00667d8801f541f9a)) by [@welpo](https://github.com/welpo) + +### 🐛 Bug fixes + +- *(CSP)* Improve CSP coverage ([#471](https://github.com/welpo/tabi/issues/471)) by [@stekershaw](https://github.com/stekershaw) +- *(analytics)* Update umami domain ([#448](https://github.com/welpo/tabi/issues/448)) by [@arichtman](https://github.com/arichtman) +- *(feed)* Styling now works in all website paths ([45fe170](https://github.com/welpo/tabi/commit/45fe17046704e249be3b5fbb94a3355d21149d4d)) by [@welpo](https://github.com/welpo) +- *(feed)* Load CSS in subfolder setups ([#467](https://github.com/welpo/tabi/issues/467)) by [@welpo](https://github.com/welpo) +- Adapt footnotes styling for zola 0.19.x & 0.20.x ([1c067e7](https://github.com/welpo/tabi/commit/1c067e708eac4282a2191507f046eacd9f18e0f6)) by [@welpo](https://github.com/welpo) +- Improve menu accessibility ([#482](https://github.com/welpo/tabi/issues/482)) by [@welpo](https://github.com/welpo) +- Support external URLs in menu ([#481](https://github.com/welpo/tabi/issues/481)) by [@welpo](https://github.com/welpo) +- Remove `nofollow` robots meta tag ([#465](https://github.com/welpo/tabi/issues/465)) by [@Nizzlay](https://github.com/Nizzlay) +- Show feed icon without socials ([de6fa58](https://github.com/welpo/tabi/commit/de6fa58fe3b276c12f16f9ddc1cf9f93269161f9)) by [@welpo](https://github.com/welpo) +- Add separator between update date & remote changes link ([2cc336d](https://github.com/welpo/tabi/commit/2cc336d9d0f7019015a356242230f0568658a523)) by [@welpo](https://github.com/welpo) +- Support relative paths in inherited social media card ([#432](https://github.com/welpo/tabi/issues/432)) by [@welpo](https://github.com/welpo) + +### 💄 Styling + +- *(admonitions)* Fix external link icon ([2b106b7](https://github.com/welpo/tabi/commit/2b106b7c628e01046495a3add7a9ec4cc00b9fa3)) by [@welpo](https://github.com/welpo) +- Increase emoji favicon size ([d777d5d](https://github.com/welpo/tabi/commit/d777d5d99679ab609bebb89726aef80562b30d87)) by [@welpo](https://github.com/welpo) +- Remove extra whitespace in post metadata ([dbb0e82](https://github.com/welpo/tabi/commit/dbb0e826b6572531d4c44bdb031d68207a906666)) by [@welpo](https://github.com/welpo) +- Use text-colour for hover on `rt` in links ([a6b6c32](https://github.com/welpo/tabi/commit/a6b6c3205096fd718757a6f32ff07d60bcc22808)) by [@welpo](https://github.com/welpo) +- Fix home banner layout for short intro ([#438](https://github.com/welpo/tabi/issues/438)) by [@welpo](https://github.com/welpo) +- Fix numbered code blocks on iOS Safari ([4be8a56](https://github.com/welpo/tabi/commit/4be8a5634fa2990825e9bc785029c4dddb340c39)) by [@welpo](https://github.com/welpo) +- Fix numbered code blocks ([#437](https://github.com/welpo/tabi/issues/437)) by [@welpo](https://github.com/welpo) +- Retain base code block style in admonitions ([557ea77](https://github.com/welpo/tabi/commit/557ea7786ffbad75fafdd69d864d6073fd1dadbc)) by [@welpo](https://github.com/welpo) + +### 📝 Documentation + +- *(README)* Fix typo ([#457](https://github.com/welpo/tabi/issues/457)) by [@Olexandr88](https://github.com/Olexandr88) +- *(README)* Add maintenance badges ([4834a9e](https://github.com/welpo/tabi/commit/4834a9e85ff89f1678374752289116bce6f3a076)) by [@welpo](https://github.com/welpo) +- *(demo)* Basic Arabic translation ([#390](https://github.com/welpo/tabi/issues/390)) by [@TheAwiteb](https://github.com/TheAwiteb) and [@welpo](https://github.com/welpo) +- *(series)* Add tip for custom text permalinks ([4029657](https://github.com/welpo/tabi/commit/402965786beb942aab0922de68cd98952f9a9be0)) by [@welpo](https://github.com/welpo) +- *(shortcodes)* Clarify aside usage ([1dcd615](https://github.com/welpo/tabi/commit/1dcd615615b492dffc00c34bd7e1bbc680cf95fd)) by [@welpo](https://github.com/welpo) +- *(shortcodes)* Clarify `position` parameter usage for "aside" ([da1b6bb](https://github.com/welpo/tabi/commit/da1b6bb0cc7719f3de23a6855d80dc0262d5c025)) by [@welpo](https://github.com/welpo) +- Suggest MathML in lieu of KaTeX for JS-free math ([eb03953](https://github.com/welpo/tabi/commit/eb0395352caffab67f1ad9b81aab51824e9feb54)) by [@welpo](https://github.com/welpo) +- Add tabi-start integration ([#441](https://github.com/welpo/tabi/issues/441)) by [@welpo](https://github.com/welpo) + +### ♻️ Refactor + +- Only show project tag filter with 2 or more tags ([180fc53](https://github.com/welpo/tabi/commit/180fc533844ec3427c447f7040ea837520c4fe5d)) by [@welpo](https://github.com/welpo) + +### 🔧 Miscellaneous tasks + +- *(CI)* Add concurrency control to sumi action ([47ea26d](https://github.com/welpo/tabi/commit/47ea26db97cfbd87518ab00b892fdbb245577535)) by [@welpo](https://github.com/welpo) +- *(CI)* Add dependencies label to upgrade PRs ([551b3d2](https://github.com/welpo/tabi/commit/551b3d28c6852c3a1e7acf3c645e0d7b84e079cb)) by [@welpo](https://github.com/welpo) +- *(CI)* Ignore deleted files in pre-commit ([f93def0](https://github.com/welpo/tabi/commit/f93def0692146a15b63d19406ec1180b9e41ba3d)) by [@welpo](https://github.com/welpo) +- *(README)* Add idle-ti.me blog to sites using tabi ([#479](https://github.com/welpo/tabi/issues/479)) by [@be-next](https://github.com/be-next) +- *(README)* Add zzmzaw's blog to sites using tabi ([#469](https://github.com/welpo/tabi/issues/469)) by [@ZzMzaw](https://github.com/ZzMzaw) +- *(README)* Add nizzlay.com to Sites using tabi ([#464](https://github.com/welpo/tabi/issues/464)) by [@Nizzlay](https://github.com/Nizzlay) +- *(README)* Add szabolcs.me to Sites using tabi ([#451](https://github.com/welpo/tabi/issues/451)) by [@szabolcsf](https://github.com/szabolcsf) +- *(README)* Set original colours for docs|up badge ([69713c9](https://github.com/welpo/tabi/commit/69713c973c11d7646c8fe56476261d96cc1978d8)) by [@welpo](https://github.com/welpo) +- *(deps)* Check for existing branch upgrades ([29bbd2e](https://github.com/welpo/tabi/commit/29bbd2eecc97aaaa95c61f8fb736d1301042aa91)) by [@welpo](https://github.com/welpo) +- *(docs)* Fix Series section headings ([0778212](https://github.com/welpo/tabi/commit/077821208f161e813da90c56db817b743bc211c4)) by [@welpo](https://github.com/welpo) +- *(docs)* Use internal links in home description ([0b10560](https://github.com/welpo/tabi/commit/0b10560a94f4a0a4bcb8536ee0595e8c4f4df800)) by [@welpo](https://github.com/welpo) +- *(projects)* Add nemui project ([11eb774](https://github.com/welpo/tabi/commit/11eb774bd74562a4628f87a130575281aa469918)) by [@welpo](https://github.com/welpo) +- *(upgrade-deps)* Improve version detection ([0688628](https://github.com/welpo/tabi/commit/06886284202f670be2034dcedbf6130446b91436)) by [@welpo](https://github.com/welpo) +- Add "shuku" project ([e1b6054](https://github.com/welpo/tabi/commit/e1b60542dfc3eb9bed39a92d3b7acfae88f32b84)) by [@welpo](https://github.com/welpo) +- Add ずつ (zutsu) project page ([c6d1c3d](https://github.com/welpo/tabi/commit/c6d1c3dff844461c7c774882dec8a87d7d3ea548)) by [@welpo](https://github.com/welpo) +- Fix dōteki docs link ([c15098a](https://github.com/welpo/tabi/commit/c15098a959242765353c7fab0906d1fc596c64c0)) by [@welpo](https://github.com/welpo) +- Update git-sumi & dōteki projects ([6d44320](https://github.com/welpo/tabi/commit/6d44320f45bc381c65e370f8f03bf3525b59e05a)) by [@welpo](https://github.com/welpo) + +### 👥 New contributors + +🫶 [@stalkerGH](https://github.com/stalkerGH) made their first contribution in [#486](https://github.com/welpo/tabi/pull/486) + +🫶 [@stekershaw](https://github.com/stekershaw) made their first contribution in [#471](https://github.com/welpo/tabi/pull/471) + +🫶 [@Nizzlay](https://github.com/Nizzlay) made their first contribution in [#465](https://github.com/welpo/tabi/pull/465) + +🫶 [@Olexandr88](https://github.com/Olexandr88) made their first contribution in [#457](https://github.com/welpo/tabi/pull/457) + +🫶 [@wischi-chr](https://github.com/wischi-chr) made their first contribution in [#455](https://github.com/welpo/tabi/pull/455) + +🫶 [@szabolcsf](https://github.com/szabolcsf) made their first contribution in [#451](https://github.com/welpo/tabi/pull/451) + +## [3.1.0](https://github.com/welpo/tabi/compare/v3.0.0..v3.1.0) - 2024-11-14 + +### ✨ Features + +- *(shortcodes)* Support body admonitions ([#423](https://github.com/welpo/tabi/issues/423)) by [@welpo](https://github.com/welpo) +- Allow pinned posts with pagination ([#428](https://github.com/welpo/tabi/issues/428)) by [@welpo](https://github.com/welpo) +- Add pinned posts functionality ([#424](https://github.com/welpo/tabi/issues/424)) by [@welpo](https://github.com/welpo) +- Add series functionality ([#406](https://github.com/welpo/tabi/issues/406)) by [@ZzMzaw](https://github.com/ZzMzaw) and [@welpo](https://github.com/welpo) + +### 🐛 Bug fixes + +- Link to "All posts" in non-default-language root ([3b7fd3d](https://github.com/welpo/tabi/commit/3b7fd3db9c33fd3ca6114ca00fffa2a91f682a0a)) by [@welpo](https://github.com/welpo) +- Isso comments in multilingual setups ([#427](https://github.com/welpo/tabi/issues/427)) by [@welpo](https://github.com/welpo) + +### 💄 Styling + +- Colour scrollbar to match primary colour ([#430](https://github.com/welpo/tabi/issues/430)) by [@welpo](https://github.com/welpo) +- Set accent color to match theme ([#429](https://github.com/welpo/tabi/issues/429)) by [@welpo](https://github.com/welpo) +- Fix info admonition code color ([5927409](https://github.com/welpo/tabi/commit/5927409c41e71d6943deee426fc75a94037cee36)) by [@welpo](https://github.com/welpo) +- Improve navigation bar & metadata wrapping ([#425](https://github.com/welpo/tabi/issues/425)) by [@welpo](https://github.com/welpo) +- Fix hover color for element in links ([87f1099](https://github.com/welpo/tabi/commit/87f1099caa8741bcacadf2aae2677a529395e454)) by [@welpo](https://github.com/welpo) +- Add styling for keyboard input ([51fee5d](https://github.com/welpo/tabi/commit/51fee5d660232a1eafeb39f439fe5377f3f63406)) by [@welpo](https://github.com/welpo) + +### 📝 Documentation + +- *(README)* Fix typo ([#421](https://github.com/welpo/tabi/issues/421)) by [@ZzMzaw](https://github.com/ZzMzaw) +- Highlight pinned posts feature ([c3c344a](https://github.com/welpo/tabi/commit/c3c344a76fb894ec87fc9896e7a0202788e001c5)) by [@welpo](https://github.com/welpo) +- Clarify instructions for listing recent posts ([#418](https://github.com/welpo/tabi/issues/418)) ([3442fd9](https://github.com/welpo/tabi/commit/3442fd9ff0c0a093f08bb27aaa0d92e5993df29b)) by [@welpo](https://github.com/welpo) + +### ♻️ Refactor + +- *(GitHub)* Update issue templates ([5687f3b](https://github.com/welpo/tabi/commit/5687f3bacb6ed69ffbe4143e93b6c95ce8fb5c59)) by [@welpo](https://github.com/welpo) + +### 🔧 Miscellaneous tasks + +- *(CI)* Allow longer PR titles for dep updates ([e2c5c6e](https://github.com/welpo/tabi/commit/e2c5c6e9b749c3591af6a822eee65c1ee1854c01)) by [@welpo](https://github.com/welpo) +- *(CI)* Allow longer PR titles for dep updates ([fa9f160](https://github.com/welpo/tabi/commit/fa9f16034241ccee6229ef0279b3b9bc65249cfa)) by [@welpo](https://github.com/welpo) +- *(CI)* Allow longer PR titles for dep updates ([bd45a1a](https://github.com/welpo/tabi/commit/bd45a1ae45997b950c703d1ebf1e34b3b82173eb)) by [@welpo](https://github.com/welpo) +- *(deps)* Remove local release script ([2e3cff2](https://github.com/welpo/tabi/commit/2e3cff2ef1ca8396c632de48b21174601d5ff46c)) by [@welpo](https://github.com/welpo) +- *(projects)* Add ラム (ramu) project ([f300129](https://github.com/welpo/tabi/commit/f3001298c24d49d234247c9cce2a6c771778c1c3)) by [@welpo](https://github.com/welpo) +- Change codeblock language from plaintext to txt ([57a0a8e](https://github.com/welpo/tabi/commit/57a0a8e1a09d586acdf5c72464d79328e0c9b27f)) by [@welpo](https://github.com/welpo) + +## [3.0.0](https://github.com/welpo/tabi/compare/v2.17.0..v3.0.0) - 2024-10-18 + +### 💥 BREAKING CHANGES 💥 + +- Force code blocks LTR rendering ([#412](https://github.com/welpo/tabi/issues/412)) ([092ccdd](https://github.com/welpo/tabi/commit/092ccdd1ba8bf08cc738664ba4fbe9e7a0ff282e)) by [@welpo](https://github.com/welpo) + +### ✨ Features + +- Add force_text_direction shortcode ([#414](https://github.com/welpo/tabi/issues/414)) ([c9f8d27](https://github.com/welpo/tabi/commit/c9f8d27b962217ff0fb09b30ec14aee65fe8518d)) by [@welpo](https://github.com/welpo) +- [**‼️BREAKING‼️**] Force code blocks LTR rendering ([#412](https://github.com/welpo/tabi/issues/412)) ([092ccdd](https://github.com/welpo/tabi/commit/092ccdd1ba8bf08cc738664ba4fbe9e7a0ff282e)) by [@welpo](https://github.com/welpo) + +### 🐛 Bug fixes + +- Update CSP for GoatCounter ([#413](https://github.com/welpo/tabi/issues/413)) by [@noeddl](https://github.com/noeddl) + +### 📝 Documentation + +- *(CONTRIBUTING)* Fix broken link to commit message style ([11e246a](https://github.com/welpo/tabi/commit/11e246a876eef846e8c1e26add7331f25beb9c27)) by [@welpo](https://github.com/welpo) +- *(mastering tabi)* Mention social links rel='me' ([5db70b7](https://github.com/welpo/tabi/commit/5db70b7978e7141be9396d3f69375a87b2d44ed2)) by [@welpo](https://github.com/welpo) + +### 🔧 Miscellaneous tasks + +- Update git-cliff variables to `commit.remote` ([0a36ef5](https://github.com/welpo/tabi/commit/0a36ef55ee092fe7bb1f8803c04a4cb8245b2a13)) by [@welpo](https://github.com/welpo) + +### 👥 New contributors + +🫶 [@noeddl](https://github.com/noeddl) made their first contribution in [#413](https://github.com/welpo/tabi/pull/413) + +## [2.17.0](https://github.com/welpo/tabi/compare/v2.16.0..v2.17.0) - 2024-10-10 + +### ✨ Features + +- Add fediverse creator metadata support ([#409](https://github.com/welpo/tabi/issues/409)) by [@arichtman](https://github.com/arichtman), [@Ariel](https://github.com/Ariel) Richtman and [@welpo](https://github.com/welpo) + +### 🐛 Bug fixes + +- *(search)* Restore highlighting functionality ([#401](https://github.com/welpo/tabi/issues/401)) by [@welpo](https://github.com/welpo) +- Set proper URL for self-hosted Umami ([#402](https://github.com/welpo/tabi/issues/402)) by [@soumendrak](https://github.com/soumendrak) + +### 📝 Documentation + +- Add mermaid shortcode usage ([#407](https://github.com/welpo/tabi/issues/407)) by [@ZzMzaw](https://github.com/ZzMzaw) and [@welpo](https://github.com/welpo) +- Update comment in config.toml RE: #402 ([c50edbd](https://github.com/welpo/tabi/commit/c50edbd453eca2f031bc97a5a25caa206644d568)) by [@welpo](https://github.com/welpo) + +### ♻️ Refactor + +- *(search)* Reduce search lag on mobile ([7ceada9](https://github.com/welpo/tabi/commit/7ceada974b7c3f2c52aaa5688af631c806901aed)) by [@welpo](https://github.com/welpo) + +### 🔧 Miscellaneous tasks + +- *(README)* Add jmbhughes.com to showcase ([#404](https://github.com/welpo/tabi/issues/404)) by [@jmbhughes](https://github.com/jmbhughes) +- *(deps)* Replace local release script w/ git submodule ([66239be](https://github.com/welpo/tabi/commit/66239bee016406c87a227b685eb70a464546e199)) by [@welpo](https://github.com/welpo) +- *(deps)* Automate KaTeX/mermaid upgrades ([fc04ab4](https://github.com/welpo/tabi/commit/fc04ab4e40977bafa1b821c77e38554d287f69bc)) by [@welpo](https://github.com/welpo) +- Reformat social card creation tip ([47fcee8](https://github.com/welpo/tabi/commit/47fcee8f81fb10bcd7cc042cc4a80dcada244b6d)) by [@welpo](https://github.com/welpo) + +### 👥 New contributors + +🫶 [@github-actions](https://github.com/github-actions)[bot] made their first contribution in [#405](https://github.com/welpo/tabi/pull/405) + +🫶 [@jmbhughes](https://github.com/jmbhughes) made their first contribution in [#404](https://github.com/welpo/tabi/pull/404) + +🫶 [@soumendrak](https://github.com/soumendrak) made their first contribution in [#402](https://github.com/welpo/tabi/pull/402) + +## [2.16.0](https://github.com/welpo/tabi/compare/v2.15.0..v2.16.0) - 2024-09-22 + +### ✨ Features + +- *(remote_text shortcode)* Support line ranges ([#399](https://github.com/welpo/tabi/issues/399)) ([008b976](https://github.com/welpo/tabi/commit/008b976e06e0b93e021e2ca641eda42521e58f98)) by [@welpo](https://github.com/welpo) +- *(remote_text shortcode)* Support relative paths ([#398](https://github.com/welpo/tabi/issues/398)) by [@welpo](https://github.com/welpo) + +## [2.15.0](https://github.com/welpo/tabi/compare/v2.14.0..v2.15.0) - 2024-09-20 + +### ✨ Features + +- *(feed)* Make "Visit website" link context-aware ([#394](https://github.com/welpo/tabi/issues/394)) by [@welpo](https://github.com/welpo) +- *(search)* Hide "clear search" icon if input is empty ([#388](https://github.com/welpo/tabi/issues/388)) by [@welpo](https://github.com/welpo) + +### 🐛 Bug fixes + +- *(feed)* Resolve Atom feed validation issues ([#393](https://github.com/welpo/tabi/issues/393)) by [@welpo](https://github.com/welpo) +- Allow pages within pages ([#385](https://github.com/welpo/tabi/issues/385)) by [@welpo](https://github.com/welpo) +- Improve dark mode and OS theme handling ([#380](https://github.com/welpo/tabi/issues/380)) by [@welpo](https://github.com/welpo) + +### 💄 Styling + +- Improve RTL styling consistency ([#381](https://github.com/welpo/tabi/issues/381)) by [@welpo](https://github.com/welpo) + +### 🔧 Miscellaneous tasks + +- *(README)* Add Ponderosa Games to showcase ([#395](https://github.com/welpo/tabi/issues/395)) by [@JVimes](https://github.com/JVimes) +- *(deps)* Avoid masking return values ([1b11f4b](https://github.com/welpo/tabi/commit/1b11f4b321d0ae52179d88cc3ecd1b72ef2b37ae)) by [@welpo](https://github.com/welpo) +- *(deps)* Check local deps version to early exit ([b5cbad4](https://github.com/welpo/tabi/commit/b5cbad422bc14f44a620bcbb87449f2425c16af6)) by [@welpo](https://github.com/welpo) +- Set [@TheAwiteb](https://github.com/TheAwiteb) as owner of Arabic translation ([edb0873](https://github.com/welpo/tabi/commit/edb087392f2989b4f08122c81fa3e51d17fbb6b8)) by [@welpo](https://github.com/welpo) + +### 👥 New contributors + +🫶 [@JVimes](https://github.com/JVimes) made their first contribution in [#395](https://github.com/welpo/tabi/pull/395) + +## [2.14.0](https://github.com/welpo/tabi/compare/v2.13.0..v2.14.0) - 2024-09-08 + +### ✨ Features + +- *(i18n)* Add Odia language ([#372](https://github.com/welpo/tabi/issues/372)) +- *(i18n)* Add Estonian language ([#365](https://github.com/welpo/tabi/issues/365)) by [@NippleOfAnApe](https://github.com/NippleOfAnApe) +- Add Mermaid diagram support ([#370](https://github.com/welpo/tabi/issues/370)) by [@welpo](https://github.com/welpo) + +### 🐛 Bug fixes + +- *(RTL)* Fix blockquote style ([#368](https://github.com/welpo/tabi/issues/368)) by [@TheAwiteb](https://github.com/TheAwiteb) and [@welpo](https://github.com/welpo) +- Reduce main page header/list sizes ([#375](https://github.com/welpo/tabi/issues/375)) by [@welpo](https://github.com/welpo) +- Add missing quotes to HTML attributes ([#367](https://github.com/welpo/tabi/issues/367)) by [@DataTriny](https://github.com/DataTriny) + +### 💄 Styling + +- Use note admonition for TL;DR ([b9bf4b2](https://github.com/welpo/tabi/commit/b9bf4b2fd67c71647c0d2a1bd77dee8cb9e0ec49)) by [@welpo](https://github.com/welpo) + +### 📝 Documentation + +- *(mastering tabi)* Clarify prev/next links requirements ([6219b92](https://github.com/welpo/tabi/commit/6219b9200cfd544b999b064fabfa0ca37d4815d8)) by [@welpo](https://github.com/welpo) + +### ♻️ Refactor + +- *(footer)* Lazy load social icons ([9e7b845](https://github.com/welpo/tabi/commit/9e7b845e544758792831da520379e04089909b78)) by [@welpo](https://github.com/welpo) + +### 🔧 Miscellaneous tasks + +- *(deps)* Add KaTeX to dependency upgrade script ([001ec8f](https://github.com/welpo/tabi/commit/001ec8fc9a9524efbe4c3c04669fb64be4ed8efd)) by [@welpo](https://github.com/welpo) +- *(deps)* Add script to upgrade mermaid ([d73c4bd](https://github.com/welpo/tabi/commit/d73c4bde5a12d434a595be877f4452fa0c20ae30)) by [@welpo](https://github.com/welpo) +- *(release)* Ensure script is ran from default branch ([82f7a98](https://github.com/welpo/tabi/commit/82f7a984d54046a4f884461b3c5f52ac830661bf)) by [@welpo](https://github.com/welpo) +- Add funding information ([8d22a42](https://github.com/welpo/tabi/commit/8d22a42e3fd5d909eaf90f7132e818b9c45f7b07)) by [@welpo](https://github.com/welpo) + +### 👥 New contributors + +🫶 @ made their first contribution in [#372](https://github.com/welpo/tabi/pull/372) + +🫶 [@DataTriny](https://github.com/DataTriny) made their first contribution in [#367](https://github.com/welpo/tabi/pull/367) + +🫶 [@NippleOfAnApe](https://github.com/NippleOfAnApe) made their first contribution in [#365](https://github.com/welpo/tabi/pull/365) + +## [2.13.0](https://github.com/welpo/tabi/compare/v2.12.0..v2.13.0) - 2024-07-24 + +### ✨ Features + +- Follow user OS theme with JS disabled ([#357](https://github.com/welpo/tabi/issues/357)) by [@welpo](https://github.com/welpo) +- Add date visibility options to post list ([#330](https://github.com/welpo/tabi/issues/330)) by [@sam9032](https://github.com/sam9032) and [@welpo](https://github.com/welpo) + +### 🐛 Bug fixes + +- *(header)* Render feed links based on config ([#358](https://github.com/welpo/tabi/issues/358)) by [@welpo](https://github.com/welpo) +- *(post_listing_date)* Show original date for unedited articles ([#355](https://github.com/welpo/tabi/issues/355)) by [@sam9032](https://github.com/sam9032) +- *(search)* Close modal when clicking current page result ([#350](https://github.com/welpo/tabi/issues/350)) by [@welpo](https://github.com/welpo) + +### 💄 Styling + +- *(error)* Enhance visibility of Zola errors ([#359](https://github.com/welpo/tabi/issues/359)) by [@welpo](https://github.com/welpo) +- Match footnote backlinks size on Zola v0.19 ([0f18ac2](https://github.com/welpo/tabi/commit/0f18ac264df8b9766c4d431dfd37f5f5799f3834)) by [@welpo](https://github.com/welpo) + +### 📝 Documentation + +- *(mastering tabi)* Fix broken image ([1111631](https://github.com/welpo/tabi/commit/1111631325e3ebf8ae3a2f6cd18492cfc5aa44c2)) by [@welpo](https://github.com/welpo) +- Mention custom Twitter card & automatic OG tags ([fbb81f9](https://github.com/welpo/tabi/commit/fbb81f976433d93ee3787f4a9d5c6c3049f815a2)) by [@welpo](https://github.com/welpo) +- Deprecate JS footnote backlinks ([ced0cb4](https://github.com/welpo/tabi/commit/ced0cb43b6b4b4f6fba583990e428ddedbf52af3)) by [@welpo](https://github.com/welpo) +- Fix broken internal links ([4145364](https://github.com/welpo/tabi/commit/4145364e085929ae9c09ccb908a0bae77a0b7520)) by [@welpo](https://github.com/welpo) + +### 🔧 Miscellaneous tasks + +- *(release)* Add error handling function ([9585843](https://github.com/welpo/tabi/commit/9585843b14131843775e41df67fe9cc60c95a2ea)) by [@welpo](https://github.com/welpo) +- *(release)* Ensure local repository is in good state ([617a940](https://github.com/welpo/tabi/commit/617a940cf823917bc86df5f05350236c40560dc0)) by [@welpo](https://github.com/welpo) + +### 👥 New contributors + +🫶 [@sam9032](https://github.com/sam9032) made their first contribution in [#355](https://github.com/welpo/tabi/pull/355) + +🫶 [@renovate](https://github.com/renovate)[bot] made their first contribution in [#345](https://github.com/welpo/tabi/pull/345) + +## [2.12.0](https://github.com/welpo/tabi/compare/v2.11.0..v2.12.0) - 2024-06-29 + +### ✨ Features + +- *(admonitions)* Allow swapping admonition icons ([#340](https://github.com/welpo/tabi/issues/340)) by [@welpo](https://github.com/welpo) +- *(socials)* Add Debian icon ([82ecbc1](https://github.com/welpo/tabi/commit/82ecbc145489bf4415d7a3500be85191524d1b53)) by [@welpo](https://github.com/welpo) +- Allow sorting tags based on post count ([#344](https://github.com/welpo/tabi/issues/344)) by [@metaleap](https://github.com/metaleap) and [@welpo](https://github.com/welpo) +- Add option to use sans-serif font everywhere ([a907f56](https://github.com/welpo/tabi/commit/a907f56bd568378b099c0706fa4c92d7102b1688)) by [@welpo](https://github.com/welpo) + +### 📝 Documentation + +- *(mastering tabi)* Clarify post sorting in Archive ([c9c8ed8](https://github.com/welpo/tabi/commit/c9c8ed84a00136469a53d30b6e694b6cb845c5fa)) by [@welpo](https://github.com/welpo) + +### ♻️ Refactor + +- Improve "Last updated on" format ([#342](https://github.com/welpo/tabi/issues/342)) by [@welpo](https://github.com/welpo) + +### 👥 New contributors + +🫶 [@metaleap](https://github.com/metaleap) made their first contribution in [#344](https://github.com/welpo/tabi/pull/344) + ## [2.11.0](https://github.com/welpo/tabi/compare/v2.10.0..v2.11.0) - 2024-06-24 ### ✨ Features -- *(socials)* Add bluesky icon ([#333](https://github.com/welpo/tabi/issues/333)) by [@gacallea](https://github.com/gacallea) +- *(socials)* Add bluesky icon ([#333](https://github.com/welpo/tabi/issues/333)) by [@andreacfromtheapp](https://github.com/andreacfromtheapp) - Allow HTML tags in multilingual quote author ([be7628a](https://github.com/welpo/tabi/commit/be7628aeaa573b69739a2751e93d77da0b587124)) by [@welpo](https://github.com/welpo) ### 🐛 Bug fixes @@ -32,7 +430,7 @@ We use Semantic Versioning (SemVer) for our version numbers, formatted as MAJOR. ### 👥 New contributors -🫶 [@gacallea](https://github.com/gacallea) made their first contribution in [#333](https://github.com/welpo/tabi/pull/333) +🫶 [@andreacfromtheapp](https://github.com/andreacfromtheapp) made their first contribution in [#333](https://github.com/welpo/tabi/pull/333) ## [2.10.0](https://github.com/welpo/tabi/compare/v2.9.0..v2.10.0) - 2024-05-30 @@ -174,6 +572,10 @@ We use Semantic Versioning (SemVer) for our version numbers, formatted as MAJOR. - *(release)* Replace both pull and issue links ([e951e95](https://github.com/welpo/tabi/commit/e951e951102249707a4c899f0d194b781c3466d2)) by [@welpo](https://github.com/welpo) +### 👥 New contributors + +🫶 [@be-next](https://github.com/be-next) made their first contribution in [#284](https://github.com/welpo/tabi/pull/284) + ## [2.4.0](https://github.com/welpo/tabi/compare/v2.3.0..v2.4.0) - 2024-03-02 ### ✨ Features @@ -266,6 +668,10 @@ We use Semantic Versioning (SemVer) for our version numbers, formatted as MAJOR. - Update changelog sections ([0e6c5c2](https://github.com/welpo/tabi/commit/0e6c5c269177712ae58649fe24662b407315d3f1)) by [@welpo](https://github.com/welpo) - Add continuous deployment workflow ([9b8b139](https://github.com/welpo/tabi/commit/9b8b1396cfaeefd61050cdf49bf81f01977e5899)) by [@welpo](https://github.com/welpo) +### 👥 New contributors + +🫶 [@TheAwiteb](https://github.com/TheAwiteb) made their first contribution in [#264](https://github.com/welpo/tabi/pull/264) + ## [2.1.0](https://github.com/welpo/tabi/compare/v2.0.0..v2.1.0) - 2024-01-29 ### ✨ Features @@ -276,6 +682,10 @@ We use Semantic Versioning (SemVer) for our version numbers, formatted as MAJOR. - *(README)* Add CSS code block setup in required config ([c9d6b62](https://github.com/welpo/tabi/commit/c9d6b629078f70f4392818a17a4a7ac6b11c0480)) by [@welpo](https://github.com/welpo) +### 👥 New contributors + +🫶 [@andwati](https://github.com/andwati) made their first contribution in [#257](https://github.com/welpo/tabi/pull/257) + ## [2.0.0](https://github.com/welpo/tabi/compare/v1.0.0..v2.0.0) - 2024-01-15 ### 💥 BREAKING CHANGES 💥 @@ -315,6 +725,10 @@ We use Semantic Versioning (SemVer) for our version numbers, formatted as MAJOR. - *(home-banner)* [**‼️BREAKING‼️**] Force proper header.img path ([#254](https://github.com/welpo/tabi/issues/254)) by [@welpo](https://github.com/welpo) - *(i18n)* [**‼️BREAKING‼️**] Force config.toml copyright translation ([#255](https://github.com/welpo/tabi/issues/255)) ([9f39b7f](https://github.com/welpo/tabi/commit/9f39b7fe47721eb7aaea04d8b9ee66b557b7eabf)) by [@welpo](https://github.com/welpo) +### 👥 New contributors + +🫶 [@arichtman](https://github.com/arichtman) made their first contribution in [#231](https://github.com/welpo/tabi/pull/231) + ## 1.0.0 - 2023-12-29 ### 💥 BREAKING CHANGES 💥 @@ -855,16 +1269,30 @@ We use Semantic Versioning (SemVer) for our version numbers, formatted as MAJOR. ### 👥 New contributors +🫶 [@welpo](https://github.com/welpo) made their first contribution + +🫶 [@ZzMzaw](https://github.com/ZzMzaw) made their first contribution in [#215](https://github.com/welpo/tabi/pull/215) + 🫶 [@joberthrogers18](https://github.com/joberthrogers18) made their first contribution in [#219](https://github.com/welpo/tabi/pull/219) 🫶 [@xvello](https://github.com/xvello) made their first contribution in [#218](https://github.com/welpo/tabi/pull/218) 🫶 [@donovanglover](https://github.com/donovanglover) made their first contribution in [#205](https://github.com/welpo/tabi/pull/205) +🫶 [@nyadiia](https://github.com/nyadiia) made their first contribution in [#195](https://github.com/welpo/tabi/pull/195) + +🫶 [@Almost-Senseless-Coder](https://github.com/Almost-Senseless-Coder) made their first contribution in [#192](https://github.com/welpo/tabi/pull/192) + 🫶 [@Jieiku](https://github.com/Jieiku) made their first contribution in [#173](https://github.com/welpo/tabi/pull/173) +🫶 [@sandman](https://github.com/sandman) made their first contribution in [#170](https://github.com/welpo/tabi/pull/170) + +🫶 [@Smtbook](https://github.com/Smtbook) made their first contribution in [#166](https://github.com/welpo/tabi/pull/166) + 🫶 [@SeaDve](https://github.com/SeaDve) made their first contribution in [#165](https://github.com/welpo/tabi/pull/165) 🫶 [@stevenroose](https://github.com/stevenroose) made their first contribution in [#124](https://github.com/welpo/tabi/pull/124) +🫶 [@serginogal](https://github.com/serginogal) made their first contribution + diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 0096eb4..42e6424 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -25,7 +25,7 @@ Working on your first Pull Request? You can learn how from this free video serie Please make sure the following is done when submitting a pull request: 1. **Keep your PR small**. Small pull requests are much easier to review and more likely to get merged. Make sure the PR does only one thing, otherwise please split it. -2. **Use descriptive titles**. It is recommended to follow this [commit message style](#conventional-commit-messages). +2. **Use descriptive titles**. It is recommended to follow this [commit message style](#conventional-commit-messages-with-gitmoji). 3. **Test your changes**. Make sure to test different configurations that might affect your changes. 4. **Fill the PR template**. The template will guide you through the process of submitting a PR. @@ -37,7 +37,7 @@ Format: ` (): ` `` is an emoji from the [gitmoji](https://gitmoji.dev/) list. It makes it easier to visually scan the commit history and quickly grasp the purpose of changes. -`` is optional. If your change affects a specific part of the codebase, consider adding the scope. Scopes should be brief but recognizable, e.g. `config`, `gitmoji`, or `cli`. +`` is optional. If your change affects a specific part of the codebase, consider adding the scope. Scopes should be brief but recognizable, e.g. `config`, `feed`, or `search`. The various types of commits: @@ -47,7 +47,7 @@ The various types of commits: - `docs`: a change to the website or other Markdown documents. - `refactor`: a change to code that doesn't change behaviour, e.g. splitting files, renaming internal variables, improving code style… - `chore`: upgrading dependencies, releasing new versions… Chores that are **regularly done** for maintenance purposes. -- `misc`: anything else that doesn't change production code, yet is not `test` or `chore`. e.g. updating GitHub actions workflow. +- `misc`: anything else that doesn't change production code, yet is not `chore`. e.g. updating GitHub actions workflow. The commits within your PR don't need to follow this convention (we'll [squash them](https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/configuring-pull-request-merges/configuring-commit-squashing-for-pull-requests)). However, the PR title should be in this format. If you're not sure about the title, don't worry, we'll help you fix it. Your code is more important than conventions! diff --git a/README.md b/README.md index c35d43f..595f5f6 100644 --- a/README.md +++ b/README.md @@ -5,22 +5,29 @@ Contributors Forks - + Last commit
Latest release - Documentation + Documentation License Clean commits + + Average time to resolve an issue + + Percentage of issues still open

-# tabi +# 🌱 tabi -A fast, lightweight, and modern [Zola](https://www.getzola.org) theme with multi-language support. It aims to be a personal page and home to blog posts. +An accessible [Zola](https://www.getzola.org) theme with [search](https://welpo.github.io/tabi/blog/mastering-tabi-settings/#search), [multi-language support](https://welpo.github.io/tabi/blog/faq-languages/), [optional JavaScript](https://welpo.github.io/tabi/blog/javascript/), a perfect Lighthouse score, and [comprehensive documentation](https://welpo.github.io/tabi). Crafted for personal websites and blogs. + +> [!TIP] +> Want to start blogging right away? Use the [tabi-start template](https://github.com/welpo/tabi-start) to get a complete site up and running in minutes. See a live preview (and the theme's documentation) [here](https://welpo.github.io/tabi). @@ -38,13 +45,18 @@ tabi has a perfect score on Google's Lighthouse audit: - [X] [Set any language as default](https://welpo.github.io/tabi/blog/faq-languages/#how-do-i-set-a-default-language-for-my-site). Set your base site to Chinese, Spanish, French, Hindi… or any [other supported language](/i18n). The theme's interface will be translated accordingly. - [X] [Integration with remote repositories](https://welpo.github.io/tabi/blog/mastering-tabi-settings/#git-repository-integration) on GitHub, GitLab, Gitea & Codeberg for commit history and showing the site source. +- [X] [Series support](https://welpo.github.io/tabi/blog/series/) for creating sequential content like tutorials, courses, and multi-part stories. - [X] Dark and light themes. Defaults to the OS setting, with a switcher in the navigation bar. - [X] Thorough documentation. See [Mastering tabi Settings: A Comprehensive Guide](https://welpo.github.io/tabi/blog/mastering-tabi-settings/). - [X] Perfect Lighthouse score (Performance, Accessibility, Best Practices and SEO). - [X] [Comprehensive multi-language support](https://welpo.github.io/tabi/blog/faq-languages/#how-does-tabi-handle-multilingual-support). Add as many languages as you wish. - [X] Support for [comments using giscus, utterances, Hyvor Talk, or Isso](https://welpo.github.io/tabi/blog/comments/). +- [X] [Indieweb](https://indieweb.org/) ready with microformats, [hcard](https://welpo.github.io/tabi/blog/mastering-tabi-settings/#representative-h-card) and [webmentions](https://welpo.github.io/tabi/blog/mastering-tabi-settings/#webmentions) support. - [X] Code syntax highlighting with colours based on [Catppuccin](https://github.com/catppuccin/catppuccin) Frappé. +- [X] [Mermaid support](https://welpo.github.io/tabi/blog/shortcodes/#mermaid-diagrams) to create diagrams and charts with text. - [X] [Local search](https://welpo.github.io/tabi/blog/mastering-tabi-settings/#search) with an accessible, multi-lingual interface. +- [X] [Custom Twitter card](https://welpo.github.io/tabi/blog/mastering-tabi-settings/#social-media-cards) and automatic Open Graph tags. +- [X] Anonymous [like buttons](https://welpo.github.io/tabi/blog/mastering-tabi-settings/#iine) powered by [iine](https://iine.to). - [X] [KaTeX](https://katex.org/) support for mathematical notation. - [X] [Stylized and human readable Atom feed](https://welpo.github.io/tabi/atom.xml). - [X] [Stylized and human readable sitemap](https://welpo.github.io/tabi/sitemap.xml). @@ -58,16 +70,21 @@ tabi has a perfect score on Google's Lighthouse audit: - [X] [Custom canonical URLs](https://welpo.github.io/tabi/blog/mastering-tabi-settings/#canonical-url). - [X] [Custom shortcodes](https://welpo.github.io/tabi/blog/shortcodes/). - [X] [Customizable skins](https://welpo.github.io/tabi/blog/customise-tabi/). -- [X] [Footnote backlinks](https://welpo.github.io/tabi/blog/mastering-tabi-settings/#footnote-backlinks). - [X] [Social media cards](https://welpo.github.io/tabi/blog/mastering-tabi-settings/#social-media-cards). - [X] Responsive design. - [X] [Projects page](https://welpo.github.io/tabi/projects/). - [X] [Archive page](https://welpo.github.io/tabi/archive/). +- [X] [Pinned posts](https://welpo.github.io/tabi/blog/mastering-tabi-settings/#pinning-posts). - [X] [Social links](https://welpo.github.io/tabi/blog/mastering-tabi-settings/#social-media-icons). - [X] [Tags](https://welpo.github.io/tabi/blog/mastering-tabi-settings/#tags). ## Installation +> [!NOTE] +> The fastest way to create a new site is to use the [tabi-start template](https://github.com/welpo/tabi-start). This gives you a complete blog setup with all the essential configuration ready to go. + +### Manual installation + To add tabi to you existing Zola site: 0. Initialize a Git repository in your project directory (if you haven't already): @@ -110,24 +127,40 @@ highlight_code = true highlight_theme = "css" ``` -5. Create a `content/_index.md` file with the following content: +5. Create a `content/_index.md` file. This file controls how your home page looks and behaves. Choose one of the following options: -``` -+++ -title = "Home" -paginate_by = 5 # Set the number of posts per page -template = "index.html" -+++ -``` + **Option A: Serve posts from `/`**: -If you want to serve your blog posts from a different path, such as `blog/`, add a `section_path` in the `[extra]` section of `content/_index.md` (this file will need pagination): + ``` + +++ + title = "Home" + paginate_by = 5 # Show 5 posts per page. + +++ + ``` -``` -[extra] -section_path = "blog/_index.md" -``` + - This will display posts in `content/` with pagination. -**Note**: use the full path to the section's `_index.md` file. Simply using `section_path = "blog/"` will not work. + **Option B: Serve posts from a different path (e.g., `blog/`)**: + + ``` + +++ + title = "Home" + # Note we're not setting `paginate_by` here. + + [extra] + section_path = "blog/_index.md" # Where to find your posts. + max_posts = 5 # Show 5 posts on the home page. + +++ + ``` + + - This will display the latest 5 posts from the `blog/` section. + - Do not set `paginate_by` if you choose this option. + - Use the full path to the section's `_index.md` file. Using `section_path = "blog/"` will not work. + +> [!WARNING] +> Do not set both `paginate_by` and `section_path` in `content/_index.md`. +> +> These settings are mutually exclusive and using both may result in no posts being displayed. 6. If you want an introduction section (see screenshot above), add these lines to `content/_index.md`: @@ -174,21 +207,37 @@ git pull | Website | Creator | Description | Site Source | | - | - | - | - | | [osc.garden](https://osc.garden) | Óscar Fernández ([welpo](https://github.com/welpo)) | Data science, psychology, and Zola | [Source](https://github.com/welpo/osc.garden) | -| [sandip.live](https://sandip.live) | Sandip G ([sandman](https://github.com/sandman)) | Startups, tech and the good life | [Source](https://github.com/sandman/sandman.github.io) | | [seadve.github.io](https://seadve.github.io/) | Dave Patrick Caberto ([SeaDve](https://github.com/SeaDve/)) | Personal blog and portfolio with custom CSS | [Source](https://github.com/SeaDve/seadve.github.io) | | [mikufan.page](https://mikufan.page) | [Nadia](https://github.com/nyadiia) | Personal blog | [Source](https://github.com/nyadiia/mikufan.page) | | [tim-boettcher.online](https://tim-boettcher.online/) | [Tim Böttcher](https://codeberg.org/Tim-Boettcher/) | Insights and ramblings of a deafblind programmer | [Source](https://codeberg.org/Tim-Boettcher/tim-boettcher-online/) | | [www.richtman.au](https://www.richtman.au) | [Ariel Richtman](https://github.com/arichtman) | Personal tech blog | [Source](https://github.com/arichtman/www.richtman.au) | +| [Ponderosa Games](https://ponderosagames.com/) | John Burak ([JVimes](https://github.com/jvimes)) | A friendly indie game company | — | +| [jmbhughes.com](https://jmbhughes.com/) | Marcus Hughes ([jmbhughes](https://github.com/jmbhughes)) | Personal blog | [Source](https://github.com/jmbhughes/jmbhughes.github.io) | +| [szabolcs.me](https://szabolcs.me) | Szabolcs Fazekas ([szabolcsf](https://github.com/szabolcsf)) | Personal blog | [Source](https://github.com/szabolcsf/szabolcs.me) | +| [Nizzlay](https://nizzlay.com) | Niels Gouman ([Nizzlay](https://github.com/Nizzlay)) | Personal blog | [Source](https://github.com/Nizzlay/nizzlay.com) | +| [ZzMzaw's blog](https://zzmzaw.github.io/) | ZzMzaw ([ZzMzaw](https://github.com/ZzMzaw)) | Personal blog | [Source](https://github.com/ZzMzaw/zzmzaw.github.io) | +| [idle-ti.me](https://idle-ti.me/) | Jérôme Ramette ([be-next](https://github.com/be-next)) | Personal blog | [Source](https://github.com/be-next/idle-ti.me) | +| [tzinm.me](https://tzinm.me/) | [Tzinm](https://github.com/tzinm) | Personal blog | [Source](https://codeberg.org/tzinm/blog) | +| [b1n.io](https://b1n.io) | [b1nhack](https://github.com/b1nhack) | Linux kernel vulnerability researcher | [Source](https://github.com/b1nhack/blog) | +| [posixlycorrect.com](https://posixlycorrect.com/) | [Fabian Montero](https://git.posixlycorrect.com/fabian) | Personal homepage | [Source](https://git.posixlycorrect.com/fabian/homepage) | Using tabi? Feel free to create a PR and add your site to this list. ## Inspiration This theme was inspired by: -- [shadharon](https://github.com/syedzayyan/shadharon) — tabi started as a fork of [syedzayyan](https://github.com/syedzayyan)'s theme; -- [tailwind-nextjs-starter-blog](https://github.com/timlrx/tailwind-nextjs-starter-blog); -- [abridge](https://github.com/Jieiku/abridge); -- [internetVin's blog](https://internetvin.ghost.io). + +- [shadharon](https://github.com/syedzayyan/shadharon) — tabi started as a fork of [syedzayyan](https://github.com/syedzayyan)'s theme +- [tailwind-nextjs-starter-blog](https://github.com/timlrx/tailwind-nextjs-starter-blog) +- [abridge](https://github.com/Jieiku/abridge) + +## Support + +Something not working? Have an idea? Let us know! + +- Questions? → [Start a discussion](https://github.com/welpo/tabi/discussions) +- Found a bug? → [Report it here](https://github.com/welpo/tabi/issues/new?&labels=bug&template=2_bug_report.yml) +- Feature request? → [Tell us more!](https://github.com/welpo/tabi/issues/new?&labels=feature&template=3_feature_request.yml) ## Contributing diff --git a/cliff.toml b/cliff.toml index 360bd75..9e9dc97 100644 --- a/cliff.toml +++ b/cliff.toml @@ -37,7 +37,7 @@ body = """ {% macro commit(commit, in_breaking_section=false) -%} - {% if commit.scope %}*({{ commit.scope }})* {% endif %}{% if commit.breaking and not in_breaking_section %}[**‼️BREAKING‼️**] {% endif %}\ {{ commit.message | upper_first }}\ - {% if not commit.github.pr_number %} ([{{ commit.id | truncate(length=7, end="") }}]({{ self::remote_url() }}/commit/{{ commit.id }})){%- endif -%}{% if commit.github.username %} by @{{ commit.github.username }} \ + {% if not commit.remote.pr_number %} ([{{ commit.id | truncate(length=7, end="") }}]({{ self::remote_url() }}/commit/{{ commit.id }})){%- endif -%}{% if commit.remote.username %} by @{{ commit.remote.username }} \ {%- set co_authors = commit.footers | filter(attribute="token", value="Co-authored-by") | map(attribute="value") -%} {%- set number_of_co_authors = co_authors | length -%} {%- for co_author in co_authors -%} diff --git a/config.toml b/config.toml index fd3332b..a62acbe 100644 --- a/config.toml +++ b/config.toml @@ -1,14 +1,14 @@ base_url = "https://welpo.github.io/tabi" title = "~/tabi" -description = "tabi is a fast, lightweight, and modern Zola theme with multi-language support, optional JavaScript, and a perfect Lighthouse score." +description = "tabi is an accessible Zola theme with search, multi-language support, optional JavaScript, a perfect Lighthouse score, and comprehensive documentation. Crafted for personal websites and blogs." author = "welpo" -generate_feed = true +generate_feeds = true compile_sass = true minify_html = true build_search_index = true -# To translate the entire theme, there must be a file with the same ISO 639-1 -# (or IETF BCP 47) Code in the `i18n` folder of your site or the tabi theme +# To translate the entire theme, there must be a file with the same language code +# in the `i18n` folder of your site or the tabi theme. # For example, "i18n/fr.toml" for French or "i18n/zh-Hans.toml" for Simplified Chinese. # Otherwise the theme will be in English. # See https://welpo.github.io/tabi/blog/faq-languages/ for more details. @@ -28,15 +28,18 @@ include_content = true # At which character to truncate the content to. Useful if you have a lot of pages and the index would # become too big to load on the site. Defaults to not being set. # truncate_content_length = 100 -# Wether to produce the search index as a javascript file or as a JSON file. +# Whether to produce the search index as a javascript file or as a JSON file. # Accepted value "elasticlunr_javascript" or "elasticlunr_json". index_format = "elasticlunr_json" [markdown] highlight_code = true +bottom_footnotes = true # To use a Zola built-in theme, CSP needs to allow unsafe-inline for style-src. highlight_theme = "css" smart_punctuation = true +# Set to 'external' to add an indicator next to external links. +external_links_class = "external" [link_checker] internal_level = "warn" @@ -49,17 +52,24 @@ skip_anchor_prefixes = [ [languages.es] title = "~/tabi" -description = "tabi es un tema de Zola rápido, liviano y moderno con JavaScript opcional y una puntuación perfecta en Lighthouse." -generate_feed = true +description = "tabi es un tema accesible para Zola con búsqueda, soporte multilingüe, JavaScript opcional, una puntuación perfecta en Lighthouse y documentación exhaustiva. Diseñado para sitios web y blogs personales." +generate_feeds = true taxonomies = [{name = "tags", feed = true}] build_search_index = true [languages.ca] title = "~/tabi" -description = "tabi és un tema de Zola ràpid, lleuger i modern amb JavaScript opcional i una puntuació perfecta a Lighthouse." -generate_feed = true +description = "tabi és un tema accessible per a Zola amb cerca, suport multilingüe, JavaScript opcional, una puntuació perfecta a Lighthouse i documentació exhaustiva. Dissenyat per a llocs web i blogs personals." +generate_feeds = true taxonomies = [{name = "tags", feed = true}] +[languages.ar] +title = "~/تابي" +description = "تابي هو قالب Zola سريع وحديث مع دعم متعدد اللغات و JavaScript اختياري ودرجة Lighthouse مثالية." +generate_feeds = true +taxonomies = [{name = "tags", feed = true}] +build_search_index = false + [extra] # Check out the documentation (or the comments below) to learn how to customise tabi: # https://welpo.github.io/tabi/blog/mastering-tabi-settings/ @@ -71,12 +81,16 @@ taxonomies = [{name = "tags", feed = true}] # index_format = "elasticlunr_javascript" # index_format = "" +# Use sans-serif font everywhere. +# By default, the serif font is only used in articles. +override_serif_with_sans = false + # Enable JavaScript theme toggler to allow users to switch between dark/light mode. -# If disabled, your site will only use the theme specified in the `default_theme` variable. +# If disabled, your site will use the theme specified in the `default_theme` variable. theme_switcher = true # This setting determines the default theme on load ("light" or "dark"). -# To default to the user's OS-level theme, leave it empty or unset. +# To follow the user's OS theme, leave it empty or unset. default_theme = "" # Choose the colourscheme (skin) for the theme. Default is "teal". @@ -94,6 +108,9 @@ skin = "" browser_theme_color = "#087e96" # browser_theme_color = ["#ffffff", "#000000"] # Example of light/dark colours. +# For multilingual sites: show current language code on the language switcher. +show_selected_language_code_in_language_switcher = false + # List additional stylesheets to load site-wide. # These stylesheets should be located in your site's `static` directory. # Example: stylesheets = ["extra1.css", "path/extra2.css"] @@ -121,13 +138,18 @@ show_remote_changes = true # Defaults to true. # Show a link to the repository of the site, right next to the "Powered by Zola & tabi" text. show_remote_source = true # Defaults to true. -# Add a "copy" button to codeblocks (loads ~700 bytes of JavaScript). +# Add a "copy" button to code blocks (loads ~700 bytes of JavaScript). # Can be set at page or section levels, following the hierarchy: page > section > config. See: https://welpo.github.io/tabi/blog/mastering-tabi-settings/#settings-hierarchy copy_button = true -# Loads the necessary JavaScript (~400 bytes) to use the "Show source or path" shortcode: https://welpo.github.io/tabi/blog/shortcodes/#show-source-or-path +# Make code block names clickable if they are URLs (loads ~400 bytes of JavaScript). # Can be set at page or section levels, following the hierarchy: page > section > config. See: https://welpo.github.io/tabi/blog/mastering-tabi-settings/#settings-hierarchy -add_src_to_code_block = false +code_block_name_links = false + +# Force left-to-right (LTR) direction for code blocks. +# Set to false to allow code to follow the document's natural direction. +# Can be set at page or section levels. See: https://welpo.github.io/tabi/blog/mastering-tabi-settings/#settings-hierarchy +force_codeblock_ltr = true # Show the author(s) of a page. # Can be set at page or section levels, following the hierarchy: page > section > config. See: https://welpo.github.io/tabi/blog/mastering-tabi-settings/#settings-hierarchy @@ -141,6 +163,32 @@ show_reading_time = true # Can be set at page or section levels, following the hierarchy: page > section > config. See: https://welpo.github.io/tabi/blog/mastering-tabi-settings/#settings-hierarchy show_date = true +# Determines how dates are displayed in the post listing (e.g. front page or /blog). Options: +# "date" - Show only the original date of the post (default if unset). +# "updated" - Show only the last updated date of the post. If there is no last updated date, it shows the original date. +# "both" - Show both the original date and the last updated date. +post_listing_date = "date" + +# Enable iine like buttons on all posts: https://iine.to/ +# Can be set at page or section levels, following the hierarchy: page > section > config. See: https://welpo.github.io/tabi/blog/mastering-tabi-settings/#settings-hierarchy +iine = true +iine_icon = "thumbs_up" # See https://iine.to/#customise +# Unify like counts across all language versions of the same page. +# When enabled, likes on /es/blog/hello/ will count towards /blog/hello/ (default language). +iine_unified_languages = true + +# Show "Jump to posts" link next to series' title. +# By default, the link appears automatically when a series description exceeds 2000 characters. +# Can be set at page or section levels, following the hierarchy: page > section > config. See: https://welpo.github.io/tabi/blog/mastering-tabi-settings/#settings-hierarchy +# show_jump_to_posts = true + +# Determines if indexes should be increasing (false) or decreasing (true) in series' posts list. +# It has only effect if the section uses indexes metadata (which is only the case for series as of now). +# Can be set at section levels, following the hierarchy: section > config. See: https://welpo.github.io/tabi/blog/mastering-tabi-settings/#settings-hierarchy +post_listing_index_reversed = false # Defaults to false. + +# DEPRECATED! +# Use Zola's built-in `bottom_footnotes = true` in the [markdown] section instead. (Available since v0.19.0) # Adds backlinks to footnotes (loads ~500 bytes of JavaScripts). # Can be set at page or section levels, following the hierarchy: page > section > config. See: https://welpo.github.io/tabi/blog/mastering-tabi-settings/#settings-hierarchy footnote_backlinks = false @@ -149,6 +197,16 @@ footnote_backlinks = false # Can be set at page or section levels, following the hierarchy: page > section > config. See: https://welpo.github.io/tabi/blog/mastering-tabi-settings/#settings-hierarchy katex = false +# Enable Mermaid diagrams for all posts. +# Loads ~2.5MB of JavaScript. +# Can be set at page or section levels, following the hierarchy: page > section > config. See: https://welpo.github.io/tabi/blog/mastering-tabi-settings/#settings-hierarchy +mermaid = false + +# Serve Mermaid JavaScript locally. Version bundled with tabi. +# If set to false, it will load the latest version from JSDelivr. +# Only relevant when `mermaid = true`. +serve_local_mermaid = true + # Show links to previous and next articles at the bottom of posts. # Can be set at page or section levels, following the hierarchy: page > section > config. See: https://welpo.github.io/tabi/blog/mastering-tabi-settings/#settings-hierarchy show_previous_next_article_links = false @@ -180,6 +238,17 @@ long_date_format = "%d %B %Y" # Default is "6th July 2049" in English and "%-d %B %Y" in other languages. short_date_format = "" +# Date format used for the archive page. +# Default is "06 July" in English and "%d %b" in other languages. +archive_date_format = "" + +# Per-language date format overrides. +# Examples: Spanish uses "3 de febrero de 2024", German uses "3. Februar 2024" +date_formats = [ + { lang = "es", long = "%d de %B de %Y", short = "%-d %b %Y" }, + { lang = "de", long = "%d. %B %Y", short = "%d.%m.%Y", archive = "%d. %b" }, +] + # Custom separator used in title tag and posts metadata (between date, time to read, and tags). separator = "•" @@ -188,6 +257,17 @@ separator = "•" # Compact: tag_name^n (superscript number) compact_tags = false +# How tags are sorted in a Tags listing based on templates/tags/list.html. +# "name" for alphabetical, "frequency" for descending count of posts. +# Default: "name". +tag_sorting = "name" + +# Show clickable tags above cards.html template (e.g. projects/) to filter the displayed items. +# Loads JS to filter. If JS is disabled, the buttons are links to the tag's page. +# Can be set at the section or config.toml level, following the hierarchy: section > config. See: https://welpo.github.io/tabi/blog/mastering-tabi-settings/#settings-hierarchy +# Default: true +enable_cards_tag_filtering = true + # Invert the order of the site title and page title in the browser tab. # Example: true => "Blog • ~/tabi", false => "~/tabi • Blog" invert_title_order = false @@ -203,7 +283,7 @@ favicon_emoji = "🌱" # Can be set at page or section levels, following the hierarchy: page > section > config. See: https://welpo.github.io/tabi/blog/mastering-tabi-settings/#settings-hierarchy # Learn how to create these images in batch and automatically: # https://osc.garden/blog/automating-social-media-cards-zola/ -social_media_card = "social_cards/index.jpg" +social_media_card = "index.jpg" menu = [ { name = "blog", url = "blog", trailing_slash = true }, @@ -239,6 +319,11 @@ socials = [ { name = "spotify", url = "https://open.spotify.com/artist/5Hv2bYBhMp1lUHFri06xkE", icon = "spotify" }, ] +# Fediverse profile. +# Adds metadata to feature the author's profile in Mastodon link previews. +# Example: for @username@example.com, use: +# fediverse_creator = { handle = "username", domain = "example.com" } + # Extra menu to show on the footer, below socials section. footer_menu = [ {url = "about", name = "about", trailing_slash = true}, @@ -280,10 +365,14 @@ allowed_domains = [ # Can be set at page or section levels, following the hierarchy: page > section > config. See: https://welpo.github.io/tabi/blog/mastering-tabi-settings/#settings-hierarchy enable_csp = true -# Custom subset of characters for the header. -# If set to true, the `static/custom_subset.css` file will be loaded first. -# This avoids a flashing text issue in Firefox. -# Please see https://welpo.github.io/tabi/blog/custom-font-subset/ to learn how to create this file. +# Font subsetting configuration. +# This feature helps prevent text flashing in Firefox when using custom fonts. +# See: https://welpo.github.io/tabi/blog/custom-font-subset/ +# Enable or disable font subsetting completely, both built-in and custom subsets. +enable_subset = true +# Use a custom subset of characters for the header. +# If true, tabi will load the `static/custom_subset.css` file. +# If false, tabi will use the default language-specific subset (English or Spanish). custom_subset = true [extra.analytics] @@ -295,7 +384,7 @@ service = "goatcounter" # For GoatCounter, this is the code you choose during signup. # For Umami, this is the website ID. # For Plausible, this is the domain name (e.g. "example.com"). -# Note: Leave this field empty if you're self-hosting. +# Note: Leave this field empty if you're self-hosting GoatCounter. # id = "yourID" # Optional: Specify the URL for self-hosted analytics instances. @@ -305,6 +394,9 @@ service = "goatcounter" # Leave this field empty if you're using the service's default hosting. self_hosted_url = "https://tabi-stats.osc.garden" +# Optional: For Umami, enable this option to respect users' Do Not Track (DNT) settings. The default is true. +do_not_track = true + # giscus support for comments. https://giscus.app # Setup instructions: https://welpo.github.io/tabi/blog/comments/#setup [extra.giscus] @@ -360,3 +452,69 @@ avatar = true voting = true page_author_hashes = "" # hash (or list of hashes) of the author. lazy_loading = true # Loads when the comments are in the viewport (using the Intersection Observer API). + +[extra.webmentions] +# To disable for a specific section or page, set webmentions = false in that page/section's front matter's [extra] section. +enable = false +# Specify the domain registered with webmention.io. +domain = "" + +# The HTML ID for the object to fill in with the webmention data. +# Defaults to "webmentions" +# id = "webmentions" + +# data configuration for the webmention.min.js script +# The base URL to use for this page. Defaults to window.location +# page_url = + +# Additional URLs to check, separated by |s +# add_urls + +# The maximum number of words to render in reply mentions. +# wordcount = 20 + +# The maximum number of mentions to retrieve. Defaults to 30. +# max_webmentions = 30 + +# By default, Webmentions render using the mf2 'url' element, which plays +# nicely with webmention bridges (such as brid.gy and telegraph) +# but allows certain spoofing attacks. If you would like to prevent +# spoofing, set this to a non-empty string (e.g. "true"). +# prevent_spoofing + +# What to order the responses by; defaults to 'published'. See +# https://github.com/aaronpk/webmention.io#api +# sort_by + +# The order to sort the responses by; defaults to 'up' (i.e. oldest +# first). See https://github.com/aaronpk/webmention.io#api +# sort_dir + +# If set to a non-empty string (e.g. "true"), will display comment-type responses +# (replies/mentions/etc.) as being part of the reactions +# (favorites/bookmarks/etc.) instead of in a separate comment list. +# comments_are_reactions = "true" + +# h-card configuration +# Will identify you on the indieweb (see https://microformats.org/wiki/h-card) +[extra.hcard] +# Enable home page h-card. +# enable = true +# Add your email to the card if extra.email is set and not encoded. +# with_mail = true +# Add your social links ('socials' config) to the card. +# with_social_links = true +# Homepage url. Defaults to the value of 'base_url'. +# homepage = "https://myhomepage.net" +# avatar = "img/profile.webp" +# Display name, default to the value of 'author'. +# full_name = "John Doe" +# Small bio, as shown on social media profiles. +# biography = "Fond of the indieweb" +# +# You can add any property from https://microformats.org/wiki/h-card#Properties +# Make sure to replace all '-' characters by '_' +# Examples: +# p_nickname = "nickname" +# p_locality = "Bordeaux" +# p_country_name = "France" diff --git a/content/_index.ar.md b/content/_index.ar.md new file mode 100644 index 0000000..4f8b6a4 --- /dev/null +++ b/content/_index.ar.md @@ -0,0 +1,18 @@ ++++ +title = "أخر التدوينات" +sort_by = "date" +template = "section.html" + +[extra] +header = {title = "اهلاً انا تابي~", img = "img/main.webp", img_alt = "أوسكار فرنانديز, كاتب السمة" } +section_path = "blog/_index.ar.md" +max_posts = 4 +projects_path = "projects/_index.ar.md" +max_projects = 3 +show_projects_first = false +social_media_card = "ar.jpg" ++++ + +تابي هو قالب Zola سريع وعصري. يهدف ليكون صفحة ومدونة شخصية. يتميز بتقييم مثالي في Lighthouse، وتصميم متجاوب، وسمات داكنة وفاتحة، وشِفرات قصيرة مخصصة، والعديد من المميزات الأخرى. + +> ملاحظة: هذه الصفحة هي عرض توضيحي لدعم اللغة العربية في تابي. للحصول على التوثيق الكامل، يرجى الرجوع إلى [النسخة الإنجليزية](@/_index.md). diff --git a/content/_index.ca.md b/content/_index.ca.md index ed92599..a5da748 100644 --- a/content/_index.ca.md +++ b/content/_index.ca.md @@ -1,7 +1,6 @@ +++ title = "Publicacions recents" sort_by = "date" -template = "section.html" [extra] header = {title = "Hola! Soc tabi~", img = "img/main.webp", img_alt = "Óscar Fernández, l'autor de tabi" } @@ -10,7 +9,7 @@ max_posts = 4 projects_path = "projects/_index.ca.md" max_projects = 3 show_projects_first = false -social_media_card = "social_cards/ca.jpg" +social_media_card = "ca.jpg" +++ -tabi és un tema de [Zola](https://www.getzola.org) ràpid, lleuger i modern. Té com a objectiu ser una pàgina personal i llar d'entrades de blog. Compta amb una puntuació perfecta de Lighthouse, disseny responsive, tema fosc i clar, shortcodes personalitzats i molt més. +tabi és un tema accessible per a Zola amb [cerca](@/blog/mastering-tabi-settings/index.ca.md#cerca), [suport multilingüe](@/blog/faq-languages/index.ca.md), [JavaScript opcional](@/blog/javascript/index.ca.md), una puntuació perfecta a Lighthouse i documentació exhaustiva. Dissenyat per a llocs web i blogs personals. diff --git a/content/_index.es.md b/content/_index.es.md index 51b9e2b..53eb2e9 100644 --- a/content/_index.es.md +++ b/content/_index.es.md @@ -1,7 +1,6 @@ +++ title = "Publicaciones recientes" sort_by = "date" -template = "section.html" [extra] header = {title = "¡Hola! Soy tabi~", img = "img/main.webp", img_alt = "Óscar Fernández, el autor de tabi" } @@ -10,7 +9,7 @@ max_posts = 4 projects_path = "projects/_index.es.md" max_projects = 3 show_projects_first = false -social_media_card = "social_cards/es.jpg" +social_media_card = "es.jpg" +++ -tabi es un tema de [Zola](https://www.getzola.org) rápido, ligero y moderno. Su objetivo es ser una página personal y hogar para publicaciones de blogs. Cuenta con una puntuación perfecta en Lighthouse, diseño responsive, tema oscuro y claro, shortcodes personalizados y mucho más. +tabi es un tema accesible para [Zola](https://www.getzola.org) con [búsqueda](@/blog/mastering-tabi-settings/index.es.md#busqueda), [soporte multilingüe](@/blog/faq-languages/index.es.md), [JavaScript opcional](@/blog/javascript/index.es.md), una puntuación perfecta en Lighthouse y documentación exhaustiva. Diseñado para sitios web y blogs personales. diff --git a/content/_index.md b/content/_index.md index fba6172..4d1dbe6 100644 --- a/content/_index.md +++ b/content/_index.md @@ -1,7 +1,6 @@ +++ title = "Latest posts" sort_by = "date" -template = "section.html" [extra] header = {title = "Hello! I'm tabi~", img = "img/main.webp", img_alt = "Óscar Fernández, the theme's author" } @@ -10,7 +9,7 @@ max_posts = 4 projects_path = "projects/_index.md" max_projects = 3 show_projects_first = false -social_media_card = "social_cards/index.jpg" +social_media_card = "index.jpg" +++ -tabi is a fast, lightweight, and modern [Zola](https://www.getzola.org) theme. It aims to be a personal page and home to blog posts. It features a perfect Lighthouse score, responsive design, dark and light themes, custom shortcodes, and much more. +tabi is an accessible [Zola](https://www.getzola.org) theme with [search](@/blog/mastering-tabi-settings/index.md#search), [multi-language support](@/blog/faq-languages/index.md), [optional JavaScript](@/blog/javascript/index.md), a perfect Lighthouse score, and comprehensive documentation. Crafted for personal websites and blogs. diff --git a/content/ar.jpg b/content/ar.jpg new file mode 100644 index 0000000..64e77bc Binary files /dev/null and b/content/ar.jpg differ diff --git a/content/archive/_index.ar.md b/content/archive/_index.ar.md new file mode 100644 index 0000000..59055be --- /dev/null +++ b/content/archive/_index.ar.md @@ -0,0 +1,4 @@ ++++ +title = "الأرشيف" +template = "archive.html" ++++ diff --git a/content/archive/_index.ca.md b/content/archive/_index.ca.md index 984a17a..869b1d2 100644 --- a/content/archive/_index.ca.md +++ b/content/archive/_index.ca.md @@ -3,5 +3,5 @@ title = "Arxiu" template = "archive.html" [extra] -social_media_card = "archive/social_cards/ca_archive.jpg" +social_media_card = "ca_archive.jpg" +++ diff --git a/content/archive/_index.es.md b/content/archive/_index.es.md index c7bca8f..9f33695 100644 --- a/content/archive/_index.es.md +++ b/content/archive/_index.es.md @@ -3,5 +3,5 @@ title = "Archivo" template = "archive.html" [extra] -social_media_card = "archive/social_cards/es_archive.jpg" +social_media_card = "es_archive.jpg" +++ diff --git a/content/archive/_index.md b/content/archive/_index.md index dea9aab..10cf255 100644 --- a/content/archive/_index.md +++ b/content/archive/_index.md @@ -3,5 +3,5 @@ title = "Archive" template = "archive.html" [extra] -social_media_card = "archive/social_cards/archive.jpg" +social_media_card = "archive.jpg" +++ diff --git a/content/archive/social_cards/archive.jpg b/content/archive/archive.jpg similarity index 100% rename from content/archive/social_cards/archive.jpg rename to content/archive/archive.jpg diff --git a/content/archive/social_cards/ca_archive.jpg b/content/archive/ca_archive.jpg similarity index 100% rename from content/archive/social_cards/ca_archive.jpg rename to content/archive/ca_archive.jpg diff --git a/content/archive/social_cards/es_archive.jpg b/content/archive/es_archive.jpg similarity index 100% rename from content/archive/social_cards/es_archive.jpg rename to content/archive/es_archive.jpg diff --git a/content/blog/_index.ar.md b/content/blog/_index.ar.md new file mode 100644 index 0000000..55a7a88 --- /dev/null +++ b/content/blog/_index.ar.md @@ -0,0 +1,10 @@ ++++ +paginate_by = 5 +title = "التدوينات" +sort_by = "date" +template = "section.html" +insert_anchor_links = "right" + +[extra] +show_previous_next_article_links = true ++++ diff --git a/content/blog/_index.ca.md b/content/blog/_index.ca.md index 7a72231..25e0758 100644 --- a/content/blog/_index.ca.md +++ b/content/blog/_index.ca.md @@ -2,10 +2,9 @@ paginate_by = 5 title = "Blog" sort_by = "date" -template = "section.html" insert_anchor_links = "left" [extra] -social_media_card = "blog/social_cards/ca_blog.jpg" +social_media_card = "ca_blog.jpg" show_previous_next_article_links = true +++ diff --git a/content/blog/_index.es.md b/content/blog/_index.es.md index a367dbb..201c2d4 100644 --- a/content/blog/_index.es.md +++ b/content/blog/_index.es.md @@ -2,10 +2,9 @@ paginate_by = 5 title = "Blog" sort_by = "date" -template = "section.html" insert_anchor_links = "left" [extra] -social_media_card = "blog/social_cards/es_blog.jpg" +social_media_card = "es_blog.jpg" show_previous_next_article_links = true +++ diff --git a/content/blog/_index.md b/content/blog/_index.md index 036db4d..22dbcda 100644 --- a/content/blog/_index.md +++ b/content/blog/_index.md @@ -2,10 +2,9 @@ paginate_by = 5 title = "Blog" sort_by = "date" -template = "section.html" insert_anchor_links = "left" [extra] -social_media_card = "blog/social_cards/blog.jpg" +social_media_card = "blog.jpg" show_previous_next_article_links = true +++ diff --git a/content/blog/social_cards/blog.jpg b/content/blog/blog.jpg similarity index 100% rename from content/blog/social_cards/blog.jpg rename to content/blog/blog.jpg diff --git a/content/blog/social_cards/ca_blog.jpg b/content/blog/ca_blog.jpg similarity index 100% rename from content/blog/social_cards/ca_blog.jpg rename to content/blog/ca_blog.jpg diff --git a/content/blog/custom-font-subset/index.ca.md b/content/blog/custom-font-subset/index.ca.md index ede8541..20906aa 100644 --- a/content/blog/custom-font-subset/index.ca.md +++ b/content/blog/custom-font-subset/index.ca.md @@ -1,7 +1,7 @@ +++ title = "Optimitza la càrrega amb un subconjunt de font personalitzat" date = 2023-04-29 -updated = 2023-07-08 +updated = 2025-01-12 description = "Aprèn com crear un subconjunt personalitzat que només inclogui els glifs necessaris." [taxonomies] @@ -21,7 +21,11 @@ Per solucionar això, tabi carrega un subconjunt de glifs per a l'encapçalament Per defecte, tabi inclou fitxers de subconjunts per a caràcters en anglès i espanyol (amb alguns símbols). Aquests fitxers es carreguen quan la pàgina o el lloc web de Zola està en aquest idioma. -Per a una optimització addicional, pots crear un subconjunt de fonts personalitzat que només inclogui els caràcters utilitzats en el teu encapçalament. +{% admonition(type="tip") %} +Si estàs fent servir una font personalitzada, pots crear el teu propi subconjunt (segueix llegint) o desactivar completament els subconjunts predeterminats amb `enable_subset = false` a `config.toml`. +{% end %} + +Per a una optimització addicional, a continuació t'expliquem com crear un subconjunt de fonts personalitzat que només inclogui els caràcters utilitzats en el teu encapçalament. ## Requisits diff --git a/content/blog/custom-font-subset/index.es.md b/content/blog/custom-font-subset/index.es.md index 4f00491..31e8197 100644 --- a/content/blog/custom-font-subset/index.es.md +++ b/content/blog/custom-font-subset/index.es.md @@ -1,7 +1,7 @@ +++ title = "Optimiza la carga con un subconjunto de fuente personalizado" date = 2023-04-29 -updated = 2023-07-08 +updated = 2025-01-12 description = "Aprende cómo crear un subconjunto personalizado que solo incluya los glifos necesarios." [taxonomies] @@ -21,7 +21,11 @@ Para solucionar esto, tabi carga un subconjunto de glifos para el encabezado. Da Por defecto, tabi incluye archivos de subconjuntos para caracteres en inglés y español (con algunos símbolos). Estos archivos se cargan cuando la página o el sitio de Zola está en ese idioma. -Para una optimización adicional, puedes crear un subconjunto de fuentes personalizado que solo incluya los caracteres utilizados en tu encabezado. +{% admonition(type="tip") %} +Si estás usando una fuente personalizada, puedes crear tu propio subconjunto (ver más abajo) o desactivar completamente los subconjuntos predeterminados con `enable_subset = false` en tu `config.toml`. +{% end %} + +Para una optimización adicional, a continuación verás cómo crear un subconjunto de fuentes personalizado que solo incluya los caracteres utilizados en tu encabezado. ## Requisitos diff --git a/content/blog/custom-font-subset/index.md b/content/blog/custom-font-subset/index.md index 9cd54d3..fdb1d6b 100644 --- a/content/blog/custom-font-subset/index.md +++ b/content/blog/custom-font-subset/index.md @@ -1,7 +1,7 @@ +++ title = "Optimise loading times with a custom font subset" date = 2023-04-29 -updated = 2023-07-08 +updated = 2025-01-12 description = "Learn how to create a custom subset that only includes the necessary glyphs." [taxonomies] @@ -21,7 +21,11 @@ To fix this, tabi loads a subset of glyphs for the header. Since this (slightly) By default, there are subset files for English and Spanish characters (with a few symbols). These files are loaded when the Zola page/site is set to that language. -For further optimisation, you can create a custom font subset that only includes the characters used in your header. +{% admonition(type="tip") %} +If you're using a custom font, either create your custom subset (see below) or disable the built-in subsets completely with `enable_subset = false` in your `config.toml`. +{% end %} + +Here's how you can create a custom font subset that only includes the characters used in your header, for maximum efficiency. ## Requirements diff --git a/content/blog/customise-tabi/index.ca.md b/content/blog/customise-tabi/index.ca.md index 1c91ff0..f17d30a 100644 --- a/content/blog/customise-tabi/index.ca.md +++ b/content/blog/customise-tabi/index.ca.md @@ -1,7 +1,7 @@ +++ title = "Personalitza el color de tabi i el tema per defecte" date = 2023-08-09 -updated = 2023-11-24 +updated = 2024-09-12 description = "Aprèn a personalitzar tabi fent servir skins i establint un tema per defecte, aconseguint un aspecte únic." [taxonomies] @@ -19,6 +19,8 @@ tabi pot ser personalitzat de dues maneres: establint el tema per defecte (fosc Utilitza `default_theme = "dark"` per establir el tema fosc com a predeterminat, o `default_theme = "light"` per establir el tema clar com a predeterminat. +Establir `default_theme = ""` (o comentar la variable) seguirà la preferència del sistema de l'usuari (mode clar o fosc). + Per configurar permanentment el teu lloc en el tema fosc o clar, necessites desactivar el `theme_switcher` a `config.toml` i establir el teu tema preferit (`light` o `dark`) a `default_theme`. Per exemple, per tenir un tema fosc permanent: @@ -167,12 +169,33 @@ Pots guardar la teva nova skin en qualsevol d'aquests dos directoris: Crea un nou arxiu `.scss` (per exemple, `la_teva_skin.scss`) a la ubicació que prefereixis. Aquest arxiu ha de contenir aquestes dues variables (aquesta és la skin predeterminada, "teal"): ```scss +// This defines theme-specific variables. +@mixin theme-variables($theme) { + @if $theme =='light' { + // Light theme colours. + --primary-color: #087e96; // Contrast ratio: 4.73:1 + } + @else if $theme == 'dark' { + // Dark theme colours. + --primary-color: #91e0ee; // Contrast ratio: 11.06:1 + } +} + +// Apply light theme variables by default. :root { - --primary-color: #087e96; + @include theme-variables('light'); } [data-theme='dark'] { - --primary-color: #91e0ee; + @include theme-variables('dark'); +} + +// Apply dark theme variables when user's system prefers dark mode +// and the theme is not explicitly set to light. +@media (prefers-color-scheme: dark) { + :root:not([data-theme='light']) { + @include theme-variables('dark'); + } } ``` diff --git a/content/blog/customise-tabi/index.es.md b/content/blog/customise-tabi/index.es.md index 8c3a752..8f5ff3a 100644 --- a/content/blog/customise-tabi/index.es.md +++ b/content/blog/customise-tabi/index.es.md @@ -1,7 +1,7 @@ +++ title = "Personaliza el color de tabi y el tema predeterminado" date = 2023-08-09 -updated = 2023-11-24 +updated = 2024-09-12 description = "Aprende a personalizar tabi usando skins y estableciendo un tema predeterminado, haciendo que tu sitio sea único." [taxonomies] @@ -19,6 +19,8 @@ tabi puede ser personalizado de dos maneras: estableciendo el tema predeterminad Usa `default_theme = "dark"` para establecer el tema oscuro como predeterminado, o `default_theme = "light"` para establecer el tema claro como predeterminado. +Establecer `default_theme = ""` (o no especificar la variable) seguirá las preferencias del sistema del usuario (modo claro u oscuro). + Para configurar permanentemente tu sitio en el tema oscuro o claro, necesitas desactivar el `theme_switcher` en `config.toml` y establecer tu tema preferido (`light` o `dark`) como el `default_theme`. Por ejemplo, para tener un tema oscuro permanente: @@ -169,12 +171,34 @@ Puedes guardar tu nueva skin en cualquiera de estos dos directorios: Crea un nuevo archivo `.scss` (por ejemplo, `tu_skin.scss`) en la ubicación que prefieras. Este archivo debe contener estas dos variables (esta es la skin predeterminada, "teal"): ```scss -:root { - --primary-color: #087e96; +// This defines theme-specific variables. +@mixin theme-variables($theme) { + @if $theme =='light' { + // Light theme colours. + --primary-color: #087e96; // Contrast ratio: 4.73:1 + } + @else if $theme == 'dark' { + // Dark theme colours. + --primary-color: #91e0ee; // Contrast ratio: 11.06:1 + } } +// Apply light theme variables by default. +:root { + @include theme-variables('light'); +} + +// Apply dark theme variables when dark theme is explicitly set. [data-theme='dark'] { - --primary-color: #91e0ee; + @include theme-variables('dark'); +} + +// Apply dark theme variables when user's system prefers dark mode +// and the theme is not explicitly set to light. +@media (prefers-color-scheme: dark) { + :root:not([data-theme='light']) { + @include theme-variables('dark'); + } } ``` diff --git a/content/blog/customise-tabi/index.md b/content/blog/customise-tabi/index.md index db7c24c..488e658 100644 --- a/content/blog/customise-tabi/index.md +++ b/content/blog/customise-tabi/index.md @@ -1,7 +1,7 @@ +++ title = "Customise tabi with skins and a default theme" date = 2023-08-09 -updated = 2023-11-24 +updated = 2024-09-12 description = "Learn how to customise tabi using skins and setting a default theme, making your site uniquely yours." [taxonomies] @@ -19,6 +19,8 @@ tabi can be customised in two ways: by setting the default theme (dark or light) Use `default_theme = "dark"` to set the dark theme as the default, or `default_theme = "light"` to set the light theme as the default. +Setting `default_theme = ""` (or commenting out the variable) will follow the user's system preference (light or dark mode). + To permanently set your site to either the dark or light theme, you need to disable the theme switcher in `config.toml` and set your preferred theme as the `default_theme`. For example, to have a permanent dark theme: @@ -178,12 +180,34 @@ You can save your new skin it in either of these two directories: Create a new `.scss` file (for example, `your_skin.scss`) in your preferred location. This file needs to have these two variables (this is the default skin, "teal"): ```scss -:root { - --primary-color: #087e96; +// This defines theme-specific variables. +@mixin theme-variables($theme) { + @if $theme =='light' { + // Light theme colours. + --primary-color: #087e96; // Contrast ratio: 4.73:1 + } + @else if $theme == 'dark' { + // Dark theme colours. + --primary-color: #91e0ee; // Contrast ratio: 11.06:1 + } } +// Apply light theme variables by default. +:root { + @include theme-variables('light'); +} + +// Apply dark theme variables when dark theme is explicitly set. [data-theme='dark'] { - --primary-color: #91e0ee; + @include theme-variables('dark'); +} + +// Apply dark theme variables when user's system prefers dark mode +// and the theme is not explicitly set to light. +@media (prefers-color-scheme: dark) { + :root:not([data-theme='light']) { + @include theme-variables('dark'); + } } ``` diff --git a/content/blog/social_cards/es_blog.jpg b/content/blog/es_blog.jpg similarity index 100% rename from content/blog/social_cards/es_blog.jpg rename to content/blog/es_blog.jpg diff --git a/content/blog/faq-languages/index.ca.md b/content/blog/faq-languages/index.ca.md index 6a015fb..c4be47f 100644 --- a/content/blog/faq-languages/index.ca.md +++ b/content/blog/faq-languages/index.ca.md @@ -1,7 +1,7 @@ +++ title = "Lost in Translation? Explora les capacitats multilingües de tabi" date = 2023-09-12 -updated = 2024-03-01 +updated = 2025-09-14 description = "Descobreix com tabi t'ajuda a connectar amb una audiència global gràcies a les seves funcions multilingües. Aprèn a canviar la llengua per defecte, afegir més llengües i aportar les teves pròpies traduccions." [taxonomies] @@ -29,10 +29,13 @@ tabi admet les següents llengües: - Català - Coreà - Espanyol +- Estonià +- Finès - Francès - Hindi - Italià - Japonès +- Odia - Persa - Portuguès (Europeu) - Rus @@ -104,6 +107,19 @@ Per tant, si crees `i18n/ca.toml` al teu directori base, tabi llegirà les caden Assegura't de copiar tot el fitxer per a aquest idioma primer, o el tema utilitzarà l'anglès per les claus que faltin. +## Com personalitzo els formats de data per a diferents idiomes? + +Pots establir formats de data específics per idioma al teu `config.toml` utilitzant la matriu `date_formats`: + +```toml +date_formats = [ + { lang = "es", long = "%d de %B de %Y", short = "%-d %b %Y", archive = "%d de %b" }, + { lang = "de", long = "%d. %B %Y", short = "%d.%m.%Y", archive = "%d. %b" }, +] +``` + +Això permet que cada idioma mostri les dates segons les convencions locals. Per exemple, l'espanyol mostrarà «3 de febrero de 2024» mentre que l'alemany mostrarà «3. Februar 2024». Si no es defineix un format específic per a un idioma, tabi utilitzarà la configuració global `long_date_format`, `short_date_format` i `archive_date_format`. + ## Què passa si falta una traducció o està incompleta? Si una cadena no es troba en el fitxer d'idioma, tabi utilitzarà a la cadena predeterminada en anglès. @@ -131,3 +147,7 @@ Si ho vas fer, hauràs d'actualitzar manualment les traduccions. Pots fer-ho cop ## tabi tradueix el meu contingut? No. tabi només tradueix les cadenes de text del tema. Hauràs de traduir el teu contingut tu mateix. + +## Com puc mostrar el codi de l'idioma actual al commutador d'idioma? + +Afegeix `show_selected_language_code_in_language_switcher = true` a la secció `[extra]` del teu `config.toml`. diff --git a/content/blog/faq-languages/index.es.md b/content/blog/faq-languages/index.es.md index 08f293c..b9fe08f 100644 --- a/content/blog/faq-languages/index.es.md +++ b/content/blog/faq-languages/index.es.md @@ -1,7 +1,7 @@ +++ title = "¿Lost in Translation? Explora las capacidades multilingües de tabi" date = 2023-09-12 -updated = 2024-03-01 +updated = 2025-09-14 description = "Descubre cómo tabi te ayuda a conectar con una audiencia global gracias a sus funciones multilingües. Aprende a cambiar el idioma por defecto, añadir más idiomas y aportar tus propias traducciones." [taxonomies] @@ -29,11 +29,14 @@ tabi admite los siguientes idiomas: - Chino (Simplificado) - Coreano - Español +- Estonio +- Finlandés - Francés - Hindi - Inglés - Italiano - Japonés +- Odia - Persa - Portugués (Europeo) - Ruso @@ -104,6 +107,19 @@ Por lo tanto, si creas `i18n/en.toml` en tu directorio base, tabi leerá las cad Asegúrate de copiar todo el archivo para ese idioma primero, o el tema usará el inglés para las claves faltantes. +## ¿Cómo personalizo los formatos de fecha para diferentes idiomas? + +Puedes establecer formatos de fecha específicos por idioma en tu `config.toml` usando la matriz `date_formats`: + +```toml +date_formats = [ + { lang = "es", long = "%d de %B de %Y", short = "%-d %b %Y", archive = "%d de %b" }, + { lang = "de", long = "%d. %B %Y", short = "%d.%m.%Y", archive = "%d. %b" }, +] +``` + +Esto permite que cada idioma muestre las fechas según las convenciones locales. Por ejemplo, el español mostrará «3 de febrero de 2024» mientras que el alemán mostrará «3. Februar 2024». Si no se define un formato específico para un idioma, tabi usará la configuración global `long_date_format`, `short_date_format` y `archive_date_format`. + ## ¿Qué pasa si falta una traducción o está incompleta? Si una cadena no se encuentra en el archivo de idioma, tabi recurrirá a la cadena predeterminada en inglés. @@ -131,3 +147,7 @@ Si lo hiciste, tendrás que actualizar manualmente las traducciones. Puedes hace ## ¿tabi traduce el contenido de mi sitio? No. tabi sólo traduce el tema. Los posts deberás traducirlos tú mismo. + +## ¿Cómo puedo mostrar el código del idioma actual en el conmutador de idioma? + +Añade `show_selected_language_code_in_language_switcher = true` en la sección `[extra]` de tu `config.toml`. diff --git a/content/blog/faq-languages/index.md b/content/blog/faq-languages/index.md index ea3432c..229a5a0 100644 --- a/content/blog/faq-languages/index.md +++ b/content/blog/faq-languages/index.md @@ -1,7 +1,7 @@ +++ title = "Lost in Translation? Not with tabi's Multilingual Capabilities" date = 2023-09-12 -updated = 2024-03-01 +updated = 2025-09-14 description = "Master the art of serving a global audience through tabi's built-in multilingual features. Learn how to change the default language, add multilingual support, and contribute your own translations." [taxonomies] @@ -28,12 +28,15 @@ tabi supports the following languages: - Chinese (Simplified) - Chinese (Traditional) - English +- Estonian +- Finnish - French - German - Hindi - Italian - Japanese - Korean +- Odia - Persian - Portuguese (European) - Russian @@ -105,6 +108,19 @@ So if you create `i18n/en.toml` in your base directory, tabi will read the stri Make sure to copy the entire file for that language first, or the theme will fall back to the default English strings. +## How do I customize date formats for different languages? + +You can set language-specific date formats in your `config.toml` using the `date_formats` array: + +```toml +date_formats = [ + { lang = "es", long = "%d de %B de %Y", short = "%-d %b %Y", archive = "%d de %b" }, + { lang = "de", long = "%d. %B %Y", short = "%d.%m.%Y", archive = "%d. %b" }, +] +``` + +This allows each language to display dates according to local conventions. For example, Spanish will show "3 de febrero de 2024" while German will show "3. Februar 2024". If no language-specific format is defined, tabi will use the global `long_date_format`, `short_date_format` and `archive_date_format` settings. + ## What happens if a translation is missing or incomplete? If a string is not found in the language file, tabi will fall back to the default English string. @@ -132,3 +148,7 @@ If you did, you will need to manually update the translations. You can do this b ## Does tabi translate my content? No. tabi only translates the theme's text strings. You will need to translate your content yourself. + +# How to show current language code on the language switcher? + +Add `show_selected_language_code_in_language_switcher = true` in your config extras. diff --git a/content/blog/javascript/index.ca.md b/content/blog/javascript/index.ca.md index 9f6f459..d9e461f 100644 --- a/content/blog/javascript/index.ca.md +++ b/content/blog/javascript/index.ca.md @@ -1,14 +1,13 @@ +++ title = "Sense JavaScript obligatori" date = 2023-01-06 -updated = 2024-05-03 +updated = 2025-02-21 description = "JavaScript només s'utilitza quan HTML i CSS no són suficients." [taxonomies] tags = ["funcionalitat", "tutorial"] [extra] -footnote_backlinks = true social_media_card = "social_cards/ca_blog_javascript.jpg" +++ @@ -26,10 +25,11 @@ Aquest tema no requereix JavaScript obligatori. Opcionalment, pot carregar una q Les següents opcions es poden especificar per a publicacions, seccions i globalment, seguint la jerarquia de `pàgina > secció > config.toml`: -- [**Suport de KaTeX**](@/blog/markdown/index.ca.md#katex). Habilitat configurant `katex = true` (274 KB). +- [**Suport de KaTeX**](@/blog/markdown/index.ca.md#katex). Habilitat configurant `katex = true` (274 KB). Per renderitzar fórmules sense JS, prova [MathML](https://developer.mozilla.org/docs/Web/MathML/). +- [**Diagrames de Mermaid**](@/blog/shortcodes/index.ca.md#diagrames-de-mermaid). Habilitat configurant `mermaid = true` (~2.5 MB). - [**Còpia de blocs de codi amb un sol clic**](@/blog/markdown/index.ca.md#bloc-de-codi). Habilitada configurant `copy_button = true`. (~700 bytes) -- [**Mostrar ruta/URL a blocs de codi**](@/blog/shortcodes/index.ca.md#mostrar-ruta-o-url). S'activa configurant `add_src_to_code_block = true`. (~400 bytes) -- [**Enllaços de retorn per a notes a peu de pàgina**](@/blog/markdown/index.ca.md#1). Habilitats configurant `footnote_backlinks = true` (~500 bytes). +- [**Noms de blocs de codi clicables**](@/blog/shortcodes/index.ca.md#mostrar-ruta-o-url). S'activa configurant `code_block_name_links = true`. (~400 bytes) +- [**Filtratge per etiquetes** per a graelles de targetes](@/blog/mastering-tabi-settings/index.ca.md#filtrar-projectes) (p. ex. [projectes](@/projects/_index.ca.md)) (~2KB). S'habilita configurant `enable_cards_tag_filtering = true`. Per especificar aquestes opcions: diff --git a/content/blog/javascript/index.es.md b/content/blog/javascript/index.es.md index d574717..36e550e 100644 --- a/content/blog/javascript/index.es.md +++ b/content/blog/javascript/index.es.md @@ -1,14 +1,13 @@ +++ title = "Sin JavaScript obligatorio" date = 2023-01-06 -updated = 2024-05-03 +updated = 2025-02-21 description = "JavaScript solo se utiliza cuando HTML y CSS no son suficientes." [taxonomies] tags = ["funcionalidad", "tutorial"] [extra] -footnote_backlinks = true social_media_card = "social_cards/es_blog_javascript.jpg" +++ @@ -26,10 +25,11 @@ Este tema no requiere JavaScript de manera obligatoria. Opcionalmente, puede car Las siguientes opciones pueden especificarse para publicaciones, secciones y a nivel global, siguiendo la jerarquía de `página > sección > config.toml`: -- [**Soporte de KaTeX**](@/blog/markdown/index.es.md#katex). Habilitado al configurar `katex = true` (274 KB). +- [**Soporte de KaTeX**](@/blog/markdown/index.es.md#katex). Habilitado al configurar `katex = true` (274 KB). Para renderizar fórmulas sin JS, prueba [MathML](https://developer.mozilla.org/docs/Web/MathML/). +- [**Diagramas de Mermaid**](@/blog/shortcodes/index.es.md#diagramas-de-mermaid). Habilitado al configurar `mermaid = true` (~2.5 MB). - [**Copia de bloques de código con un solo clic**](@/blog/markdown/index.es.md#bloque-de-codigo). Habilitado al configurar `copy_button = true` (~700 bytes). -- [**Mostrar ruta/URL en bloques de código**](@/blog/shortcodes/index.es.md#mostrar-ruta-o-url). Se activa configurando `add_src_to_code_block = true`. (~400 bytes) -- [**Enlaces de retorno de notas al pie**](@/blog/markdown/index.es.md#1). Habilitado al configurar `footnote_backlinks = true` (~500 bytes). +- [**Nombres de bloques de código clicables**](@/blog/shortcodes/index.es.md#mostrar-ruta-o-url). Se activa configurando `code_block_name_links = true`. (~400 bytes) +- [**Filtraje por etiquetas** para cuadrículas de tarjetas](@/blog/mastering-tabi-settings/index.es.md#filtrar-proyectos) (p. ej. [proyectos](@/projects/_index.es.md)) (~2KB). Habilitado al configurar `enable_cards_tag_filtering = true`. Para especificar estas opciones: diff --git a/content/blog/javascript/index.md b/content/blog/javascript/index.md index 9217a55..57864b0 100644 --- a/content/blog/javascript/index.md +++ b/content/blog/javascript/index.md @@ -1,14 +1,13 @@ +++ title = "No mandatory JavaScript" date = 2023-01-06 -updated = 2024-05-03 +updated = 2025-02-21 description = "JavaScript is only used when HTML and CSS aren't enough." [taxonomies] tags = ["showcase", "tutorial"] [extra] -footnote_backlinks = true social_media_card = "social_cards/blog_javascript.jpg" +++ @@ -26,10 +25,11 @@ This theme has no mandatory JavaScript. Optionally, it can load a minimal amount The following settings can be specified for posts, sections and globally, following the hierarchy of `page > section > config.toml`: -- [**KaTeX support**](@/blog/markdown/index.md#katex). Enabled by setting `katex = true` (274 KB). +- [**KaTeX support**](@/blog/markdown/index.md#katex). Enabled by setting `katex = true` (274 KB). To render math without JS, check out [MathML](https://developer.mozilla.org/docs/Web/MathML/). +- [**Mermaid diagrams**](@/blog/shortcodes/index.md#mermaid-diagrams). Enabled by setting `mermaid = true` (~2.5 MB). - [**One-click copy of code blocks**](@/blog/markdown/index.md#code-block). Enabled by setting `copy_button = true`. (~700 bytes) -- [**Showing source (path or URL) in code blocks**](@/blog/shortcodes/index.md#show-source-or-path). Enabled by setting `add_src_to_code_block = true`. (~300 bytes) -- [**Footnote backlinks**](@/blog/markdown/index.md#1). Enabled by setting `footnote_backlinks = true` (~500 bytes). +- [**Clickable code block names**](@/blog/shortcodes/index.md#show-source-or-path). Enabled by setting `code_block_name_links = true`. (~300 bytes) +- [**Tag filtering** for card grids](@/blog/mastering-tabi-settings/index.md#filtering-projects) (e.g. [projects](@/projects/_index.md)) (~2KB). Enabled by setting `enable_cards_tag_filtering = true`. To specify these settings: diff --git a/content/blog/markdown/index.ar.md b/content/blog/markdown/index.ar.md new file mode 100644 index 0000000..9322dc4 --- /dev/null +++ b/content/blog/markdown/index.ar.md @@ -0,0 +1,93 @@ ++++ +title = "أمثلة على ماركداون" +date = 2023-01-31 +updated = 2023-09-01 +description = "تعرض هذه التدوينة بعض الأمثلة على تنسيق ماركداون، بما في ذلك الجداول، والشِفرات البرمجية والوسوم، والاقتباسات، والهوامش." + +[taxonomies] +tags = ["ماركداون", "توضيحي"] + +[extra] +katex = true ++++ + +{% admonition(type="note", title="ملاحظة عن الاتجاه", icon="info") %} +يدعم تابي الكتابة من اليمين إلى اليسار (RTL) بشكل كامل، مما يجعله مثالياً للغة العربية. + +الشفرات البرمجية والمعادلات الرياضية تبقى من اليسار إلى اليمين كما هو متوقع. +{% end %} + +## الرياضيات مع $\KaTeX$ + +{{ aside(text="تأتي كلمة *ماركداون* من الإنجليزية *Markdown*، وهي لغة ترميز بسيطة صممها جون غروبر وآرون سوارتز في عام 2004.") }} + +[$\KaTeX$](https://katex.org/) هي مكتبة سريعة وسهلة الاستخدام تمكن من عرض الرموز الرياضية باستخدام صيغة LaTeX. + +يمكنك استخدام $\KaTeX$ **ضمن السطر** عن طريق وضع التعبير بين `$` أو بين `\\(` و `\\)`. + +على سبيل المثال، `$ \sin(x) = \sum_{n=0}^{\infty} \frac{(-1)^n}{(2n + 1)!} x^{2n + 1} $` سيظهر هكذا: $ \sin(x) = \sum_{n=0}^{\infty} \frac{(-1)^n}{(2n + 1)!} x^{2n + 1} $ + +لعرض التعبير **في سطر منفصل ومتوسط**، ضعه بين `$$` أو بين `\\[` و `\\]`. + +على سبيل المثال، `\\[ r = \frac{\sum_{i=1}^{n}(x_i - \bar{x})(y_i - \bar{y})}{\sqrt{\sum_{i=1}^{n}(x_i - \bar{x})^2}\sqrt{\sum_{i=1}^{n}(y_i - \bar{y})^2}} \\]` سيظهر هكذا: \\[ r = \frac{\sum_{i=1}^{n}(x_i - \bar{x})(y_i - \bar{y})}{\sqrt{\sum_{i=1}^{n}(x_i - \bar{x})^2}\sqrt{\sum_{i=1}^{n}(y_i - \bar{y})^2}} \\] + +لتفعيل $\KaTeX$ لتدوينة أو قسم كامل، أضف `katex = true` داخل قسم `[extra]` في المقدمة. على سبيل المثال: + +```toml,hl_lines=5-6 +title = "تجربة KaTeX" +date = 2002-11-30 + +[extra] +katex = true +``` + +يمكنك أيضاً تفعيله بشكل عام عن طريق تعيين `katex = true` في قسم `[extra]` في ملف `config.toml` الخاص بك. + +لتحسين الأداء والأمان، يتم استضافة ملفات جافا سكريبت و CSS والخطوط الخاصة بـ $\KaTeX$ محلياً. + +**ملاحظة**: بعد تفعيل $\KaTeX$، إذا أردت استخدام \$ بدون عرض تعبير رياضي، استخدم شرطة مائلة للخلف قبلها: `\$`. + +## جدول + +هذا مثال على جدول[^1]. تتغير ألوانه حسب سمة التدوينة. + +| الرمز | العنصر | العدد الذري | +|--------|----------|--------------| +| H | هيدروجين| 1 | +| C | كربون | 6 | +| Fe | حديد | 26 | +| Au | ذهب | 79 | + +## الشِفرات البرمجية + +```rust +fn main() { + println!("مرحباً يا عالم") -> (); +} +``` + +### من اليمين إلى اليسار +{% force_text_direction(direction="rtl") %} + +``` +نص قل_مرحباً(نص الاسم) { + أرجع تنسيق("مرحباً {الاسم}")؛ +} +``` + +{% end %} + +## سطر برمجي + +في Rust، تعلن عن متغير متغير باستخدام `let mut x = 5`، بينما في Python، تستخدم ببساطة `x = 5`. وبالمثل، لطباعة قيمة في Rust، تستخدم `println!("القيمة: {}", x)`، ولكن في Python، الأمر بسيط مثل `print(f"القيمة: {x}")` +وفي لغة البرمجة العربية هو `مهنة = "صائد فئران"` + +## اقتباس + +> وابِطُكَ قابِضِ الأَرواحِ يَرمي ... بِسَهمِ المَوتِ مِن تَحتِ الثِيابِ +> +> شَرابُكَ في السَرابِ إِذا عَطِشنا ... وَخُبزُكَ عِندَ مُنقَطِعِ التُرابِ +> +> — أبو الشمقمق، العصر العباسي + +[^1]: وهذا مثال على الهامش! diff --git a/content/blog/markdown/index.ca.md b/content/blog/markdown/index.ca.md index 7e4990e..16cf165 100644 --- a/content/blog/markdown/index.ca.md +++ b/content/blog/markdown/index.ca.md @@ -1,7 +1,7 @@ +++ title = "Exemples de Markdown" date = 2023-01-31 -updated = 2023-09-01 +updated = 2025-02-21 description = "Aquesta publicació mostra alguns exemples de format en Markdown, incloent-hi una taula, blocs de codi i etiquetes, citacions, taules i notes a peu de pàgina." [taxonomies] @@ -9,7 +9,6 @@ tags = ["markdown", "funcionalitat"] [extra] katex = true -footnote_backlinks = true social_media_card = "social_cards/ca_blog_markdown.jpg" +++ @@ -60,6 +59,42 @@ fn main() { } ``` +### Amb numeració de línies + +```rust,linenos +use std::collections::HashMap; + +#[derive(Debug)] +struct TwinPeaksCharacter { + name: String, + coffee_rating: f32, + pie_preference: String, +} + +fn main() { + let mut black_lodge = HashMap::new(); + + black_lodge.insert("agent", TwinPeaksCharacter { + name: String::from("Dale Cooper"), + coffee_rating: 9999.99, + pie_preference: String::from("Damn Fine Cherry"), + }); + + black_lodge.insert("giant", TwinPeaksCharacter { + name: String::from("The Fireman"), + coffee_rating: 42.424242, + pie_preference: String::from("Garmonbozia"), + }); + + // Calculate total appreciation of damn fine coffee + let total_coffee: f32 = black_lodge.values() + .map(|character| character.coffee_rating) + .sum(); + + println!("☕ Total coffee appreciation: {:.2} cups", total_coffee); +} +``` + ## Etiquetes de codi A Rust, declares una variable mutable amb `let mut x = 5;`, mentre que a Python, simplement fas `x = 5`. De manera similar, per imprimir un valor a Rust, utilitzaries `println!("Valor: {}", x);`, però a Python, és tan senzill com `print(f"Valor: {x}")`. @@ -70,6 +105,6 @@ A Rust, declares una variable mutable amb `let mut x = 5;`, mentre que a Python, > > — Mercè Rodoreda, La plaça del Diamant -
+--- [^1]: I aquí tens un exemple de nota a peu de pàgina! diff --git a/content/blog/markdown/index.es.md b/content/blog/markdown/index.es.md index 653e37a..af38f47 100644 --- a/content/blog/markdown/index.es.md +++ b/content/blog/markdown/index.es.md @@ -1,7 +1,7 @@ +++ title = "Ejemplos de Markdown" date = 2023-01-31 -updated = 2023-09-01 +updated = 2025-02-21 description = "Esta publicación muestra algunos ejemplos de formato Markdown, incluyendo una tabla, bloques de código y etiquetas, citas, tablas y notas al pie de página." [taxonomies] @@ -9,7 +9,6 @@ tags = ["markdown", "funcionalidad"] [extra] katex = true -footnote_backlinks = true social_media_card = "social_cards/es_blog_markdown.jpg" +++ @@ -60,6 +59,42 @@ fn main() { } ``` +### Con números de línea + +```rust,linenos +use std::collections::HashMap; + +#[derive(Debug)] +struct TwinPeaksCharacter { + name: String, + coffee_rating: f32, + pie_preference: String, +} + +fn main() { + let mut black_lodge = HashMap::new(); + + black_lodge.insert("agent", TwinPeaksCharacter { + name: String::from("Dale Cooper"), + coffee_rating: 9999.99, + pie_preference: String::from("Damn Fine Cherry"), + }); + + black_lodge.insert("giant", TwinPeaksCharacter { + name: String::from("The Fireman"), + coffee_rating: 42.424242, + pie_preference: String::from("Garmonbozia"), + }); + + // Calculate total appreciation of damn fine coffee + let total_coffee: f32 = black_lodge.values() + .map(|character| character.coffee_rating) + .sum(); + + println!("☕ Total coffee appreciation: {:.2} cups", total_coffee); +} +``` + ## Etiquetas de código En Rust, declaras una variable mutable con `let mut x = 5;`, mientras que en Python, simplemente usas `x = 5`. De manera similar, para imprimir un valor en Rust, utilizarías `println!("Valor: {}", x);`, pero en Python, es tan sencillo como `print(f"Valor: {x}")`. @@ -70,6 +105,6 @@ En Rust, declaras una variable mutable con `let mut x = 5;`, mientras que en Pyt > > — Miguel de Unamuno, Niebla -
+--- [^1]: ¡Y aquí tienes un ejemplo de una nota al pie de página! diff --git a/content/blog/markdown/index.md b/content/blog/markdown/index.md index 5d417c1..ca2f4cf 100644 --- a/content/blog/markdown/index.md +++ b/content/blog/markdown/index.md @@ -1,7 +1,7 @@ +++ title = "Markdown examples" date = 2023-01-31 -updated = 2023-09-01 +updated = 2025-02-21 description = "This post showcases some examples of Markdown formatting, including a table, code blocks and tags, quotes, tables, and footnotes." [taxonomies] @@ -9,7 +9,6 @@ tags = ["markdown", "showcase"] [extra] katex = true -footnote_backlinks = true social_media_card = "social_cards/blog_markdown.jpg" +++ @@ -60,6 +59,42 @@ fn main() { } ``` +### With line numbers + +```rust,linenos +use std::collections::HashMap; + +#[derive(Debug)] +struct TwinPeaksCharacter { + name: String, + coffee_rating: f32, + pie_preference: String, +} + +fn main() { + let mut black_lodge = HashMap::new(); + + black_lodge.insert("agent", TwinPeaksCharacter { + name: String::from("Dale Cooper"), + coffee_rating: 9999.99, + pie_preference: String::from("Damn Fine Cherry"), + }); + + black_lodge.insert("giant", TwinPeaksCharacter { + name: String::from("The Fireman"), + coffee_rating: 42.424242, + pie_preference: String::from("Garmonbozia"), + }); + + // Calculate total appreciation of damn fine coffee + let total_coffee: f32 = black_lodge.values() + .map(|character| character.coffee_rating) + .sum(); + + println!("☕ Total coffee appreciation: {:.2} cups", total_coffee); +} +``` + ## Code tags In Rust, you declare a mutable variable with `let mut x = 5;`, whereas in Python, you simply use `x = 5`. Similarly, to print a value in Rust, you would use `println!("Value: {}", x);`, but in Python, it's as straightforward as `print(f"Value: {x}")`. @@ -70,6 +105,6 @@ In Rust, you declare a mutable variable with `let mut x = 5;`, whereas in Python > > — Charlie Kaufman, Synecdoche, New York -
+--- [^1]: And here's an example of a footnote! diff --git a/content/blog/mastering-tabi-settings/img/external_link_dark.webp b/content/blog/mastering-tabi-settings/img/external_link_dark.webp new file mode 100644 index 0000000..61a6641 Binary files /dev/null and b/content/blog/mastering-tabi-settings/img/external_link_dark.webp differ diff --git a/content/blog/mastering-tabi-settings/img/external_link_light.webp b/content/blog/mastering-tabi-settings/img/external_link_light.webp new file mode 100644 index 0000000..16d03a1 Binary files /dev/null and b/content/blog/mastering-tabi-settings/img/external_link_light.webp differ diff --git a/content/blog/mastering-tabi-settings/img/jump_to_series_posts_dark.webp b/content/blog/mastering-tabi-settings/img/jump_to_series_posts_dark.webp new file mode 100644 index 0000000..4790470 Binary files /dev/null and b/content/blog/mastering-tabi-settings/img/jump_to_series_posts_dark.webp differ diff --git a/content/blog/mastering-tabi-settings/img/jump_to_series_posts_light.webp b/content/blog/mastering-tabi-settings/img/jump_to_series_posts_light.webp new file mode 100644 index 0000000..4fee0d6 Binary files /dev/null and b/content/blog/mastering-tabi-settings/img/jump_to_series_posts_light.webp differ diff --git a/content/blog/mastering-tabi-settings/img/pinned_post_dark.webp b/content/blog/mastering-tabi-settings/img/pinned_post_dark.webp new file mode 100644 index 0000000..6111f62 Binary files /dev/null and b/content/blog/mastering-tabi-settings/img/pinned_post_dark.webp differ diff --git a/content/blog/mastering-tabi-settings/img/pinned_post_light.webp b/content/blog/mastering-tabi-settings/img/pinned_post_light.webp new file mode 100644 index 0000000..ddddc44 Binary files /dev/null and b/content/blog/mastering-tabi-settings/img/pinned_post_light.webp differ diff --git a/content/blog/mastering-tabi-settings/img/projects_tag_filter_dark.webp b/content/blog/mastering-tabi-settings/img/projects_tag_filter_dark.webp new file mode 100644 index 0000000..a7c9fd4 Binary files /dev/null and b/content/blog/mastering-tabi-settings/img/projects_tag_filter_dark.webp differ diff --git a/content/blog/mastering-tabi-settings/img/projects_tag_filter_light.webp b/content/blog/mastering-tabi-settings/img/projects_tag_filter_light.webp new file mode 100644 index 0000000..42c9c36 Binary files /dev/null and b/content/blog/mastering-tabi-settings/img/projects_tag_filter_light.webp differ diff --git a/content/blog/mastering-tabi-settings/img/sans-serif.webp b/content/blog/mastering-tabi-settings/img/sans-serif.webp new file mode 100644 index 0000000..9688a79 Binary files /dev/null and b/content/blog/mastering-tabi-settings/img/sans-serif.webp differ diff --git a/content/blog/mastering-tabi-settings/img/serif.webp b/content/blog/mastering-tabi-settings/img/serif.webp new file mode 100644 index 0000000..93a276c Binary files /dev/null and b/content/blog/mastering-tabi-settings/img/serif.webp differ diff --git a/content/blog/mastering-tabi-settings/img/webmention_dark.webp b/content/blog/mastering-tabi-settings/img/webmention_dark.webp new file mode 100644 index 0000000..2d4290f Binary files /dev/null and b/content/blog/mastering-tabi-settings/img/webmention_dark.webp differ diff --git a/content/blog/mastering-tabi-settings/img/webmention_light.webp b/content/blog/mastering-tabi-settings/img/webmention_light.webp new file mode 100644 index 0000000..f555252 Binary files /dev/null and b/content/blog/mastering-tabi-settings/img/webmention_light.webp differ diff --git a/content/blog/mastering-tabi-settings/index.ca.md b/content/blog/mastering-tabi-settings/index.ca.md index b0aa5a4..b866951 100644 --- a/content/blog/mastering-tabi-settings/index.ca.md +++ b/content/blog/mastering-tabi-settings/index.ca.md @@ -1,14 +1,14 @@ +++ title = "Domina la configuració de tabi: guia completa" date = 2023-09-18 -updated = 2024-06-22 +updated = 2025-08-07 description = "Descobreix les múltiples maneres en què pots personalitzar tabi." [taxonomies] tags = ["funcionalitat", "tutorial", "preguntes freqüents"] [extra] -footnote_backlinks = true +pinned = true quick_navigation_buttons = true social_media_card = "social_cards/ca_blog_mastering_tabi_settings.jpg" +++ @@ -26,11 +26,12 @@ tabi té una jerarquia que permet personalitzar el teu lloc a diferents nivells. 1. **Configuracions globals**: Aquestes són les configuracions que s'apliquen a tot el teu lloc. Es configuren a `config.toml`. 2. **Configuracions de secció**: Aquestes són les configuracions que s'apliquen a una secció del teu lloc (per exemple, `/blog` o `/projects`). Es configuren a la metainformació de l'arxiu `_index.md` de la secció. -3. **Configuracions de pàgina**: Aquestes són les configuracions que s'apliquen a una sola pàgina. Es configuren a la metainformació de la pàgina. +3. **Configuració de la pàgina «pare»**: Per a pàgines anidades (pàgines dins de pàgines), aquestes són les configuracions de la pàgina que les conté. +4. **Configuracions de pàgina**: Aquestes són les configuracions que s'apliquen a una sola pàgina. Es configuren a la metainformació de la pàgina. En tots els casos, les opcions de tabi es configuren a la secció `[extra]`. -Per a les configuracions que segueixen aquesta jerarquia, el valor establert a una pàgina reemplaça el valor d'una secció, que al seu torn reemplaça el valor global. En resum: com més específica sigui la configuració, més prioritat tindrà, o `pàgina > secció > config.toml`. +Per a les configuracions que segueixen aquesta jerarquia, el valor establert a una pàgina reemplaça el valor d'una secció, que al seu torn reemplaça el valor global. En resum: com més específica sigui la configuració, més prioritat tindrà, o `pàgina > pàgina pare/secció > config.toml`. --- @@ -87,7 +88,7 @@ Per a detalls tècnics sobre la implementació de la cerca, incloent quan es car ## Suport multilingüe -tabi ofereix suport multilingüe complet per al teu lloc Zola, des de configurar un idioma predeterminat fins a afegir tots els que vulguis. Consulta les [preguntes freqüents sobre idiomes](/ca/blog/faq-languages/) per a més informació. +tabi ofereix suport multilingüe complet per al teu lloc Zola, des de configurar un idioma predeterminat fins a afegir tots els que vulguis. Consulta les [preguntes freqüents sobre idiomes](@/blog/faq-languages/index.ca.md) per a més informació. --- @@ -110,37 +111,76 @@ header = {title = "Hola! Soc tabi~", img = "img/main.webp", img_alt = "Óscar Fe La descripció és contingut Markdown normal, escrit fora del front matter. -#### Mostrant publicacions recents +#### Llistant publicacions recents -Si vols mostrar publicacions a la pàgina principal, primer necessites decidir si la seva ruta serà `/` o quelcom diferent, com ara `/blog/`. +Per mostrar publicacions a la pàgina principal, primer has de decidir d'on es serviran: de la ruta arrel (`/`) o d'un subdirectori (per exemple, `/blog`). -Si vols servir les publicacions des de `/`, necessites configurar `paginate_by = 5` al front matter del teu arxiu `_index.md`. **Nota**: això no es configura a l'apartat `[extra]`, sinó al front matter principal. Exemple: +**Opció A: Servir publicacions des de la ruta arrel (`/`)** + +Configura `paginate_by` al front matter del teu arxiu `content/_index.md`: ```toml +title = "Últimes publicacions" sort_by = "date" -template = "section.html" -paginate_by = 5 +paginate_by = 5 # Mostra 5 publicacions per pàgina. [extra] -header = {title = "Hola! Sóc tabi~", img = "img/main.webp", img_alt = "Óscar Fernández, l'autor del tema" } +header = {title = "Hola! Soc tabi~", img = "img/main.webp", img_alt = "El teu nom" } ``` -Si prefereixes servir les publicacions des de `/blog`, pots configurar `section_path = "/blog"` a la secció `[extra]`. Aquesta és la configuració d'aquesta demo: +{{ admonition(type="note", text="La configuració `paginate_by` va al front matter principal, no a la secció `[extra]`.") }} + +**Opció B: Servir publicacions des d'un subdirectori (per exemple, `/blog`)** + +Utilitza `section_path` a la secció `[extra]` del teu arxiu `content/_index.md`: ```toml -title = "Publicacions recents" +title = "Últimes publicacions" sort_by = "date" -template = "section.html" +# No configuris `paginate_by` aquí. [extra] -header = {title = "Hola! Sóc tabi~", img = "img/main.webp", img_alt = "Óscar Fernández, l'autor del tema" } -section_path = "blog/_index.es.md" -max_posts = 4 +header = {title = "Hola! Soc tabi~", img = "img/main.webp", img_alt = "El teu nom" } +section_path = "blog/_index.md" # On trobar les teves publicacions. +max_posts = 5 # Mostra fins a 5 publicacions a la pàgina principal. ``` -Fixa't que si configures `section_path`, no cal que configuris `paginate_by`. Pots establir `max_posts` per determinar el nombre de publicacions que vols mostrar a la pàgina principal. +{{ admonition(type="warning", title="ALERTA", text="No configuris `paginate_by` i `section_path` alhora. Aquestes configuracions són mútuament excloents i usar ambdues pot fer que no es mostrin publicacions.") }} -El `title` és el títol que apareix a sobre de les publicacions. +Notes addicionals: + +- El `title` al front matter estableix el títol que apareix sobre les publicacions. +- Utilitza la ruta completa a l'arxiu `_index.md` de la secció per a `section_path`. Usar `section_path = "blog/"` no funcionarà. + +##### Fixar entrades + +Pots fixar entrades per mantenir-les a la part superior de la pàgina principal. En aquesta demo, aquesta entrada està fixada, així que apareix primera amb una icona i etiqueta de "fixada": + +{{ dual_theme_image(light_src="blog/mastering-tabi-settings/img/pinned_post_light.webp", dark_src="blog/mastering-tabi-settings/img/pinned_post_dark.webp", alt="Entrada fixada", full_width=true) }} + +Les entrades fixades es mostren primer, mantenint el seu ordre relatiu segons el `sort_by` de la secció, seguides per les entrades regulars. + +Per fixar una entrada, afegeix el següent al seu front matter: + +```toml +[extra] +pinned = true +``` + +{{ admonition(type="info", text="Aquesta configuració només afecta les pàgines principals del lloc (com `/`, `/es/`, `/fr/`). Altres seccions com `blog/`, `tags/` o `archive/` mostren les publicacions en el seu ordre habitual.") }} + +{{ admonition(type="warning", text='Quan s'utilitza la paginació (`paginate_by`), les entrades fixades poden aparèixer dues vegades: una vegada a la part superior de la primera pàgina, i una altra en la seva posició cronològica normal en pàgines posteriors.') }} + +##### Mostrar la data dels articles al llistat +Per defecte, quan es llisten els articles, es mostra la data de creació. Pots configurar quina(es) data(es) mostrar utilitzant l'opció `post_listing_date`. Configuracions disponibles: + +- `date`: Mostra només la data de publicació original de l'article (opció per defecte). +- `updated`: Mostra només la data de l'última actualització de l'article. Si no hi ha data d'actualització, es mostra la data de publicació original. +- `both`: Mostra tant la data de publicació original com la data de l'última actualització. + +{% admonition(type="tip") %} +Aquesta configuració segueix la jerarquia: pots establir un valor global a `config.toml` o canviar-lo per a seccions específiques al seu arxiu `_index.md`. En ambdós casos, afegeix-lo a la secció `[extra]`. +{% end %} #### Llistat de Projectes @@ -183,7 +223,38 @@ Les skins («pells») de tabi canvien el color principal del lloc web. Pots conf {{ image_toggler(default_src="blog/customise-tabi/skins/lavender_light.webp", toggled_src="blog/customise-tabi/skins/lavender_dark.webp", default_alt="pell lavender en mode clar", toggled_alt="pell lavender en mode fosc", full_width=true) }} -Explora les skins disponibles i aprèn com crear la teva pròpia consultant [la documentació](/ca/blog/customise-tabi/#skins). +Explora les skins disponibles i aprèn com crear la teva pròpia consultant [la documentació](@/blog/customise-tabi/index.ca.md#skins). + +### Font sans serif (pal sec) + +| Pàgina | Secció | `config.toml` | Segueix la jerarquia | Requereix JavaScript | +|:------:|:------:|:-------------:|:---------------:|:-------------------:| +| ❌ | ❌ | ✅ | ❌ | ❌ | + +tabi utilitza una font serif per als paràgrafs dels articles (la que estàs veient ara). Pots canviar a una font sans-serif (la que veus als encapçalaments/menú) a tot el teu lloc configurant `override_serif_with_sans = true` a `config.toml`. + +Fes clic a la imatge a continuació per comparar les fonts: + +{{ image_toggler(default_src="blog/mastering-tabi-settings/img/serif.webp", toggled_src="blog/mastering-tabi-settings/img/sans-serif.webp", default_alt="Font serif", toggled_alt="Font sans-serif", full_width=true) }} + +### Indicador d'enllaços externs + +| Pàgina | Secció | `config.toml` | Segueix Jerarquia | Requereix JavaScript | +|:------:|:------:|:-------------:|:-----------------:|:-------------------:| +| ❌ | ❌ | ✅ | ❌ | ❌ | + +{{ admonition(type="info", text="Requereix Zola 0.20.0 o posterior.") }} + +Si vols afegir una icona als enllaços externs, configura la secció `[markdown]` (no `[extra]`) al teu `config.toml`: + +```toml +[markdown] +external_links_class = "external" +``` + +Això afegirà una petita icona al costat dels enllaços externs: + +{{ dual_theme_image(light_src="blog/mastering-tabi-settings/img/external_link_light.webp", dark_src="blog/mastering-tabi-settings/img/external_link_dark.webp", alt="Icona d'enllaç extern", full_width=true) }} ### Estils CSS personalitzats @@ -217,7 +288,7 @@ Aquesta variable accepta qualsevol color CSS vàlid, així que pots utilitzar pa |:------:|:------:|:-------------:|:-----------------:|:--------------------:| | ❌ | ❌ | ✅ | ❌ | ❌ | -Per defecte, la [pàgina d'etiquetes](/tags) mostra les etiquetes com: +Per defecte, la [pàgina d'etiquetes](/ca/tags) mostra les etiquetes com: [NomEtiqueta](#) — n entrada[es] @@ -225,6 +296,43 @@ Establir `compact_tags = true` les mostrarà com: [NomEtiqueta](#) n +### Ordre de les etiquetes + +| Pàgina | Secció | `config.toml` | Segueix la jerarquia | Requereix JavaScript | +|:------:|:------:|:-------------:|:-----------------:|:--------------------:| +| ❌ | ❌ | ✅ | ❌ | ❌ | + +Per defecte, la [pàgina d'etiquetes](/ca/tags) ordena les etiquetes alfabèticament, donada la configuració predeterminada de `tag_sorting = "name"`. +Si configures `tag_sorting = "frequency"`, s'ordenaran segons el nombre de publicacions (de més a menys). + +--- + +## Sèries + +Per a una explicació detallada, consulta la [documentació de sèries](@/blog/series/index.ca.md). + +### Enllaç per saltar a les publicacions + +| Pàgina | Secció | `config.toml` | Segueix la jerarquia | Requereix JavaScript | +|:------:|:-------:|:-------------:|:------------------:|:-------------------:| +| ❌ | ✅ | ✅ | ✅ | ❌ | + +Per defecte, apareix automàticament un enllaç "Salta a les publicacions" al costat del títol de la sèrie quan una sèrie té un contingut de més de 2000 caràcters: + +{{ dual_theme_image(light_src="blog/series/img/jump_to_series_posts_light.webp", dark_src="blog/series/img/jump_to_series_posts_dark.webp" alt="enllaç per saltar a les publicacions de la sèrie", full_width=true) }} + +Estableix `show_jump_to_posts = true` per forçar l'activació de la funció i `show_jump_to_posts = false` per desactivar-la. + +### Indexació de pàgines de sèries + +| Pàgina | Secció | `config.toml` | Segueix la jerarquia | Requereix JavaScript | +|:------:|:-------:|:-------------:|:------------------:|:-------------------:| +| ❌ | ✅ | ✅ | ✅ | ❌ | + +Per defecte, les pàgines de sèries s'indexen (usant una indexació basada en 1) segons el `sort_by` de la secció de sèries. + +Estableix `post_listing_index_reversed = true` per invertir aquest índex. + --- ## Integració amb repositoris Git @@ -285,7 +393,7 @@ quick_navigation_buttons = true - `show_reading_time = false` amaga el temps estimat de lectura. - `quick_navigation_buttons = true` mostra els botons de navegació ràpida. -Al costat del fitxer `_index.md`, pots crear un fitxer per a cada projecte. Per exemple, aquest és el bloc de metadades per a la pàgina del projecte [tabi](/ca/projects/tabi/): +Al costat del fitxer `_index.md`, pots crear un fitxer per a cada projecte. Per exemple, aquest és el bloc de metadades per a la pàgina del projecte [tabi](@/projects/tabi/index.ca.md): ```toml title = "tabi" @@ -305,6 +413,33 @@ Quan un usuari faci clic a la imatge o al títol d'un projecte, serà portat a l La pàgina del projecte individual es renderitza amb la plantilla predeterminada, tret que estableixis una altra, per exemple, `template = "info-page.html"`. +#### Filtrar projectes + +Si afegeixes etiquetes als teus projectes, veuràs un filtre d'etiquetes: + +{{ dual_theme_image(light_src="blog/mastering-tabi-settings/img/projects_tag_filter_light.webp", dark_src="blog/mastering-tabi-settings/img/projects_tag_filter_dark.webp", alt="Pàgina de projectes amb filtre d'etiquetes", full_width=true) }} + +El sistema de filtratge d'etiquetes utilitza millora progressiva: + +- Sense JavaScript: Les etiquetes enllacen directament a pàgines d'etiquetes dedicades (per exemple, `/tags/nom-de-l-etiqueta`). +- Amb JavaScript: Filtratge instantani, sincronització d'URL (#nom-etiqueta) i navegació amb el teclat. + +Per desactivar aquesta funció, estableix `enable_cards_tag_filtering = false` a la secció `[extra]` del fitxer `projects/_index.md` o a `config.toml`. + +{% admonition(type="tip") %} + +Per filtrar projectes per etiquetes, necessites establir etiquetes a la front matter de cada projecte. Per exemple: + +```toml +title = "nom del projecte" +weight = 40 + +[taxonomies] +tags = ["etiqueta", "etiqueta 2", "tercera etiqueta"] +``` + +{% end %} + ### Arxiu Afegir una pàgina d'arxiu és similar a afegir una pàgina de projectes. Pots crear un directori a `content/archive/`. Allà, pots crear un fitxer `_index.md` amb el següent encapçalament: @@ -325,7 +460,14 @@ Per defecte, l'arxiu llistarà les publicacions situades a `blog/`. Per personal section_path = ["blog/", "notes/", "camí-tres/"] ``` -**Nota**: la pàgina d'arxiu només llistarà publicacions que tinguin una data al seu encapçalament. +L'arxiu mostra les publicacions en ordre cronològic invers (les més recents primer). Pots invertir aquest ordre establint `archive_reverse = true` a la secció `[extra]`: + +```toml +[extra] +archive_reverse = true # mostra les publicacions més antigues primer +``` + +{{ admonition(type="note", title="nota" text="La pàgina d'arxiu només llistarà publicacions que tinguin data al seu encapçalament.") }} ### Etiquetes @@ -374,6 +516,17 @@ path = "about" Fixa't com s'estableix `path = "about"`. Zola situarà la pàgina a `$base_url/about/`. Si vols que la pàgina estigui disponible a `/contacte/`, hauries d'establir `path = "contacte"`. +La plantilla `info-page.html` també es pot utilitzar per crear landing pages a la ruta arrel (`"/"`). Per fer-ho, l'arxiu `content/_index.md` hauria de ser així: + +```markdown ++++ +title = "Títol de la pàgina" +template = "info-page.html" ++++ + +Contingut amb Markdown. +``` + --- ## SEO @@ -422,7 +575,7 @@ Per exemple, si configures `base_canonical_url = "https://example.com"`, l'URL c Les targetes per a xarxes socials són les imatges que es mostren quan comparteixes un enllaç a les xarxes socials: -![Una captura de pantalla de WhatsApp mostrant un enllaç amb una targeta per a xarxes socials](/blog/mastering-tabi-settings/img/with_social_media_card.webp) +{{ dimmable_image(src="img/with_social_media_card.webp", alt="Una captura de pantalla de WhatsApp mostrant un enllaç amb una targeta per a xarxes socials") }} Pots establir la imatge per a xarxes socials amb `social_media_card = "img/social_media_card.png"`. @@ -436,7 +589,19 @@ Si ambdues rutes, relativa i absoluta, són vàlides, la ruta relativa tindrà p Ja que segueix la [jerarquia](#jerarquia-de-configuracio), si no està configurat en una pàgina, però sí ho està en una secció, s'utilitzarà la imatge de la secció. Si no està configurat en una pàgina o secció, però sí en `config.toml`, s'utilitzarà la imatge global. -**Consell**: automatitza la seva creació amb un [script](https://github.com/welpo/osc.garden/blob/main/static/code/social-cards-zola): [De reservat a rei de les xarxes: automatitzant les vistes prèvies dels enllaços amb Zola](https://osc.garden/ca/blog/automating-social-media-cards-zola/). +{{ admonition(type="tip", title="CONSELL", text="Automatitza la seva creació amb un [script](https://github.com/welpo/osc.garden/blob/main/static/code/social-cards-zola): [Automatitzant les vistes prèvies dels enllaços amb Zola](https://osc.garden/ca/blog/automating-social-media-cards-zola/).") }} + +### Creador del fedivers + +| Pàgina | Secció | `config.toml` | Segueix jerarquia | Requereix JavaScript | +|:------:|:------:|:-------------:|:-----------------:|:--------------------:| +| ❌ | ❌ | ✅ | ❌ | ❌ | + +Pots mostrar el perfil del fedivers de l'autor en les previsualitzacions d'enllaços de Mastodon configurant la variable `fediverse_creator` al teu `config.toml`. Per exemple, per a @username@example.com, fes servir: + +```toml +fediverse_creator = { handle = "username", domain = "example.com" } +``` --- @@ -448,7 +613,9 @@ Ja que segueix la [jerarquia](#jerarquia-de-configuracio), si no està configura |:------:|:------:|:-------------:|:---------------:|:-------------------:| | ❌ | ❌ | ✅ | ❌ | ❌ | -La barra de navegació és la franja a la part superior de la pàgina que conté el títol del lloc i el menú de navegació. Pots personalitzar els elements que apareixen configurant `menu` en `config.toml`. Per exemple: +La barra de navegació és la franja a la part superior de la pàgina que conté el títol del lloc i el menú de navegació. Pots personalitzar els elements que apareixen configurant `menu` en `config.toml`. + +Soporta links relatius per a pàgines internes i links absoluts per a enllaços externs. Per exemple: ```toml menu = [ @@ -457,6 +624,7 @@ menu = [ { name = "etiquetes", url = "tags", trailing_slash = true }, { name = "projectes", url = "projects", trailing_slash = true }, { name = "sobre nosaltres", url = "about", trailing_slash = true }, + { name = "github", url = "https://github.com/welpo/tabi", trailing_slash = false }, ] ``` @@ -480,7 +648,7 @@ Per activar-los, estableix `quick_navigation_buttons = true`. Activa l'índex de continguts just sota del títol i metadades de l'article amb `toc = true`. -Per saber més sobre com personalitzar-ho, consulta [la documentació sobre la Taula de continguts](/ca/blog/toc/). +Per saber més sobre com personalitzar-ho, consulta [la documentació sobre la Taula de continguts](@/blog/toc/index.ca.md). ### Enllaços als articles anterior i següent @@ -492,7 +660,7 @@ Mostra enllaços als articles anterior i següent a la part inferior dels posts. {{ dual_theme_image(light_src="blog/mastering-tabi-settings/img/show_previous_next_article_links_light.webp", dark_src="blog/mastering-tabi-settings/img/show_previous_next_article_links_dark.webp", alt="Enllaços als articles anterior i següent", full_width=true) }} -Per activar aquesta funció, estableix `show_previous_next_article_links = true`. +Per activar aquesta funció, estableix `show_previous_next_article_links = true` i assegura't que la secció té un valor `sort_by` (per exemple `sort_by = "date"`). Per defecte, els articles següents estaran al costat esquerre de la pàgina i els articles anteriors al costat dret. Per invertir l'ordre (articles següents al costat dret i articles anteriors al costat esquerre), configura `invert_previous_next_article_links = true`. @@ -503,6 +671,8 @@ Totes aquestes configuracions segueixen la jerarquia. ### Enllaços de retorn a les notes a peu de pàgina +{{ admonition(type="warning", title="ADVERTÈNCIA DE DEPRECACIÓ", text="Zola v0.19.0 i posterior pot fer això de forma nativa. Estableix `bottom_footnotes = true` a la secció `[markdown]` de la teva configuració.") }} + | Pàgina | Secció | `config.toml` | Segueix la jerarquia | Requereix JavaScript | |:------:|:------:|:-------------:|:------------------:|:--------------------:| | ✅ | ✅ | ✅ | ✅ | ✅ | @@ -527,13 +697,21 @@ Establir `copy_button = true` afegirà un petit botó de copiar a la part superi {{ dual_theme_image(light_src="blog/mastering-tabi-settings/img/copy_button_on_code_blocks_light.webp", dark_src="blog/mastering-tabi-settings/img/copy_button_on_code_blocks_dark.webp", alt="Botó de copiar en blocs de codi", full_width=true) }} -### Mostrar ruta/URL en blocs de codi +### Nom del bloc de codi clicable | Pàgina | Secció | `config.toml` | Segueix la jerarquia | Requereix JavaScript | |:------:|:-------:|:-------------:|:---------------:|:-------------------:| | ✅ | ✅ | ✅ | ✅ | ✅ | -Estableix `add_src_to_code_block = true` per habilitar l'ús del [shortcode `add_src_to_code_block`](@/blog/shortcodes/index.ca.md#mostrar-ruta-o-url). +En establir `code_block_name_links = true` s'habiliten els enllaços clicables als noms dels blocs de codi. Consulta la [documentació](@/blog/shortcodes/index.ca.md#mostrar-ruta-o-url) per veure exemples i ús. + +### Forçar blocs de codi d'esquerra a dreta + +| Pàgina | Secció | `config.toml` | Segueix la jerarquia | Requereix JavaScript | +|:------:|:------:|:-------------:|:-----------------:|:--------------------:| +| ✅ | ✅ | ✅ | ✅ | ❌ | + +Per defecte, els blocs de codi es renderitzen d'esquerra a dreta, independentment de la direcció general del text. Estableix `force_codeblock_ltr = false` per permetre que els blocs de codi segueixin la direcció del document. Útil per a idiomes de dreta a esquerra que necessiten blocs de codi de dreta a esquerra. ### Suport per a KaTeX @@ -543,17 +721,31 @@ Estableix `add_src_to_code_block = true` per habilitar l'ús del [shortcode `add KaTeX és una biblioteca JavaScript ràpida i fàcil d'usar per a la representació de matemàtiques TeX a la web. Pots habilitar-ho amb `katex = true`. Mira com es veu en tabi [aquí](/ca/blog/markdown/#katex). +### Suport per a Mermaid + +| Pàgina | Secció | `config.toml` | Segueix la jerarquia | Requereix JavaScript | +|:------:|:------:|:-------------:|:-----------------:|:--------------------:| +| ✅ | ✅ | ✅ | ✅ | ✅ | + +[Mermaid](https://github.com/mermaid-js/mermaid) és una eina de diagramació i gràfics basada en JavaScript. Pots activar-la amb `mermaid = true`. + +Per defecte, la biblioteca Mermaid es serveix localment. Si prefereixes utilitzar un CDN, estableix `serve_local_mermaid = false` a `config.toml`. L'ús d'un CDN servirà la versió més recent de Mermaid; l'opció local servirà la versió inclosa amb tabi. + +Consulta la [documentació de Mermaid](@/blog/shortcodes/index.ca.md#diagrames-de-mermaid) per a instruccions d'ús i exemples. + ### Subconjunt de tipus de lletra personalitzat | Pàgina | Secció | `config.toml` | Segueix la jerarquia | Requereix JavaScript | |:------:|:------:|:-------------:|:------------------:|:--------------------:| | ❌ | ❌ | ✅ | ❌ | ❌ | -Les tipus de lletra personalitzades causen parpalleig del text en Firefox. Per resoldre això, tabi carrega un subconjunt de glifs per a la capçalera. Donat que això (lleugerament) augmenta el temps de càrrega inicial, és una bona idea intentar minimitzar la mida d'aquest subconjunt. +Les tipus de lletra personalitzades causen parpalleig del text en Firefox. Per resoldre això, tabi carrega un subconjunt de glifs per a la capçalera. Donat que això (lleugerament) augmenta el temps de càrrega inicial, és una bona idea intentar minimitzar la mida d'aquest subconjunt, o desactivar-lo completament si no estàs fent servir un tipus de lletra personalitzat al teu tema. Pots crear un subconjunt personalitzat adaptat al teu lloc, guardar-lo com a `static/custom_subset.css`, i fer que es carregui amb `custom_subset = true`. -Per obtenir més informació, incloent instruccions sobre com crear un subconjunt personalitzat, consulta la [documentació](/ca/blog/custom-font-subset/). +Per desactivar el subconjunt, utilitza `enable_subset = false`. + +Per obtenir més informació, incloent instruccions sobre com crear un subconjunt personalitzat, consulta la [documentació](@/blog/custom-font-subset/index.ca.md). ### Contingut complet al feed @@ -569,7 +761,10 @@ Per defecte, el feed Atom només conté el resum o descripció de les teves publ |:----:|:-------:|:-------------:|:-----------------:|:-------------------:| | ✅ | ✅ | ✅ | ✅ | ❌ | -Pots amagar pàgines específiques o seccions senceres del feed amb `hide_from_feed = true`. +Pots controlar com apareix el contingut als feeds utilitzant dues configuracions: + +- `hide_from_feed = true`: Amaga el contingut de tots els feeds (feed principal, feeds de secció i feeds d'etiquetes) +- `hide_from_main_feed = true`: Amaga el contingut només del feed principal mentre el manté visible als feeds de secció i d'etiquetes ### Comentaris {#afegir-comentaris} @@ -583,7 +778,36 @@ Si vols activar els comentaris de forma global, pots fer-ho establint `enabled_f Si has activat un sistema de forma global i vols desactivar-lo per a una pàgina específica, pots fer-ho establint el nom del sistema com a `false` al front matter. Per exemple, `utterances = false`. -Llegeix la [documentació](/ca/blog/comments/) per a més informació sobre els sistemes disponibles i la seva configuració. +Llegeix la [documentació](@/blog/comments/index.ca.md) per a més informació sobre els sistemes disponibles i la seva configuració. + +### Botons d'iine {#iine} + +| Pàgina | Secció | `config.toml` | Segueix la jerarquia | Requereix JavaScript | +|:------:|:------:|:-------------:|:--------------------:|:--------------------:| +| ✅ | ✅ | ✅ | ✅ | ❌ | + +tabi permet botons d'[iine](https://iine.to/) per mostrar apreciació anònima pel teu contingut. Aquests botons centrats en la privadesa funcionen sense JavaScript i no rastegen usuaris. + +Per activar els botons iine globalment: + +```toml +[extra] +iine = true +``` + +Pots personalitzar la icona usada als botons (segueix la jerarquia): + +```toml +[extra] +iine_icon = "thumbs_up" # Opcions: "heart", "thumbs_up", "upvote", o qualsevol emoji +``` + +Per a llocs multilingües, pots unificar els recomptes de likes entre versions en diferents idiomes del mateix contingut (configuració només de config; valor per defecte és `true`): + +```toml +[extra] +iine_unified_languages = true # Els likes a /ca/blog/hello/ compten cap a /blog/hello/ +``` ### Anàlisi web @@ -598,7 +822,7 @@ Pots configurar-los en la secció `[extra.analytics]` del teu arxiu `config.toml - `service`: el servei a utilitzar. Les opcions disponibles són `"goatcounter"`, `"umami", i "plausible"`. - `id`: l'identificador únic per al teu servei d'anàlisi. Això varia segons el servei: - - Per a GoatCounter, és el codi triat durant el registre. Instàncies auto-allotjades no requereixen aquest camp. + - Per a GoatCounter, és el codi triat durant el registre. Instàncies auto-allotjades de GoatCounter no requereixen aquest camp. - Per a Umami, és l'ID del lloc web. - Per a Plausible, és el nom de domini. @@ -607,6 +831,8 @@ Pots configurar-los en la secció `[extra.analytics]` del teu arxiu `config.toml - Per a Umami: `"https://umami.example.com"` - Per a Plausible: `"https://plausible.example.com"` +- `do_not_track`: (només per a Umami) opcional. Quan s'estableix com a `true`, es desactiva el seguiment per als usuaris els navegadors dels quals envien una capçalera "Do Not Track". + Un exemple de configuració per a GoatCounter no auto-allotjada seria: ```toml @@ -646,6 +872,8 @@ Per utilitzar una icona personalitzada, pots afegir-la al directori `static/soci { name = "custom", url = "https://example.com", icon = "custom" } ``` +{{ admonition(type="note", title="NOTA", text="Tots els enllaços a xarxes socials inclouen l'[atribut](https://developer.mozilla.org/docs/Web/HTML/Attributes/rel/me) `rel='me'`. Això ajuda els motors de cerca i serveis web a verificar que les comptes de xarxes socials et pertanyen.") }} + ### Icona de feed | Pàgina | Secció | `config.toml` | Segueix la jerarquia | Requereix JavaScript | @@ -740,12 +968,25 @@ Per defecte, la data es mostra sota el títol de la publicació. Pots amagar-la |:------:|:-------:|:-------------:|:---------------------:|:-------------------:| | ❌ | ❌ | ✅ | ❌ | ❌ | -tabi té dos formats de data: `long_date_format` i `short_date_format`. El format curt s'utilitza a les metadades d'una publicació, mentre que el format llarg s'utilitza al llistar les publicacions (és a dir, a la [secció de blog](/ca/blog/) o a la [pàgina principal](/ca/)). +tabi té tres formats de data: `long_date_format`, `short_date_format` i `archive_data_format`. El format curt s'utilitza a les metadades d'una publicació, mentre que el format llarg s'utilitza al llistar les publicacions (és a dir, a la [secció de blog](/ca/blog/) o a la [pàgina principal](/ca/)). El format d'arxiu s'utilitza per mostrar el dia i el mes a la pàgina d'arxiu. -Per defecte és "6th July 2049" per a ambdós formats en anglès. Per a altres idiomes, el predeterminat és `"%d %B %Y"` per al format llarg i `"%-d %b %Y"` per al format curt. +Per defecte és "6th July 2049" per als formats curt i llarg en anglès. Per a altres idiomes, el predeterminat és `"%d %B %Y"` per al format llarg i `"%-d %b %Y"` per al format curt. El format d'arxiu predeterminat universal és `"%d %b"`. A Zola, la sintaxi per al format de temps està inspirada en strftime. Una referència completa està disponible a la [documentació de chrono](https://docs.rs/chrono/0.4.31/chrono/format/strftime/index.html). +#### Formats de data per idioma + +Pots personalitzar els formats de data per idiomes específics utilitzant la matriu `date_formats` a `config.toml`: + +```toml +date_formats = [ + { lang = "es", long = "%d de %B de %Y", short = "%-d %b %Y", archive = "%d de %b" }, + { lang = "de", long = "%d. %B %Y", short = "%d.%m.%Y", archive = "%d. %b" }, +] +``` + +Això permet que diferents idiomes utilitzin formats de data culturalment apropiats (per exemple, "6. Juli 2049" per a alemany VS "6 de julio de 2049" per a espanyol). + ### Separador personalitzat | Pàgina | Secció | `config.toml` | Segueix la jerarquia | Requereix JavaScript | @@ -806,7 +1047,67 @@ allowed_domains = [ Aquesta opció està habilitada per defecte. Per desactivar-la per una pàgina, secció o globalment, estableix `enable_csp = false`. La configuració de `enable_csp` segueix la jerarquia. -Per a més informació, consulta la [pàgina de documentació de CSP](/ca/blog/security/). +Per a més informació, consulta la [pàgina de documentació de CSP](@/blog/security/index.ca.md). + +--- + +## Indieweb + +### Webmentions + +| Pàgina | Secció | `config.toml` | Segueix jerarquia | Requereix JavaScript | +|:------:|:------:|:-------------:|:-----------------:|:--------------------:| +| ❓ | ❓ | ✅ | ❓ | ✅ | + +Com es descriu en l'estàndard W3C recomanat, [Webmention](https://www.w3.org/TR/webmention/#abstract-p-1) és una manera senzilla de notificar qualsevol URL quan la menciones al teu lloc web. Des de la perspectiva del receptor, és una manera de sol·licitar notificacions quan altres llocs web la mencionen. + +Per a llocs web estàtics, [webmention.io](https://webmention.io/) allotja un punt final de webmention que es pot utilitzar per rebre webmentions. Aquesta funcionalitat recupera les webmentions emmagatzemades a webmention.io i les mostra per a una pàgina. Hauràs de configurar un compte per al teu lloc web a webmention.io. Quan habilitis la funcionalitat de webmention, anunciarà el teu punt final de webmention.io i mostrarà les webmentions per a qualsevol pàgina. + +Habilita les webmentions per al teu lloc web afegint el següent al teu fitxer `config.toml`. + +```toml +[extra.webmentions] +enable = true +# Especifica el domini registrat amb webmention.io. +domain = "www.example.com" +``` + +❓: Per desactivar les webmentions per a una secció o pàgina específica, estableix `webmentions = false` a la secció `[extra]` del front matter d'aquesta secció o pàgina. + +La secció de webmentions es veu així: + +{{ dual_theme_image(light_src="blog/mastering-tabi-settings/img/webmention_light.webp", dark_src="blog/mastering-tabi-settings/img/webmention_dark.webp" alt="Captura de pantalla de webmentions mostrant republications, m'agrada, marcadors i comentaris", full_width=true) }} + +### h-card representativa + +| Pàgina | Secció | `config.toml` | Segueix la jerarquia | Requereix JavaScript | +| :--: | :-----: | :-----------: | :---------------: | :-----------------: | +| ❌ | ❌ | ✅ | ❌ | ❌ | + +Per defecte, tabi afegeix una h-card representativa [h-card](https://microformats.org/wiki/h-card) **oculta** a la pàgina d'inici. Tot i que és invisible per als visitants, està disponible per als analitzadors de microformats. Pots comprovar la validesa de la targeta amb l'eina [Indiewebify.me](https://indiewebify.me/validate-h-card/). + +Per desactivar l'h-card, estableix `enable = false` a la secció `[extra.hcard]` de `config.toml`. + +L'h-card predeterminada inclou el teu nom, l'URL del lloc web i els enllaços a les xarxes socials. + +Pots establir una imatge de perfil i una petita biografia amb els paràmetres `avatar` i `biography`. + +Totes les altres [propietats h-card](https://microformats.org/wiki/h-card#Properties) es poden afegir llistant-les a la secció `[extra.hcard]` del fitxer de configuració. Simplement substitueix tots els caràcters `-` per `_`. + +--- + +## Estenent elements HTML a tabi + +Alguns elements HTML a tabi es poden estendre per admetre casos d'ús addicionals, com ara afegir JavaScript personalitzat per a comportaments a tot el lloc al final de l'etiqueta `` o incloure contingut addicional al final de l'element `` que no estigui suportat per altres configuracions de tabi. + +Consulta la taula a continuació per veure els elements que es poden estendre: + +| Element | Plantilla | +| :------: | :-------------------------------: | +| `` | `templates/tabi/extend_head.html` | +| `` | `templates/tabi/extend_body.html` | + +No hi ha configuracions explícites que hagis d'establir per al teu lloc o pàgines. Simplement crea el fitxer de plantilla corresponent per al teu lloc, i tabi l'inclourà automàticament. --- diff --git a/content/blog/mastering-tabi-settings/index.es.md b/content/blog/mastering-tabi-settings/index.es.md index ba4b60b..ba259fe 100644 --- a/content/blog/mastering-tabi-settings/index.es.md +++ b/content/blog/mastering-tabi-settings/index.es.md @@ -1,14 +1,14 @@ +++ title = "Domina la configuración de tabi: guía completa" date = 2023-09-18 -updated = 2024-06-22 +updated = 2025-08-07 description = "Descubre las múltiples maneras en que puedes personalizar tabi." [taxonomies] tags = ["funcionalidad", "tutorial", "preguntas frecuentes"] [extra] -footnote_backlinks = true +pinned = true quick_navigation_buttons = true social_media_card = "social_cards/es_blog_mastering_tabi_settings.jpg" +++ @@ -26,11 +26,12 @@ tabi tiene una jerarquía que te permite personalizar tu sitio en diferentes niv 1. **Configuraciones globales**: Estas son las configuraciones que se aplican a todo tu sitio. Se establecen en `config.toml`. 2. **Configuraciones de sección**: Estas son las configuraciones que se aplican a una sección de tu sitio (por ejemplo, `/blog` o `/projects`). Se establecen en la metainformación del archivo `_index.md` de la sección. -3. **Configuraciones de página**: Estas son las configuraciones que se aplican a una sola página. Se establecen en la metainformación de la página. +3. **Configuración de la página «padre»**: Para páginas anidadas (páginas dentro de páginas), estas son las configuraciones de la página que las contiene. +4. **Configuraciones de página**: Estas son las configuraciones que se aplican a una sola página. Se establecen en la metainformación de la página. En todos los casos, las opciones de tabi se establecen en la sección `[extra]`. -Para las configuraciones que siguen esta jerarquía, el valor establecido en una página reemplaza el valor de una sección, que a su vez reemplaza el valor global. En resumen: cuanto más específica sea la configuración, mayor prioridad tendrá, o `página > sección > config.toml`. +Para las configuraciones que siguen esta jerarquía, el valor establecido en una página reemplaza el valor de una sección, que a su vez reemplaza el valor global. En resumen: cuanto más específica sea la configuración, mayor prioridad tendrá, o `página > página padre/sección > config.toml`. --- @@ -87,7 +88,7 @@ Para detalles técnicos sobre la implementación de la búsqueda en tabi, incluy ## Soporte multilingüe -tabi ofrece soporte multilingüe completo para tu sitio Zola, desde configurar un idioma predeterminado hasta añadir todos los que desees. Consulta la [preguntas frecuentes sobre idiomas](/es/blog/faq-languages/) para más información. +tabi ofrece soporte multilingüe completo para tu sitio Zola, desde configurar un idioma predeterminado hasta añadir todos los que desees. Consulta la [preguntas frecuentes sobre idiomas](@/blog/faq-languages/index.es.md) para más información. --- @@ -110,37 +111,77 @@ header = {title = "¡Hola! Soy tabi~", img = "blog/mastering-tabi-settings/img/m La descripción es contenido Markdown normal, escrito fuera del front matter. -#### Mostrando publicaciones recientes +#### Listando publicaciones recientes -Si deseas mostrar publicaciones en la página principal, primero necesitas decidir si su ruta será `/` o algo como `/blog`. +Para mostrar publicaciones en la página principal, primero debes decidir de dónde se servirán: de la ruta raíz (`/`) o de un subdirectorio (por ejemplo, `/blog`). -Si quieres servir las publicaciones desde `/`, necesitas configurar `paginate_by = 5` en el front matter de tu archivo `_index.md`. **Nota**: esto no se configura en el apartado `[extra]`, sino en el front matter principal. Ejemplo: +**Opción A: Servir publicaciones desde la ruta raíz (`/`)** + +Configura `paginate_by` en el front matter de tu archivo `content/_index.md`: ```toml +title = "Últimas publicaciones" sort_by = "date" -template = "section.html" -paginate_by = 5 +paginate_by = 5 # Muestra 5 publicaciones por página. [extra] -header = {title = "¡Hola! Soy tabi~", img = "img/main.webp", img_alt = "Óscar Fernández, el autor del tema" } +header = {title = "¡Hola! Soy tabi~", img = "img/main.webp", img_alt = "Tu nombre" } ``` -Si prefieres servir las publicaciones desde `/blog`, puedes configurar `section_path = "/blog"` en la sección `[extra]`. Esta es la configuración de esta demo: +{{ admonition(type="note", text="La configuración `paginate_by` va en el front matter principal, no en la sección `[extra]`.") }} + +**Opción B: Servir publicaciones desde un subdirectorio (por ejemplo, `/blog`)** + +Utiliza `section_path` en la sección `[extra]` de tu archivo `content/_index.md`: ```toml -title = "Publicaciones recientes" +title = "Últimas publicaciones" sort_by = "date" -template = "section.html" +# No configures `paginate_by` aquí. [extra] -header = {title = "¡Hola! Soy tabi~", img = "img/main.webp", img_alt = "Óscar Fernández, el autor del tema" } -section_path = "blog/_index.es.md" -max_posts = 4 +header = {title = "¡Hola! Soy tabi~", img = "img/main.webp", img_alt = "Tu nombre" } +section_path = "blog/_index.md" # Dónde encontrar tus publicaciones. +max_posts = 5 # Muestra hasta 5 publicaciones en la página principal. ``` -Fíjate que si configuras `section_path`, no necesitas configurar `paginate_by`. Puedes establecer `max_posts` para determinar el número de publicaciones que deseas mostrar en la página principal. +{{ admonition(type="warning", title="ALERTA", text="No configures `paginate_by` y `section_path` a la vez. Estas configuraciones son mutuamente excluyentes y usarlas juntas puede resultar en que no se muestren publicaciones.") }} -El `title` es el encabezado que aparece sobre las publicaciones. +Notas adicionales: + +- El `title` en el front matter establece el título que aparece sobre las publicaciones. +- Usa la ruta completa al archivo `_index.md` de la sección para `section_path`. Usar `section_path = "blog/"` no funcionará. + +##### Fijar publicaciones + +Puedes fijar publicaciones para mantenerlas en la parte superior de la página principal. En esta demo, esta publicación está fijada, por lo que aparece primera con un icono y etiqueta de "fijada": + +{{ dual_theme_image(light_src="blog/mastering-tabi-settings/img/pinned_post_light.webp", dark_src="blog/mastering-tabi-settings/img/pinned_post_dark.webp", alt="Entrada fijada", full_width=true) }} + +Las publicaciones fijadas se muestran primero, manteniendo su orden relativo según el `sort_by` de la sección, seguidas por el resto de las publicaciones. + +Para fijar una publicación, añade lo siguiente a su front matter: + +```toml +[extra] +pinned = true +``` + +{{ admonition(type="info", text="Este ajuste solo afecta a las páginas principales del sitio (como `/`, `/es/`, `/fr/`). Otras secciones como `blog/`, `tags/` o `archive/` muestran las publicaciones en su orden habitual.") }} + +{{ admonition(type="warning", text='Cuando se utiliza la paginación (`paginate_by`), las publicaciones destacadas pueden aparecer dos veces: una vez en la parte superior de la primera página, y otra en su posición cronológica normal en páginas posteriores.') }} + +##### Mostrar la fecha de los artículos en el listado + +Por defecto, cuando se listan los artículos, se muestra la fecha de creación. Puedes configurar qué fecha(s) mostrar usando la opción `post_listing_date`. Configuraciones disponibles: + +- `date`: Muestra solo la fecha de publicación original del artículo (opción por defecto). +- `updated`: Muestra solo la fecha de la última actualización del artículo. Si no hay fecha de actualización, muestra la fecha de publicación original. +- `both`: Muestra tanto la fecha de publicación original como la fecha de la última actualización. + +{% admonition(type="tip") %} +Esta configuración sigue la jerarquía: puedes establecer un valor global en `config.toml` o configurarlo para secciones específicas en su archivo `_index.md`. En ambos casos, añádelo a la sección `[extra]`. +{% end %} #### Listado de proyectos @@ -183,7 +224,38 @@ Las pieles de tabi cambian el color principal del sitio. Puedes configurar la pi {{ image_toggler(default_src="blog/customise-tabi/skins/lavender_light.webp", toggled_src="blog/customise-tabi/skins/lavender_dark.webp", default_alt="piel lavender en modo claro", toggled_alt="piel lavender en modo oscuro", full_width=true) }} -Explora las pieles disponibles y aprende cómo crear la tuya propia consultando [la documentación](/es/blog/customise-tabi/#skins). +Explora las pieles disponibles y aprende cómo crear la tuya propia consultando [la documentación](@/blog/customise-tabi/index.es.md#skins). + +### Fuente sans serif (paloseco) + +| Página | Sección | `config.toml` | Sigue la jerarquía | Requiere JavaScript | +|:------:|:-------:|:-------------:|:---------------:|:-------------------:| +| ❌ | ❌ | ✅ | ❌ | ❌ | + +tabi utiliza una fuente serif para los párrafos de los artículos (la que estás viendo ahora). Puedes cambiar a una fuente sans serif (la que ves en los encabezados/menú) en todo tu sitio configurando `override_serif_with_sans = true` en `config.toml`. + +Haz clic en la imagen para comparar las fuentes: + +{{ image_toggler(default_src="blog/mastering-tabi-settings/img/serif.webp", toggled_src="blog/mastering-tabi-settings/img/sans-serif.webp", default_alt="Fuente serif", toggled_alt="Fuente sans-serif", full_width=true) }} + +### Indicador de enlaces externos + +| Página | Sección | `config.toml` | Sigue Jerarquía | Requiere JavaScript | +|:------:|:-------:|:-------------:|:----------------:|:------------------:| +| ❌ | ❌ | ✅ | ❌ | ❌ | + +{{ admonition(type="info", text="Requiere Zola 0.20.0 o posterior.") }} + +Si deseas añadir un icono a los enlaces externos, configura la sección `[markdown]` (no `[extra]`) en tu `config.toml`: + +```toml +[markdown] +external_links_class = "external" +``` + +Esto añadirá un pequeño icono junto a los enlaces externos: + +{{ dual_theme_image(light_src="blog/mastering-tabi-settings/img/external_link_light.webp", dark_src="blog/mastering-tabi-settings/img/external_link_dark.webp", alt="Icono de enlace externo", full_width=true) }} ### Estilos CSS personalizados @@ -225,6 +297,43 @@ Establecer `compact_tags = true` mostrará las mismas de este modo: [NombreEtiqueta](#) n +### Orden de las etiquetas + +| Página | Sección | `config.toml` | Sigue la jerarquía | Requiere JavaScript | +|:------:|:-------:|:-------------:|:---------------:|:-------------------:| +| ❌ | ❌ | ✅ | ❌ | ❌ | + +Por defecto, la [página de etiquetas](/es/tags) ordena las etiquetas alfabéticamente, dada la configuración predeterminada de `tag_sorting = "name"`. +Si configuras `tag_sorting = "frequency"`, se ordenarán según el número de publicaciones (de mayor a menor). + +--- + +## Series + +Para una explicación detallada, consulta la [documentación de series](@/blog/series/index.es.md). + +### Enlace para saltar a las publicaciones + +| Página | Sección | `config.toml` | Sigue jerarquía | Requiere JavaScript | +|:------:|:-------:|:-------------:|:------------------:|:-------------------:| +| ❌ | ✅ | ✅ | ✅ | ❌ | + +Por defecto, aparece automáticamente un enlace "Saltar a publicaciones" junto al título de la serie cuando una serie tiene un contenido de más de 2000 caracteres: + +{{ dual_theme_image(light_src="blog/series/img/jump_to_series_posts_light.webp", dark_src="blog/series/img/jump_to_series_posts_dark.webp" alt="enlace para saltar a las publicaciones de la serie", full_width=true) }} + +Establece `show_jump_to_posts = true` para forzar la activación de la función y `show_jump_to_posts = false` para desactivarla. + +### Indexación de páginas de series + +| Página | Sección | `config.toml` | Sigue la jerarquía | Requiere JavaScript | +|:------:|:-------:|:-------------:|:------------------:|:-------------------:| +| ❌ | ✅ | ✅ | ✅ | ❌ | + +Por defecto, las páginas de series se indexan (usando una indexación basada en 1) según el `sort_by` de la sección de series. + +Establece `post_listing_index_reversed = true` para invertir el índice. + --- ## Integración con repositorios Git @@ -285,7 +394,7 @@ quick_navigation_buttons = true - `show_reading_time = false` oculta el tiempo estimado de lectura. - `quick_navigation_buttons = true` muestra los botones de navegación rápida. -Junto al archivo `_index.md`, puedes crear un archivo para cada proyecto. Por ejemplo, este es el bloque de metadatos para la página del proyecto [tabi](/es/projects/tabi/): +Junto al archivo `_index.md`, puedes crear un archivo para cada proyecto. Por ejemplo, este es el bloque de metadatos para la página del proyecto [tabi](@/projects/tabi/index.es.md): ```toml title = "tabi" @@ -305,6 +414,33 @@ Cuando un usuario haga clic en la imagen o el título de un proyecto, será llev La página del proyecto individual se renderiza con la plantilla predeterminada, a menos que establezcas otra, por ejemplo, `template = "info-page.html"`. +#### Filtrar proyectos + +Si agregas etiquetas a tus proyectos, verás un filtro de etiquetas: + +{{ dual_theme_image(light_src="blog/mastering-tabi-settings/img/projects_tag_filter_light.webp", dark_src="blog/mastering-tabi-settings/img/projects_tag_filter_dark.webp", alt="Página de proyectos con filtro de etiquetas", full_width=true) }} + +El sistema de filtrado de etiquetas utiliza mejora progresiva: + +- Sin JavaScript: Las etiquetas enlazan directamente a páginas de etiquetas dedicadas (por ejemplo, `/tags/nombre-etiqueta`). +- Con JavaScript: Filtrado instantáneo, sincronización de URL (#nombre-etiqueta) y navegación por teclado. + +Para desactivar esta función, establece `enable_cards_tag_filtering = false` en la sección `[extra]` del archivo `projects/_index.md` o en `config.toml`. + +{% admonition(type="tip") %} + +Para filtrar proyectos por etiquetas, necesitas establecer etiquetas en el front matter de cada proyecto. Por ejemplo: + +```toml +title = "nombre del proyecto" +weight = 40 + +[taxonomies] +tags = ["etiqueta uno", "etiqueta 2", "tercera etiqueta"] +``` + +{% end %} + ### Archivo Agregar una página de archivo es similar a agregar una página de proyectos. Puedes crear un directorio en `content/archive/`. Allí, puedes crear un archivo `_index.md` con el siguiente encabezado: @@ -325,7 +461,14 @@ Por defecto, el archivo mostrará las publicaciones ubicadas en `blog/`. Para pe section_path = ["blog/", "notas/", "ruta-tres/"] ``` -**Nota**: la página de Archivo sólo listará publicaciones con fecha. +El archivo muestra las publicaciones en orden cronológico inverso (las más recientes primero). Puedes invertir este orden estableciendo `archive_reverse = true` en la sección `[extra]`: + +```toml +[extra] +archive_reverse = true # muestra las publicaciones más antiguas primero +``` + +{{ admonition(type="note", title="nota" text="La página de Archivo sólo listará publicaciones que tengan fecha en su encabezado.") }} ### Etiquetas @@ -374,6 +517,17 @@ path = "about" Fíjate cómo se establece `path = "about"`. Zola colocará la página en `$base_url/about/`. Si deseas que la página esté disponible en `/contacto/`, tendrías que establecer `path = "contacto"`. +La plantilla `info-page.html` también se puede utilizar para crear lading pages en la ruta raíz (`"/"`). Para hacerlo, el archivo `content/_index.md` debería verse así: + +```markdown ++++ +title = "Título de la página" +template = "info-page.html" ++++ + +Contenido con Markdown. +``` + --- ## SEO @@ -422,7 +576,7 @@ Por ejemplo, si configuras `base_canonical_url = "https://example.com"`, la URL Las tarjetas para redes sociales son las imágenes que se muestran cuando compartes un enlace en redes sociales: -![Una captura de pantalla de WhatsApp mostrando un enlace con una tarjeta para redes sociales](/blog/mastering-tabi-settings/img/with_social_media_card.webp) +{{ dimmable_image(src="img/with_social_media_card.webp", alt="Una captura de pantalla de WhatsApp mostrando un enlace con una tarjeta para redes sociales") }} Puedes establecer la imagen para redes sociales con `social_media_card = "img/social_media_card.png"`. @@ -436,7 +590,19 @@ Si ambas rutas, relativa y absoluta, son válidas, la ruta relativa tendrá prio Dado que sigue la [jerarquía](#jerarquia-de-configuracion), si no está configurado en una página, pero sí lo está en una sección, se utilizará la imagen de la sección. Si no está configurado en una página o sección, pero sí en `config.toml`, se usará la imagen global. -**Consejo**: automatiza su creación con un [script](https://github.com/welpo/osc.garden/blob/main/static/code/social-cards-zola): [De reservado a rey de las redes: automatizando las vistas previas de los enlaces con Zola](https://osc.garden/es/blog/automating-social-media-cards-zola/). +{{ admonition(type="tip", title="CONSEJO", text="Automatiza su creación con un [script](https://github.com/welpo/osc.garden/blob/main/static/code/social-cards-zola): [Automatizando las vistas previas de los enlaces con Zola](https://osc.garden/es/blog/automating-social-media-cards-zola/).") }} + +### Creador del fediverso + +| Página | Sección | `config.toml` | Sigue jerarquía | Requiere JavaScript | +|:------:|:-------:|:-------------:|:----------------:|:-------------------:| +| ❌ | ❌ | ✅ | ❌ | ❌ | + +Puedes mostrar tu perfil del fediverso en las vistas previas de enlaces de Mastodon configurando la variable `fediverse_creator` en tu `config.toml`. Por ejemplo, para @username@example.com, usa: + +```toml +fediverse_creator = { handle = "username", domain = "example.com" } +``` --- @@ -448,7 +614,9 @@ Dado que sigue la [jerarquía](#jerarquia-de-configuracion), si no está configu |:------:|:-------:|:-------------:|:---------------:|:-------------------:| | ❌ | ❌ | ✅ | ❌ | ❌ | -La barra de navegación es la barra en la parte superior de la página que contiene el título del sitio y el menú de navegación. Puedes personalizar los elementos que aparecen configurando `menu` en `config.toml`. Por ejemplo: +La barra de navegación es la barra en la parte superior de la página que contiene el título del sitio y el menú de navegación. Puedes personalizar los elementos que aparecen configurando `menu` en `config.toml`. + +Soporta links relativos para páginas internas y links absolutos para enlaces externos. Por ejemplo: ```toml menu = [ @@ -457,6 +625,7 @@ menu = [ { name = "etiquetas", url = "tags", trailing_slash = true }, { name = "proyectos", url = "projects", trailing_slash = true }, { name = "acerca de", url = "about", trailing_slash = true }, + { name = "github", url = "https://github.com/welpo/tabi", trailing_slash = false }, ] ``` @@ -480,7 +649,7 @@ Para activarlos, establece `quick_navigation_buttons = true`. Habilita el índice de contenidos justo debajo del título y metadatos del artículo con `toc = true`. -Para saber más sobre cómo personalizarlo, consulta [la documentación sobre la Tabla de contenido](/es/blog/toc/). +Para saber más sobre cómo personalizarlo, consulta [la documentación sobre la Tabla de contenido](@/blog/toc/index.es.md). ### Enlace a los artículos anterior y siguiente @@ -492,7 +661,7 @@ Muestra enlaces a los artículos anterior y siguiente en la parte inferior de lo {{ dual_theme_image(light_src="blog/mastering-tabi-settings/img/show_previous_next_article_links_light.webp", dark_src="blog/mastering-tabi-settings/img/show_previous_next_article_links_dark.webp", alt="Enlaces a los artículos anterior y siguiente", full_width=true) }} -Para activar esta función, configura `show_previous_next_article_links = true`. +Para activar esta función, configura `show_previous_next_article_links = true` y asegúrate de que tu sección tiene `sort_by` (por ejemplo, `sort_by = "date"`). Por defecto, los artículos siguientes estarán en el lado izquierdo de la página y los artículos anteriores en el lado derecho. Para invertir el orden (artículos siguientes en el lado derecho y artículos anteriores en el lado izquierdo), establece `invert_previous_next_article_links = true`. @@ -503,6 +672,8 @@ Todas estas configuraciones siguen la jerarquía. ### Enlaces de retorno en notas al pie +{{ admonition(type="warning", title="ADVERTENCIA DE DEPRECACIÓN", text="Zola v0.19.0 y posterior puede hacer esto de forma nativa. Establece `bottom_footnotes = true` en la sección `[markdown]` de tu configuración.") }} + | Página | Sección | `config.toml` | Sigue la jerarquía | Requiere JavaScript | |:------:|:-------:|:-------------:|:---------------:|:-------------------:| | ✅ | ✅ | ✅ | ✅ | ✅ | @@ -527,13 +698,21 @@ Establecer `copy_button = true` añadirá un pequeño botón de copiar en la par {{ dual_theme_image(light_src="blog/mastering-tabi-settings/img/copy_button_on_code_blocks_light.webp", dark_src="blog/mastering-tabi-settings/img/copy_button_on_code_blocks_dark.webp", alt="Botón de copiar en bloques de código", full_width=true) }} -### Mostrar ruta/URL en bloques de código +### Nombres de bloques de código clicables | Página | Sección | `config.toml` | Sigue la jerarquía | Requiere JavaScript | |:------:|:-------:|:-------------:|:---------------:|:-------------------:| | ✅ | ✅ | ✅ | ✅ | ✅ | -Establece `add_src_to_code_block = true` para habilitar el uso del [shortcode `add_src_to_code_block`](@/blog/shortcodes/index.es.md#mostrar-ruta-o-url). +Establece `code_block_name_links = true` para habilitan los enlaces clickables en los nombres de bloques de código. Consulta la [documentación](@/blog/shortcodes/index.es.md#mostrar-ruta-o-url) para ver ejemplos y uso. + +### Forzar bloques de código de izquierda a derecha + +| Página | Sección | `config.toml` | Sigue la jerarquía | Requiere JavaScript | +|:------:|:-------:|:-------------:|:----------------:|:-------------------:| +| ✅ | ✅ | ✅ | ✅ | ❌ | + +Por defecto, los bloques de código se renderizan de izquierda a derecha, independientemente de la dirección general del texto. Establece `force_codeblock_ltr = false` para permitir que los bloques de código sigan la dirección del documento. Útil para idiomas de derecha a izquierda que necesitan bloques de código de derecha a izquierda. ### Soporte para KaTeX @@ -543,17 +722,31 @@ Establece `add_src_to_code_block = true` para habilitar el uso del [shortcode `a KaTeX es una biblioteca JavaScript rápida y fácil de usar para la representación de matemáticas TeX en la web. Puedes habilitarlo con `katex = true`. Mira cómo se ve en tabi [aquí](/es/blog/markdown/#katex). +### Soporte para Mermaid + +| Página | Sección | `config.toml` | Sigue la jerarquía | Requiere JavaScript | +|:------:|:-------:|:-------------:|:----------------:|:-------------------:| +| ✅ | ✅ | ✅ | ✅ | ✅ | + +[Mermaid](https://github.com/mermaid-js/mermaid) es una herramienta de diagramación y gráficos basada en JavaScript. Puedes activarla con `mermaid = true`. + +Por defecto, la biblioteca Mermaid se sirve localmente. Si prefieres usar un CDN, establece `serve_local_mermaid = false` en `config.toml`. El uso de un CDN servirá la versión más reciente de Mermaid; la opción local servirá la versión incluida con tabi. + +Consulta la [documentación de Mermaid](@/blog/shortcodes/index.es.md#diagramas-de-mermaid) para instrucciones de uso y ejemplos. + ### Subconjunto de fuente personalizada | Página | Sección | `config.toml` | Sigue la jerarquía | Requiere JavaScript | |:------:|:-------:|:-------------:|:---------------:|:-------------------:| | ❌ | ❌ | ✅ | ❌ | ❌ | -Las fuentes personalizadas causan parpadeo del texto en Firefox. Para solucionar esto, tabi carga un subconjunto de glifos para el encabezado. Dado que esto (ligeramente) aumenta el tiempo de carga inicial, es una buena idea intentar minimizar el tamaño de este subconjunto. +Las fuentes personalizadas causan parpadeo del texto en Firefox. Para solucionar esto, tabi carga un subconjunto de glifos para el encabezado. Dado que esto (ligeramente) aumenta el tiempo de carga inicial, es una buena idea intentar minimizar el tamaño de este subconjunto, o desactivarlo por completo si no estás usando una fuente personalizada en tu tema. Puedes crear un subconjunto personalizado adaptado a tu sitio, guardarlo como `static/custom_subset.css`, y hacer que se cargue con `custom_subset = true`. -Para obtener más información, incluyendo instrucciones sobre cómo crear un subconjunto personalizado, consulta la [documentación](/es/blog/custom-font-subset/). +Para desactivar el subconjunto, puedes usar `enable_subset = false`. + +Para obtener más información, incluyendo instrucciones sobre cómo crear un subconjunto personalizado, consulta la [documentación](@/blog/custom-font-subset/index.es.md). ### Contenido completo en el feed @@ -569,7 +762,10 @@ Por defecto, el feed Atom solo contiene el resumen/descripción de tus publicaci |:----:|:-------:|:-------------:|:-----------------:|:-------------------:| | ✅ | ✅ | ✅ | ✅ | ❌ | -Puedes ocultar páginas específicas o secciones enteras del feed con `hide_from_feed = true`. +Puedes controlar cómo aparece el contenido en los feeds usando dos configuraciones: + +- `hide_from_feed = true`: Oculta el contenido de todos los feeds (feed principal, feeds de sección y feeds de etiquetas) +- `hide_from_main_feed = true`: Oculta el contenido solo del feed principal mientras lo mantiene visible en los feeds de sección y de etiquetas ### Comentarios {#añadir-comentarios} @@ -583,7 +779,38 @@ Si quieres activar los comentarios de forma global, puedes hacerlo estableciendo Si has activado un sistema globalmente, pero quieres desactivarlo en una página específica, puedes hacerlo estableciendo el nombre del sistema como `false` en el front matter. Por ejemplo, `utterances = false`. -Lee la [documentación](/es/blog/comments/) para obtener más información sobre los sistemas disponibles y su configuración. +Lee la [documentación](@/blog/comments/index.es.md) para obtener más información sobre los sistemas disponibles y su configuración. + +### Botones de iine {#iine} + +| Página | Sección | `config.toml` | Sigue la jerarquía | Requiere JavaScript | +|:------:|:-------:|:-------------:|:-------------------:|:-------------------:| +| ✅ | ✅ | ✅ | ✅ | ❌ | + +tabi soporta botones de [iine](https://iine.to/) para mostrar apreciación anónima por tu contenido. Estos botones centrados en la privacidad funcionan sin JavaScript y no rastrean usuarios. + +Para activar los botones iine globalmente: + +```toml +[extra] +iine = true +``` + +Puedes personalizar el icono usado en los botones (esta configuración sigue la jerarquía): + +```toml +[extra] +iine_icon = "thumbs_up" # Opciones: "heart", "thumbs_up", "upvote", o cualquier emoji +``` + +Para sitios multilingües, puedes unificar los conteos de likes entre versiones en diferentes idiomas del mismo contenido (configuración solo de config; valor predeterminado: `true`): + +```toml +[extra] +iine_unified_languages = true # Los likes en /es/blog/hello/ cuentan hacia /blog/hello/ +``` + +También puedes activar los botones iine en páginas o secciones individuales estableciendo `iine = true` en su front matter, o personalizar el icono con `iine_icon = "🚀"`. ### Análisis web @@ -598,7 +825,7 @@ Puedes configurarlos en la sección `[extra.analytics]` de tu archivo `config.to - `service`: el servicio a utilizar. Las opciones disponibles son `"goatcounter"`, `"umami"`, y `"plausible"`. - `id`: el identificador único para tu servicio de análisis. Esto varía según el servicio: - - Para GoatCounter, es el código elegido durante el registro. Instancias auto-alojadas no requieren este campo. + - Para GoatCounter, es el código elegido durante el registro. Instancias auto-alojadas de GoatCounter no requieren este campo. - Para Umami, es la ID del sitio web. - Para Plausible, es el nombre de dominio. @@ -607,6 +834,8 @@ Puedes configurarlos en la sección `[extra.analytics]` de tu archivo `config.to - Para Umami: `"https://umami.example.com"` - Para Plausible: `"https://plausible.example.com"` +- `do_not_track`: (sólo para Umami) opcional. Cuando se establece en `true`, se desactiva el seguimiento para los usuarios cuyos navegadores envían un encabezado "Do Not Track". + Un ejemplo de configuración para GoatCounter no auto-alojada sería: ```toml @@ -648,6 +877,8 @@ Para usar un icono personalizado, puedes añadirlo al directorio `static/social_ { name = "custom", url = "https://example.com", icon = "custom" } ``` +{{ admonition(type="note", title="NOTA", text="Todos los enlaces sociales incluyen el [atributo](https://developer.mozilla.org/docs/Web/HTML/Attributes/rel/me) `rel='me'`. Esto ayuda a los motores de búsqueda y servicios web a verificar que las cuentas de redes sociales te pertenecen.") }} + ### Icono de feed | Página | Sección | `config.toml` | Respeta jerarquía | Requiere JavaScript | @@ -742,12 +973,25 @@ Por defecto, la fecha se muestra debajo del título de la publicación. Puedes o |:------:|:-------:|:-------------:|:------------------:|:-------------------:| | ❌ | ❌ | ✅ | ❌ | ❌ | -tabi tiene dos formatos de fecha: `long_date_format` y `short_date_format`. El formato corto se utiliza en los metadatos de una publicación, mientras que el formato largo se utiliza al listar las publicaciones (es decir, en la [sección de blog](/es/blog/) o en la [página principal](/es/)). +tabi tiene tres formatos de fecha: `long_date_format`, `short_date_format` y `archive_date_format`. El formato corto se utiliza en los metadatos de una publicación, mientras que el formato largo se utiliza al listar las publicaciones (es decir, en la [sección de blog](/es/blog/) o en la [página principal](/es/)). El formato de archivo se usa para mostrar el día y el mes en la página de archivo. -Por defecto es "6th July 2049" para ambos formatos en inglés. Para otros idiomas, el predeterminado es `"%d %B %Y"` para el formato largo y `"%-d %b %Y"` para el formato corto. +Por defecto es "6th July 2049" para los formatos corto y largo en inglés. Para otros idiomas, el predeterminado es `"%d %B %Y"` para el formato largo y `"%-d %b %Y"` para el formato corto. El formato de archivo predeterminado universal es `"%d %b"`. En Zola, la sintaxis para el formateo de tiempo está inspirada en strftime. Una referencia completa está disponible en la [documentación de chrono](https://docs.rs/chrono/0.4.31/chrono/format/strftime/index.html). +#### Formatos de fecha por idioma + +Puedes personalizar los formatos de fecha para idiomas específicos usando la matriz `date_formats` en `config.toml`: + +```toml +date_formats = [ + { lang = "es", long = "%d de %B de %Y", short = "%-d %b %Y", archive = "%d de %b" }, + { lang = "de", long = "%d. %B %Y", short = "%d.%m.%Y", archive = "%d. %b" }, +] +``` + +Esto permite que diferentes idiomas usen formatos de fecha culturalmente apropiados (por ejemplo, "6 de julio de 2049" en español o "6. Juli 2049" en alemán). + ### Separador personalizado | Página | Sección | `config.toml` | Sigue la jerarquía | Requiere JavaScript | @@ -806,7 +1050,67 @@ allowed_domains = [ Esta función está habilitada por defecto. Para deshabilitarla (y permitir todo), configura `enable_csp = false` en una página, sección o globalmente. La opción `enable_csp` sigue [la jerarquía](#jerarquia-de-configuracion). -Para obtener más información, consulta la [página de documentación de CSP](/es/blog/security/). +Para obtener más información, consulta la [página de documentación de CSP](@/blog/security/index.es.md). + +--- + +## Indieweb + +### Webmentions + +| Página | Sección | `config.toml` | Sigue la jerarquía | Requiere JavaScript | +|:------:|:-------:|:-------------:|:---------------:|:-------------------:| +| ❓ | ❓ | ✅ | ❓ | ✅ | + +Como se describe en el estándar W3C recomendado, [Webmention](https://www.w3.org/TR/webmention/#abstract-p-1) es una manera sencilla de notificar cualquier URL cuando la mencionas en tu sitio web. Desde la perspectiva del receptor, es una forma de solicitar notificaciones cuando otros sitios web la mencionan. + +Para sitios web estáticos, [webmention.io](https://webmention.io/) aloja un punto final de webmention que se puede utilizar para recibir webmentions. Esta función recupera las webmentions almacenadas en webmention.io y las muestra para una página. Necesitarás configurar una cuenta para tu sitio web en webmention.io. Cuando habilites la función, anunciará tu punto final de webmention.io y mostrará las webmentions para cualquier página. + +Habilita las webmentions para tu sitio web agregando lo siguiente a tu archivo `config.toml`. + +```toml +[extra.webmentions] +enable = true +# Especifica el dominio registrado con webmention.io. +domain = "www.example.com" +``` + +❓: Para desactivar las webmentions para una sección o página específica, establece `webmentions = false` en la sección `[extra]` del front matter de esa sección o página. + +La sección de webmentions se ve así: + +{{ dual_theme_image(light_src="blog/mastering-tabi-settings/img/webmention_light.webp", dark_src="blog/mastering-tabi-settings/img/webmention_dark.webp" alt="Captura de pantalla de webmentions mostrando reposts, me gusta, marcadores y comentarios", full_width=true) }} + +### h-card representativa + +| Página | Sección | `config.toml` | Sigue Jerarquía | Requiere JavaScript | +| :--: | :-----: | :-----------: | :---------------: | :-----------------: | +| ❌ | ❌ | ✅ | ❌ | ❌ | + +Por defecto, tabi añade una [h-card](https://microformats.org/wiki/h-card) representativa **oculta** a la página de inicio. Aunque es invisible para los visitantes, está disponible para los analizadores de microformatos. Puedes comprobar la validez de la tarjeta con la herramienta [Indiewebify.me](https://indiewebify.me/validate-h-card/). + +Para desactivar la h-card, establece `enable = false` en la sección `[extra.hcard]` de `config.toml`. + +La h-card predeterminada incluye tu nombre, la URL del sitio web y los enlaces a redes sociales. + +Puedes establecer una imagen de perfil y una pequeña biografía con los ajustes `avatar` y `biography`. + +Todas las demás [propiedades de h-card](https://microformats.org/wiki/h-card#Properties) se pueden añadir listándolas en la sección `[extra.hcard]` del archivo de configuración. Simplemente reemplaza todos los caracteres `-` por `_`. + +--- + +## Extendiendo elementos HTML en tabi + +Algunos elementos HTML en tabi pueden extenderse para admitir casos de uso adicionales, como agregar JavaScript personalizado para comportamientos en todo el sitio al final de la etiqueta `` o incluir contenido adicional al final del elemento `` que no esté soportado por otras configuraciones de tabi. + +Consulta la tabla a continuación para ver los elementos que pueden extenderse: + +| Elemento | Plantilla | +| :------: | :-------------------------------: | +| `` | `templates/tabi/extend_head.html` | +| `` | `templates/tabi/extend_body.html` | + +No hay configuraciones explícitas que debas establecer para tu sitio o páginas. Simplemente crea el archivo de plantilla correspondiente para tu sitio, y tabi lo incluirá automáticamente. --- diff --git a/content/blog/mastering-tabi-settings/index.md b/content/blog/mastering-tabi-settings/index.md index a3ba80e..68e399a 100644 --- a/content/blog/mastering-tabi-settings/index.md +++ b/content/blog/mastering-tabi-settings/index.md @@ -1,14 +1,14 @@ +++ title = "Mastering tabi Settings: A Comprehensive Guide" date = 2023-09-18 -updated = 2024-06-22 +updated = 2025-08-07 description = "Discover the many ways you can customise your tabi site." [taxonomies] tags = ["showcase", "tutorial", "FAQ"] [extra] -footnote_backlinks = true +pinned = true quick_navigation_buttons = true social_media_card = "social_cards/blog_mastering_tabi_settings.jpg" +++ @@ -26,11 +26,12 @@ tabi has a hierarchy that allows you to customise your site at different levels. 1. **Global settings**: These are the settings that apply to your entire site. They are set in `config.toml`. 2. **Section settings**: These are the settings that apply to a section of your site (e.g.`/blog` or `/projects`). They are set in the front matter of the `_index.md` file of the section. -3. **Page settings**: These are the settings that apply to a single page. They are set in the front matter of the page. +3. **Parent page settings**: For nested pages (pages within pages), these are the settings from the parent page. +4. **Page settings**: These are the settings that apply to a single page. They are set in the front matter of the page. In all cases, tabi's settings are set in the `[extra]` section. -For settings which follow this hierarchy, the value set on a page overrides the value for a section, which overrides the global value. In short: the more specific the setting, the higher priority it has, or `page > section > config.toml`. +For settings which follow this hierarchy, the value set on a page overrides the value for a section, which overrides the global value. In short: the more specific the setting, the higher priority it has, or `page > parent page/section > config.toml`. --- @@ -87,7 +88,7 @@ For technical details about the search implementation in tabi, including when th ## Multilingual Support -tabi offers comprehensive multilingual support for your Zola site, from setting a default language to adding as many as you wish. Refer to the [multilingual FAQ](blog/faq-languages/) for more information. +tabi offers comprehensive multilingual support for your Zola site, from setting a default language to adding as many as you wish. Refer to the [multilingual FAQ](@/blog/faq-languages/index.md) for more information. --- @@ -112,35 +113,79 @@ The description is regular Markdown content, set outside the front matter. #### Listing Recent Posts -If you'd like to show posts on the main page, you first need to decide whether their path will be `/` or something like `/blog`. +To show posts on your main page, you first need to decide where these posts will be served from: the root path (`/`) or a subdirectory (e.g., `/blog`). -If you want to serve the posts from `/`, you need to set `paginate_by = 5` in the front matter of your `_index.md` file. **Note**: this is not in the `[extra]` section, but in the main front matter. Example: +**Option A: Serve posts from the root path (`/`)** -```toml -sort_by = "date" -template = "section.html" -paginate_by = 5 - -[extra] -header = {title = "Hello! I'm tabi~", img = "img/main.webp", img_alt = "Óscar Fernández, the theme's author" } -``` - -If you'd rather serve the posts from `/blog`, you can set `section_path = "/blog"` in the `[extra]` section. This is the setup of this demo: +Set `paginate_by` in the front matter of your `content/_index.md` file: ```toml title = "Latest posts" sort_by = "date" -template = "section.html" +paginate_by = 5 # Show 5 posts per page. [extra] -header = {title = "Hello! I'm tabi~", img = "img/main.webp", img_alt = "Óscar Fernández, the theme's author" } -section_path = "blog/_index.md" -max_posts = 4 +header = {title = "Hello! I'm tabi~", img = "img/main.webp", img_alt = "Your Name" } ``` -Notice how if you set `section_path`, you don't need to set `paginate_by`. You can set `max_posts` to the determine the number of posts you want to show on the main page. +{{ admonition(type="note", text="The `paginate_by` setting goes in the main front matter, not in the `[extra]` section.") }} -The `title` is the header that appears above the posts. +**Option B: Serve posts from a subdirectory (e.g., `/blog`)** + +Use `section_path` in the `[extra]` section of your `content/_index.md` file: + +```toml +title = "Latest posts" +sort_by = "date" +# Do not set `paginate_by` here. + +[extra] +header = {title = "Hello! I'm tabi~", img = "img/main.webp", img_alt = "Your Name" } +section_path = "blog/_index.md" # Where to find your posts. +max_posts = 5 # Show up to 5 posts on the main page. +``` + +{{ admonition(type="warning", text="Do not set both `paginate_by` and `section_path`. These settings are mutually exclusive and using both may result in no posts being displayed.") }} + +Additional notes: + +- The `title` in the front matter sets the header that appears above the posts. +- Use the full path to the section's `_index.md` file for `section_path`. Using `section_path = "blog/"` will not work. + +##### Pinning Posts + +You can pin posts to keep them at the top of the main page listing. In this demo, this post is pinned, so it appears first with a "pinned" icon and label: + +{{ dual_theme_image(light_src="blog/mastering-tabi-settings/img/pinned_post_light.webp", dark_src="blog/mastering-tabi-settings/img/pinned_post_dark.webp", alt="Pinned post", full_width=true) }} + +Pinned posts are shown first, maintaining their relative order of the section's `sort_by`, followed by regular posts. + +To pin a post, add the following to its front matter: + +```toml +[extra] +pinned = true +``` + +{{ admonition(type="info", text="This setting only affects your site's main pages (like `/`, `/es/`, `/fr/`). Other sections like `blog/`, `tags/`, or `archive/` show posts in their normal order.") }} + +{{ admonition(type="warning", text='When using pagination (`paginate_by`), pinned posts may appear twice: once on top of page 1, and again in their normal chronological position on subsequent pages.') }} + +##### Display the Date of Posts in Listing + +By default, when listing posts, the date of post creation is shown. You can configure which date(s) to display using the `post_listing_date` option. Available settings: + +- `date`: Show only the original date of the post (default). +- `updated`: Show only the last updated date of the post. If there is no last updated date, it shows the original date. +- `both`: Show both the original date and the last updated date. + +```toml +post_listing_date = "date" +``` + +{% admonition(type="tip") %} +This setting follows the hierarchy: you can set a global value in `config.toml` or override it for specific sections in their `_index.md` file. In both cases, add it to the `[extra]` section. +{% end %} #### Listing Projects @@ -183,7 +228,38 @@ tabi's skins change the main colour of the site. You can set the skin in `config {{ image_toggler(default_src="blog/customise-tabi/skins/lavender_light.webp", toggled_src="blog/customise-tabi/skins/lavender_dark.webp", default_alt="lavender skin in light mode", toggled_alt="lavender skin in dark mode", full_width=true) }} -Explore the available skins and learn how to create your own reading [the documentation](/blog/customise-tabi/#skins). +Explore the available skins and learn how to create your own reading [the documentation](@/blog/customise-tabi/index.md#skins). + +### Sans-serif Font + +| Page | Section | `config.toml` | Follows Hierarchy | Requires JavaScript | +|:----:|:-------:|:-------------:|:-----------------:|:-------------------:| +| ❌ | ❌ | ✅ | ❌ | ❌ | + +tabi uses a serif font for article paragraphs (the one you're seeing now). You can switch to using a sans-serif font (the one on the headers/menu) throughout your entire site by setting `override_serif_with_sans = true` in your `config.toml`. + +Click on the image below to compare the two looks: + +{{ image_toggler(default_src="blog/mastering-tabi-settings/img/serif.webp", toggled_src="blog/mastering-tabi-settings/img/sans-serif.webp", default_alt="Serif font", toggled_alt="Sans-serif font", full_width=true) }} + +### External Link Indicator + +| Page | Section | `config.toml` | Follows Hierarchy | Requires JavaScript | +|:----:|:-------:|:-------------:|:-----------------:|:-------------------:| +| ❌ | ❌ | ✅ | ❌ | ❌ | + +{{ admonition(type="info", text="Requires Zola 0.20.0 or later.") }} + +If you'd like to add an icon to external links, configure the `[markdown]` (not `[extra]`) section in your `config.toml`: + +```toml +[markdown] +external_links_class = "external" +``` + +This will add a small icon next to external links: + +{{ dual_theme_image(light_src="blog/mastering-tabi-settings/img/external_link_light.webp", dark_src="blog/mastering-tabi-settings/img/external_link_dark.webp", alt="External link icon", full_width=true) }} ### Custom CSS @@ -225,6 +301,44 @@ Setting `compact_tags = true` will display them as: [TagName](#) n +### Tags Sorting + +| Page | Section | `config.toml` | Follows Hierarchy | Requires JavaScript | +|:----:|:-------:|:-------------:|:-----------------:|:-------------------:| +| ❌ | ❌ | ✅ | ❌ | ❌ | + +By default, the [tags page](/tags) sorts tags alphabetically, given the default setting of `tag_sorting = "name"`. + +Setting `tag_sorting = "frequency"` will sort them by number-of-posts (descending). + +--- + +## Series + +For a detailed explanation of the series feature, see the [series documentation](@/blog/series/index.md). + +### Jump to posts link + +| Page | Section | `config.toml` | Follows Hierarchy | Requires JavaScript | +|:----:|:-------:|:-------------:|:-----------------:|:-------------------:| +| ❌ | ✅ | ✅ | ✅ | ❌ | + +By default, a "Jump to posts" link automatically appears next to the series title when a series has a content over 2000 characters: + +{{ dual_theme_image(light_src="blog/series/img/jump_to_series_posts_light.webp", dark_src="blog/series/img/jump_to_series_posts_dark.webp" alt="jump to series posts link", full_width=true) }} + +Set `show_jump_to_posts = true` to force the feature on and `show_jump_to_posts = false` to force it off. + +### Series pages indexation + +| Page | Section | `config.toml` | Follows Hierarchy | Requires JavaScript | +|:----:|:-------:|:-------------:|:-----------------:|:-------------------:| +| ❌ | ✅ | ✅ | ✅ | ❌ | + +By default, series page are indexed (using a 1-based indexing) as per the series section `sort_by`. + +Set `post_listing_index_reversed = true` to reverse this index. + --- ## Git Repository Integration @@ -265,7 +379,7 @@ Clicking on this link will take you to the commit history of the post, where you ### Projects -tabi has a built-in projects template. To enable it, you can create a directory in `content/projects/`. There, you can create a `_index.md` file with the following front matter: +tabi has a built-in projects (cards) template. To enable it, you can create a directory in `content/projects/`. There, you can create a `_index.md` file with the following front matter: ```toml title = "Projects" @@ -285,11 +399,11 @@ quick_navigation_buttons = true - `show_reading_time = false` hides the [reading time](#reading-time). - `quick_navigation_buttons = true` shows the [quick navigation buttons](#quick-navigation-buttons) are shown. -Alongside the `_index.md` file, you can create a file for each project. For example, this is the front matter for the [tabi project page](/projects/tabi/): +Alongside the `_index.md` file, you can create a file for each project. For example, this is the front matter for the [tabi project page](@/projects/tabi/index.md): ```toml title = "tabi" -description = "A fast, lightweight, and modern Zola theme with multi-language support." +description = "A feature-rich modern Zola theme with first-class multi-language support." weight = 1 [extra] @@ -305,6 +419,33 @@ When a user clicks on the image or title of a project, they will be taken to the The individual project's page is rendered with the default template, unless you set another one, e.g. `template = "info-page.html"`. +#### Filtering Projects + +If you add tags to your projects, you will see a tag filter: + +{{ dual_theme_image(light_src="blog/mastering-tabi-settings/img/projects_tag_filter_light.webp", dark_src="blog/mastering-tabi-settings/img/projects_tag_filter_dark.webp", alt="Projects page with tag filter", full_width=true) }} + +The tag filtering system uses progressive enhancement: + +- Without JavaScript: Tags link directly to dedicated tag pages (e.g. `/tags/tag-name`) +- With JavaScript: Instant filtering, URL syncing (#tag-name), and keyboard navigation + +To disable this feature, set `enable_cards_tag_filtering = false` in the `[extra]` section of the `projects/_index.md` file or in `config.toml`. + +{% admonition(type="tip") %} + +To filter projects by tags, you need to set tags in the front matter of each project. For example: + +```toml +title = "project name" +weight = 40 + +[taxonomies] +tags = ["tag one", "tag 2", "third tag"] +``` + +{% end %} + ### Archive Adding an archive page is similar to adding a projects page. You can create a directory in `content/archive/`. There, you can create a `_index.md` file with the following front matter: @@ -325,7 +466,14 @@ By default, the archive will list posts located in `blog/`. To customise this, y section_path = ["blog/", "notes/", "path-three/"] ``` -**Note**: the Archive page will only list posts that have a date in their front matter. +The archive displays posts in reverse chronological order (newest first). You can reverse this order by setting `archive_reverse = true` in the `[extra]` section: + +```toml +[extra] +archive_reverse = true # displays oldest posts first. +``` + +{{ admonition(type="note", text="The Archive page will only list posts that have a date in their front matter.") }} ### Tags @@ -374,6 +522,17 @@ path = "about" Notice how the `path` is set to `about`. Zola will place the page at `$base_url/about/`. If you'd like to have the page available at `/contact/`, you'd set `path = "contact"`. +The `info-page.html` template can also be used to create landing pages at the path root (`"/"`). To do that, the `content/_index.md` file should look like this: + +```markdown ++++ +title = "Landing Page Title" +template = "info-page.html" ++++ + +Place your landing page Markdown content here. +``` + --- ## SEO @@ -422,7 +581,7 @@ For example, if you set `base_canonical_url = "https://example.com"`, the canoni Social media cards are the images that are displayed when you share a link on social media: -![A screenshot of WhatsApp showing a link with a social media card](/blog/mastering-tabi-settings/img/with_social_media_card.webp) +{{ dimmable_image(src="img/with_social_media_card.webp", alt="A screenshot of WhatsApp showing a link with a social media card") }} You can set the social media image with `social_media_card = "img/social_media_card.png"`. @@ -436,7 +595,21 @@ If both relative and absolute paths are valid, the relative path will take prece Since it follows the [hierarchy](#settings-hierarchy), if it's not set on a page, but is set on a section, the section's image will be used. If it's not set on a page or section, but is set in `config.toml`, the global image will be used. -**Protip**: automate their creation with a [script](https://github.com/welpo/osc.garden/blob/main/static/code/social-cards-zola): [From Bashful to Social Butterfly: Automating Link Previews for Zola Sites](https://osc.garden/blog/automating-social-media-cards-zola/). +{{ admonition(type="tip", title="PROTIP", text="Automate their creation with a [script](https://github.com/welpo/osc.garden/blob/main/static/code/social-cards-zola): [Automating Link Previews for Zola Sites](https://osc.garden/blog/automating-social-media-cards-zola/).") }} + +### Fediverse Creator + +| Page | Section | `config.toml` | Follows Hierarchy | Requires JavaScript | +|:----:|:-------:|:-------------:|:-----------------:|:-------------------:| +| ❌ | ❌ | ✅ | ❌ | ❌ | + +You can highlight your fediverse profile in Mastodon link previews by setting the `fediverse_creator` variable in your `config.toml`. For example, for @username@example.com, use: + +```toml +fediverse_creator = { handle = "username", domain = "example.com" } +``` + +This adds metadata to your HTML, allowing Mastodon to display the author's fediverse profile when your content is shared. --- @@ -448,7 +621,9 @@ Since it follows the [hierarchy](#settings-hierarchy), if it's not set on a page |:----:|:-------:|:-------------:|:-----------------:|:-------------------:| | ❌ | ❌ | ✅ | ❌ | ❌ | -The navigation bar is the bar at the top of the page that contains the site title and the navigation menu. You can customise which items appear by setting `menu` in `config.toml`. For example: +The navigation bar is the bar at the top of the page that contains the site title and the navigation menu. You can customise which items appear by setting `menu` in `config.toml`. + +The menu supports both relative URLs for internal pages and absolute URLs for external links. For example: ```toml menu = [ @@ -457,6 +632,7 @@ menu = [ { name = "tags", url = "tags", trailing_slash = true }, { name = "projects", url = "projects", trailing_slash = true }, { name = "about", url = "about", trailing_slash = true }, + { name = "github", url = "https://github.com/welpo/tabi", trailing_slash = false }, ] ``` @@ -482,7 +658,7 @@ To enable them, set `quick_navigation_buttons = true`. Enable the table of contents right below the post's title and metadata with `toc = true`. -Read more about the table of contents and how to customise it by reading [the docs](/blog/toc/). +Read more about the table of contents and how to customise it by reading [the docs](@/blog/toc/index.md). ### Previous and Next Article Links @@ -494,7 +670,7 @@ Displays links to the previous and next articles at the bottom of posts. It look {{ dual_theme_image(light_src="blog/mastering-tabi-settings/img/show_previous_next_article_links_light.webp", dark_src="blog/mastering-tabi-settings/img/show_previous_next_article_links_dark.webp" alt="Previous and next article links", full_width=true) }} -To activate this feature, set `show_previous_next_article_links = true`. +To activate this feature, set `show_previous_next_article_links = true` and ensure your section has a `sort_by` value (e.g. `sort_by = "date"`). By default, next articles will be on the left side of the page and previous articles will be on the right side. To reverse the order (next articles on the right and previous articles on the left), set `invert_previous_next_article_links = true`. @@ -506,6 +682,8 @@ All of these settings follow the hierarchy. ### Footnote Backlinks +{{ admonition(type="warning", title="DEPRECATION WARNING", text="Zola v0.19.0 and later can do this natively. Set `bottom_footnotes = true` in your config's `[markdown]` section.") }} + | Page | Section | `config.toml` | Follows Hierarchy | Requires JavaScript | |:----:|:-------:|:-------------:|:-----------------:|:-------------------:| | ✅ | ✅ | ✅ | ✅ | ✅ | @@ -530,13 +708,21 @@ Setting `copy_button = true` will add a small copy button to the top right of co {{ dual_theme_image(light_src="blog/mastering-tabi-settings/img/copy_button_on_code_blocks_light.webp", dark_src="blog/mastering-tabi-settings/img/copy_button_on_code_blocks_dark.webp" alt="Copy button on code blocks", full_width=true) }} -### Source/Path on Code Blocks +### Clickable Code Block Names | Page | Section | `config.toml` | Follows Hierarchy | Requires JavaScript | |:----:|:-------:|:-------------:|:-----------------:|:-------------------:| | ✅ | ✅ | ✅ | ✅ | ✅ | -Setting `add_src_to_code_block = true` enables the use of the [`add_src_to_code_block` shortcode](@/blog/shortcodes/index.md#show-source-or-path). +Setting `code_block_name_links = true` enables URLs in code block names to become clickable links. Check out the [documentation](@/blog/shortcodes/index.md#show-source-or-path) for examples and usage. + +### Force Code Blocks LTR + +| Page | Section | `config.toml` | Follows Hierarchy | Requires JavaScript | +|:----:|:-------:|:-------------:|:-----------------:|:-------------------:| +| ✅ | ✅ | ✅ | ✅ | ❌ | + +By default, code blocks are rendered left-to-right, regardless of the overall text direction. Set `force_codeblock_ltr = false` to allow code blocks to follow the document's text direction. Useful for RTL languages needing RTL code blocks. ### KaTeX Support @@ -546,17 +732,29 @@ Setting `add_src_to_code_block = true` enables the use of the [`add_src_to_code_ KaTeX is a fast, easy-to-use JavaScript library for TeX math rendering on the web. You can enable it with `katex = true`. See what it looks like in tabi [here](/blog/markdown/#katex). +### Mermaid Support + +| Page | Section | `config.toml` | Follows Hierarchy | Requires JavaScript | +|:----:|:-------:|:-------------:|:-----------------:|:-------------------:| +| ✅ | ✅ | ✅ | ✅ | ✅ | + +[Mermaid](https://github.com/mermaid-js/mermaid) is a JavaScript-based diagramming and charting tool. You can enable it with `mermaid = true`. + +By default, the Mermaid library is served locally. If you prefer to use a CDN, set `serve_local_mermaid = false` in `config.toml`. Using a CDN will serve the latest version of Mermaid; the local option will serve the version bundled with tabi. + +See the [Mermaid documentation](@/blog/shortcodes/index.md#mermaid-diagrams) for usage instructions and examples. + ### Custom Font Subset | Page | Section | `config.toml` | Follows Hierarchy | Requires JavaScript | |:----:|:-------:|:-------------:|:-----------------:|:-------------------:| | ❌ | ❌ | ✅ | ❌ | ❌ | -Custom fonts cause flashing text in Firefox. To amend this, tabi loads a subset of glyphs for the header. Since this (slightly) increases the initial load time, it's a good idea to try and minimise the size of this subset. +Custom fonts cause flashing text in Firefox. To amend this, tabi loads a subset of glyphs for the header. Since this (slightly) increases the initial load time, it's a good idea to try and minimise the size of this subset, or disable it completely if you're not using a custom font in your skin. -You can create a custom subset tailored to your site, save it as `static/custom_subset.css`, and have it load with `custom_subset = true`. +You can create a custom subset tailored to your site, save it as `static/custom_subset.css`, and have it load with `custom_subset = true`. Disabling the subset can be done with `enable_subset = false`. -For more information, including instructions on how to create a custom subset, see the [docs](/blog/custom-font-subset/). +For more information, including instructions on how to create a custom subset, see the [docs](@/blog/custom-font-subset/index.md). ### Full Content in Feed @@ -572,7 +770,10 @@ By default, the Atom feed only contains the summary/description of your posts. Y |:----:|:-------:|:-------------:|:-----------------:|:-------------------:| | ✅ | ✅ | ✅ | ✅ | ❌ | -You can hide specific pages or entire sections from your feed by setting `hide_from_feed = true`. +You can control how content appears in your feeds using two settings: + +1. `hide_from_feed = true`: Hides content from all feeds (main, section, and tag feeds) +2. `hide_from_main_feed = true`: Hides content only from the main feed while keeping it visible in section and tag feeds ### Comments {#adding-comments} @@ -586,7 +787,38 @@ To enable a system globally (on all pages), set `enabled_for_all_posts = true` i If you have enabled a system globally, but want to disable it on a specific page, set the name of the system to `false` in the front matter of that page. For example, `utterances = false`. -Read [the docs](/blog/comments/) for more information on the available systems and their setup. +Read [the docs](@/blog/comments/index.md) for more information on the available systems and their setup. + +### iine Like Buttons {#iine} + +| Page | Section | `config.toml` | Follows Hierarchy | Requires JavaScript | +|:----:|:-------:|:-------------:|:-----------------:|:-------------------:| +| ✅ | ✅ | ✅ | ✅ | ❌ | + +tabi supports [iine](https://iine.to/) like buttons for anonymous appreciation of your content. These privacy-focused buttons work without JavaScript and don't track users. + +To enable iine buttons globally: + +```toml +[extra] +iine = true +``` + +You can customise the icon used for the buttons (follows the hierarchy): + +```toml +[extra] +iine_icon = "thumbs_up" # Options: "heart", "thumbs_up", "upvote", or any emoji +``` + +For multilingual sites, you can unify like counts across language versions of the same content (config-only setting; true by default): + +```toml +[extra] +iine_unified_languages = true # Likes on /es/blog/hello/ count towards /blog/hello/ +``` + +You can also enable iine buttons on individual pages or sections by setting `iine = true` in their front matter, or override the icon with `iine_icon = "🚀"`. ### Analytics @@ -601,7 +833,7 @@ You can set them up in the `[extra.analytics]` section of your `config.toml`. - `service`: Specifies which analytics service to use. Supported options are `"goatcounter"`, `"umami"`, and `"plausible"`. - `id`: The unique identifier for your analytics service. This varies based on the service: - - For GoatCounter, it's the code chosen during signup. Self-hosted instances don't require this field. + - For GoatCounter, it's the code chosen during signup. Self-hosted instances of GoatCounter don't require this field. - For Umami, it's the website ID. - For Plausible, it's the domain name. @@ -610,6 +842,8 @@ You can set them up in the `[extra.analytics]` section of your `config.toml`. - For Umami: `"https://umami.example.com"` - For Plausible: `"https://plausible.example.com"` +- `do_not_track`: (Umami only) Optional. When set to `true`, the generated tracking script will include the `data-do-not-track="true"` attribute, which disables tracking for users whose browsers send a "Do Not Track" header. + An example configuration for non-self-hosted GoatCounter would look like this: ```toml @@ -651,6 +885,8 @@ To use a custom icon, you can add it to your site's `static/social_icons` direct { name = "custom", url = "https://example.com", icon = "custom" } ``` +{{ admonition(type="note", text="All social links include the `rel='me'` [attribute](https://developer.mozilla.org/docs/Web/HTML/Attributes/rel/me). This helps search engines and web services verify that the social media accounts are owned by you.") }} + ### Feed Icon | Page | Section | `config.toml` | Follows Hierarchy | Requires JavaScript | @@ -747,12 +983,25 @@ By default, the date is shown below the post title. You can hide it with `show_d |:----:|:-------:|:-------------:|:-----------------:|:-------------------:| | ❌ | ❌ | ✅ | ❌ | ❌ | -tabi has two date formats: `long_date_format` and `short_date_format`. The short format is used in a post's metadata, while the long format is used when listing posts (i.e. on the [blog section](/blog/) or the [main page](/)). +tabi has three date formats: `long_date_format`, `short_date_format` and `archive_date_format`. The short format is used in a post's metadata, while the long format is used when listing posts (i.e. on the [blog section](@/blog/_index.md) or the [main page](@/_index.md)). The archive format is used to display day and month on the archive page. -The default is "6th July 2049" for both formats in English. For other languages, the defaut is `"%d %B %Y"` for the long format and `"%-d %b %Y"` for the short format. +The default is "6th July 2049" for `long_date_format` and `short_date_format` in English. For other languages, the defaut is `"%d %B %Y"` for the long format and `"%-d %b %Y"` for the short format. The universal default for the archive format is `"%d %b"`. In Zola, time formatting syntax is inspired fom strftime. A full reference is available in the [chrono docs](https://docs.rs/chrono/0.4.31/chrono/format/strftime/index.html). +#### Per-language date formats + +You can customise date formats for specific languages using the `date_formats` array in `config.toml`: + +```toml +date_formats = [ + { lang = "es", long = "%d de %B de %Y", short = "%-d %b %Y", archive = "%d de %b" }, + { lang = "de", long = "%d. %B %Y", short = "%d.%m.%Y", archive = "%d. %b" }, +] +``` + +This allows different languages to use culturally appropriate date formatting (e.g. Spanish "3 de febrero de 2024" vs German "3. Februar 2024"). + ### Custom Separator | Page | Section | `config.toml` | Follows Hierarchy | Requires JavaScript | @@ -811,7 +1060,67 @@ allowed_domains = [ This feature is enabled by default. To disable it (and allow all connections), set `enable_csp = false` on a page, section or globally. The `enable_csp` setting follows the [hierarchy](#settings-hierarchy). -See the [CSP documentation page](/blog/security/) for more information. +See the [CSP documentation page](@/blog/security/index.md) for more information. + +--- + +## Indieweb + +### Webmentions + +| Page | Section | `config.toml` | Follows Hierarchy | Requires JavaScript | +|:----:|:-------:|:-------------:|:-----------------:|:-------------------:| +| ❓ | ❓ | ✅ | ❓ | ✅ | + +As described by the recommended W3C standard [Webmention](https://www.w3.org/TR/webmention/#abstract-p-1) is a simple way to notify any URL when you mention it on your site. From the receiver's perspective, it's a way to request notifications when other sites mention it. + +For static sites [webmention.io](https://webmention.io/) hosts a webmention endpoint that can be used to receive webmentions. This feature fetches the webmentions stored at webmention.io and displays them for a page. You will need to have setup an account for your website at webmention.io. When you enable the webmention feature it will advertise your webmention.io endpoint and display the webmentions for all posts. + +Enable webmentions for your site by adding the following to your `config.toml` file. + +```toml +[extra.webmentions] +enable = true +# Specify the domain registered with webmention.io. +domain = "www.example.com" +``` + +❓: To disable webmentions for a specific section or page, set `webmentions = false` in the `[extra]` section of that section or page's front matter. + +The webmentions section looks like this: + +{{ dual_theme_image(light_src="blog/mastering-tabi-settings/img/webmention_light.webp", dark_src="blog/mastering-tabi-settings/img/webmention_dark.webp" alt="Webmentions screenshot showing reposts, likes, bookmarks, and comments", full_width=true) }} + +### Representative h-card + +| Page | Section | `config.toml` | Follows Hierarchy | Requires JavaScript | +| :--: | :-----: | :-----------: | :---------------: | :-----------------: | +| ❌ | ❌ | ✅ | ❌ | ❌ | + +By default, tabi adds a **hidden** representative [h-card](https://microformats.org/wiki/h-card) to the homepage. While invisible to visitors, it's available to microformat parsers. You can check the validity of the card with the [Indiewebify.me](https://indiewebify.me/validate-h-card/) tool. + +To disable the h-card, set `enable = false` in the `[extra.hcard]` section of `config.toml`. + +The default h-card includes your name, website url and social media links. + +You can set a profile picture and a small bio with the `avatar` and `biography` settings. + +All other [h-card properties](https://microformats.org/wiki/h-card#Properties) can be added by listing them under the `[extra.hcard]`section of the config file. Simply replace all `-` characters by `_`. + +--- + +## Extending HTML Elements in tabi + +Some HTML elements in tabi can be extended to support additional use cases such as adding custom JavaScript for site-wide behavior at the end of the `` tag or including additional content at the end of the `` element that is not otherwise supported by other tabi settings. + +See the table below for elements that can be extended: + +| Element | Template | +| :------: | :-------------------------------: | +| `` | `templates/tabi/extend_head.html` | +| `` | `templates/tabi/extend_body.html` | + +There are no explicit settings to configure for your site or pages. Simply create the relevant template file for your site, and tabi will automatically include it. --- diff --git a/content/blog/security/index.ca.md b/content/blog/security/index.ca.md index 1b8bffe..6d3ebfe 100644 --- a/content/blog/security/index.ca.md +++ b/content/blog/security/index.ca.md @@ -1,7 +1,7 @@ +++ title = "Seguretat per defecte" date = 2023-02-22 -updated = 2024-05-30 +updated = 2025-02-21 description = "tabi té una Política de Seguretat de Contingut (CSP) fàcilment personalitzable amb valors segurs per defecte. Obtingues tranquil·litat i un A+ en l'Observatori de Mozilla." [taxonomies] @@ -34,11 +34,13 @@ Pots desactivar les capçaleres (permitint-ho tot) en una pàgina, secció, o gl **Notas**: -- [Habilitar els comentaris](@/blog/comments/index.ca.md) o [les analítiques](@/blog/mastering-tabi-settings/index.ca.md#analisi-web) automàticament permet scripts/frames/estils/connexions en funció del servei habilitat. +- [Habilitar els comentaris](@/blog/comments/index.ca.md), [les analítiques](@/blog/mastering-tabi-settings/index.ca.md#analisi-web), o [els diagrames de mermaid](@/blog/shortcodes/index.ca.md#diagrames-de-mermaid) permet automàticament els scripts/frames/estils/conexions pertinents. - Per utilitzar un [tema de resaltat de sintaxis integrat a Zola](https://www.getzola.org/documentation/getting-started/configuration/#syntax-highlighting), has de permetre `unsafe-inline` a la directiva `style-src`: ``` { directive = "style-src", domains = ["'self'", "'unsafe-inline'"] }, ``` +--- + [^1]: Requereix una configuració adequada del servidor web (p. ex., redirigir el trànsit HTTP a HTTPS). diff --git a/content/blog/security/index.es.md b/content/blog/security/index.es.md index ec46cdb..0a6f663 100644 --- a/content/blog/security/index.es.md +++ b/content/blog/security/index.es.md @@ -1,7 +1,7 @@ +++ title = "Seguro por defecto" date = 2023-02-22 -updated = 2024-05-30 +updated = 2025-02-21 description = "tabi tiene una Política de Seguridad de Contenido (CSP) fácilmente personalizable con configuraciones seguras. Obtén tranquilidad y una calificación de A+ en Mozilla Observatory." [taxonomies] @@ -34,11 +34,13 @@ Puedes desactivar las cabeceras (permitiendo todo) en una página, sección, o g **Notas**: -- [Habilitar los comentarios](@/blog/comments/index.es.md) o [las analíticas](@/blog/mastering-tabi-settings/index.es.md#analisis-web) automáticamente permite scripts/frames/estilos/conexiones en función del servicio habilitado. +- [Habilitar los comentarios](@/blog/comments/index.es.md), [las analíticas](@/blog/mastering-tabi-settings/index.es.md#analisis-web), o [los diagramas mermaid](@/blog/shortcodes/index.es.md#diagramas-de-mermaid) permite automáticamente los scripts/frames/estilos/conexiones pertinentes. - Para usar un [tema de resaltado de sintaxis integrado en Zola](https://www.getzola.org/documentation/getting-started/configuration/#syntax-highlighting), has de permitir `unsafe-inline` en la directiva `style-src`: ``` { directive = "style-src", domains = ["'self'", "'unsafe-inline'"] }, ``` +--- + [^1]: Requiere una configuración adecuada del servidor web (por ejemplo, redirigir el tráfico HTTP a HTTPS). diff --git a/content/blog/security/index.md b/content/blog/security/index.md index a1c99cb..7765287 100644 --- a/content/blog/security/index.md +++ b/content/blog/security/index.md @@ -1,7 +1,7 @@ +++ title = "Secure by default" date = 2023-02-22 -updated = 2024-05-30 +updated = 2025-02-21 description = "tabi has an easily customizable Content Security Policy (CSP) with safe defaults. Get peace of mind and an A+ on Mozilla Observatory." [taxonomies] @@ -34,11 +34,13 @@ You can disable the CSP (allowing all connections) on a page, section, or global **Notes**: -- [Enabling comments](@/blog/comments/index.md) or [analytics](@/blog/mastering-tabi-settings/index.md#analytics) automatically allows scripts/frames/styles/connections as needed from the respective services. +- [Enabling comments](@/blog/comments/index.md), [analytics](@/blog/mastering-tabi-settings/index.md#analytics), or [mermaid diagrams](@/blog/shortcodes/index.md#mermaid-diagrams) automatically allows scripts/frames/styles/connections as needed. - To use a [Zola built-in syntax highlighting theme](https://www.getzola.org/documentation/getting-started/configuration/#syntax-highlighting), you need to allow `unsafe-inline` in the `style-src` directive: ``` { directive = "style-src", domains = ["'self'", "'unsafe-inline'"] }, ``` +--- + [^1]: Requires proper webserver configuration (e.g. redirecting HTTP traffic to HTTPS). diff --git a/content/blog/series/img/jump_to_series_posts_dark.webp b/content/blog/series/img/jump_to_series_posts_dark.webp new file mode 100644 index 0000000..d88a292 Binary files /dev/null and b/content/blog/series/img/jump_to_series_posts_dark.webp differ diff --git a/content/blog/series/img/jump_to_series_posts_light.webp b/content/blog/series/img/jump_to_series_posts_light.webp new file mode 100644 index 0000000..22f5e78 Binary files /dev/null and b/content/blog/series/img/jump_to_series_posts_light.webp differ diff --git a/content/blog/series/img/series_dark.webp b/content/blog/series/img/series_dark.webp new file mode 100644 index 0000000..89223d0 Binary files /dev/null and b/content/blog/series/img/series_dark.webp differ diff --git a/content/blog/series/img/series_light.webp b/content/blog/series/img/series_light.webp new file mode 100644 index 0000000..780e2f2 Binary files /dev/null and b/content/blog/series/img/series_light.webp differ diff --git a/content/blog/series/img/series_reversed_dark.webp b/content/blog/series/img/series_reversed_dark.webp new file mode 100644 index 0000000..112a853 Binary files /dev/null and b/content/blog/series/img/series_reversed_dark.webp differ diff --git a/content/blog/series/img/series_reversed_light.webp b/content/blog/series/img/series_reversed_light.webp new file mode 100644 index 0000000..2a1dd0e Binary files /dev/null and b/content/blog/series/img/series_reversed_light.webp differ diff --git a/content/blog/series/index.ca.md b/content/blog/series/index.ca.md new file mode 100644 index 0000000..adb3998 --- /dev/null +++ b/content/blog/series/index.ca.md @@ -0,0 +1,409 @@ ++++ +title = "Guia completa sobre sèries" +date = 2024-11-08 +updated = 2025-02-21 +description = "Aprèn a organitzar les teves publicacions en sèries seqüencials, perfectes per a tutorials, cursos i històries de diverses parts." + +[taxonomies] +tags = ["funcionalitat", "tutorial", "preguntes freqüents", "sèries"] + +[extra] +quick_navigation_buttons = true +toc = true +mermaid = true +social_media_card = "social_cards/ca_blog_series.jpg" ++++ + +Una sèrie organitza publicacions relacionades en ordre seqüencial, similar als capítols d'un llibre. A diferència de les etiquetes, que simplement agrupen contingut relacionat, les sèries suggereixen un ordre específic de lectura de principi a fi. + +Les publicacions dins d'una sèrie no necessiten publicar-se de forma consecutiva; la funció de sèries reuneix publicacions temàticament vinculades en una seqüència coherent. + +El següent diagrama il·lustra com les publicacions de la sèrie (3, 5 i 8) existeixen dins del flux principal del blog mentre mantenen la seva pròpia seqüència ordenada dins de Sèrie 1. + +{% mermaid(full_width=true) %} +flowchart + subgraph main[BLOG] + P1[Post 1] + P2[P2] + P3[P3] + P4[P4] + P5[P5] + P6[P6] + P7[P7] + P8[P8] + P9[P9] + end + subgraph series1[SÈRIE 1] + PS1["Post Sèrie 1 (=P3)"] + PS2["Post Sèrie 2 (=P5)"] + PS3["Post Sèrie 3 (=P8)"] + end + P3 o-.-o PS1 + P5 o-.-o PS2 + P8 o-.-o PS3 +{% end %} + +## Inici ràpid + +1. Crea un directori per a la teva sèrie +2. Crea `_index.md` al directori de la sèrie +3. Configura el front matter de `_index.md`: + + ```toml,name=series/_index.md + title = "Aprenent Rust" + template = "series.html" + sort_by = "slug" + transparent = true + + [extra] + series = true + ``` + +4. Crea els teus articles de la sèrie en aquest directori + +Vols saber-ne més? Continua llegint! + +## Com funcionen les sèries? + +Una sèrie és simplement una secció que tabi gestiona de manera especial. Per a més detalls sobre seccions, consulta la [documentació de Zola](https://www.getzola.org/documentation/content/section/). + +Prenent l'exemple del diagrama anterior, l'estructura de directoris seria així: + +```txt +content/ + _index.md + blog/ + _index.md + post1/ + index.md + post2/ + index.md + post4/ + index.md + post6/ + index.md + post7/ + index.md + post9/ + index.md + serie1/ + _index.md + post3/ + index.md + post5/ + index.md + post8/ + index.md +``` + +Per crear una sèrie, necessites: + +1. Utilitzar la plantilla `series.html` +2. Establir `series = true` a la configuració `[extra]` de la secció +3. Activar `transparent = true` per integrar les publicacions de la sèrie amb la secció del blog principal + +La pàgina principal de la sèrie mostra un resum seguit d'una llista de totes les publicacions a la sèrie: + +{{ dual_theme_image(light_src="blog/series/img/series_light.webp", dark_src="blog/series/img/series_dark.webp" alt="una sèrie", full_width=true) }} + +## Saltar a les publicacions + +Si el contingut d'una sèrie (el Markdown després del frontmatter a `_index.md`) supera els 2000 caràcters, apareix un enllaç "Salta a les publicacions" al costat del títol de la sèrie. + +{{ dual_theme_image(light_src="blog/series/img/jump_to_series_posts_light.webp", dark_src="blog/series/img/jump_to_series_posts_dark.webp" alt="enllaç per saltar a les publicacions de la sèrie", full_width=true) }} + +Per forçar l'activació o desactivació d'aquesta funció, configura `show_jump_to_posts` a la secció `[extra]` de la teva secció de sèries o a `config.toml`. Aquesta configuració segueix [la jerarquia](@/blog/mastering-tabi-settings/index.ca.md#jerarquia-de-configuracio). + +## Pàgines de sèries i ordre + +Totes les pàgines a la secció de sèries seran pàgines de sèrie. Les pàgines s'ordenaran segons el `sort_by` de la secció. + +Tot i que les sèries mantenen el seu propi ordre intern, romanen independents del flux cronològic de la secció principal (per exemple, `blog/`) gràcies a la configuració `transparent`. + +### Opcions d'ordre + +Tria entre aquests mètodes d'ordre, cadascun amb els seus avantatges: + +{% wide_container() %} + +`sort_by` | avantatges | desavantatges +---------|------------|--------------- +`slug` | L'ordre de les pàgines és explícit a la ruta (per exemple, `example.com/blog/series1/01-series-post-un`). | Cada pàgina de la sèrie ha de tenir el prefix corresponent. +`weight` | L'ordre de les pàgines és fàcil de configurar de forma transparent.
La primera publicació té pes `1`, la segona pes `2` i així successivament. | Cada pàgina de la sèrie ha de tenir el seu pes configurat. +`date` | L'ordre de les pàgines es pot configurar una sola vegada a la configuració de la secció. No cal fer res a cada pàgina. | L'ordre de les pàgines s'ha d'invertir perquè la primera pàgina sol ser la més antiga. Això només es pot aconseguir paginant la secció (`paginate_by = 9999`) i invertint el seu ordre (`paginate_reversed = true`). + +{% end %} + +{{ admonition(type="danger", title="Versió de Zola per ordenar per data", text="Per invertir correctament les dates, es requereix Zola v0.19.3+ (no publicada) perquè la informació de paginació estigui disponible a través de la funció `get_section`. En cas contrari, qualsevol cosa que depengui de l'ordre de les pàgines de la sèrie no serà correcta (per exemple, pàgina anterior/següent, llistes ordenades i no ordenades...) Vegeu [Zola PR #2653](https://github.com/getzola/zola/pull/2653).") }} + +### Indexació de pàgines + +Les pàgines en una sèrie s'indexen començant des d'1, seguint el seu ordre `sort_by`. Per invertir la indexació (fent que la primera pàgina tingui l'índex més alt), afegeix aquesta configuració a `_index.md` o `config.toml`: + +```toml +[extra] +post_listing_index_reversed = true # Per defecte és false si no es configura +``` + +{{ dual_theme_image(light_src="blog/series/img/series_reversed_light.webp", dark_src="blog/series/img/series_reversed_dark.webp" alt="una sèrie amb índexs invertits", full_width=true) }} + +Aquesta configuració segueix [la jerarquia](@/blog/mastering-tabi-settings/index.ca.md#jerarquia-de-configuracio). + +## Plantilles d'introducció i conclusió + +Els articles d'una sèrie poden tenir seccions automàtiques d'introducció i conclusió. Aquestes es configuren al `_index.md` de la teva sèrie. Un exemple bàsic: + +```toml,name=series/_index.md +[extra.series_intro_templates] +default = "Aquest article és part de la sèrie $SERIES_HTML_LINK." + +[extra.series_outro_templates] +default = "Gràcies per llegir la part $SERIES_PAGE_INDEX de $SERIES_HTML_LINK!" +``` + +Les seccions d'introducció i conclusió tenen les seves pròpies classes CSS (`series-page-intro` i `series-page-outro`), que et permeten personalitzar la seva aparença mitjançant [CSS personalitzat](@/blog/mastering-tabi-settings/index.ca.md#estils-css-personalitzats). + +### Tipus de plantilles + +El sistema de sèries utilitza diferents plantilles segons la posició de l'article a la sèrie: + +- `next_only` - Utilitzat per al primer article (té article següent però no anterior) +- `middle` - Utilitzat per a articles amb articles anterior i següent +- `prev_only` - Utilitzat per a l'últim article (té article anterior però no següent) +- `default` - Plantilla per defecte utilitzada quan no existeix una plantilla específica per a la posició + +El sistema determina automàticament quina plantilla utilitzar segons la posició de l'article. Les plantilles es defineixen a la configuració de la sèrie (`_index.md`), com `extra.series_intro_templates` i `extra.series_outro_templates`: + +```toml,name=series/_index.md +[extra.series_intro_templates] +next_only = "Benvingut a la part 1! Següent: $NEXT_HTML_LINK" +middle = "Anterior: $PREV_HTML_LINK | Següent: $NEXT_HTML_LINK" +prev_only = "El capítol final! Anteriorment: $PREV_HTML_LINK" +default = "Part $SERIES_PAGE_INDEX de $SERIES_PAGES_NUMBER" +``` + +Totes les plantilles són opcionals. La selecció de plantilles segueix un sistema de prioritat: + +1. Si existeix una plantilla específica per a la posició (`next_only`, `middle`, o `prev_only`), s'utilitzarà aquesta +2. Si no, s'utilitza la plantilla `default` +3. Si no es defineix cap plantilla, no es mostrarà informació de la sèrie + +Mira l'[exemple de plantilla](#exemple-de-plantilla) per veure un exemple més elaborat. + +### Ubicació al contingut + +Per defecte: + +- Les introduccions de sèrie apareixen a l'inici del teu article +- La conclusió apareix al final (abans de les notes al peu, si n'hi ha) + +Pots controlar exactament on apareixen utilitzant `` i `` al teu Markdown: + +```markdown +Aquest paràgraf apareix abans de la introducció de la sèrie. + + + +Contingut principal de l'article. + + + +## Recursos d'aprenentatge + +Contingut addicional... + +[^1]: Les notes al peu sempre apareixeran al final. +``` + +## Variables + +Les plantilles de sèries utilitzen un sistema flexible de variables que et permet: + +1. Fer referència a informació de la sèrie (títol, enllaços) +2. Afegir navegació entre articles +3. Mostrar indicadors de progrés +4. Incloure informació personalitzada utilitzant les teves pròpies variables + +Les variables són marcadors que comencen amb `$` i es reemplacen amb contingut real quan es construeix el teu lloc. Per exemple, `$SERIES_HTML_LINK` es converteix en un enllaç clicable a la pàgina índex de la teva sèrie. + +Hi ha tres tipus de variables: + +- [Variables bàsiques de sèrie](#variables-basiques-de-serie): Informació general sobre la sèrie +- [Variables de navegació](#variables-de-navegacio): Enllaços a articles anterior/següent +- [Variables personalitzades](#variables-personalitzades): Els teus propis marcadors per a informació addicional + +### Variables bàsiques de sèrie + +{% wide_container() %} + +| Variable | Disponibilitat | Retorna | Descripció | Exemple d'ús | Exemple de sortida | +|----------|---------------|----------|------------|--------------|-------------------| +| `$SERIES_TITLE` | Sempre | Text | Títol de la sèrie en text pla | `Part de $SERIES_TITLE` | Part d'Aprenent Rust | +| `$SERIES_PERMALINK` | Sempre | Text | URL a l'índex de la sèrie | `[Veure totes les publicacions]($SERIES_PERMALINK)` | [Veure totes les publicacions](/series/learn-rust) | +| `$SERIES_HTML_LINK` | Sempre | HTML | Enllaç llest per usar a la sèrie | `Benvingut a $SERIES_HTML_LINK!` | Benvingut a Aprenent Rust! | +| `$SERIES_PAGES_NUMBER` | Sempre | Nombre | Total d'articles a la sèrie | `Una sèrie de $SERIES_PAGES_NUMBER parts` | Una sèrie de 5 parts | +| `$SERIES_PAGE_INDEX` | Sempre | Nombre | Posició de l'article actual | `Part $SERIES_PAGE_INDEX de $SERIES_PAGES_NUMBER` | Part 3 de 5 | +| `$SERIES_PAGES_OLIST` | Sempre | HTML | Llista ordenada de tots els articles | `Articles a la sèrie: $SERIES_PAGES_OLIST` | Articles a la sèrie:
  1. Article actual
  2. Altres articles
| +| `$SERIES_PAGES_ULIST` | Sempre | HTML | Llista desordenada de tots els articles | `Articles a la sèrie: $SERIES_PAGES_ULIST` | Articles a la sèrie: | + +{% end %} + +{{ admonition(type="tip", title="CONSELL: Text personalitzat amb permalinks", text='Els enllaços markdown com `[text]($SERIES_PERMALINK)` seran marcats (i [estilitzats](@/blog/mastering-tabi-settings/index.ca.md#indicador-d-enllacos-externs)) com externs. Si necessites text personalitzat i vols evitar l\'estil extern, utilitza HTML: `el teu text`.') }} + +### Variables de navegació + +{% wide_container() %} + +| Variable | Disponibilitat | Retorna | Descripció | Exemple d'ús | Exemple de sortida | +|----------|---------------|----------|------------|--------------|-------------------| +| `$PREV_TITLE` | Existeix anterior | Text | Títol de l'article anterior | `Anteriorment: $PREV_TITLE` | Anteriorment: Configurant el teu entorn | +| `$PREV_PERMALINK` | Existeix anterior | Text | URL a l'article anterior | `[← Enrere]($PREV_PERMALINK)` | [← Enrere](/series/learn-rust/setup) | +| `$PREV_HTML_LINK` | Existeix anterior | HTML | Enllaç llest per usar a l'anterior | `Llegeix primer $PREV_HTML_LINK` | Llegeix primer Configurant el teu entorn | +| `$PREV_DESCRIPTION` | Existeix anterior | Text | Descripció de l'article anterior | `Resum: $PREV_DESCRIPTION` | Resum: Configurant Rust | +| `$NEXT_TITLE` | Existeix següent | Text | Títol del següent article | `Següent: $NEXT_TITLE` | Següent: Patrons avançats | +| `$NEXT_PERMALINK` | Existeix següent | Text | URL al següent article | `[Continuar →]($NEXT_PERMALINK)` | [Continuar →](/series/learn-rust/patterns) | +| `$NEXT_HTML_LINK` | Existeix següent | HTML | Enllaç llest per usar al següent | `Continua amb $NEXT_HTML_LINK` | Continua amb Patrons avançats | +| `$NEXT_DESCRIPTION` | Existeix següent | Text | Descripció del següent article | `Properament: $NEXT_DESCRIPTION` | Properament: Aprèn sobre les característiques avançades de pattern matching en Rust | + +{% end %} + +### Referència al primer article + +{% wide_container() %} + +| Variable | Disponibilitat | Retorna | Descripció | Exemple d'ús | Exemple de sortida | +|----------|---------------|----------|------------|--------------|-------------------| +| `$FIRST_TITLE` | Sempre | Text | Títol del primer article | `Comença amb $FIRST_TITLE` | Comença amb Introducció a Rust | +| `$FIRST_HTML_LINK` | Sempre | HTML | Enllaç llest per usar al primer article | `Comença a $FIRST_HTML_LINK` | Comença a Introducció a Rust | + +{% end %} + +### Exemple de plantilla + +{{ admonition(type="tip", title="Variables HTML vs text", text="Utilitza variables HTML (que acaben en `_HTML_LINK`) quan vulguis enllaços preparats per usar. Utilitza variables de text (que acaben en `_TITLE` o `_PERMALINK`) quan vulguis més control sobre el format.") }} + +```toml,name=series/_index.md +# Introducció +[extra.series_intro_templates] +next_only = """ +Benvingut a $SERIES_HTML_LINK! Aquesta sèrie de $SERIES_PAGES_NUMBER parts t'ensenyarà Rust des de zero. + +Següent: $NEXT_HTML_LINK - $NEXT_DESCRIPTION +""" + +middle = """ +📚 Part $SERIES_PAGE_INDEX de $SERIES_PAGES_NUMBER a $SERIES_HTML_LINK + +Anterior: $PREV_HTML_LINK +Següent: $NEXT_HTML_LINK +""" + +prev_only = """ +Benvingut a l'última part de $SERIES_HTML_LINK! +Ets nou? Comença amb $FIRST_HTML_LINK per construir una base sòlida. + +Anterior: $PREV_HTML_LINK +""" + +# Plantilla de respatller +default = "Aquest article és part de la sèrie $SERIES_HTML_LINK." + +# Conclusió +[extra.series_outro_templates] +next_only = """ +Gràcies per llegir! 🙌 + +Continua el teu viatge amb $NEXT_HTML_LINK, on $NEXT_DESCRIPTION +O revisa l'esquema complet de la sèrie [$SERIES_TITLE]($SERIES_PERMALINK). +""" + +middle = """ +--- +📝 Navegació de la sèrie + +- Anterior: $PREV_HTML_LINK +- Següent: $NEXT_HTML_LINK +- [Resum de la sèrie]($SERIES_PERMALINK) +""" + +prev_only = """ +🎉 Felicitats! Has completat $SERIES_HTML_LINK. + +Vols repassar? Aquí vam començar: $FIRST_HTML_LINK +O revisa el que acabem de veure a $PREV_HTML_LINK. +""" + +# Respatller. +default = """ +--- +Aquest article és la part $SERIES_PAGE_INDEX de $SERIES_PAGES_NUMBER a $SERIES_HTML_LINK. +""" +``` + +### Variables personalitzades + +Les plantilles de sèries admeten variables personalitzades per incloure informació addicional a tota la teva sèrie. El procés té dos passos: + +1. Primer, defineix els teus **marcadors** a la configuració de la teva sèrie (`_index.md`): + +```toml,name=series/_index.md +[extra] +series = true +series_template_placeholders = ["$POSITION", "$TOPIC", "$DIFFICULTY"] +``` + +2. Després, a cada article de la sèrie, proporciona els valors per a aquests marcadors a `series_template_variables`: + +```toml,name=series/article.md +[extra.series_template_variables] +position = "primer" +topic = "Variables i tipus" +difficulty = "Principiant" +``` + +### Ús de variables personalitzades + +Pots usar les teves variables personalitzades a qualsevol plantilla, juntament amb les variables integrades: + +```toml,name=series/_index.md +[extra.series_intro_templates] +default = """ +Aquest és l'article $POSITION a $SERIES_HTML_LINK. +Tema d'avui: $TOPIC +Nivell de dificultat: $DIFFICULTY +""" +``` + +{{ admonition(type="warning", text="Encara que els marcadors es defineixen en majúscules (`$POSITION`), els noms de variables a `series_template_variables` han d'estar en minúscules (`position`).") }} + +### Exemple amb variables personalitzades + +```toml,name=series/_index.md +# A la configuració de la sèrie. +[extra] +series = true +series_template_placeholders = ["$LEARNING_TIME", "$KEY_CONCEPTS"] + +series_intro_templates.default = """ +📚 Part $SERIES_PAGE_INDEX de $SERIES_PAGES_NUMBER +⏱️ Temps estimat: $LEARNING_TIME +🔑 Conceptes clau: $KEY_CONCEPTS +""" +``` + +```toml,name=series/02-learning-rust/index.md +# En un article de la sèrie. +[extra.series_template_variables] +learning_time = "30 minuts" +key_concepts = "Funcions, gestió d'errors, coincidència de patrons" +``` + +Això generarà: + +```txt +📚 Part 2 de 5 +⏱️ Temps estimat: 30 minuts +🔑 Conceptes clau: Funcions, gestió d'errors, coincidència de patrons +``` + +{{ admonition(type="warning", title="Variables que falten", text="Si uses un marcador a les teves plantilles però no proporciones el seu valor a `series_template_variables`, la compilació fallarà amb un error que llista les variables que falten.") }} diff --git a/content/blog/series/index.es.md b/content/blog/series/index.es.md new file mode 100644 index 0000000..9c6d673 --- /dev/null +++ b/content/blog/series/index.es.md @@ -0,0 +1,409 @@ ++++ +title = "Guía completa sobre series" +date = 2024-11-08 +updated = 2025-02-21 +description = "Aprende a organizar tus publicaciones en series secuenciales, perfectas para tutoriales, cursos e historias de varias partes." + +[taxonomies] +tags = ["funcionalidad", "tutorial", "preguntas frecuentes", "series"] + +[extra] +quick_navigation_buttons = true +toc = true +mermaid = true +social_media_card = "social_cards/es_blog_series.jpg" ++++ + +Una serie organiza publicaciones relacionadas en orden secuencial, similar a los capítulos de un libro. A diferencia de las etiquetas, que simplemente agrupan contenido relacionado, las series sugieren un orden específico de lectura de principio a fin. + +Las publicaciones dentro de una serie no necesitan publicarse de forma consecutiva; la función de series reúne publicaciones temáticamente vinculadas en una secuencia coherente. + +El siguiente diagrama ilustra cómo las publicaciones de la serie (3, 5 y 8) existen dentro del flujo principal del blog mientras mantienen su propia secuencia ordenada dentro de Serie 1. + +{% mermaid(full_width=true) %} +flowchart + subgraph main[BLOG] + P1[Post 1] + P2[P2] + P3[P3] + P4[P4] + P5[P5] + P6[P6] + P7[P7] + P8[P8] + P9[P9] + end + subgraph series1[SERIE 1] + PS1["Post Serie 1 (=P3)"] + PS2["Post Serie 2 (=P5)"] + PS3["Post Serie 3 (=P8)"] + end + P3 o-.-o PS1 + P5 o-.-o PS2 + P8 o-.-o PS3 +{% end %} + +## Inicio rápido + +1. Crea un directorio para tu serie +2. Crea `_index.md` en el directorio de la serie +3. Configura el front matter de `_index.md`: + + ```toml,name=series/_index.md + title = "Aprendiendo Rust" + template = "series.html" + sort_by = "slug" + transparent = true + + [extra] + series = true + ``` + +4. Crea tus artículos de la serie en este directorio + +¿Quieres saber más? ¡Sigue leyendo! + +## ¿Cómo funcionan las series? + +Una serie es simplemente una sección que tabi maneja de manera especial. Para más detalles sobre secciones, consulta la [documentación de Zola](https://www.getzola.org/documentation/content/section/). + +Tomando el ejemplo del diagrama anterior, la estructura de directorios sería así: + +```txt +content/ + _index.md + blog/ + _index.md + post1/ + index.md + post2/ + index.md + post4/ + index.md + post6/ + index.md + post7/ + index.md + post9/ + index.md + serie1/ + _index.md + post3/ + index.md + post5/ + index.md + post8/ + index.md +``` + +Para crear una serie, necesitas: + +1. Usar la plantilla `series.html` +2. Establecer `series = true` en la configuración `[extra]` de la sección +3. Activar `transparent = true` para integrar las publicaciones de la serie con la sección del blog principal + +La página principal de la serie muestra un resumen seguido de una lista de todas las publicaciones en la serie: + +{{ dual_theme_image(light_src="blog/series/img/series_light.webp", dark_src="blog/series/img/series_dark.webp" alt="una serie", full_width=true) }} + +## Saltar a las publicaciones + +Si el contenido de una serie (el Markdown después del frontmatter en `_index.md`) supera los 2000 caracteres, aparece un enlace "Saltar a publicaciones" junto al título de la serie. + +{{ dual_theme_image(light_src="blog/series/img/jump_to_series_posts_light.webp", dark_src="blog/series/img/jump_to_series_posts_dark.webp" alt="enlace para saltar a las publicaciones de la serie", full_width=true) }} + +Para forzar la activación o desactivación de esta función, configura `show_jump_to_posts` en la sección `[extra]` de tu sección de series o en `config.toml`. Esta configuración sigue [la jerarquía](@/blog/mastering-tabi-settings/index.es.md#jerarquia-de-configuracion). + +## Páginas de series y orden + +Todas las páginas en la sección de series serán páginas de serie. Las páginas se ordenarán según el `sort_by` de la sección. + +Aunque las series mantienen su propio orden interno, permanecen independientes del flujo cronológico de la sección principal (por ejemplo, `blog/`) gracias a la configuración `transparent`. + +### Opciones de orden + +Elige entre estos métodos de orden, cada uno con sus ventajas: + +{% wide_container() %} + +`sort_by` | ventajas | desventajas +---------|-------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +`slug` | El orden de las páginas es explícito en la ruta (por ejemplo, `example.com/blog/series1/01-series-post-uno`). | Cada página de la serie debe tener el prefijo correspondiente. +`weight` | El orden de las páginas es fácil de configurar de forma transparente.
La primera publicación tiene peso `1`, la segunda peso `2` y así sucesivamente. | Cada página de la serie debe tener su peso configurado. +`date` | El orden de las páginas se puede configurar una sola vez en la configuración de la sección. No hay que hacer nada en cada página. | El orden de las páginas debe invertirse porque la primera página suele ser la más antigua. Esto solo se puede lograr paginando la sección (`paginate_by = 9999`) e invirtiendo su orden (`paginate_reversed = true`). + +{% end %} + +{{ admonition(type="danger", title="Versión de Zola para ordenar por fecha", text="Para invertir correctamente las fechas, se requiere Zola v0.19.3+ (no publicada) para que la información de paginación esté disponible a través de la función `get_section`. De lo contrario, cualquier cosa que dependa del orden de las páginas de la serie no será correcta (por ejemplo, página anterior/siguiente, listas ordenadas y no ordenadas...) Ver [Zola PR #2653](https://github.com/getzola/zola/pull/2653).") }} + +### Indexación de páginas + +Las páginas en una serie se indexan empezando desde 1, siguiendo su orden `sort_by`. Para invertir la indexación (haciendo que la primera página tenga el índice más alto), añade esta configuración a `_index.md` o `config.toml`: + +```toml +[extra] +post_listing_index_reversed = true # Por defecto es false si no se configura +``` + +{{ dual_theme_image(light_src="blog/series/img/series_reversed_light.webp", dark_src="blog/series/img/series_reversed_dark.webp" alt="una serie con índices invertidos", full_width=true) }} + +Esta configuración sigue [la jerarquía](@/blog/mastering-tabi-settings/index.es.md#jerarquia-de-configuracion). + +## Plantillas de introducción y conclusión + +Los artículos de una serie pueden tener secciones automáticas de introducción y conclusión. Estas se configuran en el `_index.md` de tu serie. Un ejemplo básico: + +```toml,name=series/_index.md +[extra.series_intro_templates] +default = "Este artículo es parte de la serie $SERIES_HTML_LINK." + +[extra.series_outro_templates] +default = "¡Gracias por leer la parte $SERIES_PAGE_INDEX de $SERIES_HTML_LINK!" +``` + +Las secciones de introducción y conclusión tienen sus propias clases CSS (`series-page-intro` y `series-page-outro`), lo que te permite personalizar su apariencia mediante [CSS personalizado](@/blog/mastering-tabi-settings/index.es.md#estilos-css-personalizados). + +### Tipos de plantillas + +El sistema de series usa diferentes plantillas según la posición del artículo en la serie: + +- `next_only` - Usado para el primer artículo (tiene artículo siguiente pero no anterior) +- `middle` - Usado para artículos con artículos anterior y siguiente +- `prev_only` - Usado para el último artículo (tiene artículo anterior pero no siguiente) +- `default` - Plantilla por defecto usada cuando no existe una plantilla específica para la posición + +El sistema determina automáticamente qué plantilla usar según la posición del artículo. Las plantillas se definen en la configuración de la serie (`_index.md`), como `extra.series_intro_templates` y `extra.series_outro_templates`: + +```toml,name=series/_index.md +[extra.series_intro_templates] +next_only = "¡Bienvenido a la parte 1! Siguiente: $NEXT_HTML_LINK" +middle = "Anterior: $PREV_HTML_LINK | Siguiente: $NEXT_HTML_LINK" +prev_only = "¡El capítulo final! Anteriormente: $PREV_HTML_LINK" +default = "Parte $SERIES_PAGE_INDEX de $SERIES_PAGES_NUMBER" +``` + +Todas las plantillas son opcionales. La selección de plantillas sigue un sistema de prioridad: + +1. Si existe una plantilla específica para la posición (`next_only`, `middle`, o `prev_only`), se usará esa +2. Si no, se usa la plantilla `default` +3. Si no se define ninguna plantilla, no se mostrará información de la serie + +Mira el [ejemplo de plantilla](#ejemplo-de-plantilla) para ver un ejemplo más elaborado. + +### Ubicación en el contenido + +Por defecto: + +- Las introducciones de serie aparecen al inicio de tu artículo +- La conclusión aparece al final (antes de las notas al pie, si las hay) + +Puedes controlar exactamente dónde aparecen usando `` y `` en tu Markdown: + +```markdown +Este párrafo aparece antes de la introducción de la serie. + + + +Contenido principal del artículo. + + + +## Recursos de aprendizaje + +Contenido adicional... + +[^1]: Las notas al pie siempre aparecerán al final. +``` + +## Variables + +Las plantillas de series usan un sistema flexible de variables que te permite: + +1. Hacer referencia a información de la serie (título, enlaces) +2. Añadir navegación entre artículos +3. Mostrar indicadores de progreso +4. Incluir información personalizada usando tus propias variables + +Las variables son marcadores que comienzan con `$` y se reemplazan con contenido real cuando se construye tu sitio. Por ejemplo, `$SERIES_HTML_LINK` se convierte en un enlace clicable a la página índice de tu serie. + +Hay tres tipos de variables: + +- [Variables básicas de serie](#variables-basicas-de-serie): Información general sobre la serie +- [Variables de navegación](#variables-de-navegacion): Enlaces a artículos anterior/siguiente +- [Variables personalizadas](#variables-personalizadas): Tus propios marcadores para información adicional + +### Variables básicas de serie + +{% wide_container() %} + +| Variable | Disponibilidad | Devuelve | Descripción | Ejemplo de uso | Ejemplo de salida | +|----------|---------------|-----------|-------------|----------------|-------------------| +| `$SERIES_TITLE` | Siempre | Texto | Título de la serie en texto plano | `Parte de $SERIES_TITLE` | Parte de Aprendiendo Rust | +| `$SERIES_PERMALINK` | Siempre | Texto | URL al índice de la serie | `[Ver todas las publicaciones]($SERIES_PERMALINK)` | [Ver todas las publicaciones](/series/learn-rust) | +| `$SERIES_HTML_LINK` | Siempre | HTML | Enlace listo para usar a la serie | `¡Bienvenido a $SERIES_HTML_LINK!` | ¡Bienvenido a Aprendiendo Rust! | +| `$SERIES_PAGES_NUMBER` | Siempre | Número | Total de artículos en la serie | `Una serie de $SERIES_PAGES_NUMBER partes` | Una serie de 5 partes | +| `$SERIES_PAGE_INDEX` | Siempre | Número | Posición del artículo actual | `Parte $SERIES_PAGE_INDEX de $SERIES_PAGES_NUMBER` | Parte 3 de 5 | +| `$SERIES_PAGES_OLIST` | Siempre | HTML | Lista ordenada de todos los artículos | `Artículos en la serie: $SERIES_PAGES_OLIST` | Artículos en la serie:
  1. Artículo actual
  2. Otros artículos
| +| `$SERIES_PAGES_ULIST` | Siempre | HTML | Lista desordenada de todos los artículos | `Artículos en la serie: $SERIES_PAGES_ULIST` | Artículos en la serie: | + +{% end %} + +{{ admonition(type="tip", title="CONSEJO: Texto personalizado con permalinks", text='Los enlaces markdown como `[texto]($SERIES_PERMALINK)` serán marcados (y [estilizados](@/blog/mastering-tabi-settings/index.es.md#indicador-enlaces-externos)) como externos. Si necesitas texto personalizado y quieres evitar el estilo externo, usa HTML: `tu texto`.') }} + +### Variables de navegación + +{% wide_container() %} + +| Variable | Disponibilidad | Devuelve | Descripción | Ejemplo de uso | Ejemplo de salida | +|----------|---------------|-----------|-------------|----------------|-------------------| +| `$PREV_TITLE` | Existe anterior | Texto | Título del artículo anterior | `Anteriormente: $PREV_TITLE` | Anteriormente: Configurando tu entorno | +| `$PREV_PERMALINK` | Existe anterior | Texto | URL al artículo anterior | `[← Atrás]($PREV_PERMALINK)` | [← Atrás](/series/learn-rust/setup) | +| `$PREV_HTML_LINK` | Existe anterior | HTML | Enlace listo para usar al anterior | `Lee primero $PREV_HTML_LINK` | Lee primero Configurando tu entorno | +| `$PREV_DESCRIPTION` | Existe anterior | Texto | Descripción del artículo anterior | `Resumen: $PREV_DESCRIPTION` | Resumen: Configurando Rust | +| `$NEXT_TITLE` | Existe siguiente | Texto | Título del siguiente artículo | `Siguiente: $NEXT_TITLE` | Siguiente: Patrones avanzados | +| `$NEXT_PERMALINK` | Existe siguiente | Texto | URL al siguiente artículo | `[Continuar →]($NEXT_PERMALINK)` | [Continuar →](/series/learn-rust/patterns) | +| `$NEXT_HTML_LINK` | Existe siguiente | HTML | Enlace listo para usar al siguiente | `Continúa con $NEXT_HTML_LINK` | Continúa con Patrones avanzados | +| `$NEXT_DESCRIPTION` | Existe siguiente | Texto | Descripción del siguiente artículo | `Próximamente: $NEXT_DESCRIPTION` | Próximamente: Aprende sobre las características avanzadas de pattern matching en Rust | + +{% end %} + +### Referencia al primer artículo + +{% wide_container() %} + +| Variable | Disponibilidad | Devuelve | Descripción | Ejemplo de uso | Ejemplo de salida | +|----------|---------------|-----------|-------------|----------------|-------------------| +| `$FIRST_TITLE` | Siempre | Texto | Título del primer artículo | `Comienza con $FIRST_TITLE` | Comienza con Introducción a Rust | +| `$FIRST_HTML_LINK` | Siempre | HTML | Enlace listo para usar al primer artículo | `Empieza en $FIRST_HTML_LINK` | Empieza en Introducción a Rust | + +{% end %} + +### Ejemplo de plantilla + +{{ admonition(type="tip", title="Variables HTML vs texto", text="Usa variables HTML (que terminan en `_HTML_LINK`) cuando quieras enlaces listos para usar. Usa variables de texto (que terminan en `_TITLE` o `_PERMALINK`) cuando quieras más control sobre el formato.") }} + +```toml,name=series/_index.md +# Introducción. +[extra.series_intro_templates] +next_only = """ +¡Bienvenido a $SERIES_HTML_LINK! Esta serie de $SERIES_PAGES_NUMBER partes te enseñará Rust desde cero. + +Siguiente: $NEXT_HTML_LINK - $NEXT_DESCRIPTION +""" + +middle = """ +📚 Parte $SERIES_PAGE_INDEX de $SERIES_PAGES_NUMBER en $SERIES_HTML_LINK + +Anterior: $PREV_HTML_LINK +Siguiente: $NEXT_HTML_LINK +""" + +prev_only = """ +¡Bienvenido a la última parte de $SERIES_HTML_LINK! +¿Eres nuevo? Comienza con $FIRST_HTML_LINK para construir una base sólida. + +Anterior: $PREV_HTML_LINK +""" + +# Plantilla de respaldo. +default = "Este artículo es parte de la serie $SERIES_HTML_LINK." + +# Conclusión. +[extra.series_outro_templates] +next_only = """ +¡Gracias por leer! 🙌 + +Continúa tu viaje con $NEXT_HTML_LINK, donde $NEXT_DESCRIPTION +O revisa el esquema completo de la serie [$SERIES_TITLE]($SERIES_PERMALINK). +""" + +middle = """ +--- +📝 Navegación de la serie + +- Anterior: $PREV_HTML_LINK +- Siguiente: $NEXT_HTML_LINK +- [Resumen de la serie]($SERIES_PERMALINK) +""" + +prev_only = """ +🎉 ¡Felicidades! Has completado $SERIES_HTML_LINK. + +¿Quieres repasar? Aquí comenzamos: $FIRST_HTML_LINK +O revisa lo que acabamos de ver en $PREV_HTML_LINK. +""" + +# Respaldo. +default = """ +--- +Este artículo es la parte $SERIES_PAGE_INDEX de $SERIES_PAGES_NUMBER en $SERIES_HTML_LINK. +""" +``` + +### Variables personalizadas + +Las plantillas de series admiten variables personalizadas para incluir información adicional en toda tu serie. El proceso tiene dos pasos: + +1. Primero, define tus **marcadores** en la configuración de tu serie (`_index.md`): + +```toml,name=series/_index.md +[extra] +series = true +series_template_placeholders = ["$POSITION", "$TOPIC", "$DIFFICULTY"] +``` + +2. Luego, en cada artículo de la serie, proporciona los valores para estos marcadores en `series_template_variables`: + +```toml,name=series/article.md +[extra.series_template_variables] +position = "primero" +topic = "Variables y tipos" +difficulty = "Principiante" +``` + +### Uso de variables personalizadas + +Puedes usar tus variables personalizadas en cualquier plantilla, junto con las variables integradas: + +```toml,name=series/_index.md +[extra.series_intro_templates] +default = """ +Este es el artículo $POSITION en $SERIES_HTML_LINK. +Tema de hoy: $TOPIC +Nivel de dificultad: $DIFFICULTY +""" +``` + +{{ admonition(type="warning", text="Aunque los marcadores se definen en mayúsculas (`$POSITION`), los nombres de variables en `series_template_variables` deben estar en minúsculas (`position`).") }} + +### Ejemplo con variables personalizadas + +```toml,name=series/_index.md +# En la configuración de la serie. +[extra] +series = true +series_template_placeholders = ["$LEARNING_TIME", "$KEY_CONCEPTS"] + +series_intro_templates.default = """ +📚 Parte $SERIES_PAGE_INDEX de $SERIES_PAGES_NUMBER +⏱️ Tiempo estimado: $LEARNING_TIME +🔑 Conceptos clave: $KEY_CONCEPTS +""" +``` + +```toml,name=series/02-learning-rust/index.md +# En un artículo de la serie. +[extra.series_template_variables] +learning_time = "30 minutos" +key_concepts = "Funciones, manejo de errores, coincidencia de patrones" +``` + +Esto generará: + +```txt +📚 Parte 2 de 5 +⏱️ Tiempo estimado: 30 minutos +🔑 Conceptos clave: Funciones, manejo de errores, coincidencia de patrones +``` + +{{ admonition(type="warning", title="Variables faltantes", text="Si usas un marcador en tus plantillas pero no proporcionas su valor en `series_template_variables`, la compilación fallará con un error que lista las variables faltantes.") }} diff --git a/content/blog/series/index.md b/content/blog/series/index.md new file mode 100644 index 0000000..b17ce42 --- /dev/null +++ b/content/blog/series/index.md @@ -0,0 +1,409 @@ ++++ +title = "A Complete Guide to Series" +date = 2024-11-08 +updated = 2025-02-21 +description = "Learn how to organize your posts into sequential series, perfect for tutorials, courses, and multi-part stories." + +[taxonomies] +tags = ["showcase", "tutorial", "FAQ", "series"] + +[extra] +quick_navigation_buttons = true +toc = true +mermaid = true +social_media_card = "social_cards/es_blog_series.jpg" ++++ + +A series organizes related posts in a sequential order, similar to chapters in a book. Unlike tags, which simply group related content, series suggest a specific reading order from start to finish. + +Posts within a series do not need to be published consecutively; the series feature brings together thematically linked posts in a coherent sequence. + +The diagram below illustrates how series posts (3, 5, and 8) exist within the main blog flow while maintaining their own ordered sequence within Series 1. + +{% mermaid(full_width=true) %} +flowchart + subgraph main[BLOG] + P1[Post 1] + P2[P2] + P3[P3] + P4[P4] + P5[P5] + P6[P6] + P7[P7] + P8[P8] + P9[P9] + end + subgraph series1[SERIES 1] + PS1["Series Post 1 (=P3)"] + PS2["Series Post 2 (=P5)"] + PS3["Series Post 3 (=P8)"] + end + P3 o-.-o PS1 + P5 o-.-o PS2 + P8 o-.-o PS3 +{% end %} + +## Quick Start + +1. Create a directory for your series. +2. Create `_index.md` in the series directory. +3. Set up the `_index.md` front matter: + + ```toml,name=series/_index.md + title = "Learning Rust" + template = "series.html" + sort_by = "slug" + transparent = true + + [extra] + series = true + ``` + +4. Create your series articles in this directory. + +Want more? Keep reading! + +## How Do Series Work? + +A series is just a section which is handled in a special way by tabi. For more details on sections, see the [Zola documentation](https://www.getzola.org/documentation/content/section/). + +Taking the example from the diagram above, the directory structure would be as follow: + +```txt +content/ + _index.md + blog/ + _index.md + post1/ + index.md + post2/ + index.md + post4/ + index.md + post6/ + index.md + post7/ + index.md + post9/ + index.md + series1/ + _index.md + post3/ + index.md + post5/ + index.md + post8/ + index.md +``` + +To create a series, you need to: + +1. Use the `series.html` template +2. Set `series = true` in the section's `[extra]` configuration +3. Enable `transparent = true` to integrate series posts with the parent blog section + +The series main page displays an overview followed by a list of all posts in the series: + +{{ dual_theme_image(light_src="blog/series/img/series_light.webp", dark_src="blog/series/img/series_dark.webp" alt="a series", full_width=true) }} + +## Jump to Posts + +If the content of a series (the Markdown after the front matter in `_index.md`) is over 2000 characters, a "Jump to posts" link appears next to the series title. + +{{ dual_theme_image(light_src="blog/series/img/jump_to_series_posts_light.webp", dark_src="blog/series/img/jump_to_series_posts_dark.webp" alt="jump to series posts link", full_width=true) }} + +To force the feature on or off, set `show_jump_to_posts` in the `[extra]` section of your series section or in `config.toml`. This setting follows [the hierarchy](@/blog/mastering-tabi-settings/index.md#settings-hierarchy). + +## Series Pages and Order + +All pages in the series section will be a series page. The series pages will be ordered as per the series section `sort_by`. + +While series maintain their own internal order, they remain independent from the main section's (e.g. `blog/`) chronological flow thanks to the `transparent` setting. + +### Sorting Options + +Choose from these sorting methods, each with its own advantages: + +{% wide_container() %} + +`sort_by` | pros | cons +---------|-------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + `slug` | The series pages order is made explicit in the path (e.g. `example.com/blog/series1/01-series-post-one`). | Each series page must be prefixed accordingly. + `weight` | The series pages order is easy to set up transparently.
First series post has weight `1`, second series post has weight `2` and so on. | Each series page must have its weight set accordingly. + `date` | The series pages order can be configured once in the series section configuration. No need to do anything on each series page. | The series pages order has to be reversed because the first page is usually the oldest. This can only be achieved by paginating the series section (`paginate_by = 9999`) and reversing its order (`paginate_reversed = true`). + +{% end %} + +{{ admonition(type="danger", title="Zola version to sort by date", text="In order to properly reverse dates, Zola v0.19.3+ (unreleased) is required so that pagination information is available through the `get_section` function. Anything relying on the series pages order won't be correct in a series page otherwise (e.g. previous/next series page, ordered and unordered list…) See [Zola PR #2653](https://github.com/getzola/zola/pull/2653).") }} + +### Page Indexing + +Pages in a series are indexed starting from 1, following their `sort_by` order. To reverse the indexing (making the first page have the highest index instead), add this setting to `_index.md` or `config.toml`: + +```toml +[extra] +post_listing_index_reversed = true # Defaults to false if unset. +``` + +{{ dual_theme_image(light_src="blog/series/img/series_reversed_light.webp", dark_src="blog/series/img/series_reversed_dark.webp" alt="a series with indexes reversed", full_width=true) }} + +This setting follows [the hierarchy](@/blog/mastering-tabi-settings/index.md#settings-hierarchy). + +## Intro and Outro Templates + +Series articles can have automatic introduction and conclusion sections. These are configured in your series' `_index.md`. A basic example: + +```toml,name=series/_index.md +[extra.series_intro_templates] +default = "This article is part of the $SERIES_HTML_LINK series." + +[extra.series_outro_templates] +default = "Thanks for reading part $SERIES_PAGE_INDEX of $SERIES_HTML_LINK!" +``` + +The intro and outro sections each have their own CSS classes (`series-page-intro` and `series-page-outro`), allowing you to customize their appearance through [custom CSS](@/blog/mastering-tabi-settings/index.md#custom-css). + +### Template Types + +The series system uses different templates based on an article's position in the series: + +- `next_only` - Used for the first article (has next article but no previous) +- `middle` - Used for articles with both previous and next articles +- `prev_only` - Used for the last article (has previous article but no next) +- `default` - Fallback template used when a specific position template isn't defined + +The system automatically determines which template to use based on the article's position. The templates are defined in the series configuration (`_index.md`), as `extra.series_intro_templates` and `extra.series_outro_templates`.: + +```toml,name=series/_index.md +[extra.series_intro_templates] +next_only = "Welcome to part 1! Next up: $NEXT_HTML_LINK" +middle = "Previous: $PREV_HTML_LINK | Next: $NEXT_HTML_LINK" +prev_only = "The final chapter! Previously: $PREV_HTML_LINK" +default = "Part $SERIES_PAGE_INDEX of $SERIES_PAGES_NUMBER" +``` + +All templates are optional. Template selection follows a priority system: + +1. If a position-specific template exists (`next_only`, `middle`, or `prev_only`), it will be used +2. Otherwise, the `default` template is used +3. If no templates are defined at all, no series information will be displayed + +See the [template example](#template-example) for a more elaborate example. + +### Placement in Content + +By default: + +- Series introductions appear at the start of your article +- Series outro appears at the end (before footnotes, if any) + +You can control exactly where these appear using `` and `` in your Markdown: + +```markdown +This paragraph appears before the series introduction. + + + +Main content of the article. + + + +## Learning Resources + +Extra content… + +[^1]: Footnotes will always appear at the end. +``` + +## Variables + +Series templates use a flexible variable system that lets you: + +1. Reference series information (title, links) +2. Add navigation between articles +3. Show progress indicators +4. Include custom information using your own variables + +Variables are placeholders starting with `$` that get replaced with actual content when your site builds. For example, `$SERIES_HTML_LINK` becomes a clickable link to your series index page. + +There are three types of variables: + +- [**Basic Series Variables**](#basic-series-variables): General information about the series +- [**Navigation Variables**](#navigation-variables): Links to previous/next articles +- [**Custom Variables**](#custom-variables): Your own placeholders for additional information + +### Basic Series Variables + +{% wide_container() %} + +| Variable | Availability | Returns | Description | Example Usage | Example Output | +|----------|-------------|---------|-------------|---------------|----------------| +| `$SERIES_TITLE` | Always | Text | Plain text title of the series | `Part of $SERIES_TITLE` | Part of Learn Rust | +| `$SERIES_PERMALINK` | Always | Text | URL to series index | `[See all posts]($SERIES_PERMALINK)` | [See all posts](/series/learn-rust) | +| `$SERIES_HTML_LINK` | Always | HTML | Ready-to-use link to series | `Welcome to $SERIES_HTML_LINK!` | Welcome to Learn Rust! | +| `$SERIES_PAGES_NUMBER` | Always | Number | Total articles in series | `A $SERIES_PAGES_NUMBER part series` | A 5 part series | +| `$SERIES_PAGE_INDEX` | Always | Number | Current article's position | `Part $SERIES_PAGE_INDEX of $SERIES_PAGES_NUMBER` | Part 3 of 5 | +| `$SERIES_PAGES_OLIST` | Always | HTML | Ordered list of all articles | `Articles in series: $SERIES_PAGES_OLIST` | Articles in series:
  1. Current article
  2. Other articles
| +| `$SERIES_PAGES_ULIST` | Always | HTML | Unordered list of all articles | `Articles in series: $SERIES_PAGES_ULIST` | Articles in series: | + +{% end %} + +{{ admonition(type="tip", title="TIP: Custom text with permalinks", text='Markdown links like `[text]($SERIES_PERMALINK)` will be marked (and [styled](@/blog/mastering-tabi-settings/index.md#external-link-indicator)) as external. If you need custom text and want to avoid external styling, use HTML: `your text`.') }} + +### Navigation Variables + +{% wide_container() %} + +| Variable | Availability | Returns | Description | Example Usage | Example Output | +|----------|-------------|---------|-------------|---------------|----------------| +| `$PREV_TITLE` | Previous exists | Text | Previous article's title | `Previously: $PREV_TITLE` | Previously: Setting Up Your Environment | +| `$PREV_PERMALINK` | Previous exists | Text | URL to previous article | `[← Back]($PREV_PERMALINK)` | [← Back](/series/learn-rust/setup) | +| `$PREV_HTML_LINK` | Previous exists | HTML | Ready-to-use link to previous | `Read $PREV_HTML_LINK first` | Read Setting Up Your Environment first | +| `$PREV_DESCRIPTION` | Previous exists | Text | Description of previous article | `Recap: $PREV_DESCRIPTION` | Recap: Setting up Rust | +| `$NEXT_TITLE` | Next exists | Text | Next article's title | `Next up: $NEXT_TITLE` | Next up: Advanced Patterns | +| `$NEXT_PERMALINK` | Next exists | Text | URL to next article | `[Continue →]($NEXT_PERMALINK)` | [Continue →](/series/learn-rust/patterns) | +| `$NEXT_HTML_LINK` | Next exists | HTML | Ready-to-use link to next | `Continue with $NEXT_HTML_LINK` | Continue with Advanced Patterns | +| `$NEXT_DESCRIPTION` | Next exists | Text | Description of next article | `Coming up: $NEXT_DESCRIPTION` | Coming up: Learn about Rust's advanced pattern matching features | + +{% end %} + +### First Article Reference + +{% wide_container() %} + +| Variable | Availability | Returns | Description | Example Usage | Example Output | +|----------|-------------|---------|-------------|---------------|----------------| +| `$FIRST_TITLE` | Always | Text | First article's title | `Start with $FIRST_TITLE` | Start with Introduction to Rust | +| `$FIRST_HTML_LINK` | Always | HTML | Ready-to-use link to first article | `Begin at $FIRST_HTML_LINK` | Begin at Introduction to Rust | + +{% end %} + +### Template Example + +{{ admonition(type="tip", title="HTML vs text variables", text="Use HTML variables (ending in `_HTML_LINK`) when you want ready-made links. Use text variables (ending in `_TITLE` or `_PERMALINK`) when you want more control over the formatting.") }} + +```toml,name=series/_index.md +# Introduction. +[extra.series_intro_templates] +next_only = """ +Welcome to $SERIES_HTML_LINK! This $SERIES_PAGES_NUMBER-part series will teach you Rust from scratch. + +Up next: $NEXT_HTML_LINK - $NEXT_DESCRIPTION +""" + +middle = """ +📚 Part $SERIES_PAGE_INDEX of $SERIES_PAGES_NUMBER in $SERIES_HTML_LINK + +Previously: $PREV_HTML_LINK +Next up: $NEXT_HTML_LINK +""" + +prev_only = """ +Welcome to the final part of $SERIES_HTML_LINK! +New here? Start with $FIRST_HTML_LINK to build a strong foundation. + +Previously: $PREV_HTML_LINK +""" + +# Fallback template. +default = "This article is part of the $SERIES_HTML_LINK series." + +# Outro. +[extra.series_outro_templates] +next_only = """ +Thanks for reading! 🙌 + +Continue your journey with $NEXT_HTML_LINK, where $NEXT_DESCRIPTION +Or check out the complete [$SERIES_TITLE]($SERIES_PERMALINK) series outline. +""" + +middle = """ +--- +📝 Series Navigation + +- Previous: $PREV_HTML_LINK +- Next: $NEXT_HTML_LINK +- [Series Overview]($SERIES_PERMALINK) +""" + +prev_only = """ +🎉 Congratulations! You've completed $SERIES_HTML_LINK. + +Want to review? Here's where we started: $FIRST_HTML_LINK +Or check what we just covered in $PREV_HTML_LINK. +""" + +# Fallback. +default = """ +--- +This article is part $SERIES_PAGE_INDEX of $SERIES_PAGES_NUMBER in $SERIES_HTML_LINK. +""" +``` + +### Custom Variables + +Series templates support custom variables for additional information you want to include across your series. The process takes two steps: + +1. First, define your **placeholders** in your series configuration (`_index.md`): + +```toml,name=series/_index.md +[extra] +series = true +series_template_placeholders = ["$POSITION", "$TOPIC", "$DIFFICULTY"] +``` + +2. Then, in each series article, provide the values for these placeholders in `series_template_variables`: + +```toml,name=series/article.md +[extra.series_template_variables] +position = "first" +topic = "Variables and Types" +difficulty = "Beginner" +``` + +### Using Custom Variables + +You can use your custom variables in any template, alongside the built-in variables: + +```toml,name=series/_index.md +[extra.series_intro_templates] +default = """ +This is the $POSITION article in $SERIES_HTML_LINK. +Today's topic: $TOPIC +Difficulty level: $DIFFICULTY +""" +``` + +{{ admonition(type="warning", text="While placeholders are defined with uppercase (`$POSITION`), the variable names in `series_template_variables` must be lowercase (`position`).") }} + +### Example with Custom Variables + +```toml,name=series/_index.md +# In the series configuration. +[extra] +series = true +series_template_placeholders = ["$LEARNING_TIME", "$KEY_CONCEPTS"] + +series_intro_templates.default = """ +📚 Part $SERIES_PAGE_INDEX of $SERIES_PAGES_NUMBER +⏱️ Estimated time: $LEARNING_TIME +🔑 Key concepts: $KEY_CONCEPTS +""" +``` + +```toml,name=series/02-learning-rust/index.md +# In an article of the series. +[extra.series_template_variables] +learning_time = "30 minutes" +key_concepts = "Functions, Error Handling, Pattern Matching" +``` + +This will output: + +```txt +📚 Part 2 of 5 +⏱️ Estimated time: 30 minutes +🔑 Key concepts: Functions, Error Handling, Pattern Matching +``` + +{{ admonition(type="warning", title="Missing Variables", text="If you use a placeholder in your templates but don't provide its value in `series_template_variables`, the build will fail with an error listing the missing variables.") }} diff --git a/content/blog/series/social_cards/blog_series.jpg b/content/blog/series/social_cards/blog_series.jpg new file mode 100644 index 0000000..0de6828 Binary files /dev/null and b/content/blog/series/social_cards/blog_series.jpg differ diff --git a/content/blog/series/social_cards/ca_blog_series.jpg b/content/blog/series/social_cards/ca_blog_series.jpg new file mode 100644 index 0000000..12ccc6c Binary files /dev/null and b/content/blog/series/social_cards/ca_blog_series.jpg differ diff --git a/content/blog/series/social_cards/es_blog_series.jpg b/content/blog/series/social_cards/es_blog_series.jpg new file mode 100644 index 0000000..3a24a96 Binary files /dev/null and b/content/blog/series/social_cards/es_blog_series.jpg differ diff --git a/content/blog/shortcodes/index.ca.md b/content/blog/shortcodes/index.ca.md index 9c55f14..880267b 100644 --- a/content/blog/shortcodes/index.ca.md +++ b/content/blog/shortcodes/index.ca.md @@ -1,7 +1,7 @@ +++ title = "Shortcodes personalitzats" date = 2023-02-19 -updated = 2024-05-18 +updated = 2025-08-01 description = "Aquest tema inclou alguns shortcodes personalitzats útils que pots utilitzar per millorar les teves publicacions. Ja sigui per mostrar imatges que s'adapten als temes clar i fosc, o per donar format a una secció de referències amb un aspecte professional, aquests shortcodes personalitzats t'ajudaran." [taxonomies] @@ -11,16 +11,105 @@ tags = ["funcionalitat", "shortcodes"] toc = true toc_levels = 2 quick_navigation_buttons = true -add_src_to_code_block = true +code_block_name_links = true +mermaid = true social_media_card = "social_cards/ca_blog_shortcodes.jpg" +++ +## Shortcodes de diagrames + +### Diagrames de Mermaid + +[Mermaid](https://github.com/mermaid-js/mermaid) és una eina de diagramació i gràfics que utilitza text i codi per generar diagrames. Admet diagrames de flux, diagrames de seqüència, gràfics de Gantt i més. + +Per incloure un diagrama Mermaid a la teva publicació, cal fer dues coses: + +1. Estableix `mermaid = true` a la secció `[extra]` del front matter de la teva pàgina, secció o `config.toml`. Això carregarà el JavaScript necessari per renderitzar els diagrames. + +2. Utilitza el shortcode `mermaid()` per definir el teu diagrama. Per exemple: + +```txt +{%/* mermaid() */%} +classDiagram + class DistorsionsCognitives { + +PensamentTotORes() + +Sobregeneralitzacio() + +FiltreMental() + +TreureConclusionsPrecipitades() + } + class PensamentTotORes { + +VeureEnExtrems() + } + class Sobregeneralitzacio { + +GeneralitzarDUnic() + } + class FiltreMental { + +EnfocarseEnNegatiu() + } + class TreureConclusionsPrecipitades { + +FerSuposicions() + } + DistorsionsCognitives *-- PensamentTotORes + DistorsionsCognitives *-- Sobregeneralitzacio + DistorsionsCognitives *-- FiltreMental + DistorsionsCognitives *-- TreureConclusionsPrecipitades +{%/* end */%} +``` + +El diagrama es renderitzarà així: + +{% mermaid() %} +classDiagram + class DistorsionsCognitives { + +PensamentTotORes() + +Sobregeneralitzacio() + +FiltreMental() + +TreureConclusionsPrecipitades() + } + class PensamentTotORes { + +VeureEnExtrems() + } + class Sobregeneralitzacio { + +GeneralitzarDUnic() + } + class FiltreMental { + +EnfocarseEnNegatiu() + } + class TreureConclusionsPrecipitades { + +FerSuposicions() + } + DistorsionsCognitives *-- PensamentTotORes + DistorsionsCognitives *-- Sobregeneralitzacio + DistorsionsCognitives *-- FiltreMental + DistorsionsCognitives *-- TreureConclusionsPrecipitades +{% end %} + +El shortcode de Mermaid admet dos paràmetres: + +- `invertible`: Si s'estableix a `true` (per defecte), el diagrama invertirà els seus colors en mode fosc, igual que les [imatges invertibles](#imatge-invertible). +- `full_width`: Permet que el diagrama ocupi l'amplada de la capçalera. Mira [imatge d'amplada completa](#imatge-d-amplada-completa). + +{{ admonition(type="tip", title="CONSELL", text="Empra l'[editor de Mermaid](https://mermaid.live/) per crear i previsualitzar els teus diagrames.") }} + +#### Ús + +``` +{%/* mermaid(invertible=true, full_width=false) */%} + +El teu codi Mermaid va aquí. + +`invertible` or `full_width` poden ometre's per emprar els valors per defecte. + +{%/* end */%} +``` + ## Shortcodes d'imatge Tots els shortcodes d'imatge admeten rutes absolutes, rutes relatives, i fonts remotes en el paràmetre `src`. -Tots els shortcodes d'imatge tenen tres paràmetres opcionals: +Tots els shortcodes d'imatge tenen els següents paràmetres opcionals: +- `raw_path`. Per defecte és `false`. Si es configura a `true`, el paràmetre `src` s'utilitzarà tal qual. Útil per a actius ubicats a la mateixa carpeta que tenen un slug personalitzat (vegeu [Zola issue #2598](https://github.com/getzola/zola/issues/2598)). - `inline`. Valor predeterminat: `false`. Si s'estableix a `true`, la imatge es mostrarà en línia amb el text. - `full_width`. Valor predeterminat: `false` (vegeu [a sota](#imatge-d-amplada-completa)). - `lazy_loading`. Valor predeterminat: `true`. @@ -98,27 +187,81 @@ Tots els altres shortcodes d'imatges poden utilizar l'amplada completa assignant {{/* full_width_image(src="img/amsterdam_by_oskerwyld.webp", alt="Fotografia d'un canal a Àmsterdam") */}} ``` +## Shortcodes socials + +### iine + +{{ aside(text="Per afegir-lo a totes les publicacions, estableix `iine = true` a la secció `[extra]` del teu `config.toml`.") }} + +Aquest shortcode et permet afegir botons addicionals d'[iine.to](https://iine.to) a les teves publicacions, com aquest: + +{{ iine(slug="/blog/shortcodes/demo-button") }} + +#### Ús + +``` +{{/* iine(icon="heart", slug="/post/el-meu-slug-de-post/like", label="M'agrada aquesta publicació") */}} +``` + +El shortcode accepta els següents paràmetres opcionals: + +- `icon`: La icona a mostrar. Pot ser `heart`, `thumbs_up`, `upvote`, o qualsevol emoji. +- `slug`: Un identificador únic. Per defecte és la ruta de la pàgina actual. Útil si vols més d'un botó a la mateixa pàgina. +- `label`: L'etiqueta d'accessibilitat per al botó. Per defecte és "M'agrada aquesta publicació". + ## Shortcodes de codi ### Mostrar ruta o URL -Mostra una ruta o URL al següent bloc de codi trobat. Si comença amb "http", es convertirà en un enllaç. Particularment útil quan s'utilitza en conjunció amb el [shortcode de text remot](#text-remot). +Pots mostrar una ruta o URL per a un bloc de codi utilitzant la sintaxi nativa de Zola: -{{ admonition(type="warning", title="IMPORTANT", text="Aquesta funcionalitat requereix JavaScript. Per activar-la, configura `add_src_to_code_block = true` a la secció `[extra]` de la teva pàgina, secció, o `config.toml`.") }} +{{ aside(text="Requereix Zola 0.20.0 o superior.") }} -{{ add_src_to_code_block(src="https://github.com/welpo/doteki/blob/main/.gitignore") }} +```` +```rust,name=src/main.rs +fn main() { + println!("Hola, món!"); +} +``` +```` -```.gitignore -{{ remote_text(src="https://raw.githubusercontent.com/welpo/doteki/main/.gitignore") }} +Això renderitza: + +```rust,name=src/main.rs +fn main() { + println!("Hola, món!"); +} +``` + +Si estableixes el `name` com una URL (és a dir, comença amb `http` o `https`), pots convertir-lo en un enllaç clicable. Això és particularment útil quan s'utilitza juntament amb el [shortcode de text remot](#text-remot). + +{{ admonition(type="warning", title="JavaScript necessari", text="La funció d'URLs clicables requereix JavaScript. Per habilitar-la, configura `code_block_name_links = true` a la secció `[extra]` de la teva pàgina, secció, o `config.toml`.") }} + +```.gitignore,name=https://github.com/welpo/doteki/blob/main/.gitignore +__pycache__/ +*coverage* +.vscode/ +dist/ +``` + +### Suport de shortcode heretat + +El shortcode `add_src_to_code_block` segueix funcionant per retrocompatibilitat però serà descontinuat en una versió futura. Si us plau, utilitza la sintaxi nativa de Zola: + +``` +# Forma antiga (descontinuada): +{{/* add_src_to_code_block(src="ruta/al/fitxer.rs") */}} + +# Forma nova (recomanada): +```rust,name=ruta/al/fitxer.rs ``` #### Ús ```` {{/* add_src_to_code_block(src="https://github.com/welpo/doteki/blob/main/.gitignore") */}} - ```.gitignore -__pycache__/ +**pycache**/ *coverage* .vscode/ dist/ @@ -127,14 +270,54 @@ dist/ ## Shortcodes de text +### Aside (nota al marge) + +Afegeix contingut complementari als marges en pantalles amples, o com a blocs distintius en mòbil. + +{{ aside(text="*Nota al marge* ve de *nota* (del llatí, 'marca' o 'senyal') i *marge* (del llatí *margo*, 'vora' o 'límit').") }} + +El shortcode accepta dos paràmetres: + +- `position`: Establir com a `"right"` per col·locar al marge dret (per defecte, esquerre) +- El contingut es pot proporcionar mitjançant el paràmetre `text` o entre les etiquetes del shortcode + +#### Ús + +{{ admonition(type="warning", text="Separa la definició de la nota del shortcode amb dues línies en blanc per evitar errors de renderització.") }} + +Fent servir el paràmetre `text`: + +``` +{{/* aside(text="*Nota al marge* ve de *nota* (del llatí, 'marca' o 'senyal') i *marge* (del llatí *margo*, 'vora' o 'límit').") */}} +``` + +Fent servir el cos del contingut i indicant la posició a la dreta: + +``` +{%/* aside(position="right") */%} +Una nota més llarga que +pot ocupar diverses línies. + +S'admet *Markdown*. +{%/* end */%} +``` + ### Text remot Afegeix text des d'una URL remota o un arxiu local. +El shortcode accepta tres paràmetres: + +- `src`: L'URL d'origen o ruta del fitxer (obligatori) +- `start`: Primera línia a mostrar (opcional, comença a 1) +- `end`: Número de l'última línia (opcional, per defecte és 0, l'última línia) + +{{ admonition(type="info", text="`start` i `end` són inclusius. `start=3, end=3` mostrarà només la tercera línia.") }} + **Important**: - **Arxius remots VS arxius locals**: Si `src` comença amb "http", es tractarà com un arxiu remot. D'altra banda, s'assumeix que és una ruta d'arxiu local. -- **Accés a arxius**: Atès que utilitza la funció [`load_data`](https://www.getzola.org/documentation/templates/overview/#load-data) de Zola, els arxius locals han d'estar dins del directori de Zola —vegeu la [lògica de cerca d'arxius](https://www.getzola.org/documentation/templates/overview/#file-searching-logic). +- **Accés a arxius**: Atès que utilitza la funció [`load_data`](https://www.getzola.org/documentation/templates/overview/#load-data) de Zola, els arxius locals han d'estar dins del directori de Zola —vegeu la [lògica de cerca d'arxius](https://www.getzola.org/documentation/templates/overview/#file-searching-logic). Desde [tabi 2.16.0](https://github.com/welpo/tabi/releases/tag/v2.16.0), el shortcode admet també rutes relatives. - **Formateig de blocs de codi**: Per mostrar el text com un bloc de codi, has d'afegir manualment les tanques de codi Markdown (cometes inverses) i, opcionalment, especificar el llenguatge de programació per al ressaltat sintàctic. #### Ús @@ -153,6 +336,12 @@ Mostra el text d'un arxiu local: {{/* remote_text(src="ruta/a/arxiu.txt") */}} ``` +Mostreu només les línies 3 a 5 d'un arxiu local: + +``` +{{/* remote_text(src="ruta/a/arxiu.txt", start=3, end=5) */}} +``` + ### Advertències Destaca informació amb aquests shortcodes. Hi ha cinc tipus (`type`): `note`, `tip`, `info`, `warning`, i `danger`. @@ -167,16 +356,32 @@ Destaca informació amb aquests shortcodes. Hi ha cinc tipus (`type`): `note`, ` {{ admonition(type="danger", text="Contingut amb **sintaxi** *Markdown*. Consulta [aquesta `api`](#).") }} -Pots personalitzar el títol amb el paràmetre `title`: +Pots canviar el `title` i la `icon` de l'advertència. Ambdós paràmetres accepten text i per defecte coincideixen amb el tipus d'advertència. `icon` pot ser qualsevol dels tipus d'advertència disponibles. -{{ admonition(type="info", title="Título personalizado", text="Contingut amb **sintaxi** *Markdown*. Consulta [aquesta `api`](#).") }} +{{ admonition(type="note", icon="tip", title="Títol i icona personalitzats", text="Contingut amb **sintaxi** *Markdown*. Consulta [aquesta `api`](#).") }} #### Ús +Pots utilitzar les advertències de dues maneres: + +1. En línia amb paràmetres: + +```md +{{/* admonition(type="danger", icon="tip", title="Un consell important", text="Mantingues-te hidratat") */}} ``` -{{/* admonition(type="info", title="Títol opcional", text="Quelcom.") */}} + +2. Amb contingut al cos: + +```md +{%/* admonition(type="danger", icon="tip", title="Un consell important") */%} +Mantingues-te hidratat + +Aquest mètode és especialment útil per a contingut llarg o múltiples paràgrafs. +{%/* end */%} ``` +Ambdós mètodes admeten els mateixos paràmetres (`type`, `icon`, i `title`). + ### Cites multillenguatge Aquest shortcode permet mostrar una cita traduïda i en el llenguatge original: @@ -260,3 +465,31 @@ El Markdown, per suposat, serà interpretat. {%/* end */%} ``` + +### Forçar direcció del text + +Força la direcció del text d'un bloc de contingut. Substitueix tant la configuració global `force_codeblock_ltr` com la direcció general del document. + +Accepta el paràmetre `direction`: la direcció de text desitjada. Pot ser "ltr" (d'esquerra a dreta) o "rtl" (de dreta a esquerra). Per defecte és "ltr". + +{% force_text_direction(direction="rtl") %} +```python +def مرحبا_بالعالم(): + print("مرحبا بالعالم!") +``` +{% end %} + +#### Ús + +En una pàgina LTR podem forçar que un bloc de codi sigui RTL (com es mostra a dalt) de la següent manera: + +```` +{%/* force_text_direction(direction="rtl") */%} + +```python +def مرحبا_بالعالم(): + print("مرحبا بالعالم!") +``` + +{%/* end */%} +```` diff --git a/content/blog/shortcodes/index.es.md b/content/blog/shortcodes/index.es.md index 6dc8c0d..5efaf8c 100644 --- a/content/blog/shortcodes/index.es.md +++ b/content/blog/shortcodes/index.es.md @@ -1,7 +1,7 @@ +++ title = "Shortcodes personalizados" date = 2023-02-19 -updated = 2024-05-18 +updated = 2025-08-01 description = "Este tema incluye algunos shortcodes personalizados útiles que puedes utilizar para mejorar tus publicaciones. Puedes mostrar imágenes que se adapten a los temas claro y oscuro, dar formato a una sección de referencias con un aspecto profesional, y más." [taxonomies] @@ -11,16 +11,103 @@ tags = ["funcionalidad", "shortcodes"] toc = true toc_levels = 2 quick_navigation_buttons = true -add_src_to_code_block = true +code_block_name_links = true +mermaid = true social_media_card = "social_cards/es_blog_shortcodes.jpg" +++ +## Shortcodes de diagramas + +### Diagramas de Mermaid + +[Mermaid](https://github.com/mermaid-js/mermaid) es una herramienta de diagramación y gráficos que usa texto y código para generar diagramas. Admite diagramas de flujo, diagramas de secuencia, gráficos de Gantt y más. + +Para incluir un diagrama Mermaid en tu publicación, sigue estos dos pasos: + +1. Establece `mermaid = true` en la sección `[extra]` del front matter de tu página, sección o `config.toml`. Esto cargará el JavaScript necesario para renderizar los diagramas. + +2. Usa el shortcode `mermaid()` para definir tu diagrama. Por ejemplo: + +```txt +{%/* mermaid() */%} +classDiagram + class DistorsionesCognitivas { + +PensamientoTodoONada() + +Sobregeneralizacion() + +FiltroMental() + +SacarConclusionesPrecipitadas() + } + class PensamientoTodoONada { + +VerEnExtremos() + } + class Sobregeneralizacion { + +GeneralizarDeUnicoEjemplo() + } + class FiltroMental { + +EnfocarseEnNegativo() + } + class SacarConclusionesPrecipitadas { + +HacerSuposiciones() + } + DistorsionesCognitivas *-- PensamientoTodoONada + DistorsionesCognitivas *-- Sobregeneralizacion + DistorsionesCognitivas *-- FiltroMental + DistorsionesCognitivas *-- SacarConclusionesPrecipitadas +{%/* end */%} +``` + +El diagrama se renderizará así: + +{% mermaid() %} +classDiagram + class DistorsionesCognitivas { + +PensamientoTodoONada() + +Sobregeneralizacion() + +FiltroMental() + +SacarConclusionesPrecipitadas() + } + class PensamientoTodoONada { + +VerEnExtremos() + } + class Sobregeneralizacion { + +GeneralizarDeUnicoEjemplo() + } + class FiltroMental { + +EnfocarseEnNegativo() + } + class SacarConclusionesPrecipitadas { + +HacerSuposiciones() + } + DistorsionesCognitivas *-- PensamientoTodoONada + DistorsionesCognitivas *-- Sobregeneralizacion + DistorsionesCognitivas *-- FiltroMental + DistorsionesCognitivas *-- SacarConclusionesPrecipitadas +{% end %} + +El shortcode de Mermaid admite dos parámetros: + +- `invertible`: Si se establece en `true` (por defecto), el diagrama se invertirá en modo oscuro, igual que las [imágenes invertibles](#imagen-invertible). +- `full_width`: Permite que el diagrama ocupe el ancho del encabezado. Mira [imagen a ancho completo](#imagen-a-ancho-completo). + +{{ admonition(type="tip", title="CONSEJO", text="Puedes usar el [editor de Mermaid](https://mermaid.live/) para crear y previsualizar tus diagramas.") }} + +#### Uso + +``` +{%/* mermaid(invertible=true, full_width=false) */%} + +Tu diagrama Mermaid va aquí. Puedes omitir los parámetros para usar los valores predeterminados. + +{%/* end */%} +``` + ## Shortcodes de imagen Todos los shortcodes de imagen admiten rutas absolutas, rutas relativas, y fuentes remotas en el parámetro `src`. -Todos los shortcodes de imagen tienen tres parámetros opcionales: +Todos los shortcodes de imagen tienen los siguientes parámetros opcionales: +- `raw_path`. Por defecto es `false`. Si se establece en `true`, el parámetro `src` se usará tal cual. Útil para activos ubicados en la misma carpeta que tienen un slug personalizado (ver [Zola issue #2598](https://github.com/getzola/zola/issues/2598)). - `inline`. Valor predeterminado: `false`. Si se establece `true`, la imagen se mostrará en línea con el texto. - `full_width`. Valor predeterminado: `false` (ver [más abajo](#imagen-a-ancho-completo)). - `lazy_loading`. Valor predeterminado: `true`. @@ -99,43 +186,125 @@ Todos los otros shortcodes de imágenes pueden usar el ancho completo asignando {{/* full_width_image(src="img/amsterdam_by_oskerwyld.webp", alt="Fotografía de un canal en Ámsterdam") */}} ``` +## Shortcodes sociales + +### iine + +{{ aside(text="Para añadirlo a todas las publicaciones, establece `iine = true` en la sección `[extra]` de tu `config.toml`.") }} + +Este shortcode te permite añadir botones adicionales de [iine.to](https://iine.to) a tus publicaciones, como este: + +{{ iine(slug="/blog/shortcodes/demo-button") }} + +#### Uso + +``` +{{/* iine(icon="heart", slug="/post/mi-slug-de-post/like", label="Me gusta esta publicación") */}} +``` + +El shortcode acepta los siguientes parámetros opcionales: + +- `icon`: El icono a mostrar. Puede ser `heart`, `thumbs_up`, `upvote`, o cualquier emoji. +- `slug`: Un identificador único. Por defecto es la ruta de la página actual. Útil si quieres más de un botón en la misma página. +- `label`: La etiqueta de accesibilidad para el botón. Por defecto es "Me gusta esta publicación". + ## Shortcodes de código ### Mostrar ruta o URL -Muestra una ruta o URL en el siguiente bloque de código encontrado. Si comienza con "http", se convertirá en un enlace. Particularmente útil cuando se usa junto con el [shortcode de texto remot](#texto-remoto). +Puedes mostrar una ruta o URL para un bloque de código usando la sintaxis nativa de Zola: -{{ add_src_to_code_block(src="https://github.com/welpo/doteki/blob/main/.gitignore") }} - -```.gitignore -{{ remote_text(src="https://raw.githubusercontent.com/welpo/doteki/main/.gitignore") }} -``` - -{{ admonition(type="warning", title="IMPORTANT", text="Esta característica requiere JavaScript. Para habilitarla, configura `add_src_to_code_block = true` en la sección `[extra]` de tu página, sección, o `config.toml`.") }} - -#### Uso +{{ aside(text="Requiere Zola 0.20.0 o superior.") }} ```` -{{/* add_src_to_code_block(src="https://github.com/welpo/doteki/blob/main/.gitignore") */}} +```rust,name=src/main.rs +fn main() { + println!("¡Hola, mundo!"); +} +``` +```` -```.gitignore +Esto renderiza: + +```rust,name=src/main.rs +fn main() { + println!("¡Hola, mundo!"); +} +``` + +Si estableces el `name` como una URL (es decir, comienza con `http` o `https`), puedes convertirlo en un enlace clickable. Esto es particularmente útil cuando se usa junto con el [shortcode de texto remoto](#texto-remoto). + +{{ admonition(type="warning", title="JavaScript requerido", text="La función de URLs clickables requiere JavaScript. Para habilitarla, configura `code_block_name_links = true` en la sección `[extra]` de tu página, sección, o `config.toml`.") }} + +```.gitignore,name=https://github.com/welpo/doteki/blob/main/.gitignore __pycache__/ *coverage* .vscode/ dist/ ``` -```` + +### Soporte de shortcode heredado + +El shortcode `add_src_to_code_block` sigue funcionando por retrocompatibilidad, pero será descontinuado en una versión futura. Por favor, usa la sintaxis nativa de Zola: + +``` +# Forma antigua (descontinuada): +{{/* add_src_to_code_block(src="ruta/al/archivo.rs") */}} + +# Forma nueva (recomendada): +```rust,name=ruta/al/archivo.rs +``` ## Shortcodes de texto +### Aside (nota al margen) + +Añade contenido complementario en los márgenes en pantallas anchas, o como bloques distintivos en móvil. + +{{ aside(text="*Nota al margen* viene de *nota* (del latín, 'marca' o 'señal') y *margen* (del latín *margo*, 'borde' o 'límite').") }} + +El shortcode acepta dos parámetros: + +- `position`: Establecer como `"right"` para colocar en el margen derecho (por defecto, izquierdo) +- El contenido puede proporcionarse mediante el parámetro `text` o entre las etiquetas del shortcode + +#### Uso + +{{ admonition(type="warning", text="Separa la llamada al shortcode con saltos de línea para evitar errores de renderizado.") }} + +Usando el parámetro `text`: + +``` +{{/* aside(text="*Nota al margen* viene de *nota* (del latín, 'marca' o 'señal') y *margen* (del latín *margo*, 'borde' o 'límite').") */}} +``` + +Usando el cuerpo del contenido e indicando la posición: + +``` +{%/* aside(position="right") */%} +Una nota más larga que +puede ocupar varias líneas. + +Se admite *Markdown*. +{%/* end */%} +``` + ### Texto remoto Añade texto desde una URL remota o un archivo local. +El shortcode acepta tres parámetros: + +- `src`: La URL de origen o ruta del archivo (obligatorio) +- `start`: Primera línea a mostrar (opcional, empieza en 1) +- `end`: Número de la última línea (opcional, por defecto es 0, la última línea) + +{{ admonition(type="info", text="`start` y `end` son inclusivos. `start=3, end=3` mostrará solo la tercera línea.") }} + **Importante**: - **Archivos remotos VS archivos locales**: Si `src` empieza con "http", se tratará como un archivo remoto. De lo contrario, se asume que es una ruta de archivo local. -- **Acceso a archivos**: Dado que utiliza la función [`load_data`](https://www.getzola.org/documentation/templates/overview/#load-data) de Zola, los archivos locales deben estar dentro del directorio de Zola —ver la [lógica de búsqueda de archivos](https://www.getzola.org/documentation/templates/overview/#file-searching-logic). +- **Acceso a archivos**: Dado que utiliza la función [`load_data`](https://www.getzola.org/documentation/templates/overview/#load-data) de Zola, los archivos locales deben estar dentro del directorio de Zola —ver la [lógica de búsqueda de archivos](https://www.getzola.org/documentation/templates/overview/#file-searching-logic). Desde [tabi 2.16.0](https://github.com/welpo/tabi/releases/tag/v2.16.0), el shortcode admite también rutas relativas. - **Formateo de bloques de código**: Para mostrar el texto como un bloque de código, debes añadir manualmente las cercas de código Markdown (comillas invertidas) y, opcionalmente, especificar el lenguaje de programación para el resaltado sintáctico. #### Uso @@ -154,6 +323,12 @@ Visualización de texto de un archivo local: {{/* remote_text(src="ruta/a/archivo.txt") */}} ``` +Mostar sólo las líneas 3 a 5 de un archivo remoto: + +``` +{{/* remote_text(src="https://example.com/script.py", start=3, end=5) */}} +``` + ### Advertencias Destaca información con estos shortcodes. Hay cinco tipos (`type`): `note`, `tip`, `info`, `warning`, y `danger`. @@ -168,16 +343,32 @@ Destaca información con estos shortcodes. Hay cinco tipos (`type`): `note`, `ti {{ admonition(type="danger", text="Contenido con **sintaxis** *Markdown*. Consulta [esta `api`](#).") }} -Puedes personalizar el título con el parámetro `title`: +Puedes cambiar el `title` y el `icon` de la advertencia. Ambos parámetros aceptan texto y por defecto coinciden con el tipo de advertencia. `icon` puede ser cualquiera de los tipos de advertencia disponibles. -{{ admonition(type="info", title="Título personalizado", text="Contenido con **sintaxis** *Markdown*. Consulta [esta `api`](#).") }} +{{ admonition(type="note", icon="tip", title="Título e icono personalizados", text="Contenido con **sintaxis** *Markdown*. Consulta [esta `api`](#).") }} #### Uso +Puedes usar las advertencias de dos formas: + +1. En línea con parámetros: + +```md +{{/* admonition(type="danger", icon="tip", title="Un consejo importante", text="Mantente hidratado") */}} ``` -{{/* admonition(type="info", title="Título opcional", text="Algo.") */}} + +2. Con contenido en el cuerpo: + +```md +{%/* admonition(type="danger", icon="tip", title="Un consejo importante") */%} +Mantente hidratado + +Este método es especialmente útil para contenido largo o múltiples párrafos. +{%/* end */%} ``` +Ambos métodos admiten los mismos parámetros (`type`, `icon`, y `title`). + ### Citas multilenguaje Este shortcode permite mostrar una cita traducida y en su lenguaje original: @@ -262,3 +453,31 @@ El Markdown, por supuesto, será interpretado. {%/* end */%} ``` + +### Forzar dirección del texto + +Fuerza la dirección del texto de un bloque de contenido. Anula tanto la configuración global `force_codeblock_ltr` como la dirección general del documento. + +Acepta el parámetro `direction`: la dirección de texto deseada. Puede ser "ltr" (de izquierda a derecha) o "rtl" (de derecha a izquierda). Por defecto es "ltr". + +{% force_text_direction(direction="rtl") %} +```python +def مرحبا_بالعالم(): + print("مرحبا بالعالم!") +``` +{% end %} + +#### Uso + +En una página LTR podemos forzar que un bloque de código sea RTL (como se muestra arriba) de la siguiente manera: + +```` +{%/* force_text_direction(direction="rtl") */%} + +```python +def مرحبا_بالعالم(): + print("مرحبا بالعالم!") +``` + +{%/* end */%} +```` diff --git a/content/blog/shortcodes/index.md b/content/blog/shortcodes/index.md index f7f5a74..d40d3cd 100644 --- a/content/blog/shortcodes/index.md +++ b/content/blog/shortcodes/index.md @@ -1,7 +1,7 @@ +++ title = "Custom shortcodes" date = 2023-02-19 -updated = 2024-05-18 +updated = 2025-07-26 description = "This theme includes some useful custom shortcodes that you can use to enhance your posts. Whether you want to display images that adapt to light and dark themes, or format a professional-looking reference section, these custom shortcodes have got you covered." [taxonomies] @@ -11,16 +11,105 @@ tags = ["showcase", "shortcodes"] toc = true toc_levels = 2 quick_navigation_buttons = true -add_src_to_code_block = true +code_block_name_links = true +mermaid = true social_media_card = "social_cards/blog_shortcodes.jpg" +++ +## Diagram shortcode + +### Mermaid diagrams + +[Mermaid](https://github.com/mermaid-js/mermaid) is a a diagramming and charting tool that uses text and code to generate diagrams. It supports flowcharts, sequence diagrams, Gantt charts, and more. + +To include a Mermaid diagram in your post, there are two steps: + +1. Set `mermaid = true` in the `[extra]` section of the front matter of your page, section or `config.toml`. This will load the JavaScript needed to render the diagrams. + +2. Use the `mermaid()` shortcode to define your diagram in your posts. For example: + +```txt +{%/* mermaid() */%} +classDiagram + class CognitiveDistortions { + +AllOrNothingThinking() + +Overgeneralization() + +MentalFilter() + +JumpingToConclusions() + } + class AllOrNothingThinking { + +SeeInExtremes() + } + class Overgeneralization { + +GeneralizeFromSingle() + } + class MentalFilter { + +FocusOnNegative() + } + class JumpingToConclusions { + +MakeAssumptions() + } + CognitiveDistortions *-- AllOrNothingThinking + CognitiveDistortions *-- Overgeneralization + CognitiveDistortions *-- MentalFilter + CognitiveDistortions *-- JumpingToConclusions +{%/* end */%} +``` + +The diagram will be rendered as follows: + +{% mermaid() %} +classDiagram + class CognitiveDistortions { + +AllOrNothingThinking() + +Overgeneralization() + +MentalFilter() + +JumpingToConclusions() + } + class AllOrNothingThinking { + +SeeInExtremes() + } + class Overgeneralization { + +GeneralizeFromSingle() + } + class MentalFilter { + +FocusOnNegative() + } + class JumpingToConclusions { + +MakeAssumptions() + } + CognitiveDistortions *-- AllOrNothingThinking + CognitiveDistortions *-- Overgeneralization + CognitiveDistortions *-- MentalFilter + CognitiveDistortions *-- JumpingToConclusions +{% end %} + +The Mermaid shortcode supports two parameters: + +- `invertible`: If set to `true` (default), the diagram will be inverted in dark mode, just like [invertible images](#invertible-image). +- `full_width`: Allows the diagram to take up the width of the header. See [full-width image](#full-width-image). + +{{ admonition(type="tip", text="You can use the [Mermaid Live Editor](https://mermaid.live/) to create and preview your diagrams.") }} + +#### Usage + +``` +{%/* mermaid(invertible=true, full_width=false) */%} + +Your diagram goes here. + +`invertible` or `full_width` can be omitted if default values are used. + +{%/* end */%} +``` + ## Image shortcodes All image shortcodes support absolute paths, relative paths, and remote sources in the `src` parameter. -All image shortcodes have three optional parameters: +All image shortcodes have these optional parameters: +- `raw_path`. Defaults to `false`. If set to `true`, the `src` parameter will be used as is. Useful for colocated assets with a custom slug (see [Zola issue #2598](https://github.com/getzola/zola/issues/2598)). - `inline`. Defaults to `false`. If set to `true`, the image will be displayed inline with the text. - `full_width`. Defaults to `false` (see [below](#full-width-image)) - `lazy_loading`. Defaults to `true`. @@ -32,6 +121,7 @@ Useful if you want to use a different image for the light and dark themes: {{ dual_theme_image(light_src="img/paris_day.webp", dark_src="img/paris_night.webp" alt="The Eiffel tower") }} #### Usage + ``` {{/* dual_theme_image(light_src="img/paris_day.webp", dark_src="img/paris_night.webp" alt="The Eiffel tower") */}} ``` @@ -62,7 +152,7 @@ Images with too much brightness or contrast can be jarring against a dark backgr ### Swap image on hover -Povides an interaction where the image displayed changes as the user hovers over it. Useful for before-after comparisons, for example. +Provides an interaction where the image displayed changes as the user hovers over it. Useful for before-after comparisons, for example. {{ image_hover(default_src="img/edited.webp", hovered_src="img/raw.webp", default_alt="Edited picture", hovered_alt="Original shot") }} @@ -98,43 +188,125 @@ All other image shortcodes can be made into full-width by setting the optional p {{/* full_width_image(src="img/amsterdam_by_oskerwyld.webp", alt="Photograph of a canal in Amsterdam") */}} ``` +## Engagement shortcodes + +### iine + +{{ aside(text="To add it to all posts, set `iine = true` in the `[extra]` section of your `config.toml`.") }} + +This shortcode allows you to add extra [iine.to](https://iine.to) buttons to your posts, like this: + +{{ iine(slug="/blog/shortcodes/demo-button") }} + +#### Usage + +``` +{{/* iine(icon="heart", slug="/post/my-post-slug/like", label="Like this post") */}} +``` + +The shortcode takes the following optional parameters: + +- `icon`: The icon to display. Can be `heart`, `thumbs_up`, `upvote`, or any emoji. +- `slug`: A unique identifier. Defaults to the current page's path. Useful if you want more than one button on the same page. +- `label`: The accessibility label for the button. Defaults to "Like this post". + ## Code shortcodes ### Show source or path -Display a path or URL on the next code block found. If it starts with "http", it will become a link. Particularly useful when used in conjunction with the [remote text shortcode](#remote-text). +You can display a path or URL for a code block using Zola's native syntax: -{{ add_src_to_code_block(src="https://github.com/welpo/doteki/blob/main/.gitignore") }} - -```.gitignore -{{ remote_text(src="https://raw.githubusercontent.com/welpo/doteki/main/.gitignore") }} -``` - -{{ admonition(type="warning", title="IMPORTANT", text="This feature requires JavaScript. To enable it, set `add_src_to_code_block = true` on the `[extra]` section of your page, section, or `config.toml`.") }} - -#### Usage +{{ aside(text="Requires Zola 0.20.0 or later.") }} ```` -{{/* add_src_to_code_block(src="https://github.com/welpo/doteki/blob/main/.gitignore") */}} +```rust,name=src/main.rs +fn main() { + println!("Hello, world!"); +} +``` +```` -```.gitignore +This renders: + +```rust,name=src/main.rs +fn main() { + println!("Hello, world!"); +} +``` + +If you set the `name` to a URL (i.e. it starts with `http` or `https`), you can turn it into a clickable link. This is particularly useful when used in conjunction with the [remote text shortcode](#remote-text). + +{{ admonition(type="warning", title="JavaScript required", text="The clickable URL feature requires JavaScript. To enable it, set `code_block_name_links = true` on the `[extra]` section of your page, section, or `config.toml`.") }} + +```.gitignore,name=https://github.com/welpo/doteki/blob/main/.gitignore __pycache__/ *coverage* .vscode/ dist/ ``` -```` + +### Legacy shortcode support + +The `add_src_to_code_block` shortcode is still supported for backward compatibility but will be deprecated in a future release. Please use Zola's native syntax shown above instead: + +``` +# Old way (deprecated): +{{/* add_src_to_code_block(src="path/to/file.rs") */}} + +# New way (preferred): +```rust,name=path/to/file.rs +``` ## Text shortcodes +### Aside (side/margin note) + +Add supplementary content in the margins on wide screens, or as distinct blocks on mobile. + +{{ aside(text="*Sidenote* comes from Latin *nota* ('mark') + Old English *síde* ('side').") }} + +The shortcode accepts two parameters: + +- `position`: Set to `"right"` to place in right margin (defaults to left) +- Content can be provided via `text` parameter or between shortcode tags + +#### Usage + +{{ admonition(type="warning", text="Place the aside shortcode on its own line to prevent formatting issues.") }} + +Using the `text` parameter: + +``` +{{/* aside(text="*Sidenote* comes from Latin *nota* ('mark') + Old English *síde* ('side').") */}} +``` + +Using the content body and setting the position to right: + +``` +{%/* aside(position="right") */%} +A longer note that +can span multiple lines. + +_Markdown_ is supported. +{%/* end */%} +``` + ### Remote text Embed text from a remote URL or a local file. To display the path or URL on the code block, see the [show source or path shortcode](#show-source-or-path). +The shortcode accepts three parameters: + +- `src`: The source URL or file path (required) +- `start`: First line to display (optional, starts at 1) +- `end`: The ending line number (optional, defaults to 0, meaning the last line) + +{{ admonition(type="info", text="`start` and `end` are inclusive. `start=3, end=3` will display only the third line.") }} + **Important**: - **Remote VS local files**: If `src` starts with "http", it will be treated as a remote file. Otherwise, it assumes a local file path. -- **Files access**: As it uses Zola's [`load_data`](https://www.getzola.org/documentation/templates/overview/#load-data), local files must be inside the Zola directory—see [File searching logic](https://www.getzola.org/documentation/templates/overview/#file-searching-logic). +- **Files access**: As it uses Zola's [`load_data`](https://www.getzola.org/documentation/templates/overview/#load-data), local files must be inside the Zola directory—see [File searching logic](https://www.getzola.org/documentation/templates/overview/#file-searching-logic). As of [tabi 2.16.0](https://github.com/welpo/tabi/releases/tag/v2.16.0), the shortcode supports both relative and absolute paths. - **Code block formatting**: To display the text as a code block, you must manually add the Markdown code fences (backticks) and, optionally, specify the programming language for syntax highlighting. #### Usage @@ -153,6 +325,12 @@ Displaying text from a local file: {{/* remote_text(src="path/to/file.txt") */}} ``` +Display lines 3 to 7 (both inclusive) of a local file: + +``` +{{/* remote_text(src="path/to/file.txt", start=3, end=7) */}} +``` + ### Admonitions Bring attention to information with these admonition shortcodes. They come in five `type`s: `note`, `tip`, `info`, `warning`, and `danger`. @@ -167,26 +345,42 @@ Bring attention to information with these admonition shortcodes. They come in fi {{ admonition(type="danger", text="Some **content** with _Markdown_ `syntax`. Check [this `api`](#).") }} -You can set a custom title with the `title` parameter: +You can change the `title` and `icon` of the admonition. Both parameters take a string and default to the type of admonition. `icon` can be any of the available admonition types. -{{ admonition(type="note", title="Custom title", text="Some **content** with _Markdown_ `syntax`. Check [this `api`](#).") }} +{{ admonition(type="note", icon="tip", title="Custom title and icon", text="Some **content** with _Markdown_ `syntax`. Check [this `api`](#).") }} #### Usage +You can use admonitions in two ways: + +1. Inline with parameters: + +```md +{{/* admonition(type="danger", icon="tip", title="An important tip", text="Stay hydrated~") */}} ``` -{{/* admonition(type="info", title="Optional custom title", text="Something.") */}} + +2. With a content body: + +```md +{%/* admonition(type="danger", icon="tip", title="An important tip") */%} +Stay hydrated~ + +This method is particularly useful for longer content or multiple paragraphs. +{%/* end */%} ``` +Both methods support the same parameters (`type`, `icon`, and `title`), with the content either passed as the `text` parameter or as the body between tags. + ### Multilingual quotes This shortcode allows you to display both the translated and original text for a quote. The quotation marks will be added automatically: -{{ multilingual_quote(original="Qué sosiego, ir por la vida en silencio, saludando sólo a los amigos.", translated="What tranquility, to go through life in silence, greeting only friends.", author="Francisco Umbral") }} +{{ multilingual_quote(original="Qué sosiego, ir por la vida en silencio, saludando sólo a los amigos.", translated="What tranquillity, to go through life in silence, greeting only friends.", author="Francisco Umbral") }} #### Usage ``` -{{/* multilingual_quote(original="Qué sosiego, ir por la vida en silencio, saludando sólo a los amigos.", translated="What tranquility, to go through life in silence, greeting only friends.", author="Francisco Umbral") */}} +{{/* multilingual_quote(original="Qué sosiego, ir por la vida en silencio, saludando sólo a los amigos.", translated="What tranquillity, to go through life in silence, greeting only friends.", author="Francisco Umbral") */}} ``` ### References with hanging indent @@ -260,3 +454,33 @@ Markdown will of course be rendered. {%/* end */%} ``` + +### Force text direction + +Force the text direction of a content block. Overrides both the global `force_codeblock_ltr` setting and the document's overall direction. + +Accepts the parameter `direction`: the desired text direction. This can be either "ltr" (left-to-right) or "rtl" (right-to-left). Defaults to "ltr". + +{% force_text_direction(direction="rtl") %} + +```python +def مرحبا_بالعالم(): + print("مرحبا بالعالم!") +``` + +{% end %} + +#### Usage + +In a LTR page we can force a code block to be RTL (as shown above) like so: + +```` +{%/* force_text_direction(direction="rtl") */%} + +```python +def مرحبا_بالعالم(): + print("مرحبا بالعالم!") +``` + +{%/* end */%} +```` diff --git a/content/social_cards/ca.jpg b/content/ca.jpg similarity index 100% rename from content/social_cards/ca.jpg rename to content/ca.jpg diff --git a/content/social_cards/es.jpg b/content/es.jpg similarity index 100% rename from content/social_cards/es.jpg rename to content/es.jpg diff --git a/content/social_cards/index.jpg b/content/index.jpg similarity index 100% rename from content/social_cards/index.jpg rename to content/index.jpg diff --git a/content/pages/_index.ar.md b/content/pages/_index.ar.md new file mode 100644 index 0000000..704bbde --- /dev/null +++ b/content/pages/_index.ar.md @@ -0,0 +1,7 @@ ++++ +render = false +insert_anchor_links = "right" + +[extra] +hide_from_feed = true ++++ diff --git a/content/pages/about/index.ar.md b/content/pages/about/index.ar.md new file mode 100644 index 0000000..3c87d48 --- /dev/null +++ b/content/pages/about/index.ar.md @@ -0,0 +1,40 @@ ++++ +title = "عني" +template = "info-page.html" +path = "/ar/about" + +[extra] +quick_navigation_buttons = true +social_media_card = "social_cards/about.ar.jpg" ++++ + +مرحبًا بكم في العرض التقديمي ل[**تابي**]، وهو قالب لـ[Zola]، مولد المواقع الثابتة السريع. + +**تابي** هو من ابتكار أوسكار فرنانديز ([welpo] على GitHub)، وقد صُمم في البداية لموقعه الشخصي [osc.garden]. هو قالب بشكل حديث غني بالميزات يوفر إعدادات افتراضية منطقية وآمنة. + +يمكنك العثور على وثائق تشرح طريقة إستخدام **تابي** في [المدونة] و[الأرشيف]، سوف تجد بهم مقالات تشرح القالب وتقدم لك نظرة عامة حوله. + +## الميزات + +يركز **تابي** على الاداء ويدعم [تعدد اللغات] أي انه يمكن لمدونتك دعم أكثر من لغة، ويمكنك [تخصيص مظهرها]، ويمكنك [تفعيل التعليقات بها] أي السماح للأخرين بالتعليق على منشوراتك. و **تابي** لا يجبر مدونتك على إستخدام جافاسكربت، حيث انها [إختيارية] ولكنك سوف تفقد المميزات التي تحتاج إليها. + +## المساهمة + +نحن نقدر المساهمات! نرحب بالتبليغ على الأخطاء، وتحسينات الترجمة أو الوثائق (بغض النظر عن حجمها)، واقتراحات الميزات... تحقق من [إرشادات المساهمة] لمعرفة كيفية المساعدة. شكرًا لك! + +## الترخيص + +الكود متاح بموجب [رخصة MIT]. + +[**تابي**]: https://github.com/welpo/tabi +[Zola]: https://www.getzola.org +[welpo]: https://github.com/welpo +[osc.garden]: https://osc.garden +[المدونة]: https://welpo.github.io/tabi/blog +[الأرشيف]: https://welpo.github.io/tabi/archive +[تعدد اللغات]: https://welpo.github.io/tabi/blog/faq-languages +[تخصيص مظهرها]: https://welpo.github.io/tabi/blog/customise-tabi +[تفعيل التعليقات بها]: https://welpo.github.io/tabi/blog/comments +[إختيارية]: https://welpo.github.io/tabi/blog/javascript +[إرشادات المساهمة]: https://github.com/welpo/tabi/blob/main/CONTRIBUTING.md +[رخصة MIT]: https://choosealicense.com/licenses/mit diff --git a/content/pages/about/index.ca.md b/content/pages/about/index.ca.md index 503fa84..4ecb30e 100644 --- a/content/pages/about/index.ca.md +++ b/content/pages/about/index.ca.md @@ -5,7 +5,6 @@ path = "/ca/about" [extra] quick_navigation_buttons = true -social_media_card = "social_cards/about.ca.jpg" +++ Benvingut a la demo de [**tabi**](https://github.com/welpo/tabi), un tema per a [Zola](https://www.getzola.org/), un generador de llocs web estàtics rapidíssim. diff --git a/content/pages/about/index.es.md b/content/pages/about/index.es.md index 005c336..8f74bef 100644 --- a/content/pages/about/index.es.md +++ b/content/pages/about/index.es.md @@ -5,7 +5,6 @@ path = "/es/about" [extra] quick_navigation_buttons = true -social_media_card = "social_cards/about.es.jpg" +++ Bienvenido a la demo de [**tabi**](https://github.com/welpo/tabi), un tema para [Zola](https://www.getzola.org/), un rapidísimo generador de sitios estáticos. diff --git a/content/pages/about/index.md b/content/pages/about/index.md index fba24f9..5db48c3 100644 --- a/content/pages/about/index.md +++ b/content/pages/about/index.md @@ -5,7 +5,6 @@ path = "about" [extra] quick_navigation_buttons = true -social_media_card = "social_cards/about.jpg" +++ Welcome to the demo of [**tabi**](https://github.com/welpo/tabi), a theme for [Zola](https://www.getzola.org/), a fast static site generator. diff --git a/content/pages/about/social_cards/about.ar.jpg b/content/pages/about/social_cards/about.ar.jpg new file mode 100644 index 0000000..981ba8f Binary files /dev/null and b/content/pages/about/social_cards/about.ar.jpg differ diff --git a/content/pages/about/social_cards/about.ca.jpg b/content/pages/about/social_cards/about.ca.jpg deleted file mode 100644 index 6104cdc..0000000 Binary files a/content/pages/about/social_cards/about.ca.jpg and /dev/null differ diff --git a/content/pages/about/social_cards/about.es.jpg b/content/pages/about/social_cards/about.es.jpg deleted file mode 100644 index 809bd3a..0000000 Binary files a/content/pages/about/social_cards/about.es.jpg and /dev/null differ diff --git a/content/pages/about/social_cards/about.jpg b/content/pages/about/social_cards/about.jpg deleted file mode 100644 index 4117d18..0000000 Binary files a/content/pages/about/social_cards/about.jpg and /dev/null differ diff --git a/content/pages/privacy/index.ar.md b/content/pages/privacy/index.ar.md new file mode 100644 index 0000000..04450e5 --- /dev/null +++ b/content/pages/privacy/index.ar.md @@ -0,0 +1,95 @@ ++++ +title = "سياسة الخصوصية" +path = "/ar/privacy" +date = 2023-10-31 +updated = 2024-05-12 ++++ + +هذه السياسة توضح كيف نقوم بجمع ومعالجة بياناتك على هذا الموقع. + +{{ toc() }} + +## ما البيانات التي نجمعها؟ + +### التصفح العام {#what-general} + +أثناء تصفح الموقع، لا يتم جمع أي معلومات شخصية. + +### التعليقات {#what-comments} + +نحن لا نجمع أي بيانات عند إرسال تعليق على تدوينة، لكن GitHub يجمع البيانات لتوفير الخدمة، حيث انه يتم توفيرها من خلاله. + +### التحليلات {#what-analytics} + +لتحسين الموقع، يتم جمع البيانات غير الشخصية التالية: + +- **المرجع**: المصدر الذي قادك إلى هذا الموقع. +- **الرابط المطلوب**: الصفحة المحددة التي قمت بزيارتها. +- **وكيل المستخدم**: يحدد المتصفح ونظام التشغيل الذي تستخدمه (مثل "Safari 17.0، Mac OS X"). +- **اسم البلد**: البلد الذي زرت الموقع منه، يتم تحديده بواسطة عنوان IP الخاص بك. +- **حجم الشاشة**: أبعاد شاشة جهازك. +- **الوقت**: الوقت الذي وصلت فيه إلى الموقع. +- **جلسة التصفح**: رمز تعريف مؤقت يتم إنشاؤه من عنوان IP الخاص بك، ومعلومات المتصفح، ورقم عشوائي. يُستخدم هذا للتعرف على جلسة التصفح لمدة 8 ساعات. بعد ذلك، يتم حذف الرمز من الذاكرة ولا يُخزن في أي مكان. + +نحن لا نتتبع الزوار عبر الجلسات، ولا نتتبع مدة بقائك في الموقع أو أين تذهب بعد مغادرتك. + +## كيف نجمع هذه البيانات؟ + +### التعليقات {#how-comments} + +يتم جمع البيانات المرتبطة بالتعليقات باستخدام [Giscus](https://giscus.app/)، وهي منصة تمكن من إضافة التعليقات، المبنية على GitHub. + +### التحليلات {#how-analytics} + +يتم جمع البيانات غير الشخصية باستخدام نسخة مستضافة ذاتيًا من [GoatCounter](https://www.goatcounter.com/)، وهي منصة مفتوحة المصدر لتحليلات الويب تركز على الخصوصية. + +## كيف سنستخدم البيانات؟ + +تُستخدم البيانات المرسلة إلى GitHub لعرض تعليقك على الموقع. + +تُستخدم البيانات غير الشخصية لإنشاء إحصائيات حول الموقع، مثل عدد الزوار يوميًا، أو الصفحات والمراجع الأكثر شعبية. تُستخدم هذه البيانات لتحسين هذا الموقع التجريبي وقالب تابي. يمكنك رؤية الإحصائيات الناتجة عن هذه البيانات على [صفحة الإحصائيات العامة](https://tabi-stats.osc.garden/). + +جميع البيانات المجمعة متاحة للجمهور، سواء في شكل تعليقات أو إحصائيات. + +نحن لا نستخدم البيانات لأي غرض آخر. + +## كيف نقوم بتخزين البيانات؟ + +بيانات التعليقات لا تُخزن بواسطة Giscus، كما هو موضح في [سياسة الخصوصية الخاصة بهم](https://github.com/giscus/giscus/blob/main/PRIVACY-POLICY.md#what-data-do-we-collect). يتم تخزين البيانات على خوادم GitHub. راجع [سياسة الخصوصية الخاصة بGitHub](https://docs.github.com/en/site-policy/privacy-policies/github-privacy-statement). + +يتم تخزين بيانات التحليلات على خادم مستضاف بواسطة [Vultr](https://www.vultr.com/). يقع الخادم في باريس، فرنسا. + +## كم من الوقت سنقوم بتخزين البيانات؟ + +تُخزن التعليقات إلى أجل غير مسمى، أو حتى تطلب حذفها. + +تُخزن باقي البيانات إلى أجل غير مسمى. + +## ما هي حقوقك في حماية البيانات؟ + +اعتمادًا على المعالجة والأساس القانوني، هناك عدد من الخيارات المتاحة لك للحفاظ على السيطرة على بياناتك الشخصية: + +- حق الوصول إلى بياناتك +- حق تعديل بياناتك +- حق الاعتراض على معالجة بياناتك الشخصية +- حق تقييد معالجة بياناتك +- حق حذف بياناتك +- حق سحب موافقتك + +إذا قدمت طلبًا، لدينا شهر واحد للرد عليك. إذا كنت ترغب في ممارسة أي من هذه الحقوق، يرجى الاتصال بنا باستخدام أيقونة البريد الإلكتروني في تذييل الموقع. + +## الكوكيز + +الموقع لا يستخدم الكوكيز. + +## سياسات الخصوصية لمواقع أخرى + +يحتوي هذا الموقع على روابط لمواقع أخرى. تنطبق سياسة الخصوصية هذه فقط على هذا الموقع، لذا إذا قمت بالنقر على رابط لموقع آخر، يجب عليك قراءة سياسة الخصوصية الخاصة بهم. + +## التغييرات على سياسة الخصوصية + +نحن نراجع هذه السياسة بانتظام ونضع أي تحديثات على هذه الصفحة. يمكنك التحقق من تاريخ تحديث هذه السياسة، بالإضافة إلى سجل التغييرات تحت عنوان الصفحة. + +## كيف تتواصل معنا + +إذا كانت لديك أي أسئلة حول سياسة الخصوصية هذه، أو البيانات التي نحتفظ بها عنك، أو إذا كنت ترغب في ممارسة أحد حقوق حماية البيانات الخاصة بك، فلا تتردد في الاتصال بنا باستخدام أيقونة البريد الإلكتروني في تذييل الموقع. \ No newline at end of file diff --git a/content/projects/_index.ar.md b/content/projects/_index.ar.md new file mode 100644 index 0000000..d351532 --- /dev/null +++ b/content/projects/_index.ar.md @@ -0,0 +1,10 @@ ++++ +title = "مشاريعي" +sort_by = "weight" +template = "cards.html" +insert_anchor_links = "right" + +[extra] +show_reading_time = false +quick_navigation_buttons = true ++++ diff --git a/content/projects/_index.ca.md b/content/projects/_index.ca.md index 5b65f16..b454ba3 100644 --- a/content/projects/_index.ca.md +++ b/content/projects/_index.ca.md @@ -5,7 +5,7 @@ template = "cards.html" insert_anchor_links = "left" [extra] -social_media_card = "projects/social_cards/ca_projects.jpg" +social_media_card = "projects/ca_projects.jpg" show_reading_time = false quick_navigation_buttons = true +++ diff --git a/content/projects/_index.es.md b/content/projects/_index.es.md index 196a3cd..93ab3fd 100644 --- a/content/projects/_index.es.md +++ b/content/projects/_index.es.md @@ -5,7 +5,7 @@ template = "cards.html" insert_anchor_links = "left" [extra] -social_media_card = "projects/social_cards/es_projects.jpg" +social_media_card = "projects/es_projects.jpg" show_reading_time = false quick_navigation_buttons = true +++ diff --git a/content/projects/_index.md b/content/projects/_index.md index e9130d9..e07ac64 100644 --- a/content/projects/_index.md +++ b/content/projects/_index.md @@ -5,7 +5,8 @@ template = "cards.html" insert_anchor_links = "left" [extra] -social_media_card = "projects/social_cards/projects.jpg" +social_media_card = "projects/projects.jpg" show_reading_time = false quick_navigation_buttons = true +iine_icon = 'heart' +++ diff --git a/content/projects/social_cards/ca_projects.jpg b/content/projects/ca_projects.jpg similarity index 100% rename from content/projects/social_cards/ca_projects.jpg rename to content/projects/ca_projects.jpg diff --git a/content/projects/doteki/doteki_logo.png b/content/projects/doteki/doteki_logo.png deleted file mode 100644 index ebef2ce..0000000 Binary files a/content/projects/doteki/doteki_logo.png and /dev/null differ diff --git a/content/projects/doteki/doteki_logo.webp b/content/projects/doteki/doteki_logo.webp index c48c54c..ee76f41 100644 Binary files a/content/projects/doteki/doteki_logo.webp and b/content/projects/doteki/doteki_logo.webp differ diff --git a/content/projects/doteki/index.ca.md b/content/projects/doteki/index.ca.md index 761a597..6a318cb 100644 --- a/content/projects/doteki/index.ca.md +++ b/content/projects/doteki/index.ca.md @@ -3,33 +3,58 @@ title = "dōteki" description = "Afegeix contingut dinàmic al teu perfil de GitHub amb un sistema intuïtiu de plugins." weight = 30 +[taxonomies] +tags = ["GitHub Actions", "automatització", "Python"] + [extra] local_image = "projects/doteki/doteki_logo.webp" social_media_card = "social_cards/projects_doteki.jpg" canonical_url = "https://osc.garden/ca/projects/doteki/" +++ -[**dōteki**](https://doteki.org/) és una eina dissenyada per donar vida als perfils de GitHub afegint contingut dinàmic de manera senzilla. Amb un arxiu de configuració TOML intuïtiu i un sistema de plugins versàtil, **dōteki** permet als usuaris mostrar contingut recent i automatitzat directament als seus perfils de GitHub. +**dōteki** actualitza el teu perfil de GitHub automàticament. Afegeix les teves últimes publicacions del blog, la música que escoltes o qualsevol altre contingut dinàmic mitjançant plugins. ![logo de dōteki: un riu passant per un bosc de bambú](https://cdn.jsdelivr.net/gh/welpo/doteki@main/website/static/img/logo.png) #### [GitHub](https://github.com/welpo/doteki) • [Lloc web](https://doteki.org/) • [Documentació](https://doteki.org/docs/) {.centered-text} -## Per què dōteki? +## Com funciona -**dōteki** destaca per la seva simplicitat i potència. És altament personalitzable i extensible, i està dissenyat per ser fàcil de configurar i utilitzar. +1. Afegeix marcadors al teu README: -## Característiques clau +```md,name=README.md + + +``` -- **Plug-and-Play**: Afegeix marcadors al teu README i utilitza un arxiu TOML per incorporar seccions de contingut dinàmic al teu perfil de GitHub. -- **Sistema de plugins extensible**: Des de mostrar les últimes publicacions del teu blog fins a compartir la música que has estat escoltant, el sistema de plugins permet infinites possibilitats. No trobes un plugin que s'ajusti a les teves necessitats? [Crea el teu propi](https://doteki.org/docs/developer-guide/plugin-standard)! -- [**Documentació exhaustiva**](https://doteki.org/docs/) amb informació detallada sobre com configurar i utilitzar **dōteki** i els seus plugins. Inclou [instruccions clares per als desenvolupadors](https://doteki.org/docs/developer-guide/) que vulguin contribuir al projecte. -- **Preparat per a l'automatització**: Utilitza l'[Acció de GitHub](https://github.com/welpo/doteki-action) per mantenir el teu perfil sempre actualitzat. +2. Configura què hi va: -## Refresca el teu perfil de GitHub +```toml,name=doteki.toml +[sections.blog] +plugin = "feed" +url = "https://osc.garden/atom.xml" # Substitueix amb el teu feed. -Aprofita les capacitats dinàmiques de **dōteki** i transforma el teu perfil de GitHub en un aparador del teu treball més recent, pensaments i interessos. +[sections.last_updated] +plugin = "current_date" +inline = true +``` -[Configura **dōteki** en menys de 5 minuts](https://doteki.org/) i dóna vida al teu perfil de GitHub. +3. Configura l'[Acció de GitHub](https://github.com/welpo/doteki-action). -[![targeta de xarxes socials de dōteki](social_cards/projects_doteki.jpg)](https://doteki.org/) +Això és tot! El teu README s'actualitzarà automàticament. + +## Característiques + +- **Sistema de plugins**: Mostra [entrades del blog](https://doteki.org/docs/plugins/feed), [música](https://doteki.org/docs/plugins/lastfm), o [crea el teu propi plugin](https://doteki.org/docs/developer-guide/plugin-standard) +- **Configuració simple**: Un arxiu TOML, una Acció de GitHub +- **Flexible**: Cada plugin té les seves pròpies opcions (ordre, entrades màximes, format…) +- **[Documentació detallada](https://doteki.org/docs/)**: Informació detallada sobre com configurar i utilitzar **dōteki** i els seus plugins. Inclou [instruccions clares per als desenvolupadors](https://doteki.org/docs/developer-guide/) que vulguin contribuir. + +## Documentació + +Consulta la [documentació](https://doteki.org/docs/) per a: + +- [Guia d'inici](https://doteki.org/docs/) +- [Plugins disponibles](https://doteki.org/docs/category/plugins) +- [Desenvolupament de plugins](https://doteki.org/docs/developer-guide/) +- [Opcions de configuració](https://doteki.org/docs/configuration/) diff --git a/content/projects/doteki/index.es.md b/content/projects/doteki/index.es.md index 4e50e6c..93e5159 100644 --- a/content/projects/doteki/index.es.md +++ b/content/projects/doteki/index.es.md @@ -3,33 +3,58 @@ title = "dōteki" description = "Añade contenido dinámico a tu perfil de GitHub con un sistema intuitivo de plugins." weight = 30 +[taxonomies] +tags = ["GitHub Actions", "automatización", "Python"] + [extra] local_image = "projects/doteki/doteki_logo.webp" social_media_card = "social_cards/projects_doteki.jpg" canonical_url = "https://osc.garden/es/projects/doteki/" +++ -[**dōteki**](https://doteki.org/) es una herramienta diseñada para dar vida a los perfiles de GitHub añadiendo contenido dinámico de manera sencilla. Con un archivo de configuración TOML intuitivo y un versátil sistema de plugins, **dōteki** permite a los usuarios mostrar contenido reciente y automatizado directamente en sus perfiles de GitHub. +**dōteki** actualiza tu perfil de GitHub automáticamente. Añade tus últimas publicaciones del blog, la música que escuchas o cualquier otro contenido dinámico mediante plugins. ![logo de dōteki: un río pasando por un bosque de bambú](https://cdn.jsdelivr.net/gh/welpo/doteki@main/website/static/img/logo.png) #### [GitHub](https://github.com/welpo/doteki) • [Sitio web](https://doteki.org/) • [Documentación](https://doteki.org/docs/) {.centered-text} -## ¿Por qué dōteki? +## Cómo funciona -**dōteki** destaca por su simplicidad y potencia. Permite mostrar tu trabajo, intereses y personalidad en tu perfil de GitHub, siempre al día. Es altamente personalizable y extensible, y está diseñado para ser fácil de configurar y usar. +1. Añade marcadores a tu README: -## Características clave +```md,name=README.md + + +``` -- **Plug-and-Play**: Añade marcadores a tu README y utiliza un archivo TOML para incorporar secciones de contenido dinámico en tu perfil de GitHub. -- **Sistema de plugins extensible**: Desde mostrar las últimas publicaciones de tu blog hasta compartir la música que has estado escuchando, el sistema de plugins permite infinitas posibilidades. ¿No encuentras un plugin que se ajuste a tus necesidades? ¡[Crea tu propio plugin](https://doteki.org/docs/developer-guide/plugin-standard)! -- [**Documentación exhaustiva**](https://doteki.org/docs/) con información detallada sobre cómo configurar y usar **dōteki** y sus plugins. Incluye [instrucciones claras para los desarrolladores](https://doteki.org/docs/developer-guide/) que quieran contribuir al proyecto -- **Listo para la automatización**: Utiliza la [Acción de GitHub](https://github.com/welpo/doteki-action) para mantener tu perfil siempre actualizado. +2. Configura qué va ahí: -## Refresca tu perfil de GitHub +```toml,name=doteki.toml +[sections.blog] +plugin = "feed" +url = "https://osc.garden/atom.xml" # Reemplaza con tu feed. -Aprovecha las capacidades dinámicas de **dōteki** y transforma tu perfil de GitHub en un escaparate de tu trabajo más reciente, pensamientos e intereses. +[sections.last_updated] +plugin = "current_date" +inline = true +``` -[Configura **dōteki** en menos de 5 minutos](https://doteki.org/) y da vida a tu perfil de GitHub. +3. Configura la [Acción de GitHub](https://github.com/welpo/doteki-action). -[![tarjeta de redes sociales de dōteki](social_cards/projects_doteki.jpg)](https://doteki.org/) +¡Eso es todo! Tu README se actualizará automáticamente. + +## Características + +- **Sistema de plugins**: Muestra [entradas del blog](https://doteki.org/docs/plugins/feed), [música](https://doteki.org/docs/plugins/lastfm), o [crea tu propio plugin](https://doteki.org/docs/developer-guide/plugin-standard) +- **Configuración simple**: Un archivo TOML, una Acción de GitHub +- **Flexible**: Cada plugin tiene sus propias opciones (orden, entradas máximas, formato…) +- **[Documentación detallada](https://doteki.org/docs/)**: Información detallada sobre cómo configurar y usar **dōteki** y sus plugins. Incluye [instrucciones claras para los desarrolladores](https://doteki.org/docs/developer-guide/) que quieran contribuir. + +## Documentación + +Consulta la [documentación](https://doteki.org/docs/) para: + +- [Guía de inicio rápido](https://doteki.org/docs/) +- [Plugins disponibles](https://doteki.org/docs/category/plugins) +- [Desarrollo de plugins](https://doteki.org/docs/developer-guide/) +- [Opciones de configuración](https://doteki.org/docs/configuration/) diff --git a/content/projects/doteki/index.md b/content/projects/doteki/index.md index e8e9fec..067bf76 100644 --- a/content/projects/doteki/index.md +++ b/content/projects/doteki/index.md @@ -3,33 +3,58 @@ title = "dōteki" description = "Add dynamic content to your GitHub profile through an intuitive plugin system." weight = 30 +[taxonomies] +tags = ["GitHub Actions", "automation", "Python"] + [extra] local_image = "projects/doteki/doteki_logo.webp" social_media_card = "social_cards/projects_doteki.jpg" canonical_url = "https://osc.garden/projects/doteki/" +++ -[**dōteki**](https://doteki.org/) is a tool designed to breathe life into GitHub profiles by adding dynamic content effortlessly. By leveraging an intuitive TOML configuration file along with a versatile plugin system, **dōteki** empowers users to showcase fresh, automated content directly on their GitHub profiles. +**dōteki** updates your GitHub profile README automatically. Add your latest blog posts, music you're listening to, or any other dynamic content using plugins. ![doteki logo: a river passing through a bamboo forest](https://cdn.jsdelivr.net/gh/welpo/doteki@main/website/static/img/logo.png) #### [GitHub](https://github.com/welpo/doteki) • [Website](https://doteki.org/) • [Documentation](https://doteki.org/docs/) {.centered-text} -## Why dōteki? +## How it works -**dōteki** stands out for its simplicity and power, enabling you to dynamically showcase your work, interests and personality on your GitHub profile. It's designed to be easy to set up and use, while also being highly customizable and extensible. +1. Add markers to your README: -## Key Features +```md,name=README.md + + +``` -- **Plug-and-Play**: Add markers to your README and use a TOML file for straightforward setup and easy management of dynamic content sections on your GitHub profile README. -- **Extensible plugin system**: From showcasing your latest blog posts to displaying your favourite music, the plugin system allows for endless possibilities. Can't find a plugin that suits your needs? [Create your own](https://doteki.org/docs/developer-guide/plugin-standard)! -- **Extensive documentation**: The [comprehensive documentation](https://doteki.org/docs/) provides detailed information on how to set up and use **dōteki** and its plugins. It includes [clear instructions for developers](https://doteki.org/docs/developer-guide/) looking to contribute. -- **Automation Ready**: Use the [GitHub Action](https://github.com/welpo/doteki-action) to keep your profile always up to date. +2. Configure what goes there: -## Enhance Your GitHub Profile Today +```toml,name=doteki.toml +[sections.blog] +plugin = "feed" +url = "https://osc.garden/atom.xml" # Replace with your feed. -Embrace the dynamic capabilities of **dōteki** and transform your GitHub profile into a vibrant showcase of your latest work, thoughts, and interests. +[sections.last_updated] +plugin = "current_date" +inline = true +``` -[Set up **dōteki** in less than 5 minutes](https://doteki.org/) and bring your GitHub profile to life. +3. Set up the [GitHub Action](https://github.com/welpo/doteki-action). -[![dōteki social media card](social_cards/projects_doteki.jpg)](https://doteki.org/) +That's it! Your README will stay updated automatically. + +## Features + +- **Plugin system**: Show [blog posts](https://doteki.org/docs/plugins/feed), [music](https://doteki.org/docs/plugins/lastfm), or [build your own plugin](https://doteki.org/docs/developer-guide/plugin-standard) +- **Simple setup**: One TOML file, one GitHub Action +- **Flexible**: Each plugin has its own options (sort order, max entries, format…) +- **[Extensive documentation](https://doteki.org/docs/)**: Detailed information on how to set up and use **dōteki** and its plugins. It includes [clear instructions for developers](https://doteki.org/docs/developer-guide/) looking to contribute. + +## Documentation + +Check the [docs](https://doteki.org/docs/) for: + +- [Getting started guide](https://doteki.org/docs/) +- [Available plugins](https://doteki.org/docs/category/plugins) +- [Plugin development](https://doteki.org/docs/developer-guide/) +- [Configuration options](https://doteki.org/docs/configuration/) diff --git a/content/projects/social_cards/es_projects.jpg b/content/projects/es_projects.jpg similarity index 100% rename from content/projects/social_cards/es_projects.jpg rename to content/projects/es_projects.jpg diff --git a/content/projects/git-sumi/git-sumi_logo.png b/content/projects/git-sumi/git-sumi_logo.png deleted file mode 100644 index 450d71b..0000000 Binary files a/content/projects/git-sumi/git-sumi_logo.png and /dev/null differ diff --git a/content/projects/git-sumi/git-sumi_logo.webp b/content/projects/git-sumi/git-sumi_logo.webp index d5d3ae8..90fd11b 100644 Binary files a/content/projects/git-sumi/git-sumi_logo.webp and b/content/projects/git-sumi/git-sumi_logo.webp differ diff --git a/content/projects/git-sumi/index.ca.md b/content/projects/git-sumi/index.ca.md index 8d6b4ad..cdee76e 100644 --- a/content/projects/git-sumi/index.ca.md +++ b/content/projects/git-sumi/index.ca.md @@ -3,13 +3,16 @@ title = "git-sumi" description = "El linter de missatges de commit no opinat basat en Rust." weight = 10 +[taxonomies] +tags = ["Git", "Rust", "Continuous Integration", "GitHub Actions", "CLI", "automatització"] + [extra] local_image = "projects/git-sumi/git-sumi_logo.webp" social_media_card = "social_cards/projects_git-sumi.jpg" canonical_url = "https://osc.garden/ca/projects/git-sumi/" +++ -**git-sumi** és un linter de missatges de commit no opinat escrit en Rust. És una eina flexible per complir els teus estàndards de missatges de commit, facilitant missatges consistents i fàcilment automatitzables. +**git-sumi** és el linter de missatges de commit no opinat escrit en Rust. {% wide_container() %} @@ -19,21 +22,12 @@ canonical_url = "https://osc.garden/ca/projects/git-sumi/" ## Característiques principals -- **Regles personalitzables**: Configura git-**sumi** per satisfer els requisits específics de cada projecte. Configura regles per a Conventional Commits, límits de longitud, ús de Gitmoji i més a través d'un senzill arxiu de configuració TOML. -- **Informe d'errors clar**: Proporciona un informe d'errors detallat, fent que la correcció sigui senzilla i educativa. -- **Integració sense fissures**: Sent un únic binari, git-**sumi** s'integra fàcilment en el teu flux de treball. Fins i tot pots utilitzar l'[Acció de GitHub](https://github.com/welpo/git-sumi-action) per validar els teus commits (o títols de PR) sense necessitat d'instal·lar res localment. +- **Regles personalitzables**: Configura regles per a Conventional Commits, límits de longitud, ús de [Gitmoji](https://gitmoji.dev/) i [més](https://sumi.rs/docs/rules). +- **Informe d'errors clar**: Proporciona errors detallats, fent que la correcció sigui senzilla i educativa. +- **Integració senzilla**: Com a binari únic, git-sumi s'integra fàcilment al teu flux de treball. També pots fer servir l'[Acció de GitHub](https://github.com/welpo/git-sumi-action) per validar commits (o títols de PR) sense instal·lar res. ## Bones pràctiques de desenvolupament -- **Ampla cobertura del codi**: Més del 95% de cobertura de línies i una cobertura de característiques exhaustiva garanteixen la robustesa de git-**sumi**. -- **Integració [contínua](https://github.com/welpo/git-sumi/blob/main/.github/workflows/ci.yml) i [publicació](https://github.com/welpo/git-sumi/blob/main/.github/workflows/release.yml)**: Fluxos de treball automatitzats per provar, integrar i publicar asseguren que cada versió de git-**sumi** estigui completament provada i llesta per al seu ús. -- **Contribucions de la comunitat**: Fomenta les contribucions de la comunitat de tot tipus, amb un enfocament acollidor tant per als nouvinguts com per als desenvolupadors experimentats. -- [**Documentació exhaustiva**](https://sumi.rs/docs/) per començar amb git-**sumi** i comprendre les seves característiques i capacitats. - -## Comença a millorar les teves pràctiques de commit avui - -Fes el primer pas cap a la transformació de les teves pràctiques de commit. La combinació de flexibilitat, retroalimentació detallada i fàcil integració de git-**sumi** el converteix en l'opció perfecta per a equips i individus que busquen millorar els seus missatges de commit. - -[Descobreix **git-sumi**](https://sumi.rs/) i fes-lo part del teu kit d'eines de desenvolupament. - -[![targeta de xarxes socials de git-sumi](social_cards/projects_git-sumi.jpg)](https://sumi.rs/) +- **Cobertura de codi**: 98% de cobertura en tests; un linter ha de ser fiable. +- **[Integració](https://github.com/welpo/git-sumi/blob/main/.github/workflows/ci.yml) i [publicació](https://github.com/welpo/git-sumi/blob/main/.github/workflows/release.yml) contínua**: Fluxos automatitzats per a testing i publicació de binaris multiplataforma a crates.io, PyPI i GitHub releases. +- **Documentació**: [Documentació completa](https://sumi.rs/docs/) amb [guia ràpida](https://sumi.rs/docs/), [exemples](https://sumi.rs/docs/examples), [regles](https://sumi.rs/docs/rules), [integració](https://sumi.rs/docs/integration), [FAQ](https://sumi.rs/docs/faq)... diff --git a/content/projects/git-sumi/index.es.md b/content/projects/git-sumi/index.es.md index 0f8df7d..5830eee 100644 --- a/content/projects/git-sumi/index.es.md +++ b/content/projects/git-sumi/index.es.md @@ -3,13 +3,16 @@ title = "git-sumi" description = "El linter de mensajes de commit no opinado basado en Rust." weight = 10 +[taxonomies] +tags = ["Git", "Rust", "Continuous Integration", "GitHub Actions", "CLI", "automatización"] + [extra] local_image = "projects/git-sumi/git-sumi_logo.webp" social_media_card = "social_cards/projects_git-sumi.jpg" canonical_url = "https://osc.garden/es/projects/git-sumi/" +++ -**git-sumi** es un linter de mensajes de commit no opinado escrito en Rust. Es una herramienta flexible para cumplir tus estándares de mensajes de commit, facilitando mensajes consistentes y fácilmente automatizables. +**git-sumi** es el linter de mensajes de commit no opinado escrito en Rust. {% wide_container() %} @@ -19,21 +22,12 @@ canonical_url = "https://osc.garden/es/projects/git-sumi/" ## Características principales -- **Reglas personalizables**: Configura git-**sumi** para satisfacer los requisitos específicos de cada proyecto. Configura reglas para Conventional Commits, límites de longitud, uso de Gitmoji y más a través de un archivo de un sencillo archivo de configuración TOML. -- **Reporte de errores claro**: Proporciona un reporte de errores detallado, haciendo que la corrección sea sencilla y educativa. -- **Integración sin fisuras**: Al ser único binario, git-**sumi** se integra fácilmente en tu flujo de trabajo. Incluso puedes usar la [Acción de GitHub](https://github.com/welpo/git-sumi-action) para validar tus commits (o títulos de PR) sin necesidad de instalar nada localmente. +- **Reglas personalizables**: Configura reglas para [Conventional Commits](https://www.conventionalcommits.org/), límites de longitud, uso de [Gitmoji](https://gitmoji.dev/) y [más](https://sumi.rs/docs/rules). +- **Reporte de errores claro**: Proporciona errores detallados, haciendo que la corrección sea sencilla y educativa. +- **Integración sencilla**: Al ser único binario, git-sumi se integra fácilmente en tu flujo de trabajo. Puedes usar la [Acción de GitHub](https://github.com/welpo/git-sumi-action) para validar commits (o títulos de PR) sin instalar nada. ## Buenas prácticas de desarrollo -- **Amplia cobertura del código**: Más del 95% de cobertura de líneas y una cobertura de características exhaustiva garantizan la robustez de git-**sumi**. -- **Integración [continua](https://github.com/welpo/git-sumi/blob/main/.github/workflows/ci.yml) y [publicación](https://github.com/welpo/git-sumi/blob/main/.github/workflows/release.yml)**: Flujos de trabajo automatizados para probar, integrar y publicar aseguran que cada versión de git-**sumi** esté completamente probada y lista para su uso. -- **Contribuciones de la comunidad**: Fomenta las contribuciones de la comunidad de todo tipo, con un enfoque acogedor tanto para los recién llegados como para los desarrolladores experimentados. -- [**Documentación exhaustiva**](https://sumi.rs/docs/) para empezar con git-**sumi** y comprender sus características y capacidades. - -## Empieza a mejorar tus prácticas de commit hoy - -Da el primer paso hacia la transformación de tus prácticas de commit. La combinación de flexibilidad, retroalimentación detallada y fácil integración de git-**sumi** lo convierte en la opción perfecta para equipos e individuos que buscan mejorar sus mensajes de commit. - -[Descubre **git-sumi**](https://sumi.rs/) y hazlo parte de tu kit de herramientas de desarrollo. - -[![tarjeta de redes sociales de git-sumi](social_cards/projects_git-sumi.jpg)](https://sumi.rs/) +- **Cobertura de código**: 98% de cobertura de código; un linter debe ser robusto. +- **[Integración](https://github.com/welpo/git-sumi/blob/main/.github/workflows/ci.yml) y [publicación](https://github.com/welpo/git-sumi/blob/main/.github/workflows/release.yml) continua**: Flujos automatizados para testing y publicación de binarios multiplataforma en crates.io, PyPI y GitHub releases. +- **Documentación**: [Documentación completa](https://sumi.rs/docs/) con [guía rápida](https://sumi.rs/docs/), [ejemplos](https://sumi.rs/docs/examples), [reglas](https://sumi.rs/docs/rules), [integración](https://sumi.rs/docs/integration), [FAQ](https://sumi.rs/docs/faq)... diff --git a/content/projects/git-sumi/index.md b/content/projects/git-sumi/index.md index f2cfb74..0cb59b8 100644 --- a/content/projects/git-sumi/index.md +++ b/content/projects/git-sumi/index.md @@ -3,13 +3,16 @@ title = "git-sumi" description = "The non-opinionated Rust-based commit message linter." weight = 10 +[taxonomies] +tags = ["Git", "Rust", "Continuous Integration", "GitHub Actions", "CLI", "automation"] + [extra] local_image = "projects/git-sumi/git-sumi_logo.webp" social_media_card = "social_cards/projects_git-sumi.jpg" canonical_url = "https://osc.garden/projects/git-sumi/" +++ -**git-sumi** is a non-opinionated commit message linter written in Rust. It's a flexible tool to enforce commit message standards, ensuring consistent and automation-friendly commit messages. +**git-sumi** is the non-opinionated commit message linter written in Rust. {% wide_container() %} @@ -17,23 +20,14 @@ canonical_url = "https://osc.garden/projects/git-sumi/" #### [GitHub](https://github.com/welpo/git-sumi) • [Website](https://sumi.rs/) • [Documentation](https://sumi.rs/docs/) {.centered-text} -## Main Features +## Main features -- **Customizable rules**: Tailor git-sumi to meet the specific requirements of each project. Configure rules to enforce Conventional Commits, length limits, Gitmoji usage, and more through a simple TOML configuration file. +- **Customizable rules**: Configure rules to enforce [Conventional Commits](https://www.conventionalcommits.org/), length limits, [Gitmoji](https://gitmoji.dev/) usage, and [more](https://sumi.rs/docs/rules). - **Clear error reporting**: Provides detailed error reporting, making fixing commit messages straightforward and educational. -- **Seamless integration**: As a single binary, git-sumi integrates easily into your existing workflow with minimal setup. You can even use the [GitHub Action](https://github.com/welpo/git-sumi-action) to lint your commits (or PR titles) without installing anything locally. +- **Seamless integration**: As a single binary, git-sumi easily integrates into your existing workflow with minimal setup. You can even use the [GitHub Action](https://github.com/welpo/git-sumi-action) to lint your commits (or PR titles) without installing anything. -## Development Best Practices +## Development best practices -- **Comprehensive code coverage**: Over 95% line coverage and thorough feature coverage ensures that git-sumi is reliable, robust, and ready for use. -- **Continuous [integration](https://github.com/welpo/git-sumi/blob/main/.github/workflows/ci.yml) and [deployment](https://github.com/welpo/git-sumi/blob/main/.github/workflows/release.yml)**: Automated workflows for testing, releasing, and deploying, ensuring that each version of git-sumi is thoroughly tested and ready for use. -- **Community contributions**: Encourages contributions from the community, including feature requests, bug reports, and enhancements, with a welcoming approach to both newcomers and seasoned developers. -- **Documentation**: [Comprehensive documentation](https://sumi.rs/docs/) to help users get started with git-sumi and understand its features and capabilities. - -## Start Enhancing Your Commit Practices Today - -Take the first step towards transforming your commit practices. git-sumi's blend of flexibility, detailed feedback, and ease of integration makes it the perfect choice for teams and individuals looking to improve their Git commit messages. - -[Discover **git-sumi**](https://sumi.rs/) and make it a part of your development toolkit. - -[![git-sumi social media card](social_cards/projects_git-sumi.jpg)](https://sumi.rs/) +- **Comprehensive code coverage**: 98% test coverage; linting needs to be reliable. +- **Continuous [integration](https://github.com/welpo/git-sumi/blob/main/.github/workflows/ci.yml) and [deployment](https://github.com/welpo/git-sumi/blob/main/.github/workflows/release.yml)**: Automated workflows for testing and releasing cross-compiled binaries to crates.io, PyPI and GitHub releases. +- **Documentation**: [Comprehensive documentation](https://sumi.rs/docs/) with a [quick start guide](https://sumi.rs/docs/), [examples](https://sumi.rs/docs/examples), [rules](https://sumi.rs/docs/rules), [integration](https://sumi.rs/docs/integration), [FAQ](https://sumi.rs/docs/faq)… diff --git a/content/projects/iine/iine_logo.webp b/content/projects/iine/iine_logo.webp new file mode 100644 index 0000000..f6681dd Binary files /dev/null and b/content/projects/iine/iine_logo.webp differ diff --git a/content/projects/iine/index.ca.md b/content/projects/iine/index.ca.md new file mode 100644 index 0000000..28b7f90 --- /dev/null +++ b/content/projects/iine/index.ca.md @@ -0,0 +1,52 @@ ++++ +title = "iine" +description = "Botons d'apreciació centrats en la privadesa i accessibles per a la web petita/independent." +weight = 15 + +[taxonomies] +tags = ["web", "JavaScript", "privadesa", "backend"] + +[extra] +local_image = "projects/iine/iine_logo.webp" +social_media_card = "social_cards/projects_iine.jpg" +canonical_url = "https://osc.garden/projects/iine/" ++++ + +Botons d'apreciació per al teu blog, jardí digital, portafoli… No cal compte. Sense seguiment. + +#### [GitHub](https://github.com/welpo/iine) • [Web](https://iine.to) {.centered-text} + +## Característiques + +- Sense marques de temps, sense IPs, sense seguiment +- ~3KB de JavaScript vanilla +- Funciona sense JavaScript +- Diverses icones: cor, polze amunt, vot positiu, o qualsevol emoji +- Construït per a la web petita/independent +- Gratuït per sempre +- Accessible per disseny +- Auto-hostejable + +## Inici ràpid + +Afegeix botons d'apreciació al teu lloc amb dues línies. Carrega l'script: + +```html + +``` + +Afegeix el botó: + +```html + +``` + +Fet. Els teus visitants ja poden mostrar apreciació anònima pel teu contingut. + +## Per què iine? + +Volia afegir botons de m'agrada/felicitacions/alegria/apreciació al [meu blog](https://osc.garden) sense registrar-me a res, i assegurant-me que els meus visitants no fossin rastrejats. + +Esperant que altres ho trobin útil, vaig fer el servei públic (codi obert) i gratuït per sempre (almenys fins que doni suport a més de 100k llocs web). + +Construït per a blogs, portafolis, jardins digitals, i qualsevol que cregui que la web hauria de ser més humana. diff --git a/content/projects/iine/index.es.md b/content/projects/iine/index.es.md new file mode 100644 index 0000000..5396832 --- /dev/null +++ b/content/projects/iine/index.es.md @@ -0,0 +1,52 @@ ++++ +title = "iine" +description = "Botones de apreciación centrados en la privacidad y accesibles para la web pequeña." +weight = 15 + +[taxonomies] +tags = ["web", "JavaScript", "privacidad", "backend"] + +[extra] +local_image = "projects/iine/iine_logo.webp" +social_media_card = "social_cards/projects_iine.jpg" +canonical_url = "https://osc.garden/projects/iine/" ++++ + +Botones de apreciación para tu blog, jardín digital, portafolio… Sin cuenta requerida. Sin seguimiento. + +#### [GitHub](https://github.com/welpo/iine) • [Sitio web](https://iine.to) {.centered-text} + +## Características + +- Sin marcas de tiempo, sin IPs, sin seguimiento +- ~3KB de JavaScript vanilla +- Funciona sin JavaScript +- Varios iconos: corazón, pulgar arriba, voto positivo, o cualquier emoji +- Construido para la web pequeña/independiente +- Gratis para siempre +- Accesible por diseño +- Auto-hosteable + +## Inicio rápido + +Añade botones de apreciación a tu sitio con dos líneas. Carga el script: + +```html + +``` + +Añade el botón: + +```html + +``` + +Listo. Tus visitantes ya pueden mostrar apreciación anónima por tu contenido. + +## ¿Por qué iine? + +Quería añadir botones de me gusta/felicitaciones/alegría/apreciación a [mi blog](https://osc.garden) sin registrarme en nada, y asegurándome de que mis visitantes no fueran rastreados. + +Esperando que otros lo encuentren útil, hice el servicio público (código abierto) y gratis para siempre (al menos hasta que soporte más de 100k sitios web). + +Construido para blogs, portafolios, jardines digitales, y cualquiera que crea que la web debería ser más humana. diff --git a/content/projects/iine/index.md b/content/projects/iine/index.md new file mode 100644 index 0000000..557310f --- /dev/null +++ b/content/projects/iine/index.md @@ -0,0 +1,52 @@ ++++ +title = "iine" +description = "Privacy-focused & accessible like buttons for the small web." +weight = 15 + +[taxonomies] +tags = ["web", "JavaScript", "privacy", "backend"] + +[extra] +local_image = "projects/iine/iine_logo.webp" +social_media_card = "social_cards/projects_iine.jpg" +canonical_url = "https://osc.garden/projects/iine/" ++++ + +Appreciation buttons for your blog, digital garden, portfolio… No account required. No tracking. + +#### [GitHub](https://github.com/welpo/iine) • [Website](https://iine.to) {.centered-text} + +## Features + +- No timestamps, no IPs, no tracking +- ~3KB of vanilla JavaScript +- Works without JavaScript +- Various icons: heart, thumbs up, upvote, or any emoji +- Built for the small/indie web +- Free forever +- Accessible by design +- Self-hostable + +## Quick start + +Add appreciation buttons to your site with two lines. Load the script: + +```html + +``` + +Add the button: + +```html + +``` + +Done. Your visitors can now show anonymous appreciation for your content. + +## Why iine? + +I wanted to add like/kudos/cheers/appreciation buttons to [my blog](https://osc.garden) without signing up for anything, and making sure my visitors weren't tracked. + +Hoping others find it useful, I made the service public (open source) and free forever (at least until it supports over 100k websites). + +Built for blogs, portfolios, digital gardens, and anyone who believes the web should be more human. diff --git a/content/projects/iine/social_cards/projects_iine.jpg b/content/projects/iine/social_cards/projects_iine.jpg new file mode 100644 index 0000000..bdb1d9a Binary files /dev/null and b/content/projects/iine/social_cards/projects_iine.jpg differ diff --git a/content/projects/nani/index.ca.md b/content/projects/nani/index.ca.md index 5bf2375..abd9663 100644 --- a/content/projects/nani/index.ca.md +++ b/content/projects/nani/index.ca.md @@ -3,6 +3,9 @@ title = "nani" description = "Script Bash per crear URLs públiques a partir d'arxius o text en servidors remots." weight = 50 +[taxonomies] +tags = ["bash", "CLI"] + [extra] local_image = "projects/nani/nani_logo.webp" canonical_url = "https://osc.garden/ca/projects/tabi/" diff --git a/content/projects/nani/index.es.md b/content/projects/nani/index.es.md index edf773a..0b338aa 100644 --- a/content/projects/nani/index.es.md +++ b/content/projects/nani/index.es.md @@ -3,6 +3,9 @@ title = "nani" description = "Script Bash para crear URLs públicas a partir de archivos o texto en servidores remotos." weight = 50 +[taxonomies] +tags = ["bash", "CLI"] + [extra] local_image = "projects/nani/nani_logo.webp" canonical_url = "https://osc.garden/es/projects/tabi/" diff --git a/content/projects/nani/index.md b/content/projects/nani/index.md index cab154a..4372312 100644 --- a/content/projects/nani/index.md +++ b/content/projects/nani/index.md @@ -3,6 +3,9 @@ title = "nani" description = "Bash script to create public URLs from files or text on remote servers." weight = 50 +[taxonomies] +tags = ["bash", "CLI"] + [extra] local_image = "projects/nani/nani_logo.webp" canonical_url = "https://osc.garden/projects/tabi/" diff --git a/content/projects/nani/nani_logo.webp b/content/projects/nani/nani_logo.webp index 2f301b1..08d7175 100644 Binary files a/content/projects/nani/nani_logo.webp and b/content/projects/nani/nani_logo.webp differ diff --git a/content/projects/nemui/index.ca.md b/content/projects/nemui/index.ca.md new file mode 100644 index 0000000..5b2e61f --- /dev/null +++ b/content/projects/nemui/index.ca.md @@ -0,0 +1,35 @@ ++++ +title = "nemui" +description = "Ajusta gradualment el teu horari de son amb suport per horari d'estiu." +weight = 22 + +[taxonomies] +tags = ["son", "interactiu", "web app", "web", "JavaScript"] + +[extra] +local_image = "projects/nemui/nemui_logo.webp" +canonical_url = "https://osc.garden/ca/projects/tabi/" +social_media_card = "social_cards/projects_nemui.jpg" ++++ + +nemui és una aplicació web que t'ajuda a fer una transició suau a un nou horari de son. El seu nom ve de les paraules japoneses per dormir (nemu) i transició (i), que es llegeix com 眠いnemui (somnolent). + +#### [Prova-la ara](https://nemui.osc.garden) • [GitHub](https://github.com/welpo/nemui) • [Blog](https://osc.garden/ca/blog/nemui-sleep-schedule-planner/) {.centered-text} + +## Característiques + +- Interfície interactiva de rellotge inspirada en Apple +- Ajust gradual de l'horari de son basat en la ciència del son +- Suport complet per a l'horari d'estiu (DST) +- Exportació a calendari (.ics) amb recordatoris per anar a dormir +- Emmagatzematge local per seguir el teu progrés +- Accessible: compatible amb navegació per teclat i lectors de pantalla + +## Per què nemui? + +A diferència dels canvis bruscos que poden alterar el teu ritme circadià, nemui t'ajuda a ajustar el teu horari de son de manera gradual. És especialment útil per a: + +- Adaptar-te a nous horaris de feina/estudi +- Preparar-te per a canvis de zona horària +- Fer una transició suau durant els canvis d'hora +- Corregir un horari de son desajustat diff --git a/content/projects/nemui/index.es.md b/content/projects/nemui/index.es.md new file mode 100644 index 0000000..6365ad0 --- /dev/null +++ b/content/projects/nemui/index.es.md @@ -0,0 +1,35 @@ ++++ +title = "nemui" +description = "Ajusta gradualmente tu horario de sueño con soporte para horario de verano." +weight = 32 + +[taxonomies] +tags = ["sueño", "interactivo", "web app", "web", "JavaScript"] + +[extra] +local_image = "projects/nemui/nemui_logo.webp" +canonical_url = "https://osc.garden/es/projects/tabi/" +social_media_card = "social_cards/projects_nemui.jpg" ++++ + +nemui es una aplicación web que te ayuda a hacer una transición suave a un nuevo horario de sueño. Su nombre viene de las palabras japonesas para dormir (nemu) y transición (i), que se lee como 眠いnemui (somnoliento). + +#### [Pruébala ahora](https://nemui.osc.garden) • [GitHub](https://github.com/welpo/nemui) • [Blog](https://osc.garden/es/blog/nemui-sleep-schedule-planner/) {.centered-text} + +## Características + +- Interfaz interactiva de reloj inspirada en Apple +- Ajuste gradual del horario de sueño basado en la ciencia del sueño +- Soporte completo para el horario de verano (DST) +- Exportación a calendario (.ics) con recordatorios para dormir +- Almacenamiento local para seguir tu progreso +- Accesible: compatible con navegación por teclado y lectores de pantalla + +## ¿Por qué nemui? + +A diferencia de los cambios bruscos que pueden alterar tu ritmo circadiano, nemui te ayuda a ajustar tu horario de sueño de forma gradual. Es especialmente útil para: + +- Adaptarte a nuevos horarios de trabajo/estudio +- Prepararte para cambios de zona horaria +- Hacer una transición suave durante los cambios de hora +- Corregir un horario de sueño desajustado diff --git a/content/projects/nemui/index.md b/content/projects/nemui/index.md new file mode 100644 index 0000000..f6347cd --- /dev/null +++ b/content/projects/nemui/index.md @@ -0,0 +1,35 @@ ++++ +title = "nemui" +description = "Gradually adjust your sleep schedule with support for DST transitions." +weight = 32 + +[taxonomies] +tags = ["sleep", "interactive", "web app", "web", "JavaScript"] + +[extra] +local_image = "projects/nemui/nemui_logo.webp" +canonical_url = "https://osc.garden/projects/tabi/" +social_media_card = "social_cards/projects_nemui.jpg" ++++ + +nemui is a web app that helps you smoothly transition to a new sleep schedule. Named after the Japanese words for sleep (nemu) and transition (i), reading as 眠いnemui (sleepy). + +#### [Try it now](https://nemui.osc.garden) • [GitHub](https://github.com/welpo/nemui) • [Blog post](https://osc.garden/blog/nemui-sleep-schedule-planner/) {.centered-text} + +## Features + +- Interactive clock interface inspired by Apple +- Gradual sleep schedule adjustment based on sleep science +- Full Daylight Saving Time (DST) support +- Calendar (.ics) export with bedtime reminders +- Local storage for progress tracking +- Accessible: supports keyboard navigation and screen readers + +## Why nemui? + +Unlike abrupt changes that can disrupt your circadian rhythm, nemui helps you adjust your sleep schedule gradually. It's particularly useful for: + +- Adapting to new work/study schedules +- Preparing for timezone changes +- Smoothly transitioning through DST changes +- Fixing a misaligned sleep schedule diff --git a/content/projects/nemui/nemui_logo.webp b/content/projects/nemui/nemui_logo.webp new file mode 100644 index 0000000..454203f Binary files /dev/null and b/content/projects/nemui/nemui_logo.webp differ diff --git a/content/projects/nemui/social_cards/projects_nemui.jpg b/content/projects/nemui/social_cards/projects_nemui.jpg new file mode 100644 index 0000000..d7b6ea0 Binary files /dev/null and b/content/projects/nemui/social_cards/projects_nemui.jpg differ diff --git a/content/projects/social_cards/projects.jpg b/content/projects/projects.jpg similarity index 100% rename from content/projects/social_cards/projects.jpg rename to content/projects/projects.jpg diff --git a/content/projects/ramu/index.ca.md b/content/projects/ramu/index.ca.md new file mode 100644 index 0000000..63ce50e --- /dev/null +++ b/content/projects/ramu/index.ca.md @@ -0,0 +1,34 @@ ++++ +title = "ramu" +description = "Una aplicació web per practicar la lectura i comprensió auditiva de nombres en japonès." +weight = 35 + +[taxonomies] +tags = ["Japonès", "interactiu", "web app", "web", "PWA", "JavaScript"] + +[extra] +local_image = "projects/ramu/ramu_logo.webp" +canonical_url = "https://osc.garden/ca/projects/ramu/" +social_media_card = "social_cards/projects_ramu.jpg" +iine_icon = '🐏' ++++ + +ramu és una aplicació web progressiva per practicar la lectura i comprensió auditiva de nombres en japonès. El nom reflecteix el seu propòsit: aconseguir accès aleatori (RAM; memòria d'accés aleatori) als nombres, en contraposició a una memòria seqüencial (1, 2, 3…). + +{% wide_container() %} + +{% end %} + +#### [Prova-la ara](https://ramu.osc.garden) • [GitHub](https://github.com/welpo/ramu) • [Article](https://osc.garden/ca/blog/ramu-japanese-numbers-practice-web-app/) {.centered-text} + +## Característiques + +- Pràctica amb nombres aràbics (123…) i japonesos (一二三…) +- Dos modes de pràctica: lectura i comprensió auditiva +- Rangs numèrics configurables (des de 0 fins a més de 100.000.000) +- Pràctica de comptadors (個、本、匹…) +- Funciona sense connexió com a aplicació web progressiva +- Control complet per teclat (espai/ per següent, esc per aturar) +- Compatible amb lectors de pantalla per a la pràctica amb nombres aràbics + +[![targeta social de ramu](social_cards/projects_ramu.jpg)](https://ramu.osc.garden) diff --git a/content/projects/ramu/index.es.md b/content/projects/ramu/index.es.md new file mode 100644 index 0000000..9e0311e --- /dev/null +++ b/content/projects/ramu/index.es.md @@ -0,0 +1,34 @@ ++++ +title = "ramu" +description = "Una aplicación web para practicar la lectura y comprensión auditiva de números en japonés." +weight = 35 + +[taxonomies] +tags = ["Japonés", "interactivo", "web app", "web", "PWA", "JavaScript"] + +[extra] +local_image = "projects/ramu/ramu_logo.webp" +canonical_url = "https://osc.garden/es/projects/ramu/" +social_media_card = "social_cards/projects_ramu.jpg" +iine_icon = '🐏' ++++ + +ramu es una aplicación web progresiva para practicar la lectura y comprensión auditiva de números en japonés. El nombre refleja su propósito: lograr acceso aleatorio (RAM; memoria de acceso aleatorio) a los números, en contraposición a una memoria secuencial (1, 2, 3…). + +{% wide_container() %} + +{% end %} + +#### [Pruébala ahora](https://ramu.osc.garden) • [GitHub](https://github.com/welpo/ramu) • [Artículo](https://osc.garden/es/blog/ramu-japanese-numbers-practice-web-app/) {.centered-text} + +## Características + +- Práctica con números arábigos (123…) y japoneses (一二三…) +- Dos modos de práctica: lectura y comprensión auditiva +- Rangos numéricos configurables (desde 0 hasta más de 100.000.000) +- Práctica de contadores (個、本、匹…) +- Funciona sin conexión como aplicación web progresiva +- Control por teclado (espacio/ para siguiente, esc para detener) +- Compatible con lectores de pantalla para la práctica con números arábigos + +[![tarjeta social de ramu](social_cards/projects_ramu.jpg)](https://ramu.osc.garden) diff --git a/content/projects/ramu/index.md b/content/projects/ramu/index.md new file mode 100644 index 0000000..8016baf --- /dev/null +++ b/content/projects/ramu/index.md @@ -0,0 +1,34 @@ ++++ +title = "ramu" +description = "A web app to practice reading and listening to Japanese numbers." +weight = 35 + +[taxonomies] +tags = ["Japanese", "interactive", "web app", "web", "PWA", "JavaScript"] + +[extra] +local_image = "projects/ramu/ramu_logo.webp" +canonical_url = "https://osc.garden/projects/ramu/" +social_media_card = "social_cards/projects_ramu.jpg" +iine_icon = '🐏' ++++ + +ramu is a Progressive Web App to practice reading and listening to Japanese numbers. The name reflects its purpose: achieving RAM (Random Access Memory) to numbers, as opposed to sequential memory (1, 2, 3…). + +{% wide_container() %} + +{% end %} + +#### [Try it now](https://ramu.osc.garden) • [GitHub](https://github.com/welpo/ramu) • [Blog post](https://osc.garden/blog/ramu-japanese-numbers-practice-web-app/) {.centered-text} + +## Features + +- Practice with both Arabic (123…) and Japanese (一二三…) numerals +- Two practice modes: reading and listening comprehension +- Configurable number ranges (from 0 to over 100,000,000) +- Counter word practice (個、本、匹…) +- Works offline as a Progressive Web App +- Full keyboard control (space/ for next, esc to stop) +- Screen reader friendly for Arabic numeral practice + +[![ramu social media card](social_cards/projects_ramu.jpg)](https://ramu.osc.garden) diff --git a/content/projects/ramu/media/ラム_demo.mp4 b/content/projects/ramu/media/ラム_demo.mp4 new file mode 100644 index 0000000..0a96a11 Binary files /dev/null and b/content/projects/ramu/media/ラム_demo.mp4 differ diff --git a/content/projects/ramu/ramu_logo.webp b/content/projects/ramu/ramu_logo.webp new file mode 100644 index 0000000..1eee491 Binary files /dev/null and b/content/projects/ramu/ramu_logo.webp differ diff --git a/content/projects/ramu/social_cards/projects_ramu.jpg b/content/projects/ramu/social_cards/projects_ramu.jpg new file mode 100644 index 0000000..09757fd Binary files /dev/null and b/content/projects/ramu/social_cards/projects_ramu.jpg differ diff --git a/content/projects/shuku/index.ca.md b/content/projects/shuku/index.ca.md new file mode 100644 index 0000000..78230a0 --- /dev/null +++ b/content/projects/shuku/index.ca.md @@ -0,0 +1,48 @@ ++++ +title = "shuku" +description = "Condensa pel·lícules i sèries per quedar-te només amb el diàleg. Dissenyat per aprendre idiomes." +weight = 20 + +[taxonomies] +tags = ["Python", "media", "linguistics", "CLI"] + +[extra] +local_image = "projects/shuku/shuku_logo.webp" +social_media_card = "social_cards/projects_shuku.jpg" +canonical_url = "https://osc.garden/ca/projects/shuku/" ++++ + +**shuku** (しゅくしょう: «minificació») crea versions condensades de pel·lícules i sèries conservant només els diàlegs. + + + +#### [GitHub](https://github.com/welpo/shuku) • [Blog](https://osc.garden/ca/blog/shuku-condensed-media-language-learning/) • [Documentació](https://github.com/welpo/shuku#readme) • [PyPI](https://pypi.org/project/shuku/) {.centered-text} + +## Característiques + +### Gestió intel·ligent de continguts + +- Detecció i correspondència automàtica de subtítols amb cerca difusa (fuzzy matching) +- Selecció intel·ligent de pistes d'àudio/subtítols +- Extracció de metadades (títol, temporada, número d'episodi) + +### Output flexible + +- Àudio condensat (MP3, FLAC, AAC, Opus…) +- Vídeo condensat +- Subtítols sincronitzats (SRT, ASS, o LRC per a apps tipus karaoke) + +### Alta personalització + +- Qualitat i còdecs d'àudio/vídeo configurables +- Ajust de temps de subtítols i farciment +- Filtra subtítols (efectes de so, lletres, capítols específics) +- Suport per a arguments personalitzats de FFmpeg + +### Experiència de l'usuari + +- Multiplataforma: GNU+Linux, macOS i Windows +- Logging detallat amb indicadors de progrés +- Suport per a processament per lots + +[![targeta social de shuku](/img/social_cards/projects_shuku.jpg)](https://github.com/welpo/shuku) diff --git a/content/projects/shuku/index.es.md b/content/projects/shuku/index.es.md new file mode 100644 index 0000000..dd8d79b --- /dev/null +++ b/content/projects/shuku/index.es.md @@ -0,0 +1,48 @@ ++++ +title = "shuku" +description = "Condensa películas y series para quedarte solo con el diálogo. Diseñado para aprender idiomas." +weight = 20 + +[taxonomies] +tags = ["Python", "media", "linguistics", "CLI"] + +[extra] +local_image = "projects/shuku/shuku_logo.webp" +social_media_card = "social_cards/projects_shuku.jpg" +canonical_url = "https://osc.garden/es/projects/shuku/" ++++ + +**shuku** (しゅくしょう: «minificación») crea versiones condensadas de películas y series conservando solo los diálogos. + + + +#### [GitHub](https://github.com/welpo/shuku) • [Blog](https://osc.garden/es/blog/shuku-condensed-media-language-learning/) • [Documentación](https://github.com/welpo/shuku#readme) • [PyPI](https://pypi.org/project/shuku/) {.centered-text} + +## Características + +### Manejo inteligente de medios + +- Detección y correspondencia automática de subtítulos con búsqueda difusa (fuzzy matching) +- Selección inteligente de pistas de audio/subtítulos +- Extracción de metadatos (título, temporada, número de episodio) + +### Output flexible + +- Audio condensado (MP3, FLAC, AAC, Opus…) +- Video condensado +- Subtítulos sincronizados (SRT, ASS, o LRC para apps tipo karaoke) + +### Alta personalización + +- Calidad y códecs de audio/video configurables +- Ajuste de tiempo de subtítulos y relleno +- Filtra subtítulos (efectos de sonido, letras, capítulos específicos) +- Soporte para argumentos personalizados de FFmpeg + +### Experiencia del usuario + +- Multiplataforma: GNU+Linux, macOS y Windows +- Logging detallado con indicadores de progreso +- Soporte para procesamiento por lotes + +[![tarjeta social de shuku](/img/social_cards/projects_shuku.jpg)](https://github.com/welpo/shuku) diff --git a/content/projects/shuku/index.md b/content/projects/shuku/index.md new file mode 100644 index 0000000..1c188fe --- /dev/null +++ b/content/projects/shuku/index.md @@ -0,0 +1,56 @@ ++++ +title = "shuku" +description = "Shrink media to keep only the dialogue. For immersion language learning." +weight = 20 + +[taxonomies] +tags = ["Python", "media", "linguistics", "CLI"] + +[extra] +local_image = "projects/shuku/shuku_logo.webp" +social_media_card = "social_cards/projects_shuku.jpg" +canonical_url = "https://osc.garden/projects/shuku/" ++++ + +**shuku** (しゅくしょう: "minification") creates condensed versions of films and TV shows by keeping only the dialogue. + + + +#### [GitHub](https://github.com/welpo/shuku) • [Blog post](https://osc.garden/blog/shuku-condensed-media-language-learning/) • [Documentation](https://github.com/welpo/shuku#readme) • [PyPI](https://pypi.org/project/shuku/) {.centered-text} + +## Features + +### Smart media handling + +- Automatic subtitle detection and matching with fuzzy search +- Intelligent audio/subtitle track selection +- Metadata extraction (title, season, episode number) + +### Flexible output + +- Condensed audio (MP3, FLAC, AAC, Opus...) +- Condensed video +- Synchronized subtitles (including LRC for karaoke-style review) +- Clean filenames in output + +### High customization + +- Configurable audio/video quality and codecs +- Subtitle timing adjustment and padding +- Skip unwanted content (sound effects, lyrics, specific chapters) +- Custom FFmpeg arguments support + +### User experience + +- Cross-platform: GNU+Linux, macOS, and Windows +- Detailed logging with progress indicators +- Batch processing support + +## Development best practices + +- Comprehensive testing: 100% code coverage +- Clean code: Type-hinted Python with clear responsibilities +- Continuous Integration/Deployment +- Comprehensive documentation + +[![shuku social media card](/img/social_cards/projects_shuku.jpg)](https://github.com/welpo/shuku) diff --git a/content/projects/shuku/shuku_logo.webp b/content/projects/shuku/shuku_logo.webp new file mode 100644 index 0000000..900a598 Binary files /dev/null and b/content/projects/shuku/shuku_logo.webp differ diff --git a/content/projects/shuku/social_cards/projects_shuku.jpg b/content/projects/shuku/social_cards/projects_shuku.jpg new file mode 100644 index 0000000..24d2bed Binary files /dev/null and b/content/projects/shuku/social_cards/projects_shuku.jpg differ diff --git a/content/projects/streaming-royalties-calculator/index.ca.md b/content/projects/streaming-royalties-calculator/index.ca.md index 2c3ccc8..bfa69f8 100644 --- a/content/projects/streaming-royalties-calculator/index.ca.md +++ b/content/projects/streaming-royalties-calculator/index.ca.md @@ -3,6 +3,9 @@ title = "Calculadora de royalties de streaming" description = "Una eina per calcular els royalties de streaming per a músics." weight = 45 +[taxonomies] +tags = ["música", "interactiu", "web app", "web", "JavaScript", "anàlisi de dades"] + [extra] local_image = "projects/streaming-royalties-calculator/streaming-royalties-calculator_logo.webp" canonical_url = "https://osc.garden/ca/projects/streaming-royalties-calculator/" diff --git a/content/projects/streaming-royalties-calculator/index.es.md b/content/projects/streaming-royalties-calculator/index.es.md index ae4d9f7..a9f598f 100644 --- a/content/projects/streaming-royalties-calculator/index.es.md +++ b/content/projects/streaming-royalties-calculator/index.es.md @@ -3,6 +3,9 @@ title = "Calculadora de royalties de streaming" description = "Una herramienta para calcular los royalties de streaming para músicos." weight = 45 +[taxonomies] +tags = ["música", "interactivo", "web app", "web", "JavaScript", "análisis de datos"] + [extra] local_image = "projects/streaming-royalties-calculator/streaming-royalties-calculator_logo.webp" canonical_url = "https://osc.garden/es/projects/streaming-royalties-calculator/" diff --git a/content/projects/streaming-royalties-calculator/index.md b/content/projects/streaming-royalties-calculator/index.md index 8aac428..c531834 100644 --- a/content/projects/streaming-royalties-calculator/index.md +++ b/content/projects/streaming-royalties-calculator/index.md @@ -3,6 +3,9 @@ title = "Streaming Royalties Calculator" description = "A tool to calculate streaming royalties for musicians." weight = 45 +[taxonomies] +tags = ["music", "interactive", "web app", "web", "JavaScript", "data analysis"] + [extra] local_image = "projects/streaming-royalties-calculator/streaming-royalties-calculator_logo.webp" canonical_url = "https://osc.garden/projects/streaming-royalties-calculator/" diff --git a/content/projects/streaming-royalties-calculator/streaming-royalties-calculator_logo.webp b/content/projects/streaming-royalties-calculator/streaming-royalties-calculator_logo.webp index 06754bf..19c8fe4 100644 Binary files a/content/projects/streaming-royalties-calculator/streaming-royalties-calculator_logo.webp and b/content/projects/streaming-royalties-calculator/streaming-royalties-calculator_logo.webp differ diff --git a/content/projects/tabi/index.ar.md b/content/projects/tabi/index.ar.md new file mode 100644 index 0000000..02abea0 --- /dev/null +++ b/content/projects/tabi/index.ar.md @@ -0,0 +1,47 @@ ++++ +title = "تابي" +description = "سمة زولا عصرية غنية بالمميزات مع دعم متميز لتعدد اللغات" +weight = 40 + +[taxonomies] +tags = ["ويب", "جافا سكريبت"] + +[extra] +local_image = "projects/tabi/tabi.webp" ++++ + +[**تابي**](https://github.com/welpo/tabi) هي سمة عصرية غنية بالمميزات لـ[Zola](https://www.getzola.org/)، منشئ مواقع ثابتة سريع. + +{{ full_width_image(src="https://cdn.jsdelivr.net/gh/welpo/tabi@main/light_dark_screenshot.png", alt="تابي في الوضعين الفاتح والداكن") }} + +#### [عرض على GitHub](https://github.com/welpo/tabi) • [عرض توضيحي وتوثيق](https://welpo.github.io/tabi/) {.centered-text} + +## المميزات + +- دعم كامل [للغة العربية والكتابة من اليمين إلى اليسار](https://welpo.github.io/tabi/blog/faq-languages/#how-do-i-set-a-default-language-for-my-site) +- [دعم للسلاسل](https://welpo.github.io/tabi/blog/series/) لإنشاء محتوى متسلسل مثل الدروس والدورات +- سمتان داكنة وفاتحة، مع التبديل التلقائي حسب إعدادات النظام +- [دعم التعليقات](https://welpo.github.io/tabi/blog/comments/) باستخدام giscus أو utterances أو Hyvor Talk أو Isso +- [دعم KaTeX](https://katex.org/) للمعادلات الرياضية +- [دعم Indieweb](https://indieweb.org/) مع microformats وh-card وwebmentions +- [دعم Mermaid](https://welpo.github.io/tabi/blog/shortcodes/#mermaid-diagrams) لإنشاء المخططات +- [بحث محلي](https://welpo.github.io/tabi/blog/mastering-tabi-settings/#search) متعدد اللغات +- تصميم متجاوب يعمل على جميع الأجهزة +- [صفحة مشاريع](https://welpo.github.io/tabi/projects/) و[أرشيف](https://welpo.github.io/tabi/archive/) + +## ممارسات التطوير + +- **[الالتزامات التقليدية](https://www.conventionalcommits.org) و[Gitmoji](https://gitmoji.dev/)**: تتبع رسائل الالتزام تنسيقات موحدة لتحسين القراءة +- **تتبع المشكلات**: لكل خطأ أو ميزة جديدة تذكرة مخصصة، مرتبطة بأي التزامات برمجية وطلبات سحب ذات صلة +- **تعليقات شاملة**: يتم توثيق التذاكر بالصور ومقاطع الفيديو والأوصاف التفصيلية لتسهيل التواصل الفعال وحل المشكلات +- **الإحالات المرجعية**: نربط جميع التذاكر بالتزامات الشفرة وطلبات السحب أو المشكلات ذات الصلة للتتبع الكامل + +## تطور المشروع + +تم تصميم **تابي** في الأصل لموقعي الشخصي، [osc.garden](https://osc.garden). على الرغم من أصولها للاستخدام الشخصي، تم تنفيذ أفضل الممارسات منذ البداية لضمان الجودة وقابلية الصيانة. ومنذ ذلك الحين نمت السمة لتجذب مجتمعًا نشطًا من المساهمين على GitHub. + +## ابدأ رحلة الكتابة مع تابي + +لديك شيء تريد قوله. ربما عن تجربتك في تعلم لغة جديدة، أو عن رحلتك في استكشاف [فن الفلامنكو](https://en.wikipedia.org/wiki/Palo_(flamenco))، أو عن كيف نجحت في حل مشكلة برمجية في مشروع مفتوح المصدر. + +**تابي** توفر الأساس المثالي لمساحة كتابتك، مما يتيح لك التركيز على كلماتك بينما يهتم Zola وتابي بالجانب التقني. ادخل عالم التدوين مع نظام يجعل كل تدوينة متعة في الكتابة والقراءة. صوتك له قيمة—شاركه مع العالم. diff --git a/content/projects/tabi/index.ca.md b/content/projects/tabi/index.ca.md index 4a47865..0293403 100644 --- a/content/projects/tabi/index.ca.md +++ b/content/projects/tabi/index.ca.md @@ -1,17 +1,21 @@ +++ title = "tabi" description = "Un tema de Zola ràpid, lleuger i modern amb suport multilingüe." -weight = 30 +weight = 40 + +[taxonomies] +tags = ["web", "JavaScript"] [extra] local_image = "projects/tabi/tabi.webp" canonical_url = "https://osc.garden/ca/projects/tabi/" social_media_card = "social_cards/ca_projects_tabi.jpg" +iine_icon = '🌱' +++ [**tabi**](https://github.com/welpo/tabi) és un tema modern i ric en funcionalitat per a [Zola](https://www.getzola.org/), un generador de llocs web estàtics molt ràpid. -{{ full_width_image(src="light_dark_tabi.webp", alt="Modes clar i fosc de tabi") }} +{{ full_width_image(src="https://cdn.jsdelivr.net/gh/welpo/tabi@main/light_dark_screenshot.png", alt="Modes clar i fosc de tabi") }} #### [Veure a GitHub](https://github.com/welpo/tabi) • [Demo i documentación](https://welpo.github.io/tabi/ca/) {.centered-text} @@ -19,9 +23,13 @@ social_media_card = "social_cards/ca_projects_tabi.jpg" - [Estableix qualsevol idioma com a predeterminat](https://welpo.github.io/tabi/ca/blog/faq-languages/#com-estableixo-la-llengua-predeterminada-del-meu-lloc). Configura el teu lloc en xinès, espanyol, francès, hindi… o qualsevol [altre idioma compatible](https://welpo.github.io/tabi/ca/blog/faq-languages/#quines-llengues-admet-tabi). La interfície del tema es traduirà en conseqüència. - [Integració amb repositoris remots](https://welpo.github.io/tabi/ca/blog/mastering-tabi-settings#integracio-amb-repositoris-git) a GitHub, GitLab, Gitea i Codeberg per a l'historial de commits i mostrar el codi font del lloc. -- Temes clars i foscos. S'adapta a la configuració del sistema operatiu, amb un interruptor a la barra de navegació. +- Tema clar i fosc. S'adapta a la configuració del sistema operatiu, amb un interruptor a la barra de navegació. - [Suport multilingüe complet](https://welpo.github.io/tabi/ca/blog/faq-languages/#com-gestiona-tabi-el-suport-multilingue). Afegeix tants idiomes com vulguis i deixa que els teus usuaris triin amb el selector d'idioma. +- [Suport per a sèries](https://welpo.github.io/tabi/ca/blog/series/) per crear contingut seqüencial com tutorials, cursos i històries multipart. - Puntuació perfecta en Lighthouse (Rendiment, Accessibilitat, Millors Pràctiques i SEO). +- Suport per a [Indieweb](https://indieweb.org/) amb microformats, suport per a [hcard](https://welpo.github.io/tabi/ca/blog/mastering-tabi-settings/#h-card-representativa) i [webmentions](https://welpo.github.io/tabi/ca/blog/mastering-tabi-settings/#webmentions). +- Suport per a [diagrames de Mermaid](https://welpo.github.io/tabi/ca/blog/shortcodes/#diagrames-de-mermaid) per a crear diagrames i gràfics amb text. +- Botons de «m'agrada» d'[iine](https://iine.to/) per mostrar apreciació anònima pel teu contingut. - Ressaltat de sintaxi de codi amb colors basats en [Catppuccin](https://github.com/catppuccin/catppuccin) Frappé. - Suport per a [comentaris usant giscus, utterances, Hyvor Talk o Isso](https://welpo.github.io/tabi/ca/blog/comments/). - [Cerca local](https://welpo.github.io/tabi/ca/blog/mastering-tabi-settings/#cerca) amb una interfície accessible i multilingüe. @@ -39,6 +47,7 @@ social_media_card = "social_cards/ca_projects_tabi.jpg" - [Botons de navegació ràpida](https://welpo.github.io/tabi/ca/blog/mastering-tabi-settings/#botons-de-navegacio-rapida). - [Shortcodes personalitzats](https://welpo.github.io/tabi/ca/blog/shortcodes/). - [Skins personalitzables](https://welpo.github.io/tabi/ca/blog/customise-tabi/). +- [Publicacions fixades](https://welpo.github.io/tabi/ca/blog/mastering-tabi-settings/#fixar-entrades). - [Pàgina de projectes](https://welpo.github.io/tabi/ca/projects/). - Disseny responsive. - Suport de [KaTeX](https://katex.org/). diff --git a/content/projects/tabi/index.es.md b/content/projects/tabi/index.es.md index 054404e..d6725bb 100644 --- a/content/projects/tabi/index.es.md +++ b/content/projects/tabi/index.es.md @@ -1,17 +1,21 @@ +++ title = "tabi" description = "Un tema de Zola rápido, ligero y moderno con soporte multilingüe." -weight = 30 +weight = 40 + +[taxonomies] +tags = ["web", "JavaScript"] [extra] local_image = "projects/tabi/tabi.webp" canonical_url = "https://osc.garden/es/projects/tabi/" social_media_card = "social_cards/es_projects_tabi.jpg" +iine_icon = '🌱' +++ [**tabi**](https://github.com/welpo/tabi) es un tema moderno y rico en funcionalidad para [Zola](https://www.getzola.org/), un generador de sitios web estáticos muy rápido. -{{ full_width_image(src="light_dark_tabi.webp", alt="Modos claro y oscuro de tabi") }} +{{ full_width_image(src="https://cdn.jsdelivr.net/gh/welpo/tabi@main/light_dark_screenshot.png", alt="Modos claro y oscuro de tabi") }} #### [Ver en GitHub](https://github.com/welpo/tabi) • [Demo y documentación](https://welpo.github.io/tabi/es/) {.centered-text} @@ -20,8 +24,12 @@ social_media_card = "social_cards/es_projects_tabi.jpg" - [Establece cualquier idioma como predeterminado](https://welpo.github.io/tabi/es/blog/faq-languages/#como-establezco-el-idioma-predeterminado-de-mi-sitio). Configura tu sitio en chino, español, francés, hindi… o cualquier [otro idioma compatible](https://welpo.github.io/tabi/es/blog/faq-languages/#que-idiomas-admite-tabi). La interfaz del tema se traducirá en consecuencia. - [Integración con repositorios remotos](https://welpo.github.io/tabi/es/blog/mastering-tabi-settings/#integracion-con-repositorios-git) en GitHub, GitLab, Gitea y Codeberg para el historial de commits y mostrar el código fuente del sitio. - [Soporte multilingüe completo](https://welpo.github.io/tabi/es/blog/faq-languages/#como-gestiona-tabi-el-soporte-multilingue). Añade tantos idiomas como desees y deja que tus usuarios elijan con un selector de idioma. -- Temas claros y oscuros. Se adapta a la configuración del sistema operativo, con un interruptor en la barra de navegación. +- Tema claro y oscuro. Se adapta a la configuración del sistema operativo, con un interruptor en la barra de navegación. +- [Soporte para series](https://welpo.github.io/tabi/es/blog/series/) para crear contenido secuencial como tutoriales, cursos e historias en varias partes. - Puntuación perfecta en Lighthouse (Rendimiento, Accesibilidad, Mejores Prácticas y SEO). +- Soporte para [Indieweb](https://indieweb.org/) con microformatos, soporte para [hcard](https://welpo.github.io/tabi/es/blog/mastering-tabi-settings/#h-card-representativa) y [webmentions](https://welpo.github.io/tabi/blog/mastering-tabi-settings/#webmentions). +- Botones de «me gusta» de [iine](https://iine.to/) para mostrar aprecio anónimo por tu contenido. +- Soporte para [diagramas de Mermaid](https://welpo.github.io/tabi/es/blog/shortcodes/#diagramas-de-mermaid) para crear diagramas y gráficos con texto. - Resaltado de sintaxis de código con colores basados en [Catppuccin](https://github.com/catppuccin/catppuccin) Frappé. - Soporte para [comentarios usando giscus, utterances, Hyvor Talk o Isso](https://welpo.github.io/tabi/es/blog/comments/). - Todo el JavaScript se puede [deshabilitar completamente](https://welpo.github.io/tabi/es/blog/javascript/). @@ -39,6 +47,7 @@ social_media_card = "social_cards/es_projects_tabi.jpg" - [Tarjetas para redes sociales](https://welpo.github.io/tabi/es/blog/mastering-tabi-settings/#tarjetas-para-redes-sociales). - [Shortcodes personalizados](https://welpo.github.io/tabi/es/blog/shortcodes/). - [Skins personalizables](https://welpo.github.io/tabi/es/blog/customise-tabi/). +- [Publicaciones fijadas](https://welpo.github.io/tabi/es/blog/mastering-tabi-settings/#fijar-publicaciones). - [Página de proyectos](https://welpo.github.io/tabi/es/projects/). - Diseño responsive. - Soporte de [KaTeX](https://katex.org/). diff --git a/content/projects/tabi/index.md b/content/projects/tabi/index.md index 556fb44..1d13797 100644 --- a/content/projects/tabi/index.md +++ b/content/projects/tabi/index.md @@ -1,11 +1,15 @@ +++ title = "tabi" description = "A feature-rich modern Zola theme with first-class multi-language support." -weight = 30 +weight = 40 + +[taxonomies] +tags = ["web", "JavaScript"] [extra] local_image = "projects/tabi/tabi.webp" social_media_card = "social_cards/projects_tabi.jpg" +iine_icon = '🌱' +++ [**tabi**](https://github.com/welpo/tabi) is a modern, feature-rich theme for [Zola](https://www.getzola.org/), a fast static site generator. @@ -18,13 +22,18 @@ social_media_card = "social_cards/projects_tabi.jpg" - [Set any language as default](https://welpo.github.io/tabi/blog/faq-languages/#how-do-i-set-a-default-language-for-my-site). Set your base site to Chinese, Spanish, French, Hindi… or any [other supported language](https://welpo.github.io/tabi/blog/faq-languages/#what-languages-does-tabi-support). The theme's interface will be translated accordingly. - [Integration with remote repositories](https://welpo.github.io/tabi/blog/mastering-tabi-settings/#git-repository-integration) on GitHub, GitLab, Gitea & Codeberg for commit history and showing the site source. +- [Series support](https://welpo.github.io/tabi/blog/series/) for creating sequential content like tutorials, courses, and multi-part stories. - Dark and light themes. Defaults to the OS setting, with a switcher in the navigation bar. - Thorough documentation. See [Mastering tabi Settings: A Comprehensive Guide](https://welpo.github.io/tabi/blog/mastering-tabi-settings/). - Perfect Lighthouse score (Performance, Accessibility, Best Practices and SEO). - [Comprehensive multi-language support](https://welpo.github.io/tabi/blog/faq-languages/#how-does-tabi-handle-multilingual-support). Add as many languages as you wish. - Support for [comments using giscus, utterances, Hyvor Talk, or Isso](https://welpo.github.io/tabi/blog/comments/). +- [Indieweb](https://indieweb.org/) ready with microformats, [hcard](https://welpo.github.io/tabi/blog/mastering-tabi-settings/#representative-h-card) and [webmentions](https://welpo.github.io/tabi/blog/mastering-tabi-settings/#webmentions) support. - Code syntax highlighting with colours based on [Catppuccin](https://github.com/catppuccin/catppuccin) Frappé. +- [iine like buttons](https://iine.to/) for anonymous appreciation of your content. +- [Mermaid support](https://welpo.github.io/tabi/blog/shortcodes/#mermaid-diagrams) to create diagrams and charts with text. - [Local search](https://welpo.github.io/tabi/blog/mastering-tabi-settings/#search) with an accessible, multi-lingual interface. +- [Custom Twitter card](https://welpo.github.io/tabi/blog/mastering-tabi-settings/#social-media-cards) and automatic Open Graph tags. - [KaTeX](https://katex.org/) support for mathematical notation. - [Stylized and human readable Atom feed](https://welpo.github.io/tabi/atom.xml). - [Stylized and human readable sitemap](https://welpo.github.io/tabi/sitemap.xml). @@ -38,11 +47,11 @@ social_media_card = "social_cards/projects_tabi.jpg" - [Custom canonical URLs](https://welpo.github.io/tabi/blog/mastering-tabi-settings/#canonical-url). - [Customizable skins](https://welpo.github.io/tabi/blog/customise-tabi/). - [Custom shortcodes](https://welpo.github.io/tabi/blog/shortcodes/). -- [Footnote backlinks](https://welpo.github.io/tabi/blog/mastering-tabi-settings/#footnote-backlinks). - [Social media cards](https://welpo.github.io/tabi/blog/mastering-tabi-settings/#social-media-cards). - Responsive design. - [Projects page](https://welpo.github.io/tabi/projects/). - [Archive page](https://welpo.github.io/tabi/archive/). +- [Pinned posts](https://welpo.github.io/tabi/blog/mastering-tabi-settings/#pinning-posts). - [Social links](https://welpo.github.io/tabi/blog/mastering-tabi-settings/#social-media-icons). - [Tags](https://welpo.github.io/tabi/blog/mastering-tabi-settings/#tags). diff --git a/content/projects/tabi/tabi.webp b/content/projects/tabi/tabi.webp index 5b0f1d2..c05d2a7 100644 Binary files a/content/projects/tabi/tabi.webp and b/content/projects/tabi/tabi.webp differ diff --git a/content/projects/zutsu/index.ca.md b/content/projects/zutsu/index.ca.md new file mode 100644 index 0000000..cbe50bb --- /dev/null +++ b/content/projects/zutsu/index.ca.md @@ -0,0 +1,51 @@ ++++ +title = "zutsu" +description = "Una aplicació minimalista i privada de gestió de tasques." +weight = 32 + +[taxonomies] +tags = ["interactiu", "productivitat", "web app", "web", "JavaScript"] + +[extra] +local_image = "projects/zutsu/zutsu_logo.webp" +canonical_url = "https://osc.garden/ca/projects/zutsu/" +social_media_card = "social_cards/projects_zutsu.jpg" ++++ + +{% wide_container() %} + +{% end %} + +#### [Prova-la ara](https://zutsu.osc.garden) • [GitHub](https://github.com/welpo/zutsu) • [Article](https://osc.garden/ca/blog/zutsu-offline-task-planner-web-app/) {.centered-text} + +zutsu és una aplicació web de gestió de tasques dissenyada per ajudar-te a centrar-te en una tasca cada vegada. El nom ve de 一つhitotsuずつzutsu, que significa «d'un en un» en 日本語japonès. + +## Per què? + +Volia substituir els esdeveniments de calendari inflexibles per a les sessions d'estudi per alguna cosa senzilla i adaptable. Sense aplicacions de tercers, sense sincronització al núvol, només un espai centrat en a la gestió de tasques. + +## Funcionalitats + +### Principals + +- Gestió de tasques amb possibilitat de reordenar-les arrossegant +- Temporitzador amb durada personalitzable per tasca +- Privada i offline —sense comptes, seguiment ni emmagatzematge al servidor +- Importació/exportació de llistes de tasques (JSON) + +### Utilitats + +- Temporitzador Pomodoro +- Calendari d'activitat (vista de 30 dies) +- Comptador i cronòmetre +- Espai per prendre notes +- Selectors aleatoris + +### Qualitat de vida + +- Tema fosc i clar +- Notificacions del navegador i so +- Dreceres de teclat +- Disseny responsive + +[![targeta social de zutsu](social_cards/projects_zutsu.jpg)](https://zutsu.osc.garden) diff --git a/content/projects/zutsu/index.es.md b/content/projects/zutsu/index.es.md new file mode 100644 index 0000000..003fa19 --- /dev/null +++ b/content/projects/zutsu/index.es.md @@ -0,0 +1,51 @@ ++++ +title = "zutsu" +description = "Una aplicación minimalista y privada de gestión de tareas." +weight = 32 + +[taxonomies] +tags = ["interactivo", "productividad", "web app", "web", "JavaScript"] + +[extra] +local_image = "projects/zutsu/zutsu_logo.webp" +canonical_url = "https://osc.garden/es/projects/zutsu/" +social_media_card = "social_cards/projects_zutsu.jpg" ++++ + +{% wide_container() %} + +{% end %} + +#### [Pruébala ahora](https://zutsu.osc.garden) • [GitHub](https://github.com/welpo/zutsu) • [Artículo](https://osc.garden/es/blog/zutsu-offline-task-planner-web-app/) {.centered-text} + +zutsu es una aplicación web de gestión de tareas diseñada para ayudarte a centrarte en una tarea a la vez. El nombre viene de 一つhitotsuずつzutsu, que significa «uno por uno» en 日本語japonés. + +## ¿Por qué? + +Quería sustituir la inflexibilidad del calendario para planificar las sesiones de estudio por algo simple y adaptable. Sin aplicaciones de terceros, sin sincronización en la nube —solo un espacio centrado en la gestión de tareas. + +## Funcionalidades + +### Principales + +- Gestión de tareas con posibilidad de reordenarlas arrastrando y soltando +- Temporizador con duración personalizable por tarea +- Privada y offline —sin cuentas, seguimiento ni almacenamiento en servidor +- Importación/exportación de listas de tareas (JSON) + +### Utilidades + +- Temporizador Pomodoro +- Calendario de actividad (vista de 30 días) +- Contador y cronómetro +- Espacio para tomar notas +- Selectores aleatorios + +### Calidad de vida + +- Tema oscuro y claro +- Notificaciones del navegador y sonido +- Atajos de teclado +- Diseño responsive + +[![tarjeta social de zutsu](social_cards/projects_zutsu.jpg)](https://zutsu.osc.garden) diff --git a/content/projects/zutsu/index.md b/content/projects/zutsu/index.md new file mode 100644 index 0000000..4205459 --- /dev/null +++ b/content/projects/zutsu/index.md @@ -0,0 +1,51 @@ ++++ +title = "zutsu" +description = "A private minimalist task management app." +weight = 32 + +[taxonomies] +tags = ["interactive", "productivity", "web app", "web", "JavaScript"] + +[extra] +local_image = "projects/zutsu/zutsu_logo.webp" +canonical_url = "https://osc.garden/projects/zutsu/" +social_media_card = "social_cards/projects_zutsu.jpg" ++++ + +{% wide_container() %} + +{% end %} + +#### [Try it now](https://zutsu.osc.garden) • [GitHub](https://github.com/welpo/zutsu) • [Blog post](https://osc.garden/blog/zutsu-offline-task-planner-web-app/) {.centered-text} + +zutsu is a task management web app designed to help you focus on one task at a time. The name comes from 一つhitotsuずつzutsu which means "one at a time" in 日本語Japanese. + +## Why? + +I wanted to replace inflexible calendar events for study sessions with something simple and adaptable. No third-party apps, no cloud sync —just a focused space for task management. + +## Features + +### Core + +- Task management with drag-and-drop reordering +- Timer with customizable duration for each task +- Private & offline—no accounts, tracking, or server storage +- Import/export task lists (JSON) + +### Utilities + +- Pomodoro timer +- Activity calendar (30-day view) +- Counter & stopwatch +- Note-taking space +- Random choice makers + +### Quality of life + +- Dark and light theme support +- Browser and sound notifications +- Keyboard shortcuts +- Responsive design + +[![zutsu social media card](social_cards/projects_zutsu.jpg)](https://zutsu.osc.garden) diff --git a/content/projects/zutsu/social_cards/projects_zutsu.jpg b/content/projects/zutsu/social_cards/projects_zutsu.jpg new file mode 100644 index 0000000..9373a35 Binary files /dev/null and b/content/projects/zutsu/social_cards/projects_zutsu.jpg differ diff --git a/content/projects/zutsu/zutsu_logo.webp b/content/projects/zutsu/zutsu_logo.webp new file mode 100644 index 0000000..8432797 Binary files /dev/null and b/content/projects/zutsu/zutsu_logo.webp differ diff --git a/i18n/ar.toml b/i18n/ar.toml index 250526e..afeeb28 100644 --- a/i18n/ar.toml +++ b/i18n/ar.toml @@ -30,6 +30,9 @@ few_results = "تم العثور على $NUMBER نتائج" # for 3 to 10 searc many_results = "تم العثور على $NUMBER نتيجة" # 11 or more search results. # Navigation. +skip_to_content = "الإنتقال إلى المحتوى" +pinned = "مثبتة" +jump_to_posts = "الإنتقال إلى التدوينات" read_more = "إقرأ المزيد" one_posts = "تدوينة واحدة" #One blog post. two_posts = "تدوينتين" #Two blog posts. @@ -70,7 +73,7 @@ two_words = "كلمتين" # Two words. few_words = "$NUMBER كلمات" # 3 to 10 words. many_words = "$NUMBER كلمة" # 11 or more words. -last_updated_on = "آخر تحديث كان في" +last_updated_on = "تم التحديث في $DATE" see_changes = "الإطلاع على التغييرات" # Post body. @@ -81,6 +84,9 @@ load_comments = "إظهار التعليقات" copied = "تم النسخ!" copy_code_to_clipboard = "نسخ الشِفرة إلى الحافظة" +# iine appreciation button. +like_this_post = "أعجبني" + # Footer: Powered by Zola and tabi. powered_by = "مُشَغل بواسطة" and = "و" diff --git a/i18n/ca.toml b/i18n/ca.toml index 1532574..5edd8cd 100644 --- a/i18n/ca.toml +++ b/i18n/ca.toml @@ -23,6 +23,9 @@ one_results = "$NUMBER resultat" # "1 result" many_results = "$NUMBER resultats" # "3 results" # Navigation. +skip_to_content = "Saltar al contingut" +pinned = "Fixada" +jump_to_posts = "Saltar als articles" read_more = "Llegir més" one_posts = "$NUMBER entrada" many_posts = "$NUMBER entrades" @@ -55,7 +58,7 @@ many_min_read = "$NUMBER mins de lectura" zero_words = "Cap paraula" one_words = "$NUMBER paraula" many_words = "$NUMBER paraules" -last_updated_on = "Última actualizació el" +last_updated_on = "Actualitzat el $DATE" see_changes = "Veure canvis" # Post body. @@ -66,6 +69,9 @@ load_comments = "Carregar comentaris" copied = "Copiat!" copy_code_to_clipboard = "Copia el codi al porta-retalls" +# iine appreciation button. +like_this_post = "M'agrada aquesta publicació" + # Footer: Powered by Zola and tabi. powered_by = "Propulsat per" and = "i" diff --git a/i18n/de.toml b/i18n/de.toml index a633b68..79c846f 100644 --- a/i18n/de.toml +++ b/i18n/de.toml @@ -27,6 +27,9 @@ one_results = "$NUMBER Ergebnis" # "1 result" many_results = "$NUMBER Ergebnisse" # "3 results" # Navigation. +skip_to_content = "Zum Inhalt springen" +pinned = "Angeheftet" +jump_to_posts = "Zu den Beiträgen springen" read_more = "Weiterlesen" one_posts = "$NUMBER Beitrag" many_posts = "$NUMBER Beiträge" @@ -59,7 +62,7 @@ many_min_read = "$NUMBER Min. Lesezeit" zero_words = "Keine Wörter" one_words = "$NUMBER Wort" many_words = "$NUMBER Wörter" -last_updated_on = "Zuletzt aktualisiert am" +last_updated_on = "Aktualisiert am $DATE" see_changes = "Änderungen anzeigen" # Post body. @@ -70,6 +73,9 @@ load_comments = "Kommentare laden" copied = "Kopiert!" copy_code_to_clipboard = "Code in die Zwischenablage kopieren" +# iine appreciation button. +like_this_post = "Dieser Beitrag gefällt mir" + # Footer. powered_by = "Angetrieben von" and = "und" diff --git a/i18n/en.toml b/i18n/en.toml index ae5f02e..586153c 100644 --- a/i18n/en.toml +++ b/i18n/en.toml @@ -23,6 +23,9 @@ one_results = "$NUMBER result" # "1 result" many_results = "$NUMBER results" # "3 results" # Navigation. +skip_to_content = "Skip to content" +pinned = "Pinned" +jump_to_posts = "Jump to posts" read_more = "Read more" one_posts = "$NUMBER post" many_posts = "$NUMBER posts" # "3 posts" @@ -55,7 +58,7 @@ many_min_read = "$NUMBER min read" zero_words = "No words" one_words = "$NUMBER word" many_words = "$NUMBER words" -last_updated_on = "Last updated on" +last_updated_on = "Updated on $DATE" see_changes = "See changes" # Post body. @@ -66,6 +69,9 @@ load_comments = "Load comments" copied = "Copied!" copy_code_to_clipboard = "Copy code to clipboard" +# iine appreciation button. +like_this_post = "Like this post" + # Footer: Powered by Zola and tabi. powered_by = "Powered by" and = "&" diff --git a/i18n/es.toml b/i18n/es.toml index 7e0fe0c..df419e8 100644 --- a/i18n/es.toml +++ b/i18n/es.toml @@ -23,6 +23,9 @@ one_results = "$NUMBER resultado" many_results = "$NUMBER resultados" # Navigation. +skip_to_content = "Saltar al contenido" +pinned = "Fijada" +jump_to_posts = "Saltar a las entradas" read_more = "Leer más" one_posts = "$NUMBER entrada" many_posts = "$NUMBER entradas" @@ -55,7 +58,7 @@ many_min_read = "$NUMBER mins de lectura" zero_words = "Cero palabras" one_words = "$NUMBER palabra" many_words = "$NUMBER palabras" -last_updated_on = "Última actualización el" +last_updated_on = "Actualizado el $DATE" see_changes = "Ver cambios" # Post body. @@ -66,6 +69,9 @@ load_comments = "Cargar comentarios" copied = "Copiado!" copy_code_to_clipboard = "Copiar código al portapapeles" +# iine appreciation button. +like_this_post = "Me gusta esta publicación" + # Footer: Powered by Zola and tabi. powered_by = "Impulsado por" and = "y" diff --git a/i18n/et.toml b/i18n/et.toml new file mode 100644 index 0000000..f328552 --- /dev/null +++ b/i18n/et.toml @@ -0,0 +1,99 @@ +language_name = "Eesti" # Shown in language picker for multi-language sites. +date_locale = "et_EE" +full_stop = "." # Used at the end of a sentence. + +# Menu items. +# Should match the names in config.extra.menu and config.extra.footer_menu. +blog = "blogi" +archive = "arhiiv" +tags = "sildid" +projects = "projektid" +about = "minust" +contact = "kontakt" +privacy = "privaatsuspoliitika" +site_statistics = "saidi statistika" +sitemap = "saidikaart" + +# Search. +search = "Otsing" +search_icon_title = "Otsingu avamiseks klõpsake või vajutage $SHORTCUT" # $SHORTCUT will be replaced with the actual keyboard shortcut. +clear_search = "Tühjenda otsing" # Title of the X icon next to search input. +zero_results = "Tulemusi pole" +one_results = "$NUMBER tulemus" # "1 result" +many_results = "$NUMBER tulemust" # "3 results" + +# Navigation. +skip_to_content = "Hüppa sisu juurde" +pinned = "Kinnitatud" +jump_to_posts = "Hüppa postitusteni" +read_more = "Loe edasi" +one_posts = "$NUMBER postitus" +many_posts = "$NUMBER postitust" # "3 posts" +prev = "Eelmine" # As in "Previous" page. +next = "Järgmine" # As in "Next" page. +of = "/" # E.g. Page 1 "of" 3 +all_posts = "Kõik postitused" +all_tags = "Kõik sildid" +all_projects = "Kõik projektid" +featured_projects = "Esiletõstetud projektid" +language_selection = "Keele valik" +toggle_mode = "Lülita $MODE režiim" # $MODE will be replaced by a value (or both) below. +dark = "tume" +light = "hele" +reset_mode = "Lähtesta vaikerežiim" + +# Quick navigation buttons. +toggle_toc = "Sisukorra kuvamine/peitmine" +go_to_top = "Mine lehe ülaossa" +go_to_comments = "Mine kommentaaride juurde" + +# Post metadata. +by_author = "Autor: $AUTHOR" # $AUTHOR will be replaced by the author(s). +author_separator = ", " # For multiple authors. Ensure spacing where necessary. +author_conjunction = " ja " # For multiple authors. Ensure spacing where necessary. +draft = "MUSTAND" +zero_min_read = "Lugemisaeg <1 min" +one_min_read = "Lugemisaeg $NUMBER min" +many_min_read = "Lugemisaeg $NUMBER min" +zero_words = "Sõnu pole" +one_words = "$NUMBER sõna" +many_words = "$NUMBER sõna" +last_updated_on = "Uuendatud $DATE" +see_changes = "Vaata muudatusi" + +# Post body. +table_of_contents = "Sisukord" +load_comments = "Lae kommentaarid" + +# Copy code block button. +copied = "Kopeeritud!" +copy_code_to_clipboard = "Kopeeri kood lõikelauale" + +# iine appreciation button. +like_this_post = "Mulle meeldib see postitus" + +# Footer: Powered by Zola and tabi. +powered_by = "Toetab" +and = "ja" +site_source = "Saidi lähtekood" + +# 404 error. +# https://welpo.github.io/tabi/404.html +page_missing = "Tundub, et otsitud lehte ei leitud" +translation_missing = "või pole seda veel teie keelde tõlgitud" +check_url = "Kontrollige URL-i vigade suhtes või" +go_home = "minge tagasi avalehele" + +# For multilingual quote shortcode. +# https://welpo.github.io/tabi/blog/shortcodes/#multilingual-quotes +show_original_quote = "Näita originaaltsitaati" +show_translation = "Näita tõlget" +open_quotation_mark = "“" +close_quotation_mark = "”" + +# Translations for stylised Atom feed. +# https://welpo.github.io/tabi/atom.xml +# Must contain "About Feeds"; it will become a link. +about_feeds = "See on veebivoog, tuntud ka kui Atom-voog. Tellimiseks kopeerige URL aadressiribalt oma uudistelugerisse. Külastage About Feeds lehte, et õppida ja alustada. See on tasuta." +visit_the_site = "Külasta veebisaiti" +recent_posts = "Viimased postitused" diff --git a/i18n/fa.toml b/i18n/fa.toml index 9f1a553..2153aab 100644 --- a/i18n/fa.toml +++ b/i18n/fa.toml @@ -23,6 +23,9 @@ one_results = "$NUMBER نتیجه" # "1 result" many_results = "$NUMBER نتیجه" # "3 results" # Navigation. +skip_to_content = "پرش به محتوا" +pinned = "سنجاق‌شده" +jump_to_posts = "پرش به نوشته‌ها" read_more = "ادامه مطلب" one_posts = "$NUMBER مطلب" many_posts = "$NUMBER مطلب" # "3 posts" @@ -56,7 +59,7 @@ many_min_read = "خواندن $NUMBER دقیقه" zero_words = "هیچ کلمه‌ای" one_words = "$NUMBER کلمه" many_words = "$NUMBER کلمه" -last_updated_on = "آخرین به‌روزرسانی در" +last_updated_on = "آخرین به‌روزرسانی در $DATE" see_changes = "مشاهده تغییرات" # Post body. @@ -67,6 +70,9 @@ load_comments = "بارگذاری نظرات" copied = "کپی شد!" copy_code_to_clipboard = "کپی کد به کلیپ‌بورد" +# iine appreciation button. +like_this_post = "این مقاله را دوست دارم" + # Footer: Powered by Zola and tabi. powered_by = "قدرت گرفته از" and = "و" diff --git a/i18n/fi.toml b/i18n/fi.toml new file mode 100644 index 0000000..32fa48d --- /dev/null +++ b/i18n/fi.toml @@ -0,0 +1,103 @@ +language_name = "suomi" # Shown in language picker for multi-language sites. +date_locale = "fi_FI" +full_stop = "." # Used at the end of a sentence. + +# Menu items. +# Should match the names in config.extra.menu and config.extra.footer_menu. +blog = "blogi" +archive = "arkisto" +tags = "tunnisteet" +projects = "projektit" +diagrams = "kaaviot" +about = "minusta" +contact = "yhteystiedot" +privacy = "tietosuojakäytäntö" +site_statistics = "tilastot" +sitemap = "sivustokartta" + +# Search. +search = "Hae" +search_icon_title = "Paina $SHORTCUT avataksesi haun" # $SHORTCUT will be replaced with the actual keyboard shortcut. +clear_search = "Tyhjennä haku" # Title of the X icon next to search input. +zero_results = "Ei tuloksia" +one_results = "$NUMBER tulos" # "1 result" +many_results = "$NUMBER tulosta" # "3 results" + +# Navigation. +skip_to_content = "Siirry sisältöön" +# Some will prefer artikkeli (=article) instead of julkaisu (=publication), but this is more general +pinned = "Kiinnitetty" +jump_to_posts = "Siirry julkaisuihin" +read_more = "Lue lisää" +one_posts = "$NUMBER julkaisu" +many_posts = "$NUMBER julkaisua" # "3 posts" +prev = "Edellinen" # As in "Previous" page. +next = "Seuraava" # As in "Next" page. +of = "/" # E.g. Page 1 "of" 3 +all_posts = "Kaikki julkaisut" +all_tags = "Kaikki tunnisteet" +all_projects = "Kaikki projektit" +featured_projects = "Esittelyprojektit" +language_selection = "Kielivalinta" +toggle_mode = "Vaihda $MODE" # $MODE will be replaced by a value (or both) below. Literally "Change $MODE" +# The declension assumes that both values are used. e.g. "Change dark mode" wouldn't work and would need the "to" preposition +# It also omits the "mode" word: "Change dark/light mode" instead of "Change dark mode/light mode" +dark = "tumma" +light = "vaalea tila" +reset_mode = "Palauta oletustilaan" + +# Quick navigation buttons. +toggle_toc = "Sisällysluettelo päälle/pois" +go_to_top = "Siirry sivun alkuun" +go_to_comments = "Siirry kommenttiosioon" + +# Post metadata. +by_author = "Kirjoittanut $AUTHOR" # $AUTHOR will be replaced by the author(s). Literally "Written by $AUTHOR" +author_separator = ", " # For multiple authors. Ensure spacing where necessary. +author_conjunction = " ja " # For multiple authors. Ensure spacing where necessary. +draft = "LUONNOS" +zero_min_read = "<1 min. lukuaika" +one_min_read = "$NUMBER min. lukuaika" +many_min_read = "$NUMBER min. lukuaika" +zero_words = "Ei sanoja" +one_words = "$NUMBER sana" +many_words = "$NUMBER sanaa" +last_updated_on = "Päivitetty $DATE" +see_changes = "Katso muutokset" + +# Post body. +table_of_contents = "Sisällysluettelo" +load_comments = "Lataa kommentit" + +# Copy code block button. +copied = "Kopioitu!" +copy_code_to_clipboard = "Kopioi koodi leikepöydälle" + +# iine appreciation button. +like_this_post = "Pidän tästä kirjoituksesta" + +# Footer: Powered by Zola and tabi. +powered_by = "Pyörii ohjelmilla" # "Works using the software" +and = "&" +site_source = "Sivuston lähdekoodi" + +# 404 error. +# https://welpo.github.io/tabi/404.html +page_missing = "Pyytämääsi sivua ei löydy" +translation_missing = "tai sitä ei ole vielä käännetty kielellesi" +check_url = "Tarkista URL-osoitteesta mahdolliset virheet tai" +go_home = "palaa etusivulle" + +# For multilingual quote shortcode. +# https://welpo.github.io/tabi/blog/shortcodes/#multilingual-quotes +show_original_quote = "Näytä alkuperäinen lainaus" +show_translation = "Näytä käännös" +open_quotation_mark = "“" +close_quotation_mark = "”" + +# Translations for stylised Atom feed. +# https://welpo.github.io/tabi/atom.xml +# Must contain "About Feeds"; it will become a link. +about_feeds = "Tämä on verkkosyöte, joka tunnetaan myös nimellä Atom-syöte. Tilaa kopioimalla URL-osoite osoitepalkista uutislukijaasi. Käy sivulla About Feeds saadaksesi lisätietoja ja aloittaakeksi. Se on ilmaista." +visit_the_site = "Vieraile sivustolla" +recent_posts = "Viimeisimmät julkaisut" diff --git a/i18n/fr.toml b/i18n/fr.toml index f5b7963..636a015 100644 --- a/i18n/fr.toml +++ b/i18n/fr.toml @@ -23,6 +23,9 @@ one_results = "$NUMBER résultat" # "1 result" many_results = "$NUMBER résultats" # "3 results" # Navigation. +skip_to_content = "Passer au contenu" +pinned = "Épinglé" +jump_to_posts = "Aller aux articles" read_more = "Lire plus" one_posts = "$NUMBER article" many_posts = "$NUMBER articles" @@ -55,7 +58,7 @@ many_min_read = "$NUMBER min de lecture" zero_words = "aucun mot" one_words = "$NUMBER mot" many_words = "$NUMBER mots" -last_updated_on = "Dernière mise à jour le" +last_updated_on = "Mis à jour le $DATE" see_changes = "Voir les modifications" # Post body. @@ -66,6 +69,9 @@ load_comments = "Afficher les commentaires" copied = "Copié !" copy_code_to_clipboard = "Copier le code dans le presse-papier" +# iine appreciation button. +like_this_post = "J'aime cet article" + # Footer: Powered by Zola and tabi. powered_by = "Propulsé par" and = "et" diff --git a/i18n/hi.toml b/i18n/hi.toml index ab00aa7..77320c8 100644 --- a/i18n/hi.toml +++ b/i18n/hi.toml @@ -25,6 +25,9 @@ one_results = "$NUMBER परिणाम" # "1 result" many_results = "$NUMBER परिणाम" # "3 results" # Navigation. +skip_to_content = "सामग्री पर जाएं" +pinned = "पिन किया गया" +jump_to_posts = "पोस्ट पर जाएं" read_more = "और पढ़ें" one_posts = "$NUMBER पोस्ट" many_posts = "$NUMBER पोस्ट्स" @@ -57,7 +60,7 @@ many_min_read = "$NUMBER मिनट पठन समय" zero_words = "कोई शब्द नहीं" one_words = "$NUMBER शब्द" many_words = "$NUMBER शब्द" -last_updated_on = "आखिरी अपडेट" +last_updated_on = "$DATE को अपडेट किया गया" see_changes = "बदलाव देखें" # Post body. @@ -68,6 +71,9 @@ load_comments = "कमेंट्स लोड करें" copied = "कॉपी किया गया!" copy_code_to_clipboard = "कोड क्लिपबोर्ड में कॉपी करें" +# iine appreciation button. +like_this_post = "मुझे यह पोस्ट पसंद है" + # Footer: Powered by Zola and tabi. powered_by = "चालित द्वारा" and = "और" diff --git a/i18n/it.toml b/i18n/it.toml index 54b55d2..44495dd 100644 --- a/i18n/it.toml +++ b/i18n/it.toml @@ -23,6 +23,9 @@ one_results = "$NUMBER risultato" many_results = "$NUMBER risultati" # Navigation. +skip_to_content = "Salta al contenuto" +pinned = "In evidenza" +jump_to_posts = "Vai ai post" read_more = "Leggi di più" one_posts = "$NUMBER post" many_posts = "$NUMBER post" @@ -55,7 +58,7 @@ many_min_read = "$NUMBER min di lettura" zero_words = "Nessuna parola" one_words = "$NUMBER parola" many_words = "$NUMBER parole" -last_updated_on = "Ultimo aggiornamento il" +last_updated_on = "Aggiornato il $DATE" see_changes = "Vedi modifiche" # Post body. @@ -66,6 +69,9 @@ load_comments = "Carica commenti" copied = "Copiato!" copy_code_to_clipboard = "Copia codice negli appunti" +# iine appreciation button. +like_this_post = "Mi piace questo post" + # Footer: Powered by Zola and tabi. powered_by = "Alimentato da" and = "e" diff --git a/i18n/ja.toml b/i18n/ja.toml index 4241914..10b9265 100644 --- a/i18n/ja.toml +++ b/i18n/ja.toml @@ -27,6 +27,9 @@ one_results = "$NUMBER 結果" # "1 result" many_results = "$NUMBER 結果" # "3 results" # Navigation. +skip_to_content = "コンテンツにスキップ" +pinned = "固定" +jump_to_posts = "投稿へジャンプ" read_more = "続きを読む" one_posts = "$NUMBER 投稿" many_posts = "$NUMBER 投稿" @@ -59,7 +62,7 @@ many_min_read = "$NUMBER 分の読了時間" zero_words = "単語数ゼロ" one_words = "$NUMBER 単語" many_words = "$NUMBER 単語" -last_updated_on = "最終更新日" +last_updated_on = "$DATE に更新" see_changes = "変更を見る" # Post body. @@ -70,6 +73,9 @@ load_comments = "コメントを読む" copied = "コピーしました!" copy_code_to_clipboard = "コードをクリップボードにコピー" +# iine appreciation button. +like_this_post = "いいね!" + # Footer: Powered by Zola and tabi. powered_by = "Powered by" and = "と" diff --git a/i18n/ko.toml b/i18n/ko.toml index 1e3097d..e5eee12 100644 --- a/i18n/ko.toml +++ b/i18n/ko.toml @@ -27,6 +27,9 @@ one_results = "$NUMBER 결과" # "1 result" many_results = "$NUMBER 결과" # "3 results" # Navigation. +skip_to_content = "콘텐츠로 건너뛰기" +pinned = "고정됨" +jump_to_posts = "게시물로 이동" read_more = "더 읽기" one_posts = "$NUMBER 게시물" many_posts = "$NUMBER 게시물" @@ -59,7 +62,7 @@ many_min_read = "$NUMBER 분 읽기" zero_words = "단어 없음" one_words = "$NUMBER 단어" many_words = "$NUMBER 단어" -last_updated_on = "최근 업데이트" +last_updated_on = "$DATE에 업데이트됨" see_changes = "변경사항 보기" # Post body. @@ -70,6 +73,9 @@ load_comments = "댓글 불러오기" copied = "복사됨!" copy_code_to_clipboard = "코드를 클립보드에 복사" +# iine appreciation button. +like_this_post = "이 글이 좋아요" + # Footer: Powered by Zola and tabi. powered_by = "제공됨" and = "&" diff --git a/i18n/nl.toml b/i18n/nl.toml index 5446b6c..c6649d5 100644 --- a/i18n/nl.toml +++ b/i18n/nl.toml @@ -23,6 +23,9 @@ one_results = "$NUMBER resultaat" # "1 result" many_results = "$NUMBER resultaten" # "3 results" # Navigation. +skip_to_content = "Naar inhoud springen" +pinned = "Vastgezet" +jump_to_posts = "Naar berichten springen" read_more = "Lees meer" one_posts = "$NUMBER bericht" # "1 post" many_posts = "$NUMBER berichten" # "3 posts" @@ -55,7 +58,7 @@ many_min_read = "$NUMBER minuten lezen" zero_words = "Geen woorden" one_words = "$NUMBER woord" many_words = "$NUMBER woorden" -last_updated_on = "Laatst geupdate op" +last_updated_on = "Bijgewerkt op $DATE" see_changes = "Zie wijzigingen" # Post body. @@ -66,6 +69,9 @@ load_comments = "Laad opmerkingen" copied = "Gekopieerd!" copy_code_to_clipboard = "Kopieer code naar klembord" +# iine appreciation button. +like_this_post = "Vind ik leuk" + # Footer: Powered by Zola and tabi. powered_by = "Aangedreven door" and = "&" diff --git a/i18n/or.toml b/i18n/or.toml new file mode 100644 index 0000000..2db18e9 --- /dev/null +++ b/i18n/or.toml @@ -0,0 +1,99 @@ +language_name = "ଓଡ଼ିଆ" # Shown in language picker for multi-language sites. +date_locale = "or_IN" +full_stop = "।" # Used at the end of a sentence. + +# Menu items. +# Should match the names in config.extra.menu and config.extra.footer_menu. +blog = "ବ୍ଲଗ" +archive = "ଆର୍କାଇଭ" +tags = "ଟ୍ୟାଗଗୁଡ଼ିକ" +projects = "ପ୍ରକଳ୍ପଗୁଡ଼ିକ" +about = "ବାବଦରେ" +contact = "ଯୋଗାଯୋଗ" +privacy = "ଗୋପନୀୟତା ନୀତି" +site_statistics = "ସାଇଟ ପରିସଂଖ୍ୟାନ" +sitemap = "ସାଇଟମ୍ୟାପ" + +# Search. +search = "ଖୋଜନ୍ତୁ" +search_icon_title = "ଖୋଜିବାକୁ $SHORTCUT କୁ ଚିପନ୍ତୁ କିମ୍ବା କ୍ଲିକ କରନ୍ତୁ" # $SHORTCUT will be replaced with the actual keyboard shortcut. +clear_search = "ଖୋଜା ସଫା କରନ୍ତୁ" # Title of the X icon next to search input. +zero_results = "କିଛି ମିଳିଲା ନାହିଁ" +one_results = "$NUMBER ପରିଣାମ" # "1 result" +many_results = "$NUMBER ପରିଣାମଗୁଡ଼ିକ" # "3 results" + +# Navigation. +skip_to_content = "ବିଷୟବସ୍ତୁକୁ ଯାଆନ୍ତୁ" +pinned = "ପିନ୍ କରାଯାଇଛି" +jump_to_posts = "ପୋଷ୍ଟକୁ ଯାଆନ୍ତୁ" +read_more = "ଆହୁରି ପଢ଼ନ୍ତୁ" +one_posts = "$NUMBER ପୋଷ୍ଟ" +many_posts = "$NUMBER ପୋଷ୍ଟଗୁଡ଼ିକ" # "3 posts" +prev = "ପୂର୍ବ" # As in "Previous" page. +next = "ପର" # As in "Next" page. +of = "ର" # E.g. Page 1 "of" 3 +all_posts = "ସମସ୍ତ ପୋଷ୍ଟଗୁଡ଼ିକ" +all_tags = "ସମସ୍ତ ଟ୍ୟାଗଗୁଡ଼ିକ" +all_projects = "ସମସ୍ତ ପ୍ରକଳ୍ପଗୁଡ଼ିକ" +featured_projects = "ବିଶେଷ ପ୍ରକଳ୍ପଗୁଡ଼ିକ" +language_selection = "ଭାଷା ଚୟନ" +toggle_mode = "$MODE ଟଗଲ କରନ୍ତୁ" # $MODE will be replaced by a value (or both) below. +dark = "ଅନ୍ଧାର" +light = "ଆଲୋକ" +reset_mode = "ସାଇଟର ମୂଳ ମୋଡକୁ ଆଣନ୍ତୁ" + +# Quick navigation buttons. +toggle_toc = "ସୂଚୀପତ୍ର ଟଗଲ କରନ୍ତୁ" +go_to_top = "ପୃଷ୍ଠାର ଶୀର୍ଷକୁ ଯାଆନ୍ତୁ" +go_to_comments = "ମତାମତ ବିଭାଗକୁ ଯାଆନ୍ତୁ" + +# Post metadata. +by_author = "$AUTHOR ଙ୍କ ଦ୍ୱାରା" # $AUTHOR will be replaced by the author(s). +author_separator = ", " # For multiple authors. Ensure spacing where necessary. +author_conjunction = " ଏବଂ " # For multiple authors. Ensure spacing where necessary. +draft = "ଡ୍ରାଫ୍ଟ" +zero_min_read = "<୧ ମିନିଟ ପଢ଼ିବା ସମୟ" +one_min_read = "$NUMBER ମିନିଟ ପଢ଼ିବା ସମୟ" +many_min_read = "$NUMBER ମିନିଟ ପଢ଼ିବା ସମୟ" +zero_words = "କୌଣସି ଶବ୍ଦ ନାହିଁ " +one_words = "$NUMBER ଶବ୍ଦ" +many_words = "$NUMBER ଶବ୍ଦଗୁଡ଼ିକ" +last_updated_on = "$DATE ଦିନ ଅଦ୍ୟତନ ହୋଇଥିଲା" +see_changes = "ପରିବର୍ତ୍ତନଗୁଡ଼ିକୁ ଦେଖନ୍ତୁ" + +# Post body. +table_of_contents = "ସୂଚୀପତ୍ର" +load_comments = "ମତାମତ ଲୋଡ କରନ୍ତୁ" + +# Copy code block button. +copied = "କପି ହେଲା!" +copy_code_to_clipboard = "କ୍ଲିପବୋର୍ଡକୁ କପି କରନ୍ତୁ" + +# iine appreciation button. +like_this_post = "ମୋର ଏହି ପୋସ୍ଟ ଭଲ ଲାଗେ" + +# Footer: Powered by Zola and tabi. +powered_by = "ଚାଳିତ ଦ୍ୱାରା" +and = "ଏବଂ" +site_source = "ସାଇଟ ଉତ୍ସ" + +# 404 error. +# https://welpo.github.io/tabi/404.html +page_missing = "ଆପଣ ଯେଉଁ ପୃଷ୍ଠାଟିକୁ ଅନୁରୋଧ କରିଥିଲେ ତାହା ନାହିଁ" +translation_missing = "କିମ୍ବା ଆପଣଙ୍କର ଭାଷାକୁ ଏପର୍ଯ୍ୟନ୍ତ ଅନୁବାଦିତ ହୋଇନାହିଁ" +check_url = "ତୃଟିଗୁଡ଼ିକ ପାଇଁ URL କୁ ଦେଖନ୍ତୁ କିମ୍ବା" +go_home = "ମୂଳ ପୃଷ୍ଠାକୁ ଫେରିଯାଆନ୍ତୁ" + +# For multilingual quote shortcode. +# https://welpo.github.io/tabi/blog/shortcodes/#multilingual-quotes +show_original_quote = "ମୂଳ ଉଦ୍ଧୃତ ଦେଖାନ୍ତୁ" +show_translation = "ଅନୁବାଦ ଦେଖାନ୍ତୁ" +open_quotation_mark = "“" +close_quotation_mark = "”" + +# Translations for stylised Atom feed. +# https://welpo.github.io/tabi/atom.xml +# Must contain "About Feeds"; it will become a link. +about_feeds = "ଏହା ଏକ ୱେବ୍ ଫିଡ୍, ଯାହାକୁ ଆଟମ୍ ଫିଡ୍ ମଧ୍ୟ କୁହାଯାଏ। ଠିକଣା ବାରରୁ URL କୁ ଆପଣଙ୍କ ନ୍ୟୁଜ୍ ରିଡରରେ କପି କରି ସବ୍ସ୍କ୍ରାଇବ୍ କରନ୍ତୁ। ଅଧିକ ଜାଣିବା ଏବଂ ଆରମ୍ଭ କରିବାକୁ About Feeds ଯାଆନ୍ତୁ। ଏହା ମାଗଣା ଅଟେ ।" +visit_the_site = "ୱେବସାଇଟକୁ ଯାଆନ୍ତୁ" +recent_posts = "ସାମ୍ପ୍ରତିକ ପୋଷ୍ଟଗୁଡିକ" diff --git a/i18n/pt-PT.toml b/i18n/pt-PT.toml index d104427..1147770 100644 --- a/i18n/pt-PT.toml +++ b/i18n/pt-PT.toml @@ -23,6 +23,9 @@ one_results = "$NUMBER resultado" # "1 result" many_results = "$NUMBER resultados" # "3 results" # Navigation. +skip_to_content = "Pular para o conteúdo" +pinned = "Fixado" +jump_to_posts = "Ir para as publicações" read_more = "Ler mais" one_posts = "$NUMBER publicação" many_posts = "$NUMBER publicações" @@ -55,7 +58,7 @@ many_min_read = "$NUMBER mins de leitura" zero_words = "Nenhuma palavra" one_words = "$NUMBER palavra" many_words = "$NUMBER palavras" -last_updated_on = "Última atualização em" +last_updated_on = "Atualizado em $DATE" see_changes = "Ver alterações" # Post body. @@ -66,6 +69,9 @@ load_comments = "Carregar comentários" copied = "Copiado!" copy_code_to_clipboard = "Copiar código para a área de transferência" +# iine appreciation button. +like_this_post = "Gosto desta publicação" + # Footer: Powered by Zola and tabi. powered_by = "Impulsionado por" and = "e" diff --git a/i18n/ru.toml b/i18n/ru.toml index 12c94db..1b566ad 100644 --- a/i18n/ru.toml +++ b/i18n/ru.toml @@ -28,6 +28,9 @@ few_results = "$NUMBER результата" # 2, 3, 4 but not 12-14 many_results = "$NUMBER результатов" # 5-9, 0, 11-14, and others # Navigation. +skip_to_content = "Перейти к содержанию" +pinned = "Закреплено" +jump_to_posts = "Перейти к записям" read_more = "Читать далее" post = "пост" one_posts = "$NUMBER пост" @@ -64,7 +67,7 @@ zero_words = "Нет слов" one_words = "$NUMBER слово" few_words = "$NUMBER слова" # 2, 3, 4 but not 12-14 many_words = "$NUMBER слов" # 5-9, 0, 11-14, and others -last_updated_on = "Последнее обновление" +last_updated_on = "Обновлено $DATE" see_changes = "Смотреть изменения" # Post body. @@ -75,6 +78,9 @@ load_comments = "Загрузить комментарии" copied = "Скопировано!" copy_code_to_clipboard = "Скопировать код в буфер обмена" +# iine appreciation button. +like_this_post = "Мне нравится эта статья" + # Footer: Powered by Zola and tabi. powered_by = "Под управлением" and = "&" diff --git a/i18n/uk.toml b/i18n/uk.toml index 7b1519d..d1696fe 100644 --- a/i18n/uk.toml +++ b/i18n/uk.toml @@ -33,6 +33,9 @@ few_results = "$NUMBER результати" many_results = "$NUMBER результатів" # Navigation. +skip_to_content = "Перейти до вмісту" +pinned = "Закріплено" +jump_to_posts = "Перейти до дописів" read_more = "Читати далі" one_posts = "$NUMBER пост" few_posts = "$NUMBER пости" # 2, 3, 4 but not 12-14 @@ -68,7 +71,7 @@ zero_words = "Без слів" one_words = "$NUMBER слово" few_words = "$NUMBER слова" # 2, 3, 4 but not 12-14 many_words = "$NUMBER слів" # 5-9, 0, 11-14, and others -last_updated_on = "Останнє оновлення" +last_updated_on = "Оновлено $DATE" see_changes = "Переглянути зміни" # Post body. @@ -79,6 +82,9 @@ load_comments = "Завантажити коментарі" copied = "Скопійовано!" copy_code_to_clipboard = "Копіювати код у буфер обміну" +# iine appreciation button. +like_this_post = "Мені подобається ця стаття" + # Footer: Powered by Zola and tabi. powered_by = "Під управлінням" and = "та" diff --git a/i18n/zh-Hans.toml b/i18n/zh-Hans.toml index 96f8b08..15a4cc6 100644 --- a/i18n/zh-Hans.toml +++ b/i18n/zh-Hans.toml @@ -23,6 +23,9 @@ one_results = "$NUMBER 个结果" many_results = "$NUMBER 个结果" # Navigation. +skip_to_content = "跳到内容" +pinned = "置顶" +jump_to_posts = "跳转到文章" read_more = "阅读全文" one_posts = "$NUMBER 篇文章" many_posts = "$NUMBER 篇文章" @@ -55,7 +58,7 @@ many_min_read = "$NUMBER 分钟阅读" zero_words = "没有字" one_words = "$NUMBER 字" many_words = "$NUMBER 字" -last_updated_on = "最后更新于" +last_updated_on = "更新于 $DATE" see_changes = "修改纪录" # Post body. @@ -66,6 +69,9 @@ load_comments = "载入留言" copied = "已复制!" # Machine translated. copy_code_to_clipboard = "复制代码到剪贴板" # Machine translated. +# iine appreciation button. +like_this_post = "喜欢这篇文章" + # Footer: Powered by Zola and tabi. powered_by = "网站基于" and = "和" diff --git a/i18n/zh-Hant.toml b/i18n/zh-Hant.toml index 36769bc..d6f42e5 100644 --- a/i18n/zh-Hant.toml +++ b/i18n/zh-Hant.toml @@ -23,6 +23,9 @@ one_results = "$NUMBER 個結果" many_results = "$NUMBER 個結果" # Navigation. +skip_to_content = "跳到內容" +pinned = "釘選" +jump_to_posts = "跳轉到文章" read_more = "閱讀全文" one_posts = "$NUMBER 篇文章" many_posts = "$NUMBER 篇文章" @@ -55,7 +58,7 @@ many_min_read = "$NUMBER 分鐘閱讀" zero_words = "沒有字" one_words = "$NUMBER 字" many_words = "$NUMBER 字" -last_updated_on = "最後更新於" +last_updated_on = "更新於 $DATE" see_changes = "修改紀錄" # Post body. @@ -66,6 +69,9 @@ load_comments = "載入留言" copied = "已复制!" # Machine translated. copy_code_to_clipboard = "复制代码到剪贴板" # Machine translated. +# iine appreciation button. +like_this_post = "喜歡這篇文章" + # Footer: Powered by Zola and tabi. powered_by = "網站基於" and = "和" diff --git a/release b/release deleted file mode 100644 index 22ed298..0000000 --- a/release +++ /dev/null @@ -1,86 +0,0 @@ -#!/usr/bin/env bash -# Bash script to prepare a release using git-cliff. -# Inspired by https://github.com/orhun/git-cliff/blob/main/release.sh -set -eu - -VERSION_FORMAT="^v[0-9]+\.[0-9]+\.[0-9]+$" - -# Check for a clean working directory. -if [ -n "$(git status --porcelain)" ]; then - echo "Your working directory is dirty. Commit or stash your changes before running this script." - exit 1 -fi - -# Check if a version tag is provided. -if [ "$#" -eq 1 ]; then - VERSION_TAG=$1 -else - suggested_version=$(git cliff --bumped-version) - echo -n "No version tag provided. git-cliff suggests $suggested_version. Proceed? [Y/n] " - read user_input - - # Check if input is empty or a variation of "yes". - if [[ -z "$user_input" || "$user_input" =~ ^[Yy](es)?$ ]]; then - echo "Proceeding with version $suggested_version." - VERSION_TAG=$suggested_version - else - echo "Release preparation cancelled." - exit 1 - fi -fi - -# Verify that the version tag matches the expected format. -if ! [[ $VERSION_TAG =~ $VERSION_FORMAT ]]; then - echo "Version tag $VERSION_TAG does not match the expected format ${VERSION_FORMAT}." - exit 1 -fi - -echo "Preparing release ${VERSION_TAG}…" -echo - -# Update CHANGELOG. -git cliff --tag "$VERSION_TAG" -o CHANGELOG.md -sed -E 's/@([a-zA-Z0-9_-]+)/[@\1](https:\/\/github.com\/\1)/g' CHANGELOG.md > CHANGELOG.tmp && mv CHANGELOG.tmp CHANGELOG.md - -# Add all changes and commit. -git add -A -git commit -m "🔖 chore(release): prepare for $VERSION_TAG" - - -# Generate the tag description. -changelog=$(git cliff --tag "$VERSION_TAG" --unreleased --strip all) - -# Clean up tag's changelog; tag descriptions don't support markdown. -# Remove PR links. -changelog=$(echo "$changelog" | sed -E 's/\[\#([0-9]+)\]\(https:\/\/github\.com\/welpo\/[^\/]+\/(issues|pull)\/([0-9]+)\)/#\1/g') -# Remove commit links. -changelog=$(echo "$changelog" | sed -E 's/\[([0-9a-f]+)\]\(https:\/\/github\.com\/welpo\/[^\/]+\/commit\/([0-9a-f]+)\)/\1/g') -# Remove scopes. -changelog=$(echo "$changelog" | sed -E 's/\*\(([^)]+)\)\* //g') -# Remove markdown headers. -changelog=$(echo "$changelog" | sed -E 's/^#+ //g') -# Remove version comparison lines. -changelog=$(echo "$changelog" | sed '/https:\/\/github\.com\/.*\/compare\/.*/d') - -# Create a signed and annotated tag. -git tag -s -a "$VERSION_TAG" -m "Release $VERSION_TAG" -m "$changelog" - -echo "Most recent commit:" -git log -1 -echo -echo "Information for tag $VERSION_TAG:" -git show $VERSION_TAG -echo - -echo "Release $VERSION_TAG is ready. Don't forget to push the changes and the tag:" - -remote_url=$(git remote get-url origin) -# Check if the URL is in SSH format (git@). -if [[ "$remote_url" == git@github.com:* ]]; then - https_url="https://github.com/${remote_url#git@github.com:}" - https_url="${https_url%.git}" -else - https_url="${remote_url%.git}" -fi - -echo "git push && git push --tags && open ${https_url}/tags" diff --git a/sass/main.scss b/sass/main.scss index e7e426b..d1470ff 100644 --- a/sass/main.scss +++ b/sass/main.scss @@ -1,5 +1,6 @@ @use 'parts/_admonitions.scss'; @use 'parts/_archive.scss'; +@use 'parts/_aside.scss'; @use 'parts/_cards.scss'; @use 'parts/_code.scss'; @use 'parts/_comments.scss'; @@ -7,6 +8,7 @@ @use 'parts/_header-anchor.scss'; @use 'parts/_header.scss'; @use 'parts/_home-banner.scss'; +@use 'parts/_iine.scss'; @use 'parts/_image-hover.scss'; @use 'parts/_image-toggler.scss'; @use 'parts/_image.scss'; @@ -21,6 +23,8 @@ @use 'parts/_table.scss'; @use 'parts/_tags.scss'; @use 'parts/_theme-switch.scss'; +@use 'parts/_webmention.scss'; +@use 'parts/_zola-error.scss'; @font-face { src: local('Inter'), @@ -46,7 +50,46 @@ font-display: swap; } +@mixin theme-variables($theme) { + @if $theme =='light' { + --background-color: white; + --bg-0: #f0f0f0; + --bg-1: #e7e7e7; + --bg-2: #fefefe; + --bg-3: #d8dcdd; + --hover-color: white; + --primary-color: #087E96; + --divider-color: #d7d7d7; + --text-color: #222226; + --text-color-high-contrast: #313333; + --meta-color: #5b5b65; + --codeblock-bg: #26232e; + --codeblock-highlight: #383444; + --theme-switcher-svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'%3E%3Cpath d='M283.211 512c78.962 0 151.079-35.925 198.857-94.792 7.068-8.708-.639-21.43-11.562-19.35-124.203 23.654-238.262-71.576-238.262-196.954 0-72.222 38.662-138.635 101.498-174.394 9.686-5.512 7.25-20.197-3.756-22.23A258.156 258.156 0 0 0 283.211 0c-141.309 0-256 114.511-256 256 0 141.309 114.511 256 256 256z'/%3E%3C/svg%3E%0A"); + color-scheme: light; + } + + @else { + --background-color: #1f1f1f; + --bg-0: #2f2f2f; + --bg-1: #3c3c3c; + --bg-2: #171717; + --bg-3: #535555; + --hover-color: black; + --primary-color: #91e0ee; + --divider-color: #4a4a4a; + --text-color: #D4D4D4; + --text-color-high-contrast: #eceeef; + --meta-color: #B0B0B0; + --codeblock-bg: #19181e; + --codeblock-highlight: #282834; + --theme-switcher-svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 96 960 960' %3E%3Cpath d='M480 776q-83 0-141.5-58.5T280 576q0-83 58.5-141.5T480 376q83 0 141.5 58.5T680 576q0 83-58.5 141.5T480 776ZM80 616q-17 0-28.5-11.5T40 576q0-17 11.5-28.5T80 536h80q17 0 28.5 11.5T200 576q0 17-11.5 28.5T160 616H80Zm720 0q-17 0-28.5-11.5T760 576q0-17 11.5-28.5T800 536h80q17 0 28.5 11.5T920 576q0 17-11.5 28.5T880 616h-80ZM480 296q-17 0-28.5-11.5T440 256v-80q0-17 11.5-28.5T480 136q17 0 28.5 11.5T520 176v80q0 17-11.5 28.5T480 296Zm0 720q-17 0-28.5-11.5T440 976v-80q0-17 11.5-28.5T480 856q17 0 28.5 11.5T520 896v80q0 17-11.5 28.5T480 1016ZM226 378l-43-42q-12-11-11.5-28t11.5-29q12-12 29-12t28 12l42 43q11 12 11 28t-11 28q-11 12-27.5 11.5T226 378Zm494 495-42-43q-11-12-11-28.5t11-27.5q11-12 27.5-11.5T734 774l43 42q12 11 11.5 28T777 873q-12 12-29 12t-28-12Zm-42-495q-12-11-11.5-27.5T678 322l42-43q11-12 28-11.5t29 11.5q12 12 12 29t-12 28l-43 42q-12 11-28 11t-28-11ZM183 873q-12-12-12-29t12-28l43-42q12-11 28.5-11t27.5 11q12 11 11.5 27.5T282 830l-42 43q-11 12-28 11.5T183 873Z'/%3E%3C/svg%3E"); + color-scheme: dark; + } +} + :root { + @include theme-variables('light'); --max-layout-width: 1000px; --normal-layout-width: 600px; @@ -58,45 +101,15 @@ --serif-font: 'Source Serif', 'Georgia', serif; --code-font: 'Cascadia Code'; - --background-color: white; - --bg-0: #f0f0f0; - --bg-1: #e7e7e7; - --bg-2: #fefefe; - --bg-3: #d8dcdd; - --hover-color: white; - --primary-color: #087E96; - --divider-color: #d7d7d7; - --text-color: #222226; - --text-color-high-contrast: #313333; - --meta-color: #5b5b65; - --codeblock-bg: #26232e; - --codeblock-highlight: #383444; + scrollbar-color: var(--primary-color) transparent; + accent-color: var(--primary-color); - --theme-switcher-svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'%3E%3Cpath d='M283.211 512c78.962 0 151.079-35.925 198.857-94.792 7.068-8.708-.639-21.43-11.562-19.35-124.203 23.654-238.262-71.576-238.262-196.954 0-72.222 38.662-138.635 101.498-174.394 9.686-5.512 7.25-20.197-3.756-22.23A258.156 258.156 0 0 0 283.211 0c-141.309 0-256 114.511-256 256 0 141.309 114.511 256 256 256z'/%3E%3C/svg%3E%0A"); - color-scheme: light; line-height: 190%; - font-family: var(--sans-serif-font); } [data-theme='dark'] { - - --background-color: #1f1f1f; - --bg-0: #2f2f2f; - --bg-1: #3c3c3c; - --bg-2: #171717; - --bg-3: #535555; - --hover-color: black; - --primary-color: #91e0ee; - --divider-color: #4a4a4a; - --text-color: #D4D4D4; - --text-color-high-contrast: #eceeef; - --meta-color: #B0B0B0; - --codeblock-bg: #19181e; - --codeblock-highlight: #282834; - - --theme-switcher-svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 96 960 960' %3E%3Cpath d='M480 776q-83 0-141.5-58.5T280 576q0-83 58.5-141.5T480 376q83 0 141.5 58.5T680 576q0 83-58.5 141.5T480 776ZM80 616q-17 0-28.5-11.5T40 576q0-17 11.5-28.5T80 536h80q17 0 28.5 11.5T200 576q0 17-11.5 28.5T160 616H80Zm720 0q-17 0-28.5-11.5T760 576q0-17 11.5-28.5T800 536h80q17 0 28.5 11.5T920 576q0 17-11.5 28.5T880 616h-80ZM480 296q-17 0-28.5-11.5T440 256v-80q0-17 11.5-28.5T480 136q17 0 28.5 11.5T520 176v80q0 17-11.5 28.5T480 296Zm0 720q-17 0-28.5-11.5T440 976v-80q0-17 11.5-28.5T480 856q17 0 28.5 11.5T520 896v80q0 17-11.5 28.5T480 1016ZM226 378l-43-42q-12-11-11.5-28t11.5-29q12-12 29-12t28 12l42 43q11 12 11 28t-11 28q-11 12-27.5 11.5T226 378Zm494 495-42-43q-11-12-11-28.5t11-27.5q11-12 27.5-11.5T734 774l43 42q12 11 11.5 28T777 873q-12 12-29 12t-28-12Zm-42-495q-12-11-11.5-27.5T678 322l42-43q11-12 28-11.5t29 11.5q12 12 12 29t-12 28l-43 42q-12 11-28 11t-28-11ZM183 873q-12-12-12-29t12-28l43-42q12-11 28.5-11t27.5 11q12 11 11.5 27.5T282 830l-42 43q-11 12-28 11.5T183 873Z'/%3E%3C/svg%3E"); - color-scheme: dark; + @include theme-variables('dark'); .invertible-image { filter: invert(.88); @@ -107,6 +120,20 @@ } } +@media (prefers-color-scheme: dark) { + :root:not([data-theme='light']) { + @include theme-variables('dark'); + + .invertible-image { + filter: invert(.88); + } + + .dimmable-image { + filter: brightness(.8) contrast(1.2); + } + } +} + html { background-color: var(--background-color); color: var(--text-color); @@ -117,8 +144,8 @@ html { body { display: flex; flex-direction: column; - margin: 0 5vmin; - padding: 0; + margin-inline: 5vmin; + margin-block: 0; min-height: 100vh; } @@ -126,13 +153,18 @@ body { word-wrap: break-word; margin: 0 auto; margin-top: 6vmin; - margin-bottom: 4rem; + margin-block-end: 4rem; width: 100%; max-width: var(--max-layout-width); } +.use-sans-serif { + --serif-font: var(--sans-serif-font); +} + article { $base-margin: 6rem; + position: relative; margin: 0 auto; max-width: calc(var(--max-layout-width) - 2*$base-margin); @@ -149,24 +181,24 @@ article { } .full-width { - margin-right: -$base-margin; - margin-left: -$base-margin; + margin-inline-start: -$base-margin; + margin-inline-end: -$base-margin; max-width: calc(100% + 2*$base-margin); } li { p:not(:last-child) { - margin-bottom: 0; + margin-block-end: 0; } p + :last-child { - margin-bottom: var(--paragraph-spacing); + margin-block-end: var(--paragraph-spacing); } } } .section-title { - display: block; + display: flex; margin: 0; margin-top: -0.15em; color: var(--text-color-high-contrast); @@ -185,62 +217,44 @@ h3, h4, h5, h6 { + display: block; position: relative; + margin: 0; } h1 { - display: block; margin-top: 0.67em; - margin-right: 0; - margin-bottom: 0em; - margin-left: 0; font-weight: 550; - font-size: 1.62em; + font-size: 1.62rem; } h2 { - display: block; margin-top: 0.5em; - margin-right: 0; - margin-bottom: 0em; - margin-left: 0; font-weight: 550; - font-size: 1.4em; + font-size: 1.4rem; } h3 { - display: block; margin-top: 0.3em; - margin-right: 0; - margin-bottom: 0em; - margin-left: 0; font-weight: 550; - font-size: 1.2em; + font-size: 1.2rem; } h4 { - display: block; margin-top: 0.83em; - margin-right: 0; - margin-bottom: 0em; - margin-left: 0; font-weight: 550; - font-size: 1em; + font-size: 1rem; } h5 { - display: block; margin-top: 0.83em; - margin-right: 0; - margin-bottom: 0em; - margin-left: 0; font-weight: normal; - font-size: 1em; + font-size: 1rem; } p { margin-top: 0.4rem; - margin-bottom: var(--paragraph-spacing); + margin-block-end: var(--paragraph-spacing); font-size: 1em; line-height: 2rem; } @@ -269,7 +283,11 @@ video { } .subheader { - margin-bottom: 2rem; + margin-block-end: 2rem; +} + +.mobile-only { + display: none; } @media only screen and (max-width: 1000px) { @@ -283,11 +301,15 @@ video { article .full-width { display: block; - margin-right: 0; - margin-left: 0; + margin-inline-start: 0; + margin-inline-end: 0; max-width: none; overflow-x: auto; } + + .mobile-only { + display: block; + } } @media only screen and (max-width: 600px) { @@ -301,7 +323,8 @@ video { } body { - margin: 0 16px; + margin-inline: 16px; + margin-block: 0; } } diff --git a/sass/parts/_admonitions.scss b/sass/parts/_admonitions.scss index 954759a..6feec43 100644 --- a/sass/parts/_admonitions.scss +++ b/sass/parts/_admonitions.scss @@ -1,51 +1,26 @@ -.admonition { - display: flex; - align-items: flex-start; - margin: 1em 0; - border-left: 6px solid; - border-radius: 10px; - padding: 0.8rem; - color: var(--text-color-high-contrast); - font-family: var(--sans-serif-font); +@mixin admonition-type($type) { + border-color: var(--admonition-#{$type}-border); + background-color: var(--admonition-#{$type}-bg); - p { - margin-bottom: 0; - margin-left: -1.75rem; - font-family: inherit; + > .admonition-content > p > code { + background-color: var(--admonition-#{$type}-code); } - a:hover { - color: var(--hover-color) !important; + a { + border-bottom: 1px solid var(--admonition-#{$type}-border); + color: var(--admonition-#{$type}-border); - code { - color: var(--text-color-high-contrast) !important; + &:hover { + background-color: var(--admonition-#{$type}-border); + color: var(--hover-color); } } -} -.admonition-content { - flex: 1; - strong { - font-weight: 580; + .admonition-icon { + background-color: var(--admonition-#{$type}-border); } } -.admonition-icon { - display: flex; - align-items: center; - margin: 0.3rem; - background-size: contain; - background-repeat: no-repeat; - aspect-ratio: 1/1; - width: 1.5rem; -} - -.admonition-title { - opacity: 0.92; - font-weight: bold; - font-size: 0.82rem; -} - :root { /* Note */ --admonition-note-border: #5b6167; @@ -73,7 +48,7 @@ --admonition-danger-code: #fcc1c5; } -[data-theme='dark'] { +@mixin dark-theme-variables { /* Note */ --admonition-note-border: #d0d1d4; --admonition-note-bg: #3d3e40; @@ -87,7 +62,7 @@ /* Info */ --admonition-info-border: #50a9d5; --admonition-info-bg: #193C47; - --admonition-info-code: #005f00; + --admonition-info-code: #245e70; /* Warning */ --admonition-warning-border: #e19d0a; @@ -100,119 +75,85 @@ --admonition-danger-code: #8c2e00; } -.admonition.note { - border-color: var(--admonition-note-border); - background-color: var(--admonition-note-bg); +[data-theme='dark'] { + @include dark-theme-variables; +} - code { - background-color: var(--admonition-note-code) !important; - } - - a { - border-bottom: 1px solid var(--admonition-note-border); - color: var(--admonition-note-border); - - &:hover { - background-color: var(--admonition-note-border); - } - } - - .admonition-icon { - -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 -960 960 960' %3E%3Cpath d='M440-280h80v-240h-80v240Zm40-320q17 0 28.5-11.5T520-640q0-17-11.5-28.5T480-680q-17 0-28.5 11.5T440-640q0 17 11.5 28.5T480-600Zm0 520q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-80q134 0 227-93t93-227q0-134-93-227t-227-93q-134 0-227 93t-93 227q0 134 93 227t227 93Zm0-320Z'/%3E%3C/svg%3E"); - background-color: var(--admonition-note-border); +@media (prefers-color-scheme: dark) { + :root:not([data-theme='light']) { + @include dark-theme-variables; } } -.admonition.tip { - border-color: var(--admonition-tip-border); - background-color: var(--admonition-tip-bg); +.admonition { + display: flex; + align-items: flex-start; + margin-block: 1em; + border-radius: 10px; + border-inline-start: 6px solid; + padding: 0.8rem; + color: var(--text-color-high-contrast); + font-family: var(--sans-serif-font); - code { - background-color: var(--admonition-tip-code) !important; + p { + margin-inline-start: -1.75rem; + margin-block-end: 0; + font-family: inherit; } a { - border-bottom: 1px solid var(--admonition-tip-border); - color: var(--admonition-tip-border); - - &:hover { - background-color: var(--admonition-tip-border); + code { + color: inherit; } } - - .admonition-icon { - -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 -960 960 960' %3E%3Cpath d='M480-78.258q-33.718 0-56.974-22.166-23.256-22.167-23.59-55.885h161.128q-.334 33.718-23.59 55.885Q513.718-78.258 480-78.258ZM318.257-210.515v-67.588h323.486v67.588H318.257Zm7.846-121.128q-67.692-42.487-106.896-109.134-39.205-66.648-39.205-147.479 0-123.769 88.149-211.884 88.149-88.115 211.967-88.115 123.817 0 211.849 88.115 88.031 88.115 88.031 211.884 0 80.831-38.999 147.479-39 66.647-107.102 109.134H326.103Zm21.927-67.588h264.351q46.311-32 73.17-81.681 26.859-49.68 26.859-107.144 0-96.918-68-164.765-68-67.846-164.564-67.846t-164.41 67.713q-67.846 67.712-67.846 164.725 0 57.52 26.859 107.259t73.581 81.739Zm131.97 0Z'/%3E%3C/svg%3E"); - background-color: var(--admonition-tip-border); - } } -.admonition.info { - border-color: var(--admonition-info-border); - background-color: var(--admonition-info-bg); - - code { - background-color: var(--admonition-info-code) !important; - } - - a { - border-bottom: 1px solid var(--admonition-info-border); - color: var(--admonition-info-border); - - &:hover { - background-color: var(--admonition-info-border); - } - } - - .admonition-icon { - -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 -960 960 960' %3E%3Cpath d='M479.789-288Q495-288 505.5-298.289q10.5-10.29 10.5-25.5Q516-339 505.711-349.5q-10.29-10.5-25.5-10.5Q465-360 454.5-349.711q-10.5 10.29-10.5 25.5Q444-309 454.289-298.5q10.29 10.5 25.5 10.5ZM444-432h72v-240h-72v240Zm36.276 336Q401-96 331-126q-70-30-122.5-82.5T126-330.958q-30-69.959-30-149.5Q96-560 126-629.5t82.5-122Q261-804 330.958-834q69.959-30 149.5-30Q560-864 629.5-834t122 82.5Q804-699 834-629.276q30 69.725 30 149Q864-401 834-331q-30 70-82.5 122.5T629.276-126q-69.725 30-149 30ZM480-168q130 0 221-91t91-221q0-130-91-221t-221-91q-130 0-221 91t-91 221q0 130 91 221t221 91Zm0-312Z'/%3E%3C/svg%3E"); - background-color: var(--admonition-info-border); +.admonition-content { + flex: 1; + strong { + font-weight: 580; } } -.admonition.warning { - border-color: var(--admonition-warning-border); - background-color: var(--admonition-warning-bg); - - code { - background-color: var(--admonition-warning-code) !important; - } - - a { - border-bottom: 1px solid var(--admonition-warning-border); - color: var(--admonition-warning-border); - - &:hover { - background-color: var(--admonition-warning-border); - } - } - - .admonition-icon { - -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 -960 960 960' %3E%3Cpath d='M109-120q-11 0-20-5.5T75-140q-5-9-5.5-19.5T75-180l370-640q6-10 15.5-15t19.5-5q10 0 19.5 5t15.5 15l370 640q6 10 5.5 20.5T885-140q-5 9-14 14.5t-20 5.5H109Zm69-80h604L480-720 178-200Zm302-40q17 0 28.5-11.5T520-280q0-17-11.5-28.5T480-320q-17 0-28.5 11.5T440-280q0 17 11.5 28.5T480-240Zm0-120q17 0 28.5-11.5T520-400v-120q0-17-11.5-28.5T480-560q-17 0-28.5 11.5T440-520v120q0 17 11.5 28.5T480-360Zm0-100Z'/%3E%3C/svg%3E"); - - background-color: var(--admonition-warning-border); - } +.admonition-icon { + display: flex; + align-items: center; + margin: 0.3rem; + background-size: contain; + background-repeat: no-repeat; + aspect-ratio: 1/1; + width: 1.5rem; } -.admonition.danger { - border-color: var(--admonition-danger-border); - background-color: var(--admonition-danger-bg); - - code { - background-color: var(--admonition-danger-code) !important; - } - - a { - border-bottom: 1px solid var(--admonition-danger-border); - color: var(--admonition-danger-border); - - &:hover { - background-color: var(--admonition-danger-border); - } - } - - .admonition-icon { - -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 -960 960 960' %3E%3Cpath d='M239.256-400q0 58.091 27.975 108.995t76.13 81.237q-5.616-8.513-8.487-18.398-2.872-9.885-2.872-19.167 1.333-26.436 12.153-50.307 10.821-23.872 31.41-43.461L480-443.921l105.819 102.82q18.923 19.311 29.885 43.321 10.961 24.011 12.294 50.447 0 9.282-2.872 19.167-2.871 9.885-7.82 18.398 47.488-30.333 75.796-81.237Q721.41-341.909 721.41-400q0-47.622-19.258-93.169-19.259-45.547-53.998-82.549-19.951 13.41-42.202 19.859Q583.7-549.41 561-549.41q-62.448 0-105.108-38.039-42.661-38.038-51.225-98.628v-9.744q-39.385 31.949-69.898 67.68-30.513 35.73-51.987 74.166t-32.5 77.464Q239.256-437.483 239.256-400ZM480-349.539l-57.436 56.436q-12.154 11.821-17.731 26.029-5.577 14.208-5.577 29.074 0 32.769 23.498 55.757 23.497 22.987 57.246 22.987 33.432 0 57.421-22.906 23.989-22.906 23.989-55.561 0-16.162-6.116-30.162-6.116-13.999-17.454-25.154l-57.84-56.5Zm-11.002-469.022V-708q0 38.637 26.832 64.819 26.831 26.183 65.17 26.183 15.609 0 30.818-5.923 15.208-5.923 28.131-17.718l22.615-24.102q67.564 44.128 106.999 114.917 39.435 70.79 39.435 150.156 0 128.206-89.846 218.103Q609.307-91.668 480-91.668q-129.027 0-218.68-89.652-89.652-89.653-89.652-218.68 0-119.178 79.371-232.447t217.959-186.114Z'/%3E%3C/svg%3E"); - - background-color: var(--admonition-danger-border); - } +.admonition-title { + opacity: 0.92; + font-weight: bold; + font-size: 0.82rem; } + + +.admonition-icon-note { + -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 -960 960 960' %3E%3Cpath d='M440-280h80v-240h-80v240Zm40-320q17 0 28.5-11.5T520-640q0-17-11.5-28.5T480-680q-17 0-28.5 11.5T440-640q0 17 11.5 28.5T480-600Zm0 520q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-80q134 0 227-93t93-227q0-134-93-227t-227-93q-134 0-227 93t-93 227q0 134 93 227t227 93Zm0-320Z'/%3E%3C/svg%3E"); +} + +.admonition-icon-tip { + -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 -960 960 960' %3E%3Cpath d='M480-78.258q-33.718 0-56.974-22.166-23.256-22.167-23.59-55.885h161.128q-.334 33.718-23.59 55.885Q513.718-78.258 480-78.258ZM318.257-210.515v-67.588h323.486v67.588H318.257Zm7.846-121.128q-67.692-42.487-106.896-109.134-39.205-66.648-39.205-147.479 0-123.769 88.149-211.884 88.149-88.115 211.967-88.115 123.817 0 211.849 88.115 88.031 88.115 88.031 211.884 0 80.831-38.999 147.479-39 66.647-107.102 109.134H326.103Zm21.927-67.588h264.351q46.311-32 73.17-81.681 26.859-49.68 26.859-107.144 0-96.918-68-164.765-68-67.846-164.564-67.846t-164.41 67.713q-67.846 67.712-67.846 164.725 0 57.52 26.859 107.259t73.581 81.739Zm131.97 0Z'/%3E%3C/svg%3E"); +} + +.admonition-icon-info { + -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 -960 960 960' %3E%3Cpath d='M479.789-288Q495-288 505.5-298.289q10.5-10.29 10.5-25.5Q516-339 505.711-349.5q-10.29-10.5-25.5-10.5Q465-360 454.5-349.711q-10.5 10.29-10.5 25.5Q444-309 454.289-298.5q10.29 10.5 25.5 10.5ZM444-432h72v-240h-72v240Zm36.276 336Q401-96 331-126q-70-30-122.5-82.5T126-330.958q-30-69.959-30-149.5Q96-560 126-629.5t82.5-122Q261-804 330.958-834q69.959-30 149.5-30Q560-864 629.5-834t122 82.5Q804-699 834-629.276q30 69.725 30 149Q864-401 834-331q-30 70-82.5 122.5T629.276-126q-69.725 30-149 30ZM480-168q130 0 221-91t91-221q0-130-91-221t-221-91q-130 0-221 91t-91 221q0 130 91 221t221 91Zm0-312Z'/%3E%3C/svg%3E"); +} + +.admonition-icon-warning { + -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 -960 960 960' %3E%3Cpath d='M109-120q-11 0-20-5.5T75-140q-5-9-5.5-19.5T75-180l370-640q6-10 15.5-15t19.5-5q10 0 19.5 5t15.5 15l370 640q6 10 5.5 20.5T885-140q-5 9-14 14.5t-20 5.5H109Zm69-80h604L480-720 178-200Zm302-40q17 0 28.5-11.5T520-280q0-17-11.5-28.5T480-320q-17 0-28.5 11.5T440-280q0 17 11.5 28.5T480-240Zm0-120q17 0 28.5-11.5T520-400v-120q0-17-11.5-28.5T480-560q-17 0-28.5 11.5T440-520v120q0 17 11.5 28.5T480-360Zm0-100Z'/%3E%3C/svg%3E"); +} + +.admonition-icon-danger { + -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 -960 960 960' %3E%3Cpath d='M239.256-400q0 58.091 27.975 108.995t76.13 81.237q-5.616-8.513-8.487-18.398-2.872-9.885-2.872-19.167 1.333-26.436 12.153-50.307 10.821-23.872 31.41-43.461L480-443.921l105.819 102.82q18.923 19.311 29.885 43.321 10.961 24.011 12.294 50.447 0 9.282-2.872 19.167-2.871 9.885-7.82 18.398 47.488-30.333 75.796-81.237Q721.41-341.909 721.41-400q0-47.622-19.258-93.169-19.259-45.547-53.998-82.549-19.951 13.41-42.202 19.859Q583.7-549.41 561-549.41q-62.448 0-105.108-38.039-42.661-38.038-51.225-98.628v-9.744q-39.385 31.949-69.898 67.68-30.513 35.73-51.987 74.166t-32.5 77.464Q239.256-437.483 239.256-400ZM480-349.539l-57.436 56.436q-12.154 11.821-17.731 26.029-5.577 14.208-5.577 29.074 0 32.769 23.498 55.757 23.497 22.987 57.246 22.987 33.432 0 57.421-22.906 23.989-22.906 23.989-55.561 0-16.162-6.116-30.162-6.116-13.999-17.454-25.154l-57.84-56.5Zm-11.002-469.022V-708q0 38.637 26.832 64.819 26.831 26.183 65.17 26.183 15.609 0 30.818-5.923 15.208-5.923 28.131-17.718l22.615-24.102q67.564 44.128 106.999 114.917 39.435 70.79 39.435 150.156 0 128.206-89.846 218.103Q609.307-91.668 480-91.668q-129.027 0-218.68-89.652-89.652-89.653-89.652-218.68 0-119.178 79.371-232.447t217.959-186.114Z'/%3E%3C/svg%3E"); +} + +.admonition.note { @include admonition-type('note'); } +.admonition.tip { @include admonition-type('tip'); } +.admonition.info { @include admonition-type('info'); } +.admonition.warning { @include admonition-type('warning'); } +.admonition.danger { @include admonition-type('danger'); } diff --git a/sass/parts/_archive.scss b/sass/parts/_archive.scss index 5f4b806..6df323b 100644 --- a/sass/parts/_archive.scss +++ b/sass/parts/_archive.scss @@ -1,21 +1,22 @@ .archive { - margin-top: 4vmin; + margin-block-start: 4vmin; .listing-title { - margin-bottom: 1rem; + margin-block-end: 1rem; font-size: 1.5rem; } .listing-item { display: flex; gap: 1rem; - margin-bottom: 0.5rem; - padding: 0.2rem 1rem; + margin-block-end: 0.5rem; + padding-inline: 1rem; + padding-block: 0.2rem; .post-time { - padding-left: 1vmin; - min-width: 5rem; - text-align: left; + padding-inline-start: 1vmin; + min-inline-size: 5rem; + text-align: start; .date { color: var(--meta-color); diff --git a/sass/parts/_aside.scss b/sass/parts/_aside.scss new file mode 100644 index 0000000..4757524 --- /dev/null +++ b/sass/parts/_aside.scss @@ -0,0 +1,31 @@ +aside { + margin-block-end: var(--paragraph-spacing); + border-radius: 4px; + background: var(--bg-0); + padding-block: 0.8rem; + padding-inline: 1rem; + color: var(--meta-color); + font-size: 0.9rem; + + article & p { + margin: 0; + font-family: var(--sans-serif-font); + } + + @media only screen and (min-width: 1300px) { + position: absolute; + inset-inline-start: -14rem; + margin-block: 0; + border-radius: 0; + background: none; + padding: 0; + width: 12rem; + text-align: end; + + &[data-position="right"] { + inset-inline-start: auto; + inset-inline-end: -14rem; + text-align: start; + } + } +} diff --git a/sass/parts/_cards.scss b/sass/parts/_cards.scss index c956881..0b6c560 100644 --- a/sass/parts/_cards.scss +++ b/sass/parts/_cards.scss @@ -1,10 +1,51 @@ +.filter-controls { + display: flex; + flex-wrap: wrap; + justify-content: center; + align-items: center; + gap: 12px; + margin-top: 1.2rem; + margin-bottom: -1rem; + padding: 0; + list-style: none; + + #all-projects-filter { + display: none; + } + + .taxonomy-item { + margin: 0; + + a { + display: inline-block; + box-shadow: rgba(0, 0, 0, 0.1) 0px 1px 3px 0px, rgba(0, 0, 0, 0.06) 0px 1px 2px 0px; + border-radius: 1rem; + background: var(--bg-2); + padding: 0 16px; + color: var(--text-color); + font-size: 0.8rem; + text-decoration: none; + + &:hover { + background: var(--primary-color); + color: var(--hover-color); + } + + &.active { + background: var(--primary-color); + color: var(--hover-color); + } + } + } +} + .cards { display: grid; grid-template-rows: auto; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; margin-top: 4vmin; - padding: 12px 0; + padding-block: 12px; .card { box-shadow: rgba(50, 50, 93, 0.25) 0px 2px 5px -1px, rgba(0, 0, 0, 0.3) 0px 1px 3px -1px; @@ -22,16 +63,17 @@ } .card-info { - padding: 0 24px 24px; + padding-inline: 24px; + padding-block-start: 0; + padding-block-end: 24px; text-align: center; } - - .card-title { - margin-top: 0.7em; - } - .card-image { - width: 100%; + $margin: 1.6rem; + margin: $margin; + margin-bottom: $margin / 1.5; + width: calc(100% - $margin * 2); + height: auto; } .card-image-placeholder { @@ -51,4 +93,13 @@ .cards { gap: 18px; } + + .filter-controls { + gap: 8px; + margin: 18px 0; + + .taxonomy-item a { + padding: 4px 12px; + } + } } diff --git a/sass/parts/_code.scss b/sass/parts/_code.scss index 7fdc566..2623f50 100644 --- a/sass/parts/_code.scss +++ b/sass/parts/_code.scss @@ -1,7 +1,9 @@ code { + -webkit-text-size-adjust: 100%; border-radius: 5px; background-color: var(--bg-1); - padding: 0.1em 0.2em; + padding-inline: 0.2em; + padding-block: 0.1em; font-size: 0.9rem; font-family: var(--code-font); @@ -17,7 +19,7 @@ code { border-collapse: collapse; border-spacing: 0rem; width: 100%; - text-align: left; + text-align: start; td, th, @@ -26,10 +28,13 @@ code { padding: 0rem; } + // Line number col. tbody td:first-child { - width: 2rem; + opacity: 50%; + padding-inline-end: 0.8rem; + width: 1px; // Without this, iOS Safari centres short lines. user-select: none; - text-align: left; + text-align: end; } tbody tr:nth-child(even) { @@ -40,17 +45,46 @@ code { a:hover code { background-color: inherit; + padding-block: 0; } pre { display: block; position: relative; border-radius: 5px; - padding: 2.4rem 1rem 1rem; + padding-inline: 1rem; + padding-block-start: 2.4rem; + padding-block-end: 1rem; overflow: hidden; overflow-x: auto; line-height: 1.4; + code, + code td { + font-size: 0.8rem; // Fits ~77 characters. + } + + // Supports both native Zola way of adding src, and old shortcode-based logic. + // See: https://github.com/welpo/tabi/pull/489 + &::after, + code .source-path { + display: block; + position: absolute; + top: 0; + inset-inline-end: 1.3rem; + padding-top: 0.3rem; + padding-inline-end: 1.3rem; + max-width: calc(100% - 14em); + height: 0.9rem; + overflow: hidden; + content: attr(data-name); + color: var(--hover-color); + font-size: 0.65rem; + text-align: end; + text-overflow: ellipsis; + white-space: nowrap; + } + code { display: block; border: 0rem; @@ -59,42 +93,36 @@ pre { padding: 0rem; overflow-x: auto; color: inherit; - font-size: 0.8rem; // Fits ~77 characters. white-space: pre; &::before { display: block; position: absolute; top: 0; - left: 0; + inset-inline-start: 0; background-color: var(--primary-color); padding: 0.3rem; - padding-left: 1rem; + padding-inline-start: 1rem; width: calc(100% - 1.3rem); height: 0.9rem; content: attr(data-lang); color: var(--hover-color); font-size: 0.65rem; - text-align: left; + text-align: start; text-transform: uppercase; } + } +} - .source-path { - display: block; - position: absolute; - top: 0; - right: 1.3rem; - padding-top: 0.3rem; - padding-right: 1.3rem; - max-width: calc(100% - 14em); - height: 0.9rem; - overflow: hidden; - color: var(--hover-color); - font-size: 0.65rem; - text-align: right; - text-overflow: ellipsis; - white-space: nowrap; - } +// Default to LTR codeblocks. +code, pre { + direction: ltr; +} + +// Allows RTL codeblocks if `force_codeblock_ltr` is set to false. +html[data-code-direction="inherit"] { + code, pre { + direction: inherit; } } @@ -102,10 +130,10 @@ pre { -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 -960 960 960' %3E%3Cpath d='M217.002-67.694q-37.732 0-64.02-26.288-26.287-26.287-26.287-64.019V-707.69h77.999v549.689q0 4.615 3.846 8.462 3.846 3.846 8.462 3.846h451.689v77.999H217.002Zm175.999-175.999q-37.733 0-64.02-26.287T302.694-334v-463.383q0-37.732 26.287-64.02 26.287-26.287 64.02-26.287h365.383q37.732 0 64.019 26.287 26.288 26.288 26.288 64.02V-334q0 37.733-26.288 64.02-26.287 26.287-64.019 26.287H393.001Zm0-77.998h365.383q4.615 0 8.462-3.847 3.846-3.846 3.846-8.462v-463.383q0-4.616-3.846-8.462-3.847-3.846-8.462-3.846H393.001q-4.616 0-8.462 3.846-3.847 3.846-3.847 8.462V-334q0 4.616 3.847 8.462 3.846 3.847 8.462 3.847Zm-12.309 0v-488V-321.691Z'/%3E%3C/svg%3E"); position: absolute; top: 0.3rem; - right: 0.7rem; align-self: center; z-index: 1; cursor: pointer; + inset-inline-end: 0.7rem; background: var(--hover-color); background-size: contain; width: 0.9rem; diff --git a/sass/parts/_comments.scss b/sass/parts/_comments.scss index 2b3d8d2..aab54d9 100644 --- a/sass/parts/_comments.scss +++ b/sass/parts/_comments.scss @@ -23,7 +23,8 @@ margin: 0.5em auto; border: none; background: none; - padding: 0.5em 1em; + padding-block: 0.5em; + padding-inline: 1em; color: inherit; font-size: 0.95rem; font-family: var(--sans-serif-font); diff --git a/sass/parts/_footer.scss b/sass/parts/_footer.scss index 920cd2d..2b49c3d 100644 --- a/sass/parts/_footer.scss +++ b/sass/parts/_footer.scss @@ -1,6 +1,6 @@ footer { margin-top: auto; - margin-bottom: 1.4rem; + margin-block-end: 1.4rem; color: var(--meta-color); font-size: 0.88rem; font-family: var(--post-font-family); @@ -66,7 +66,7 @@ footer nav { } } -[data-theme="dark"] { +@mixin dark-theme-social { .social { &:hover { & > img { @@ -79,3 +79,13 @@ footer nav { } } } + +[data-theme="dark"] { + @include dark-theme-social; +} + +@media (prefers-color-scheme: dark) { + :root:not([data-theme="light"]) { + @include dark-theme-social; + } +} diff --git a/sass/parts/_header-anchor.scss b/sass/parts/_header-anchor.scss index 9d49833..8a06200 100644 --- a/sass/parts/_header-anchor.scss +++ b/sass/parts/_header-anchor.scss @@ -4,8 +4,8 @@ justify-content: center; align-items: center; opacity: 0; - margin-left: -2rem; - padding-right: 0.3rem; + margin-inline-start: -2rem; + padding-inline-end: 0.3rem; width: 1.9rem; height: 100%; user-select: none; @@ -15,11 +15,6 @@ } } -:dir(rtl) .header-anchor { - margin-right: -2rem; - padding-left: 0.3rem; -} - .link-icon { -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M14.78 3.653a3.936 3.936 0 1 1 5.567 5.567l-3.627 3.627a3.936 3.936 0 0 1-5.88-.353.75.75 0 0 0-1.18.928 5.436 5.436 0 0 0 8.12.486l3.628-3.628a5.436 5.436 0 1 0-7.688-7.688l-3 3a.75.75 0 0 0 1.06 1.061l3-3Z'%3E%3C/path%3E%3Cpath d='M7.28 11.153a3.936 3.936 0 0 1 5.88.353.75.75 0 0 0 1.18-.928 5.436 5.436 0 0 0-8.12-.486L2.592 13.72a5.436 5.436 0 1 0 7.688 7.688l3-3a.75.75 0 1 0-1.06-1.06l-3 3a3.936 3.936 0 0 1-5.567-5.568l3.627-3.627Z'%3E%3C/path%3E%3C/svg%3E"); align-self: center; diff --git a/sass/parts/_header.scss b/sass/parts/_header.scss index 9282187..d88bfe3 100644 --- a/sass/parts/_header.scss +++ b/sass/parts/_header.scss @@ -4,7 +4,7 @@ header { } .page-header { - margin: 4rem 0px 1rem 0px; + margin-block: 4rem 1rem; font-size: 3em; line-height: 100%; font-family: var(--header-font); @@ -17,19 +17,20 @@ header { justify-content: space-between; align-items: center; margin: 0 auto; - padding: 1em 0; + padding-block: 1em; max-width: var(--max-layout-width); } .nav-navs { display: flex; flex-wrap: wrap; + align-items: center; ul { display: flex; - flex-wrap: wrap; - justify-content: center; - align-items: center; + flex-wrap: inherit; + justify-content: inherit; + align-items: inherit; gap: 1px; margin: 0; padding: 0; @@ -37,6 +38,18 @@ header { } } +.menu-icons-container { + display: flex; + align-items: center; + margin-left: auto; +} + +.menu-icons-group { + gap: 1px; + margin: 0; + padding: 0; +} + .nav-links { justify-content: right; padding: 0.66rem; @@ -48,7 +61,7 @@ header { } .home-title { - margin-left: -0.12rem; + margin-inline-start: -0.12rem; border: none; padding: 0.12rem; color: var(--primary-color); @@ -76,17 +89,28 @@ header { ul, li { - display: inline; + display: inline-block; + margin-inline-end: 0.2rem; font-family: var(--sans-serif-font); list-style-type: none; } + + .tag { + margin-inline-end: 0; + } } + +.separator { + margin-inline-end: 0.2rem; + user-select: none; +} + .language-switcher { display: flex; justify-content: center; align-items: center; - margin-right: 0.5rem; - margin-left: 0.5rem; + margin-inline-start: 0.5rem; + margin-inline-end: 0.5rem; .language-switcher-icon { -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%23000' stroke-width='1.8' d='M1 12a11 11 90 0 0 22 0 11 11 90 0 0-22 0m1-4h20M2 16h20M11 1a21 21 90 0 0 0 22m2-22a21 21 90 0 1 0 22'/%3E%3C/svg%3E%0A"); @@ -101,6 +125,28 @@ header { background: var(--meta-color); } } + + .language-switcher-icon-with-code { + margin-inline-end: 0.3rem; + width: 0.7rem; + height: 0.7rem; + } +} + +.language-switcher-icon-code { + position: absolute; + top: -0.15rem; + z-index: 10; + inset-inline-start: 0.7rem; + width: 100%; + height: 100%; + color: var(--text-color); + font-size: 0.5rem; + text-transform: uppercase; + + &:hover { + color: var(--meta-color); + } } .dropdown { @@ -129,8 +175,8 @@ header { transform: translateX(-50%); z-index: 1; background: var(--background-color); - padding-right: 0.5rem; - padding-left: 0.5rem; + padding-inline-start: 0.5rem; + padding-inline-end: 0.5rem; text-align: center; white-space: nowrap; @@ -147,21 +193,21 @@ header { .nav-navs { display: flex; - justify-content: flex-end; + justify-content: center; + } + + .menu-icons-container { + margin-left: 0; } } @media only screen and (max-width: 600px) { .nav-navs { - flex-wrap: wrap; - justify-content: center; margin-top: 0.8rem; - width: 100%; } .navbar { flex-direction: column; - justify-content: center; align-items: center; } } diff --git a/sass/parts/_home-banner.scss b/sass/parts/_home-banner.scss index 9b63566..ce6b9c1 100644 --- a/sass/parts/_home-banner.scss +++ b/sass/parts/_home-banner.scss @@ -1,29 +1,34 @@ #banner-container-home { display: flex; - justify-content: center; - align-items: center; + justify-content: space-between; + align-items: flex-start; margin: 0.2rem auto; width: 100%; @media only screen and (max-width: 600px) { display: block; - margin-bottom: 2rem; + margin-block-end: 2rem; } #home-banner-text { - margin-bottom: 1.5rem; + flex: 1; + margin-block-end: 1.5rem; color: var(--primary-color); font-size: 1.875rem; line-height: 3rem; + li { + font-size: 1rem; + } + #home-banner-header { margin: 0; - margin-bottom: 1rem; + margin-block-end: 1rem; font-weight: 550; font-size: 2.8rem; @media only screen and (max-width: 600px) { - margin-bottom: 0; + margin-block-end: 0; font-size: 2.2rem; } } @@ -49,9 +54,9 @@ #image-container-home { position: relative; - padding-left: 2rem; - min-width: 11rem; - min-height: 11rem; + margin: auto 0; + padding-inline-start: 2rem; + max-width: 11rem; overflow: hidden; text-align: center; @@ -59,9 +64,8 @@ border: none; aspect-ratio: 1 / 1; width: 100%; - max-width: 15rem; - height: auto; - max-height: 15rem; + height: 100%; + object-fit: cover; @media only screen and (max-width: 600px) { max-width: 12rem; @@ -70,7 +74,9 @@ } @media only screen and (max-width: 600px) { - padding-left: 0; + padding-inline-start: 0; + width: 100%; + max-width: none; } } } diff --git a/sass/parts/_iine.scss b/sass/parts/_iine.scss new file mode 100644 index 0000000..9ac95c4 --- /dev/null +++ b/sass/parts/_iine.scss @@ -0,0 +1,37 @@ +.iine-button { + display: inline-flex; + align-items: center; + gap: 5px; + transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease; + cursor: pointer; + border: none; + background: transparent; + color: inherit; + font-family: var(--sans-serif-font); + -webkit-tap-highlight-color: transparent; + appearance: none; + margin: 0; + padding: 0; + font-size: inherit; + line-height: inherit; + + .icon { + display: inline-flex; + align-items: center; + } + + .counter { + margin-left: .2rem; + font-size: 0.8rem; + } + + svg { + width: 1em; + height: 1em; + } +} + +.iine-auto-buttons { + margin-top: 2rem; + padding: 1rem 0; +} diff --git a/sass/parts/_image.scss b/sass/parts/_image.scss index 6960b89..e8bae01 100644 --- a/sass/parts/_image.scss +++ b/sass/parts/_image.scss @@ -27,7 +27,7 @@ img.inline { figure h4 { margin: 0; - margin-bottom: 1em; + margin-block-end: 1em; font-size: 1rem; } diff --git a/sass/parts/_misc.scss b/sass/parts/_misc.scss index 7a7c486..52fec23 100644 --- a/sass/parts/_misc.scss +++ b/sass/parts/_misc.scss @@ -1,7 +1,16 @@ +kbd { + border: 1px solid var(--divider-color); + border-radius: 5px; + background-color: var(--bg-0); + padding: 0.1rem 0.3rem; + font-size: 0.8rem; +} + .draft-label { - margin-right: 0.3rem; + margin-inline-end: 0.3rem; background-color: var(--primary-color); - padding: 2px 4px; + padding-inline: 4px; + padding-block: 2px; color: var(--hover-color); } @@ -16,9 +25,9 @@ iframe { display: block; - margin-right: 15%; - margin-bottom: 3vmin; - margin-left: 15%; + margin-inline-start: 15%; + margin-inline-end: 15%; + margin-block-end: 3vmin; border: none; aspect-ratio: 16/9; width: 100vmin; @@ -30,7 +39,7 @@ ul { } .toc-container { - margin-bottom: 4vmin; + margin-block-end: 4vmin; } .padding-top { @@ -39,6 +48,9 @@ ul { .title-container { padding-bottom: 8px; + .social { + margin-inline-start: 0.5rem; + } } .bottom-divider { @@ -62,8 +74,8 @@ ul { blockquote { margin: 0; - border-left: 0.3rem solid var(--primary-color); - padding-left: 1em; + border-inline-start: 0.3rem solid var(--primary-color); + padding-inline-start: 1em; } a { @@ -73,21 +85,54 @@ a { text-decoration: inherit; } +// External link styles with `external_links_class = "external"`. +main { + --external-link-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2'%3E%3Cpath d='M11 5h-6v14h14v-6'/%3E%3Cpath d='M13 11l7 -7'/%3E%3Cpath d='M21 3h-6M21 3v6'/%3E%3C/g%3E%3C/svg%3E"); + + a.external:not(:has(img, svg, video, picture, figure))::after { + display: inline-block; + vertical-align: -0.05em; + margin-inline-start: 0.1em; + background-color: currentColor; + width: 0.8em; + height: 0.8em; + content: ''; + -webkit-mask-image: var(--external-link-icon); + -webkit-mask-size: 100% 100%; + } + + &:dir(rtl) a.external:not(:has(img, svg, video, picture, figure))::after { + transform: rotate(-90deg); + } + + .meta a.external:not(:has(img, svg, video, picture, figure))::after { + background-color: var(--meta-color); + } + + a.external:not(:has(img, svg, video, picture, figure)):hover::after { + background-color: var(--hover-color); + } +} + a:hover { background-color: var(--primary-color); color: var(--hover-color); } -a:not(.no-hover-padding):hover::after { +a:hover rt { + color: var(--text-color); +} + +a:not(.no-hover-padding):hover::before { display: inline-block; position: absolute; - top: 0; - right: -0.15em; - bottom: 0; - left: -0.15em; z-index: -1; + inset-block-end: 0; + inset-block-start: 0; + inset-inline-end: -0.15em; + inset-inline-start: -0.15em; background-color: var(--primary-color); - max-width: 105%; // This fixes multi-line links (see #225) + max-inline-size: 105%; content: ""; } @@ -105,16 +150,21 @@ hr { height: 1px; } +.footnotes-list, +.footnotes { + text-align: start; +} + .footnote-reference { font-size: 0.7rem; font-family: var(--serif-font); } .footnote-definition { - margin-bottom: 0.6rem; + margin-block-end: 0.6rem; sup { - margin-right: 0.15rem; + margin-inline-end: 0.15rem; font-size: 0.75rem; font-family: var(--serif-font); } @@ -125,21 +175,30 @@ hr { } .footnote-backlink { - margin-left: 0.2rem; + margin-inline-start: 0.2rem; + font-size: 0.8rem; +} + +.footnotes-list a[href^="#fr-"], +.footnotes a[href^="#fr-"] { + font-size: 0.8rem; +} + +.footnotes code { font-size: 0.8rem; } .references p { - margin-left: 2.4rem; + margin-inline-start: 2.4rem; text-indent: -2.4rem; } .info-box { margin-top: 1rem; - margin-bottom: 1rem; + margin-block-end: 1rem; border: 1px solid var(--primary-color); - border-left-width: 0.3rem; border-radius: 10px; + border-inline-start-width: 0.3rem; padding: 1rem; text-align: center; } @@ -183,18 +242,18 @@ details summary { .article-navigation { display: flex; - margin-top: 2rem; - border-top: var(--divider-color) solid 0.5px; - padding-top: 2rem; + margin-block-start: 2rem; + border-block-start: var(--divider-color) solid 0.5px; + padding-block-start: 2rem; div:first-child { flex: 1; - text-align: left; + text-align: start; } div:last-child { flex: 1; - text-align: right; + text-align: end; } div p { @@ -214,23 +273,83 @@ details summary { } } -:dir(rtl) .article-navigation { - div:first-child { - text-align: right; - } - - div:last-child { - text-align: left; - } -} - :dir(rtl) .arrow { display: inline-block; - transform: rotate(180deg); + transform: scaleX(-1); } // This for the arrows that point to a corner, (e.g. '↗', '↘', '↙', '↖') :dir(rtl) .arrow-corner { display: inline-block; - transform: rotate(270deg); + transform: rotate(-90deg); +} + +.mermaid p { + font-family: var(--sans-serif-font) !important; +} + +.mermaid .node .label { + max-width: none !important; +} + +// For the `force_text_direction` shortcode. +[data-force-text-direction="ltr"] { + direction: ltr; + unicode-bidi: bidi-override; +} + +[data-force-text-direction="rtl"] { + direction: rtl; + unicode-bidi: bidi-override; +} + +[data-force-text-direction="ltr"] *, +[data-force-text-direction="rtl"] * { + direction: inherit; +} + +.title-with-jump { + display: flex; + justify-content: space-between; + align-items: center; +} + +.title-with-jump h1 { + flex: 1; +} + +.jump-link { + flex-shrink: 0; + font-size: 0.9rem; +} + +@media (max-width: 500px) { + .title-with-jump { + flex-direction: column; + } +} + +#skip-link { + position: absolute; + top: -40px; + left: 0; + transform: translateY(-100%); + opacity: 0; + z-index: 9999; + transition: all 0.1s ease; + border-radius: 0 0 5px 0; + background-color: var(--primary-color); + padding: 4px 8px; + color: var(--hover-color); + font-weight: 500; + font-size: 0.9rem; + text-decoration: none; +} + +#skip-link:focus { + top: 0; + transform: translateY(0); + opacity: 1; + outline: 2px solid var(--text-color); + outline-offset: 2px; } diff --git a/sass/parts/_posts_list.scss b/sass/parts/_posts_list.scss index 1a9243a..e74f89c 100644 --- a/sass/parts/_posts_list.scss +++ b/sass/parts/_posts_list.scss @@ -1,23 +1,40 @@ .bloglist-container { display: grid; - grid-template-columns: 1fr; + grid-template-columns: 1fr 8fr; } -.bloglist-row { + +$padding: 2.5rem; + +.bloglist-meta { display: flex; align-items: flex-start; background-color: var(--navbar-color); - padding: 2.5rem 0; + padding-block: $padding; + min-width: 13.5rem; - .bloglist-meta { + .thumbnail-image { + margin: 0; + margin-inline: auto; // Centred by default. + max-width: 70%; + } + + li.date + li.post-thumbnail .thumbnail-image { + // Styles for the thumbnail when there's a date above (either date or updated). + margin-inline: 0; // Since metadata is left aligned, the image looks weird when centred. + margin-block-start: 0.7rem; + } + + ul { + margin-inline-end: 0.7rem; padding: 0; - width: 13.5rem; color: var(--meta-color); font-weight: 300; font-size: 0.9rem; li { list-style-type: none; + white-space: nowrap; } li.draft-label { @@ -25,22 +42,33 @@ line-height: 1.2rem; } } +} - .bloglist-tags { - margin-top: 0.1rem; +.bloglist-content { + display: flex; + position: relative; + align-items: flex-start; + background-color: var(--navbar-color); + padding: $padding 0; - .tag { - display: inline-block; - margin-right: 0.7rem; - font-weight: 400; - font-size: 0.75rem; - text-transform: uppercase; - } + .pinned-label { + display: flex; + position: absolute; + top: 0.8rem; + align-items: center; + gap: 0.3rem; + color: var(--meta-color); + font-weight: 300; + font-size: 0.8rem; } - .bloglist-content { - flex: 1; + .pinned-label svg { + width: 0.8rem; + height: 0.8rem; + } + div { + flex: 1; .bloglist-title { margin: 0; @@ -57,6 +85,18 @@ } } + .bloglist-tags { + margin-top: 0.1rem; + + .tag { + display: inline-block; + margin-inline-end: 0.7rem; + font-weight: 400; + font-size: 0.75rem; + text-transform: uppercase; + } + } + .description p { margin: 0.5rem 0 1rem; color: var(--text-color); @@ -85,22 +125,47 @@ } @media only screen and (max-width: 1100px) { - .bloglist-row { - flex-direction: column; - align-items: flex-start; - padding: 2rem 0; + .bloglist-container { + display: block; + } - .bloglist-meta { - margin-bottom: 0; + .pinned-label svg { + margin-bottom: -2px; + } + + .bloglist-meta { + border-bottom: 0; + padding-block: 2rem; + + ul { + margin-block-end: 0; width: 100%; li { display: inline; - margin-right: 0.3rem; + margin-inline-end: 0.3rem; } } - .bloglist-content { + .post-thumbnail { + display: none; + } + } + + .bloglist-content { + flex-direction: column; + align-items: flex-start; + padding: 0; + padding-bottom: 2rem; + + + .pinned-label { + position: static; + margin: 0; + margin-top: -1.9rem; + } + + div { width: 100%; } } diff --git a/sass/parts/_quick_navigation_buttons.scss b/sass/parts/_quick_navigation_buttons.scss index 59ef653..768592f 100644 --- a/sass/parts/_quick_navigation_buttons.scss +++ b/sass/parts/_quick_navigation_buttons.scss @@ -64,20 +64,20 @@ right: 0; bottom: 100%; z-index: 2; - margin-bottom: $padding-vertical; + margin-block-end: $padding-vertical; box-shadow: rgba(0, 0, 0, 0.15) 1.95px 1.95px 2.6px; border: 1px solid var(--divider-color); border-radius: 5px; background-color: var(--background-color); - padding-right: $padding-horizontal; + padding-inline-end: $padding-horizontal; max-height: 70vh; overflow-y: auto; font-size: 0.8rem; - text-align: left; + text-align: start; white-space: nowrap; // Prevents wrapping, allowing content to define width. ul { - padding-left: $padding-horizontal; + padding-inline-start: $padding-horizontal; list-style: none; } } diff --git a/sass/parts/_search.scss b/sass/parts/_search.scss index 05caf75..df820e4 100644 --- a/sass/parts/_search.scss +++ b/sass/parts/_search.scss @@ -2,7 +2,7 @@ $icon-size: 1.3rem; #searchModal { background: color-mix(in srgb, var(--primary-color) 5%, transparent); - text-align: left; + text-align: start; #searchContainer { padding: 1rem; @@ -18,7 +18,7 @@ $icon-size: 1.3rem; .search-icon { position: absolute; - left: 1rem; + inset-inline-start: 1rem; width: $icon-size; height: $icon-size; @@ -28,10 +28,11 @@ $icon-size: 1.3rem; } .close-icon { + display: none; position: absolute; right: $icon-size; - margin-right: 0.5rem; - margin-left: 1rem; + margin-inline-start: 1rem; + margin-inline-end: 0.5rem; width: $icon-size; height: $icon-size; } @@ -41,7 +42,8 @@ $icon-size: 1.3rem; border: 1px solid var(--divider-color); border-radius: 20px; background-color: var(--input-background-color); - padding: 0.75rem 1rem 0.75rem 3rem; + padding-inline: 3rem 1rem; + padding-block: 0.75rem; width: calc(100% - 2rem); color: var(--text-color); font-size: 1rem; @@ -82,7 +84,8 @@ $icon-size: 1.3rem; > div { cursor: pointer; - padding: 0.5rem 1rem; + padding-inline: 1rem; + padding-block: 0.5rem; &[aria-selected="true"] { background-color: var(--primary-color); @@ -113,8 +116,8 @@ $icon-size: 1.3rem; display: block; position: relative; align-self: center; - margin-right: 0.5rem; - margin-left: 1rem; + margin-inline-start: 1rem; + margin-inline-end: 0.5rem; width: $icon-size; height: $icon-size; } diff --git a/sass/parts/_table.scss b/sass/parts/_table.scss index 3a35a9c..d6e5326 100644 --- a/sass/parts/_table.scss +++ b/sass/parts/_table.scss @@ -11,7 +11,8 @@ table { th, td { border: 1px solid var(--bg-1); - padding: 6px 13px; + padding-inline: 13px; + padding-block: 6px; font-size: large; } diff --git a/sass/parts/_tags.scss b/sass/parts/_tags.scss index 077ac5f..ae28d0a 100644 --- a/sass/parts/_tags.scss +++ b/sass/parts/_tags.scss @@ -8,7 +8,7 @@ } .tags-item { - margin-bottom: 1rem; + margin-block-end: 1rem; } } diff --git a/sass/parts/_theme-switch.scss b/sass/parts/_theme-switch.scss index 6751a78..9c5bd4f 100644 --- a/sass/parts/_theme-switch.scss +++ b/sass/parts/_theme-switch.scss @@ -3,7 +3,7 @@ position: relative; align-self: center; cursor: pointer; - margin-left: 0.5rem; + margin-inline-start: 0.5rem; background: var(--text-color); width: 1rem; height: 1rem; @@ -19,13 +19,13 @@ .theme-resetter { -webkit-mask: url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960" %3E%3Cpath d="M295.87-193.869v-78.001h291.152q43.63 0 72.369-33.424 28.739-33.423 28.739-79.271t-28.739-79.391Q630.652-497.5 587.022-497.5H343.913l87.478 87.478-55.652 55.153L193.869-536.5l181.87-181.631 55.652 55.653-87.478 86.978h243.109q75.435 0 127.272 56.522 51.837 56.521 51.837 134.174 0 77.652-51.837 134.293-51.837 56.642-127.272 56.642H295.87Z"/%3E%3C/svg%3E'); position: absolute; - top: -0.6rem; - right: -0.6rem; visibility: hidden; opacity: 0; transition: opacity 0.3s ease, visibility 0.3s ease; transition-delay: 0.5s; cursor: pointer; + inset-block-start: -0.6rem; + inset-inline-end: -0.6rem; background: var(--text-color); width: 0.8rem; height: 0.8rem; diff --git a/sass/parts/_webmention.scss b/sass/parts/_webmention.scss new file mode 100644 index 0000000..b6d6338 --- /dev/null +++ b/sass/parts/_webmention.scss @@ -0,0 +1,149 @@ +#webmentions { + position: relative; + z-index: 100; + margin: 0; + background-color: var(--background-color); + color: var(--text-color); + line-height: 1.2em; + + h2 { + margin-bottom: 1.5em; + font-size: 1.1em; + } + + h3 { + display: flex; + align-items: center; + font-size: 0.9em; + + svg { + margin-inline-end: 0.2rem; + } + + .svg-icon, + span { + margin-inline-end: .3rem; + } + } + + ol { + padding: 0; + } + + li, + p { + font-family: inherit; + } + + +.likes { + display: flex; + flex-wrap: wrap; + margin-top: 0.5rem; + padding: 0; + list-style: none; + + li { + position: relative; + transition: transform 0.8s ease-out, z-index 0s linear 0.4s; + margin-bottom: .375rem; + margin-inline-start: -.75rem; + + &:first-child { + margin-inline-start: 0; + } + + &:hover { + transform: scale(1.3) translateY(-4px); + z-index: 10; + transition: transform 0.05s ease-out, z-index 0s linear 0s; + } + + img { + display: block; + border: 2px solid var(--background-color, white); + border-radius: 50%; + aspect-ratio: 1/1; + width: 2.5rem; + height: 2.5rem; + object-fit: cover; + } + } + } + + .comment { + margin-bottom: 1rem; + border-radius: 10px; + background: var(--bg-0); + padding: 1rem; + overflow: hidden; + font-size: 80%; + + div { + display: flex; + flex-wrap: nowrap; + justify-content: space-between; + align-items: center; + } + + p { + margin-bottom: 0; + line-height: 1.5em; + } + + .p-author { + font-style: bold; + font-size: 1.3em; + } + + .u-url { + font-style: italic; + text-decoration: underline; + } + + .u-author { + display: flex; + align-items: center; + + img { + display: block; + margin-inline-end: .625rem; + width: 2rem; + max-width: 100%; + height: 2rem; + } + } + } + + form { + input { + flex: 1; + border: 1px solid var(--divider-color); + border-radius: 20px 0px 0px 20px; + background-color: var(--input-background-color); + padding-inline: 1rem 1rem; + padding-block: .75rem; + width: calc(60% - 2rem); + color: var(--text-color); + font-size: 1rem; + } + + button { + flex: 1; + border: 1px solid var(--divider-color); + border-radius: 0px 20px 20px 0px; + background-color: var(--input-background-color); + padding-inline: 0.7rem 0.7rem; + padding-block: .75rem; + width: 7rem; + color: var(--text-color); + font-size: 1rem; + } + + button:hover { + cursor: pointer; + background-color: var(--primary-color); + color: var(--hover-color); + } + } +} diff --git a/sass/parts/_zola-error.scss b/sass/parts/_zola-error.scss new file mode 100644 index 0000000..3bdbcbc --- /dev/null +++ b/sass/parts/_zola-error.scss @@ -0,0 +1,28 @@ +// Styles Zola error messages. See https://github.com/welpo/tabi/pull/359 +body > div:last-child > div:last-child[style]:not([class]):not([id]) { + position: fixed; + top: 50%; + left: 50%; + transform: translate(-50%, -50%); + z-index: 9999; + box-shadow: rgba(50, 50, 93, 0.25) 0px 50px 100px -20px, rgba(0, 0, 0, 0.3) 0px 30px 60px -30px; + border: 2px solid var(--admonition-danger-border); + border-radius: 5px; + background-color: var(--admonition-danger-bg); + padding: 15px; + width: fit-content; + max-width: 80%; +} + +body > div:last-child > div:last-child[style]:not([class]):not([id]) > p[style]:first-child { + margin: 0; + color: var(--admonition-danger-border); + font-weight: bold; +} + +body > div:last-child > div:last-child[style]:not([class]):not([id]) > pre[style]:last-child { + margin-block-end: 0; + background-color: var(--admonition-danger-code); + padding: 10px; + overflow-x: auto; +} diff --git a/sass/skins/blue.scss b/sass/skins/blue.scss index 8b3225b..d135219 100644 --- a/sass/skins/blue.scss +++ b/sass/skins/blue.scss @@ -1,7 +1,22 @@ +@mixin theme-variables($theme) { + @if $theme =='light' { + --primary-color: #3271E7; // Contrast ratio: 4.51:1 + } + @else if $theme == 'dark' { + --primary-color: #6cacff; // Contrast ratio: 7.05:1 + } +} + :root { - --primary-color: #3271E7; // Contrast ratio: 4.51:1 + @include theme-variables('light'); } [data-theme='dark'] { - --primary-color: #6cacff; // Contrast ratio: 7.05:1 + @include theme-variables('dark'); +} + +@media (prefers-color-scheme: dark) { + :root:not([data-theme='light']) { + @include theme-variables('dark'); + } } diff --git a/sass/skins/evangelion.scss b/sass/skins/evangelion.scss index d2506fb..d0350a5 100644 --- a/sass/skins/evangelion.scss +++ b/sass/skins/evangelion.scss @@ -1,9 +1,24 @@ -// Evangelion Unit-02. -:root { - --primary-color: #d12e36; // Contrast ratio: 5.05:1 +@mixin theme-variables($theme) { + @if $theme =='light' { + // Evangelion Unit-02. + --primary-color: #d12e36; // Contrast ratio: 5.05:1 + } + @else if $theme == 'dark' { + // Evangelion Unit-01. + --primary-color: #c09bd9; // Contrast ratio: 7.01:1 + } } -// Evangelion Unit-01. -[data-theme='dark'] { - --primary-color: #c09bd9; // Contrast +:root { + @include theme-variables('light'); +} + +[data-theme='dark'] { + @include theme-variables('dark'); +} + +@media (prefers-color-scheme: dark) { + :root:not([data-theme='light']) { + @include theme-variables('dark'); + } } diff --git a/sass/skins/indigo_ingot.scss b/sass/skins/indigo_ingot.scss index 5ffb588..11a6370 100644 --- a/sass/skins/indigo_ingot.scss +++ b/sass/skins/indigo_ingot.scss @@ -1,7 +1,22 @@ +@mixin theme-variables($theme) { + @if $theme =='light' { + --primary-color: #1460bd; // Contrast ratio: 6.1:1 + } + @else if $theme == 'dark' { + --primary-color: #e6c212; // Contrast ratio: 9.48:1 + } +} + :root { - --primary-color: #1460bd; // Contrast ratio: 6.1:1 + @include theme-variables('light'); } [data-theme='dark'] { - --primary-color: #e6c212; // Contrast ratio: 9.48:1 + @include theme-variables('dark'); +} + +@media (prefers-color-scheme: dark) { + :root:not([data-theme='light']) { + @include theme-variables('dark'); + } } diff --git a/sass/skins/lavender.scss b/sass/skins/lavender.scss index b772953..97a40df 100644 --- a/sass/skins/lavender.scss +++ b/sass/skins/lavender.scss @@ -1,7 +1,22 @@ +@mixin theme-variables($theme) { + @if $theme =='light' { + --primary-color: #9055d8; // Contrast ratio: 4.69:1 + } + @else if $theme == 'dark' { + --primary-color: #cba2e8; // Contrast ratio: 7.74:1 + } +} + :root { - --primary-color: #9055d8; // Contrast ratio: 4.69:1 + @include theme-variables('light'); } [data-theme='dark'] { - --primary-color: #cba2e8; // Contrast ratio: 7.74:1 + @include theme-variables('dark'); +} + +@media (prefers-color-scheme: dark) { + :root:not([data-theme='light']) { + @include theme-variables('dark'); + } } diff --git a/sass/skins/lowcontrast_orange.scss b/sass/skins/lowcontrast_orange.scss index c374ddd..ad84bf4 100644 --- a/sass/skins/lowcontrast_orange.scss +++ b/sass/skins/lowcontrast_orange.scss @@ -2,11 +2,25 @@ // and might not be suitable for users with certain types of visual impairment. // Furthermore, low contrast will affect your Google Lighthouse rating. // For more information on web accessibility: https://www.w3.org/WAI/WCAG21/Understanding/contrast-minimum.html +@mixin theme-variables($theme) { + @if $theme =='light' { + --primary-color: #f56a00; // Contrast ratio: 3.02:1. Not very accessible. + } + @else if $theme == 'dark' { + --primary-color: #ec984f; // Contrast ratio: 7.19:1. Accessible. + } +} :root { - --primary-color: #f56a00; // Contrast ratio: 3.02:1. Not very accessible. + @include theme-variables('light'); } [data-theme='dark'] { - --primary-color: #ec984f; // Contrast ratio: 7.19:1. Accessible. + @include theme-variables('dark'); +} + +@media (prefers-color-scheme: dark) { + :root:not([data-theme='light']) { + @include theme-variables('dark'); + } } diff --git a/sass/skins/lowcontrast_peach.scss b/sass/skins/lowcontrast_peach.scss index 5b9a51c..328a4da 100644 --- a/sass/skins/lowcontrast_peach.scss +++ b/sass/skins/lowcontrast_peach.scss @@ -2,11 +2,25 @@ // and might not be suitable for users with certain types of visual impairment. // Furthermore, low contrast will affect your Google Lighthouse rating. // For more information on web accessibility: https://www.w3.org/WAI/WCAG21/Understanding/contrast-minimum.html +@mixin theme-variables($theme) { + @if $theme =='light' { + --primary-color: #ffa057; // Contrast ratio: 2.01:1. Not very accessible. + } + @else if $theme == 'dark' { + --primary-color: #ffab7f; // Contrast ratio: 8.93:1. Accessible. + } +} :root { - --primary-color: #ffa057; // Contrast ratio: 2.01:1. Not very accessible. + @include theme-variables('light'); } [data-theme='dark'] { - --primary-color: #ffab7f; // Contrast ratio: 8.93:1. Accessible. + @include theme-variables('dark'); +} + +@media (prefers-color-scheme: dark) { + :root:not([data-theme='light']) { + @include theme-variables('dark'); + } } diff --git a/sass/skins/lowcontrast_pink.scss b/sass/skins/lowcontrast_pink.scss index b6b7378..3f96d1d 100644 --- a/sass/skins/lowcontrast_pink.scss +++ b/sass/skins/lowcontrast_pink.scss @@ -2,11 +2,25 @@ // and might not be suitable for users with certain types of visual impairment. // Furthermore, low contrast will affect your Google Lighthouse rating. // For more information on web accessibility: https://www.w3.org/WAI/WCAG21/Understanding/contrast-minimum.html +@mixin theme-variables($theme) { + @if $theme =='light' { + --primary-color: #ee59d2; // Contrast ratio: 3:1. Not very accessible. + } + @else if $theme == 'dark' { + --primary-color: #f49ee9; // Contrast ratio: 9.87:1. Accessible. + } +} :root { - --primary-color: #ee59d2; // Contrast ratio: 3:1. Not very accessible. + @include theme-variables('light'); } [data-theme='dark'] { - --primary-color: #f49ee9; // Contrast ratio: 9.87:1. Accessible. + @include theme-variables('dark'); +} + +@media (prefers-color-scheme: dark) { + :root:not([data-theme='light']) { + @include theme-variables('dark'); + } } diff --git a/sass/skins/mint.scss b/sass/skins/mint.scss index 692872f..e598c24 100644 --- a/sass/skins/mint.scss +++ b/sass/skins/mint.scss @@ -1,7 +1,22 @@ +@mixin theme-variables($theme) { + @if $theme =='light' { + --primary-color: #00804d; // Contrast ratio: 5:1 + } + @else if $theme == 'dark' { + --primary-color: #00b86e; // Contrast ratio: 6.34:1 + } +} + :root { - --primary-color: #00804d; // Contrast ratio: 5:1 + @include theme-variables('light'); } [data-theme='dark'] { - --primary-color: #00b86e; // Contrast ratio: 6.34:1 + @include theme-variables('dark'); +} + +@media (prefers-color-scheme: dark) { + :root:not([data-theme='light']) { + @include theme-variables('dark'); + } } diff --git a/sass/skins/monochrome.scss b/sass/skins/monochrome.scss index a616695..976e12e 100644 --- a/sass/skins/monochrome.scss +++ b/sass/skins/monochrome.scss @@ -1,7 +1,22 @@ +@mixin theme-variables($theme) { + @if $theme =='light' { + --primary-color: #727272; // Contrast ratio: 4.81:1 + } + @else if $theme == 'dark' { + --primary-color: #b3b3b3; // Contrast ratio: 7.86:1 + } +} + :root { - --primary-color: #727272; // Contrast ratio: 4.81:1 + @include theme-variables('light'); } [data-theme='dark'] { - --primary-color: #b3b3b3; // Contrast ratio: 7.86:1 + @include theme-variables('dark'); +} + +@media (prefers-color-scheme: dark) { + :root:not([data-theme='light']) { + @include theme-variables('dark'); + } } diff --git a/sass/skins/red.scss b/sass/skins/red.scss index 844f8b4..169340f 100644 --- a/sass/skins/red.scss +++ b/sass/skins/red.scss @@ -1,7 +1,22 @@ +@mixin theme-variables($theme) { + @if $theme =='light' { + --primary-color: #ca4963; // Contrast ratio: 4.52:1. + } + @else if $theme == 'dark' { + --primary-color: #ea535f; // Contrast ratio: 4.63:1. + } +} + :root { - --primary-color: #ca4963; // Contrast ratio: 4.52:1. + @include theme-variables('light'); } [data-theme='dark'] { - --primary-color: #ea535f; // Contrast ratio: 4.63:1. + @include theme-variables('dark'); +} + +@media (prefers-color-scheme: dark) { + :root:not([data-theme='light']) { + @include theme-variables('dark'); + } } diff --git a/sass/skins/sakura.scss b/sass/skins/sakura.scss index db00861..4e418eb 100644 --- a/sass/skins/sakura.scss +++ b/sass/skins/sakura.scss @@ -1,7 +1,22 @@ +@mixin theme-variables($theme) { + @if $theme =='light' { + --primary-color: #D33C5C; // Contrast ratio: 4.61:1 + } + @else if $theme == 'dark' { + --primary-color: #fabed2; // Contrast ratio: 10.48:1 + } +} + :root { - --primary-color: #D33C5C; // Contrast ratio: 4.61:1 + @include theme-variables('light'); } [data-theme='dark'] { - --primary-color: #fabed2; // Contrast ratio: 10.48:1 + @include theme-variables('dark'); +} + +@media (prefers-color-scheme: dark) { + :root:not([data-theme='light']) { + @include theme-variables('dark'); + } } diff --git a/sass/skins/teal.scss b/sass/skins/teal.scss index 7ecdc0c..3a1fbcd 100644 --- a/sass/skins/teal.scss +++ b/sass/skins/teal.scss @@ -1,12 +1,33 @@ -// This file is never loaded; it's serves as reference for the default skin (in main.scss). // When creating your own skin, you can use https://webaim.org/resources/contrastchecker/ // to verify the accessibility and readability of your colourscheme. -// The light background is #fff and the dark background is #1f1f1f. +// The default light background is #fff and the dark background is #1f1f1f. +// This defines theme-specific variables. +@mixin theme-variables($theme) { + @if $theme =='light' { + // Light theme colours. + --primary-color: #087e96; // Contrast ratio: 4.73:1 + } + @else if $theme == 'dark' { + // Dark theme colours. + --primary-color: #91e0ee; // Contrast ratio: 11.06:1 + } +} + +// Apply light theme variables by default. :root { - --primary-color: #087e96; // Contrast ratio: 4.73:1 + @include theme-variables('light'); } +// Apply dark theme variables when dark theme is explicitly set. [data-theme='dark'] { - --primary-color: #91e0ee; // Contrast ratio: 11.06:1 + @include theme-variables('dark'); +} + +// Apply dark theme variables when user's system prefers dark mode +// and the theme is not explicitly set to light. +@media (prefers-color-scheme: dark) { + :root:not([data-theme='light']) { + @include theme-variables('dark'); + } } diff --git a/scripts/release b/scripts/release new file mode 160000 index 0000000..8e0a56e --- /dev/null +++ b/scripts/release @@ -0,0 +1 @@ +Subproject commit 8e0a56e333ad53b01a6036744facaab21404d329 diff --git a/scripts/upgrade-deps b/scripts/upgrade-deps new file mode 100755 index 0000000..62a5d52 --- /dev/null +++ b/scripts/upgrade-deps @@ -0,0 +1,411 @@ +#!/usr/bin/env bash +set -eu + +MERMAID_DIR="static/js" +MERMAID_FILE="mermaid.min.js" +MERMAID_PATH="${MERMAID_DIR}/${MERMAID_FILE}" +KATEX_JS_DIR="static/js" +KATEX_CSS_DIR="static" +KATEX_FONTS_DIR="static/fonts/KaTeX" +KATEX_JS_FILE="katex.min.js" +KATEX_CSS_FILE="katex.min.css" +KATEX_JS_PATH="${KATEX_JS_DIR}/${KATEX_JS_FILE}" +KATEX_CSS_PATH="${KATEX_CSS_DIR}/${KATEX_CSS_FILE}" +UGLIFY_ITERATIONS=5 +CURL_RETRIES=3 + +cleanup() { + rm -rf "$TEMP_DIR" +} + +exit_with_message() { + echo "$1" >&2 + exit 1 +} + +print_usage() { + echo "Usage: $0 [options]" + echo "Options:" + echo " --mermaid Upgrade Mermaid.js" + echo " --katex Upgrade KaTeX" + echo " --all Upgrade all dependencies (default)" + echo " --help Display this help message" +} + +check_dependency() { + if ! command -v "$1" &> /dev/null; then + exit_with_message "$1 is required but not installed." + fi +} + +curl_with_retry() { + local url="$1" + local output="$2" + local retries="$CURL_RETRIES" + local wait_time=5 + + while [ $retries -gt 0 ]; do + if curl -L "$url" -o "$output"; then + return 0 + else + echo "Curl failed. Retrying in $wait_time seconds…" + sleep $wait_time + retries=$((retries - 1)) + wait_time=$((wait_time * 2)) + fi + done + + echo "Failed to download after $CURL_RETRIES attempts." >&2 + return 1 +} + +get_latest_version_jsdelivr() { + local package="$1" + local temp_file="${TEMP_DIR}/jsdelivr_response.json" + if curl_with_retry "https://data.jsdelivr.com/v1/package/npm/${package}" "$temp_file"; then + jq -r '.tags.latest' "$temp_file" + else + return 1 + fi +} + +get_latest_version_github() { + local repo="$1" + local temp_file="${TEMP_DIR}/github_response.json" + if curl_with_retry "https://api.github.com/repos/${repo}/releases/latest" "$temp_file"; then + jq -r '.tag_name' "$temp_file" | sed -E 's/^v?//' + else + return 1 + fi +} + +get_local_mermaid_version() { + local version + # Old format. + version=$(grep -o '[A-Za-z]\+t="[0-9]\+\.[0-9]\+\.[0-9]\+"' "$MERMAID_PATH" | grep -o '[0-9]\+\.[0-9]\+\.[0-9]\+' || true) + + # New format. + if [ -z "$version" ]; then + version=$(grep -o 'version:"[0-9]\+\.[0-9]\+\.[0-9]\+"' "$MERMAID_PATH" | grep -o '[0-9]\+\.[0-9]\+\.[0-9]\+' || true) + fi + + if [ -z "$version" ]; then + exit_with_message "Could not detect local Mermaid.js version" + fi + echo "$version" +} + + +get_local_katex_version() { + local version + version=$(sed -n 's/.*version:"\([^"]*\)".*/\1/p' "$KATEX_JS_PATH" | head -n 1) + if [ -z "$version" ]; then + echo "Could not detect local KaTeX version" >&2 + return 1 + fi + echo "$version" +} + +compare_md5() { + local new_file="$1" + local current_file="$2" + local new_md5 + new_md5=$(md5sum "$new_file" | awk '{ print $1 }') + + if [ -f "$current_file" ]; then + local current_md5 + current_md5=$(md5sum "$current_file" | awk '{ print $1 }') + if [ "$new_md5" = "$current_md5" ]; then + echo "same" + else + echo "different" + fi + else + echo "new" + fi +} + +uglify_file() { + local file="$1" + local iterations="$2" + + for i in $(seq 1 "$iterations"); do + echo "Running UglifyJS iteration $i" + uglifyjs --compress --mangle -- "$file" > "${file}.tmp" + mv "${file}.tmp" "$file" + done +} + +generate_commit_message() { + local template="$1" + local version="$2" + echo "${template//\{VERSION\}/${version}}" +} + + +safe_file_manipulation() { + local file="$1" + local manipulation_command="$2" + local temp_file="${file}.tmp" + awk "${manipulation_command}" "$file" > "$temp_file" + mv "$temp_file" "$file" +} + +append_autorender_extension() { + local file="$1" + # Auto-render Extension (https://katex.org/docs/autorender) with a slight modification to add `$` inline delimiters. + local extension_code=' +,function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("katex")):"function"==typeof define&&define.amd?define(["katex"],t):"object"==typeof exports?exports.renderMathInElement=t(require("katex")):e.renderMathInElement=t(e.katex)}("undefined"!=typeof self?self:this,function(e){return function(){"use strict";var t={771:function(t){t.exports=e}},$={};function r(e){var _=$[e];if(void 0!==_)return _.exports;var n=$[e]={exports:{}};return t[e](n,n.exports,r),n.exports}r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,{a:t}),t},r.d=function(e,t){for(var $ in t)r.o(t,$)&&!r.o(e,$)&&Object.defineProperty(e,$,{enumerable:!0,get:t[$]})},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)};var _,n,a,i,o,s,l,h,m={};return r.d(m,{default:function(){return h}}),_=r(771),n=r.n(_),a=function(e,t,$){for(var r=$,_=0,n=e.length;r0&&(r.push({type:"text",data:e.slice(0,$)}),e=e.slice($));var n=t.findIndex(function(t){return e.startsWith(t.left)});if(-1===($=a(t[n].right,e,t[n].left.length)))break;var o=e.slice(0,$+t[n].right.length),s=i.test(o)?o:e.slice(t[n].left.length,$);r.push({type:"math",data:s,rawData:o,display:t[n].display}),e=e.slice($+t[n].right.length)}return""!==e&&r.push({type:"text",data:e}),r},s=function(e,t){var $=o(e,t.delimiters);if(1===$.length&&"text"===$[0].type)return null;for(var r=document.createDocumentFragment(),_=0;_<$.length;_++)if("text"===$[_].type)r.appendChild(document.createTextNode($[_].data));else{var a=document.createElement("span"),i=$[_].data;t.displayMode=$[_].display;try{t.preProcess&&(i=t.preProcess(i)),n().render(i,a,t)}catch(s){if(!(s instanceof n().ParseError))throw s;t.errorCallback("KaTeX auto-render: Failed to parse `"+$[_].data+"` with ",s),r.appendChild(document.createTextNode($[_].rawData));continue}r.appendChild(a)}return r},l=function e(t,$){for(var r=0;r> "$file" + echo ";" >> "$file" +} + +modify_katex_css() { + local file="$1" + safe_file_manipulation "$file" '{gsub(/url\(fonts\/KaTeX/, "url(fonts/KaTeX/KaTeX"); print $0}' +} + +upgrade_mermaid() { + echo + echo "Starting Mermaid.js update…" + if [ ! -d "$MERMAID_DIR" ]; then + exit_with_message "Directory ${MERMAID_DIR} does not exist. Are you running this script from the root of the repository?" + fi + + local commit_msg_template + commit_msg_template=$(cat << EOM +⬆️ chore(deps): upgrade mermaid to v{VERSION} + +Changelog: https://github.com/mermaid-js/mermaid/releases/tag/mermaid%40{VERSION} + +Source: https://cdn.jsdelivr.net/npm/mermaid@{VERSION}/dist/mermaid.min.js +EOM +) + + local latest_version + latest_version=$(get_latest_version_jsdelivr "mermaid" || get_latest_version_github "mermaid-js/mermaid") + if [ -z "$latest_version" ]; then + exit_with_message "Unable to determine the latest Mermaid.js version." + fi + + local local_version + local_version=$(get_local_mermaid_version) + echo "Latest Mermaid.js version: ${latest_version}" + echo "Local Mermaid.js version: ${local_version}" + if [ "$latest_version" = "$local_version" ]; then + echo "Mermaid.js is already up to date. Skipping update." + return 0 + fi + + local download_url + download_url="https://cdn.jsdelivr.net/npm/mermaid@${latest_version}/dist/mermaid.min.js" + if ! curl_with_retry "${download_url}" "${TEMP_DIR}/${MERMAID_FILE}"; then + exit_with_message "Failed to download Mermaid.js" + fi + + uglify_file "${TEMP_DIR}/${MERMAID_FILE}" "$UGLIFY_ITERATIONS" + local comparison_result + comparison_result=$(compare_md5 "${TEMP_DIR}/${MERMAID_FILE}" "${MERMAID_PATH}") + + case "$comparison_result" in + "same") + echo "Mermaid: New version is the same as current version. No update needed." + return 0 + ;; + "different") + echo "Mermaid: New version differs from current version. Proceeding with update." + mv "${TEMP_DIR}/${MERMAID_FILE}" "${MERMAID_PATH}" + ;; + "new") + echo "Mermaid: Creating new file: ${MERMAID_PATH}" + mv "${TEMP_DIR}/${MERMAID_FILE}" "${MERMAID_PATH}" + ;; + esac + + echo "Mermaid.js updated and minified successfully!" + echo "Preparing to commit changes…" + git add "${MERMAID_PATH}" + local commit_msg + commit_msg=$(generate_commit_message "$commit_msg_template" "$latest_version") + git commit -m "${commit_msg}" + + echo "Most recent commit:" + git log -1 +} + +upgrade_katex() { + echo + echo "Starting KaTeX update…" + if [ ! -d "$KATEX_JS_DIR" ] || [ ! -d "$KATEX_CSS_DIR" ]; then + exit_with_message "KaTeX directories do not exist. Are you running this script from the root of the repository?" + fi + + local commit_msg_template + commit_msg_template=$(cat << EOM +⬆️ chore(deps): upgrade KaTeX to v{VERSION} + +Changelog: https://github.com/KaTeX/KaTeX/releases/tag/v{VERSION} + +Source: https://github.com/KaTeX/KaTeX/releases/download/v{VERSION}/katex.tar.gz +EOM +) + + local latest_version + latest_version=$(get_latest_version_github "KaTeX/KaTeX") + local local_version + local_version=$(get_local_katex_version) + if [ -z "$local_version" ]; then + exit_with_message "Unable to determine the local KaTeX version." + fi + + echo "Latest KaTeX version: ${latest_version}" + echo "Local KaTeX version: ${local_version}" + if [ "$latest_version" = "$local_version" ]; then + echo "KaTeX is already up to date. Skipping update." + return 0 + fi + + local download_url="https://github.com/KaTeX/KaTeX/releases/download/v${latest_version}/katex.tar.gz" + if ! curl_with_retry "${download_url}" "${TEMP_DIR}/katex.tar.gz"; then + exit_with_message "Failed to download KaTeX" + fi + + tar -xzf "${TEMP_DIR}/katex.tar.gz" -C "${TEMP_DIR}" + + # JS. + cp "${TEMP_DIR}/katex/katex.min.js" "${TEMP_DIR}/${KATEX_JS_FILE}" + append_autorender_extension "${TEMP_DIR}/${KATEX_JS_FILE}" + uglify_file "${TEMP_DIR}/${KATEX_JS_FILE}" "$UGLIFY_ITERATIONS" + local js_comparison_result + js_comparison_result=$(compare_md5 "${TEMP_DIR}/${KATEX_JS_FILE}" "${KATEX_JS_PATH}") + + # CSS. + cp "${TEMP_DIR}/katex/katex.min.css" "${TEMP_DIR}/${KATEX_CSS_FILE}" + modify_katex_css "${TEMP_DIR}/${KATEX_CSS_FILE}" + local css_comparison_result + css_comparison_result=$(compare_md5 "${TEMP_DIR}/${KATEX_CSS_FILE}" "${KATEX_CSS_PATH}") + + if [ "$js_comparison_result" = "same" ] && [ "$css_comparison_result" = "same" ]; then + echo "KaTeX: New version is the same as current version. No update needed." + return 0 + fi + + local changes_made + changes_made=false + if [ "$js_comparison_result" != "same" ]; then + echo "KaTeX JS: New version differs from current version. Proceeding with update." + mv "${TEMP_DIR}/${KATEX_JS_FILE}" "${KATEX_JS_PATH}" + changes_made=true + fi + + if [ "$css_comparison_result" != "same" ]; then + echo "KaTeX CSS: New version differs from current version. Proceeding with update." + mv "${TEMP_DIR}/${KATEX_CSS_FILE}" "${KATEX_CSS_PATH}" + changes_made=true + fi + + rm -rf "${KATEX_FONTS_DIR}" + mkdir -p "${KATEX_FONTS_DIR}" + cp -r "${TEMP_DIR}/katex/fonts"/* "${KATEX_FONTS_DIR}/" + + if [ "$changes_made" = false ]; then + echo "No changes detected in KaTeX files. Skipping commit." + return 0 + fi + + echo "KaTeX updated successfully!" + echo "Preparing to commit changes…" + git add "${KATEX_JS_PATH}" "${KATEX_CSS_PATH}" "${KATEX_FONTS_DIR}" + local commit_msg + commit_msg=$(generate_commit_message "$commit_msg_template" "$latest_version") + git commit -m "${commit_msg}" + + echo "Most recent commit:" + git log -1 +} + +main() { + local upgrade_mermaid=false + local upgrade_katex=false + # No args = default to upgrading all dependencies. + if [ $# -eq 0 ]; then + upgrade_mermaid=true + upgrade_katex=true + else + while [[ $# -gt 0 ]]; do + case $1 in + --mermaid) + upgrade_mermaid=true + shift + ;; + --katex) + upgrade_katex=true + shift + ;; + --all) + upgrade_mermaid=true + upgrade_katex=true + shift + ;; + --help) + print_usage + exit 0 + ;; + *) + echo "Unknown option: $1" + print_usage + exit 1 + ;; + esac + done + fi + + check_dependency "jq" + check_dependency "uglifyjs" + check_dependency "curl" + check_dependency "git" + check_dependency "sed" + check_dependency "awk" + check_dependency "md5sum" + check_dependency "tar" + TEMP_DIR=$(mktemp -d) + trap cleanup EXIT + + + if ! git diff --cached --quiet; then + exit_with_message "There are staged changes. Unstage them before running this script." + fi + + echo "Updating local repository…" + git fetch origin + current_branch=$(git rev-parse --abbrev-ref HEAD) + echo "Current branch: $current_branch" + # Check if the branch exists on the remote + if git ls-remote --exit-code --heads origin "$current_branch" >/dev/null 2>&1; then + # Branch exists on remote, compare with local. + local_commit=$(git rev-parse HEAD) + remote_commit=$(git rev-parse origin/"$current_branch") + if [ "$local_commit" = "$remote_commit" ]; then + echo "Branch is up to date with origin/$current_branch" + elif git merge-base --is-ancestor "$remote_commit" "$local_commit"; then + echo "Local branch is ahead of origin/$current_branch" + else + exit_with_message "Your local branch is behind origin/$current_branch. Pull the latest changes before running this script." + fi + else + echo "Branch $current_branch does not exist on remote. Assuming it's a new branch." + fi + echo "Local repository is ready." + + if [ "$upgrade_mermaid" = true ]; then + upgrade_mermaid + fi + + if [ "$upgrade_katex" = true ]; then + upgrade_katex + fi +} + +main "$@" diff --git a/static/custom_subset.css b/static/custom_subset.css index 884f59f..13ac96e 100644 --- a/static/custom_subset.css +++ b/static/custom_subset.css @@ -1 +1 @@ -@font-face{font-family:"Inter Subset";src:url(data:application/font-woff2;base64,d09GMgABAAAAABz4ABMAAAAAL2QAAByIAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGoJzG4cOHIE+P0hWQVKCCT9NVkFSgSgGYD9TVEFUgVwnNAB8L4E2CoxUinYwr1oBNgIkA1QLLAAEIAWJQAcgGw8tA+4wbByADNxWJoqSwVku+Q8DNhmy0PY+TKh6FCkS03B3WS7p12Wzm+u49uVK8A6JoyQtDpPxO1pLqNhe6iySjJXg2MMrQfmGRByeHj5PVeeHld7R4whJZn14fpt/7gvAhx8LjMSOH61O0XW5qGAGOqOHkRNz9oyFVct2XboM+eG3+X9UjCZKQhvBZLgqXZWrcO5GBvO+6L+q+MyowzW9lEgoFKYOkEfq6R4oKaGecXNTM2I8fL/G79z7dr9lN8wTiSE0U59OiFYin1DEQjONEtm/3Pp6dDfQiH5YO3ONNb0gusoHJkgu2iS9SDRecRkDBmttAIGBfwlAADilW//7vqlPb1J502hRfeeVpoYGDxAxok5CMD94Hu73npcp9IVjgbw+q8C1+nSE1///tdTuTdjlB/kFXONESbdCL/w/s7sz/0wAeBoCUgWN4ADYEjpbIevqf798Z/ekbhyJyqAe/f6oJgyDUEiU/G2YzaclfdP7S+2S0oQqzX+HurufcumXvjITi3AohLYIC0iMacmpHRMHziL/23BG5s7RHEsVmopR9joQBE3X6Q6wYkQh+P5vQjoMCMCDA7AWYAdAAiAH0AQ4ArgBeAOkAyB9jFjwVQfUowecCH4nVFOldwMGQFAtGsLkSFzb6N+c+LckI4Xp+OT/zSJpuCPzUewYEL9RYQafuNI+XcuhEyCIcIL+rW6HEBTmXyfu3dy0AilCTlPz8p6PfK8YAK3woB74/rR0AiJTKXrwSaMVGtkdn4SgjQWQgz3lSqtvLK1vMBTUH7g+6Gof+PSbuXjAvSZ2nMr9NNt/7CUEwLGhMa6VjdcQOT7vYEMEA0CDXHts0c6ORJHEY2iQ5PqXUgABKqU6AbUkZyFI06nMPOMmx4XLFGBV4sxorqXr4NS6edJTD5sBy91RjViLy30csmXbs+ua2XgQ52HAblHP0VWa59Wy/bl2azQfANR3jVfq+A/6tN/SFKivxxsAgCuaWUxrXgybLnOA0ZPsNfE5Aey0glMQvcSeo1fZe/Rqe5peA1dVNgGOXs4IAiNfQqOKgUrwYILFR+PhCPAwGxQVBBUAV941OsBowjjEQARwZIxGMw0MowACLgVbxkOewQe4piclGQQg+VOpAQb/DjBoFQCKP4OSAE82CIDkTUEbRF+yU08CgOYAeu41cv9988zD9+QBeHQFqQrmOE7EYsRcAIBGmeADMUF2TzR/TX2EP4AuJjws8ttioBUjKzJU6zJpGI4VvExl1lOHTyDGG3EScmYIwTSEXNh6wJHGGeQIgFl3y/dblNmblgPpD8jD98/v/+iLzwvu8dv0+qVdsm0vXt7zueHLl79475P3rnm77zR/bVNw+va9J/84Kd97fnKvxP0Hlu+QHzrzyZFY6mAGZDQBwTnfN7uJYSyEOij+iPprMv7v7gEaFLAUQZOMz8dxPpxCMTXICxQCIABAgOVzbveOAoDk2NdSF1ZLMo1WQPvlpcoBjMU0kY0e1XMtIab5jk0fANQCAICS7Yg6813myn64asvYhQV2eXUGQN59OuoVkrIwFzsxqKo5+fTYCesmK/jn7mhrzxAOyArJK1w8s5O9CENafXMFaJiY611cGE+t3d+II9hySD0QfYZ/hWrk6IcwFKVq1mtNwjx8y1CEAEDm8cBz0HxBkLAeq8P6PMEGwgV0PBVmsauImlVXjcQHCBvLaYsncGFTRVo2U3bSgSp1BeCyyeEUmoNMvuSFmq+E0X0XMg67g+HUXM6jjFFQyrTMhNwHIZZ+P5QJw90qSGdiDk5ejRqAuxWQwkTtFIPUD99zIRgnXPDu889kCSLXaQRYPHwc4m7ajChidiIuBBoiSEtBunipBQnYTGS7DaQ7DHBcVdEbRhIcD+4PE3+yIGQwzPAgZDgs8Cd4NCz9qc0h42GN2eDJsPWnR0Omwx732RwgJXdwGm0IyFeA+v+8FeIuRieT6EYNMkWhnG//LXLQZVBJllAGcTPaUYySqe52IsRUc0VCfz+xntxTr9XnSKLYSMM9U5ddpqqvCl/o6IQ4wtVu+k1JrCZJBqVmM2bjQ21V9UgnB3ByISOs0ai/jq8FFu9y7epvEAXC4smTVIeuuVv4uz0xi8nLU5H9QJtgk2icaN175l7X1vX7T62ShpOEqwSXT0xwJ0enQSiIaJcLSUbuCiahOjcTmcpjFdNsYVPhlt8tV0q5lrw1+3RbqTMxs8qSe3rVEmRZcqbYDlkR1F/Y8FlLXgJZRxV6VsufMjX5bheZUw7cNvq+haPNnjw5svFriBwiMlMoiDhRW7SfLAvLJMN24ezHXzzum2PqHOFW+VZOPrOfon3ymTO0jd0Vk/hTzp7N2qjJ8qqMiP9m+HK/0cbasYtyV88duSUsINdytMYCzdBfeh0t3d5zl3iPGbfOUzZCv/YPpzXK9fXuU/5IMd45dsruqPuNOZp2EydE//7/pQvjRwftCMivHS4O0ZrGpX3MX2s3bITvX38PLbFHmcFyRXDgLDfxLXVgLx6wF6WHzQgPWpV0OXEr1XhuC305ubxoWdJaWdemjYFtSauWL0lcImvZsSOoM2k5FhrkPEoNp2tPhzOPUnPGpzpuHjN5vX5wrUebZ5DMZ6bp79tTNwZ2rl0d2JG6Ye0fs82Cf/Mc6KjxkPRP2bhlgtIJGwxKXqSGkdoTcvZBes702r+SIideyR+5MIee+PvqgOrYuYsWpc4fqZq5aMfk2rxpi/1X2I4eFbzX3WhcHt4UhPmtOw78t2WJi3J2uGz01t/mx9SGJ9zTyXZOjfBfGXMlTP6+fu+2of7ExJURssCZrjp31ct3KZpuTU5asThxVlDd9i2yA4mLlyxPXik7uHZDUH3yfIwvUB0Ae/FAlIXXhR2K8HXVs0LaUo4ebFbEKDeNCw8cHg1VyIEQaFwOOViHZcOzlWNX2ZRbjgmaNhES25e0E+NehqnLfbwkTP2JcPrx3xetU24I7Fi9JrBLuXGdeV4cBcXgoW6/2PyXk/h5LNHI7048/JtUIXW1muaTVIsXiue9Objus00xzD9o46gOGBns2ue/IUpvTrWDwfzOyQs3JSwI/GvcqAm6rc7Z1ulZm+euSGubsGVDUcDCrYZjShxXLJ+3cuHOmbL/po+Yp19pn22tzNowf3XO0amwXRiS559XoXHgy5H/BATpBE20yW6VaVgri3PicZ+7O+TIYJbtYp/TQtnfdI7P6ejawawjB6vgLDM0t/xRPkbCdU1EPiEzxn/EiG3/jpON/mjX2j19ahnZPjEz+hVhlNx3lH/II7vGgfEIgdYmiXdfoKdXX4C3j3Venss1oOwgADDOSUKBxiABIvWlGbKFR6tttRib80EQwA1JtPkSTDpEkCDKk8bns6k1HzX/z966xWD9ZPnTspe/2Pa9jb/9rTs2Ocp3fHfnYWcWQCs87pIYX3r4t5SFI+YgBKcl8lpmtGk0fem3uxRb3bQdVyZEFCE4Xg6Cwr6Gq1PjaoE1KFqva75uB5lNuhN2vREpuDo4pAHnor6eOwaVTFPXLA7HGLx0TeGrD1d7jqM8u6dvOKGHFtp0MYa/xVWvGQUeXNhmBi7/Hpz6GbHflKlbfxSZ+BcFZc/mpouZ84WiKVxIYbWODmOb6Qg1cIXjjlxd6Jm1yaoLu9CklEKqW+282Msrgtlunmkv74TuWV9UHI4O4rZ2c16nR/RLDvpV2cQfMT05VhweKISM8fxpZZT4WAFhiYWvN3W31pZ8QfPTe+o35yGBzOJaouLi4zOdy/YUIrbc2traWVfa6PTh+rURUnxs/kS6bU8BCkCfhQ9AsD4B1W1XCzfHnAnt9i4dTfAgy4/AF/de/p9+iDpP6/o8a9GjP69rc4a/Hi+jBE6wvc3a5LpKk1otdWK7lmckQUkUCfRPVfXdbio6L+u3a6xWlJgiWCySFayIon+HUWfuqR4SwHXp0GJsO2zpdTto0z5rhh3o0QsNV3sGsxIRnlY/Z6VSprk6Ky71y1De7/G+Gs3ybz3C6xIbbWIpQpTFlJqREtlosK08mUstWzKsZRgCdwfbCD6ITVvJBoW5VWcctOrSj32mFajnfGRj34ycQUecKb1VZOX9mnfvf/pfRn2h14+9zWLO7vGiPg5E/b5clkiMYRS7MYZRlfx8n58ssKyqMgzMTccDSDGdSKGGZaEKyUAYjcMajAR7ZBlyie42pXCdG9wsIcCM2TOIEFcZvXUVJ0pd1p2uKOULWu1gXmWlg8OVJXll52yifLEccvBEMN6SJcwfgRQvU7TdAGkVNHlq06aKkJl5eZkRoWukuDkkJ1fdGgpNb0I13mjIqE+OkiEVNdiHEqhQ2cWQ48dlKA9WoRiNqEOG9pZlqzVy/cfXxK4ve6TfHYBIqCCiggpAAAegZs5tK88r6dfRHd6C1ReMzei+BwVUz1dE4P1ff70lYr7xKnhzVzsU3Njyjydv9G+4qur77ZPxi7fY7q2XhBxWJqWPxSmL7PqHCRiapvzxGncw+tzL4RMFJ4QfWuL7sQt1qwpLUcSRr4Z/0787QNMoyrIB4a/gFr8iSeJCJJuNEVWNBPxBTSAEtTr7rnbTP8elyzpiHgnCzAK3k3ri0mOMt9whCzqBTDzlFUWMYU1hcTT+LCmoygJZYxQJzxfKKI7XeIFGLXA1rJpLdvVWOYECO1VY/Wxf45AqlVM1Ocq+QhUjY6zIFp0xz5XxfNbvntoPLiM5ZNIwHzcnzhfZuubi9rlzTYm+7Wl4W1xLx67Yf60zwEFtBTQMbSkQc2+pdwyuLbRwaa2osk8fzVTadwra3vRNCtpKscm/CsM3KfM7WjcePbjlhluPmHeGFjpBRev8sFTDrJB7MXOsbNkvB9e3QF4LQ0xCDF1Yr5ADSTGxkcP0odgjauan3lm2znVCqhyPopQf2lvK5Uhp/97TVGXN655jGvcrIeJX0+he0hp4Wv41V+zZ1qiMfc2q4BFdYfVtxI18XZkGfr9w4dVlhmUQx58GsVUYxofX9Js4Y7m9RPChyD6BcrmxECYpAscZh59jufzNBCN+o0gxnsCgUef9EANTxCxMeGFOC161XkoUY7aJc2/2UHM9CDq9qJmYwARKGMfkqPLoEVq1okwWRRVPV4VqtXymiJBEUDHeebRazqULueRzhcJmqH9Dwquyl8sbL4Sh4wS+TEFVFQ2m8C0Eu/TVuGfq+OEmJmex1ka0V0qCrrSYzlqoNZurl9Pi60rPdLc25Nvvf+BiE/gqbDRCS6m85Fj7zubml4hBNrxbOmwsv4Y9uSqo8fCJvuCmEwbcePFpW+DhpvmlOT/yxhtL27cfePV4ZxfEUD1/R1T3H/YHerZy1ne9Eqj5qZHSsklhNsCL7QvqS9EM8ntM0JZv2Gu3TRwN3TaUeybgIqVwIHIN8VZvfMNqT9mv7WqU422nqXYOg3/mLZ47mb9sYGovoKoThugIih6VvW3LOVLtr3Yw8uor3VAe3TnRmoMtytE6GUShFC8YuX9vUCIRFcVIPBLwsYSFkqlYKCqnsvFAUukPgbAQipUk0sKPbc5lU62ly/m2b8K+Wre+7TeHUpRMYif24Th2Ygdf9yqPodayP2RzlIOtxBcO1l5EGZVhMeRw6dF6sZiEdB9HYIQitTIiybQkiWCXv3Ju1rTWFnUwdBPxMnmp6waxPZGAS4zXPYBB0NOYw921WIHlGFyV6bMwTMZ+vz1NGPG+lqsN6RaBSnHxO67TOtsYR7sQW5vDDHMu5EA/pd/IEeQKVTyiDK48BpIqzN5Hs9/Ojt6yT06/+MLjNSUzPFQ94uGV90wFzfoU8nG4s/vtF3pZcY/WFL/GtvmuKm4Qo38qV059gjziNuu6meaQlfJyErOajpAMI1TPZGfsqSwsDINsKaRU5sD6nvmT5U4opHMqqdIQkKnri16YSj09ukPaQzXd08bsh2fuZAu9TIvcZfQfF9S4FQ6ezAU6YkObrSu2XR9sHj9YqWMvSb6cL1w+czOZsVKktdztue9PlRkneGepID1X1QipCeJCJErCHI7Ut6UOAU63YM0tPPLtXI0Pjc1PpScKNDExGtvYFxwsduoJ8f3exHyXSLv9QFdohL8lIFZ+t3feofFsmCYUmqFSpHp0KHM3jjLurWpfyzac56MQrZZifSzhfJTVTgQbhWpdYaYxHJpt451QcHqoPW2PkhqV/D68qa41loKux0oBw3YNjwUxk3ZRC9Km3o72Aho0DECD1s6+xnTgdgZKdjS1HwkHeytF0HUGHBSnbwQX8HwJWob/452hkTlMPWZYUtJB2wfLu7p6cmWd72xmLV4uwdsqZ1yvRQBB+ip4VP/34b32rxmr5DtdOzle+ha7eYZXkk88ZVRTR72oKy6Gf3NmqNDZyV5hi9B/Q72tjv4/Wb+4QSedqcP0wnTuPupuDF/4Hau9pBBxTZ6clT1rNjwfCGePfCpt9ZJJx2Fi+Tjvlc8aMUMORcNhjM/UNsWcOMi2Aj9hga9y3vQOBDci+l5I9dXr2qa5XythhRVWWGG1j6c/ocnoaZkUniq7A/64zEhKCcgX9V2HFLZ4XouM7SaMhilrLjCX0CdYGyZOtsfiuHn6V18Dm7KUNMP28nUgL1JkCLh+QNz1Q0Q/mOC5zzC03KOX9OlC08AlmT4ofmNYIG+S/iwTE7lfX1lRfbyFUDM8k4UXVFB1J5oFXpxzCuuicGKbI1/NnnajjI5Qmlgugz/UKSfDuihA5PaLkslaKbrr+w29euWOnCcUBcBFVoDkFIx2UxdJFLxLh+N4tVX1hIkjwSAh3MatnqGPW91bARsWDJU5wAsF94qowgTsrh3EJQWwY9wOE8xlNfEPDbFsEUyaK2XWzLuFa+yPSPMLvwBwkvGkCS9hji50YQHd6LoWcnH8YqIlkc5jtXS8ryXeM9CZBltUmDk3b0Y4uy3h63hdsltXhjitZWhg49Wr44kcYsPuXZ1NQu3c9Lc+AUx9HfUIYygENhLPgbPe9ty4KbW4hxylJDl1MDlK1/Q/V2Z0cWfD5KJrJhvufH+Lvz44z5FtufvUdCfk0yqey0+ngs9Qpt1UG4/+e5Aai/PZorU85j+kIcde3SKW2ltvLIcwvrJpIpZssK2aKHFjBN0ErhYCqrkiujNYm4prGkWZWy0bDdtoqTDzlpbSmIhKxFhQiFcfjwtBRT2qBH1UOwedvZ2u7RS1Cwmfqq4VUZS7xS07dLnVmIW5t3RVMIo9GEPRk28zLFugx2OH7NC+PAszjAfxYIRtH7RPexTXAR8iHvHPLkj5FPcrKfEh7ooUeg8Nhdij2GeSGjWcV0llYbnLu3jMcsqbUcTlZe+hQDPtUdw4TOJxxnX7Z5PZ2cfj/e1bPtwdaQ3pMcV1YBKPC2g6ImZnvRncF2ZZeC5S11GxQvZ17YZVVWyQRhbdSCLpUTeRoqrw0cqa/MzM9Lzc+pNM4sBaI3T6oFIpD2HSqZOV6jgnIssleSaU1HSfza5LTEw5rNTOlVgZ2UbyvzGhKgPxgzhiirAcG3u1KTle+gZFc66QaLYTQSjRhGRrZko7OyCdcsFcYZPL/H5mpFw/VB/rYszGHOjXx1ESbiX31CCIWptZKpZMpqQ49ptvZRAZqfXUaQ+G8dWy6Wty8LtCG+U41pft7ByZnFyaHW+8j7UeBuzVRq21RpgxwrpuKbZVsIAF7MIiFtn0KwxOqhJSJCop+1oOU5x8JdG8rwc6UdXd0NR6UlM6t39/feiBw2C9Cgf+tjSC+jAujHzH0DWZxaqSZGF0/THS4CRdF2XTsjrT9J3m7YJwWVH3vdnDGEet8iiP/qhmj5SUGYmuKYndmMae4tFcvuo4uKrCQT1Uh6/sor3j5W2/xTJqmHMiEm0hqlZuiZRnFAYXKpRi96fI/9wnxdInUJI8zx/3HcAYvRtMehyfP9xT6LLDUOV3vdlTpQLkbXMkK3q7IIos9gopOZ0FckmGbNbah9btDU3txp9EJZs8zUeLgviiwZl4MvrDzl3JurqW9rr7nKSMcBk0LLfhDFHMYhjLXJN4f8l9MBmVFDnlhC8xg2izKAsSDR6FM+dmrPepKE2YX+T/nCp9wfDa1ht1Q5QJ1bcWwW1my34kFmMdpasJSVCokoyZ/c2YsOBKWV6MKY05WVUCdZoSxqS0bDJG0wpU6c5fzVLCrKVASoRUinVtM0iOWRvC35M3KoENbFpuah/LWoEWdCGdl076FXWRGbU8j8KPsZrfjSJ4X34fDEMsKwf/C76sGQm1ZnzMT2/tKqaDrn5fb/5t6YbSvGF6X2yIkVhZbGq40KnBN4Y9TlZuXnbvz4vIyslMH7J4zoLJxPxAhUo8OcZhoThOEskUkEZBuTGfwdfsepcM30/vdfjaELjF+/V22VtqwL8tE2cqEmJwfr2NcFG1p9a95O+G5zjg7koN+TIUbokgWIjtINb2Kec78YVBPeabc1EU5Zb24fHe7auH1JyCHtyBwP834g0Thj3QTXHQSghBRBIixIjeK66Al4pZkasjmbOHwVYjhH3QOOsrlfrIcfGnLtdyy1zQX8OI2xyB+f4tt+Cmkfz4squNRv1AfAxp7f8YzfWMieLgSH9X27lP0MrlK19INdIPcknN1nR1bctDCrn3mu+PW+FY41thH4SmOt5Plvn82eXS0uaBW0/W4tPISbjQF82hlo4PWABSHRQEvLOHc3I2Sq6xuEKKisRiuDvAD5JIyu7I4Jed+meu5y5BctuC8fEYgAQINeliBsNAGbJ0sRFvbZx8oMqKetMYmiDKiigJ/PUI7Z8zwTjX0ggZBGsDiGyENaxGXJTTuBo9ptxTVneGs5aFU972xKkSnNHE88dL1yZwePUlS/ldIpwkvmNjE93BaBsnEMkKzL5xxfARd+KVdX2BpX+evrKYfDaZaR4emd+4Gfzke/lnJwgvl7dtsSwGdP3/VDiUvrhvcGtvTOeeqmtqVEuKZc7uahqWnf9XmybEMh2WZqW0kJEWdFAUx9Bqd5STcSaSoOgYUtgHOAiwwDuJQRO1oeWrxyH7rGrbKkeSt77JMdQ0l6qb4TdnDk2IzpO8euOlPWgx77WwIIUQhpn6h+iPTe3wU7c/NWj597798N6NG/eeDg7yf0pkoSk1hJ31jxTOiiddd7WJcnY+6z7x0qUPv3iiuzMKBMBA8C39r6z1z18BLQAA3H9i8v37nmDMz5VZte02ABoFAAj81J8tOV/g93mp2E85vYmk9iXBTBi+qidQVWmWVtUjnqVtp4o3cJ3f52sbHGU47SjPKfTy3/SnzakirsKRzQdwq0fiF7AdAUicoGktb7SKbKg0YtBIpREh4wARpopEEVlJtFluixkcsX7zWjKPcWj2IRJs2AHpc8V/ZMAWI8hQNCaQETI2kzE1EsiEI9rIlBSHyYzHysXmUZMFV7wgKTk+kSU0zclKKt3Imi1nkI1ozidbeMaQnUzmkD1HHiUHUp4nR2x+Iie2IiJnnqJPLlzF5su4chQPHSjmakejUB0kaVRVagVNbAKH9rEdoF3cq2iH0iFRw8w7OpSeSu3sl2VTeOo78wQmtISURpqqlrQM9Ty0yTqag5RdMzRVcm9WoyF9kzErk0Ul+ukXy6VAviG1fdF5oGzJ6GYbhTnDHLaYiJdJ8v436B3aTtjLHqu2E+rCsY5L+w5vTDFr3Zl15r6fDOYEkjaO+cjaT8Vqqzesq91EmSTdafFznrjAlcW5a06vYVdwf+wiY+9CTs+p9zjWnF5rN2yPmbyrQXAs1zGXKGujzuZ0OtBQmSQA);} +@font-face{font-family:"Inter Subset";src:url(data:application/font-woff2;base64,d09GMgABAAAAABzEABMAAAAALzgAABxWAAQAQgAAAAAAAAAAAAAAAAAAAAAAAAAAGoJjG4gGHCo/SFZBUoIJP01WQVKBKAZgP1NUQVSBXCc0AHwvgTYKjFSKdjCvWgE2AiQDVAssAAQgBYlAByAb4ywzo8HGAQTB7wEj+T8ccFME86LTO1iwBhRNtzeaN4zFsemn0TDWYsm9p6RthgWjFSUK/mPvRjzNKtorVwg/tIZur9XWgup3iqPA/pp8tgX/3zgNCQIRRyFYAP91SrXlCElmISKc2uydJNsnxSE5zVPqAmAKmBKDSyoQugDwSOR/9sWcfkokCVRdFdAAwQU+AKR3fkKXJ75737uz758PlFJVYo1Kx4S4GEQgFqsaDc8A3ewaKF/NkbsG+ikMj2d9r3KgBoVTT4ZK2zGKoZbsfsC6W+P/dJZ/QIQrL9ABYHlB6JKKqjS1Jb8+qTqEeuEAybbYgtEMEbra9A1PSApGIS3OdTmCuyE7+58voCmFyk37i/pUf7F7AHO5ZONNFpqFZqWQSLE75pKQo1bAUepvmv//NtNWd1HqPAtUjeEfPzkkJ0WTk6IC7JOi4tGMshpY27O7Ot6xZBizZPxmaRUEqvhrTD/8zRPkHqtUbcoUTZmiDYiITsm0nOstpOWZbNfSliXXCo6DGSQrbiqElMZh/3kBBE0OeG1JCoUQ8t/kkk0QoLIIMBEwF7ASbAdXwJPgY5CGRFHY0MwxYA95CIMIU7BUF5VGgQUIyom4ZfF4Xq2/M1J/kukVlkl5hRxPQ0PrE99857+VwMUOm+rSsvzR60pXNOakUv6Pbe7nocnCfGP43EdW5edhw/i87wBL2aSU7vmwmI+eU+tJo0yin6QEBMzFvkkNkRBgMyQH+6P01Zq06v+2vJ3P3hlHvnNdqfI7y8MFft1PfdcZk/cJiW5oZLC0VdH9O3TP55kyTK6noxR9D8Ns1SrDi5NOG0iyHtSEUaYKDeY2ZZaiBJboiZQ65IlAivCmCuguE1cU5bXyDamuPoWGW7qVHLmkg5iiplBFpeIkp1lVz0CqeJ0FWf24GLURP0v52d6bU8KpS38Shk1Usm8zmqw9x6gryufW89W7vTl58r3lx+AnSD3DuvG8lL6f673zXqt8AuorEz98IKQv5jf8/E18kr43vwVGe3U8eMHM77gVHEqX7vlZ8ZbS62Eeunp8+9XFTzrdyImtW5AfMypgyA1NEChzj8gCC4bf9gWbEBoHQxgPe4aiQqQERhpqNAELbsJevASWoGm0FsbSFDSHmp2SjULAmYFms/IsADMcEotZbIZDDlVUCJyDgzSjWVACoNmGKgnow4aYSTBDA3RuIphcVnnKawz+9naedyA81Qc/yXN4p68Y/MJeBI+PupC7gYyR7bez5bl63EjcaLTNX67nffV234r7tMPNuz7zVrfui3I2t76Ofnbw+Kc1t5gTq36+y9OnF077blxcOO2/tVyw4rv3XPUxN4Jgoy7bYdPrnQMwgmpwF8UPmm7x/2nwJUtM/gZKYKTZTNNmBIfgqI1hAQJAGJva/wF4IQDSw1qkZk1mZI7WgjVzx3I2GEvzkBu644J0FTHNaPr15mp59zMdOYW+9e/hIwGQs4uPzWyway3PA3vFNPU863PIx9408WRAYAu7Hz28zbSaRev9/xGjmy3vcbo12L6MF6/RIiEMjebz9qQyNWWqFRIGmHPN2wQM+aPn90YYU+QrrbpG2nrH0MX+bJckAFJJFJKdlcUhvYqRvRZPaY5UhtaVhGXzmLpPvcDIb9Drqb5XjuJ6s2a8lDOX00EVqwLyNrmrQrtgZkjygd7zbsfOXllT9qok1rJW9E6HQuXikkbEToux310WjUU1IyCRTGdzpS1UMwziyDSmoqq/7S8b7QLtK6vMkp2EaJ7XYeMQwiCisigUvghRV1hoRBEfRdyyCBhgM6veqxERhTNV87RYEjzVZYuTEvzebgWp+L5bQzryLgOZKemX3Ray8W+Xg9yUbGO3J/Ex0KYA8HAB/jIFkDy1IOW7mwJsPHclsbUGseAiityTeCdCQh6fByLlFnUjgLDgLDLSRf2359PWGxKIaffZhS+KBE+IWcu/Vrl3+Ka7TgiObsSce5rsvS4U2c7rlG4++60zabi+omESruWe1VjyNltKbb1X/rLkHQlUwgf16nmwXrfdz43UivfiL4rcDEue7zSDaLfWxp42LX6jRZ/T0j4RcwqmIEGJuQpuccNLpqsbXI6RCVZJXbOxajVqB7HvRgbsxCHxetEYeVc/Ma86WJpLVSe739BVqLNnTHFzfULalBsxNysrMShVhdutVujdp/x2sJrZ+2baxr2yy05+r17hs881CWwZ4IaXfLGoVq7XkawqkjHfHXS0zW0rfYa4cxNzTWLAGxTFXs8TtKPu6yYJer9AdnP4XokhN0D8b8bm31Br+YIHQ0fRS4YG1rZ40dWbNZn6ZsOBPk88d+ikZee2cvOiBplzRf7syyoumvYUbaR3tPZmIT5eoHmeHh0dtpXQ2JrgNk1ezOl2/mBTnJbgFirztGxwcygMntTlmOzMNr/WSSb+zMNwv7Ksawy1HGj1LUZdRdaphcU5+ip6NDlufVnRbvVM703UpPG5yNyi9aYFvjuo8WTJ7v4T26qn5xZbT7G0bpv0V7dEV8i0fdDs+ZxE3GoAW6/skqrWO2WTvbexM6baDeLaFtQIfHGqOh7QU1UbgTcAM2SP/A/bItPTCfsxkdbvnMOF23u8zgwcSePsLJwsTnYNHZWNzegAJY5qip5m9B3tUajdqclvxtQcuaF11ZeMjaZrLmsmjbakFvsE19kMP3t68dqH4qZevW0eEzuvtSS+zM3M+/86EjlxiU/rROPspUcSm8Eb70WvLxyNTGoz2zDHZxk5ekwBuqhopWyG7xx6OOF90DW4X1lGFBcYLwaLp00mDd7EPLGyFqzcMqtrq7d/BwClXEuB/7WU67Pk+1PxXSZpnbC3JOIiAWnty9rZdnGG8fd8vibW3PRi/ezvJ6dtqWy9XTLFexc/c5p5Xjt9A/BwYck3/xDKPY8q2lpY0Q3/TVDKhWnP0vPmnJFSw/aulP+h1bbZw7cqaBuQl6183GMGQjJzvx6ZuCN6ZHVvZmuHrk0REncHrnFecfXsoYWEze5zKvu9RtbJdb5df3YmvSirPbHIpV9Duswp7zXOy66eMbyEdjwW7aw0w2PvWORJnw5OrRLibTq1dj1XFNHcctvuNTyil9OPv6NoT+Q9x6bWKA3Je86Vs4ty7E0Nhj5UAc/RXYsFY6uyoYPc2aJ9QL1z13jwN50Kn/7YYdj6TnLHOUZQo1uQR8pTHYfAdiAFEJ2F1/KPmdf0Fy1r61vUWEcCHGUJAw4+R9QSqYYBiQMLgD5zjpKzPk+RmiUE/JDs1CyNnt8g0kZqrr/QfVkh7VT8b/94r0T+SrlAeTg0oe6mfueB7x+c1T794O6HNuoeBTAGXvVJ9GZ5KEs0ik36+gicl+0dq/EaSr+Oe2WmJy/8IDRYKUWysmKkafXQ/I0FelJlHEWJohXbfpp1uXDePEs6SkIbnIisVseTdBg4ZLiubXkyQwuY+i3QrRuV5FMoXhw5nPTzTq+FpBMCJ9iTqN1JI0RZr0EkKty1MAPSdzb4+/axQHqcx0oX6UQp+b1qzVWvYKgVh0n1a5vkx1ZpF3IL7R/+ilaZvQusRk2KeRmvXj1QTNXtZQeqMsuhq6baeK3FX8Ur657qbURDg0fDP2xZ5W3o7e5oa2mssaP63nk8QuqdKimRjt9e3duYHtyFtRePFs1Vg7XI49v9scsv9InrIkbbWfR67u6d2aEFg4O3T0TEwInVnlDlqhpwANTblkbQllmtiqJMmd6DdR5hMB6e7PWrHD2GX525usP5BxW8si1PKY+G6neTlVr110MNimVYaTgjdE9mS8/wsU36QDaQZ/NIORQ6hlAcDnxO98h+QKCW5908q5RpUKhyQSeyTn8YqTyhgATx0+u6KIks8qISknLHzfrQK1fmbwxRw3kc+IBML+w4l6T4jrY5Ms4Ux8N2ktRSVIiiJp10Z5rCUc4nDUbDHn/EZavMdOf6ytkw40kSRQzWPMqk4QkVncJhg8oBDSqC+KFRIziItm3d1JOsbhtoTQK+LodWbxZMZ7Zljk4nRXvSwmy0ag5GaWELSFyGog6JDrRjJTrQruR7cdTeqEoSQhDi8qI+T9YKSaoEXcKapIjRAoOr0BxIhltOHwqDLLrzO3n8oo4Eh+4QUcaeQLv7hCGOaNjBgEXlP7OIo4zxcT3f7UcYwxd8tnF1FLJyKp3NRgh5NNVzwwqbt8FDQE7JvtnZLHvVjqt3SJGUGVg6XHRO3F1v6l2FUruZO+fRCB+bTFk0CDI+p5V365850RgyYMEs0lozvaC+gXhytKt++OmzcREsBUFMsIqgFYVWLxLDiPSezoOm0CZYaVbrb4ADHL7POuGX59H5mHTHm6DSjCpw4NBWXcvfHj0PEYrj3o3c5XvVG4skdq0ceEITvbiyKxdVfeRM07c732CV/4vKzFyJZsPegpqmq8dlnMBxFbfYVEX1In7EShAQRFFW9nh6r4X3GHhZ59l2S6JRp9ViU7HaQUFg7091/9gs8pxORU2RvPZABKV9DyWlL8MJG5UMS2TgVrShA+OtbWXv85yKlKscAU2dqVQbFMMQiiqgrMoE3Srndw9assqDAwE1TvWeymSLzIMpGv6w2qK5NK/ja8FM3HJ0OGIxDMrtugOjkWOS4Sy7frlfO5Tr1QyDW3jUN19k93uFkPu2qzf7FfwWbbVq20rHMOu/RA82TdSUu5IbzlFunSQrWzyD/b/6e7tNHfnMKROyR+ZqoWJm8/r5+x4+5j5kT4rgoI3tNwU9knb9QfHUcP7T+qlyqKaUU4lSJEJnN3kE1dkF9+wGsSo6Ir3wizw3IIJN8h7g3LBhdSq3J4/KHYgspNyKBndh8gRvRw+5zuChlWBb/e489pdzLh/8fwmBvCDQOD5tUbNW+9YjV/beuEMyDhLEC8tVSap6+3iD7G1nTxdnzRByM4vrdZd1YDiKIKTW7MHpzRmU5G5xPG4GhUFJ4JxkVcOpFN6htHsEa+L5WGI6y2nacF4DZ8/StD9hAxNd6EIKnegu8w88LiCnNbiahpjC9BhBVIo1kmMb1XI7x1uNcqFazp+qQK3To+c601J4fXThUpYFQRobPBQhKl1AE0F09aTXOKhw8G5HrkOpMlY8rjS6sa6UTBZI2ZPrhNi9oXODueLqqmefu9wG3wC1NLbMeVOKJP+hsrLP2XHQslLaIn36ffi9nxotHD1zmN69o5i2fnDiPRArHBwa8AO+lTbX7Fp+/4IYAytNbt8Fca+Aj1IXx5OO6zwQbU6VrpMVGt61U9F699HbrrD895VB1397X9/ftTlysTn3gFVPI3dnJzTEO0az515vkH+sl9Rd/Spoq7qCYbn3GhfJ4z74jK5a5SVDrETo7PSZiqJtMS9G0HRqpI8HthgvdlX0gDqq4AzYICjOsNLW3NjI73dxnNPrtJopouyBoNvu8gUjXmtZ6UmGCWNciPtD7L5e23ZZkkvHq/md2YjX5a/i9qRjkSOxHGuwFcuxTFz4ukJT3h1Hu+yKjJuhVI9OX6YgEkg0eXzouFir5SF7J0mc5AnRIHVDkOkaOBhrrR6UTqh/7BPoNPoFd233NvEjjcXrgmhwnsawV2Ct/pKTVEmGjEpuLOE4t2v708IjuWdu3Uj0e1kyvNxuuV9o8wJtMdK6Mw6SvBqyfJ2376KJ/DFfO4FvPH4CPBBQ+UBn+ePGjmf86cVHHxm/bkuWpEomWAxfXjLIqTBVqP4bZ97c9/IwaFsl18Pk9H9uDxUiuflk88aZD+3V/V4WJ7NjZjBoSMrqMQ4K1NYFKmlknM1ugczXBHnxSP3+am9GBIfsxDKopkGRbTLGIz3B/e3LpAk8G9xylvv8OpzPEtu1UR93tgUSJXNg/RywluwfU7aatPft8Uzn+myh4qEeG5Xq9XP3YGEznBWZuDHrGBLMPERM1XgO5ZRA8m0I63QRB43I01eyPgU6KK6QZhn55wP5JtRV7At11RBE1qiuutmFC7V+2s898ZinWOIIg2mJBBVmzlq5bD2vbkFgKAeB8gRJhjOvvTm8jEACw1y0vnweYRgXRCjAKTNFaDOuUjyJWoW8IFDWVBeX84wOCrqD0UTlTpIfxfZkd/sFWku25So6Bm/14l02WCbcpICNhXW10wUECGiEAKFIvQFncL6I5bdXt45Fgn5HnhVECI4HOHv4PmMqdWgD3+b5SCDXg+Ku3O1HZmh+ZXR3d7/cMPE1T+ba9UHg01AiLLRa5diAWzsNCltWu2i8I1s9665T3q1/Zf8pehxTj2GTZs1F/vg8gnvCzcXE8j3dQC1w/XDsS67scOwb3blNXtrk2SRbfw1cOOT+F8+s/OY0prrUZiLmX7eTKAbvfjvhexQe7hppXfWdQ8Nh3+tkV04EQQ4HzIQLSt06EpiXLdOjADOU+BjuTO+SGxi2anAmTy0M40EJFVRQQQUVv7Wegt/Tcd9hA+93/AwmD8klmgR8g/pJ7Uaojd6Rt6KM4HXKuPvwGnAI4LZh9stiF3DSPItKNuCumCV1uRd5H/hWFhmsSQvwJi3EtCAD4wMIBWOoPrQXI8sCN8L1Opa7PQmtval+B+6KRO49NTZ5sotxVh2IgE+BHA8/3S7Y51rDnkUAp5oTc+OR20ofvsxbWqMBJn+2vl+Shy0shV0q3UIU/SWOE7t1475RYU0TPFPiRI8WWlD6Tn+hCqZpJloRNS5WaD0Y+CFZMmdT+Wjz6rLAhi2nO3zg05Zf26StfmiSGiD6jQBoYIUGZKDoqtl/GOniboOmuSyzuqdaV+XHr+J/cQHPmA43TegBW8QQQxJxxGbZfZygtr+eZOcEUcgdzs7tr3TWgN0Blb2bnZOy3+ugrp/pfvfxGmcsKrGyscVhI8kRKRssiQU29W4WbTwHbwzXskGbBoekqamhwUXnyO27g+lVbCUVoDePohES7GlfprxeLO5OO667ePGXfzy6frsVsvvDl3tFsM9G9CRm7QW11zJF+wx6GbwBNsWmPcXJ41Meaxpy5od7uVTV2KG+hgm4oiaRu4wovKBSP0Ziu+ArqmpVtJyK0sZC4q1QHScw8HGyESZdbgemqITNzUESzm1jvXmTvKyNjw7wNjNepIG42KkVJVeVMKZSeVkwx+kZ2Es/c0svWdo9U+SroB2r0IE227dfK0lVYfbo8MqoUXcHhzCAeGib9uvYNRdQXAOEEEYY14uAFVLc0uBgCHETuGDwMBL6AcUlMOuh4WinjLfOiwQXj3LU6PUhYmh78NDi5QKKaw/MiKlhOLqTf2XKtdz13ssYbrpUE3KPFNcAzIiTEYSTe2WqF+njDoqCJy2V4HkVvPI01e0kCU8IIYI4AgjY+F7K8y385PgUk0wmMuhzp2GKwJa0ib+O1esVDL1wcLrZWiFr5J50k0kGp/bOl35DIjFHTeLSoJkANXDe4w3jmYDeAKt1js1bmakTBvJu/UvJbTVbh4Ys0dwbRrTFvtTyWrDNaCTYQLXtvF/DKc/6KnlXtIl+MQDqU2IzrP1J/4rStNOdoXB3IBD0eOHDsZngR3DRf4JepTdtPG4HlpF+rgBBNE2ZI6LY2t091N9ZsolyGDQaQpAqVWeSK2/mvTR9qyCJJFYgjbQw9BpkOKSTNbZ54ML1o7ysuLm/triPnZnYm1/dOK1ev7S0NBe5fBRsC6inmg/J8RImyjpx4NiWIdEtSZ7dMXeC0xlOEDW563n9QZWf2w+w7C3JvYfL7ejalPdcYmgfKp0YHJY3PjX3WegL+7WTdPHESXB3QL0zVXLpBo7i9pv7f16lRx20DhNnFs0ZmY9VTXIarzZ50x8NrEr6z1r9Q1ug10in+Ty6M3wOCyuY1fZEzZwdBeq/RMt9qRqw97yVMlsXA8tQzEQydE2CBExOZ4Sq5snVoVIwdYxtlvJnlc46zD1q4cUcGvWjwcOBwsLyqsJNOhotMdrleGESTLBLoZPKoaWL4412a8Dl4X1BHfyHPnZmOJ/EQwBjv5JWDyjTPhdBlIVjji24uO9EPeuVw4yCmerdUXq/QlZ2uN2UNqrCYCgO8QG3wpxBd7B6nxJzbr4k1xflrYUC70APCpGAm4Z4kBNUOqaPddrbNFQp6zhvyiKrOibKU+yJ+U45I4hIsu5r6mhQoBwxhJpCZljhO1I4bR+nvSpZ8cBx4Be8r+M4JklGusN3NG+oLfda2XXvwjwtTpXpm2LuV8PbjzI8u0ZMi1YxIu28dKmfwqnf0t8Km5vbbnhibxuFRib+lw1tBIu77g6CAjwfHosUzkJB60PQN1dWh8lTfzyZ7YF7V7sslMTmg18bZzg1cCoFbjgbk6C2fdZD8gD5C3kjdsSJggBkDMaBHa3CDJxllVTRcFNMfNqcjSUSCrvH+Q6+8qqWzrqlseZoDweJL5I706DcaVK37QmQgmuzEuzgEAAHLqbpSqgy9VpJk0WyePEo2JM2wdexWVCfStVj9eqvuicaDl/3BkGz92st6c2HHgLugPOed+xGkohHejphz73xgZuXga62ptaGWOXdD93t6nKzKXB3e2DbYiy2WA02ov+FDlzzspkgL7MRGIvb+NJfyqt6fX1oaO3tfWdnqlRH82j7v+2J6DQT4BQkuaCqTP9ivJMjQ+q6hFvk1qQUBp5s4G49VPvZAONfDP8betRPwZOsjBttIgAe5FTmwxKEsEuFJEHViBDvV2SY6Bw6lqrdxJquKrfbxE4tWdO2N05gjCgJHgCX76QkD2OOGgUGdZ7nnzo2e0727nAETcX1c4PAOYo5+66dyL7JK54p1/A8rKqjoytuc+ZpFg1k/yLmd6GWPWvwTF2a3peEHz4jbYGDgXBZS+vgzBxoTvia8lqXfZnM4nwiPSF25v0+rHB1sXrjYFf8V2RbaA5103MXka7j+ZUtMRmlsuSxlDkXrAsKXhaEwFBocHpYPBOG4oQbadkHCFBQQDguLlMVmMyDDCt3kO8jmePu+06G/P0IL5rhJyYIeXc070pxh/79hkqd0gYJQYjSL4rsk71V4NB44V7Z8vLf7vsDKQoKsuy+Ux1gQrAAN1Cw7JMCVyjTlXVL+/63vVOfX/n8l0/t7SAAASxaHDrPvZcRdfoP6zAAn56RLMS9BX+T/00MJvneBzQKAIHv+v3YYyH1x9irg+9KbNVM/KwWfpfnHFy2GrtMNrykWw6On1hgioW0D9kansvWh6de/2MamBiIvyxmmU+ouurADsxHADHLeUxVROA5WW18rKQRKxLdXQET7tSVKaJMZJqBwitbOGZT1xtTHG4f3iYC+aMsMMGTJkwRlvZMU3p0Zxb+mM1sqo+1zMHIPSxE2fEYCxNl4pUjeTODJ98wl/IjxTyyUsAyqJyqLEpY9WeZlM5wliUnK1m2qtnNchj1BMtVNi+xivKTYpWEdZRVFtV5rApPl45fldHVtaTRBUwCDs82VlN1NdQ9D+v5FFhpR2X7XqaxrkwaEaI1guacPlt1tHdXta6l3kjqWhJFhl4j4DhrC1bOVVU9N6fwXCuwTTVQ82diDcNhI8ZMoe7ePLQr7dFf/O7qpuB9Ih2r9DxoVOP8Lm0elSc6+5lGI70x+eYh9AVtZ9nLiGutljSP0y74a0yke4pLrXvJOpf9emHwHmr6rAUO5XpRrPN2gfJqn9LIGN2LxV9mlod8HS+75sVrGFquv/c06ZpHXrxLW3vg3aR3zjeaRa+QAjdhYk2dyiuN8mSxKgs/pf+HrQc=);} diff --git a/static/feed_style.xsl b/static/feed_style.xsl index 6068bd2..1e413bb 100644 --- a/static/feed_style.xsl +++ b/static/feed_style.xsl @@ -1,9 +1,12 @@ + xmlns:atom="http://www.w3.org/2005/Atom" xmlns:tabi="https://github.com/welpo/tabi"> + + + <xsl:value-of select="/atom:feed/atom:title"/> • Feed @@ -11,7 +14,8 @@ <meta charset="utf-8"/> <meta http-equiv="content-type" content="text/html; charset=utf-8"/> <meta name="viewport" content="width=device-width, initial-scale=1"/> - <link rel="stylesheet" href="{/atom:feed/@xml:base}/main.css"/> + <xsl:variable name="baseUrl" select="/atom:feed/tabi:metadata/tabi:base_url"/> + <link rel="stylesheet" href="{$baseUrl}/main.css"/> <link rel="stylesheet" href="{/atom:feed/atom:link[@rel='extra-stylesheet']/@href}" /> </head> @@ -19,42 +23,74 @@ <div class="content"> <main> <div class="info-box"> - <!-- This block replaces the text "About Feeds" with a hyperlink in the translated string --> - <xsl:choose> - <xsl:when test="contains(/atom:feed/str:translations/str:about_feeds, 'About Feeds')"> - <xsl:value-of select="substring-before(/atom:feed/str:translations/str:about_feeds, 'About Feeds')"/> - <a href="https://aboutfeeds.com/" target="_blank">About Feeds</a> - <xsl:value-of select="substring-after(/atom:feed/str:translations/str:about_feeds, 'About Feeds')"/> - </xsl:when> - <xsl:otherwise> - <xsl:value-of select="/atom:feed/str:translations/str:about_feeds"/> - </xsl:otherwise> - </xsl:choose> + <!-- This block replaces the text "About Feeds" with a hyperlink in the translated string --> + <xsl:choose> + <xsl:when test="contains(/atom:feed/tabi:metadata/tabi:about_feeds, 'About Feeds')"> + <xsl:value-of select="substring-before(/atom:feed/tabi:metadata/tabi:about_feeds, 'About Feeds')"/> + <a href="https://aboutfeeds.com/" target="_blank">About Feeds</a> + <xsl:value-of select="substring-after(/atom:feed/tabi:metadata/tabi:about_feeds, 'About Feeds')"/> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="/atom:feed/tabi:metadata/tabi:about_feeds"/> + </xsl:otherwise> + </xsl:choose> </div> <section id="banner-home-subtitle"> - <div class="padding-top home-title"> + <div class="padding-top home-title"> <xsl:value-of select="/atom:feed/atom:title"/> - </div> - <p> - <xsl:value-of select="/atom:feed/atom:subtitle"/> - </p> - <a class="readmore"> - <xsl:attribute name="href"> - <xsl:value-of select="/atom:feed/@xml:base"/> - </xsl:attribute> - <xsl:value-of select="/atom:feed/str:translations/str:visit_the_site" /> <span class="arrow">→</span></a><p></p> + </div> + <p> + <xsl:value-of select="/atom:feed/atom:subtitle"/> + </p> + <a class="readmore"> + <xsl:attribute name="href"> + <xsl:value-of select="/atom:feed/atom:link[@rel='alternate']/@href"/> + </xsl:attribute> + <xsl:value-of select="/atom:feed/tabi:metadata/tabi:visit_the_site" /> + <xsl:if test="/atom:feed/tabi:metadata/tabi:current_section != /atom:feed/atom:title"> + <xsl:text>: </xsl:text> + <xsl:value-of select="/atom:feed/tabi:metadata/tabi:current_section" /> + </xsl:if> + <span class="arrow"> →</span> + </a> + <p></p> </section> - <div class="padding-top listing-title bottom-divider"> - <h1><xsl:value-of select="/atom:feed/str:translations/str:recent_posts" /></h1> + <h1><xsl:value-of select="/atom:feed/tabi:metadata/tabi:recent_posts" /></h1> </div> + <xsl:variable name="post_listing_date" select="/atom:feed/tabi:metadata/tabi:post_listing_date"/> <div class="bloglist-container"> <xsl:for-each select="/atom:feed/atom:entry"> - <section class="bloglist-row bottom-divider"> - <ul class="bloglist-meta"> - <li class="date"><xsl:value-of select="substring(atom:published, 0, 11)"/></li> + <section class="bloglist-meta bottom-divider"> + <ul> + <xsl:variable name="show_date" select="$post_listing_date = 'date' or $post_listing_date = 'both'"/> + <xsl:variable name="show_updated" select="$post_listing_date = 'updated' or $post_listing_date = 'both'"/> + + <xsl:if test="$show_date"> + <li class="date"> + <xsl:value-of select="substring(atom:published, 0, 11)"/> + </li> + </xsl:if> + + <xsl:if test="$show_date and $show_updated"> + <li class="mobile-only"> + <xsl:value-of select="/atom:feed/tabi:metadata/tabi:separator"/> + </li> + </xsl:if> + + <xsl:if test="$show_updated"> + <li class="date"> + <xsl:variable name="update_string" select="/atom:feed/tabi:metadata/tabi:last_updated_on"/> + <xsl:variable name="update_date" select="substring(atom:updated, 0, 11)"/> + <xsl:value-of select="substring-before($update_string, '$DATE')"/> + <xsl:value-of select="$update_date"/> + <xsl:value-of select="substring-after($update_string, '$DATE')"/> + </li> + </xsl:if> </ul> - <div class="bloglist-content"> + </section> + <section class="bloglist-content bottom-divider"> + <div> <div class="bloglist-title"> <a> <xsl:attribute name="href"> diff --git a/static/fonts/Inter4.woff2 b/static/fonts/Inter4.woff2 index 1f5bfa1..2da2691 100644 Binary files a/static/fonts/Inter4.woff2 and b/static/fonts/Inter4.woff2 differ diff --git a/static/isso.css b/static/isso.css index 26d26c5..c5a7329 100644 --- a/static/isso.css +++ b/static/isso.css @@ -27,8 +27,8 @@ h4.isso-thread-heading { } .isso-feedlink { - float: right; - padding-left: 1em; + float: inline-end; + padding-inline-start: 1em; } .isso-feedlink a { @@ -52,13 +52,13 @@ h4.isso-thread-heading { .isso-comment:not(:first-of-type), .isso-follow-up .isso-comment { - margin-bottom: 0.5em; + margin-block-end: 0.5em; border-top: 1px solid var(--divider-color); } .isso-avatar { display: block; - float: left; + float: inline-start; margin: 0.95em 0.95em 0; } @@ -77,7 +77,7 @@ h4.isso-thread-heading { } .isso-follow-up { - padding-left: calc(7% + 20px); + padding-inline-start: calc(7% + 20px); } .isso-comment-footer { @@ -94,7 +94,7 @@ h4.isso-thread-heading { /* Only for comment header, spacer between up-/downvote should have no padding */ .isso-comment-header .isso-spacer { - padding: 0 6px; + padding-inline: 6px; } .isso-spacer, @@ -113,7 +113,7 @@ h4.isso-thread-heading { } .isso-note { - float: right; + float: inline-end; } .isso-author { @@ -146,7 +146,7 @@ h4.isso-thread-heading { } .isso-text p:last-child { - margin-bottom: 0.2em; + margin-block-end: 0.2em; } .isso-text h1, @@ -228,7 +228,7 @@ h4.isso-thread-heading { position: relative; bottom: 1px; vertical-align: middle; - margin-left: 0; + margin-inline-end: 0; } .isso-notification-section { @@ -257,7 +257,7 @@ h4.isso-thread-heading { } .isso-input-wrapper { - margin-right: 0.5em; + margin-inline-end: 0.5em; } .isso-input-wrapper input, @@ -289,7 +289,8 @@ h4.isso-thread-heading { border: none; border-radius: 5px; background-color: var(--primary-color); - padding: 0.6em 1em; + padding-inline: 1em; + padding-block: 0.6em; color: var(--background-color); font-size: 0.8rem; } diff --git a/static/isso.min.css b/static/isso.min.css index 7d106d1..2d7b16c 100644 --- a/static/isso.min.css +++ b/static/isso.min.css @@ -1 +1 @@ -.isso-avatar svg,.isso-preview,.isso-textarea{border:1px solid var(--divider-color);width:100%}#isso-thread *{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}#isso-thread{margin:0 auto;padding:0;width:100%;color:var(--text-color);font-size:.9em;font-family:var(--sans-serif-font)}h4.isso-thread-heading{padding-bottom:.2em;color:var(--text-color);font-size:1.2rem}.isso-feedlink,.isso-note{float:right}.isso-feedlink a{vertical-align:bottom;font-size:.8em}.isso-comment{margin:0 auto;max-width:68em}.isso-preview .isso-comment{margin:0;padding-top:0}.isso-comment:not(:first-of-type),.isso-follow-up .isso-comment{margin-bottom:.5em;border-top:1px solid var(--divider-color)}.isso-avatar{display:block;float:left;margin:.95em .95em 0}.isso-avatar svg{border-radius:3px;max-width:48px;height:100%;max-height:48px}.isso-text-wrapper{display:block;padding:.3em}.isso-follow-up{padding-left:calc(7% + 20px)}.isso-comment-header{font-size:.85em}.isso-comment-header a{text-decoration:none}.isso-comment-header .isso-spacer{padding:0 6px}.isso-note,.isso-parent,.isso-permalink,.isso-spacer{color:var(--meta-color);font-weight:400;text-shadow:none}.isso-note:hover,.isso-parent:hover,.isso-permalink:hover{color:var(--hover-color)}.isso-author{color:var(--text-color);font-weight:500}.isso-page-author-suffix{color:var(--text-color-high-contrast);font-weight:700}.isso-input-wrapper input,.isso-preview,.isso-textarea{background-color:var(--bg-2);color:var(--text-color);font-family:var(--sans-serif-font)}.isso-is-page-author>.isso-text-wrapper{background-color:var(--bg-1)}.isso-preview,.isso-textarea{padding:10px;font-size:.8em}.isso-comment-footer,.isso-comment-footer .isso-votes{color:var(--meta-color)}.isso-text p{margin-top:-.4em}.isso-text p:last-child{margin-bottom:.2em}.isso-text h1,.isso-text h2,.isso-text h3,.isso-text h4,.isso-text h5,.isso-text h6{font-weight:700;font-size:130%}.isso-comment-footer{clear:left;font-size:.8em}.isso-comment-footer a,.isso-feedlink{margin:.4em;padding:.1em;font-weight:700;text-decoration:none}.isso-downvote svg,.isso-upvote svg{position:relative;top:.2em}.isso-downvote:hover svg,.isso-upvote:hover svg{fill:var(--hover-color)}.isso-comment .isso-postbox{margin-top:.8em}.isso-comment.isso-no-votes>*>.isso-comment-footer .isso-votes,.isso-post-action input[name=edit],.isso-postbox.isso-preview-mode>.isso-form-wrapper .isso-textarea,.isso-postbox.isso-preview-mode>.isso-form-wrapper input[name=preview],.isso-preview{display:none}.isso-postbox{clear:right;margin:0 auto 2em}.isso-form-wrapper{display:flex;flex-direction:column}.isso-preview,.isso-textarea{margin-top:.2em;border-radius:5px}.isso-textarea{outline:0;width:100%;resize:none}.isso-form-wrapper input[type=checkbox]{position:relative;bottom:1px;vertical-align:middle;margin-left:0}.isso-notification-section{display:none;padding-top:.3em;padding-bottom:10px;font-size:.9em}.isso-auth-section{display:flex;flex-direction:row}.isso-input-wrapper,.isso-post-action{display:flex;flex-direction:column;justify-content:flex-end;align-items:center;margin:0 auto;max-width:35%;font-size:.8em;font-family:var(--sans-serif-font);text-align:center}.isso-input-wrapper{margin-right:.5em}.isso-input-wrapper input,.isso-post-action input{margin-top:auto}.isso-input-wrapper label{display:inline-block;margin-top:auto;height:auto;line-height:1.4em}.isso-input-wrapper input{border:1px solid var(--divider-color);border-radius:5px;padding:.3em;width:100%;line-height:1.2em}.isso-post-action input{cursor:pointer;margin:.1em;border:none;border-radius:5px;background-color:var(--primary-color);padding:.6em 1em;color:var(--background-color);font-size:.8rem}.isso-post-action{display:block;align-self:flex-end;margin:0 auto}.isso-post-action>input:hover{opacity:.8}.isso-postbox.isso-preview-mode>.isso-form-wrapper .isso-preview{display:block}.isso-postbox.isso-preview-mode>.isso-form-wrapper input[name=edit]{display:inline}.isso-preview{background:repeating-linear-gradient(-45deg,var(--bg-0),var(--bg-0) 10px,var(--bg-2) 10px,var(--bg-2) 20px);background-color:var(--bg-0)}.isso-target{animation:5s ease-out isso-target-fade}@keyframes isso-target-fade{0%{background-color:var(--divider-color)}}@media screen and (max-width:600px){.isso-auth-section{flex-direction:column;text-align:center}.isso-input-wrapper{display:block;margin:0 0 .4em;max-width:100%}.isso-input-wrapper input{width:100%}.isso-post-action{margin:.4em auto;width:60%}} +.isso-avatar svg,.isso-preview,.isso-textarea{border:1px solid var(--divider-color);width:100%}#isso-thread *{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}#isso-thread{margin:0 auto;padding:0;width:100%;color:var(--text-color);font-size:.9em;font-family:var(--sans-serif-font)}h4.isso-thread-heading{padding-bottom:.2em;color:var(--text-color);font-size:1.2rem}.isso-feedlink,.isso-note{float:right}.isso-feedlink a{vertical-align:bottom;font-size:.8em}.isso-comment{margin:0 auto;max-width:68em}.isso-preview .isso-comment{margin:0;padding-top:0}.isso-comment:not(:first-of-type),.isso-follow-up .isso-comment{margin-bottom:.5em;border-top:1px solid var(--divider-color)}.isso-avatar{display:block;float:left;margin:.95em .95em 0}.isso-avatar svg{border-radius:3px;max-width:48px;height:100%;max-height:48px}.isso-text-wrapper{display:block;padding:.3em}.isso-follow-up{padding-inline-start:calc(7% + 20px)}.isso-comment-header{font-size:.85em}.isso-comment-header a{text-decoration:none}.isso-comment-header .isso-spacer{padding:0 6px}.isso-note,.isso-parent,.isso-permalink,.isso-spacer{color:var(--meta-color);font-weight:400;text-shadow:none}.isso-note:hover,.isso-parent:hover,.isso-permalink:hover{color:var(--hover-color)}.isso-author{color:var(--text-color);font-weight:500}.isso-page-author-suffix{color:var(--text-color-high-contrast);font-weight:700}.isso-input-wrapper input,.isso-preview,.isso-textarea{background-color:var(--bg-2);color:var(--text-color);font-family:var(--sans-serif-font)}.isso-is-page-author>.isso-text-wrapper{background-color:var(--bg-1)}.isso-preview,.isso-textarea{padding:10px;font-size:.8em}.isso-comment-footer,.isso-comment-footer .isso-votes{color:var(--meta-color)}.isso-text p{margin-top:-.4em}.isso-text p:last-child{margin-bottom:.2em}.isso-text h1,.isso-text h2,.isso-text h3,.isso-text h4,.isso-text h5,.isso-text h6{font-weight:700;font-size:130%}.isso-comment-footer{clear:left;font-size:.8em}.isso-comment-footer a,.isso-feedlink{margin:.4em;padding:.1em;font-weight:700;text-decoration:none}.isso-downvote svg,.isso-upvote svg{position:relative;top:.2em}.isso-downvote:hover svg,.isso-upvote:hover svg{fill:var(--hover-color)}.isso-comment .isso-postbox{margin-top:.8em}.isso-comment.isso-no-votes>*>.isso-comment-footer .isso-votes,.isso-post-action input[name=edit],.isso-postbox.isso-preview-mode>.isso-form-wrapper .isso-textarea,.isso-postbox.isso-preview-mode>.isso-form-wrapper input[name=preview],.isso-preview{display:none}.isso-postbox{clear:right;margin:0 auto 2em}.isso-form-wrapper{display:flex;flex-direction:column}.isso-preview,.isso-textarea{margin-top:.2em;border-radius:5px}.isso-textarea{outline:0;width:100%;resize:none}.isso-form-wrapper input[type=checkbox]{position:relative;bottom:1px;vertical-align:middle;margin-inline-end:0}.isso-notification-section{display:none;padding-top:.3em;padding-bottom:10px;font-size:.9em}.isso-auth-section{display:flex;flex-direction:row}.isso-input-wrapper,.isso-post-action{display:flex;flex-direction:column;justify-content:flex-end;align-items:center;margin:0 auto;max-width:35%;font-size:.8em;font-family:var(--sans-serif-font);text-align:center}.isso-input-wrapper{margin-inline-end:.5em}.isso-input-wrapper input,.isso-post-action input{margin-top:auto}.isso-input-wrapper label{display:inline-block;margin-top:auto;height:auto;line-height:1.4em}.isso-input-wrapper input{border:1px solid var(--divider-color);border-radius:5px;padding:.3em;width:100%;line-height:1.2em}.isso-post-action input{cursor:pointer;margin:.1em;border:none;border-radius:5px;background-color:var(--primary-color);padding:.6em 1em;color:var(--background-color);font-size:.8rem}.isso-post-action{display:block;align-self:flex-end;margin:0 auto}.isso-post-action>input:hover{opacity:.8}.isso-postbox.isso-preview-mode>.isso-form-wrapper .isso-preview{display:block}.isso-postbox.isso-preview-mode>.isso-form-wrapper input[name=edit]{display:inline}.isso-preview{background:repeating-linear-gradient(-45deg,var(--bg-0),var(--bg-0) 10px,var(--bg-2) 10px,var(--bg-2) 20px);background-color:var(--bg-0)}.isso-target{animation:5s ease-out isso-target-fade}@keyframes isso-target-fade{0%{background-color:var(--divider-color)}}@media screen and (max-width:600px){.isso-auth-section{flex-direction:column;text-align:center}.isso-input-wrapper{display:block;margin:0 0 .4em;max-width:100%}.isso-input-wrapper input{width:100%}.isso-post-action{margin:.4em auto;width:60%}} diff --git a/static/js/addSrcToCodeBlock.js b/static/js/addSrcToCodeBlock.js deleted file mode 100644 index 9b4cb9e..0000000 --- a/static/js/addSrcToCodeBlock.js +++ /dev/null @@ -1,20 +0,0 @@ -document.addEventListener("DOMContentLoaded", function() { - document.querySelectorAll('.code-source').forEach(function(marker) { - let sourceUrl = marker.getAttribute('data-source'); - let nextPre = marker.nextElementSibling; - - if (nextPre && nextPre.tagName === 'PRE') { - let codeElement = nextPre.querySelector('code'); - if (codeElement) { - // Use a span element for the source path if it's not a link. - let sourceElement = document.createElement(sourceUrl.startsWith('http') ? 'a' : 'span'); - sourceElement.textContent = sourceUrl; - sourceElement.className = 'source-path'; - if (sourceUrl.startsWith('http')) { - sourceElement.href = sourceUrl; - } - codeElement.prepend(sourceElement); - } - } - }); -}); diff --git a/static/js/addSrcToCodeBlock.min.js b/static/js/addSrcToCodeBlock.min.js deleted file mode 100644 index ddd04ae..0000000 --- a/static/js/addSrcToCodeBlock.min.js +++ /dev/null @@ -1 +0,0 @@ -document.addEventListener("DOMContentLoaded",function(){document.querySelectorAll(".code-source").forEach(function(t){var e,n=t.getAttribute("data-source"),t=t.nextElementSibling;t&&"PRE"===t.tagName&&(t=t.querySelector("code"))&&((e=document.createElement(n.startsWith("http")?"a":"span")).textContent=n,e.className="source-path",n.startsWith("http")&&(e.href=n),t.prepend(e))})}); diff --git a/static/js/codeBlockNameLinks.js b/static/js/codeBlockNameLinks.js new file mode 100644 index 0000000..ea0b678 --- /dev/null +++ b/static/js/codeBlockNameLinks.js @@ -0,0 +1,36 @@ +document.addEventListener("DOMContentLoaded", function() { + // Convert URLs in data-name to links. + document.querySelectorAll('code[data-name]').forEach(function(code) { + const name = code.getAttribute('data-name'); + if (name.startsWith('http')) { + const link = document.createElement('a'); + link.href = name; + link.className = 'source-path'; + link.textContent = name; + code.insertBefore(link, code.firstChild); + // Remove data-name to avoid overlap with Zola's native display. + code.removeAttribute('data-name'); + code.parentElement?.removeAttribute('data-name'); + } + }); + + // Legacy support for old shortcode. https://github.com/welpo/tabi/pull/489 + document.querySelectorAll('.code-source').forEach(function(marker) { + const sourceUrl = marker.getAttribute('data-source'); + const nextPre = marker.nextElementSibling; + if (nextPre?.tagName === 'PRE') { + const code = nextPre.querySelector('code'); + if (code) { + if (sourceUrl.startsWith('http')) { + const link = document.createElement('a'); + link.href = sourceUrl; + link.className = 'source-path'; + link.textContent = sourceUrl; + code.insertBefore(link, code.firstChild); + } else { + code.setAttribute('data-name', sourceUrl); + } + } + } + }); +}); diff --git a/static/js/codeBlockNameLinks.min.js b/static/js/codeBlockNameLinks.min.js new file mode 100644 index 0000000..df1f999 --- /dev/null +++ b/static/js/codeBlockNameLinks.min.js @@ -0,0 +1 @@ +document.addEventListener("DOMContentLoaded",function(){document.querySelectorAll("code[data-name]").forEach(function(e){var t,a=e.getAttribute("data-name");a.startsWith("http")&&((t=document.createElement("a")).href=a,t.className="source-path",t.textContent=a,e.insertBefore(t,e.firstChild),e.removeAttribute("data-name"),e.parentElement?.removeAttribute("data-name"))}),document.querySelectorAll(".code-source").forEach(function(e){var t,a=e.getAttribute("data-source");"PRE"===(e=e.nextElementSibling)?.tagName&&(e=e.querySelector("code"))&&(a.startsWith("http")?((t=document.createElement("a")).href=a,t.className="source-path",t.textContent=a,e.insertBefore(t,e.firstChild)):e.setAttribute("data-name",a))})}); diff --git a/static/js/copyCodeToClipboard.js b/static/js/copyCodeToClipboard.js index e22debe..805eb59 100644 --- a/static/js/copyCodeToClipboard.js +++ b/static/js/copyCodeToClipboard.js @@ -36,7 +36,7 @@ const getTableCode = (block) => { .join(''); }; -document.querySelectorAll('pre').forEach((block) => { +document.querySelectorAll('pre:not(.mermaid)').forEach((block) => { const copyDiv = document.createElement('div'); copyDiv.setAttribute('role', 'button'); copyDiv.setAttribute('aria-label', initCopyText); diff --git a/static/js/copyCodeToClipboard.min.js b/static/js/copyCodeToClipboard.min.js index f27628a..240d4ff 100644 --- a/static/js/copyCodeToClipboard.min.js +++ b/static/js/copyCodeToClipboard.min.js @@ -1 +1 @@ -const copiedText=document.getElementById("copy-success").textContent,initCopyText=document.getElementById("copy-init").textContent,changeIcon=(e,t)=>{e.classList.add(t),e.setAttribute("aria-label",copiedText),setTimeout(()=>{e.classList.remove(t),e.setAttribute("aria-label",initCopyText)},2500)},addCopyEventListenerToDiv=(e,t)=>{e.addEventListener("click",()=>copyCodeAndChangeIcon(e,t))},copyCodeAndChangeIcon=async(t,e)=>{e=(e.querySelector("table")?getTableCode:getNonTableCode)(e);try{await navigator.clipboard.writeText(e),changeIcon(t,"checked")}catch(e){changeIcon(t,"error")}},getNonTableCode=e=>[...e.querySelectorAll("code")].map(e=>e.textContent).join(""),getTableCode=e=>[...e.querySelectorAll("tr")].map(e=>e.querySelector("td:last-child")?.innerText??"").join("");document.querySelectorAll("pre").forEach(e=>{var t=document.createElement("div");t.setAttribute("role","button"),t.setAttribute("aria-label",initCopyText),t.setAttribute("title",initCopyText),t.className="copy-code",e.prepend(t),addCopyEventListenerToDiv(t,e)}); +const copiedText=document.getElementById("copy-success").textContent,initCopyText=document.getElementById("copy-init").textContent,changeIcon=(e,t)=>{e.classList.add(t),e.setAttribute("aria-label",copiedText),setTimeout(()=>{e.classList.remove(t),e.setAttribute("aria-label",initCopyText)},2500)},addCopyEventListenerToDiv=(e,t)=>{e.addEventListener("click",()=>copyCodeAndChangeIcon(e,t))},copyCodeAndChangeIcon=async(t,e)=>{e=(e.querySelector("table")?getTableCode:getNonTableCode)(e);try{await navigator.clipboard.writeText(e),changeIcon(t,"checked")}catch(e){changeIcon(t,"error")}},getNonTableCode=e=>[...e.querySelectorAll("code")].map(e=>e.textContent).join(""),getTableCode=e=>[...e.querySelectorAll("tr")].map(e=>e.querySelector("td:last-child")?.innerText??"").join("");document.querySelectorAll("pre:not(.mermaid)").forEach(e=>{var t=document.createElement("div");t.setAttribute("role","button"),t.setAttribute("aria-label",initCopyText),t.setAttribute("title",initCopyText),t.className="copy-code",e.prepend(t),addCopyEventListenerToDiv(t,e)}); diff --git a/static/js/filterCards.js b/static/js/filterCards.js new file mode 100644 index 0000000..a24137f --- /dev/null +++ b/static/js/filterCards.js @@ -0,0 +1,99 @@ +document.addEventListener('DOMContentLoaded', () => { + const cards = document.querySelectorAll('.card'); + const filterLinks = document.querySelectorAll('.filter-controls a'); + const allProjectsFilter = document.querySelector('#all-projects-filter'); + if (!cards.length || !filterLinks.length) return; + allProjectsFilter.style.display = 'block'; + + // Create a Map for O(1) lookups of links by filter value. + const linkMap = new Map( + Array.from(filterLinks).map(link => [link.dataset.filter, link]) + ); + + // Pre-process cards data for faster filtering. + const cardData = Array.from(cards).map(card => ({ + element: card, + tags: card.dataset.tags?.toLowerCase().split(',').filter(Boolean) ?? [] + })); + + function getTagSlugFromUrl(url) { + return url.split('/').filter(Boolean).pop(); + } + + function getFilterFromHash() { + if (!window.location.hash) return 'all'; + const hash = decodeURIComponent(window.location.hash.slice(1)); + const matchingLink = Array.from(filterLinks).find(link => + getTagSlugFromUrl(link.getAttribute('href')) === hash + ); + return matchingLink?.dataset.filter ?? 'all'; + } + + function setActiveFilter(filterValue, updateHash = true) { + if (updateHash) { + if (filterValue === 'all') { + history.pushState(null, '', window.location.pathname); + } else { + const activeLink = linkMap.get(filterValue); + if (activeLink) { + const tagSlug = getTagSlugFromUrl(activeLink.getAttribute('href')); + history.pushState(null, '', `#${tagSlug}`); + } + } + } + const isAll = filterValue === 'all'; + const display = isAll ? '' : 'none'; + const ariaHidden = isAll ? 'false' : 'true'; + requestAnimationFrame(() => { + filterLinks.forEach(link => { + const isActive = link.dataset.filter === filterValue; + link.classList.toggle('active', isActive); + link.setAttribute('aria-pressed', isActive); + }); + if (isAll) { + cardData.forEach(({ element }) => { + element.style.display = display; + element.setAttribute('aria-hidden', ariaHidden); + }); + } else { + cardData.forEach(({ element, tags }) => { + const shouldShow = tags.includes(filterValue); + element.style.display = shouldShow ? '' : 'none'; + element.setAttribute('aria-hidden', !shouldShow); + }); + } + }); + } + + const filterContainer = filterLinks[0].parentElement.parentElement; + filterContainer.addEventListener('click', e => { + const link = e.target.closest('a'); + if (!link) return; + e.preventDefault(); + const filterValue = link.dataset.filter; + if (filterValue) setActiveFilter(filterValue); + }); + + filterContainer.addEventListener('keydown', e => { + const link = e.target.closest('a'); + if (!link) return; + if (e.key === ' ' || e.key === 'Enter') { + e.preventDefault(); + link.click(); + } + }); + + filterLinks.forEach(link => { + link.setAttribute('role', 'button'); + link.setAttribute('aria-pressed', link.classList.contains('active')); + }); + + window.addEventListener('popstate', () => { + setActiveFilter(getFilterFromHash(), false); + }); + + const initialFilter = getFilterFromHash(); + if (initialFilter !== 'all') { + setActiveFilter(initialFilter, false); + } +}); diff --git a/static/js/filterCards.min.js b/static/js/filterCards.min.js new file mode 100644 index 0000000..b150e70 --- /dev/null +++ b/static/js/filterCards.min.js @@ -0,0 +1 @@ +document.addEventListener("DOMContentLoaded",()=>{var t=document.querySelectorAll(".card");const l=document.querySelectorAll(".filter-controls a");var e=document.querySelector("#all-projects-filter");if(t.length&&l.length){e.style.display="block";const s=new Map(Array.from(l).map(t=>[t.dataset.filter,t])),i=Array.from(t).map(t=>({element:t,tags:t.dataset.tags?.toLowerCase().split(",").filter(Boolean)??[]}));function o(t){return t.split("/").filter(Boolean).pop()}function a(){if(!window.location.hash)return"all";const e=decodeURIComponent(window.location.hash.slice(1));return Array.from(l).find(t=>o(t.getAttribute("href"))===e)?.dataset.filter??"all"}function r(a,t=!0){t&&("all"===a?history.pushState(null,"",window.location.pathname):(t=s.get(a))&&(t=o(t.getAttribute("href")),history.pushState(null,"","#"+t)));const e="all"===a,r=e?"":"none",n=e?"false":"true";requestAnimationFrame(()=>{l.forEach(t=>{var e=t.dataset.filter===a;t.classList.toggle("active",e),t.setAttribute("aria-pressed",e)}),e?i.forEach(({element:t})=>{t.style.display=r,t.setAttribute("aria-hidden",n)}):i.forEach(({element:t,tags:e})=>{e=e.includes(a),t.style.display=e?"":"none",t.setAttribute("aria-hidden",!e)})})}(e=l[0].parentElement.parentElement).addEventListener("click",t=>{var e=t.target.closest("a");e&&(t.preventDefault(),t=e.dataset.filter)&&r(t)}),e.addEventListener("keydown",t=>{var e=t.target.closest("a");!e||" "!==t.key&&"Enter"!==t.key||(t.preventDefault(),e.click())}),l.forEach(t=>{t.setAttribute("role","button"),t.setAttribute("aria-pressed",t.classList.contains("active"))}),window.addEventListener("popstate",()=>{r(a(),!1)}),"all"!==(t=a())&&r(t,!1)}}); diff --git a/static/js/katex.min.js b/static/js/katex.min.js index 839742f..dc9d5ed 100644 --- a/static/js/katex.min.js +++ b/static/js/katex.min.js @@ -1 +1 @@ -!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.katex=t():e.katex=t()}("undefined"!=typeof self?self:this,function(){"use strict";var E={d:function(e,t){for(var r in t)E.o(t,r)&&!E.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},o:function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}},t={};E.d(t,{default:function(){return zr}});class L{constructor(e,t){this.name=void 0,this.position=void 0,this.length=void 0,this.rawMessage=void 0;let r,n,a="KaTeX parse error: "+e;if((o=t&&t.loc)&&o.start<=o.end){const e=o.lexer.input,t=(r=o.start,n=o.end,r===e.length?a+=" at end of input: ":a+=" at position "+(r+1)+": ",e.slice(r,n).replace(/[^]/g,"$&̲"));var o=15<r?"…"+e.slice(r-15,r):e.slice(0,r),i=n+15<e.length?e.slice(n,n+15)+"…":e.slice(n);a+=o+t+i}return(t=new Error(a)).name="ParseError",t.__proto__=L.prototype,null!=(t.position=r)&&null!=n&&(t.length=n-r),t.rawMessage=e,t}}L.prototype.__proto__=Error.prototype;var z=L;function D(e){return"ordgroup"===e.type||"color"===e.type?1===e.body.length?D(e.body[0]):e:"font"===e.type?D(e.body):e}const P=/([A-Z])/g,V={"&":"&",">":">","<":"<",'"':""","'":"'"},F=/[&><"']/g;var A={contains:function(e,t){return-1!==e.indexOf(t)},deflt:function(e,t){return void 0===e?t:e},escape:function(e){return String(e).replace(F,e=>V[e])},hyphenate:function(e){return e.replace(P,"-$1").toLowerCase()},getBaseElem:D,isCharacterBox:function(e){return"mathord"===(e=D(e)).type||"textord"===e.type||"atom"===e.type},protocolFromUrl:function(e){return(e=/^[\x00-\x20]*([^\\/#?]*?)(:|�*58|�*3a|&colon)/i.exec(e))?":"===e[2]&&/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(e[1])?e[1].toLowerCase():null:"_relative"}};const G={displayMode:{type:"boolean",description:"Render math in display mode, which puts the math in display style (so \\int and \\sum are large, for example), and centers the math on the page on its own line.",cli:"-d, --display-mode"},output:{type:{enum:["htmlAndMathml","html","mathml"]},description:"Determines the markup language of the output.",cli:"-F, --format <type>"},leqno:{type:"boolean",description:"Render display math in leqno style (left-justified tags)."},fleqn:{type:"boolean",description:"Render display math flush left."},throwOnError:{type:"boolean",default:!0,cli:"-t, --no-throw-on-error",cliDescription:"Render errors (in the color given by --error-color) instead of throwing a ParseError exception when encountering an error."},errorColor:{type:"string",default:"#cc0000",cli:"-c, --error-color <color>",cliDescription:"A color string given in the format 'rgb' or 'rrggbb' (no #). This option determines the color of errors rendered by the -t option.",cliProcessor:e=>"#"+e},macros:{type:"object",cli:"-m, --macro <def>",cliDescription:"Define custom macro of the form '\\foo:expansion' (use multiple -m arguments for multiple macros).",cliDefault:[],cliProcessor:(e,t)=>(t.push(e),t)},minRuleThickness:{type:"number",description:"Specifies a minimum thickness, in ems, for fraction lines, `\\sqrt` top lines, `{array}` vertical lines, `\\hline`, `\\hdashline`, `\\underline`, `\\overline`, and the borders of `\\fbox`, `\\boxed`, and `\\fcolorbox`.",processor:e=>Math.max(0,e),cli:"--min-rule-thickness <size>",cliProcessor:parseFloat},colorIsTextColor:{type:"boolean",description:"Makes \\color behave like LaTeX's 2-argument \\textcolor, instead of LaTeX's one-argument \\color mode change.",cli:"-b, --color-is-text-color"},strict:{type:[{enum:["warn","ignore","error"]},"boolean","function"],description:"Turn on strict / LaTeX faithfulness mode, which throws an error if the input uses features that are not supported by LaTeX.",cli:"-S, --strict",cliDefault:!1},trust:{type:["boolean","function"],description:"Trust the input, enabling all HTML features such as \\url.",cli:"-T, --trust"},maxSize:{type:"number",default:1/0,description:"If non-zero, all user-specified sizes, e.g. in \\rule{500em}{500em}, will be capped to maxSize ems. Otherwise, elements and spaces can be arbitrarily large",processor:e=>Math.max(0,e),cli:"-s, --max-size <n>",cliProcessor:parseInt},maxExpand:{type:"number",default:1e3,description:"Limit the number of macro expansions to the specified number, to prevent e.g. infinite macro loops. If set to Infinity, the macro expander will try to fully expand as in LaTeX.",processor:e=>Math.max(0,e),cli:"-e, --max-expand <n>",cliProcessor:e=>"Infinity"===e?1/0:parseInt(e)},globalGroup:{type:"boolean",cli:!1}};class U{constructor(e){this.displayMode=void 0,this.output=void 0,this.leqno=void 0,this.fleqn=void 0,this.throwOnError=void 0,this.errorColor=void 0,this.macros=void 0,this.minRuleThickness=void 0,this.colorIsTextColor=void 0,this.strict=void 0,this.trust=void 0,this.maxSize=void 0,this.maxExpand=void 0,this.globalGroup=void 0,e=e||{};for(const r in G){var t;G.hasOwnProperty(r)&&(t=G[r],this[r]=void 0!==e[r]?t.processor?t.processor(e[r]):e[r]:function(e){if(e.default)return e.default;if(e=e.type,"string"!=typeof(e=Array.isArray(e)?e[0]:e))return e.enum[0];switch(e){case"boolean":return!1;case"string":return"";case"number":return 0;case"object":return{}}}(t))}}reportNonstrict(e,t,r){let n=this.strict;if((n="function"==typeof n?n(e,t,r):n)&&"ignore"!==n){if(!0===n||"error"===n)throw new z("LaTeX-incompatible input and strict mode is set to 'error': "+t+" ["+e+"]",r);"warn"===n?"undefined"!=typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+t+" ["+e+"]"):"undefined"!=typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to unrecognized '"+n+"': "+t+" ["+e+"]")}}useStrictBehavior(e,t,r){let n=this.strict;if("function"==typeof n)try{n=n(e,t,r)}catch(e){n="error"}return!(!n||"ignore"===n||!0!==n&&"error"!==n&&("warn"===n?"undefined"!=typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+t+" ["+e+"]"):"undefined"!=typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to unrecognized '"+n+"': "+t+" ["+e+"]"),1))}isTrusted(e){if(e.url&&!e.protocol){const t=A.protocolFromUrl(e.url);if(null==t)return!1;e.protocol=t}const t="function"==typeof this.trust?this.trust(e):this.trust;return Boolean(t)}}class Y{constructor(e,t,r){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=e,this.size=t,this.cramped=r}sup(){return X[W[this.id]]}sub(){return X[j[this.id]]}fracNum(){return X[_[this.id]]}fracDen(){return X[$[this.id]]}cramp(){return X[Z[this.id]]}text(){return X[K[this.id]]}isTight(){return 2<=this.size}}const X=[new Y(0,0,!1),new Y(1,0,!0),new Y(2,1,!1),new Y(3,1,!0),new Y(4,2,!1),new Y(5,2,!0),new Y(6,3,!1),new Y(7,3,!0)],W=[4,5,4,5,6,7,6,7],j=[5,5,5,5,7,7,7,7],_=[2,3,4,5,6,7,6,7],$=[3,3,5,5,7,7,7,7],Z=[1,1,3,3,5,5,7,7],K=[0,1,2,3,2,3,2,3];var T={DISPLAY:X[0],TEXT:X[2],SCRIPT:X[4],SCRIPTSCRIPT:X[6]};const J=[{name:"latin",blocks:[[256,591],[768,879]]},{name:"cyrillic",blocks:[[1024,1279]]},{name:"armenian",blocks:[[1328,1423]]},{name:"brahmic",blocks:[[2304,4255]]},{name:"georgian",blocks:[[4256,4351]]},{name:"cjk",blocks:[[12288,12543],[19968,40879],[65280,65376]]},{name:"hangul",blocks:[[44032,55215]]}],Q=[];function ee(t){for(let e=0;e<Q.length;e+=2)if(t>=Q[e]&&t<=Q[e+1])return 1}J.forEach(e=>e.blocks.forEach(e=>Q.push(...e)));const te=80,re={doubleleftarrow:"M262 157\nl10-10c34-36 62.7-77 86-123 3.3-8 5-13.3 5-16 0-5.3-6.7-8-20-8-7.3\n 0-12.2.5-14.5 1.5-2.3 1-4.8 4.5-7.5 10.5-49.3 97.3-121.7 169.3-217 216-28\n 14-57.3 25-88 33-6.7 2-11 3.8-13 5.5-2 1.7-3 4.2-3 7.5s1 5.8 3 7.5\nc2 1.7 6.3 3.5 13 5.5 68 17.3 128.2 47.8 180.5 91.5 52.3 43.7 93.8 96.2 124.5\n 157.5 9.3 8 15.3 12.3 18 13h6c12-.7 18-4 18-10 0-2-1.7-7-5-15-23.3-46-52-87\n-86-123l-10-10h399738v-40H218c328 0 0 0 0 0l-10-8c-26.7-20-65.7-43-117-69 2.7\n-2 6-3.7 10-5 36.7-16 72.3-37.3 107-64l10-8h399782v-40z\nm8 0v40h399730v-40zm0 194v40h399730v-40z",doublerightarrow:"M399738 392l\n-10 10c-34 36-62.7 77-86 123-3.3 8-5 13.3-5 16 0 5.3 6.7 8 20 8 7.3 0 12.2-.5\n 14.5-1.5 2.3-1 4.8-4.5 7.5-10.5 49.3-97.3 121.7-169.3 217-216 28-14 57.3-25 88\n-33 6.7-2 11-3.8 13-5.5 2-1.7 3-4.2 3-7.5s-1-5.8-3-7.5c-2-1.7-6.3-3.5-13-5.5-68\n-17.3-128.2-47.8-180.5-91.5-52.3-43.7-93.8-96.2-124.5-157.5-9.3-8-15.3-12.3-18\n-13h-6c-12 .7-18 4-18 10 0 2 1.7 7 5 15 23.3 46 52 87 86 123l10 10H0v40h399782\nc-328 0 0 0 0 0l10 8c26.7 20 65.7 43 117 69-2.7 2-6 3.7-10 5-36.7 16-72.3 37.3\n-107 64l-10 8H0v40zM0 157v40h399730v-40zm0 194v40h399730v-40z",leftarrow:"M400000 241H110l3-3c68.7-52.7 113.7-120\n 135-202 4-14.7 6-23 6-25 0-7.3-7-11-21-11-8 0-13.2.8-15.5 2.5-2.3 1.7-4.2 5.8\n-5.5 12.5-1.3 4.7-2.7 10.3-4 17-12 48.7-34.8 92-68.5 130S65.3 228.3 18 247\nc-10 4-16 7.7-18 11 0 8.7 6 14.3 18 17 47.3 18.7 87.8 47 121.5 85S196 441.3 208\n 490c.7 2 1.3 5 2 9s1.2 6.7 1.5 8c.3 1.3 1 3.3 2 6s2.2 4.5 3.5 5.5c1.3 1 3.3\n 1.8 6 2.5s6 1 10 1c14 0 21-3.7 21-11 0-2-2-10.3-6-25-20-79.3-65-146.7-135-202\n l-3-3h399890zM100 241v40h399900v-40z",leftbrace:"M6 548l-6-6v-35l6-11c56-104 135.3-181.3 238-232 57.3-28.7 117\n-45 179-50h399577v120H403c-43.3 7-81 15-113 26-100.7 33-179.7 91-237 174-2.7\n 5-6 9-10 13-.7 1-7.3 1-20 1H6z",leftbraceunder:"M0 6l6-6h17c12.688 0 19.313.3 20 1 4 4 7.313 8.3 10 13\n 35.313 51.3 80.813 93.8 136.5 127.5 55.688 33.7 117.188 55.8 184.5 66.5.688\n 0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7\n-331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z",leftgroup:"M400000 80\nH435C64 80 168.3 229.4 21 260c-5.9 1.2-18 0-18 0-2 0-3-1-3-3v-38C76 61 257 0\n 435 0h399565z",leftgroupunder:"M400000 262\nH435C64 262 168.3 112.6 21 82c-5.9-1.2-18 0-18 0-2 0-3 1-3 3v38c76 158 257 219\n 435 219h399565z",leftharpoon:"M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3\n-3.3 10.2-9.5 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5\n-18.3 3-21-1.3-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7\n-196 228-6.7 4.7-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40z",leftharpoonplus:"M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3-3.3 10.2-9.5\n 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5-18.3 3-21-1.3\n-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7-196 228-6.7 4.7\n-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40zM0 435v40h400000v-40z\nm0 0v40h400000v-40z",leftharpoondown:"M7 241c-4 4-6.333 8.667-7 14 0 5.333.667 9 2 11s5.333\n 5.333 12 10c90.667 54 156 130 196 228 3.333 10.667 6.333 16.333 9 17 2 .667 5\n 1 9 1h5c10.667 0 16.667-2 18-6 2-2.667 1-9.667-3-21-32-87.333-82.667-157.667\n-152-211l-3-3h399907v-40zM93 281 H400000 v-40L7 241z",leftharpoondownplus:"M7 435c-4 4-6.3 8.7-7 14 0 5.3.7 9 2 11s5.3 5.3 12\n 10c90.7 54 156 130 196 228 3.3 10.7 6.3 16.3 9 17 2 .7 5 1 9 1h5c10.7 0 16.7\n-2 18-6 2-2.7 1-9.7-3-21-32-87.3-82.7-157.7-152-211l-3-3h399907v-40H7zm93 0\nv40h399900v-40zM0 241v40h399900v-40zm0 0v40h399900v-40z",lefthook:"M400000 281 H103s-33-11.2-61-33.5S0 197.3 0 164s14.2-61.2 42.5\n-83.5C70.8 58.2 104 47 142 47 c16.7 0 25 6.7 25 20 0 12-8.7 18.7-26 20-40 3.3\n-68.7 15.7-86 37-10 12-15 25.3-15 40 0 22.7 9.8 40.7 29.5 54 19.7 13.3 43.5 21\n 71.5 23h399859zM103 281v-40h399897v40z",leftlinesegment:"M40 281 V428 H0 V94 H40 V241 H400000 v40z\nM40 281 V428 H0 V94 H40 V241 H400000 v40z",leftmapsto:"M40 281 V448H0V74H40V241H400000v40z\nM40 281 V448H0V74H40V241H400000v40z",leftToFrom:"M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23\n-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69-70-101l-7-8h399905v-40H95l7-8\nc28.7-32 52-65.7 70-101 10.7-23.3 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 265.3\n 68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z",longequal:"M0 50 h400000 v40H0z m0 194h40000v40H0z\nM0 50 h400000 v40H0z m0 194h40000v40H0z",midbrace:"M200428 334\nc-100.7-8.3-195.3-44-280-108-55.3-42-101.7-93-139-153l-9-14c-2.7 4-5.7 8.7-9 14\n-53.3 86.7-123.7 153-211 199-66.7 36-137.3 56.3-212 62H0V214h199568c178.3-11.7\n 311.7-78.3 403-201 6-8 9.7-12 11-12 .7-.7 6.7-1 18-1s17.3.3 18 1c1.3 0 5 4 11\n 12 44.7 59.3 101.3 106.3 170 141s145.3 54.3 229 60h199572v120z",midbraceunder:"M199572 214\nc100.7 8.3 195.3 44 280 108 55.3 42 101.7 93 139 153l9 14c2.7-4 5.7-8.7 9-14\n 53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3\n 11.7-311.7 78.3-403 201-6 8-9.7 12-11 12-.7.7-6.7 1-18 1s-17.3-.3-18-1c-1.3 0\n-5-4-11-12-44.7-59.3-101.3-106.3-170-141s-145.3-54.3-229-60H0V214z",oiintSize1:"M512.6 71.6c272.6 0 320.3 106.8 320.3 178.2 0 70.8-47.7 177.6\n-320.3 177.6S193.1 320.6 193.1 249.8c0-71.4 46.9-178.2 319.5-178.2z\nm368.1 178.2c0-86.4-60.9-215.4-368.1-215.4-306.4 0-367.3 129-367.3 215.4 0 85.8\n60.9 214.8 367.3 214.8 307.2 0 368.1-129 368.1-214.8z",oiintSize2:"M757.8 100.1c384.7 0 451.1 137.6 451.1 230 0 91.3-66.4 228.8\n-451.1 228.8-386.3 0-452.7-137.5-452.7-228.8 0-92.4 66.4-230 452.7-230z\nm502.4 230c0-111.2-82.4-277.2-502.4-277.2s-504 166-504 277.2\nc0 110 84 276 504 276s502.4-166 502.4-276z",oiiintSize1:"M681.4 71.6c408.9 0 480.5 106.8 480.5 178.2 0 70.8-71.6 177.6\n-480.5 177.6S202.1 320.6 202.1 249.8c0-71.4 70.5-178.2 479.3-178.2z\nm525.8 178.2c0-86.4-86.8-215.4-525.7-215.4-437.9 0-524.7 129-524.7 215.4 0\n85.8 86.8 214.8 524.7 214.8 438.9 0 525.7-129 525.7-214.8z",oiiintSize2:"M1021.2 53c603.6 0 707.8 165.8 707.8 277.2 0 110-104.2 275.8\n-707.8 275.8-606 0-710.2-165.8-710.2-275.8C311 218.8 415.2 53 1021.2 53z\nm770.4 277.1c0-131.2-126.4-327.6-770.5-327.6S248.4 198.9 248.4 330.1\nc0 130 128.8 326.4 772.7 326.4s770.5-196.4 770.5-326.4z",rightarrow:"M0 241v40h399891c-47.3 35.3-84 78-110 128\n-16.7 32-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20\n 11 8 0 13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7\n 39-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85\n-40.5-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5\n-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67\n 151.7 139 205zm0 0v40h399900v-40z",rightbrace:"M400000 542l\n-6 6h-17c-12.7 0-19.3-.3-20-1-4-4-7.3-8.3-10-13-35.3-51.3-80.8-93.8-136.5-127.5\ns-117.2-55.8-184.5-66.5c-.7 0-2-.3-4-1-18.7-2.7-76-4.3-172-5H0V214h399571l6 1\nc124.7 8 235 61.7 331 161 31.3 33.3 59.7 72.7 85 118l7 13v35z",rightbraceunder:"M399994 0l6 6v35l-6 11c-56 104-135.3 181.3-238 232-57.3\n 28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237\n-174 2.7-5 6-9 10-13 .7-1 7.3-1 20-1h17z",rightgroup:"M0 80h399565c371 0 266.7 149.4 414 180 5.9 1.2 18 0 18 0 2 0\n 3-1 3-3v-38c-76-158-257-219-435-219H0z",rightgroupunder:"M0 262h399565c371 0 266.7-149.4 414-180 5.9-1.2 18 0 18\n 0 2 0 3 1 3 3v38c-76 158-257 219-435 219H0z",rightharpoon:"M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3\n-3.7-15.3-11-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2\n-10.7 0-16.7 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58\n 69.2 92 94.5zm0 0v40h399900v-40z",rightharpoonplus:"M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3-3.7-15.3-11\n-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2-10.7 0-16.7\n 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 69.2 92 94.5z\nm0 0v40h399900v-40z m100 194v40h399900v-40zm0 0v40h399900v-40z",rightharpoondown:"M399747 511c0 7.3 6.7 11 20 11 8 0 13-.8 15-2.5s4.7-6.8\n 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 8.5-5.8 9.5\n-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3-64.7 57-92 95\n-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 241v40h399900v-40z",rightharpoondownplus:"M399747 705c0 7.3 6.7 11 20 11 8 0 13-.8\n 15-2.5s4.7-6.8 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3\n 8.5-5.8 9.5-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3\n-64.7 57-92 95-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 435v40h399900v-40z\nm0-194v40h400000v-40zm0 0v40h400000v-40z",righthook:"M399859 241c-764 0 0 0 0 0 40-3.3 68.7-15.7 86-37 10-12 15-25.3\n 15-40 0-22.7-9.8-40.7-29.5-54-19.7-13.3-43.5-21-71.5-23-17.3-1.3-26-8-26-20 0\n-13.3 8.7-20 26-20 38 0 71 11.2 99 33.5 0 0 7 5.6 21 16.7 14 11.2 21 33.5 21\n 66.8s-14 61.2-42 83.5c-28 22.3-61 33.5-99 33.5L0 241z M0 281v-40h399859v40z",rightlinesegment:"M399960 241 V94 h40 V428 h-40 V281 H0 v-40z\nM399960 241 V94 h40 V428 h-40 V281 H0 v-40z",rightToFrom:"M400000 167c-70.7-42-118-97.7-142-167h-23c-15.3 0-23 .3-23\n 1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8H0v40h399905l-7 8c-28.7 32\n-52 65.7-70 101-10.7 23.3-16 35.7-16 37 0 .7 7.7 1 23 1h23c24-69.3 71.3-125 142\n-167z M100 147v40h399900v-40zM0 341v40h399900v-40z",twoheadleftarrow:"M0 167c68 40\n 115.7 95.7 143 167h22c15.3 0 23-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69\n-70-101l-7-8h125l9 7c50.7 39.3 85 86 103 140h46c0-4.7-6.3-18.7-19-42-18-35.3\n-40-67.3-66-96l-9-9h399716v-40H284l9-9c26-28.7 48-60.7 66-96 12.7-23.333 19\n-37.333 19-42h-46c-18 54-52.3 100.7-103 140l-9 7H95l7-8c28.7-32 52-65.7 70-101\n 10.7-23.333 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 71.3 68 127 0 167z",twoheadrightarrow:"M400000 167\nc-68-40-115.7-95.7-143-167h-22c-15.3 0-23 .3-23 1 0 1.3 5.3 13.7 16 37 18 35.3\n 41.3 69 70 101l7 8h-125l-9-7c-50.7-39.3-85-86-103-140h-46c0 4.7 6.3 18.7 19 42\n 18 35.3 40 67.3 66 96l9 9H0v40h399716l-9 9c-26 28.7-48 60.7-66 96-12.7 23.333\n-19 37.333-19 42h46c18-54 52.3-100.7 103-140l9-7h125l-7 8c-28.7 32-52 65.7-70\n 101-10.7 23.333-16 35.7-16 37 0 .7 7.7 1 23 1h22c27.3-71.3 75-127 143-167z",tilde1:"M200 55.538c-77 0-168 73.953-177 73.953-3 0-7\n-2.175-9-5.437L2 97c-1-2-2-4-2-6 0-4 2-7 5-9l20-12C116 12 171 0 207 0c86 0\n 114 68 191 68 78 0 168-68 177-68 4 0 7 2 9 5l12 19c1 2.175 2 4.35 2 6.525 0\n 4.35-2 7.613-5 9.788l-19 13.05c-92 63.077-116.937 75.308-183 76.128\n-68.267.847-113-73.952-191-73.952z",tilde2:"M344 55.266c-142 0-300.638 81.316-311.5 86.418\n-8.01 3.762-22.5 10.91-23.5 5.562L1 120c-1-2-1-3-1-4 0-5 3-9 8-10l18.4-9C160.9\n 31.9 283 0 358 0c148 0 188 122 331 122s314-97 326-97c4 0 8 2 10 7l7 21.114\nc1 2.14 1 3.21 1 4.28 0 5.347-3 9.626-7 10.696l-22.3 12.622C852.6 158.372 751\n 181.476 676 181.476c-149 0-189-126.21-332-126.21z",tilde3:"M786 59C457 59 32 175.242 13 175.242c-6 0-10-3.457\n-11-10.37L.15 138c-1-7 3-12 10-13l19.2-6.4C378.4 40.7 634.3 0 804.3 0c337 0\n 411.8 157 746.8 157 328 0 754-112 773-112 5 0 10 3 11 9l1 14.075c1 8.066-.697\n 16.595-6.697 17.492l-21.052 7.31c-367.9 98.146-609.15 122.696-778.15 122.696\n -338 0-409-156.573-744-156.573z",tilde4:"M786 58C457 58 32 177.487 13 177.487c-6 0-10-3.345\n-11-10.035L.15 143c-1-7 3-12 10-13l22-6.7C381.2 35 637.15 0 807.15 0c337 0 409\n 177 744 177 328 0 754-127 773-127 5 0 10 3 11 9l1 14.794c1 7.805-3 13.38-9\n 14.495l-20.7 5.574c-366.85 99.79-607.3 139.372-776.3 139.372-338 0-409\n -175.236-744-175.236z",vec:"M377 20c0-5.333 1.833-10 5.5-14S391 0 397 0c4.667 0 8.667 1.667 12 5\n3.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11\n10.667 11 18 0 6-1 10-3 12s-6.667 5-14 9c-28.667 14.667-53.667 35.667-75 63\n-1.333 1.333-3.167 3.5-5.5 6.5s-4 4.833-5 5.5c-1 .667-2.5 1.333-4.5 2s-4.333 1\n-7 1c-4.667 0-9.167-1.833-13.5-5.5S337 184 337 178c0-12.667 15.667-32.333 47-59\nH213l-171-1c-8.667-6-13-12.333-13-19 0-4.667 4.333-11.333 13-20h359\nc-16-25.333-24-45-24-59z",widehat1:"M529 0h5l519 115c5 1 9 5 9 10 0 1-1 2-1 3l-4 22\nc-1 5-5 9-11 9h-2L532 67 19 159h-2c-5 0-9-4-11-9l-5-22c-1-6 2-12 8-13z",widehat2:"M1181 0h2l1171 176c6 0 10 5 10 11l-2 23c-1 6-5 10\n-11 10h-1L1182 67 15 220h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z",widehat3:"M1181 0h2l1171 236c6 0 10 5 10 11l-2 23c-1 6-5 10\n-11 10h-1L1182 67 15 280h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z",widehat4:"M1181 0h2l1171 296c6 0 10 5 10 11l-2 23c-1 6-5 10\n-11 10h-1L1182 67 15 340h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z",widecheck1:"M529,159h5l519,-115c5,-1,9,-5,9,-10c0,-1,-1,-2,-1,-3l-4,-22c-1,\n-5,-5,-9,-11,-9h-2l-512,92l-513,-92h-2c-5,0,-9,4,-11,9l-5,22c-1,6,2,12,8,13z",widecheck2:"M1181,220h2l1171,-176c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,\n-11,-10h-1l-1168,153l-1167,-153h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z",widecheck3:"M1181,280h2l1171,-236c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,\n-11,-10h-1l-1168,213l-1167,-213h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z",widecheck4:"M1181,340h2l1171,-296c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,\n-11,-10h-1l-1168,273l-1167,-273h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z",baraboveleftarrow:"M400000 620h-399890l3 -3c68.7 -52.7 113.7 -120 135 -202\nc4 -14.7 6 -23 6 -25c0 -7.3 -7 -11 -21 -11c-8 0 -13.2 0.8 -15.5 2.5\nc-2.3 1.7 -4.2 5.8 -5.5 12.5c-1.3 4.7 -2.7 10.3 -4 17c-12 48.7 -34.8 92 -68.5 130\ns-74.2 66.3 -121.5 85c-10 4 -16 7.7 -18 11c0 8.7 6 14.3 18 17c47.3 18.7 87.8 47\n121.5 85s56.5 81.3 68.5 130c0.7 2 1.3 5 2 9s1.2 6.7 1.5 8c0.3 1.3 1 3.3 2 6\ns2.2 4.5 3.5 5.5c1.3 1 3.3 1.8 6 2.5s6 1 10 1c14 0 21 -3.7 21 -11\nc0 -2 -2 -10.3 -6 -25c-20 -79.3 -65 -146.7 -135 -202l-3 -3h399890z\nM100 620v40h399900v-40z M0 241v40h399900v-40zM0 241v40h399900v-40z",rightarrowabovebar:"M0 241v40h399891c-47.3 35.3-84 78-110 128-16.7 32\n-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 11 8 0\n13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 39\n-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85-40.5\n-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5\n-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67\n151.7 139 205zm96 379h399894v40H0zm0 0h399904v40H0z",baraboveshortleftharpoon:"M507,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11\nc1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17\nc2,0.7,5,1,9,1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21\nc-32,-87.3,-82.7,-157.7,-152,-211c0,0,-3,-3,-3,-3l399351,0l0,-40\nc-398570,0,-399437,0,-399437,0z M593 435 v40 H399500 v-40z\nM0 281 v-40 H399908 v40z M0 281 v-40 H399908 v40z",rightharpoonaboveshortbar:"M0,241 l0,40c399126,0,399993,0,399993,0\nc4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,\n-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6\nc-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z\nM0 241 v40 H399908 v-40z M0 475 v-40 H399500 v40z M0 475 v-40 H399500 v40z",shortbaraboveleftharpoon:"M7,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11\nc1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17c2,0.7,5,1,9,\n1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21c-32,-87.3,-82.7,-157.7,\n-152,-211c0,0,-3,-3,-3,-3l399907,0l0,-40c-399126,0,-399993,0,-399993,0z\nM93 435 v40 H400000 v-40z M500 241 v40 H400000 v-40z M500 241 v40 H400000 v-40z",shortrightharpoonabovebar:"M53,241l0,40c398570,0,399437,0,399437,0\nc4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,\n-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6\nc-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z\nM500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z"};class ne{constructor(e){this.children=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.children=e,this.classes=[],this.height=0,this.depth=0,this.maxFontSize=0,this.style={}}hasClass(e){return A.contains(this.classes,e)}toNode(){var t=document.createDocumentFragment();for(let e=0;e<this.children.length;e++)t.appendChild(this.children[e].toNode());return t}toMarkup(){let t="";for(let e=0;e<this.children.length;e++)t+=this.children[e].toMarkup();return t}toText(){return this.children.map(e=>e.toText()).join("")}}var ae={"AMS-Regular":{32:[0,0,0,0,.25],65:[0,.68889,0,0,.72222],66:[0,.68889,0,0,.66667],67:[0,.68889,0,0,.72222],68:[0,.68889,0,0,.72222],69:[0,.68889,0,0,.66667],70:[0,.68889,0,0,.61111],71:[0,.68889,0,0,.77778],72:[0,.68889,0,0,.77778],73:[0,.68889,0,0,.38889],74:[.16667,.68889,0,0,.5],75:[0,.68889,0,0,.77778],76:[0,.68889,0,0,.66667],77:[0,.68889,0,0,.94445],78:[0,.68889,0,0,.72222],79:[.16667,.68889,0,0,.77778],80:[0,.68889,0,0,.61111],81:[.16667,.68889,0,0,.77778],82:[0,.68889,0,0,.72222],83:[0,.68889,0,0,.55556],84:[0,.68889,0,0,.66667],85:[0,.68889,0,0,.72222],86:[0,.68889,0,0,.72222],87:[0,.68889,0,0,1],88:[0,.68889,0,0,.72222],89:[0,.68889,0,0,.72222],90:[0,.68889,0,0,.66667],107:[0,.68889,0,0,.55556],160:[0,0,0,0,.25],165:[0,.675,.025,0,.75],174:[.15559,.69224,0,0,.94666],240:[0,.68889,0,0,.55556],295:[0,.68889,0,0,.54028],710:[0,.825,0,0,2.33334],732:[0,.9,0,0,2.33334],770:[0,.825,0,0,2.33334],771:[0,.9,0,0,2.33334],989:[.08167,.58167,0,0,.77778],1008:[0,.43056,.04028,0,.66667],8245:[0,.54986,0,0,.275],8463:[0,.68889,0,0,.54028],8487:[0,.68889,0,0,.72222],8498:[0,.68889,0,0,.55556],8502:[0,.68889,0,0,.66667],8503:[0,.68889,0,0,.44445],8504:[0,.68889,0,0,.66667],8513:[0,.68889,0,0,.63889],8592:[-.03598,.46402,0,0,.5],8594:[-.03598,.46402,0,0,.5],8602:[-.13313,.36687,0,0,1],8603:[-.13313,.36687,0,0,1],8606:[.01354,.52239,0,0,1],8608:[.01354,.52239,0,0,1],8610:[.01354,.52239,0,0,1.11111],8611:[.01354,.52239,0,0,1.11111],8619:[0,.54986,0,0,1],8620:[0,.54986,0,0,1],8621:[-.13313,.37788,0,0,1.38889],8622:[-.13313,.36687,0,0,1],8624:[0,.69224,0,0,.5],8625:[0,.69224,0,0,.5],8630:[0,.43056,0,0,1],8631:[0,.43056,0,0,1],8634:[.08198,.58198,0,0,.77778],8635:[.08198,.58198,0,0,.77778],8638:[.19444,.69224,0,0,.41667],8639:[.19444,.69224,0,0,.41667],8642:[.19444,.69224,0,0,.41667],8643:[.19444,.69224,0,0,.41667],8644:[.1808,.675,0,0,1],8646:[.1808,.675,0,0,1],8647:[.1808,.675,0,0,1],8648:[.19444,.69224,0,0,.83334],8649:[.1808,.675,0,0,1],8650:[.19444,.69224,0,0,.83334],8651:[.01354,.52239,0,0,1],8652:[.01354,.52239,0,0,1],8653:[-.13313,.36687,0,0,1],8654:[-.13313,.36687,0,0,1],8655:[-.13313,.36687,0,0,1],8666:[.13667,.63667,0,0,1],8667:[.13667,.63667,0,0,1],8669:[-.13313,.37788,0,0,1],8672:[-.064,.437,0,0,1.334],8674:[-.064,.437,0,0,1.334],8705:[0,.825,0,0,.5],8708:[0,.68889,0,0,.55556],8709:[.08167,.58167,0,0,.77778],8717:[0,.43056,0,0,.42917],8722:[-.03598,.46402,0,0,.5],8724:[.08198,.69224,0,0,.77778],8726:[.08167,.58167,0,0,.77778],8733:[0,.69224,0,0,.77778],8736:[0,.69224,0,0,.72222],8737:[0,.69224,0,0,.72222],8738:[.03517,.52239,0,0,.72222],8739:[.08167,.58167,0,0,.22222],8740:[.25142,.74111,0,0,.27778],8741:[.08167,.58167,0,0,.38889],8742:[.25142,.74111,0,0,.5],8756:[0,.69224,0,0,.66667],8757:[0,.69224,0,0,.66667],8764:[-.13313,.36687,0,0,.77778],8765:[-.13313,.37788,0,0,.77778],8769:[-.13313,.36687,0,0,.77778],8770:[-.03625,.46375,0,0,.77778],8774:[.30274,.79383,0,0,.77778],8776:[-.01688,.48312,0,0,.77778],8778:[.08167,.58167,0,0,.77778],8782:[.06062,.54986,0,0,.77778],8783:[.06062,.54986,0,0,.77778],8785:[.08198,.58198,0,0,.77778],8786:[.08198,.58198,0,0,.77778],8787:[.08198,.58198,0,0,.77778],8790:[0,.69224,0,0,.77778],8791:[.22958,.72958,0,0,.77778],8796:[.08198,.91667,0,0,.77778],8806:[.25583,.75583,0,0,.77778],8807:[.25583,.75583,0,0,.77778],8808:[.25142,.75726,0,0,.77778],8809:[.25142,.75726,0,0,.77778],8812:[.25583,.75583,0,0,.5],8814:[.20576,.70576,0,0,.77778],8815:[.20576,.70576,0,0,.77778],8816:[.30274,.79383,0,0,.77778],8817:[.30274,.79383,0,0,.77778],8818:[.22958,.72958,0,0,.77778],8819:[.22958,.72958,0,0,.77778],8822:[.1808,.675,0,0,.77778],8823:[.1808,.675,0,0,.77778],8828:[.13667,.63667,0,0,.77778],8829:[.13667,.63667,0,0,.77778],8830:[.22958,.72958,0,0,.77778],8831:[.22958,.72958,0,0,.77778],8832:[.20576,.70576,0,0,.77778],8833:[.20576,.70576,0,0,.77778],8840:[.30274,.79383,0,0,.77778],8841:[.30274,.79383,0,0,.77778],8842:[.13597,.63597,0,0,.77778],8843:[.13597,.63597,0,0,.77778],8847:[.03517,.54986,0,0,.77778],8848:[.03517,.54986,0,0,.77778],8858:[.08198,.58198,0,0,.77778],8859:[.08198,.58198,0,0,.77778],8861:[.08198,.58198,0,0,.77778],8862:[0,.675,0,0,.77778],8863:[0,.675,0,0,.77778],8864:[0,.675,0,0,.77778],8865:[0,.675,0,0,.77778],8872:[0,.69224,0,0,.61111],8873:[0,.69224,0,0,.72222],8874:[0,.69224,0,0,.88889],8876:[0,.68889,0,0,.61111],8877:[0,.68889,0,0,.61111],8878:[0,.68889,0,0,.72222],8879:[0,.68889,0,0,.72222],8882:[.03517,.54986,0,0,.77778],8883:[.03517,.54986,0,0,.77778],8884:[.13667,.63667,0,0,.77778],8885:[.13667,.63667,0,0,.77778],8888:[0,.54986,0,0,1.11111],8890:[.19444,.43056,0,0,.55556],8891:[.19444,.69224,0,0,.61111],8892:[.19444,.69224,0,0,.61111],8901:[0,.54986,0,0,.27778],8903:[.08167,.58167,0,0,.77778],8905:[.08167,.58167,0,0,.77778],8906:[.08167,.58167,0,0,.77778],8907:[0,.69224,0,0,.77778],8908:[0,.69224,0,0,.77778],8909:[-.03598,.46402,0,0,.77778],8910:[0,.54986,0,0,.76042],8911:[0,.54986,0,0,.76042],8912:[.03517,.54986,0,0,.77778],8913:[.03517,.54986,0,0,.77778],8914:[0,.54986,0,0,.66667],8915:[0,.54986,0,0,.66667],8916:[0,.69224,0,0,.66667],8918:[.0391,.5391,0,0,.77778],8919:[.0391,.5391,0,0,.77778],8920:[.03517,.54986,0,0,1.33334],8921:[.03517,.54986,0,0,1.33334],8922:[.38569,.88569,0,0,.77778],8923:[.38569,.88569,0,0,.77778],8926:[.13667,.63667,0,0,.77778],8927:[.13667,.63667,0,0,.77778],8928:[.30274,.79383,0,0,.77778],8929:[.30274,.79383,0,0,.77778],8934:[.23222,.74111,0,0,.77778],8935:[.23222,.74111,0,0,.77778],8936:[.23222,.74111,0,0,.77778],8937:[.23222,.74111,0,0,.77778],8938:[.20576,.70576,0,0,.77778],8939:[.20576,.70576,0,0,.77778],8940:[.30274,.79383,0,0,.77778],8941:[.30274,.79383,0,0,.77778],8994:[.19444,.69224,0,0,.77778],8995:[.19444,.69224,0,0,.77778],9416:[.15559,.69224,0,0,.90222],9484:[0,.69224,0,0,.5],9488:[0,.69224,0,0,.5],9492:[0,.37788,0,0,.5],9496:[0,.37788,0,0,.5],9585:[.19444,.68889,0,0,.88889],9586:[.19444,.74111,0,0,.88889],9632:[0,.675,0,0,.77778],9633:[0,.675,0,0,.77778],9650:[0,.54986,0,0,.72222],9651:[0,.54986,0,0,.72222],9654:[.03517,.54986,0,0,.77778],9660:[0,.54986,0,0,.72222],9661:[0,.54986,0,0,.72222],9664:[.03517,.54986,0,0,.77778],9674:[.11111,.69224,0,0,.66667],9733:[.19444,.69224,0,0,.94445],10003:[0,.69224,0,0,.83334],10016:[0,.69224,0,0,.83334],10731:[.11111,.69224,0,0,.66667],10846:[.19444,.75583,0,0,.61111],10877:[.13667,.63667,0,0,.77778],10878:[.13667,.63667,0,0,.77778],10885:[.25583,.75583,0,0,.77778],10886:[.25583,.75583,0,0,.77778],10887:[.13597,.63597,0,0,.77778],10888:[.13597,.63597,0,0,.77778],10889:[.26167,.75726,0,0,.77778],10890:[.26167,.75726,0,0,.77778],10891:[.48256,.98256,0,0,.77778],10892:[.48256,.98256,0,0,.77778],10901:[.13667,.63667,0,0,.77778],10902:[.13667,.63667,0,0,.77778],10933:[.25142,.75726,0,0,.77778],10934:[.25142,.75726,0,0,.77778],10935:[.26167,.75726,0,0,.77778],10936:[.26167,.75726,0,0,.77778],10937:[.26167,.75726,0,0,.77778],10938:[.26167,.75726,0,0,.77778],10949:[.25583,.75583,0,0,.77778],10950:[.25583,.75583,0,0,.77778],10955:[.28481,.79383,0,0,.77778],10956:[.28481,.79383,0,0,.77778],57350:[.08167,.58167,0,0,.22222],57351:[.08167,.58167,0,0,.38889],57352:[.08167,.58167,0,0,.77778],57353:[0,.43056,.04028,0,.66667],57356:[.25142,.75726,0,0,.77778],57357:[.25142,.75726,0,0,.77778],57358:[.41951,.91951,0,0,.77778],57359:[.30274,.79383,0,0,.77778],57360:[.30274,.79383,0,0,.77778],57361:[.41951,.91951,0,0,.77778],57366:[.25142,.75726,0,0,.77778],57367:[.25142,.75726,0,0,.77778],57368:[.25142,.75726,0,0,.77778],57369:[.25142,.75726,0,0,.77778],57370:[.13597,.63597,0,0,.77778],57371:[.13597,.63597,0,0,.77778]},"Caligraphic-Regular":{32:[0,0,0,0,.25],65:[0,.68333,0,.19445,.79847],66:[0,.68333,.03041,.13889,.65681],67:[0,.68333,.05834,.13889,.52653],68:[0,.68333,.02778,.08334,.77139],69:[0,.68333,.08944,.11111,.52778],70:[0,.68333,.09931,.11111,.71875],71:[.09722,.68333,.0593,.11111,.59487],72:[0,.68333,.00965,.11111,.84452],73:[0,.68333,.07382,0,.54452],74:[.09722,.68333,.18472,.16667,.67778],75:[0,.68333,.01445,.05556,.76195],76:[0,.68333,0,.13889,.68972],77:[0,.68333,0,.13889,1.2009],78:[0,.68333,.14736,.08334,.82049],79:[0,.68333,.02778,.11111,.79611],80:[0,.68333,.08222,.08334,.69556],81:[.09722,.68333,0,.11111,.81667],82:[0,.68333,0,.08334,.8475],83:[0,.68333,.075,.13889,.60556],84:[0,.68333,.25417,0,.54464],85:[0,.68333,.09931,.08334,.62583],86:[0,.68333,.08222,0,.61278],87:[0,.68333,.08222,.08334,.98778],88:[0,.68333,.14643,.13889,.7133],89:[.09722,.68333,.08222,.08334,.66834],90:[0,.68333,.07944,.13889,.72473],160:[0,0,0,0,.25]},"Fraktur-Regular":{32:[0,0,0,0,.25],33:[0,.69141,0,0,.29574],34:[0,.69141,0,0,.21471],38:[0,.69141,0,0,.73786],39:[0,.69141,0,0,.21201],40:[.24982,.74947,0,0,.38865],41:[.24982,.74947,0,0,.38865],42:[0,.62119,0,0,.27764],43:[.08319,.58283,0,0,.75623],44:[0,.10803,0,0,.27764],45:[.08319,.58283,0,0,.75623],46:[0,.10803,0,0,.27764],47:[.24982,.74947,0,0,.50181],48:[0,.47534,0,0,.50181],49:[0,.47534,0,0,.50181],50:[0,.47534,0,0,.50181],51:[.18906,.47534,0,0,.50181],52:[.18906,.47534,0,0,.50181],53:[.18906,.47534,0,0,.50181],54:[0,.69141,0,0,.50181],55:[.18906,.47534,0,0,.50181],56:[0,.69141,0,0,.50181],57:[.18906,.47534,0,0,.50181],58:[0,.47534,0,0,.21606],59:[.12604,.47534,0,0,.21606],61:[-.13099,.36866,0,0,.75623],63:[0,.69141,0,0,.36245],65:[0,.69141,0,0,.7176],66:[0,.69141,0,0,.88397],67:[0,.69141,0,0,.61254],68:[0,.69141,0,0,.83158],69:[0,.69141,0,0,.66278],70:[.12604,.69141,0,0,.61119],71:[0,.69141,0,0,.78539],72:[.06302,.69141,0,0,.7203],73:[0,.69141,0,0,.55448],74:[.12604,.69141,0,0,.55231],75:[0,.69141,0,0,.66845],76:[0,.69141,0,0,.66602],77:[0,.69141,0,0,1.04953],78:[0,.69141,0,0,.83212],79:[0,.69141,0,0,.82699],80:[.18906,.69141,0,0,.82753],81:[.03781,.69141,0,0,.82699],82:[0,.69141,0,0,.82807],83:[0,.69141,0,0,.82861],84:[0,.69141,0,0,.66899],85:[0,.69141,0,0,.64576],86:[0,.69141,0,0,.83131],87:[0,.69141,0,0,1.04602],88:[0,.69141,0,0,.71922],89:[.18906,.69141,0,0,.83293],90:[.12604,.69141,0,0,.60201],91:[.24982,.74947,0,0,.27764],93:[.24982,.74947,0,0,.27764],94:[0,.69141,0,0,.49965],97:[0,.47534,0,0,.50046],98:[0,.69141,0,0,.51315],99:[0,.47534,0,0,.38946],100:[0,.62119,0,0,.49857],101:[0,.47534,0,0,.40053],102:[.18906,.69141,0,0,.32626],103:[.18906,.47534,0,0,.5037],104:[.18906,.69141,0,0,.52126],105:[0,.69141,0,0,.27899],106:[0,.69141,0,0,.28088],107:[0,.69141,0,0,.38946],108:[0,.69141,0,0,.27953],109:[0,.47534,0,0,.76676],110:[0,.47534,0,0,.52666],111:[0,.47534,0,0,.48885],112:[.18906,.52396,0,0,.50046],113:[.18906,.47534,0,0,.48912],114:[0,.47534,0,0,.38919],115:[0,.47534,0,0,.44266],116:[0,.62119,0,0,.33301],117:[0,.47534,0,0,.5172],118:[0,.52396,0,0,.5118],119:[0,.52396,0,0,.77351],120:[.18906,.47534,0,0,.38865],121:[.18906,.47534,0,0,.49884],122:[.18906,.47534,0,0,.39054],160:[0,0,0,0,.25],8216:[0,.69141,0,0,.21471],8217:[0,.69141,0,0,.21471],58112:[0,.62119,0,0,.49749],58113:[0,.62119,0,0,.4983],58114:[.18906,.69141,0,0,.33328],58115:[.18906,.69141,0,0,.32923],58116:[.18906,.47534,0,0,.50343],58117:[0,.69141,0,0,.33301],58118:[0,.62119,0,0,.33409],58119:[0,.47534,0,0,.50073]},"Main-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.35],34:[0,.69444,0,0,.60278],35:[.19444,.69444,0,0,.95833],36:[.05556,.75,0,0,.575],37:[.05556,.75,0,0,.95833],38:[0,.69444,0,0,.89444],39:[0,.69444,0,0,.31944],40:[.25,.75,0,0,.44722],41:[.25,.75,0,0,.44722],42:[0,.75,0,0,.575],43:[.13333,.63333,0,0,.89444],44:[.19444,.15556,0,0,.31944],45:[0,.44444,0,0,.38333],46:[0,.15556,0,0,.31944],47:[.25,.75,0,0,.575],48:[0,.64444,0,0,.575],49:[0,.64444,0,0,.575],50:[0,.64444,0,0,.575],51:[0,.64444,0,0,.575],52:[0,.64444,0,0,.575],53:[0,.64444,0,0,.575],54:[0,.64444,0,0,.575],55:[0,.64444,0,0,.575],56:[0,.64444,0,0,.575],57:[0,.64444,0,0,.575],58:[0,.44444,0,0,.31944],59:[.19444,.44444,0,0,.31944],60:[.08556,.58556,0,0,.89444],61:[-.10889,.39111,0,0,.89444],62:[.08556,.58556,0,0,.89444],63:[0,.69444,0,0,.54305],64:[0,.69444,0,0,.89444],65:[0,.68611,0,0,.86944],66:[0,.68611,0,0,.81805],67:[0,.68611,0,0,.83055],68:[0,.68611,0,0,.88194],69:[0,.68611,0,0,.75555],70:[0,.68611,0,0,.72361],71:[0,.68611,0,0,.90416],72:[0,.68611,0,0,.9],73:[0,.68611,0,0,.43611],74:[0,.68611,0,0,.59444],75:[0,.68611,0,0,.90138],76:[0,.68611,0,0,.69166],77:[0,.68611,0,0,1.09166],78:[0,.68611,0,0,.9],79:[0,.68611,0,0,.86388],80:[0,.68611,0,0,.78611],81:[.19444,.68611,0,0,.86388],82:[0,.68611,0,0,.8625],83:[0,.68611,0,0,.63889],84:[0,.68611,0,0,.8],85:[0,.68611,0,0,.88472],86:[0,.68611,.01597,0,.86944],87:[0,.68611,.01597,0,1.18888],88:[0,.68611,0,0,.86944],89:[0,.68611,.02875,0,.86944],90:[0,.68611,0,0,.70277],91:[.25,.75,0,0,.31944],92:[.25,.75,0,0,.575],93:[.25,.75,0,0,.31944],94:[0,.69444,0,0,.575],95:[.31,.13444,.03194,0,.575],97:[0,.44444,0,0,.55902],98:[0,.69444,0,0,.63889],99:[0,.44444,0,0,.51111],100:[0,.69444,0,0,.63889],101:[0,.44444,0,0,.52708],102:[0,.69444,.10903,0,.35139],103:[.19444,.44444,.01597,0,.575],104:[0,.69444,0,0,.63889],105:[0,.69444,0,0,.31944],106:[.19444,.69444,0,0,.35139],107:[0,.69444,0,0,.60694],108:[0,.69444,0,0,.31944],109:[0,.44444,0,0,.95833],110:[0,.44444,0,0,.63889],111:[0,.44444,0,0,.575],112:[.19444,.44444,0,0,.63889],113:[.19444,.44444,0,0,.60694],114:[0,.44444,0,0,.47361],115:[0,.44444,0,0,.45361],116:[0,.63492,0,0,.44722],117:[0,.44444,0,0,.63889],118:[0,.44444,.01597,0,.60694],119:[0,.44444,.01597,0,.83055],120:[0,.44444,0,0,.60694],121:[.19444,.44444,.01597,0,.60694],122:[0,.44444,0,0,.51111],123:[.25,.75,0,0,.575],124:[.25,.75,0,0,.31944],125:[.25,.75,0,0,.575],126:[.35,.34444,0,0,.575],160:[0,0,0,0,.25],163:[0,.69444,0,0,.86853],168:[0,.69444,0,0,.575],172:[0,.44444,0,0,.76666],176:[0,.69444,0,0,.86944],177:[.13333,.63333,0,0,.89444],184:[.17014,0,0,0,.51111],198:[0,.68611,0,0,1.04166],215:[.13333,.63333,0,0,.89444],216:[.04861,.73472,0,0,.89444],223:[0,.69444,0,0,.59722],230:[0,.44444,0,0,.83055],247:[.13333,.63333,0,0,.89444],248:[.09722,.54167,0,0,.575],305:[0,.44444,0,0,.31944],338:[0,.68611,0,0,1.16944],339:[0,.44444,0,0,.89444],567:[.19444,.44444,0,0,.35139],710:[0,.69444,0,0,.575],711:[0,.63194,0,0,.575],713:[0,.59611,0,0,.575],714:[0,.69444,0,0,.575],715:[0,.69444,0,0,.575],728:[0,.69444,0,0,.575],729:[0,.69444,0,0,.31944],730:[0,.69444,0,0,.86944],732:[0,.69444,0,0,.575],733:[0,.69444,0,0,.575],915:[0,.68611,0,0,.69166],916:[0,.68611,0,0,.95833],920:[0,.68611,0,0,.89444],923:[0,.68611,0,0,.80555],926:[0,.68611,0,0,.76666],928:[0,.68611,0,0,.9],931:[0,.68611,0,0,.83055],933:[0,.68611,0,0,.89444],934:[0,.68611,0,0,.83055],936:[0,.68611,0,0,.89444],937:[0,.68611,0,0,.83055],8211:[0,.44444,.03194,0,.575],8212:[0,.44444,.03194,0,1.14999],8216:[0,.69444,0,0,.31944],8217:[0,.69444,0,0,.31944],8220:[0,.69444,0,0,.60278],8221:[0,.69444,0,0,.60278],8224:[.19444,.69444,0,0,.51111],8225:[.19444,.69444,0,0,.51111],8242:[0,.55556,0,0,.34444],8407:[0,.72444,.15486,0,.575],8463:[0,.69444,0,0,.66759],8465:[0,.69444,0,0,.83055],8467:[0,.69444,0,0,.47361],8472:[.19444,.44444,0,0,.74027],8476:[0,.69444,0,0,.83055],8501:[0,.69444,0,0,.70277],8592:[-.10889,.39111,0,0,1.14999],8593:[.19444,.69444,0,0,.575],8594:[-.10889,.39111,0,0,1.14999],8595:[.19444,.69444,0,0,.575],8596:[-.10889,.39111,0,0,1.14999],8597:[.25,.75,0,0,.575],8598:[.19444,.69444,0,0,1.14999],8599:[.19444,.69444,0,0,1.14999],8600:[.19444,.69444,0,0,1.14999],8601:[.19444,.69444,0,0,1.14999],8636:[-.10889,.39111,0,0,1.14999],8637:[-.10889,.39111,0,0,1.14999],8640:[-.10889,.39111,0,0,1.14999],8641:[-.10889,.39111,0,0,1.14999],8656:[-.10889,.39111,0,0,1.14999],8657:[.19444,.69444,0,0,.70277],8658:[-.10889,.39111,0,0,1.14999],8659:[.19444,.69444,0,0,.70277],8660:[-.10889,.39111,0,0,1.14999],8661:[.25,.75,0,0,.70277],8704:[0,.69444,0,0,.63889],8706:[0,.69444,.06389,0,.62847],8707:[0,.69444,0,0,.63889],8709:[.05556,.75,0,0,.575],8711:[0,.68611,0,0,.95833],8712:[.08556,.58556,0,0,.76666],8715:[.08556,.58556,0,0,.76666],8722:[.13333,.63333,0,0,.89444],8723:[.13333,.63333,0,0,.89444],8725:[.25,.75,0,0,.575],8726:[.25,.75,0,0,.575],8727:[-.02778,.47222,0,0,.575],8728:[-.02639,.47361,0,0,.575],8729:[-.02639,.47361,0,0,.575],8730:[.18,.82,0,0,.95833],8733:[0,.44444,0,0,.89444],8734:[0,.44444,0,0,1.14999],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.31944],8741:[.25,.75,0,0,.575],8743:[0,.55556,0,0,.76666],8744:[0,.55556,0,0,.76666],8745:[0,.55556,0,0,.76666],8746:[0,.55556,0,0,.76666],8747:[.19444,.69444,.12778,0,.56875],8764:[-.10889,.39111,0,0,.89444],8768:[.19444,.69444,0,0,.31944],8771:[.00222,.50222,0,0,.89444],8773:[.027,.638,0,0,.894],8776:[.02444,.52444,0,0,.89444],8781:[.00222,.50222,0,0,.89444],8801:[.00222,.50222,0,0,.89444],8804:[.19667,.69667,0,0,.89444],8805:[.19667,.69667,0,0,.89444],8810:[.08556,.58556,0,0,1.14999],8811:[.08556,.58556,0,0,1.14999],8826:[.08556,.58556,0,0,.89444],8827:[.08556,.58556,0,0,.89444],8834:[.08556,.58556,0,0,.89444],8835:[.08556,.58556,0,0,.89444],8838:[.19667,.69667,0,0,.89444],8839:[.19667,.69667,0,0,.89444],8846:[0,.55556,0,0,.76666],8849:[.19667,.69667,0,0,.89444],8850:[.19667,.69667,0,0,.89444],8851:[0,.55556,0,0,.76666],8852:[0,.55556,0,0,.76666],8853:[.13333,.63333,0,0,.89444],8854:[.13333,.63333,0,0,.89444],8855:[.13333,.63333,0,0,.89444],8856:[.13333,.63333,0,0,.89444],8857:[.13333,.63333,0,0,.89444],8866:[0,.69444,0,0,.70277],8867:[0,.69444,0,0,.70277],8868:[0,.69444,0,0,.89444],8869:[0,.69444,0,0,.89444],8900:[-.02639,.47361,0,0,.575],8901:[-.02639,.47361,0,0,.31944],8902:[-.02778,.47222,0,0,.575],8968:[.25,.75,0,0,.51111],8969:[.25,.75,0,0,.51111],8970:[.25,.75,0,0,.51111],8971:[.25,.75,0,0,.51111],8994:[-.13889,.36111,0,0,1.14999],8995:[-.13889,.36111,0,0,1.14999],9651:[.19444,.69444,0,0,1.02222],9657:[-.02778,.47222,0,0,.575],9661:[.19444,.69444,0,0,1.02222],9667:[-.02778,.47222,0,0,.575],9711:[.19444,.69444,0,0,1.14999],9824:[.12963,.69444,0,0,.89444],9825:[.12963,.69444,0,0,.89444],9826:[.12963,.69444,0,0,.89444],9827:[.12963,.69444,0,0,.89444],9837:[0,.75,0,0,.44722],9838:[.19444,.69444,0,0,.44722],9839:[.19444,.69444,0,0,.44722],10216:[.25,.75,0,0,.44722],10217:[.25,.75,0,0,.44722],10815:[0,.68611,0,0,.9],10927:[.19667,.69667,0,0,.89444],10928:[.19667,.69667,0,0,.89444],57376:[.19444,.69444,0,0,0]},"Main-BoldItalic":{32:[0,0,0,0,.25],33:[0,.69444,.11417,0,.38611],34:[0,.69444,.07939,0,.62055],35:[.19444,.69444,.06833,0,.94444],37:[.05556,.75,.12861,0,.94444],38:[0,.69444,.08528,0,.88555],39:[0,.69444,.12945,0,.35555],40:[.25,.75,.15806,0,.47333],41:[.25,.75,.03306,0,.47333],42:[0,.75,.14333,0,.59111],43:[.10333,.60333,.03306,0,.88555],44:[.19444,.14722,0,0,.35555],45:[0,.44444,.02611,0,.41444],46:[0,.14722,0,0,.35555],47:[.25,.75,.15806,0,.59111],48:[0,.64444,.13167,0,.59111],49:[0,.64444,.13167,0,.59111],50:[0,.64444,.13167,0,.59111],51:[0,.64444,.13167,0,.59111],52:[.19444,.64444,.13167,0,.59111],53:[0,.64444,.13167,0,.59111],54:[0,.64444,.13167,0,.59111],55:[.19444,.64444,.13167,0,.59111],56:[0,.64444,.13167,0,.59111],57:[0,.64444,.13167,0,.59111],58:[0,.44444,.06695,0,.35555],59:[.19444,.44444,.06695,0,.35555],61:[-.10889,.39111,.06833,0,.88555],63:[0,.69444,.11472,0,.59111],64:[0,.69444,.09208,0,.88555],65:[0,.68611,0,0,.86555],66:[0,.68611,.0992,0,.81666],67:[0,.68611,.14208,0,.82666],68:[0,.68611,.09062,0,.87555],69:[0,.68611,.11431,0,.75666],70:[0,.68611,.12903,0,.72722],71:[0,.68611,.07347,0,.89527],72:[0,.68611,.17208,0,.8961],73:[0,.68611,.15681,0,.47166],74:[0,.68611,.145,0,.61055],75:[0,.68611,.14208,0,.89499],76:[0,.68611,0,0,.69777],77:[0,.68611,.17208,0,1.07277],78:[0,.68611,.17208,0,.8961],79:[0,.68611,.09062,0,.85499],80:[0,.68611,.0992,0,.78721],81:[.19444,.68611,.09062,0,.85499],82:[0,.68611,.02559,0,.85944],83:[0,.68611,.11264,0,.64999],84:[0,.68611,.12903,0,.7961],85:[0,.68611,.17208,0,.88083],86:[0,.68611,.18625,0,.86555],87:[0,.68611,.18625,0,1.15999],88:[0,.68611,.15681,0,.86555],89:[0,.68611,.19803,0,.86555],90:[0,.68611,.14208,0,.70888],91:[.25,.75,.1875,0,.35611],93:[.25,.75,.09972,0,.35611],94:[0,.69444,.06709,0,.59111],95:[.31,.13444,.09811,0,.59111],97:[0,.44444,.09426,0,.59111],98:[0,.69444,.07861,0,.53222],99:[0,.44444,.05222,0,.53222],100:[0,.69444,.10861,0,.59111],101:[0,.44444,.085,0,.53222],102:[.19444,.69444,.21778,0,.4],103:[.19444,.44444,.105,0,.53222],104:[0,.69444,.09426,0,.59111],105:[0,.69326,.11387,0,.35555],106:[.19444,.69326,.1672,0,.35555],107:[0,.69444,.11111,0,.53222],108:[0,.69444,.10861,0,.29666],109:[0,.44444,.09426,0,.94444],110:[0,.44444,.09426,0,.64999],111:[0,.44444,.07861,0,.59111],112:[.19444,.44444,.07861,0,.59111],113:[.19444,.44444,.105,0,.53222],114:[0,.44444,.11111,0,.50167],115:[0,.44444,.08167,0,.48694],116:[0,.63492,.09639,0,.385],117:[0,.44444,.09426,0,.62055],118:[0,.44444,.11111,0,.53222],119:[0,.44444,.11111,0,.76777],120:[0,.44444,.12583,0,.56055],121:[.19444,.44444,.105,0,.56166],122:[0,.44444,.13889,0,.49055],126:[.35,.34444,.11472,0,.59111],160:[0,0,0,0,.25],168:[0,.69444,.11473,0,.59111],176:[0,.69444,0,0,.94888],184:[.17014,0,0,0,.53222],198:[0,.68611,.11431,0,1.02277],216:[.04861,.73472,.09062,0,.88555],223:[.19444,.69444,.09736,0,.665],230:[0,.44444,.085,0,.82666],248:[.09722,.54167,.09458,0,.59111],305:[0,.44444,.09426,0,.35555],338:[0,.68611,.11431,0,1.14054],339:[0,.44444,.085,0,.82666],567:[.19444,.44444,.04611,0,.385],710:[0,.69444,.06709,0,.59111],711:[0,.63194,.08271,0,.59111],713:[0,.59444,.10444,0,.59111],714:[0,.69444,.08528,0,.59111],715:[0,.69444,0,0,.59111],728:[0,.69444,.10333,0,.59111],729:[0,.69444,.12945,0,.35555],730:[0,.69444,0,0,.94888],732:[0,.69444,.11472,0,.59111],733:[0,.69444,.11472,0,.59111],915:[0,.68611,.12903,0,.69777],916:[0,.68611,0,0,.94444],920:[0,.68611,.09062,0,.88555],923:[0,.68611,0,0,.80666],926:[0,.68611,.15092,0,.76777],928:[0,.68611,.17208,0,.8961],931:[0,.68611,.11431,0,.82666],933:[0,.68611,.10778,0,.88555],934:[0,.68611,.05632,0,.82666],936:[0,.68611,.10778,0,.88555],937:[0,.68611,.0992,0,.82666],8211:[0,.44444,.09811,0,.59111],8212:[0,.44444,.09811,0,1.18221],8216:[0,.69444,.12945,0,.35555],8217:[0,.69444,.12945,0,.35555],8220:[0,.69444,.16772,0,.62055],8221:[0,.69444,.07939,0,.62055]},"Main-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.12417,0,.30667],34:[0,.69444,.06961,0,.51444],35:[.19444,.69444,.06616,0,.81777],37:[.05556,.75,.13639,0,.81777],38:[0,.69444,.09694,0,.76666],39:[0,.69444,.12417,0,.30667],40:[.25,.75,.16194,0,.40889],41:[.25,.75,.03694,0,.40889],42:[0,.75,.14917,0,.51111],43:[.05667,.56167,.03694,0,.76666],44:[.19444,.10556,0,0,.30667],45:[0,.43056,.02826,0,.35778],46:[0,.10556,0,0,.30667],47:[.25,.75,.16194,0,.51111],48:[0,.64444,.13556,0,.51111],49:[0,.64444,.13556,0,.51111],50:[0,.64444,.13556,0,.51111],51:[0,.64444,.13556,0,.51111],52:[.19444,.64444,.13556,0,.51111],53:[0,.64444,.13556,0,.51111],54:[0,.64444,.13556,0,.51111],55:[.19444,.64444,.13556,0,.51111],56:[0,.64444,.13556,0,.51111],57:[0,.64444,.13556,0,.51111],58:[0,.43056,.0582,0,.30667],59:[.19444,.43056,.0582,0,.30667],61:[-.13313,.36687,.06616,0,.76666],63:[0,.69444,.1225,0,.51111],64:[0,.69444,.09597,0,.76666],65:[0,.68333,0,0,.74333],66:[0,.68333,.10257,0,.70389],67:[0,.68333,.14528,0,.71555],68:[0,.68333,.09403,0,.755],69:[0,.68333,.12028,0,.67833],70:[0,.68333,.13305,0,.65277],71:[0,.68333,.08722,0,.77361],72:[0,.68333,.16389,0,.74333],73:[0,.68333,.15806,0,.38555],74:[0,.68333,.14028,0,.525],75:[0,.68333,.14528,0,.76888],76:[0,.68333,0,0,.62722],77:[0,.68333,.16389,0,.89666],78:[0,.68333,.16389,0,.74333],79:[0,.68333,.09403,0,.76666],80:[0,.68333,.10257,0,.67833],81:[.19444,.68333,.09403,0,.76666],82:[0,.68333,.03868,0,.72944],83:[0,.68333,.11972,0,.56222],84:[0,.68333,.13305,0,.71555],85:[0,.68333,.16389,0,.74333],86:[0,.68333,.18361,0,.74333],87:[0,.68333,.18361,0,.99888],88:[0,.68333,.15806,0,.74333],89:[0,.68333,.19383,0,.74333],90:[0,.68333,.14528,0,.61333],91:[.25,.75,.1875,0,.30667],93:[.25,.75,.10528,0,.30667],94:[0,.69444,.06646,0,.51111],95:[.31,.12056,.09208,0,.51111],97:[0,.43056,.07671,0,.51111],98:[0,.69444,.06312,0,.46],99:[0,.43056,.05653,0,.46],100:[0,.69444,.10333,0,.51111],101:[0,.43056,.07514,0,.46],102:[.19444,.69444,.21194,0,.30667],103:[.19444,.43056,.08847,0,.46],104:[0,.69444,.07671,0,.51111],105:[0,.65536,.1019,0,.30667],106:[.19444,.65536,.14467,0,.30667],107:[0,.69444,.10764,0,.46],108:[0,.69444,.10333,0,.25555],109:[0,.43056,.07671,0,.81777],110:[0,.43056,.07671,0,.56222],111:[0,.43056,.06312,0,.51111],112:[.19444,.43056,.06312,0,.51111],113:[.19444,.43056,.08847,0,.46],114:[0,.43056,.10764,0,.42166],115:[0,.43056,.08208,0,.40889],116:[0,.61508,.09486,0,.33222],117:[0,.43056,.07671,0,.53666],118:[0,.43056,.10764,0,.46],119:[0,.43056,.10764,0,.66444],120:[0,.43056,.12042,0,.46389],121:[.19444,.43056,.08847,0,.48555],122:[0,.43056,.12292,0,.40889],126:[.35,.31786,.11585,0,.51111],160:[0,0,0,0,.25],168:[0,.66786,.10474,0,.51111],176:[0,.69444,0,0,.83129],184:[.17014,0,0,0,.46],198:[0,.68333,.12028,0,.88277],216:[.04861,.73194,.09403,0,.76666],223:[.19444,.69444,.10514,0,.53666],230:[0,.43056,.07514,0,.71555],248:[.09722,.52778,.09194,0,.51111],338:[0,.68333,.12028,0,.98499],339:[0,.43056,.07514,0,.71555],710:[0,.69444,.06646,0,.51111],711:[0,.62847,.08295,0,.51111],713:[0,.56167,.10333,0,.51111],714:[0,.69444,.09694,0,.51111],715:[0,.69444,0,0,.51111],728:[0,.69444,.10806,0,.51111],729:[0,.66786,.11752,0,.30667],730:[0,.69444,0,0,.83129],732:[0,.66786,.11585,0,.51111],733:[0,.69444,.1225,0,.51111],915:[0,.68333,.13305,0,.62722],916:[0,.68333,0,0,.81777],920:[0,.68333,.09403,0,.76666],923:[0,.68333,0,0,.69222],926:[0,.68333,.15294,0,.66444],928:[0,.68333,.16389,0,.74333],931:[0,.68333,.12028,0,.71555],933:[0,.68333,.11111,0,.76666],934:[0,.68333,.05986,0,.71555],936:[0,.68333,.11111,0,.76666],937:[0,.68333,.10257,0,.71555],8211:[0,.43056,.09208,0,.51111],8212:[0,.43056,.09208,0,1.02222],8216:[0,.69444,.12417,0,.30667],8217:[0,.69444,.12417,0,.30667],8220:[0,.69444,.1685,0,.51444],8221:[0,.69444,.06961,0,.51444],8463:[0,.68889,0,0,.54028]},"Main-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.27778],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.77778],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.19444,.10556,0,0,.27778],45:[0,.43056,0,0,.33333],46:[0,.10556,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.64444,0,0,.5],49:[0,.64444,0,0,.5],50:[0,.64444,0,0,.5],51:[0,.64444,0,0,.5],52:[0,.64444,0,0,.5],53:[0,.64444,0,0,.5],54:[0,.64444,0,0,.5],55:[0,.64444,0,0,.5],56:[0,.64444,0,0,.5],57:[0,.64444,0,0,.5],58:[0,.43056,0,0,.27778],59:[.19444,.43056,0,0,.27778],60:[.0391,.5391,0,0,.77778],61:[-.13313,.36687,0,0,.77778],62:[.0391,.5391,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.77778],65:[0,.68333,0,0,.75],66:[0,.68333,0,0,.70834],67:[0,.68333,0,0,.72222],68:[0,.68333,0,0,.76389],69:[0,.68333,0,0,.68056],70:[0,.68333,0,0,.65278],71:[0,.68333,0,0,.78472],72:[0,.68333,0,0,.75],73:[0,.68333,0,0,.36111],74:[0,.68333,0,0,.51389],75:[0,.68333,0,0,.77778],76:[0,.68333,0,0,.625],77:[0,.68333,0,0,.91667],78:[0,.68333,0,0,.75],79:[0,.68333,0,0,.77778],80:[0,.68333,0,0,.68056],81:[.19444,.68333,0,0,.77778],82:[0,.68333,0,0,.73611],83:[0,.68333,0,0,.55556],84:[0,.68333,0,0,.72222],85:[0,.68333,0,0,.75],86:[0,.68333,.01389,0,.75],87:[0,.68333,.01389,0,1.02778],88:[0,.68333,0,0,.75],89:[0,.68333,.025,0,.75],90:[0,.68333,0,0,.61111],91:[.25,.75,0,0,.27778],92:[.25,.75,0,0,.5],93:[.25,.75,0,0,.27778],94:[0,.69444,0,0,.5],95:[.31,.12056,.02778,0,.5],97:[0,.43056,0,0,.5],98:[0,.69444,0,0,.55556],99:[0,.43056,0,0,.44445],100:[0,.69444,0,0,.55556],101:[0,.43056,0,0,.44445],102:[0,.69444,.07778,0,.30556],103:[.19444,.43056,.01389,0,.5],104:[0,.69444,0,0,.55556],105:[0,.66786,0,0,.27778],106:[.19444,.66786,0,0,.30556],107:[0,.69444,0,0,.52778],108:[0,.69444,0,0,.27778],109:[0,.43056,0,0,.83334],110:[0,.43056,0,0,.55556],111:[0,.43056,0,0,.5],112:[.19444,.43056,0,0,.55556],113:[.19444,.43056,0,0,.52778],114:[0,.43056,0,0,.39167],115:[0,.43056,0,0,.39445],116:[0,.61508,0,0,.38889],117:[0,.43056,0,0,.55556],118:[0,.43056,.01389,0,.52778],119:[0,.43056,.01389,0,.72222],120:[0,.43056,0,0,.52778],121:[.19444,.43056,.01389,0,.52778],122:[0,.43056,0,0,.44445],123:[.25,.75,0,0,.5],124:[.25,.75,0,0,.27778],125:[.25,.75,0,0,.5],126:[.35,.31786,0,0,.5],160:[0,0,0,0,.25],163:[0,.69444,0,0,.76909],167:[.19444,.69444,0,0,.44445],168:[0,.66786,0,0,.5],172:[0,.43056,0,0,.66667],176:[0,.69444,0,0,.75],177:[.08333,.58333,0,0,.77778],182:[.19444,.69444,0,0,.61111],184:[.17014,0,0,0,.44445],198:[0,.68333,0,0,.90278],215:[.08333,.58333,0,0,.77778],216:[.04861,.73194,0,0,.77778],223:[0,.69444,0,0,.5],230:[0,.43056,0,0,.72222],247:[.08333,.58333,0,0,.77778],248:[.09722,.52778,0,0,.5],305:[0,.43056,0,0,.27778],338:[0,.68333,0,0,1.01389],339:[0,.43056,0,0,.77778],567:[.19444,.43056,0,0,.30556],710:[0,.69444,0,0,.5],711:[0,.62847,0,0,.5],713:[0,.56778,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.66786,0,0,.27778],730:[0,.69444,0,0,.75],732:[0,.66786,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.68333,0,0,.625],916:[0,.68333,0,0,.83334],920:[0,.68333,0,0,.77778],923:[0,.68333,0,0,.69445],926:[0,.68333,0,0,.66667],928:[0,.68333,0,0,.75],931:[0,.68333,0,0,.72222],933:[0,.68333,0,0,.77778],934:[0,.68333,0,0,.72222],936:[0,.68333,0,0,.77778],937:[0,.68333,0,0,.72222],8211:[0,.43056,.02778,0,.5],8212:[0,.43056,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5],8224:[.19444,.69444,0,0,.44445],8225:[.19444,.69444,0,0,.44445],8230:[0,.123,0,0,1.172],8242:[0,.55556,0,0,.275],8407:[0,.71444,.15382,0,.5],8463:[0,.68889,0,0,.54028],8465:[0,.69444,0,0,.72222],8467:[0,.69444,0,.11111,.41667],8472:[.19444,.43056,0,.11111,.63646],8476:[0,.69444,0,0,.72222],8501:[0,.69444,0,0,.61111],8592:[-.13313,.36687,0,0,1],8593:[.19444,.69444,0,0,.5],8594:[-.13313,.36687,0,0,1],8595:[.19444,.69444,0,0,.5],8596:[-.13313,.36687,0,0,1],8597:[.25,.75,0,0,.5],8598:[.19444,.69444,0,0,1],8599:[.19444,.69444,0,0,1],8600:[.19444,.69444,0,0,1],8601:[.19444,.69444,0,0,1],8614:[.011,.511,0,0,1],8617:[.011,.511,0,0,1.126],8618:[.011,.511,0,0,1.126],8636:[-.13313,.36687,0,0,1],8637:[-.13313,.36687,0,0,1],8640:[-.13313,.36687,0,0,1],8641:[-.13313,.36687,0,0,1],8652:[.011,.671,0,0,1],8656:[-.13313,.36687,0,0,1],8657:[.19444,.69444,0,0,.61111],8658:[-.13313,.36687,0,0,1],8659:[.19444,.69444,0,0,.61111],8660:[-.13313,.36687,0,0,1],8661:[.25,.75,0,0,.61111],8704:[0,.69444,0,0,.55556],8706:[0,.69444,.05556,.08334,.5309],8707:[0,.69444,0,0,.55556],8709:[.05556,.75,0,0,.5],8711:[0,.68333,0,0,.83334],8712:[.0391,.5391,0,0,.66667],8715:[.0391,.5391,0,0,.66667],8722:[.08333,.58333,0,0,.77778],8723:[.08333,.58333,0,0,.77778],8725:[.25,.75,0,0,.5],8726:[.25,.75,0,0,.5],8727:[-.03472,.46528,0,0,.5],8728:[-.05555,.44445,0,0,.5],8729:[-.05555,.44445,0,0,.5],8730:[.2,.8,0,0,.83334],8733:[0,.43056,0,0,.77778],8734:[0,.43056,0,0,1],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.27778],8741:[.25,.75,0,0,.5],8743:[0,.55556,0,0,.66667],8744:[0,.55556,0,0,.66667],8745:[0,.55556,0,0,.66667],8746:[0,.55556,0,0,.66667],8747:[.19444,.69444,.11111,0,.41667],8764:[-.13313,.36687,0,0,.77778],8768:[.19444,.69444,0,0,.27778],8771:[-.03625,.46375,0,0,.77778],8773:[-.022,.589,0,0,.778],8776:[-.01688,.48312,0,0,.77778],8781:[-.03625,.46375,0,0,.77778],8784:[-.133,.673,0,0,.778],8801:[-.03625,.46375,0,0,.77778],8804:[.13597,.63597,0,0,.77778],8805:[.13597,.63597,0,0,.77778],8810:[.0391,.5391,0,0,1],8811:[.0391,.5391,0,0,1],8826:[.0391,.5391,0,0,.77778],8827:[.0391,.5391,0,0,.77778],8834:[.0391,.5391,0,0,.77778],8835:[.0391,.5391,0,0,.77778],8838:[.13597,.63597,0,0,.77778],8839:[.13597,.63597,0,0,.77778],8846:[0,.55556,0,0,.66667],8849:[.13597,.63597,0,0,.77778],8850:[.13597,.63597,0,0,.77778],8851:[0,.55556,0,0,.66667],8852:[0,.55556,0,0,.66667],8853:[.08333,.58333,0,0,.77778],8854:[.08333,.58333,0,0,.77778],8855:[.08333,.58333,0,0,.77778],8856:[.08333,.58333,0,0,.77778],8857:[.08333,.58333,0,0,.77778],8866:[0,.69444,0,0,.61111],8867:[0,.69444,0,0,.61111],8868:[0,.69444,0,0,.77778],8869:[0,.69444,0,0,.77778],8872:[.249,.75,0,0,.867],8900:[-.05555,.44445,0,0,.5],8901:[-.05555,.44445,0,0,.27778],8902:[-.03472,.46528,0,0,.5],8904:[.005,.505,0,0,.9],8942:[.03,.903,0,0,.278],8943:[-.19,.313,0,0,1.172],8945:[-.1,.823,0,0,1.282],8968:[.25,.75,0,0,.44445],8969:[.25,.75,0,0,.44445],8970:[.25,.75,0,0,.44445],8971:[.25,.75,0,0,.44445],8994:[-.14236,.35764,0,0,1],8995:[-.14236,.35764,0,0,1],9136:[.244,.744,0,0,.412],9137:[.244,.745,0,0,.412],9651:[.19444,.69444,0,0,.88889],9657:[-.03472,.46528,0,0,.5],9661:[.19444,.69444,0,0,.88889],9667:[-.03472,.46528,0,0,.5],9711:[.19444,.69444,0,0,1],9824:[.12963,.69444,0,0,.77778],9825:[.12963,.69444,0,0,.77778],9826:[.12963,.69444,0,0,.77778],9827:[.12963,.69444,0,0,.77778],9837:[0,.75,0,0,.38889],9838:[.19444,.69444,0,0,.38889],9839:[.19444,.69444,0,0,.38889],10216:[.25,.75,0,0,.38889],10217:[.25,.75,0,0,.38889],10222:[.244,.744,0,0,.412],10223:[.244,.745,0,0,.412],10229:[.011,.511,0,0,1.609],10230:[.011,.511,0,0,1.638],10231:[.011,.511,0,0,1.859],10232:[.024,.525,0,0,1.609],10233:[.024,.525,0,0,1.638],10234:[.024,.525,0,0,1.858],10236:[.011,.511,0,0,1.638],10815:[0,.68333,0,0,.75],10927:[.13597,.63597,0,0,.77778],10928:[.13597,.63597,0,0,.77778],57376:[.19444,.69444,0,0,0]},"Math-BoldItalic":{32:[0,0,0,0,.25],48:[0,.44444,0,0,.575],49:[0,.44444,0,0,.575],50:[0,.44444,0,0,.575],51:[.19444,.44444,0,0,.575],52:[.19444,.44444,0,0,.575],53:[.19444,.44444,0,0,.575],54:[0,.64444,0,0,.575],55:[.19444,.44444,0,0,.575],56:[0,.64444,0,0,.575],57:[.19444,.44444,0,0,.575],65:[0,.68611,0,0,.86944],66:[0,.68611,.04835,0,.8664],67:[0,.68611,.06979,0,.81694],68:[0,.68611,.03194,0,.93812],69:[0,.68611,.05451,0,.81007],70:[0,.68611,.15972,0,.68889],71:[0,.68611,0,0,.88673],72:[0,.68611,.08229,0,.98229],73:[0,.68611,.07778,0,.51111],74:[0,.68611,.10069,0,.63125],75:[0,.68611,.06979,0,.97118],76:[0,.68611,0,0,.75555],77:[0,.68611,.11424,0,1.14201],78:[0,.68611,.11424,0,.95034],79:[0,.68611,.03194,0,.83666],80:[0,.68611,.15972,0,.72309],81:[.19444,.68611,0,0,.86861],82:[0,.68611,.00421,0,.87235],83:[0,.68611,.05382,0,.69271],84:[0,.68611,.15972,0,.63663],85:[0,.68611,.11424,0,.80027],86:[0,.68611,.25555,0,.67778],87:[0,.68611,.15972,0,1.09305],88:[0,.68611,.07778,0,.94722],89:[0,.68611,.25555,0,.67458],90:[0,.68611,.06979,0,.77257],97:[0,.44444,0,0,.63287],98:[0,.69444,0,0,.52083],99:[0,.44444,0,0,.51342],100:[0,.69444,0,0,.60972],101:[0,.44444,0,0,.55361],102:[.19444,.69444,.11042,0,.56806],103:[.19444,.44444,.03704,0,.5449],104:[0,.69444,0,0,.66759],105:[0,.69326,0,0,.4048],106:[.19444,.69326,.0622,0,.47083],107:[0,.69444,.01852,0,.6037],108:[0,.69444,.0088,0,.34815],109:[0,.44444,0,0,1.0324],110:[0,.44444,0,0,.71296],111:[0,.44444,0,0,.58472],112:[.19444,.44444,0,0,.60092],113:[.19444,.44444,.03704,0,.54213],114:[0,.44444,.03194,0,.5287],115:[0,.44444,0,0,.53125],116:[0,.63492,0,0,.41528],117:[0,.44444,0,0,.68102],118:[0,.44444,.03704,0,.56666],119:[0,.44444,.02778,0,.83148],120:[0,.44444,0,0,.65903],121:[.19444,.44444,.03704,0,.59028],122:[0,.44444,.04213,0,.55509],160:[0,0,0,0,.25],915:[0,.68611,.15972,0,.65694],916:[0,.68611,0,0,.95833],920:[0,.68611,.03194,0,.86722],923:[0,.68611,0,0,.80555],926:[0,.68611,.07458,0,.84125],928:[0,.68611,.08229,0,.98229],931:[0,.68611,.05451,0,.88507],933:[0,.68611,.15972,0,.67083],934:[0,.68611,0,0,.76666],936:[0,.68611,.11653,0,.71402],937:[0,.68611,.04835,0,.8789],945:[0,.44444,0,0,.76064],946:[.19444,.69444,.03403,0,.65972],947:[.19444,.44444,.06389,0,.59003],948:[0,.69444,.03819,0,.52222],949:[0,.44444,0,0,.52882],950:[.19444,.69444,.06215,0,.50833],951:[.19444,.44444,.03704,0,.6],952:[0,.69444,.03194,0,.5618],953:[0,.44444,0,0,.41204],954:[0,.44444,0,0,.66759],955:[0,.69444,0,0,.67083],956:[.19444,.44444,0,0,.70787],957:[0,.44444,.06898,0,.57685],958:[.19444,.69444,.03021,0,.50833],959:[0,.44444,0,0,.58472],960:[0,.44444,.03704,0,.68241],961:[.19444,.44444,0,0,.6118],962:[.09722,.44444,.07917,0,.42361],963:[0,.44444,.03704,0,.68588],964:[0,.44444,.13472,0,.52083],965:[0,.44444,.03704,0,.63055],966:[.19444,.44444,0,0,.74722],967:[.19444,.44444,0,0,.71805],968:[.19444,.69444,.03704,0,.75833],969:[0,.44444,.03704,0,.71782],977:[0,.69444,0,0,.69155],981:[.19444,.69444,0,0,.7125],982:[0,.44444,.03194,0,.975],1009:[.19444,.44444,0,0,.6118],1013:[0,.44444,0,0,.48333],57649:[0,.44444,0,0,.39352],57911:[.19444,.44444,0,0,.43889]},"Math-Italic":{32:[0,0,0,0,.25],48:[0,.43056,0,0,.5],49:[0,.43056,0,0,.5],50:[0,.43056,0,0,.5],51:[.19444,.43056,0,0,.5],52:[.19444,.43056,0,0,.5],53:[.19444,.43056,0,0,.5],54:[0,.64444,0,0,.5],55:[.19444,.43056,0,0,.5],56:[0,.64444,0,0,.5],57:[.19444,.43056,0,0,.5],65:[0,.68333,0,.13889,.75],66:[0,.68333,.05017,.08334,.75851],67:[0,.68333,.07153,.08334,.71472],68:[0,.68333,.02778,.05556,.82792],69:[0,.68333,.05764,.08334,.7382],70:[0,.68333,.13889,.08334,.64306],71:[0,.68333,0,.08334,.78625],72:[0,.68333,.08125,.05556,.83125],73:[0,.68333,.07847,.11111,.43958],74:[0,.68333,.09618,.16667,.55451],75:[0,.68333,.07153,.05556,.84931],76:[0,.68333,0,.02778,.68056],77:[0,.68333,.10903,.08334,.97014],78:[0,.68333,.10903,.08334,.80347],79:[0,.68333,.02778,.08334,.76278],80:[0,.68333,.13889,.08334,.64201],81:[.19444,.68333,0,.08334,.79056],82:[0,.68333,.00773,.08334,.75929],83:[0,.68333,.05764,.08334,.6132],84:[0,.68333,.13889,.08334,.58438],85:[0,.68333,.10903,.02778,.68278],86:[0,.68333,.22222,0,.58333],87:[0,.68333,.13889,0,.94445],88:[0,.68333,.07847,.08334,.82847],89:[0,.68333,.22222,0,.58056],90:[0,.68333,.07153,.08334,.68264],97:[0,.43056,0,0,.52859],98:[0,.69444,0,0,.42917],99:[0,.43056,0,.05556,.43276],100:[0,.69444,0,.16667,.52049],101:[0,.43056,0,.05556,.46563],102:[.19444,.69444,.10764,.16667,.48959],103:[.19444,.43056,.03588,.02778,.47697],104:[0,.69444,0,0,.57616],105:[0,.65952,0,0,.34451],106:[.19444,.65952,.05724,0,.41181],107:[0,.69444,.03148,0,.5206],108:[0,.69444,.01968,.08334,.29838],109:[0,.43056,0,0,.87801],110:[0,.43056,0,0,.60023],111:[0,.43056,0,.05556,.48472],112:[.19444,.43056,0,.08334,.50313],113:[.19444,.43056,.03588,.08334,.44641],114:[0,.43056,.02778,.05556,.45116],115:[0,.43056,0,.05556,.46875],116:[0,.61508,0,.08334,.36111],117:[0,.43056,0,.02778,.57246],118:[0,.43056,.03588,.02778,.48472],119:[0,.43056,.02691,.08334,.71592],120:[0,.43056,0,.02778,.57153],121:[.19444,.43056,.03588,.05556,.49028],122:[0,.43056,.04398,.05556,.46505],160:[0,0,0,0,.25],915:[0,.68333,.13889,.08334,.61528],916:[0,.68333,0,.16667,.83334],920:[0,.68333,.02778,.08334,.76278],923:[0,.68333,0,.16667,.69445],926:[0,.68333,.07569,.08334,.74236],928:[0,.68333,.08125,.05556,.83125],931:[0,.68333,.05764,.08334,.77986],933:[0,.68333,.13889,.05556,.58333],934:[0,.68333,0,.08334,.66667],936:[0,.68333,.11,.05556,.61222],937:[0,.68333,.05017,.08334,.7724],945:[0,.43056,.0037,.02778,.6397],946:[.19444,.69444,.05278,.08334,.56563],947:[.19444,.43056,.05556,0,.51773],948:[0,.69444,.03785,.05556,.44444],949:[0,.43056,0,.08334,.46632],950:[.19444,.69444,.07378,.08334,.4375],951:[.19444,.43056,.03588,.05556,.49653],952:[0,.69444,.02778,.08334,.46944],953:[0,.43056,0,.05556,.35394],954:[0,.43056,0,0,.57616],955:[0,.69444,0,0,.58334],956:[.19444,.43056,0,.02778,.60255],957:[0,.43056,.06366,.02778,.49398],958:[.19444,.69444,.04601,.11111,.4375],959:[0,.43056,0,.05556,.48472],960:[0,.43056,.03588,0,.57003],961:[.19444,.43056,0,.08334,.51702],962:[.09722,.43056,.07986,.08334,.36285],963:[0,.43056,.03588,0,.57141],964:[0,.43056,.1132,.02778,.43715],965:[0,.43056,.03588,.02778,.54028],966:[.19444,.43056,0,.08334,.65417],967:[.19444,.43056,0,.05556,.62569],968:[.19444,.69444,.03588,.11111,.65139],969:[0,.43056,.03588,0,.62245],977:[0,.69444,0,.08334,.59144],981:[.19444,.69444,0,.08334,.59583],982:[0,.43056,.02778,0,.82813],1009:[.19444,.43056,0,.08334,.51702],1013:[0,.43056,0,.05556,.4059],57649:[0,.43056,0,.02778,.32246],57911:[.19444,.43056,0,.08334,.38403]},"SansSerif-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.36667],34:[0,.69444,0,0,.55834],35:[.19444,.69444,0,0,.91667],36:[.05556,.75,0,0,.55],37:[.05556,.75,0,0,1.02912],38:[0,.69444,0,0,.83056],39:[0,.69444,0,0,.30556],40:[.25,.75,0,0,.42778],41:[.25,.75,0,0,.42778],42:[0,.75,0,0,.55],43:[.11667,.61667,0,0,.85556],44:[.10556,.13056,0,0,.30556],45:[0,.45833,0,0,.36667],46:[0,.13056,0,0,.30556],47:[.25,.75,0,0,.55],48:[0,.69444,0,0,.55],49:[0,.69444,0,0,.55],50:[0,.69444,0,0,.55],51:[0,.69444,0,0,.55],52:[0,.69444,0,0,.55],53:[0,.69444,0,0,.55],54:[0,.69444,0,0,.55],55:[0,.69444,0,0,.55],56:[0,.69444,0,0,.55],57:[0,.69444,0,0,.55],58:[0,.45833,0,0,.30556],59:[.10556,.45833,0,0,.30556],61:[-.09375,.40625,0,0,.85556],63:[0,.69444,0,0,.51945],64:[0,.69444,0,0,.73334],65:[0,.69444,0,0,.73334],66:[0,.69444,0,0,.73334],67:[0,.69444,0,0,.70278],68:[0,.69444,0,0,.79445],69:[0,.69444,0,0,.64167],70:[0,.69444,0,0,.61111],71:[0,.69444,0,0,.73334],72:[0,.69444,0,0,.79445],73:[0,.69444,0,0,.33056],74:[0,.69444,0,0,.51945],75:[0,.69444,0,0,.76389],76:[0,.69444,0,0,.58056],77:[0,.69444,0,0,.97778],78:[0,.69444,0,0,.79445],79:[0,.69444,0,0,.79445],80:[0,.69444,0,0,.70278],81:[.10556,.69444,0,0,.79445],82:[0,.69444,0,0,.70278],83:[0,.69444,0,0,.61111],84:[0,.69444,0,0,.73334],85:[0,.69444,0,0,.76389],86:[0,.69444,.01528,0,.73334],87:[0,.69444,.01528,0,1.03889],88:[0,.69444,0,0,.73334],89:[0,.69444,.0275,0,.73334],90:[0,.69444,0,0,.67223],91:[.25,.75,0,0,.34306],93:[.25,.75,0,0,.34306],94:[0,.69444,0,0,.55],95:[.35,.10833,.03056,0,.55],97:[0,.45833,0,0,.525],98:[0,.69444,0,0,.56111],99:[0,.45833,0,0,.48889],100:[0,.69444,0,0,.56111],101:[0,.45833,0,0,.51111],102:[0,.69444,.07639,0,.33611],103:[.19444,.45833,.01528,0,.55],104:[0,.69444,0,0,.56111],105:[0,.69444,0,0,.25556],106:[.19444,.69444,0,0,.28611],107:[0,.69444,0,0,.53056],108:[0,.69444,0,0,.25556],109:[0,.45833,0,0,.86667],110:[0,.45833,0,0,.56111],111:[0,.45833,0,0,.55],112:[.19444,.45833,0,0,.56111],113:[.19444,.45833,0,0,.56111],114:[0,.45833,.01528,0,.37222],115:[0,.45833,0,0,.42167],116:[0,.58929,0,0,.40417],117:[0,.45833,0,0,.56111],118:[0,.45833,.01528,0,.5],119:[0,.45833,.01528,0,.74445],120:[0,.45833,0,0,.5],121:[.19444,.45833,.01528,0,.5],122:[0,.45833,0,0,.47639],126:[.35,.34444,0,0,.55],160:[0,0,0,0,.25],168:[0,.69444,0,0,.55],176:[0,.69444,0,0,.73334],180:[0,.69444,0,0,.55],184:[.17014,0,0,0,.48889],305:[0,.45833,0,0,.25556],567:[.19444,.45833,0,0,.28611],710:[0,.69444,0,0,.55],711:[0,.63542,0,0,.55],713:[0,.63778,0,0,.55],728:[0,.69444,0,0,.55],729:[0,.69444,0,0,.30556],730:[0,.69444,0,0,.73334],732:[0,.69444,0,0,.55],733:[0,.69444,0,0,.55],915:[0,.69444,0,0,.58056],916:[0,.69444,0,0,.91667],920:[0,.69444,0,0,.85556],923:[0,.69444,0,0,.67223],926:[0,.69444,0,0,.73334],928:[0,.69444,0,0,.79445],931:[0,.69444,0,0,.79445],933:[0,.69444,0,0,.85556],934:[0,.69444,0,0,.79445],936:[0,.69444,0,0,.85556],937:[0,.69444,0,0,.79445],8211:[0,.45833,.03056,0,.55],8212:[0,.45833,.03056,0,1.10001],8216:[0,.69444,0,0,.30556],8217:[0,.69444,0,0,.30556],8220:[0,.69444,0,0,.55834],8221:[0,.69444,0,0,.55834]},"SansSerif-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.05733,0,.31945],34:[0,.69444,.00316,0,.5],35:[.19444,.69444,.05087,0,.83334],36:[.05556,.75,.11156,0,.5],37:[.05556,.75,.03126,0,.83334],38:[0,.69444,.03058,0,.75834],39:[0,.69444,.07816,0,.27778],40:[.25,.75,.13164,0,.38889],41:[.25,.75,.02536,0,.38889],42:[0,.75,.11775,0,.5],43:[.08333,.58333,.02536,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,.01946,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,.13164,0,.5],48:[0,.65556,.11156,0,.5],49:[0,.65556,.11156,0,.5],50:[0,.65556,.11156,0,.5],51:[0,.65556,.11156,0,.5],52:[0,.65556,.11156,0,.5],53:[0,.65556,.11156,0,.5],54:[0,.65556,.11156,0,.5],55:[0,.65556,.11156,0,.5],56:[0,.65556,.11156,0,.5],57:[0,.65556,.11156,0,.5],58:[0,.44444,.02502,0,.27778],59:[.125,.44444,.02502,0,.27778],61:[-.13,.37,.05087,0,.77778],63:[0,.69444,.11809,0,.47222],64:[0,.69444,.07555,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,.08293,0,.66667],67:[0,.69444,.11983,0,.63889],68:[0,.69444,.07555,0,.72223],69:[0,.69444,.11983,0,.59722],70:[0,.69444,.13372,0,.56945],71:[0,.69444,.11983,0,.66667],72:[0,.69444,.08094,0,.70834],73:[0,.69444,.13372,0,.27778],74:[0,.69444,.08094,0,.47222],75:[0,.69444,.11983,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,.08094,0,.875],78:[0,.69444,.08094,0,.70834],79:[0,.69444,.07555,0,.73611],80:[0,.69444,.08293,0,.63889],81:[.125,.69444,.07555,0,.73611],82:[0,.69444,.08293,0,.64584],83:[0,.69444,.09205,0,.55556],84:[0,.69444,.13372,0,.68056],85:[0,.69444,.08094,0,.6875],86:[0,.69444,.1615,0,.66667],87:[0,.69444,.1615,0,.94445],88:[0,.69444,.13372,0,.66667],89:[0,.69444,.17261,0,.66667],90:[0,.69444,.11983,0,.61111],91:[.25,.75,.15942,0,.28889],93:[.25,.75,.08719,0,.28889],94:[0,.69444,.0799,0,.5],95:[.35,.09444,.08616,0,.5],97:[0,.44444,.00981,0,.48056],98:[0,.69444,.03057,0,.51667],99:[0,.44444,.08336,0,.44445],100:[0,.69444,.09483,0,.51667],101:[0,.44444,.06778,0,.44445],102:[0,.69444,.21705,0,.30556],103:[.19444,.44444,.10836,0,.5],104:[0,.69444,.01778,0,.51667],105:[0,.67937,.09718,0,.23889],106:[.19444,.67937,.09162,0,.26667],107:[0,.69444,.08336,0,.48889],108:[0,.69444,.09483,0,.23889],109:[0,.44444,.01778,0,.79445],110:[0,.44444,.01778,0,.51667],111:[0,.44444,.06613,0,.5],112:[.19444,.44444,.0389,0,.51667],113:[.19444,.44444,.04169,0,.51667],114:[0,.44444,.10836,0,.34167],115:[0,.44444,.0778,0,.38333],116:[0,.57143,.07225,0,.36111],117:[0,.44444,.04169,0,.51667],118:[0,.44444,.10836,0,.46111],119:[0,.44444,.10836,0,.68334],120:[0,.44444,.09169,0,.46111],121:[.19444,.44444,.10836,0,.46111],122:[0,.44444,.08752,0,.43472],126:[.35,.32659,.08826,0,.5],160:[0,0,0,0,.25],168:[0,.67937,.06385,0,.5],176:[0,.69444,0,0,.73752],184:[.17014,0,0,0,.44445],305:[0,.44444,.04169,0,.23889],567:[.19444,.44444,.04169,0,.26667],710:[0,.69444,.0799,0,.5],711:[0,.63194,.08432,0,.5],713:[0,.60889,.08776,0,.5],714:[0,.69444,.09205,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,.09483,0,.5],729:[0,.67937,.07774,0,.27778],730:[0,.69444,0,0,.73752],732:[0,.67659,.08826,0,.5],733:[0,.69444,.09205,0,.5],915:[0,.69444,.13372,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,.07555,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,.12816,0,.66667],928:[0,.69444,.08094,0,.70834],931:[0,.69444,.11983,0,.72222],933:[0,.69444,.09031,0,.77778],934:[0,.69444,.04603,0,.72222],936:[0,.69444,.09031,0,.77778],937:[0,.69444,.08293,0,.72222],8211:[0,.44444,.08616,0,.5],8212:[0,.44444,.08616,0,1],8216:[0,.69444,.07816,0,.27778],8217:[0,.69444,.07816,0,.27778],8220:[0,.69444,.14205,0,.5],8221:[0,.69444,.00316,0,.5]},"SansSerif-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.31945],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.75834],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,0,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.65556,0,0,.5],49:[0,.65556,0,0,.5],50:[0,.65556,0,0,.5],51:[0,.65556,0,0,.5],52:[0,.65556,0,0,.5],53:[0,.65556,0,0,.5],54:[0,.65556,0,0,.5],55:[0,.65556,0,0,.5],56:[0,.65556,0,0,.5],57:[0,.65556,0,0,.5],58:[0,.44444,0,0,.27778],59:[.125,.44444,0,0,.27778],61:[-.13,.37,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,0,0,.66667],67:[0,.69444,0,0,.63889],68:[0,.69444,0,0,.72223],69:[0,.69444,0,0,.59722],70:[0,.69444,0,0,.56945],71:[0,.69444,0,0,.66667],72:[0,.69444,0,0,.70834],73:[0,.69444,0,0,.27778],74:[0,.69444,0,0,.47222],75:[0,.69444,0,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,0,0,.875],78:[0,.69444,0,0,.70834],79:[0,.69444,0,0,.73611],80:[0,.69444,0,0,.63889],81:[.125,.69444,0,0,.73611],82:[0,.69444,0,0,.64584],83:[0,.69444,0,0,.55556],84:[0,.69444,0,0,.68056],85:[0,.69444,0,0,.6875],86:[0,.69444,.01389,0,.66667],87:[0,.69444,.01389,0,.94445],88:[0,.69444,0,0,.66667],89:[0,.69444,.025,0,.66667],90:[0,.69444,0,0,.61111],91:[.25,.75,0,0,.28889],93:[.25,.75,0,0,.28889],94:[0,.69444,0,0,.5],95:[.35,.09444,.02778,0,.5],97:[0,.44444,0,0,.48056],98:[0,.69444,0,0,.51667],99:[0,.44444,0,0,.44445],100:[0,.69444,0,0,.51667],101:[0,.44444,0,0,.44445],102:[0,.69444,.06944,0,.30556],103:[.19444,.44444,.01389,0,.5],104:[0,.69444,0,0,.51667],105:[0,.67937,0,0,.23889],106:[.19444,.67937,0,0,.26667],107:[0,.69444,0,0,.48889],108:[0,.69444,0,0,.23889],109:[0,.44444,0,0,.79445],110:[0,.44444,0,0,.51667],111:[0,.44444,0,0,.5],112:[.19444,.44444,0,0,.51667],113:[.19444,.44444,0,0,.51667],114:[0,.44444,.01389,0,.34167],115:[0,.44444,0,0,.38333],116:[0,.57143,0,0,.36111],117:[0,.44444,0,0,.51667],118:[0,.44444,.01389,0,.46111],119:[0,.44444,.01389,0,.68334],120:[0,.44444,0,0,.46111],121:[.19444,.44444,.01389,0,.46111],122:[0,.44444,0,0,.43472],126:[.35,.32659,0,0,.5],160:[0,0,0,0,.25],168:[0,.67937,0,0,.5],176:[0,.69444,0,0,.66667],184:[.17014,0,0,0,.44445],305:[0,.44444,0,0,.23889],567:[.19444,.44444,0,0,.26667],710:[0,.69444,0,0,.5],711:[0,.63194,0,0,.5],713:[0,.60889,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.67937,0,0,.27778],730:[0,.69444,0,0,.66667],732:[0,.67659,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.69444,0,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,0,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,0,0,.66667],928:[0,.69444,0,0,.70834],931:[0,.69444,0,0,.72222],933:[0,.69444,0,0,.77778],934:[0,.69444,0,0,.72222],936:[0,.69444,0,0,.77778],937:[0,.69444,0,0,.72222],8211:[0,.44444,.02778,0,.5],8212:[0,.44444,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5]},"Script-Regular":{32:[0,0,0,0,.25],65:[0,.7,.22925,0,.80253],66:[0,.7,.04087,0,.90757],67:[0,.7,.1689,0,.66619],68:[0,.7,.09371,0,.77443],69:[0,.7,.18583,0,.56162],70:[0,.7,.13634,0,.89544],71:[0,.7,.17322,0,.60961],72:[0,.7,.29694,0,.96919],73:[0,.7,.19189,0,.80907],74:[.27778,.7,.19189,0,1.05159],75:[0,.7,.31259,0,.91364],76:[0,.7,.19189,0,.87373],77:[0,.7,.15981,0,1.08031],78:[0,.7,.3525,0,.9015],79:[0,.7,.08078,0,.73787],80:[0,.7,.08078,0,1.01262],81:[0,.7,.03305,0,.88282],82:[0,.7,.06259,0,.85],83:[0,.7,.19189,0,.86767],84:[0,.7,.29087,0,.74697],85:[0,.7,.25815,0,.79996],86:[0,.7,.27523,0,.62204],87:[0,.7,.27523,0,.80532],88:[0,.7,.26006,0,.94445],89:[0,.7,.2939,0,.70961],90:[0,.7,.24037,0,.8212],160:[0,0,0,0,.25]},"Size1-Regular":{32:[0,0,0,0,.25],40:[.35001,.85,0,0,.45834],41:[.35001,.85,0,0,.45834],47:[.35001,.85,0,0,.57778],91:[.35001,.85,0,0,.41667],92:[.35001,.85,0,0,.57778],93:[.35001,.85,0,0,.41667],123:[.35001,.85,0,0,.58334],125:[.35001,.85,0,0,.58334],160:[0,0,0,0,.25],710:[0,.72222,0,0,.55556],732:[0,.72222,0,0,.55556],770:[0,.72222,0,0,.55556],771:[0,.72222,0,0,.55556],8214:[-99e-5,.601,0,0,.77778],8593:[1e-5,.6,0,0,.66667],8595:[1e-5,.6,0,0,.66667],8657:[1e-5,.6,0,0,.77778],8659:[1e-5,.6,0,0,.77778],8719:[.25001,.75,0,0,.94445],8720:[.25001,.75,0,0,.94445],8721:[.25001,.75,0,0,1.05556],8730:[.35001,.85,0,0,1],8739:[-.00599,.606,0,0,.33333],8741:[-.00599,.606,0,0,.55556],8747:[.30612,.805,.19445,0,.47222],8748:[.306,.805,.19445,0,.47222],8749:[.306,.805,.19445,0,.47222],8750:[.30612,.805,.19445,0,.47222],8896:[.25001,.75,0,0,.83334],8897:[.25001,.75,0,0,.83334],8898:[.25001,.75,0,0,.83334],8899:[.25001,.75,0,0,.83334],8968:[.35001,.85,0,0,.47222],8969:[.35001,.85,0,0,.47222],8970:[.35001,.85,0,0,.47222],8971:[.35001,.85,0,0,.47222],9168:[-99e-5,.601,0,0,.66667],10216:[.35001,.85,0,0,.47222],10217:[.35001,.85,0,0,.47222],10752:[.25001,.75,0,0,1.11111],10753:[.25001,.75,0,0,1.11111],10754:[.25001,.75,0,0,1.11111],10756:[.25001,.75,0,0,.83334],10758:[.25001,.75,0,0,.83334]},"Size2-Regular":{32:[0,0,0,0,.25],40:[.65002,1.15,0,0,.59722],41:[.65002,1.15,0,0,.59722],47:[.65002,1.15,0,0,.81111],91:[.65002,1.15,0,0,.47222],92:[.65002,1.15,0,0,.81111],93:[.65002,1.15,0,0,.47222],123:[.65002,1.15,0,0,.66667],125:[.65002,1.15,0,0,.66667],160:[0,0,0,0,.25],710:[0,.75,0,0,1],732:[0,.75,0,0,1],770:[0,.75,0,0,1],771:[0,.75,0,0,1],8719:[.55001,1.05,0,0,1.27778],8720:[.55001,1.05,0,0,1.27778],8721:[.55001,1.05,0,0,1.44445],8730:[.65002,1.15,0,0,1],8747:[.86225,1.36,.44445,0,.55556],8748:[.862,1.36,.44445,0,.55556],8749:[.862,1.36,.44445,0,.55556],8750:[.86225,1.36,.44445,0,.55556],8896:[.55001,1.05,0,0,1.11111],8897:[.55001,1.05,0,0,1.11111],8898:[.55001,1.05,0,0,1.11111],8899:[.55001,1.05,0,0,1.11111],8968:[.65002,1.15,0,0,.52778],8969:[.65002,1.15,0,0,.52778],8970:[.65002,1.15,0,0,.52778],8971:[.65002,1.15,0,0,.52778],10216:[.65002,1.15,0,0,.61111],10217:[.65002,1.15,0,0,.61111],10752:[.55001,1.05,0,0,1.51112],10753:[.55001,1.05,0,0,1.51112],10754:[.55001,1.05,0,0,1.51112],10756:[.55001,1.05,0,0,1.11111],10758:[.55001,1.05,0,0,1.11111]},"Size3-Regular":{32:[0,0,0,0,.25],40:[.95003,1.45,0,0,.73611],41:[.95003,1.45,0,0,.73611],47:[.95003,1.45,0,0,1.04445],91:[.95003,1.45,0,0,.52778],92:[.95003,1.45,0,0,1.04445],93:[.95003,1.45,0,0,.52778],123:[.95003,1.45,0,0,.75],125:[.95003,1.45,0,0,.75],160:[0,0,0,0,.25],710:[0,.75,0,0,1.44445],732:[0,.75,0,0,1.44445],770:[0,.75,0,0,1.44445],771:[0,.75,0,0,1.44445],8730:[.95003,1.45,0,0,1],8968:[.95003,1.45,0,0,.58334],8969:[.95003,1.45,0,0,.58334],8970:[.95003,1.45,0,0,.58334],8971:[.95003,1.45,0,0,.58334],10216:[.95003,1.45,0,0,.75],10217:[.95003,1.45,0,0,.75]},"Size4-Regular":{32:[0,0,0,0,.25],40:[1.25003,1.75,0,0,.79167],41:[1.25003,1.75,0,0,.79167],47:[1.25003,1.75,0,0,1.27778],91:[1.25003,1.75,0,0,.58334],92:[1.25003,1.75,0,0,1.27778],93:[1.25003,1.75,0,0,.58334],123:[1.25003,1.75,0,0,.80556],125:[1.25003,1.75,0,0,.80556],160:[0,0,0,0,.25],710:[0,.825,0,0,1.8889],732:[0,.825,0,0,1.8889],770:[0,.825,0,0,1.8889],771:[0,.825,0,0,1.8889],8730:[1.25003,1.75,0,0,1],8968:[1.25003,1.75,0,0,.63889],8969:[1.25003,1.75,0,0,.63889],8970:[1.25003,1.75,0,0,.63889],8971:[1.25003,1.75,0,0,.63889],9115:[.64502,1.155,0,0,.875],9116:[1e-5,.6,0,0,.875],9117:[.64502,1.155,0,0,.875],9118:[.64502,1.155,0,0,.875],9119:[1e-5,.6,0,0,.875],9120:[.64502,1.155,0,0,.875],9121:[.64502,1.155,0,0,.66667],9122:[-99e-5,.601,0,0,.66667],9123:[.64502,1.155,0,0,.66667],9124:[.64502,1.155,0,0,.66667],9125:[-99e-5,.601,0,0,.66667],9126:[.64502,1.155,0,0,.66667],9127:[1e-5,.9,0,0,.88889],9128:[.65002,1.15,0,0,.88889],9129:[.90001,0,0,0,.88889],9130:[0,.3,0,0,.88889],9131:[1e-5,.9,0,0,.88889],9132:[.65002,1.15,0,0,.88889],9133:[.90001,0,0,0,.88889],9143:[.88502,.915,0,0,1.05556],10216:[1.25003,1.75,0,0,.80556],10217:[1.25003,1.75,0,0,.80556],57344:[-.00499,.605,0,0,1.05556],57345:[-.00499,.605,0,0,1.05556],57680:[0,.12,0,0,.45],57681:[0,.12,0,0,.45],57682:[0,.12,0,0,.45],57683:[0,.12,0,0,.45]},"Typewriter-Regular":{32:[0,0,0,0,.525],33:[0,.61111,0,0,.525],34:[0,.61111,0,0,.525],35:[0,.61111,0,0,.525],36:[.08333,.69444,0,0,.525],37:[.08333,.69444,0,0,.525],38:[0,.61111,0,0,.525],39:[0,.61111,0,0,.525],40:[.08333,.69444,0,0,.525],41:[.08333,.69444,0,0,.525],42:[0,.52083,0,0,.525],43:[-.08056,.53055,0,0,.525],44:[.13889,.125,0,0,.525],45:[-.08056,.53055,0,0,.525],46:[0,.125,0,0,.525],47:[.08333,.69444,0,0,.525],48:[0,.61111,0,0,.525],49:[0,.61111,0,0,.525],50:[0,.61111,0,0,.525],51:[0,.61111,0,0,.525],52:[0,.61111,0,0,.525],53:[0,.61111,0,0,.525],54:[0,.61111,0,0,.525],55:[0,.61111,0,0,.525],56:[0,.61111,0,0,.525],57:[0,.61111,0,0,.525],58:[0,.43056,0,0,.525],59:[.13889,.43056,0,0,.525],60:[-.05556,.55556,0,0,.525],61:[-.19549,.41562,0,0,.525],62:[-.05556,.55556,0,0,.525],63:[0,.61111,0,0,.525],64:[0,.61111,0,0,.525],65:[0,.61111,0,0,.525],66:[0,.61111,0,0,.525],67:[0,.61111,0,0,.525],68:[0,.61111,0,0,.525],69:[0,.61111,0,0,.525],70:[0,.61111,0,0,.525],71:[0,.61111,0,0,.525],72:[0,.61111,0,0,.525],73:[0,.61111,0,0,.525],74:[0,.61111,0,0,.525],75:[0,.61111,0,0,.525],76:[0,.61111,0,0,.525],77:[0,.61111,0,0,.525],78:[0,.61111,0,0,.525],79:[0,.61111,0,0,.525],80:[0,.61111,0,0,.525],81:[.13889,.61111,0,0,.525],82:[0,.61111,0,0,.525],83:[0,.61111,0,0,.525],84:[0,.61111,0,0,.525],85:[0,.61111,0,0,.525],86:[0,.61111,0,0,.525],87:[0,.61111,0,0,.525],88:[0,.61111,0,0,.525],89:[0,.61111,0,0,.525],90:[0,.61111,0,0,.525],91:[.08333,.69444,0,0,.525],92:[.08333,.69444,0,0,.525],93:[.08333,.69444,0,0,.525],94:[0,.61111,0,0,.525],95:[.09514,0,0,0,.525],96:[0,.61111,0,0,.525],97:[0,.43056,0,0,.525],98:[0,.61111,0,0,.525],99:[0,.43056,0,0,.525],100:[0,.61111,0,0,.525],101:[0,.43056,0,0,.525],102:[0,.61111,0,0,.525],103:[.22222,.43056,0,0,.525],104:[0,.61111,0,0,.525],105:[0,.61111,0,0,.525],106:[.22222,.61111,0,0,.525],107:[0,.61111,0,0,.525],108:[0,.61111,0,0,.525],109:[0,.43056,0,0,.525],110:[0,.43056,0,0,.525],111:[0,.43056,0,0,.525],112:[.22222,.43056,0,0,.525],113:[.22222,.43056,0,0,.525],114:[0,.43056,0,0,.525],115:[0,.43056,0,0,.525],116:[0,.55358,0,0,.525],117:[0,.43056,0,0,.525],118:[0,.43056,0,0,.525],119:[0,.43056,0,0,.525],120:[0,.43056,0,0,.525],121:[.22222,.43056,0,0,.525],122:[0,.43056,0,0,.525],123:[.08333,.69444,0,0,.525],124:[.08333,.69444,0,0,.525],125:[.08333,.69444,0,0,.525],126:[0,.61111,0,0,.525],127:[0,.61111,0,0,.525],160:[0,0,0,0,.525],176:[0,.61111,0,0,.525],184:[.19445,0,0,0,.525],305:[0,.43056,0,0,.525],567:[.22222,.43056,0,0,.525],711:[0,.56597,0,0,.525],713:[0,.56555,0,0,.525],714:[0,.61111,0,0,.525],715:[0,.61111,0,0,.525],728:[0,.61111,0,0,.525],730:[0,.61111,0,0,.525],770:[0,.61111,0,0,.525],771:[0,.61111,0,0,.525],776:[0,.61111,0,0,.525],915:[0,.61111,0,0,.525],916:[0,.61111,0,0,.525],920:[0,.61111,0,0,.525],923:[0,.61111,0,0,.525],926:[0,.61111,0,0,.525],928:[0,.61111,0,0,.525],931:[0,.61111,0,0,.525],933:[0,.61111,0,0,.525],934:[0,.61111,0,0,.525],936:[0,.61111,0,0,.525],937:[0,.61111,0,0,.525],8216:[0,.61111,0,0,.525],8217:[0,.61111,0,0,.525],8242:[0,.61111,0,0,.525],9251:[.11111,.21944,0,0,.525]}};const oe={slant:[.25,.25,.25],space:[0,0,0],stretch:[0,0,0],shrink:[0,0,0],xHeight:[.431,.431,.431],quad:[1,1.171,1.472],extraSpace:[0,0,0],num1:[.677,.732,.925],num2:[.394,.384,.387],num3:[.444,.471,.504],denom1:[.686,.752,1.025],denom2:[.345,.344,.532],sup1:[.413,.503,.504],sup2:[.363,.431,.404],sup3:[.289,.286,.294],sub1:[.15,.143,.2],sub2:[.247,.286,.4],supDrop:[.386,.353,.494],subDrop:[.05,.071,.1],delim1:[2.39,1.7,1.98],delim2:[1.01,1.157,1.42],axisHeight:[.25,.25,.25],defaultRuleThickness:[.04,.049,.049],bigOpSpacing1:[.111,.111,.111],bigOpSpacing2:[.166,.166,.166],bigOpSpacing3:[.2,.2,.2],bigOpSpacing4:[.6,.611,.611],bigOpSpacing5:[.1,.143,.143],sqrtRuleThickness:[.04,.04,.04],ptPerEm:[10,10,10],doubleRuleSep:[.2,.2,.2],arrayRuleWidth:[.04,.04,.04],fboxsep:[.3,.3,.3],fboxrule:[.04,.04,.04]},ie={"Å":"A","Ð":"D","Þ":"o","å":"a","ð":"d","þ":"o","А":"A","Б":"B","В":"B","Г":"F","Д":"A","Е":"E","Ж":"K","З":"3","И":"N","Й":"N","К":"K","Л":"N","М":"M","Н":"H","О":"O","П":"N","Р":"P","С":"C","Т":"T","У":"y","Ф":"O","Х":"X","Ц":"U","Ч":"h","Ш":"W","Щ":"W","Ъ":"B","Ы":"X","Ь":"B","Э":"3","Ю":"X","Я":"R","а":"a","б":"b","в":"a","г":"r","д":"y","е":"e","ж":"m","з":"e","и":"n","й":"n","к":"n","л":"n","м":"m","н":"n","о":"o","п":"n","р":"p","с":"c","т":"o","у":"y","ф":"b","х":"x","ц":"n","ч":"n","ш":"w","щ":"w","ъ":"a","ы":"m","ь":"a","э":"e","ю":"m","я":"r"};function se(e,t,r){if(!ae[t])throw new Error("Font metrics not found for font: "+t+".");let n=e.charCodeAt(0),a=ae[t][n];if(!a&&e[0]in ie&&(n=ie[e[0]].charCodeAt(0),a=ae[t][n]),a||"text"!==r||ee(n)&&(a=ae[t][77]),a)return{depth:a[0],height:a[1],italic:a[2],skew:a[3],width:a[4]}}function le(e,t){return t.size<2?e:me[e-1][t.size-1]}const he={},me=[[1,1,1],[2,1,1],[3,1,1],[4,2,1],[5,2,1],[6,3,1],[7,4,2],[8,6,3],[9,7,6],[10,8,7],[11,10,9]],ce=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488];class pe{constructor(e){this.style=void 0,this.color=void 0,this.size=void 0,this.textSize=void 0,this.phantom=void 0,this.font=void 0,this.fontFamily=void 0,this.fontWeight=void 0,this.fontShape=void 0,this.sizeMultiplier=void 0,this.maxSize=void 0,this.minRuleThickness=void 0,this._fontMetrics=void 0,this.style=e.style,this.color=e.color,this.size=e.size||pe.BASESIZE,this.textSize=e.textSize||this.size,this.phantom=!!e.phantom,this.font=e.font||"",this.fontFamily=e.fontFamily||"",this.fontWeight=e.fontWeight||"",this.fontShape=e.fontShape||"",this.sizeMultiplier=ce[this.size-1],this.maxSize=e.maxSize,this.minRuleThickness=e.minRuleThickness,this._fontMetrics=void 0}extend(e){var t={style:this.style,size:this.size,textSize:this.textSize,color:this.color,phantom:this.phantom,font:this.font,fontFamily:this.fontFamily,fontWeight:this.fontWeight,fontShape:this.fontShape,maxSize:this.maxSize,minRuleThickness:this.minRuleThickness};for(const r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);return new pe(t)}havingStyle(e){return this.style===e?this:this.extend({style:e,size:le(this.textSize,e)})}havingCrampedStyle(){return this.havingStyle(this.style.cramp())}havingSize(e){return this.size===e&&this.textSize===e?this:this.extend({style:this.style.text(),size:e,textSize:e,sizeMultiplier:ce[e-1]})}havingBaseStyle(e){e=e||this.style.text();var t=le(pe.BASESIZE,e);return this.size===t&&this.textSize===pe.BASESIZE&&this.style===e?this:this.extend({style:e,size:t})}havingBaseSizing(){let e;switch(this.style.id){case 4:case 5:e=3;break;case 6:case 7:e=1;break;default:e=6}return this.extend({style:this.style.text(),size:e})}withColor(e){return this.extend({color:e})}withPhantom(){return this.extend({phantom:!0})}withFont(e){return this.extend({font:e})}withTextFontFamily(e){return this.extend({fontFamily:e,font:""})}withTextFontWeight(e){return this.extend({fontWeight:e,font:""})}withTextFontShape(e){return this.extend({fontShape:e,font:""})}sizingClasses(e){return e.size!==this.size?["sizing","reset-size"+e.size,"size"+this.size]:[]}baseSizingClasses(){return this.size!==pe.BASESIZE?["sizing","reset-size"+this.size,"size"+pe.BASESIZE]:[]}fontMetrics(){return this._fontMetrics||(this._fontMetrics=function(e){var t=5<=e?0:3<=e?1:2;if(!he[t]){const e=he[t]={cssEmPerMu:oe.quad[t]/18};for(const r in oe)oe.hasOwnProperty(r)&&(e[r]=oe[r][t])}return he[t]}(this.size)),this._fontMetrics}getColor(){return this.phantom?"transparent":this.color}}pe.BASESIZE=6;var ue=pe;function de(e){return(e="string"!=typeof e?e.unit:e)in xe||e in we||"ex"===e}function B(e,t){let r;if(e.unit in xe)r=xe[e.unit]/t.fontMetrics().ptPerEm/t.sizeMultiplier;else if("mu"===e.unit)r=t.fontMetrics().cssEmPerMu;else{var n=t.style.isTight()?t.havingStyle(t.style.text()):t;if("ex"===e.unit)r=n.fontMetrics().xHeight;else{if("em"!==e.unit)throw new z("Invalid unit: '"+e.unit+"'");r=n.fontMetrics().quad}n!==t&&(r*=n.sizeMultiplier/t.sizeMultiplier)}return Math.min(e.number*r,t.maxSize)}function ge(e){return e.filter(e=>e).join(" ")}function fe(e,t,r){if(this.classes=e||[],this.attributes={},this.height=0,this.depth=0,this.maxFontSize=0,this.style=r||{},t){t.style.isTight()&&this.classes.push("mtight");const e=t.getColor();e&&(this.style.color=e)}}function be(e){var t=document.createElement(e);t.className=ge(this.classes);for(const e in this.style)this.style.hasOwnProperty(e)&&(t.style[e]=this.style[e]);for(const e in this.attributes)this.attributes.hasOwnProperty(e)&&t.setAttribute(e,this.attributes[e]);for(let e=0;e<this.children.length;e++)t.appendChild(this.children[e].toNode());return t}function ye(e){let t="<"+e,r=(this.classes.length&&(t+=' class="'+A.escape(ge(this.classes))+'"'),"");for(const e in this.style)this.style.hasOwnProperty(e)&&(r+=A.hyphenate(e)+":"+this.style[e]+";");r&&(t+=' style="'+A.escape(r)+'"');for(const e in this.attributes)this.attributes.hasOwnProperty(e)&&(t+=" "+e+'="'+A.escape(this.attributes[e])+'"');t+=">";for(let e=0;e<this.children.length;e++)t+=this.children[e].toMarkup();return t+="</"+e+">"}const xe={pt:1,mm:7227/2540,cm:7227/254,in:72.27,bp:1.00375,pc:12,dd:1238/1157,cc:14856/1157,nd:685/642,nc:1370/107,sp:1/65536,px:1.00375},we={ex:!0,em:!0,mu:!0},C=function(e){return+e.toFixed(4)+"em"};class ve{constructor(e,t,r,n){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.width=void 0,this.maxFontSize=void 0,this.style=void 0,fe.call(this,e,r,n),this.children=t||[]}setAttribute(e,t){this.attributes[e]=t}hasClass(e){return A.contains(this.classes,e)}toNode(){return be.call(this,"span")}toMarkup(){return ye.call(this,"span")}}class ke{constructor(e,t,r,n){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,fe.call(this,t,n),this.children=r||[],this.setAttribute("href",e)}setAttribute(e,t){this.attributes[e]=t}hasClass(e){return A.contains(this.classes,e)}toNode(){return be.call(this,"a")}toMarkup(){return ye.call(this,"a")}}class Se{constructor(e,t,r){this.src=void 0,this.alt=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.alt=t,this.src=e,this.classes=["mord"],this.style=r}hasClass(e){return A.contains(this.classes,e)}toNode(){var e=document.createElement("img");e.src=this.src,e.alt=this.alt,e.className="mord";for(const t in this.style)this.style.hasOwnProperty(t)&&(e.style[t]=this.style[t]);return e}toMarkup(){let e='<img src="'+A.escape(this.src)+'" alt="'+A.escape(this.alt)+'"',t="";for(const e in this.style)this.style.hasOwnProperty(e)&&(t+=A.hyphenate(e)+":"+this.style[e]+";");return t&&(e+=' style="'+A.escape(t)+'"'),e+="'/>"}}const Me={"î":"ı̂","ï":"ı̈","í":"ı́","ì":"ı̀"};class d{constructor(e,t,r,n,a,o,i,s){this.text=void 0,this.height=void 0,this.depth=void 0,this.italic=void 0,this.skew=void 0,this.width=void 0,this.maxFontSize=void 0,this.classes=void 0,this.style=void 0,this.text=e,this.height=t||0,this.depth=r||0,this.italic=n||0,this.skew=a||0,this.width=o||0,this.classes=i||[],this.style=s||{},this.maxFontSize=0,(e=function(t){for(let e=0;e<J.length;e++){var r=J[e];for(let e=0;e<r.blocks.length;e++){var n=r.blocks[e];if(t>=n[0]&&t<=n[1])return r.name}}return null}(this.text.charCodeAt(0)))&&this.classes.push(e+"_fallback"),/[\xee\xef\xed\xec]/.test(this.text)&&(this.text=Me[this.text])}hasClass(e){return A.contains(this.classes,e)}toNode(){const e=document.createTextNode(this.text);let t=null;0<this.italic&&((t=document.createElement("span")).style.marginRight=C(this.italic)),0<this.classes.length&&((t=t||document.createElement("span")).className=ge(this.classes));for(const e in this.style)this.style.hasOwnProperty(e)&&(t=t||document.createElement("span"),t.style[e]=this.style[e]);return t?(t.appendChild(e),t):e}toMarkup(){let e=!1,t="<span",r=(this.classes.length&&(e=!0,t=(t+=' class="')+A.escape(ge(this.classes))+'"'),"");0<this.italic&&(r+="margin-right:"+this.italic+"em;");for(const e in this.style)this.style.hasOwnProperty(e)&&(r+=A.hyphenate(e)+":"+this.style[e]+";");r&&(e=!0,t+=' style="'+A.escape(r)+'"');var n=A.escape(this.text);return e?t=(t+=">")+n+"</span>":n}}class ze{constructor(e,t){this.children=void 0,this.attributes=void 0,this.children=e||[],this.attributes=t||{}}toNode(){var t=document.createElementNS("http://www.w3.org/2000/svg","svg");for(const e in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,e)&&t.setAttribute(e,this.attributes[e]);for(let e=0;e<this.children.length;e++)t.appendChild(this.children[e].toNode());return t}toMarkup(){let t='<svg xmlns="http://www.w3.org/2000/svg"';for(const e in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,e)&&(t+=" "+e+'="'+A.escape(this.attributes[e])+'"');t+=">";for(let e=0;e<this.children.length;e++)t+=this.children[e].toMarkup();return t+="</svg>"}}class Ae{constructor(e,t){this.pathName=void 0,this.alternate=void 0,this.pathName=e,this.alternate=t}toNode(){var e=document.createElementNS("http://www.w3.org/2000/svg","path");return this.alternate?e.setAttribute("d",this.alternate):e.setAttribute("d",re[this.pathName]),e}toMarkup(){return this.alternate?'<path d="'+A.escape(this.alternate)+'"/>':'<path d="'+A.escape(re[this.pathName])+'"/>'}}class Te{constructor(e){this.attributes=void 0,this.attributes=e||{}}toNode(){var e=document.createElementNS("http://www.w3.org/2000/svg","line");for(const t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&e.setAttribute(t,this.attributes[t]);return e}toMarkup(){let e="<line";for(const t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&(e+=" "+t+'="'+A.escape(this.attributes[t])+'"');return e+="/>"}}function Be(e){if(e instanceof d)return e;throw new Error("Expected symbolNode but got "+String(e)+".")}const Ce={bin:1,close:1,inner:1,open:1,punct:1,rel:1},Ne={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1},qe={math:{},text:{}};var h=qe;function r(e,t,r,n,a,o){qe[e][a]={font:t,group:r,replace:n},o&&n&&(qe[e][n]=qe[e][a])}var n="math",a="text",o="main",e="ams",i="accent-token",s="bin",l="close",Ie="inner",m="mathord",c="op-token",p="open",Re="punct",u="rel",He="spacing",g="textord";r(n,o,u,"≡","\\equiv",!0),r(n,o,u,"≺","\\prec",!0),r(n,o,u,"≻","\\succ",!0),r(n,o,u,"∼","\\sim",!0),r(n,o,u,"⊥","\\perp"),r(n,o,u,"⪯","\\preceq",!0),r(n,o,u,"⪰","\\succeq",!0),r(n,o,u,"≃","\\simeq",!0),r(n,o,u,"∣","\\mid",!0),r(n,o,u,"≪","\\ll",!0),r(n,o,u,"≫","\\gg",!0),r(n,o,u,"≍","\\asymp",!0),r(n,o,u,"∥","\\parallel"),r(n,o,u,"⋈","\\bowtie",!0),r(n,o,u,"⌣","\\smile",!0),r(n,o,u,"⊑","\\sqsubseteq",!0),r(n,o,u,"⊒","\\sqsupseteq",!0),r(n,o,u,"≐","\\doteq",!0),r(n,o,u,"⌢","\\frown",!0),r(n,o,u,"∋","\\ni",!0),r(n,o,u,"∝","\\propto",!0),r(n,o,u,"⊢","\\vdash",!0),r(n,o,u,"⊣","\\dashv",!0),r(n,o,u,"∋","\\owns"),r(n,o,Re,".","\\ldotp"),r(n,o,Re,"⋅","\\cdotp"),r(n,o,g,"#","\\#"),r(a,o,g,"#","\\#"),r(n,o,g,"&","\\&"),r(a,o,g,"&","\\&"),r(n,o,g,"ℵ","\\aleph",!0),r(n,o,g,"∀","\\forall",!0),r(n,o,g,"ℏ","\\hbar",!0),r(n,o,g,"∃","\\exists",!0),r(n,o,g,"∇","\\nabla",!0),r(n,o,g,"♭","\\flat",!0),r(n,o,g,"ℓ","\\ell",!0),r(n,o,g,"♮","\\natural",!0),r(n,o,g,"♣","\\clubsuit",!0),r(n,o,g,"℘","\\wp",!0),r(n,o,g,"♯","\\sharp",!0),r(n,o,g,"♢","\\diamondsuit",!0),r(n,o,g,"ℜ","\\Re",!0),r(n,o,g,"♡","\\heartsuit",!0),r(n,o,g,"ℑ","\\Im",!0),r(n,o,g,"♠","\\spadesuit",!0),r(n,o,g,"§","\\S",!0),r(a,o,g,"§","\\S"),r(n,o,g,"¶","\\P",!0),r(a,o,g,"¶","\\P"),r(n,o,g,"†","\\dag"),r(a,o,g,"†","\\dag"),r(a,o,g,"†","\\textdagger"),r(n,o,g,"‡","\\ddag"),r(a,o,g,"‡","\\ddag"),r(a,o,g,"‡","\\textdaggerdbl"),r(n,o,l,"⎱","\\rmoustache",!0),r(n,o,p,"⎰","\\lmoustache",!0),r(n,o,l,"⟯","\\rgroup",!0),r(n,o,p,"⟮","\\lgroup",!0),r(n,o,s,"∓","\\mp",!0),r(n,o,s,"⊖","\\ominus",!0),r(n,o,s,"⊎","\\uplus",!0),r(n,o,s,"⊓","\\sqcap",!0),r(n,o,s,"∗","\\ast"),r(n,o,s,"⊔","\\sqcup",!0),r(n,o,s,"◯","\\bigcirc",!0),r(n,o,s,"∙","\\bullet",!0),r(n,o,s,"‡","\\ddagger"),r(n,o,s,"≀","\\wr",!0),r(n,o,s,"⨿","\\amalg"),r(n,o,s,"&","\\And"),r(n,o,u,"⟵","\\longleftarrow",!0),r(n,o,u,"⇐","\\Leftarrow",!0),r(n,o,u,"⟸","\\Longleftarrow",!0),r(n,o,u,"⟶","\\longrightarrow",!0),r(n,o,u,"⇒","\\Rightarrow",!0),r(n,o,u,"⟹","\\Longrightarrow",!0),r(n,o,u,"↔","\\leftrightarrow",!0),r(n,o,u,"⟷","\\longleftrightarrow",!0),r(n,o,u,"⇔","\\Leftrightarrow",!0),r(n,o,u,"⟺","\\Longleftrightarrow",!0),r(n,o,u,"↦","\\mapsto",!0),r(n,o,u,"⟼","\\longmapsto",!0),r(n,o,u,"↗","\\nearrow",!0),r(n,o,u,"↩","\\hookleftarrow",!0),r(n,o,u,"↪","\\hookrightarrow",!0),r(n,o,u,"↘","\\searrow",!0),r(n,o,u,"↼","\\leftharpoonup",!0),r(n,o,u,"⇀","\\rightharpoonup",!0),r(n,o,u,"↙","\\swarrow",!0),r(n,o,u,"↽","\\leftharpoondown",!0),r(n,o,u,"⇁","\\rightharpoondown",!0),r(n,o,u,"↖","\\nwarrow",!0),r(n,o,u,"⇌","\\rightleftharpoons",!0),r(n,e,u,"≮","\\nless",!0),r(n,e,u,"","\\@nleqslant"),r(n,e,u,"","\\@nleqq"),r(n,e,u,"⪇","\\lneq",!0),r(n,e,u,"≨","\\lneqq",!0),r(n,e,u,"","\\@lvertneqq"),r(n,e,u,"⋦","\\lnsim",!0),r(n,e,u,"⪉","\\lnapprox",!0),r(n,e,u,"⊀","\\nprec",!0),r(n,e,u,"⋠","\\npreceq",!0),r(n,e,u,"⋨","\\precnsim",!0),r(n,e,u,"⪹","\\precnapprox",!0),r(n,e,u,"≁","\\nsim",!0),r(n,e,u,"","\\@nshortmid"),r(n,e,u,"∤","\\nmid",!0),r(n,e,u,"⊬","\\nvdash",!0),r(n,e,u,"⊭","\\nvDash",!0),r(n,e,u,"⋪","\\ntriangleleft"),r(n,e,u,"⋬","\\ntrianglelefteq",!0),r(n,e,u,"⊊","\\subsetneq",!0),r(n,e,u,"","\\@varsubsetneq"),r(n,e,u,"⫋","\\subsetneqq",!0),r(n,e,u,"","\\@varsubsetneqq"),r(n,e,u,"≯","\\ngtr",!0),r(n,e,u,"","\\@ngeqslant"),r(n,e,u,"","\\@ngeqq"),r(n,e,u,"⪈","\\gneq",!0),r(n,e,u,"≩","\\gneqq",!0),r(n,e,u,"","\\@gvertneqq"),r(n,e,u,"⋧","\\gnsim",!0),r(n,e,u,"⪊","\\gnapprox",!0),r(n,e,u,"⊁","\\nsucc",!0),r(n,e,u,"⋡","\\nsucceq",!0),r(n,e,u,"⋩","\\succnsim",!0),r(n,e,u,"⪺","\\succnapprox",!0),r(n,e,u,"≆","\\ncong",!0),r(n,e,u,"","\\@nshortparallel"),r(n,e,u,"∦","\\nparallel",!0),r(n,e,u,"⊯","\\nVDash",!0),r(n,e,u,"⋫","\\ntriangleright"),r(n,e,u,"⋭","\\ntrianglerighteq",!0),r(n,e,u,"","\\@nsupseteqq"),r(n,e,u,"⊋","\\supsetneq",!0),r(n,e,u,"","\\@varsupsetneq"),r(n,e,u,"⫌","\\supsetneqq",!0),r(n,e,u,"","\\@varsupsetneqq"),r(n,e,u,"⊮","\\nVdash",!0),r(n,e,u,"⪵","\\precneqq",!0),r(n,e,u,"⪶","\\succneqq",!0),r(n,e,u,"","\\@nsubseteqq"),r(n,e,s,"⊴","\\unlhd"),r(n,e,s,"⊵","\\unrhd"),r(n,e,u,"↚","\\nleftarrow",!0),r(n,e,u,"↛","\\nrightarrow",!0),r(n,e,u,"⇍","\\nLeftarrow",!0),r(n,e,u,"⇏","\\nRightarrow",!0),r(n,e,u,"↮","\\nleftrightarrow",!0),r(n,e,u,"⇎","\\nLeftrightarrow",!0),r(n,e,u,"△","\\vartriangle"),r(n,e,g,"ℏ","\\hslash"),r(n,e,g,"▽","\\triangledown"),r(n,e,g,"◊","\\lozenge"),r(n,e,g,"Ⓢ","\\circledS"),r(n,e,g,"®","\\circledR"),r(a,e,g,"®","\\circledR"),r(n,e,g,"∡","\\measuredangle",!0),r(n,e,g,"∄","\\nexists"),r(n,e,g,"℧","\\mho"),r(n,e,g,"Ⅎ","\\Finv",!0),r(n,e,g,"⅁","\\Game",!0),r(n,e,g,"‵","\\backprime"),r(n,e,g,"▲","\\blacktriangle"),r(n,e,g,"▼","\\blacktriangledown"),r(n,e,g,"■","\\blacksquare"),r(n,e,g,"⧫","\\blacklozenge"),r(n,e,g,"★","\\bigstar"),r(n,e,g,"∢","\\sphericalangle",!0),r(n,e,g,"∁","\\complement",!0),r(n,e,g,"ð","\\eth",!0),r(a,o,g,"ð","ð"),r(n,e,g,"╱","\\diagup"),r(n,e,g,"╲","\\diagdown"),r(n,e,g,"□","\\square"),r(n,e,g,"□","\\Box"),r(n,e,g,"◊","\\Diamond"),r(n,e,g,"¥","\\yen",!0),r(a,e,g,"¥","\\yen",!0),r(n,e,g,"✓","\\checkmark",!0),r(a,e,g,"✓","\\checkmark"),r(n,e,g,"ℶ","\\beth",!0),r(n,e,g,"ℸ","\\daleth",!0),r(n,e,g,"ℷ","\\gimel",!0),r(n,e,g,"ϝ","\\digamma",!0),r(n,e,g,"ϰ","\\varkappa"),r(n,e,p,"┌","\\@ulcorner",!0),r(n,e,l,"┐","\\@urcorner",!0),r(n,e,p,"└","\\@llcorner",!0),r(n,e,l,"┘","\\@lrcorner",!0),r(n,e,u,"≦","\\leqq",!0),r(n,e,u,"⩽","\\leqslant",!0),r(n,e,u,"⪕","\\eqslantless",!0),r(n,e,u,"≲","\\lesssim",!0),r(n,e,u,"⪅","\\lessapprox",!0),r(n,e,u,"≊","\\approxeq",!0),r(n,e,s,"⋖","\\lessdot"),r(n,e,u,"⋘","\\lll",!0),r(n,e,u,"≶","\\lessgtr",!0),r(n,e,u,"⋚","\\lesseqgtr",!0),r(n,e,u,"⪋","\\lesseqqgtr",!0),r(n,e,u,"≑","\\doteqdot"),r(n,e,u,"≓","\\risingdotseq",!0),r(n,e,u,"≒","\\fallingdotseq",!0),r(n,e,u,"∽","\\backsim",!0),r(n,e,u,"⋍","\\backsimeq",!0),r(n,e,u,"⫅","\\subseteqq",!0),r(n,e,u,"⋐","\\Subset",!0),r(n,e,u,"⊏","\\sqsubset",!0),r(n,e,u,"≼","\\preccurlyeq",!0),r(n,e,u,"⋞","\\curlyeqprec",!0),r(n,e,u,"≾","\\precsim",!0),r(n,e,u,"⪷","\\precapprox",!0),r(n,e,u,"⊲","\\vartriangleleft"),r(n,e,u,"⊴","\\trianglelefteq"),r(n,e,u,"⊨","\\vDash",!0),r(n,e,u,"⊪","\\Vvdash",!0),r(n,e,u,"⌣","\\smallsmile"),r(n,e,u,"⌢","\\smallfrown"),r(n,e,u,"≏","\\bumpeq",!0),r(n,e,u,"≎","\\Bumpeq",!0),r(n,e,u,"≧","\\geqq",!0),r(n,e,u,"⩾","\\geqslant",!0),r(n,e,u,"⪖","\\eqslantgtr",!0),r(n,e,u,"≳","\\gtrsim",!0),r(n,e,u,"⪆","\\gtrapprox",!0),r(n,e,s,"⋗","\\gtrdot"),r(n,e,u,"⋙","\\ggg",!0),r(n,e,u,"≷","\\gtrless",!0),r(n,e,u,"⋛","\\gtreqless",!0),r(n,e,u,"⪌","\\gtreqqless",!0),r(n,e,u,"≖","\\eqcirc",!0),r(n,e,u,"≗","\\circeq",!0),r(n,e,u,"≜","\\triangleq",!0),r(n,e,u,"∼","\\thicksim"),r(n,e,u,"≈","\\thickapprox"),r(n,e,u,"⫆","\\supseteqq",!0),r(n,e,u,"⋑","\\Supset",!0),r(n,e,u,"⊐","\\sqsupset",!0),r(n,e,u,"≽","\\succcurlyeq",!0),r(n,e,u,"⋟","\\curlyeqsucc",!0),r(n,e,u,"≿","\\succsim",!0),r(n,e,u,"⪸","\\succapprox",!0),r(n,e,u,"⊳","\\vartriangleright"),r(n,e,u,"⊵","\\trianglerighteq"),r(n,e,u,"⊩","\\Vdash",!0),r(n,e,u,"∣","\\shortmid"),r(n,e,u,"∥","\\shortparallel"),r(n,e,u,"≬","\\between",!0),r(n,e,u,"⋔","\\pitchfork",!0),r(n,e,u,"∝","\\varpropto"),r(n,e,u,"◀","\\blacktriangleleft"),r(n,e,u,"∴","\\therefore",!0),r(n,e,u,"∍","\\backepsilon"),r(n,e,u,"▶","\\blacktriangleright"),r(n,e,u,"∵","\\because",!0),r(n,e,u,"⋘","\\llless"),r(n,e,u,"⋙","\\gggtr"),r(n,e,s,"⊲","\\lhd"),r(n,e,s,"⊳","\\rhd"),r(n,e,u,"≂","\\eqsim",!0),r(n,o,u,"⋈","\\Join"),r(n,e,u,"≑","\\Doteq",!0),r(n,e,s,"∔","\\dotplus",!0),r(n,e,s,"∖","\\smallsetminus"),r(n,e,s,"⋒","\\Cap",!0),r(n,e,s,"⋓","\\Cup",!0),r(n,e,s,"⩞","\\doublebarwedge",!0),r(n,e,s,"⊟","\\boxminus",!0),r(n,e,s,"⊞","\\boxplus",!0),r(n,e,s,"⋇","\\divideontimes",!0),r(n,e,s,"⋉","\\ltimes",!0),r(n,e,s,"⋊","\\rtimes",!0),r(n,e,s,"⋋","\\leftthreetimes",!0),r(n,e,s,"⋌","\\rightthreetimes",!0),r(n,e,s,"⋏","\\curlywedge",!0),r(n,e,s,"⋎","\\curlyvee",!0),r(n,e,s,"⊝","\\circleddash",!0),r(n,e,s,"⊛","\\circledast",!0),r(n,e,s,"⋅","\\centerdot"),r(n,e,s,"⊺","\\intercal",!0),r(n,e,s,"⋒","\\doublecap"),r(n,e,s,"⋓","\\doublecup"),r(n,e,s,"⊠","\\boxtimes",!0),r(n,e,u,"⇢","\\dashrightarrow",!0),r(n,e,u,"⇠","\\dashleftarrow",!0),r(n,e,u,"⇇","\\leftleftarrows",!0),r(n,e,u,"⇆","\\leftrightarrows",!0),r(n,e,u,"⇚","\\Lleftarrow",!0),r(n,e,u,"↞","\\twoheadleftarrow",!0),r(n,e,u,"↢","\\leftarrowtail",!0),r(n,e,u,"↫","\\looparrowleft",!0),r(n,e,u,"⇋","\\leftrightharpoons",!0),r(n,e,u,"↶","\\curvearrowleft",!0),r(n,e,u,"↺","\\circlearrowleft",!0),r(n,e,u,"↰","\\Lsh",!0),r(n,e,u,"⇈","\\upuparrows",!0),r(n,e,u,"↿","\\upharpoonleft",!0),r(n,e,u,"⇃","\\downharpoonleft",!0),r(n,o,u,"⊶","\\origof",!0),r(n,o,u,"⊷","\\imageof",!0),r(n,e,u,"⊸","\\multimap",!0),r(n,e,u,"↭","\\leftrightsquigarrow",!0),r(n,e,u,"⇉","\\rightrightarrows",!0),r(n,e,u,"⇄","\\rightleftarrows",!0),r(n,e,u,"↠","\\twoheadrightarrow",!0),r(n,e,u,"↣","\\rightarrowtail",!0),r(n,e,u,"↬","\\looparrowright",!0),r(n,e,u,"↷","\\curvearrowright",!0),r(n,e,u,"↻","\\circlearrowright",!0),r(n,e,u,"↱","\\Rsh",!0),r(n,e,u,"⇊","\\downdownarrows",!0),r(n,e,u,"↾","\\upharpoonright",!0),r(n,e,u,"⇂","\\downharpoonright",!0),r(n,e,u,"⇝","\\rightsquigarrow",!0),r(n,e,u,"⇝","\\leadsto"),r(n,e,u,"⇛","\\Rrightarrow",!0),r(n,e,u,"↾","\\restriction"),r(n,o,g,"‘","`"),r(n,o,g,"$","\\$"),r(a,o,g,"$","\\$"),r(a,o,g,"$","\\textdollar"),r(n,o,g,"%","\\%"),r(a,o,g,"%","\\%"),r(n,o,g,"_","\\_"),r(a,o,g,"_","\\_"),r(a,o,g,"_","\\textunderscore"),r(n,o,g,"∠","\\angle",!0),r(n,o,g,"∞","\\infty",!0),r(n,o,g,"′","\\prime"),r(n,o,g,"△","\\triangle"),r(n,o,g,"Γ","\\Gamma",!0),r(n,o,g,"Δ","\\Delta",!0),r(n,o,g,"Θ","\\Theta",!0),r(n,o,g,"Λ","\\Lambda",!0),r(n,o,g,"Ξ","\\Xi",!0),r(n,o,g,"Π","\\Pi",!0),r(n,o,g,"Σ","\\Sigma",!0),r(n,o,g,"Υ","\\Upsilon",!0),r(n,o,g,"Φ","\\Phi",!0),r(n,o,g,"Ψ","\\Psi",!0),r(n,o,g,"Ω","\\Omega",!0),r(n,o,g,"A","Α"),r(n,o,g,"B","Β"),r(n,o,g,"E","Ε"),r(n,o,g,"Z","Ζ"),r(n,o,g,"H","Η"),r(n,o,g,"I","Ι"),r(n,o,g,"K","Κ"),r(n,o,g,"M","Μ"),r(n,o,g,"N","Ν"),r(n,o,g,"O","Ο"),r(n,o,g,"P","Ρ"),r(n,o,g,"T","Τ"),r(n,o,g,"X","Χ"),r(n,o,g,"¬","\\neg",!0),r(n,o,g,"¬","\\lnot"),r(n,o,g,"⊤","\\top"),r(n,o,g,"⊥","\\bot"),r(n,o,g,"∅","\\emptyset"),r(n,e,g,"∅","\\varnothing"),r(n,o,m,"α","\\alpha",!0),r(n,o,m,"β","\\beta",!0),r(n,o,m,"γ","\\gamma",!0),r(n,o,m,"δ","\\delta",!0),r(n,o,m,"ϵ","\\epsilon",!0),r(n,o,m,"ζ","\\zeta",!0),r(n,o,m,"η","\\eta",!0),r(n,o,m,"θ","\\theta",!0),r(n,o,m,"ι","\\iota",!0),r(n,o,m,"κ","\\kappa",!0),r(n,o,m,"λ","\\lambda",!0),r(n,o,m,"μ","\\mu",!0),r(n,o,m,"ν","\\nu",!0),r(n,o,m,"ξ","\\xi",!0),r(n,o,m,"ο","\\omicron",!0),r(n,o,m,"π","\\pi",!0),r(n,o,m,"ρ","\\rho",!0),r(n,o,m,"σ","\\sigma",!0),r(n,o,m,"τ","\\tau",!0),r(n,o,m,"υ","\\upsilon",!0),r(n,o,m,"ϕ","\\phi",!0),r(n,o,m,"χ","\\chi",!0),r(n,o,m,"ψ","\\psi",!0),r(n,o,m,"ω","\\omega",!0),r(n,o,m,"ε","\\varepsilon",!0),r(n,o,m,"ϑ","\\vartheta",!0),r(n,o,m,"ϖ","\\varpi",!0),r(n,o,m,"ϱ","\\varrho",!0),r(n,o,m,"ς","\\varsigma",!0),r(n,o,m,"φ","\\varphi",!0),r(n,o,s,"∗","*",!0),r(n,o,s,"+","+"),r(n,o,s,"−","-",!0),r(n,o,s,"⋅","\\cdot",!0),r(n,o,s,"∘","\\circ",!0),r(n,o,s,"÷","\\div",!0),r(n,o,s,"±","\\pm",!0),r(n,o,s,"×","\\times",!0),r(n,o,s,"∩","\\cap",!0),r(n,o,s,"∪","\\cup",!0),r(n,o,s,"∖","\\setminus",!0),r(n,o,s,"∧","\\land"),r(n,o,s,"∨","\\lor"),r(n,o,s,"∧","\\wedge",!0),r(n,o,s,"∨","\\vee",!0),r(n,o,g,"√","\\surd"),r(n,o,p,"⟨","\\langle",!0),r(n,o,p,"∣","\\lvert"),r(n,o,p,"∥","\\lVert"),r(n,o,l,"?","?"),r(n,o,l,"!","!"),r(n,o,l,"⟩","\\rangle",!0),r(n,o,l,"∣","\\rvert"),r(n,o,l,"∥","\\rVert"),r(n,o,u,"=","="),r(n,o,u,":",":"),r(n,o,u,"≈","\\approx",!0),r(n,o,u,"≅","\\cong",!0),r(n,o,u,"≥","\\ge"),r(n,o,u,"≥","\\geq",!0),r(n,o,u,"←","\\gets"),r(n,o,u,">","\\gt",!0),r(n,o,u,"∈","\\in",!0),r(n,o,u,"","\\@not"),r(n,o,u,"⊂","\\subset",!0),r(n,o,u,"⊃","\\supset",!0),r(n,o,u,"⊆","\\subseteq",!0),r(n,o,u,"⊇","\\supseteq",!0),r(n,e,u,"⊈","\\nsubseteq",!0),r(n,e,u,"⊉","\\nsupseteq",!0),r(n,o,u,"⊨","\\models"),r(n,o,u,"←","\\leftarrow",!0),r(n,o,u,"≤","\\le"),r(n,o,u,"≤","\\leq",!0),r(n,o,u,"<","\\lt",!0),r(n,o,u,"→","\\rightarrow",!0),r(n,o,u,"→","\\to"),r(n,e,u,"≱","\\ngeq",!0),r(n,e,u,"≰","\\nleq",!0),r(n,o,He," ","\\ "),r(n,o,He," ","\\space"),r(n,o,He," ","\\nobreakspace"),r(a,o,He," ","\\ "),r(a,o,He," "," "),r(a,o,He," ","\\space"),r(a,o,He," ","\\nobreakspace"),r(n,o,He,null,"\\nobreak"),r(n,o,He,null,"\\allowbreak"),r(n,o,Re,",",","),r(n,o,Re,";",";"),r(n,e,s,"⊼","\\barwedge",!0),r(n,e,s,"⊻","\\veebar",!0),r(n,o,s,"⊙","\\odot",!0),r(n,o,s,"⊕","\\oplus",!0),r(n,o,s,"⊗","\\otimes",!0),r(n,o,g,"∂","\\partial",!0),r(n,o,s,"⊘","\\oslash",!0),r(n,e,s,"⊚","\\circledcirc",!0),r(n,e,s,"⊡","\\boxdot",!0),r(n,o,s,"△","\\bigtriangleup"),r(n,o,s,"▽","\\bigtriangledown"),r(n,o,s,"†","\\dagger"),r(n,o,s,"⋄","\\diamond"),r(n,o,s,"⋆","\\star"),r(n,o,s,"◃","\\triangleleft"),r(n,o,s,"▹","\\triangleright"),r(n,o,p,"{","\\{"),r(a,o,g,"{","\\{"),r(a,o,g,"{","\\textbraceleft"),r(n,o,l,"}","\\}"),r(a,o,g,"}","\\}"),r(a,o,g,"}","\\textbraceright"),r(n,o,p,"{","\\lbrace"),r(n,o,l,"}","\\rbrace"),r(n,o,p,"[","\\lbrack",!0),r(a,o,g,"[","\\lbrack",!0),r(n,o,l,"]","\\rbrack",!0),r(a,o,g,"]","\\rbrack",!0),r(n,o,p,"(","\\lparen",!0),r(n,o,l,")","\\rparen",!0),r(a,o,g,"<","\\textless",!0),r(a,o,g,">","\\textgreater",!0),r(n,o,p,"⌊","\\lfloor",!0),r(n,o,l,"⌋","\\rfloor",!0),r(n,o,p,"⌈","\\lceil",!0),r(n,o,l,"⌉","\\rceil",!0),r(n,o,g,"\\","\\backslash"),r(n,o,g,"∣","|"),r(n,o,g,"∣","\\vert"),r(a,o,g,"|","\\textbar",!0),r(n,o,g,"∥","\\|"),r(n,o,g,"∥","\\Vert"),r(a,o,g,"∥","\\textbardbl"),r(a,o,g,"~","\\textasciitilde"),r(a,o,g,"\\","\\textbackslash"),r(a,o,g,"^","\\textasciicircum"),r(n,o,u,"↑","\\uparrow",!0),r(n,o,u,"⇑","\\Uparrow",!0),r(n,o,u,"↓","\\downarrow",!0),r(n,o,u,"⇓","\\Downarrow",!0),r(n,o,u,"↕","\\updownarrow",!0),r(n,o,u,"⇕","\\Updownarrow",!0),r(n,o,c,"∐","\\coprod"),r(n,o,c,"⋁","\\bigvee"),r(n,o,c,"⋀","\\bigwedge"),r(n,o,c,"⨄","\\biguplus"),r(n,o,c,"⋂","\\bigcap"),r(n,o,c,"⋃","\\bigcup"),r(n,o,c,"∫","\\int"),r(n,o,c,"∫","\\intop"),r(n,o,c,"∬","\\iint"),r(n,o,c,"∭","\\iiint"),r(n,o,c,"∏","\\prod"),r(n,o,c,"∑","\\sum"),r(n,o,c,"⨂","\\bigotimes"),r(n,o,c,"⨁","\\bigoplus"),r(n,o,c,"⨀","\\bigodot"),r(n,o,c,"∮","\\oint"),r(n,o,c,"∯","\\oiint"),r(n,o,c,"∰","\\oiiint"),r(n,o,c,"⨆","\\bigsqcup"),r(n,o,c,"∫","\\smallint"),r(a,o,Ie,"…","\\textellipsis"),r(n,o,Ie,"…","\\mathellipsis"),r(a,o,Ie,"…","\\ldots",!0),r(n,o,Ie,"…","\\ldots",!0),r(n,o,Ie,"⋯","\\@cdots",!0),r(n,o,Ie,"⋱","\\ddots",!0),r(n,o,g,"⋮","\\varvdots"),r(n,o,i,"ˊ","\\acute"),r(n,o,i,"ˋ","\\grave"),r(n,o,i,"¨","\\ddot"),r(n,o,i,"~","\\tilde"),r(n,o,i,"ˉ","\\bar"),r(n,o,i,"˘","\\breve"),r(n,o,i,"ˇ","\\check"),r(n,o,i,"^","\\hat"),r(n,o,i,"⃗","\\vec"),r(n,o,i,"˙","\\dot"),r(n,o,i,"˚","\\mathring"),r(n,o,m,"","\\@imath"),r(n,o,m,"","\\@jmath"),r(n,o,g,"ı","ı"),r(n,o,g,"ȷ","ȷ"),r(a,o,g,"ı","\\i",!0),r(a,o,g,"ȷ","\\j",!0),r(a,o,g,"ß","\\ss",!0),r(a,o,g,"æ","\\ae",!0),r(a,o,g,"œ","\\oe",!0),r(a,o,g,"ø","\\o",!0),r(a,o,g,"Æ","\\AE",!0),r(a,o,g,"Œ","\\OE",!0),r(a,o,g,"Ø","\\O",!0),r(a,o,i,"ˊ","\\'"),r(a,o,i,"ˋ","\\`"),r(a,o,i,"ˆ","\\^"),r(a,o,i,"˜","\\~"),r(a,o,i,"ˉ","\\="),r(a,o,i,"˘","\\u"),r(a,o,i,"˙","\\."),r(a,o,i,"¸","\\c"),r(a,o,i,"˚","\\r"),r(a,o,i,"ˇ","\\v"),r(a,o,i,"¨",'\\"'),r(a,o,i,"˝","\\H"),r(a,o,i,"◯","\\textcircled");const Oe={"--":!0,"---":!0,"``":!0,"''":!0};r(a,o,g,"–","--",!0),r(a,o,g,"–","\\textendash"),r(a,o,g,"—","---",!0),r(a,o,g,"—","\\textemdash"),r(a,o,g,"‘","`",!0),r(a,o,g,"‘","\\textquoteleft"),r(a,o,g,"’","'",!0),r(a,o,g,"’","\\textquoteright"),r(a,o,g,"“","``",!0),r(a,o,g,"“","\\textquotedblleft"),r(a,o,g,"”","''",!0),r(a,o,g,"”","\\textquotedblright"),r(n,o,g,"°","\\degree",!0),r(a,o,g,"°","\\degree"),r(a,o,g,"°","\\textdegree",!0),r(n,o,g,"£","\\pounds"),r(n,o,g,"£","\\mathsterling",!0),r(a,o,g,"£","\\pounds"),r(a,o,g,"£","\\textsterling",!0),r(n,e,g,"✠","\\maltese"),r(a,e,g,"✠","\\maltese");var Ee='0123456789/@."';for(let e=0;e<Ee.length;e++){const t=Ee.charAt(e);r(n,o,g,t,t)}var Le='0123456789!@*()-=+";:?/.,';for(let e=0;e<Le.length;e++){const t=Le.charAt(e);r(a,o,g,t,t)}var De="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";for(let e=0;e<De.length;e++){const t=De.charAt(e);r(n,o,m,t,t),r(a,o,g,t,t)}r(n,e,g,"C","ℂ"),r(a,e,g,"C","ℂ"),r(n,e,g,"H","ℍ"),r(a,e,g,"H","ℍ"),r(n,e,g,"N","ℕ"),r(a,e,g,"N","ℕ"),r(n,e,g,"P","ℙ"),r(a,e,g,"P","ℙ"),r(n,e,g,"Q","ℚ"),r(a,e,g,"Q","ℚ"),r(n,e,g,"R","ℝ"),r(a,e,g,"R","ℝ"),r(n,e,g,"Z","ℤ"),r(a,e,g,"Z","ℤ"),r(n,o,m,"h","ℎ"),r(a,o,m,"h","ℎ");let f="";for(let e=0;e<De.length;e++){const t=De.charAt(e);r(n,o,m,t,f=String.fromCharCode(55349,56320+e)),r(a,o,g,t,f),r(n,o,m,t,f=String.fromCharCode(55349,56372+e)),r(a,o,g,t,f),r(n,o,m,t,f=String.fromCharCode(55349,56424+e)),r(a,o,g,t,f),r(n,o,m,t,f=String.fromCharCode(55349,56580+e)),r(a,o,g,t,f),r(n,o,m,t,f=String.fromCharCode(55349,56684+e)),r(a,o,g,t,f),r(n,o,m,t,f=String.fromCharCode(55349,56736+e)),r(a,o,g,t,f),r(n,o,m,t,f=String.fromCharCode(55349,56788+e)),r(a,o,g,t,f),r(n,o,m,t,f=String.fromCharCode(55349,56840+e)),r(a,o,g,t,f),r(n,o,m,t,f=String.fromCharCode(55349,56944+e)),r(a,o,g,t,f),e<26&&(r(n,o,m,t,f=String.fromCharCode(55349,56632+e)),r(a,o,g,t,f),r(n,o,m,t,f=String.fromCharCode(55349,56476+e)),r(a,o,g,t,f))}r(n,o,m,"k",f=String.fromCharCode(55349,56668)),r(a,o,g,"k",f);for(let e=0;e<10;e++){const t=e.toString();r(n,o,m,t,f=String.fromCharCode(55349,57294+e)),r(a,o,g,t,f),r(n,o,m,t,f=String.fromCharCode(55349,57314+e)),r(a,o,g,t,f),r(n,o,m,t,f=String.fromCharCode(55349,57324+e)),r(a,o,g,t,f),r(n,o,m,t,f=String.fromCharCode(55349,57334+e)),r(a,o,g,t,f)}for(let e=0;e<"ÐÞþ".length;e++){const t="ÐÞþ".charAt(e);r(n,o,m,t,t),r(a,o,g,t,t)}function Pe(e,t,r){return{value:e=h[r][e]&&h[r][e].replace?h[r][e].replace:e,metrics:se(e,t,r)}}function Ve(t,e,r,n,a){var o=Pe(t,e,r),i=o.metrics;let s;if(t=o.value,i){let e=i.italic;("text"===r||n&&"mathit"===n.font)&&(e=0),s=new d(t,i.height,i.depth,e,i.skew,i.width,a)}else"undefined"!=typeof console&&console.warn("No character metrics for '"+t+"' in style '"+e+"' and mode '"+r+"'"),s=new d(t,0,0,0,0,0,a);if(n){s.maxFontSize=n.sizeMultiplier,n.style.isTight()&&s.classes.push("mtight");const t=n.getColor();t&&(s.style.color=t)}return s}function Fe(t){let r=0,n=0,a=0;for(let e=0;e<t.children.length;e++){var o=t.children[e];o.height>r&&(r=o.height),o.depth>n&&(n=o.depth),o.maxFontSize>a&&(a=o.maxFontSize)}t.height=r,t.depth=n,t.maxFontSize=a}function b(e,t,r,n){return Fe(e=new ve(e,t,r,n)),e}function Ge(e){return Fe(e=new ne(e)),e}function Ue(e,t,r){let n="";switch(e){case"amsrm":n="AMS";break;case"textrm":n="Main";break;case"textsf":n="SansSerif";break;case"texttt":n="Typewriter";break;default:n=e}return n+"-"+("textbf"===t&&"textit"===r?"BoldItalic":"textbf"===t?"Bold":"textit"===t?"Italic":"Regular")}const Ye=[["mathbf","textbf","Main-Bold"],["mathbf","textbf","Main-Bold"],["mathnormal","textit","Math-Italic"],["mathnormal","textit","Math-Italic"],["boldsymbol","boldsymbol","Main-BoldItalic"],["boldsymbol","boldsymbol","Main-BoldItalic"],["mathscr","textscr","Script-Regular"],["","",""],["","",""],["","",""],["mathfrak","textfrak","Fraktur-Regular"],["mathfrak","textfrak","Fraktur-Regular"],["mathbb","textbb","AMS-Regular"],["mathbb","textbb","AMS-Regular"],["mathboldfrak","textboldfrak","Fraktur-Regular"],["mathboldfrak","textboldfrak","Fraktur-Regular"],["mathsf","textsf","SansSerif-Regular"],["mathsf","textsf","SansSerif-Regular"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathitsf","textitsf","SansSerif-Italic"],["mathitsf","textitsf","SansSerif-Italic"],["","",""],["","",""],["mathtt","texttt","Typewriter-Regular"],["mathtt","texttt","Typewriter-Regular"]],Xe=[["mathbf","textbf","Main-Bold"],["","",""],["mathsf","textsf","SansSerif-Regular"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathtt","texttt","Typewriter-Regular"]],We=(e,t,r,n)=>new ve(e,t,r,n),je={mathbf:{variant:"bold",fontName:"Main-Bold"},mathrm:{variant:"normal",fontName:"Main-Regular"},textit:{variant:"italic",fontName:"Main-Italic"},mathit:{variant:"italic",fontName:"Main-Italic"},mathnormal:{variant:"italic",fontName:"Math-Italic"},mathbb:{variant:"double-struck",fontName:"AMS-Regular"},mathcal:{variant:"script",fontName:"Caligraphic-Regular"},mathfrak:{variant:"fraktur",fontName:"Fraktur-Regular"},mathscr:{variant:"script",fontName:"Script-Regular"},mathsf:{variant:"sans-serif",fontName:"SansSerif-Regular"},mathtt:{variant:"monospace",fontName:"Typewriter-Regular"}},_e={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]};var N={fontMap:je,makeSymbol:Ve,mathsym:function(e,t,r,n){return void 0===n&&(n=[]),"boldsymbol"===r.font&&Pe(e,"Main-Bold",t).metrics?Ve(e,"Main-Bold",t,r,n.concat(["mathbf"])):"\\"===e||"main"===h[t][e].font?Ve(e,"Main-Regular",t,r,n):Ve(e,"AMS-Regular",t,r,n.concat(["amsrm"]))},makeSpan:b,makeSvgSpan:We,makeLineSpan:function(e,t,r){return(e=b([e],[],t)).height=Math.max(r||t.fontMetrics().defaultRuleThickness,t.minRuleThickness),e.style.borderBottomWidth=C(e.height),e.maxFontSize=1,e},makeAnchor:function(e,t,r,n){return Fe(e=new ke(e,t,r,n)),e},makeFragment:Ge,wrapFragment:function(e,t){return e instanceof ne?b([],[e],t):e},makeVList:function(t,r){const{children:n,depth:a}=function(r){if("individualShift"===r.positionType){const o=r.children,s=[o[0]],l=-o[0].shift-o[0].elem.depth;let t=l;for(let e=1;e<o.length;e++){var n=-o[e].shift-t-o[e].elem.depth,a=n-(o[e-1].elem.height+o[e-1].elem.depth);t+=n,s.push({type:"kern",size:a}),s.push(o[e])}return{children:s,depth:l}}let o;if("top"===r.positionType){let t=r.positionData;for(let e=0;e<r.children.length;e++){var i=r.children[e];t-="kern"===i.type?i.size:i.elem.height+i.elem.depth}o=t}else if("bottom"===r.positionType)o=-r.positionData;else{var e=r.children[0];if("elem"!==e.type)throw new Error('First child must have type "elem".');if("shift"===r.positionType)o=-e.elem.depth-r.positionData;else{if("firstBaseline"!==r.positionType)throw new Error("Invalid positionType "+r.positionType+".");o=-e.elem.depth}}return{children:r.children,depth:o}}(t);let o=0;for(let e=0;e<n.length;e++){const r=n[e];if("elem"===r.type){const t=r.elem;o=Math.max(o,t.maxFontSize,t.height)}}o+=2;var i=b(["pstrut"],[]),s=(i.style.height=C(o),[]);let l=a,h=a,m=a;for(let e=0;e<n.length;e++){const r=n[e];if("kern"===r.type)m+=r.size;else{const t=r.elem,n=r.wrapperClasses||[],a=r.wrapperStyle||{},l=b(n,[i,t],void 0,a);l.style.top=C(-o-m-t.depth),r.marginLeft&&(l.style.marginLeft=r.marginLeft),r.marginRight&&(l.style.marginRight=r.marginRight),s.push(l),m+=t.height+t.depth}l=Math.min(l,m),h=Math.max(h,m)}var e=b(["vlist"],s);let c;if(e.style.height=C(h),l<0){const t=b([],[]),r=b(["vlist"],[t]),n=(r.style.height=C(-l),b(["vlist-s"],[new d("​")]));c=[b(["vlist-r"],[e,n]),b(["vlist-r"],[r])]}else c=[b(["vlist-r"],[e])];return t=b(["vlist-t"],c),2===c.length&&t.classes.push("vlist-t2"),t.height=h,t.depth=-l,t},makeOrd:function(e,n,a){var o=e.mode,i=e.text,s=["mord"],e="math"===o||"text"===o&&n.font,l=e?n.font:n.fontFamily;let t="",r="";if(55349===i.charCodeAt(0)&&([t,r]=function(e,t){var r=1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320)+65536,t="math"===t?0:1;if(119808<=r&&r<120484){const e=Math.floor((r-119808)/26);return[Ye[e][2],Ye[e][t]]}if(120782<=r&&r<=120831){const e=Math.floor((r-120782)/10);return[Xe[e][2],Xe[e][t]]}if(120485==r||120486==r)return[Ye[0][2],Ye[0][t]];if(120486<r&&r<120782)return["",""];throw new z("Unsupported character: "+e)}(i,o)),0<t.length)return Ve(i,t,o,n,s.concat(r));if(l){let t,r;if("boldsymbol"===l){const n="textord"!==a&&Pe(i,"Math-BoldItalic",o).metrics?{fontName:"Math-BoldItalic",fontClass:"boldsymbol"}:{fontName:"Main-Bold",fontClass:"mathbf"};t=n.fontName,r=[n.fontClass]}else r=e?(t=je[l].fontName,[l]):(t=Ue(l,n.fontWeight,n.fontShape),[l,n.fontWeight,n.fontShape]);if(Pe(i,t,o).metrics)return Ve(i,t,o,n,s.concat(r));if(Oe.hasOwnProperty(i)&&"Typewriter"===t.slice(0,10)){const a=[];for(let e=0;e<i.length;e++)a.push(Ve(i[e],t,o,n,s.concat(r)));return Ge(a)}}if("mathord"===a)return Ve(i,"Math-Italic",o,n,s.concat(["mathnormal"]));if("textord"!==a)throw new Error("unexpected type: "+a+" in makeOrd");{const e=h[o][i]&&h[o][i].font;if("ams"===e){const e=Ue("amsrm",n.fontWeight,n.fontShape);return Ve(i,e,o,n,s.concat("amsrm",n.fontWeight,n.fontShape))}if("main"!==e&&e){const a=Ue(e,n.fontWeight,n.fontShape);return Ve(i,a,o,n,s.concat(a,n.fontWeight,n.fontShape))}{const e=Ue("textrm",n.fontWeight,n.fontShape);return Ve(i,e,o,n,s.concat(n.fontWeight,n.fontShape))}}},makeGlue:(e,t)=>{var r=b(["mspace"],[],t),e=B(e,t);return r.style.marginRight=C(e),r},staticSvg:function(e,t){var[e,r,n]=_e[e],e=new Ae(e),e=new ze([e],{width:C(r),height:C(n),style:"width:"+C(r),viewBox:"0 0 "+1e3*r+" "+1e3*n,preserveAspectRatio:"xMinYMin"});return(e=We(["overlay"],[e],t)).height=n,e.style.height=C(n),e.style.width=C(r),e},svgData:_e,tryCombineChars:t=>{for(let e=0;e<t.length-1;e++){var r=t[e],n=t[e+1];r instanceof d&&n instanceof d&&((e,t)=>{if(ge(e.classes)!==ge(t.classes)||e.skew!==t.skew||e.maxFontSize!==t.maxFontSize)return!1;if(1===e.classes.length){const t=e.classes[0];if("mbin"===t||"mord"===t)return!1}for(const r in e.style)if(e.style.hasOwnProperty(r)&&e.style[r]!==t.style[r])return!1;for(const n in t.style)if(t.style.hasOwnProperty(n)&&e.style[n]!==t.style[n])return!1;return!0})(r,n)&&(r.text+=n.text,r.height=Math.max(r.height,n.height),r.depth=Math.max(r.depth,n.depth),r.italic=n.italic,t.splice(e+1,1),e--)}return t}};const y={number:3,unit:"mu"},$e={number:4,unit:"mu"},Ze={number:5,unit:"mu"},Ke={mord:{mop:y,mbin:$e,mrel:Ze,minner:y},mop:{mord:y,mop:y,mrel:Ze,minner:y},mbin:{mord:$e,mop:$e,mopen:$e,minner:$e},mrel:{mord:Ze,mop:Ze,mopen:Ze,minner:Ze},mopen:{},mclose:{mop:y,mbin:$e,mrel:Ze,minner:y},mpunct:{mord:y,mop:y,mrel:Ze,mopen:y,mclose:y,mpunct:y,minner:y},minner:{mord:y,mop:y,mbin:$e,mrel:Ze,mopen:y,mpunct:y,minner:y}},Je={mord:{mop:y},mop:{mord:y,mop:y},mbin:{},mrel:{},mopen:{},mclose:{mop:y},mpunct:{},minner:{mop:y}},Qe={},et={},tt={};function x(e){var{type:e,names:t,props:r,handler:n,htmlBuilder:a,mathmlBuilder:o}=e,i={type:e,numArgs:r.numArgs,argTypes:r.argTypes,allowedInArgument:!!r.allowedInArgument,allowedInText:!!r.allowedInText,allowedInMath:void 0===r.allowedInMath||r.allowedInMath,numOptionalArgs:r.numOptionalArgs||0,infix:!!r.infix,primitive:!!r.primitive,handler:n};for(let e=0;e<t.length;++e)Qe[t[e]]=i;e&&(a&&(et[e]=a),o)&&(tt[e]=o)}function rt(e){var{type:e,htmlBuilder:t,mathmlBuilder:r}=e;x({type:e,names:[],props:{numArgs:0},handler(){throw new Error("Should never be called.")},htmlBuilder:t,mathmlBuilder:r})}function nt(e){return"ordgroup"===e.type&&1===e.body.length?e.body[0]:e}function w(e){return"ordgroup"===e.type?e.body:[e]}function q(t,r,e,a){void 0===a&&(a=[null,null]);var o=[];for(let e=0;e<t.length;e++){const a=I(t[e],r);if(a instanceof ne){const t=a.children;o.push(...t)}else o.push(a)}if(N.tryCombineChars(o),e){let n=r;if(1===t.length){const e=t[0];"sizing"===e.type?n=r.havingSize(e.size):"styling"===e.type&&(n=r.havingStyle(lt[e.style]))}var i=ot([a[0]||"leftmost"],[],r),a=ot([a[1]||"rightmost"],[],r),e="root"===e;mt(o,(e,t)=>{var r=t.classes[0],n=e.classes[0];"mbin"===r&&A.contains(st,n)?t.classes[0]="mord":"mbin"===n&&A.contains(it,r)&&(e.classes[0]="mord")},{node:i},a,e),mt(o,(e,t)=>{var t=ut(t),r=ut(e);if(e=t&&r?(e.hasClass("mtight")?Je:Ke)[t][r]:null)return N.makeGlue(e,n)},{node:i},a,e)}return o}function at(e,t){return e=["nulldelimiter"].concat(e.baseSizingClasses()),ot(t.concat(e))}const ot=N.makeSpan,it=["leftmost","mbin","mopen","mrel","mop","mpunct"],st=["rightmost","mrel","mclose","mpunct"],lt={display:T.DISPLAY,text:T.TEXT,script:T.SCRIPT,scriptscript:T.SCRIPTSCRIPT},ht={mord:"mord",mop:"mop",mbin:"mbin",mrel:"mrel",mopen:"mopen",mclose:"mclose",mpunct:"mpunct",minner:"minner"},mt=function(r,e,t,n,a){n&&r.push(n);let o=0;for(;o<r.length;o++){const n=r[o],s=ct(n);if(s)mt(s.children,e,t,null,a);else{var i=!n.hasClass("mspace");if(i){const a=e(n,t.node);a&&(t.insertAfter?t.insertAfter(a):(r.unshift(a),o++))}i?t.node=n:a&&n.hasClass("newline")&&(t.node=ot(["leftmost"])),t.insertAfter=(t=>e=>{r.splice(t+1,0,e),o++})(o)}}n&&r.pop()},ct=function(e){return e instanceof ne||e instanceof ke||e instanceof ve&&e.hasClass("enclosing")?e:null},pt=function(e,t){var r=ct(e);if(r){const e=r.children;if(e.length){if("right"===t)return pt(e[e.length-1],"right");if("left"===t)return pt(e[0],"left")}}return e},ut=function(e,t){return e&&(t&&(e=pt(e,t)),ht[e.classes[0]])||null},I=function(t,r,n){if(!t)return ot();if(et[t.type]){let e=et[t.type](t,r);if(n&&r.size!==n.size){e=ot(r.sizingClasses(n),[e],r);const t=r.sizeMultiplier/n.sizeMultiplier;e.height*=t,e.depth*=t}return e}throw new z("Got group of unknown type: '"+t.type+"'")};function dt(e,t){return e=ot(["base"],e,t),(t=ot(["strut"])).style.height=C(e.height+e.depth),e.depth&&(t.style.verticalAlign=C(-e.depth)),e.children.unshift(t),e}function gt(e,r){let t=null;1===e.length&&"tag"===e[0].type&&(t=e[0].tag,e=e[0].body);var n=q(e,r,"root");let a;2===n.length&&n[1].hasClass("tag")&&(a=n.pop());var o=[];let i,s=[];for(let t=0;t<n.length;t++)if(s.push(n[t]),n[t].hasClass("mbin")||n[t].hasClass("mrel")||n[t].hasClass("allowbreak")){let e=!1;for(;t<n.length-1&&n[t+1].hasClass("mspace")&&!n[t+1].hasClass("newline");)t++,s.push(n[t]),n[t].hasClass("nobreak")&&(e=!0);e||(o.push(dt(s,r)),s=[])}else n[t].hasClass("newline")&&(s.pop(),0<s.length&&(o.push(dt(s,r)),s=[]),o.push(n[t]));0<s.length&&o.push(dt(s,r)),t?((i=dt(q(t,r,!0))).classes=["tag"],o.push(i)):a&&o.push(a);var l=ot(["katex-html"],o);if(l.setAttribute("aria-hidden","true"),i){const e=i.children[0];e.style.height=C(l.height+l.depth),l.depth&&(e.style.verticalAlign=C(-l.depth))}return l}function ft(e){return new ne(e)}class v{constructor(e,t,r){this.type=void 0,this.attributes=void 0,this.children=void 0,this.classes=void 0,this.type=e,this.attributes={},this.children=t||[],this.classes=r||[]}setAttribute(e,t){this.attributes[e]=t}getAttribute(e){return this.attributes[e]}toNode(){var t=document.createElementNS("http://www.w3.org/1998/Math/MathML",this.type);for(const e in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,e)&&t.setAttribute(e,this.attributes[e]);0<this.classes.length&&(t.className=ge(this.classes));for(let e=0;e<this.children.length;e++)t.appendChild(this.children[e].toNode());return t}toMarkup(){let t="<"+this.type;for(const e in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,e)&&(t+=" "+e+'="',t+=A.escape(this.attributes[e]),t+='"');0<this.classes.length&&(t+=' class ="'+A.escape(ge(this.classes))+'"'),t+=">";for(let e=0;e<this.children.length;e++)t+=this.children[e].toMarkup();return t+="</"+this.type+">"}toText(){return this.children.map(e=>e.toText()).join("")}}class bt{constructor(e){this.text=void 0,this.text=e}toNode(){return document.createTextNode(this.text)}toMarkup(){return A.escape(this.toText())}toText(){return this.text}}var k={MathNode:v,TextNode:bt,SpaceNode:class{constructor(e){this.width=void 0,this.character=void 0,this.width=e,this.character=.05555<=e&&e<=.05556?" ":.1666<=e&&e<=.1667?" ":.2222<=e&&e<=.2223?" ":.2777<=e&&e<=.2778?"  ":-.05556<=e&&e<=-.05555?" ⁣":-.1667<=e&&e<=-.1666?" ⁣":-.2223<=e&&e<=-.2222?" ⁣":-.2778<=e&&e<=-.2777?" ⁣":null}toNode(){var e;return this.character?document.createTextNode(this.character):((e=document.createElementNS("http://www.w3.org/1998/Math/MathML","mspace")).setAttribute("width",C(this.width)),e)}toMarkup(){return this.character?"<mtext>"+this.character+"</mtext>":'<mspace width="'+C(this.width)+'"/>'}toText(){return this.character||" "}},newDocumentFragment:ft};function S(e,t,r){return!h[t][e]||!h[t][e].replace||55349===e.charCodeAt(0)||Oe.hasOwnProperty(e)&&r&&(r.fontFamily&&"tt"===r.fontFamily.slice(4,6)||r.font&&"tt"===r.font.slice(4,6))||(e=h[t][e].replace),new k.TextNode(e)}function yt(e){return 1===e.length?e[0]:new k.MathNode("mrow",e)}function xt(e,t){var r;return"texttt"===t.fontFamily?"monospace":"textsf"===t.fontFamily?"textit"===t.fontShape&&"textbf"===t.fontWeight?"sans-serif-bold-italic":"textit"===t.fontShape?"sans-serif-italic":"textbf"===t.fontWeight?"bold-sans-serif":"sans-serif":"textit"===t.fontShape&&"textbf"===t.fontWeight?"bold-italic":"textit"===t.fontShape?"italic":"textbf"===t.fontWeight?"bold":(t=t.font)&&"mathnormal"!==t?(r=e.mode,"mathit"===t?"italic":"boldsymbol"===t?"textord"===e.type?"bold":"bold-italic":"mathbf"===t?"bold":"mathbb"===t?"double-struck":"mathfrak"===t?"fraktur":"mathscr"===t||"mathcal"===t?"script":"mathsf"===t?"sans-serif":"mathtt"===t?"monospace":(e=e.text,!A.contains(["\\imath","\\jmath"],e)&&se(e=h[r][e]&&h[r][e].replace?h[r][e].replace:e,N.fontMap[t].fontName,r)?N.fontMap[t].variant:null)):null}function M(t,r,e){if(1===t.length){const n=R(t[0],r);return e&&n instanceof v&&"mo"===n.type&&(n.setAttribute("lspace","0em"),n.setAttribute("rspace","0em")),[n]}const n=[];let a;for(let e=0;e<t.length;e++){var o=R(t[e],r);if(o instanceof v&&a instanceof v){if("mtext"===o.type&&"mtext"===a.type&&o.getAttribute("mathvariant")===a.getAttribute("mathvariant")){a.children.push(...o.children);continue}if("mn"===o.type&&"mn"===a.type){a.children.push(...o.children);continue}if("mi"===o.type&&1===o.children.length&&"mn"===a.type){const t=o.children[0];if(t instanceof bt&&"."===t.text){a.children.push(...o.children);continue}}else if("mi"===a.type&&1===a.children.length){const t=a.children[0];if(t instanceof bt&&"̸"===t.text&&("mo"===o.type||"mi"===o.type||"mn"===o.type)){const t=o.children[0];t instanceof bt&&0<t.text.length&&(t.text=t.text.slice(0,1)+"̸"+t.text.slice(1),n.pop())}}}n.push(o),a=o}return n}function wt(e,t,r){return yt(M(e,t,r))}const R=function(e,t){if(!e)return new k.MathNode("mrow");if(tt[e.type])return tt[e.type](e,t);throw new z("Got group of unknown type: '"+e.type+"'")};function vt(e,t,r,n,a){return r=1===(e=M(e,r)).length&&e[0]instanceof v&&A.contains(["mrow","mtable"],e[0].type)?e[0]:new k.MathNode("mrow",e),(e=new k.MathNode("annotation",[new k.TextNode(t)])).setAttribute("encoding","application/x-tex"),t=new k.MathNode("semantics",[r,e]),(r=new k.MathNode("math",[t])).setAttribute("xmlns","http://www.w3.org/1998/Math/MathML"),n&&r.setAttribute("display","block"),N.makeSpan([e=a?"katex":"katex-mathml"],[r])}function kt(e){return new ue({style:e.displayMode?T.DISPLAY:T.TEXT,maxSize:e.maxSize,minRuleThickness:e.minRuleThickness})}function St(e,t){var r;return t.displayMode&&(r=["katex-display"],t.leqno&&r.push("leqno"),t.fleqn&&r.push("fleqn"),e=N.makeSpan(r,[e])),e}const Mt={widehat:"^",widecheck:"ˇ",widetilde:"~",utilde:"~",overleftarrow:"←",underleftarrow:"←",xleftarrow:"←",overrightarrow:"→",underrightarrow:"→",xrightarrow:"→",underbrace:"⏟",overbrace:"⏞",overgroup:"⏠",undergroup:"⏡",overleftrightarrow:"↔",underleftrightarrow:"↔",xleftrightarrow:"↔",Overrightarrow:"⇒",xRightarrow:"⇒",overleftharpoon:"↼",xleftharpoonup:"↼",overrightharpoon:"⇀",xrightharpoonup:"⇀",xLeftarrow:"⇐",xLeftrightarrow:"⇔",xhookleftarrow:"↩",xhookrightarrow:"↪",xmapsto:"↦",xrightharpoondown:"⇁",xleftharpoondown:"↽",xrightleftharpoons:"⇌",xleftrightharpoons:"⇋",xtwoheadleftarrow:"↞",xtwoheadrightarrow:"↠",xlongequal:"=",xtofrom:"⇄",xrightleftarrows:"⇄",xrightequilibrium:"⇌",xleftequilibrium:"⇋","\\cdrightarrow":"→","\\cdleftarrow":"←","\\cdlongequal":"="},zt={overrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],overleftarrow:[["leftarrow"],.888,522,"xMinYMin"],underrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],underleftarrow:[["leftarrow"],.888,522,"xMinYMin"],xrightarrow:[["rightarrow"],1.469,522,"xMaxYMin"],"\\cdrightarrow":[["rightarrow"],3,522,"xMaxYMin"],xleftarrow:[["leftarrow"],1.469,522,"xMinYMin"],"\\cdleftarrow":[["leftarrow"],3,522,"xMinYMin"],Overrightarrow:[["doublerightarrow"],.888,560,"xMaxYMin"],xRightarrow:[["doublerightarrow"],1.526,560,"xMaxYMin"],xLeftarrow:[["doubleleftarrow"],1.526,560,"xMinYMin"],overleftharpoon:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoonup:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoondown:[["leftharpoondown"],.888,522,"xMinYMin"],overrightharpoon:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoonup:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoondown:[["rightharpoondown"],.888,522,"xMaxYMin"],xlongequal:[["longequal"],.888,334,"xMinYMin"],"\\cdlongequal":[["longequal"],3,334,"xMinYMin"],xtwoheadleftarrow:[["twoheadleftarrow"],.888,334,"xMinYMin"],xtwoheadrightarrow:[["twoheadrightarrow"],.888,334,"xMaxYMin"],overleftrightarrow:[["leftarrow","rightarrow"],.888,522],overbrace:[["leftbrace","midbrace","rightbrace"],1.6,548],underbrace:[["leftbraceunder","midbraceunder","rightbraceunder"],1.6,548],underleftrightarrow:[["leftarrow","rightarrow"],.888,522],xleftrightarrow:[["leftarrow","rightarrow"],1.75,522],xLeftrightarrow:[["doubleleftarrow","doublerightarrow"],1.75,560],xrightleftharpoons:[["leftharpoondownplus","rightharpoonplus"],1.75,716],xleftrightharpoons:[["leftharpoonplus","rightharpoondownplus"],1.75,716],xhookleftarrow:[["leftarrow","righthook"],1.08,522],xhookrightarrow:[["lefthook","rightarrow"],1.08,522],overlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],underlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],overgroup:[["leftgroup","rightgroup"],.888,342],undergroup:[["leftgroupunder","rightgroupunder"],.888,342],xmapsto:[["leftmapsto","rightarrow"],1.5,522],xtofrom:[["leftToFrom","rightToFrom"],1.75,528],xrightleftarrows:[["baraboveleftarrow","rightarrowabovebar"],1.75,901],xrightequilibrium:[["baraboveshortleftharpoon","rightharpoonaboveshortbar"],1.75,716],xleftequilibrium:[["shortbaraboveleftharpoon","shortrightharpoonabovebar"],1.75,716]};function At(e){return(e=new k.MathNode("mo",[new k.TextNode(Mt[e.replace(/^\\/,"")])])).setAttribute("stretchy","true"),e}function Tt(p,u){var{span:e,minWidth:t,height:r}=function(){let n=4e5;var a=p.label.slice(1);if(A.contains(["widehat","widecheck","widetilde","utilde"],a)){var o="ordgroup"===(o=p.base).type?o.body.length:1;let e,t,r;if(5<o)t="widehat"===a||"widecheck"===a?(e=420,n=2364,r=.42,a+"4"):(e=312,n=2340,r=.34,"tilde4");else{const p=[1,1,2,2,3,3][o];t="widehat"===a||"widecheck"===a?(n=[0,1062,2364,2364,2364][p],e=[0,239,300,360,420][p],r=[0,.24,.3,.3,.36,.42][p],a+p):(n=[0,600,1033,2339,2340][p],e=[0,260,286,306,312][p],r=[0,.26,.286,.3,.306,.34][p],"tilde"+p)}return o=new Ae(t),o=new ze([o],{width:"100%",height:C(r),viewBox:"0 0 "+n+" "+e,preserveAspectRatio:"none"}),{span:N.makeSvgSpan([],[o],u),minWidth:0,height:r}}{const p=[],o=zt[a],[i,s,l]=o,A=l/1e3,h=i.length;let t,r;if(1===h)t=["hide-tail"],r=[o[3]];else if(2===h)t=["halfarrow-left","halfarrow-right"],r=["xMinYMin","xMaxYMin"];else{if(3!==h)throw new Error("Correct katexImagesData or update code here to support\n "+h+" children.");t=["brace-left","brace-center","brace-right"],r=["xMinYMin","xMidYMin","xMaxYMin"]}for(let e=0;e<h;e++){const o=new Ae(i[e]),m=new ze([o],{width:"400em",height:C(A),viewBox:"0 0 "+n+" "+l,preserveAspectRatio:r[e]+" slice"}),c=N.makeSvgSpan([t[e]],[m],u);if(1===h)return{span:c,minWidth:s,height:A};c.style.height=C(A),p.push(c)}return{span:N.makeSpan(["stretchy"],p,u),minWidth:s,height:A}}}();return e.height=r,e.style.height=C(r),0<t&&(e.style.minWidth=C(t)),e}function H(e,t){if(e&&e.type===t)return e;throw new Error("Expected node of type "+t+", but got "+(e?"node of type "+e.type:String(e)))}function Bt(e){var t=Ct(e);if(t)return t;throw new Error("Expected node of symbol group type, but got "+(e?"node of type "+e.type:String(e)))}function Ct(e){return e&&("atom"===e.type||Ne.hasOwnProperty(e.type))?e:null}const Nt=(n,a)=>{let e,o,i,s=(n&&"supsub"===n.type?(o=H(n.base,"accent"),e=o.base,n.base=e,i=function(e){if(e instanceof ve)return e;throw new Error("Expected span<HtmlDomNode> but got "+String(e)+".")}(I(n,a)),n.base=o):(o=H(n,"accent"),e=o.base),n=I(e,a.havingCrampedStyle()),0);if(o.isShifty&&A.isCharacterBox(e)){const n=A.getBaseElem(e);s=Be(I(n,a.havingCrampedStyle())).skew}var l="\\c"===o.label;let h,m=l?n.height+n.depth:Math.min(n.height,a.fontMetrics().xHeight);if(o.isStretchy)h=Tt(o,a),h=N.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:n},{type:"elem",elem:h,wrapperClasses:["svg-align"],wrapperStyle:0<s?{width:"calc(100% - "+C(2*s)+")",marginLeft:C(2*s)}:void 0}]},a);else{let e,t;"\\vec"===o.label?(e=N.staticSvg("vec",a),t=N.svgData.vec[1]):((e=Be(e=N.makeOrd({mode:o.mode,text:o.label},a,"textord"))).italic=0,t=e.width,l&&(m+=e.depth)),h=N.makeSpan(["accent-body"],[e]);const i="\\textcircled"===o.label;i&&(h.classes.push("accent-full"),m=n.height);let r=s;i||(r-=t/2),h.style.left=C(r),"\\textcircled"===o.label&&(h.style.top=".2em"),h=N.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:n},{type:"kern",size:-m},{type:"elem",elem:h}]},a)}return l=N.makeSpan(["mord","accent"],[h],a),i?(i.children[0]=l,i.height=Math.max(l.height,i.height),i.classes[0]="mord",i):l},qt=(e,t)=>{var r=e.isStretchy?At(e.label):new k.MathNode("mo",[S(e.label,e.mode)]);return(e=new k.MathNode("mover",[R(e.base,t),r])).setAttribute("accent","true"),e},It=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map(e=>"\\"+e).join("|")),Rt=(x({type:"accent",names:["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring","\\widecheck","\\widehat","\\widetilde","\\overrightarrow","\\overleftarrow","\\Overrightarrow","\\overleftrightarrow","\\overgroup","\\overlinesegment","\\overleftharpoon","\\overrightharpoon"],props:{numArgs:1},handler:(e,t)=>{var t=nt(t[0]),r=!It.test(e.funcName),n=!r||"\\widehat"===e.funcName||"\\widetilde"===e.funcName||"\\widecheck"===e.funcName;return{type:"accent",mode:e.parser.mode,label:e.funcName,isStretchy:r,isShifty:n,base:t}},htmlBuilder:Nt,mathmlBuilder:qt}),x({type:"accent",names:["\\'","\\`","\\^","\\~","\\=","\\u","\\.",'\\"',"\\c","\\r","\\H","\\v","\\textcircled"],props:{numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["primitive"]},handler:(e,t)=>{t=t[0];let r=e.parser.mode;return"math"===r&&(e.parser.settings.reportNonstrict("mathVsTextAccents","LaTeX's accent "+e.funcName+" works only in text mode"),r="text"),{type:"accent",mode:r,label:e.funcName,isStretchy:!1,isShifty:!0,base:t}},htmlBuilder:Nt,mathmlBuilder:qt}),x({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleftrightarrow","\\undergroup","\\underlinesegment","\\utilde"],props:{numArgs:1},handler:(e,t)=>{var{parser:e,funcName:r}=e,t=t[0];return{type:"accentUnder",mode:e.mode,label:r,base:t}},htmlBuilder:(e,t)=>{var r=I(e.base,t),n=Tt(e,t),e="\\utilde"===e.label?.12:0,n=N.makeVList({positionType:"top",positionData:r.height,children:[{type:"elem",elem:n,wrapperClasses:["svg-align"]},{type:"kern",size:e},{type:"elem",elem:r}]},t);return N.makeSpan(["mord","accentunder"],[n],t)},mathmlBuilder:(e,t)=>{var r=At(e.label);return(e=new k.MathNode("munder",[R(e.base,t),r])).setAttribute("accentunder","true"),e}}),e=>((e=new k.MathNode("mpadded",e?[e]:[])).setAttribute("width","+0.6em"),e.setAttribute("lspace","0.3em"),e)),Ht=(x({type:"xArrow",names:["\\xleftarrow","\\xrightarrow","\\xLeftarrow","\\xRightarrow","\\xleftrightarrow","\\xLeftrightarrow","\\xhookleftarrow","\\xhookrightarrow","\\xmapsto","\\xrightharpoondown","\\xrightharpoonup","\\xleftharpoondown","\\xleftharpoonup","\\xrightleftharpoons","\\xleftrightharpoons","\\xlongequal","\\xtwoheadrightarrow","\\xtwoheadleftarrow","\\xtofrom","\\xrightleftarrows","\\xrightequilibrium","\\xleftequilibrium","\\\\cdrightarrow","\\\\cdleftarrow","\\\\cdlongequal"],props:{numArgs:1,numOptionalArgs:1},handler(e,t,r){var{parser:e,funcName:n}=e;return{type:"xArrow",mode:e.mode,label:n,body:t[0],below:r[0]}},htmlBuilder(e,t){var r=t.style,n=t.havingStyle(r.sup()),a=N.wrapFragment(I(e.body,n,t),t),o="\\x"===e.label.slice(0,2)?"x":"cd";let i;a.classes.push(o+"-arrow-pad"),e.below&&(n=t.havingStyle(r.sub()),(i=N.wrapFragment(I(e.below,n,t),t)).classes.push(o+"-arrow-pad")),r=Tt(e,t),n=-t.fontMetrics().axisHeight+.5*r.height;let s,l=-t.fontMetrics().axisHeight-.5*r.height-.111;if((.25<a.depth||"\\xleftequilibrium"===e.label)&&(l-=a.depth),i){const e=-t.fontMetrics().axisHeight+i.height+.5*r.height+.111;s=N.makeVList({positionType:"individualShift",children:[{type:"elem",elem:a,shift:l},{type:"elem",elem:r,shift:n},{type:"elem",elem:i,shift:e}]},t)}else s=N.makeVList({positionType:"individualShift",children:[{type:"elem",elem:a,shift:l},{type:"elem",elem:r,shift:n}]},t);return s.children[0].children[0].children[1].classes.push("svg-align"),N.makeSpan(["mrel","x-arrow"],[s],t)},mathmlBuilder(e,t){var r,n,a=At(e.label);let o;return a.setAttribute("minsize","x"===e.label.charAt(0)?"1.75em":"3.0em"),o=e.body?(r=Rt(R(e.body,t)),e.below?(n=Rt(R(e.below,t)),new k.MathNode("munderover",[a,n,r])):new k.MathNode("mover",[a,r])):e.below?(n=Rt(R(e.below,t)),new k.MathNode("munder",[a,n])):(o=Rt(),new k.MathNode("mover",[a,o]))}}),N.makeSpan);function Ot(e,t){var r=q(e.body,t,!0);return Ht([e.mclass],r,t)}function Et(e,t){let r;return t=M(e.body,t),"minner"===e.mclass?r=new k.MathNode("mpadded",t):"mord"===e.mclass?e.isCharacterBox?(r=t[0]).type="mi":r=new k.MathNode("mi",t):(e.isCharacterBox?(r=t[0]).type="mo":r=new k.MathNode("mo",t),"mbin"===e.mclass?(r.attributes.lspace="0.22em",r.attributes.rspace="0.22em"):"mpunct"===e.mclass?(r.attributes.lspace="0em",r.attributes.rspace="0.17em"):"mopen"===e.mclass||"mclose"===e.mclass?(r.attributes.lspace="0em",r.attributes.rspace="0em"):"minner"===e.mclass&&(r.attributes.lspace="0.0556em",r.attributes.width="+0.1111em")),r}x({type:"mclass",names:["\\mathord","\\mathbin","\\mathrel","\\mathopen","\\mathclose","\\mathpunct","\\mathinner"],props:{numArgs:1,primitive:!0},handler(e,t){var{parser:e,funcName:r}=e,t=t[0];return{type:"mclass",mode:e.mode,mclass:"m"+r.slice(5),body:w(t),isCharacterBox:A.isCharacterBox(t)}},htmlBuilder:Ot,mathmlBuilder:Et});const Lt=e=>"atom"!==(e="ordgroup"===e.type&&e.body.length?e.body[0]:e).type||"bin"!==e.family&&"rel"!==e.family?"mord":"m"+e.family,Dt=(x({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler(e,t){return{type:"mclass",mode:(e=e.parser).mode,mclass:Lt(t[0]),body:w(t[1]),isCharacterBox:A.isCharacterBox(t[1])}}}),x({type:"mclass",names:["\\stackrel","\\overset","\\underset"],props:{numArgs:2},handler(e,t){var{parser:e,funcName:r}=e,n=t[1],t=t[0],a="\\stackrel"!==r?Lt(n):"mrel",n={type:"op",mode:n.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:"\\stackrel"!==r,body:w(n)},n={type:"supsub",mode:t.mode,base:n,sup:"\\underset"===r?null:t,sub:"\\underset"===r?t:null};return{type:"mclass",mode:e.mode,mclass:a,body:[n],isCharacterBox:A.isCharacterBox(n)}},htmlBuilder:Ot,mathmlBuilder:Et}),x({type:"pmb",names:["\\pmb"],props:{numArgs:1,allowedInText:!0},handler(e,t){return{type:"pmb",mode:(e=e.parser).mode,mclass:Lt(t[0]),body:w(t[0])}},htmlBuilder(e,t){var r=q(e.body,t,!0);return(e=N.makeSpan([e.mclass],r,t)).style.textShadow="0.02em 0.01em 0.04px",e},mathmlBuilder(e,t){return e=M(e.body,t),(t=new k.MathNode("mstyle",e)).setAttribute("style","text-shadow: 0.02em 0.01em 0.04px"),t}}),{">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"}),Pt=e=>"textord"===e.type&&"@"===e.text;function Vt(e,t,r){if(r=se(h.math[e]&&h.math[e].replace||e,t,r))return r;throw new Error("Unsupported symbol "+e+" and font size "+t+".")}function Ft(e,t,r,n){return t=r.havingBaseStyle(t),n=N.makeSpan(n.concat(t.sizingClasses(r)),[e],r),e=t.sizeMultiplier/r.sizeMultiplier,n.height*=e,n.depth*=e,n.maxFontSize=t.sizeMultiplier,n}function Gt(e,t,r){r=t.havingBaseStyle(r),r=(1-t.sizeMultiplier/r.sizeMultiplier)*t.fontMetrics().axisHeight,e.classes.push("delimcenter"),e.style.top=C(r),e.height-=r,e.depth+=r}function Ut(e,t,r,n,a,o){return e=N.makeSymbol(e,"Size"+t+"-Regular",a,n),a=Ft(N.makeSpan(["delimsizing","size"+t],[e],n),T.TEXT,n,o),r&&Gt(a,n,T.TEXT),a}function Yt(e,t,r){return{type:"elem",elem:N.makeSpan(["delimsizinginner","Size1-Regular"===t?"delim-size1":"delim-size4"],[N.makeSpan([],[N.makeSymbol(e,t,r)])])}}function Xt(e,t,r){var n=(ae["Size4-Regular"][e.charCodeAt(0)]?ae["Size4-Regular"]:ae["Size1-Regular"])[e.charCodeAt(0)][4],e=new Ae("inner",function(e,t){switch(e){case"⎜":return"M291 0 H417 V"+t+" H291z M291 0 H417 V"+t+" H291z";case"∣":return"M145 0 H188 V"+t+" H145z M145 0 H188 V"+t+" H145z";case"∥":return"M145 0 H188 V"+t+" H145z M145 0 H188 V"+t+" H145zM367 0 H410 V"+t+" H367z M367 0 H410 V"+t+" H367z";case"⎟":return"M457 0 H583 V"+t+" H457z M457 0 H583 V"+t+" H457z";case"⎢":return"M319 0 H403 V"+t+" H319z M319 0 H403 V"+t+" H319z";case"⎥":return"M263 0 H347 V"+t+" H263z M263 0 H347 V"+t+" H263z";case"⎪":return"M384 0 H504 V"+t+" H384z M384 0 H504 V"+t+" H384z";case"⏐":return"M312 0 H355 V"+t+" H312z M312 0 H355 V"+t+" H312z";case"‖":return"M257 0 H300 V"+t+" H257z M257 0 H300 V"+t+" H257zM478 0 H521 V"+t+" H478z M478 0 H521 V"+t+" H478z";default:return""}}(e,Math.round(1e3*t))),e=new ze([e],{width:C(n),height:C(t),style:"width:"+C(n),viewBox:"0 0 "+1e3*n+" "+Math.round(1e3*t),preserveAspectRatio:"xMinYMin"});return(e=N.makeSvgSpan([],[e],r)).height=t,e.style.height=C(t),e.style.width=C(n),{type:"elem",elem:e}}function Wt(e,t,r,n,a,o){let i,s,l,h,m="",c=0,p=(i=l=h=e,s=null,"Size1-Regular");"\\uparrow"===e?l=h="⏐":"\\Uparrow"===e?l=h="‖":"\\downarrow"===e?i=l="⏐":"\\Downarrow"===e?i=l="‖":"\\updownarrow"===e?(i="\\uparrow",l="⏐",h="\\downarrow"):"\\Updownarrow"===e?(i="\\Uparrow",l="‖",h="\\Downarrow"):A.contains(e0,e)?(l="∣",m="vert",c=333):A.contains(t0,e)?(l="∥",m="doublevert",c=556):"["===e||"\\lbrack"===e?(i="⎡",l="⎢",h="⎣",p="Size4-Regular",m="lbrack",c=667):"]"===e||"\\rbrack"===e?(i="⎤",l="⎥",h="⎦",p="Size4-Regular",m="rbrack",c=667):"\\lfloor"===e||"⌊"===e?(l=i="⎢",h="⎣",p="Size4-Regular",m="lfloor",c=667):"\\lceil"===e||"⌈"===e?(i="⎡",l=h="⎢",p="Size4-Regular",m="lceil",c=667):"\\rfloor"===e||"⌋"===e?(l=i="⎥",h="⎦",p="Size4-Regular",m="rfloor",c=667):"\\rceil"===e||"⌉"===e?(i="⎤",l=h="⎥",p="Size4-Regular",m="rceil",c=667):"("===e||"\\lparen"===e?(i="⎛",l="⎜",h="⎝",p="Size4-Regular",m="lparen",c=875):")"===e||"\\rparen"===e?(i="⎞",l="⎟",h="⎠",p="Size4-Regular",m="rparen",c=875):"\\{"===e||"\\lbrace"===e?(i="⎧",s="⎨",h="⎩",l="⎪",p="Size4-Regular"):"\\}"===e||"\\rbrace"===e?(i="⎫",s="⎬",h="⎭",l="⎪",p="Size4-Regular"):"\\lgroup"===e||"⟮"===e?(i="⎧",h="⎩",l="⎪",p="Size4-Regular"):"\\rgroup"===e||"⟯"===e?(i="⎫",h="⎭",l="⎪",p="Size4-Regular"):"\\lmoustache"===e||"⎰"===e?(i="⎧",h="⎭",l="⎪",p="Size4-Regular"):"\\rmoustache"!==e&&"⎱"!==e||(i="⎫",h="⎩",l="⎪",p="Size4-Regular");var e=Vt(i,p,a),u=e.height+e.depth,e=Vt(l,p,a),e=e.height+e.depth,d=(d=Vt(h,p,a)).height+d.depth;let g=0,f=1;if(null!==s){const e=Vt(s,p,a);g=e.height+e.depth,f=2}var b=(b=u+d+g)+Math.max(0,Math.ceil((t-b)/(f*e)))*f*e;let y=n.fontMetrics().axisHeight;r&&(y*=n.sizeMultiplier);var t=b/2-y,x=[];if(0<m.length){const e=b-u-d,t=Math.round(1e3*b),r=function(e,t){switch(e){case"lbrack":return"M403 1759 V84 H666 V0 H319 V1759 v"+t+" v1759 h347 v-84\nH403z M403 1759 V0 H319 V1759 v"+t+" v1759 h84z";case"rbrack":return"M347 1759 V0 H0 V84 H263 V1759 v"+t+" v1759 H0 v84 H347z\nM347 1759 V0 H263 V1759 v"+t+" v1759 h84z";case"vert":return"M145 15 v585 v"+t+" v585 c2.667,10,9.667,15,21,15\nc10,0,16.667,-5,20,-15 v-585 v"+-t+" v-585 c-2.667,-10,-9.667,-15,-21,-15\nc-10,0,-16.667,5,-20,15z M188 15 H145 v585 v"+t+" v585 h43z";case"doublevert":return"M145 15 v585 v"+t+" v585 c2.667,10,9.667,15,21,15\nc10,0,16.667,-5,20,-15 v-585 v"+-t+" v-585 c-2.667,-10,-9.667,-15,-21,-15\nc-10,0,-16.667,5,-20,15z M188 15 H145 v585 v"+t+" v585 h43z\nM367 15 v585 v"+t+" v585 c2.667,10,9.667,15,21,15\nc10,0,16.667,-5,20,-15 v-585 v"+-t+" v-585 c-2.667,-10,-9.667,-15,-21,-15\nc-10,0,-16.667,5,-20,15z M410 15 H367 v585 v"+t+" v585 h43z";case"lfloor":return"M319 602 V0 H403 V602 v"+t+" v1715 h263 v84 H319z\nMM319 602 V0 H403 V602 v"+t+" v1715 H319z";case"rfloor":return"M319 602 V0 H403 V602 v"+t+" v1799 H0 v-84 H319z\nMM319 602 V0 H403 V602 v"+t+" v1715 H319z";case"lceil":return"M403 1759 V84 H666 V0 H319 V1759 v"+t+" v602 h84z\nM403 1759 V0 H319 V1759 v"+t+" v602 h84z";case"rceil":return"M347 1759 V0 H0 V84 H263 V1759 v"+t+" v602 h84z\nM347 1759 V0 h-84 V1759 v"+t+" v602 h84z";case"lparen":return"M863,9c0,-2,-2,-5,-6,-9c0,0,-17,0,-17,0c-12.7,0,-19.3,0.3,-20,1\nc-5.3,5.3,-10.3,11,-15,17c-242.7,294.7,-395.3,682,-458,1162c-21.3,163.3,-33.3,349,\n-36,557 l0,"+(t+84)+"c0.2,6,0,26,0,60c2,159.3,10,310.7,24,454c53.3,528,210,\n949.7,470,1265c4.7,6,9.7,11.7,15,17c0.7,0.7,7,1,19,1c0,0,18,0,18,0c4,-4,6,-7,6,-9\nc0,-2.7,-3.3,-8.7,-10,-18c-135.3,-192.7,-235.5,-414.3,-300.5,-665c-65,-250.7,-102.5,\n-544.7,-112.5,-882c-2,-104,-3,-167,-3,-189\nl0,-"+(t+92)+"c0,-162.7,5.7,-314,17,-454c20.7,-272,63.7,-513,129,-723c65.3,\n-210,155.3,-396.3,270,-559c6.7,-9.3,10,-15.3,10,-18z";case"rparen":return"M76,0c-16.7,0,-25,3,-25,9c0,2,2,6.3,6,13c21.3,28.7,42.3,60.3,\n63,95c96.7,156.7,172.8,332.5,228.5,527.5c55.7,195,92.8,416.5,111.5,664.5\nc11.3,139.3,17,290.7,17,454c0,28,1.7,43,3.3,45l0,"+(t+9)+"\nc-3,4,-3.3,16.7,-3.3,38c0,162,-5.7,313.7,-17,455c-18.7,248,-55.8,469.3,-111.5,664\nc-55.7,194.7,-131.8,370.3,-228.5,527c-20.7,34.7,-41.7,66.3,-63,95c-2,3.3,-4,7,-6,11\nc0,7.3,5.7,11,17,11c0,0,11,0,11,0c9.3,0,14.3,-0.3,15,-1c5.3,-5.3,10.3,-11,15,-17\nc242.7,-294.7,395.3,-681.7,458,-1161c21.3,-164.7,33.3,-350.7,36,-558\nl0,-"+(t+144)+"c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7,\n-470,-1265c-4.7,-6,-9.7,-11.7,-15,-17c-0.7,-0.7,-6.7,-1,-18,-1z";default:throw new Error("Unknown stretchy delimiter.")}}(m,Math.round(1e3*e)),a=new Ae(m,r),o=(c/1e3).toFixed(3)+"em",i=(t/1e3).toFixed(3)+"em",s=new ze([a],{width:o,height:i,viewBox:"0 0 "+c+" "+t}),A=N.makeSvgSpan([],[s],n);A.height=t/1e3,A.style.width=o,A.style.height=i,x.push({type:"elem",elem:A})}else{if(x.push(Yt(h,p,a)),x.push(Qt),null===s){const e=b-u-d+.016;x.push(Xt(l,e,n))}else{const e=(b-u-d-g)/2+.016;x.push(Xt(l,e,n)),x.push(Qt),x.push(Yt(s,p,a)),x.push(Qt),x.push(Xt(l,e,n))}x.push(Qt),x.push(Yt(i,p,a))}return e=n.havingBaseStyle(T.TEXT),r=N.makeVList({positionType:"bottom",positionData:t,children:x},e),Ft(N.makeSpan(["delimsizing","mult"],[r],e),T.TEXT,n,o)}function jt(i,e,t,r,n){return r=function(e,t){e*=1e3;let r="";switch(i){case"sqrtMain":r=(o=e,te,"M95,"+(622+o+80)+"\nc-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14\nc0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54\nc44.2,-33.3,65.8,-50.3,66.5,-51c1.3,-1.3,3,-2,5,-2c4.7,0,8.7,3.3,12,10\ns173,378,173,378c0.7,0,35.3,-71,104,-213c68.7,-142,137.5,-285,206.5,-429\nc69,-144,104.5,-217.7,106.5,-221\nl"+o/2.075+" -"+o+"\nc5.3,-9.3,12,-14,20,-14\nH400000v"+(40+o)+"H845.2724\ns-225.272,467,-225.272,467s-235,486,-235,486c-2.7,4.7,-9,7,-19,7\nc-6,0,-10,-1,-12,-3s-194,-422,-194,-422s-65,47,-65,47z\nM"+(834+o)+" 80h400000v"+(40+o)+"h-400000z");break;case"sqrtSize1":r=(o=e,te,"M263,"+(601+o+80)+"c0.7,0,18,39.7,52,119\nc34,79.3,68.167,158.7,102.5,238c34.3,79.3,51.8,119.3,52.5,120\nc340,-704.7,510.7,-1060.3,512,-1067\nl"+o/2.084+" -"+o+"\nc4.7,-7.3,11,-11,19,-11\nH40000v"+(40+o)+"H1012.3\ns-271.3,567,-271.3,567c-38.7,80.7,-84,175,-136,283c-52,108,-89.167,185.3,-111.5,232\nc-22.3,46.7,-33.8,70.3,-34.5,71c-4.7,4.7,-12.3,7,-23,7s-12,-1,-12,-1\ns-109,-253,-109,-253c-72.7,-168,-109.3,-252,-110,-252c-10.7,8,-22,16.7,-34,26\nc-22,17.3,-33.3,26,-34,26s-26,-26,-26,-26s76,-59,76,-59s76,-60,76,-60z\nM"+(1001+o)+" 80h400000v"+(40+o)+"h-400000z");break;case"sqrtSize2":r=(a=e,te,"M983 "+(10+a+80)+"\nl"+a/3.13+" -"+a+"\nc4,-6.7,10,-10,18,-10 H400000v"+(40+a)+"\nH1013.1s-83.4,268,-264.1,840c-180.7,572,-277,876.3,-289,913c-4.7,4.7,-12.7,7,-24,7\ns-12,0,-12,0c-1.3,-3.3,-3.7,-11.7,-7,-25c-35.3,-125.3,-106.7,-373.3,-214,-744\nc-10,12,-21,25,-33,39s-32,39,-32,39c-6,-5.3,-15,-14,-27,-26s25,-30,25,-30\nc26.7,-32.7,52,-63,76,-91s52,-60,52,-60s208,722,208,722\nc56,-175.3,126.3,-397.3,211,-666c84.7,-268.7,153.8,-488.2,207.5,-658.5\nc53.7,-170.3,84.5,-266.8,92.5,-289.5z\nM"+(1001+a)+" 80h400000v"+(40+a)+"h-400000z");break;case"sqrtSize3":r=(a=e,te,"M424,"+(2398+a+80)+"\nc-1.3,-0.7,-38.5,-172,-111.5,-514c-73,-342,-109.8,-513.3,-110.5,-514\nc0,-2,-10.7,14.3,-32,49c-4.7,7.3,-9.8,15.7,-15.5,25c-5.7,9.3,-9.8,16,-12.5,20\ns-5,7,-5,7c-4,-3.3,-8.3,-7.7,-13,-13s-13,-13,-13,-13s76,-122,76,-122s77,-121,77,-121\ns209,968,209,968c0,-2,84.7,-361.7,254,-1079c169.3,-717.3,254.7,-1077.7,256,-1081\nl"+a/4.223+" -"+a+"c4,-6.7,10,-10,18,-10 H400000\nv"+(40+a)+"H1014.6\ns-87.3,378.7,-272.6,1166c-185.3,787.3,-279.3,1182.3,-282,1185\nc-2,6,-10,9,-24,9\nc-8,0,-12,-0.7,-12,-2z M"+(1001+a)+" 80\nh400000v"+(40+a)+"h-400000z");break;case"sqrtSize4":r=(n=e,te,"M473,"+(2713+n+80)+"\nc339.3,-1799.3,509.3,-2700,510,-2702 l"+n/5.298+" -"+n+"\nc3.3,-7.3,9.3,-11,18,-11 H400000v"+(40+n)+"H1017.7\ns-90.5,478,-276.2,1466c-185.7,988,-279.5,1483,-281.5,1485c-2,6,-10,9,-24,9\nc-8,0,-12,-0.7,-12,-2c0,-1.3,-5.3,-32,-16,-92c-50.7,-293.3,-119.7,-693.3,-207,-1200\nc0,-1.3,-5.3,8.7,-16,30c-10.7,21.3,-21.3,42.7,-32,64s-16,33,-16,33s-26,-26,-26,-26\ns76,-153,76,-153s77,-151,77,-151c0.7,0.7,35.7,202,105,604c67.3,400.7,102,602.7,104,\n606zM"+(1001+n)+" 80h400000v"+(40+n)+"H1017.7z");break;case"sqrtTall":r=(n=e,te,"M702 "+(80+n)+"H400000"+(40+n)+"\nH742v"+(t-54-80-n)+"l-4 4-4 4c-.667.7 -2 1.5-4 2.5s-4.167 1.833-6.5 2.5-5.5 1-9.5 1\nh-12l-28-84c-16.667-52-96.667 -294.333-240-727l-212 -643 -85 170\nc-4-3.333-8.333-7.667-13 -13l-13-13l77-155 77-156c66 199.333 139 419.667\n219 661 l218 661zM702 80H400000v"+(40+n)+"H742z")}var n,a,o;return r}(r,t),r=new Ae(i,r),r=new ze([r],{width:"400em",height:C(e),viewBox:"0 0 400000 "+t,preserveAspectRatio:"xMinYMin slice"}),N.makeSvgSpan(["hide-tail"],[r],n)}function _t(r,n,a,o){for(let t=Math.min(2,3-o.style.size);t<a.length&&"stack"!==a[t].type;t++){var i=Vt(r,function(e){if("small"===e.type)return"Main-Regular";if("large"===e.type)return"Size"+e.size+"-Regular";if("stack"===e.type)return"Size4-Regular";throw new Error("Add support for delim type '"+e.type+"' here.")}(a[t]),"math");let e=i.height+i.depth;if("small"===a[t].type&&(e*=o.havingBaseStyle(a[t].style).sizeMultiplier),e>n)return a[t]}return a[a.length-1]}function $t(e,t,r,n,a,o){var i,s,l,h,m,c;return"<"===e||"\\lt"===e||"⟨"===e?e="\\langle":">"!==e&&"\\gt"!==e&&"⟩"!==e||(e="\\rangle"),"small"===(c=_t(e,t,A.contains(a0,e)?i0:A.contains(r0,e)?l0:s0,n)).type?(i=e,s=c.style,l=r,m=o,i=Ft(N.makeSymbol(i,"Main-Regular",a,h=n),s,h,m),l&&Gt(i,h,s),i):"large"===c.type?Ut(e,c.size,r,n,a,o):Wt(e,t,r,n,a,o)}x({type:"cdlabel",names:["\\\\cdleft","\\\\cdright"],props:{numArgs:1},handler(e,t){var{parser:e,funcName:r}=e;return{type:"cdlabel",mode:e.mode,side:r.slice(4),label:t[0]}},htmlBuilder(e,t){var r=t.havingStyle(t.style.sup());return(r=N.wrapFragment(I(e.label,r,t),t)).classes.push("cd-label-"+e.side),r.style.bottom=C(.8-r.depth),r.height=0,r.depth=0,r},mathmlBuilder(e,t){let r=new k.MathNode("mrow",[R(e.label,t)]);return(r=new k.MathNode("mpadded",[r])).setAttribute("width","0"),"left"===e.side&&r.setAttribute("lspace","-1width"),r.setAttribute("voffset","0.7em"),(r=new k.MathNode("mstyle",[r])).setAttribute("displaystyle","false"),r.setAttribute("scriptlevel","1"),r}}),x({type:"cdlabelparent",names:["\\\\cdparent"],props:{numArgs:1},handler(e,t){return{type:"cdlabelparent",mode:(e=e.parser).mode,fragment:t[0]}},htmlBuilder(e,t){return(e=N.wrapFragment(I(e.fragment,t),t)).classes.push("cd-vert-arrow"),e},mathmlBuilder(e,t){return new k.MathNode("mrow",[R(e.fragment,t)])}}),x({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler(e,t){var e=e.parser,r=H(t[0],"ordgroup").body;let n="";for(let e=0;e<r.length;e++)n+=H(r[e],"textord").text;t=parseInt(n);if(isNaN(t))throw new z("\\@char has non-numeric argument "+n);if(t<0||1114111<=t)throw new z("\\@char with invalid code point "+n);return t=t<=65535?String.fromCharCode(t):(t-=65536,String.fromCharCode(55296+(t>>10),56320+(1023&t))),{type:"textord",mode:e.mode,text:t}}}),x({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,argTypes:["color","original"]},handler(e,t){var e=e.parser,r=H(t[0],"color-token").color,t=t[1];return{type:"color",mode:e.mode,color:r,body:w(t)}},htmlBuilder:He=(e,t)=>(t=q(e.body,t.withColor(e.color),!1),N.makeFragment(t)),mathmlBuilder:Re=(e,t)=>(t=M(e.body,t.withColor(e.color)),(t=new k.MathNode("mstyle",t)).setAttribute("mathcolor",e.color),t)}),x({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,argTypes:["color"]},handler(e,t){var{parser:e,breakOnTokenText:r}=e,t=H(t[0],"color-token").color,r=(e.gullet.macros.set("\\current@color",t),e.parseExpression(!0,r));return{type:"color",mode:e.mode,color:t,body:r}},htmlBuilder:He,mathmlBuilder:Re}),x({type:"cr",names:["\\\\"],props:{numArgs:0,numOptionalArgs:0,allowedInText:!0},handler(e,t,r){var n="["===(e=e.parser).gullet.future().text?e.parseSizeGroup(!0):null,a=!e.settings.displayMode||!e.settings.useStrictBehavior("newLineInDisplayMode","In LaTeX, \\\\ or \\newline does nothing in display mode");return{type:"cr",mode:e.mode,newLine:a,size:n&&H(n,"size").value}},htmlBuilder(e,t){var r=N.makeSpan(["mspace"],[],t);return e.newLine&&(r.classes.push("newline"),e.size)&&(r.style.marginTop=C(B(e.size,t))),r},mathmlBuilder(e,t){var r=new k.MathNode("mspace");return e.newLine&&(r.setAttribute("linebreak","newline"),e.size)&&r.setAttribute("height",C(B(e.size,t))),r}});const Zt={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},Kt=e=>{var t=e.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(t))throw new z("Expected a control sequence",e);return t},Jt=(e,t,r,n)=>{let a=e.gullet.macros.get(r.text);null==a&&(r.noexpand=!0,a={tokens:[r],numArgs:0,unexpandable:!e.gullet.isExpandable(r.text)}),e.gullet.macros.set(t,a,n)},Qt=(x({type:"internal",names:["\\global","\\long","\\\\globallong"],props:{numArgs:0,allowedInText:!0},handler(e){var{parser:e,funcName:t}=e,r=(e.consumeSpaces(),e.fetch());if(Zt[r.text])return"\\global"!==t&&"\\\\globallong"!==t||(r.text=Zt[r.text]),H(e.parseFunction(),"internal");throw new z("Invalid token after macro prefix",r)}}),x({type:"internal",names:["\\def","\\gdef","\\edef","\\xdef"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){let{parser:t,funcName:r}=e,n=t.gullet.popToken();if(e=n.text,/^(?:[\\{}$&#^_]|EOF)$/.test(e))throw new z("Expected a control sequence",n);let a,o=0;for(var i=[[]];"{"!==t.gullet.future().text;)if("#"===(n=t.gullet.popToken()).text){if("{"===t.gullet.future().text){a=t.gullet.future(),i[o].push("{");break}if(n=t.gullet.popToken(),!/^[1-9]$/.test(n.text))throw new z('Invalid argument number "'+n.text+'"');if(parseInt(n.text)!==o+1)throw new z('Argument number "'+n.text+'" out of order');o++,i.push([])}else{if("EOF"===n.text)throw new z("Expected a macro definition");i[o].push(n.text)}let s=t.gullet.consumeArg().tokens;return a&&s.unshift(a),"\\edef"!==r&&"\\xdef"!==r||(s=t.gullet.expandTokens(s)).reverse(),t.gullet.macros.set(e,{tokens:s,numArgs:o,delimiters:i},r===Zt[r]),{type:"internal",mode:t.mode}}}),x({type:"internal",names:["\\let","\\\\globallet"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:e,funcName:t}=e,r=Kt(e.gullet.popToken()),n=(e.gullet.consumeSpaces(),(e=>{let t=e.gullet.popToken();return t="="===t.text&&" "===(t=e.gullet.popToken()).text?e.gullet.popToken():t})(e));return Jt(e,r,n,"\\\\globallet"===t),{type:"internal",mode:e.mode}}}),x({type:"internal",names:["\\futurelet","\\\\globalfuture"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:e,funcName:t}=e,r=Kt(e.gullet.popToken()),n=e.gullet.popToken(),a=e.gullet.popToken();return Jt(e,r,a,"\\\\globalfuture"===t),e.gullet.pushToken(a),e.gullet.pushToken(n),{type:"internal",mode:e.mode}}}),{type:"kern",size:-.008}),e0=["|","\\lvert","\\rvert","\\vert"],t0=["\\|","\\lVert","\\rVert","\\Vert"],r0=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","\\surd"],n0=["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱"],a0=["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"],o0=[0,1.2,1.8,2.4,3],i0=[{type:"small",style:T.SCRIPTSCRIPT},{type:"small",style:T.SCRIPT},{type:"small",style:T.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],s0=[{type:"small",style:T.SCRIPTSCRIPT},{type:"small",style:T.SCRIPT},{type:"small",style:T.TEXT},{type:"stack"}],l0=[{type:"small",style:T.SCRIPTSCRIPT},{type:"small",style:T.SCRIPT},{type:"small",style:T.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}];var h0={sqrtImage:function(e,t){var r=t.havingBaseSizing(),n=_t("\\surd",e*r.sizeMultiplier,l0,r);let a=r.sizeMultiplier;r=Math.max(0,t.minRuleThickness-t.fontMetrics().sqrtRuleThickness);let o,i,s=0,l=0,h=0;return i="small"===n.type?(h=1e3+1e3*r+80,e<1?a=1:e<1.4&&(a=.7),s=(1+r+.08)/a,l=(1+r)/a,(o=jt("sqrtMain",s,h,r,t)).style.minWidth="0.853em",.833/a):"large"===n.type?(h=1080*o0[n.size],l=(o0[n.size]+r)/a,s=(o0[n.size]+r+.08)/a,(o=jt("sqrtSize"+n.size,s,h,r,t)).style.minWidth="1.02em",1/a):(s=e+r+.08,l=e+r,h=Math.floor(1e3*e+r)+80,(o=jt("sqrtTall",s,h,r,t)).style.minWidth="0.742em",1.056),o.height=l,o.style.height=C(s),{span:o,advanceWidth:i,ruleWidth:(t.fontMetrics().sqrtRuleThickness+r)*a}},sizedDelim:function(e,t,r,n,a){if("<"===e||"\\lt"===e||"⟨"===e?e="\\langle":">"!==e&&"\\gt"!==e&&"⟩"!==e||(e="\\rangle"),A.contains(r0,e)||A.contains(a0,e))return Ut(e,t,!1,r,n,a);if(A.contains(n0,e))return Wt(e,o0[t],!1,r,n,a);throw new z("Illegal delimiter: '"+e+"'")},sizeToMaxHeight:o0,customSizedDelim:$t,leftRightDelim:function(e,t,r,n,a,o){var i=n.fontMetrics().axisHeight*n.sizeMultiplier,s=5/n.fontMetrics().ptPerEm,t=Math.max(t-i,r+i);return $t(e,r=Math.max(t/500*901,2*t-s),!0,n,a,o)}};const m0={"\\bigl":{mclass:"mopen",size:1},"\\Bigl":{mclass:"mopen",size:2},"\\biggl":{mclass:"mopen",size:3},"\\Biggl":{mclass:"mopen",size:4},"\\bigr":{mclass:"mclose",size:1},"\\Bigr":{mclass:"mclose",size:2},"\\biggr":{mclass:"mclose",size:3},"\\Biggr":{mclass:"mclose",size:4},"\\bigm":{mclass:"mrel",size:1},"\\Bigm":{mclass:"mrel",size:2},"\\biggm":{mclass:"mrel",size:3},"\\Biggm":{mclass:"mrel",size:4},"\\big":{mclass:"mord",size:1},"\\Big":{mclass:"mord",size:2},"\\bigg":{mclass:"mord",size:3},"\\Bigg":{mclass:"mord",size:4}},c0=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","<",">","\\langle","⟨","\\rangle","⟩","\\lt","\\gt","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱","/","\\backslash","|","\\vert","\\|","\\Vert","\\uparrow","\\Uparrow","\\downarrow","\\Downarrow","\\updownarrow","\\Updownarrow","."];function p0(e,t){var r=Ct(e);if(r&&A.contains(c0,r.text))return r;throw new z(r?"Invalid delimiter '"+r.text+"' after '"+t.funcName+"'":"Invalid delimiter type '"+e.type+"'",e)}function u0(e){if(!e.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}x({type:"delimsizing",names:["\\bigl","\\Bigl","\\biggl","\\Biggl","\\bigr","\\Bigr","\\biggr","\\Biggr","\\bigm","\\Bigm","\\biggm","\\Biggm","\\big","\\Big","\\bigg","\\Bigg"],props:{numArgs:1,argTypes:["primitive"]},handler:(e,t)=>(t=p0(t[0],e),{type:"delimsizing",mode:e.parser.mode,size:m0[e.funcName].size,mclass:m0[e.funcName].mclass,delim:t.text}),htmlBuilder:(e,t)=>"."===e.delim?N.makeSpan([e.mclass]):h0.sizedDelim(e.delim,e.size,t,e.mode,[e.mclass]),mathmlBuilder:e=>{var t=[],t=("."!==e.delim&&t.push(S(e.delim,e.mode)),new k.MathNode("mo",t)),e=("mopen"===e.mclass||"mclose"===e.mclass?t.setAttribute("fence","true"):t.setAttribute("fence","false"),t.setAttribute("stretchy","true"),C(h0.sizeToMaxHeight[e.size]));return t.setAttribute("minsize",e),t.setAttribute("maxsize",e),t}}),x({type:"leftright-right",names:["\\right"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var r=e.parser.gullet.macros.get("\\current@color");if(r&&"string"!=typeof r)throw new z("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:e.parser.mode,delim:p0(t[0],e).text,color:r}}}),x({type:"leftright",names:["\\left"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var t=p0(t[0],e),r=(++(e=e.parser).leftrightDepth,e.parseExpression(!1)),n=(--e.leftrightDepth,e.expect("\\right",!1),H(e.parseFunction(),"leftright-right"));return{type:"leftright",mode:e.mode,body:r,left:t.text,right:n.delim,rightColor:n.color}},htmlBuilder:(t,e)=>{u0(t);const r=q(t.body,e,!0,["mopen","mclose"]);let n,a,o=0,i=0,s=!1;for(let e=0;e<r.length;e++)r[e].isMiddle?s=!0:(o=Math.max(r[e].height,o),i=Math.max(r[e].depth,i));if(o*=e.sizeMultiplier,i*=e.sizeMultiplier,n="."===t.left?at(e,["mopen"]):h0.leftRightDelim(t.left,o,i,e,t.mode,["mopen"]),r.unshift(n),s)for(let e=1;e<r.length;e++){const n=r[e].isMiddle;n&&(r[e]=h0.leftRightDelim(n.delim,o,i,n.options,t.mode,[]))}if("."===t.right)a=at(e,["mclose"]);else{const r=t.rightColor?e.withColor(t.rightColor):e;a=h0.leftRightDelim(t.right,o,i,r,t.mode,["mclose"])}return r.push(a),N.makeSpan(["minner"],r,e)},mathmlBuilder:(e,t)=>{u0(e);var r=M(e.body,t);if("."!==e.left){const t=new k.MathNode("mo",[S(e.left,e.mode)]);t.setAttribute("fence","true"),r.unshift(t)}if("."!==e.right){const t=new k.MathNode("mo",[S(e.right,e.mode)]);t.setAttribute("fence","true"),e.rightColor&&t.setAttribute("mathcolor",e.rightColor),r.push(t)}return yt(r)}}),x({type:"middle",names:["\\middle"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{if(t=p0(t[0],e),e.parser.leftrightDepth)return{type:"middle",mode:e.parser.mode,delim:t.text};throw new z("\\middle without preceding \\left",t)},htmlBuilder:(e,t)=>{let r;return"."===e.delim?r=at(t,[]):(r=h0.sizedDelim(e.delim,1,t,e.mode,[]),e={delim:e.delim,options:t},r.isMiddle=e),r},mathmlBuilder:(e,t)=>(e="\\vert"===e.delim||"|"===e.delim?S("|","text"):S(e.delim,e.mode),(e=new k.MathNode("mo",[e])).setAttribute("fence","true"),e.setAttribute("lspace","0.05em"),e.setAttribute("rspace","0.05em"),e)}),x({type:"enclose",names:["\\colorbox"],props:{numArgs:2,allowedInText:!0,argTypes:["color","text"]},handler(e,t,r){var{parser:e,funcName:n}=e,a=H(t[0],"color-token").color,t=t[1];return{type:"enclose",mode:e.mode,label:n,backgroundColor:a,body:t}},htmlBuilder:s=(r,n)=>{const a=N.wrapFragment(I(r.body,n),n),o=r.label.slice(1);let s,e=n.sizeMultiplier,l=0;const h=A.isCharacterBox(r.body);if("sout"===o)(s=N.makeSpan(["stretchy","sout"])).height=n.fontMetrics().defaultRuleThickness/e,l=-.5*n.fontMetrics().xHeight;else if("phase"===o){const r=B({number:.6,unit:"pt"},n),o=B({number:.35,unit:"ex"},n),h=(e/=n.havingBaseSizing().sizeMultiplier,a.height+a.depth+r+o),A=(a.style.paddingLeft=C(h/2+r),Math.floor(1e3*h*e)),t="M400000 "+A+" H0 L"+A/2+" 0 l65 45 L145 "+(A-80)+" H400000z",i=new ze([new Ae("phase",t)],{width:"400em",height:C(A/1e3),viewBox:"0 0 400000 "+A,preserveAspectRatio:"xMinYMin slice"});(s=N.makeSvgSpan(["hide-tail"],[i],n)).style.height=C(h),l=a.depth+r+o}else{/cancel/.test(o)?h||a.classes.push("cancel-pad"):"angl"===o?a.classes.push("anglpad"):a.classes.push("boxpad");let e=0,i,t=0;i=/box/.test(o)?(t=Math.max(n.fontMetrics().fboxrule,n.minRuleThickness),e=n.fontMetrics().fboxsep+("colorbox"===o?0:t)):"angl"===o?(t=Math.max(n.fontMetrics().defaultRuleThickness,n.minRuleThickness),e=4*t,Math.max(0,.25-a.depth)):e=h?.2:0,s=function(e,t,r,n,a){let o;if(n=e.height+e.depth+r+i,/fbox|color|angl/.test(t)){if(o=N.makeSpan(["stretchy",t],[],a),"fbox"===t){const e=a.color&&a.getColor();e&&(o.style.borderColor=e)}}else{const e=[],r=(/^[bx]cancel$/.test(t)&&e.push(new Te({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(t)&&e.push(new Te({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"})),new ze(e,{width:"100%",height:C(n)}));o=N.makeSvgSpan([],[r],a)}return o.height=n,o.style.height=C(n),o}(a,o,e,i,n),/fbox|boxed|fcolorbox/.test(o)?(s.style.borderStyle="solid",s.style.borderWidth=C(t)):"angl"===o&&.049!==t&&(s.style.borderTopWidth=C(t),s.style.borderRightWidth=C(t)),l=a.depth+i,r.backgroundColor&&(s.style.backgroundColor=r.backgroundColor,r.borderColor)&&(s.style.borderColor=r.borderColor)}let t;if(r.backgroundColor)t=N.makeVList({positionType:"individualShift",children:[{type:"elem",elem:s,shift:l},{type:"elem",elem:a,shift:0}]},n);else{const r=/cancel|phase/.test(o)?["svg-align"]:[];t=N.makeVList({positionType:"individualShift",children:[{type:"elem",elem:a,shift:0},{type:"elem",elem:s,shift:l,wrapperClasses:r}]},n)}return/cancel/.test(o)&&(t.height=a.height,t.depth=a.depth),/cancel/.test(o)&&!h?N.makeSpan(["mord","cancel-lap"],[t],n):N.makeSpan(["mord"],[t],n)},mathmlBuilder:p=(e,t)=>{let r=0;var n=new k.MathNode(-1<e.label.indexOf("colorbox")?"mpadded":"menclose",[R(e.body,t)]);switch(e.label){case"\\cancel":n.setAttribute("notation","updiagonalstrike");break;case"\\bcancel":n.setAttribute("notation","downdiagonalstrike");break;case"\\phase":n.setAttribute("notation","phasorangle");break;case"\\sout":n.setAttribute("notation","horizontalstrike");break;case"\\fbox":n.setAttribute("notation","box");break;case"\\angl":n.setAttribute("notation","actuarial");break;case"\\fcolorbox":case"\\colorbox":if(r=t.fontMetrics().fboxsep*t.fontMetrics().ptPerEm,n.setAttribute("width","+"+2*r+"pt"),n.setAttribute("height","+"+2*r+"pt"),n.setAttribute("lspace",r+"pt"),n.setAttribute("voffset",r+"pt"),"\\fcolorbox"===e.label){const r=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness);n.setAttribute("style","border: "+r+"em solid "+String(e.borderColor))}break;case"\\xcancel":n.setAttribute("notation","updiagonalstrike downdiagonalstrike")}return e.backgroundColor&&n.setAttribute("mathbackground",e.backgroundColor),n}}),x({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,argTypes:["color","color","text"]},handler(e,t,r){var{parser:e,funcName:n}=e,a=H(t[0],"color-token").color,o=H(t[1],"color-token").color,t=t[2];return{type:"enclose",mode:e.mode,label:n,backgroundColor:o,borderColor:a,body:t}},htmlBuilder:s,mathmlBuilder:p}),x({type:"enclose",names:["\\fbox"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!0},handler(e,t){return{type:"enclose",mode:(e=e.parser).mode,label:"\\fbox",body:t[0]}}}),x({type:"enclose",names:["\\cancel","\\bcancel","\\xcancel","\\sout","\\phase"],props:{numArgs:1},handler(e,t){var{parser:e,funcName:r}=e,t=t[0];return{type:"enclose",mode:e.mode,label:r,body:t}},htmlBuilder:s,mathmlBuilder:p}),x({type:"enclose",names:["\\angl"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!1},handler(e,t){return{type:"enclose",mode:(e=e.parser).mode,label:"\\angl",body:t[0]}}});const d0={};function g0(e){var{type:e,names:t,props:r,handler:n,htmlBuilder:a,mathmlBuilder:o}=e,i={type:e,numArgs:r.numArgs||0,allowedInText:!1,numOptionalArgs:0,handler:n};for(let e=0;e<t.length;++e)d0[t[e]]=i;a&&(et[e]=a),o&&(tt[e]=o)}const f0={};function O(e,t){f0[e]=t}class b0{constructor(e,t,r){this.lexer=void 0,this.start=void 0,this.end=void 0,this.lexer=e,this.start=t,this.end=r}static range(e,t){return t?e&&e.loc&&t.loc&&e.loc.lexer===t.loc.lexer?new b0(e.loc.lexer,e.loc.start,t.loc.end):null:e&&e.loc}}class y0{constructor(e,t){this.text=void 0,this.loc=void 0,this.noexpand=void 0,this.treatAsRelax=void 0,this.text=e,this.loc=t}range(e,t){return new y0(t,b0.range(this,e))}}function x0(e){var t=[];e.consumeSpaces();let r=e.fetch().text;for("\\relax"===r&&(e.consume(),e.consumeSpaces(),r=e.fetch().text);"\\hline"===r||"\\hdashline"===r;)e.consume(),t.push("\\hdashline"===r),e.consumeSpaces(),r=e.fetch().text;return t}const w0=e=>{if(!e.parser.settings.displayMode)throw new z("{"+e.envName+"} can be used only in display mode.")};function v0(e){if(-1===e.indexOf("ed"))return-1===e.indexOf("*")}function k0(t,e,r){let{hskipBeforeAndAfter:n,addJot:a,cols:o,arraystretch:i,colSeparationType:s,autoTag:l,singleRow:h,emptySingleRow:m,maxNumCols:c,leqno:p}=e;if(t.gullet.beginGroup(),h||t.gullet.macros.set("\\cr","\\\\\\relax"),!i){const e=t.gullet.expandMacroAsText("\\arraystretch");if(null==e)i=1;else if(!(i=parseFloat(e))||i<0)throw new z("Invalid \\arraystretch: "+e)}t.gullet.beginGroup();let u=[];const d=[u],g=[],f=[],b=null!=l?[]:void 0;function y(){l&&t.gullet.macros.set("\\@eqnsw","1",!0)}function x(){b&&(t.gullet.macros.get("\\df@tag")?(b.push(t.subparse([new y0("\\df@tag")])),t.gullet.macros.set("\\df@tag",void 0,!0)):b.push(Boolean(l)&&"1"===t.gullet.macros.get("\\@eqnsw")))}for(y(),f.push(x0(t));;){let e=t.parseExpression(!1,h?"\\end":"\\\\");t.gullet.endGroup(),t.gullet.beginGroup(),e={type:"ordgroup",mode:t.mode,body:e},r&&(e={type:"styling",mode:t.mode,style:r,body:[e]}),u.push(e);const n=t.fetch().text;if("&"===n){if(c&&u.length===c){if(h||s)throw new z("Too many tab characters: &",t.nextToken);t.settings.reportNonstrict("textEnv","Too few columns specified in the {array} column argument.")}t.consume()}else{if("\\end"===n){x(),1===u.length&&"styling"===e.type&&0===e.body[0].body.length&&(1<d.length||!m)&&d.pop(),f.length<d.length+1&&f.push([]);break}if("\\\\"!==n)throw new z("Expected & or \\\\ or \\cr or \\end",t.nextToken);{let e;t.consume()," "!==t.gullet.future().text&&(e=t.parseSizeGroup(!0)),g.push(e?e.value:null),x(),f.push(x0(t)),u=[],d.push(u),y()}}}return t.gullet.endGroup(),t.gullet.endGroup(),{type:"array",mode:t.mode,addJot:a,arraystretch:i,body:d,cols:o,rowGaps:g,hskipBeforeAndAfter:n,hLinesBeforeRow:f,colSeparationType:s,tags:b,leqno:p}}function S0(e){return"d"===e.slice(0,1)?"display":"text"}function M0(n,a){let o,i;const s=n.body.length,l=n.hLinesBeforeRow;let h=0,m=new Array(s);const c=[],p=Math.max(a.fontMetrics().arrayRuleWidth,a.minRuleThickness),e=1/a.fontMetrics().ptPerEm;let u=5*e;n.colSeparationType&&"small"===n.colSeparationType&&(u=a.havingStyle(T.SCRIPT).sizeMultiplier/a.sizeMultiplier*.2778);var t="CD"===n.colSeparationType?B({number:3,unit:"ex"},a):12*e,d=3*e,g=.7*(t=n.arraystretch*t),f=.3*t;let b=0;function y(t){for(let e=0;e<t.length;++e)0<e&&(b+=.25),c.push({pos:b,isDashed:t[e]})}for(y(l[0]),o=0;o<n.body.length;++o){const z=n.body[o];let e=g,t=f;h<z.length&&(h=z.length);const c=new Array(z.length);for(i=0;i<z.length;++i){const n=I(z[i],a);t<n.depth&&(t=n.depth),e<n.height&&(e=n.height),c[i]=n}const p=n.rowGaps[o];let r=0;p&&0<(r=B(p,a))&&(r+=f,t<r&&(t=r),r=0),n.addJot&&(t+=d),c.height=e,c.depth=t,b+=e,c.pos=b,b+=t+r,m[o]=c,y(l[o+1])}var x=b/2+a.fontMetrics().axisHeight,w=n.cols||[],v=[];let k,S;var r=[];if(n.tags&&n.tags.some(e=>e))for(o=0;o<s;++o){const z=m[o],i=z.pos-x,s=n.tags[o];var M=!0===s?N.makeSpan(["eqn-num"],[],a):!1===s?N.makeSpan([],[],a):N.makeSpan([],q(s,a,!0),a);M.depth=z.depth,M.height=z.height,r.push({type:"elem",elem:M,shift:i})}for(i=0,S=0;i<h||S<w.length;++i,++S){let t,r=w[S]||{},e=!0;for(;"separator"===r.type;){if(e||((k=N.makeSpan(["arraycolsep"],[])).style.width=C(a.fontMetrics().doubleRuleSep),v.push(k)),"|"!==r.separator&&":"!==r.separator)throw new z("Invalid separator type: "+r.separator);{const n="|"===r.separator?"solid":"dashed",o=N.makeSpan(["vertical-separator"],[],a),z=(o.style.height=C(b),o.style.borderRightWidth=C(p),o.style.borderRightStyle=n,o.style.margin="0 "+C(-p/2),b-x);z&&(o.style.verticalAlign=C(-z)),v.push(o)}S++,r=w[S]||{},e=!1}if(!(i>=h)){(0<i||n.hskipBeforeAndAfter)&&0!==(t=A.deflt(r.pregap,u))&&((k=N.makeSpan(["arraycolsep"],[])).style.width=C(t),v.push(k));let e=[];for(o=0;o<s;++o){const n=m[o],a=n[i];if(a){const z=n.pos-x;a.depth=n.depth,a.height=n.height,e.push({type:"elem",elem:a,shift:z})}}e=N.makeVList({positionType:"individualShift",children:e},a),e=N.makeSpan(["col-align-"+(r.align||"c")],[e]),v.push(e),(i<h-1||n.hskipBeforeAndAfter)&&0!==(t=A.deflt(r.postgap,u))&&((k=N.makeSpan(["arraycolsep"],[])).style.width=C(t),v.push(k))}}if(m=N.makeSpan(["mtable"],v),0<c.length){const n=N.makeLineSpan("hline",a,p),o=N.makeLineSpan("hdashline",a,p),z=[{type:"elem",elem:m,shift:0}];for(;0<c.length;){const a=c.pop(),i=a.pos-x;a.isDashed?z.push({type:"elem",elem:o,shift:i}):z.push({type:"elem",elem:n,shift:i})}m=N.makeVList({positionType:"individualShift",children:z},a)}return 0===r.length?N.makeSpan(["mord"],[m],a):(t=N.makeVList({positionType:"individualShift",children:r},a),t=N.makeSpan(["tag"],[t],a),N.makeFragment([m,t]))}function z0(o,i){var t=[],r=new k.MathNode("mtd",[],["mtr-glue"]),n=new k.MathNode("mtd",[],["mml-eqn-num"]);for(let e=0;e<o.body.length;e++){const a=o.body[e],s=[];for(let e=0;e<a.length;e++)s.push(new k.MathNode("mtd",[R(a[e],i)]));o.tags&&o.tags[e]&&(s.unshift(r),s.push(r),o.leqno?s.unshift(n):s.push(n)),t.push(new k.MathNode("mtr",s))}let e=new k.MathNode("mtable",t);const a=.5===o.arraystretch?.1:.16+o.arraystretch-1+(o.addJot?.09:0);e.setAttribute("rowspacing",C(a));let s="",l="";if(o.cols&&0<o.cols.length){const i=o.cols;let t="",r=!1,n=0,a=i.length;"separator"===i[0].type&&(s+="top ",n=1),"separator"===i[i.length-1].type&&(s+="bottom ",--a);for(let e=n;e<a;e++)"align"===i[e].type?(l+=T0[i[e].align],r&&(t+="none "),r=!0):"separator"===i[e].type&&r&&(t+="|"===i[e].separator?"solid ":"dashed ",r=!1);e.setAttribute("columnalign",l.trim()),/[sd]/.test(t)&&e.setAttribute("columnlines",t.trim())}if("align"===o.colSeparationType){const i=o.cols||[];let t="";for(let e=1;e<i.length;e++)t+=e%2?"0em ":"1em ";e.setAttribute("columnspacing",t.trim())}else"alignat"===o.colSeparationType||"gather"===o.colSeparationType?e.setAttribute("columnspacing","0em"):"small"===o.colSeparationType?e.setAttribute("columnspacing","0.2778em"):"CD"===o.colSeparationType?e.setAttribute("columnspacing","0.5em"):e.setAttribute("columnspacing","1em");let h="";var m=o.hLinesBeforeRow;s=(s+=0<m[0].length?"left ":"")+(0<m[m.length-1].length?"right ":"");for(let e=1;e<m.length-1;e++)h+=0===m[e].length?"none ":m[e][0]?"dashed ":"solid ";return/[sd]/.test(h)&&e.setAttribute("rowlines",h.trim()),""!==s&&(e=new k.MathNode("menclose",[e])).setAttribute("notation",s.trim()),o.arraystretch&&o.arraystretch<1&&(e=new k.MathNode("mstyle",[e])).setAttribute("scriptlevel","1"),e}function A0(e,r){-1===e.envName.indexOf("ed")&&w0(e);var n=[],t=-1<e.envName.indexOf("at")?"alignat":"align",a="split"===e.envName,t=k0(e.parser,{cols:n,addJot:!0,autoTag:a?void 0:v0(e.envName),emptySingleRow:!0,colSeparationType:t,maxNumCols:a?2:void 0,leqno:e.parser.settings.leqno},"display");let o,i=0;const s={type:"ordgroup",mode:e.mode,body:[]};if(r[0]&&"ordgroup"===r[0].type){let t="";for(let e=0;e<r[0].body.length;e++)t+=H(r[0].body[e],"textord").text;o=Number(t),i=2*o}const l=!i;t.body.forEach(function(t){for(let e=1;e<t.length;e+=2){var r=H(t[e],"styling");H(r.body[0],"ordgroup").body.unshift(s)}if(l)i<t.length&&(i=t.length);else{var e=t.length/2;if(o<e)throw new z("Too many math in a row: expected "+o+", but got "+e,t[0])}});for(let r=0;r<i;++r){let e="r",t=0;r%2==1?e="l":0<r&&l&&(t=1),n[r]={type:"align",align:e,pregap:t,postgap:0}}return t.colSeparationType=l?"align":"alignat",t}const T0={c:"center ",l:"left ",r:"right "};g0({type:"array",names:["array","darray"],props:{numArgs:1},handler(e,t){return t={cols:t=(Ct(t[0])?[t[0]]:H(t[0],"ordgroup").body).map(function(e){var t=Bt(e).text;if(-1!=="lcr".indexOf(t))return{type:"align",align:t};if("|"===t)return{type:"separator",separator:"|"};if(":"===t)return{type:"separator",separator:":"};throw new z("Unknown column alignment: "+t,e)}),hskipBeforeAndAfter:!0,maxNumCols:t.length},k0(e.parser,t,S0(e.envName))},htmlBuilder:M0,mathmlBuilder:z0}),g0({type:"array",names:["matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix","matrix*","pmatrix*","bmatrix*","Bmatrix*","vmatrix*","Vmatrix*"],props:{numArgs:0},handler(e){const t={matrix:null,pmatrix:["(",")"],bmatrix:["[","]"],Bmatrix:["\\{","\\}"],vmatrix:["|","|"],Vmatrix:["\\Vert","\\Vert"]}[e.envName.replace("*","")];let r="c";var n={hskipBeforeAndAfter:!1,cols:[{type:"align",align:r}]};if("*"===e.envName.charAt(e.envName.length-1)){const t=e.parser;if(t.consumeSpaces(),"["===t.fetch().text){if(t.consume(),t.consumeSpaces(),r=t.fetch().text,-1==="lcr".indexOf(r))throw new z("Expected l or c or r",t.nextToken);t.consume(),t.consumeSpaces(),t.expect("]"),t.consume(),n.cols=[{type:"align",align:r}]}}var n=k0(e.parser,n,S0(e.envName)),a=Math.max(0,...n.body.map(e=>e.length));return n.cols=new Array(a).fill({type:"align",align:r}),t?{type:"leftright",mode:e.mode,body:[n],left:t[0],right:t[1],rightColor:void 0}:n},htmlBuilder:M0,mathmlBuilder:z0}),g0({type:"array",names:["smallmatrix"],props:{numArgs:0},handler(e){return(e=k0(e.parser,{arraystretch:.5},"script")).colSeparationType="small",e},htmlBuilder:M0,mathmlBuilder:z0}),g0({type:"array",names:["subarray"],props:{numArgs:1},handler(e,t){if(1<(t=(Ct(t[0])?[t[0]]:H(t[0],"ordgroup").body).map(function(e){var t=Bt(e).text;if(-1!=="lc".indexOf(t))return{type:"align",align:t};throw new z("Unknown column alignment: "+t,e)})).length)throw new z("{subarray} can contain only one column");if(0<(e=k0(e.parser,{cols:t,hskipBeforeAndAfter:!1,arraystretch:.5},"script")).body.length&&1<e.body[0].length)throw new z("{subarray} can contain only one column");return e},htmlBuilder:M0,mathmlBuilder:z0}),g0({type:"array",names:["cases","dcases","rcases","drcases"],props:{numArgs:0},handler(e){var t=k0(e.parser,{arraystretch:1.2,cols:[{type:"align",align:"l",pregap:0,postgap:1},{type:"align",align:"l",pregap:0,postgap:0}]},S0(e.envName));return{type:"leftright",mode:e.mode,body:[t],left:-1<e.envName.indexOf("r")?".":"\\{",right:-1<e.envName.indexOf("r")?"\\}":".",rightColor:void 0}},htmlBuilder:M0,mathmlBuilder:z0}),g0({type:"array",names:["align","align*","aligned","split"],props:{numArgs:0},handler:A0,htmlBuilder:M0,mathmlBuilder:z0}),g0({type:"array",names:["gathered","gather","gather*"],props:{numArgs:0},handler(e){A.contains(["gather","gather*"],e.envName)&&w0(e);var t={cols:[{type:"align",align:"c"}],addJot:!0,colSeparationType:"gather",autoTag:v0(e.envName),emptySingleRow:!0,leqno:e.parser.settings.leqno};return k0(e.parser,t,"display")},htmlBuilder:M0,mathmlBuilder:z0}),g0({type:"array",names:["alignat","alignat*","alignedat"],props:{numArgs:1},handler:A0,htmlBuilder:M0,mathmlBuilder:z0}),g0({type:"array",names:["equation","equation*"],props:{numArgs:0},handler(e){w0(e);var t={autoTag:v0(e.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:e.parser.settings.leqno};return k0(e.parser,t,"display")},htmlBuilder:M0,mathmlBuilder:z0}),g0({type:"array",names:["CD"],props:{numArgs:0},handler(e){w0(e);{var a,o=e.parser,n=[];for(o.gullet.beginGroup(),o.gullet.macros.set("\\cr","\\\\\\relax"),o.gullet.beginGroup();;){n.push(o.parseExpression(!1,"\\\\")),o.gullet.endGroup(),o.gullet.beginGroup();const e=o.fetch().text;if("&"!==e&&"\\\\"!==e){if("\\end"!==e)throw new z("Expected \\\\ or \\cr or \\end",o.nextToken);0===n[n.length-1].length&&n.pop();break}o.consume()}let r=[];var i=[r];for(let t=0;t<n.length;t++){var s=n[t];let e={type:"styling",body:[],mode:"math",style:"display"};for(let n=0;n<s.length;n++)if(Pt(s[n])){r.push(e);var l=Bt(s[n+=1]).text,h=new Array(2);if(h[0]={type:"ordgroup",mode:"math",body:[]},h[1]={type:"ordgroup",mode:"math",body:[]},!(-1<"=|.".indexOf(l))){if(!(-1<"<>AV".indexOf(l)))throw new z('Expected one of "<>AV=|." after @',s[n]);for(let r=0;r<2;r++){let t=!0;for(let e=n+1;e<s.length;e++){if(("mathord"===(a=s[e]).type||"atom"===a.type)&&a.text===l){t=!1,n=e;break}if(Pt(s[e]))throw new z("Missing a "+l+" character to complete a CD arrow.",s[e]);h[r].body.push(s[e])}if(t)throw new z("Missing a "+l+" character to complete a CD arrow.",s[n])}}var m={type:"styling",body:[function(e,t,r){var n=Dt[e];switch(n){case"\\\\cdrightarrow":case"\\\\cdleftarrow":return r.callFunction(n,[t[0]],[t[1]]);case"\\uparrow":case"\\downarrow":{const e={type:"atom",text:n,mode:"math",family:"rel"},a={type:"ordgroup",mode:"math",body:[r.callFunction("\\\\cdleft",[t[0]],[]),r.callFunction("\\Big",[e],[]),r.callFunction("\\\\cdright",[t[1]],[])]};return r.callFunction("\\\\cdparent",[a],[])}case"\\\\cdlongequal":return r.callFunction("\\\\cdlongequal",[],[]);case"\\Vert":{const e={type:"textord",text:"\\Vert",mode:"math"};return r.callFunction("\\Big",[e],[])}default:return{type:"textord",text:" ",mode:"math"}}}(l,h,o)],mode:"math",style:"display"};r.push(m),e={type:"styling",body:[],mode:"math",style:"display"}}else e.body.push(s[n]);t%2==0?r.push(e):r.shift(),r=[],i.push(r)}return o.gullet.endGroup(),o.gullet.endGroup(),{type:"array",mode:"math",body:i,arraystretch:1,addJot:!0,rowGaps:[null],cols:new Array(i[0].length).fill({type:"align",align:"c",pregap:.25,postgap:.25}),colSeparationType:"CD",hLinesBeforeRow:new Array(i.length+1).fill([])}}},htmlBuilder:M0,mathmlBuilder:z0}),O("\\nonumber","\\gdef\\@eqnsw{0}"),O("\\notag","\\nonumber"),x({type:"text",names:["\\hline","\\hdashline"],props:{numArgs:0,allowedInText:!0,allowedInMath:!0},handler(e,t){throw new z(e.funcName+" valid only within array environment")}});var B0=d0;function C0(e){let t=null;return t=0<e.length&&"."===(t=e)?null:t}function N0(e){if(/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(e))return{number:+e,unit:"bp"};var t=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(e);if(!t)throw new z("Invalid size: '"+e+"' in \\includegraphics");if(de(e={number:+(t[1]+t[2]),unit:t[3]}))return e;throw new z("Invalid unit: '"+e.unit+"' in \\includegraphics.")}x({type:"environment",names:["\\begin","\\end"],props:{numArgs:1,argTypes:["text"]},handler(e,t){let{parser:r,funcName:n}=e;var a=t[0];if("ordgroup"!==a.type)throw new z("Invalid environment name",a);let o="";for(let e=0;e<a.body.length;++e)o+=H(a.body[e],"textord").text;if("\\begin"!==n)return{type:"environment",mode:r.mode,name:o,nameGroup:a};{if(!B0.hasOwnProperty(o))throw new z("No such environment: "+o,a);const e=B0[o],{args:t,optArgs:n}=r.parseArguments("\\begin{"+o+"}",e),l={mode:r.mode,envName:o,parser:r},h=e.handler(l,t,n);r.expect("\\end",!1);var i=r.nextToken,s=H(r.parseFunction(),"environment");if(s.name!==o)throw new z("Mismatch: \\begin{"+o+"} matched by \\end{"+s.name+"}",i);return h}}});const q0=(e,t)=>{var r=e.font,t=t.withFont(r);return I(e.body,t)},I0=(e,t)=>{var r=e.font,t=t.withFont(r);return R(e.body,t)},R0={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak","\\bm":"\\boldsymbol"},H0=(x({type:"font",names:["\\mathrm","\\mathit","\\mathbf","\\mathnormal","\\mathbb","\\mathcal","\\mathfrak","\\mathscr","\\mathsf","\\mathtt","\\Bbb","\\bold","\\frak"],props:{numArgs:1,allowedInArgument:!0},handler:(e,t)=>{var{parser:e,funcName:r}=e,t=nt(t[0]);let n=r;return n in R0&&(n=R0[n]),{type:"font",mode:e.mode,font:n.slice(1),body:t}},htmlBuilder:q0,mathmlBuilder:I0}),x({type:"mclass",names:["\\boldsymbol","\\bm"],props:{numArgs:1},handler:(e,t)=>{var e=e.parser,t=t[0],r=A.isCharacterBox(t);return{type:"mclass",mode:e.mode,mclass:Lt(t),body:[{type:"font",mode:e.mode,font:"boldsymbol",body:t}],isCharacterBox:r}}}),x({type:"font",names:["\\rm","\\sf","\\tt","\\bf","\\it","\\cal"],props:{numArgs:0,allowedInText:!0},handler:(e,t)=>{var{parser:e,funcName:r,breakOnTokenText:n}=e,a=e.mode,n=e.parseExpression(!0,n);return{type:"font",mode:a,font:"math"+r.slice(1),body:{type:"ordgroup",mode:e.mode,body:n}}},htmlBuilder:q0,mathmlBuilder:I0}),(e,t)=>{let r=t;return"display"===e?r=r.id>=T.SCRIPT.id?r.text():T.DISPLAY:"text"===e&&r.size===T.DISPLAY.size?r=T.TEXT:"script"===e?r=T.SCRIPT:"scriptscript"===e&&(r=T.SCRIPTSCRIPT),r}),O0=(e,t)=>{const r=H0(e.size,t.style),n=r.fracNum(),a=r.fracDen();var o=t.havingStyle(n),i=I(e.numer,o,t);if(e.continued){const e=8.5/t.fontMetrics().ptPerEm,r=3.5/t.fontMetrics().ptPerEm;i.height=i.height<e?e:i.height,i.depth=i.depth<r?r:i.depth}var o=t.havingStyle(a),s=I(e.denom,o,t);let l,h,m,c,p,u,d,g,f,b;if(m=e.hasBarLine?(l=e.barSize?(h=B(e.barSize,t),N.makeLineSpan("frac-line",t,h)):N.makeLineSpan("frac-line",t),h=l.height,l.height):(l=null,h=0,t.fontMetrics().defaultRuleThickness),u=r.size===T.DISPLAY.size||"display"===e.size?(c=t.fontMetrics().num1,p=0<h?3*m:7*m,t.fontMetrics().denom1):(p=0<h?(c=t.fontMetrics().num2,m):(c=t.fontMetrics().num3,3*m),t.fontMetrics().denom2),l){const e=t.fontMetrics().axisHeight,r=(c-i.depth-(e+.5*h)<p&&(c+=p-(c-i.depth-(e+.5*h))),e-.5*h-(s.height-u)<p&&(u+=p-(e-.5*h-(s.height-u))),-(e-.5*h));d=N.makeVList({positionType:"individualShift",children:[{type:"elem",elem:s,shift:u},{type:"elem",elem:l,shift:r},{type:"elem",elem:i,shift:-c}]},t)}else{const e=c-i.depth-(s.height-u);e<p&&(c+=.5*(p-e),u+=.5*(p-e)),d=N.makeVList({positionType:"individualShift",children:[{type:"elem",elem:s,shift:u},{type:"elem",elem:i,shift:-c}]},t)}return o=t.havingStyle(r),d.height*=o.sizeMultiplier/t.sizeMultiplier,d.depth*=o.sizeMultiplier/t.sizeMultiplier,g=r.size===T.DISPLAY.size?t.fontMetrics().delim1:(r.size===T.SCRIPTSCRIPT.size?t.havingStyle(T.SCRIPT):t).fontMetrics().delim2,f=null==e.leftDelim?at(t,["mopen"]):h0.customSizedDelim(e.leftDelim,g,!0,t.havingStyle(r),e.mode,["mopen"]),b=e.continued?N.makeSpan([]):null==e.rightDelim?at(t,["mclose"]):h0.customSizedDelim(e.rightDelim,g,!0,t.havingStyle(r),e.mode,["mclose"]),N.makeSpan(["mord"].concat(o.sizingClasses(t)),[f,N.makeSpan(["mfrac"],[d]),b],t)},E0=(e,t)=>{let r=new k.MathNode("mfrac",[R(e.numer,t),R(e.denom,t)]);if(e.hasBarLine){if(e.barSize){const n=B(e.barSize,t);r.setAttribute("linethickness",C(n))}}else r.setAttribute("linethickness","0px");const n=H0(e.size,t.style);if(n.size!==t.style.size){r=new k.MathNode("mstyle",[r]);const e=n.size===T.DISPLAY.size?"true":"false";r.setAttribute("displaystyle",e),r.setAttribute("scriptlevel","0")}if(null==e.leftDelim&&null==e.rightDelim)return r;{const t=[];if(null!=e.leftDelim){const r=new k.MathNode("mo",[new k.TextNode(e.leftDelim.replace("\\",""))]);r.setAttribute("fence","true"),t.push(r)}if(t.push(r),null!=e.rightDelim){const r=new k.MathNode("mo",[new k.TextNode(e.rightDelim.replace("\\",""))]);r.setAttribute("fence","true"),t.push(r)}return yt(t)}},L0=(x({type:"genfrac",names:["\\dfrac","\\frac","\\tfrac","\\dbinom","\\binom","\\tbinom","\\\\atopfrac","\\\\bracefrac","\\\\brackfrac"],props:{numArgs:2,allowedInArgument:!0},handler:(e,t)=>{var{parser:e,funcName:r}=e,n=t[0],t=t[1];let a,o=null,i=null,s="auto";switch(r){case"\\dfrac":case"\\frac":case"\\tfrac":a=!0;break;case"\\\\atopfrac":a=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":a=!1,o="(",i=")";break;case"\\\\bracefrac":a=!1,o="\\{",i="\\}";break;case"\\\\brackfrac":a=!1,o="[",i="]";break;default:throw new Error("Unrecognized genfrac command")}switch(r){case"\\dfrac":case"\\dbinom":s="display";break;case"\\tfrac":case"\\tbinom":s="text"}return{type:"genfrac",mode:e.mode,continued:!1,numer:n,denom:t,hasBarLine:a,leftDelim:o,rightDelim:i,size:s,barSize:null}},htmlBuilder:O0,mathmlBuilder:E0}),x({type:"genfrac",names:["\\cfrac"],props:{numArgs:2},handler:(e,t)=>{var e=e.parser,r=t[0],t=t[1];return{type:"genfrac",mode:e.mode,continued:!0,numer:r,denom:t,hasBarLine:!0,leftDelim:null,rightDelim:null,size:"display",barSize:null}}}),x({type:"infix",names:["\\over","\\choose","\\atop","\\brace","\\brack"],props:{numArgs:0,infix:!0},handler(e){let t,{parser:r,funcName:n,token:a}=e;switch(n){case"\\over":t="\\frac";break;case"\\choose":t="\\binom";break;case"\\atop":t="\\\\atopfrac";break;case"\\brace":t="\\\\bracefrac";break;case"\\brack":t="\\\\brackfrac";break;default:throw new Error("Unrecognized infix genfrac command")}return{type:"infix",mode:r.mode,replaceWith:t,token:a}}}),["display","text","script","scriptscript"]),D0=(x({type:"genfrac",names:["\\genfrac"],props:{numArgs:6,allowedInArgument:!0,argTypes:["math","math","size","text","math","math"]},handler(e,t){var e=e.parser,r=t[4],n=t[5],a="atom"===(a=nt(t[0])).type&&"open"===a.family?C0(a.text):null,o="atom"===(o=nt(t[1])).type&&"close"===o.family?C0(o.text):null,i=H(t[2],"size");let s,l=null,h=(s=!!i.isBlank||0<(l=i.value).number,"auto"),m=t[3];if("ordgroup"===m.type){if(0<m.body.length){const e=H(m.body[0],"textord");h=L0[Number(e.text)]}}else m=H(m,"textord"),h=L0[Number(m.text)];return{type:"genfrac",mode:e.mode,numer:r,denom:n,continued:!1,hasBarLine:s,barSize:l,leftDelim:a,rightDelim:o,size:h}},htmlBuilder:O0,mathmlBuilder:E0}),x({type:"infix",names:["\\above"],props:{numArgs:1,argTypes:["size"],infix:!0},handler(e,t){var{parser:e,token:r}=e;return{type:"infix",mode:e.mode,replaceWith:"\\\\abovefrac",size:H(t[0],"size").value,token:r}}}),x({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:(e,t)=>{var e=e.parser,r=t[0],n=function(e){if(e)return e;throw new Error("Expected non-null, but got "+String(e))}(H(t[1],"infix").size),t=t[2],a=0<n.number;return{type:"genfrac",mode:e.mode,numer:r,denom:t,continued:!1,hasBarLine:a,barSize:n,leftDelim:null,rightDelim:null,size:"auto"}},htmlBuilder:O0,mathmlBuilder:E0}),(e,t)=>{var r=t.style;let n,a;a="supsub"===e.type?(n=e.sup?I(e.sup,t.havingStyle(r.sup()),t):I(e.sub,t.havingStyle(r.sub()),t),H(e.base,"horizBrace")):H(e,"horizBrace"),r=I(a.base,t.havingBaseStyle(T.DISPLAY)),e=Tt(a,t);let o;if((a.isOver?(o=N.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:r},{type:"kern",size:.1},{type:"elem",elem:e}]},t)).children[0].children[0].children[1]:(o=N.makeVList({positionType:"bottom",positionData:r.depth+.1+e.height,children:[{type:"elem",elem:e},{type:"kern",size:.1},{type:"elem",elem:r}]},t)).children[0].children[0].children[0]).classes.push("svg-align"),n){const e=N.makeSpan(["mord",a.isOver?"mover":"munder"],[o],t);o=a.isOver?N.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:e},{type:"kern",size:.2},{type:"elem",elem:n}]},t):N.makeVList({positionType:"bottom",positionData:e.depth+.2+n.height+n.depth,children:[{type:"elem",elem:n},{type:"kern",size:.2},{type:"elem",elem:e}]},t)}return N.makeSpan(["mord",a.isOver?"mover":"munder"],[o],t)}),P0=(x({type:"horizBrace",names:["\\overbrace","\\underbrace"],props:{numArgs:1},handler(e,t){var{parser:e,funcName:r}=e;return{type:"horizBrace",mode:e.mode,label:r,isOver:/^\\over/.test(r),base:t[0]}},htmlBuilder:D0,mathmlBuilder:(e,t)=>{var r=At(e.label);return new k.MathNode(e.isOver?"mover":"munder",[R(e.base,t),r])}}),x({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:(e,t)=>{var e=e.parser,r=t[1],t=H(t[0],"url").url;return e.settings.isTrusted({command:"\\href",url:t})?{type:"href",mode:e.mode,href:t,body:w(r)}:e.formatUnsupportedCmd("\\href")},htmlBuilder:(e,t)=>{var r=q(e.body,t,!1);return N.makeAnchor(e.href,[],r,t)},mathmlBuilder:(e,t)=>{let r=wt(e.body,t);return(r=r instanceof v?r:new v("mrow",[r])).setAttribute("href",e.href),r}}),x({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:(e,t)=>{var e=e.parser,r=H(t[0],"url").url;if(!e.settings.isTrusted({command:"\\url",url:r}))return e.formatUnsupportedCmd("\\url");var n=[];for(let t=0;t<r.length;t++){let e=r[t];"~"===e&&(e="\\textasciitilde"),n.push({type:"textord",mode:"text",text:e})}return t={type:"text",mode:e.mode,font:"\\texttt",body:n},{type:"href",mode:e.mode,href:r,body:w(t)}}}),x({type:"hbox",names:["\\hbox"],props:{numArgs:1,argTypes:["text"],allowedInText:!0,primitive:!0},handler(e,t){return{type:"hbox",mode:(e=e.parser).mode,body:w(t[0])}},htmlBuilder(e,t){return e=q(e.body,t,!1),N.makeFragment(e)},mathmlBuilder(e,t){return new k.MathNode("mrow",M(e.body,t))}}),x({type:"html",names:["\\htmlClass","\\htmlId","\\htmlStyle","\\htmlData"],props:{numArgs:2,argTypes:["raw","original"],allowedInText:!0},handler:(t,e)=>{let{parser:r,funcName:n}=t;var a=H(e[0],"raw").string,t=e[1];let o;r.settings.strict&&r.settings.reportNonstrict("htmlExtension","HTML extension is disabled on strict mode");var i={};switch(n){case"\\htmlClass":i.class=a,o={command:"\\htmlClass",class:a};break;case"\\htmlId":i.id=a,o={command:"\\htmlId",id:a};break;case"\\htmlStyle":i.style=a,o={command:"\\htmlStyle",style:a};break;case"\\htmlData":{const t=a.split(",");for(let e=0;e<t.length;e++){const r=t[e].split("=");if(2!==r.length)throw new z("Error parsing key-value for \\htmlData");i["data-"+r[0].trim()]=r[1].trim()}o={command:"\\htmlData",attributes:i};break}default:throw new Error("Unrecognized html command")}return r.settings.isTrusted(o)?{type:"html",mode:r.mode,attributes:i,body:w(t)}:r.formatUnsupportedCmd(n)},htmlBuilder:(e,t)=>{var r=q(e.body,t,!1),n=["enclosing"],a=(e.attributes.class&&n.push(...e.attributes.class.trim().split(/\s+/)),N.makeSpan(n,r,t));for(const t in e.attributes)"class"!==t&&e.attributes.hasOwnProperty(t)&&a.setAttribute(t,e.attributes[t]);return a},mathmlBuilder:(e,t)=>wt(e.body,t)}),x({type:"htmlmathml",names:["\\html@mathml"],props:{numArgs:2,allowedInText:!0},handler:(e,t)=>({type:"htmlmathml",mode:(e=e.parser).mode,html:w(t[0]),mathml:w(t[1])}),htmlBuilder:(e,t)=>(e=q(e.html,t,!1),N.makeFragment(e)),mathmlBuilder:(e,t)=>wt(e.mathml,t)}),x({type:"includegraphics",names:["\\includegraphics"],props:{numArgs:1,numOptionalArgs:1,argTypes:["raw","url"],allowedInText:!1},handler:(t,e,r)=>{let n=t.parser,a={number:0,unit:"em"},o={number:.9,unit:"em"},i={number:0,unit:"em"},s="";if(r[0]){const t=H(r[0],"raw").string.split(",");for(let e=0;e<t.length;e++){const r=t[e].split("=");if(2===r.length){const t=r[1].trim();switch(r[0].trim()){case"alt":s=t;break;case"width":a=N0(t);break;case"height":o=N0(t);break;case"totalheight":i=N0(t);break;default:throw new z("Invalid key: '"+r[0]+"' in \\includegraphics.")}}}}return t=H(e[0],"url").url,""===s&&(s=(s=(s=t).replace(/^.*[\\/]/,"")).substring(0,s.lastIndexOf("."))),n.settings.isTrusted({command:"\\includegraphics",url:t})?{type:"includegraphics",mode:n.mode,alt:s,width:a,height:o,totalheight:i,src:t}:n.formatUnsupportedCmd("\\includegraphics")},htmlBuilder:(e,t)=>{var r=B(e.height,t);let n=0,a=(0<e.totalheight.number&&(n=B(e.totalheight,t)-r),0);return 0<e.width.number&&(a=B(e.width,t)),t={height:C(r+n)},0<a&&(t.width=C(a)),0<n&&(t.verticalAlign=C(-n)),(e=new Se(e.src,e.alt,t)).height=r,e.depth=n,e},mathmlBuilder:(e,t)=>{var r=new k.MathNode("mglyph",[]);r.setAttribute("alt",e.alt);const n=B(e.height,t);let a=0;if(0<e.totalheight.number&&(a=B(e.totalheight,t)-n,r.setAttribute("valign",C(-a))),r.setAttribute("height",C(n+a)),0<e.width.number){const n=B(e.width,t);r.setAttribute("width",C(n))}return r.setAttribute("src",e.src),r}}),x({type:"kern",names:["\\kern","\\mkern","\\hskip","\\mskip"],props:{numArgs:1,argTypes:["size"],primitive:!0,allowedInText:!0},handler(e,t){var{parser:r,funcName:n}=e,a=H(t[0],"size");if(r.settings.strict){const e="m"===n[1],t="mu"===a.value.unit;e?(t||r.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+n+" supports only mu units, not "+a.value.unit+" units"),"math"!==r.mode&&r.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+n+" works only in math mode")):t&&r.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+n+" doesn't support mu units")}return{type:"kern",mode:r.mode,dimension:a.value}},htmlBuilder(e,t){return N.makeGlue(e.dimension,t)},mathmlBuilder(e,t){return e=B(e.dimension,t),new k.SpaceNode(e)}}),x({type:"lap",names:["\\mathllap","\\mathrlap","\\mathclap"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:e,funcName:r}=e,t=t[0];return{type:"lap",mode:e.mode,alignment:r.slice(5),body:t}},htmlBuilder:(e,t)=>{let r;r="clap"===e.alignment?(r=N.makeSpan([],[I(e.body,t)]),N.makeSpan(["inner"],[r],t)):N.makeSpan(["inner"],[I(e.body,t)]);var n=N.makeSpan(["fix"],[]);let a=N.makeSpan([e.alignment],[r,n],t);return(e=N.makeSpan(["strut"])).style.height=C(a.height+a.depth),a.depth&&(e.style.verticalAlign=C(-a.depth)),a.children.unshift(e),a=N.makeSpan(["thinbox"],[a],t),N.makeSpan(["mord","vbox"],[a],t)},mathmlBuilder:(e,t)=>{var r=new k.MathNode("mpadded",[R(e.body,t)]);if("rlap"!==e.alignment){const t="llap"===e.alignment?"-1":"-0.5";r.setAttribute("lspace",t+"width")}return r.setAttribute("width","0px"),r}}),x({type:"styling",names:["\\(","$"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,t){var{funcName:e,parser:r}=e,n=r.mode,e=(r.switchMode("math"),"\\("===e?"\\)":"$"),a=r.parseExpression(!1,e);return r.expect(e),r.switchMode(n),{type:"styling",mode:r.mode,style:"text",body:a}}}),x({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,t){throw new z("Mismatched "+e.funcName)}}),(e,t)=>{switch(t.style.size){case T.DISPLAY.size:return e.display;case T.TEXT.size:return e.text;case T.SCRIPT.size:return e.script;case T.SCRIPTSCRIPT.size:return e.scriptscript;default:return e.text}}),V0=(x({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4,primitive:!0},handler:(e,t)=>({type:"mathchoice",mode:(e=e.parser).mode,display:w(t[0]),text:w(t[1]),script:w(t[2]),scriptscript:w(t[3])}),htmlBuilder:(e,t)=>(e=q(e=P0(e,t),t,!1),N.makeFragment(e)),mathmlBuilder:(e,t)=>wt(e=P0(e,t),t)}),(e,t,r,n,a,o,i)=>{e=N.makeSpan([],[e]);var s=r&&A.isCharacterBox(r);let l,h,m;if(t){const e=I(t,n.havingStyle(a.sup()),n);h={elem:e,kern:Math.max(n.fontMetrics().bigOpSpacing1,n.fontMetrics().bigOpSpacing3-e.depth)}}if(r){const e=I(r,n.havingStyle(a.sub()),n);l={elem:e,kern:Math.max(n.fontMetrics().bigOpSpacing2,n.fontMetrics().bigOpSpacing4-e.height)}}if(h&&l){const t=n.fontMetrics().bigOpSpacing5+l.elem.height+l.elem.depth+l.kern+e.depth+i;m=N.makeVList({positionType:"bottom",positionData:t,children:[{type:"kern",size:n.fontMetrics().bigOpSpacing5},{type:"elem",elem:l.elem,marginLeft:C(-o)},{type:"kern",size:l.kern},{type:"elem",elem:e},{type:"kern",size:h.kern},{type:"elem",elem:h.elem,marginLeft:C(o)},{type:"kern",size:n.fontMetrics().bigOpSpacing5}]},n)}else if(l){const t=e.height-i;m=N.makeVList({positionType:"top",positionData:t,children:[{type:"kern",size:n.fontMetrics().bigOpSpacing5},{type:"elem",elem:l.elem,marginLeft:C(-o)},{type:"kern",size:l.kern},{type:"elem",elem:e}]},n)}else{if(!h)return e;{const t=e.depth+i;m=N.makeVList({positionType:"bottom",positionData:t,children:[{type:"elem",elem:e},{type:"kern",size:h.kern},{type:"elem",elem:h.elem,marginLeft:C(o)},{type:"kern",size:n.fontMetrics().bigOpSpacing5}]},n)}}if(t=[m],l&&0!==o&&!s){const e=N.makeSpan(["mspace"],[],n);e.style.marginRight=C(o),t.unshift(e)}return N.makeSpan(["mop","op-limits"],t,n)}),F0=["\\smallint"],G0=(t,r)=>{let e,n,a,o=!1;"supsub"===t.type?(e=t.sup,n=t.sub,a=H(t.base,"op"),o=!0):a=H(t,"op");let i,s=!1;if((t=r.style).size===T.DISPLAY.size&&a.symbol&&!A.contains(F0,a.name)&&(s=!0),a.symbol){const t=s?"Size2-Regular":"Size1-Regular";let e="";if("\\oiint"!==a.name&&"\\oiiint"!==a.name||(e=a.name.slice(1),a.name="oiint"===e?"\\iint":"\\iiint"),i=N.makeSymbol(a.name,t,"math",r,["mop","op-symbol",s?"large-op":"small-op"]),0<e.length){const t=i.italic,n=N.staticSvg(e+"Size"+(s?"2":"1"),r);i=N.makeVList({positionType:"individualShift",children:[{type:"elem",elem:i,shift:0},{type:"elem",elem:n,shift:s?.08:0}]},r),a.name="\\"+e,i.classes.unshift("mop"),i.italic=t}}else if(a.body){const t=q(a.body,r,!0);1===t.length&&t[0]instanceof d?(i=t[0]).classes[0]="mop":i=N.makeSpan(["mop"],t,r)}else{const t=[];for(let e=1;e<a.name.length;e++)t.push(N.mathsym(a.name[e],a.mode,r));i=N.makeSpan(["mop"],t,r)}let l=0,h=0;return(i instanceof d||"\\oiint"===a.name||"\\oiiint"===a.name)&&!a.suppressBaseShift&&(l=(i.height-i.depth)/2-r.fontMetrics().axisHeight,h=i.italic),o?V0(i,e,n,r,t,h,l):(l&&(i.style.position="relative",i.style.top=C(l)),i)},U0=(e,t)=>{let r;if(e.symbol)r=new v("mo",[S(e.name,e.mode)]),A.contains(F0,e.name)&&r.setAttribute("largeop","false");else if(e.body)r=new v("mo",M(e.body,t));else{r=new v("mi",[new bt(e.name.slice(1))]);const t=new v("mo",[S("⁡","text")]);r=e.parentIsSupSub?new v("mrow",[r,t]):ft([r,t])}return r},Y0={"∏":"\\prod","∐":"\\coprod","∑":"\\sum","⋀":"\\bigwedge","⋁":"\\bigvee","⋂":"\\bigcap","⋃":"\\bigcup","⨀":"\\bigodot","⨁":"\\bigoplus","⨂":"\\bigotimes","⨄":"\\biguplus","⨆":"\\bigsqcup"},X0=(x({type:"op",names:["\\coprod","\\bigvee","\\bigwedge","\\biguplus","\\bigcap","\\bigcup","\\intop","\\prod","\\sum","\\bigotimes","\\bigoplus","\\bigodot","\\bigsqcup","\\smallint","∏","∐","∑","⋀","⋁","⋂","⋃","⨀","⨁","⨂","⨄","⨆"],props:{numArgs:0},handler:(e,t)=>{let{parser:r,funcName:n}=e,a=n;return 1===a.length&&(a=Y0[a]),{type:"op",mode:r.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:a}},htmlBuilder:G0,mathmlBuilder:U0}),x({type:"op",names:["\\mathop"],props:{numArgs:1,primitive:!0},handler:(e,t)=>(e=e.parser,t=t[0],{type:"op",mode:e.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:w(t)}),htmlBuilder:G0,mathmlBuilder:U0}),{"∫":"\\int","∬":"\\iint","∭":"\\iiint","∮":"\\oint","∯":"\\oiint","∰":"\\oiiint"}),W0=(x({type:"op",names:["\\arcsin","\\arccos","\\arctan","\\arctg","\\arcctg","\\arg","\\ch","\\cos","\\cosec","\\cosh","\\cot","\\cotg","\\coth","\\csc","\\ctg","\\cth","\\deg","\\dim","\\exp","\\hom","\\ker","\\lg","\\ln","\\log","\\sec","\\sin","\\sinh","\\sh","\\tan","\\tanh","\\tg","\\th"],props:{numArgs:0},handler(e){var{parser:e,funcName:t}=e;return{type:"op",mode:e.mode,limits:!1,parentIsSupSub:!1,symbol:!1,name:t}},htmlBuilder:G0,mathmlBuilder:U0}),x({type:"op",names:["\\det","\\gcd","\\inf","\\lim","\\max","\\min","\\Pr","\\sup"],props:{numArgs:0},handler(e){var{parser:e,funcName:t}=e;return{type:"op",mode:e.mode,limits:!0,parentIsSupSub:!1,symbol:!1,name:t}},htmlBuilder:G0,mathmlBuilder:U0}),x({type:"op",names:["\\int","\\iint","\\iiint","\\oint","\\oiint","\\oiiint","∫","∬","∭","∮","∯","∰"],props:{numArgs:0},handler(e){let{parser:t,funcName:r}=e,n=r;return 1===n.length&&(n=X0[n]),{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:n}},htmlBuilder:G0,mathmlBuilder:U0}),(e,t)=>{let r,n,a,o,i=!1;if("supsub"===e.type?(r=e.sup,n=e.sub,a=H(e.base,"operatorname"),i=!0):a=H(e,"operatorname"),0<a.body.length){const e=a.body.map(e=>{var t=e.text;return"string"==typeof t?{type:"textord",mode:e.mode,text:t}:e}),r=q(e,t.withFont("mathrm"),!0);for(let e=0;e<r.length;e++){const t=r[e];t instanceof d&&(t.text=t.text.replace(/\u2212/,"-").replace(/\u2217/,"*"))}o=N.makeSpan(["mop"],r,t)}else o=N.makeSpan(["mop"],[],t);return i?V0(o,r,n,t,t.style,0,0):o});function j0(e,t,r){var n=q(e,t,!1),a=t.sizeMultiplier/r.sizeMultiplier;for(let e=0;e<n.length;e++){var o=n[e].classes.indexOf("sizing");o<0?Array.prototype.push.apply(n[e].classes,t.sizingClasses(r)):n[e].classes[o+1]==="reset-size"+t.size&&(n[e].classes[o+1]="reset-size"+r.size),n[e].height*=a,n[e].depth*=a}return N.makeFragment(n)}x({type:"operatorname",names:["\\operatorname@","\\operatornamewithlimits"],props:{numArgs:1},handler:(e,t)=>{var{parser:e,funcName:r}=e,t=t[0];return{type:"operatorname",mode:e.mode,body:w(t),alwaysHandleSupSub:"\\operatornamewithlimits"===r,limits:!1,parentIsSupSub:!1}},htmlBuilder:W0,mathmlBuilder:(t,r)=>{let n=M(t.body,r.withFont("mathrm")),a=!0;for(let e=0;e<n.length;e++){const r=n[e];if(!(r instanceof k.SpaceNode))if(r instanceof k.MathNode)switch(r.type){case"mi":case"mn":case"ms":case"mspace":case"mtext":break;case"mo":{const t=r.children[0];1===r.children.length&&t instanceof k.TextNode?t.text=t.text.replace(/\u2212/,"-").replace(/\u2217/,"*"):a=!1;break}default:a=!1}else a=!1}if(a){const t=n.map(e=>e.toText()).join("");n=[new k.TextNode(t)]}var r=new k.MathNode("mi",n),e=(r.setAttribute("mathvariant","normal"),new k.MathNode("mo",[S("⁡","text")]));return t.parentIsSupSub?new k.MathNode("mrow",[r,e]):k.newDocumentFragment([r,e])}}),O("\\operatorname","\\@ifstar\\operatornamewithlimits\\operatorname@"),rt({type:"ordgroup",htmlBuilder(e,t){return e.semisimple?N.makeFragment(q(e.body,t,!1)):N.makeSpan(["mord"],q(e.body,t,!0),t)},mathmlBuilder(e,t){return wt(e.body,t,!0)}}),x({type:"overline",names:["\\overline"],props:{numArgs:1},handler(e,t){return e=e.parser,t=t[0],{type:"overline",mode:e.mode,body:t}},htmlBuilder(e,t){var e=I(e.body,t.havingCrampedStyle()),r=N.makeLineSpan("overline-line",t),n=t.fontMetrics().defaultRuleThickness,e=N.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:e},{type:"kern",size:3*n},{type:"elem",elem:r},{type:"kern",size:n}]},t);return N.makeSpan(["mord","overline"],[e],t)},mathmlBuilder(e,t){var r=new k.MathNode("mo",[new k.TextNode("‾")]);return r.setAttribute("stretchy","true"),(e=new k.MathNode("mover",[R(e.body,t),r])).setAttribute("accent","true"),e}}),x({type:"phantom",names:["\\phantom"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>(e=e.parser,t=t[0],{type:"phantom",mode:e.mode,body:w(t)}),htmlBuilder:(e,t)=>(e=q(e.body,t.withPhantom(),!1),N.makeFragment(e)),mathmlBuilder:(e,t)=>(e=M(e.body,t),new k.MathNode("mphantom",e))}),x({type:"hphantom",names:["\\hphantom"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>(e=e.parser,t=t[0],{type:"hphantom",mode:e.mode,body:t}),htmlBuilder:(e,t)=>{let r=N.makeSpan([],[I(e.body,t.withPhantom())]);if(r.height=0,r.depth=0,r.children)for(let e=0;e<r.children.length;e++)r.children[e].height=0,r.children[e].depth=0;return r=N.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:r}]},t),N.makeSpan(["mord"],[r],t)},mathmlBuilder:(e,t)=>(e=M(w(e.body),t),t=new k.MathNode("mphantom",e),(e=new k.MathNode("mpadded",[t])).setAttribute("height","0px"),e.setAttribute("depth","0px"),e)}),x({type:"vphantom",names:["\\vphantom"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>(e=e.parser,t=t[0],{type:"vphantom",mode:e.mode,body:t}),htmlBuilder:(e,t)=>{var e=N.makeSpan(["inner"],[I(e.body,t.withPhantom())]),r=N.makeSpan(["fix"],[]);return N.makeSpan(["mord","rlap"],[e,r],t)},mathmlBuilder:(e,t)=>(e=M(w(e.body),t),t=new k.MathNode("mphantom",e),(e=new k.MathNode("mpadded",[t])).setAttribute("width","0px"),e)}),x({type:"raisebox",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler(e,t){var e=e.parser,r=H(t[0],"size").value,t=t[1];return{type:"raisebox",mode:e.mode,dy:r,body:t}},htmlBuilder(e,t){var r=I(e.body,t),e=B(e.dy,t);return N.makeVList({positionType:"shift",positionData:-e,children:[{type:"elem",elem:r}]},t)},mathmlBuilder(e,t){return t=new k.MathNode("mpadded",[R(e.body,t)]),e=e.dy.number+e.dy.unit,t.setAttribute("voffset",e),t}}),x({type:"internal",names:["\\relax"],props:{numArgs:0,allowedInText:!0},handler(e){return{type:"internal",mode:(e=e.parser).mode}}}),x({type:"rule",names:["\\rule"],props:{numArgs:2,numOptionalArgs:1,argTypes:["size","size","size"]},handler(e,t,r){var e=e.parser,r=r[0],n=H(t[0],"size"),t=H(t[1],"size");return{type:"rule",mode:e.mode,shift:r&&H(r,"size").value,width:n.value,height:t.value}},htmlBuilder(e,t){var r=N.makeSpan(["mord","rule"],[],t),n=B(e.width,t),a=B(e.height,t),e=e.shift?B(e.shift,t):0;return r.style.borderRightWidth=C(n),r.style.borderTopWidth=C(a),r.style.bottom=C(e),r.width=n,r.height=a+e,r.depth=-e,r.maxFontSize=1.125*a*t.sizeMultiplier,r},mathmlBuilder(e,t){var r=B(e.width,t),n=B(e.height,t),e=e.shift?B(e.shift,t):0,t=t.color&&t.getColor()||"black",a=new k.MathNode("mspace"),t=(a.setAttribute("mathbackground",t),a.setAttribute("width",C(r)),a.setAttribute("height",C(n)),new k.MathNode("mpadded",[a]));return 0<=e?t.setAttribute("height",C(e)):(t.setAttribute("height",C(e)),t.setAttribute("depth",C(-e))),t.setAttribute("voffset",C(e)),t}});const _0=["\\tiny","\\sixptsize","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"],$0=(x({type:"sizing",names:_0,props:{numArgs:0,allowedInText:!0},handler:(e,t)=>{var{breakOnTokenText:e,funcName:r,parser:n}=e,e=n.parseExpression(!1,e);return{type:"sizing",mode:n.mode,size:_0.indexOf(r)+1,body:e}},htmlBuilder:(e,t)=>{var r=t.havingSize(e.size);return j0(e.body,r,t)},mathmlBuilder:(e,t)=>(t=t.havingSize(e.size),e=M(e.body,t),(e=new k.MathNode("mstyle",e)).setAttribute("mathsize",C(t.sizeMultiplier)),e)}),x({type:"smash",names:["\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:(e,t,r)=>{let n=e.parser,a=!1,o=!1;var i,s=r[0]&&H(r[0],"ordgroup");if(s)for(let e=0;e<s.body.length;++e)if("t"===(i=s.body[e].text))a=!0;else{if("b"!==i){a=!1,o=!1;break}o=!0}else a=!0,o=!0;return e=t[0],{type:"smash",mode:n.mode,body:e,smashHeight:a,smashDepth:o}},htmlBuilder:(e,t)=>{var r=N.makeSpan([],[I(e.body,t)]);if(!e.smashHeight&&!e.smashDepth)return r;if(e.smashHeight&&(r.height=0,r.children))for(let e=0;e<r.children.length;e++)r.children[e].height=0;if(e.smashDepth&&(r.depth=0,r.children))for(let e=0;e<r.children.length;e++)r.children[e].depth=0;return e=N.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:r}]},t),N.makeSpan(["mord"],[e],t)},mathmlBuilder:(e,t)=>(t=new k.MathNode("mpadded",[R(e.body,t)]),e.smashHeight&&t.setAttribute("height","0px"),e.smashDepth&&t.setAttribute("depth","0px"),t)}),x({type:"sqrt",names:["\\sqrt"],props:{numArgs:1,numOptionalArgs:1},handler(e,t,r){return e=e.parser,r=r[0],t=t[0],{type:"sqrt",mode:e.mode,body:t,index:r}},htmlBuilder(e,t){let r=I(e.body,t.havingCrampedStyle());0===r.height&&(r.height=t.fontMetrics().xHeight),r=N.wrapFragment(r,t);const n=t.fontMetrics().defaultRuleThickness;let a=n,o=(t.style.id<T.TEXT.id&&(a=t.fontMetrics().xHeight),n+a/4);const i=r.height+r.depth+o+n,{span:s,ruleWidth:l,advanceWidth:h}=h0.sqrtImage(i,t),m=s.height-l;m>r.height+r.depth+o&&(o=(o+m-r.height-r.depth)/2);var c=s.height-r.height-o-l,c=(r.style.paddingLeft=C(h),N.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:r,wrapperClasses:["svg-align"]},{type:"kern",size:-(r.height+c)},{type:"elem",elem:s},{type:"kern",size:l}]},t));if(e.index){const r=t.havingStyle(T.SCRIPTSCRIPT),n=I(e.index,r,t),a=.6*(c.height-c.depth),o=N.makeVList({positionType:"shift",positionData:-a,children:[{type:"elem",elem:n}]},t),i=N.makeSpan(["root"],[o]);return N.makeSpan(["mord","sqrt"],[i,c],t)}return N.makeSpan(["mord","sqrt"],[c],t)},mathmlBuilder(e,t){var{body:e,index:r}=e;return r?new k.MathNode("mroot",[R(e,t),R(r,t)]):new k.MathNode("msqrt",[R(e,t)])}}),{display:T.DISPLAY,text:T.TEXT,script:T.SCRIPT,scriptscript:T.SCRIPTSCRIPT}),Z0=(x({type:"styling",names:["\\displaystyle","\\textstyle","\\scriptstyle","\\scriptscriptstyle"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e,t){var{breakOnTokenText:e,funcName:r,parser:n}=e,e=n.parseExpression(!0,e),r=r.slice(1,r.length-5);return{type:"styling",mode:n.mode,style:r,body:e}},htmlBuilder(e,t){var r=$0[e.style],r=t.havingStyle(r).withFont("");return j0(e.body,r,t)},mathmlBuilder(e,t){var r=$0[e.style],t=t.havingStyle(r),r=M(e.body,t),t=new k.MathNode("mstyle",r),r={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]}[e.style];return t.setAttribute("scriptlevel",r[0]),t.setAttribute("displaystyle",r[1]),t}}),rt({type:"supsub",htmlBuilder(e,t){n=t;const r=(o=(a=e).base)?"op"===o.type?o.limits&&(n.style.size===T.DISPLAY.size||o.alwaysHandleSupSub)?G0:null:"operatorname"===o.type?o.alwaysHandleSupSub&&(n.style.size===T.DISPLAY.size||o.limits)?W0:null:"accent"===o.type?A.isCharacterBox(o.base)?Nt:null:"horizBrace"===o.type&&!a.sub===o.isOver?D0:null:null;if(r)return r(e,t);var{base:n,sup:a,sub:o}=e,i=I(n,t);let s,l;var h=t.fontMetrics();let m=0,c=0;if(n=n&&A.isCharacterBox(n),a){const e=t.havingStyle(t.style.sup());s=I(a,e,t),n||(m=i.height-e.fontMetrics().supDrop*e.sizeMultiplier/t.sizeMultiplier)}if(o){const e=t.havingStyle(t.style.sub());l=I(o,e,t),n||(c=i.depth+e.fontMetrics().subDrop*e.sizeMultiplier/t.sizeMultiplier)}a=t.style===T.DISPLAY?h.sup1:t.style.cramped?h.sup3:h.sup2,o=t.sizeMultiplier,n=C(.5/h.ptPerEm/o);let p,u=null;if(l){const t=e.base&&"op"===e.base.type&&e.base.name&&("\\oiint"===e.base.name||"\\oiiint"===e.base.name);(i instanceof d||t)&&(u=C(-i.italic))}if(s&&l){m=Math.max(m,a,s.depth+.25*h.xHeight),c=Math.max(c,h.sub2);const e=4*h.defaultRuleThickness;if(m-s.depth-(l.height-c)<e){c=e-(m-s.depth)+l.height;const t=.8*h.xHeight-(m-s.depth);0<t&&(m+=t,c-=t)}const r=[{type:"elem",elem:l,shift:c,marginRight:n,marginLeft:u},{type:"elem",elem:s,shift:-m,marginRight:n}];p=N.makeVList({positionType:"individualShift",children:r},t)}else if(l){c=Math.max(c,h.sub1,l.height-.8*h.xHeight);const e=[{type:"elem",elem:l,marginLeft:u,marginRight:n}];p=N.makeVList({positionType:"shift",positionData:c,children:e},t)}else{if(!s)throw new Error("supsub must have either sup or sub.");m=Math.max(m,a,s.depth+.25*h.xHeight),p=N.makeVList({positionType:"shift",positionData:-m,children:[{type:"elem",elem:s,marginRight:n}]},t)}return o=ut(i,"right")||"mord",N.makeSpan([o],[i,N.makeSpan(["msupsub"],[p])],t)},mathmlBuilder(e,t){let r,n=!1;e.base&&"horizBrace"===e.base.type&&!!e.sup===e.base.isOver&&(n=!0,r=e.base.isOver),!e.base||"op"!==e.base.type&&"operatorname"!==e.base.type||(e.base.parentIsSupSub=!0);var a=[R(e.base,t)];let o;if(e.sub&&a.push(R(e.sub,t)),e.sup&&a.push(R(e.sup,t)),n)o=r?"mover":"munder";else if(e.sub)if(e.sup){const r=e.base;o=r&&"op"===r.type&&r.limits&&t.style===T.DISPLAY||r&&"operatorname"===r.type&&r.alwaysHandleSupSub&&(t.style===T.DISPLAY||r.limits)?"munderover":"msubsup"}else{const r=e.base;o=r&&"op"===r.type&&r.limits&&(t.style===T.DISPLAY||r.alwaysHandleSupSub)||r&&"operatorname"===r.type&&r.alwaysHandleSupSub&&(r.limits||t.style===T.DISPLAY)?"munder":"msub"}else{const r=e.base;o=r&&"op"===r.type&&r.limits&&(t.style===T.DISPLAY||r.alwaysHandleSupSub)||r&&"operatorname"===r.type&&r.alwaysHandleSupSub&&(r.limits||t.style===T.DISPLAY)?"mover":"msup"}return new k.MathNode(o,a)}}),rt({type:"atom",htmlBuilder(e,t){return N.mathsym(e.text,e.mode,t,["m"+e.family])},mathmlBuilder(e,t){var r=new k.MathNode("mo",[S(e.text,e.mode)]);return"bin"===e.family?"bold-italic"===(t=xt(e,t))&&r.setAttribute("mathvariant",t):"punct"===e.family?r.setAttribute("separator","true"):"open"!==e.family&&"close"!==e.family||r.setAttribute("stretchy","false"),r}}),{mi:"italic",mn:"normal",mtext:"normal"}),K0=(rt({type:"mathord",htmlBuilder(e,t){return N.makeOrd(e,t,"mathord")},mathmlBuilder(e,t){var r=new k.MathNode("mi",[S(e.text,e.mode,t)]);return(e=xt(e,t)||"italic")!==Z0[r.type]&&r.setAttribute("mathvariant",e),r}}),rt({type:"textord",htmlBuilder(e,t){return N.makeOrd(e,t,"textord")},mathmlBuilder(e,t){var r=S(e.text,e.mode,t),t=xt(e,t)||"normal",e="text"===e.mode?new k.MathNode("mtext",[r]):/[0-9]/.test(e.text)?new k.MathNode("mn",[r]):"\\prime"===e.text?new k.MathNode("mo",[r]):new k.MathNode("mi",[r]);return t!==Z0[e.type]&&e.setAttribute("mathvariant",t),e}}),{"\\nobreak":"nobreak","\\allowbreak":"allowbreak"}),J0={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}},Q0=(rt({type:"spacing",htmlBuilder(e,t){if(J0.hasOwnProperty(e.text)){var r=J0[e.text].className||"";if("text"!==e.mode)return N.makeSpan(["mspace",r],[N.mathsym(e.text,e.mode,t)],t);{const z=N.makeOrd(e,t,"textord");return z.classes.push(r),z}}if(K0.hasOwnProperty(e.text))return N.makeSpan(["mspace",K0[e.text]],[],t);throw new z('Unknown type of space "'+e.text+'"')},mathmlBuilder(e,t){if(J0.hasOwnProperty(e.text))return new k.MathNode("mtext",[new k.TextNode(" ")]);if(K0.hasOwnProperty(e.text))return new k.MathNode("mspace");throw new z('Unknown type of space "'+e.text+'"')}}),()=>{var e=new k.MathNode("mtd",[]);return e.setAttribute("width","50%"),e}),er=(rt({type:"tag",mathmlBuilder(e,t){return(e=new k.MathNode("mtable",[new k.MathNode("mtr",[Q0(),new k.MathNode("mtd",[wt(e.body,t)]),Q0(),new k.MathNode("mtd",[wt(e.tag,t)])])])).setAttribute("width","100%"),e}}),{"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"}),tr={"\\textbf":"textbf","\\textmd":"textmd"},rr={"\\textit":"textit","\\textup":"textup"},nr=(e,t)=>(e=e.font)?er[e]?t.withTextFontFamily(er[e]):tr[e]?t.withTextFontWeight(tr[e]):t.withTextFontShape(rr[e]):t,ar=(x({type:"text",names:["\\text","\\textrm","\\textsf","\\texttt","\\textnormal","\\textbf","\\textmd","\\textit","\\textup"],props:{numArgs:1,argTypes:["text"],allowedInArgument:!0,allowedInText:!0},handler(e,t){var{parser:e,funcName:r}=e,t=t[0];return{type:"text",mode:e.mode,body:w(t),font:r}},htmlBuilder(e,t){return t=nr(e,t),e=q(e.body,t,!0),N.makeSpan(["mord","text"],e,t)},mathmlBuilder(e,t){return t=nr(e,t),wt(e.body,t)}}),x({type:"underline",names:["\\underline"],props:{numArgs:1,allowedInText:!0},handler(e,t){return{type:"underline",mode:(e=e.parser).mode,body:t[0]}},htmlBuilder(e,t){var e=I(e.body,t),r=N.makeLineSpan("underline-line",t),n=t.fontMetrics().defaultRuleThickness,r=N.makeVList({positionType:"top",positionData:e.height,children:[{type:"kern",size:n},{type:"elem",elem:r},{type:"kern",size:3*n},{type:"elem",elem:e}]},t);return N.makeSpan(["mord","underline"],[r],t)},mathmlBuilder(e,t){var r=new k.MathNode("mo",[new k.TextNode("‾")]);return r.setAttribute("stretchy","true"),(e=new k.MathNode("munder",[R(e.body,t),r])).setAttribute("accentunder","true"),e}}),x({type:"vcenter",names:["\\vcenter"],props:{numArgs:1,argTypes:["original"],allowedInText:!1},handler(e,t){return{type:"vcenter",mode:(e=e.parser).mode,body:t[0]}},htmlBuilder(e,t){var e=I(e.body,t),r=t.fontMetrics().axisHeight,r=.5*(e.height-r-(e.depth+r));return N.makeVList({positionType:"shift",positionData:r,children:[{type:"elem",elem:e}]},t)},mathmlBuilder(e,t){return new k.MathNode("mpadded",[R(e.body,t)],["vcenter"])}}),x({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler(e,t,r){throw new z("\\verb ended by end of line instead of matching delimiter")},htmlBuilder(r,e){var n=ar(r),a=[],o=e.havingStyle(e.style.text());for(let t=0;t<n.length;t++){let e=n[t];"~"===e&&(e="\\textasciitilde"),a.push(N.makeSymbol(e,"Typewriter-Regular",r.mode,o,["mord","texttt"]))}return N.makeSpan(["mord","text"].concat(o.sizingClasses(e)),N.tryCombineChars(a),o)},mathmlBuilder(e,t){return e=new k.TextNode(ar(e)),(e=new k.MathNode("mtext",[e])).setAttribute("mathvariant","monospace"),e}}),e=>e.body.replace(/ /g,e.star?"␣":" "));var or=Qe;const ir=new RegExp("[̀-ͯ]+$");class sr{constructor(e,t){this.input=void 0,this.settings=void 0,this.tokenRegex=void 0,this.catcodes=void 0,this.input=e,this.settings=t,this.tokenRegex=new RegExp("([ \r\n\t]+)|\\\\(\n|[ \r\t]+\n?)[ \r\t]*|([!-\\[\\]-‧‪-퟿豈-￿][̀-ͯ]*|[\ud800-\udbff][\udc00-\udfff][̀-ͯ]*|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5|(\\\\[a-zA-Z@]+)[ \r\n\t]*|\\\\[^\ud800-\udfff])","g"),this.catcodes={"%":14,"~":13}}setCatcode(e,t){this.catcodes[e]=t}lex(){const e=this.input,t=this.tokenRegex.lastIndex;if(t===e.length)return new y0("EOF",new b0(this,t,t));var r=this.tokenRegex.exec(e);if(null===r||r.index!==t)throw new z("Unexpected character: '"+e[t]+"'",new y0(e[t],new b0(this,t,t+1)));if(r=r[6]||r[3]||(r[2]?"\\ ":" "),14!==this.catcodes[r])return new y0(r,new b0(this,t,this.tokenRegex.lastIndex));{const t=e.indexOf("\n",this.tokenRegex.lastIndex);return-1===t?(this.tokenRegex.lastIndex=e.length,this.settings.reportNonstrict("commentAtEnd","% comment has no terminating newline; LaTeX would fail because of commenting the end of math mode (e.g. $)")):this.tokenRegex.lastIndex=t+1,this.lex()}}}class lr{constructor(e,t){void 0===e&&(e={}),void 0===t&&(t={}),this.current=void 0,this.builtins=void 0,this.undefStack=void 0,this.current=t,this.builtins=e,this.undefStack=[]}beginGroup(){this.undefStack.push({})}endGroup(){if(0===this.undefStack.length)throw new z("Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug");var e=this.undefStack.pop();for(const t in e)e.hasOwnProperty(t)&&(null==e[t]?delete this.current[t]:this.current[t]=e[t])}endGroups(){for(;0<this.undefStack.length;)this.endGroup()}has(e){return this.current.hasOwnProperty(e)||this.builtins.hasOwnProperty(e)}get(e){return(this.current.hasOwnProperty(e)?this.current:this.builtins)[e]}set(t,e,r){if(r=void 0!==r&&r){for(let e=0;e<this.undefStack.length;e++)delete this.undefStack[e][t];0<this.undefStack.length&&(this.undefStack[this.undefStack.length-1][t]=e)}else{const e=this.undefStack[this.undefStack.length-1];e&&!e.hasOwnProperty(t)&&(e[t]=this.current[t])}null==e?delete this.current[t]:this.current[t]=e}}var hr=f0;O("\\noexpand",function(e){var t=e.popToken();return e.isExpandable(t.text)&&(t.noexpand=!0,t.treatAsRelax=!0),{tokens:[t],numArgs:0}}),O("\\expandafter",function(e){var t=e.popToken();return e.expandOnce(!0),{tokens:[t],numArgs:0}}),O("\\@firstoftwo",function(e){return{tokens:e.consumeArgs(2)[0],numArgs:0}}),O("\\@secondoftwo",function(e){return{tokens:e.consumeArgs(2)[1],numArgs:0}}),O("\\@ifnextchar",function(e){var t=e.consumeArgs(3),e=(e.consumeSpaces(),e.future());return 1===t[0].length&&t[0][0].text===e.text?{tokens:t[1],numArgs:0}:{tokens:t[2],numArgs:0}}),O("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}"),O("\\TextOrMath",function(e){var t=e.consumeArgs(2);return"text"===e.mode?{tokens:t[0],numArgs:0}:{tokens:t[1],numArgs:0}});const mr={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15},cr=(O("\\char",function(e){let t,r=e.popToken(),n="";if("'"===r.text)t=8,r=e.popToken();else if('"'===r.text)t=16,r=e.popToken();else if("`"===r.text)if("\\"===(r=e.popToken()).text[0])n=r.text.charCodeAt(1);else{if("EOF"===r.text)throw new z("\\char` missing argument");n=r.text.charCodeAt(0)}else t=10;if(t){if(null==(n=mr[r.text])||n>=t)throw new z("Invalid base-"+t+" digit "+r.text);for(var a;null!=(a=mr[e.future().text])&&a<t;)n=n*t+a,e.popToken()}return"\\@char{"+n+"}"}),(r,e,t)=>{let n=r.consumeArg().tokens;if(1!==n.length)throw new z("\\newcommand's first argument must be a macro name");var a=n[0].text,o=r.isDefined(a);if(o&&!e)throw new z("\\newcommand{"+a+"} attempting to redefine "+a+"; use \\renewcommand");if(!o&&!t)throw new z("\\renewcommand{"+a+"} when command "+a+" does not yet exist; use \\newcommand");let i=0;if(1===(n=r.consumeArg().tokens).length&&"["===n[0].text){let e="",t=r.expandNextToken();for(;"]"!==t.text&&"EOF"!==t.text;)e+=t.text,t=r.expandNextToken();if(!e.match(/^\s*[0-9]+\s*$/))throw new z("Invalid number of arguments: "+e);i=parseInt(e),n=r.consumeArg().tokens}return r.macros.set(a,{tokens:n,numArgs:i}),""}),pr=(O("\\newcommand",e=>cr(e,!1,!0)),O("\\renewcommand",e=>cr(e,!0,!1)),O("\\providecommand",e=>cr(e,!0,!0)),O("\\message",e=>(e=e.consumeArgs(1)[0],console.log(e.reverse().map(e=>e.text).join("")),"")),O("\\errmessage",e=>(e=e.consumeArgs(1)[0],console.error(e.reverse().map(e=>e.text).join("")),"")),O("\\show",e=>{var t=e.popToken(),r=t.text;return console.log(t,e.macros.get(r),or[r],h.math[r],h.text[r]),""}),O("\\bgroup","{"),O("\\egroup","}"),O("~","\\nobreakspace"),O("\\lq","`"),O("\\rq","'"),O("\\aa","\\r a"),O("\\AA","\\r A"),O("\\textcopyright","\\html@mathml{\\textcircled{c}}{\\char`©}"),O("\\copyright","\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}"),O("\\textregistered","\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`®}"),O("ℬ","\\mathscr{B}"),O("ℰ","\\mathscr{E}"),O("ℱ","\\mathscr{F}"),O("ℋ","\\mathscr{H}"),O("ℐ","\\mathscr{I}"),O("ℒ","\\mathscr{L}"),O("ℳ","\\mathscr{M}"),O("ℛ","\\mathscr{R}"),O("ℭ","\\mathfrak{C}"),O("ℌ","\\mathfrak{H}"),O("ℨ","\\mathfrak{Z}"),O("\\Bbbk","\\Bbb{k}"),O("·","\\cdotp"),O("\\llap","\\mathllap{\\textrm{#1}}"),O("\\rlap","\\mathrlap{\\textrm{#1}}"),O("\\clap","\\mathclap{\\textrm{#1}}"),O("\\mathstrut","\\vphantom{(}"),O("\\underbar","\\underline{\\text{#1}}"),O("\\not",'\\html@mathml{\\mathrel{\\mathrlap\\@not}}{\\char"338}'),O("\\neq","\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`≠}}"),O("\\ne","\\neq"),O("≠","\\neq"),O("\\notin","\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`∉}}"),O("∉","\\notin"),O("≘","\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`≘}}"),O("≙","\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`≘}}"),O("≚","\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`≚}}"),O("≛","\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`≛}}"),O("≝","\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`≝}}"),O("≞","\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`≞}}"),O("≟","\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`≟}}"),O("⟂","\\perp"),O("‼","\\mathclose{!\\mkern-0.8mu!}"),O("∌","\\notni"),O("⌜","\\ulcorner"),O("⌝","\\urcorner"),O("⌞","\\llcorner"),O("⌟","\\lrcorner"),O("©","\\copyright"),O("®","\\textregistered"),O("️","\\textregistered"),O("\\ulcorner",'\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}'),O("\\urcorner",'\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}'),O("\\llcorner",'\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}'),O("\\lrcorner",'\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}'),O("\\vdots","\\mathord{\\varvdots\\rule{0pt}{15pt}}"),O("⋮","\\vdots"),O("\\varGamma","\\mathit{\\Gamma}"),O("\\varDelta","\\mathit{\\Delta}"),O("\\varTheta","\\mathit{\\Theta}"),O("\\varLambda","\\mathit{\\Lambda}"),O("\\varXi","\\mathit{\\Xi}"),O("\\varPi","\\mathit{\\Pi}"),O("\\varSigma","\\mathit{\\Sigma}"),O("\\varUpsilon","\\mathit{\\Upsilon}"),O("\\varPhi","\\mathit{\\Phi}"),O("\\varPsi","\\mathit{\\Psi}"),O("\\varOmega","\\mathit{\\Omega}"),O("\\substack","\\begin{subarray}{c}#1\\end{subarray}"),O("\\colon","\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax"),O("\\boxed","\\fbox{$\\displaystyle{#1}$}"),O("\\iff","\\DOTSB\\;\\Longleftrightarrow\\;"),O("\\implies","\\DOTSB\\;\\Longrightarrow\\;"),O("\\impliedby","\\DOTSB\\;\\Longleftarrow\\;"),{",":"\\dotsc","\\not":"\\dotsb","+":"\\dotsb","=":"\\dotsb","<":"\\dotsb",">":"\\dotsb","-":"\\dotsb","*":"\\dotsb",":":"\\dotsb","\\DOTSB":"\\dotsb","\\coprod":"\\dotsb","\\bigvee":"\\dotsb","\\bigwedge":"\\dotsb","\\biguplus":"\\dotsb","\\bigcap":"\\dotsb","\\bigcup":"\\dotsb","\\prod":"\\dotsb","\\sum":"\\dotsb","\\bigotimes":"\\dotsb","\\bigoplus":"\\dotsb","\\bigodot":"\\dotsb","\\bigsqcup":"\\dotsb","\\And":"\\dotsb","\\longrightarrow":"\\dotsb","\\Longrightarrow":"\\dotsb","\\longleftarrow":"\\dotsb","\\Longleftarrow":"\\dotsb","\\longleftrightarrow":"\\dotsb","\\Longleftrightarrow":"\\dotsb","\\mapsto":"\\dotsb","\\longmapsto":"\\dotsb","\\hookrightarrow":"\\dotsb","\\doteq":"\\dotsb","\\mathbin":"\\dotsb","\\mathrel":"\\dotsb","\\relbar":"\\dotsb","\\Relbar":"\\dotsb","\\xrightarrow":"\\dotsb","\\xleftarrow":"\\dotsb","\\DOTSI":"\\dotsi","\\int":"\\dotsi","\\oint":"\\dotsi","\\iint":"\\dotsi","\\iiint":"\\dotsi","\\iiiint":"\\dotsi","\\idotsint":"\\dotsi","\\DOTSX":"\\dotsx"}),ur=(O("\\dots",function(e){let t="\\dotso";return(e=e.expandAfterFuture().text)in pr?t=pr[e]:("\\not"===e.slice(0,4)||e in h.math&&A.contains(["bin","rel"],h.math[e].group))&&(t="\\dotsb"),t}),{")":!0,"]":!0,"\\rbrack":!0,"\\}":!0,"\\rbrace":!0,"\\rangle":!0,"\\rceil":!0,"\\rfloor":!0,"\\rgroup":!0,"\\rmoustache":!0,"\\right":!0,"\\bigr":!0,"\\biggr":!0,"\\Bigr":!0,"\\Biggr":!0,$:!0,";":!0,".":!0,",":!0}),dr=(O("\\dotso",function(e){return e.future().text in ur?"\\ldots\\,":"\\ldots"}),O("\\dotsc",function(e){return(e=e.future().text)in ur&&","!==e?"\\ldots\\,":"\\ldots"}),O("\\cdots",function(e){return e.future().text in ur?"\\@cdots\\,":"\\@cdots"}),O("\\dotsb","\\cdots"),O("\\dotsm","\\cdots"),O("\\dotsi","\\!\\cdots"),O("\\dotsx","\\ldots\\,"),O("\\DOTSI","\\relax"),O("\\DOTSB","\\relax"),O("\\DOTSX","\\relax"),O("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax"),O("\\,","\\tmspace+{3mu}{.1667em}"),O("\\thinspace","\\,"),O("\\>","\\mskip{4mu}"),O("\\:","\\tmspace+{4mu}{.2222em}"),O("\\medspace","\\:"),O("\\;","\\tmspace+{5mu}{.2777em}"),O("\\thickspace","\\;"),O("\\!","\\tmspace-{3mu}{.1667em}"),O("\\negthinspace","\\!"),O("\\negmedspace","\\tmspace-{4mu}{.2222em}"),O("\\negthickspace","\\tmspace-{5mu}{.277em}"),O("\\enspace","\\kern.5em "),O("\\enskip","\\hskip.5em\\relax"),O("\\quad","\\hskip1em\\relax"),O("\\qquad","\\hskip2em\\relax"),O("\\tag","\\@ifstar\\tag@literal\\tag@paren"),O("\\tag@paren","\\tag@literal{({#1})}"),O("\\tag@literal",e=>{if(e.macros.get("\\df@tag"))throw new z("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"}),O("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}"),O("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)"),O("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}"),O("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1"),O("\\newline","\\\\\\relax"),O("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}"),O("\\LaTeX","\\textrm{\\html@mathml{L\\kern-.36em\\raisebox{"+(l=C(ae["Main-Regular"]["T".charCodeAt(0)][1]-.7*ae["Main-Regular"]["A".charCodeAt(0)][1]))+"}{\\scriptstyle A}\\kern-.15em\\TeX}{LaTeX}}"),O("\\KaTeX","\\textrm{\\html@mathml{K\\kern-.17em\\raisebox{"+l+"}{\\scriptstyle A}\\kern-.15em\\TeX}{KaTeX}}"),O("\\hspace","\\@ifstar\\@hspacer\\@hspace"),O("\\@hspace","\\hskip #1\\relax"),O("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax"),O("\\ordinarycolon",":"),O("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}"),O("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}'),O("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}'),O("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}'),O("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}'),O("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}'),O("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}'),O("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}'),O("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}'),O("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}'),O("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}'),O("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}'),O("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}'),O("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}'),O("∷","\\dblcolon"),O("∹","\\eqcolon"),O("≔","\\coloneqq"),O("≕","\\eqqcolon"),O("⩴","\\Coloneqq"),O("\\ratio","\\vcentcolon"),O("\\coloncolon","\\dblcolon"),O("\\colonequals","\\coloneqq"),O("\\coloncolonequals","\\Coloneqq"),O("\\equalscolon","\\eqqcolon"),O("\\equalscoloncolon","\\Eqqcolon"),O("\\colonminus","\\coloneq"),O("\\coloncolonminus","\\Coloneq"),O("\\minuscolon","\\eqcolon"),O("\\minuscoloncolon","\\Eqcolon"),O("\\coloncolonapprox","\\Colonapprox"),O("\\coloncolonsim","\\Colonsim"),O("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),O("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}"),O("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),O("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}"),O("\\notni","\\html@mathml{\\not\\ni}{\\mathrel{\\char`∌}}"),O("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}"),O("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}"),O("\\injlim","\\DOTSB\\operatorname*{inj\\,lim}"),O("\\projlim","\\DOTSB\\operatorname*{proj\\,lim}"),O("\\varlimsup","\\DOTSB\\operatorname*{\\overline{lim}}"),O("\\varliminf","\\DOTSB\\operatorname*{\\underline{lim}}"),O("\\varinjlim","\\DOTSB\\operatorname*{\\underrightarrow{lim}}"),O("\\varprojlim","\\DOTSB\\operatorname*{\\underleftarrow{lim}}"),O("\\gvertneqq","\\html@mathml{\\@gvertneqq}{≩}"),O("\\lvertneqq","\\html@mathml{\\@lvertneqq}{≨}"),O("\\ngeqq","\\html@mathml{\\@ngeqq}{≱}"),O("\\ngeqslant","\\html@mathml{\\@ngeqslant}{≱}"),O("\\nleqq","\\html@mathml{\\@nleqq}{≰}"),O("\\nleqslant","\\html@mathml{\\@nleqslant}{≰}"),O("\\nshortmid","\\html@mathml{\\@nshortmid}{∤}"),O("\\nshortparallel","\\html@mathml{\\@nshortparallel}{∦}"),O("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{⊈}"),O("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{⊉}"),O("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{⊊}"),O("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{⫋}"),O("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{⊋}"),O("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{⫌}"),O("\\imath","\\html@mathml{\\@imath}{ı}"),O("\\jmath","\\html@mathml{\\@jmath}{ȷ}"),O("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`⟦}}"),O("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`⟧}}"),O("⟦","\\llbracket"),O("⟧","\\rrbracket"),O("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`⦃}}"),O("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`⦄}}"),O("⦃","\\lBrace"),O("⦄","\\rBrace"),O("\\minuso","\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`⦵}}"),O("⦵","\\minuso"),O("\\darr","\\downarrow"),O("\\dArr","\\Downarrow"),O("\\Darr","\\Downarrow"),O("\\lang","\\langle"),O("\\rang","\\rangle"),O("\\uarr","\\uparrow"),O("\\uArr","\\Uparrow"),O("\\Uarr","\\Uparrow"),O("\\N","\\mathbb{N}"),O("\\R","\\mathbb{R}"),O("\\Z","\\mathbb{Z}"),O("\\alef","\\aleph"),O("\\alefsym","\\aleph"),O("\\Alpha","\\mathrm{A}"),O("\\Beta","\\mathrm{B}"),O("\\bull","\\bullet"),O("\\Chi","\\mathrm{X}"),O("\\clubs","\\clubsuit"),O("\\cnums","\\mathbb{C}"),O("\\Complex","\\mathbb{C}"),O("\\Dagger","\\ddagger"),O("\\diamonds","\\diamondsuit"),O("\\empty","\\emptyset"),O("\\Epsilon","\\mathrm{E}"),O("\\Eta","\\mathrm{H}"),O("\\exist","\\exists"),O("\\harr","\\leftrightarrow"),O("\\hArr","\\Leftrightarrow"),O("\\Harr","\\Leftrightarrow"),O("\\hearts","\\heartsuit"),O("\\image","\\Im"),O("\\infin","\\infty"),O("\\Iota","\\mathrm{I}"),O("\\isin","\\in"),O("\\Kappa","\\mathrm{K}"),O("\\larr","\\leftarrow"),O("\\lArr","\\Leftarrow"),O("\\Larr","\\Leftarrow"),O("\\lrarr","\\leftrightarrow"),O("\\lrArr","\\Leftrightarrow"),O("\\Lrarr","\\Leftrightarrow"),O("\\Mu","\\mathrm{M}"),O("\\natnums","\\mathbb{N}"),O("\\Nu","\\mathrm{N}"),O("\\Omicron","\\mathrm{O}"),O("\\plusmn","\\pm"),O("\\rarr","\\rightarrow"),O("\\rArr","\\Rightarrow"),O("\\Rarr","\\Rightarrow"),O("\\real","\\Re"),O("\\reals","\\mathbb{R}"),O("\\Reals","\\mathbb{R}"),O("\\Rho","\\mathrm{P}"),O("\\sdot","\\cdot"),O("\\sect","\\S"),O("\\spades","\\spadesuit"),O("\\sub","\\subset"),O("\\sube","\\subseteq"),O("\\supe","\\supseteq"),O("\\Tau","\\mathrm{T}"),O("\\thetasym","\\vartheta"),O("\\weierp","\\wp"),O("\\Zeta","\\mathrm{Z}"),O("\\argmin","\\DOTSB\\operatorname*{arg\\,min}"),O("\\argmax","\\DOTSB\\operatorname*{arg\\,max}"),O("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits"),O("\\bra","\\mathinner{\\langle{#1}|}"),O("\\ket","\\mathinner{|{#1}\\rangle}"),O("\\braket","\\mathinner{\\langle{#1}\\rangle}"),O("\\Bra","\\left\\langle#1\\right|"),O("\\Ket","\\left|#1\\right\\rangle"),O("\\bra@ket",(u=l=>e=>{const t=e.consumeArg().tokens,n=e.consumeArg().tokens,a=e.consumeArg().tokens,r=e.consumeArg().tokens,o=e.macros.get("|"),i=e.macros.get("\\|");e.macros.beginGroup();var s=r=>e=>{l&&(e.macros.set("|",o),a.length)&&e.macros.set("\\|",i);let t=r;return!r&&a.length&&"|"===e.future().text&&(e.popToken(),t=!0),{tokens:t?a:n,numArgs:0}},s=(e.macros.set("|",s(!1)),a.length&&e.macros.set("\\|",s(!0)),e.consumeArg().tokens),s=e.expandTokens([...r,...s,...t]);return e.macros.endGroup(),{tokens:s.reverse(),numArgs:0}})(!1)),O("\\bra@set",u(!0)),O("\\Braket","\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}"),O("\\Set","\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}"),O("\\set","\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}"),O("\\angln","{\\angl n}"),O("\\blue","\\textcolor{##6495ed}{#1}"),O("\\orange","\\textcolor{##ffa500}{#1}"),O("\\pink","\\textcolor{##ff00af}{#1}"),O("\\red","\\textcolor{##df0030}{#1}"),O("\\green","\\textcolor{##28ae7b}{#1}"),O("\\gray","\\textcolor{gray}{#1}"),O("\\purple","\\textcolor{##9d38bd}{#1}"),O("\\blueA","\\textcolor{##ccfaff}{#1}"),O("\\blueB","\\textcolor{##80f6ff}{#1}"),O("\\blueC","\\textcolor{##63d9ea}{#1}"),O("\\blueD","\\textcolor{##11accd}{#1}"),O("\\blueE","\\textcolor{##0c7f99}{#1}"),O("\\tealA","\\textcolor{##94fff5}{#1}"),O("\\tealB","\\textcolor{##26edd5}{#1}"),O("\\tealC","\\textcolor{##01d1c1}{#1}"),O("\\tealD","\\textcolor{##01a995}{#1}"),O("\\tealE","\\textcolor{##208170}{#1}"),O("\\greenA","\\textcolor{##b6ffb0}{#1}"),O("\\greenB","\\textcolor{##8af281}{#1}"),O("\\greenC","\\textcolor{##74cf70}{#1}"),O("\\greenD","\\textcolor{##1fab54}{#1}"),O("\\greenE","\\textcolor{##0d923f}{#1}"),O("\\goldA","\\textcolor{##ffd0a9}{#1}"),O("\\goldB","\\textcolor{##ffbb71}{#1}"),O("\\goldC","\\textcolor{##ff9c39}{#1}"),O("\\goldD","\\textcolor{##e07d10}{#1}"),O("\\goldE","\\textcolor{##a75a05}{#1}"),O("\\redA","\\textcolor{##fca9a9}{#1}"),O("\\redB","\\textcolor{##ff8482}{#1}"),O("\\redC","\\textcolor{##f9685d}{#1}"),O("\\redD","\\textcolor{##e84d39}{#1}"),O("\\redE","\\textcolor{##bc2612}{#1}"),O("\\maroonA","\\textcolor{##ffbde0}{#1}"),O("\\maroonB","\\textcolor{##ff92c6}{#1}"),O("\\maroonC","\\textcolor{##ed5fa6}{#1}"),O("\\maroonD","\\textcolor{##ca337c}{#1}"),O("\\maroonE","\\textcolor{##9e034e}{#1}"),O("\\purpleA","\\textcolor{##ddd7ff}{#1}"),O("\\purpleB","\\textcolor{##c6b9fc}{#1}"),O("\\purpleC","\\textcolor{##aa87ff}{#1}"),O("\\purpleD","\\textcolor{##7854ab}{#1}"),O("\\purpleE","\\textcolor{##543b78}{#1}"),O("\\mintA","\\textcolor{##f5f9e8}{#1}"),O("\\mintB","\\textcolor{##edf2df}{#1}"),O("\\mintC","\\textcolor{##e0e5cc}{#1}"),O("\\grayA","\\textcolor{##f6f7f7}{#1}"),O("\\grayB","\\textcolor{##f0f1f2}{#1}"),O("\\grayC","\\textcolor{##e3e5e6}{#1}"),O("\\grayD","\\textcolor{##d6d8da}{#1}"),O("\\grayE","\\textcolor{##babec2}{#1}"),O("\\grayF","\\textcolor{##888d93}{#1}"),O("\\grayG","\\textcolor{##626569}{#1}"),O("\\grayH","\\textcolor{##3b3e40}{#1}"),O("\\grayI","\\textcolor{##21242c}{#1}"),O("\\kaBlue","\\textcolor{##314453}{#1}"),O("\\kaGreen","\\textcolor{##71B307}{#1}"),{"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0});class gr{constructor(e,t,r){this.settings=void 0,this.expansionCount=void 0,this.lexer=void 0,this.macros=void 0,this.stack=void 0,this.mode=void 0,this.settings=t,this.expansionCount=0,this.feed(e),this.macros=new lr(hr,t.macros),this.mode=r,this.stack=[]}feed(e){this.lexer=new sr(e,this.settings)}switchMode(e){this.mode=e}beginGroup(){this.macros.beginGroup()}endGroup(){this.macros.endGroup()}endGroups(){this.macros.endGroups()}future(){return 0===this.stack.length&&this.pushToken(this.lexer.lex()),this.stack[this.stack.length-1]}popToken(){return this.future(),this.stack.pop()}pushToken(e){this.stack.push(e)}pushTokens(e){this.stack.push(...e)}scanArgument(e){let t,r,n;if(e){if(this.consumeSpaces(),"["!==this.future().text)return null;t=this.popToken(),{tokens:n,end:r}=this.consumeArg(["]"])}else({tokens:n,start:t,end:r}=this.consumeArg());return this.pushToken(new y0("EOF",r.loc)),this.pushTokens(n),t.range(r,"")}consumeSpaces(){for(;" "===this.future().text;)this.stack.pop()}consumeArg(e){var t=[],r=e&&0<e.length,n=(r||this.consumeSpaces(),this.future());let a,o=0,i=0;do{if(a=this.popToken(),t.push(a),"{"===a.text)++o;else if("}"===a.text){if(-1==--o)throw new z("Extra }",a)}else if("EOF"===a.text)throw new z("Unexpected end of input in a macro argument, expected '"+(e&&r?e[i]:"}")+"'",a);if(e&&r)if((0===o||1===o&&"{"===e[i])&&a.text===e[i]){if(++i===e.length){t.splice(-i,i);break}}else i=0}while(0!==o||r);return"{"===n.text&&"}"===t[t.length-1].text&&(t.pop(),t.shift()),t.reverse(),{tokens:t,start:n,end:a}}consumeArgs(t,r){if(r){if(r.length!==t+1)throw new z("The length of delimiters doesn't match the number of args!");const n=r[0];for(let e=0;e<n.length;e++){const r=this.popToken();if(n[e]!==r.text)throw new z("Use of the macro doesn't match its definition",r)}}const n=[];for(let e=0;e<t;e++)n.push(this.consumeArg(r&&r[e+1]).tokens);return n}countExpansion(e){if(this.expansionCount+=e,this.expansionCount>this.settings.maxExpand)throw new z("Too many expansions: infinite loop or need to increase maxExpand setting")}expandOnce(e){var t=this.popToken(),r=t.text,n=t.noexpand?null:this._getExpansion(r);if(null==n||e&&n.unexpandable){if(e&&null==n&&"\\"===r[0]&&!this.isDefined(r))throw new z("Undefined control sequence: "+r);return this.pushToken(t),!1}this.countExpansion(1);let a=n.tokens;var o=this.consumeArgs(n.numArgs,n.delimiters);if(n.numArgs)for(let e=(a=a.slice()).length-1;0<=e;--e){var i=a[e];if("#"===i.text){if(0===e)throw new z("Incomplete placeholder at end of macro body",i);if("#"===(i=a[--e]).text)a.splice(e+1,1);else{if(!/^[1-9]$/.test(i.text))throw new z("Not a valid argument number",i);a.splice(e,2,...o[+i.text-1])}}}return this.pushTokens(a),a.length}expandAfterFuture(){return this.expandOnce(),this.future()}expandNextToken(){for(;;){var e;if(!1===this.expandOnce())return(e=this.stack.pop()).treatAsRelax&&(e.text="\\relax"),e}throw new Error}expandMacro(e){return this.macros.has(e)?this.expandTokens([new y0(e)]):void 0}expandTokens(e){var t=[],r=this.stack.length;for(this.pushTokens(e);this.stack.length>r;)if(!1===this.expandOnce(!0)){const e=this.stack.pop();e.treatAsRelax&&(e.noexpand=!1,e.treatAsRelax=!1),t.push(e)}return this.countExpansion(t.length),t}expandMacroAsText(e){return(e=this.expandMacro(e))&&e.map(e=>e.text).join("")}_getExpansion(r){const n=this.macros.get(r);if(null==n)return n;if(1===r.length){const n=this.lexer.catcodes[r];if(null!=n&&13!==n)return}if("string"!=typeof(r="function"==typeof n?n(this):n))return r;{let e=0;if(-1!==r.indexOf("#")){const n=r.replace(/##/g,"");for(;-1!==n.indexOf("#"+(e+1));)++e}const n=new sr(r,this.settings),a=[];let t=n.lex();for(;"EOF"!==t.text;)a.push(t),t=n.lex();return a.reverse(),{tokens:a,numArgs:e}}}isDefined(e){return this.macros.has(e)||or.hasOwnProperty(e)||h.math.hasOwnProperty(e)||h.text.hasOwnProperty(e)||dr.hasOwnProperty(e)}isExpandable(e){var t=this.macros.get(e);return null!=t?"string"==typeof t||"function"==typeof t||!t.unexpandable:or.hasOwnProperty(e)&&!or[e].primitive}}const fr=/^[\u208a\u208b\u208c\u208d\u208e\u2080\u2081\u2082\u2083\u2084\u2085\u2086\u2087\u2088\u2089\u2090\u2091\u2095\u1d62\u2c7c\u2096\u2097\u2098\u2099\u2092\u209a\u1d63\u209b\u209c\u1d64\u1d65\u2093\u1d66\u1d67\u1d68\u1d69\u1d6a]/,br=Object.freeze({"₊":"+","₋":"-","₌":"=","₍":"(","₎":")","₀":"0","₁":"1","₂":"2","₃":"3","₄":"4","₅":"5","₆":"6","₇":"7","₈":"8","₉":"9","ₐ":"a","ₑ":"e","ₕ":"h","ᵢ":"i","ⱼ":"j","ₖ":"k","ₗ":"l","ₘ":"m","ₙ":"n","ₒ":"o","ₚ":"p","ᵣ":"r","ₛ":"s","ₜ":"t","ᵤ":"u","ᵥ":"v","ₓ":"x","ᵦ":"β","ᵧ":"γ","ᵨ":"ρ","ᵩ":"ϕ","ᵪ":"χ","⁺":"+","⁻":"-","⁼":"=","⁽":"(","⁾":")","⁰":"0","¹":"1","²":"2","³":"3","⁴":"4","⁵":"5","⁶":"6","⁷":"7","⁸":"8","⁹":"9","ᴬ":"A","ᴮ":"B","ᴰ":"D","ᴱ":"E","ᴳ":"G","ᴴ":"H","ᴵ":"I","ᴶ":"J","ᴷ":"K","ᴸ":"L","ᴹ":"M","ᴺ":"N","ᴼ":"O","ᴾ":"P","ᴿ":"R","ᵀ":"T","ᵁ":"U","ⱽ":"V","ᵂ":"W","ᵃ":"a","ᵇ":"b","ᶜ":"c","ᵈ":"d","ᵉ":"e","ᶠ":"f","ᵍ":"g","ʰ":"h","ⁱ":"i","ʲ":"j","ᵏ":"k","ˡ":"l","ᵐ":"m","ⁿ":"n","ᵒ":"o","ᵖ":"p","ʳ":"r","ˢ":"s","ᵗ":"t","ᵘ":"u","ᵛ":"v","ʷ":"w","ˣ":"x","ʸ":"y","ᶻ":"z","ᵝ":"β","ᵞ":"γ","ᵟ":"δ","ᵠ":"ϕ","ᵡ":"χ","ᶿ":"θ"}),yr={"́":{text:"\\'",math:"\\acute"},"̀":{text:"\\`",math:"\\grave"},"̈":{text:'\\"',math:"\\ddot"},"̃":{text:"\\~",math:"\\tilde"},"̄":{text:"\\=",math:"\\bar"},"̆":{text:"\\u",math:"\\breve"},"̌":{text:"\\v",math:"\\check"},"̂":{text:"\\^",math:"\\hat"},"̇":{text:"\\.",math:"\\dot"},"̊":{text:"\\r",math:"\\mathring"},"̋":{text:"\\H"},"̧":{text:"\\c"}},xr={"á":"á","à":"à","ä":"ä","ǟ":"ǟ","ã":"ã","ā":"ā","ă":"ă","ắ":"ắ","ằ":"ằ","ẵ":"ẵ","ǎ":"ǎ","â":"â","ấ":"ấ","ầ":"ầ","ẫ":"ẫ","ȧ":"ȧ","ǡ":"ǡ","å":"å","ǻ":"ǻ","ḃ":"ḃ","ć":"ć","ḉ":"ḉ","č":"č","ĉ":"ĉ","ċ":"ċ","ç":"ç","ď":"ď","ḋ":"ḋ","ḑ":"ḑ","é":"é","è":"è","ë":"ë","ẽ":"ẽ","ē":"ē","ḗ":"ḗ","ḕ":"ḕ","ĕ":"ĕ","ḝ":"ḝ","ě":"ě","ê":"ê","ế":"ế","ề":"ề","ễ":"ễ","ė":"ė","ȩ":"ȩ","ḟ":"ḟ","ǵ":"ǵ","ḡ":"ḡ","ğ":"ğ","ǧ":"ǧ","ĝ":"ĝ","ġ":"ġ","ģ":"ģ","ḧ":"ḧ","ȟ":"ȟ","ĥ":"ĥ","ḣ":"ḣ","ḩ":"ḩ","í":"í","ì":"ì","ï":"ï","ḯ":"ḯ","ĩ":"ĩ","ī":"ī","ĭ":"ĭ","ǐ":"ǐ","î":"î","ǰ":"ǰ","ĵ":"ĵ","ḱ":"ḱ","ǩ":"ǩ","ķ":"ķ","ĺ":"ĺ","ľ":"ľ","ļ":"ļ","ḿ":"ḿ","ṁ":"ṁ","ń":"ń","ǹ":"ǹ","ñ":"ñ","ň":"ň","ṅ":"ṅ","ņ":"ņ","ó":"ó","ò":"ò","ö":"ö","ȫ":"ȫ","õ":"õ","ṍ":"ṍ","ṏ":"ṏ","ȭ":"ȭ","ō":"ō","ṓ":"ṓ","ṑ":"ṑ","ŏ":"ŏ","ǒ":"ǒ","ô":"ô","ố":"ố","ồ":"ồ","ỗ":"ỗ","ȯ":"ȯ","ȱ":"ȱ","ő":"ő","ṕ":"ṕ","ṗ":"ṗ","ŕ":"ŕ","ř":"ř","ṙ":"ṙ","ŗ":"ŗ","ś":"ś","ṥ":"ṥ","š":"š","ṧ":"ṧ","ŝ":"ŝ","ṡ":"ṡ","ş":"ş","ẗ":"ẗ","ť":"ť","ṫ":"ṫ","ţ":"ţ","ú":"ú","ù":"ù","ü":"ü","ǘ":"ǘ","ǜ":"ǜ","ǖ":"ǖ","ǚ":"ǚ","ũ":"ũ","ṹ":"ṹ","ū":"ū","ṻ":"ṻ","ŭ":"ŭ","ǔ":"ǔ","û":"û","ů":"ů","ű":"ű","ṽ":"ṽ","ẃ":"ẃ","ẁ":"ẁ","ẅ":"ẅ","ŵ":"ŵ","ẇ":"ẇ","ẘ":"ẘ","ẍ":"ẍ","ẋ":"ẋ","ý":"ý","ỳ":"ỳ","ÿ":"ÿ","ỹ":"ỹ","ȳ":"ȳ","ŷ":"ŷ","ẏ":"ẏ","ẙ":"ẙ","ź":"ź","ž":"ž","ẑ":"ẑ","ż":"ż","Á":"Á","À":"À","Ä":"Ä","Ǟ":"Ǟ","Ã":"Ã","Ā":"Ā","Ă":"Ă","Ắ":"Ắ","Ằ":"Ằ","Ẵ":"Ẵ","Ǎ":"Ǎ","Â":"Â","Ấ":"Ấ","Ầ":"Ầ","Ẫ":"Ẫ","Ȧ":"Ȧ","Ǡ":"Ǡ","Å":"Å","Ǻ":"Ǻ","Ḃ":"Ḃ","Ć":"Ć","Ḉ":"Ḉ","Č":"Č","Ĉ":"Ĉ","Ċ":"Ċ","Ç":"Ç","Ď":"Ď","Ḋ":"Ḋ","Ḑ":"Ḑ","É":"É","È":"È","Ë":"Ë","Ẽ":"Ẽ","Ē":"Ē","Ḗ":"Ḗ","Ḕ":"Ḕ","Ĕ":"Ĕ","Ḝ":"Ḝ","Ě":"Ě","Ê":"Ê","Ế":"Ế","Ề":"Ề","Ễ":"Ễ","Ė":"Ė","Ȩ":"Ȩ","Ḟ":"Ḟ","Ǵ":"Ǵ","Ḡ":"Ḡ","Ğ":"Ğ","Ǧ":"Ǧ","Ĝ":"Ĝ","Ġ":"Ġ","Ģ":"Ģ","Ḧ":"Ḧ","Ȟ":"Ȟ","Ĥ":"Ĥ","Ḣ":"Ḣ","Ḩ":"Ḩ","Í":"Í","Ì":"Ì","Ï":"Ï","Ḯ":"Ḯ","Ĩ":"Ĩ","Ī":"Ī","Ĭ":"Ĭ","Ǐ":"Ǐ","Î":"Î","İ":"İ","Ĵ":"Ĵ","Ḱ":"Ḱ","Ǩ":"Ǩ","Ķ":"Ķ","Ĺ":"Ĺ","Ľ":"Ľ","Ļ":"Ļ","Ḿ":"Ḿ","Ṁ":"Ṁ","Ń":"Ń","Ǹ":"Ǹ","Ñ":"Ñ","Ň":"Ň","Ṅ":"Ṅ","Ņ":"Ņ","Ó":"Ó","Ò":"Ò","Ö":"Ö","Ȫ":"Ȫ","Õ":"Õ","Ṍ":"Ṍ","Ṏ":"Ṏ","Ȭ":"Ȭ","Ō":"Ō","Ṓ":"Ṓ","Ṑ":"Ṑ","Ŏ":"Ŏ","Ǒ":"Ǒ","Ô":"Ô","Ố":"Ố","Ồ":"Ồ","Ỗ":"Ỗ","Ȯ":"Ȯ","Ȱ":"Ȱ","Ő":"Ő","Ṕ":"Ṕ","Ṗ":"Ṗ","Ŕ":"Ŕ","Ř":"Ř","Ṙ":"Ṙ","Ŗ":"Ŗ","Ś":"Ś","Ṥ":"Ṥ","Š":"Š","Ṧ":"Ṧ","Ŝ":"Ŝ","Ṡ":"Ṡ","Ş":"Ş","Ť":"Ť","Ṫ":"Ṫ","Ţ":"Ţ","Ú":"Ú","Ù":"Ù","Ü":"Ü","Ǘ":"Ǘ","Ǜ":"Ǜ","Ǖ":"Ǖ","Ǚ":"Ǚ","Ũ":"Ũ","Ṹ":"Ṹ","Ū":"Ū","Ṻ":"Ṻ","Ŭ":"Ŭ","Ǔ":"Ǔ","Û":"Û","Ů":"Ů","Ű":"Ű","Ṽ":"Ṽ","Ẃ":"Ẃ","Ẁ":"Ẁ","Ẅ":"Ẅ","Ŵ":"Ŵ","Ẇ":"Ẇ","Ẍ":"Ẍ","Ẋ":"Ẋ","Ý":"Ý","Ỳ":"Ỳ","Ÿ":"Ÿ","Ỹ":"Ỹ","Ȳ":"Ȳ","Ŷ":"Ŷ","Ẏ":"Ẏ","Ź":"Ź","Ž":"Ž","Ẑ":"Ẑ","Ż":"Ż","ά":"ά","ὰ":"ὰ","ᾱ":"ᾱ","ᾰ":"ᾰ","έ":"έ","ὲ":"ὲ","ή":"ή","ὴ":"ὴ","ί":"ί","ὶ":"ὶ","ϊ":"ϊ","ΐ":"ΐ","ῒ":"ῒ","ῑ":"ῑ","ῐ":"ῐ","ό":"ό","ὸ":"ὸ","ύ":"ύ","ὺ":"ὺ","ϋ":"ϋ","ΰ":"ΰ","ῢ":"ῢ","ῡ":"ῡ","ῠ":"ῠ","ώ":"ώ","ὼ":"ὼ","Ύ":"Ύ","Ὺ":"Ὺ","Ϋ":"Ϋ","Ῡ":"Ῡ","Ῠ":"Ῠ","Ώ":"Ώ","Ὼ":"Ὼ"};class wr{constructor(e,t){this.mode=void 0,this.gullet=void 0,this.settings=void 0,this.leftrightDepth=void 0,this.nextToken=void 0,this.mode="math",this.gullet=new gr(e,t,this.mode),this.settings=t,this.leftrightDepth=0}expect(e,t){if(void 0===t&&(t=!0),this.fetch().text!==e)throw new z("Expected '"+e+"', got '"+this.fetch().text+"'",this.fetch());t&&this.consume()}consume(){this.nextToken=null}fetch(){return null==this.nextToken&&(this.nextToken=this.gullet.expandNextToken()),this.nextToken}switchMode(e){this.mode=e,this.gullet.switchMode(e)}parse(){this.settings.globalGroup||this.gullet.beginGroup(),this.settings.colorIsTextColor&&this.gullet.macros.set("\\color","\\textcolor");try{var e=this.parseExpression(!1);return this.expect("EOF"),this.settings.globalGroup||this.gullet.endGroup(),e}finally{this.gullet.endGroups()}}subparse(e){var t=this.nextToken,e=(this.consume(),this.gullet.pushToken(new y0("}")),this.gullet.pushTokens(e),this.parseExpression(!1));return this.expect("}"),this.nextToken=t,e}parseExpression(e,t){for(var r=[];;){"math"===this.mode&&this.consumeSpaces();var n=this.fetch();if(-1!==wr.endOfExpression.indexOf(n.text))break;if(t&&n.text===t)break;if(e&&or[n.text]&&or[n.text].infix)break;if(!(n=this.parseAtom(t)))break;"internal"!==n.type&&r.push(n)}return"text"===this.mode&&this.formLigatures(r),this.handleInfixNodes(r)}handleInfixNodes(t){let r,n=-1;for(let e=0;e<t.length;e++)if("infix"===t[e].type){if(-1!==n)throw new z("only one infix operator per group",t[e].token);n=e,r=t[e].replaceWith}var e,a;return-1!==n&&r?(e=t.slice(0,n),a=t.slice(n+1),e=1===e.length&&"ordgroup"===e[0].type?e[0]:{type:"ordgroup",mode:this.mode,body:e},a=1===a.length&&"ordgroup"===a[0].type?a[0]:{type:"ordgroup",mode:this.mode,body:a},["\\\\abovefrac"===r?this.callFunction(r,[e,t[n],a],[]):this.callFunction(r,[e,a],[])]):t}handleSupSubscript(e){var t=this.fetch(),r=t.text;if(this.consume(),this.consumeSpaces(),e=this.parseGroup(e))return e;throw new z("Expected group after '"+r+"'",t)}formatUnsupportedCmd(t){var r=[];for(let e=0;e<t.length;e++)r.push({type:"textord",mode:"text",text:t[e]});var e={type:"text",mode:this.mode,body:r};return{type:"color",mode:this.mode,color:this.settings.errorColor,body:[e]}}parseAtom(e){const t=this.parseGroup("atom",e);if("text"===this.mode)return t;let r,n;for(;;){this.consumeSpaces();const e=this.fetch();if("\\limits"===e.text||"\\nolimits"===e.text){if(t&&"op"===t.type){const r="\\limits"===e.text;t.limits=r,t.alwaysHandleSupSub=!0}else{if(!t||"operatorname"!==t.type)throw new z("Limit controls must follow a math operator",e);t.alwaysHandleSupSub&&(t.limits="\\limits"===e.text)}this.consume()}else if("^"===e.text){if(r)throw new z("Double superscript",e);r=this.handleSupSubscript("superscript")}else if("_"===e.text){if(n)throw new z("Double subscript",e);n=this.handleSupSubscript("subscript")}else if("'"===e.text){if(r)throw new z("Double superscript",e);const t={type:"textord",mode:this.mode,text:"\\prime"},n=[t];for(this.consume();"'"===this.fetch().text;)n.push(t),this.consume();"^"===this.fetch().text&&n.push(this.handleSupSubscript("superscript")),r={type:"ordgroup",mode:this.mode,body:n}}else{if(!br[e.text])break;{const t=fr.test(e.text),z=[];for(z.push(new y0(br[e.text])),this.consume();;){const e=this.fetch().text;if(!br[e])break;if(fr.test(e)!==t)break;z.unshift(new y0(br[e])),this.consume()}var a=this.subparse(z);t?n={type:"ordgroup",mode:"math",body:a}:r={type:"ordgroup",mode:"math",body:a}}}}return r||n?{type:"supsub",mode:this.mode,base:t,sup:r,sub:n}:t}parseFunction(e,t){var r=this.fetch(),n=r.text;if(!(a=or[n]))return null;if(this.consume(),t&&"atom"!==t&&!a.allowedInArgument)throw new z("Got function '"+n+"' with no arguments"+(t?" as "+t:""),r);if("text"===this.mode&&!a.allowedInText)throw new z("Can't use function '"+n+"' in text mode",r);if("math"===this.mode&&!1===a.allowedInMath)throw new z("Can't use function '"+n+"' in math mode",r);var{args:t,optArgs:a}=this.parseArguments(n,a);return this.callFunction(n,t,a,r,e)}callFunction(e,t,r,n,a){var o=or[e];if(o&&o.handler)return o.handler({funcName:e,parser:this,token:n,breakOnTokenText:a},t,r);throw new z("No function handler for "+e)}parseArguments(r,n){var e=n.numArgs+n.numOptionalArgs;if(0===e)return{args:[],optArgs:[]};var a=[],o=[];for(let t=0;t<e;t++){let e=n.argTypes&&n.argTypes[t];var i=t<n.numOptionalArgs,s=((n.primitive&&null==e||"sqrt"===n.type&&1===t&&null==o[0])&&(e="primitive"),this.parseGroupOfType("argument to '"+r+"'",e,i));if(i)o.push(s);else{if(null==s)throw new z("Null argument, please report this as a bug");a.push(s)}}return{args:a,optArgs:o}}parseGroupOfType(e,t,r){switch(t){case"color":return this.parseColorGroup(r);case"size":return this.parseSizeGroup(r);case"url":return this.parseUrlGroup(r);case"math":case"text":return this.parseArgumentGroup(r,t);case"hbox":{const e=this.parseArgumentGroup(r,"text");return null!=e?{type:"styling",mode:e.mode,body:[e],style:"text"}:null}case"raw":{const e=this.parseStringGroup("raw",r);return null!=e?{type:"raw",mode:"text",string:e.text}:null}case"primitive":{if(r)throw new z("A primitive argument cannot be optional");const t=this.parseGroup(e);if(null==t)throw new z("Expected group as "+e,this.fetch());return t}case"original":case null:case void 0:return this.parseArgumentGroup(r);default:throw new z("Unknown group type as "+e,this.fetch())}}consumeSpaces(){for(;" "===this.fetch().text;)this.consume()}parseStringGroup(e,t){if(null==(t=this.gullet.scanArgument(t)))return null;let r,n="";for(;"EOF"!==(r=this.fetch()).text;)n+=r.text,this.consume();return this.consume(),t.text=n,t}parseRegexGroup(e,t){var r=this.fetch();let n,a=r,o="";for(;"EOF"!==(n=this.fetch()).text&&e.test(o+n.text);)a=n,o+=a.text,this.consume();if(""===o)throw new z("Invalid "+t+": '"+r.text+"'",r);return r.range(a,o)}parseColorGroup(e){if(null==(e=this.parseStringGroup("color",e)))return null;var t=/^(#[a-f0-9]{3}|#?[a-f0-9]{6}|[a-z]+)$/i.exec(e.text);if(!t)throw new z("Invalid color: '"+e.text+"'",e);let r=t[0];return/^[0-9a-f]{6}$/i.test(r)&&(r="#"+r),{type:"color-token",mode:this.mode,color:r}}parseSizeGroup(e){let t,r=!1;if(this.gullet.consumeSpaces(),!(t=e||"{"===this.gullet.future().text?this.parseStringGroup("size",e):this.parseRegexGroup(/^[-+]? *(?:$|\d+|\d+\.\d*|\.\d*) *[a-z]{0,2} *$/,"size")))return null;if(e||0!==t.text.length||(t.text="0pt",r=!0),!(e=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(t.text)))throw new z("Invalid size: '"+t.text+"'",t);if(de(e={number:+(e[1]+e[2]),unit:e[3]}))return{type:"size",mode:this.mode,value:e,isBlank:r};throw new z("Invalid unit: '"+e.unit+"'",t)}parseUrlGroup(e){return this.gullet.lexer.setCatcode("%",13),this.gullet.lexer.setCatcode("~",12),e=this.parseStringGroup("url",e),this.gullet.lexer.setCatcode("%",14),this.gullet.lexer.setCatcode("~",13),null==e?null:(e=e.text.replace(/\\([#$%&~_^{}])/g,"$1"),{type:"url",mode:this.mode,url:e})}parseArgumentGroup(e,t){var r,n;return null==(e=this.gullet.scanArgument(e))?null:(r=this.mode,t&&this.switchMode(t),this.gullet.beginGroup(),n=this.parseExpression(!1,"EOF"),this.expect("EOF"),this.gullet.endGroup(),e={type:"ordgroup",mode:this.mode,loc:e.loc,body:n},t&&this.switchMode(r),e)}parseGroup(e,t){var r=this.fetch(),n=r.text;let a;if("{"===n||"\\begingroup"===n){this.consume();const e="{"===n?"}":"\\endgroup",t=(this.gullet.beginGroup(),this.parseExpression(!1,e)),z=this.fetch();this.expect(e),this.gullet.endGroup(),a={type:"ordgroup",mode:this.mode,loc:b0.range(r,z),body:t,semisimple:"\\begingroup"===n||void 0}}else if(null==(a=this.parseFunction(t,e)||this.parseSymbol())&&"\\"===n[0]&&!dr.hasOwnProperty(n)){if(this.settings.throwOnError)throw new z("Undefined control sequence: "+n,r);a=this.formatUnsupportedCmd(n),this.consume()}return a}formLigatures(t){let r=t.length-1;for(let e=0;e<r;++e){var n=t[e],a=n.text;"-"===a&&"-"===t[e+1].text&&(e+1<r&&"-"===t[e+2].text?(t.splice(e,3,{type:"textord",mode:"text",loc:b0.range(n,t[e+2]),text:"---"}),r-=2):(t.splice(e,2,{type:"textord",mode:"text",loc:b0.range(n,t[e+1]),text:"--"}),--r)),"'"!==a&&"`"!==a||t[e+1].text!==a||(t.splice(e,2,{type:"textord",mode:"text",loc:b0.range(n,t[e+1]),text:a+a}),--r)}}parseSymbol(){const t=this.fetch();let r=t.text;if(/^\\verb[^a-zA-Z]/.test(r)){this.consume();let e=r.slice(5);const n="*"===e.charAt(0);if((e=n?e.slice(1):e).length<2||e.charAt(0)!==e.slice(-1))throw new z("\\verb assertion failed --\n please report what input caused this bug");return{type:"verb",mode:"text",body:e=e.slice(1,-1),star:n}}xr.hasOwnProperty(r[0])&&!h[this.mode][r[0]]&&(this.settings.strict&&"math"===this.mode&&this.settings.reportNonstrict("unicodeTextInMathMode",'Accented Unicode text character "'+r[0]+'" used in math mode',t),r=xr[r[0]]+r.slice(1));const n=ir.exec(r);let a;if(n&&("i"===(r=r.substring(0,n.index))?r="ı":"j"===r&&(r="ȷ")),h[this.mode][r]){this.settings.strict&&"math"===this.mode&&0<="ÐÞþ".indexOf(r)&&this.settings.reportNonstrict("unicodeTextInMathMode",'Latin-1/Unicode text character "'+r[0]+'" used in math mode',t);const n=h[this.mode][r].group,z=b0.range(t);let e;if(Ce.hasOwnProperty(n)){const t=n;e={type:"atom",mode:this.mode,family:t,loc:z,text:r}}else e={type:n,mode:this.mode,loc:z,text:r};a=e}else{if(!(128<=r.charCodeAt(0)))return null;this.settings.strict&&(ee(r.charCodeAt(0))?"math"===this.mode&&this.settings.reportNonstrict("unicodeTextInMathMode",'Unicode text character "'+r[0]+'" used in math mode',t):this.settings.reportNonstrict("unknownSymbol",'Unrecognized Unicode character "'+r[0]+'" ('+r.charCodeAt(0)+")",t)),a={type:"textord",mode:"text",loc:b0.range(t),text:r}}if(this.consume(),n)for(let e=0;e<n[0].length;e++){var o=n[0][e];if(!yr[o])throw new z("Unknown accent ' "+o+"'",t);var i=yr[o][this.mode]||yr[o].text;if(!i)throw new z("Accent "+o+" unsupported in "+this.mode+" mode",t);a={type:"accent",mode:this.mode,loc:b0.range(t),label:i,isStretchy:!1,isShifty:!0,base:a}}return a}}function vr(e,t){if(!("string"==typeof e||e instanceof String))throw new TypeError("KaTeX can only parse string typed expression");delete(e=new wr(e,t)).gullet.macros.current["\\df@tag"];let r=e.parse();if(delete e.gullet.macros.current["\\current@color"],delete e.gullet.macros.current["\\color"],e.gullet.macros.get("\\df@tag")){if(!t.displayMode)throw new z("\\tag works only in display equations");r=[{type:"tag",mode:"text",body:r,tag:e.subparse([new y0("\\df@tag")])}]}return r}wr.endOfExpression=["}","\\endgroup","\\end","\\right","&"];let kr=function(e,t,r){t.textContent="",e=Mr(e,r).toNode(),t.appendChild(e)};function Sr(e,t,r){if(!r.throwOnError&&e instanceof z)return(t=N.makeSpan(["katex-error"],[new d(t)])).setAttribute("title",e.toString()),t.setAttribute("style","color:"+r.errorColor),t;throw e}function Mr(t,r){var n=new U(r);try{const r=vr(t,n);{var a=r,o=t,i=n,s=kt(i);let e;if("mathml"===i.output)return vt(a,o,s,i.displayMode,!0);if("html"===i.output){const o=gt(a,s);e=N.makeSpan(["katex"],[o])}else o=vt(a,o,s,i.displayMode,!1),a=gt(a,s),e=N.makeSpan(["katex"],[o,a]);return St(e,i)}}catch(r){return Sr(r,t,n)}}"undefined"!=typeof document&&"CSS1Compat"!==document.compatMode&&("undefined"!=typeof console&&console.warn("Warning: KaTeX doesn't work in quirks mode. Make sure your website has a suitable doctype."),kr=function(){throw new z("KaTeX doesn't work in quirks mode.")});var zr={version:"0.16.10",render:kr,renderToString:function(e,t){return Mr(e,t).toMarkup()},ParseError:z,SETTINGS_SCHEMA:G,__parse:function(e,t){return vr(e,t=new U(t))},__renderToDomTree:Mr,__renderToHTMLTree:function(e,t){var r=new U(t);try{var n=vr(e,r),a=r,n=gt(n,kt(a));return St(N.makeSpan(["katex"],[n]),a)}catch(t){return Sr(t,e,r)}},__setFontMetrics:function(e,t){ae[e]=t},__defineSymbol:r,__defineFunction:x,__defineMacro:O,__domTree:{Span:ve,Anchor:ke,SymbolNode:d,SvgNode:ze,PathNode:Ae,LineNode:Te}};return t.default}),function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("katex")):"function"==typeof define&&define.amd?define(["katex"],t):"object"==typeof exports?exports.renderMathInElement=t(require("katex")):e.renderMathInElement=t(e.katex)}("undefined"!=typeof self?self:this,function(p){return function(){"use strict";var r={771:function(e){e.exports=p}},n={};function a(e){var t=n[e];return void 0===t&&(t=n[e]={exports:{}},r[e](t,t.exports,a)),t.exports}a.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(t,{a:t}),t},a.d=function(e,t){for(var r in t)a.o(t,r)&&!a.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)};var e,s,l,h,m,c,o,t,i={};return a.d(i,{default:function(){return t}}),e=a(771),s=a.n(e),l=function(e,t,r){for(var n=r,a=0,o=e.length;n<t.length;){var i=t[n];if(a<=0&&t.slice(n,n+o)===e)return n;"\\"===i?n++:"{"===i?a++:"}"===i&&a--,n++}return-1},h=/^\\begin{/,m=function(t,e){for(var r,n=[],a=RegExp("("+e.map(function(e){return e.left.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")}).join("|")+")");-1!==(r=t.search(a));){0<r&&(n.push({type:"text",data:t.slice(0,r)}),t=t.slice(r));var o=e.findIndex(function(e){return t.startsWith(e.left)});if(-1===(r=l(e[o].right,t,e[o].left.length)))break;var i=t.slice(0,r+e[o].right.length),s=h.test(i)?i:t.slice(e[o].left.length,r);n.push({type:"math",data:s,rawData:i,display:e[o].display}),t=t.slice(r+e[o].right.length)}return""!==t&&n.push({type:"text",data:t}),n},c=function(e,t){var r=m(e,t.delimiters);if(1===r.length&&"text"===r[0].type)return null;for(var n=document.createDocumentFragment(),a=0;a<r.length;a++)if("text"===r[a].type)n.appendChild(document.createTextNode(r[a].data));else{var o=document.createElement("span"),i=r[a].data;t.displayMode=r[a].display;try{t.preProcess&&(i=t.preProcess(i)),s().render(i,o,t)}catch(e){if(!(e instanceof s().ParseError))throw e;t.errorCallback("KaTeX auto-render: Failed to parse `"+r[a].data+"` with ",e),n.appendChild(document.createTextNode(r[a].rawData));continue}n.appendChild(o)}return n},o=function e(t,r){for(var n=0;n<t.childNodes.length;n++){var a=t.childNodes[n];if(3===a.nodeType){for(var o=a.textContent,i=a.nextSibling,s=0;i&&i.nodeType===Node.TEXT_NODE;)o+=i.textContent,i=i.nextSibling,s++;var l=c(o,r);if(l){for(var h=0;h<s;h++)a.nextSibling.remove();n+=l.childNodes.length-1,t.replaceChild(l,a)}else n+=s}else 1===a.nodeType&&function(){var t=" "+a.className+" ";-1===r.ignoredTags.indexOf(a.nodeName.toLowerCase())&&r.ignoredClasses.every(function(e){return-1===t.indexOf(" "+e+" ")})&&e(a,r)}()}},t=function(e,t){if(!e)throw Error("No element provided to render");var r,n={};for(r in t)t.hasOwnProperty(r)&&(n[r]=t[r]);n.delimiters=n.delimiters||[{left:"$$",right:"$$",display:!0},{left:"$",right:"$",display:!1},{left:"\\(",right:"\\)",display:!1},{left:"\\begin{equation}",right:"\\end{equation}",display:!0},{left:"\\begin{align}",right:"\\end{align}",display:!0},{left:"\\begin{alignat}",right:"\\end{alignat}",display:!0},{left:"\\begin{gather}",right:"\\end{gather}",display:!0},{left:"\\begin{CD}",right:"\\end{CD}",display:!0},{left:"\\[",right:"\\]",display:!0}],n.ignoredTags=n.ignoredTags||["script","noscript","style","textarea","pre","code","option"],n.ignoredClasses=n.ignoredClasses||[],n.errorCallback=n.errorCallback||console.error,n.macros=n.macros||{},o(e,n)},i.default}()}),document.addEventListener("DOMContentLoaded",function(){renderMathInElement(document.body)}); +((e,t)=>{"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.katex=t():e.katex=t()})("undefined"!=typeof self?self:this,function(){{var Jt={d:function(e,t){for(var r in t)Jt.o(t,r)&&!Jt.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},o:function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}},Qt={};Jt.d(Qt,{default:function(){return gr}});class fr{constructor(e,t){this.name=void 0,this.position=void 0,this.length=void 0,this.rawMessage=void 0;let r,n,a="KaTeX parse error: "+e;var i,o,s=t&&t.loc;return s&&s.start<=s.end&&(o=s.lexer.input,r=s.start,n=s.end,r===o.length?a+=" at end of input: ":a+=" at position "+(r+1)+": ",i=o.slice(r,n).replace(/[^]/g,"$&̲"),s=15<r?"…"+o.slice(r-15,r):o.slice(0,r),o=n+15<o.length?o.slice(n,n+15)+"…":o.slice(n),a+=s+i+o),(t=new Error(a)).name="ParseError",t.__proto__=fr.prototype,null!=(t.position=r)&&null!=n&&(t.length=n-r),t.rawMessage=e,t}}fr.prototype.__proto__=Error.prototype;var ft=fr;function e0(e){return"ordgroup"===e.type||"color"===e.type?1===e.body.length?e0(e.body[0]):e:"font"===e.type?e0(e.body):e}let H=/([A-Z])/g,O={"&":"&",">":">","<":"<",'"':""","'":"'"},E=/[&><"']/g;var bt={contains:function(e,t){return-1!==e.indexOf(t)},deflt:function(e,t){return void 0===e?t:e},escape:function(e){return String(e).replace(E,e=>O[e])},hyphenate:function(e){return e.replace(H,"-$1").toLowerCase()},getBaseElem:e0,isCharacterBox:function(e){return"mathord"===(e=e0(e)).type||"textord"===e.type||"atom"===e.type},protocolFromUrl:function(e){return(e=/^[\x00-\x20]*([^\\/#?]*?)(:|�*58|�*3a|&colon)/i.exec(e))?":"===e[2]&&/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(e[1])?e[1].toLowerCase():null:"_relative"}};let n={displayMode:{type:"boolean",description:"Render math in display mode, which puts the math in display style (so \\int and \\sum are large, for example), and centers the math on the page on its own line.",cli:"-d, --display-mode"},output:{type:{enum:["htmlAndMathml","html","mathml"]},description:"Determines the markup language of the output.",cli:"-F, --format <type>"},leqno:{type:"boolean",description:"Render display math in leqno style (left-justified tags)."},fleqn:{type:"boolean",description:"Render display math flush left."},throwOnError:{type:"boolean",default:!0,cli:"-t, --no-throw-on-error",cliDescription:"Render errors (in the color given by --error-color) instead of throwing a ParseError exception when encountering an error."},errorColor:{type:"string",default:"#cc0000",cli:"-c, --error-color <color>",cliDescription:"A color string given in the format 'rgb' or 'rrggbb' (no #). This option determines the color of errors rendered by the -t option.",cliProcessor:e=>"#"+e},macros:{type:"object",cli:"-m, --macro <def>",cliDescription:"Define custom macro of the form '\\foo:expansion' (use multiple -m arguments for multiple macros).",cliDefault:[],cliProcessor:(e,t)=>(t.push(e),t)},minRuleThickness:{type:"number",description:"Specifies a minimum thickness, in ems, for fraction lines, `\\sqrt` top lines, `{array}` vertical lines, `\\hline`, `\\hdashline`, `\\underline`, `\\overline`, and the borders of `\\fbox`, `\\boxed`, and `\\fcolorbox`.",processor:e=>Math.max(0,e),cli:"--min-rule-thickness <size>",cliProcessor:parseFloat},colorIsTextColor:{type:"boolean",description:"Makes \\color behave like LaTeX's 2-argument \\textcolor, instead of LaTeX's one-argument \\color mode change.",cli:"-b, --color-is-text-color"},strict:{type:[{enum:["warn","ignore","error"]},"boolean","function"],description:"Turn on strict / LaTeX faithfulness mode, which throws an error if the input uses features that are not supported by LaTeX.",cli:"-S, --strict",cliDefault:!1},trust:{type:["boolean","function"],description:"Trust the input, enabling all HTML features such as \\url.",cli:"-T, --trust"},maxSize:{type:"number",default:1/0,description:"If non-zero, all user-specified sizes, e.g. in \\rule{500em}{500em}, will be capped to maxSize ems. Otherwise, elements and spaces can be arbitrarily large",processor:e=>Math.max(0,e),cli:"-s, --max-size <n>",cliProcessor:parseInt},maxExpand:{type:"number",default:1e3,description:"Limit the number of macro expansions to the specified number, to prevent e.g. infinite macro loops. If set to Infinity, the macro expander will try to fully expand as in LaTeX.",processor:e=>Math.max(0,e),cli:"-e, --max-expand <n>",cliProcessor:e=>"Infinity"===e?1/0:parseInt(e)},globalGroup:{type:"boolean",cli:!1}};class br{constructor(e){for(var t in this.displayMode=void 0,this.output=void 0,this.leqno=void 0,this.fleqn=void 0,this.throwOnError=void 0,this.errorColor=void 0,this.macros=void 0,this.minRuleThickness=void 0,this.colorIsTextColor=void 0,this.strict=void 0,this.trust=void 0,this.maxSize=void 0,this.maxExpand=void 0,this.globalGroup=void 0,e=e||{},n){var r;n.hasOwnProperty(t)&&(r=n[t],this[t]=void 0!==e[t]?r.processor?r.processor(e[t]):e[t]:(e=>{if(e.default)return e.default;if(e=e.type,"string"!=typeof(e=Array.isArray(e)?e[0]:e))return e.enum[0];switch(e){case"boolean":return!1;case"string":return"";case"number":return 0;case"object":return{}}})(r))}}reportNonstrict(e,t,r){let n=this.strict;if((n="function"==typeof n?n(e,t,r):n)&&"ignore"!==n){if(!0===n||"error"===n)throw new ft("LaTeX-incompatible input and strict mode is set to 'error': "+t+" ["+e+"]",r);"warn"===n?"undefined"!=typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+t+" ["+e+"]"):"undefined"!=typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to unrecognized '"+n+"': "+t+" ["+e+"]")}}useStrictBehavior(e,t,r){let n=this.strict;if("function"==typeof n)try{n=n(e,t,r)}catch(e){n="error"}return!(!n||"ignore"===n||!0!==n&&"error"!==n&&("warn"===n?"undefined"!=typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+t+" ["+e+"]"):"undefined"!=typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to unrecognized '"+n+"': "+t+" ["+e+"]"),1))}isTrusted(e){if(e.url&&!e.protocol){var t=bt.protocolFromUrl(e.url);if(null==t)return!1;e.protocol=t}return t="function"==typeof this.trust?this.trust(e):this.trust,Boolean(t)}}class yr{constructor(e,t,r){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=e,this.size=t,this.cramped=r}sup(){return e[L[this.id]]}sub(){return e[V[this.id]]}fracNum(){return e[F[this.id]]}fracDen(){return e[G[this.id]]}cramp(){return e[U[this.id]]}text(){return e[Y[this.id]]}isTight(){return 2<=this.size}}let e=[new yr(0,0,!1),new yr(1,0,!0),new yr(2,1,!1),new yr(3,1,!0),new yr(4,2,!1),new yr(5,2,!0),new yr(6,3,!1),new yr(7,3,!0)],L=[4,5,4,5,6,7,6,7],V=[5,5,5,5,7,7,7,7],F=[2,3,4,5,6,7,6,7],G=[3,3,5,5,7,7,7,7],U=[1,1,3,3,5,5,7,7],Y=[0,1,2,3,2,3,2,3];var yt={DISPLAY:e[0],TEXT:e[2],SCRIPT:e[4],SCRIPTSCRIPT:e[6]};let l=[{name:"latin",blocks:[[256,591],[768,879]]},{name:"cyrillic",blocks:[[1024,1279]]},{name:"armenian",blocks:[[1328,1423]]},{name:"brahmic",blocks:[[2304,4255]]},{name:"georgian",blocks:[[4256,4351]]},{name:"cjk",blocks:[[12288,12543],[19968,40879],[65280,65376]]},{name:"hangul",blocks:[[44032,55215]]}],r=[];function t0(t){for(let e=0;e<r.length;e+=2)if(t>=r[e]&&t<=r[e+1])return 1}l.forEach(e=>e.blocks.forEach(e=>r.push(...e)));let X={doubleleftarrow:"M262 157\nl10-10c34-36 62.7-77 86-123 3.3-8 5-13.3 5-16 0-5.3-6.7-8-20-8-7.3\n 0-12.2.5-14.5 1.5-2.3 1-4.8 4.5-7.5 10.5-49.3 97.3-121.7 169.3-217 216-28\n 14-57.3 25-88 33-6.7 2-11 3.8-13 5.5-2 1.7-3 4.2-3 7.5s1 5.8 3 7.5\nc2 1.7 6.3 3.5 13 5.5 68 17.3 128.2 47.8 180.5 91.5 52.3 43.7 93.8 96.2 124.5\n 157.5 9.3 8 15.3 12.3 18 13h6c12-.7 18-4 18-10 0-2-1.7-7-5-15-23.3-46-52-87\n-86-123l-10-10h399738v-40H218c328 0 0 0 0 0l-10-8c-26.7-20-65.7-43-117-69 2.7\n-2 6-3.7 10-5 36.7-16 72.3-37.3 107-64l10-8h399782v-40z\nm8 0v40h399730v-40zm0 194v40h399730v-40z",doublerightarrow:"M399738 392l\n-10 10c-34 36-62.7 77-86 123-3.3 8-5 13.3-5 16 0 5.3 6.7 8 20 8 7.3 0 12.2-.5\n 14.5-1.5 2.3-1 4.8-4.5 7.5-10.5 49.3-97.3 121.7-169.3 217-216 28-14 57.3-25 88\n-33 6.7-2 11-3.8 13-5.5 2-1.7 3-4.2 3-7.5s-1-5.8-3-7.5c-2-1.7-6.3-3.5-13-5.5-68\n-17.3-128.2-47.8-180.5-91.5-52.3-43.7-93.8-96.2-124.5-157.5-9.3-8-15.3-12.3-18\n-13h-6c-12 .7-18 4-18 10 0 2 1.7 7 5 15 23.3 46 52 87 86 123l10 10H0v40h399782\nc-328 0 0 0 0 0l10 8c26.7 20 65.7 43 117 69-2.7 2-6 3.7-10 5-36.7 16-72.3 37.3\n-107 64l-10 8H0v40zM0 157v40h399730v-40zm0 194v40h399730v-40z",leftarrow:"M400000 241H110l3-3c68.7-52.7 113.7-120\n 135-202 4-14.7 6-23 6-25 0-7.3-7-11-21-11-8 0-13.2.8-15.5 2.5-2.3 1.7-4.2 5.8\n-5.5 12.5-1.3 4.7-2.7 10.3-4 17-12 48.7-34.8 92-68.5 130S65.3 228.3 18 247\nc-10 4-16 7.7-18 11 0 8.7 6 14.3 18 17 47.3 18.7 87.8 47 121.5 85S196 441.3 208\n 490c.7 2 1.3 5 2 9s1.2 6.7 1.5 8c.3 1.3 1 3.3 2 6s2.2 4.5 3.5 5.5c1.3 1 3.3\n 1.8 6 2.5s6 1 10 1c14 0 21-3.7 21-11 0-2-2-10.3-6-25-20-79.3-65-146.7-135-202\n l-3-3h399890zM100 241v40h399900v-40z",leftbrace:"M6 548l-6-6v-35l6-11c56-104 135.3-181.3 238-232 57.3-28.7 117\n-45 179-50h399577v120H403c-43.3 7-81 15-113 26-100.7 33-179.7 91-237 174-2.7\n 5-6 9-10 13-.7 1-7.3 1-20 1H6z",leftbraceunder:"M0 6l6-6h17c12.688 0 19.313.3 20 1 4 4 7.313 8.3 10 13\n 35.313 51.3 80.813 93.8 136.5 127.5 55.688 33.7 117.188 55.8 184.5 66.5.688\n 0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7\n-331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z",leftgroup:"M400000 80\nH435C64 80 168.3 229.4 21 260c-5.9 1.2-18 0-18 0-2 0-3-1-3-3v-38C76 61 257 0\n 435 0h399565z",leftgroupunder:"M400000 262\nH435C64 262 168.3 112.6 21 82c-5.9-1.2-18 0-18 0-2 0-3 1-3 3v38c76 158 257 219\n 435 219h399565z",leftharpoon:"M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3\n-3.3 10.2-9.5 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5\n-18.3 3-21-1.3-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7\n-196 228-6.7 4.7-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40z",leftharpoonplus:"M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3-3.3 10.2-9.5\n 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5-18.3 3-21-1.3\n-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7-196 228-6.7 4.7\n-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40zM0 435v40h400000v-40z\nm0 0v40h400000v-40z",leftharpoondown:"M7 241c-4 4-6.333 8.667-7 14 0 5.333.667 9 2 11s5.333\n 5.333 12 10c90.667 54 156 130 196 228 3.333 10.667 6.333 16.333 9 17 2 .667 5\n 1 9 1h5c10.667 0 16.667-2 18-6 2-2.667 1-9.667-3-21-32-87.333-82.667-157.667\n-152-211l-3-3h399907v-40zM93 281 H400000 v-40L7 241z",leftharpoondownplus:"M7 435c-4 4-6.3 8.7-7 14 0 5.3.7 9 2 11s5.3 5.3 12\n 10c90.7 54 156 130 196 228 3.3 10.7 6.3 16.3 9 17 2 .7 5 1 9 1h5c10.7 0 16.7\n-2 18-6 2-2.7 1-9.7-3-21-32-87.3-82.7-157.7-152-211l-3-3h399907v-40H7zm93 0\nv40h399900v-40zM0 241v40h399900v-40zm0 0v40h399900v-40z",lefthook:"M400000 281 H103s-33-11.2-61-33.5S0 197.3 0 164s14.2-61.2 42.5\n-83.5C70.8 58.2 104 47 142 47 c16.7 0 25 6.7 25 20 0 12-8.7 18.7-26 20-40 3.3\n-68.7 15.7-86 37-10 12-15 25.3-15 40 0 22.7 9.8 40.7 29.5 54 19.7 13.3 43.5 21\n 71.5 23h399859zM103 281v-40h399897v40z",leftlinesegment:"M40 281 V428 H0 V94 H40 V241 H400000 v40z\nM40 281 V428 H0 V94 H40 V241 H400000 v40z",leftmapsto:"M40 281 V448H0V74H40V241H400000v40z\nM40 281 V448H0V74H40V241H400000v40z",leftToFrom:"M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23\n-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69-70-101l-7-8h399905v-40H95l7-8\nc28.7-32 52-65.7 70-101 10.7-23.3 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 265.3\n 68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z",longequal:"M0 50 h400000 v40H0z m0 194h40000v40H0z\nM0 50 h400000 v40H0z m0 194h40000v40H0z",midbrace:"M200428 334\nc-100.7-8.3-195.3-44-280-108-55.3-42-101.7-93-139-153l-9-14c-2.7 4-5.7 8.7-9 14\n-53.3 86.7-123.7 153-211 199-66.7 36-137.3 56.3-212 62H0V214h199568c178.3-11.7\n 311.7-78.3 403-201 6-8 9.7-12 11-12 .7-.7 6.7-1 18-1s17.3.3 18 1c1.3 0 5 4 11\n 12 44.7 59.3 101.3 106.3 170 141s145.3 54.3 229 60h199572v120z",midbraceunder:"M199572 214\nc100.7 8.3 195.3 44 280 108 55.3 42 101.7 93 139 153l9 14c2.7-4 5.7-8.7 9-14\n 53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3\n 11.7-311.7 78.3-403 201-6 8-9.7 12-11 12-.7.7-6.7 1-18 1s-17.3-.3-18-1c-1.3 0\n-5-4-11-12-44.7-59.3-101.3-106.3-170-141s-145.3-54.3-229-60H0V214z",oiintSize1:"M512.6 71.6c272.6 0 320.3 106.8 320.3 178.2 0 70.8-47.7 177.6\n-320.3 177.6S193.1 320.6 193.1 249.8c0-71.4 46.9-178.2 319.5-178.2z\nm368.1 178.2c0-86.4-60.9-215.4-368.1-215.4-306.4 0-367.3 129-367.3 215.4 0 85.8\n60.9 214.8 367.3 214.8 307.2 0 368.1-129 368.1-214.8z",oiintSize2:"M757.8 100.1c384.7 0 451.1 137.6 451.1 230 0 91.3-66.4 228.8\n-451.1 228.8-386.3 0-452.7-137.5-452.7-228.8 0-92.4 66.4-230 452.7-230z\nm502.4 230c0-111.2-82.4-277.2-502.4-277.2s-504 166-504 277.2\nc0 110 84 276 504 276s502.4-166 502.4-276z",oiiintSize1:"M681.4 71.6c408.9 0 480.5 106.8 480.5 178.2 0 70.8-71.6 177.6\n-480.5 177.6S202.1 320.6 202.1 249.8c0-71.4 70.5-178.2 479.3-178.2z\nm525.8 178.2c0-86.4-86.8-215.4-525.7-215.4-437.9 0-524.7 129-524.7 215.4 0\n85.8 86.8 214.8 524.7 214.8 438.9 0 525.7-129 525.7-214.8z",oiiintSize2:"M1021.2 53c603.6 0 707.8 165.8 707.8 277.2 0 110-104.2 275.8\n-707.8 275.8-606 0-710.2-165.8-710.2-275.8C311 218.8 415.2 53 1021.2 53z\nm770.4 277.1c0-131.2-126.4-327.6-770.5-327.6S248.4 198.9 248.4 330.1\nc0 130 128.8 326.4 772.7 326.4s770.5-196.4 770.5-326.4z",rightarrow:"M0 241v40h399891c-47.3 35.3-84 78-110 128\n-16.7 32-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20\n 11 8 0 13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7\n 39-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85\n-40.5-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5\n-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67\n 151.7 139 205zm0 0v40h399900v-40z",rightbrace:"M400000 542l\n-6 6h-17c-12.7 0-19.3-.3-20-1-4-4-7.3-8.3-10-13-35.3-51.3-80.8-93.8-136.5-127.5\ns-117.2-55.8-184.5-66.5c-.7 0-2-.3-4-1-18.7-2.7-76-4.3-172-5H0V214h399571l6 1\nc124.7 8 235 61.7 331 161 31.3 33.3 59.7 72.7 85 118l7 13v35z",rightbraceunder:"M399994 0l6 6v35l-6 11c-56 104-135.3 181.3-238 232-57.3\n 28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237\n-174 2.7-5 6-9 10-13 .7-1 7.3-1 20-1h17z",rightgroup:"M0 80h399565c371 0 266.7 149.4 414 180 5.9 1.2 18 0 18 0 2 0\n 3-1 3-3v-38c-76-158-257-219-435-219H0z",rightgroupunder:"M0 262h399565c371 0 266.7-149.4 414-180 5.9-1.2 18 0 18\n 0 2 0 3 1 3 3v38c-76 158-257 219-435 219H0z",rightharpoon:"M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3\n-3.7-15.3-11-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2\n-10.7 0-16.7 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58\n 69.2 92 94.5zm0 0v40h399900v-40z",rightharpoonplus:"M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3-3.7-15.3-11\n-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2-10.7 0-16.7\n 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 69.2 92 94.5z\nm0 0v40h399900v-40z m100 194v40h399900v-40zm0 0v40h399900v-40z",rightharpoondown:"M399747 511c0 7.3 6.7 11 20 11 8 0 13-.8 15-2.5s4.7-6.8\n 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 8.5-5.8 9.5\n-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3-64.7 57-92 95\n-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 241v40h399900v-40z",rightharpoondownplus:"M399747 705c0 7.3 6.7 11 20 11 8 0 13-.8\n 15-2.5s4.7-6.8 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3\n 8.5-5.8 9.5-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3\n-64.7 57-92 95-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 435v40h399900v-40z\nm0-194v40h400000v-40zm0 0v40h400000v-40z",righthook:"M399859 241c-764 0 0 0 0 0 40-3.3 68.7-15.7 86-37 10-12 15-25.3\n 15-40 0-22.7-9.8-40.7-29.5-54-19.7-13.3-43.5-21-71.5-23-17.3-1.3-26-8-26-20 0\n-13.3 8.7-20 26-20 38 0 71 11.2 99 33.5 0 0 7 5.6 21 16.7 14 11.2 21 33.5 21\n 66.8s-14 61.2-42 83.5c-28 22.3-61 33.5-99 33.5L0 241z M0 281v-40h399859v40z",rightlinesegment:"M399960 241 V94 h40 V428 h-40 V281 H0 v-40z\nM399960 241 V94 h40 V428 h-40 V281 H0 v-40z",rightToFrom:"M400000 167c-70.7-42-118-97.7-142-167h-23c-15.3 0-23 .3-23\n 1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8H0v40h399905l-7 8c-28.7 32\n-52 65.7-70 101-10.7 23.3-16 35.7-16 37 0 .7 7.7 1 23 1h23c24-69.3 71.3-125 142\n-167z M100 147v40h399900v-40zM0 341v40h399900v-40z",twoheadleftarrow:"M0 167c68 40\n 115.7 95.7 143 167h22c15.3 0 23-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69\n-70-101l-7-8h125l9 7c50.7 39.3 85 86 103 140h46c0-4.7-6.3-18.7-19-42-18-35.3\n-40-67.3-66-96l-9-9h399716v-40H284l9-9c26-28.7 48-60.7 66-96 12.7-23.333 19\n-37.333 19-42h-46c-18 54-52.3 100.7-103 140l-9 7H95l7-8c28.7-32 52-65.7 70-101\n 10.7-23.333 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 71.3 68 127 0 167z",twoheadrightarrow:"M400000 167\nc-68-40-115.7-95.7-143-167h-22c-15.3 0-23 .3-23 1 0 1.3 5.3 13.7 16 37 18 35.3\n 41.3 69 70 101l7 8h-125l-9-7c-50.7-39.3-85-86-103-140h-46c0 4.7 6.3 18.7 19 42\n 18 35.3 40 67.3 66 96l9 9H0v40h399716l-9 9c-26 28.7-48 60.7-66 96-12.7 23.333\n-19 37.333-19 42h46c18-54 52.3-100.7 103-140l9-7h125l-7 8c-28.7 32-52 65.7-70\n 101-10.7 23.333-16 35.7-16 37 0 .7 7.7 1 23 1h22c27.3-71.3 75-127 143-167z",tilde1:"M200 55.538c-77 0-168 73.953-177 73.953-3 0-7\n-2.175-9-5.437L2 97c-1-2-2-4-2-6 0-4 2-7 5-9l20-12C116 12 171 0 207 0c86 0\n 114 68 191 68 78 0 168-68 177-68 4 0 7 2 9 5l12 19c1 2.175 2 4.35 2 6.525 0\n 4.35-2 7.613-5 9.788l-19 13.05c-92 63.077-116.937 75.308-183 76.128\n-68.267.847-113-73.952-191-73.952z",tilde2:"M344 55.266c-142 0-300.638 81.316-311.5 86.418\n-8.01 3.762-22.5 10.91-23.5 5.562L1 120c-1-2-1-3-1-4 0-5 3-9 8-10l18.4-9C160.9\n 31.9 283 0 358 0c148 0 188 122 331 122s314-97 326-97c4 0 8 2 10 7l7 21.114\nc1 2.14 1 3.21 1 4.28 0 5.347-3 9.626-7 10.696l-22.3 12.622C852.6 158.372 751\n 181.476 676 181.476c-149 0-189-126.21-332-126.21z",tilde3:"M786 59C457 59 32 175.242 13 175.242c-6 0-10-3.457\n-11-10.37L.15 138c-1-7 3-12 10-13l19.2-6.4C378.4 40.7 634.3 0 804.3 0c337 0\n 411.8 157 746.8 157 328 0 754-112 773-112 5 0 10 3 11 9l1 14.075c1 8.066-.697\n 16.595-6.697 17.492l-21.052 7.31c-367.9 98.146-609.15 122.696-778.15 122.696\n -338 0-409-156.573-744-156.573z",tilde4:"M786 58C457 58 32 177.487 13 177.487c-6 0-10-3.345\n-11-10.035L.15 143c-1-7 3-12 10-13l22-6.7C381.2 35 637.15 0 807.15 0c337 0 409\n 177 744 177 328 0 754-127 773-127 5 0 10 3 11 9l1 14.794c1 7.805-3 13.38-9\n 14.495l-20.7 5.574c-366.85 99.79-607.3 139.372-776.3 139.372-338 0-409\n -175.236-744-175.236z",vec:"M377 20c0-5.333 1.833-10 5.5-14S391 0 397 0c4.667 0 8.667 1.667 12 5\n3.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11\n10.667 11 18 0 6-1 10-3 12s-6.667 5-14 9c-28.667 14.667-53.667 35.667-75 63\n-1.333 1.333-3.167 3.5-5.5 6.5s-4 4.833-5 5.5c-1 .667-2.5 1.333-4.5 2s-4.333 1\n-7 1c-4.667 0-9.167-1.833-13.5-5.5S337 184 337 178c0-12.667 15.667-32.333 47-59\nH213l-171-1c-8.667-6-13-12.333-13-19 0-4.667 4.333-11.333 13-20h359\nc-16-25.333-24-45-24-59z",widehat1:"M529 0h5l519 115c5 1 9 5 9 10 0 1-1 2-1 3l-4 22\nc-1 5-5 9-11 9h-2L532 67 19 159h-2c-5 0-9-4-11-9l-5-22c-1-6 2-12 8-13z",widehat2:"M1181 0h2l1171 176c6 0 10 5 10 11l-2 23c-1 6-5 10\n-11 10h-1L1182 67 15 220h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z",widehat3:"M1181 0h2l1171 236c6 0 10 5 10 11l-2 23c-1 6-5 10\n-11 10h-1L1182 67 15 280h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z",widehat4:"M1181 0h2l1171 296c6 0 10 5 10 11l-2 23c-1 6-5 10\n-11 10h-1L1182 67 15 340h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z",widecheck1:"M529,159h5l519,-115c5,-1,9,-5,9,-10c0,-1,-1,-2,-1,-3l-4,-22c-1,\n-5,-5,-9,-11,-9h-2l-512,92l-513,-92h-2c-5,0,-9,4,-11,9l-5,22c-1,6,2,12,8,13z",widecheck2:"M1181,220h2l1171,-176c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,\n-11,-10h-1l-1168,153l-1167,-153h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z",widecheck3:"M1181,280h2l1171,-236c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,\n-11,-10h-1l-1168,213l-1167,-213h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z",widecheck4:"M1181,340h2l1171,-296c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,\n-11,-10h-1l-1168,273l-1167,-273h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z",baraboveleftarrow:"M400000 620h-399890l3 -3c68.7 -52.7 113.7 -120 135 -202\nc4 -14.7 6 -23 6 -25c0 -7.3 -7 -11 -21 -11c-8 0 -13.2 0.8 -15.5 2.5\nc-2.3 1.7 -4.2 5.8 -5.5 12.5c-1.3 4.7 -2.7 10.3 -4 17c-12 48.7 -34.8 92 -68.5 130\ns-74.2 66.3 -121.5 85c-10 4 -16 7.7 -18 11c0 8.7 6 14.3 18 17c47.3 18.7 87.8 47\n121.5 85s56.5 81.3 68.5 130c0.7 2 1.3 5 2 9s1.2 6.7 1.5 8c0.3 1.3 1 3.3 2 6\ns2.2 4.5 3.5 5.5c1.3 1 3.3 1.8 6 2.5s6 1 10 1c14 0 21 -3.7 21 -11\nc0 -2 -2 -10.3 -6 -25c-20 -79.3 -65 -146.7 -135 -202l-3 -3h399890z\nM100 620v40h399900v-40z M0 241v40h399900v-40zM0 241v40h399900v-40z",rightarrowabovebar:"M0 241v40h399891c-47.3 35.3-84 78-110 128-16.7 32\n-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 11 8 0\n13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 39\n-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85-40.5\n-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5\n-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67\n151.7 139 205zm96 379h399894v40H0zm0 0h399904v40H0z",baraboveshortleftharpoon:"M507,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11\nc1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17\nc2,0.7,5,1,9,1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21\nc-32,-87.3,-82.7,-157.7,-152,-211c0,0,-3,-3,-3,-3l399351,0l0,-40\nc-398570,0,-399437,0,-399437,0z M593 435 v40 H399500 v-40z\nM0 281 v-40 H399908 v40z M0 281 v-40 H399908 v40z",rightharpoonaboveshortbar:"M0,241 l0,40c399126,0,399993,0,399993,0\nc4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,\n-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6\nc-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z\nM0 241 v40 H399908 v-40z M0 475 v-40 H399500 v40z M0 475 v-40 H399500 v40z",shortbaraboveleftharpoon:"M7,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11\nc1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17c2,0.7,5,1,9,\n1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21c-32,-87.3,-82.7,-157.7,\n-152,-211c0,0,-3,-3,-3,-3l399907,0l0,-40c-399126,0,-399993,0,-399993,0z\nM93 435 v40 H400000 v-40z M500 241 v40 H400000 v-40z M500 241 v40 H400000 v-40z",shortrightharpoonabovebar:"M53,241l0,40c398570,0,399437,0,399437,0\nc4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,\n-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6\nc-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z\nM500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z"};class xr{constructor(e){this.children=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.children=e,this.classes=[],this.height=0,this.depth=0,this.maxFontSize=0,this.style={}}hasClass(e){return bt.contains(this.classes,e)}toNode(){var t=document.createDocumentFragment();for(let e=0;e<this.children.length;e++)t.appendChild(this.children[e].toNode());return t}toMarkup(){let t="";for(let e=0;e<this.children.length;e++)t+=this.children[e].toMarkup();return t}toText(){return this.children.map(e=>e.toText()).join("")}}var xt={"AMS-Regular":{32:[0,0,0,0,.25],65:[0,.68889,0,0,.72222],66:[0,.68889,0,0,.66667],67:[0,.68889,0,0,.72222],68:[0,.68889,0,0,.72222],69:[0,.68889,0,0,.66667],70:[0,.68889,0,0,.61111],71:[0,.68889,0,0,.77778],72:[0,.68889,0,0,.77778],73:[0,.68889,0,0,.38889],74:[.16667,.68889,0,0,.5],75:[0,.68889,0,0,.77778],76:[0,.68889,0,0,.66667],77:[0,.68889,0,0,.94445],78:[0,.68889,0,0,.72222],79:[.16667,.68889,0,0,.77778],80:[0,.68889,0,0,.61111],81:[.16667,.68889,0,0,.77778],82:[0,.68889,0,0,.72222],83:[0,.68889,0,0,.55556],84:[0,.68889,0,0,.66667],85:[0,.68889,0,0,.72222],86:[0,.68889,0,0,.72222],87:[0,.68889,0,0,1],88:[0,.68889,0,0,.72222],89:[0,.68889,0,0,.72222],90:[0,.68889,0,0,.66667],107:[0,.68889,0,0,.55556],160:[0,0,0,0,.25],165:[0,.675,.025,0,.75],174:[.15559,.69224,0,0,.94666],240:[0,.68889,0,0,.55556],295:[0,.68889,0,0,.54028],710:[0,.825,0,0,2.33334],732:[0,.9,0,0,2.33334],770:[0,.825,0,0,2.33334],771:[0,.9,0,0,2.33334],989:[.08167,.58167,0,0,.77778],1008:[0,.43056,.04028,0,.66667],8245:[0,.54986,0,0,.275],8463:[0,.68889,0,0,.54028],8487:[0,.68889,0,0,.72222],8498:[0,.68889,0,0,.55556],8502:[0,.68889,0,0,.66667],8503:[0,.68889,0,0,.44445],8504:[0,.68889,0,0,.66667],8513:[0,.68889,0,0,.63889],8592:[-.03598,.46402,0,0,.5],8594:[-.03598,.46402,0,0,.5],8602:[-.13313,.36687,0,0,1],8603:[-.13313,.36687,0,0,1],8606:[.01354,.52239,0,0,1],8608:[.01354,.52239,0,0,1],8610:[.01354,.52239,0,0,1.11111],8611:[.01354,.52239,0,0,1.11111],8619:[0,.54986,0,0,1],8620:[0,.54986,0,0,1],8621:[-.13313,.37788,0,0,1.38889],8622:[-.13313,.36687,0,0,1],8624:[0,.69224,0,0,.5],8625:[0,.69224,0,0,.5],8630:[0,.43056,0,0,1],8631:[0,.43056,0,0,1],8634:[.08198,.58198,0,0,.77778],8635:[.08198,.58198,0,0,.77778],8638:[.19444,.69224,0,0,.41667],8639:[.19444,.69224,0,0,.41667],8642:[.19444,.69224,0,0,.41667],8643:[.19444,.69224,0,0,.41667],8644:[.1808,.675,0,0,1],8646:[.1808,.675,0,0,1],8647:[.1808,.675,0,0,1],8648:[.19444,.69224,0,0,.83334],8649:[.1808,.675,0,0,1],8650:[.19444,.69224,0,0,.83334],8651:[.01354,.52239,0,0,1],8652:[.01354,.52239,0,0,1],8653:[-.13313,.36687,0,0,1],8654:[-.13313,.36687,0,0,1],8655:[-.13313,.36687,0,0,1],8666:[.13667,.63667,0,0,1],8667:[.13667,.63667,0,0,1],8669:[-.13313,.37788,0,0,1],8672:[-.064,.437,0,0,1.334],8674:[-.064,.437,0,0,1.334],8705:[0,.825,0,0,.5],8708:[0,.68889,0,0,.55556],8709:[.08167,.58167,0,0,.77778],8717:[0,.43056,0,0,.42917],8722:[-.03598,.46402,0,0,.5],8724:[.08198,.69224,0,0,.77778],8726:[.08167,.58167,0,0,.77778],8733:[0,.69224,0,0,.77778],8736:[0,.69224,0,0,.72222],8737:[0,.69224,0,0,.72222],8738:[.03517,.52239,0,0,.72222],8739:[.08167,.58167,0,0,.22222],8740:[.25142,.74111,0,0,.27778],8741:[.08167,.58167,0,0,.38889],8742:[.25142,.74111,0,0,.5],8756:[0,.69224,0,0,.66667],8757:[0,.69224,0,0,.66667],8764:[-.13313,.36687,0,0,.77778],8765:[-.13313,.37788,0,0,.77778],8769:[-.13313,.36687,0,0,.77778],8770:[-.03625,.46375,0,0,.77778],8774:[.30274,.79383,0,0,.77778],8776:[-.01688,.48312,0,0,.77778],8778:[.08167,.58167,0,0,.77778],8782:[.06062,.54986,0,0,.77778],8783:[.06062,.54986,0,0,.77778],8785:[.08198,.58198,0,0,.77778],8786:[.08198,.58198,0,0,.77778],8787:[.08198,.58198,0,0,.77778],8790:[0,.69224,0,0,.77778],8791:[.22958,.72958,0,0,.77778],8796:[.08198,.91667,0,0,.77778],8806:[.25583,.75583,0,0,.77778],8807:[.25583,.75583,0,0,.77778],8808:[.25142,.75726,0,0,.77778],8809:[.25142,.75726,0,0,.77778],8812:[.25583,.75583,0,0,.5],8814:[.20576,.70576,0,0,.77778],8815:[.20576,.70576,0,0,.77778],8816:[.30274,.79383,0,0,.77778],8817:[.30274,.79383,0,0,.77778],8818:[.22958,.72958,0,0,.77778],8819:[.22958,.72958,0,0,.77778],8822:[.1808,.675,0,0,.77778],8823:[.1808,.675,0,0,.77778],8828:[.13667,.63667,0,0,.77778],8829:[.13667,.63667,0,0,.77778],8830:[.22958,.72958,0,0,.77778],8831:[.22958,.72958,0,0,.77778],8832:[.20576,.70576,0,0,.77778],8833:[.20576,.70576,0,0,.77778],8840:[.30274,.79383,0,0,.77778],8841:[.30274,.79383,0,0,.77778],8842:[.13597,.63597,0,0,.77778],8843:[.13597,.63597,0,0,.77778],8847:[.03517,.54986,0,0,.77778],8848:[.03517,.54986,0,0,.77778],8858:[.08198,.58198,0,0,.77778],8859:[.08198,.58198,0,0,.77778],8861:[.08198,.58198,0,0,.77778],8862:[0,.675,0,0,.77778],8863:[0,.675,0,0,.77778],8864:[0,.675,0,0,.77778],8865:[0,.675,0,0,.77778],8872:[0,.69224,0,0,.61111],8873:[0,.69224,0,0,.72222],8874:[0,.69224,0,0,.88889],8876:[0,.68889,0,0,.61111],8877:[0,.68889,0,0,.61111],8878:[0,.68889,0,0,.72222],8879:[0,.68889,0,0,.72222],8882:[.03517,.54986,0,0,.77778],8883:[.03517,.54986,0,0,.77778],8884:[.13667,.63667,0,0,.77778],8885:[.13667,.63667,0,0,.77778],8888:[0,.54986,0,0,1.11111],8890:[.19444,.43056,0,0,.55556],8891:[.19444,.69224,0,0,.61111],8892:[.19444,.69224,0,0,.61111],8901:[0,.54986,0,0,.27778],8903:[.08167,.58167,0,0,.77778],8905:[.08167,.58167,0,0,.77778],8906:[.08167,.58167,0,0,.77778],8907:[0,.69224,0,0,.77778],8908:[0,.69224,0,0,.77778],8909:[-.03598,.46402,0,0,.77778],8910:[0,.54986,0,0,.76042],8911:[0,.54986,0,0,.76042],8912:[.03517,.54986,0,0,.77778],8913:[.03517,.54986,0,0,.77778],8914:[0,.54986,0,0,.66667],8915:[0,.54986,0,0,.66667],8916:[0,.69224,0,0,.66667],8918:[.0391,.5391,0,0,.77778],8919:[.0391,.5391,0,0,.77778],8920:[.03517,.54986,0,0,1.33334],8921:[.03517,.54986,0,0,1.33334],8922:[.38569,.88569,0,0,.77778],8923:[.38569,.88569,0,0,.77778],8926:[.13667,.63667,0,0,.77778],8927:[.13667,.63667,0,0,.77778],8928:[.30274,.79383,0,0,.77778],8929:[.30274,.79383,0,0,.77778],8934:[.23222,.74111,0,0,.77778],8935:[.23222,.74111,0,0,.77778],8936:[.23222,.74111,0,0,.77778],8937:[.23222,.74111,0,0,.77778],8938:[.20576,.70576,0,0,.77778],8939:[.20576,.70576,0,0,.77778],8940:[.30274,.79383,0,0,.77778],8941:[.30274,.79383,0,0,.77778],8994:[.19444,.69224,0,0,.77778],8995:[.19444,.69224,0,0,.77778],9416:[.15559,.69224,0,0,.90222],9484:[0,.69224,0,0,.5],9488:[0,.69224,0,0,.5],9492:[0,.37788,0,0,.5],9496:[0,.37788,0,0,.5],9585:[.19444,.68889,0,0,.88889],9586:[.19444,.74111,0,0,.88889],9632:[0,.675,0,0,.77778],9633:[0,.675,0,0,.77778],9650:[0,.54986,0,0,.72222],9651:[0,.54986,0,0,.72222],9654:[.03517,.54986,0,0,.77778],9660:[0,.54986,0,0,.72222],9661:[0,.54986,0,0,.72222],9664:[.03517,.54986,0,0,.77778],9674:[.11111,.69224,0,0,.66667],9733:[.19444,.69224,0,0,.94445],10003:[0,.69224,0,0,.83334],10016:[0,.69224,0,0,.83334],10731:[.11111,.69224,0,0,.66667],10846:[.19444,.75583,0,0,.61111],10877:[.13667,.63667,0,0,.77778],10878:[.13667,.63667,0,0,.77778],10885:[.25583,.75583,0,0,.77778],10886:[.25583,.75583,0,0,.77778],10887:[.13597,.63597,0,0,.77778],10888:[.13597,.63597,0,0,.77778],10889:[.26167,.75726,0,0,.77778],10890:[.26167,.75726,0,0,.77778],10891:[.48256,.98256,0,0,.77778],10892:[.48256,.98256,0,0,.77778],10901:[.13667,.63667,0,0,.77778],10902:[.13667,.63667,0,0,.77778],10933:[.25142,.75726,0,0,.77778],10934:[.25142,.75726,0,0,.77778],10935:[.26167,.75726,0,0,.77778],10936:[.26167,.75726,0,0,.77778],10937:[.26167,.75726,0,0,.77778],10938:[.26167,.75726,0,0,.77778],10949:[.25583,.75583,0,0,.77778],10950:[.25583,.75583,0,0,.77778],10955:[.28481,.79383,0,0,.77778],10956:[.28481,.79383,0,0,.77778],57350:[.08167,.58167,0,0,.22222],57351:[.08167,.58167,0,0,.38889],57352:[.08167,.58167,0,0,.77778],57353:[0,.43056,.04028,0,.66667],57356:[.25142,.75726,0,0,.77778],57357:[.25142,.75726,0,0,.77778],57358:[.41951,.91951,0,0,.77778],57359:[.30274,.79383,0,0,.77778],57360:[.30274,.79383,0,0,.77778],57361:[.41951,.91951,0,0,.77778],57366:[.25142,.75726,0,0,.77778],57367:[.25142,.75726,0,0,.77778],57368:[.25142,.75726,0,0,.77778],57369:[.25142,.75726,0,0,.77778],57370:[.13597,.63597,0,0,.77778],57371:[.13597,.63597,0,0,.77778]},"Caligraphic-Regular":{32:[0,0,0,0,.25],65:[0,.68333,0,.19445,.79847],66:[0,.68333,.03041,.13889,.65681],67:[0,.68333,.05834,.13889,.52653],68:[0,.68333,.02778,.08334,.77139],69:[0,.68333,.08944,.11111,.52778],70:[0,.68333,.09931,.11111,.71875],71:[.09722,.68333,.0593,.11111,.59487],72:[0,.68333,.00965,.11111,.84452],73:[0,.68333,.07382,0,.54452],74:[.09722,.68333,.18472,.16667,.67778],75:[0,.68333,.01445,.05556,.76195],76:[0,.68333,0,.13889,.68972],77:[0,.68333,0,.13889,1.2009],78:[0,.68333,.14736,.08334,.82049],79:[0,.68333,.02778,.11111,.79611],80:[0,.68333,.08222,.08334,.69556],81:[.09722,.68333,0,.11111,.81667],82:[0,.68333,0,.08334,.8475],83:[0,.68333,.075,.13889,.60556],84:[0,.68333,.25417,0,.54464],85:[0,.68333,.09931,.08334,.62583],86:[0,.68333,.08222,0,.61278],87:[0,.68333,.08222,.08334,.98778],88:[0,.68333,.14643,.13889,.7133],89:[.09722,.68333,.08222,.08334,.66834],90:[0,.68333,.07944,.13889,.72473],160:[0,0,0,0,.25]},"Fraktur-Regular":{32:[0,0,0,0,.25],33:[0,.69141,0,0,.29574],34:[0,.69141,0,0,.21471],38:[0,.69141,0,0,.73786],39:[0,.69141,0,0,.21201],40:[.24982,.74947,0,0,.38865],41:[.24982,.74947,0,0,.38865],42:[0,.62119,0,0,.27764],43:[.08319,.58283,0,0,.75623],44:[0,.10803,0,0,.27764],45:[.08319,.58283,0,0,.75623],46:[0,.10803,0,0,.27764],47:[.24982,.74947,0,0,.50181],48:[0,.47534,0,0,.50181],49:[0,.47534,0,0,.50181],50:[0,.47534,0,0,.50181],51:[.18906,.47534,0,0,.50181],52:[.18906,.47534,0,0,.50181],53:[.18906,.47534,0,0,.50181],54:[0,.69141,0,0,.50181],55:[.18906,.47534,0,0,.50181],56:[0,.69141,0,0,.50181],57:[.18906,.47534,0,0,.50181],58:[0,.47534,0,0,.21606],59:[.12604,.47534,0,0,.21606],61:[-.13099,.36866,0,0,.75623],63:[0,.69141,0,0,.36245],65:[0,.69141,0,0,.7176],66:[0,.69141,0,0,.88397],67:[0,.69141,0,0,.61254],68:[0,.69141,0,0,.83158],69:[0,.69141,0,0,.66278],70:[.12604,.69141,0,0,.61119],71:[0,.69141,0,0,.78539],72:[.06302,.69141,0,0,.7203],73:[0,.69141,0,0,.55448],74:[.12604,.69141,0,0,.55231],75:[0,.69141,0,0,.66845],76:[0,.69141,0,0,.66602],77:[0,.69141,0,0,1.04953],78:[0,.69141,0,0,.83212],79:[0,.69141,0,0,.82699],80:[.18906,.69141,0,0,.82753],81:[.03781,.69141,0,0,.82699],82:[0,.69141,0,0,.82807],83:[0,.69141,0,0,.82861],84:[0,.69141,0,0,.66899],85:[0,.69141,0,0,.64576],86:[0,.69141,0,0,.83131],87:[0,.69141,0,0,1.04602],88:[0,.69141,0,0,.71922],89:[.18906,.69141,0,0,.83293],90:[.12604,.69141,0,0,.60201],91:[.24982,.74947,0,0,.27764],93:[.24982,.74947,0,0,.27764],94:[0,.69141,0,0,.49965],97:[0,.47534,0,0,.50046],98:[0,.69141,0,0,.51315],99:[0,.47534,0,0,.38946],100:[0,.62119,0,0,.49857],101:[0,.47534,0,0,.40053],102:[.18906,.69141,0,0,.32626],103:[.18906,.47534,0,0,.5037],104:[.18906,.69141,0,0,.52126],105:[0,.69141,0,0,.27899],106:[0,.69141,0,0,.28088],107:[0,.69141,0,0,.38946],108:[0,.69141,0,0,.27953],109:[0,.47534,0,0,.76676],110:[0,.47534,0,0,.52666],111:[0,.47534,0,0,.48885],112:[.18906,.52396,0,0,.50046],113:[.18906,.47534,0,0,.48912],114:[0,.47534,0,0,.38919],115:[0,.47534,0,0,.44266],116:[0,.62119,0,0,.33301],117:[0,.47534,0,0,.5172],118:[0,.52396,0,0,.5118],119:[0,.52396,0,0,.77351],120:[.18906,.47534,0,0,.38865],121:[.18906,.47534,0,0,.49884],122:[.18906,.47534,0,0,.39054],160:[0,0,0,0,.25],8216:[0,.69141,0,0,.21471],8217:[0,.69141,0,0,.21471],58112:[0,.62119,0,0,.49749],58113:[0,.62119,0,0,.4983],58114:[.18906,.69141,0,0,.33328],58115:[.18906,.69141,0,0,.32923],58116:[.18906,.47534,0,0,.50343],58117:[0,.69141,0,0,.33301],58118:[0,.62119,0,0,.33409],58119:[0,.47534,0,0,.50073]},"Main-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.35],34:[0,.69444,0,0,.60278],35:[.19444,.69444,0,0,.95833],36:[.05556,.75,0,0,.575],37:[.05556,.75,0,0,.95833],38:[0,.69444,0,0,.89444],39:[0,.69444,0,0,.31944],40:[.25,.75,0,0,.44722],41:[.25,.75,0,0,.44722],42:[0,.75,0,0,.575],43:[.13333,.63333,0,0,.89444],44:[.19444,.15556,0,0,.31944],45:[0,.44444,0,0,.38333],46:[0,.15556,0,0,.31944],47:[.25,.75,0,0,.575],48:[0,.64444,0,0,.575],49:[0,.64444,0,0,.575],50:[0,.64444,0,0,.575],51:[0,.64444,0,0,.575],52:[0,.64444,0,0,.575],53:[0,.64444,0,0,.575],54:[0,.64444,0,0,.575],55:[0,.64444,0,0,.575],56:[0,.64444,0,0,.575],57:[0,.64444,0,0,.575],58:[0,.44444,0,0,.31944],59:[.19444,.44444,0,0,.31944],60:[.08556,.58556,0,0,.89444],61:[-.10889,.39111,0,0,.89444],62:[.08556,.58556,0,0,.89444],63:[0,.69444,0,0,.54305],64:[0,.69444,0,0,.89444],65:[0,.68611,0,0,.86944],66:[0,.68611,0,0,.81805],67:[0,.68611,0,0,.83055],68:[0,.68611,0,0,.88194],69:[0,.68611,0,0,.75555],70:[0,.68611,0,0,.72361],71:[0,.68611,0,0,.90416],72:[0,.68611,0,0,.9],73:[0,.68611,0,0,.43611],74:[0,.68611,0,0,.59444],75:[0,.68611,0,0,.90138],76:[0,.68611,0,0,.69166],77:[0,.68611,0,0,1.09166],78:[0,.68611,0,0,.9],79:[0,.68611,0,0,.86388],80:[0,.68611,0,0,.78611],81:[.19444,.68611,0,0,.86388],82:[0,.68611,0,0,.8625],83:[0,.68611,0,0,.63889],84:[0,.68611,0,0,.8],85:[0,.68611,0,0,.88472],86:[0,.68611,.01597,0,.86944],87:[0,.68611,.01597,0,1.18888],88:[0,.68611,0,0,.86944],89:[0,.68611,.02875,0,.86944],90:[0,.68611,0,0,.70277],91:[.25,.75,0,0,.31944],92:[.25,.75,0,0,.575],93:[.25,.75,0,0,.31944],94:[0,.69444,0,0,.575],95:[.31,.13444,.03194,0,.575],97:[0,.44444,0,0,.55902],98:[0,.69444,0,0,.63889],99:[0,.44444,0,0,.51111],100:[0,.69444,0,0,.63889],101:[0,.44444,0,0,.52708],102:[0,.69444,.10903,0,.35139],103:[.19444,.44444,.01597,0,.575],104:[0,.69444,0,0,.63889],105:[0,.69444,0,0,.31944],106:[.19444,.69444,0,0,.35139],107:[0,.69444,0,0,.60694],108:[0,.69444,0,0,.31944],109:[0,.44444,0,0,.95833],110:[0,.44444,0,0,.63889],111:[0,.44444,0,0,.575],112:[.19444,.44444,0,0,.63889],113:[.19444,.44444,0,0,.60694],114:[0,.44444,0,0,.47361],115:[0,.44444,0,0,.45361],116:[0,.63492,0,0,.44722],117:[0,.44444,0,0,.63889],118:[0,.44444,.01597,0,.60694],119:[0,.44444,.01597,0,.83055],120:[0,.44444,0,0,.60694],121:[.19444,.44444,.01597,0,.60694],122:[0,.44444,0,0,.51111],123:[.25,.75,0,0,.575],124:[.25,.75,0,0,.31944],125:[.25,.75,0,0,.575],126:[.35,.34444,0,0,.575],160:[0,0,0,0,.25],163:[0,.69444,0,0,.86853],168:[0,.69444,0,0,.575],172:[0,.44444,0,0,.76666],176:[0,.69444,0,0,.86944],177:[.13333,.63333,0,0,.89444],184:[.17014,0,0,0,.51111],198:[0,.68611,0,0,1.04166],215:[.13333,.63333,0,0,.89444],216:[.04861,.73472,0,0,.89444],223:[0,.69444,0,0,.59722],230:[0,.44444,0,0,.83055],247:[.13333,.63333,0,0,.89444],248:[.09722,.54167,0,0,.575],305:[0,.44444,0,0,.31944],338:[0,.68611,0,0,1.16944],339:[0,.44444,0,0,.89444],567:[.19444,.44444,0,0,.35139],710:[0,.69444,0,0,.575],711:[0,.63194,0,0,.575],713:[0,.59611,0,0,.575],714:[0,.69444,0,0,.575],715:[0,.69444,0,0,.575],728:[0,.69444,0,0,.575],729:[0,.69444,0,0,.31944],730:[0,.69444,0,0,.86944],732:[0,.69444,0,0,.575],733:[0,.69444,0,0,.575],915:[0,.68611,0,0,.69166],916:[0,.68611,0,0,.95833],920:[0,.68611,0,0,.89444],923:[0,.68611,0,0,.80555],926:[0,.68611,0,0,.76666],928:[0,.68611,0,0,.9],931:[0,.68611,0,0,.83055],933:[0,.68611,0,0,.89444],934:[0,.68611,0,0,.83055],936:[0,.68611,0,0,.89444],937:[0,.68611,0,0,.83055],8211:[0,.44444,.03194,0,.575],8212:[0,.44444,.03194,0,1.14999],8216:[0,.69444,0,0,.31944],8217:[0,.69444,0,0,.31944],8220:[0,.69444,0,0,.60278],8221:[0,.69444,0,0,.60278],8224:[.19444,.69444,0,0,.51111],8225:[.19444,.69444,0,0,.51111],8242:[0,.55556,0,0,.34444],8407:[0,.72444,.15486,0,.575],8463:[0,.69444,0,0,.66759],8465:[0,.69444,0,0,.83055],8467:[0,.69444,0,0,.47361],8472:[.19444,.44444,0,0,.74027],8476:[0,.69444,0,0,.83055],8501:[0,.69444,0,0,.70277],8592:[-.10889,.39111,0,0,1.14999],8593:[.19444,.69444,0,0,.575],8594:[-.10889,.39111,0,0,1.14999],8595:[.19444,.69444,0,0,.575],8596:[-.10889,.39111,0,0,1.14999],8597:[.25,.75,0,0,.575],8598:[.19444,.69444,0,0,1.14999],8599:[.19444,.69444,0,0,1.14999],8600:[.19444,.69444,0,0,1.14999],8601:[.19444,.69444,0,0,1.14999],8636:[-.10889,.39111,0,0,1.14999],8637:[-.10889,.39111,0,0,1.14999],8640:[-.10889,.39111,0,0,1.14999],8641:[-.10889,.39111,0,0,1.14999],8656:[-.10889,.39111,0,0,1.14999],8657:[.19444,.69444,0,0,.70277],8658:[-.10889,.39111,0,0,1.14999],8659:[.19444,.69444,0,0,.70277],8660:[-.10889,.39111,0,0,1.14999],8661:[.25,.75,0,0,.70277],8704:[0,.69444,0,0,.63889],8706:[0,.69444,.06389,0,.62847],8707:[0,.69444,0,0,.63889],8709:[.05556,.75,0,0,.575],8711:[0,.68611,0,0,.95833],8712:[.08556,.58556,0,0,.76666],8715:[.08556,.58556,0,0,.76666],8722:[.13333,.63333,0,0,.89444],8723:[.13333,.63333,0,0,.89444],8725:[.25,.75,0,0,.575],8726:[.25,.75,0,0,.575],8727:[-.02778,.47222,0,0,.575],8728:[-.02639,.47361,0,0,.575],8729:[-.02639,.47361,0,0,.575],8730:[.18,.82,0,0,.95833],8733:[0,.44444,0,0,.89444],8734:[0,.44444,0,0,1.14999],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.31944],8741:[.25,.75,0,0,.575],8743:[0,.55556,0,0,.76666],8744:[0,.55556,0,0,.76666],8745:[0,.55556,0,0,.76666],8746:[0,.55556,0,0,.76666],8747:[.19444,.69444,.12778,0,.56875],8764:[-.10889,.39111,0,0,.89444],8768:[.19444,.69444,0,0,.31944],8771:[.00222,.50222,0,0,.89444],8773:[.027,.638,0,0,.894],8776:[.02444,.52444,0,0,.89444],8781:[.00222,.50222,0,0,.89444],8801:[.00222,.50222,0,0,.89444],8804:[.19667,.69667,0,0,.89444],8805:[.19667,.69667,0,0,.89444],8810:[.08556,.58556,0,0,1.14999],8811:[.08556,.58556,0,0,1.14999],8826:[.08556,.58556,0,0,.89444],8827:[.08556,.58556,0,0,.89444],8834:[.08556,.58556,0,0,.89444],8835:[.08556,.58556,0,0,.89444],8838:[.19667,.69667,0,0,.89444],8839:[.19667,.69667,0,0,.89444],8846:[0,.55556,0,0,.76666],8849:[.19667,.69667,0,0,.89444],8850:[.19667,.69667,0,0,.89444],8851:[0,.55556,0,0,.76666],8852:[0,.55556,0,0,.76666],8853:[.13333,.63333,0,0,.89444],8854:[.13333,.63333,0,0,.89444],8855:[.13333,.63333,0,0,.89444],8856:[.13333,.63333,0,0,.89444],8857:[.13333,.63333,0,0,.89444],8866:[0,.69444,0,0,.70277],8867:[0,.69444,0,0,.70277],8868:[0,.69444,0,0,.89444],8869:[0,.69444,0,0,.89444],8900:[-.02639,.47361,0,0,.575],8901:[-.02639,.47361,0,0,.31944],8902:[-.02778,.47222,0,0,.575],8968:[.25,.75,0,0,.51111],8969:[.25,.75,0,0,.51111],8970:[.25,.75,0,0,.51111],8971:[.25,.75,0,0,.51111],8994:[-.13889,.36111,0,0,1.14999],8995:[-.13889,.36111,0,0,1.14999],9651:[.19444,.69444,0,0,1.02222],9657:[-.02778,.47222,0,0,.575],9661:[.19444,.69444,0,0,1.02222],9667:[-.02778,.47222,0,0,.575],9711:[.19444,.69444,0,0,1.14999],9824:[.12963,.69444,0,0,.89444],9825:[.12963,.69444,0,0,.89444],9826:[.12963,.69444,0,0,.89444],9827:[.12963,.69444,0,0,.89444],9837:[0,.75,0,0,.44722],9838:[.19444,.69444,0,0,.44722],9839:[.19444,.69444,0,0,.44722],10216:[.25,.75,0,0,.44722],10217:[.25,.75,0,0,.44722],10815:[0,.68611,0,0,.9],10927:[.19667,.69667,0,0,.89444],10928:[.19667,.69667,0,0,.89444],57376:[.19444,.69444,0,0,0]},"Main-BoldItalic":{32:[0,0,0,0,.25],33:[0,.69444,.11417,0,.38611],34:[0,.69444,.07939,0,.62055],35:[.19444,.69444,.06833,0,.94444],37:[.05556,.75,.12861,0,.94444],38:[0,.69444,.08528,0,.88555],39:[0,.69444,.12945,0,.35555],40:[.25,.75,.15806,0,.47333],41:[.25,.75,.03306,0,.47333],42:[0,.75,.14333,0,.59111],43:[.10333,.60333,.03306,0,.88555],44:[.19444,.14722,0,0,.35555],45:[0,.44444,.02611,0,.41444],46:[0,.14722,0,0,.35555],47:[.25,.75,.15806,0,.59111],48:[0,.64444,.13167,0,.59111],49:[0,.64444,.13167,0,.59111],50:[0,.64444,.13167,0,.59111],51:[0,.64444,.13167,0,.59111],52:[.19444,.64444,.13167,0,.59111],53:[0,.64444,.13167,0,.59111],54:[0,.64444,.13167,0,.59111],55:[.19444,.64444,.13167,0,.59111],56:[0,.64444,.13167,0,.59111],57:[0,.64444,.13167,0,.59111],58:[0,.44444,.06695,0,.35555],59:[.19444,.44444,.06695,0,.35555],61:[-.10889,.39111,.06833,0,.88555],63:[0,.69444,.11472,0,.59111],64:[0,.69444,.09208,0,.88555],65:[0,.68611,0,0,.86555],66:[0,.68611,.0992,0,.81666],67:[0,.68611,.14208,0,.82666],68:[0,.68611,.09062,0,.87555],69:[0,.68611,.11431,0,.75666],70:[0,.68611,.12903,0,.72722],71:[0,.68611,.07347,0,.89527],72:[0,.68611,.17208,0,.8961],73:[0,.68611,.15681,0,.47166],74:[0,.68611,.145,0,.61055],75:[0,.68611,.14208,0,.89499],76:[0,.68611,0,0,.69777],77:[0,.68611,.17208,0,1.07277],78:[0,.68611,.17208,0,.8961],79:[0,.68611,.09062,0,.85499],80:[0,.68611,.0992,0,.78721],81:[.19444,.68611,.09062,0,.85499],82:[0,.68611,.02559,0,.85944],83:[0,.68611,.11264,0,.64999],84:[0,.68611,.12903,0,.7961],85:[0,.68611,.17208,0,.88083],86:[0,.68611,.18625,0,.86555],87:[0,.68611,.18625,0,1.15999],88:[0,.68611,.15681,0,.86555],89:[0,.68611,.19803,0,.86555],90:[0,.68611,.14208,0,.70888],91:[.25,.75,.1875,0,.35611],93:[.25,.75,.09972,0,.35611],94:[0,.69444,.06709,0,.59111],95:[.31,.13444,.09811,0,.59111],97:[0,.44444,.09426,0,.59111],98:[0,.69444,.07861,0,.53222],99:[0,.44444,.05222,0,.53222],100:[0,.69444,.10861,0,.59111],101:[0,.44444,.085,0,.53222],102:[.19444,.69444,.21778,0,.4],103:[.19444,.44444,.105,0,.53222],104:[0,.69444,.09426,0,.59111],105:[0,.69326,.11387,0,.35555],106:[.19444,.69326,.1672,0,.35555],107:[0,.69444,.11111,0,.53222],108:[0,.69444,.10861,0,.29666],109:[0,.44444,.09426,0,.94444],110:[0,.44444,.09426,0,.64999],111:[0,.44444,.07861,0,.59111],112:[.19444,.44444,.07861,0,.59111],113:[.19444,.44444,.105,0,.53222],114:[0,.44444,.11111,0,.50167],115:[0,.44444,.08167,0,.48694],116:[0,.63492,.09639,0,.385],117:[0,.44444,.09426,0,.62055],118:[0,.44444,.11111,0,.53222],119:[0,.44444,.11111,0,.76777],120:[0,.44444,.12583,0,.56055],121:[.19444,.44444,.105,0,.56166],122:[0,.44444,.13889,0,.49055],126:[.35,.34444,.11472,0,.59111],160:[0,0,0,0,.25],168:[0,.69444,.11473,0,.59111],176:[0,.69444,0,0,.94888],184:[.17014,0,0,0,.53222],198:[0,.68611,.11431,0,1.02277],216:[.04861,.73472,.09062,0,.88555],223:[.19444,.69444,.09736,0,.665],230:[0,.44444,.085,0,.82666],248:[.09722,.54167,.09458,0,.59111],305:[0,.44444,.09426,0,.35555],338:[0,.68611,.11431,0,1.14054],339:[0,.44444,.085,0,.82666],567:[.19444,.44444,.04611,0,.385],710:[0,.69444,.06709,0,.59111],711:[0,.63194,.08271,0,.59111],713:[0,.59444,.10444,0,.59111],714:[0,.69444,.08528,0,.59111],715:[0,.69444,0,0,.59111],728:[0,.69444,.10333,0,.59111],729:[0,.69444,.12945,0,.35555],730:[0,.69444,0,0,.94888],732:[0,.69444,.11472,0,.59111],733:[0,.69444,.11472,0,.59111],915:[0,.68611,.12903,0,.69777],916:[0,.68611,0,0,.94444],920:[0,.68611,.09062,0,.88555],923:[0,.68611,0,0,.80666],926:[0,.68611,.15092,0,.76777],928:[0,.68611,.17208,0,.8961],931:[0,.68611,.11431,0,.82666],933:[0,.68611,.10778,0,.88555],934:[0,.68611,.05632,0,.82666],936:[0,.68611,.10778,0,.88555],937:[0,.68611,.0992,0,.82666],8211:[0,.44444,.09811,0,.59111],8212:[0,.44444,.09811,0,1.18221],8216:[0,.69444,.12945,0,.35555],8217:[0,.69444,.12945,0,.35555],8220:[0,.69444,.16772,0,.62055],8221:[0,.69444,.07939,0,.62055]},"Main-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.12417,0,.30667],34:[0,.69444,.06961,0,.51444],35:[.19444,.69444,.06616,0,.81777],37:[.05556,.75,.13639,0,.81777],38:[0,.69444,.09694,0,.76666],39:[0,.69444,.12417,0,.30667],40:[.25,.75,.16194,0,.40889],41:[.25,.75,.03694,0,.40889],42:[0,.75,.14917,0,.51111],43:[.05667,.56167,.03694,0,.76666],44:[.19444,.10556,0,0,.30667],45:[0,.43056,.02826,0,.35778],46:[0,.10556,0,0,.30667],47:[.25,.75,.16194,0,.51111],48:[0,.64444,.13556,0,.51111],49:[0,.64444,.13556,0,.51111],50:[0,.64444,.13556,0,.51111],51:[0,.64444,.13556,0,.51111],52:[.19444,.64444,.13556,0,.51111],53:[0,.64444,.13556,0,.51111],54:[0,.64444,.13556,0,.51111],55:[.19444,.64444,.13556,0,.51111],56:[0,.64444,.13556,0,.51111],57:[0,.64444,.13556,0,.51111],58:[0,.43056,.0582,0,.30667],59:[.19444,.43056,.0582,0,.30667],61:[-.13313,.36687,.06616,0,.76666],63:[0,.69444,.1225,0,.51111],64:[0,.69444,.09597,0,.76666],65:[0,.68333,0,0,.74333],66:[0,.68333,.10257,0,.70389],67:[0,.68333,.14528,0,.71555],68:[0,.68333,.09403,0,.755],69:[0,.68333,.12028,0,.67833],70:[0,.68333,.13305,0,.65277],71:[0,.68333,.08722,0,.77361],72:[0,.68333,.16389,0,.74333],73:[0,.68333,.15806,0,.38555],74:[0,.68333,.14028,0,.525],75:[0,.68333,.14528,0,.76888],76:[0,.68333,0,0,.62722],77:[0,.68333,.16389,0,.89666],78:[0,.68333,.16389,0,.74333],79:[0,.68333,.09403,0,.76666],80:[0,.68333,.10257,0,.67833],81:[.19444,.68333,.09403,0,.76666],82:[0,.68333,.03868,0,.72944],83:[0,.68333,.11972,0,.56222],84:[0,.68333,.13305,0,.71555],85:[0,.68333,.16389,0,.74333],86:[0,.68333,.18361,0,.74333],87:[0,.68333,.18361,0,.99888],88:[0,.68333,.15806,0,.74333],89:[0,.68333,.19383,0,.74333],90:[0,.68333,.14528,0,.61333],91:[.25,.75,.1875,0,.30667],93:[.25,.75,.10528,0,.30667],94:[0,.69444,.06646,0,.51111],95:[.31,.12056,.09208,0,.51111],97:[0,.43056,.07671,0,.51111],98:[0,.69444,.06312,0,.46],99:[0,.43056,.05653,0,.46],100:[0,.69444,.10333,0,.51111],101:[0,.43056,.07514,0,.46],102:[.19444,.69444,.21194,0,.30667],103:[.19444,.43056,.08847,0,.46],104:[0,.69444,.07671,0,.51111],105:[0,.65536,.1019,0,.30667],106:[.19444,.65536,.14467,0,.30667],107:[0,.69444,.10764,0,.46],108:[0,.69444,.10333,0,.25555],109:[0,.43056,.07671,0,.81777],110:[0,.43056,.07671,0,.56222],111:[0,.43056,.06312,0,.51111],112:[.19444,.43056,.06312,0,.51111],113:[.19444,.43056,.08847,0,.46],114:[0,.43056,.10764,0,.42166],115:[0,.43056,.08208,0,.40889],116:[0,.61508,.09486,0,.33222],117:[0,.43056,.07671,0,.53666],118:[0,.43056,.10764,0,.46],119:[0,.43056,.10764,0,.66444],120:[0,.43056,.12042,0,.46389],121:[.19444,.43056,.08847,0,.48555],122:[0,.43056,.12292,0,.40889],126:[.35,.31786,.11585,0,.51111],160:[0,0,0,0,.25],168:[0,.66786,.10474,0,.51111],176:[0,.69444,0,0,.83129],184:[.17014,0,0,0,.46],198:[0,.68333,.12028,0,.88277],216:[.04861,.73194,.09403,0,.76666],223:[.19444,.69444,.10514,0,.53666],230:[0,.43056,.07514,0,.71555],248:[.09722,.52778,.09194,0,.51111],338:[0,.68333,.12028,0,.98499],339:[0,.43056,.07514,0,.71555],710:[0,.69444,.06646,0,.51111],711:[0,.62847,.08295,0,.51111],713:[0,.56167,.10333,0,.51111],714:[0,.69444,.09694,0,.51111],715:[0,.69444,0,0,.51111],728:[0,.69444,.10806,0,.51111],729:[0,.66786,.11752,0,.30667],730:[0,.69444,0,0,.83129],732:[0,.66786,.11585,0,.51111],733:[0,.69444,.1225,0,.51111],915:[0,.68333,.13305,0,.62722],916:[0,.68333,0,0,.81777],920:[0,.68333,.09403,0,.76666],923:[0,.68333,0,0,.69222],926:[0,.68333,.15294,0,.66444],928:[0,.68333,.16389,0,.74333],931:[0,.68333,.12028,0,.71555],933:[0,.68333,.11111,0,.76666],934:[0,.68333,.05986,0,.71555],936:[0,.68333,.11111,0,.76666],937:[0,.68333,.10257,0,.71555],8211:[0,.43056,.09208,0,.51111],8212:[0,.43056,.09208,0,1.02222],8216:[0,.69444,.12417,0,.30667],8217:[0,.69444,.12417,0,.30667],8220:[0,.69444,.1685,0,.51444],8221:[0,.69444,.06961,0,.51444],8463:[0,.68889,0,0,.54028]},"Main-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.27778],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.77778],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.19444,.10556,0,0,.27778],45:[0,.43056,0,0,.33333],46:[0,.10556,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.64444,0,0,.5],49:[0,.64444,0,0,.5],50:[0,.64444,0,0,.5],51:[0,.64444,0,0,.5],52:[0,.64444,0,0,.5],53:[0,.64444,0,0,.5],54:[0,.64444,0,0,.5],55:[0,.64444,0,0,.5],56:[0,.64444,0,0,.5],57:[0,.64444,0,0,.5],58:[0,.43056,0,0,.27778],59:[.19444,.43056,0,0,.27778],60:[.0391,.5391,0,0,.77778],61:[-.13313,.36687,0,0,.77778],62:[.0391,.5391,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.77778],65:[0,.68333,0,0,.75],66:[0,.68333,0,0,.70834],67:[0,.68333,0,0,.72222],68:[0,.68333,0,0,.76389],69:[0,.68333,0,0,.68056],70:[0,.68333,0,0,.65278],71:[0,.68333,0,0,.78472],72:[0,.68333,0,0,.75],73:[0,.68333,0,0,.36111],74:[0,.68333,0,0,.51389],75:[0,.68333,0,0,.77778],76:[0,.68333,0,0,.625],77:[0,.68333,0,0,.91667],78:[0,.68333,0,0,.75],79:[0,.68333,0,0,.77778],80:[0,.68333,0,0,.68056],81:[.19444,.68333,0,0,.77778],82:[0,.68333,0,0,.73611],83:[0,.68333,0,0,.55556],84:[0,.68333,0,0,.72222],85:[0,.68333,0,0,.75],86:[0,.68333,.01389,0,.75],87:[0,.68333,.01389,0,1.02778],88:[0,.68333,0,0,.75],89:[0,.68333,.025,0,.75],90:[0,.68333,0,0,.61111],91:[.25,.75,0,0,.27778],92:[.25,.75,0,0,.5],93:[.25,.75,0,0,.27778],94:[0,.69444,0,0,.5],95:[.31,.12056,.02778,0,.5],97:[0,.43056,0,0,.5],98:[0,.69444,0,0,.55556],99:[0,.43056,0,0,.44445],100:[0,.69444,0,0,.55556],101:[0,.43056,0,0,.44445],102:[0,.69444,.07778,0,.30556],103:[.19444,.43056,.01389,0,.5],104:[0,.69444,0,0,.55556],105:[0,.66786,0,0,.27778],106:[.19444,.66786,0,0,.30556],107:[0,.69444,0,0,.52778],108:[0,.69444,0,0,.27778],109:[0,.43056,0,0,.83334],110:[0,.43056,0,0,.55556],111:[0,.43056,0,0,.5],112:[.19444,.43056,0,0,.55556],113:[.19444,.43056,0,0,.52778],114:[0,.43056,0,0,.39167],115:[0,.43056,0,0,.39445],116:[0,.61508,0,0,.38889],117:[0,.43056,0,0,.55556],118:[0,.43056,.01389,0,.52778],119:[0,.43056,.01389,0,.72222],120:[0,.43056,0,0,.52778],121:[.19444,.43056,.01389,0,.52778],122:[0,.43056,0,0,.44445],123:[.25,.75,0,0,.5],124:[.25,.75,0,0,.27778],125:[.25,.75,0,0,.5],126:[.35,.31786,0,0,.5],160:[0,0,0,0,.25],163:[0,.69444,0,0,.76909],167:[.19444,.69444,0,0,.44445],168:[0,.66786,0,0,.5],172:[0,.43056,0,0,.66667],176:[0,.69444,0,0,.75],177:[.08333,.58333,0,0,.77778],182:[.19444,.69444,0,0,.61111],184:[.17014,0,0,0,.44445],198:[0,.68333,0,0,.90278],215:[.08333,.58333,0,0,.77778],216:[.04861,.73194,0,0,.77778],223:[0,.69444,0,0,.5],230:[0,.43056,0,0,.72222],247:[.08333,.58333,0,0,.77778],248:[.09722,.52778,0,0,.5],305:[0,.43056,0,0,.27778],338:[0,.68333,0,0,1.01389],339:[0,.43056,0,0,.77778],567:[.19444,.43056,0,0,.30556],710:[0,.69444,0,0,.5],711:[0,.62847,0,0,.5],713:[0,.56778,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.66786,0,0,.27778],730:[0,.69444,0,0,.75],732:[0,.66786,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.68333,0,0,.625],916:[0,.68333,0,0,.83334],920:[0,.68333,0,0,.77778],923:[0,.68333,0,0,.69445],926:[0,.68333,0,0,.66667],928:[0,.68333,0,0,.75],931:[0,.68333,0,0,.72222],933:[0,.68333,0,0,.77778],934:[0,.68333,0,0,.72222],936:[0,.68333,0,0,.77778],937:[0,.68333,0,0,.72222],8211:[0,.43056,.02778,0,.5],8212:[0,.43056,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5],8224:[.19444,.69444,0,0,.44445],8225:[.19444,.69444,0,0,.44445],8230:[0,.123,0,0,1.172],8242:[0,.55556,0,0,.275],8407:[0,.71444,.15382,0,.5],8463:[0,.68889,0,0,.54028],8465:[0,.69444,0,0,.72222],8467:[0,.69444,0,.11111,.41667],8472:[.19444,.43056,0,.11111,.63646],8476:[0,.69444,0,0,.72222],8501:[0,.69444,0,0,.61111],8592:[-.13313,.36687,0,0,1],8593:[.19444,.69444,0,0,.5],8594:[-.13313,.36687,0,0,1],8595:[.19444,.69444,0,0,.5],8596:[-.13313,.36687,0,0,1],8597:[.25,.75,0,0,.5],8598:[.19444,.69444,0,0,1],8599:[.19444,.69444,0,0,1],8600:[.19444,.69444,0,0,1],8601:[.19444,.69444,0,0,1],8614:[.011,.511,0,0,1],8617:[.011,.511,0,0,1.126],8618:[.011,.511,0,0,1.126],8636:[-.13313,.36687,0,0,1],8637:[-.13313,.36687,0,0,1],8640:[-.13313,.36687,0,0,1],8641:[-.13313,.36687,0,0,1],8652:[.011,.671,0,0,1],8656:[-.13313,.36687,0,0,1],8657:[.19444,.69444,0,0,.61111],8658:[-.13313,.36687,0,0,1],8659:[.19444,.69444,0,0,.61111],8660:[-.13313,.36687,0,0,1],8661:[.25,.75,0,0,.61111],8704:[0,.69444,0,0,.55556],8706:[0,.69444,.05556,.08334,.5309],8707:[0,.69444,0,0,.55556],8709:[.05556,.75,0,0,.5],8711:[0,.68333,0,0,.83334],8712:[.0391,.5391,0,0,.66667],8715:[.0391,.5391,0,0,.66667],8722:[.08333,.58333,0,0,.77778],8723:[.08333,.58333,0,0,.77778],8725:[.25,.75,0,0,.5],8726:[.25,.75,0,0,.5],8727:[-.03472,.46528,0,0,.5],8728:[-.05555,.44445,0,0,.5],8729:[-.05555,.44445,0,0,.5],8730:[.2,.8,0,0,.83334],8733:[0,.43056,0,0,.77778],8734:[0,.43056,0,0,1],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.27778],8741:[.25,.75,0,0,.5],8743:[0,.55556,0,0,.66667],8744:[0,.55556,0,0,.66667],8745:[0,.55556,0,0,.66667],8746:[0,.55556,0,0,.66667],8747:[.19444,.69444,.11111,0,.41667],8764:[-.13313,.36687,0,0,.77778],8768:[.19444,.69444,0,0,.27778],8771:[-.03625,.46375,0,0,.77778],8773:[-.022,.589,0,0,.778],8776:[-.01688,.48312,0,0,.77778],8781:[-.03625,.46375,0,0,.77778],8784:[-.133,.673,0,0,.778],8801:[-.03625,.46375,0,0,.77778],8804:[.13597,.63597,0,0,.77778],8805:[.13597,.63597,0,0,.77778],8810:[.0391,.5391,0,0,1],8811:[.0391,.5391,0,0,1],8826:[.0391,.5391,0,0,.77778],8827:[.0391,.5391,0,0,.77778],8834:[.0391,.5391,0,0,.77778],8835:[.0391,.5391,0,0,.77778],8838:[.13597,.63597,0,0,.77778],8839:[.13597,.63597,0,0,.77778],8846:[0,.55556,0,0,.66667],8849:[.13597,.63597,0,0,.77778],8850:[.13597,.63597,0,0,.77778],8851:[0,.55556,0,0,.66667],8852:[0,.55556,0,0,.66667],8853:[.08333,.58333,0,0,.77778],8854:[.08333,.58333,0,0,.77778],8855:[.08333,.58333,0,0,.77778],8856:[.08333,.58333,0,0,.77778],8857:[.08333,.58333,0,0,.77778],8866:[0,.69444,0,0,.61111],8867:[0,.69444,0,0,.61111],8868:[0,.69444,0,0,.77778],8869:[0,.69444,0,0,.77778],8872:[.249,.75,0,0,.867],8900:[-.05555,.44445,0,0,.5],8901:[-.05555,.44445,0,0,.27778],8902:[-.03472,.46528,0,0,.5],8904:[.005,.505,0,0,.9],8942:[.03,.903,0,0,.278],8943:[-.19,.313,0,0,1.172],8945:[-.1,.823,0,0,1.282],8968:[.25,.75,0,0,.44445],8969:[.25,.75,0,0,.44445],8970:[.25,.75,0,0,.44445],8971:[.25,.75,0,0,.44445],8994:[-.14236,.35764,0,0,1],8995:[-.14236,.35764,0,0,1],9136:[.244,.744,0,0,.412],9137:[.244,.745,0,0,.412],9651:[.19444,.69444,0,0,.88889],9657:[-.03472,.46528,0,0,.5],9661:[.19444,.69444,0,0,.88889],9667:[-.03472,.46528,0,0,.5],9711:[.19444,.69444,0,0,1],9824:[.12963,.69444,0,0,.77778],9825:[.12963,.69444,0,0,.77778],9826:[.12963,.69444,0,0,.77778],9827:[.12963,.69444,0,0,.77778],9837:[0,.75,0,0,.38889],9838:[.19444,.69444,0,0,.38889],9839:[.19444,.69444,0,0,.38889],10216:[.25,.75,0,0,.38889],10217:[.25,.75,0,0,.38889],10222:[.244,.744,0,0,.412],10223:[.244,.745,0,0,.412],10229:[.011,.511,0,0,1.609],10230:[.011,.511,0,0,1.638],10231:[.011,.511,0,0,1.859],10232:[.024,.525,0,0,1.609],10233:[.024,.525,0,0,1.638],10234:[.024,.525,0,0,1.858],10236:[.011,.511,0,0,1.638],10815:[0,.68333,0,0,.75],10927:[.13597,.63597,0,0,.77778],10928:[.13597,.63597,0,0,.77778],57376:[.19444,.69444,0,0,0]},"Math-BoldItalic":{32:[0,0,0,0,.25],48:[0,.44444,0,0,.575],49:[0,.44444,0,0,.575],50:[0,.44444,0,0,.575],51:[.19444,.44444,0,0,.575],52:[.19444,.44444,0,0,.575],53:[.19444,.44444,0,0,.575],54:[0,.64444,0,0,.575],55:[.19444,.44444,0,0,.575],56:[0,.64444,0,0,.575],57:[.19444,.44444,0,0,.575],65:[0,.68611,0,0,.86944],66:[0,.68611,.04835,0,.8664],67:[0,.68611,.06979,0,.81694],68:[0,.68611,.03194,0,.93812],69:[0,.68611,.05451,0,.81007],70:[0,.68611,.15972,0,.68889],71:[0,.68611,0,0,.88673],72:[0,.68611,.08229,0,.98229],73:[0,.68611,.07778,0,.51111],74:[0,.68611,.10069,0,.63125],75:[0,.68611,.06979,0,.97118],76:[0,.68611,0,0,.75555],77:[0,.68611,.11424,0,1.14201],78:[0,.68611,.11424,0,.95034],79:[0,.68611,.03194,0,.83666],80:[0,.68611,.15972,0,.72309],81:[.19444,.68611,0,0,.86861],82:[0,.68611,.00421,0,.87235],83:[0,.68611,.05382,0,.69271],84:[0,.68611,.15972,0,.63663],85:[0,.68611,.11424,0,.80027],86:[0,.68611,.25555,0,.67778],87:[0,.68611,.15972,0,1.09305],88:[0,.68611,.07778,0,.94722],89:[0,.68611,.25555,0,.67458],90:[0,.68611,.06979,0,.77257],97:[0,.44444,0,0,.63287],98:[0,.69444,0,0,.52083],99:[0,.44444,0,0,.51342],100:[0,.69444,0,0,.60972],101:[0,.44444,0,0,.55361],102:[.19444,.69444,.11042,0,.56806],103:[.19444,.44444,.03704,0,.5449],104:[0,.69444,0,0,.66759],105:[0,.69326,0,0,.4048],106:[.19444,.69326,.0622,0,.47083],107:[0,.69444,.01852,0,.6037],108:[0,.69444,.0088,0,.34815],109:[0,.44444,0,0,1.0324],110:[0,.44444,0,0,.71296],111:[0,.44444,0,0,.58472],112:[.19444,.44444,0,0,.60092],113:[.19444,.44444,.03704,0,.54213],114:[0,.44444,.03194,0,.5287],115:[0,.44444,0,0,.53125],116:[0,.63492,0,0,.41528],117:[0,.44444,0,0,.68102],118:[0,.44444,.03704,0,.56666],119:[0,.44444,.02778,0,.83148],120:[0,.44444,0,0,.65903],121:[.19444,.44444,.03704,0,.59028],122:[0,.44444,.04213,0,.55509],160:[0,0,0,0,.25],915:[0,.68611,.15972,0,.65694],916:[0,.68611,0,0,.95833],920:[0,.68611,.03194,0,.86722],923:[0,.68611,0,0,.80555],926:[0,.68611,.07458,0,.84125],928:[0,.68611,.08229,0,.98229],931:[0,.68611,.05451,0,.88507],933:[0,.68611,.15972,0,.67083],934:[0,.68611,0,0,.76666],936:[0,.68611,.11653,0,.71402],937:[0,.68611,.04835,0,.8789],945:[0,.44444,0,0,.76064],946:[.19444,.69444,.03403,0,.65972],947:[.19444,.44444,.06389,0,.59003],948:[0,.69444,.03819,0,.52222],949:[0,.44444,0,0,.52882],950:[.19444,.69444,.06215,0,.50833],951:[.19444,.44444,.03704,0,.6],952:[0,.69444,.03194,0,.5618],953:[0,.44444,0,0,.41204],954:[0,.44444,0,0,.66759],955:[0,.69444,0,0,.67083],956:[.19444,.44444,0,0,.70787],957:[0,.44444,.06898,0,.57685],958:[.19444,.69444,.03021,0,.50833],959:[0,.44444,0,0,.58472],960:[0,.44444,.03704,0,.68241],961:[.19444,.44444,0,0,.6118],962:[.09722,.44444,.07917,0,.42361],963:[0,.44444,.03704,0,.68588],964:[0,.44444,.13472,0,.52083],965:[0,.44444,.03704,0,.63055],966:[.19444,.44444,0,0,.74722],967:[.19444,.44444,0,0,.71805],968:[.19444,.69444,.03704,0,.75833],969:[0,.44444,.03704,0,.71782],977:[0,.69444,0,0,.69155],981:[.19444,.69444,0,0,.7125],982:[0,.44444,.03194,0,.975],1009:[.19444,.44444,0,0,.6118],1013:[0,.44444,0,0,.48333],57649:[0,.44444,0,0,.39352],57911:[.19444,.44444,0,0,.43889]},"Math-Italic":{32:[0,0,0,0,.25],48:[0,.43056,0,0,.5],49:[0,.43056,0,0,.5],50:[0,.43056,0,0,.5],51:[.19444,.43056,0,0,.5],52:[.19444,.43056,0,0,.5],53:[.19444,.43056,0,0,.5],54:[0,.64444,0,0,.5],55:[.19444,.43056,0,0,.5],56:[0,.64444,0,0,.5],57:[.19444,.43056,0,0,.5],65:[0,.68333,0,.13889,.75],66:[0,.68333,.05017,.08334,.75851],67:[0,.68333,.07153,.08334,.71472],68:[0,.68333,.02778,.05556,.82792],69:[0,.68333,.05764,.08334,.7382],70:[0,.68333,.13889,.08334,.64306],71:[0,.68333,0,.08334,.78625],72:[0,.68333,.08125,.05556,.83125],73:[0,.68333,.07847,.11111,.43958],74:[0,.68333,.09618,.16667,.55451],75:[0,.68333,.07153,.05556,.84931],76:[0,.68333,0,.02778,.68056],77:[0,.68333,.10903,.08334,.97014],78:[0,.68333,.10903,.08334,.80347],79:[0,.68333,.02778,.08334,.76278],80:[0,.68333,.13889,.08334,.64201],81:[.19444,.68333,0,.08334,.79056],82:[0,.68333,.00773,.08334,.75929],83:[0,.68333,.05764,.08334,.6132],84:[0,.68333,.13889,.08334,.58438],85:[0,.68333,.10903,.02778,.68278],86:[0,.68333,.22222,0,.58333],87:[0,.68333,.13889,0,.94445],88:[0,.68333,.07847,.08334,.82847],89:[0,.68333,.22222,0,.58056],90:[0,.68333,.07153,.08334,.68264],97:[0,.43056,0,0,.52859],98:[0,.69444,0,0,.42917],99:[0,.43056,0,.05556,.43276],100:[0,.69444,0,.16667,.52049],101:[0,.43056,0,.05556,.46563],102:[.19444,.69444,.10764,.16667,.48959],103:[.19444,.43056,.03588,.02778,.47697],104:[0,.69444,0,0,.57616],105:[0,.65952,0,0,.34451],106:[.19444,.65952,.05724,0,.41181],107:[0,.69444,.03148,0,.5206],108:[0,.69444,.01968,.08334,.29838],109:[0,.43056,0,0,.87801],110:[0,.43056,0,0,.60023],111:[0,.43056,0,.05556,.48472],112:[.19444,.43056,0,.08334,.50313],113:[.19444,.43056,.03588,.08334,.44641],114:[0,.43056,.02778,.05556,.45116],115:[0,.43056,0,.05556,.46875],116:[0,.61508,0,.08334,.36111],117:[0,.43056,0,.02778,.57246],118:[0,.43056,.03588,.02778,.48472],119:[0,.43056,.02691,.08334,.71592],120:[0,.43056,0,.02778,.57153],121:[.19444,.43056,.03588,.05556,.49028],122:[0,.43056,.04398,.05556,.46505],160:[0,0,0,0,.25],915:[0,.68333,.13889,.08334,.61528],916:[0,.68333,0,.16667,.83334],920:[0,.68333,.02778,.08334,.76278],923:[0,.68333,0,.16667,.69445],926:[0,.68333,.07569,.08334,.74236],928:[0,.68333,.08125,.05556,.83125],931:[0,.68333,.05764,.08334,.77986],933:[0,.68333,.13889,.05556,.58333],934:[0,.68333,0,.08334,.66667],936:[0,.68333,.11,.05556,.61222],937:[0,.68333,.05017,.08334,.7724],945:[0,.43056,.0037,.02778,.6397],946:[.19444,.69444,.05278,.08334,.56563],947:[.19444,.43056,.05556,0,.51773],948:[0,.69444,.03785,.05556,.44444],949:[0,.43056,0,.08334,.46632],950:[.19444,.69444,.07378,.08334,.4375],951:[.19444,.43056,.03588,.05556,.49653],952:[0,.69444,.02778,.08334,.46944],953:[0,.43056,0,.05556,.35394],954:[0,.43056,0,0,.57616],955:[0,.69444,0,0,.58334],956:[.19444,.43056,0,.02778,.60255],957:[0,.43056,.06366,.02778,.49398],958:[.19444,.69444,.04601,.11111,.4375],959:[0,.43056,0,.05556,.48472],960:[0,.43056,.03588,0,.57003],961:[.19444,.43056,0,.08334,.51702],962:[.09722,.43056,.07986,.08334,.36285],963:[0,.43056,.03588,0,.57141],964:[0,.43056,.1132,.02778,.43715],965:[0,.43056,.03588,.02778,.54028],966:[.19444,.43056,0,.08334,.65417],967:[.19444,.43056,0,.05556,.62569],968:[.19444,.69444,.03588,.11111,.65139],969:[0,.43056,.03588,0,.62245],977:[0,.69444,0,.08334,.59144],981:[.19444,.69444,0,.08334,.59583],982:[0,.43056,.02778,0,.82813],1009:[.19444,.43056,0,.08334,.51702],1013:[0,.43056,0,.05556,.4059],57649:[0,.43056,0,.02778,.32246],57911:[.19444,.43056,0,.08334,.38403]},"SansSerif-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.36667],34:[0,.69444,0,0,.55834],35:[.19444,.69444,0,0,.91667],36:[.05556,.75,0,0,.55],37:[.05556,.75,0,0,1.02912],38:[0,.69444,0,0,.83056],39:[0,.69444,0,0,.30556],40:[.25,.75,0,0,.42778],41:[.25,.75,0,0,.42778],42:[0,.75,0,0,.55],43:[.11667,.61667,0,0,.85556],44:[.10556,.13056,0,0,.30556],45:[0,.45833,0,0,.36667],46:[0,.13056,0,0,.30556],47:[.25,.75,0,0,.55],48:[0,.69444,0,0,.55],49:[0,.69444,0,0,.55],50:[0,.69444,0,0,.55],51:[0,.69444,0,0,.55],52:[0,.69444,0,0,.55],53:[0,.69444,0,0,.55],54:[0,.69444,0,0,.55],55:[0,.69444,0,0,.55],56:[0,.69444,0,0,.55],57:[0,.69444,0,0,.55],58:[0,.45833,0,0,.30556],59:[.10556,.45833,0,0,.30556],61:[-.09375,.40625,0,0,.85556],63:[0,.69444,0,0,.51945],64:[0,.69444,0,0,.73334],65:[0,.69444,0,0,.73334],66:[0,.69444,0,0,.73334],67:[0,.69444,0,0,.70278],68:[0,.69444,0,0,.79445],69:[0,.69444,0,0,.64167],70:[0,.69444,0,0,.61111],71:[0,.69444,0,0,.73334],72:[0,.69444,0,0,.79445],73:[0,.69444,0,0,.33056],74:[0,.69444,0,0,.51945],75:[0,.69444,0,0,.76389],76:[0,.69444,0,0,.58056],77:[0,.69444,0,0,.97778],78:[0,.69444,0,0,.79445],79:[0,.69444,0,0,.79445],80:[0,.69444,0,0,.70278],81:[.10556,.69444,0,0,.79445],82:[0,.69444,0,0,.70278],83:[0,.69444,0,0,.61111],84:[0,.69444,0,0,.73334],85:[0,.69444,0,0,.76389],86:[0,.69444,.01528,0,.73334],87:[0,.69444,.01528,0,1.03889],88:[0,.69444,0,0,.73334],89:[0,.69444,.0275,0,.73334],90:[0,.69444,0,0,.67223],91:[.25,.75,0,0,.34306],93:[.25,.75,0,0,.34306],94:[0,.69444,0,0,.55],95:[.35,.10833,.03056,0,.55],97:[0,.45833,0,0,.525],98:[0,.69444,0,0,.56111],99:[0,.45833,0,0,.48889],100:[0,.69444,0,0,.56111],101:[0,.45833,0,0,.51111],102:[0,.69444,.07639,0,.33611],103:[.19444,.45833,.01528,0,.55],104:[0,.69444,0,0,.56111],105:[0,.69444,0,0,.25556],106:[.19444,.69444,0,0,.28611],107:[0,.69444,0,0,.53056],108:[0,.69444,0,0,.25556],109:[0,.45833,0,0,.86667],110:[0,.45833,0,0,.56111],111:[0,.45833,0,0,.55],112:[.19444,.45833,0,0,.56111],113:[.19444,.45833,0,0,.56111],114:[0,.45833,.01528,0,.37222],115:[0,.45833,0,0,.42167],116:[0,.58929,0,0,.40417],117:[0,.45833,0,0,.56111],118:[0,.45833,.01528,0,.5],119:[0,.45833,.01528,0,.74445],120:[0,.45833,0,0,.5],121:[.19444,.45833,.01528,0,.5],122:[0,.45833,0,0,.47639],126:[.35,.34444,0,0,.55],160:[0,0,0,0,.25],168:[0,.69444,0,0,.55],176:[0,.69444,0,0,.73334],180:[0,.69444,0,0,.55],184:[.17014,0,0,0,.48889],305:[0,.45833,0,0,.25556],567:[.19444,.45833,0,0,.28611],710:[0,.69444,0,0,.55],711:[0,.63542,0,0,.55],713:[0,.63778,0,0,.55],728:[0,.69444,0,0,.55],729:[0,.69444,0,0,.30556],730:[0,.69444,0,0,.73334],732:[0,.69444,0,0,.55],733:[0,.69444,0,0,.55],915:[0,.69444,0,0,.58056],916:[0,.69444,0,0,.91667],920:[0,.69444,0,0,.85556],923:[0,.69444,0,0,.67223],926:[0,.69444,0,0,.73334],928:[0,.69444,0,0,.79445],931:[0,.69444,0,0,.79445],933:[0,.69444,0,0,.85556],934:[0,.69444,0,0,.79445],936:[0,.69444,0,0,.85556],937:[0,.69444,0,0,.79445],8211:[0,.45833,.03056,0,.55],8212:[0,.45833,.03056,0,1.10001],8216:[0,.69444,0,0,.30556],8217:[0,.69444,0,0,.30556],8220:[0,.69444,0,0,.55834],8221:[0,.69444,0,0,.55834]},"SansSerif-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.05733,0,.31945],34:[0,.69444,.00316,0,.5],35:[.19444,.69444,.05087,0,.83334],36:[.05556,.75,.11156,0,.5],37:[.05556,.75,.03126,0,.83334],38:[0,.69444,.03058,0,.75834],39:[0,.69444,.07816,0,.27778],40:[.25,.75,.13164,0,.38889],41:[.25,.75,.02536,0,.38889],42:[0,.75,.11775,0,.5],43:[.08333,.58333,.02536,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,.01946,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,.13164,0,.5],48:[0,.65556,.11156,0,.5],49:[0,.65556,.11156,0,.5],50:[0,.65556,.11156,0,.5],51:[0,.65556,.11156,0,.5],52:[0,.65556,.11156,0,.5],53:[0,.65556,.11156,0,.5],54:[0,.65556,.11156,0,.5],55:[0,.65556,.11156,0,.5],56:[0,.65556,.11156,0,.5],57:[0,.65556,.11156,0,.5],58:[0,.44444,.02502,0,.27778],59:[.125,.44444,.02502,0,.27778],61:[-.13,.37,.05087,0,.77778],63:[0,.69444,.11809,0,.47222],64:[0,.69444,.07555,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,.08293,0,.66667],67:[0,.69444,.11983,0,.63889],68:[0,.69444,.07555,0,.72223],69:[0,.69444,.11983,0,.59722],70:[0,.69444,.13372,0,.56945],71:[0,.69444,.11983,0,.66667],72:[0,.69444,.08094,0,.70834],73:[0,.69444,.13372,0,.27778],74:[0,.69444,.08094,0,.47222],75:[0,.69444,.11983,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,.08094,0,.875],78:[0,.69444,.08094,0,.70834],79:[0,.69444,.07555,0,.73611],80:[0,.69444,.08293,0,.63889],81:[.125,.69444,.07555,0,.73611],82:[0,.69444,.08293,0,.64584],83:[0,.69444,.09205,0,.55556],84:[0,.69444,.13372,0,.68056],85:[0,.69444,.08094,0,.6875],86:[0,.69444,.1615,0,.66667],87:[0,.69444,.1615,0,.94445],88:[0,.69444,.13372,0,.66667],89:[0,.69444,.17261,0,.66667],90:[0,.69444,.11983,0,.61111],91:[.25,.75,.15942,0,.28889],93:[.25,.75,.08719,0,.28889],94:[0,.69444,.0799,0,.5],95:[.35,.09444,.08616,0,.5],97:[0,.44444,.00981,0,.48056],98:[0,.69444,.03057,0,.51667],99:[0,.44444,.08336,0,.44445],100:[0,.69444,.09483,0,.51667],101:[0,.44444,.06778,0,.44445],102:[0,.69444,.21705,0,.30556],103:[.19444,.44444,.10836,0,.5],104:[0,.69444,.01778,0,.51667],105:[0,.67937,.09718,0,.23889],106:[.19444,.67937,.09162,0,.26667],107:[0,.69444,.08336,0,.48889],108:[0,.69444,.09483,0,.23889],109:[0,.44444,.01778,0,.79445],110:[0,.44444,.01778,0,.51667],111:[0,.44444,.06613,0,.5],112:[.19444,.44444,.0389,0,.51667],113:[.19444,.44444,.04169,0,.51667],114:[0,.44444,.10836,0,.34167],115:[0,.44444,.0778,0,.38333],116:[0,.57143,.07225,0,.36111],117:[0,.44444,.04169,0,.51667],118:[0,.44444,.10836,0,.46111],119:[0,.44444,.10836,0,.68334],120:[0,.44444,.09169,0,.46111],121:[.19444,.44444,.10836,0,.46111],122:[0,.44444,.08752,0,.43472],126:[.35,.32659,.08826,0,.5],160:[0,0,0,0,.25],168:[0,.67937,.06385,0,.5],176:[0,.69444,0,0,.73752],184:[.17014,0,0,0,.44445],305:[0,.44444,.04169,0,.23889],567:[.19444,.44444,.04169,0,.26667],710:[0,.69444,.0799,0,.5],711:[0,.63194,.08432,0,.5],713:[0,.60889,.08776,0,.5],714:[0,.69444,.09205,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,.09483,0,.5],729:[0,.67937,.07774,0,.27778],730:[0,.69444,0,0,.73752],732:[0,.67659,.08826,0,.5],733:[0,.69444,.09205,0,.5],915:[0,.69444,.13372,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,.07555,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,.12816,0,.66667],928:[0,.69444,.08094,0,.70834],931:[0,.69444,.11983,0,.72222],933:[0,.69444,.09031,0,.77778],934:[0,.69444,.04603,0,.72222],936:[0,.69444,.09031,0,.77778],937:[0,.69444,.08293,0,.72222],8211:[0,.44444,.08616,0,.5],8212:[0,.44444,.08616,0,1],8216:[0,.69444,.07816,0,.27778],8217:[0,.69444,.07816,0,.27778],8220:[0,.69444,.14205,0,.5],8221:[0,.69444,.00316,0,.5]},"SansSerif-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.31945],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.75834],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,0,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.65556,0,0,.5],49:[0,.65556,0,0,.5],50:[0,.65556,0,0,.5],51:[0,.65556,0,0,.5],52:[0,.65556,0,0,.5],53:[0,.65556,0,0,.5],54:[0,.65556,0,0,.5],55:[0,.65556,0,0,.5],56:[0,.65556,0,0,.5],57:[0,.65556,0,0,.5],58:[0,.44444,0,0,.27778],59:[.125,.44444,0,0,.27778],61:[-.13,.37,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,0,0,.66667],67:[0,.69444,0,0,.63889],68:[0,.69444,0,0,.72223],69:[0,.69444,0,0,.59722],70:[0,.69444,0,0,.56945],71:[0,.69444,0,0,.66667],72:[0,.69444,0,0,.70834],73:[0,.69444,0,0,.27778],74:[0,.69444,0,0,.47222],75:[0,.69444,0,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,0,0,.875],78:[0,.69444,0,0,.70834],79:[0,.69444,0,0,.73611],80:[0,.69444,0,0,.63889],81:[.125,.69444,0,0,.73611],82:[0,.69444,0,0,.64584],83:[0,.69444,0,0,.55556],84:[0,.69444,0,0,.68056],85:[0,.69444,0,0,.6875],86:[0,.69444,.01389,0,.66667],87:[0,.69444,.01389,0,.94445],88:[0,.69444,0,0,.66667],89:[0,.69444,.025,0,.66667],90:[0,.69444,0,0,.61111],91:[.25,.75,0,0,.28889],93:[.25,.75,0,0,.28889],94:[0,.69444,0,0,.5],95:[.35,.09444,.02778,0,.5],97:[0,.44444,0,0,.48056],98:[0,.69444,0,0,.51667],99:[0,.44444,0,0,.44445],100:[0,.69444,0,0,.51667],101:[0,.44444,0,0,.44445],102:[0,.69444,.06944,0,.30556],103:[.19444,.44444,.01389,0,.5],104:[0,.69444,0,0,.51667],105:[0,.67937,0,0,.23889],106:[.19444,.67937,0,0,.26667],107:[0,.69444,0,0,.48889],108:[0,.69444,0,0,.23889],109:[0,.44444,0,0,.79445],110:[0,.44444,0,0,.51667],111:[0,.44444,0,0,.5],112:[.19444,.44444,0,0,.51667],113:[.19444,.44444,0,0,.51667],114:[0,.44444,.01389,0,.34167],115:[0,.44444,0,0,.38333],116:[0,.57143,0,0,.36111],117:[0,.44444,0,0,.51667],118:[0,.44444,.01389,0,.46111],119:[0,.44444,.01389,0,.68334],120:[0,.44444,0,0,.46111],121:[.19444,.44444,.01389,0,.46111],122:[0,.44444,0,0,.43472],126:[.35,.32659,0,0,.5],160:[0,0,0,0,.25],168:[0,.67937,0,0,.5],176:[0,.69444,0,0,.66667],184:[.17014,0,0,0,.44445],305:[0,.44444,0,0,.23889],567:[.19444,.44444,0,0,.26667],710:[0,.69444,0,0,.5],711:[0,.63194,0,0,.5],713:[0,.60889,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.67937,0,0,.27778],730:[0,.69444,0,0,.66667],732:[0,.67659,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.69444,0,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,0,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,0,0,.66667],928:[0,.69444,0,0,.70834],931:[0,.69444,0,0,.72222],933:[0,.69444,0,0,.77778],934:[0,.69444,0,0,.72222],936:[0,.69444,0,0,.77778],937:[0,.69444,0,0,.72222],8211:[0,.44444,.02778,0,.5],8212:[0,.44444,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5]},"Script-Regular":{32:[0,0,0,0,.25],65:[0,.7,.22925,0,.80253],66:[0,.7,.04087,0,.90757],67:[0,.7,.1689,0,.66619],68:[0,.7,.09371,0,.77443],69:[0,.7,.18583,0,.56162],70:[0,.7,.13634,0,.89544],71:[0,.7,.17322,0,.60961],72:[0,.7,.29694,0,.96919],73:[0,.7,.19189,0,.80907],74:[.27778,.7,.19189,0,1.05159],75:[0,.7,.31259,0,.91364],76:[0,.7,.19189,0,.87373],77:[0,.7,.15981,0,1.08031],78:[0,.7,.3525,0,.9015],79:[0,.7,.08078,0,.73787],80:[0,.7,.08078,0,1.01262],81:[0,.7,.03305,0,.88282],82:[0,.7,.06259,0,.85],83:[0,.7,.19189,0,.86767],84:[0,.7,.29087,0,.74697],85:[0,.7,.25815,0,.79996],86:[0,.7,.27523,0,.62204],87:[0,.7,.27523,0,.80532],88:[0,.7,.26006,0,.94445],89:[0,.7,.2939,0,.70961],90:[0,.7,.24037,0,.8212],160:[0,0,0,0,.25]},"Size1-Regular":{32:[0,0,0,0,.25],40:[.35001,.85,0,0,.45834],41:[.35001,.85,0,0,.45834],47:[.35001,.85,0,0,.57778],91:[.35001,.85,0,0,.41667],92:[.35001,.85,0,0,.57778],93:[.35001,.85,0,0,.41667],123:[.35001,.85,0,0,.58334],125:[.35001,.85,0,0,.58334],160:[0,0,0,0,.25],710:[0,.72222,0,0,.55556],732:[0,.72222,0,0,.55556],770:[0,.72222,0,0,.55556],771:[0,.72222,0,0,.55556],8214:[-99e-5,.601,0,0,.77778],8593:[1e-5,.6,0,0,.66667],8595:[1e-5,.6,0,0,.66667],8657:[1e-5,.6,0,0,.77778],8659:[1e-5,.6,0,0,.77778],8719:[.25001,.75,0,0,.94445],8720:[.25001,.75,0,0,.94445],8721:[.25001,.75,0,0,1.05556],8730:[.35001,.85,0,0,1],8739:[-.00599,.606,0,0,.33333],8741:[-.00599,.606,0,0,.55556],8747:[.30612,.805,.19445,0,.47222],8748:[.306,.805,.19445,0,.47222],8749:[.306,.805,.19445,0,.47222],8750:[.30612,.805,.19445,0,.47222],8896:[.25001,.75,0,0,.83334],8897:[.25001,.75,0,0,.83334],8898:[.25001,.75,0,0,.83334],8899:[.25001,.75,0,0,.83334],8968:[.35001,.85,0,0,.47222],8969:[.35001,.85,0,0,.47222],8970:[.35001,.85,0,0,.47222],8971:[.35001,.85,0,0,.47222],9168:[-99e-5,.601,0,0,.66667],10216:[.35001,.85,0,0,.47222],10217:[.35001,.85,0,0,.47222],10752:[.25001,.75,0,0,1.11111],10753:[.25001,.75,0,0,1.11111],10754:[.25001,.75,0,0,1.11111],10756:[.25001,.75,0,0,.83334],10758:[.25001,.75,0,0,.83334]},"Size2-Regular":{32:[0,0,0,0,.25],40:[.65002,1.15,0,0,.59722],41:[.65002,1.15,0,0,.59722],47:[.65002,1.15,0,0,.81111],91:[.65002,1.15,0,0,.47222],92:[.65002,1.15,0,0,.81111],93:[.65002,1.15,0,0,.47222],123:[.65002,1.15,0,0,.66667],125:[.65002,1.15,0,0,.66667],160:[0,0,0,0,.25],710:[0,.75,0,0,1],732:[0,.75,0,0,1],770:[0,.75,0,0,1],771:[0,.75,0,0,1],8719:[.55001,1.05,0,0,1.27778],8720:[.55001,1.05,0,0,1.27778],8721:[.55001,1.05,0,0,1.44445],8730:[.65002,1.15,0,0,1],8747:[.86225,1.36,.44445,0,.55556],8748:[.862,1.36,.44445,0,.55556],8749:[.862,1.36,.44445,0,.55556],8750:[.86225,1.36,.44445,0,.55556],8896:[.55001,1.05,0,0,1.11111],8897:[.55001,1.05,0,0,1.11111],8898:[.55001,1.05,0,0,1.11111],8899:[.55001,1.05,0,0,1.11111],8968:[.65002,1.15,0,0,.52778],8969:[.65002,1.15,0,0,.52778],8970:[.65002,1.15,0,0,.52778],8971:[.65002,1.15,0,0,.52778],10216:[.65002,1.15,0,0,.61111],10217:[.65002,1.15,0,0,.61111],10752:[.55001,1.05,0,0,1.51112],10753:[.55001,1.05,0,0,1.51112],10754:[.55001,1.05,0,0,1.51112],10756:[.55001,1.05,0,0,1.11111],10758:[.55001,1.05,0,0,1.11111]},"Size3-Regular":{32:[0,0,0,0,.25],40:[.95003,1.45,0,0,.73611],41:[.95003,1.45,0,0,.73611],47:[.95003,1.45,0,0,1.04445],91:[.95003,1.45,0,0,.52778],92:[.95003,1.45,0,0,1.04445],93:[.95003,1.45,0,0,.52778],123:[.95003,1.45,0,0,.75],125:[.95003,1.45,0,0,.75],160:[0,0,0,0,.25],710:[0,.75,0,0,1.44445],732:[0,.75,0,0,1.44445],770:[0,.75,0,0,1.44445],771:[0,.75,0,0,1.44445],8730:[.95003,1.45,0,0,1],8968:[.95003,1.45,0,0,.58334],8969:[.95003,1.45,0,0,.58334],8970:[.95003,1.45,0,0,.58334],8971:[.95003,1.45,0,0,.58334],10216:[.95003,1.45,0,0,.75],10217:[.95003,1.45,0,0,.75]},"Size4-Regular":{32:[0,0,0,0,.25],40:[1.25003,1.75,0,0,.79167],41:[1.25003,1.75,0,0,.79167],47:[1.25003,1.75,0,0,1.27778],91:[1.25003,1.75,0,0,.58334],92:[1.25003,1.75,0,0,1.27778],93:[1.25003,1.75,0,0,.58334],123:[1.25003,1.75,0,0,.80556],125:[1.25003,1.75,0,0,.80556],160:[0,0,0,0,.25],710:[0,.825,0,0,1.8889],732:[0,.825,0,0,1.8889],770:[0,.825,0,0,1.8889],771:[0,.825,0,0,1.8889],8730:[1.25003,1.75,0,0,1],8968:[1.25003,1.75,0,0,.63889],8969:[1.25003,1.75,0,0,.63889],8970:[1.25003,1.75,0,0,.63889],8971:[1.25003,1.75,0,0,.63889],9115:[.64502,1.155,0,0,.875],9116:[1e-5,.6,0,0,.875],9117:[.64502,1.155,0,0,.875],9118:[.64502,1.155,0,0,.875],9119:[1e-5,.6,0,0,.875],9120:[.64502,1.155,0,0,.875],9121:[.64502,1.155,0,0,.66667],9122:[-99e-5,.601,0,0,.66667],9123:[.64502,1.155,0,0,.66667],9124:[.64502,1.155,0,0,.66667],9125:[-99e-5,.601,0,0,.66667],9126:[.64502,1.155,0,0,.66667],9127:[1e-5,.9,0,0,.88889],9128:[.65002,1.15,0,0,.88889],9129:[.90001,0,0,0,.88889],9130:[0,.3,0,0,.88889],9131:[1e-5,.9,0,0,.88889],9132:[.65002,1.15,0,0,.88889],9133:[.90001,0,0,0,.88889],9143:[.88502,.915,0,0,1.05556],10216:[1.25003,1.75,0,0,.80556],10217:[1.25003,1.75,0,0,.80556],57344:[-.00499,.605,0,0,1.05556],57345:[-.00499,.605,0,0,1.05556],57680:[0,.12,0,0,.45],57681:[0,.12,0,0,.45],57682:[0,.12,0,0,.45],57683:[0,.12,0,0,.45]},"Typewriter-Regular":{32:[0,0,0,0,.525],33:[0,.61111,0,0,.525],34:[0,.61111,0,0,.525],35:[0,.61111,0,0,.525],36:[.08333,.69444,0,0,.525],37:[.08333,.69444,0,0,.525],38:[0,.61111,0,0,.525],39:[0,.61111,0,0,.525],40:[.08333,.69444,0,0,.525],41:[.08333,.69444,0,0,.525],42:[0,.52083,0,0,.525],43:[-.08056,.53055,0,0,.525],44:[.13889,.125,0,0,.525],45:[-.08056,.53055,0,0,.525],46:[0,.125,0,0,.525],47:[.08333,.69444,0,0,.525],48:[0,.61111,0,0,.525],49:[0,.61111,0,0,.525],50:[0,.61111,0,0,.525],51:[0,.61111,0,0,.525],52:[0,.61111,0,0,.525],53:[0,.61111,0,0,.525],54:[0,.61111,0,0,.525],55:[0,.61111,0,0,.525],56:[0,.61111,0,0,.525],57:[0,.61111,0,0,.525],58:[0,.43056,0,0,.525],59:[.13889,.43056,0,0,.525],60:[-.05556,.55556,0,0,.525],61:[-.19549,.41562,0,0,.525],62:[-.05556,.55556,0,0,.525],63:[0,.61111,0,0,.525],64:[0,.61111,0,0,.525],65:[0,.61111,0,0,.525],66:[0,.61111,0,0,.525],67:[0,.61111,0,0,.525],68:[0,.61111,0,0,.525],69:[0,.61111,0,0,.525],70:[0,.61111,0,0,.525],71:[0,.61111,0,0,.525],72:[0,.61111,0,0,.525],73:[0,.61111,0,0,.525],74:[0,.61111,0,0,.525],75:[0,.61111,0,0,.525],76:[0,.61111,0,0,.525],77:[0,.61111,0,0,.525],78:[0,.61111,0,0,.525],79:[0,.61111,0,0,.525],80:[0,.61111,0,0,.525],81:[.13889,.61111,0,0,.525],82:[0,.61111,0,0,.525],83:[0,.61111,0,0,.525],84:[0,.61111,0,0,.525],85:[0,.61111,0,0,.525],86:[0,.61111,0,0,.525],87:[0,.61111,0,0,.525],88:[0,.61111,0,0,.525],89:[0,.61111,0,0,.525],90:[0,.61111,0,0,.525],91:[.08333,.69444,0,0,.525],92:[.08333,.69444,0,0,.525],93:[.08333,.69444,0,0,.525],94:[0,.61111,0,0,.525],95:[.09514,0,0,0,.525],96:[0,.61111,0,0,.525],97:[0,.43056,0,0,.525],98:[0,.61111,0,0,.525],99:[0,.43056,0,0,.525],100:[0,.61111,0,0,.525],101:[0,.43056,0,0,.525],102:[0,.61111,0,0,.525],103:[.22222,.43056,0,0,.525],104:[0,.61111,0,0,.525],105:[0,.61111,0,0,.525],106:[.22222,.61111,0,0,.525],107:[0,.61111,0,0,.525],108:[0,.61111,0,0,.525],109:[0,.43056,0,0,.525],110:[0,.43056,0,0,.525],111:[0,.43056,0,0,.525],112:[.22222,.43056,0,0,.525],113:[.22222,.43056,0,0,.525],114:[0,.43056,0,0,.525],115:[0,.43056,0,0,.525],116:[0,.55358,0,0,.525],117:[0,.43056,0,0,.525],118:[0,.43056,0,0,.525],119:[0,.43056,0,0,.525],120:[0,.43056,0,0,.525],121:[.22222,.43056,0,0,.525],122:[0,.43056,0,0,.525],123:[.08333,.69444,0,0,.525],124:[.08333,.69444,0,0,.525],125:[.08333,.69444,0,0,.525],126:[0,.61111,0,0,.525],127:[0,.61111,0,0,.525],160:[0,0,0,0,.525],176:[0,.61111,0,0,.525],184:[.19445,0,0,0,.525],305:[0,.43056,0,0,.525],567:[.22222,.43056,0,0,.525],711:[0,.56597,0,0,.525],713:[0,.56555,0,0,.525],714:[0,.61111,0,0,.525],715:[0,.61111,0,0,.525],728:[0,.61111,0,0,.525],730:[0,.61111,0,0,.525],770:[0,.61111,0,0,.525],771:[0,.61111,0,0,.525],776:[0,.61111,0,0,.525],915:[0,.61111,0,0,.525],916:[0,.61111,0,0,.525],920:[0,.61111,0,0,.525],923:[0,.61111,0,0,.525],926:[0,.61111,0,0,.525],928:[0,.61111,0,0,.525],931:[0,.61111,0,0,.525],933:[0,.61111,0,0,.525],934:[0,.61111,0,0,.525],936:[0,.61111,0,0,.525],937:[0,.61111,0,0,.525],8216:[0,.61111,0,0,.525],8217:[0,.61111,0,0,.525],8242:[0,.61111,0,0,.525],9251:[.11111,.21944,0,0,.525]}};let a={slant:[.25,.25,.25],space:[0,0,0],stretch:[0,0,0],shrink:[0,0,0],xHeight:[.431,.431,.431],quad:[1,1.171,1.472],extraSpace:[0,0,0],num1:[.677,.732,.925],num2:[.394,.384,.387],num3:[.444,.471,.504],denom1:[.686,.752,1.025],denom2:[.345,.344,.532],sup1:[.413,.503,.504],sup2:[.363,.431,.404],sup3:[.289,.286,.294],sub1:[.15,.143,.2],sub2:[.247,.286,.4],supDrop:[.386,.353,.494],subDrop:[.05,.071,.1],delim1:[2.39,1.7,1.98],delim2:[1.01,1.157,1.42],axisHeight:[.25,.25,.25],defaultRuleThickness:[.04,.049,.049],bigOpSpacing1:[.111,.111,.111],bigOpSpacing2:[.166,.166,.166],bigOpSpacing3:[.2,.2,.2],bigOpSpacing4:[.6,.611,.611],bigOpSpacing5:[.1,.143,.143],sqrtRuleThickness:[.04,.04,.04],ptPerEm:[10,10,10],doubleRuleSep:[.2,.2,.2],arrayRuleWidth:[.04,.04,.04],fboxsep:[.3,.3,.3],fboxrule:[.04,.04,.04]},W={"Å":"A","Ð":"D","Þ":"o","å":"a","ð":"d","þ":"o","А":"A","Б":"B","В":"B","Г":"F","Д":"A","Е":"E","Ж":"K","З":"3","И":"N","Й":"N","К":"K","Л":"N","М":"M","Н":"H","О":"O","П":"N","Р":"P","С":"C","Т":"T","У":"y","Ф":"O","Х":"X","Ц":"U","Ч":"h","Ш":"W","Щ":"W","Ъ":"B","Ы":"X","Ь":"B","Э":"3","Ю":"X","Я":"R","а":"a","б":"b","в":"a","г":"r","д":"y","е":"e","ж":"m","з":"e","и":"n","й":"n","к":"n","л":"n","м":"m","н":"n","о":"o","п":"n","р":"p","с":"c","т":"o","у":"y","ф":"b","х":"x","ц":"n","ч":"n","ш":"w","щ":"w","ъ":"a","ы":"m","ь":"a","э":"e","ю":"m","я":"r"};function r0(e,t,r){if(!xt[t])throw new Error("Font metrics not found for font: "+t+".");let n=e.charCodeAt(0),a=xt[t][n];if(!a&&e[0]in W&&(n=W[e[0]].charCodeAt(0),a=xt[t][n]),a||"text"!==r||t0(n)&&(a=xt[t][77]),a)return{depth:a[0],height:a[1],italic:a[2],skew:a[3],width:a[4]}}function n0(e,t){return t.size<2?e:j[e-1][t.size-1]}let i={},j=[[1,1,1],[2,1,1],[3,1,1],[4,2,1],[5,2,1],[6,3,1],[7,4,2],[8,6,3],[9,7,6],[10,8,7],[11,10,9]],_=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488];class wr{constructor(e){this.style=void 0,this.color=void 0,this.size=void 0,this.textSize=void 0,this.phantom=void 0,this.font=void 0,this.fontFamily=void 0,this.fontWeight=void 0,this.fontShape=void 0,this.sizeMultiplier=void 0,this.maxSize=void 0,this.minRuleThickness=void 0,this._fontMetrics=void 0,this.style=e.style,this.color=e.color,this.size=e.size||wr.BASESIZE,this.textSize=e.textSize||this.size,this.phantom=!!e.phantom,this.font=e.font||"",this.fontFamily=e.fontFamily||"",this.fontWeight=e.fontWeight||"",this.fontShape=e.fontShape||"",this.sizeMultiplier=_[this.size-1],this.maxSize=e.maxSize,this.minRuleThickness=e.minRuleThickness,this._fontMetrics=void 0}extend(e){var t,r={style:this.style,size:this.size,textSize:this.textSize,color:this.color,phantom:this.phantom,font:this.font,fontFamily:this.fontFamily,fontWeight:this.fontWeight,fontShape:this.fontShape,maxSize:this.maxSize,minRuleThickness:this.minRuleThickness};for(t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);return new wr(r)}havingStyle(e){return this.style===e?this:this.extend({style:e,size:n0(this.textSize,e)})}havingCrampedStyle(){return this.havingStyle(this.style.cramp())}havingSize(e){return this.size===e&&this.textSize===e?this:this.extend({style:this.style.text(),size:e,textSize:e,sizeMultiplier:_[e-1]})}havingBaseStyle(e){e=e||this.style.text();var t=n0(wr.BASESIZE,e);return this.size===t&&this.textSize===wr.BASESIZE&&this.style===e?this:this.extend({style:e,size:t})}havingBaseSizing(){let e;switch(this.style.id){case 4:case 5:e=3;break;case 6:case 7:e=1;break;default:e=6}return this.extend({style:this.style.text(),size:e})}withColor(e){return this.extend({color:e})}withPhantom(){return this.extend({phantom:!0})}withFont(e){return this.extend({font:e})}withTextFontFamily(e){return this.extend({fontFamily:e,font:""})}withTextFontWeight(e){return this.extend({fontWeight:e,font:""})}withTextFontShape(e){return this.extend({fontShape:e,font:""})}sizingClasses(e){return e.size!==this.size?["sizing","reset-size"+e.size,"size"+this.size]:[]}baseSizingClasses(){return this.size!==wr.BASESIZE?["sizing","reset-size"+this.size,"size"+wr.BASESIZE]:[]}fontMetrics(){return this._fontMetrics||(this._fontMetrics=(e=>{var t=5<=e?0:3<=e?1:2;if(!i[t]){var r,n=i[t]={cssEmPerMu:a.quad[t]/18};for(r in a)a.hasOwnProperty(r)&&(n[r]=a[r][t])}return i[t]})(this.size)),this._fontMetrics}getColor(){return this.phantom?"transparent":this.color}}wr.BASESIZE=6;var a0=wr;function i0(e){return(e="string"!=typeof e?e.unit:e)in o||e in $||"ex"===e}function wt(e,t){let r;if(e.unit in o)r=o[e.unit]/t.fontMetrics().ptPerEm/t.sizeMultiplier;else if("mu"===e.unit)r=t.fontMetrics().cssEmPerMu;else{var n=t.style.isTight()?t.havingStyle(t.style.text()):t;if("ex"===e.unit)r=n.fontMetrics().xHeight;else{if("em"!==e.unit)throw new ft("Invalid unit: '"+e.unit+"'");r=n.fontMetrics().quad}n!==t&&(r*=n.sizeMultiplier/t.sizeMultiplier)}return Math.min(e.number*r,t.maxSize)}function o0(e){return e.filter(e=>e).join(" ")}function s0(e,t,r){this.classes=e||[],this.attributes={},this.height=0,this.depth=0,this.maxFontSize=0,this.style=r||{},t&&(t.style.isTight()&&this.classes.push("mtight"),e=t.getColor())&&(this.style.color=e)}function l0(e){var t,r,n=document.createElement(e);for(t in n.className=o0(this.classes),this.style)this.style.hasOwnProperty(t)&&(n.style[t]=this.style[t]);for(r in this.attributes)this.attributes.hasOwnProperty(r)&&n.setAttribute(r,this.attributes[r]);for(let e=0;e<this.children.length;e++)n.appendChild(this.children[e].toNode());return n}function h0(e){let t="<"+e,r=(this.classes.length&&(t+=' class="'+bt.escape(o0(this.classes))+'"'),"");for(var n in this.style)this.style.hasOwnProperty(n)&&(r+=bt.hyphenate(n)+":"+this.style[n]+";");for(var a in r&&(t+=' style="'+bt.escape(r)+'"'),this.attributes)if(this.attributes.hasOwnProperty(a)){if(Z.test(a))throw new ft("Invalid attribute name '"+a+"'");t+=" "+a+'="'+bt.escape(this.attributes[a])+'"'}t+=">";for(let e=0;e<this.children.length;e++)t+=this.children[e].toMarkup();return t+="</"+e+">"}let o={pt:1,mm:7227/2540,cm:7227/254,in:72.27,bp:1.00375,pc:12,dd:1238/1157,cc:14856/1157,nd:685/642,nc:1370/107,sp:1/65536,px:1.00375},$={ex:!0,em:!0,mu:!0},D=function(e){return+e.toFixed(4)+"em"},Z=/[\s"'>/=\x00-\x1f]/;class vr{constructor(e,t,r,n){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.width=void 0,this.maxFontSize=void 0,this.style=void 0,s0.call(this,e,r,n),this.children=t||[]}setAttribute(e,t){this.attributes[e]=t}hasClass(e){return bt.contains(this.classes,e)}toNode(){return l0.call(this,"span")}toMarkup(){return h0.call(this,"span")}}class kr{constructor(e,t,r,n){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,s0.call(this,t,n),this.children=r||[],this.setAttribute("href",e)}setAttribute(e,t){this.attributes[e]=t}hasClass(e){return bt.contains(this.classes,e)}toNode(){return l0.call(this,"a")}toMarkup(){return h0.call(this,"a")}}class Sr{constructor(e,t,r){this.src=void 0,this.alt=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.alt=t,this.src=e,this.classes=["mord"],this.style=r}hasClass(e){return bt.contains(this.classes,e)}toNode(){var e,t=document.createElement("img");for(e in t.src=this.src,t.alt=this.alt,t.className="mord",this.style)this.style.hasOwnProperty(e)&&(t.style[e]=this.style[e]);return t}toMarkup(){let e='<img src="'+bt.escape(this.src)+'" alt="'+bt.escape(this.alt)+'"',t="";for(var r in this.style)this.style.hasOwnProperty(r)&&(t+=bt.hyphenate(r)+":"+this.style[r]+";");return t&&(e+=' style="'+bt.escape(t)+'"'),e+="'/>"}}let K={"î":"ı̂","ï":"ı̈","í":"ı́","ì":"ı̀"};class jt{constructor(e,t,r,n,a,i,o,s){this.text=void 0,this.height=void 0,this.depth=void 0,this.italic=void 0,this.skew=void 0,this.width=void 0,this.maxFontSize=void 0,this.classes=void 0,this.style=void 0,this.text=e,this.height=t||0,this.depth=r||0,this.italic=n||0,this.skew=a||0,this.width=i||0,this.classes=o||[],this.style=s||{},this.maxFontSize=0,(e=(t=>{for(let e=0;e<l.length;e++){var r=l[e];for(let e=0;e<r.blocks.length;e++){var n=r.blocks[e];if(t>=n[0]&&t<=n[1])return r.name}}return null})(this.text.charCodeAt(0)))&&this.classes.push(e+"_fallback"),/[\xee\xef\xed\xec]/.test(this.text)&&(this.text=K[this.text])}hasClass(e){return bt.contains(this.classes,e)}toNode(){let e=document.createTextNode(this.text),t=null;for(var r in 0<this.italic&&((t=document.createElement("span")).style.marginRight=D(this.italic)),0<this.classes.length&&((t=t||document.createElement("span")).className=o0(this.classes)),this.style)this.style.hasOwnProperty(r)&&(t=t||document.createElement("span"),t.style[r]=this.style[r]);return t?(t.appendChild(e),t):e}toMarkup(){let e=!1,t="<span",r=(this.classes.length&&(e=!0,t=(t+=' class="')+bt.escape(o0(this.classes))+'"'),"");for(var n in 0<this.italic&&(r+="margin-right:"+this.italic+"em;"),this.style)this.style.hasOwnProperty(n)&&(r+=bt.hyphenate(n)+":"+this.style[n]+";");r&&(e=!0,t+=' style="'+bt.escape(r)+'"');var a=bt.escape(this.text);return e?t=(t+=">")+a+"</span>":a}}class Mr{constructor(e,t){this.children=void 0,this.attributes=void 0,this.children=e||[],this.attributes=t||{}}toNode(){var e,t=document.createElementNS("http://www.w3.org/2000/svg","svg");for(e in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,e)&&t.setAttribute(e,this.attributes[e]);for(let e=0;e<this.children.length;e++)t.appendChild(this.children[e].toNode());return t}toMarkup(){let t='<svg xmlns="http://www.w3.org/2000/svg"';for(var e in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,e)&&(t+=" "+e+'="'+bt.escape(this.attributes[e])+'"');t+=">";for(let e=0;e<this.children.length;e++)t+=this.children[e].toMarkup();return t+="</svg>"}}class zr{constructor(e,t){this.pathName=void 0,this.alternate=void 0,this.pathName=e,this.alternate=t}toNode(){var e=document.createElementNS("http://www.w3.org/2000/svg","path");return this.alternate?e.setAttribute("d",this.alternate):e.setAttribute("d",X[this.pathName]),e}toMarkup(){return this.alternate?'<path d="'+bt.escape(this.alternate)+'"/>':'<path d="'+bt.escape(X[this.pathName])+'"/>'}}class Ar{constructor(e){this.attributes=void 0,this.attributes=e||{}}toNode(){var e,t=document.createElementNS("http://www.w3.org/2000/svg","line");for(e in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,e)&&t.setAttribute(e,this.attributes[e]);return t}toMarkup(){let e="<line";for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&(e+=" "+t+'="'+bt.escape(this.attributes[t])+'"');return e+="/>"}}function m0(e){if(e instanceof jt)return e;throw new Error("Expected symbolNode but got "+String(e)+".")}let J={bin:1,close:1,inner:1,open:1,punct:1,rel:1},Q={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1},s={math:{},text:{}};var vt=s;function kt(e,t,r,n,a,i){s[e][a]={font:t,group:r,replace:n},i&&n&&(s[e][n]=s[e][a])}var St="math",Mt="text",zt="main",At="ams",Tt="accent-token",Bt="bin",Ct="close",c0="inner",Nt="mathord",qt="op-token",It="open",p0="punct",Rt="rel",Ht="spacing",Ot="textord";kt(St,zt,Rt,"≡","\\equiv",!0),kt(St,zt,Rt,"≺","\\prec",!0),kt(St,zt,Rt,"≻","\\succ",!0),kt(St,zt,Rt,"∼","\\sim",!0),kt(St,zt,Rt,"⊥","\\perp"),kt(St,zt,Rt,"⪯","\\preceq",!0),kt(St,zt,Rt,"⪰","\\succeq",!0),kt(St,zt,Rt,"≃","\\simeq",!0),kt(St,zt,Rt,"∣","\\mid",!0),kt(St,zt,Rt,"≪","\\ll",!0),kt(St,zt,Rt,"≫","\\gg",!0),kt(St,zt,Rt,"≍","\\asymp",!0),kt(St,zt,Rt,"∥","\\parallel"),kt(St,zt,Rt,"⋈","\\bowtie",!0),kt(St,zt,Rt,"⌣","\\smile",!0),kt(St,zt,Rt,"⊑","\\sqsubseteq",!0),kt(St,zt,Rt,"⊒","\\sqsupseteq",!0),kt(St,zt,Rt,"≐","\\doteq",!0),kt(St,zt,Rt,"⌢","\\frown",!0),kt(St,zt,Rt,"∋","\\ni",!0),kt(St,zt,Rt,"∝","\\propto",!0),kt(St,zt,Rt,"⊢","\\vdash",!0),kt(St,zt,Rt,"⊣","\\dashv",!0),kt(St,zt,Rt,"∋","\\owns"),kt(St,zt,p0,".","\\ldotp"),kt(St,zt,p0,"⋅","\\cdotp"),kt(St,zt,Ot,"#","\\#"),kt(Mt,zt,Ot,"#","\\#"),kt(St,zt,Ot,"&","\\&"),kt(Mt,zt,Ot,"&","\\&"),kt(St,zt,Ot,"ℵ","\\aleph",!0),kt(St,zt,Ot,"∀","\\forall",!0),kt(St,zt,Ot,"ℏ","\\hbar",!0),kt(St,zt,Ot,"∃","\\exists",!0),kt(St,zt,Ot,"∇","\\nabla",!0),kt(St,zt,Ot,"♭","\\flat",!0),kt(St,zt,Ot,"ℓ","\\ell",!0),kt(St,zt,Ot,"♮","\\natural",!0),kt(St,zt,Ot,"♣","\\clubsuit",!0),kt(St,zt,Ot,"℘","\\wp",!0),kt(St,zt,Ot,"♯","\\sharp",!0),kt(St,zt,Ot,"♢","\\diamondsuit",!0),kt(St,zt,Ot,"ℜ","\\Re",!0),kt(St,zt,Ot,"♡","\\heartsuit",!0),kt(St,zt,Ot,"ℑ","\\Im",!0),kt(St,zt,Ot,"♠","\\spadesuit",!0),kt(St,zt,Ot,"§","\\S",!0),kt(Mt,zt,Ot,"§","\\S"),kt(St,zt,Ot,"¶","\\P",!0),kt(Mt,zt,Ot,"¶","\\P"),kt(St,zt,Ot,"†","\\dag"),kt(Mt,zt,Ot,"†","\\dag"),kt(Mt,zt,Ot,"†","\\textdagger"),kt(St,zt,Ot,"‡","\\ddag"),kt(Mt,zt,Ot,"‡","\\ddag"),kt(Mt,zt,Ot,"‡","\\textdaggerdbl"),kt(St,zt,Ct,"⎱","\\rmoustache",!0),kt(St,zt,It,"⎰","\\lmoustache",!0),kt(St,zt,Ct,"⟯","\\rgroup",!0),kt(St,zt,It,"⟮","\\lgroup",!0),kt(St,zt,Bt,"∓","\\mp",!0),kt(St,zt,Bt,"⊖","\\ominus",!0),kt(St,zt,Bt,"⊎","\\uplus",!0),kt(St,zt,Bt,"⊓","\\sqcap",!0),kt(St,zt,Bt,"∗","\\ast"),kt(St,zt,Bt,"⊔","\\sqcup",!0),kt(St,zt,Bt,"◯","\\bigcirc",!0),kt(St,zt,Bt,"∙","\\bullet",!0),kt(St,zt,Bt,"‡","\\ddagger"),kt(St,zt,Bt,"≀","\\wr",!0),kt(St,zt,Bt,"⨿","\\amalg"),kt(St,zt,Bt,"&","\\And"),kt(St,zt,Rt,"⟵","\\longleftarrow",!0),kt(St,zt,Rt,"⇐","\\Leftarrow",!0),kt(St,zt,Rt,"⟸","\\Longleftarrow",!0),kt(St,zt,Rt,"⟶","\\longrightarrow",!0),kt(St,zt,Rt,"⇒","\\Rightarrow",!0),kt(St,zt,Rt,"⟹","\\Longrightarrow",!0),kt(St,zt,Rt,"↔","\\leftrightarrow",!0),kt(St,zt,Rt,"⟷","\\longleftrightarrow",!0),kt(St,zt,Rt,"⇔","\\Leftrightarrow",!0),kt(St,zt,Rt,"⟺","\\Longleftrightarrow",!0),kt(St,zt,Rt,"↦","\\mapsto",!0),kt(St,zt,Rt,"⟼","\\longmapsto",!0),kt(St,zt,Rt,"↗","\\nearrow",!0),kt(St,zt,Rt,"↩","\\hookleftarrow",!0),kt(St,zt,Rt,"↪","\\hookrightarrow",!0),kt(St,zt,Rt,"↘","\\searrow",!0),kt(St,zt,Rt,"↼","\\leftharpoonup",!0),kt(St,zt,Rt,"⇀","\\rightharpoonup",!0),kt(St,zt,Rt,"↙","\\swarrow",!0),kt(St,zt,Rt,"↽","\\leftharpoondown",!0),kt(St,zt,Rt,"⇁","\\rightharpoondown",!0),kt(St,zt,Rt,"↖","\\nwarrow",!0),kt(St,zt,Rt,"⇌","\\rightleftharpoons",!0),kt(St,At,Rt,"≮","\\nless",!0),kt(St,At,Rt,"","\\@nleqslant"),kt(St,At,Rt,"","\\@nleqq"),kt(St,At,Rt,"⪇","\\lneq",!0),kt(St,At,Rt,"≨","\\lneqq",!0),kt(St,At,Rt,"","\\@lvertneqq"),kt(St,At,Rt,"⋦","\\lnsim",!0),kt(St,At,Rt,"⪉","\\lnapprox",!0),kt(St,At,Rt,"⊀","\\nprec",!0),kt(St,At,Rt,"⋠","\\npreceq",!0),kt(St,At,Rt,"⋨","\\precnsim",!0),kt(St,At,Rt,"⪹","\\precnapprox",!0),kt(St,At,Rt,"≁","\\nsim",!0),kt(St,At,Rt,"","\\@nshortmid"),kt(St,At,Rt,"∤","\\nmid",!0),kt(St,At,Rt,"⊬","\\nvdash",!0),kt(St,At,Rt,"⊭","\\nvDash",!0),kt(St,At,Rt,"⋪","\\ntriangleleft"),kt(St,At,Rt,"⋬","\\ntrianglelefteq",!0),kt(St,At,Rt,"⊊","\\subsetneq",!0),kt(St,At,Rt,"","\\@varsubsetneq"),kt(St,At,Rt,"⫋","\\subsetneqq",!0),kt(St,At,Rt,"","\\@varsubsetneqq"),kt(St,At,Rt,"≯","\\ngtr",!0),kt(St,At,Rt,"","\\@ngeqslant"),kt(St,At,Rt,"","\\@ngeqq"),kt(St,At,Rt,"⪈","\\gneq",!0),kt(St,At,Rt,"≩","\\gneqq",!0),kt(St,At,Rt,"","\\@gvertneqq"),kt(St,At,Rt,"⋧","\\gnsim",!0),kt(St,At,Rt,"⪊","\\gnapprox",!0),kt(St,At,Rt,"⊁","\\nsucc",!0),kt(St,At,Rt,"⋡","\\nsucceq",!0),kt(St,At,Rt,"⋩","\\succnsim",!0),kt(St,At,Rt,"⪺","\\succnapprox",!0),kt(St,At,Rt,"≆","\\ncong",!0),kt(St,At,Rt,"","\\@nshortparallel"),kt(St,At,Rt,"∦","\\nparallel",!0),kt(St,At,Rt,"⊯","\\nVDash",!0),kt(St,At,Rt,"⋫","\\ntriangleright"),kt(St,At,Rt,"⋭","\\ntrianglerighteq",!0),kt(St,At,Rt,"","\\@nsupseteqq"),kt(St,At,Rt,"⊋","\\supsetneq",!0),kt(St,At,Rt,"","\\@varsupsetneq"),kt(St,At,Rt,"⫌","\\supsetneqq",!0),kt(St,At,Rt,"","\\@varsupsetneqq"),kt(St,At,Rt,"⊮","\\nVdash",!0),kt(St,At,Rt,"⪵","\\precneqq",!0),kt(St,At,Rt,"⪶","\\succneqq",!0),kt(St,At,Rt,"","\\@nsubseteqq"),kt(St,At,Bt,"⊴","\\unlhd"),kt(St,At,Bt,"⊵","\\unrhd"),kt(St,At,Rt,"↚","\\nleftarrow",!0),kt(St,At,Rt,"↛","\\nrightarrow",!0),kt(St,At,Rt,"⇍","\\nLeftarrow",!0),kt(St,At,Rt,"⇏","\\nRightarrow",!0),kt(St,At,Rt,"↮","\\nleftrightarrow",!0),kt(St,At,Rt,"⇎","\\nLeftrightarrow",!0),kt(St,At,Rt,"△","\\vartriangle"),kt(St,At,Ot,"ℏ","\\hslash"),kt(St,At,Ot,"▽","\\triangledown"),kt(St,At,Ot,"◊","\\lozenge"),kt(St,At,Ot,"Ⓢ","\\circledS"),kt(St,At,Ot,"®","\\circledR"),kt(Mt,At,Ot,"®","\\circledR"),kt(St,At,Ot,"∡","\\measuredangle",!0),kt(St,At,Ot,"∄","\\nexists"),kt(St,At,Ot,"℧","\\mho"),kt(St,At,Ot,"Ⅎ","\\Finv",!0),kt(St,At,Ot,"⅁","\\Game",!0),kt(St,At,Ot,"‵","\\backprime"),kt(St,At,Ot,"▲","\\blacktriangle"),kt(St,At,Ot,"▼","\\blacktriangledown"),kt(St,At,Ot,"■","\\blacksquare"),kt(St,At,Ot,"⧫","\\blacklozenge"),kt(St,At,Ot,"★","\\bigstar"),kt(St,At,Ot,"∢","\\sphericalangle",!0),kt(St,At,Ot,"∁","\\complement",!0),kt(St,At,Ot,"ð","\\eth",!0),kt(Mt,zt,Ot,"ð","ð"),kt(St,At,Ot,"╱","\\diagup"),kt(St,At,Ot,"╲","\\diagdown"),kt(St,At,Ot,"□","\\square"),kt(St,At,Ot,"□","\\Box"),kt(St,At,Ot,"◊","\\Diamond"),kt(St,At,Ot,"¥","\\yen",!0),kt(Mt,At,Ot,"¥","\\yen",!0),kt(St,At,Ot,"✓","\\checkmark",!0),kt(Mt,At,Ot,"✓","\\checkmark"),kt(St,At,Ot,"ℶ","\\beth",!0),kt(St,At,Ot,"ℸ","\\daleth",!0),kt(St,At,Ot,"ℷ","\\gimel",!0),kt(St,At,Ot,"ϝ","\\digamma",!0),kt(St,At,Ot,"ϰ","\\varkappa"),kt(St,At,It,"┌","\\@ulcorner",!0),kt(St,At,Ct,"┐","\\@urcorner",!0),kt(St,At,It,"└","\\@llcorner",!0),kt(St,At,Ct,"┘","\\@lrcorner",!0),kt(St,At,Rt,"≦","\\leqq",!0),kt(St,At,Rt,"⩽","\\leqslant",!0),kt(St,At,Rt,"⪕","\\eqslantless",!0),kt(St,At,Rt,"≲","\\lesssim",!0),kt(St,At,Rt,"⪅","\\lessapprox",!0),kt(St,At,Rt,"≊","\\approxeq",!0),kt(St,At,Bt,"⋖","\\lessdot"),kt(St,At,Rt,"⋘","\\lll",!0),kt(St,At,Rt,"≶","\\lessgtr",!0),kt(St,At,Rt,"⋚","\\lesseqgtr",!0),kt(St,At,Rt,"⪋","\\lesseqqgtr",!0),kt(St,At,Rt,"≑","\\doteqdot"),kt(St,At,Rt,"≓","\\risingdotseq",!0),kt(St,At,Rt,"≒","\\fallingdotseq",!0),kt(St,At,Rt,"∽","\\backsim",!0),kt(St,At,Rt,"⋍","\\backsimeq",!0),kt(St,At,Rt,"⫅","\\subseteqq",!0),kt(St,At,Rt,"⋐","\\Subset",!0),kt(St,At,Rt,"⊏","\\sqsubset",!0),kt(St,At,Rt,"≼","\\preccurlyeq",!0),kt(St,At,Rt,"⋞","\\curlyeqprec",!0),kt(St,At,Rt,"≾","\\precsim",!0),kt(St,At,Rt,"⪷","\\precapprox",!0),kt(St,At,Rt,"⊲","\\vartriangleleft"),kt(St,At,Rt,"⊴","\\trianglelefteq"),kt(St,At,Rt,"⊨","\\vDash",!0),kt(St,At,Rt,"⊪","\\Vvdash",!0),kt(St,At,Rt,"⌣","\\smallsmile"),kt(St,At,Rt,"⌢","\\smallfrown"),kt(St,At,Rt,"≏","\\bumpeq",!0),kt(St,At,Rt,"≎","\\Bumpeq",!0),kt(St,At,Rt,"≧","\\geqq",!0),kt(St,At,Rt,"⩾","\\geqslant",!0),kt(St,At,Rt,"⪖","\\eqslantgtr",!0),kt(St,At,Rt,"≳","\\gtrsim",!0),kt(St,At,Rt,"⪆","\\gtrapprox",!0),kt(St,At,Bt,"⋗","\\gtrdot"),kt(St,At,Rt,"⋙","\\ggg",!0),kt(St,At,Rt,"≷","\\gtrless",!0),kt(St,At,Rt,"⋛","\\gtreqless",!0),kt(St,At,Rt,"⪌","\\gtreqqless",!0),kt(St,At,Rt,"≖","\\eqcirc",!0),kt(St,At,Rt,"≗","\\circeq",!0),kt(St,At,Rt,"≜","\\triangleq",!0),kt(St,At,Rt,"∼","\\thicksim"),kt(St,At,Rt,"≈","\\thickapprox"),kt(St,At,Rt,"⫆","\\supseteqq",!0),kt(St,At,Rt,"⋑","\\Supset",!0),kt(St,At,Rt,"⊐","\\sqsupset",!0),kt(St,At,Rt,"≽","\\succcurlyeq",!0),kt(St,At,Rt,"⋟","\\curlyeqsucc",!0),kt(St,At,Rt,"≿","\\succsim",!0),kt(St,At,Rt,"⪸","\\succapprox",!0),kt(St,At,Rt,"⊳","\\vartriangleright"),kt(St,At,Rt,"⊵","\\trianglerighteq"),kt(St,At,Rt,"⊩","\\Vdash",!0),kt(St,At,Rt,"∣","\\shortmid"),kt(St,At,Rt,"∥","\\shortparallel"),kt(St,At,Rt,"≬","\\between",!0),kt(St,At,Rt,"⋔","\\pitchfork",!0),kt(St,At,Rt,"∝","\\varpropto"),kt(St,At,Rt,"◀","\\blacktriangleleft"),kt(St,At,Rt,"∴","\\therefore",!0),kt(St,At,Rt,"∍","\\backepsilon"),kt(St,At,Rt,"▶","\\blacktriangleright"),kt(St,At,Rt,"∵","\\because",!0),kt(St,At,Rt,"⋘","\\llless"),kt(St,At,Rt,"⋙","\\gggtr"),kt(St,At,Bt,"⊲","\\lhd"),kt(St,At,Bt,"⊳","\\rhd"),kt(St,At,Rt,"≂","\\eqsim",!0),kt(St,zt,Rt,"⋈","\\Join"),kt(St,At,Rt,"≑","\\Doteq",!0),kt(St,At,Bt,"∔","\\dotplus",!0),kt(St,At,Bt,"∖","\\smallsetminus"),kt(St,At,Bt,"⋒","\\Cap",!0),kt(St,At,Bt,"⋓","\\Cup",!0),kt(St,At,Bt,"⩞","\\doublebarwedge",!0),kt(St,At,Bt,"⊟","\\boxminus",!0),kt(St,At,Bt,"⊞","\\boxplus",!0),kt(St,At,Bt,"⋇","\\divideontimes",!0),kt(St,At,Bt,"⋉","\\ltimes",!0),kt(St,At,Bt,"⋊","\\rtimes",!0),kt(St,At,Bt,"⋋","\\leftthreetimes",!0),kt(St,At,Bt,"⋌","\\rightthreetimes",!0),kt(St,At,Bt,"⋏","\\curlywedge",!0),kt(St,At,Bt,"⋎","\\curlyvee",!0),kt(St,At,Bt,"⊝","\\circleddash",!0),kt(St,At,Bt,"⊛","\\circledast",!0),kt(St,At,Bt,"⋅","\\centerdot"),kt(St,At,Bt,"⊺","\\intercal",!0),kt(St,At,Bt,"⋒","\\doublecap"),kt(St,At,Bt,"⋓","\\doublecup"),kt(St,At,Bt,"⊠","\\boxtimes",!0),kt(St,At,Rt,"⇢","\\dashrightarrow",!0),kt(St,At,Rt,"⇠","\\dashleftarrow",!0),kt(St,At,Rt,"⇇","\\leftleftarrows",!0),kt(St,At,Rt,"⇆","\\leftrightarrows",!0),kt(St,At,Rt,"⇚","\\Lleftarrow",!0),kt(St,At,Rt,"↞","\\twoheadleftarrow",!0),kt(St,At,Rt,"↢","\\leftarrowtail",!0),kt(St,At,Rt,"↫","\\looparrowleft",!0),kt(St,At,Rt,"⇋","\\leftrightharpoons",!0),kt(St,At,Rt,"↶","\\curvearrowleft",!0),kt(St,At,Rt,"↺","\\circlearrowleft",!0),kt(St,At,Rt,"↰","\\Lsh",!0),kt(St,At,Rt,"⇈","\\upuparrows",!0),kt(St,At,Rt,"↿","\\upharpoonleft",!0),kt(St,At,Rt,"⇃","\\downharpoonleft",!0),kt(St,zt,Rt,"⊶","\\origof",!0),kt(St,zt,Rt,"⊷","\\imageof",!0),kt(St,At,Rt,"⊸","\\multimap",!0),kt(St,At,Rt,"↭","\\leftrightsquigarrow",!0),kt(St,At,Rt,"⇉","\\rightrightarrows",!0),kt(St,At,Rt,"⇄","\\rightleftarrows",!0),kt(St,At,Rt,"↠","\\twoheadrightarrow",!0),kt(St,At,Rt,"↣","\\rightarrowtail",!0),kt(St,At,Rt,"↬","\\looparrowright",!0),kt(St,At,Rt,"↷","\\curvearrowright",!0),kt(St,At,Rt,"↻","\\circlearrowright",!0),kt(St,At,Rt,"↱","\\Rsh",!0),kt(St,At,Rt,"⇊","\\downdownarrows",!0),kt(St,At,Rt,"↾","\\upharpoonright",!0),kt(St,At,Rt,"⇂","\\downharpoonright",!0),kt(St,At,Rt,"⇝","\\rightsquigarrow",!0),kt(St,At,Rt,"⇝","\\leadsto"),kt(St,At,Rt,"⇛","\\Rrightarrow",!0),kt(St,At,Rt,"↾","\\restriction"),kt(St,zt,Ot,"‘","`"),kt(St,zt,Ot,"$","\\$"),kt(Mt,zt,Ot,"$","\\$"),kt(Mt,zt,Ot,"$","\\textdollar"),kt(St,zt,Ot,"%","\\%"),kt(Mt,zt,Ot,"%","\\%"),kt(St,zt,Ot,"_","\\_"),kt(Mt,zt,Ot,"_","\\_"),kt(Mt,zt,Ot,"_","\\textunderscore"),kt(St,zt,Ot,"∠","\\angle",!0),kt(St,zt,Ot,"∞","\\infty",!0),kt(St,zt,Ot,"′","\\prime"),kt(St,zt,Ot,"△","\\triangle"),kt(St,zt,Ot,"Γ","\\Gamma",!0),kt(St,zt,Ot,"Δ","\\Delta",!0),kt(St,zt,Ot,"Θ","\\Theta",!0),kt(St,zt,Ot,"Λ","\\Lambda",!0),kt(St,zt,Ot,"Ξ","\\Xi",!0),kt(St,zt,Ot,"Π","\\Pi",!0),kt(St,zt,Ot,"Σ","\\Sigma",!0),kt(St,zt,Ot,"Υ","\\Upsilon",!0),kt(St,zt,Ot,"Φ","\\Phi",!0),kt(St,zt,Ot,"Ψ","\\Psi",!0),kt(St,zt,Ot,"Ω","\\Omega",!0),kt(St,zt,Ot,"A","Α"),kt(St,zt,Ot,"B","Β"),kt(St,zt,Ot,"E","Ε"),kt(St,zt,Ot,"Z","Ζ"),kt(St,zt,Ot,"H","Η"),kt(St,zt,Ot,"I","Ι"),kt(St,zt,Ot,"K","Κ"),kt(St,zt,Ot,"M","Μ"),kt(St,zt,Ot,"N","Ν"),kt(St,zt,Ot,"O","Ο"),kt(St,zt,Ot,"P","Ρ"),kt(St,zt,Ot,"T","Τ"),kt(St,zt,Ot,"X","Χ"),kt(St,zt,Ot,"¬","\\neg",!0),kt(St,zt,Ot,"¬","\\lnot"),kt(St,zt,Ot,"⊤","\\top"),kt(St,zt,Ot,"⊥","\\bot"),kt(St,zt,Ot,"∅","\\emptyset"),kt(St,At,Ot,"∅","\\varnothing"),kt(St,zt,Nt,"α","\\alpha",!0),kt(St,zt,Nt,"β","\\beta",!0),kt(St,zt,Nt,"γ","\\gamma",!0),kt(St,zt,Nt,"δ","\\delta",!0),kt(St,zt,Nt,"ϵ","\\epsilon",!0),kt(St,zt,Nt,"ζ","\\zeta",!0),kt(St,zt,Nt,"η","\\eta",!0),kt(St,zt,Nt,"θ","\\theta",!0),kt(St,zt,Nt,"ι","\\iota",!0),kt(St,zt,Nt,"κ","\\kappa",!0),kt(St,zt,Nt,"λ","\\lambda",!0),kt(St,zt,Nt,"μ","\\mu",!0),kt(St,zt,Nt,"ν","\\nu",!0),kt(St,zt,Nt,"ξ","\\xi",!0),kt(St,zt,Nt,"ο","\\omicron",!0),kt(St,zt,Nt,"π","\\pi",!0),kt(St,zt,Nt,"ρ","\\rho",!0),kt(St,zt,Nt,"σ","\\sigma",!0),kt(St,zt,Nt,"τ","\\tau",!0),kt(St,zt,Nt,"υ","\\upsilon",!0),kt(St,zt,Nt,"ϕ","\\phi",!0),kt(St,zt,Nt,"χ","\\chi",!0),kt(St,zt,Nt,"ψ","\\psi",!0),kt(St,zt,Nt,"ω","\\omega",!0),kt(St,zt,Nt,"ε","\\varepsilon",!0),kt(St,zt,Nt,"ϑ","\\vartheta",!0),kt(St,zt,Nt,"ϖ","\\varpi",!0),kt(St,zt,Nt,"ϱ","\\varrho",!0),kt(St,zt,Nt,"ς","\\varsigma",!0),kt(St,zt,Nt,"φ","\\varphi",!0),kt(St,zt,Bt,"∗","*",!0),kt(St,zt,Bt,"+","+"),kt(St,zt,Bt,"−","-",!0),kt(St,zt,Bt,"⋅","\\cdot",!0),kt(St,zt,Bt,"∘","\\circ",!0),kt(St,zt,Bt,"÷","\\div",!0),kt(St,zt,Bt,"±","\\pm",!0),kt(St,zt,Bt,"×","\\times",!0),kt(St,zt,Bt,"∩","\\cap",!0),kt(St,zt,Bt,"∪","\\cup",!0),kt(St,zt,Bt,"∖","\\setminus",!0),kt(St,zt,Bt,"∧","\\land"),kt(St,zt,Bt,"∨","\\lor"),kt(St,zt,Bt,"∧","\\wedge",!0),kt(St,zt,Bt,"∨","\\vee",!0),kt(St,zt,Ot,"√","\\surd"),kt(St,zt,It,"⟨","\\langle",!0),kt(St,zt,It,"∣","\\lvert"),kt(St,zt,It,"∥","\\lVert"),kt(St,zt,Ct,"?","?"),kt(St,zt,Ct,"!","!"),kt(St,zt,Ct,"⟩","\\rangle",!0),kt(St,zt,Ct,"∣","\\rvert"),kt(St,zt,Ct,"∥","\\rVert"),kt(St,zt,Rt,"=","="),kt(St,zt,Rt,":",":"),kt(St,zt,Rt,"≈","\\approx",!0),kt(St,zt,Rt,"≅","\\cong",!0),kt(St,zt,Rt,"≥","\\ge"),kt(St,zt,Rt,"≥","\\geq",!0),kt(St,zt,Rt,"←","\\gets"),kt(St,zt,Rt,">","\\gt",!0),kt(St,zt,Rt,"∈","\\in",!0),kt(St,zt,Rt,"","\\@not"),kt(St,zt,Rt,"⊂","\\subset",!0),kt(St,zt,Rt,"⊃","\\supset",!0),kt(St,zt,Rt,"⊆","\\subseteq",!0),kt(St,zt,Rt,"⊇","\\supseteq",!0),kt(St,At,Rt,"⊈","\\nsubseteq",!0),kt(St,At,Rt,"⊉","\\nsupseteq",!0),kt(St,zt,Rt,"⊨","\\models"),kt(St,zt,Rt,"←","\\leftarrow",!0),kt(St,zt,Rt,"≤","\\le"),kt(St,zt,Rt,"≤","\\leq",!0),kt(St,zt,Rt,"<","\\lt",!0),kt(St,zt,Rt,"→","\\rightarrow",!0),kt(St,zt,Rt,"→","\\to"),kt(St,At,Rt,"≱","\\ngeq",!0),kt(St,At,Rt,"≰","\\nleq",!0),kt(St,zt,Ht," ","\\ "),kt(St,zt,Ht," ","\\space"),kt(St,zt,Ht," ","\\nobreakspace"),kt(Mt,zt,Ht," ","\\ "),kt(Mt,zt,Ht," "," "),kt(Mt,zt,Ht," ","\\space"),kt(Mt,zt,Ht," ","\\nobreakspace"),kt(St,zt,Ht,null,"\\nobreak"),kt(St,zt,Ht,null,"\\allowbreak"),kt(St,zt,p0,",",","),kt(St,zt,p0,";",";"),kt(St,At,Bt,"⊼","\\barwedge",!0),kt(St,At,Bt,"⊻","\\veebar",!0),kt(St,zt,Bt,"⊙","\\odot",!0),kt(St,zt,Bt,"⊕","\\oplus",!0),kt(St,zt,Bt,"⊗","\\otimes",!0),kt(St,zt,Ot,"∂","\\partial",!0),kt(St,zt,Bt,"⊘","\\oslash",!0),kt(St,At,Bt,"⊚","\\circledcirc",!0),kt(St,At,Bt,"⊡","\\boxdot",!0),kt(St,zt,Bt,"△","\\bigtriangleup"),kt(St,zt,Bt,"▽","\\bigtriangledown"),kt(St,zt,Bt,"†","\\dagger"),kt(St,zt,Bt,"⋄","\\diamond"),kt(St,zt,Bt,"⋆","\\star"),kt(St,zt,Bt,"◃","\\triangleleft"),kt(St,zt,Bt,"▹","\\triangleright"),kt(St,zt,It,"{","\\{"),kt(Mt,zt,Ot,"{","\\{"),kt(Mt,zt,Ot,"{","\\textbraceleft"),kt(St,zt,Ct,"}","\\}"),kt(Mt,zt,Ot,"}","\\}"),kt(Mt,zt,Ot,"}","\\textbraceright"),kt(St,zt,It,"{","\\lbrace"),kt(St,zt,Ct,"}","\\rbrace"),kt(St,zt,It,"[","\\lbrack",!0),kt(Mt,zt,Ot,"[","\\lbrack",!0),kt(St,zt,Ct,"]","\\rbrack",!0),kt(Mt,zt,Ot,"]","\\rbrack",!0),kt(St,zt,It,"(","\\lparen",!0),kt(St,zt,Ct,")","\\rparen",!0),kt(Mt,zt,Ot,"<","\\textless",!0),kt(Mt,zt,Ot,">","\\textgreater",!0),kt(St,zt,It,"⌊","\\lfloor",!0),kt(St,zt,Ct,"⌋","\\rfloor",!0),kt(St,zt,It,"⌈","\\lceil",!0),kt(St,zt,Ct,"⌉","\\rceil",!0),kt(St,zt,Ot,"\\","\\backslash"),kt(St,zt,Ot,"∣","|"),kt(St,zt,Ot,"∣","\\vert"),kt(Mt,zt,Ot,"|","\\textbar",!0),kt(St,zt,Ot,"∥","\\|"),kt(St,zt,Ot,"∥","\\Vert"),kt(Mt,zt,Ot,"∥","\\textbardbl"),kt(Mt,zt,Ot,"~","\\textasciitilde"),kt(Mt,zt,Ot,"\\","\\textbackslash"),kt(Mt,zt,Ot,"^","\\textasciicircum"),kt(St,zt,Rt,"↑","\\uparrow",!0),kt(St,zt,Rt,"⇑","\\Uparrow",!0),kt(St,zt,Rt,"↓","\\downarrow",!0),kt(St,zt,Rt,"⇓","\\Downarrow",!0),kt(St,zt,Rt,"↕","\\updownarrow",!0),kt(St,zt,Rt,"⇕","\\Updownarrow",!0),kt(St,zt,qt,"∐","\\coprod"),kt(St,zt,qt,"⋁","\\bigvee"),kt(St,zt,qt,"⋀","\\bigwedge"),kt(St,zt,qt,"⨄","\\biguplus"),kt(St,zt,qt,"⋂","\\bigcap"),kt(St,zt,qt,"⋃","\\bigcup"),kt(St,zt,qt,"∫","\\int"),kt(St,zt,qt,"∫","\\intop"),kt(St,zt,qt,"∬","\\iint"),kt(St,zt,qt,"∭","\\iiint"),kt(St,zt,qt,"∏","\\prod"),kt(St,zt,qt,"∑","\\sum"),kt(St,zt,qt,"⨂","\\bigotimes"),kt(St,zt,qt,"⨁","\\bigoplus"),kt(St,zt,qt,"⨀","\\bigodot"),kt(St,zt,qt,"∮","\\oint"),kt(St,zt,qt,"∯","\\oiint"),kt(St,zt,qt,"∰","\\oiiint"),kt(St,zt,qt,"⨆","\\bigsqcup"),kt(St,zt,qt,"∫","\\smallint"),kt(Mt,zt,c0,"…","\\textellipsis"),kt(St,zt,c0,"…","\\mathellipsis"),kt(Mt,zt,c0,"…","\\ldots",!0),kt(St,zt,c0,"…","\\ldots",!0),kt(St,zt,c0,"⋯","\\@cdots",!0),kt(St,zt,c0,"⋱","\\ddots",!0),kt(St,zt,Ot,"⋮","\\varvdots"),kt(Mt,zt,Ot,"⋮","\\varvdots"),kt(St,zt,Tt,"ˊ","\\acute"),kt(St,zt,Tt,"ˋ","\\grave"),kt(St,zt,Tt,"¨","\\ddot"),kt(St,zt,Tt,"~","\\tilde"),kt(St,zt,Tt,"ˉ","\\bar"),kt(St,zt,Tt,"˘","\\breve"),kt(St,zt,Tt,"ˇ","\\check"),kt(St,zt,Tt,"^","\\hat"),kt(St,zt,Tt,"⃗","\\vec"),kt(St,zt,Tt,"˙","\\dot"),kt(St,zt,Tt,"˚","\\mathring"),kt(St,zt,Nt,"","\\@imath"),kt(St,zt,Nt,"","\\@jmath"),kt(St,zt,Ot,"ı","ı"),kt(St,zt,Ot,"ȷ","ȷ"),kt(Mt,zt,Ot,"ı","\\i",!0),kt(Mt,zt,Ot,"ȷ","\\j",!0),kt(Mt,zt,Ot,"ß","\\ss",!0),kt(Mt,zt,Ot,"æ","\\ae",!0),kt(Mt,zt,Ot,"œ","\\oe",!0),kt(Mt,zt,Ot,"ø","\\o",!0),kt(Mt,zt,Ot,"Æ","\\AE",!0),kt(Mt,zt,Ot,"Œ","\\OE",!0),kt(Mt,zt,Ot,"Ø","\\O",!0),kt(Mt,zt,Tt,"ˊ","\\'"),kt(Mt,zt,Tt,"ˋ","\\`"),kt(Mt,zt,Tt,"ˆ","\\^"),kt(Mt,zt,Tt,"˜","\\~"),kt(Mt,zt,Tt,"ˉ","\\="),kt(Mt,zt,Tt,"˘","\\u"),kt(Mt,zt,Tt,"˙","\\."),kt(Mt,zt,Tt,"¸","\\c"),kt(Mt,zt,Tt,"˚","\\r"),kt(Mt,zt,Tt,"ˇ","\\v"),kt(Mt,zt,Tt,"¨",'\\"'),kt(Mt,zt,Tt,"˝","\\H"),kt(Mt,zt,Tt,"◯","\\textcircled");let ee={"--":!0,"---":!0,"``":!0,"''":!0};kt(Mt,zt,Ot,"–","--",!0),kt(Mt,zt,Ot,"–","\\textendash"),kt(Mt,zt,Ot,"—","---",!0),kt(Mt,zt,Ot,"—","\\textemdash"),kt(Mt,zt,Ot,"‘","`",!0),kt(Mt,zt,Ot,"‘","\\textquoteleft"),kt(Mt,zt,Ot,"’","'",!0),kt(Mt,zt,Ot,"’","\\textquoteright"),kt(Mt,zt,Ot,"“","``",!0),kt(Mt,zt,Ot,"“","\\textquotedblleft"),kt(Mt,zt,Ot,"”","''",!0),kt(Mt,zt,Ot,"”","\\textquotedblright"),kt(St,zt,Ot,"°","\\degree",!0),kt(Mt,zt,Ot,"°","\\degree"),kt(Mt,zt,Ot,"°","\\textdegree",!0),kt(St,zt,Ot,"£","\\pounds"),kt(St,zt,Ot,"£","\\mathsterling",!0),kt(Mt,zt,Ot,"£","\\pounds"),kt(Mt,zt,Ot,"£","\\textsterling",!0),kt(St,At,Ot,"✠","\\maltese"),kt(Mt,At,Ot,"✠","\\maltese");for(let e=0;e<14;e++){var d0='0123456789/@."'.charAt(e);kt(St,zt,Ot,d0,d0)}for(let e=0;e<25;e++){var u0='0123456789!@*()-=+";:?/.,'.charAt(e);kt(Mt,zt,Ot,u0,u0)}var g0="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";for(let e=0;e<52;e++){var f0=g0.charAt(e);kt(St,zt,Nt,f0,f0),kt(Mt,zt,Ot,f0,f0)}kt(St,At,Ot,"C","ℂ"),kt(Mt,At,Ot,"C","ℂ"),kt(St,At,Ot,"H","ℍ"),kt(Mt,At,Ot,"H","ℍ"),kt(St,At,Ot,"N","ℕ"),kt(Mt,At,Ot,"N","ℕ"),kt(St,At,Ot,"P","ℙ"),kt(Mt,At,Ot,"P","ℙ"),kt(St,At,Ot,"Q","ℚ"),kt(Mt,At,Ot,"Q","ℚ"),kt(St,At,Ot,"R","ℝ"),kt(Mt,At,Ot,"R","ℝ"),kt(St,At,Ot,"Z","ℤ"),kt(Mt,At,Ot,"Z","ℤ"),kt(St,zt,Nt,"h","ℎ"),kt(Mt,zt,Nt,"h","ℎ");let t="";for(let e=0;e<52;e++){var Et=g0.charAt(e);kt(St,zt,Nt,Et,t=String.fromCharCode(55349,56320+e)),kt(Mt,zt,Ot,Et,t),kt(St,zt,Nt,Et,t=String.fromCharCode(55349,56372+e)),kt(Mt,zt,Ot,Et,t),kt(St,zt,Nt,Et,t=String.fromCharCode(55349,56424+e)),kt(Mt,zt,Ot,Et,t),kt(St,zt,Nt,Et,t=String.fromCharCode(55349,56580+e)),kt(Mt,zt,Ot,Et,t),kt(St,zt,Nt,Et,t=String.fromCharCode(55349,56684+e)),kt(Mt,zt,Ot,Et,t),kt(St,zt,Nt,Et,t=String.fromCharCode(55349,56736+e)),kt(Mt,zt,Ot,Et,t),kt(St,zt,Nt,Et,t=String.fromCharCode(55349,56788+e)),kt(Mt,zt,Ot,Et,t),kt(St,zt,Nt,Et,t=String.fromCharCode(55349,56840+e)),kt(Mt,zt,Ot,Et,t),kt(St,zt,Nt,Et,t=String.fromCharCode(55349,56944+e)),kt(Mt,zt,Ot,Et,t),e<26&&(kt(St,zt,Nt,Et,t=String.fromCharCode(55349,56632+e)),kt(Mt,zt,Ot,Et,t),kt(St,zt,Nt,Et,t=String.fromCharCode(55349,56476+e)),kt(Mt,zt,Ot,Et,t))}kt(St,zt,Nt,"k",t=String.fromCharCode(55349,56668)),kt(Mt,zt,Ot,"k",t);for(let e=0;e<10;e++){var b0=e.toString();kt(St,zt,Nt,b0,t=String.fromCharCode(55349,57294+e)),kt(Mt,zt,Ot,b0,t),kt(St,zt,Nt,b0,t=String.fromCharCode(55349,57314+e)),kt(Mt,zt,Ot,b0,t),kt(St,zt,Nt,b0,t=String.fromCharCode(55349,57324+e)),kt(Mt,zt,Ot,b0,t),kt(St,zt,Nt,b0,t=String.fromCharCode(55349,57334+e)),kt(Mt,zt,Ot,b0,t)}for(let e=0;e<3;e++){var y0="ÐÞþ".charAt(e);kt(St,zt,Nt,y0,y0),kt(Mt,zt,Ot,y0,y0)}function x0(e,t,r){return{value:e=vt[r][e]&&vt[r][e].replace?vt[r][e].replace:e,metrics:r0(e,t,r)}}function Lt(t,e,r,n,a){let i=x0(t,e,r),o=i.metrics,s;if(t=i.value,o){let e=o.italic;("text"===r||n&&"mathit"===n.font)&&(e=0),s=new jt(t,o.height,o.depth,e,o.skew,o.width,a)}else"undefined"!=typeof console&&console.warn("No character metrics for '"+t+"' in style '"+e+"' and mode '"+r+"'"),s=new jt(t,0,0,0,0,0,a);return n&&(s.maxFontSize=n.sizeMultiplier,n.style.isTight()&&s.classes.push("mtight"),e=n.getColor())&&(s.style.color=e),s}function w0(t){let r=0,n=0,a=0;for(let e=0;e<t.children.length;e++){var i=t.children[e];i.height>r&&(r=i.height),i.depth>n&&(n=i.depth),i.maxFontSize>a&&(a=i.maxFontSize)}t.height=r,t.depth=n,t.maxFontSize=a}function Dt(e,t,r,n){return w0(e=new vr(e,t,r,n)),e}function v0(e){return w0(e=new xr(e)),e}function k0(e,t,r){let n="";switch(e){case"amsrm":n="AMS";break;case"textrm":n="Main";break;case"textsf":n="SansSerif";break;case"texttt":n="Typewriter";break;default:n=e}return n+"-"+("textbf"===t&&"textit"===r?"BoldItalic":"textbf"===t?"Bold":"textit"===t?"Italic":"Regular")}let c=[["mathbf","textbf","Main-Bold"],["mathbf","textbf","Main-Bold"],["mathnormal","textit","Math-Italic"],["mathnormal","textit","Math-Italic"],["boldsymbol","boldsymbol","Main-BoldItalic"],["boldsymbol","boldsymbol","Main-BoldItalic"],["mathscr","textscr","Script-Regular"],["","",""],["","",""],["","",""],["mathfrak","textfrak","Fraktur-Regular"],["mathfrak","textfrak","Fraktur-Regular"],["mathbb","textbb","AMS-Regular"],["mathbb","textbb","AMS-Regular"],["mathboldfrak","textboldfrak","Fraktur-Regular"],["mathboldfrak","textboldfrak","Fraktur-Regular"],["mathsf","textsf","SansSerif-Regular"],["mathsf","textsf","SansSerif-Regular"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathitsf","textitsf","SansSerif-Italic"],["mathitsf","textitsf","SansSerif-Italic"],["","",""],["","",""],["mathtt","texttt","Typewriter-Regular"],["mathtt","texttt","Typewriter-Regular"]],te=[["mathbf","textbf","Main-Bold"],["","",""],["mathsf","textsf","SansSerif-Regular"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathtt","texttt","Typewriter-Regular"]],re=(e,t,r,n)=>new vr(e,t,r,n),ne={mathbf:{variant:"bold",fontName:"Main-Bold"},mathrm:{variant:"normal",fontName:"Main-Regular"},textit:{variant:"italic",fontName:"Main-Italic"},mathit:{variant:"italic",fontName:"Main-Italic"},mathnormal:{variant:"italic",fontName:"Math-Italic"},mathsfit:{variant:"sans-serif-italic",fontName:"SansSerif-Italic"},mathbb:{variant:"double-struck",fontName:"AMS-Regular"},mathcal:{variant:"script",fontName:"Caligraphic-Regular"},mathfrak:{variant:"fraktur",fontName:"Fraktur-Regular"},mathscr:{variant:"script",fontName:"Script-Regular"},mathsf:{variant:"sans-serif",fontName:"SansSerif-Regular"},mathtt:{variant:"monospace",fontName:"Typewriter-Regular"}},ae={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]};var Pt={fontMap:ne,makeSymbol:Lt,mathsym:function(e,t,r,n){return void 0===n&&(n=[]),"boldsymbol"===r.font&&x0(e,"Main-Bold",t).metrics?Lt(e,"Main-Bold",t,r,n.concat(["mathbf"])):"\\"===e||"main"===vt[t][e].font?Lt(e,"Main-Regular",t,r,n):Lt(e,"AMS-Regular",t,r,n.concat(["amsrm"]))},makeSpan:Dt,makeSvgSpan:re,makeLineSpan:function(e,t,r){return(e=Dt([e],[],t)).height=Math.max(r||t.fontMetrics().defaultRuleThickness,t.minRuleThickness),e.style.borderBottomWidth=D(e.height),e.maxFontSize=1,e},makeAnchor:function(e,t,r,n){return w0(e=new kr(e,t,r,n)),e},makeFragment:v0,wrapFragment:function(e,t){return e instanceof xr?Dt([],[e],t):e},makeVList:function(e,t){let{children:r,depth:n}=(a=>{if("individualShift"===a.positionType){let t=a.children,r=[t[0]],e=-t[0].shift-t[0].elem.depth,n=e;for(let e=1;e<t.length;e++){var i=-t[e].shift-n-t[e].elem.depth,o=i-(t[e-1].elem.height+t[e-1].elem.depth);n+=i,r.push({type:"kern",size:o}),r.push(t[e])}return{children:r,depth:e}}let e;if("top"===a.positionType){let t=a.positionData;for(let e=0;e<a.children.length;e++){var r=a.children[e];t-="kern"===r.type?r.size:r.elem.height+r.elem.depth}e=t}else if("bottom"===a.positionType)e=-a.positionData;else{var t=a.children[0];if("elem"!==t.type)throw new Error('First child must have type "elem".');if("shift"===a.positionType)e=-t.elem.depth-a.positionData;else{if("firstBaseline"!==a.positionType)throw new Error("Invalid positionType "+a.positionType+".");e=-t.elem.depth}}return{children:a.children,depth:e}})(e),a=0;for(let e=0;e<r.length;e++){var i=r[e];"elem"===i.type&&(i=i.elem,a=Math.max(a,i.maxFontSize,i.height))}a+=2;let o=Dt(["pstrut"],[]),s=(o.style.height=D(a),[]),l=n,h=n,m=n;for(let e=0;e<r.length;e++){var c,p,d=r[e];"kern"===d.type?m+=d.size:(c=d.elem,(p=Dt(d.wrapperClasses||[],[o,c],void 0,d.wrapperStyle||{})).style.top=D(-a-m-c.depth),d.marginLeft&&(p.style.marginLeft=d.marginLeft),d.marginRight&&(p.style.marginRight=d.marginRight),s.push(p),m+=c.height+c.depth),l=Math.min(l,m),h=Math.max(h,m)}var u,g,f=Dt(["vlist"],s);return f.style.height=D(h),g=l<0?(u=Dt([],[]),(u=Dt(["vlist"],[u])).style.height=D(-l),g=Dt(["vlist-s"],[new jt("​")]),[Dt(["vlist-r"],[f,g]),Dt(["vlist-r"],[u])]):[Dt(["vlist-r"],[f])],e=Dt(["vlist-t"],g),2===g.length&&e.classes.push("vlist-t2"),e.height=h,e.depth=-l,e},makeOrd:function(e,n,a){let i=e.mode,o=e.text,s=["mord"],l=(e="math"===i||"text"===i&&n.font)?n.font:n.fontFamily,t="",r="";if(55349===o.charCodeAt(0)&&([t,r]=((e,t)=>{var r,n=1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320)+65536,t="math"===t?0:1;if(119808<=n&&n<120484)return r=Math.floor((n-119808)/26),[c[r][2],c[r][t]];if(120782<=n&&n<=120831)return r=Math.floor((n-120782)/10),[te[r][2],te[r][t]];if(120485==n||120486==n)return[c[0][2],c[0][t]];if(120486<n&&n<120782)return["",""];throw new ft("Unsupported character: "+e)})(o,i)),0<t.length)return Lt(o,t,i,n,s.concat(r));if(l){let t,r;if(r="boldsymbol"===l?(m="textord"!==a&&x0(o,"Math-BoldItalic",i).metrics?{fontName:"Math-BoldItalic",fontClass:"boldsymbol"}:{fontName:"Main-Bold",fontClass:"mathbf"},t=m.fontName,[m.fontClass]):e?(t=ne[l].fontName,[l]):(t=k0(l,n.fontWeight,n.fontShape),[l,n.fontWeight,n.fontShape]),x0(o,t,i).metrics)return Lt(o,t,i,n,s.concat(r));if(ee.hasOwnProperty(o)&&"Typewriter"===t.slice(0,10)){var h=[];for(let e=0;e<o.length;e++)h.push(Lt(o[e],t,i,n,s.concat(r)));return v0(h)}}if("mathord"===a)return Lt(o,"Math-Italic",i,n,s.concat(["mathnormal"]));if("textord"!==a)throw new Error("unexpected type: "+a+" in makeOrd");var m=vt[i][o]&&vt[i][o].font;return"ams"===m?Lt(o,k0("amsrm",n.fontWeight,n.fontShape),i,n,s.concat("amsrm",n.fontWeight,n.fontShape)):"main"!==m&&m?Lt(o,e=k0(m,n.fontWeight,n.fontShape),i,n,s.concat(e,n.fontWeight,n.fontShape)):Lt(o,k0("textrm",n.fontWeight,n.fontShape),i,n,s.concat(n.fontWeight,n.fontShape))},makeGlue:(e,t)=>{var r=Dt(["mspace"],[],t),e=wt(e,t);return r.style.marginRight=D(e),r},staticSvg:function(e,t){var[e,r,n]=ae[e],e=new zr(e),e=new Mr([e],{width:D(r),height:D(n),style:"width:"+D(r),viewBox:"0 0 "+1e3*r+" "+1e3*n,preserveAspectRatio:"xMinYMin"});return(e=re(["overlay"],[e],t)).height=n,e.style.height=D(n),e.style.width=D(r),e},svgData:ae,tryCombineChars:t=>{for(let e=0;e<t.length-1;e++){var r=t[e],n=t[e+1];r instanceof jt&&n instanceof jt&&((e,t)=>{if(o0(e.classes)!==o0(t.classes)||e.skew!==t.skew||e.maxFontSize!==t.maxFontSize)return!1;if(1===e.classes.length){var r=e.classes[0];if("mbin"===r||"mord"===r)return!1}for(var n in e.style)if(e.style.hasOwnProperty(n)&&e.style[n]!==t.style[n])return!1;for(var a in t.style)if(t.style.hasOwnProperty(a)&&e.style[a]!==t.style[a])return!1;return!0})(r,n)&&(r.text+=n.text,r.height=Math.max(r.height,n.height),r.depth=Math.max(r.depth,n.depth),r.italic=n.italic,t.splice(e+1,1),e--)}return t}};let h={number:3,unit:"mu"},m={number:4,unit:"mu"},p={number:5,unit:"mu"},ie={mord:{mop:h,mbin:m,mrel:p,minner:h},mop:{mord:h,mop:h,mrel:p,minner:h},mbin:{mord:m,mop:m,mopen:m,minner:m},mrel:{mord:p,mop:p,mopen:p,minner:p},mopen:{},mclose:{mop:h,mbin:m,mrel:p,minner:h},mpunct:{mord:h,mop:h,mrel:p,mopen:h,mclose:h,mpunct:h,minner:h},minner:{mord:h,mop:h,mbin:m,mrel:p,mopen:h,mpunct:h,minner:h}},oe={mord:{mop:h},mop:{mord:h,mop:h},mbin:{},mrel:{},mopen:{},mclose:{mop:h},mpunct:{},minner:{mop:h}},se={},d={},u={};function Vt(e){var{type:e,names:t,props:r,handler:n,htmlBuilder:a,mathmlBuilder:i}=e,o={type:e,numArgs:r.numArgs,argTypes:r.argTypes,allowedInArgument:!!r.allowedInArgument,allowedInText:!!r.allowedInText,allowedInMath:void 0===r.allowedInMath||r.allowedInMath,numOptionalArgs:r.numOptionalArgs||0,infix:!!r.infix,primitive:!!r.primitive,handler:n};for(let e=0;e<t.length;++e)se[t[e]]=o;e&&(a&&(d[e]=a),i)&&(u[e]=i)}function S0(e){var{type:e,htmlBuilder:t,mathmlBuilder:r}=e;Vt({type:e,names:[],props:{numArgs:0},handler(){throw new Error("Should never be called.")},htmlBuilder:t,mathmlBuilder:r})}function M0(e){return"ordgroup"===e.type&&1===e.body.length?e.body[0]:e}function Ft(e){return"ordgroup"===e.type?e.body:[e]}function Gt(t,r,e,a){void 0===a&&(a=[null,null]);var i=[];for(let e=0;e<t.length;e++){var n,o=P(t[e],r);o instanceof xr?(n=o.children,i.push(...n)):i.push(o)}if(Pt.tryCombineChars(i),e){let n=r;1===t.length&&("sizing"===(s=t[0]).type?n=r.havingSize(s.size):"styling"===s.type&&(n=r.havingStyle(me[s.style])));var s=g([a[0]||"leftmost"],[],r),a=g([a[1]||"rightmost"],[],r),e="root"===e;f(i,(e,t)=>{var r=t.classes[0],n=e.classes[0];"mbin"===r&&bt.contains(he,n)?t.classes[0]="mord":"mbin"===n&&bt.contains(le,r)&&(e.classes[0]="mord")},{node:s},a,e),f(i,(e,t)=>{var t=y(t),r=y(e);if(e=t&&r?(e.hasClass("mtight")?oe:ie)[t][r]:null)return Pt.makeGlue(e,n)},{node:s},a,e)}return i}function z0(e,t){return e=["nulldelimiter"].concat(e.baseSizingClasses()),g(t.concat(e))}let g=Pt.makeSpan,le=["leftmost","mbin","mopen","mrel","mop","mpunct"],he=["rightmost","mrel","mclose","mpunct"],me={display:yt.DISPLAY,text:yt.TEXT,script:yt.SCRIPT,scriptscript:yt.SCRIPTSCRIPT},ce={mord:"mord",mop:"mop",mbin:"mbin",mrel:"mrel",mopen:"mopen",mclose:"mclose",mpunct:"mpunct",minner:"minner"},f=function(r,e,t,n,a){n&&r.push(n);let i=0;for(;i<r.length;i++){var o,s=r[i],l=pe(s);l?f(l.children,e,t,null,a):((l=!s.hasClass("mspace"))&&(o=e(s,t.node))&&(t.insertAfter?t.insertAfter(o):(r.unshift(o),i++)),l?t.node=s:a&&s.hasClass("newline")&&(t.node=g(["leftmost"])),t.insertAfter=(t=>e=>{r.splice(t+1,0,e),i++})(i))}n&&r.pop()},pe=function(e){return e instanceof xr||e instanceof kr||e instanceof vr&&e.hasClass("enclosing")?e:null},b=function(e,t){var r=pe(e);if(r&&(r=r.children).length){if("right"===t)return b(r[r.length-1],"right");if("left"===t)return b(r[0],"left")}return e},y=function(e,t){return e&&(t&&(e=b(e,t)),ce[e.classes[0]])||null},P=function(t,r,n){if(!t)return g();if(d[t.type]){let e=d[t.type](t,r);return n&&r.size!==n.size&&(e=g(r.sizingClasses(n),[e],r),r=r.sizeMultiplier/n.sizeMultiplier,e.height*=r,e.depth*=r),e}throw new ft("Got group of unknown type: '"+t.type+"'")};function A0(e,t){return e=g(["base"],e,t),(t=g(["strut"])).style.height=D(e.height+e.depth),e.depth&&(t.style.verticalAlign=D(-e.depth)),e.children.unshift(t),e}function T0(e,r){let t=null,n=(1===e.length&&"tag"===e[0].type&&(t=e[0].tag,e=e[0].body),Gt(e,r,"root")),a,i=(2===n.length&&n[1].hasClass("tag")&&(a=n.pop()),[]),o,s=[];for(let t=0;t<n.length;t++)if(s.push(n[t]),n[t].hasClass("mbin")||n[t].hasClass("mrel")||n[t].hasClass("allowbreak")){let e=!1;for(;t<n.length-1&&n[t+1].hasClass("mspace")&&!n[t+1].hasClass("newline");)t++,s.push(n[t]),n[t].hasClass("nobreak")&&(e=!0);e||(i.push(A0(s,r)),s=[])}else n[t].hasClass("newline")&&(s.pop(),0<s.length&&(i.push(A0(s,r)),s=[]),i.push(n[t]));var l;return 0<s.length&&i.push(A0(s,r)),t?((o=A0(Gt(t,r,!0))).classes=["tag"],i.push(o)):a&&i.push(a),(e=g(["katex-html"],i)).setAttribute("aria-hidden","true"),o&&((l=o.children[0]).style.height=D(e.height+e.depth),e.depth)&&(l.style.verticalAlign=D(-e.depth)),e}function B0(e){return new xr(e)}class _t{constructor(e,t,r){this.type=void 0,this.attributes=void 0,this.children=void 0,this.classes=void 0,this.type=e,this.attributes={},this.children=t||[],this.classes=r||[]}setAttribute(e,t){this.attributes[e]=t}getAttribute(e){return this.attributes[e]}toNode(){var e,r=document.createElementNS("http://www.w3.org/1998/Math/MathML",this.type);for(e in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,e)&&r.setAttribute(e,this.attributes[e]);0<this.classes.length&&(r.className=o0(this.classes));for(let t=0;t<this.children.length;t++)if(this.children[t]instanceof $t&&this.children[t+1]instanceof $t){let e=this.children[t].toText()+this.children[++t].toText();for(;this.children[t+1]instanceof $t;)e+=this.children[++t].toText();r.appendChild(new $t(e).toNode())}else r.appendChild(this.children[t].toNode());return r}toMarkup(){let t="<"+this.type;for(var e in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,e)&&(t+=" "+e+'="',t+=bt.escape(this.attributes[e]),t+='"');0<this.classes.length&&(t+=' class ="'+bt.escape(o0(this.classes))+'"'),t+=">";for(let e=0;e<this.children.length;e++)t+=this.children[e].toMarkup();return t+="</"+this.type+">"}toText(){return this.children.map(e=>e.toText()).join("")}}class $t{constructor(e){this.text=void 0,this.text=e}toNode(){return document.createTextNode(this.text)}toMarkup(){return bt.escape(this.toText())}toText(){return this.text}}var Ut={MathNode:_t,TextNode:$t,SpaceNode:class{constructor(e){this.width=void 0,this.character=void 0,this.width=e,this.character=.05555<=e&&e<=.05556?" ":.1666<=e&&e<=.1667?" ":.2222<=e&&e<=.2223?" ":.2777<=e&&e<=.2778?"  ":-.05556<=e&&e<=-.05555?" ⁣":-.1667<=e&&e<=-.1666?" ⁣":-.2223<=e&&e<=-.2222?" ⁣":-.2778<=e&&e<=-.2777?" ⁣":null}toNode(){var e;return this.character?document.createTextNode(this.character):((e=document.createElementNS("http://www.w3.org/1998/Math/MathML","mspace")).setAttribute("width",D(this.width)),e)}toMarkup(){return this.character?"<mtext>"+this.character+"</mtext>":'<mspace width="'+D(this.width)+'"/>'}toText(){return this.character||" "}},newDocumentFragment:B0};function Yt(e,t,r){return!vt[t][e]||!vt[t][e].replace||55349===e.charCodeAt(0)||ee.hasOwnProperty(e)&&r&&(r.fontFamily&&"tt"===r.fontFamily.slice(4,6)||r.font&&"tt"===r.font.slice(4,6))||(e=vt[t][e].replace),new Ut.TextNode(e)}function C0(e){return 1===e.length?e[0]:new Ut.MathNode("mrow",e)}function N0(e,t){var r;return"texttt"===t.fontFamily?"monospace":"textsf"===t.fontFamily?"textit"===t.fontShape&&"textbf"===t.fontWeight?"sans-serif-bold-italic":"textit"===t.fontShape?"sans-serif-italic":"textbf"===t.fontWeight?"bold-sans-serif":"sans-serif":"textit"===t.fontShape&&"textbf"===t.fontWeight?"bold-italic":"textit"===t.fontShape?"italic":"textbf"===t.fontWeight?"bold":(t=t.font)&&"mathnormal"!==t?(r=e.mode,"mathit"===t?"italic":"boldsymbol"===t?"textord"===e.type?"bold":"bold-italic":"mathbf"===t?"bold":"mathbb"===t?"double-struck":"mathsfit"===t?"sans-serif-italic":"mathfrak"===t?"fraktur":"mathscr"===t||"mathcal"===t?"script":"mathsf"===t?"sans-serif":"mathtt"===t?"monospace":!bt.contains(["\\imath","\\jmath"],e=e.text)&&r0(e=vt[r][e]&&vt[r][e].replace?vt[r][e].replace:e,Pt.fontMap[t].fontName,r)?Pt.fontMap[t].variant:null):null}function q0(e){var t;return e&&("mi"===e.type&&1===e.children.length?(t=e.children[0])instanceof $t&&"."===t.text:"mo"===e.type&&1===e.children.length&&"true"===e.getAttribute("separator")&&"0em"===e.getAttribute("lspace")&&"0em"===e.getAttribute("rspace")&&(t=e.children[0])instanceof $t&&","===t.text)}function I0(e,t,r){return C0(x(e,t,r))}let x=function(t,r,e){var n;if(1===t.length)return n=w(t[0],r),e&&n instanceof _t&&"mo"===n.type&&(n.setAttribute("lspace","0em"),n.setAttribute("rspace","0em")),[n];let a=[],i;for(let e=0;e<t.length;e++){var o,s,l=w(t[e],r);if(l instanceof _t&&i instanceof _t){if("mtext"===l.type&&"mtext"===i.type&&l.getAttribute("mathvariant")===i.getAttribute("mathvariant")){i.children.push(...l.children);continue}if("mn"===l.type&&"mn"===i.type){i.children.push(...l.children);continue}if(q0(l)&&"mn"===i.type){i.children.push(...l.children);continue}"mn"===l.type&&q0(i)?(l.children=[...i.children,...l.children],a.pop()):("msup"===l.type||"msub"===l.type)&&1<=l.children.length&&("mn"===i.type||q0(i))?(o=l.children[0])instanceof _t&&"mn"===o.type&&(o.children=[...i.children,...o.children],a.pop()):"mi"===i.type&&1===i.children.length&&(o=i.children[0])instanceof $t&&"̸"===o.text&&("mo"===l.type||"mi"===l.type||"mn"===l.type)&&(s=l.children[0])instanceof $t&&0<s.text.length&&(s.text=s.text.slice(0,1)+"̸"+s.text.slice(1),a.pop())}a.push(l),i=l}return a},w=function(e,t){if(!e)return new Ut.MathNode("mrow");if(u[e.type])return u[e.type](e,t);throw new ft("Got group of unknown type: '"+e.type+"'")};function R0(e,t,r,n,a){return r=1===(e=x(e,r)).length&&e[0]instanceof _t&&bt.contains(["mrow","mtable"],e[0].type)?e[0]:new Ut.MathNode("mrow",e),(e=new Ut.MathNode("annotation",[new Ut.TextNode(t)])).setAttribute("encoding","application/x-tex"),t=new Ut.MathNode("semantics",[r,e]),(r=new Ut.MathNode("math",[t])).setAttribute("xmlns","http://www.w3.org/1998/Math/MathML"),n&&r.setAttribute("display","block"),Pt.makeSpan([e=a?"katex":"katex-mathml"],[r])}let de=function(e){return new a0({style:e.displayMode?yt.DISPLAY:yt.TEXT,maxSize:e.maxSize,minRuleThickness:e.minRuleThickness})},ue=function(e,t){var r;return t.displayMode&&(r=["katex-display"],t.leqno&&r.push("leqno"),t.fleqn&&r.push("fleqn"),e=Pt.makeSpan(r,[e])),e},ge={widehat:"^",widecheck:"ˇ",widetilde:"~",utilde:"~",overleftarrow:"←",underleftarrow:"←",xleftarrow:"←",overrightarrow:"→",underrightarrow:"→",xrightarrow:"→",underbrace:"⏟",overbrace:"⏞",overgroup:"⏠",undergroup:"⏡",overleftrightarrow:"↔",underleftrightarrow:"↔",xleftrightarrow:"↔",Overrightarrow:"⇒",xRightarrow:"⇒",overleftharpoon:"↼",xleftharpoonup:"↼",overrightharpoon:"⇀",xrightharpoonup:"⇀",xLeftarrow:"⇐",xLeftrightarrow:"⇔",xhookleftarrow:"↩",xhookrightarrow:"↪",xmapsto:"↦",xrightharpoondown:"⇁",xleftharpoondown:"↽",xrightleftharpoons:"⇌",xleftrightharpoons:"⇋",xtwoheadleftarrow:"↞",xtwoheadrightarrow:"↠",xlongequal:"=",xtofrom:"⇄",xrightleftarrows:"⇄",xrightequilibrium:"⇌",xleftequilibrium:"⇋","\\cdrightarrow":"→","\\cdleftarrow":"←","\\cdlongequal":"="},fe={overrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],overleftarrow:[["leftarrow"],.888,522,"xMinYMin"],underrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],underleftarrow:[["leftarrow"],.888,522,"xMinYMin"],xrightarrow:[["rightarrow"],1.469,522,"xMaxYMin"],"\\cdrightarrow":[["rightarrow"],3,522,"xMaxYMin"],xleftarrow:[["leftarrow"],1.469,522,"xMinYMin"],"\\cdleftarrow":[["leftarrow"],3,522,"xMinYMin"],Overrightarrow:[["doublerightarrow"],.888,560,"xMaxYMin"],xRightarrow:[["doublerightarrow"],1.526,560,"xMaxYMin"],xLeftarrow:[["doubleleftarrow"],1.526,560,"xMinYMin"],overleftharpoon:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoonup:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoondown:[["leftharpoondown"],.888,522,"xMinYMin"],overrightharpoon:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoonup:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoondown:[["rightharpoondown"],.888,522,"xMaxYMin"],xlongequal:[["longequal"],.888,334,"xMinYMin"],"\\cdlongequal":[["longequal"],3,334,"xMinYMin"],xtwoheadleftarrow:[["twoheadleftarrow"],.888,334,"xMinYMin"],xtwoheadrightarrow:[["twoheadrightarrow"],.888,334,"xMaxYMin"],overleftrightarrow:[["leftarrow","rightarrow"],.888,522],overbrace:[["leftbrace","midbrace","rightbrace"],1.6,548],underbrace:[["leftbraceunder","midbraceunder","rightbraceunder"],1.6,548],underleftrightarrow:[["leftarrow","rightarrow"],.888,522],xleftrightarrow:[["leftarrow","rightarrow"],1.75,522],xLeftrightarrow:[["doubleleftarrow","doublerightarrow"],1.75,560],xrightleftharpoons:[["leftharpoondownplus","rightharpoonplus"],1.75,716],xleftrightharpoons:[["leftharpoonplus","rightharpoondownplus"],1.75,716],xhookleftarrow:[["leftarrow","righthook"],1.08,522],xhookrightarrow:[["lefthook","rightarrow"],1.08,522],overlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],underlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],overgroup:[["leftgroup","rightgroup"],.888,342],undergroup:[["leftgroupunder","rightgroupunder"],.888,342],xmapsto:[["leftmapsto","rightarrow"],1.5,522],xtofrom:[["leftToFrom","rightToFrom"],1.75,528],xrightleftarrows:[["baraboveleftarrow","rightarrowabovebar"],1.75,901],xrightequilibrium:[["baraboveshortleftharpoon","rightharpoonaboveshortbar"],1.75,716],xleftequilibrium:[["shortbaraboveleftharpoon","shortrightharpoonabovebar"],1.75,716]};function H0(e){return(e=new Ut.MathNode("mo",[new Ut.TextNode(ge[e.replace(/^\\/,"")])])).setAttribute("stretchy","true"),e}function O0(i,p){var{span:e,minWidth:t,height:r}=(()=>{let h=4e5,m=i.label.slice(1);if(bt.contains(["widehat","widecheck","widetilde","utilde"],m)){var n,a="ordgroup"===(a=i.base).type?a.body.length:1;let e,t,r;return t=5<a?"widehat"===m||"widecheck"===m?(e=420,h=2364,r=.42,m+"4"):(e=312,h=2340,r=.34,"tilde4"):(n=[1,1,2,2,3,3][a],"widehat"===m||"widecheck"===m?(h=[0,1062,2364,2364,2364][n],e=[0,239,300,360,420][n],r=[0,.24,.3,.3,.36,.42][n],m+n):(h=[0,600,1033,2339,2340][n],e=[0,260,286,306,312][n],r=[0,.26,.286,.3,.306,.34][n],"tilde"+n)),a=new zr(t),a=new Mr([a],{width:"100%",height:D(r),viewBox:"0 0 "+h+" "+e,preserveAspectRatio:"none"}),{span:Pt.makeSvgSpan([],[a],p),minWidth:0,height:r}}{let t=[],e=fe[m],[r,n,a]=e,i=a/1e3,o=r.length,s,l;if(1===o)s=["hide-tail"],l=[e[3]];else if(2===o)s=["halfarrow-left","halfarrow-right"],l=["xMinYMin","xMaxYMin"];else{if(3!==o)throw new Error("Correct katexImagesData or update code here to support\n "+o+" children.");s=["brace-left","brace-center","brace-right"],l=["xMinYMin","xMidYMin","xMaxYMin"]}for(let e=0;e<o;e++){var c=new zr(r[e]),c=new Mr([c],{width:"400em",height:D(i),viewBox:"0 0 "+h+" "+a,preserveAspectRatio:l[e]+" slice"}),c=Pt.makeSvgSpan([s[e]],[c],p);if(1===o)return{span:c,minWidth:n,height:i};c.style.height=D(i),t.push(c)}return{span:Pt.makeSpan(["stretchy"],t,p),minWidth:n,height:i}}})();return e.height=r,e.style.height=D(r),0<t&&(e.style.minWidth=D(t)),e}function Xt(e,t){if(e&&e.type===t)return e;throw new Error("Expected node of type "+t+", but got "+(e?"node of type "+e.type:String(e)))}function E0(e){var t=L0(e);if(t)return t;throw new Error("Expected node of symbol group type, but got "+(e?"node of type "+e.type:String(e)))}function L0(e){return e&&("atom"===e.type||Q.hasOwnProperty(e.type))?e:null}let v=(a,i)=>{let e,o,t,s=(a&&"supsub"===a.type?(o=Xt(a.base,"accent"),e=o.base,a.base=e,t=(e=>{if(e instanceof vr)return e;throw new Error("Expected span<HtmlDomNode> but got "+String(e)+".")})(P(a,i)),a.base=o):(o=Xt(a,"accent"),e=o.base),a=P(e,i.havingCrampedStyle()),0);o.isShifty&&bt.isCharacterBox(e)&&(l=bt.getBaseElem(e),s=m0(P(l,i.havingCrampedStyle())).skew);var l="\\c"===o.label;let h,m=l?a.height+a.depth:Math.min(a.height,i.fontMetrics().xHeight);if(o.isStretchy)h=O0(o,i),h=Pt.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:a},{type:"elem",elem:h,wrapperClasses:["svg-align"],wrapperStyle:0<s?{width:"calc(100% - "+D(2*s)+")",marginLeft:D(2*s)}:void 0}]},i);else{let e,t,r=("\\vec"===o.label?(e=Pt.staticSvg("vec",i),t=Pt.svgData.vec[1]):((e=m0(e=Pt.makeOrd({mode:o.mode,text:o.label},i,"textord"))).italic=0,t=e.width,l&&(m+=e.depth)),h=Pt.makeSpan(["accent-body"],[e]),"\\textcircled"===o.label),n=(r&&(h.classes.push("accent-full"),m=a.height),s);r||(n-=t/2),h.style.left=D(n),"\\textcircled"===o.label&&(h.style.top=".2em"),h=Pt.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:a},{type:"kern",size:-m},{type:"elem",elem:h}]},i)}return l=Pt.makeSpan(["mord","accent"],[h],i),t?(t.children[0]=l,t.height=Math.max(l.height,t.height),t.classes[0]="mord",t):l},be=(e,t)=>{var r=e.isStretchy?H0(e.label):new Ut.MathNode("mo",[Yt(e.label,e.mode)]);return(e=new Ut.MathNode("mover",[w(e.base,t),r])).setAttribute("accent","true"),e},ye=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map(e=>"\\"+e).join("|")),k=(Vt({type:"accent",names:["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring","\\widecheck","\\widehat","\\widetilde","\\overrightarrow","\\overleftarrow","\\Overrightarrow","\\overleftrightarrow","\\overgroup","\\overlinesegment","\\overleftharpoon","\\overrightharpoon"],props:{numArgs:1},handler:(e,t)=>{var t=M0(t[0]),r=!ye.test(e.funcName),n=!r||"\\widehat"===e.funcName||"\\widetilde"===e.funcName||"\\widecheck"===e.funcName;return{type:"accent",mode:e.parser.mode,label:e.funcName,isStretchy:r,isShifty:n,base:t}},htmlBuilder:v,mathmlBuilder:be}),Vt({type:"accent",names:["\\'","\\`","\\^","\\~","\\=","\\u","\\.",'\\"',"\\c","\\r","\\H","\\v","\\textcircled"],props:{numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["primitive"]},handler:(e,t)=>{t=t[0];let r=e.parser.mode;return"math"===r&&(e.parser.settings.reportNonstrict("mathVsTextAccents","LaTeX's accent "+e.funcName+" works only in text mode"),r="text"),{type:"accent",mode:r,label:e.funcName,isStretchy:!1,isShifty:!0,base:t}},htmlBuilder:v,mathmlBuilder:be}),Vt({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleftrightarrow","\\undergroup","\\underlinesegment","\\utilde"],props:{numArgs:1},handler:(e,t)=>{var{parser:e,funcName:r}=e,t=t[0];return{type:"accentUnder",mode:e.mode,label:r,base:t}},htmlBuilder:(e,t)=>{var r=P(e.base,t),n=O0(e,t),n=Pt.makeVList({positionType:"top",positionData:r.height,children:[{type:"elem",elem:n,wrapperClasses:["svg-align"]},{type:"kern",size:"\\utilde"===e.label?.12:0},{type:"elem",elem:r}]},t);return Pt.makeSpan(["mord","accentunder"],[n],t)},mathmlBuilder:(e,t)=>{var r=H0(e.label);return(e=new Ut.MathNode("munder",[w(e.base,t),r])).setAttribute("accentunder","true"),e}}),e=>((e=new Ut.MathNode("mpadded",e?[e]:[])).setAttribute("width","+0.6em"),e.setAttribute("lspace","0.3em"),e)),xe=(Vt({type:"xArrow",names:["\\xleftarrow","\\xrightarrow","\\xLeftarrow","\\xRightarrow","\\xleftrightarrow","\\xLeftrightarrow","\\xhookleftarrow","\\xhookrightarrow","\\xmapsto","\\xrightharpoondown","\\xrightharpoonup","\\xleftharpoondown","\\xleftharpoonup","\\xrightleftharpoons","\\xleftrightharpoons","\\xlongequal","\\xtwoheadrightarrow","\\xtwoheadleftarrow","\\xtofrom","\\xrightleftarrows","\\xrightequilibrium","\\xleftequilibrium","\\\\cdrightarrow","\\\\cdleftarrow","\\\\cdlongequal"],props:{numArgs:1,numOptionalArgs:1},handler(e,t,r){var{parser:e,funcName:n}=e;return{type:"xArrow",mode:e.mode,label:n,body:t[0],below:r[0]}},htmlBuilder(e,t){var r=t.style,n=t.havingStyle(r.sup()),a=Pt.wrapFragment(P(e.body,n,t),t),i="\\x"===e.label.slice(0,2)?"x":"cd";let o;a.classes.push(i+"-arrow-pad"),e.below&&(n=t.havingStyle(r.sub()),(o=Pt.wrapFragment(P(e.below,n,t),t)).classes.push(i+"-arrow-pad")),r=O0(e,t),n=-t.fontMetrics().axisHeight+.5*r.height;let s,l=-t.fontMetrics().axisHeight-.5*r.height-.111;return(.25<a.depth||"\\xleftequilibrium"===e.label)&&(l-=a.depth),(s=o?(i=-t.fontMetrics().axisHeight+o.height+.5*r.height+.111,Pt.makeVList({positionType:"individualShift",children:[{type:"elem",elem:a,shift:l},{type:"elem",elem:r,shift:n},{type:"elem",elem:o,shift:i}]},t)):Pt.makeVList({positionType:"individualShift",children:[{type:"elem",elem:a,shift:l},{type:"elem",elem:r,shift:n}]},t)).children[0].children[0].children[1].classes.push("svg-align"),Pt.makeSpan(["mrel","x-arrow"],[s],t)},mathmlBuilder(e,t){var r,n,a=H0(e.label);let i;return a.setAttribute("minsize","x"===e.label.charAt(0)?"1.75em":"3.0em"),i=e.body?(r=k(w(e.body,t)),e.below?(n=k(w(e.below,t)),new Ut.MathNode("munderover",[a,n,r])):new Ut.MathNode("mover",[a,r])):e.below?(n=k(w(e.below,t)),new Ut.MathNode("munder",[a,n])):(i=k(),new Ut.MathNode("mover",[a,i]))}}),Pt.makeSpan);function D0(e,t){var r=Gt(e.body,t,!0);return xe([e.mclass],r,t)}function P0(e,t){let r;return t=x(e.body,t),"minner"===e.mclass?r=new Ut.MathNode("mpadded",t):"mord"===e.mclass?e.isCharacterBox?(r=t[0]).type="mi":r=new Ut.MathNode("mi",t):(e.isCharacterBox?(r=t[0]).type="mo":r=new Ut.MathNode("mo",t),"mbin"===e.mclass?(r.attributes.lspace="0.22em",r.attributes.rspace="0.22em"):"mpunct"===e.mclass?(r.attributes.lspace="0em",r.attributes.rspace="0.17em"):"mopen"===e.mclass||"mclose"===e.mclass?(r.attributes.lspace="0em",r.attributes.rspace="0em"):"minner"===e.mclass&&(r.attributes.lspace="0.0556em",r.attributes.width="+0.1111em")),r}Vt({type:"mclass",names:["\\mathord","\\mathbin","\\mathrel","\\mathopen","\\mathclose","\\mathpunct","\\mathinner"],props:{numArgs:1,primitive:!0},handler(e,t){var{parser:e,funcName:r}=e,t=t[0];return{type:"mclass",mode:e.mode,mclass:"m"+r.slice(5),body:Ft(t),isCharacterBox:bt.isCharacterBox(t)}},htmlBuilder:D0,mathmlBuilder:P0});let S=e=>"atom"!==(e="ordgroup"===e.type&&e.body.length?e.body[0]:e).type||"bin"!==e.family&&"rel"!==e.family?"mord":"m"+e.family,we=(Vt({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler(e,t){return{type:"mclass",mode:(e=e.parser).mode,mclass:S(t[0]),body:Ft(t[1]),isCharacterBox:bt.isCharacterBox(t[1])}}}),Vt({type:"mclass",names:["\\stackrel","\\overset","\\underset"],props:{numArgs:2},handler(e,t){var{parser:e,funcName:r}=e,n=t[1],t=t[0],a="\\stackrel"!==r?S(n):"mrel",n={type:"op",mode:n.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:"\\stackrel"!==r,body:Ft(n)},n={type:"supsub",mode:t.mode,base:n,sup:"\\underset"===r?null:t,sub:"\\underset"===r?t:null};return{type:"mclass",mode:e.mode,mclass:a,body:[n],isCharacterBox:bt.isCharacterBox(n)}},htmlBuilder:D0,mathmlBuilder:P0}),Vt({type:"pmb",names:["\\pmb"],props:{numArgs:1,allowedInText:!0},handler(e,t){return{type:"pmb",mode:(e=e.parser).mode,mclass:S(t[0]),body:Ft(t[0])}},htmlBuilder(e,t){var r=Gt(e.body,t,!0);return(e=Pt.makeSpan([e.mclass],r,t)).style.textShadow="0.02em 0.01em 0.04px",e},mathmlBuilder(e,t){return e=x(e.body,t),(t=new Ut.MathNode("mstyle",e)).setAttribute("style","text-shadow: 0.02em 0.01em 0.04px"),t}}),{">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"}),ve=e=>"textord"===e.type&&"@"===e.text;function V0(e,t,r){if(r=r0(vt.math[e]&&vt.math[e].replace||e,t,r))return r;throw new Error("Unsupported symbol "+e+" and font size "+t+".")}function F0(e,t,r,n){return t=r.havingBaseStyle(t),n=Pt.makeSpan(n.concat(t.sizingClasses(r)),[e],r),e=t.sizeMultiplier/r.sizeMultiplier,n.height*=e,n.depth*=e,n.maxFontSize=t.sizeMultiplier,n}function G0(e,t,r){r=t.havingBaseStyle(r),r=(1-t.sizeMultiplier/r.sizeMultiplier)*t.fontMetrics().axisHeight,e.classes.push("delimcenter"),e.style.top=D(r),e.height-=r,e.depth+=r}function U0(e,t,r,n,a,i){return e=Pt.makeSymbol(e,"Size"+t+"-Regular",a,n),a=F0(Pt.makeSpan(["delimsizing","size"+t],[e],n),yt.TEXT,n,i),r&&G0(a,n,yt.TEXT),a}function Y0(e,t,r){return{type:"elem",elem:Pt.makeSpan(["delimsizinginner","Size1-Regular"===t?"delim-size1":"delim-size4"],[Pt.makeSpan([],[Pt.makeSymbol(e,t,r)])])}}function X0(e,t,r){var n=(xt["Size4-Regular"][e.charCodeAt(0)]?xt["Size4-Regular"]:xt["Size1-Regular"])[e.charCodeAt(0)][4],e=new zr("inner",((e,t)=>{switch(e){case"⎜":return"M291 0 H417 V"+t+" H291z M291 0 H417 V"+t+" H291z";case"∣":return"M145 0 H188 V"+t+" H145z M145 0 H188 V"+t+" H145z";case"∥":return"M145 0 H188 V"+t+" H145z M145 0 H188 V"+t+" H145zM367 0 H410 V"+t+" H367z M367 0 H410 V"+t+" H367z";case"⎟":return"M457 0 H583 V"+t+" H457z M457 0 H583 V"+t+" H457z";case"⎢":return"M319 0 H403 V"+t+" H319z M319 0 H403 V"+t+" H319z";case"⎥":return"M263 0 H347 V"+t+" H263z M263 0 H347 V"+t+" H263z";case"⎪":return"M384 0 H504 V"+t+" H384z M384 0 H504 V"+t+" H384z";case"⏐":return"M312 0 H355 V"+t+" H312z M312 0 H355 V"+t+" H312z";case"‖":return"M257 0 H300 V"+t+" H257z M257 0 H300 V"+t+" H257zM478 0 H521 V"+t+" H478z M478 0 H521 V"+t+" H478z";default:return""}})(e,Math.round(1e3*t))),e=new Mr([e],{width:D(n),height:D(t),style:"width:"+D(n),viewBox:"0 0 "+1e3*n+" "+Math.round(1e3*t),preserveAspectRatio:"xMinYMin"});return(e=Pt.makeSvgSpan([],[e],r)).height=t,e.style.height=D(t),e.style.width=D(n),{type:"elem",elem:e}}function W0(e,t,r,n,a,i){let o,s,l,h,m="",c=0,p=(o=l=h=e,s=null,"Size1-Regular");"\\uparrow"===e?l=h="⏐":"\\Uparrow"===e?l=h="‖":"\\downarrow"===e?o=l="⏐":"\\Downarrow"===e?o=l="‖":"\\updownarrow"===e?(o="\\uparrow",l="⏐",h="\\downarrow"):"\\Updownarrow"===e?(o="\\Uparrow",l="‖",h="\\Downarrow"):bt.contains(Me,e)?(l="∣",m="vert",c=333):bt.contains(ze,e)?(l="∥",m="doublevert",c=556):"["===e||"\\lbrack"===e?(o="⎡",l="⎢",h="⎣",p="Size4-Regular",m="lbrack",c=667):"]"===e||"\\rbrack"===e?(o="⎤",l="⎥",h="⎦",p="Size4-Regular",m="rbrack",c=667):"\\lfloor"===e||"⌊"===e?(l=o="⎢",h="⎣",p="Size4-Regular",m="lfloor",c=667):"\\lceil"===e||"⌈"===e?(o="⎡",l=h="⎢",p="Size4-Regular",m="lceil",c=667):"\\rfloor"===e||"⌋"===e?(l=o="⎥",h="⎦",p="Size4-Regular",m="rfloor",c=667):"\\rceil"===e||"⌉"===e?(o="⎤",l=h="⎥",p="Size4-Regular",m="rceil",c=667):"("===e||"\\lparen"===e?(o="⎛",l="⎜",h="⎝",p="Size4-Regular",m="lparen",c=875):")"===e||"\\rparen"===e?(o="⎞",l="⎟",h="⎠",p="Size4-Regular",m="rparen",c=875):"\\{"===e||"\\lbrace"===e?(o="⎧",s="⎨",h="⎩",l="⎪",p="Size4-Regular"):"\\}"===e||"\\rbrace"===e?(o="⎫",s="⎬",h="⎭",l="⎪",p="Size4-Regular"):"\\lgroup"===e||"⟮"===e?(o="⎧",h="⎩",l="⎪",p="Size4-Regular"):"\\rgroup"===e||"⟯"===e?(o="⎫",h="⎭",l="⎪",p="Size4-Regular"):"\\lmoustache"===e||"⎰"===e?(o="⎧",h="⎭",l="⎪",p="Size4-Regular"):"\\rmoustache"!==e&&"⎱"!==e||(o="⎫",h="⎩",l="⎪",p="Size4-Regular");var d=(e=V0(o,p,a)).height+e.depth,e=(e=V0(l,p,a)).height+e.depth,u=(u=V0(h,p,a)).height+u.depth;let g=0,f=1;null!==s&&(b=V0(s,p,a),g=b.height+b.depth,f=2);var b=(b=d+u+g)+Math.max(0,Math.ceil((t-b)/(f*e)))*f*e;let y=n.fontMetrics().axisHeight;r&&(y*=n.sizeMultiplier);var x,w,v,k,t=b/2-y,S=[];return 0<m.length?(v=b-d-u,k=Math.round(1e3*b),v=((e,t)=>{switch(e){case"lbrack":return"M403 1759 V84 H666 V0 H319 V1759 v"+t+" v1759 h347 v-84\nH403z M403 1759 V0 H319 V1759 v"+t+" v1759 h84z";case"rbrack":return"M347 1759 V0 H0 V84 H263 V1759 v"+t+" v1759 H0 v84 H347z\nM347 1759 V0 H263 V1759 v"+t+" v1759 h84z";case"vert":return"M145 15 v585 v"+t+" v585 c2.667,10,9.667,15,21,15\nc10,0,16.667,-5,20,-15 v-585 v"+-t+" v-585 c-2.667,-10,-9.667,-15,-21,-15\nc-10,0,-16.667,5,-20,15z M188 15 H145 v585 v"+t+" v585 h43z";case"doublevert":return"M145 15 v585 v"+t+" v585 c2.667,10,9.667,15,21,15\nc10,0,16.667,-5,20,-15 v-585 v"+-t+" v-585 c-2.667,-10,-9.667,-15,-21,-15\nc-10,0,-16.667,5,-20,15z M188 15 H145 v585 v"+t+" v585 h43z\nM367 15 v585 v"+t+" v585 c2.667,10,9.667,15,21,15\nc10,0,16.667,-5,20,-15 v-585 v"+-t+" v-585 c-2.667,-10,-9.667,-15,-21,-15\nc-10,0,-16.667,5,-20,15z M410 15 H367 v585 v"+t+" v585 h43z";case"lfloor":return"M319 602 V0 H403 V602 v"+t+" v1715 h263 v84 H319z\nMM319 602 V0 H403 V602 v"+t+" v1715 H319z";case"rfloor":return"M319 602 V0 H403 V602 v"+t+" v1799 H0 v-84 H319z\nMM319 602 V0 H403 V602 v"+t+" v1715 H319z";case"lceil":return"M403 1759 V84 H666 V0 H319 V1759 v"+t+" v602 h84z\nM403 1759 V0 H319 V1759 v"+t+" v602 h84z";case"rceil":return"M347 1759 V0 H0 V84 H263 V1759 v"+t+" v602 h84z\nM347 1759 V0 h-84 V1759 v"+t+" v602 h84z";case"lparen":return"M863,9c0,-2,-2,-5,-6,-9c0,0,-17,0,-17,0c-12.7,0,-19.3,0.3,-20,1\nc-5.3,5.3,-10.3,11,-15,17c-242.7,294.7,-395.3,682,-458,1162c-21.3,163.3,-33.3,349,\n-36,557 l0,"+(t+84)+"c0.2,6,0,26,0,60c2,159.3,10,310.7,24,454c53.3,528,210,\n949.7,470,1265c4.7,6,9.7,11.7,15,17c0.7,0.7,7,1,19,1c0,0,18,0,18,0c4,-4,6,-7,6,-9\nc0,-2.7,-3.3,-8.7,-10,-18c-135.3,-192.7,-235.5,-414.3,-300.5,-665c-65,-250.7,-102.5,\n-544.7,-112.5,-882c-2,-104,-3,-167,-3,-189\nl0,-"+(t+92)+"c0,-162.7,5.7,-314,17,-454c20.7,-272,63.7,-513,129,-723c65.3,\n-210,155.3,-396.3,270,-559c6.7,-9.3,10,-15.3,10,-18z";case"rparen":return"M76,0c-16.7,0,-25,3,-25,9c0,2,2,6.3,6,13c21.3,28.7,42.3,60.3,\n63,95c96.7,156.7,172.8,332.5,228.5,527.5c55.7,195,92.8,416.5,111.5,664.5\nc11.3,139.3,17,290.7,17,454c0,28,1.7,43,3.3,45l0,"+(t+9)+"\nc-3,4,-3.3,16.7,-3.3,38c0,162,-5.7,313.7,-17,455c-18.7,248,-55.8,469.3,-111.5,664\nc-55.7,194.7,-131.8,370.3,-228.5,527c-20.7,34.7,-41.7,66.3,-63,95c-2,3.3,-4,7,-6,11\nc0,7.3,5.7,11,17,11c0,0,11,0,11,0c9.3,0,14.3,-0.3,15,-1c5.3,-5.3,10.3,-11,15,-17\nc242.7,-294.7,395.3,-681.7,458,-1161c21.3,-164.7,33.3,-350.7,36,-558\nl0,-"+(t+144)+"c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7,\n-470,-1265c-4.7,-6,-9.7,-11.7,-15,-17c-0.7,-0.7,-6.7,-1,-18,-1z";default:throw new Error("Unknown stretchy delimiter.")}})(m,Math.round(1e3*v)),v=new zr(m,v),x=(c/1e3).toFixed(3)+"em",w=(k/1e3).toFixed(3)+"em",v=new Mr([v],{width:x,height:w,viewBox:"0 0 "+c+" "+k}),(v=Pt.makeSvgSpan([],[v],n)).height=k/1e3,v.style.width=x,v.style.height=w,S.push({type:"elem",elem:v})):(S.push(Y0(h,p,a)),S.push(z),null===s?S.push(X0(l,b-d-u+.016,n)):(k=(b-d-u-g)/2+.016,S.push(X0(l,k,n)),S.push(z),S.push(Y0(s,p,a)),S.push(z),S.push(X0(l,k,n))),S.push(z),S.push(Y0(o,p,a))),e=n.havingBaseStyle(yt.TEXT),r=Pt.makeVList({positionType:"bottom",positionData:t,children:S},e),F0(Pt.makeSpan(["delimsizing","mult"],[r],e),yt.TEXT,n,i)}function j0(o,e,t,r,n){return r=((e,t)=>{e*=1e3;let r="";switch(o){case"sqrtMain":r="M95,"+(622+(i=e)+80)+"\nc-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14\nc0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54\nc44.2,-33.3,65.8,-50.3,66.5,-51c1.3,-1.3,3,-2,5,-2c4.7,0,8.7,3.3,12,10\ns173,378,173,378c0.7,0,35.3,-71,104,-213c68.7,-142,137.5,-285,206.5,-429\nc69,-144,104.5,-217.7,106.5,-221\nl"+i/2.075+" -"+i+"\nc5.3,-9.3,12,-14,20,-14\nH400000v"+(40+i)+"H845.2724\ns-225.272,467,-225.272,467s-235,486,-235,486c-2.7,4.7,-9,7,-19,7\nc-6,0,-10,-1,-12,-3s-194,-422,-194,-422s-65,47,-65,47z\nM"+(834+i)+" 80h400000v"+(40+i)+"h-400000z";break;case"sqrtSize1":r="M263,"+(601+(i=e)+80)+"c0.7,0,18,39.7,52,119\nc34,79.3,68.167,158.7,102.5,238c34.3,79.3,51.8,119.3,52.5,120\nc340,-704.7,510.7,-1060.3,512,-1067\nl"+i/2.084+" -"+i+"\nc4.7,-7.3,11,-11,19,-11\nH40000v"+(40+i)+"H1012.3\ns-271.3,567,-271.3,567c-38.7,80.7,-84,175,-136,283c-52,108,-89.167,185.3,-111.5,232\nc-22.3,46.7,-33.8,70.3,-34.5,71c-4.7,4.7,-12.3,7,-23,7s-12,-1,-12,-1\ns-109,-253,-109,-253c-72.7,-168,-109.3,-252,-110,-252c-10.7,8,-22,16.7,-34,26\nc-22,17.3,-33.3,26,-34,26s-26,-26,-26,-26s76,-59,76,-59s76,-60,76,-60z\nM"+(1001+i)+" 80h400000v"+(40+i)+"h-400000z";break;case"sqrtSize2":r="M983 "+(10+(a=e)+80)+"\nl"+a/3.13+" -"+a+"\nc4,-6.7,10,-10,18,-10 H400000v"+(40+a)+"\nH1013.1s-83.4,268,-264.1,840c-180.7,572,-277,876.3,-289,913c-4.7,4.7,-12.7,7,-24,7\ns-12,0,-12,0c-1.3,-3.3,-3.7,-11.7,-7,-25c-35.3,-125.3,-106.7,-373.3,-214,-744\nc-10,12,-21,25,-33,39s-32,39,-32,39c-6,-5.3,-15,-14,-27,-26s25,-30,25,-30\nc26.7,-32.7,52,-63,76,-91s52,-60,52,-60s208,722,208,722\nc56,-175.3,126.3,-397.3,211,-666c84.7,-268.7,153.8,-488.2,207.5,-658.5\nc53.7,-170.3,84.5,-266.8,92.5,-289.5z\nM"+(1001+a)+" 80h400000v"+(40+a)+"h-400000z";break;case"sqrtSize3":r="M424,"+(2398+(a=e)+80)+"\nc-1.3,-0.7,-38.5,-172,-111.5,-514c-73,-342,-109.8,-513.3,-110.5,-514\nc0,-2,-10.7,14.3,-32,49c-4.7,7.3,-9.8,15.7,-15.5,25c-5.7,9.3,-9.8,16,-12.5,20\ns-5,7,-5,7c-4,-3.3,-8.3,-7.7,-13,-13s-13,-13,-13,-13s76,-122,76,-122s77,-121,77,-121\ns209,968,209,968c0,-2,84.7,-361.7,254,-1079c169.3,-717.3,254.7,-1077.7,256,-1081\nl"+a/4.223+" -"+a+"c4,-6.7,10,-10,18,-10 H400000\nv"+(40+a)+"H1014.6\ns-87.3,378.7,-272.6,1166c-185.3,787.3,-279.3,1182.3,-282,1185\nc-2,6,-10,9,-24,9\nc-8,0,-12,-0.7,-12,-2z M"+(1001+a)+" 80\nh400000v"+(40+a)+"h-400000z";break;case"sqrtSize4":r="M473,"+(2713+(n=e)+80)+"\nc339.3,-1799.3,509.3,-2700,510,-2702 l"+n/5.298+" -"+n+"\nc3.3,-7.3,9.3,-11,18,-11 H400000v"+(40+n)+"H1017.7\ns-90.5,478,-276.2,1466c-185.7,988,-279.5,1483,-281.5,1485c-2,6,-10,9,-24,9\nc-8,0,-12,-0.7,-12,-2c0,-1.3,-5.3,-32,-16,-92c-50.7,-293.3,-119.7,-693.3,-207,-1200\nc0,-1.3,-5.3,8.7,-16,30c-10.7,21.3,-21.3,42.7,-32,64s-16,33,-16,33s-26,-26,-26,-26\ns76,-153,76,-153s77,-151,77,-151c0.7,0.7,35.7,202,105,604c67.3,400.7,102,602.7,104,\n606zM"+(1001+n)+" 80h400000v"+(40+n)+"H1017.7z";break;case"sqrtTall":r="M702 "+(80+(n=e))+"H400000"+(40+n)+"\nH742v"+(t-54-80-n)+"l-4 4-4 4c-.667.7 -2 1.5-4 2.5s-4.167 1.833-6.5 2.5-5.5 1-9.5 1\nh-12l-28-84c-16.667-52-96.667 -294.333-240-727l-212 -643 -85 170\nc-4-3.333-8.333-7.667-13 -13l-13-13l77-155 77-156c66 199.333 139 419.667\n219 661 l218 661zM702 80H400000v"+(40+n)+"H742z"}var n,a,i;return r})(r,t),r=new zr(o,r),r=new Mr([r],{width:"400em",height:D(e),viewBox:"0 0 400000 "+t,preserveAspectRatio:"xMinYMin slice"}),Pt.makeSvgSpan(["hide-tail"],[r],n)}function _0(n,a,i,o){for(let r=Math.min(2,3-o.style.size);r<i.length&&"stack"!==i[r].type;r++){let e=V0(n,(e=>{if("small"===e.type)return"Main-Regular";if("large"===e.type)return"Size"+e.size+"-Regular";if("stack"===e.type)return"Size4-Regular";throw new Error("Add support for delim type '"+e.type+"' here.")})(i[r]),"math"),t=e.height+e.depth;if("small"===i[r].type&&(t*=o.havingBaseStyle(i[r].style).sizeMultiplier),t>a)return i[r]}return i[i.length-1]}function $0(e,t,r,n,a,i){var o,s,l,h,m,c;return"<"===e||"\\lt"===e||"⟨"===e?e="\\langle":">"!==e&&"\\gt"!==e&&"⟩"!==e||(e="\\rangle"),"small"===(c=_0(e,t,bt.contains(Be,e)?Ce:bt.contains(Ae,e)?qe:Ne,n)).type?(o=e,s=c.style,l=r,m=i,o=F0(Pt.makeSymbol(o,"Main-Regular",a,h=n),s,h,m),l&&G0(o,h,s),o):"large"===c.type?U0(e,c.size,r,n,a,i):W0(e,t,r,n,a,i)}Vt({type:"cdlabel",names:["\\\\cdleft","\\\\cdright"],props:{numArgs:1},handler(e,t){var{parser:e,funcName:r}=e;return{type:"cdlabel",mode:e.mode,side:r.slice(4),label:t[0]}},htmlBuilder(e,t){var r=t.havingStyle(t.style.sup());return(r=Pt.wrapFragment(P(e.label,r,t),t)).classes.push("cd-label-"+e.side),r.style.bottom=D(.8-r.depth),r.height=0,r.depth=0,r},mathmlBuilder(e,t){let r=new Ut.MathNode("mrow",[w(e.label,t)]);return(r=new Ut.MathNode("mpadded",[r])).setAttribute("width","0"),"left"===e.side&&r.setAttribute("lspace","-1width"),r.setAttribute("voffset","0.7em"),(r=new Ut.MathNode("mstyle",[r])).setAttribute("displaystyle","false"),r.setAttribute("scriptlevel","1"),r}}),Vt({type:"cdlabelparent",names:["\\\\cdparent"],props:{numArgs:1},handler(e,t){return{type:"cdlabelparent",mode:(e=e.parser).mode,fragment:t[0]}},htmlBuilder(e,t){return(e=Pt.wrapFragment(P(e.fragment,t),t)).classes.push("cd-vert-arrow"),e},mathmlBuilder(e,t){return new Ut.MathNode("mrow",[w(e.fragment,t)])}}),Vt({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler(e,t){var e=e.parser,r=Xt(t[0],"ordgroup").body;let n="";for(let e=0;e<r.length;e++)n+=Xt(r[e],"textord").text;if(t=parseInt(n),isNaN(t))throw new ft("\\@char has non-numeric argument "+n);if(t<0||1114111<=t)throw new ft("\\@char with invalid code point "+n);return t=t<=65535?String.fromCharCode(t):(t-=65536,String.fromCharCode(55296+(t>>10),56320+(1023&t))),{type:"textord",mode:e.mode,text:t}}}),Vt({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,argTypes:["color","original"]},handler(e,t){var e=e.parser,r=Xt(t[0],"color-token").color,t=t[1];return{type:"color",mode:e.mode,color:r,body:Ft(t)}},htmlBuilder:Ht=(e,t)=>(t=Gt(e.body,t.withColor(e.color),!1),Pt.makeFragment(t)),mathmlBuilder:p0=(e,t)=>(t=x(e.body,t.withColor(e.color)),(t=new Ut.MathNode("mstyle",t)).setAttribute("mathcolor",e.color),t)}),Vt({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,argTypes:["color"]},handler(e,t){var{parser:e,breakOnTokenText:r}=e,t=Xt(t[0],"color-token").color,r=(e.gullet.macros.set("\\current@color",t),e.parseExpression(!0,r));return{type:"color",mode:e.mode,color:t,body:r}},htmlBuilder:Ht,mathmlBuilder:p0}),Vt({type:"cr",names:["\\\\"],props:{numArgs:0,numOptionalArgs:0,allowedInText:!0},handler(e,t,r){var n="["===(e=e.parser).gullet.future().text?e.parseSizeGroup(!0):null,a=!e.settings.displayMode||!e.settings.useStrictBehavior("newLineInDisplayMode","In LaTeX, \\\\ or \\newline does nothing in display mode");return{type:"cr",mode:e.mode,newLine:a,size:n&&Xt(n,"size").value}},htmlBuilder(e,t){var r=Pt.makeSpan(["mspace"],[],t);return e.newLine&&(r.classes.push("newline"),e.size)&&(r.style.marginTop=D(wt(e.size,t))),r},mathmlBuilder(e,t){var r=new Ut.MathNode("mspace");return e.newLine&&(r.setAttribute("linebreak","newline"),e.size)&&r.setAttribute("height",D(wt(e.size,t))),r}});let M={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},ke=e=>{var t=e.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(t))throw new ft("Expected a control sequence",e);return t},Se=(e,t,r,n)=>{let a=e.gullet.macros.get(r.text);null==a&&(r.noexpand=!0,a={tokens:[r],numArgs:0,unexpandable:!e.gullet.isExpandable(r.text)}),e.gullet.macros.set(t,a,n)},z=(Vt({type:"internal",names:["\\global","\\long","\\\\globallong"],props:{numArgs:0,allowedInText:!0},handler(e){var{parser:e,funcName:t}=e,r=(e.consumeSpaces(),e.fetch());if(M[r.text])return"\\global"!==t&&"\\\\globallong"!==t||(r.text=M[r.text]),Xt(e.parseFunction(),"internal");throw new ft("Invalid token after macro prefix",r)}}),Vt({type:"internal",names:["\\def","\\gdef","\\edef","\\xdef"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){let{parser:t,funcName:r}=e,n=t.gullet.popToken();if(e=n.text,/^(?:[\\{}$&#^_]|EOF)$/.test(e))throw new ft("Expected a control sequence",n);let a,i=0;for(var o=[[]];"{"!==t.gullet.future().text;)if("#"===(n=t.gullet.popToken()).text){if("{"===t.gullet.future().text){a=t.gullet.future(),o[i].push("{");break}if(n=t.gullet.popToken(),!/^[1-9]$/.test(n.text))throw new ft('Invalid argument number "'+n.text+'"');if(parseInt(n.text)!==i+1)throw new ft('Argument number "'+n.text+'" out of order');i++,o.push([])}else{if("EOF"===n.text)throw new ft("Expected a macro definition");o[i].push(n.text)}let s=t.gullet.consumeArg().tokens;return a&&s.unshift(a),"\\edef"!==r&&"\\xdef"!==r||(s=t.gullet.expandTokens(s)).reverse(),t.gullet.macros.set(e,{tokens:s,numArgs:i,delimiters:o},r===M[r]),{type:"internal",mode:t.mode}}}),Vt({type:"internal",names:["\\let","\\\\globallet"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:e,funcName:t}=e,r=ke(e.gullet.popToken()),n=(e.gullet.consumeSpaces(),(e=>{let t=e.gullet.popToken();return t="="===t.text&&" "===(t=e.gullet.popToken()).text?e.gullet.popToken():t})(e));return Se(e,r,n,"\\\\globallet"===t),{type:"internal",mode:e.mode}}}),Vt({type:"internal",names:["\\futurelet","\\\\globalfuture"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:e,funcName:t}=e,r=ke(e.gullet.popToken()),n=e.gullet.popToken(),a=e.gullet.popToken();return Se(e,r,a,"\\\\globalfuture"===t),e.gullet.pushToken(a),e.gullet.pushToken(n),{type:"internal",mode:e.mode}}}),{type:"kern",size:-.008}),Me=["|","\\lvert","\\rvert","\\vert"],ze=["\\|","\\lVert","\\rVert","\\Vert"],Ae=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","\\surd"],Te=["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱"],Be=["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"],A=[0,1.2,1.8,2.4,3],Ce=[{type:"small",style:yt.SCRIPTSCRIPT},{type:"small",style:yt.SCRIPT},{type:"small",style:yt.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],Ne=[{type:"small",style:yt.SCRIPTSCRIPT},{type:"small",style:yt.SCRIPT},{type:"small",style:yt.TEXT},{type:"stack"}],qe=[{type:"small",style:yt.SCRIPTSCRIPT},{type:"small",style:yt.SCRIPT},{type:"small",style:yt.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}];var Z0={sqrtImage:function(e,t){let r=t.havingBaseSizing(),n=_0("\\surd",e*r.sizeMultiplier,qe,r),a=r.sizeMultiplier;r=Math.max(0,t.minRuleThickness-t.fontMetrics().sqrtRuleThickness);let i,o,s=0,l=0,h=0;return o="small"===n.type?(h=1e3+1e3*r+80,e<1?a=1:e<1.4&&(a=.7),s=(1+r+.08)/a,l=(1+r)/a,(i=j0("sqrtMain",s,h,r,t)).style.minWidth="0.853em",.833/a):"large"===n.type?(h=1080*A[n.size],l=(A[n.size]+r)/a,s=(A[n.size]+r+.08)/a,(i=j0("sqrtSize"+n.size,s,h,r,t)).style.minWidth="1.02em",1/a):(s=e+r+.08,l=e+r,h=Math.floor(1e3*e+r)+80,(i=j0("sqrtTall",s,h,r,t)).style.minWidth="0.742em",1.056),i.height=l,i.style.height=D(s),{span:i,advanceWidth:o,ruleWidth:(t.fontMetrics().sqrtRuleThickness+r)*a}},sizedDelim:function(e,t,r,n,a){if("<"===e||"\\lt"===e||"⟨"===e?e="\\langle":">"!==e&&"\\gt"!==e&&"⟩"!==e||(e="\\rangle"),bt.contains(Ae,e)||bt.contains(Be,e))return U0(e,t,!1,r,n,a);if(bt.contains(Te,e))return W0(e,A[t],!1,r,n,a);throw new ft("Illegal delimiter: '"+e+"'")},sizeToMaxHeight:A,customSizedDelim:$0,leftRightDelim:function(e,t,r,n,a,i){var o=n.fontMetrics().axisHeight*n.sizeMultiplier,s=5/n.fontMetrics().ptPerEm,t=Math.max(t-o,r+o);return $0(e,r=Math.max(t/500*901,2*t-s),!0,n,a,i)}};let Ie={"\\bigl":{mclass:"mopen",size:1},"\\Bigl":{mclass:"mopen",size:2},"\\biggl":{mclass:"mopen",size:3},"\\Biggl":{mclass:"mopen",size:4},"\\bigr":{mclass:"mclose",size:1},"\\Bigr":{mclass:"mclose",size:2},"\\biggr":{mclass:"mclose",size:3},"\\Biggr":{mclass:"mclose",size:4},"\\bigm":{mclass:"mrel",size:1},"\\Bigm":{mclass:"mrel",size:2},"\\biggm":{mclass:"mrel",size:3},"\\Biggm":{mclass:"mrel",size:4},"\\big":{mclass:"mord",size:1},"\\Big":{mclass:"mord",size:2},"\\bigg":{mclass:"mord",size:3},"\\Bigg":{mclass:"mord",size:4}},Re=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","<",">","\\langle","⟨","\\rangle","⟩","\\lt","\\gt","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱","/","\\backslash","|","\\vert","\\|","\\Vert","\\uparrow","\\Uparrow","\\downarrow","\\Downarrow","\\updownarrow","\\Updownarrow","."];function K0(e,t){var r=L0(e);if(r&&bt.contains(Re,r.text))return r;throw new ft(r?"Invalid delimiter '"+r.text+"' after '"+t.funcName+"'":"Invalid delimiter type '"+e.type+"'",e)}function J0(e){if(!e.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}Vt({type:"delimsizing",names:["\\bigl","\\Bigl","\\biggl","\\Biggl","\\bigr","\\Bigr","\\biggr","\\Biggr","\\bigm","\\Bigm","\\biggm","\\Biggm","\\big","\\Big","\\bigg","\\Bigg"],props:{numArgs:1,argTypes:["primitive"]},handler:(e,t)=>(t=K0(t[0],e),{type:"delimsizing",mode:e.parser.mode,size:Ie[e.funcName].size,mclass:Ie[e.funcName].mclass,delim:t.text}),htmlBuilder:(e,t)=>"."===e.delim?Pt.makeSpan([e.mclass]):Z0.sizedDelim(e.delim,e.size,t,e.mode,[e.mclass]),mathmlBuilder:e=>{var t=[],t=("."!==e.delim&&t.push(Yt(e.delim,e.mode)),new Ut.MathNode("mo",t)),e=("mopen"===e.mclass||"mclose"===e.mclass?t.setAttribute("fence","true"):t.setAttribute("fence","false"),t.setAttribute("stretchy","true"),D(Z0.sizeToMaxHeight[e.size]));return t.setAttribute("minsize",e),t.setAttribute("maxsize",e),t}}),Vt({type:"leftright-right",names:["\\right"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var r=e.parser.gullet.macros.get("\\current@color");if(r&&"string"!=typeof r)throw new ft("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:e.parser.mode,delim:K0(t[0],e).text,color:r}}}),Vt({type:"leftright",names:["\\left"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var t=K0(t[0],e),r=(++(e=e.parser).leftrightDepth,e.parseExpression(!1)),n=(--e.leftrightDepth,e.expect("\\right",!1),Xt(e.parseFunction(),"leftright-right"));return{type:"leftright",mode:e.mode,body:r,left:t.text,right:n.delim,rightColor:n.color}},htmlBuilder:(t,e)=>{J0(t);let r=Gt(t.body,e,!0,["mopen","mclose"]),n,a,i=0,o=0,s=!1;for(let e=0;e<r.length;e++)r[e].isMiddle?s=!0:(i=Math.max(r[e].height,i),o=Math.max(r[e].depth,o));if(i*=e.sizeMultiplier,o*=e.sizeMultiplier,n="."===t.left?z0(e,["mopen"]):Z0.leftRightDelim(t.left,i,o,e,t.mode,["mopen"]),r.unshift(n),s)for(let e=1;e<r.length;e++){var l=r[e].isMiddle;l&&(r[e]=Z0.leftRightDelim(l.delim,i,o,l.options,t.mode,[]))}var h;return a="."===t.right?z0(e,["mclose"]):(h=t.rightColor?e.withColor(t.rightColor):e,Z0.leftRightDelim(t.right,i,o,h,t.mode,["mclose"])),r.push(a),Pt.makeSpan(["minner"],r,e)},mathmlBuilder:(e,t)=>{J0(e);var r,t=x(e.body,t);return"."!==e.left&&((r=new Ut.MathNode("mo",[Yt(e.left,e.mode)])).setAttribute("fence","true"),t.unshift(r)),"."!==e.right&&((r=new Ut.MathNode("mo",[Yt(e.right,e.mode)])).setAttribute("fence","true"),e.rightColor&&r.setAttribute("mathcolor",e.rightColor),t.push(r)),C0(t)}}),Vt({type:"middle",names:["\\middle"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{if(t=K0(t[0],e),e.parser.leftrightDepth)return{type:"middle",mode:e.parser.mode,delim:t.text};throw new ft("\\middle without preceding \\left",t)},htmlBuilder:(e,t)=>{let r;return"."===e.delim?r=z0(t,[]):(r=Z0.sizedDelim(e.delim,1,t,e.mode,[]),e={delim:e.delim,options:t},r.isMiddle=e),r},mathmlBuilder:(e,t)=>(e="\\vert"===e.delim||"|"===e.delim?Yt("|","text"):Yt(e.delim,e.mode),(e=new Ut.MathNode("mo",[e])).setAttribute("fence","true"),e.setAttribute("lspace","0.05em"),e.setAttribute("rspace","0.05em"),e)}),Vt({type:"enclose",names:["\\colorbox"],props:{numArgs:2,allowedInText:!0,argTypes:["color","text"]},handler(e,t,r){var{parser:e,funcName:n}=e,a=Xt(t[0],"color-token").color;return{type:"enclose",mode:e.mode,label:n,backgroundColor:a,body:t[1]}},htmlBuilder:Bt=(r,n)=>{let a=Pt.wrapFragment(P(r.body,n),n),i=r.label.slice(1),s,e=n.sizeMultiplier,l=0,h=bt.isCharacterBox(r.body);if("sout"===i)(s=Pt.makeSpan(["stretchy","sout"])).height=n.fontMetrics().defaultRuleThickness/e,l=-.5*n.fontMetrics().xHeight;else if("phase"===i){var t=wt({number:.6,unit:"pt"},n),o=wt({number:.35,unit:"ex"},n),m=(e/=n.havingBaseSizing().sizeMultiplier,a.height+a.depth+t+o),c=(a.style.paddingLeft=D(m/2+t),Math.floor(1e3*m*e)),p="M400000 "+c+" H0 L"+c/2+" 0 l65 45 L145 "+(c-80)+" H400000z",p=new Mr([new zr("phase",p)],{width:"400em",height:D(c/1e3),viewBox:"0 0 400000 "+c,preserveAspectRatio:"xMinYMin slice"});(s=Pt.makeSvgSpan(["hide-tail"],[p],n)).style.height=D(m),l=a.depth+t+o}else{/cancel/.test(i)?h||a.classes.push("cancel-pad"):"angl"===i?a.classes.push("anglpad"):a.classes.push("boxpad");let e=0,o,t=0;o=/box/.test(i)?(t=Math.max(n.fontMetrics().fboxrule,n.minRuleThickness),e=n.fontMetrics().fboxsep+("colorbox"===i?0:t)):"angl"===i?(t=Math.max(n.fontMetrics().defaultRuleThickness,n.minRuleThickness),e=4*t,Math.max(0,.25-a.depth)):e=h?.2:0,s=((e,t,r,n,a)=>{let i;return n=e.height+e.depth+r+o,/fbox|color|angl/.test(t)?(i=Pt.makeSpan(["stretchy",t],[],a),"fbox"===t&&(e=a.color&&a.getColor())&&(i.style.borderColor=e)):(r=[],/^[bx]cancel$/.test(t)&&r.push(new Ar({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(t)&&r.push(new Ar({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"})),e=new Mr(r,{width:"100%",height:D(n)}),i=Pt.makeSvgSpan([],[e],a)),i.height=n,i.style.height=D(n),i})(a,i,e,o,n),/fbox|boxed|fcolorbox/.test(i)?(s.style.borderStyle="solid",s.style.borderWidth=D(t)):"angl"===i&&.049!==t&&(s.style.borderTopWidth=D(t),s.style.borderRightWidth=D(t)),l=a.depth+o,r.backgroundColor&&(s.style.backgroundColor=r.backgroundColor,r.borderColor)&&(s.style.borderColor=r.borderColor)}return p=r.backgroundColor?Pt.makeVList({positionType:"individualShift",children:[{type:"elem",elem:s,shift:l},{type:"elem",elem:a,shift:0}]},n):(c=/cancel|phase/.test(i)?["svg-align"]:[],Pt.makeVList({positionType:"individualShift",children:[{type:"elem",elem:a,shift:0},{type:"elem",elem:s,shift:l,wrapperClasses:c}]},n)),/cancel/.test(i)&&(p.height=a.height,p.depth=a.depth),/cancel/.test(i)&&!h?Pt.makeSpan(["mord","cancel-lap"],[p],n):Pt.makeSpan(["mord"],[p],n)},mathmlBuilder:It=(e,t)=>{var r=new Ut.MathNode(-1<e.label.indexOf("colorbox")?"mpadded":"menclose",[w(e.body,t)]);switch(e.label){case"\\cancel":r.setAttribute("notation","updiagonalstrike");break;case"\\bcancel":r.setAttribute("notation","downdiagonalstrike");break;case"\\phase":r.setAttribute("notation","phasorangle");break;case"\\sout":r.setAttribute("notation","horizontalstrike");break;case"\\fbox":r.setAttribute("notation","box");break;case"\\angl":r.setAttribute("notation","actuarial");break;case"\\fcolorbox":case"\\colorbox":var n=t.fontMetrics().fboxsep*t.fontMetrics().ptPerEm;r.setAttribute("width","+"+2*n+"pt"),r.setAttribute("height","+"+2*n+"pt"),r.setAttribute("lspace",n+"pt"),r.setAttribute("voffset",n+"pt"),"\\fcolorbox"===e.label&&(n=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness),r.setAttribute("style","border: "+n+"em solid "+String(e.borderColor)));break;case"\\xcancel":r.setAttribute("notation","updiagonalstrike downdiagonalstrike")}return e.backgroundColor&&r.setAttribute("mathbackground",e.backgroundColor),r}}),Vt({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,argTypes:["color","color","text"]},handler(e,t,r){var{parser:e,funcName:n}=e,a=Xt(t[0],"color-token").color,i=Xt(t[1],"color-token").color;return{type:"enclose",mode:e.mode,label:n,backgroundColor:i,borderColor:a,body:t[2]}},htmlBuilder:Bt,mathmlBuilder:It}),Vt({type:"enclose",names:["\\fbox"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!0},handler(e,t){return{type:"enclose",mode:(e=e.parser).mode,label:"\\fbox",body:t[0]}}}),Vt({type:"enclose",names:["\\cancel","\\bcancel","\\xcancel","\\sout","\\phase"],props:{numArgs:1},handler(e,t){var{parser:e,funcName:r}=e,t=t[0];return{type:"enclose",mode:e.mode,label:r,body:t}},htmlBuilder:Bt,mathmlBuilder:It}),Vt({type:"enclose",names:["\\angl"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!1},handler(e,t){return{type:"enclose",mode:(e=e.parser).mode,label:"\\angl",body:t[0]}}});let He={};function Q0(e){var{type:e,names:t,props:r,handler:n,htmlBuilder:a,mathmlBuilder:i}=e,o={type:e,numArgs:r.numArgs||0,allowedInText:!1,numOptionalArgs:0,handler:n};for(let e=0;e<t.length;++e)He[t[e]]=o;a&&(d[e]=a),i&&(u[e]=i)}let Oe={};function Wt(e,t){Oe[e]=t}class Zt{constructor(e,t,r){this.lexer=void 0,this.start=void 0,this.end=void 0,this.lexer=e,this.start=t,this.end=r}static range(e,t){return t?e&&e.loc&&t.loc&&e.loc.lexer===t.loc.lexer?new Zt(e.loc.lexer,e.loc.start,t.loc.end):null:e&&e.loc}}class Kt{constructor(e,t){this.text=void 0,this.loc=void 0,this.noexpand=void 0,this.treatAsRelax=void 0,this.text=e,this.loc=t}range(e,t){return new Kt(t,Zt.range(this,e))}}function er(e){var t=[];e.consumeSpaces();let r=e.fetch().text;for("\\relax"===r&&(e.consume(),e.consumeSpaces(),r=e.fetch().text);"\\hline"===r||"\\hdashline"===r;)e.consume(),t.push("\\hdashline"===r),e.consumeSpaces(),r=e.fetch().text;return t}let T=e=>{if(!e.parser.settings.displayMode)throw new ft("{"+e.envName+"} can be used only in display mode.")};function tr(e){if(-1===e.indexOf("ed"))return-1===e.indexOf("*")}function rr(r,e,n){let{hskipBeforeAndAfter:t,addJot:a,cols:i,arraystretch:o,colSeparationType:s,autoTag:l,singleRow:h,emptySingleRow:m,maxNumCols:c,leqno:p}=e;if(r.gullet.beginGroup(),h||r.gullet.macros.set("\\cr","\\\\\\relax"),!o)if(null==(e=r.gullet.expandMacroAsText("\\arraystretch")))o=1;else if(!(o=parseFloat(e))||o<0)throw new ft("Invalid \\arraystretch: "+e);r.gullet.beginGroup();let d=[],u=[d],g=[],f=[],b=null!=l?[]:void 0;function y(){l&&r.gullet.macros.set("\\@eqnsw","1",!0)}function x(){b&&(r.gullet.macros.get("\\df@tag")?(b.push(r.subparse([new Kt("\\df@tag")])),r.gullet.macros.set("\\df@tag",void 0,!0)):b.push(Boolean(l)&&"1"===r.gullet.macros.get("\\@eqnsw")))}for(y(),f.push(er(r));;){let e=r.parseExpression(!1,h?"\\end":"\\\\"),t=(r.gullet.endGroup(),r.gullet.beginGroup(),e={type:"ordgroup",mode:r.mode,body:e},n&&(e={type:"styling",mode:r.mode,style:n,body:[e]}),d.push(e),r.fetch().text);if("&"===t){if(c&&d.length===c){if(h||s)throw new ft("Too many tab characters: &",r.nextToken);r.settings.reportNonstrict("textEnv","Too few columns specified in the {array} column argument.")}r.consume()}else{if("\\end"===t){x(),1===d.length&&"styling"===e.type&&0===e.body[0].body.length&&(1<u.length||!m)&&u.pop(),f.length<u.length+1&&f.push([]);break}if("\\\\"!==t)throw new ft("Expected & or \\\\ or \\cr or \\end",r.nextToken);{let e;r.consume()," "!==r.gullet.future().text&&(e=r.parseSizeGroup(!0)),g.push(e?e.value:null),x(),f.push(er(r)),d=[],u.push(d),y()}}}return r.gullet.endGroup(),r.gullet.endGroup(),{type:"array",mode:r.mode,addJot:a,arraystretch:o,body:u,cols:i,rowGaps:g,hskipBeforeAndAfter:t,hLinesBeforeRow:f,colSeparationType:s,tags:b,leqno:p}}function nr(e){return"d"===e.slice(0,1)?"display":"text"}function ar(o,s){let l,h,n=o.body.length,m=o.hLinesBeforeRow,c=0,p=new Array(n),r=[],a=Math.max(s.fontMetrics().arrayRuleWidth,s.minRuleThickness),e=1/s.fontMetrics().ptPerEm,i=5*e,t=(o.colSeparationType&&"small"===o.colSeparationType&&(i=s.havingStyle(yt.SCRIPT).sizeMultiplier/s.sizeMultiplier*.2778),"CD"===o.colSeparationType?wt({number:3,unit:"ex"},s):12*e),d=3*e,u=.7*(t*=o.arraystretch),g=.3*t,f=0;function b(t){for(let e=0;e<t.length;++e)0<e&&(f+=.25),r.push({pos:f,isDashed:t[e]})}for(b(m[0]),l=0;l<o.body.length;++l){let e=o.body[l],t=u,r=g,n=(c<e.length&&(c=e.length),new Array(e.length));for(h=0;h<e.length;++h){var y=P(e[h],s);r<y.depth&&(r=y.depth),t<y.height&&(t=y.height),n[h]=y}let a=o.rowGaps[l],i=0;a&&0<(i=wt(a,s))&&(i+=g,r<i&&(r=i),i=0),o.addJot&&(r+=d),n.height=t,n.depth=r,f+=t,n.pos=f,f+=r+i,p[l]=n,b(m[l+1])}let x=f/2+s.fontMetrics().axisHeight,w=o.cols||[],v=[],k,S,M=[];if(o.tags&&o.tags.some(e=>e))for(l=0;l<n;++l){var z=p[l],A=z.pos-x,T=o.tags[l];(T=!0===T?Pt.makeSpan(["eqn-num"],[],s):!1===T?Pt.makeSpan([],[],s):Pt.makeSpan([],Gt(T,s,!0),s)).depth=z.depth,T.height=z.height,M.push({type:"elem",elem:T,shift:A})}for(h=0,S=0;h<c||S<w.length;++h,++S){let t,r=w[S]||{},e=!0;for(;"separator"===r.type;){if(e||((k=Pt.makeSpan(["arraycolsep"],[])).style.width=D(s.fontMetrics().doubleRuleSep),v.push(k)),"|"!==r.separator&&":"!==r.separator)throw new ft("Invalid separator type: "+r.separator);var B="|"===r.separator?"solid":"dashed",C=Pt.makeSpan(["vertical-separator"],[],s);C.style.height=D(f),C.style.borderRightWidth=D(a),C.style.borderRightStyle=B,C.style.margin="0 "+D(-a/2),(B=f-x)&&(C.style.verticalAlign=D(-B)),v.push(C),S++,r=w[S]||{},e=!1}if(!(h>=c)){(0<h||o.hskipBeforeAndAfter)&&0!==(t=bt.deflt(r.pregap,i))&&((k=Pt.makeSpan(["arraycolsep"],[])).style.width=D(t),v.push(k));let e=[];for(l=0;l<n;++l){var N,q=p[l],I=q[h];I&&(N=q.pos-x,I.depth=q.depth,I.height=q.height,e.push({type:"elem",elem:I,shift:N}))}e=Pt.makeVList({positionType:"individualShift",children:e},s),e=Pt.makeSpan(["col-align-"+(r.align||"c")],[e]),v.push(e),(h<c-1||o.hskipBeforeAndAfter)&&0!==(t=bt.deflt(r.postgap,i))&&((k=Pt.makeSpan(["arraycolsep"],[])).style.width=D(t),v.push(k))}}if(p=Pt.makeSpan(["mtable"],v),0<r.length){for(var E=Pt.makeLineSpan("hline",s,a),L=Pt.makeLineSpan("hdashline",s,a),R=[{type:"elem",elem:p,shift:0}];0<r.length;){var H=r.pop(),O=H.pos-x;R.push(H.isDashed?{type:"elem",elem:L,shift:O}:{type:"elem",elem:E,shift:O})}p=Pt.makeVList({positionType:"individualShift",children:R},s)}return 0===M.length?Pt.makeSpan(["mord"],[p],s):(t=Pt.makeVList({positionType:"individualShift",children:M},s),t=Pt.makeSpan(["tag"],[t],s),Pt.makeFragment([p,t]))}function ir(o,t){var r=[],n=new Ut.MathNode("mtd",[],["mtr-glue"]),a=new Ut.MathNode("mtd",[],["mml-eqn-num"]);for(let e=0;e<o.body.length;e++){var i=o.body[e],s=[];for(let e=0;e<i.length;e++)s.push(new Ut.MathNode("mtd",[w(i[e],t)]));o.tags&&o.tags[e]&&(s.unshift(n),s.push(n),o.leqno?s.unshift(a):s.push(a)),r.push(new Ut.MathNode("mtr",s))}let e=new Ut.MathNode("mtable",r),l=.5===o.arraystretch?.1:.16+o.arraystretch-1+(o.addJot?.09:0),h=(e.setAttribute("rowspacing",D(l)),""),m="";if(o.cols&&0<o.cols.length){let t=o.cols,r="",n=!1,a=0,i=t.length;"separator"===t[0].type&&(h+="top ",a=1),"separator"===t[t.length-1].type&&(h+="bottom ",--i);for(let e=a;e<i;e++)"align"===t[e].type?(m+=Ee[t[e].align],n&&(r+="none "),n=!0):"separator"===t[e].type&&n&&(r+="|"===t[e].separator?"solid ":"dashed ",n=!1);e.setAttribute("columnalign",m.trim()),/[sd]/.test(r)&&e.setAttribute("columnlines",r.trim())}if("align"===o.colSeparationType){let t=o.cols||[],r="";for(let e=1;e<t.length;e++)r+=e%2?"0em ":"1em ";e.setAttribute("columnspacing",r.trim())}else"alignat"===o.colSeparationType||"gather"===o.colSeparationType?e.setAttribute("columnspacing","0em"):"small"===o.colSeparationType?e.setAttribute("columnspacing","0.2778em"):"CD"===o.colSeparationType?e.setAttribute("columnspacing","0.5em"):e.setAttribute("columnspacing","1em");let c="",p=o.hLinesBeforeRow;h=(h+=0<p[0].length?"left ":"")+(0<p[p.length-1].length?"right ":"");for(let e=1;e<p.length-1;e++)c+=0===p[e].length?"none ":p[e][0]?"dashed ":"solid ";return/[sd]/.test(c)&&e.setAttribute("rowlines",c.trim()),""!==h&&(e=new Ut.MathNode("menclose",[e])).setAttribute("notation",h.trim()),o.arraystretch&&o.arraystretch<1&&(e=new Ut.MathNode("mstyle",[e])).setAttribute("scriptlevel","1"),e}function or(e,r){-1===e.envName.indexOf("ed")&&T(e);var n=[],t=-1<e.envName.indexOf("at")?"alignat":"align",a="split"===e.envName,t=rr(e.parser,{cols:n,addJot:!0,autoTag:a?void 0:tr(e.envName),emptySingleRow:!0,colSeparationType:t,maxNumCols:a?2:void 0,leqno:e.parser.settings.leqno},"display");let i,o=0,s={type:"ordgroup",mode:e.mode,body:[]};if(r[0]&&"ordgroup"===r[0].type){let t="";for(let e=0;e<r[0].body.length;e++)t+=Xt(r[0].body[e],"textord").text;i=Number(t),o=2*i}let l=!o;t.body.forEach(function(t){for(let e=1;e<t.length;e+=2){var r=Xt(t[e],"styling");Xt(r.body[0],"ordgroup").body.unshift(s)}if(l)o<t.length&&(o=t.length);else{var e=t.length/2;if(i<e)throw new ft("Too many math in a row: expected "+i+", but got "+e,t[0])}});for(let r=0;r<o;++r){let e="r",t=0;r%2==1?e="l":0<r&&l&&(t=1),n[r]={type:"align",align:e,pregap:t,postgap:0}}return t.colSeparationType=l?"align":"alignat",t}let Ee={c:"center ",l:"left ",r:"right "};Q0({type:"array",names:["array","darray"],props:{numArgs:1},handler(e,t){return t={cols:t=(L0(t[0])?[t[0]]:Xt(t[0],"ordgroup").body).map(function(e){var t=E0(e).text;if(-1!=="lcr".indexOf(t))return{type:"align",align:t};if("|"===t)return{type:"separator",separator:"|"};if(":"===t)return{type:"separator",separator:":"};throw new ft("Unknown column alignment: "+t,e)}),hskipBeforeAndAfter:!0,maxNumCols:t.length},rr(e.parser,t,nr(e.envName))},htmlBuilder:ar,mathmlBuilder:ir}),Q0({type:"array",names:["matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix","matrix*","pmatrix*","bmatrix*","Bmatrix*","vmatrix*","Vmatrix*"],props:{numArgs:0},handler(e){let t={matrix:null,pmatrix:["(",")"],bmatrix:["[","]"],Bmatrix:["\\{","\\}"],vmatrix:["|","|"],Vmatrix:["\\Vert","\\Vert"]}[e.envName.replace("*","")],r="c";var n={hskipBeforeAndAfter:!1,cols:[{type:"align",align:r}]};if("*"===e.envName.charAt(e.envName.length-1)){var a=e.parser;if(a.consumeSpaces(),"["===a.fetch().text){if(a.consume(),a.consumeSpaces(),r=a.fetch().text,-1==="lcr".indexOf(r))throw new ft("Expected l or c or r",a.nextToken);a.consume(),a.consumeSpaces(),a.expect("]"),a.consume(),n.cols=[{type:"align",align:r}]}}return n=rr(e.parser,n,nr(e.envName)),a=Math.max(0,...n.body.map(e=>e.length)),n.cols=new Array(a).fill({type:"align",align:r}),t?{type:"leftright",mode:e.mode,body:[n],left:t[0],right:t[1],rightColor:void 0}:n},htmlBuilder:ar,mathmlBuilder:ir}),Q0({type:"array",names:["smallmatrix"],props:{numArgs:0},handler(e){return(e=rr(e.parser,{arraystretch:.5},"script")).colSeparationType="small",e},htmlBuilder:ar,mathmlBuilder:ir}),Q0({type:"array",names:["subarray"],props:{numArgs:1},handler(e,t){if(1<(t=(L0(t[0])?[t[0]]:Xt(t[0],"ordgroup").body).map(function(e){var t=E0(e).text;if(-1!=="lc".indexOf(t))return{type:"align",align:t};throw new ft("Unknown column alignment: "+t,e)})).length)throw new ft("{subarray} can contain only one column");if(0<(e=rr(e.parser,{cols:t,hskipBeforeAndAfter:!1,arraystretch:.5},"script")).body.length&&1<e.body[0].length)throw new ft("{subarray} can contain only one column");return e},htmlBuilder:ar,mathmlBuilder:ir}),Q0({type:"array",names:["cases","dcases","rcases","drcases"],props:{numArgs:0},handler(e){var t=rr(e.parser,{arraystretch:1.2,cols:[{type:"align",align:"l",pregap:0,postgap:1},{type:"align",align:"l",pregap:0,postgap:0}]},nr(e.envName));return{type:"leftright",mode:e.mode,body:[t],left:-1<e.envName.indexOf("r")?".":"\\{",right:-1<e.envName.indexOf("r")?"\\}":".",rightColor:void 0}},htmlBuilder:ar,mathmlBuilder:ir}),Q0({type:"array",names:["align","align*","aligned","split"],props:{numArgs:0},handler:or,htmlBuilder:ar,mathmlBuilder:ir}),Q0({type:"array",names:["gathered","gather","gather*"],props:{numArgs:0},handler(e){bt.contains(["gather","gather*"],e.envName)&&T(e);var t={cols:[{type:"align",align:"c"}],addJot:!0,colSeparationType:"gather",autoTag:tr(e.envName),emptySingleRow:!0,leqno:e.parser.settings.leqno};return rr(e.parser,t,"display")},htmlBuilder:ar,mathmlBuilder:ir}),Q0({type:"array",names:["alignat","alignat*","alignedat"],props:{numArgs:1},handler:or,htmlBuilder:ar,mathmlBuilder:ir}),Q0({type:"array",names:["equation","equation*"],props:{numArgs:0},handler(e){T(e);var t={autoTag:tr(e.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:e.parser.settings.leqno};return rr(e.parser,t,"display")},htmlBuilder:ar,mathmlBuilder:ir}),Q0({type:"array",names:["CD"],props:{numArgs:0},handler(e){T(e);{var i,o=e.parser,s=[];for(o.gullet.beginGroup(),o.gullet.macros.set("\\cr","\\\\\\relax"),o.gullet.beginGroup();;){s.push(o.parseExpression(!1,"\\\\")),o.gullet.endGroup(),o.gullet.beginGroup();var t=o.fetch().text;if("&"!==t&&"\\\\"!==t){if("\\end"!==t)throw new ft("Expected \\\\ or \\cr or \\end",o.nextToken);0===s[s.length-1].length&&s.pop();break}o.consume()}let r=[],n=[r];for(let t=0;t<s.length;t++){let a=s[t],e={type:"styling",body:[],mode:"math",style:"display"};for(let n=0;n<a.length;n++)if(ve(a[n])){r.push(e);var l=E0(a[n+=1]).text,h=new Array(2);if(h[0]={type:"ordgroup",mode:"math",body:[]},h[1]={type:"ordgroup",mode:"math",body:[]},!(-1<"=|.".indexOf(l))){if(!(-1<"<>AV".indexOf(l)))throw new ft('Expected one of "<>AV=|." after @',a[n]);for(let r=0;r<2;r++){let t=!0;for(let e=n+1;e<a.length;e++){if(("mathord"===(i=a[e]).type||"atom"===i.type)&&i.text===l){t=!1,n=e;break}if(ve(a[e]))throw new ft("Missing a "+l+" character to complete a CD arrow.",a[e]);h[r].body.push(a[e])}if(t)throw new ft("Missing a "+l+" character to complete a CD arrow.",a[n])}}var m={type:"styling",body:[((e,t,r)=>{var n=we[e];switch(n){case"\\\\cdrightarrow":case"\\\\cdleftarrow":return r.callFunction(n,[t[0]],[t[1]]);case"\\uparrow":case"\\downarrow":var a={type:"atom",text:n,mode:"math",family:"rel"},a={type:"ordgroup",mode:"math",body:[r.callFunction("\\\\cdleft",[t[0]],[]),r.callFunction("\\Big",[a],[]),r.callFunction("\\\\cdright",[t[1]],[])]};return r.callFunction("\\\\cdparent",[a],[]);case"\\\\cdlongequal":return r.callFunction("\\\\cdlongequal",[],[]);case"\\Vert":return r.callFunction("\\Big",[{type:"textord",text:"\\Vert",mode:"math"}],[]);default:return{type:"textord",text:" ",mode:"math"}}})(l,h,o)],mode:"math",style:"display"};r.push(m),e={type:"styling",body:[],mode:"math",style:"display"}}else e.body.push(a[n]);t%2==0?r.push(e):r.shift(),r=[],n.push(r)}return o.gullet.endGroup(),o.gullet.endGroup(),{type:"array",mode:"math",body:n,arraystretch:1,addJot:!0,rowGaps:[null],cols:new Array(n[0].length).fill({type:"align",align:"c",pregap:.25,postgap:.25}),colSeparationType:"CD",hLinesBeforeRow:new Array(n.length+1).fill([])}}},htmlBuilder:ar,mathmlBuilder:ir}),Wt("\\nonumber","\\gdef\\@eqnsw{0}"),Wt("\\notag","\\nonumber"),Vt({type:"text",names:["\\hline","\\hdashline"],props:{numArgs:0,allowedInText:!0,allowedInMath:!0},handler(e,t){throw new ft(e.funcName+" valid only within array environment")}});var sr=He;function lr(e){let t=null;return t=0<e.length&&"."===(t=e)?null:t}function hr(e){if(/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(e))return{number:+e,unit:"bp"};var t=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(e);if(!t)throw new ft("Invalid size: '"+e+"' in \\includegraphics");if(i0(e={number:+(t[1]+t[2]),unit:t[3]}))return e;throw new ft("Invalid unit: '"+e.unit+"' in \\includegraphics.")}Vt({type:"environment",names:["\\begin","\\end"],props:{numArgs:1,argTypes:["text"]},handler(e,t){var{parser:e,funcName:r}=e,n=t[0];if("ordgroup"!==n.type)throw new ft("Invalid environment name",n);let a="";for(let e=0;e<n.body.length;++e)a+=Xt(n.body[e],"textord").text;if("\\begin"!==r)return{type:"environment",mode:e.mode,name:a,nameGroup:n};if(!sr.hasOwnProperty(a))throw new ft("No such environment: "+a,n);var t=sr[a],{args:r,optArgs:i}=e.parseArguments("\\begin{"+a+"}",t),o={mode:e.mode,envName:a,parser:e},t=t.handler(o,r,i),o=(e.expect("\\end",!1),e.nextToken);if((r=Xt(e.parseFunction(),"environment")).name!==a)throw new ft("Mismatch: \\begin{"+a+"} matched by \\end{"+r.name+"}",o);return t}});let Le=(e,t)=>{var r=e.font,t=t.withFont(r);return P(e.body,t)},De=(e,t)=>{var r=e.font,t=t.withFont(r);return w(e.body,t)},Pe={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak","\\bm":"\\boldsymbol"},Ve=(Vt({type:"font",names:["\\mathrm","\\mathit","\\mathbf","\\mathnormal","\\mathsfit","\\mathbb","\\mathcal","\\mathfrak","\\mathscr","\\mathsf","\\mathtt","\\Bbb","\\bold","\\frak"],props:{numArgs:1,allowedInArgument:!0},handler:(e,t)=>{var{parser:e,funcName:r}=e,t=M0(t[0]);let n=r;return n in Pe&&(n=Pe[n]),{type:"font",mode:e.mode,font:n.slice(1),body:t}},htmlBuilder:Le,mathmlBuilder:De}),Vt({type:"mclass",names:["\\boldsymbol","\\bm"],props:{numArgs:1},handler:(e,t)=>{var e=e.parser,t=t[0],r=bt.isCharacterBox(t);return{type:"mclass",mode:e.mode,mclass:S(t),body:[{type:"font",mode:e.mode,font:"boldsymbol",body:t}],isCharacterBox:r}}}),Vt({type:"font",names:["\\rm","\\sf","\\tt","\\bf","\\it","\\cal"],props:{numArgs:0,allowedInText:!0},handler:(e,t)=>{var{parser:e,funcName:r,breakOnTokenText:n}=e,a=e.mode,n=e.parseExpression(!0,n);return{type:"font",mode:a,font:"math"+r.slice(1),body:{type:"ordgroup",mode:e.mode,body:n}}},htmlBuilder:Le,mathmlBuilder:De}),(e,t)=>{let r=t;return"display"===e?r=r.id>=yt.SCRIPT.id?r.text():yt.DISPLAY:"text"===e&&r.size===yt.DISPLAY.size?r=yt.TEXT:"script"===e?r=yt.SCRIPT:"scriptscript"===e&&(r=yt.SCRIPTSCRIPT),r}),B=(e,t)=>{var r,n=Ve(e.size,t.style),a=n.fracNum(),i=n.fracDen(),a=t.havingStyle(a),o=P(e.numer,a,t),s=(e.continued&&(s=8.5/t.fontMetrics().ptPerEm,r=3.5/t.fontMetrics().ptPerEm,o.height=o.height<s?s:o.height,o.depth=o.depth<r?r:o.depth),a=t.havingStyle(i),P(e.denom,a,t));let l,h,m,c,p,d,u,g,f,b;return m=e.hasBarLine?(l=e.barSize?(h=wt(e.barSize,t),Pt.makeLineSpan("frac-line",t,h)):Pt.makeLineSpan("frac-line",t),h=l.height,l.height):(l=null,h=0,t.fontMetrics().defaultRuleThickness),d=n.size===yt.DISPLAY.size||"display"===e.size?(c=t.fontMetrics().num1,p=0<h?3*m:7*m,t.fontMetrics().denom1):(p=0<h?(c=t.fontMetrics().num2,m):(c=t.fontMetrics().num3,3*m),t.fontMetrics().denom2),u=l?(r=t.fontMetrics().axisHeight,c-o.depth-(r+.5*h)<p&&(c+=p-(c-o.depth-(r+.5*h))),r-.5*h-(s.height-d)<p&&(d+=p-(r-.5*h-(s.height-d))),i=-(r-.5*h),Pt.makeVList({positionType:"individualShift",children:[{type:"elem",elem:s,shift:d},{type:"elem",elem:l,shift:i},{type:"elem",elem:o,shift:-c}]},t)):((r=c-o.depth-(s.height-d))<p&&(c+=.5*(p-r),d+=.5*(p-r)),Pt.makeVList({positionType:"individualShift",children:[{type:"elem",elem:s,shift:d},{type:"elem",elem:o,shift:-c}]},t)),a=t.havingStyle(n),u.height*=a.sizeMultiplier/t.sizeMultiplier,u.depth*=a.sizeMultiplier/t.sizeMultiplier,g=n.size===yt.DISPLAY.size?t.fontMetrics().delim1:(n.size===yt.SCRIPTSCRIPT.size?t.havingStyle(yt.SCRIPT):t).fontMetrics().delim2,f=null==e.leftDelim?z0(t,["mopen"]):Z0.customSizedDelim(e.leftDelim,g,!0,t.havingStyle(n),e.mode,["mopen"]),b=e.continued?Pt.makeSpan([]):null==e.rightDelim?z0(t,["mclose"]):Z0.customSizedDelim(e.rightDelim,g,!0,t.havingStyle(n),e.mode,["mclose"]),Pt.makeSpan(["mord"].concat(a.sizingClasses(t)),[f,Pt.makeSpan(["mfrac"],[u]),b],t)},C=(e,t)=>{let r=new Ut.MathNode("mfrac",[w(e.numer,t),w(e.denom,t)]);e.hasBarLine?e.barSize&&(n=wt(e.barSize,t),r.setAttribute("linethickness",D(n))):r.setAttribute("linethickness","0px");var n=Ve(e.size,t.style);return n.size!==t.style.size&&(r=new Ut.MathNode("mstyle",[r]),t=n.size===yt.DISPLAY.size?"true":"false",r.setAttribute("displaystyle",t),r.setAttribute("scriptlevel","0")),null==e.leftDelim&&null==e.rightDelim?r:(n=[],null!=e.leftDelim&&((t=new Ut.MathNode("mo",[new Ut.TextNode(e.leftDelim.replace("\\",""))])).setAttribute("fence","true"),n.push(t)),n.push(r),null!=e.rightDelim&&((t=new Ut.MathNode("mo",[new Ut.TextNode(e.rightDelim.replace("\\",""))])).setAttribute("fence","true"),n.push(t)),C0(n))},Fe=(Vt({type:"genfrac",names:["\\dfrac","\\frac","\\tfrac","\\dbinom","\\binom","\\tbinom","\\\\atopfrac","\\\\bracefrac","\\\\brackfrac"],props:{numArgs:2,allowedInArgument:!0},handler:(e,t)=>{var{parser:e,funcName:r}=e,n=t[0],t=t[1];let a,i=null,o=null,s="auto";switch(r){case"\\dfrac":case"\\frac":case"\\tfrac":a=!0;break;case"\\\\atopfrac":a=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":a=!1,i="(",o=")";break;case"\\\\bracefrac":a=!1,i="\\{",o="\\}";break;case"\\\\brackfrac":a=!1,i="[",o="]";break;default:throw new Error("Unrecognized genfrac command")}switch(r){case"\\dfrac":case"\\dbinom":s="display";break;case"\\tfrac":case"\\tbinom":s="text"}return{type:"genfrac",mode:e.mode,continued:!1,numer:n,denom:t,hasBarLine:a,leftDelim:i,rightDelim:o,size:s,barSize:null}},htmlBuilder:B,mathmlBuilder:C}),Vt({type:"genfrac",names:["\\cfrac"],props:{numArgs:2},handler:(e,t)=>{var e=e.parser,r=t[0];return{type:"genfrac",mode:e.mode,continued:!0,numer:r,denom:t[1],hasBarLine:!0,leftDelim:null,rightDelim:null,size:"display",barSize:null}}}),Vt({type:"infix",names:["\\over","\\choose","\\atop","\\brace","\\brack"],props:{numArgs:0,infix:!0},handler(e){let t,{parser:r,funcName:n,token:a}=e;switch(n){case"\\over":t="\\frac";break;case"\\choose":t="\\binom";break;case"\\atop":t="\\\\atopfrac";break;case"\\brace":t="\\\\bracefrac";break;case"\\brack":t="\\\\brackfrac";break;default:throw new Error("Unrecognized infix genfrac command")}return{type:"infix",mode:r.mode,replaceWith:t,token:a}}}),["display","text","script","scriptscript"]),Ge=(Vt({type:"genfrac",names:["\\genfrac"],props:{numArgs:6,allowedInArgument:!0,argTypes:["math","math","size","text","math","math"]},handler(e,t){var e=e.parser,r=t[4],n=t[5],a="atom"===(a=M0(t[0])).type&&"open"===a.family?lr(a.text):null,i="atom"===(i=M0(t[1])).type&&"close"===i.family?lr(i.text):null,o=Xt(t[2],"size");let s,l=null,h=(s=!!o.isBlank||0<(l=o.value).number,"auto"),m=t[3];return"ordgroup"===m.type?0<m.body.length&&(o=Xt(m.body[0],"textord"),h=Fe[Number(o.text)]):(m=Xt(m,"textord"),h=Fe[Number(m.text)]),{type:"genfrac",mode:e.mode,numer:r,denom:n,continued:!1,hasBarLine:s,barSize:l,leftDelim:a,rightDelim:i,size:h}},htmlBuilder:B,mathmlBuilder:C}),Vt({type:"infix",names:["\\above"],props:{numArgs:1,argTypes:["size"],infix:!0},handler(e,t){var{parser:e,token:r}=e;return{type:"infix",mode:e.mode,replaceWith:"\\\\abovefrac",size:Xt(t[0],"size").value,token:r}}}),Vt({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:(e,t)=>{var e=e.parser,r=t[0],n=(e=>{if(e)return e;throw new Error("Expected non-null, but got "+String(e))})(Xt(t[1],"infix").size),a=0<n.number;return{type:"genfrac",mode:e.mode,numer:r,denom:t[2],continued:!1,hasBarLine:a,barSize:n,leftDelim:null,rightDelim:null,size:"auto"}},htmlBuilder:B,mathmlBuilder:C}),(e,t)=>{var r=t.style;let n,a;a="supsub"===e.type?(n=e.sup?P(e.sup,t.havingStyle(r.sup()),t):P(e.sub,t.havingStyle(r.sub()),t),Xt(e.base,"horizBrace")):Xt(e,"horizBrace"),r=P(a.base,t.havingBaseStyle(yt.DISPLAY)),e=O0(a,t);let i;return(a.isOver?(i=Pt.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:r},{type:"kern",size:.1},{type:"elem",elem:e}]},t)).children[0].children[0].children[1]:(i=Pt.makeVList({positionType:"bottom",positionData:r.depth+.1+e.height,children:[{type:"elem",elem:e},{type:"kern",size:.1},{type:"elem",elem:r}]},t)).children[0].children[0].children[0]).classes.push("svg-align"),n&&(e=Pt.makeSpan(["mord",a.isOver?"mover":"munder"],[i],t),i=a.isOver?Pt.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:e},{type:"kern",size:.2},{type:"elem",elem:n}]},t):Pt.makeVList({positionType:"bottom",positionData:e.depth+.2+n.height+n.depth,children:[{type:"elem",elem:n},{type:"kern",size:.2},{type:"elem",elem:e}]},t)),Pt.makeSpan(["mord",a.isOver?"mover":"munder"],[i],t)}),Ue=(Vt({type:"horizBrace",names:["\\overbrace","\\underbrace"],props:{numArgs:1},handler(e,t){var{parser:e,funcName:r}=e;return{type:"horizBrace",mode:e.mode,label:r,isOver:/^\\over/.test(r),base:t[0]}},htmlBuilder:Ge,mathmlBuilder:(e,t)=>{var r=H0(e.label);return new Ut.MathNode(e.isOver?"mover":"munder",[w(e.base,t),r])}}),Vt({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:(e,t)=>{var e=e.parser,r=t[1],t=Xt(t[0],"url").url;return e.settings.isTrusted({command:"\\href",url:t})?{type:"href",mode:e.mode,href:t,body:Ft(r)}:e.formatUnsupportedCmd("\\href")},htmlBuilder:(e,t)=>{var r=Gt(e.body,t,!1);return Pt.makeAnchor(e.href,[],r,t)},mathmlBuilder:(e,t)=>{let r=I0(e.body,t);return(r=r instanceof _t?r:new _t("mrow",[r])).setAttribute("href",e.href),r}}),Vt({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:(e,t)=>{var e=e.parser,r=Xt(t[0],"url").url;if(!e.settings.isTrusted({command:"\\url",url:r}))return e.formatUnsupportedCmd("\\url");var n=[];for(let t=0;t<r.length;t++){let e=r[t];"~"===e&&(e="\\textasciitilde"),n.push({type:"textord",mode:"text",text:e})}return t={type:"text",mode:e.mode,font:"\\texttt",body:n},{type:"href",mode:e.mode,href:r,body:Ft(t)}}}),Vt({type:"hbox",names:["\\hbox"],props:{numArgs:1,argTypes:["text"],allowedInText:!0,primitive:!0},handler(e,t){return{type:"hbox",mode:(e=e.parser).mode,body:Ft(t[0])}},htmlBuilder(e,t){return e=Gt(e.body,t,!1),Pt.makeFragment(e)},mathmlBuilder(e,t){return new Ut.MathNode("mrow",x(e.body,t))}}),Vt({type:"html",names:["\\htmlClass","\\htmlId","\\htmlStyle","\\htmlData"],props:{numArgs:2,argTypes:["raw","original"],allowedInText:!0},handler:(e,t)=>{var{parser:r,funcName:n}=e,a=Xt(t[0],"raw").string,e=t[1];let i;r.settings.strict&&r.settings.reportNonstrict("htmlExtension","HTML extension is disabled on strict mode");var o={};switch(n){case"\\htmlClass":o.class=a,i={command:"\\htmlClass",class:a};break;case"\\htmlId":o.id=a,i={command:"\\htmlId",id:a};break;case"\\htmlStyle":o.style=a,i={command:"\\htmlStyle",style:a};break;case"\\htmlData":var s=a.split(",");for(let e=0;e<s.length;e++){var l=s[e].split("=");if(2!==l.length)throw new ft("Error parsing key-value for \\htmlData");o["data-"+l[0].trim()]=l[1].trim()}i={command:"\\htmlData",attributes:o};break;default:throw new Error("Unrecognized html command")}return r.settings.isTrusted(i)?{type:"html",mode:r.mode,attributes:o,body:Ft(e)}:r.formatUnsupportedCmd(n)},htmlBuilder:(e,t)=>{var r,n=Gt(e.body,t,!1),a=["enclosing"],i=(e.attributes.class&&a.push(...e.attributes.class.trim().split(/\s+/)),Pt.makeSpan(a,n,t));for(r in e.attributes)"class"!==r&&e.attributes.hasOwnProperty(r)&&i.setAttribute(r,e.attributes[r]);return i},mathmlBuilder:(e,t)=>I0(e.body,t)}),Vt({type:"htmlmathml",names:["\\html@mathml"],props:{numArgs:2,allowedInText:!0},handler:(e,t)=>({type:"htmlmathml",mode:(e=e.parser).mode,html:Ft(t[0]),mathml:Ft(t[1])}),htmlBuilder:(e,t)=>(e=Gt(e.html,t,!1),Pt.makeFragment(e)),mathmlBuilder:(e,t)=>I0(e.mathml,t)}),Vt({type:"includegraphics",names:["\\includegraphics"],props:{numArgs:1,numOptionalArgs:1,argTypes:["raw","url"],allowedInText:!1},handler:(e,t,r)=>{let n=e.parser,a={number:0,unit:"em"},i={number:.9,unit:"em"},o={number:0,unit:"em"},s="";if(r[0]){var l=Xt(r[0],"raw").string.split(",");for(let e=0;e<l.length;e++){var h=l[e].split("=");if(2===h.length){var m=h[1].trim();switch(h[0].trim()){case"alt":s=m;break;case"width":a=hr(m);break;case"height":i=hr(m);break;case"totalheight":o=hr(m);break;default:throw new ft("Invalid key: '"+h[0]+"' in \\includegraphics.")}}}}return e=Xt(t[0],"url").url,""===s&&(s=(s=(s=e).replace(/^.*[\\/]/,"")).substring(0,s.lastIndexOf("."))),n.settings.isTrusted({command:"\\includegraphics",url:e})?{type:"includegraphics",mode:n.mode,alt:s,width:a,height:i,totalheight:o,src:e}:n.formatUnsupportedCmd("\\includegraphics")},htmlBuilder:(e,t)=>{let r=wt(e.height,t),n=0,a=(0<e.totalheight.number&&(n=wt(e.totalheight,t)-r),0);return 0<e.width.number&&(a=wt(e.width,t)),t={height:D(r+n)},0<a&&(t.width=D(a)),0<n&&(t.verticalAlign=D(-n)),(e=new Sr(e.src,e.alt,t)).height=r,e.depth=n,e},mathmlBuilder:(e,t)=>{var r=new Ut.MathNode("mglyph",[]);r.setAttribute("alt",e.alt);let n=wt(e.height,t),a=0;return 0<e.totalheight.number&&(a=wt(e.totalheight,t)-n,r.setAttribute("valign",D(-a))),r.setAttribute("height",D(n+a)),0<e.width.number&&(t=wt(e.width,t),r.setAttribute("width",D(t))),r.setAttribute("src",e.src),r}}),Vt({type:"kern",names:["\\kern","\\mkern","\\hskip","\\mskip"],props:{numArgs:1,argTypes:["size"],primitive:!0,allowedInText:!0},handler(e,t){var r,n,{parser:e,funcName:a}=e,t=Xt(t[0],"size");return e.settings.strict&&(r="m"===a[1],n="mu"===t.value.unit,r?(n||e.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+a+" supports only mu units, not "+t.value.unit+" units"),"math"!==e.mode&&e.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+a+" works only in math mode")):n&&e.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+a+" doesn't support mu units")),{type:"kern",mode:e.mode,dimension:t.value}},htmlBuilder(e,t){return Pt.makeGlue(e.dimension,t)},mathmlBuilder(e,t){return e=wt(e.dimension,t),new Ut.SpaceNode(e)}}),Vt({type:"lap",names:["\\mathllap","\\mathrlap","\\mathclap"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:e,funcName:r}=e,t=t[0];return{type:"lap",mode:e.mode,alignment:r.slice(5),body:t}},htmlBuilder:(e,t)=>{let r,n=(r="clap"===e.alignment?(r=Pt.makeSpan([],[P(e.body,t)]),Pt.makeSpan(["inner"],[r],t)):Pt.makeSpan(["inner"],[P(e.body,t)]),Pt.makeSpan(["fix"],[])),a=Pt.makeSpan([e.alignment],[r,n],t);return(e=Pt.makeSpan(["strut"])).style.height=D(a.height+a.depth),a.depth&&(e.style.verticalAlign=D(-a.depth)),a.children.unshift(e),a=Pt.makeSpan(["thinbox"],[a],t),Pt.makeSpan(["mord","vbox"],[a],t)},mathmlBuilder:(e,t)=>(t=new Ut.MathNode("mpadded",[w(e.body,t)]),"rlap"!==e.alignment&&(e="llap"===e.alignment?"-1":"-0.5",t.setAttribute("lspace",e+"width")),t.setAttribute("width","0px"),t)}),Vt({type:"styling",names:["\\(","$"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,t){var{funcName:e,parser:r}=e,n=r.mode,e=(r.switchMode("math"),"\\("===e?"\\)":"$"),a=r.parseExpression(!1,e);return r.expect(e),r.switchMode(n),{type:"styling",mode:r.mode,style:"text",body:a}}}),Vt({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,t){throw new ft("Mismatched "+e.funcName)}}),(e,t)=>{switch(t.style.size){case yt.DISPLAY.size:return e.display;case yt.TEXT.size:return e.text;case yt.SCRIPT.size:return e.script;case yt.SCRIPTSCRIPT.size:return e.scriptscript;default:return e.text}}),Ye=(Vt({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4,primitive:!0},handler:(e,t)=>({type:"mathchoice",mode:(e=e.parser).mode,display:Ft(t[0]),text:Ft(t[1]),script:Ft(t[2]),scriptscript:Ft(t[3])}),htmlBuilder:(e,t)=>(e=Gt(e=Ue(e,t),t,!1),Pt.makeFragment(e)),mathmlBuilder:(e,t)=>I0(e=Ue(e,t),t)}),(e,t,r,n,a,i,o)=>{e=Pt.makeSpan([],[e]);let s=r&&bt.isCharacterBox(r),l,h,m;if(t&&(c=P(t,n.havingStyle(a.sup()),n),h={elem:c,kern:Math.max(n.fontMetrics().bigOpSpacing1,n.fontMetrics().bigOpSpacing3-c.depth)}),r&&(c=P(r,n.havingStyle(a.sub()),n),l={elem:c,kern:Math.max(n.fontMetrics().bigOpSpacing2,n.fontMetrics().bigOpSpacing4-c.height)}),h&&l)r=n.fontMetrics().bigOpSpacing5+l.elem.height+l.elem.depth+l.kern+e.depth+o,m=Pt.makeVList({positionType:"bottom",positionData:r,children:[{type:"kern",size:n.fontMetrics().bigOpSpacing5},{type:"elem",elem:l.elem,marginLeft:D(-i)},{type:"kern",size:l.kern},{type:"elem",elem:e},{type:"kern",size:h.kern},{type:"elem",elem:h.elem,marginLeft:D(i)},{type:"kern",size:n.fontMetrics().bigOpSpacing5}]},n);else if(l)a=e.height-o,m=Pt.makeVList({positionType:"top",positionData:a,children:[{type:"kern",size:n.fontMetrics().bigOpSpacing5},{type:"elem",elem:l.elem,marginLeft:D(-i)},{type:"kern",size:l.kern},{type:"elem",elem:e}]},n);else{if(!h)return e;var c=e.depth+o;m=Pt.makeVList({positionType:"bottom",positionData:c,children:[{type:"elem",elem:e},{type:"kern",size:h.kern},{type:"elem",elem:h.elem,marginLeft:D(i)},{type:"kern",size:n.fontMetrics().bigOpSpacing5}]},n)}return t=[m],l&&0!==i&&!s&&((r=Pt.makeSpan(["mspace"],[],n)).style.marginRight=D(i),t.unshift(r)),Pt.makeSpan(["mop","op-limits"],t,n)}),Xe=["\\smallint"],N=(e,n)=>{let t,r,a,i=!1;"supsub"===e.type?(t=e.sup,r=e.sub,a=Xt(e.base,"op"),i=!0):a=Xt(e,"op");let o,s=!1;if((e=n.style).size===yt.DISPLAY.size&&a.symbol&&!bt.contains(Xe,a.name)&&(s=!0),a.symbol){let e=s?"Size2-Regular":"Size1-Regular",t="",r;"\\oiint"!==a.name&&"\\oiiint"!==a.name||(t=a.name.slice(1),a.name="oiint"===t?"\\iint":"\\iiint"),o=Pt.makeSymbol(a.name,e,"math",n,["mop","op-symbol",s?"large-op":"small-op"]),0<t.length&&(r=o.italic,l=Pt.staticSvg(t+"Size"+(s?"2":"1"),n),o=Pt.makeVList({positionType:"individualShift",children:[{type:"elem",elem:o,shift:0},{type:"elem",elem:l,shift:s?.08:0}]},n),a.name="\\"+t,o.classes.unshift("mop"),o.italic=r)}else if(a.body){var l=Gt(a.body,n,!0);1===l.length&&l[0]instanceof jt?(o=l[0]).classes[0]="mop":o=Pt.makeSpan(["mop"],l,n)}else{var h=[];for(let e=1;e<a.name.length;e++)h.push(Pt.mathsym(a.name[e],a.mode,n));o=Pt.makeSpan(["mop"],h,n)}let m=0,c=0;return(o instanceof jt||"\\oiint"===a.name||"\\oiiint"===a.name)&&!a.suppressBaseShift&&(m=(o.height-o.depth)/2-n.fontMetrics().axisHeight,c=o.italic),i?Ye(o,t,r,n,e,c,m):(m&&(o.style.position="relative",o.style.top=D(m)),o)},q=(e,t)=>{let r;return e.symbol?(r=new _t("mo",[Yt(e.name,e.mode)]),bt.contains(Xe,e.name)&&r.setAttribute("largeop","false")):r=e.body?new _t("mo",x(e.body,t)):(r=new _t("mi",[new $t(e.name.slice(1))]),t=new _t("mo",[Yt("⁡","text")]),e.parentIsSupSub?new _t("mrow",[r,t]):B0([r,t])),r},We={"∏":"\\prod","∐":"\\coprod","∑":"\\sum","⋀":"\\bigwedge","⋁":"\\bigvee","⋂":"\\bigcap","⋃":"\\bigcup","⨀":"\\bigodot","⨁":"\\bigoplus","⨂":"\\bigotimes","⨄":"\\biguplus","⨆":"\\bigsqcup"},je=(Vt({type:"op",names:["\\coprod","\\bigvee","\\bigwedge","\\biguplus","\\bigcap","\\bigcup","\\intop","\\prod","\\sum","\\bigotimes","\\bigoplus","\\bigodot","\\bigsqcup","\\smallint","∏","∐","∑","⋀","⋁","⋂","⋃","⨀","⨁","⨂","⨄","⨆"],props:{numArgs:0},handler:(e,t)=>{let{parser:r,funcName:n}=e,a=n;return 1===a.length&&(a=We[a]),{type:"op",mode:r.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:a}},htmlBuilder:N,mathmlBuilder:q}),Vt({type:"op",names:["\\mathop"],props:{numArgs:1,primitive:!0},handler:(e,t)=>(e=e.parser,t=t[0],{type:"op",mode:e.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:Ft(t)}),htmlBuilder:N,mathmlBuilder:q}),{"∫":"\\int","∬":"\\iint","∭":"\\iiint","∮":"\\oint","∯":"\\oiint","∰":"\\oiiint"}),_e=(Vt({type:"op",names:["\\arcsin","\\arccos","\\arctan","\\arctg","\\arcctg","\\arg","\\ch","\\cos","\\cosec","\\cosh","\\cot","\\cotg","\\coth","\\csc","\\ctg","\\cth","\\deg","\\dim","\\exp","\\hom","\\ker","\\lg","\\ln","\\log","\\sec","\\sin","\\sinh","\\sh","\\tan","\\tanh","\\tg","\\th"],props:{numArgs:0},handler(e){var{parser:e,funcName:t}=e;return{type:"op",mode:e.mode,limits:!1,parentIsSupSub:!1,symbol:!1,name:t}},htmlBuilder:N,mathmlBuilder:q}),Vt({type:"op",names:["\\det","\\gcd","\\inf","\\lim","\\max","\\min","\\Pr","\\sup"],props:{numArgs:0},handler(e){var{parser:e,funcName:t}=e;return{type:"op",mode:e.mode,limits:!0,parentIsSupSub:!1,symbol:!1,name:t}},htmlBuilder:N,mathmlBuilder:q}),Vt({type:"op",names:["\\int","\\iint","\\iiint","\\oint","\\oiint","\\oiiint","∫","∬","∭","∮","∯","∰"],props:{numArgs:0},handler(e){let{parser:t,funcName:r}=e,n=r;return 1===n.length&&(n=je[n]),{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:n}},htmlBuilder:N,mathmlBuilder:q}),(e,t)=>{let r,n,a,i,o=!1;if("supsub"===e.type?(r=e.sup,n=e.sub,a=Xt(e.base,"operatorname"),o=!0):a=Xt(e,"operatorname"),0<a.body.length){var s=Gt(a.body.map(e=>{var t=e.text;return"string"==typeof t?{type:"textord",mode:e.mode,text:t}:e}),t.withFont("mathrm"),!0);for(let e=0;e<s.length;e++){var l=s[e];l instanceof jt&&(l.text=l.text.replace(/\u2212/,"-").replace(/\u2217/,"*"))}i=Pt.makeSpan(["mop"],s,t)}else i=Pt.makeSpan(["mop"],[],t);return o?Ye(i,r,n,t,t.style,0,0):i});function mr(e,t,r){var n=Gt(e,t,!1),a=t.sizeMultiplier/r.sizeMultiplier;for(let e=0;e<n.length;e++){var i=n[e].classes.indexOf("sizing");i<0?Array.prototype.push.apply(n[e].classes,t.sizingClasses(r)):n[e].classes[i+1]==="reset-size"+t.size&&(n[e].classes[i+1]="reset-size"+r.size),n[e].height*=a,n[e].depth*=a}return Pt.makeFragment(n)}Vt({type:"operatorname",names:["\\operatorname@","\\operatornamewithlimits"],props:{numArgs:1},handler:(e,t)=>{var{parser:e,funcName:r}=e,t=t[0];return{type:"operatorname",mode:e.mode,body:Ft(t),alwaysHandleSupSub:"\\operatornamewithlimits"===r,limits:!1,parentIsSupSub:!1}},htmlBuilder:_e,mathmlBuilder:(e,t)=>{let r=x(e.body,t.withFont("mathrm")),n=!0;for(let e=0;e<r.length;e++){var a=r[e];if(!(a instanceof Ut.SpaceNode))if(a instanceof Ut.MathNode)switch(a.type){case"mi":case"mn":case"ms":case"mspace":case"mtext":break;case"mo":var i=a.children[0];1===a.children.length&&i instanceof Ut.TextNode?i.text=i.text.replace(/\u2212/,"-").replace(/\u2217/,"*"):n=!1;break;default:n=!1}else n=!1}n&&(o=r.map(e=>e.toText()).join(""),r=[new Ut.TextNode(o)]),(t=new Ut.MathNode("mi",r)).setAttribute("mathvariant","normal");var o=new Ut.MathNode("mo",[Yt("⁡","text")]);return e.parentIsSupSub?new Ut.MathNode("mrow",[t,o]):Ut.newDocumentFragment([t,o])}}),Wt("\\operatorname","\\@ifstar\\operatornamewithlimits\\operatorname@"),S0({type:"ordgroup",htmlBuilder(e,t){return e.semisimple?Pt.makeFragment(Gt(e.body,t,!1)):Pt.makeSpan(["mord"],Gt(e.body,t,!0),t)},mathmlBuilder(e,t){return I0(e.body,t,!0)}}),Vt({type:"overline",names:["\\overline"],props:{numArgs:1},handler(e,t){return e=e.parser,t=t[0],{type:"overline",mode:e.mode,body:t}},htmlBuilder(e,t){var e=P(e.body,t.havingCrampedStyle()),r=Pt.makeLineSpan("overline-line",t),n=t.fontMetrics().defaultRuleThickness,e=Pt.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:e},{type:"kern",size:3*n},{type:"elem",elem:r},{type:"kern",size:n}]},t);return Pt.makeSpan(["mord","overline"],[e],t)},mathmlBuilder(e,t){var r=new Ut.MathNode("mo",[new Ut.TextNode("‾")]);return r.setAttribute("stretchy","true"),(e=new Ut.MathNode("mover",[w(e.body,t),r])).setAttribute("accent","true"),e}}),Vt({type:"phantom",names:["\\phantom"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>(e=e.parser,t=t[0],{type:"phantom",mode:e.mode,body:Ft(t)}),htmlBuilder:(e,t)=>(e=Gt(e.body,t.withPhantom(),!1),Pt.makeFragment(e)),mathmlBuilder:(e,t)=>(e=x(e.body,t),new Ut.MathNode("mphantom",e))}),Vt({type:"hphantom",names:["\\hphantom"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>(e=e.parser,t=t[0],{type:"hphantom",mode:e.mode,body:t}),htmlBuilder:(e,t)=>{let r=Pt.makeSpan([],[P(e.body,t.withPhantom())]);if(r.height=0,r.depth=0,r.children)for(let e=0;e<r.children.length;e++)r.children[e].height=0,r.children[e].depth=0;return r=Pt.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:r}]},t),Pt.makeSpan(["mord"],[r],t)},mathmlBuilder:(e,t)=>(e=x(Ft(e.body),t),t=new Ut.MathNode("mphantom",e),(e=new Ut.MathNode("mpadded",[t])).setAttribute("height","0px"),e.setAttribute("depth","0px"),e)}),Vt({type:"vphantom",names:["\\vphantom"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>(e=e.parser,t=t[0],{type:"vphantom",mode:e.mode,body:t}),htmlBuilder:(e,t)=>{var e=Pt.makeSpan(["inner"],[P(e.body,t.withPhantom())]),r=Pt.makeSpan(["fix"],[]);return Pt.makeSpan(["mord","rlap"],[e,r],t)},mathmlBuilder:(e,t)=>(e=x(Ft(e.body),t),t=new Ut.MathNode("mphantom",e),(e=new Ut.MathNode("mpadded",[t])).setAttribute("width","0px"),e)}),Vt({type:"raisebox",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler(e,t){var e=e.parser,r=Xt(t[0],"size").value;return{type:"raisebox",mode:e.mode,dy:r,body:t[1]}},htmlBuilder(e,t){var r=P(e.body,t),e=wt(e.dy,t);return Pt.makeVList({positionType:"shift",positionData:-e,children:[{type:"elem",elem:r}]},t)},mathmlBuilder(e,t){return t=new Ut.MathNode("mpadded",[w(e.body,t)]),e=e.dy.number+e.dy.unit,t.setAttribute("voffset",e),t}}),Vt({type:"internal",names:["\\relax"],props:{numArgs:0,allowedInText:!0,allowedInArgument:!0},handler(e){return{type:"internal",mode:(e=e.parser).mode}}}),Vt({type:"rule",names:["\\rule"],props:{numArgs:2,numOptionalArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["size","size","size"]},handler(e,t,r){var e=e.parser,r=r[0],n=Xt(t[0],"size"),t=Xt(t[1],"size");return{type:"rule",mode:e.mode,shift:r&&Xt(r,"size").value,width:n.value,height:t.value}},htmlBuilder(e,t){var r=Pt.makeSpan(["mord","rule"],[],t),n=wt(e.width,t),a=wt(e.height,t),e=e.shift?wt(e.shift,t):0;return r.style.borderRightWidth=D(n),r.style.borderTopWidth=D(a),r.style.bottom=D(e),r.width=n,r.height=a+e,r.depth=-e,r.maxFontSize=1.125*a*t.sizeMultiplier,r},mathmlBuilder(e,t){var r=wt(e.width,t),n=wt(e.height,t),e=e.shift?wt(e.shift,t):0,t=t.color&&t.getColor()||"black",a=new Ut.MathNode("mspace"),t=(a.setAttribute("mathbackground",t),a.setAttribute("width",D(r)),a.setAttribute("height",D(n)),new Ut.MathNode("mpadded",[a]));return 0<=e?t.setAttribute("height",D(e)):(t.setAttribute("height",D(e)),t.setAttribute("depth",D(-e))),t.setAttribute("voffset",D(e)),t}});let $e=["\\tiny","\\sixptsize","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"],Ze=(Vt({type:"sizing",names:$e,props:{numArgs:0,allowedInText:!0},handler:(e,t)=>{var{breakOnTokenText:e,funcName:r,parser:n}=e,e=n.parseExpression(!1,e);return{type:"sizing",mode:n.mode,size:$e.indexOf(r)+1,body:e}},htmlBuilder:(e,t)=>{var r=t.havingSize(e.size);return mr(e.body,r,t)},mathmlBuilder:(e,t)=>(t=t.havingSize(e.size),e=x(e.body,t),(e=new Ut.MathNode("mstyle",e)).setAttribute("mathsize",D(t.sizeMultiplier)),e)}),Vt({type:"smash",names:["\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:(e,t,r)=>{let n=e.parser,a=!1,i=!1,o=r[0]&&Xt(r[0],"ordgroup"),s;if(o)for(let e=0;e<o.body.length;++e)if("t"===(s=o.body[e].text))a=!0;else{if("b"!==s){a=!1,i=!1;break}i=!0}else a=!0,i=!0;return e=t[0],{type:"smash",mode:n.mode,body:e,smashHeight:a,smashDepth:i}},htmlBuilder:(e,t)=>{var r=Pt.makeSpan([],[P(e.body,t)]);if(!e.smashHeight&&!e.smashDepth)return r;if(e.smashHeight&&(r.height=0,r.children))for(let e=0;e<r.children.length;e++)r.children[e].height=0;if(e.smashDepth&&(r.depth=0,r.children))for(let e=0;e<r.children.length;e++)r.children[e].depth=0;return e=Pt.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:r}]},t),Pt.makeSpan(["mord"],[e],t)},mathmlBuilder:(e,t)=>(t=new Ut.MathNode("mpadded",[w(e.body,t)]),e.smashHeight&&t.setAttribute("height","0px"),e.smashDepth&&t.setAttribute("depth","0px"),t)}),Vt({type:"sqrt",names:["\\sqrt"],props:{numArgs:1,numOptionalArgs:1},handler(e,t,r){return e=e.parser,r=r[0],t=t[0],{type:"sqrt",mode:e.mode,body:t,index:r}},htmlBuilder(e,t){let r=P(e.body,t.havingCrampedStyle()),n=(0===r.height&&(r.height=t.fontMetrics().xHeight),r=Pt.wrapFragment(r,t),t.fontMetrics().defaultRuleThickness),a=n,i=n+(t.style.id<yt.TEXT.id?t.fontMetrics().xHeight:a)/4,o=r.height+r.depth+i+n,{span:s,ruleWidth:l,advanceWidth:h}=Z0.sqrtImage(o,t),m=s.height-l;m>r.height+r.depth+i&&(i=(i+m-r.height-r.depth)/2);var c,p=s.height-r.height-i-l,p=(r.style.paddingLeft=D(h),Pt.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:r,wrapperClasses:["svg-align"]},{type:"kern",size:-(r.height+p)},{type:"elem",elem:s},{type:"kern",size:l}]},t));return e.index?(c=t.havingStyle(yt.SCRIPTSCRIPT),e=P(e.index,c,t),c=.6*(p.height-p.depth),c=Pt.makeVList({positionType:"shift",positionData:-c,children:[{type:"elem",elem:e}]},t),e=Pt.makeSpan(["root"],[c]),Pt.makeSpan(["mord","sqrt"],[e,p],t)):Pt.makeSpan(["mord","sqrt"],[p],t)},mathmlBuilder(e,t){var{body:e,index:r}=e;return r?new Ut.MathNode("mroot",[w(e,t),w(r,t)]):new Ut.MathNode("msqrt",[w(e,t)])}}),{display:yt.DISPLAY,text:yt.TEXT,script:yt.SCRIPT,scriptscript:yt.SCRIPTSCRIPT}),Ke=(Vt({type:"styling",names:["\\displaystyle","\\textstyle","\\scriptstyle","\\scriptscriptstyle"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e,t){var{breakOnTokenText:e,funcName:r,parser:n}=e,e=n.parseExpression(!0,e),r=r.slice(1,r.length-5);return{type:"styling",mode:n.mode,style:r,body:e}},htmlBuilder(e,t){var r=Ze[e.style],r=t.havingStyle(r).withFont("");return mr(e.body,r,t)},mathmlBuilder(e,t){var r=Ze[e.style],t=t.havingStyle(r),r=x(e.body,t),t=new Ut.MathNode("mstyle",r),r={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]}[e.style];return t.setAttribute("scriptlevel",r[0]),t.setAttribute("displaystyle",r[1]),t}}),S0({type:"supsub",htmlBuilder(e,t){var r=t;if(i=(a=(n=e).base)?"op"===a.type?a.limits&&(r.style.size===yt.DISPLAY.size||a.alwaysHandleSupSub)?N:null:"operatorname"===a.type?a.alwaysHandleSupSub&&(r.style.size===yt.DISPLAY.size||a.limits)?_e:null:"accent"===a.type?bt.isCharacterBox(a.base)?v:null:"horizBrace"===a.type&&!n.sub===a.isOver?Ge:null:null)return i(e,t);var{base:r,sup:n,sub:a}=e,i=P(r,t);let o,s,l=t.fontMetrics(),h=0,m=0;r=r&&bt.isCharacterBox(r),n&&(d=t.havingStyle(t.style.sup()),o=P(n,d,t),r||(h=i.height-d.fontMetrics().supDrop*d.sizeMultiplier/t.sizeMultiplier)),a&&(d=t.havingStyle(t.style.sub()),s=P(a,d,t),r||(m=i.depth+d.fontMetrics().subDrop*d.sizeMultiplier/t.sizeMultiplier)),n=t.style===yt.DISPLAY?l.sup1:t.style.cramped?l.sup3:l.sup2,a=t.sizeMultiplier,r=D(.5/l.ptPerEm/a);let c,p=null;if(s&&(d=e.base&&"op"===e.base.type&&e.base.name&&("\\oiint"===e.base.name||"\\oiiint"===e.base.name),i instanceof jt||d)&&(p=D(-i.italic)),o&&s)h=Math.max(h,n,o.depth+.25*l.xHeight),m=Math.max(m,l.sub2),e=4*l.defaultRuleThickness,h-o.depth-(s.height-m)<e&&(m=e-(h-o.depth)+s.height,0<(d=.8*l.xHeight-(h-o.depth)))&&(h+=d,m-=d),e=[{type:"elem",elem:s,shift:m,marginRight:r,marginLeft:p},{type:"elem",elem:o,shift:-h,marginRight:r}],c=Pt.makeVList({positionType:"individualShift",children:e},t);else if(s){m=Math.max(m,l.sub1,s.height-.8*l.xHeight);var d=[{type:"elem",elem:s,marginLeft:p,marginRight:r}];c=Pt.makeVList({positionType:"shift",positionData:m,children:d},t)}else{if(!o)throw new Error("supsub must have either sup or sub.");h=Math.max(h,n,o.depth+.25*l.xHeight),c=Pt.makeVList({positionType:"shift",positionData:-h,children:[{type:"elem",elem:o,marginRight:r}]},t)}return a=y(i,"right")||"mord",Pt.makeSpan([a],[i,Pt.makeSpan(["msupsub"],[c])],t)},mathmlBuilder(e,t){let r,n=!1,a=(e.base&&"horizBrace"===e.base.type&&!!e.sup===e.base.isOver&&(n=!0,r=e.base.isOver),!e.base||"op"!==e.base.type&&"operatorname"!==e.base.type||(e.base.parentIsSupSub=!0),[w(e.base,t)]),i;var o;return e.sub&&a.push(w(e.sub,t)),e.sup&&a.push(w(e.sup,t)),i=n?r?"mover":"munder":e.sub?e.sup?(o=e.base)&&"op"===o.type&&o.limits&&t.style===yt.DISPLAY||o&&"operatorname"===o.type&&o.alwaysHandleSupSub&&(t.style===yt.DISPLAY||o.limits)?"munderover":"msubsup":(o=e.base)&&"op"===o.type&&o.limits&&(t.style===yt.DISPLAY||o.alwaysHandleSupSub)||o&&"operatorname"===o.type&&o.alwaysHandleSupSub&&(o.limits||t.style===yt.DISPLAY)?"munder":"msub":(o=e.base)&&"op"===o.type&&o.limits&&(t.style===yt.DISPLAY||o.alwaysHandleSupSub)||o&&"operatorname"===o.type&&o.alwaysHandleSupSub&&(o.limits||t.style===yt.DISPLAY)?"mover":"msup",new Ut.MathNode(i,a)}}),S0({type:"atom",htmlBuilder(e,t){return Pt.mathsym(e.text,e.mode,t,["m"+e.family])},mathmlBuilder(e,t){var r=new Ut.MathNode("mo",[Yt(e.text,e.mode)]);return"bin"===e.family?"bold-italic"===(t=N0(e,t))&&r.setAttribute("mathvariant",t):"punct"===e.family?r.setAttribute("separator","true"):"open"!==e.family&&"close"!==e.family||r.setAttribute("stretchy","false"),r}}),{mi:"italic",mn:"normal",mtext:"normal"}),I=(S0({type:"mathord",htmlBuilder(e,t){return Pt.makeOrd(e,t,"mathord")},mathmlBuilder(e,t){var r=new Ut.MathNode("mi",[Yt(e.text,e.mode,t)]);return(e=N0(e,t)||"italic")!==Ke[r.type]&&r.setAttribute("mathvariant",e),r}}),S0({type:"textord",htmlBuilder(e,t){return Pt.makeOrd(e,t,"textord")},mathmlBuilder(e,t){var r=Yt(e.text,e.mode,t),t=N0(e,t)||"normal",e="text"===e.mode?new Ut.MathNode("mtext",[r]):/[0-9]/.test(e.text)?new Ut.MathNode("mn",[r]):"\\prime"===e.text?new Ut.MathNode("mo",[r]):new Ut.MathNode("mi",[r]);return t!==Ke[e.type]&&e.setAttribute("mathvariant",t),e}}),{"\\nobreak":"nobreak","\\allowbreak":"allowbreak"}),Je={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}},Qe=(S0({type:"spacing",htmlBuilder(e,t){var r,n;if(Je.hasOwnProperty(e.text))return r=Je[e.text].className||"","text"!==e.mode?Pt.makeSpan(["mspace",r],[Pt.mathsym(e.text,e.mode,t)],t):((n=Pt.makeOrd(e,t,"textord")).classes.push(r),n);if(I.hasOwnProperty(e.text))return Pt.makeSpan(["mspace",I[e.text]],[],t);throw new ft('Unknown type of space "'+e.text+'"')},mathmlBuilder(e,t){if(Je.hasOwnProperty(e.text))return new Ut.MathNode("mtext",[new Ut.TextNode(" ")]);if(I.hasOwnProperty(e.text))return new Ut.MathNode("mspace");throw new ft('Unknown type of space "'+e.text+'"')}}),()=>{var e=new Ut.MathNode("mtd",[]);return e.setAttribute("width","50%"),e}),et=(S0({type:"tag",mathmlBuilder(e,t){return(e=new Ut.MathNode("mtable",[new Ut.MathNode("mtr",[Qe(),new Ut.MathNode("mtd",[I0(e.body,t)]),Qe(),new Ut.MathNode("mtd",[I0(e.tag,t)])])])).setAttribute("width","100%"),e}}),{"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"}),tt={"\\textbf":"textbf","\\textmd":"textmd"},rt={"\\textit":"textit","\\textup":"textup"},nt=(e,t)=>(e=e.font)?et[e]?t.withTextFontFamily(et[e]):tt[e]?t.withTextFontWeight(tt[e]):"\\emph"===e?"textit"===t.fontShape?t.withTextFontShape("textup"):t.withTextFontShape("textit"):t.withTextFontShape(rt[e]):t,at=(Vt({type:"text",names:["\\text","\\textrm","\\textsf","\\texttt","\\textnormal","\\textbf","\\textmd","\\textit","\\textup","\\emph"],props:{numArgs:1,argTypes:["text"],allowedInArgument:!0,allowedInText:!0},handler(e,t){var{parser:e,funcName:r}=e,t=t[0];return{type:"text",mode:e.mode,body:Ft(t),font:r}},htmlBuilder(e,t){return t=nt(e,t),e=Gt(e.body,t,!0),Pt.makeSpan(["mord","text"],e,t)},mathmlBuilder(e,t){return t=nt(e,t),I0(e.body,t)}}),Vt({type:"underline",names:["\\underline"],props:{numArgs:1,allowedInText:!0},handler(e,t){return{type:"underline",mode:(e=e.parser).mode,body:t[0]}},htmlBuilder(e,t){var e=P(e.body,t),r=Pt.makeLineSpan("underline-line",t),n=t.fontMetrics().defaultRuleThickness,r=Pt.makeVList({positionType:"top",positionData:e.height,children:[{type:"kern",size:n},{type:"elem",elem:r},{type:"kern",size:3*n},{type:"elem",elem:e}]},t);return Pt.makeSpan(["mord","underline"],[r],t)},mathmlBuilder(e,t){var r=new Ut.MathNode("mo",[new Ut.TextNode("‾")]);return r.setAttribute("stretchy","true"),(e=new Ut.MathNode("munder",[w(e.body,t),r])).setAttribute("accentunder","true"),e}}),Vt({type:"vcenter",names:["\\vcenter"],props:{numArgs:1,argTypes:["original"],allowedInText:!1},handler(e,t){return{type:"vcenter",mode:(e=e.parser).mode,body:t[0]}},htmlBuilder(e,t){var e=P(e.body,t),r=t.fontMetrics().axisHeight,r=.5*(e.height-r-(e.depth+r));return Pt.makeVList({positionType:"shift",positionData:r,children:[{type:"elem",elem:e}]},t)},mathmlBuilder(e,t){return new Ut.MathNode("mpadded",[w(e.body,t)],["vcenter"])}}),Vt({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler(e,t,r){throw new ft("\\verb ended by end of line instead of matching delimiter")},htmlBuilder(r,e){var n=at(r),a=[],i=e.havingStyle(e.style.text());for(let t=0;t<n.length;t++){let e=n[t];"~"===e&&(e="\\textasciitilde"),a.push(Pt.makeSymbol(e,"Typewriter-Regular",r.mode,i,["mord","texttt"]))}return Pt.makeSpan(["mord","text"].concat(i.sizingClasses(e)),Pt.tryCombineChars(a),i)},mathmlBuilder(e,t){return e=new Ut.TextNode(at(e)),(e=new Ut.MathNode("mtext",[e])).setAttribute("mathvariant","monospace"),e}}),e=>e.body.replace(/ /g,e.star?"␣":" "));var cr=se;let it=new RegExp("[̀-ͯ]+$");class Tr{constructor(e,t){this.input=void 0,this.settings=void 0,this.tokenRegex=void 0,this.catcodes=void 0,this.input=e,this.settings=t,this.tokenRegex=new RegExp("([ \r\n\t]+)|\\\\(\n|[ \r\t]+\n?)[ \r\t]*|([!-\\[\\]-‧‪-퟿豈-￿][̀-ͯ]*|[\ud800-\udbff][\udc00-\udfff][̀-ͯ]*|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5|(\\\\[a-zA-Z@]+)[ \r\n\t]*|\\\\[^\ud800-\udfff])","g"),this.catcodes={"%":14,"~":13}}setCatcode(e,t){this.catcodes[e]=t}lex(){var e=this.input,t=this.tokenRegex.lastIndex;if(t===e.length)return new Kt("EOF",new Zt(this,t,t));var r=this.tokenRegex.exec(e);if(null===r||r.index!==t)throw new ft("Unexpected character: '"+e[t]+"'",new Kt(e[t],new Zt(this,t,t+1)));return r=r[6]||r[3]||(r[2]?"\\ ":" "),14!==this.catcodes[r]?new Kt(r,new Zt(this,t,this.tokenRegex.lastIndex)):(-1===(r=e.indexOf("\n",this.tokenRegex.lastIndex))?(this.tokenRegex.lastIndex=e.length,this.settings.reportNonstrict("commentAtEnd","% comment has no terminating newline; LaTeX would fail because of commenting the end of math mode (e.g. $)")):this.tokenRegex.lastIndex=r+1,this.lex())}}class Br{constructor(e,t){void 0===e&&(e={}),void 0===t&&(t={}),this.current=void 0,this.builtins=void 0,this.undefStack=void 0,this.current=t,this.builtins=e,this.undefStack=[]}beginGroup(){this.undefStack.push({})}endGroup(){if(0===this.undefStack.length)throw new ft("Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug");var e,t=this.undefStack.pop();for(e in t)t.hasOwnProperty(e)&&(null==t[e]?delete this.current[e]:this.current[e]=t[e])}endGroups(){for(;0<this.undefStack.length;)this.endGroup()}has(e){return this.current.hasOwnProperty(e)||this.builtins.hasOwnProperty(e)}get(e){return(this.current.hasOwnProperty(e)?this.current:this.builtins)[e]}set(t,e,r){if(r=void 0!==r&&r){for(let e=0;e<this.undefStack.length;e++)delete this.undefStack[e][t];0<this.undefStack.length&&(this.undefStack[this.undefStack.length-1][t]=e)}else(r=this.undefStack[this.undefStack.length-1])&&!r.hasOwnProperty(t)&&(r[t]=this.current[t]);null==e?delete this.current[t]:this.current[t]=e}}var pr=Oe;Wt("\\noexpand",function(e){var t=e.popToken();return e.isExpandable(t.text)&&(t.noexpand=!0,t.treatAsRelax=!0),{tokens:[t],numArgs:0}}),Wt("\\expandafter",function(e){var t=e.popToken();return e.expandOnce(!0),{tokens:[t],numArgs:0}}),Wt("\\@firstoftwo",function(e){return{tokens:e.consumeArgs(2)[0],numArgs:0}}),Wt("\\@secondoftwo",function(e){return{tokens:e.consumeArgs(2)[1],numArgs:0}}),Wt("\\@ifnextchar",function(e){var t=e.consumeArgs(3),e=(e.consumeSpaces(),e.future());return 1===t[0].length&&t[0][0].text===e.text?{tokens:t[1],numArgs:0}:{tokens:t[2],numArgs:0}}),Wt("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}"),Wt("\\TextOrMath",function(e){var t=e.consumeArgs(2);return"text"===e.mode?{tokens:t[0],numArgs:0}:{tokens:t[1],numArgs:0}});let ot={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15},st=(Wt("\\char",function(e){let t,r=e.popToken(),n="";if("'"===r.text)t=8,r=e.popToken();else if('"'===r.text)t=16,r=e.popToken();else if("`"===r.text)if("\\"===(r=e.popToken()).text[0])n=r.text.charCodeAt(1);else{if("EOF"===r.text)throw new ft("\\char` missing argument");n=r.text.charCodeAt(0)}else t=10;if(t){if(null==(n=ot[r.text])||n>=t)throw new ft("Invalid base-"+t+" digit "+r.text);for(var a;null!=(a=ot[e.future().text])&&a<t;)n=n*t+a,e.popToken()}return"\\@char{"+n+"}"}),(r,e,t,n)=>{let a=r.consumeArg().tokens;if(1!==a.length)throw new ft("\\newcommand's first argument must be a macro name");var i=a[0].text,o=r.isDefined(i);if(o&&!e)throw new ft("\\newcommand{"+i+"} attempting to redefine "+i+"; use \\renewcommand");if(!o&&!t)throw new ft("\\renewcommand{"+i+"} when command "+i+" does not yet exist; use \\newcommand");let s=0;if(1===(a=r.consumeArg().tokens).length&&"["===a[0].text){let e="",t=r.expandNextToken();for(;"]"!==t.text&&"EOF"!==t.text;)e+=t.text,t=r.expandNextToken();if(!e.match(/^\s*[0-9]+\s*$/))throw new ft("Invalid number of arguments: "+e);s=parseInt(e),a=r.consumeArg().tokens}return o&&n||r.macros.set(i,{tokens:a,numArgs:s}),""}),lt=(Wt("\\newcommand",e=>st(e,!1,!0,!1)),Wt("\\renewcommand",e=>st(e,!0,!1,!1)),Wt("\\providecommand",e=>st(e,!0,!0,!0)),Wt("\\message",e=>(e=e.consumeArgs(1)[0],console.log(e.reverse().map(e=>e.text).join("")),"")),Wt("\\errmessage",e=>(e=e.consumeArgs(1)[0],console.error(e.reverse().map(e=>e.text).join("")),"")),Wt("\\show",e=>{var t=e.popToken(),r=t.text;return console.log(t,e.macros.get(r),cr[r],vt.math[r],vt.text[r]),""}),Wt("\\bgroup","{"),Wt("\\egroup","}"),Wt("~","\\nobreakspace"),Wt("\\lq","`"),Wt("\\rq","'"),Wt("\\aa","\\r a"),Wt("\\AA","\\r A"),Wt("\\textcopyright","\\html@mathml{\\textcircled{c}}{\\char`©}"),Wt("\\copyright","\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}"),Wt("\\textregistered","\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`®}"),Wt("ℬ","\\mathscr{B}"),Wt("ℰ","\\mathscr{E}"),Wt("ℱ","\\mathscr{F}"),Wt("ℋ","\\mathscr{H}"),Wt("ℐ","\\mathscr{I}"),Wt("ℒ","\\mathscr{L}"),Wt("ℳ","\\mathscr{M}"),Wt("ℛ","\\mathscr{R}"),Wt("ℭ","\\mathfrak{C}"),Wt("ℌ","\\mathfrak{H}"),Wt("ℨ","\\mathfrak{Z}"),Wt("\\Bbbk","\\Bbb{k}"),Wt("·","\\cdotp"),Wt("\\llap","\\mathllap{\\textrm{#1}}"),Wt("\\rlap","\\mathrlap{\\textrm{#1}}"),Wt("\\clap","\\mathclap{\\textrm{#1}}"),Wt("\\mathstrut","\\vphantom{(}"),Wt("\\underbar","\\underline{\\text{#1}}"),Wt("\\not",'\\html@mathml{\\mathrel{\\mathrlap\\@not}}{\\char"338}'),Wt("\\neq","\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`≠}}"),Wt("\\ne","\\neq"),Wt("≠","\\neq"),Wt("\\notin","\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`∉}}"),Wt("∉","\\notin"),Wt("≘","\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`≘}}"),Wt("≙","\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`≘}}"),Wt("≚","\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`≚}}"),Wt("≛","\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`≛}}"),Wt("≝","\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`≝}}"),Wt("≞","\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`≞}}"),Wt("≟","\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`≟}}"),Wt("⟂","\\perp"),Wt("‼","\\mathclose{!\\mkern-0.8mu!}"),Wt("∌","\\notni"),Wt("⌜","\\ulcorner"),Wt("⌝","\\urcorner"),Wt("⌞","\\llcorner"),Wt("⌟","\\lrcorner"),Wt("©","\\copyright"),Wt("®","\\textregistered"),Wt("️","\\textregistered"),Wt("\\ulcorner",'\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}'),Wt("\\urcorner",'\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}'),Wt("\\llcorner",'\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}'),Wt("\\lrcorner",'\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}'),Wt("\\vdots","{\\varvdots\\rule{0pt}{15pt}}"),Wt("⋮","\\vdots"),Wt("\\varGamma","\\mathit{\\Gamma}"),Wt("\\varDelta","\\mathit{\\Delta}"),Wt("\\varTheta","\\mathit{\\Theta}"),Wt("\\varLambda","\\mathit{\\Lambda}"),Wt("\\varXi","\\mathit{\\Xi}"),Wt("\\varPi","\\mathit{\\Pi}"),Wt("\\varSigma","\\mathit{\\Sigma}"),Wt("\\varUpsilon","\\mathit{\\Upsilon}"),Wt("\\varPhi","\\mathit{\\Phi}"),Wt("\\varPsi","\\mathit{\\Psi}"),Wt("\\varOmega","\\mathit{\\Omega}"),Wt("\\substack","\\begin{subarray}{c}#1\\end{subarray}"),Wt("\\colon","\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax"),Wt("\\boxed","\\fbox{$\\displaystyle{#1}$}"),Wt("\\iff","\\DOTSB\\;\\Longleftrightarrow\\;"),Wt("\\implies","\\DOTSB\\;\\Longrightarrow\\;"),Wt("\\impliedby","\\DOTSB\\;\\Longleftarrow\\;"),Wt("\\dddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ...}}{#1}}"),Wt("\\ddddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ....}}{#1}}"),{",":"\\dotsc","\\not":"\\dotsb","+":"\\dotsb","=":"\\dotsb","<":"\\dotsb",">":"\\dotsb","-":"\\dotsb","*":"\\dotsb",":":"\\dotsb","\\DOTSB":"\\dotsb","\\coprod":"\\dotsb","\\bigvee":"\\dotsb","\\bigwedge":"\\dotsb","\\biguplus":"\\dotsb","\\bigcap":"\\dotsb","\\bigcup":"\\dotsb","\\prod":"\\dotsb","\\sum":"\\dotsb","\\bigotimes":"\\dotsb","\\bigoplus":"\\dotsb","\\bigodot":"\\dotsb","\\bigsqcup":"\\dotsb","\\And":"\\dotsb","\\longrightarrow":"\\dotsb","\\Longrightarrow":"\\dotsb","\\longleftarrow":"\\dotsb","\\Longleftarrow":"\\dotsb","\\longleftrightarrow":"\\dotsb","\\Longleftrightarrow":"\\dotsb","\\mapsto":"\\dotsb","\\longmapsto":"\\dotsb","\\hookrightarrow":"\\dotsb","\\doteq":"\\dotsb","\\mathbin":"\\dotsb","\\mathrel":"\\dotsb","\\relbar":"\\dotsb","\\Relbar":"\\dotsb","\\xrightarrow":"\\dotsb","\\xleftarrow":"\\dotsb","\\DOTSI":"\\dotsi","\\int":"\\dotsi","\\oint":"\\dotsi","\\iint":"\\dotsi","\\iiint":"\\dotsi","\\iiiint":"\\dotsi","\\idotsint":"\\dotsi","\\DOTSX":"\\dotsx"}),ht=(Wt("\\dots",function(e){let t="\\dotso";return(e=e.expandAfterFuture().text)in lt?t=lt[e]:("\\not"===e.slice(0,4)||e in vt.math&&bt.contains(["bin","rel"],vt.math[e].group))&&(t="\\dotsb"),t}),{")":!0,"]":!0,"\\rbrack":!0,"\\}":!0,"\\rbrace":!0,"\\rangle":!0,"\\rceil":!0,"\\rfloor":!0,"\\rgroup":!0,"\\rmoustache":!0,"\\right":!0,"\\bigr":!0,"\\biggr":!0,"\\Bigr":!0,"\\Biggr":!0,$:!0,";":!0,".":!0,",":!0}),mt=(Wt("\\dotso",function(e){return e.future().text in ht?"\\ldots\\,":"\\ldots"}),Wt("\\dotsc",function(e){return(e=e.future().text)in ht&&","!==e?"\\ldots\\,":"\\ldots"}),Wt("\\cdots",function(e){return e.future().text in ht?"\\@cdots\\,":"\\@cdots"}),Wt("\\dotsb","\\cdots"),Wt("\\dotsm","\\cdots"),Wt("\\dotsi","\\!\\cdots"),Wt("\\dotsx","\\ldots\\,"),Wt("\\DOTSI","\\relax"),Wt("\\DOTSB","\\relax"),Wt("\\DOTSX","\\relax"),Wt("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax"),Wt("\\,","\\tmspace+{3mu}{.1667em}"),Wt("\\thinspace","\\,"),Wt("\\>","\\mskip{4mu}"),Wt("\\:","\\tmspace+{4mu}{.2222em}"),Wt("\\medspace","\\:"),Wt("\\;","\\tmspace+{5mu}{.2777em}"),Wt("\\thickspace","\\;"),Wt("\\!","\\tmspace-{3mu}{.1667em}"),Wt("\\negthinspace","\\!"),Wt("\\negmedspace","\\tmspace-{4mu}{.2222em}"),Wt("\\negthickspace","\\tmspace-{5mu}{.277em}"),Wt("\\enspace","\\kern.5em "),Wt("\\enskip","\\hskip.5em\\relax"),Wt("\\quad","\\hskip1em\\relax"),Wt("\\qquad","\\hskip2em\\relax"),Wt("\\tag","\\@ifstar\\tag@literal\\tag@paren"),Wt("\\tag@paren","\\tag@literal{({#1})}"),Wt("\\tag@literal",e=>{if(e.macros.get("\\df@tag"))throw new ft("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"}),Wt("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}"),Wt("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)"),Wt("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}"),Wt("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1"),Wt("\\newline","\\\\\\relax"),Wt("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}"),Wt("\\LaTeX","\\textrm{\\html@mathml{L\\kern-.36em\\raisebox{"+(Ct=D(xt["Main-Regular"]["T".charCodeAt(0)][1]-.7*xt["Main-Regular"]["A".charCodeAt(0)][1]))+"}{\\scriptstyle A}\\kern-.15em\\TeX}{LaTeX}}"),Wt("\\KaTeX","\\textrm{\\html@mathml{K\\kern-.17em\\raisebox{"+Ct+"}{\\scriptstyle A}\\kern-.15em\\TeX}{KaTeX}}"),Wt("\\hspace","\\@ifstar\\@hspacer\\@hspace"),Wt("\\@hspace","\\hskip #1\\relax"),Wt("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax"),Wt("\\ordinarycolon",":"),Wt("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}"),Wt("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}'),Wt("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}'),Wt("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}'),Wt("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}'),Wt("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}'),Wt("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}'),Wt("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}'),Wt("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}'),Wt("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}'),Wt("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}'),Wt("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}'),Wt("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}'),Wt("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}'),Wt("∷","\\dblcolon"),Wt("∹","\\eqcolon"),Wt("≔","\\coloneqq"),Wt("≕","\\eqqcolon"),Wt("⩴","\\Coloneqq"),Wt("\\ratio","\\vcentcolon"),Wt("\\coloncolon","\\dblcolon"),Wt("\\colonequals","\\coloneqq"),Wt("\\coloncolonequals","\\Coloneqq"),Wt("\\equalscolon","\\eqqcolon"),Wt("\\equalscoloncolon","\\Eqqcolon"),Wt("\\colonminus","\\coloneq"),Wt("\\coloncolonminus","\\Coloneq"),Wt("\\minuscolon","\\eqcolon"),Wt("\\minuscoloncolon","\\Eqcolon"),Wt("\\coloncolonapprox","\\Colonapprox"),Wt("\\coloncolonsim","\\Colonsim"),Wt("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),Wt("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}"),Wt("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),Wt("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}"),Wt("\\notni","\\html@mathml{\\not\\ni}{\\mathrel{\\char`∌}}"),Wt("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}"),Wt("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}"),Wt("\\injlim","\\DOTSB\\operatorname*{inj\\,lim}"),Wt("\\projlim","\\DOTSB\\operatorname*{proj\\,lim}"),Wt("\\varlimsup","\\DOTSB\\operatorname*{\\overline{lim}}"),Wt("\\varliminf","\\DOTSB\\operatorname*{\\underline{lim}}"),Wt("\\varinjlim","\\DOTSB\\operatorname*{\\underrightarrow{lim}}"),Wt("\\varprojlim","\\DOTSB\\operatorname*{\\underleftarrow{lim}}"),Wt("\\gvertneqq","\\html@mathml{\\@gvertneqq}{≩}"),Wt("\\lvertneqq","\\html@mathml{\\@lvertneqq}{≨}"),Wt("\\ngeqq","\\html@mathml{\\@ngeqq}{≱}"),Wt("\\ngeqslant","\\html@mathml{\\@ngeqslant}{≱}"),Wt("\\nleqq","\\html@mathml{\\@nleqq}{≰}"),Wt("\\nleqslant","\\html@mathml{\\@nleqslant}{≰}"),Wt("\\nshortmid","\\html@mathml{\\@nshortmid}{∤}"),Wt("\\nshortparallel","\\html@mathml{\\@nshortparallel}{∦}"),Wt("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{⊈}"),Wt("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{⊉}"),Wt("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{⊊}"),Wt("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{⫋}"),Wt("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{⊋}"),Wt("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{⫌}"),Wt("\\imath","\\html@mathml{\\@imath}{ı}"),Wt("\\jmath","\\html@mathml{\\@jmath}{ȷ}"),Wt("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`⟦}}"),Wt("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`⟧}}"),Wt("⟦","\\llbracket"),Wt("⟧","\\rrbracket"),Wt("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`⦃}}"),Wt("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`⦄}}"),Wt("⦃","\\lBrace"),Wt("⦄","\\rBrace"),Wt("\\minuso","\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`⦵}}"),Wt("⦵","\\minuso"),Wt("\\darr","\\downarrow"),Wt("\\dArr","\\Downarrow"),Wt("\\Darr","\\Downarrow"),Wt("\\lang","\\langle"),Wt("\\rang","\\rangle"),Wt("\\uarr","\\uparrow"),Wt("\\uArr","\\Uparrow"),Wt("\\Uarr","\\Uparrow"),Wt("\\N","\\mathbb{N}"),Wt("\\R","\\mathbb{R}"),Wt("\\Z","\\mathbb{Z}"),Wt("\\alef","\\aleph"),Wt("\\alefsym","\\aleph"),Wt("\\Alpha","\\mathrm{A}"),Wt("\\Beta","\\mathrm{B}"),Wt("\\bull","\\bullet"),Wt("\\Chi","\\mathrm{X}"),Wt("\\clubs","\\clubsuit"),Wt("\\cnums","\\mathbb{C}"),Wt("\\Complex","\\mathbb{C}"),Wt("\\Dagger","\\ddagger"),Wt("\\diamonds","\\diamondsuit"),Wt("\\empty","\\emptyset"),Wt("\\Epsilon","\\mathrm{E}"),Wt("\\Eta","\\mathrm{H}"),Wt("\\exist","\\exists"),Wt("\\harr","\\leftrightarrow"),Wt("\\hArr","\\Leftrightarrow"),Wt("\\Harr","\\Leftrightarrow"),Wt("\\hearts","\\heartsuit"),Wt("\\image","\\Im"),Wt("\\infin","\\infty"),Wt("\\Iota","\\mathrm{I}"),Wt("\\isin","\\in"),Wt("\\Kappa","\\mathrm{K}"),Wt("\\larr","\\leftarrow"),Wt("\\lArr","\\Leftarrow"),Wt("\\Larr","\\Leftarrow"),Wt("\\lrarr","\\leftrightarrow"),Wt("\\lrArr","\\Leftrightarrow"),Wt("\\Lrarr","\\Leftrightarrow"),Wt("\\Mu","\\mathrm{M}"),Wt("\\natnums","\\mathbb{N}"),Wt("\\Nu","\\mathrm{N}"),Wt("\\Omicron","\\mathrm{O}"),Wt("\\plusmn","\\pm"),Wt("\\rarr","\\rightarrow"),Wt("\\rArr","\\Rightarrow"),Wt("\\Rarr","\\Rightarrow"),Wt("\\real","\\Re"),Wt("\\reals","\\mathbb{R}"),Wt("\\Reals","\\mathbb{R}"),Wt("\\Rho","\\mathrm{P}"),Wt("\\sdot","\\cdot"),Wt("\\sect","\\S"),Wt("\\spades","\\spadesuit"),Wt("\\sub","\\subset"),Wt("\\sube","\\subseteq"),Wt("\\supe","\\supseteq"),Wt("\\Tau","\\mathrm{T}"),Wt("\\thetasym","\\vartheta"),Wt("\\weierp","\\wp"),Wt("\\Zeta","\\mathrm{Z}"),Wt("\\argmin","\\DOTSB\\operatorname*{arg\\,min}"),Wt("\\argmax","\\DOTSB\\operatorname*{arg\\,max}"),Wt("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits"),Wt("\\bra","\\mathinner{\\langle{#1}|}"),Wt("\\ket","\\mathinner{|{#1}\\rangle}"),Wt("\\braket","\\mathinner{\\langle{#1}\\rangle}"),Wt("\\Bra","\\left\\langle#1\\right|"),Wt("\\Ket","\\left|#1\\right\\rangle"),Wt("\\bra@ket",(Rt=l=>e=>{let t=e.consumeArg().tokens,n=e.consumeArg().tokens,a=e.consumeArg().tokens,r=e.consumeArg().tokens,i=e.macros.get("|"),o=e.macros.get("\\|");e.macros.beginGroup();var s=r=>e=>{l&&(e.macros.set("|",i),a.length)&&e.macros.set("\\|",o);let t=r;return!r&&a.length&&"|"===e.future().text&&(e.popToken(),t=!0),{tokens:t?a:n,numArgs:0}},s=(e.macros.set("|",s(!1)),a.length&&e.macros.set("\\|",s(!0)),e.consumeArg().tokens),s=e.expandTokens([...r,...s,...t]);return e.macros.endGroup(),{tokens:s.reverse(),numArgs:0}})(!1)),Wt("\\bra@set",Rt(!0)),Wt("\\Braket","\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}"),Wt("\\Set","\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}"),Wt("\\set","\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}"),Wt("\\angln","{\\angl n}"),Wt("\\blue","\\textcolor{##6495ed}{#1}"),Wt("\\orange","\\textcolor{##ffa500}{#1}"),Wt("\\pink","\\textcolor{##ff00af}{#1}"),Wt("\\red","\\textcolor{##df0030}{#1}"),Wt("\\green","\\textcolor{##28ae7b}{#1}"),Wt("\\gray","\\textcolor{gray}{#1}"),Wt("\\purple","\\textcolor{##9d38bd}{#1}"),Wt("\\blueA","\\textcolor{##ccfaff}{#1}"),Wt("\\blueB","\\textcolor{##80f6ff}{#1}"),Wt("\\blueC","\\textcolor{##63d9ea}{#1}"),Wt("\\blueD","\\textcolor{##11accd}{#1}"),Wt("\\blueE","\\textcolor{##0c7f99}{#1}"),Wt("\\tealA","\\textcolor{##94fff5}{#1}"),Wt("\\tealB","\\textcolor{##26edd5}{#1}"),Wt("\\tealC","\\textcolor{##01d1c1}{#1}"),Wt("\\tealD","\\textcolor{##01a995}{#1}"),Wt("\\tealE","\\textcolor{##208170}{#1}"),Wt("\\greenA","\\textcolor{##b6ffb0}{#1}"),Wt("\\greenB","\\textcolor{##8af281}{#1}"),Wt("\\greenC","\\textcolor{##74cf70}{#1}"),Wt("\\greenD","\\textcolor{##1fab54}{#1}"),Wt("\\greenE","\\textcolor{##0d923f}{#1}"),Wt("\\goldA","\\textcolor{##ffd0a9}{#1}"),Wt("\\goldB","\\textcolor{##ffbb71}{#1}"),Wt("\\goldC","\\textcolor{##ff9c39}{#1}"),Wt("\\goldD","\\textcolor{##e07d10}{#1}"),Wt("\\goldE","\\textcolor{##a75a05}{#1}"),Wt("\\redA","\\textcolor{##fca9a9}{#1}"),Wt("\\redB","\\textcolor{##ff8482}{#1}"),Wt("\\redC","\\textcolor{##f9685d}{#1}"),Wt("\\redD","\\textcolor{##e84d39}{#1}"),Wt("\\redE","\\textcolor{##bc2612}{#1}"),Wt("\\maroonA","\\textcolor{##ffbde0}{#1}"),Wt("\\maroonB","\\textcolor{##ff92c6}{#1}"),Wt("\\maroonC","\\textcolor{##ed5fa6}{#1}"),Wt("\\maroonD","\\textcolor{##ca337c}{#1}"),Wt("\\maroonE","\\textcolor{##9e034e}{#1}"),Wt("\\purpleA","\\textcolor{##ddd7ff}{#1}"),Wt("\\purpleB","\\textcolor{##c6b9fc}{#1}"),Wt("\\purpleC","\\textcolor{##aa87ff}{#1}"),Wt("\\purpleD","\\textcolor{##7854ab}{#1}"),Wt("\\purpleE","\\textcolor{##543b78}{#1}"),Wt("\\mintA","\\textcolor{##f5f9e8}{#1}"),Wt("\\mintB","\\textcolor{##edf2df}{#1}"),Wt("\\mintC","\\textcolor{##e0e5cc}{#1}"),Wt("\\grayA","\\textcolor{##f6f7f7}{#1}"),Wt("\\grayB","\\textcolor{##f0f1f2}{#1}"),Wt("\\grayC","\\textcolor{##e3e5e6}{#1}"),Wt("\\grayD","\\textcolor{##d6d8da}{#1}"),Wt("\\grayE","\\textcolor{##babec2}{#1}"),Wt("\\grayF","\\textcolor{##888d93}{#1}"),Wt("\\grayG","\\textcolor{##626569}{#1}"),Wt("\\grayH","\\textcolor{##3b3e40}{#1}"),Wt("\\grayI","\\textcolor{##21242c}{#1}"),Wt("\\kaBlue","\\textcolor{##314453}{#1}"),Wt("\\kaGreen","\\textcolor{##71B307}{#1}"),{"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0});class Cr{constructor(e,t,r){this.settings=void 0,this.expansionCount=void 0,this.lexer=void 0,this.macros=void 0,this.stack=void 0,this.mode=void 0,this.settings=t,this.expansionCount=0,this.feed(e),this.macros=new Br(pr,t.macros),this.mode=r,this.stack=[]}feed(e){this.lexer=new Tr(e,this.settings)}switchMode(e){this.mode=e}beginGroup(){this.macros.beginGroup()}endGroup(){this.macros.endGroup()}endGroups(){this.macros.endGroups()}future(){return 0===this.stack.length&&this.pushToken(this.lexer.lex()),this.stack[this.stack.length-1]}popToken(){return this.future(),this.stack.pop()}pushToken(e){this.stack.push(e)}pushTokens(e){this.stack.push(...e)}scanArgument(e){let t,r,n;if(e){if(this.consumeSpaces(),"["!==this.future().text)return null;t=this.popToken(),{tokens:n,end:r}=this.consumeArg(["]"])}else({tokens:n,start:t,end:r}=this.consumeArg());return this.pushToken(new Kt("EOF",r.loc)),this.pushTokens(n),new Kt("",Zt.range(t,r))}consumeSpaces(){for(;" "===this.future().text;)this.stack.pop()}consumeArg(e){let t=[],r=e&&0<e.length,n=(r||this.consumeSpaces(),this.future()),a,i=0,o=0;do{if(a=this.popToken(),t.push(a),"{"===a.text)++i;else if("}"===a.text){if(-1==--i)throw new ft("Extra }",a)}else if("EOF"===a.text)throw new ft("Unexpected end of input in a macro argument, expected '"+(e&&r?e[o]:"}")+"'",a);if(e&&r)if((0===i||1===i&&"{"===e[o])&&a.text===e[o]){if(++o===e.length){t.splice(-o,o);break}}else o=0}while(0!==i||r);return"{"===n.text&&"}"===t[t.length-1].text&&(t.pop(),t.shift()),t.reverse(),{tokens:t,start:n,end:a}}consumeArgs(t,r){if(r){if(r.length!==t+1)throw new ft("The length of delimiters doesn't match the number of args!");var n=r[0];for(let e=0;e<n.length;e++){var a=this.popToken();if(n[e]!==a.text)throw new ft("Use of the macro doesn't match its definition",a)}}var i=[];for(let e=0;e<t;e++)i.push(this.consumeArg(r&&r[e+1]).tokens);return i}countExpansion(e){if(this.expansionCount+=e,this.expansionCount>this.settings.maxExpand)throw new ft("Too many expansions: infinite loop or need to increase maxExpand setting")}expandOnce(e){var t=this.popToken(),r=t.text,n=t.noexpand?null:this._getExpansion(r);if(null==n||e&&n.unexpandable){if(e&&null==n&&"\\"===r[0]&&!this.isDefined(r))throw new ft("Undefined control sequence: "+r);return this.pushToken(t),!1}this.countExpansion(1);let a=n.tokens,i=this.consumeArgs(n.numArgs,n.delimiters);if(n.numArgs)for(let e=(a=a.slice()).length-1;0<=e;--e){var o=a[e];if("#"===o.text){if(0===e)throw new ft("Incomplete placeholder at end of macro body",o);if("#"===(o=a[--e]).text)a.splice(e+1,1);else{if(!/^[1-9]$/.test(o.text))throw new ft("Not a valid argument number",o);a.splice(e,2,...i[+o.text-1])}}}return this.pushTokens(a),a.length}expandAfterFuture(){return this.expandOnce(),this.future()}expandNextToken(){for(;;){var e;if(!1===this.expandOnce())return(e=this.stack.pop()).treatAsRelax&&(e.text="\\relax"),e}throw new Error}expandMacro(e){return this.macros.has(e)?this.expandTokens([new Kt(e)]):void 0}expandTokens(e){var t,r=[],n=this.stack.length;for(this.pushTokens(e);this.stack.length>n;)!1===this.expandOnce(!0)&&((t=this.stack.pop()).treatAsRelax&&(t.noexpand=!1,t.treatAsRelax=!1),r.push(t));return this.countExpansion(r.length),r}expandMacroAsText(e){return(e=this.expandMacro(e))&&e.map(e=>e.text).join("")}_getExpansion(a){var e=this.macros.get(a);if(null==e)return e;if(1===a.length){var t=this.lexer.catcodes[a];if(null!=t&&13!==t)return}if("string"!=typeof(a="function"==typeof e?e(this):e))return a;{let e=0;if(-1!==a.indexOf("#"))for(var i=a.replace(/##/g,"");-1!==i.indexOf("#"+(e+1));)++e;let t=new Tr(a,this.settings),r=[],n=t.lex();for(;"EOF"!==n.text;)r.push(n),n=t.lex();return r.reverse(),{tokens:r,numArgs:e}}}isDefined(e){return this.macros.has(e)||cr.hasOwnProperty(e)||vt.math.hasOwnProperty(e)||vt.text.hasOwnProperty(e)||mt.hasOwnProperty(e)}isExpandable(e){var t=this.macros.get(e);return null!=t?"string"==typeof t||"function"==typeof t||!t.unexpandable:cr.hasOwnProperty(e)&&!cr[e].primitive}}let ct=/^[\u208a\u208b\u208c\u208d\u208e\u2080\u2081\u2082\u2083\u2084\u2085\u2086\u2087\u2088\u2089\u2090\u2091\u2095\u1d62\u2c7c\u2096\u2097\u2098\u2099\u2092\u209a\u1d63\u209b\u209c\u1d64\u1d65\u2093\u1d66\u1d67\u1d68\u1d69\u1d6a]/,R=Object.freeze({"₊":"+","₋":"-","₌":"=","₍":"(","₎":")","₀":"0","₁":"1","₂":"2","₃":"3","₄":"4","₅":"5","₆":"6","₇":"7","₈":"8","₉":"9","ₐ":"a","ₑ":"e","ₕ":"h","ᵢ":"i","ⱼ":"j","ₖ":"k","ₗ":"l","ₘ":"m","ₙ":"n","ₒ":"o","ₚ":"p","ᵣ":"r","ₛ":"s","ₜ":"t","ᵤ":"u","ᵥ":"v","ₓ":"x","ᵦ":"β","ᵧ":"γ","ᵨ":"ρ","ᵩ":"ϕ","ᵪ":"χ","⁺":"+","⁻":"-","⁼":"=","⁽":"(","⁾":")","⁰":"0","¹":"1","²":"2","³":"3","⁴":"4","⁵":"5","⁶":"6","⁷":"7","⁸":"8","⁹":"9","ᴬ":"A","ᴮ":"B","ᴰ":"D","ᴱ":"E","ᴳ":"G","ᴴ":"H","ᴵ":"I","ᴶ":"J","ᴷ":"K","ᴸ":"L","ᴹ":"M","ᴺ":"N","ᴼ":"O","ᴾ":"P","ᴿ":"R","ᵀ":"T","ᵁ":"U","ⱽ":"V","ᵂ":"W","ᵃ":"a","ᵇ":"b","ᶜ":"c","ᵈ":"d","ᵉ":"e","ᶠ":"f","ᵍ":"g","ʰ":"h","ⁱ":"i","ʲ":"j","ᵏ":"k","ˡ":"l","ᵐ":"m","ⁿ":"n","ᵒ":"o","ᵖ":"p","ʳ":"r","ˢ":"s","ᵗ":"t","ᵘ":"u","ᵛ":"v","ʷ":"w","ˣ":"x","ʸ":"y","ᶻ":"z","ᵝ":"β","ᵞ":"γ","ᵟ":"δ","ᵠ":"ϕ","ᵡ":"χ","ᶿ":"θ"}),pt={"́":{text:"\\'",math:"\\acute"},"̀":{text:"\\`",math:"\\grave"},"̈":{text:'\\"',math:"\\ddot"},"̃":{text:"\\~",math:"\\tilde"},"̄":{text:"\\=",math:"\\bar"},"̆":{text:"\\u",math:"\\breve"},"̌":{text:"\\v",math:"\\check"},"̂":{text:"\\^",math:"\\hat"},"̇":{text:"\\.",math:"\\dot"},"̊":{text:"\\r",math:"\\mathring"},"̋":{text:"\\H"},"̧":{text:"\\c"}},dt={"á":"á","à":"à","ä":"ä","ǟ":"ǟ","ã":"ã","ā":"ā","ă":"ă","ắ":"ắ","ằ":"ằ","ẵ":"ẵ","ǎ":"ǎ","â":"â","ấ":"ấ","ầ":"ầ","ẫ":"ẫ","ȧ":"ȧ","ǡ":"ǡ","å":"å","ǻ":"ǻ","ḃ":"ḃ","ć":"ć","ḉ":"ḉ","č":"č","ĉ":"ĉ","ċ":"ċ","ç":"ç","ď":"ď","ḋ":"ḋ","ḑ":"ḑ","é":"é","è":"è","ë":"ë","ẽ":"ẽ","ē":"ē","ḗ":"ḗ","ḕ":"ḕ","ĕ":"ĕ","ḝ":"ḝ","ě":"ě","ê":"ê","ế":"ế","ề":"ề","ễ":"ễ","ė":"ė","ȩ":"ȩ","ḟ":"ḟ","ǵ":"ǵ","ḡ":"ḡ","ğ":"ğ","ǧ":"ǧ","ĝ":"ĝ","ġ":"ġ","ģ":"ģ","ḧ":"ḧ","ȟ":"ȟ","ĥ":"ĥ","ḣ":"ḣ","ḩ":"ḩ","í":"í","ì":"ì","ï":"ï","ḯ":"ḯ","ĩ":"ĩ","ī":"ī","ĭ":"ĭ","ǐ":"ǐ","î":"î","ǰ":"ǰ","ĵ":"ĵ","ḱ":"ḱ","ǩ":"ǩ","ķ":"ķ","ĺ":"ĺ","ľ":"ľ","ļ":"ļ","ḿ":"ḿ","ṁ":"ṁ","ń":"ń","ǹ":"ǹ","ñ":"ñ","ň":"ň","ṅ":"ṅ","ņ":"ņ","ó":"ó","ò":"ò","ö":"ö","ȫ":"ȫ","õ":"õ","ṍ":"ṍ","ṏ":"ṏ","ȭ":"ȭ","ō":"ō","ṓ":"ṓ","ṑ":"ṑ","ŏ":"ŏ","ǒ":"ǒ","ô":"ô","ố":"ố","ồ":"ồ","ỗ":"ỗ","ȯ":"ȯ","ȱ":"ȱ","ő":"ő","ṕ":"ṕ","ṗ":"ṗ","ŕ":"ŕ","ř":"ř","ṙ":"ṙ","ŗ":"ŗ","ś":"ś","ṥ":"ṥ","š":"š","ṧ":"ṧ","ŝ":"ŝ","ṡ":"ṡ","ş":"ş","ẗ":"ẗ","ť":"ť","ṫ":"ṫ","ţ":"ţ","ú":"ú","ù":"ù","ü":"ü","ǘ":"ǘ","ǜ":"ǜ","ǖ":"ǖ","ǚ":"ǚ","ũ":"ũ","ṹ":"ṹ","ū":"ū","ṻ":"ṻ","ŭ":"ŭ","ǔ":"ǔ","û":"û","ů":"ů","ű":"ű","ṽ":"ṽ","ẃ":"ẃ","ẁ":"ẁ","ẅ":"ẅ","ŵ":"ŵ","ẇ":"ẇ","ẘ":"ẘ","ẍ":"ẍ","ẋ":"ẋ","ý":"ý","ỳ":"ỳ","ÿ":"ÿ","ỹ":"ỹ","ȳ":"ȳ","ŷ":"ŷ","ẏ":"ẏ","ẙ":"ẙ","ź":"ź","ž":"ž","ẑ":"ẑ","ż":"ż","Á":"Á","À":"À","Ä":"Ä","Ǟ":"Ǟ","Ã":"Ã","Ā":"Ā","Ă":"Ă","Ắ":"Ắ","Ằ":"Ằ","Ẵ":"Ẵ","Ǎ":"Ǎ","Â":"Â","Ấ":"Ấ","Ầ":"Ầ","Ẫ":"Ẫ","Ȧ":"Ȧ","Ǡ":"Ǡ","Å":"Å","Ǻ":"Ǻ","Ḃ":"Ḃ","Ć":"Ć","Ḉ":"Ḉ","Č":"Č","Ĉ":"Ĉ","Ċ":"Ċ","Ç":"Ç","Ď":"Ď","Ḋ":"Ḋ","Ḑ":"Ḑ","É":"É","È":"È","Ë":"Ë","Ẽ":"Ẽ","Ē":"Ē","Ḗ":"Ḗ","Ḕ":"Ḕ","Ĕ":"Ĕ","Ḝ":"Ḝ","Ě":"Ě","Ê":"Ê","Ế":"Ế","Ề":"Ề","Ễ":"Ễ","Ė":"Ė","Ȩ":"Ȩ","Ḟ":"Ḟ","Ǵ":"Ǵ","Ḡ":"Ḡ","Ğ":"Ğ","Ǧ":"Ǧ","Ĝ":"Ĝ","Ġ":"Ġ","Ģ":"Ģ","Ḧ":"Ḧ","Ȟ":"Ȟ","Ĥ":"Ĥ","Ḣ":"Ḣ","Ḩ":"Ḩ","Í":"Í","Ì":"Ì","Ï":"Ï","Ḯ":"Ḯ","Ĩ":"Ĩ","Ī":"Ī","Ĭ":"Ĭ","Ǐ":"Ǐ","Î":"Î","İ":"İ","Ĵ":"Ĵ","Ḱ":"Ḱ","Ǩ":"Ǩ","Ķ":"Ķ","Ĺ":"Ĺ","Ľ":"Ľ","Ļ":"Ļ","Ḿ":"Ḿ","Ṁ":"Ṁ","Ń":"Ń","Ǹ":"Ǹ","Ñ":"Ñ","Ň":"Ň","Ṅ":"Ṅ","Ņ":"Ņ","Ó":"Ó","Ò":"Ò","Ö":"Ö","Ȫ":"Ȫ","Õ":"Õ","Ṍ":"Ṍ","Ṏ":"Ṏ","Ȭ":"Ȭ","Ō":"Ō","Ṓ":"Ṓ","Ṑ":"Ṑ","Ŏ":"Ŏ","Ǒ":"Ǒ","Ô":"Ô","Ố":"Ố","Ồ":"Ồ","Ỗ":"Ỗ","Ȯ":"Ȯ","Ȱ":"Ȱ","Ő":"Ő","Ṕ":"Ṕ","Ṗ":"Ṗ","Ŕ":"Ŕ","Ř":"Ř","Ṙ":"Ṙ","Ŗ":"Ŗ","Ś":"Ś","Ṥ":"Ṥ","Š":"Š","Ṧ":"Ṧ","Ŝ":"Ŝ","Ṡ":"Ṡ","Ş":"Ş","Ť":"Ť","Ṫ":"Ṫ","Ţ":"Ţ","Ú":"Ú","Ù":"Ù","Ü":"Ü","Ǘ":"Ǘ","Ǜ":"Ǜ","Ǖ":"Ǖ","Ǚ":"Ǚ","Ũ":"Ũ","Ṹ":"Ṹ","Ū":"Ū","Ṻ":"Ṻ","Ŭ":"Ŭ","Ǔ":"Ǔ","Û":"Û","Ů":"Ů","Ű":"Ű","Ṽ":"Ṽ","Ẃ":"Ẃ","Ẁ":"Ẁ","Ẅ":"Ẅ","Ŵ":"Ŵ","Ẇ":"Ẇ","Ẍ":"Ẍ","Ẋ":"Ẋ","Ý":"Ý","Ỳ":"Ỳ","Ÿ":"Ÿ","Ỹ":"Ỹ","Ȳ":"Ȳ","Ŷ":"Ŷ","Ẏ":"Ẏ","Ź":"Ź","Ž":"Ž","Ẑ":"Ẑ","Ż":"Ż","ά":"ά","ὰ":"ὰ","ᾱ":"ᾱ","ᾰ":"ᾰ","έ":"έ","ὲ":"ὲ","ή":"ή","ὴ":"ὴ","ί":"ί","ὶ":"ὶ","ϊ":"ϊ","ΐ":"ΐ","ῒ":"ῒ","ῑ":"ῑ","ῐ":"ῐ","ό":"ό","ὸ":"ὸ","ύ":"ύ","ὺ":"ὺ","ϋ":"ϋ","ΰ":"ΰ","ῢ":"ῢ","ῡ":"ῡ","ῠ":"ῠ","ώ":"ώ","ὼ":"ὼ","Ύ":"Ύ","Ὺ":"Ὺ","Ϋ":"Ϋ","Ῡ":"Ῡ","Ῠ":"Ῠ","Ώ":"Ώ","Ὼ":"Ὼ"};class Nr{constructor(e,t){this.mode=void 0,this.gullet=void 0,this.settings=void 0,this.leftrightDepth=void 0,this.nextToken=void 0,this.mode="math",this.gullet=new Cr(e,t,this.mode),this.settings=t,this.leftrightDepth=0}expect(e,t){if(void 0===t&&(t=!0),this.fetch().text!==e)throw new ft("Expected '"+e+"', got '"+this.fetch().text+"'",this.fetch());t&&this.consume()}consume(){this.nextToken=null}fetch(){return null==this.nextToken&&(this.nextToken=this.gullet.expandNextToken()),this.nextToken}switchMode(e){this.mode=e,this.gullet.switchMode(e)}parse(){this.settings.globalGroup||this.gullet.beginGroup(),this.settings.colorIsTextColor&&this.gullet.macros.set("\\color","\\textcolor");try{var e=this.parseExpression(!1);return this.expect("EOF"),this.settings.globalGroup||this.gullet.endGroup(),e}finally{this.gullet.endGroups()}}subparse(e){var t=this.nextToken,e=(this.consume(),this.gullet.pushToken(new Kt("}")),this.gullet.pushTokens(e),this.parseExpression(!1));return this.expect("}"),this.nextToken=t,e}parseExpression(e,t){for(var r=[];;){"math"===this.mode&&this.consumeSpaces();var n=this.fetch();if(-1!==Nr.endOfExpression.indexOf(n.text))break;if(t&&n.text===t)break;if(e&&cr[n.text]&&cr[n.text].infix)break;if(!(n=this.parseAtom(t)))break;"internal"!==n.type&&r.push(n)}return"text"===this.mode&&this.formLigatures(r),this.handleInfixNodes(r)}handleInfixNodes(t){let r,n=-1;for(let e=0;e<t.length;e++)if("infix"===t[e].type){if(-1!==n)throw new ft("only one infix operator per group",t[e].token);n=e,r=t[e].replaceWith}var e,a;return-1!==n&&r?(e=t.slice(0,n),a=t.slice(n+1),e=1===e.length&&"ordgroup"===e[0].type?e[0]:{type:"ordgroup",mode:this.mode,body:e},a=1===a.length&&"ordgroup"===a[0].type?a[0]:{type:"ordgroup",mode:this.mode,body:a},["\\\\abovefrac"===r?this.callFunction(r,[e,t[n],a],[]):this.callFunction(r,[e,a],[])]):t}handleSupSubscript(e){let t,r=this.fetch(),n=r.text,a;for(this.consume(),this.consumeSpaces();"internal"===(null==(t=a=this.parseGroup(e))?void 0:t.type););if(a)return a;throw new ft("Expected group after '"+n+"'",r)}formatUnsupportedCmd(t){var r=[];for(let e=0;e<t.length;e++)r.push({type:"textord",mode:"text",text:t[e]});var e={type:"text",mode:this.mode,body:r};return{type:"color",mode:this.mode,color:this.settings.errorColor,body:[e]}}parseAtom(e){var t=this.parseGroup("atom",e);if("internal"===(null==t?void 0:t.type))return t;if("text"===this.mode)return t;let r,n;for(;;){this.consumeSpaces();var a=this.fetch();if("\\limits"===a.text||"\\nolimits"===a.text){if(t&&"op"===t.type){var i="\\limits"===a.text;t.limits=i,t.alwaysHandleSupSub=!0}else{if(!t||"operatorname"!==t.type)throw new ft("Limit controls must follow a math operator",a);t.alwaysHandleSupSub&&(t.limits="\\limits"===a.text)}this.consume()}else if("^"===a.text){if(r)throw new ft("Double superscript",a);r=this.handleSupSubscript("superscript")}else if("_"===a.text){if(n)throw new ft("Double subscript",a);n=this.handleSupSubscript("subscript")}else if("'"===a.text){if(r)throw new ft("Double superscript",a);var o={type:"textord",mode:this.mode,text:"\\prime"},s=[o];for(this.consume();"'"===this.fetch().text;)s.push(o),this.consume();"^"===this.fetch().text&&s.push(this.handleSupSubscript("superscript")),r={type:"ordgroup",mode:this.mode,body:s}}else{if(!R[a.text])break;var l=ct.test(a.text),h=[];for(h.push(new Kt(R[a.text])),this.consume();;){var m=this.fetch().text;if(!R[m])break;if(ct.test(m)!==l)break;h.unshift(new Kt(R[m])),this.consume()}i=this.subparse(h),l?n={type:"ordgroup",mode:"math",body:i}:r={type:"ordgroup",mode:"math",body:i}}}return r||n?{type:"supsub",mode:this.mode,base:t,sup:r,sub:n}:t}parseFunction(e,t){var r=this.fetch(),n=r.text;if(!(a=cr[n]))return null;if(this.consume(),t&&"atom"!==t&&!a.allowedInArgument)throw new ft("Got function '"+n+"' with no arguments"+(t?" as "+t:""),r);if("text"===this.mode&&!a.allowedInText)throw new ft("Can't use function '"+n+"' in text mode",r);if("math"===this.mode&&!1===a.allowedInMath)throw new ft("Can't use function '"+n+"' in math mode",r);var{args:t,optArgs:a}=this.parseArguments(n,a);return this.callFunction(n,t,a,r,e)}callFunction(e,t,r,n,a){var i=cr[e];if(i&&i.handler)return i.handler({funcName:e,parser:this,token:n,breakOnTokenText:a},t,r);throw new ft("No function handler for "+e)}parseArguments(a,i){var e=i.numArgs+i.numOptionalArgs;if(0===e)return{args:[],optArgs:[]};var o=[],s=[];for(let n=0;n<e;n++){let e=i.argTypes&&i.argTypes[n],t=n<i.numOptionalArgs,r=((i.primitive&&null==e||"sqrt"===i.type&&1===n&&null==s[0])&&(e="primitive"),this.parseGroupOfType("argument to '"+a+"'",e,t));if(t)s.push(r);else{if(null==r)throw new ft("Null argument, please report this as a bug");o.push(r)}}return{args:o,optArgs:s}}parseGroupOfType(e,t,r){switch(t){case"color":return this.parseColorGroup(r);case"size":return this.parseSizeGroup(r);case"url":return this.parseUrlGroup(r);case"math":case"text":return this.parseArgumentGroup(r,t);case"hbox":var n=this.parseArgumentGroup(r,"text");return null!=n?{type:"styling",mode:n.mode,body:[n],style:"text"}:null;case"raw":return null!=(n=this.parseStringGroup("raw",r))?{type:"raw",mode:"text",string:n.text}:null;case"primitive":if(r)throw new ft("A primitive argument cannot be optional");if(null==(n=this.parseGroup(e)))throw new ft("Expected group as "+e,this.fetch());return n;case"original":case null:case void 0:return this.parseArgumentGroup(r);default:throw new ft("Unknown group type as "+e,this.fetch())}}consumeSpaces(){for(;" "===this.fetch().text;)this.consume()}parseStringGroup(e,t){if(null==(t=this.gullet.scanArgument(t)))return null;let r,n="";for(;"EOF"!==(r=this.fetch()).text;)n+=r.text,this.consume();return this.consume(),t.text=n,t}parseRegexGroup(e,t){let r=this.fetch(),n,a=r,i="";for(;"EOF"!==(n=this.fetch()).text&&e.test(i+n.text);)a=n,i+=a.text,this.consume();if(""===i)throw new ft("Invalid "+t+": '"+r.text+"'",r);return r.range(a,i)}parseColorGroup(e){if(null==(e=this.parseStringGroup("color",e)))return null;var t=/^(#[a-f0-9]{3}|#?[a-f0-9]{6}|[a-z]+)$/i.exec(e.text);if(!t)throw new ft("Invalid color: '"+e.text+"'",e);let r=t[0];return/^[0-9a-f]{6}$/i.test(r)&&(r="#"+r),{type:"color-token",mode:this.mode,color:r}}parseSizeGroup(e){let t,r=!1;if(this.gullet.consumeSpaces(),!(t=e||"{"===this.gullet.future().text?this.parseStringGroup("size",e):this.parseRegexGroup(/^[-+]? *(?:$|\d+|\d+\.\d*|\.\d*) *[a-z]{0,2} *$/,"size")))return null;if(e||0!==t.text.length||(t.text="0pt",r=!0),!(e=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(t.text)))throw new ft("Invalid size: '"+t.text+"'",t);if(i0(e={number:+(e[1]+e[2]),unit:e[3]}))return{type:"size",mode:this.mode,value:e,isBlank:r};throw new ft("Invalid unit: '"+e.unit+"'",t)}parseUrlGroup(e){return this.gullet.lexer.setCatcode("%",13),this.gullet.lexer.setCatcode("~",12),e=this.parseStringGroup("url",e),this.gullet.lexer.setCatcode("%",14),this.gullet.lexer.setCatcode("~",13),null==e?null:(e=e.text.replace(/\\([#$%&~_^{}])/g,"$1"),{type:"url",mode:this.mode,url:e})}parseArgumentGroup(e,t){var r,n;return null==(e=this.gullet.scanArgument(e))?null:(r=this.mode,t&&this.switchMode(t),this.gullet.beginGroup(),n=this.parseExpression(!1,"EOF"),this.expect("EOF"),this.gullet.endGroup(),e={type:"ordgroup",mode:this.mode,loc:e.loc,body:n},t&&this.switchMode(r),e)}parseGroup(e,t){let r=this.fetch(),n=r.text,a;if("{"===n||"\\begingroup"===n){this.consume();var i="{"===n?"}":"\\endgroup",o=(this.gullet.beginGroup(),this.parseExpression(!1,i)),s=this.fetch();this.expect(i),this.gullet.endGroup(),a={type:"ordgroup",mode:this.mode,loc:Zt.range(r,s),body:o,semisimple:"\\begingroup"===n||void 0}}else if(null==(a=this.parseFunction(t,e)||this.parseSymbol())&&"\\"===n[0]&&!mt.hasOwnProperty(n)){if(this.settings.throwOnError)throw new ft("Undefined control sequence: "+n,r);a=this.formatUnsupportedCmd(n),this.consume()}return a}formLigatures(t){let r=t.length-1;for(let e=0;e<r;++e){var n=t[e],a=n.text;"-"===a&&"-"===t[e+1].text&&(e+1<r&&"-"===t[e+2].text?(t.splice(e,3,{type:"textord",mode:"text",loc:Zt.range(n,t[e+2]),text:"---"}),r-=2):(t.splice(e,2,{type:"textord",mode:"text",loc:Zt.range(n,t[e+1]),text:"--"}),--r)),"'"!==a&&"`"!==a||t[e+1].text!==a||(t.splice(e,2,{type:"textord",mode:"text",loc:Zt.range(n,t[e+1]),text:a+a}),--r)}}parseSymbol(){let t=this.fetch(),r=t.text;if(/^\\verb[^a-zA-Z]/.test(r)){this.consume();let e=r.slice(5),t="*"===e.charAt(0);if((e=t?e.slice(1):e).length<2||e.charAt(0)!==e.slice(-1))throw new ft("\\verb assertion failed --\n please report what input caused this bug");return{type:"verb",mode:"text",body:e=e.slice(1,-1),star:t}}dt.hasOwnProperty(r[0])&&!vt[this.mode][r[0]]&&(this.settings.strict&&"math"===this.mode&&this.settings.reportNonstrict("unicodeTextInMathMode",'Accented Unicode text character "'+r[0]+'" used in math mode',t),r=dt[r[0]]+r.slice(1));let n=it.exec(r),a;if(n&&("i"===(r=r.substring(0,n.index))?r="ı":"j"===r&&(r="ȷ")),vt[this.mode][r]){this.settings.strict&&"math"===this.mode&&0<="ÐÞþ".indexOf(r)&&this.settings.reportNonstrict("unicodeTextInMathMode",'Latin-1/Unicode text character "'+r[0]+'" used in math mode',t);var e=vt[this.mode][r].group,i=Zt.range(t),e=J.hasOwnProperty(e)?{type:"atom",mode:this.mode,family:e,loc:i,text:r}:{type:e,mode:this.mode,loc:i,text:r};a=e}else{if(!(128<=r.charCodeAt(0)))return null;this.settings.strict&&(t0(r.charCodeAt(0))?"math"===this.mode&&this.settings.reportNonstrict("unicodeTextInMathMode",'Unicode text character "'+r[0]+'" used in math mode',t):this.settings.reportNonstrict("unknownSymbol",'Unrecognized Unicode character "'+r[0]+'" ('+r.charCodeAt(0)+")",t)),a={type:"textord",mode:"text",loc:Zt.range(t),text:r}}if(this.consume(),n)for(let e=0;e<n[0].length;e++){var o=n[0][e];if(!pt[o])throw new ft("Unknown accent ' "+o+"'",t);var s=pt[o][this.mode]||pt[o].text;if(!s)throw new ft("Accent "+o+" unsupported in "+this.mode+" mode",t);a={type:"accent",mode:this.mode,loc:Zt.range(t),label:s,isStretchy:!1,isShifty:!0,base:a}}return a}}function dr(e,t){if(!("string"==typeof e||e instanceof String))throw new TypeError("KaTeX can only parse string typed expression");delete(e=new Nr(e,t)).gullet.macros.current["\\df@tag"];let r=e.parse();if(delete e.gullet.macros.current["\\current@color"],delete e.gullet.macros.current["\\color"],e.gullet.macros.get("\\df@tag")){if(!t.displayMode)throw new ft("\\tag works only in display equations");r=[{type:"tag",mode:"text",body:r,tag:e.subparse([new Kt("\\df@tag")])}]}return r}function ur(e,t,r){if(!r.throwOnError&&e instanceof ft)return(t=Pt.makeSpan(["katex-error"],[new jt(t)])).setAttribute("title",e.toString()),t.setAttribute("style","color:"+r.errorColor),t;throw e}Nr.endOfExpression=["}","\\endgroup","\\end","\\right","&"];let ut=function(e,t,r){t.textContent="",e=gt(e,r).toNode(),t.appendChild(e)},gt=("undefined"!=typeof document&&"CSS1Compat"!==document.compatMode&&("undefined"!=typeof console&&console.warn("Warning: KaTeX doesn't work in quirks mode. Make sure your website has a suitable doctype."),ut=function(){throw new ft("KaTeX doesn't work in quirks mode.")}),function(e,t){var r=new br(t);try{var n,a,i=dr(e,r),o=e,s=r,l=de(s);return"mathml"===s.output?R0(i,o,l,s.displayMode,!0):(a="html"===s.output?(n=T0(i,l),Pt.makeSpan(["katex"],[n])):(o=R0(i,o,l,s.displayMode,!1),i=T0(i,l),Pt.makeSpan(["katex"],[o,i])),ue(a,s))}catch(t){return ur(t,e,r)}});var gr={version:"0.16.23",render:ut,renderToString:function(e,t){return gt(e,t).toMarkup()},ParseError:ft,SETTINGS_SCHEMA:n,__parse:function(e,t){return dr(e,t=new br(t))},__renderToDomTree:gt,__renderToHTMLTree:function(e,t){var r=new br(t);try{var n=dr(e,r),a=r,n=T0(n,de(a));return n=Pt.makeSpan(["katex"],[n]),ue(n,a)}catch(t){return ur(t,e,r)}},__setFontMetrics:function(e,t){xt[e]=t},__defineSymbol:kt,__defineFunction:Vt,__defineMacro:Wt,__domTree:{Span:vr,Anchor:kr,SymbolNode:jt,SvgNode:Mr,PathNode:zr,LineNode:Ar}};return Qt.default}}),((e,t)=>{"object"==typeof exports&&"object"==typeof module?module.exports=t(require("katex")):"function"==typeof define&&define.amd?define(["katex"],t):"object"==typeof exports?exports.renderMathInElement=t(require("katex")):e.renderMathInElement=t(e.katex)})("undefined"!=typeof self?self:this,function(t){return r={771:function(e){e.exports=t}},a={},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.d(p={},{default:function(){return o}}),e=n(771),s=n.n(e),l=function(e,t,r){for(var n=r,a=0,i=e.length;n<t.length;){var o=t[n];if(a<=0&&t.slice(n,n+i)===e)return n;"\\"===o?n++:"{"===o?a++:"}"===o&&a--,n++}return-1},h=/^\\begin{/,m=function(t,e){for(var r,n=[],a=RegExp("("+e.map(function(e){return e.left.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")}).join("|")+")");-1!==(r=t.search(a));){0<r&&(n.push({type:"text",data:t.slice(0,r)}),t=t.slice(r));var i=e.findIndex(function(e){return t.startsWith(e.left)});if(-1===(r=l(e[i].right,t,e[i].left.length)))break;var o=t.slice(0,r+e[i].right.length),s=h.test(o)?o:t.slice(e[i].left.length,r);n.push({type:"math",data:s,rawData:o,display:e[i].display}),t=t.slice(r+e[i].right.length)}return""!==t&&n.push({type:"text",data:t}),n},c=function(e,t){var r=m(e,t.delimiters);if(1===r.length&&"text"===r[0].type)return null;for(var n=document.createDocumentFragment(),a=0;a<r.length;a++)if("text"===r[a].type)n.appendChild(document.createTextNode(r[a].data));else{var i=document.createElement("span"),o=r[a].data;t.displayMode=r[a].display;try{t.preProcess&&(o=t.preProcess(o)),s().render(o,i,t)}catch(e){if(!(e instanceof s().ParseError))throw e;t.errorCallback("KaTeX auto-render: Failed to parse `"+r[a].data+"` with ",e),n.appendChild(document.createTextNode(r[a].rawData));continue}n.appendChild(i)}return n},i=function e(t,r){for(var n=0;n<t.childNodes.length;n++){var a=t.childNodes[n];if(3===a.nodeType){for(var i=a.textContent,o=a.nextSibling,s=0;o&&o.nodeType===Node.TEXT_NODE;)i+=o.textContent,o=o.nextSibling,s++;var l=c(i,r);if(l){for(var h=0;h<s;h++)a.nextSibling.remove();n+=l.childNodes.length-1,t.replaceChild(l,a)}else n+=s}else 1===a.nodeType&&(()=>{var t=" "+a.className+" ";-1===r.ignoredTags.indexOf(a.nodeName.toLowerCase())&&r.ignoredClasses.every(function(e){return-1===t.indexOf(" "+e+" ")})&&e(a,r)})()}},o=function(e,t){if(!e)throw Error("No element provided to render");var r,n={};for(r in t)t.hasOwnProperty(r)&&(n[r]=t[r]);n.delimiters=n.delimiters||[{left:"$$",right:"$$",display:!0},{left:"$",right:"$",display:!1},{left:"\\(",right:"\\)",display:!1},{left:"\\begin{equation}",right:"\\end{equation}",display:!0},{left:"\\begin{align}",right:"\\end{align}",display:!0},{left:"\\begin{alignat}",right:"\\end{alignat}",display:!0},{left:"\\begin{gather}",right:"\\end{gather}",display:!0},{left:"\\begin{CD}",right:"\\end{CD}",display:!0},{left:"\\[",right:"\\]",display:!0}],n.ignoredTags=n.ignoredTags||["script","noscript","style","textarea","pre","code","option"],n.ignoredClasses=n.ignoredClasses||[],n.errorCallback=n.errorCallback||console.error,n.macros=n.macros||{},i(e,n)},p.default;function n(e){var t=a[e];return void 0===t&&(t=a[e]={exports:{}},r[e](t,t.exports,n)),t.exports}var r,a,e,s,l,h,m,c,i,o,p}),document.addEventListener("DOMContentLoaded",function(){renderMathInElement(document.body)}); diff --git a/static/js/mermaid.min.js b/static/js/mermaid.min.js new file mode 100644 index 0000000..e8d5125 --- /dev/null +++ b/static/js/mermaid.min.js @@ -0,0 +1,2768 @@ +var __esbuild_esm_mermaid_nm;(__esbuild_esm_mermaid_nm||={}).mermaid=(()=>{var w,k,T,C,_,S,A,N,I=Object.create,R=Object.defineProperty,M=Object.getOwnPropertyDescriptor,$=Object.getOwnPropertyNames,F=Object.getPrototypeOf,z=Object.prototype.hasOwnProperty,mt=(e,t)=>R(e,"name",{value:t,configurable:!0}),G=(t,r,n,i)=>{if(r&&"object"==typeof r||"function"==typeof r)for(let e of $(r))z.call(t,e)||e===n||R(t,e,{get:()=>r[e],enumerable:!(i=M(r,e))||i.enumerable});return t},U=(e,t,r)=>(G(e,t,"default"),r&&G(r,t,"default")),q=(e,t,r)=>(r=null!=e?I(F(e)):{},G(!t&&e&&e.__esModule?r:R(r,"default",{value:e,enumerable:!0}),e)),j=(b=(e,t)=>()=>t=e?e(e=0):t)(()=>{w=Object.freeze({left:0,top:0,width:16,height:16}),k=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),T=Object.freeze({...w,...k}),C=Object.freeze({...T,body:"",hidden:!1})}),Y=b(()=>{j(),_=Object.freeze({width:null,height:null}),S=Object.freeze({..._,...k})}),W=b(()=>{A=mt((e,t,r,n="")=>{var i,a=e.split(":");if("@"===e.slice(0,1)){if(a.length<2||3<a.length)return null;n=a.shift().slice(1)}return 3<a.length||!a.length?null:1<a.length?(e=a.pop(),i=a.pop(),i={provider:0<a.length?a[0]:n,prefix:i,name:e},t&&!N(i)?null:i):1<(i=(e=a[0]).split("-")).length?(a={provider:n,prefix:i.shift(),name:i.join("-")},t&&!N(a)?null:a):r&&""===n&&(i={provider:n,prefix:"",name:e},!t||N(i,r))?i:null},"stringToIcon"),N=mt((e,t)=>!!e&&!(!(t&&""===e.prefix||e.prefix)||!e.name),"validateIconName")});function ee(e,t){var r={};return!e.hFlip!=!t.hFlip&&(r.hFlip=!0),!e.vFlip!=!t.vFlip&&(r.vFlip=!0),(e=((e.rotate||0)+(t.rotate||0))%4)&&(r.rotate=e),r}var te=b(()=>{mt(ee,"mergeIconTransformations")});function re(e,t){var r,n=ee(e,t);for(r in C)r in k?r in e&&!(r in n)&&(n[r]=k[r]):r in t?n[r]=t[r]:r in e&&(n[r]=e[r]);return n}var ne=b(()=>{j(),te(),mt(re,"mergeIconData")});function ie(e,t){let n=e.icons,i=e.aliases||Object.create(null),a=Object.create(null);function s(e){var t,r;return n[e]?a[e]=[]:(e in a||(a[e]=null,(r=(t=i[e]&&i[e].parent)&&s(t))&&(a[e]=[t].concat(r))),a[e])}return mt(s,"resolve"),(t||Object.keys(n).concat(Object.keys(i))).forEach(s),a}var ae=b(()=>{mt(ie,"getIconsTree")});function se(e,t,r){let n=e.icons,i=e.aliases||Object.create(null),a={};function s(e){a=re(n[e]||i[e],a)}return mt(s,"parse"),s(t),r.forEach(s),re(e,a)}function oe(e,t){var r;return e.icons[t]?se(e,t,[]):(r=ie(e,[t])[t])?se(e,t,r):null}var le=b(()=>{ne(),ae(),mt(se,"internalGetIconData"),mt(oe,"getIconData")});function ce(e,t,r){if(1===t)return e;if(r=r||100,"number"==typeof e)return Math.ceil(e*t*r)/r;if("string"!=typeof e)return e;var n,i=e.split(ue);if(null===i||!i.length)return e;let a=[],s=i.shift(),o=de.test(s);for(;;){if(!o||(n=parseFloat(s),isNaN(n))?a.push(s):a.push(Math.ceil(n*t*r)/r),void 0===(s=i.shift()))return a.join("");o=!o}}var ue,de,pe=b(()=>{ue=/(-?[0-9.]*[0-9]+[0-9.]*)/g,de=/^-?[0-9.]*[0-9]+[0-9.]*$/g,mt(ce,"calculateSize")});function ge(e,t="defs"){let r="",n=e.indexOf("<"+t);for(;0<=n;){var i=e.indexOf(">",n),a=e.indexOf("</"+t);if(-1===i||-1===a)break;var s=e.indexOf(">",a);if(-1===s)break;r+=e.slice(i+1,a).trim(),e=e.slice(0,n).trim()+e.slice(s+1)}return{defs:r,content:e}}function fe(e,t){return e?"<defs>"+e+"</defs>"+t:t}function me(e,t,r){return fe((e=ge(e)).defs,t+e.content+r)}var ye=b(()=>{mt(ge,"splitSVGDefs"),mt(fe,"mergeDefsAndContent"),mt(me,"wrapSVGContent")});function ve(e,t){let r={...T,...e},n={...S,...t},s={left:r.left,top:r.top,width:r.width,height:r.height},o=r.body,i=([r,n].forEach(e=>{let t=[],r=e.hFlip,n=e.vFlip,i=e.rotate;r?n?i+=2:(t.push("translate("+(s.width+s.left).toString()+" "+(0-s.top).toString()+")"),t.push("scale(-1 1)"),s.top=s.left=0):n&&(t.push("translate("+(0-s.left).toString()+" "+(s.height+s.top).toString()+")"),t.push("scale(1 -1)"),s.top=s.left=0);let a;switch(i<0&&(i-=4*Math.floor(i/4)),i%=4){case 1:a=s.height/2+s.top,t.unshift("rotate(90 "+a.toString()+" "+a.toString()+")");break;case 2:t.unshift("rotate(180 "+(s.width/2+s.left).toString()+" "+(s.height/2+s.top).toString()+")");break;case 3:a=s.width/2+s.left,t.unshift("rotate(-90 "+a.toString()+" "+a.toString()+")")}i%2==1&&(s.left!==s.top&&(a=s.left,s.left=s.top,s.top=a),s.width!==s.height)&&(a=s.width,s.width=s.height,s.height=a),t.length&&(o=me(o,'<g transform="'+t.join(" ")+'">',"</g>"))}),n.width),a=n.height,l=s.width,c=s.height,h,u,d=(null===i?(u=null===a?"1em":"auto"===a?c:a,h=ce(u,l/c)):(h="auto"===i?l:i,u=null===a?ce(h,c/l):"auto"===a?c:a),{}),p=mt((e,t)=>{xe(t)||(d[e]=t.toString())},"setAttr");return p("width",h),p("height",u),e=[s.left,s.top,l,c],d.viewBox=e.join(" "),{attributes:d,viewBox:e,body:o}}var xe,be=b(()=>{j(),Y(),pe(),ye(),xe=mt(e=>"unset"===e||"undefined"===e||"none"===e,"isUnsetKeyword"),mt(ve,"iconToSVG")});function we(n,i=Te){for(var e,t=[];e=ke.exec(n);)t.push(e[1]);if(t.length){let r="suffix"+(16777216*Math.random()|Date.now()).toString(16);t.forEach(e=>{var t="function"==typeof i?i(e):i+(Ee++).toString(),e=e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");n=n.replace(new RegExp('([#;"])('+e+')([")]|\\.[a-z])',"g"),"$1"+t+r+"$3")}),n=n.replace(new RegExp(r,"g"),"")}return n}var ke,Te,Ee,Ce=b(()=>{ke=/\sid="(\S+)"/g,Te="IconifyId"+Date.now().toString(16)+(16777216*Math.random()|0).toString(16),Ee=0,mt(we,"replaceIDs")});function _e(e,t){let r=-1===e.indexOf("xlink:")?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(var n in t)r+=" "+n+'="'+t[n]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+r+">"+e+"</svg>"}var Se,Ae,Le,Ne,D,Ie,Re,Me,De,Oe,Pe,Be,$e,Fe,ze,Ge,Ue,qe,je,Ye,We,He,Ve,Xe,Ke,Ze,Qe,Je,et,tt,rt,nt,it,at,st,ot,lt,ct,ht,ut,dt,pt,gt,ft,vt,xt,bt,a,wt,kt,Tt,r,Et,Ct,_t,n,St,At,Lt,Nt,It,Rt,Mt,Dt,Ot,Pt,Bt,$t,Ft,zt,Gt,Ut,qt,jt,Yt,Wt,Ht,Vt,Xt,Kt,Zt,Qt,Jt,er,tr,rr,nr,ir,ar,sr,or,lr,cr,hr,ur,dr,pr,gr=b(()=>{mt(_e,"iconToHTML")}),fr=b(()=>{W(),le(),be(),Ce(),gr()}),mr=b(()=>{Se=mt((t,r,{depth:n=2,clobber:i=!1}={})=>{let a={depth:n,clobber:i};return Array.isArray(r)&&!Array.isArray(t)?(r.forEach(e=>Se(t,e,a)),t):Array.isArray(r)&&Array.isArray(t)?(r.forEach(e=>{t.includes(e)||t.push(e)}),t):void 0===t||n<=0?null!=t&&"object"==typeof t&&"object"==typeof r?Object.assign(t,r):r:(void 0!==r&&"object"==typeof t&&"object"==typeof r&&Object.keys(r).forEach(e=>{"object"!=typeof r[e]||void 0!==t[e]&&"object"!=typeof t[e]?(i||"object"!=typeof t[e]&&"object"!=typeof r[e])&&(t[e]=r[e]):(void 0===t[e]&&(t[e]=Array.isArray(r[e])?[]:{}),t[e]=Se(t[e],r[e],{depth:n-1,clobber:i}))}),t)},"assignWithDepth"),Ae=Se}),yr=(NFe=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports))((e,t)=>{function r(){var i="millisecond",u="second",d="minute",p="hour",g="day",f="week",m="month",y="year",v="date",t="Invalid Date",s=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,x=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,e={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:mt(function(e){var t=["th","st","nd","rd"],r=e%100;return"["+e+(t[(r-20)%10]||t[r]||t[0])+"]"},"ordinal")},n=mt(function(e,t,r){var n=String(e);return!n||n.length>=t?e:""+Array(t+1-n.length).join(r)+e},"m"),r={s:n,z:mt(function(e){var e=-e.utcOffset(),t=Math.abs(e),r=Math.floor(t/60),t=t%60;return(e<=0?"+":"-")+n(r,2,"0")+":"+n(t,2,"0")},"z"),m:mt(function e(t,r){var n,i,a;return t.date()<r.date()?-e(r,t):(n=12*(r.year()-t.year())+(r.month()-t.month()),a=r-(i=t.clone().add(n,m))<0,t=t.clone().add(n+(a?-1:1),m),+(-(n+(r-i)/(a?i-t:t-i))||0))},"t"),a:mt(function(e){return e<0?Math.ceil(e)||0:Math.floor(e)},"a"),p:mt(function(e){return{M:m,y:y,w:f,d:g,D:v,h:p,m:d,s:u,ms:i,Q:"quarter"}[e]||String(e||"").toLowerCase().replace(/s$/,"")},"p"),u:mt(function(e){return void 0===e},"u")},o="en",l={},a=(l[o]=e,"$isDayjsObject"),c=mt(function(e){return e instanceof k||!(!e||!e[a])},"S"),h=mt(function e(t,r,n){var i;if(!t)return o;if("string"==typeof t){var a=t.toLowerCase(),r=(l[a]&&(i=a),r&&(l[a]=r,i=a),t.split("-"));if(!i&&1<r.length)return e(r[0])}else a=t.name,l[a]=t,i=a;return!n&&i&&(o=i),i||!n&&o},"t"),b=mt(function(e,t){return c(e)?e.clone():((t="object"==typeof t?t:{}).date=e,t.args=arguments,new k(t))},"O"),w=r,k=(w.l=h,w.i=c,w.w=function(e,t){return b(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})},mt(E,"M"),(e=E.prototype).parse=function(a){this.$d=(()=>{var e=a.date,t=a.utc;if(null===e)return new Date(NaN);if(w.u(e))return new Date;if(!(e instanceof Date||"string"!=typeof e||/Z$/i.test(e))){var r,n,i=e.match(s);if(i)return r=i[2]-1||0,n=(i[7]||"0").substring(0,3),t?new Date(Date.UTC(i[1],r,i[3]||1,i[4]||0,i[5]||0,i[6]||0,n)):new Date(i[1],r,i[3]||1,i[4]||0,i[5]||0,i[6]||0,n)}return new Date(e)})(),this.init()},e.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},e.$utils=function(){return w},e.isValid=function(){return this.$d.toString()!==t},e.isSame=function(e,t){return e=b(e),this.startOf(t)<=e&&e<=this.endOf(t)},e.isAfter=function(e,t){return b(e)<this.startOf(t)},e.isBefore=function(e,t){return this.endOf(t)<b(e)},e.$g=function(e,t,r){return w.u(e)?this[t]:this.set(r,e)},e.unix=function(){return Math.floor(this.valueOf()/1e3)},e.valueOf=function(){return this.$d.getTime()},e.startOf=function(e,t){var r=this,n=!!w.u(t)||t,t=w.p(e),i=mt(function(e,t){return t=w.w(r.$u?Date.UTC(r.$y,t,e):new Date(r.$y,t,e),r),n?t:t.endOf(g)},"l"),a=mt(function(e,t){return w.w(r.toDate()[e].apply(r.toDate("s"),(n?[0,0,0,0]:[23,59,59,999]).slice(t)),r)},"$"),s=this.$W,o=this.$M,l=this.$D,c="set"+(this.$u?"UTC":"");switch(t){case y:return n?i(1,0):i(31,11);case m:return n?i(1,o):i(0,o+1);case f:var h=(s<(h=this.$locale().weekStart||0)?s+7:s)-h;return i(n?l-h:l+(6-h),o);case g:case v:return a(c+"Hours",0);case p:return a(c+"Minutes",1);case d:return a(c+"Seconds",2);case u:return a(c+"Milliseconds",3);default:return this.clone()}},e.endOf=function(e){return this.startOf(e,!1)},e.$set=function(e,t){var e=w.p(e),r="set"+(this.$u?"UTC":""),r=((n={}).day=r+"Date",n.date=r+"Date",n[m]=r+"Month",n.year=r+"FullYear",n.hour=r+"Hours",n[d]=r+"Minutes",n[u]=r+"Seconds",n[i]=r+"Milliseconds",n[e]),n=e===g?this.$D+(t-this.$W):t;return e===m||e===y?((t=this.clone().set(v,1)).$d[r](n),t.init(),this.$d=t.set(v,Math.min(this.$D,t.daysInMonth())).$d):r&&this.$d[r](n),this.init(),this},e.set=function(e,t){return this.clone().$set(e,t)},e.get=function(e){return this[w.p(e)]()},e.add=function(r,e){var n=this,e=(r=Number(r),w.p(e)),t=mt(function(e){var t=b(n);return w.w(t.date(t.date()+Math.round(e*r)),n)},"y");return e===m?this.set(m,this.$M+r):e===y?this.set(y,this.$y+r):e===g?t(1):e===f?t(7):(t={minute:6e4,hour:36e5,second:1e3}[e]||1,e=this.$d.getTime()+r*t,w.w(e,this))},e.subtract=function(e,t){return this.add(-1*e,t)},e.format=function(e){var i,r,n,a,s,o,l,c,h,u,d=this,p=this.$locale();return this.isValid()?(i=e||"YYYY-MM-DDTHH:mm:ssZ",r=w.z(this),n=this.$H,a=this.$m,s=this.$M,o=p.weekdays,l=p.months,e=p.meridiem,c=mt(function(e,t,r,n){return e&&(e[t]||e(d,i))||r[t].slice(0,n)},"h"),h=mt(function(e){return w.s(n%12||12,e,"0")},"d"),u=e||function(e,t,r){return e=e<12?"AM":"PM",r?e.toLowerCase():e},i.replace(x,function(e,t){return t||(()=>{switch(e){case"YY":return String(d.$y).slice(-2);case"YYYY":return w.s(d.$y,4,"0");case"M":return s+1;case"MM":return w.s(s+1,2,"0");case"MMM":return c(p.monthsShort,s,l,3);case"MMMM":return c(l,s);case"D":return d.$D;case"DD":return w.s(d.$D,2,"0");case"d":return String(d.$W);case"dd":return c(p.weekdaysMin,d.$W,o,2);case"ddd":return c(p.weekdaysShort,d.$W,o,3);case"dddd":return o[d.$W];case"H":return String(n);case"HH":return w.s(n,2,"0");case"h":return h(1);case"hh":return h(2);case"a":return u(n,a,!0);case"A":return u(n,a,!1);case"m":return String(a);case"mm":return w.s(a,2,"0");case"s":return String(d.$s);case"ss":return w.s(d.$s,2,"0");case"SSS":return w.s(d.$ms,3,"0");case"Z":return r}return null})()||r.replace(":","")})):p.invalidDate||t},e.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},e.diff=function(e,t,r){var n,i=this,t=w.p(t),a=b(e),s=6e4*(a.utcOffset()-this.utcOffset()),o=this-a,l=mt(function(){return w.m(i,a)},"D");switch(t){case y:n=l()/12;break;case m:n=l();break;case"quarter":n=l()/3;break;case f:n=(o-s)/6048e5;break;case g:n=(o-s)/864e5;break;case p:n=o/36e5;break;case d:n=o/6e4;break;case u:n=o/1e3;break;default:n=o}return r?n:w.a(n)},e.daysInMonth=function(){return this.endOf(m).$D},e.$locale=function(){return l[this.$L]},e.locale=function(e,t){var r;return e?(r=this.clone(),(e=h(e,t,!0))&&(r.$L=e),r):this.$L},e.clone=function(){return w.w(this.$d,this)},e.toDate=function(){return new Date(this.valueOf())},e.toJSON=function(){return this.isValid()?this.toISOString():null},e.toISOString=function(){return this.$d.toISOString()},e.toString=function(){return this.$d.toUTCString()},E),T=k.prototype;function E(e){this.$L=h(e.locale,null,!0),this.parse(e),this.$x=this.$x||e.x||{},this[a]=!0}return b.prototype=T,[["$ms",i],["$s",u],["$m",d],["$H",p],["$W",g],["$M",m],["$y",y],["$D",v]].forEach(function(t){T[t[1]]=function(e){return this.$g(e,t[0],t[1])}}),b.extend=function(e,t){return e.$i||(e(t,k,b),e.$i=!0),b},b.locale=h,b.isDayjs=c,b.unix=function(e){return b(1e3*e)},b.en=l[o],b.Ls=l,b.p={},b}"object"==typeof e&&typeof t<"u"?t.exports=r():"function"==typeof define&&define.amd?define(r):(e=typeof globalThis<"u"?globalThis:e||self).dayjs=r()}),e=b(()=>{Le=q(yr(),1),Ne={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},D={trace:mt(()=>{},"trace"),debug:mt(()=>{},"debug"),info:mt(()=>{},"info"),warn:mt(()=>{},"warn"),error:mt(()=>{},"error"),fatal:mt(()=>{},"fatal")},Ie=mt(function(e="fatal"){let t=Ne.fatal;"string"==typeof e?e.toLowerCase()in Ne&&(t=Ne[e]):"number"==typeof e&&(t=e),D.trace=()=>{},D.debug=()=>{},D.info=()=>{},D.warn=()=>{},D.error=()=>{},D.fatal=()=>{},t<=Ne.fatal&&(D.fatal=console.error?console.error.bind(console,Re("FATAL"),"color: orange"):console.log.bind(console,"",Re("FATAL"))),t<=Ne.error&&(D.error=console.error?console.error.bind(console,Re("ERROR"),"color: orange"):console.log.bind(console,"",Re("ERROR"))),t<=Ne.warn&&(D.warn=console.warn?console.warn.bind(console,Re("WARN"),"color: orange"):console.log.bind(console,"",Re("WARN"))),t<=Ne.info&&(D.info=console.info?console.info.bind(console,Re("INFO"),"color: lightblue"):console.log.bind(console,"",Re("INFO"))),t<=Ne.debug&&(D.debug=console.debug?console.debug.bind(console,Re("DEBUG"),"color: lightgreen"):console.log.bind(console,"",Re("DEBUG"))),t<=Ne.trace&&(D.trace=console.debug?console.debug.bind(console,Re("TRACE"),"color: lightgreen"):console.log.bind(console,"",Re("TRACE")))},"setLogLevel"),Re=mt(e=>`%c${(0,Le.default)().format("ss.SSS")} : ${e} : `,"format")}),vr=b(()=>{Me={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:mt(e=>255<=e?255:e<0?0:e,"r"),g:mt(e=>255<=e?255:e<0?0:e,"g"),b:mt(e=>255<=e?255:e<0?0:e,"b"),h:mt(e=>e%360,"h"),s:mt(e=>100<=e?100:e<0?0:e,"s"),l:mt(e=>100<=e?100:e<0?0:e,"l"),a:mt(e=>1<=e?1:e<0?0:e,"a")},toLinear:mt(e=>{var t=e/255;return.03928<e?Math.pow((.055+t)/1.055,2.4):t/12.92},"toLinear"),hue2rgb:mt((e,t,r)=>(r<0&&(r+=1),1<r&&--r,r<.16666666666666666?e+6*(t-e)*r:r<.5?t:r<.6666666666666666?e+(t-e)*(.6666666666666666-r)*6:e),"hue2rgb"),hsl2rgb:mt(({h:e,s:t,l:r},n)=>{if(!t)return 2.55*r;e/=360,t/=100;var i=(r/=100)<.5?r*(1+t):r+t-r*t,a=2*r-i;switch(n){case"r":return 255*Me.hue2rgb(a,i,e+.3333333333333333);case"g":return 255*Me.hue2rgb(a,i,e);case"b":return 255*Me.hue2rgb(a,i,e-.3333333333333333)}},"hsl2rgb"),rgb2hsl:mt(({r:e,g:t,b:r},n)=>{e/=255,t/=255,r/=255;var i=Math.max(e,t,r),a=Math.min(e,t,r),s=(i+a)/2;if("l"===n)return 100*s;if(i===a)return 0;var o=i-a;if("s"===n)return 100*(.5<s?o/(2-i-a):o/(i+a));switch(i){case e:return 60*((t-r)/o+(t<r?6:0));case t:return 60*((r-e)/o+2);case r:return 60*((e-t)/o+4);default:return-1}},"rgb2hsl")},De=Me}),xr=b(()=>{Oe={clamp:mt((e,t,r)=>r<t?Math.min(t,Math.max(r,e)):Math.min(r,Math.max(t,e)),"clamp"),round:mt(e=>Math.round(1e10*e)/1e10,"round")},Pe=Oe}),br=b(()=>{Be={dec2hex:mt(e=>1<(e=Math.round(e).toString(16)).length?e:"0"+e,"dec2hex")},$e=Be}),wr=b(()=>{vr(),xr(),br(),Fe={channel:De,lang:Pe,unit:$e}}),kr=b(()=>{wr(),ze={};for(let e=0;e<=255;e++)ze[e]=Fe.unit.dec2hex(e);Ge={ALL:0,RGB:1,HSL:2}}),Tr=b(()=>{kr(),Ue=class{static{mt(this,"Type")}constructor(){this.type=Ge.ALL}get(){return this.type}set(e){if(this.type&&this.type!==e)throw new Error("Cannot change both RGB and HSL channels at the same time");this.type=e}reset(){this.type=Ge.ALL}is(e){return this.type===e}},qe=Ue}),Er=b(()=>{wr(),Tr(),kr(),je=class{static{mt(this,"Channels")}constructor(e,t){this.color=t,this.changed=!1,this.data=e,this.type=new qe}set(e,t){return this.color=t,this.changed=!1,this.data=e,this.type.type=Ge.ALL,this}_ensureHSL(){var e=this.data,{h:t,s:r,l:n}=e;void 0===t&&(e.h=Fe.channel.rgb2hsl(e,"h")),void 0===r&&(e.s=Fe.channel.rgb2hsl(e,"s")),void 0===n&&(e.l=Fe.channel.rgb2hsl(e,"l"))}_ensureRGB(){var e=this.data,{r:t,g:r,b:n}=e;void 0===t&&(e.r=Fe.channel.hsl2rgb(e,"r")),void 0===r&&(e.g=Fe.channel.hsl2rgb(e,"g")),void 0===n&&(e.b=Fe.channel.hsl2rgb(e,"b"))}get r(){var e=this.data,t=e.r;return this.type.is(Ge.HSL)||void 0===t?(this._ensureHSL(),Fe.channel.hsl2rgb(e,"r")):t}get g(){var e=this.data,t=e.g;return this.type.is(Ge.HSL)||void 0===t?(this._ensureHSL(),Fe.channel.hsl2rgb(e,"g")):t}get b(){var e=this.data,t=e.b;return this.type.is(Ge.HSL)||void 0===t?(this._ensureHSL(),Fe.channel.hsl2rgb(e,"b")):t}get h(){var e=this.data,t=e.h;return this.type.is(Ge.RGB)||void 0===t?(this._ensureRGB(),Fe.channel.rgb2hsl(e,"h")):t}get s(){var e=this.data,t=e.s;return this.type.is(Ge.RGB)||void 0===t?(this._ensureRGB(),Fe.channel.rgb2hsl(e,"s")):t}get l(){var e=this.data,t=e.l;return this.type.is(Ge.RGB)||void 0===t?(this._ensureRGB(),Fe.channel.rgb2hsl(e,"l")):t}get a(){return this.data.a}set r(e){this.type.set(Ge.RGB),this.changed=!0,this.data.r=e}set g(e){this.type.set(Ge.RGB),this.changed=!0,this.data.g=e}set b(e){this.type.set(Ge.RGB),this.changed=!0,this.data.b=e}set h(e){this.type.set(Ge.HSL),this.changed=!0,this.data.h=e}set s(e){this.type.set(Ge.HSL),this.changed=!0,this.data.s=e}set l(e){this.type.set(Ge.HSL),this.changed=!0,this.data.l=e}set a(e){this.changed=!0,this.data.a=e}},Ye=je}),Cr=b(()=>{Er(),We=new Ye({r:0,g:0,b:0,a:0},"transparent"),He=We}),_r=b(()=>{Cr(),kr(),Ve={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:mt(e=>{if(35===e.charCodeAt(0)){var t,r,n,i,a,s=e.match(Ve.re);if(s)return s=s[1],t=parseInt(s,16),s=s.length,He.set({r:(t>>(n=(r=4<s)?8:4)*(3+(i=(s=s%4==0)?0:-1))&(a=r?255:15))*(r=r?1:17),g:(t>>n*(2+i)&a)*r,b:(t>>n*(1+i)&a)*r,a:s?(t&a)*r/255:1},e)}},"parse"),stringify:mt(e=>{var{r:e,g:t,b:r,a:n}=e;return n<1?"#"+ze[Math.round(e)]+ze[Math.round(t)]+ze[Math.round(r)]+ze[Math.round(255*n)]:"#"+ze[Math.round(e)]+ze[Math.round(t)]+ze[Math.round(r)]},"stringify")},Xe=Ve}),Sr=b(()=>{wr(),Cr(),Ke={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:mt(e=>{if(r=e.match(Ke.hueRe)){var[,t,r]=r;switch(r){case"grad":return Fe.channel.clamp.h(.9*parseFloat(t));case"rad":return Fe.channel.clamp.h(180*parseFloat(t)/Math.PI);case"turn":return Fe.channel.clamp.h(360*parseFloat(t))}}return Fe.channel.clamp.h(parseFloat(e))},"_hue2deg"),parse:mt(e=>{var t,r,n,i,a=e.charCodeAt(0);if((104===a||72===a)&&(a=e.match(Ke.re)))return[,a,t,r,n,i]=a,He.set({h:Ke._hue2deg(a),s:Fe.channel.clamp.s(parseFloat(t)),l:Fe.channel.clamp.l(parseFloat(r)),a:n?Fe.channel.clamp.a(i?parseFloat(n)/100:parseFloat(n)):1},e)},"parse"),stringify:mt(e=>{var{h:e,s:t,l:r,a:n}=e;return n<1?`hsla(${Fe.lang.round(e)}, ${Fe.lang.round(t)}%, ${Fe.lang.round(r)}%, ${n})`:`hsl(${Fe.lang.round(e)}, ${Fe.lang.round(t)}%, ${Fe.lang.round(r)}%)`},"stringify")},Ze=Ke}),Ar=b(()=>{_r(),Qe={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:mt(e=>{if(e=e.toLowerCase(),e=Qe.colors[e])return Xe.parse(e)},"parse"),stringify:mt(e=>{var t,r=Xe.stringify(e);for(t in Qe.colors)if(Qe.colors[t]===r)return t},"stringify")},Je=Qe}),Lr=b(()=>{wr(),Cr(),et={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:mt(e=>{var t,r,n,i,a,s,o,l=e.charCodeAt(0);if((114===l||82===l)&&(l=e.match(et.re)))return[,l,t,r,n,i,a,s,o]=l,He.set({r:Fe.channel.clamp.r(t?2.55*parseFloat(l):parseFloat(l)),g:Fe.channel.clamp.g(n?2.55*parseFloat(r):parseFloat(r)),b:Fe.channel.clamp.b(a?2.55*parseFloat(i):parseFloat(i)),a:s?Fe.channel.clamp.a(o?parseFloat(s)/100:parseFloat(s)):1},e)},"parse"),stringify:mt(e=>{var{r:e,g:t,b:r,a:n}=e;return n<1?`rgba(${Fe.lang.round(e)}, ${Fe.lang.round(t)}, ${Fe.lang.round(r)}, ${Fe.lang.round(n)})`:`rgb(${Fe.lang.round(e)}, ${Fe.lang.round(t)}, ${Fe.lang.round(r)})`},"stringify")},tt=et}),Nr=b(()=>{_r(),Sr(),Ar(),Lr(),kr(),rt={format:{keyword:Je,hex:Xe,rgb:tt,rgba:tt,hsl:Ze,hsla:Ze},parse:mt(e=>{if("string"!=typeof e)return e;var t=Xe.parse(e)||tt.parse(e)||Ze.parse(e)||Je.parse(e);if(t)return t;throw new Error(`Unsupported color format: "${e}"`)},"parse"),stringify:mt(e=>!e.changed&&e.color?e.color:(e.type.is(Ge.HSL)||void 0===e.data.r?Ze:e.a<1||!Number.isInteger(e.r)||!Number.isInteger(e.g)||!Number.isInteger(e.b)?tt:Xe).stringify(e),"stringify")},nt=rt}),Ir=b(()=>{wr(),Nr(),it=mt((e,t)=>{var r,n=nt.parse(e);for(r in t)n[r]=Fe.channel.clamp[r](t[r]);return nt.stringify(n)},"change"),at=it}),Rr=b(()=>{wr(),Cr(),Nr(),Ir(),st=mt((e,t,r=0,n=1)=>"number"!=typeof e?at(e,{a:t}):(e=He.set({r:Fe.channel.clamp.r(e),g:Fe.channel.clamp.g(t),b:Fe.channel.clamp.b(r),a:Fe.channel.clamp.a(n)}),nt.stringify(e)),"rgba"),ot=st}),Mr=b(()=>{wr(),Nr(),lt=mt((e,t)=>Fe.lang.round(nt.parse(e)[t]),"channel"),ct=lt}),Dr=b(()=>{wr(),Nr(),ht=mt(e=>{var{r:e,g:t,b:r}=nt.parse(e),e=.2126*Fe.channel.toLinear(e)+.7152*Fe.channel.toLinear(t)+.0722*Fe.channel.toLinear(r);return Fe.lang.round(e)},"luminance"),ut=ht}),Or=b(()=>{Dr(),dt=mt(e=>.5<=ut(e),"isLight"),pt=dt}),Pr=b(()=>{Or(),gt=mt(e=>!pt(e),"isDark"),ft=gt}),Br=b(()=>{wr(),Nr(),vt=mt((e,t,r)=>{var n=(e=nt.parse(e))[t];return n!==(r=Fe.channel.clamp[t](n+r))&&(e[t]=r),nt.stringify(e)},"adjustChannel"),xt=vt}),$r=b(()=>{Br(),bt=mt((e,t)=>xt(e,"l",t),"lighten"),a=bt}),Fr=b(()=>{Br(),wt=mt((e,t)=>xt(e,"l",-t),"darken"),kt=wt}),zr=b(()=>{Nr(),Ir(),Tt=mt((e,t)=>{var r,n=nt.parse(e),i={};for(r in t)t[r]&&(i[r]=n[r]+t[r]);return at(e,i)},"adjust"),r=Tt}),Gr=b(()=>{Nr(),Rr(),Et=mt((e,t,r=50)=>{var{r:e,g:n,b:i,a}=nt.parse(e),{r:t,g:s,b:o,a:l}=nt.parse(t),c=2*(r/=100)-1,h=a-l;return ot(e*(c=(1+(c*h==-1?c:(c+h)/(1+c*h)))/2)+t*(h=1-c),n*c+s*h,i*c+o*h,a*r+l*(1-r))},"mix"),Ct=Et}),Ur=b(()=>{Nr(),Gr(),_t=mt((e,t=100)=>{var r=nt.parse(e);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,Ct(r,e,t)},"invert"),n=_t}),qr=b(()=>{Rr(),Mr(),Pr(),$r(),Fr(),zr(),Ur()}),jr=b(()=>{qr()}),Yr=b(()=>{St="#ffffff",At="#f2f2f2"}),Wr=b(()=>{jr(),Lt=mt((e,t)=>r(e,t?{s:-40,l:10}:{s:-40,l:-10}),"mkBorder")}),Hr=b(()=>{jr(),Yr(),Wr(),Nt=class{static{mt(this,"Theme")}constructor(){this.background="#f4f4f4",this.primaryColor="#fff4dd",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px"}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||r(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||r(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Lt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Lt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Lt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Lt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||n(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||n(this.tertiaryColor),this.lineColor=this.lineColor||n(this.background),this.arrowheadColor=this.arrowheadColor||n(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?kt(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||kt(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||n(this.lineColor),this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||a(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.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.darkMode?(this.rowOdd=this.rowOdd||kt(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||kt(this.mainBkg,10)):(this.rowOdd=this.rowOdd||a(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||a(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||r(this.primaryColor,{h:30}),this.cScale4=this.cScale4||r(this.primaryColor,{h:60}),this.cScale5=this.cScale5||r(this.primaryColor,{h:90}),this.cScale6=this.cScale6||r(this.primaryColor,{h:120}),this.cScale7=this.cScale7||r(this.primaryColor,{h:150}),this.cScale8=this.cScale8||r(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||r(this.primaryColor,{h:270}),this.cScale10=this.cScale10||r(this.primaryColor,{h:300}),this.cScale11=this.cScale11||r(this.primaryColor,{h:330}),this.darkMode)for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScale"+e]=kt(this["cScale"+e],75);else for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScale"+e]=kt(this["cScale"+e],25);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleInv"+e]=this["cScaleInv"+e]||n(this["cScale"+e]);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this.darkMode?this["cScalePeer"+e]=this["cScalePeer"+e]||a(this["cScale"+e],10):this["cScalePeer"+e]=this["cScalePeer"+e]||kt(this["cScale"+e],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleLabel"+e]=this["cScaleLabel"+e]||this.scaleLabelColor;var t=this.darkMode?-4:-1;for(let e=0;e<5;e++)this["surface"+e]=this["surface"+e]||r(this.mainBkg,{h:180,s:-15,l:t*(5+3*e)}),this["surfacePeer"+e]=this["surfacePeer"+e]||r(this.mainBkg,{h:180,s:-15,l:t*(8+3*e)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||r(this.primaryColor,{h:64}),this.fillType3=this.fillType3||r(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||r(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||r(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||r(this.primaryColor,{h:128}),this.fillType7=this.fillType7||r(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||r(this.primaryColor,{l:-10}),this.pie5=this.pie5||r(this.secondaryColor,{l:-10}),this.pie6=this.pie6||r(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||r(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||r(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||r(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||r(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||r(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||r(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.archEdgeColor=this.archEdgeColor||"#777",this.archEdgeArrowColor=this.archEdgeArrowColor||"#777",this.archEdgeWidth=this.archEdgeWidth||"3",this.archGroupBorderColor=this.archGroupBorderColor||"#000",this.archGroupBorderWidth=this.archGroupBorderWidth||"2px",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||r(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||r(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||r(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||r(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||r(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||r(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=(this.quadrantPointFill||ft(this.quadrant1Fill)?a:kt)(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?kt(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||r(this.primaryColor,{h:-30}),this.git4=this.git4||r(this.primaryColor,{h:-60}),this.git5=this.git5||r(this.primaryColor,{h:-90}),this.git6=this.git6||r(this.primaryColor,{h:60}),this.git7=this.git7||r(this.primaryColor,{h:120}),this.darkMode?(this.git0=a(this.git0,25),this.git1=a(this.git1,25),this.git2=a(this.git2,25),this.git3=a(this.git3,25),this.git4=a(this.git4,25),this.git5=a(this.git5,25),this.git6=a(this.git6,25),this.git7=a(this.git7,25)):(this.git0=kt(this.git0,25),this.git1=kt(this.git1,25),this.git2=kt(this.git2,25),this.git3=kt(this.git3,25),this.git4=kt(this.git4,25),this.git5=kt(this.git5,25),this.git6=kt(this.git6,25),this.git7=kt(this.git7,25)),this.gitInv0=this.gitInv0||n(this.git0),this.gitInv1=this.gitInv1||n(this.git1),this.gitInv2=this.gitInv2||n(this.git2),this.gitInv3=this.gitInv3||n(this.git3),this.gitInv4=this.gitInv4||n(this.git4),this.gitInv5=this.gitInv5||n(this.git5),this.gitInv6=this.gitInv6||n(this.git6),this.gitInv7=this.gitInv7||n(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||St,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||At}calculate(t){var e;"object"!=typeof t?this.updateColors():((e=Object.keys(t)).forEach(e=>{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=t[e]}))}},It=mt(e=>{var t=new Nt;return t.calculate(e),t},"getThemeVariables")}),Vr=b(()=>{jr(),Wr(),Rt=class{static{mt(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=a(this.primaryColor,16),this.tertiaryColor=r(this.primaryColor,{h:-160}),this.primaryBorderColor=n(this.background),this.secondaryBorderColor=Lt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Lt(this.tertiaryColor,this.darkMode),this.primaryTextColor=n(this.primaryColor),this.secondaryTextColor=n(this.secondaryColor),this.tertiaryTextColor=n(this.tertiaryColor),this.lineColor=n(this.background),this.textColor=n(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=a(n("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=ot(255,255,255,.25),this.arrowheadColor="calculated",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#F9FFFE",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="calculated",this.activationBkgColor="calculated",this.sequenceNumberColor="black",this.sectionBkgColor=kt("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=kt(this.sectionBkgColor,10),this.taskBorderColor=ot(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=ot(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||a(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||kt(this.mainBkg,10),this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd"}updateColors(){this.secondBkg=a(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=a(this.labelBackground,25),this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.actorTextColor=this.mainContrastColor,this.actorLineColor=this.actorBorder,this.signalColor=this.mainContrastColor,this.signalTextColor=this.mainContrastColor,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.mainContrastColor,this.loopTextColor=this.mainContrastColor,this.noteBorderColor=this.secondaryBorderColor,this.noteBkgColor=this.secondBkg,this.noteTextColor=this.secondaryTextColor,this.activationBorderColor=this.border1,this.activationBkgColor=this.secondBkg,this.altSectionBkgColor=this.background,this.taskBkgColor=a(this.mainBkg,23),this.taskTextColor=this.darkTextColor,this.taskTextLightColor=this.mainContrastColor,this.taskTextOutsideColor=this.taskTextLightColor,this.gridColor=this.mainContrastColor,this.doneTaskBkgColor=this.mainContrastColor,this.taskTextDarkColor=this.darkTextColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#555",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#f4f4f4",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=r(this.primaryColor,{h:64}),this.fillType3=r(this.secondaryColor,{h:64}),this.fillType4=r(this.primaryColor,{h:-64}),this.fillType5=r(this.secondaryColor,{h:-64}),this.fillType6=r(this.primaryColor,{h:128}),this.fillType7=r(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||r(this.primaryColor,{h:30}),this.cScale4=this.cScale4||r(this.primaryColor,{h:60}),this.cScale5=this.cScale5||r(this.primaryColor,{h:90}),this.cScale6=this.cScale6||r(this.primaryColor,{h:120}),this.cScale7=this.cScale7||r(this.primaryColor,{h:150}),this.cScale8=this.cScale8||r(this.primaryColor,{h:210}),this.cScale9=this.cScale9||r(this.primaryColor,{h:270}),this.cScale10=this.cScale10||r(this.primaryColor,{h:300}),this.cScale11=this.cScale11||r(this.primaryColor,{h:330});for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleInv"+e]=this["cScaleInv"+e]||n(this["cScale"+e]);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScalePeer"+e]=this["cScalePeer"+e]||a(this["cScale"+e],10);for(let e=0;e<5;e++)this["surface"+e]=this["surface"+e]||r(this.mainBkg,{h:30,s:-30,l:-(4*e-10)}),this["surfacePeer"+e]=this["surfacePeer"+e]||r(this.mainBkg,{h:30,s:-30,l:-(4*e-7)});this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleLabel"+e]=this["cScaleLabel"+e]||this.scaleLabelColor;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["pie"+e]=this["cScale"+e];this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||r(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||r(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||r(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||r(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||r(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||r(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=(this.quadrantPointFill||ft(this.quadrant1Fill)?a:kt)(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#3498db,#2ecc71,#e74c3c,#f1c40f,#bdc3c7,#ffffff,#34495e,#9b59b6,#1abc9c,#e67e22"},this.packet={startByteColor:this.primaryTextColor,endByteColor:this.primaryTextColor,labelColor:this.primaryTextColor,titleColor:this.primaryTextColor,blockStrokeColor:this.primaryTextColor,blockFillColor:this.background},this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.classText=this.primaryTextColor,this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?kt(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=a(this.secondaryColor,20),this.git1=a(this.pie2||this.secondaryColor,20),this.git2=a(this.pie3||this.tertiaryColor,20),this.git3=a(this.pie4||r(this.primaryColor,{h:-30}),20),this.git4=a(this.pie5||r(this.primaryColor,{h:-60}),20),this.git5=a(this.pie6||r(this.primaryColor,{h:-90}),10),this.git6=a(this.pie7||r(this.primaryColor,{h:60}),10),this.git7=a(this.pie8||r(this.primaryColor,{h:120}),20),this.gitInv0=this.gitInv0||n(this.git0),this.gitInv1=this.gitInv1||n(this.git1),this.gitInv2=this.gitInv2||n(this.git2),this.gitInv3=this.gitInv3||n(this.git3),this.gitInv4=this.gitInv4||n(this.git4),this.gitInv5=this.gitInv5||n(this.git5),this.gitInv6=this.gitInv6||n(this.git6),this.gitInv7=this.gitInv7||n(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||n(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||n(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||a(this.background,12),this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||a(this.background,2),this.nodeBorder=this.nodeBorder||"#999"}calculate(t){var e;"object"!=typeof t?this.updateColors():((e=Object.keys(t)).forEach(e=>{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=t[e]}))}},Mt=mt(e=>{var t=new Rt;return t.calculate(e),t},"getThemeVariables")}),Xr=b(()=>{jr(),Wr(),Yr(),Dt=class{static{mt(this,"Theme")}constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=r(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=r(this.primaryColor,{h:-160}),this.primaryBorderColor=Lt(this.primaryColor,this.darkMode),this.secondaryBorderColor=Lt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Lt(this.tertiaryColor,this.darkMode),this.primaryTextColor=n(this.primaryColor),this.secondaryTextColor=n(this.secondaryColor),this.tertiaryTextColor=n(this.tertiaryColor),this.lineColor=n(this.background),this.textColor=n(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.border2="#aaaa33",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="rgba(232,232,232, 0.8)",this.textColor="#333",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="calculated",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="calculated",this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor="calculated",this.taskTextOutsideColor=this.taskTextDarkColor,this.taskTextClickableColor="calculated",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBorderColor="calculated",this.critBkgColor="calculated",this.todayLineColor="calculated",this.vertLineColor="calculated",this.sectionBkgColor=ot(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.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd="calculated",this.rowEven="calculated",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.updateColors()}updateColors(){this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||r(this.primaryColor,{h:30}),this.cScale4=this.cScale4||r(this.primaryColor,{h:60}),this.cScale5=this.cScale5||r(this.primaryColor,{h:90}),this.cScale6=this.cScale6||r(this.primaryColor,{h:120}),this.cScale7=this.cScale7||r(this.primaryColor,{h:150}),this.cScale8=this.cScale8||r(this.primaryColor,{h:210}),this.cScale9=this.cScale9||r(this.primaryColor,{h:270}),this.cScale10=this.cScale10||r(this.primaryColor,{h:300}),this.cScale11=this.cScale11||r(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||kt(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||kt(this.tertiaryColor,40);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScale"+e]=kt(this["cScale"+e],10),this["cScalePeer"+e]=this["cScalePeer"+e]||kt(this["cScale"+e],25);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleInv"+e]=this["cScaleInv"+e]||r(this["cScale"+e],{h:180});for(let e=0;e<5;e++)this["surface"+e]=this["surface"+e]||r(this.mainBkg,{h:30,l:-(5+5*e)}),this["surfacePeer"+e]=this["surfacePeer"+e]||r(this.mainBkg,{h:30,l:-(7+5*e)});if(this.scaleLabelColor="calculated"!==this.scaleLabelColor&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor,"calculated"!==this.labelTextColor){this.cScaleLabel0=this.cScaleLabel0||n(this.labelTextColor),this.cScaleLabel3=this.cScaleLabel3||n(this.labelTextColor);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleLabel"+e]=this["cScaleLabel"+e]||this.labelTextColor}this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.textColor,this.edgeLabelBackground=this.labelBackground,this.actorBorder=a(this.border1,23),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.signalColor=this.textColor,this.signalTextColor=this.textColor,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.rowOdd=this.rowOdd||a(this.primaryColor,75)||"#ffffff",this.rowEven=this.rowEven||a(this.primaryColor,1),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.specialStateColor=this.lineColor,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=r(this.primaryColor,{h:64}),this.fillType3=r(this.secondaryColor,{h:64}),this.fillType4=r(this.primaryColor,{h:-64}),this.fillType5=r(this.secondaryColor,{h:-64}),this.fillType6=r(this.primaryColor,{h:128}),this.fillType7=r(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||r(this.tertiaryColor,{l:-40}),this.pie4=this.pie4||r(this.primaryColor,{l:-10}),this.pie5=this.pie5||r(this.secondaryColor,{l:-30}),this.pie6=this.pie6||r(this.tertiaryColor,{l:-20}),this.pie7=this.pie7||r(this.primaryColor,{h:60,l:-20}),this.pie8=this.pie8||r(this.primaryColor,{h:-60,l:-40}),this.pie9=this.pie9||r(this.primaryColor,{h:120,l:-40}),this.pie10=this.pie10||r(this.primaryColor,{h:60,l:-40}),this.pie11=this.pie11||r(this.primaryColor,{h:-90,l:-40}),this.pie12=this.pie12||r(this.primaryColor,{h:120,l:-30}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||r(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||r(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||r(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||r(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||r(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||r(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=(this.quadrantPointFill||ft(this.quadrant1Fill)?a:kt)(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#ECECFF,#8493A6,#FFC3A0,#DCDDE1,#B8E994,#D1A36F,#C3CDE6,#FFB6C1,#496078,#F8F3E3"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.labelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||r(this.primaryColor,{h:-30}),this.git4=this.git4||r(this.primaryColor,{h:-60}),this.git5=this.git5||r(this.primaryColor,{h:-90}),this.git6=this.git6||r(this.primaryColor,{h:60}),this.git7=this.git7||r(this.primaryColor,{h:120}),this.darkMode?(this.git0=a(this.git0,25),this.git1=a(this.git1,25),this.git2=a(this.git2,25),this.git3=a(this.git3,25),this.git4=a(this.git4,25),this.git5=a(this.git5,25),this.git6=a(this.git6,25),this.git7=a(this.git7,25)):(this.git0=kt(this.git0,25),this.git1=kt(this.git1,25),this.git2=kt(this.git2,25),this.git3=kt(this.git3,25),this.git4=kt(this.git4,25),this.git5=kt(this.git5,25),this.git6=kt(this.git6,25),this.git7=kt(this.git7,25)),this.gitInv0=this.gitInv0||kt(n(this.git0),25),this.gitInv1=this.gitInv1||n(this.git1),this.gitInv2=this.gitInv2||n(this.git2),this.gitInv3=this.gitInv3||n(this.git3),this.gitInv4=this.gitInv4||n(this.git4),this.gitInv5=this.gitInv5||n(this.git5),this.gitInv6=this.gitInv6||n(this.git6),this.gitInv7=this.gitInv7||n(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||n(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||n(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||St,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||At}calculate(t){var e;Object.keys(this).forEach(e=>{"calculated"===this[e]&&(this[e]=void 0)}),"object"!=typeof t?this.updateColors():((e=Object.keys(t)).forEach(e=>{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=t[e]}))}},Ot=mt(e=>{var t=new Dt;return t.calculate(e),t},"getThemeVariables")}),Kr=b(()=>{jr(),Yr(),Wr(),Pt=class{static{mt(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=a("#cde498",10),this.primaryBorderColor=Lt(this.primaryColor,this.darkMode),this.secondaryBorderColor=Lt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Lt(this.tertiaryColor,this.darkMode),this.primaryTextColor=n(this.primaryColor),this.secondaryTextColor=n(this.secondaryColor),this.tertiaryTextColor=n(this.primaryColor),this.lineColor=n(this.background),this.textColor=n(this.background),this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#333",this.edgeLabelBackground="#e8e8e8",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="#333",this.signalTextColor="#333",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="#326932",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="#6eaa49",this.altSectionBkgColor="white",this.sectionBkgColor2="#6eaa49",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="#487e3a",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.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.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){this.actorBorder=kt(this.mainBkg,20),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||r(this.primaryColor,{h:30}),this.cScale4=this.cScale4||r(this.primaryColor,{h:60}),this.cScale5=this.cScale5||r(this.primaryColor,{h:90}),this.cScale6=this.cScale6||r(this.primaryColor,{h:120}),this.cScale7=this.cScale7||r(this.primaryColor,{h:150}),this.cScale8=this.cScale8||r(this.primaryColor,{h:210}),this.cScale9=this.cScale9||r(this.primaryColor,{h:270}),this.cScale10=this.cScale10||r(this.primaryColor,{h:300}),this.cScale11=this.cScale11||r(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||kt(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||kt(this.tertiaryColor,40);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScale"+e]=kt(this["cScale"+e],10),this["cScalePeer"+e]=this["cScalePeer"+e]||kt(this["cScale"+e],25);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleInv"+e]=this["cScaleInv"+e]||r(this["cScale"+e],{h:180});this.scaleLabelColor="calculated"!==this.scaleLabelColor&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleLabel"+e]=this["cScaleLabel"+e]||this.scaleLabelColor;for(let e=0;e<5;e++)this["surface"+e]=this["surface"+e]||r(this.mainBkg,{h:30,s:-30,l:-(5+5*e)}),this["surfacePeer"+e]=this["surfacePeer"+e]||r(this.mainBkg,{h:30,s:-30,l:-(8+5*e)});this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.taskBorderColor=this.border1,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=this.mainBkg,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.rowOdd=this.rowOdd||a(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||a(this.mainBkg,20),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor=this.lineColor,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=r(this.primaryColor,{h:64}),this.fillType3=r(this.secondaryColor,{h:64}),this.fillType4=r(this.primaryColor,{h:-64}),this.fillType5=r(this.secondaryColor,{h:-64}),this.fillType6=r(this.primaryColor,{h:128}),this.fillType7=r(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||r(this.primaryColor,{l:-30}),this.pie5=this.pie5||r(this.secondaryColor,{l:-30}),this.pie6=this.pie6||r(this.tertiaryColor,{h:40,l:-40}),this.pie7=this.pie7||r(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||r(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||r(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||r(this.primaryColor,{h:60,l:-50}),this.pie11=this.pie11||r(this.primaryColor,{h:-60,l:-50}),this.pie12=this.pie12||r(this.primaryColor,{h:120,l:-50}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||r(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||r(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||r(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||r(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||r(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||r(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=(this.quadrantPointFill||ft(this.quadrant1Fill)?a:kt)(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.packet={startByteColor:this.primaryTextColor,endByteColor:this.primaryTextColor,labelColor:this.primaryTextColor,titleColor:this.primaryTextColor,blockStrokeColor:this.primaryTextColor,blockFillColor:this.mainBkg},this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#CDE498,#FF6B6B,#A0D2DB,#D7BDE2,#F0F0F0,#FFC3A0,#7FD8BE,#FF9A8B,#FAF3E0,#FFF176"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||r(this.primaryColor,{h:-30}),this.git4=this.git4||r(this.primaryColor,{h:-60}),this.git5=this.git5||r(this.primaryColor,{h:-90}),this.git6=this.git6||r(this.primaryColor,{h:60}),this.git7=this.git7||r(this.primaryColor,{h:120}),this.darkMode?(this.git0=a(this.git0,25),this.git1=a(this.git1,25),this.git2=a(this.git2,25),this.git3=a(this.git3,25),this.git4=a(this.git4,25),this.git5=a(this.git5,25),this.git6=a(this.git6,25),this.git7=a(this.git7,25)):(this.git0=kt(this.git0,25),this.git1=kt(this.git1,25),this.git2=kt(this.git2,25),this.git3=kt(this.git3,25),this.git4=kt(this.git4,25),this.git5=kt(this.git5,25),this.git6=kt(this.git6,25),this.git7=kt(this.git7,25)),this.gitInv0=this.gitInv0||n(this.git0),this.gitInv1=this.gitInv1||n(this.git1),this.gitInv2=this.gitInv2||n(this.git2),this.gitInv3=this.gitInv3||n(this.git3),this.gitInv4=this.gitInv4||n(this.git4),this.gitInv5=this.gitInv5||n(this.git5),this.gitInv6=this.gitInv6||n(this.git6),this.gitInv7=this.gitInv7||n(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||n(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||n(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||St,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||At}calculate(t){var e;"object"!=typeof t?this.updateColors():((e=Object.keys(t)).forEach(e=>{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=t[e]}))}},Bt=mt(e=>{var t=new Pt;return t.calculate(e),t},"getThemeVariables")}),Zr=b(()=>{jr(),Wr(),Yr(),$t=class{static{mt(this,"Theme")}constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=a(this.contrast,55),this.background="#ffffff",this.tertiaryColor=r(this.primaryColor,{h:-160}),this.primaryBorderColor=Lt(this.primaryColor,this.darkMode),this.secondaryBorderColor=Lt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Lt(this.tertiaryColor,this.darkMode),this.primaryTextColor=n(this.primaryColor),this.secondaryTextColor=n(this.secondaryColor),this.tertiaryTextColor=n(this.tertiaryColor),this.lineColor=n(this.background),this.textColor=n(this.background),this.mainBkg="#eee",this.secondBkg="calculated",this.lineColor="#666",this.border1="#999",this.border2="calculated",this.note="#ffa",this.text="#333",this.critical="#d42",this.done="#bbb",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="white",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor=this.actorBorder,this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="calculated",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="white",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBkgColor="calculated",this.critBorderColor="calculated",this.todayLineColor="calculated",this.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.rowOdd=this.rowOdd||a(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||"#f4f4f4",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){this.secondBkg=a(this.contrast,55),this.border2=this.contrast,this.actorBorder=a(this.border1,23),this.actorBkg=this.mainBkg,this.actorTextColor=this.text,this.actorLineColor=this.actorBorder,this.signalColor=this.text,this.signalTextColor=this.text,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.text,this.loopTextColor=this.text,this.noteBorderColor="#999",this.noteBkgColor="#666",this.noteTextColor="#fff",this.cScale0=this.cScale0||"#555",this.cScale1=this.cScale1||"#F4F4F4",this.cScale2=this.cScale2||"#555",this.cScale3=this.cScale3||"#BBB",this.cScale4=this.cScale4||"#777",this.cScale5=this.cScale5||"#999",this.cScale6=this.cScale6||"#DDD",this.cScale7=this.cScale7||"#FFF",this.cScale8=this.cScale8||"#DDD",this.cScale9=this.cScale9||"#BBB",this.cScale10=this.cScale10||"#999",this.cScale11=this.cScale11||"#777";for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleInv"+e]=this["cScaleInv"+e]||n(this["cScale"+e]);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this.darkMode?this["cScalePeer"+e]=this["cScalePeer"+e]||a(this["cScale"+e],10):this["cScalePeer"+e]=this["cScalePeer"+e]||kt(this["cScale"+e],10);this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor),this.cScaleLabel0=this.cScaleLabel0||this.cScale1,this.cScaleLabel2=this.cScaleLabel2||this.cScale1;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleLabel"+e]=this["cScaleLabel"+e]||this.scaleLabelColor;for(let e=0;e<5;e++)this["surface"+e]=this["surface"+e]||r(this.mainBkg,{l:-(5+5*e)}),this["surfacePeer"+e]=this["surfacePeer"+e]||r(this.mainBkg,{l:-(8+5*e)});this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.text,this.sectionBkgColor=a(this.contrast,30),this.sectionBkgColor2=a(this.contrast,30),this.taskBorderColor=kt(this.contrast,10),this.taskBkgColor=this.contrast,this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor=this.text,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=this.mainBkg,this.gridColor=a(this.border1,30),this.doneTaskBkgColor=this.done,this.doneTaskBorderColor=this.lineColor,this.critBkgColor=this.critical,this.critBorderColor=kt(this.critBkgColor,10),this.todayLineColor=this.critBkgColor,this.vertLineColor=this.critBkgColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.transitionColor=this.transitionColor||"#000",this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f4f4f4",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.stateBorder=this.stateBorder||"#000",this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#222",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=r(this.primaryColor,{h:64}),this.fillType3=r(this.secondaryColor,{h:64}),this.fillType4=r(this.primaryColor,{h:-64}),this.fillType5=r(this.secondaryColor,{h:-64}),this.fillType6=r(this.primaryColor,{h:128}),this.fillType7=r(this.secondaryColor,{h:128});for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["pie"+e]=this["cScale"+e];this.pie12=this.pie0,this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||r(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||r(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||r(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||r(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||r(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||r(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=(this.quadrantPointFill||ft(this.quadrant1Fill)?a:kt)(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#EEE,#6BB8E4,#8ACB88,#C7ACD6,#E8DCC2,#FFB2A8,#FFF380,#7E8D91,#FFD8B1,#FAF3E0"},this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=kt(this.pie1,25)||this.primaryColor,this.git1=this.pie2||this.secondaryColor,this.git2=this.pie3||this.tertiaryColor,this.git3=this.pie4||r(this.primaryColor,{h:-30}),this.git4=this.pie5||r(this.primaryColor,{h:-60}),this.git5=this.pie6||r(this.primaryColor,{h:-90}),this.git6=this.pie7||r(this.primaryColor,{h:60}),this.git7=this.pie8||r(this.primaryColor,{h:120}),this.gitInv0=this.gitInv0||n(this.git0),this.gitInv1=this.gitInv1||n(this.git1),this.gitInv2=this.gitInv2||n(this.git2),this.gitInv3=this.gitInv3||n(this.git3),this.gitInv4=this.gitInv4||n(this.git4),this.gitInv5=this.gitInv5||n(this.git5),this.gitInv6=this.gitInv6||n(this.git6),this.gitInv7=this.gitInv7||n(this.git7),this.branchLabelColor=this.branchLabelColor||this.labelTextColor,this.gitBranchLabel0=this.branchLabelColor,this.gitBranchLabel1="white",this.gitBranchLabel2=this.branchLabelColor,this.gitBranchLabel3="white",this.gitBranchLabel4=this.branchLabelColor,this.gitBranchLabel5=this.branchLabelColor,this.gitBranchLabel6=this.branchLabelColor,this.gitBranchLabel7=this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||St,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||At}calculate(t){var e;"object"!=typeof t?this.updateColors():((e=Object.keys(t)).forEach(e=>{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=t[e]}))}},Ft=mt(e=>{var t=new $t;return t.calculate(e),t},"getThemeVariables")}),Qr=b(()=>{Hr(),Vr(),Xr(),Kr(),Zr(),zt={base:{getThemeVariables:It},dark:{getThemeVariables:Mt},default:{getThemeVariables:Ot},forest:{getThemeVariables:Bt},neutral:{getThemeVariables:Ft}}}),Jr=b(()=>{Gt={flowchart:{useMaxWidth:!0,titleTopMargin:25,subGraphTitleMargin:{top:0,bottom:0},diagramPadding:8,htmlLabels:!0,nodeSpacing:50,rankSpacing:50,curve:"basis",padding:15,defaultRenderer:"dagre-wrapper",wrappingWidth:200,inheritDir:!1},sequence:{useMaxWidth:!0,hideUnusedParticipants:!1,activationWidth:10,diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",mirrorActors:!0,forceMenus:!1,bottomMarginAdj:1,rightAngles:!1,showSequenceNumbers:!1,actorFontSize:14,actorFontFamily:'"Open Sans", sans-serif',actorFontWeight:400,noteFontSize:14,noteFontFamily:'"trebuchet ms", verdana, arial, sans-serif',noteFontWeight:400,noteAlign:"center",messageFontSize:16,messageFontFamily:'"trebuchet ms", verdana, arial, sans-serif',messageFontWeight:400,wrap:!1,wrapPadding:10,labelBoxWidth:50,labelBoxHeight:20},gantt:{useMaxWidth:!0,titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,rightPadding:75,leftPadding:75,gridLineStartPadding:35,fontSize:11,sectionFontSize:11,numberSectionStyles:4,axisFormat:"%Y-%m-%d",topAxis:!1,displayMode:"",weekday:"sunday"},journey:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,maxLabelWidth:360,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],titleColor:"",titleFontFamily:'"trebuchet ms", verdana, arial, sans-serif',titleFontSize:"4ex"},class:{useMaxWidth:!0,titleTopMargin:25,arrowMarkerAbsolute:!1,dividerMargin:10,padding:5,textHeight:10,defaultRenderer:"dagre-wrapper",htmlLabels:!1,hideEmptyMembersBox:!1},state:{useMaxWidth:!0,titleTopMargin:25,dividerMargin:10,sizeUnit:5,padding:8,textHeight:10,titleShift:-15,noteMargin:10,forkWidth:70,forkHeight:7,miniPadding:2,fontSizeFactor:5.02,fontSize:24,labelHeight:16,edgeLengthFactor:"20",compositTitleSize:35,radius:5,defaultRenderer:"dagre-wrapper"},er:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:20,layoutDirection:"TB",minEntityWidth:100,minEntityHeight:75,entityPadding:15,nodeSpacing:140,rankSpacing:80,stroke:"gray",fill:"honeydew",fontSize:12},pie:{useMaxWidth:!0,textPosition:.75},quadrantChart:{useMaxWidth:!0,chartWidth:500,chartHeight:500,titleFontSize:20,titlePadding:10,quadrantPadding:5,xAxisLabelPadding:5,yAxisLabelPadding:5,xAxisLabelFontSize:16,yAxisLabelFontSize:16,quadrantLabelFontSize:16,quadrantTextTopPadding:5,pointTextPadding:5,pointLabelFontSize:12,pointRadius:5,xAxisPosition:"top",yAxisPosition:"left",quadrantInternalBorderStrokeWidth:1,quadrantExternalBorderStrokeWidth:2},xyChart:{useMaxWidth:!0,width:700,height:500,titleFontSize:20,titlePadding:10,showDataLabel:!1,showTitle:!0,xAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2},yAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2},chartOrientation:"vertical",plotReservedSpacePercent:50},requirement:{useMaxWidth:!0,rect_fill:"#f9f9f9",text_color:"#333",rect_border_size:"0.5px",rect_border_color:"#bbb",rect_min_width:200,rect_min_height:200,fontSize:14,rect_padding:10,line_height:20},mindmap:{useMaxWidth:!0,padding:10,maxNodeWidth:200,layoutAlgorithm:"cose-bilkent"},kanban:{useMaxWidth:!0,padding:8,sectionWidth:200,ticketBaseUrl:""},timeline:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],disableMulticolor:!1},gitGraph:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:8,nodeLabel:{width:75,height:100,x:-25,y:0},mainBranchName:"main",mainBranchOrder:0,showCommitLabel:!0,showBranches:!0,rotateCommitLabel:!0,parallelCommits:!1,arrowMarkerAbsolute:!1},c4:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,c4ShapeMargin:50,c4ShapePadding:20,width:216,height:60,boxMargin:10,c4ShapeInRow:4,nextLinePaddingX:0,c4BoundaryInRow:2,personFontSize:14,personFontFamily:'"Open Sans", sans-serif',personFontWeight:"normal",external_personFontSize:14,external_personFontFamily:'"Open Sans", sans-serif',external_personFontWeight:"normal",systemFontSize:14,systemFontFamily:'"Open Sans", sans-serif',systemFontWeight:"normal",external_systemFontSize:14,external_systemFontFamily:'"Open Sans", sans-serif',external_systemFontWeight:"normal",system_dbFontSize:14,system_dbFontFamily:'"Open Sans", sans-serif',system_dbFontWeight:"normal",external_system_dbFontSize:14,external_system_dbFontFamily:'"Open Sans", sans-serif',external_system_dbFontWeight:"normal",system_queueFontSize:14,system_queueFontFamily:'"Open Sans", sans-serif',system_queueFontWeight:"normal",external_system_queueFontSize:14,external_system_queueFontFamily:'"Open Sans", sans-serif',external_system_queueFontWeight:"normal",boundaryFontSize:14,boundaryFontFamily:'"Open Sans", sans-serif',boundaryFontWeight:"normal",messageFontSize:12,messageFontFamily:'"Open Sans", sans-serif',messageFontWeight:"normal",containerFontSize:14,containerFontFamily:'"Open Sans", sans-serif',containerFontWeight:"normal",external_containerFontSize:14,external_containerFontFamily:'"Open Sans", sans-serif',external_containerFontWeight:"normal",container_dbFontSize:14,container_dbFontFamily:'"Open Sans", sans-serif',container_dbFontWeight:"normal",external_container_dbFontSize:14,external_container_dbFontFamily:'"Open Sans", sans-serif',external_container_dbFontWeight:"normal",container_queueFontSize:14,container_queueFontFamily:'"Open Sans", sans-serif',container_queueFontWeight:"normal",external_container_queueFontSize:14,external_container_queueFontFamily:'"Open Sans", sans-serif',external_container_queueFontWeight:"normal",componentFontSize:14,componentFontFamily:'"Open Sans", sans-serif',componentFontWeight:"normal",external_componentFontSize:14,external_componentFontFamily:'"Open Sans", sans-serif',external_componentFontWeight:"normal",component_dbFontSize:14,component_dbFontFamily:'"Open Sans", sans-serif',component_dbFontWeight:"normal",external_component_dbFontSize:14,external_component_dbFontFamily:'"Open Sans", sans-serif',external_component_dbFontWeight:"normal",component_queueFontSize:14,component_queueFontFamily:'"Open Sans", sans-serif',component_queueFontWeight:"normal",external_component_queueFontSize:14,external_component_queueFontFamily:'"Open Sans", sans-serif',external_component_queueFontWeight:"normal",wrap:!0,wrapPadding:10,person_bg_color:"#08427B",person_border_color:"#073B6F",external_person_bg_color:"#686868",external_person_border_color:"#8A8A8A",system_bg_color:"#1168BD",system_border_color:"#3C7FC0",system_db_bg_color:"#1168BD",system_db_border_color:"#3C7FC0",system_queue_bg_color:"#1168BD",system_queue_border_color:"#3C7FC0",external_system_bg_color:"#999999",external_system_border_color:"#8A8A8A",external_system_db_bg_color:"#999999",external_system_db_border_color:"#8A8A8A",external_system_queue_bg_color:"#999999",external_system_queue_border_color:"#8A8A8A",container_bg_color:"#438DD5",container_border_color:"#3C7FC0",container_db_bg_color:"#438DD5",container_db_border_color:"#3C7FC0",container_queue_bg_color:"#438DD5",container_queue_border_color:"#3C7FC0",external_container_bg_color:"#B3B3B3",external_container_border_color:"#A6A6A6",external_container_db_bg_color:"#B3B3B3",external_container_db_border_color:"#A6A6A6",external_container_queue_bg_color:"#B3B3B3",external_container_queue_border_color:"#A6A6A6",component_bg_color:"#85BBF0",component_border_color:"#78A8D8",component_db_bg_color:"#85BBF0",component_db_border_color:"#78A8D8",component_queue_bg_color:"#85BBF0",component_queue_border_color:"#78A8D8",external_component_bg_color:"#CCCCCC",external_component_border_color:"#BFBFBF",external_component_db_bg_color:"#CCCCCC",external_component_db_border_color:"#BFBFBF",external_component_queue_bg_color:"#CCCCCC",external_component_queue_border_color:"#BFBFBF"},sankey:{useMaxWidth:!0,width:600,height:400,linkColor:"gradient",nodeAlignment:"justify",showValues:!0,prefix:"",suffix:""},block:{useMaxWidth:!0,padding:8},packet:{useMaxWidth:!0,rowHeight:32,bitWidth:32,bitsPerRow:32,showBits:!0,paddingX:5,paddingY:5},architecture:{useMaxWidth:!0,padding:40,iconSize:80,fontSize:16},radar:{useMaxWidth:!0,width:600,height:600,marginTop:50,marginRight:50,marginBottom:50,marginLeft:50,axisScaleFactor:1,axisLabelFactor:1.05,curveTension:.17},theme:"default",look:"classic",handDrawnSeed:0,layout:"dagre",maxTextSize:5e4,maxEdges:500,darkMode:!1,fontFamily:'"trebuchet ms", verdana, arial, sans-serif;',logLevel:5,securityLevel:"strict",startOnLoad:!0,arrowMarkerAbsolute:!1,secure:["secure","securityLevel","startOnLoad","maxTextSize","suppressErrorRendering","maxEdges"],legacyMathML:!1,forceLegacyMathML:!1,deterministicIds:!1,fontSize:16,markdownAutoWrap:!0,suppressErrorRendering:!1}}),en=b(()=>{Qr(),Jr(),Ut={...Gt,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:"BRANDES_KOEPF",forceNodeModelOrder:!1,considerModelOrder:"NODES_AND_EDGES"},themeCSS:void 0,themeVariables:zt.default.getThemeVariables(),sequence:{...Gt.sequence,messageFont:mt(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont"),noteFont:mt(function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},"noteFont"),actorFont:mt(function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}},"actorFont")},class:{hideEmptyMembersBox:!1},gantt:{...Gt.gantt,tickInterval:void 0,useWidth:void 0},c4:{...Gt.c4,useWidth:void 0,personFont:mt(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),flowchart:{...Gt.flowchart,inheritDir:!1},external_personFont:mt(function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},"external_personFont"),systemFont:mt(function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},"systemFont"),external_systemFont:mt(function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},"external_systemFont"),system_dbFont:mt(function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},"system_dbFont"),external_system_dbFont:mt(function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},"external_system_dbFont"),system_queueFont:mt(function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},"system_queueFont"),external_system_queueFont:mt(function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},"external_system_queueFont"),containerFont:mt(function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},"containerFont"),external_containerFont:mt(function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},"external_containerFont"),container_dbFont:mt(function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},"container_dbFont"),external_container_dbFont:mt(function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},"external_container_dbFont"),container_queueFont:mt(function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},"container_queueFont"),external_container_queueFont:mt(function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},"external_container_queueFont"),componentFont:mt(function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},"componentFont"),external_componentFont:mt(function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},"external_componentFont"),component_dbFont:mt(function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},"component_dbFont"),external_component_dbFont:mt(function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},"external_component_dbFont"),component_queueFont:mt(function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},"component_queueFont"),external_component_queueFont:mt(function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},"external_component_queueFont"),boundaryFont:mt(function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},"boundaryFont"),messageFont:mt(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont")},pie:{...Gt.pie,useWidth:984},xyChart:{...Gt.xyChart,useWidth:void 0},requirement:{...Gt.requirement,useWidth:void 0},packet:{...Gt.packet},radar:{...Gt.radar},treemap:{useMaxWidth:!0,padding:10,diagramPadding:8,showValues:!0,nodeWidth:100,nodeHeight:40,borderWidth:1,valueFontSize:12,labelFontSize:14,valueFormat:","}},qt=mt((r,n="")=>Object.keys(r).reduce((e,t)=>Array.isArray(r[t])?e:"object"==typeof r[t]&&null!==r[t]?[...e,n+t,...qt(r[t],"")]:[...e,n+t],[]),"keyify"),jt=new Set(qt(Ut,"")),Yt=Ut}),tn=b(()=>{en(),e(),Wt=mt(e=>{if(D.debug("sanitizeDirective called with",e),"object"==typeof e&&null!=e)if(Array.isArray(e))e.forEach(e=>Wt(e));else{for(var t of Object.keys(e)){var r;if(D.debug("Checking key",t),t.startsWith("__")||t.includes("proto")||t.includes("constr")||!jt.has(t)||null==e[t])D.debug("sanitize deleting key: ",t),delete e[t];else if("object"==typeof e[t])D.debug("sanitizing object",t),Wt(e[t]);else for(r of["themeCSS","fontFamily","altFontFamily"])t.includes(r)&&(D.debug("sanitizing css option",t),e[t]=Ht(e[t]))}if(e.themeVariables)for(var n of Object.keys(e.themeVariables)){var i=e.themeVariables[n];i?.match&&!i.match(/^[\d "#%(),.;A-Za-z]+$/)&&(e.themeVariables[n]="")}D.debug("After sanitization",e)}},"sanitizeDirective"),Ht=mt(e=>{let t=0,r=0;for(var n of e){if(t<r)return"{ /* ERROR: Unbalanced CSS */ }";"{"===n?t++:"}"===n&&r++}return t!==r?"{ /* ERROR: Unbalanced CSS */ }":e},"sanitizeCss")}),rn=b(()=>{mr(),e(),Qr(),en(),tn(),Vt=Object.freeze(Yt),Xt=Ae({},Vt),Zt=[],Qt=Ae({},Vt),Jt=mt((e,t)=>{let r=Ae({},e),n={};for(var i of t)sr(i),n=Ae(n,i);return r=Ae(r,n),n.theme&&n.theme in zt&&(e=Ae({},Kt),t=Ae(e.themeVariables||{},n.themeVariables),r.theme)&&r.theme in zt&&(r.themeVariables=zt[r.theme].getThemeVariables(t)),dr(Qt=r),Qt},"updateCurrentConfig"),er=mt(e=>(Xt=Ae({},Vt),Xt=Ae(Xt,e),e.theme&&zt[e.theme]&&(Xt.themeVariables=zt[e.theme].getThemeVariables(e.themeVariables)),Jt(Xt,Zt),Xt),"setSiteConfig"),tr=mt(e=>{Kt=Ae({},e)},"saveConfigFromInitialize"),rr=mt(e=>(Xt=Ae(Xt,e),Jt(Xt,Zt),Xt),"updateSiteConfig"),nr=mt(()=>Ae({},Xt),"getSiteConfig"),ir=mt(e=>(dr(e),Ae(Qt,e),ar()),"setConfig"),ar=mt(()=>Ae({},Qt),"getConfig"),sr=mt(t=>{t&&(["secure",...Xt.secure??[]].forEach(e=>{Object.hasOwn(t,e)&&(D.debug("Denied attempt to modify a secure key "+e,t[e]),delete t[e])}),Object.keys(t).forEach(e=>{e.startsWith("__")&&delete t[e]}),Object.keys(t).forEach(e=>{"string"==typeof t[e]&&(t[e].includes("<")||t[e].includes(">")||t[e].includes("url(data:"))&&delete t[e],"object"==typeof t[e]&&sr(t[e])}))},"sanitize"),or=mt(e=>{Wt(e),e.fontFamily&&!e.themeVariables?.fontFamily&&(e.themeVariables={...e.themeVariables,fontFamily:e.fontFamily}),Zt.push(e),Jt(Xt,Zt)},"addDirective"),lr=mt((e=Xt)=>{Jt(e,Zt=[])},"reset"),cr={LAZY_LOAD_DEPRECATED:"The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead."},hr={},ur=mt(e=>{hr[e]||(D.warn(cr[e]),hr[e]=!0)},"issueWarning"),dr=mt(e=>{e&&(e.lazyLoadedDiagrams||e.loadExternalDiagramsAtStartup)&&ur("LAZY_LOAD_DEPRECATED")},"checkConfig"),pr=mt(()=>{let e={};Kt&&(e=Ae(e,Kt));for(var t of Zt)e=Ae(e,t);return e},"getUserDefinedConfig")});function nn(i){return function(e){e instanceof RegExp&&(e.lastIndex=0);for(var t=arguments.length,r=new Array(1<t?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return vn(i,e,r)}}function an(n){return function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return xn(n,t)}}function sn(t,r){var n,i=2<arguments.length&&void 0!==arguments[2]?arguments[2]:Cn;dn&&dn(t,null);let a=r.length;for(;a--;){let e=r[a];"string"==typeof e&&(n=i(e))!==e&&(pn(r)||(r[a]=n),e=n),t[e]=!0}return t}function on(t){for(let e=0;e<t.length;e++)In(t,e)||(t[e]=null);return t}function ln(e){var t,r,n=yn(null);for([t,r]of un(e))In(e,t)&&(Array.isArray(r)?n[t]=on(r):r&&"object"==typeof r&&r.constructor===Object?n[t]=ln(r):n[t]=r);return n}function cn(e,t){for(;null!==e;){var r=fn(e,t);if(r){if(r.get)return nn(r.get);if("function"==typeof r.value)return nn(r.value)}e=gn(e)}function n(){return null}return mt(n,"fallbackValue"),n}function hn(){let e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:ni(),d=mt(e=>hn(e),"DOMPurify");if(d.version="3.2.6",d.removed=[],!e||!e.document||e.document.nodeType!==ri.document||!e.Element)return d.isSupported=!1,d;let i=e.document,O=i,P=O.currentScript,{DocumentFragment:B,HTMLTemplateElement:$,Node:F,Element:z,NodeFilter:t,NamedNodeMap:G=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:U,DOMParser:q,trustedTypes:p}=e,r=z.prototype,j=cn(r,"cloneNode"),Y=cn(r,"remove"),W=cn(r,"nextSibling"),H=cn(r,"childNodes"),s=cn(r,"parentNode");var V;"function"==typeof $&&(V=i.createElement("template")).content&&V.content.ownerDocument&&(i=V.content.ownerDocument);let g,c="",{implementation:X,createNodeIterator:K,createDocumentFragment:Z,getElementsByTagName:Q}=i,J=O.importNode,f=ai(),{MUSTACHE_EXPR:ee,ERB_EXPR:te,TMPLIT_EXPR:re,DATA_ATTR:ne,ARIA_ATTR:ie,IS_SCRIPT_OR_DATA:ae,ATTR_WHITESPACE:se,CUSTOM_ELEMENT:oe}=(d.isSupported="function"==typeof un&&"function"==typeof s&&X&&void 0!==X.createHTMLDocument,ti),le=ti.IS_ALLOWED_URI,h=null,ce=sn({},[...Dn,...On,...Pn,...$n,...zn]),m=null,he=sn({},[...Gn,...Un,...qn,...jn]),o=Object.seal(yn(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}})),u=null,ue=null,de=!0,pe=!0,ge=!1,fe=!0,y=!1,v=!0,x=!1,me=!1,ye=!1,b=!1,w=!1,k=!1,ve=!0,xe=!1,be=!0,T=!1,n,l=null,we=sn({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),ke=null,Te=sn({},["audio","video","img","source","image","track"]),Ee=null,Ce=sn({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),a="http://www.w3.org/1998/Math/MathML",E="http://www.w3.org/2000/svg",C="http://www.w3.org/1999/xhtml",_=C,_e=!1,Se=null,Ae=sn({},[a,E,C],_n),S=sn({},["mi","mo","mn","ms","mtext"]),A=sn({},["annotation-xml"]),Le=sn({},["title","style","font","a","script"]),L=null,Ne=["application/xhtml+xml","text/html"],N=null,I=null,Ie=i.createElement("form"),Re=mt(function(e){return e instanceof RegExp||e instanceof Function},"isRegexOrFunction"),Me=mt(function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};if(!I||I!==e){if(e=ln(e&&"object"==typeof e?e:{}),L=-1===Ne.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,N="application/xhtml+xml"===L?_n:Cn,h=In(e,"ALLOWED_TAGS")?sn({},e.ALLOWED_TAGS,N):ce,m=In(e,"ALLOWED_ATTR")?sn({},e.ALLOWED_ATTR,N):he,Se=In(e,"ALLOWED_NAMESPACES")?sn({},e.ALLOWED_NAMESPACES,_n):Ae,Ee=In(e,"ADD_URI_SAFE_ATTR")?sn(ln(Ce),e.ADD_URI_SAFE_ATTR,N):Ce,ke=In(e,"ADD_DATA_URI_TAGS")?sn(ln(Te),e.ADD_DATA_URI_TAGS,N):Te,l=In(e,"FORBID_CONTENTS")?sn({},e.FORBID_CONTENTS,N):we,u=In(e,"FORBID_TAGS")?sn({},e.FORBID_TAGS,N):ln({}),ue=In(e,"FORBID_ATTR")?sn({},e.FORBID_ATTR,N):ln({}),n=!!In(e,"USE_PROFILES")&&e.USE_PROFILES,de=!1!==e.ALLOW_ARIA_ATTR,pe=!1!==e.ALLOW_DATA_ATTR,ge=e.ALLOW_UNKNOWN_PROTOCOLS||!1,fe=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,y=e.SAFE_FOR_TEMPLATES||!1,v=!1!==e.SAFE_FOR_XML,x=e.WHOLE_DOCUMENT||!1,b=e.RETURN_DOM||!1,w=e.RETURN_DOM_FRAGMENT||!1,k=e.RETURN_TRUSTED_TYPE||!1,ye=e.FORCE_BODY||!1,ve=!1!==e.SANITIZE_DOM,xe=e.SANITIZE_NAMED_PROPS||!1,be=!1!==e.KEEP_CONTENT,T=e.IN_PLACE||!1,le=e.ALLOWED_URI_REGEXP||Kn,_=e.NAMESPACE||C,S=e.MATHML_TEXT_INTEGRATION_POINTS||S,A=e.HTML_INTEGRATION_POINTS||A,o=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&Re(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(o.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&Re(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(o.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(o.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),y&&(pe=!1),w&&(b=!0),n&&(h=sn({},zn),m=[],!0===n.html&&(sn(h,Dn),sn(m,Gn)),!0===n.svg&&(sn(h,On),sn(m,Un),sn(m,jn)),!0===n.svgFilters&&(sn(h,Pn),sn(m,Un),sn(m,jn)),!0===n.mathMl)&&(sn(h,$n),sn(m,qn),sn(m,jn)),e.ADD_TAGS&&sn(h=h===ce?ln(h):h,e.ADD_TAGS,N),e.ADD_ATTR&&sn(m=m===he?ln(m):m,e.ADD_ATTR,N),e.ADD_URI_SAFE_ATTR&&sn(Ee,e.ADD_URI_SAFE_ATTR,N),e.FORBID_CONTENTS&&sn(l=l===we?ln(l):l,e.FORBID_CONTENTS,N),be&&(h["#text"]=!0),x&&sn(h,["html","head","body"]),h.table&&(sn(h,["tbody"]),delete u.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw Mn('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw Mn('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');g=e.TRUSTED_TYPES_POLICY,c=g.createHTML("")}else null!==(g=void 0===g?ii(p,P):g)&&"string"==typeof c&&(c=g.createHTML(""));mn&&mn(e),I=e}},"_parseConfig"),De=sn({},[...On,...Pn,...Bn]),Oe=sn({},[...$n,...Fn]),Pe=mt(function(e){let t=s(e);t&&t.tagName||(t={namespaceURI:_,tagName:"template"});var r=Cn(e.tagName),n=Cn(t.tagName);return!!Se[e.namespaceURI]&&(e.namespaceURI===E?t.namespaceURI===C?"svg"===r:t.namespaceURI===a?"svg"===r&&("annotation-xml"===n||S[n]):!!De[r]:e.namespaceURI===a?t.namespaceURI===C?"math"===r:t.namespaceURI===E?"math"===r&&A[n]:!!Oe[r]:e.namespaceURI===C?!(t.namespaceURI===E&&!A[n]||t.namespaceURI===a&&!S[n]||Oe[r])&&(Le[r]||!De[r]):!("application/xhtml+xml"!==L||!Se[e.namespaceURI]))},"_checkValidNamespace"),R=mt(function(e){Tn(d.removed,{element:e});try{s(e).removeChild(e)}catch{Y(e)}},"_forceRemove"),M=mt(function(e,t){try{Tn(d.removed,{attribute:t.getAttributeNode(e),from:t})}catch{Tn(d.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e)if(b||w)try{R(t)}catch{}else try{t.setAttribute(e,"")}catch{}},"_removeAttribute"),Be=mt(function(e){let t=null,r=null;ye?e="<remove></remove>"+e:(n=Sn(e,/^[\r\n\t ]+/),r=n&&n[0]),"application/xhtml+xml"===L&&_===C&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");var n=g?g.createHTML(e):e;if(_===C)try{t=(new q).parseFromString(n,L)}catch{}if(!t||!t.documentElement){t=X.createDocument(_,"template",null);try{t.documentElement.innerHTML=_e?c:n}catch{}}return n=t.body||t.documentElement,e&&r&&n.insertBefore(i.createTextNode(r),n.childNodes[0]||null),_===C?Q.call(t,x?"html":"body")[0]:x?t.documentElement:n},"_initDocument"),$e=mt(function(e){return K.call(e.ownerDocument||e,e,t.SHOW_ELEMENT|t.SHOW_COMMENT|t.SHOW_TEXT|t.SHOW_PROCESSING_INSTRUCTION|t.SHOW_CDATA_SECTION,null)},"_createNodeIterator"),Fe=mt(function(e){return e instanceof U&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof G)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes)},"_isClobbered"),ze=mt(function(e){return"function"==typeof F&&e instanceof F},"_isNode");function D(e,t,r){bn(e,e=>{e.call(d,t,r,I)})}mt(D,"_executeHooks");let Ge=mt(function(t){let r=null;if(D(f.beforeSanitizeElements,t,null),!Fe(t)){var e=N(t.nodeName);if(D(f.uponSanitizeElement,t,{tagName:e,allowedTags:h}),!(v&&t.hasChildNodes()&&!ze(t.firstElementChild)&&Rn(/<[/\w!]/g,t.innerHTML)&&Rn(/<[/\w!]/g,t.textContent)||t.nodeType===ri.progressingInstruction||v&&t.nodeType===ri.comment&&Rn(/<[/\w]/g,t.data))){if(h[e]&&!u[e])return t instanceof z&&!Pe(t)||("noscript"===e||"noembed"===e||"noframes"===e)&&Rn(/<\/no(script|embed|frames)/i,t.innerHTML)?(R(t),!0):(y&&t.nodeType===ri.text&&(r=t.textContent,bn([ee,te,re],e=>{r=An(r,e," ")}),t.textContent!==r)&&(Tn(d.removed,{element:t.cloneNode()}),t.textContent=r),D(f.afterSanitizeElements,t,null),!1);if(!u[e]&&qe(e)&&(o.tagNameCheck instanceof RegExp&&Rn(o.tagNameCheck,e)||o.tagNameCheck instanceof Function&&o.tagNameCheck(e)))return!1;if(be&&!l[e]){var n=s(t)||t.parentNode,i=H(t)||t.childNodes;if(i&&n)for(let e=i.length-1;0<=e;--e){var a=j(i[e],!0);a.__removalCount=(t.__removalCount||0)+1,n.insertBefore(a,W(t))}}}}return R(t),!0},"_sanitizeElements"),Ue=mt(function(e,t,r){if(ve&&("id"===t||"name"===t)&&(r in i||r in Ie))return!1;if((!pe||ue[t]||!Rn(ne,t))&&(!de||!Rn(ie,t)))if(!m[t]||ue[t]){if(!(qe(e)&&(o.tagNameCheck instanceof RegExp&&Rn(o.tagNameCheck,e)||o.tagNameCheck instanceof Function&&o.tagNameCheck(e))&&(o.attributeNameCheck instanceof RegExp&&Rn(o.attributeNameCheck,t)||o.attributeNameCheck instanceof Function&&o.attributeNameCheck(t))||"is"===t&&o.allowCustomizedBuiltInElements&&(o.tagNameCheck instanceof RegExp&&Rn(o.tagNameCheck,r)||o.tagNameCheck instanceof Function&&o.tagNameCheck(r))))return!1}else if(!Ee[t]&&!Rn(le,An(r,se,""))&&("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==Ln(r,"data:")||!ke[e])&&(!ge||Rn(ae,An(r,se,"")))&&r)return!1;return!0},"_isValidAttribute"),qe=mt(function(e){return"annotation-xml"!==e&&Sn(e,oe)},"_isBasicCustomElement"),je=mt(function(c){D(f.beforeSanitizeAttributes,c,null);var h=c.attributes;if(h&&!Fe(c)){let o={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:m,forceKeepAttr:void 0},l=h.length;for(;l--;){let e=h[l],{name:t,namespaceURI:r,value:n}=e,i=N(t),a=n,s="value"===t?a:Nn(a);if(o.attrName=i,o.attrValue=s,o.keepAttr=!0,o.forceKeepAttr=void 0,D(f.uponSanitizeAttribute,c,o),s=o.attrValue,!xe||"id"!==i&&"name"!==i||(M(t,c),s="user-content-"+s),v&&Rn(/((--!?|])>)|<\/(style|title)/i,s))M(t,c);else if(!o.forceKeepAttr)if(o.keepAttr)if(!fe&&Rn(/\/>/i,s))M(t,c);else{y&&bn([ee,te,re],e=>{s=An(s,e," ")});var u=N(c.nodeName);if(Ue(u,i,s)){if(g&&"object"==typeof p&&"function"==typeof p.getAttributeType&&!r)switch(p.getAttributeType(u,i)){case"TrustedHTML":s=g.createHTML(s);break;case"TrustedScriptURL":s=g.createScriptURL(s)}if(s!==a)try{r?c.setAttributeNS(r,t,s):c.setAttribute(t,s),Fe(c)?R(c):kn(d.removed)}catch{M(t,c)}}else M(t,c)}else M(t,c)}D(f.afterSanitizeAttributes,c,null)}},"_sanitizeAttributes"),Ye=mt(function e(t){var r,n=$e(t);for(D(f.beforeSanitizeShadowDOM,t,null);r=n.nextNode();)D(f.uponSanitizeShadowNode,r,null),Ge(r),je(r),r.content instanceof B&&e(r.content);D(f.afterSanitizeShadowDOM,t,null)},"_sanitizeShadowDOM");return d.sanitize=function(e){let t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},r=null,n,i,a=null;if("string"!=typeof(e=(_e=!e)?"\x3c!--\x3e":e)&&!ze(e)){if("function"!=typeof e.toString)throw Mn("toString is not a function");if("string"!=typeof(e=e.toString()))throw Mn("dirty is not a string, aborting")}if(!d.isSupported)return e;if(me||Me(t),d.removed=[],T="string"!=typeof e&&T){if(e.nodeName){var s=N(e.nodeName);if(!h[s]||u[s])throw Mn("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof F)(n=(r=Be("\x3c!----\x3e")).ownerDocument.importNode(e,!0)).nodeType===ri.element&&"BODY"===n.nodeName||"HTML"===n.nodeName?r=n:r.appendChild(n);else{if(!b&&!y&&!x&&-1===e.indexOf("<"))return g&&k?g.createHTML(e):e;if(!(r=Be(e)))return b?null:k?c:""}r&&ye&&R(r.firstChild);for(var o=$e(T?e:r);i=o.nextNode();)Ge(i),je(i),i.content instanceof B&&Ye(i.content);if(T)return e;if(b){if(w)for(a=Z.call(r.ownerDocument);r.firstChild;)a.appendChild(r.firstChild);else a=r;return a=m.shadowroot||m.shadowrootmode?J.call(O,a,!0):a}let l=x?r.outerHTML:r.innerHTML;return x&&h["!doctype"]&&r.ownerDocument&&r.ownerDocument.doctype&&r.ownerDocument.doctype.name&&Rn(Jn,r.ownerDocument.doctype.name)&&(l="<!DOCTYPE "+r.ownerDocument.doctype.name+`> +`+l),y&&bn([ee,te,re],e=>{l=An(l,e," ")}),g&&k?g.createHTML(l):l},d.setConfig=function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};Me(e),me=!0},d.clearConfig=function(){I=null,me=!1},d.isValidAttribute=function(e,t,r){return I||Me({}),e=N(e),t=N(t),Ue(e,t,r)},d.addHook=function(e,t){"function"==typeof t&&Tn(f[e],t)},d.removeHook=function(e,t){return void 0!==t?-1===(t=wn(f[e],t))?void 0:En(f[e],t,1)[0]:kn(f[e])},d.removeHooks=function(e){f[e]=[]},d.removeAllHooks=function(){f=ai()},d}var un,dn,pn,gn,fn,mn,yn,vn,xn,bn,wn,kn,Tn,En,Cn,_n,Sn,An,Ln,Nn,In,Rn,Mn,Dn,On,Pn,Bn,$n,Fn,zn,Gn,Un,qn,jn,Yn,Wn,Hn,Vn,Xn,Kn,Zn,Qn,Jn,ei,ti,ri,ni,ii,ai,si,oi=b(()=>{({entries:un,setPrototypeOf:dn,isFrozen:pn,getPrototypeOf:gn,getOwnPropertyDescriptor:fn}=Object),{freeze:mn,seal:ei,create:yn}=Object,{apply:vn,construct:xn}=typeof Reflect<"u"&&Reflect,mn=mn||mt(function(e){return e},"freeze"),ei=ei||mt(function(e){return e},"seal"),vn=vn||mt(function(e,t,r){return e.apply(t,r)},"apply"),xn=xn||mt(function(e,t){return new e(...t)},"construct"),bn=nn(Array.prototype.forEach),wn=nn(Array.prototype.lastIndexOf),kn=nn(Array.prototype.pop),Tn=nn(Array.prototype.push),En=nn(Array.prototype.splice),Cn=nn(String.prototype.toLowerCase),_n=nn(String.prototype.toString),Sn=nn(String.prototype.match),An=nn(String.prototype.replace),Ln=nn(String.prototype.indexOf),Nn=nn(String.prototype.trim),In=nn(Object.prototype.hasOwnProperty),Rn=nn(RegExp.prototype.test),Mn=an(TypeError),mt(nn,"unapply"),mt(an,"unconstruct"),mt(sn,"addToSet"),mt(on,"cleanArray"),mt(ln,"clone"),mt(cn,"lookupGetter"),Dn=mn(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),On=mn(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Pn=mn(["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"]),Bn=mn(["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"]),$n=mn(["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"]),Fn=mn(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),zn=mn(["#text"]),Gn=mn(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),Un=mn(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),qn=mn(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),jn=mn(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Yn=ei(/\{\{[\w\W]*|[\w\W]*\}\}/gm),Wn=ei(/<%[\w\W]*|[\w\W]*%>/gm),Hn=ei(/\$\{[\w\W]*/gm),Vn=ei(/^data-[\-\w.\u00B7-\uFFFF]+$/),Xn=ei(/^aria-[\-\w]+$/),Kn=ei(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Zn=ei(/^(?:\w+script|data):/i),Qn=ei(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Jn=ei(/^html$/i),ei=ei(/^[a-z][.\w]*(-[.\w]+)+$/i),ti=Object.freeze({__proto__:null,ARIA_ATTR:Xn,ATTR_WHITESPACE:Qn,CUSTOM_ELEMENT:ei,DATA_ATTR:Vn,DOCTYPE_NAME:Jn,ERB_EXPR:Wn,IS_ALLOWED_URI:Kn,IS_SCRIPT_OR_DATA:Zn,MUSTACHE_EXPR:Yn,TMPLIT_EXPR:Hn}),ri={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},ni=mt(function(){return"u"<typeof window?null:window},"getGlobal"),ii=mt(function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;var r="data-tt-policy-suffix";t="dompurify"+((r=t&&t.hasAttribute(r)?t.getAttribute(r):null)?"#"+r:"");try{return e.createPolicy(t,{createHTML(e){return e},createScriptURL(e){return e}})}catch{return console.warn("TrustedTypes policy "+t+" could not be created."),null}},"_createTrustedTypesPolicy"),ai=mt(function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},"_createHooksMap"),mt(hn,"createDOMPurify"),si=hn()}),li={};function ci(e){return String(e).replace(qi,e=>Ui[e])}function hi(e){if(e.default)return e.default;if(e=e.type,"string"!=typeof(e=Array.isArray(e)?e[0]:e))return e.enum[0];switch(e){case"boolean":return!1;case"string":return"";case"number":return 0;case"object":return{}}}function ui(e){for(var t=0;t<na.length;t++)for(var r=na[t],n=0;n<r.blocks.length;n++){var i=r.blocks[n];if(e>=i[0]&&e<=i[1])return r.name}return null}function di(e){for(var t=0;t<ia.length;t+=2)if(ia[t]<=e&&e<=ia[t+1])return!0;return!1}function pi(e,t){ya[e]=t}function gi(e,t,r){if(!ya[t])throw new Error("Font metrics not found for font: "+t+".");var n=e.charCodeAt(0),i=ya[t][n];if(!i&&e[0]in xa&&(n=xa[e[0]].charCodeAt(0),i=ya[t][n]),i=!i&&"text"===r&&di(n)?ya[t][77]:i)return{depth:i[0],height:i[1],italic:i[2],skew:i[3],width:i[4]}}function fi(e){var t=5<=e?0:3<=e?1:2;if(!ba[t]){var r,n=ba[t]={cssEmPerMu:va.quad[t]/18};for(r in va)va.hasOwnProperty(r)&&(n[r]=va[r][t])}return ba[t]}function mi(e){if(e instanceof $a)return e;throw new Error("Expected symbolNode but got "+String(e)+".")}function yi(e){if(e instanceof Da)return e;throw new Error("Expected span<HtmlDomNode> but got "+String(e)+".")}function t(e,t,r,n,i,a){ja[e][i]={font:t,group:r,replace:n},a&&n&&(ja[e][n]=ja[e][i])}function o(e){for(var{type:e,names:t,props:r,handler:n,htmlBuilder:i,mathmlBuilder:a}=e,s={type:e,numArgs:r.numArgs,argTypes:r.argTypes,allowedInArgument:!!r.allowedInArgument,allowedInText:!!r.allowedInText,allowedInMath:void 0===r.allowedInMath||r.allowedInMath,numOptionalArgs:r.numOptionalArgs||0,infix:!!r.infix,primitive:!!r.primitive,handler:n},o=0;o<t.length;++o)Ss[t[o]]=s;e&&(i&&(As[e]=i),a)&&(Ls[e]=a)}function vi(e){var{type:e,htmlBuilder:t,mathmlBuilder:r}=e;o({type:e,names:[],props:{numArgs:0},handler(){throw new Error("Should never be called.")},htmlBuilder:t,mathmlBuilder:r})}function xi(e,t){return e=Rs(["base"],e,t),(t=Rs(["strut"])).style.height=K(e.height+e.depth),e.depth&&(t.style.verticalAlign=K(-e.depth)),e.children.unshift(t),e}function bi(e,t){var r,n=null,i=(1===e.length&&"tag"===e[0].type&&(n=e[0].tag,e=e[0].body),Bs(e,t,"root"));2===i.length&&i[1].hasClass("tag")&&(r=i.pop());for(var a,s=[],o=[],l=0;l<i.length;l++)if(o.push(i[l]),i[l].hasClass("mbin")||i[l].hasClass("mrel")||i[l].hasClass("allowbreak")){for(var c=!1;l<i.length-1&&i[l+1].hasClass("mspace")&&!i[l+1].hasClass("newline");)l++,o.push(i[l]),i[l].hasClass("nobreak")&&(c=!0);c||(s.push(xi(o,t)),o=[])}else i[l].hasClass("newline")&&(o.pop(),0<o.length&&(s.push(xi(o,t)),o=[]),s.push(i[l]));return 0<o.length&&s.push(xi(o,t)),n?((a=xi(Bs(n,t,!0))).classes=["tag"],s.push(a)):r&&s.push(r),(e=Rs(["katex-html"],s)).setAttribute("aria-hidden","true"),a&&((n=a.children[0]).style.height=K(e.height+e.depth),e.depth)&&(n.style.verticalAlign=K(-e.depth)),e}function wi(e){return new ma(e)}function ki(e){var t;return!!e&&("mi"===e.type&&1===e.children.length?(t=e.children[0])instanceof Ys&&"."===t.text:"mo"===e.type&&1===e.children.length&&"true"===e.getAttribute("separator")&&"0em"===e.getAttribute("lspace")&&"0em"===e.getAttribute("rspace")&&(t=e.children[0])instanceof Ys&&","===t.text)}function Ti(e,t,r,n,i){return r=1===(e=Xs(e,r)).length&&e[0]instanceof js&&Wi.contains(["mrow","mtable"],e[0].type)?e[0]:new E.MathNode("mrow",e),(e=new E.MathNode("annotation",[new E.TextNode(t)])).setAttribute("encoding","application/x-tex"),t=new E.MathNode("semantics",[r,e]),(r=new E.MathNode("math",[t])).setAttribute("xmlns","http://www.w3.org/1998/Math/MathML"),n&&r.setAttribute("display","block"),Z.makeSpan([i?"katex":"katex-mathml"],[r])}function Ei(e,t){if(e&&e.type===t)return e;throw new Error("Expected node of type "+t+", but got "+(e?"node of type "+e.type:String(e)))}function Ci(e){var t=_i(e);if(t)return t;throw new Error("Expected node of symbol group type, but got "+(e?"node of type "+e.type:String(e)))}function _i(e){return e&&("atom"===e.type||qa.hasOwnProperty(e.type))?e:null}function Si(e,t){var r=Bs(e.body,t,!0);return co([e.mclass],r,t)}function Ai(e,t){var r,t=Xs(e.body,t);return"minner"===e.mclass?r=new E.MathNode("mpadded",t):"mord"===e.mclass?e.isCharacterBox?(r=t[0]).type="mi":r=new E.MathNode("mi",t):(e.isCharacterBox?(r=t[0]).type="mo":r=new E.MathNode("mo",t),"mbin"===e.mclass?(r.attributes.lspace="0.22em",r.attributes.rspace="0.22em"):"mpunct"===e.mclass?(r.attributes.lspace="0em",r.attributes.rspace="0.17em"):"mopen"===e.mclass||"mclose"===e.mclass?(r.attributes.lspace="0em",r.attributes.rspace="0em"):"minner"===e.mclass&&(r.attributes.lspace="0.0556em",r.attributes.width="+0.1111em")),r}function Li(e,t,r){var n=uo[e];switch(n){case"\\\\cdrightarrow":case"\\\\cdleftarrow":return r.callFunction(n,[t[0]],[t[1]]);case"\\uparrow":case"\\downarrow":var i=r.callFunction("\\\\cdleft",[t[0]],[]),a=r.callFunction("\\Big",[{type:"atom",text:n,mode:"math",family:"rel"}],[]),s=r.callFunction("\\\\cdright",[t[1]],[]);return r.callFunction("\\\\cdparent",[{type:"ordgroup",mode:"math",body:[i,a,s]}],[]);case"\\\\cdlongequal":return r.callFunction("\\\\cdlongequal",[],[]);case"\\Vert":return r.callFunction("\\Big",[{type:"textord",text:"\\Vert",mode:"math"}],[]);default:return{type:"textord",text:" ",mode:"math"}}}function Ni(e){var t=[];for(e.gullet.beginGroup(),e.gullet.macros.set("\\cr","\\\\\\relax"),e.gullet.beginGroup();;){t.push(e.parseExpression(!1,"\\\\")),e.gullet.endGroup(),e.gullet.beginGroup();var r=e.fetch().text;if("&"!==r&&"\\\\"!==r){if("\\end"!==r)throw new X("Expected \\\\ or \\cr or \\end",e.nextToken);0===t[t.length-1].length&&t.pop();break}e.consume()}for(var n=[],i=[n],a=0;a<t.length;a++){for(var s=t[a],o=po(),l=0;l<s.length;l++)if(go(s[l])){n.push(o);var c=Ci(s[l+=1]).text,h=new Array(2);if(h[0]={type:"ordgroup",mode:"math",body:[]},h[1]={type:"ordgroup",mode:"math",body:[]},!(-1<"=|.".indexOf(c))){if(!(-1<"<>AV".indexOf(c)))throw new X('Expected one of "<>AV=|." after @',s[l]);for(var u=0;u<2;u++){for(var d=!0,p=l+1;p<s.length;p++){if(fo(s[p],c)){d=!1,l=p;break}if(go(s[p]))throw new X("Missing a "+c+" character to complete a CD arrow.",s[p]);h[u].body.push(s[p])}if(d)throw new X("Missing a "+c+" character to complete a CD arrow.",s[l])}}var g=Li(c,h,e);n.push({type:"styling",body:[g],mode:"math",style:"display"}),o=po()}else o.body.push(s[l]);a%2==0?n.push(o):n.shift(),i.push(n=[])}return e.gullet.endGroup(),e.gullet.endGroup(),{type:"array",mode:"math",body:i,arraystretch:1,addJot:!0,rowGaps:[null],cols:new Array(i[0].length).fill({type:"align",align:"c",pregap:.25,postgap:.25}),colSeparationType:"CD",hLinesBeforeRow:new Array(i.length+1).fill([])}}function Ii(e,t){var r=_i(e);if(r&&Wi.contains(Yo,r.text))return r;throw new X(r?"Invalid delimiter '"+r.text+"' after '"+t.funcName+"'":"Invalid delimiter type '"+e.type+"'",e)}function Ri(e){if(!e.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}function Mi(e){for(var{type:e,names:t,props:r,handler:n,htmlBuilder:i,mathmlBuilder:a}=e,s={type:e,numArgs:r.numArgs||0,allowedInText:!1,numOptionalArgs:0,handler:n},o=0;o<t.length;++o)Wo[t[o]]=s;i&&(As[e]=i),a&&(Ls[e]=a)}function l(e,t){Ho[e]=t}function Di(e){var t=[],r=(e.consumeSpaces(),e.fetch().text);for("\\relax"===r&&(e.consume(),e.consumeSpaces(),r=e.fetch().text);"\\hline"===r||"\\hdashline"===r;)e.consume(),t.push("\\hdashline"===r),e.consumeSpaces(),r=e.fetch().text;return t}function Oi(e){if(-1===e.indexOf("ed"))return-1===e.indexOf("*")}function Pi(e,t,r){var{hskipBeforeAndAfter:t,addJot:n,cols:i,arraystretch:a,colSeparationType:s,autoTag:o,singleRow:l,emptySingleRow:c,maxNumCols:h,leqno:u}=t;if(e.gullet.beginGroup(),l||e.gullet.macros.set("\\cr","\\\\\\relax"),!a){var d=e.gullet.expandMacroAsText("\\arraystretch");if(null==d)a=1;else if(!(a=parseFloat(d))||a<0)throw new X("Invalid \\arraystretch: "+d)}e.gullet.beginGroup();var p=[],g=[p],f=[],m=[],y=null!=o?[]:void 0;function v(){o&&e.gullet.macros.set("\\@eqnsw","1",!0)}function x(){y&&(e.gullet.macros.get("\\df@tag")?(y.push(e.subparse([new zi("\\df@tag")])),e.gullet.macros.set("\\df@tag",void 0,!0)):y.push(!!o&&"1"===e.gullet.macros.get("\\@eqnsw")))}for(mt(v,"beginRow"),mt(x,"endRow"),v(),m.push(Di(e));;){var b=e.parseExpression(!1,l?"\\end":"\\\\"),w=(e.gullet.endGroup(),e.gullet.beginGroup(),b={type:"ordgroup",mode:e.mode,body:b},r&&(b={type:"styling",mode:e.mode,style:r,body:[b]}),p.push(b),e.fetch().text);if("&"===w){if(h&&p.length===h){if(l||s)throw new X("Too many tab characters: &",e.nextToken);e.settings.reportNonstrict("textEnv","Too few columns specified in the {array} column argument.")}e.consume()}else{if("\\end"===w){x(),1===p.length&&"styling"===b.type&&0===b.body[0].body.length&&(1<g.length||!c)&&g.pop(),m.length<g.length+1&&m.push([]);break}if("\\\\"!==w)throw new X("Expected & or \\\\ or \\cr or \\end",e.nextToken);e.consume(),b=void 0," "!==e.gullet.future().text&&(b=e.parseSizeGroup(!0)),f.push(b?b.value:null),x(),m.push(Di(e)),g.push(p=[]),v()}}return e.gullet.endGroup(),e.gullet.endGroup(),{type:"array",mode:e.mode,addJot:n,arraystretch:a,body:g,cols:i,rowGaps:f,hskipBeforeAndAfter:t,hLinesBeforeRow:m,colSeparationType:s,tags:y,leqno:u}}function Bi(e){return"d"===e.slice(0,1)?"display":"text"}function $i(e,t,r){for(var n=Bs(e,t,!1),i=t.sizeMultiplier/r.sizeMultiplier,a=0;a<n.length;a++){var s=n[a].classes.indexOf("sizing");s<0?Array.prototype.push.apply(n[a].classes,t.sizingClasses(r)):n[a].classes[s+1]==="reset-size"+t.size&&(n[a].classes[s+1]="reset-size"+r.size),n[a].height*=i,n[a].depth*=i}return Z.makeFragment(n)}(OFe=(e,t)=>{for(var r in t)R(e,r,{get:t[r],enumerable:!0})})(li,{ParseError:()=>X,SETTINGS_SCHEMA:()=>Hi,__defineFunction:()=>o,__defineMacro:()=>l,__defineSymbol:()=>t,__domTree:()=>Jl,__parse:()=>Vl,__renderToDomTree:()=>Kl,__renderToHTMLTree:()=>Zl,__setFontMetrics:()=>pi,default:()=>ec,render:()=>Wl,renderToString:()=>Hl,version:()=>Ql});var Fi,zi,X,Gi,Ui,qi,ji,Yi,Wi,Hi,Vi,Xi,Ki,Zi,Qi,Ji,ea,ta,ra,na,ia,aa,sa,oa,la,ca,ha,ua,da,pa,ga,fa,ma,ya,va,xa,ba,wa,ka,Ta,Ea,Ca,_a,Sa,Aa,K,La,Na,Ia,Ra,Ma,Da,Oa,Pa,Ba,$a,Fa,za,Ga,Ua,qa,ja,h,u,d,Ya,p,Wa,Ha,Va,Xa,Ka,Za,Qa,Ja,es,ts,rs,ns,is,as,ss,os,ls,cs,hs,us,ds,ps,gs,fs,ms,ys,vs,xs,bs,ws,ks,Ts,Es,Z,Cs,_s,Ss,As,Ls,Ns,Is,Rs,Ms,Ds,Os,Ps,Bs,$s,Fs,zs,Gs,Us,qs,js,Ys,E,Ws,Hs,Vs,Xs,Ks,Zs,Qs,Js,eo,to,ro,no,io,ao,so,oo,lo,co,ho,uo,po,go,fo,mo,yo,vo,xo,bo,wo,ko,To,Eo,Co,_o,So,Ao,Lo,No,Io,Ro,Mo,Do,Oo,Po,Bo,$o,Fo,zo,Go,Uo,qo,jo,Yo,Wo,Ho,Vo,Xo,Ko,g,Zo,Qo,Jo,el,tl,rl,nl,f,il,al,sl,ol,ll,cl,hl,ul,dl,pl,gl,fl,ml,yl,vl,xl,bl,wl,kl,Tl,El,Cl,_l,Sl,m,Al,Ll,Nl,Il,Rl,Ml,Dl,Ol,Pl,Bl,$l,Fl,zl,Gl,Ul,ql,jl,Yl,Wl,Hl,Vl,Xl,Kl,Zl,Ql,Jl,ec,tc=b(()=>{for(Fi=class r{static{mt(this,"SourceLocation")}constructor(e,t,r){this.lexer=void 0,this.start=void 0,this.end=void 0,this.lexer=e,this.start=t,this.end=r}static range(e,t){return t?e&&e.loc&&t.loc&&e.loc.lexer===t.loc.lexer?new r(e.loc.lexer,e.loc.start,t.loc.end):null:e&&e.loc}},zi=class n{static{mt(this,"Token")}constructor(e,t){this.text=void 0,this.loc=void 0,this.noexpand=void 0,this.treatAsRelax=void 0,this.text=e,this.loc=t}range(e,t){return new n(t,Fi.range(this,e))}},(X=class s{static{mt(this,"ParseError")}constructor(e,t){this.name=void 0,this.position=void 0,this.length=void 0,this.rawMessage=void 0;var r,n,i,a="KaTeX parse error: "+e;return(t=t&&t.loc)&&t.start<=t.end&&(r=t.lexer.input,n=t.start,i=t.end,n===r.length?a+=" at end of input: ":a+=" at position "+(n+1)+": ",t=r.slice(n,i).replace(/[^]/g,"$&̲"),a+=(15<n?"…"+r.slice(n-15,n):r.slice(0,n))+t+(i+15<r.length?r.slice(i,i+15)+"…":r.slice(i))),(t=new Error(a)).name="ParseError",t.__proto__=s.prototype,null!=(t.position=n)&&null!=i&&(t.length=i-n),t.rawMessage=e,t}}).prototype.__proto__=Error.prototype,fl=mt(function(e,t){return-1!==e.indexOf(t)},"contains"),f=mt(function(e,t){return void 0===e?t:e},"deflt"),Gi=/([A-Z])/g,Bl=mt(function(e){return e.replace(Gi,"-$1").toLowerCase()},"hyphenate"),Ui={"&":"&",">":">","<":"<",'"':""","'":"'"},qi=/[&><"']/g,mt(ci,"escape"),ji=mt(function e(t){return"ordgroup"===t.type||"color"===t.type?1===t.body.length?e(t.body[0]):t:"font"===t.type?e(t.body):t},"getBaseElem"),g=mt(function(e){return"mathord"===(e=ji(e)).type||"textord"===e.type||"atom"===e.type},"isCharacterBox"),Yi=mt(function(e){if(e)return e;throw new Error("Expected non-null, but got "+String(e))},"assert"),cl=mt(function(e){return(e=/^[\x00-\x20]*([^\\/#?]*?)(:|�*58|�*3a|&colon)/i.exec(e))?":"===e[2]&&/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(e[1])?e[1].toLowerCase():null:"_relative"},"protocolFromUrl"),Wi={contains:fl,deflt:f,escape:ci,hyphenate:Bl,getBaseElem:ji,isCharacterBox:g,protocolFromUrl:cl},Hi={displayMode:{type:"boolean",description:"Render math in display mode, which puts the math in display style (so \\int and \\sum are large, for example), and centers the math on the page on its own line.",cli:"-d, --display-mode"},output:{type:{enum:["htmlAndMathml","html","mathml"]},description:"Determines the markup language of the output.",cli:"-F, --format <type>"},leqno:{type:"boolean",description:"Render display math in leqno style (left-justified tags)."},fleqn:{type:"boolean",description:"Render display math flush left."},throwOnError:{type:"boolean",default:!0,cli:"-t, --no-throw-on-error",cliDescription:"Render errors (in the color given by --error-color) instead of throwing a ParseError exception when encountering an error."},errorColor:{type:"string",default:"#cc0000",cli:"-c, --error-color <color>",cliDescription:"A color string given in the format 'rgb' or 'rrggbb' (no #). This option determines the color of errors rendered by the -t option.",cliProcessor:mt(e=>"#"+e,"cliProcessor")},macros:{type:"object",cli:"-m, --macro <def>",cliDescription:"Define custom macro of the form '\\foo:expansion' (use multiple -m arguments for multiple macros).",cliDefault:[],cliProcessor:mt((e,t)=>(t.push(e),t),"cliProcessor")},minRuleThickness:{type:"number",description:"Specifies a minimum thickness, in ems, for fraction lines, `\\sqrt` top lines, `{array}` vertical lines, `\\hline`, `\\hdashline`, `\\underline`, `\\overline`, and the borders of `\\fbox`, `\\boxed`, and `\\fcolorbox`.",processor:mt(e=>Math.max(0,e),"processor"),cli:"--min-rule-thickness <size>",cliProcessor:parseFloat},colorIsTextColor:{type:"boolean",description:"Makes \\color behave like LaTeX's 2-argument \\textcolor, instead of LaTeX's one-argument \\color mode change.",cli:"-b, --color-is-text-color"},strict:{type:[{enum:["warn","ignore","error"]},"boolean","function"],description:"Turn on strict / LaTeX faithfulness mode, which throws an error if the input uses features that are not supported by LaTeX.",cli:"-S, --strict",cliDefault:!1},trust:{type:["boolean","function"],description:"Trust the input, enabling all HTML features such as \\url.",cli:"-T, --trust"},maxSize:{type:"number",default:1/0,description:"If non-zero, all user-specified sizes, e.g. in \\rule{500em}{500em}, will be capped to maxSize ems. Otherwise, elements and spaces can be arbitrarily large",processor:mt(e=>Math.max(0,e),"processor"),cli:"-s, --max-size <n>",cliProcessor:parseInt},maxExpand:{type:"number",default:1e3,description:"Limit the number of macro expansions to the specified number, to prevent e.g. infinite macro loops. If set to Infinity, the macro expander will try to fully expand as in LaTeX.",processor:mt(e=>Math.max(0,e),"processor"),cli:"-e, --max-expand <n>",cliProcessor:mt(e=>"Infinity"===e?1/0:parseInt(e),"cliProcessor")},globalGroup:{type:"boolean",cli:!1}},mt(hi,"getDefaultValue"),Vi=class{static{mt(this,"Settings")}constructor(e){for(var t in this.displayMode=void 0,this.output=void 0,this.leqno=void 0,this.fleqn=void 0,this.throwOnError=void 0,this.errorColor=void 0,this.macros=void 0,this.minRuleThickness=void 0,this.colorIsTextColor=void 0,this.strict=void 0,this.trust=void 0,this.maxSize=void 0,this.maxExpand=void 0,this.globalGroup=void 0,e=e||{},Hi){var r;Hi.hasOwnProperty(t)&&(r=Hi[t],this[t]=void 0!==e[t]?r.processor?r.processor(e[t]):e[t]:hi(r))}}reportNonstrict(e,t,r){var n=this.strict;if((n="function"==typeof n?n(e,t,r):n)&&"ignore"!==n){if(!0===n||"error"===n)throw new X("LaTeX-incompatible input and strict mode is set to 'error': "+t+" ["+e+"]",r);"warn"===n?typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+t+" ["+e+"]"):typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to unrecognized '"+n+"': "+t+" ["+e+"]")}}useStrictBehavior(e,t,r){var n=this.strict;if("function"==typeof n)try{n=n(e,t,r)}catch{n="error"}return!(!n||"ignore"===n||!0!==n&&"error"!==n&&("warn"===n?typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+t+" ["+e+"]"):typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to unrecognized '"+n+"': "+t+" ["+e+"]"),1))}isTrusted(e){if(e.url&&!e.protocol){var t=Wi.protocolFromUrl(e.url);if(null==t)return!1;e.protocol=t}return!!("function"==typeof this.trust?this.trust(e):this.trust)}},fl=class{static{mt(this,"Style")}constructor(e,t,r){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=e,this.size=t,this.cramped=r}sup(){return Xi[Ki[this.id]]}sub(){return Xi[Zi[this.id]]}fracNum(){return Xi[Qi[this.id]]}fracDen(){return Xi[Ji[this.id]]}cramp(){return Xi[ea[this.id]]}text(){return Xi[ta[this.id]]}isTight(){return 2<=this.size}},Xi=[new fl(0,0,!1),new fl(1,0,!0),new fl(2,1,!1),new fl(3,1,!0),new fl(4,2,!1),new fl(5,2,!0),new fl(6,3,!1),new fl(7,3,!0)],Ki=[4,5,4,5,6,7,6,7],Zi=[5,5,5,5,7,7,7,7],Qi=[2,3,4,5,6,7,6,7],Ji=[3,3,5,5,7,7,7,7],ea=[1,1,3,3,5,5,7,7],ta=[0,1,2,3,2,3,2,3],ra={DISPLAY:Xi[0],TEXT:Xi[2],SCRIPT:Xi[4],SCRIPTSCRIPT:Xi[6]},na=[{name:"latin",blocks:[[256,591],[768,879]]},{name:"cyrillic",blocks:[[1024,1279]]},{name:"armenian",blocks:[[1328,1423]]},{name:"brahmic",blocks:[[2304,4255]]},{name:"georgian",blocks:[[4256,4351]]},{name:"cjk",blocks:[[12288,12543],[19968,40879],[65280,65376]]},{name:"hangul",blocks:[[44032,55215]]}],mt(ui,"scriptFromCodepoint"),ia=[],na.forEach(e=>e.blocks.forEach(e=>ia.push(...e))),mt(di,"supportedCodepoint"),aa=mt(function(e,t){return"M95,"+(622+e+t)+` +c-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14 +c0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54 +c44.2,-33.3,65.8,-50.3,66.5,-51c1.3,-1.3,3,-2,5,-2c4.7,0,8.7,3.3,12,10 +s173,378,173,378c0.7,0,35.3,-71,104,-213c68.7,-142,137.5,-285,206.5,-429 +c69,-144,104.5,-217.7,106.5,-221 +l`+e/2.075+" -"+e+` +c5.3,-9.3,12,-14,20,-14 +H400000v`+(40+e)+`H845.2724 +s-225.272,467,-225.272,467s-235,486,-235,486c-2.7,4.7,-9,7,-19,7 +c-6,0,-10,-1,-12,-3s-194,-422,-194,-422s-65,47,-65,47z +M`+(834+e)+" "+t+"h400000v"+(40+e)+"h-400000z"},"sqrtMain"),sa=mt(function(e,t){return"M263,"+(601+e+t)+`c0.7,0,18,39.7,52,119 +c34,79.3,68.167,158.7,102.5,238c34.3,79.3,51.8,119.3,52.5,120 +c340,-704.7,510.7,-1060.3,512,-1067 +l`+e/2.084+" -"+e+` +c4.7,-7.3,11,-11,19,-11 +H40000v`+(40+e)+`H1012.3 +s-271.3,567,-271.3,567c-38.7,80.7,-84,175,-136,283c-52,108,-89.167,185.3,-111.5,232 +c-22.3,46.7,-33.8,70.3,-34.5,71c-4.7,4.7,-12.3,7,-23,7s-12,-1,-12,-1 +s-109,-253,-109,-253c-72.7,-168,-109.3,-252,-110,-252c-10.7,8,-22,16.7,-34,26 +c-22,17.3,-33.3,26,-34,26s-26,-26,-26,-26s76,-59,76,-59s76,-60,76,-60z +M`+(1001+e)+" "+t+"h400000v"+(40+e)+"h-400000z"},"sqrtSize1"),oa=mt(function(e,t){return"M983 "+(10+e+t)+` +l`+e/3.13+" -"+e+` +c4,-6.7,10,-10,18,-10 H400000v`+(40+e)+` +H1013.1s-83.4,268,-264.1,840c-180.7,572,-277,876.3,-289,913c-4.7,4.7,-12.7,7,-24,7 +s-12,0,-12,0c-1.3,-3.3,-3.7,-11.7,-7,-25c-35.3,-125.3,-106.7,-373.3,-214,-744 +c-10,12,-21,25,-33,39s-32,39,-32,39c-6,-5.3,-15,-14,-27,-26s25,-30,25,-30 +c26.7,-32.7,52,-63,76,-91s52,-60,52,-60s208,722,208,722 +c56,-175.3,126.3,-397.3,211,-666c84.7,-268.7,153.8,-488.2,207.5,-658.5 +c53.7,-170.3,84.5,-266.8,92.5,-289.5z +M`+(1001+e)+" "+t+"h400000v"+(40+e)+"h-400000z"},"sqrtSize2"),la=mt(function(e,t){return"M424,"+(2398+e+t)+` +c-1.3,-0.7,-38.5,-172,-111.5,-514c-73,-342,-109.8,-513.3,-110.5,-514 +c0,-2,-10.7,14.3,-32,49c-4.7,7.3,-9.8,15.7,-15.5,25c-5.7,9.3,-9.8,16,-12.5,20 +s-5,7,-5,7c-4,-3.3,-8.3,-7.7,-13,-13s-13,-13,-13,-13s76,-122,76,-122s77,-121,77,-121 +s209,968,209,968c0,-2,84.7,-361.7,254,-1079c169.3,-717.3,254.7,-1077.7,256,-1081 +l`+e/4.223+" -"+e+`c4,-6.7,10,-10,18,-10 H400000 +v`+(40+e)+`H1014.6 +s-87.3,378.7,-272.6,1166c-185.3,787.3,-279.3,1182.3,-282,1185 +c-2,6,-10,9,-24,9 +c-8,0,-12,-0.7,-12,-2z M`+(1001+e)+" "+t+` +h400000v`+(40+e)+"h-400000z"},"sqrtSize3"),ca=mt(function(e,t){return"M473,"+(2713+e+t)+` +c339.3,-1799.3,509.3,-2700,510,-2702 l`+e/5.298+" -"+e+` +c3.3,-7.3,9.3,-11,18,-11 H400000v`+(40+e)+`H1017.7 +s-90.5,478,-276.2,1466c-185.7,988,-279.5,1483,-281.5,1485c-2,6,-10,9,-24,9 +c-8,0,-12,-0.7,-12,-2c0,-1.3,-5.3,-32,-16,-92c-50.7,-293.3,-119.7,-693.3,-207,-1200 +c0,-1.3,-5.3,8.7,-16,30c-10.7,21.3,-21.3,42.7,-32,64s-16,33,-16,33s-26,-26,-26,-26 +s76,-153,76,-153s77,-151,77,-151c0.7,0.7,35.7,202,105,604c67.3,400.7,102,602.7,104, +606zM`+(1001+e)+" "+t+"h400000v"+(40+e)+"H1017.7z"},"sqrtSize4"),ha=mt(function(e){return"M400000 "+e+" H0 L"+e/2+" 0 l65 45 L145 "+(e-80)+" H400000z"},"phasePath"),ua=mt(function(e,t,r){return"M702 "+(e+t)+"H400000"+(40+e)+` +H742v`+(r-54-t-e)+`l-4 4-4 4c-.667.7 -2 1.5-4 2.5s-4.167 1.833-6.5 2.5-5.5 1-9.5 1 +h-12l-28-84c-16.667-52-96.667 -294.333-240-727l-212 -643 -85 170 +c-4-3.333-8.333-7.667-13 -13l-13-13l77-155 77-156c66 199.333 139 419.667 +219 661 l218 661zM702 `+t+"H400000v"+(40+e)+"H742z"},"sqrtTall"),da=mt(function(e,t,r){t*=1e3;var n="";switch(e){case"sqrtMain":n=aa(t,80);break;case"sqrtSize1":n=sa(t,80);break;case"sqrtSize2":n=oa(t,80);break;case"sqrtSize3":n=la(t,80);break;case"sqrtSize4":n=ca(t,80);break;case"sqrtTall":n=ua(t,80,r)}return n},"sqrtPath"),pa=mt(function(e,t){switch(e){case"⎜":return"M291 0 H417 V"+t+" H291z M291 0 H417 V"+t+" H291z";case"∣":return"M145 0 H188 V"+t+" H145z M145 0 H188 V"+t+" H145z";case"∥":return"M145 0 H188 V"+t+" H145z M145 0 H188 V"+t+" H145zM367 0 H410 V"+t+" H367z M367 0 H410 V"+t+" H367z";case"⎟":return"M457 0 H583 V"+t+" H457z M457 0 H583 V"+t+" H457z";case"⎢":return"M319 0 H403 V"+t+" H319z M319 0 H403 V"+t+" H319z";case"⎥":return"M263 0 H347 V"+t+" H263z M263 0 H347 V"+t+" H263z";case"⎪":return"M384 0 H504 V"+t+" H384z M384 0 H504 V"+t+" H384z";case"⏐":return"M312 0 H355 V"+t+" H312z M312 0 H355 V"+t+" H312z";case"‖":return"M257 0 H300 V"+t+" H257z M257 0 H300 V"+t+" H257zM478 0 H521 V"+t+" H478z M478 0 H521 V"+t+" H478z";default:return""}},"innerPath"),ga={doubleleftarrow:`M262 157 +l10-10c34-36 62.7-77 86-123 3.3-8 5-13.3 5-16 0-5.3-6.7-8-20-8-7.3 + 0-12.2.5-14.5 1.5-2.3 1-4.8 4.5-7.5 10.5-49.3 97.3-121.7 169.3-217 216-28 + 14-57.3 25-88 33-6.7 2-11 3.8-13 5.5-2 1.7-3 4.2-3 7.5s1 5.8 3 7.5 +c2 1.7 6.3 3.5 13 5.5 68 17.3 128.2 47.8 180.5 91.5 52.3 43.7 93.8 96.2 124.5 + 157.5 9.3 8 15.3 12.3 18 13h6c12-.7 18-4 18-10 0-2-1.7-7-5-15-23.3-46-52-87 +-86-123l-10-10h399738v-40H218c328 0 0 0 0 0l-10-8c-26.7-20-65.7-43-117-69 2.7 +-2 6-3.7 10-5 36.7-16 72.3-37.3 107-64l10-8h399782v-40z +m8 0v40h399730v-40zm0 194v40h399730v-40z`,doublerightarrow:`M399738 392l +-10 10c-34 36-62.7 77-86 123-3.3 8-5 13.3-5 16 0 5.3 6.7 8 20 8 7.3 0 12.2-.5 + 14.5-1.5 2.3-1 4.8-4.5 7.5-10.5 49.3-97.3 121.7-169.3 217-216 28-14 57.3-25 88 +-33 6.7-2 11-3.8 13-5.5 2-1.7 3-4.2 3-7.5s-1-5.8-3-7.5c-2-1.7-6.3-3.5-13-5.5-68 +-17.3-128.2-47.8-180.5-91.5-52.3-43.7-93.8-96.2-124.5-157.5-9.3-8-15.3-12.3-18 +-13h-6c-12 .7-18 4-18 10 0 2 1.7 7 5 15 23.3 46 52 87 86 123l10 10H0v40h399782 +c-328 0 0 0 0 0l10 8c26.7 20 65.7 43 117 69-2.7 2-6 3.7-10 5-36.7 16-72.3 37.3 +-107 64l-10 8H0v40zM0 157v40h399730v-40zm0 194v40h399730v-40z`,leftarrow:`M400000 241H110l3-3c68.7-52.7 113.7-120 + 135-202 4-14.7 6-23 6-25 0-7.3-7-11-21-11-8 0-13.2.8-15.5 2.5-2.3 1.7-4.2 5.8 +-5.5 12.5-1.3 4.7-2.7 10.3-4 17-12 48.7-34.8 92-68.5 130S65.3 228.3 18 247 +c-10 4-16 7.7-18 11 0 8.7 6 14.3 18 17 47.3 18.7 87.8 47 121.5 85S196 441.3 208 + 490c.7 2 1.3 5 2 9s1.2 6.7 1.5 8c.3 1.3 1 3.3 2 6s2.2 4.5 3.5 5.5c1.3 1 3.3 + 1.8 6 2.5s6 1 10 1c14 0 21-3.7 21-11 0-2-2-10.3-6-25-20-79.3-65-146.7-135-202 + l-3-3h399890zM100 241v40h399900v-40z`,leftbrace:`M6 548l-6-6v-35l6-11c56-104 135.3-181.3 238-232 57.3-28.7 117 +-45 179-50h399577v120H403c-43.3 7-81 15-113 26-100.7 33-179.7 91-237 174-2.7 + 5-6 9-10 13-.7 1-7.3 1-20 1H6z`,leftbraceunder:`M0 6l6-6h17c12.688 0 19.313.3 20 1 4 4 7.313 8.3 10 13 + 35.313 51.3 80.813 93.8 136.5 127.5 55.688 33.7 117.188 55.8 184.5 66.5.688 + 0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7 +-331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z`,leftgroup:`M400000 80 +H435C64 80 168.3 229.4 21 260c-5.9 1.2-18 0-18 0-2 0-3-1-3-3v-38C76 61 257 0 + 435 0h399565z`,leftgroupunder:`M400000 262 +H435C64 262 168.3 112.6 21 82c-5.9-1.2-18 0-18 0-2 0-3 1-3 3v38c76 158 257 219 + 435 219h399565z`,leftharpoon:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3 +-3.3 10.2-9.5 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5 +-18.3 3-21-1.3-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7 +-196 228-6.7 4.7-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40z`,leftharpoonplus:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3-3.3 10.2-9.5 + 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5-18.3 3-21-1.3 +-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7-196 228-6.7 4.7 +-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40zM0 435v40h400000v-40z +m0 0v40h400000v-40z`,leftharpoondown:`M7 241c-4 4-6.333 8.667-7 14 0 5.333.667 9 2 11s5.333 + 5.333 12 10c90.667 54 156 130 196 228 3.333 10.667 6.333 16.333 9 17 2 .667 5 + 1 9 1h5c10.667 0 16.667-2 18-6 2-2.667 1-9.667-3-21-32-87.333-82.667-157.667 +-152-211l-3-3h399907v-40zM93 281 H400000 v-40L7 241z`,leftharpoondownplus:`M7 435c-4 4-6.3 8.7-7 14 0 5.3.7 9 2 11s5.3 5.3 12 + 10c90.7 54 156 130 196 228 3.3 10.7 6.3 16.3 9 17 2 .7 5 1 9 1h5c10.7 0 16.7 +-2 18-6 2-2.7 1-9.7-3-21-32-87.3-82.7-157.7-152-211l-3-3h399907v-40H7zm93 0 +v40h399900v-40zM0 241v40h399900v-40zm0 0v40h399900v-40z`,lefthook:`M400000 281 H103s-33-11.2-61-33.5S0 197.3 0 164s14.2-61.2 42.5 +-83.5C70.8 58.2 104 47 142 47 c16.7 0 25 6.7 25 20 0 12-8.7 18.7-26 20-40 3.3 +-68.7 15.7-86 37-10 12-15 25.3-15 40 0 22.7 9.8 40.7 29.5 54 19.7 13.3 43.5 21 + 71.5 23h399859zM103 281v-40h399897v40z`,leftlinesegment:`M40 281 V428 H0 V94 H40 V241 H400000 v40z +M40 281 V428 H0 V94 H40 V241 H400000 v40z`,leftmapsto:`M40 281 V448H0V74H40V241H400000v40z +M40 281 V448H0V74H40V241H400000v40z`,leftToFrom:`M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23 +-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69-70-101l-7-8h399905v-40H95l7-8 +c28.7-32 52-65.7 70-101 10.7-23.3 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 265.3 + 68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z`,longequal:`M0 50 h400000 v40H0z m0 194h40000v40H0z +M0 50 h400000 v40H0z m0 194h40000v40H0z`,midbrace:`M200428 334 +c-100.7-8.3-195.3-44-280-108-55.3-42-101.7-93-139-153l-9-14c-2.7 4-5.7 8.7-9 14 +-53.3 86.7-123.7 153-211 199-66.7 36-137.3 56.3-212 62H0V214h199568c178.3-11.7 + 311.7-78.3 403-201 6-8 9.7-12 11-12 .7-.7 6.7-1 18-1s17.3.3 18 1c1.3 0 5 4 11 + 12 44.7 59.3 101.3 106.3 170 141s145.3 54.3 229 60h199572v120z`,midbraceunder:`M199572 214 +c100.7 8.3 195.3 44 280 108 55.3 42 101.7 93 139 153l9 14c2.7-4 5.7-8.7 9-14 + 53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3 + 11.7-311.7 78.3-403 201-6 8-9.7 12-11 12-.7.7-6.7 1-18 1s-17.3-.3-18-1c-1.3 0 +-5-4-11-12-44.7-59.3-101.3-106.3-170-141s-145.3-54.3-229-60H0V214z`,oiintSize1:`M512.6 71.6c272.6 0 320.3 106.8 320.3 178.2 0 70.8-47.7 177.6 +-320.3 177.6S193.1 320.6 193.1 249.8c0-71.4 46.9-178.2 319.5-178.2z +m368.1 178.2c0-86.4-60.9-215.4-368.1-215.4-306.4 0-367.3 129-367.3 215.4 0 85.8 +60.9 214.8 367.3 214.8 307.2 0 368.1-129 368.1-214.8z`,oiintSize2:`M757.8 100.1c384.7 0 451.1 137.6 451.1 230 0 91.3-66.4 228.8 +-451.1 228.8-386.3 0-452.7-137.5-452.7-228.8 0-92.4 66.4-230 452.7-230z +m502.4 230c0-111.2-82.4-277.2-502.4-277.2s-504 166-504 277.2 +c0 110 84 276 504 276s502.4-166 502.4-276z`,oiiintSize1:`M681.4 71.6c408.9 0 480.5 106.8 480.5 178.2 0 70.8-71.6 177.6 +-480.5 177.6S202.1 320.6 202.1 249.8c0-71.4 70.5-178.2 479.3-178.2z +m525.8 178.2c0-86.4-86.8-215.4-525.7-215.4-437.9 0-524.7 129-524.7 215.4 0 +85.8 86.8 214.8 524.7 214.8 438.9 0 525.7-129 525.7-214.8z`,oiiintSize2:`M1021.2 53c603.6 0 707.8 165.8 707.8 277.2 0 110-104.2 275.8 +-707.8 275.8-606 0-710.2-165.8-710.2-275.8C311 218.8 415.2 53 1021.2 53z +m770.4 277.1c0-131.2-126.4-327.6-770.5-327.6S248.4 198.9 248.4 330.1 +c0 130 128.8 326.4 772.7 326.4s770.5-196.4 770.5-326.4z`,rightarrow:`M0 241v40h399891c-47.3 35.3-84 78-110 128 +-16.7 32-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 + 11 8 0 13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 + 39-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85 +-40.5-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5 +-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67 + 151.7 139 205zm0 0v40h399900v-40z`,rightbrace:`M400000 542l +-6 6h-17c-12.7 0-19.3-.3-20-1-4-4-7.3-8.3-10-13-35.3-51.3-80.8-93.8-136.5-127.5 +s-117.2-55.8-184.5-66.5c-.7 0-2-.3-4-1-18.7-2.7-76-4.3-172-5H0V214h399571l6 1 +c124.7 8 235 61.7 331 161 31.3 33.3 59.7 72.7 85 118l7 13v35z`,rightbraceunder:`M399994 0l6 6v35l-6 11c-56 104-135.3 181.3-238 232-57.3 + 28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237 +-174 2.7-5 6-9 10-13 .7-1 7.3-1 20-1h17z`,rightgroup:`M0 80h399565c371 0 266.7 149.4 414 180 5.9 1.2 18 0 18 0 2 0 + 3-1 3-3v-38c-76-158-257-219-435-219H0z`,rightgroupunder:`M0 262h399565c371 0 266.7-149.4 414-180 5.9-1.2 18 0 18 + 0 2 0 3 1 3 3v38c-76 158-257 219-435 219H0z`,rightharpoon:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3 +-3.7-15.3-11-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2 +-10.7 0-16.7 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 + 69.2 92 94.5zm0 0v40h399900v-40z`,rightharpoonplus:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3-3.7-15.3-11 +-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2-10.7 0-16.7 + 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 69.2 92 94.5z +m0 0v40h399900v-40z m100 194v40h399900v-40zm0 0v40h399900v-40z`,rightharpoondown:`M399747 511c0 7.3 6.7 11 20 11 8 0 13-.8 15-2.5s4.7-6.8 + 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 8.5-5.8 9.5 +-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3-64.7 57-92 95 +-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 241v40h399900v-40z`,rightharpoondownplus:`M399747 705c0 7.3 6.7 11 20 11 8 0 13-.8 + 15-2.5s4.7-6.8 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 + 8.5-5.8 9.5-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3 +-64.7 57-92 95-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 435v40h399900v-40z +m0-194v40h400000v-40zm0 0v40h400000v-40z`,righthook:`M399859 241c-764 0 0 0 0 0 40-3.3 68.7-15.7 86-37 10-12 15-25.3 + 15-40 0-22.7-9.8-40.7-29.5-54-19.7-13.3-43.5-21-71.5-23-17.3-1.3-26-8-26-20 0 +-13.3 8.7-20 26-20 38 0 71 11.2 99 33.5 0 0 7 5.6 21 16.7 14 11.2 21 33.5 21 + 66.8s-14 61.2-42 83.5c-28 22.3-61 33.5-99 33.5L0 241z M0 281v-40h399859v40z`,rightlinesegment:`M399960 241 V94 h40 V428 h-40 V281 H0 v-40z +M399960 241 V94 h40 V428 h-40 V281 H0 v-40z`,rightToFrom:`M400000 167c-70.7-42-118-97.7-142-167h-23c-15.3 0-23 .3-23 + 1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8H0v40h399905l-7 8c-28.7 32 +-52 65.7-70 101-10.7 23.3-16 35.7-16 37 0 .7 7.7 1 23 1h23c24-69.3 71.3-125 142 +-167z M100 147v40h399900v-40zM0 341v40h399900v-40z`,twoheadleftarrow:`M0 167c68 40 + 115.7 95.7 143 167h22c15.3 0 23-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69 +-70-101l-7-8h125l9 7c50.7 39.3 85 86 103 140h46c0-4.7-6.3-18.7-19-42-18-35.3 +-40-67.3-66-96l-9-9h399716v-40H284l9-9c26-28.7 48-60.7 66-96 12.7-23.333 19 +-37.333 19-42h-46c-18 54-52.3 100.7-103 140l-9 7H95l7-8c28.7-32 52-65.7 70-101 + 10.7-23.333 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 71.3 68 127 0 167z`,twoheadrightarrow:`M400000 167 +c-68-40-115.7-95.7-143-167h-22c-15.3 0-23 .3-23 1 0 1.3 5.3 13.7 16 37 18 35.3 + 41.3 69 70 101l7 8h-125l-9-7c-50.7-39.3-85-86-103-140h-46c0 4.7 6.3 18.7 19 42 + 18 35.3 40 67.3 66 96l9 9H0v40h399716l-9 9c-26 28.7-48 60.7-66 96-12.7 23.333 +-19 37.333-19 42h46c18-54 52.3-100.7 103-140l9-7h125l-7 8c-28.7 32-52 65.7-70 + 101-10.7 23.333-16 35.7-16 37 0 .7 7.7 1 23 1h22c27.3-71.3 75-127 143-167z`,tilde1:`M200 55.538c-77 0-168 73.953-177 73.953-3 0-7 +-2.175-9-5.437L2 97c-1-2-2-4-2-6 0-4 2-7 5-9l20-12C116 12 171 0 207 0c86 0 + 114 68 191 68 78 0 168-68 177-68 4 0 7 2 9 5l12 19c1 2.175 2 4.35 2 6.525 0 + 4.35-2 7.613-5 9.788l-19 13.05c-92 63.077-116.937 75.308-183 76.128 +-68.267.847-113-73.952-191-73.952z`,tilde2:`M344 55.266c-142 0-300.638 81.316-311.5 86.418 +-8.01 3.762-22.5 10.91-23.5 5.562L1 120c-1-2-1-3-1-4 0-5 3-9 8-10l18.4-9C160.9 + 31.9 283 0 358 0c148 0 188 122 331 122s314-97 326-97c4 0 8 2 10 7l7 21.114 +c1 2.14 1 3.21 1 4.28 0 5.347-3 9.626-7 10.696l-22.3 12.622C852.6 158.372 751 + 181.476 676 181.476c-149 0-189-126.21-332-126.21z`,tilde3:`M786 59C457 59 32 175.242 13 175.242c-6 0-10-3.457 +-11-10.37L.15 138c-1-7 3-12 10-13l19.2-6.4C378.4 40.7 634.3 0 804.3 0c337 0 + 411.8 157 746.8 157 328 0 754-112 773-112 5 0 10 3 11 9l1 14.075c1 8.066-.697 + 16.595-6.697 17.492l-21.052 7.31c-367.9 98.146-609.15 122.696-778.15 122.696 + -338 0-409-156.573-744-156.573z`,tilde4:`M786 58C457 58 32 177.487 13 177.487c-6 0-10-3.345 +-11-10.035L.15 143c-1-7 3-12 10-13l22-6.7C381.2 35 637.15 0 807.15 0c337 0 409 + 177 744 177 328 0 754-127 773-127 5 0 10 3 11 9l1 14.794c1 7.805-3 13.38-9 + 14.495l-20.7 5.574c-366.85 99.79-607.3 139.372-776.3 139.372-338 0-409 + -175.236-744-175.236z`,vec:`M377 20c0-5.333 1.833-10 5.5-14S391 0 397 0c4.667 0 8.667 1.667 12 5 +3.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11 +10.667 11 18 0 6-1 10-3 12s-6.667 5-14 9c-28.667 14.667-53.667 35.667-75 63 +-1.333 1.333-3.167 3.5-5.5 6.5s-4 4.833-5 5.5c-1 .667-2.5 1.333-4.5 2s-4.333 1 +-7 1c-4.667 0-9.167-1.833-13.5-5.5S337 184 337 178c0-12.667 15.667-32.333 47-59 +H213l-171-1c-8.667-6-13-12.333-13-19 0-4.667 4.333-11.333 13-20h359 +c-16-25.333-24-45-24-59z`,widehat1:`M529 0h5l519 115c5 1 9 5 9 10 0 1-1 2-1 3l-4 22 +c-1 5-5 9-11 9h-2L532 67 19 159h-2c-5 0-9-4-11-9l-5-22c-1-6 2-12 8-13z`,widehat2:`M1181 0h2l1171 176c6 0 10 5 10 11l-2 23c-1 6-5 10 +-11 10h-1L1182 67 15 220h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat3:`M1181 0h2l1171 236c6 0 10 5 10 11l-2 23c-1 6-5 10 +-11 10h-1L1182 67 15 280h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat4:`M1181 0h2l1171 296c6 0 10 5 10 11l-2 23c-1 6-5 10 +-11 10h-1L1182 67 15 340h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widecheck1:`M529,159h5l519,-115c5,-1,9,-5,9,-10c0,-1,-1,-2,-1,-3l-4,-22c-1, +-5,-5,-9,-11,-9h-2l-512,92l-513,-92h-2c-5,0,-9,4,-11,9l-5,22c-1,6,2,12,8,13z`,widecheck2:`M1181,220h2l1171,-176c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10, +-11,-10h-1l-1168,153l-1167,-153h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck3:`M1181,280h2l1171,-236c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10, +-11,-10h-1l-1168,213l-1167,-213h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck4:`M1181,340h2l1171,-296c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10, +-11,-10h-1l-1168,273l-1167,-273h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,baraboveleftarrow:`M400000 620h-399890l3 -3c68.7 -52.7 113.7 -120 135 -202 +c4 -14.7 6 -23 6 -25c0 -7.3 -7 -11 -21 -11c-8 0 -13.2 0.8 -15.5 2.5 +c-2.3 1.7 -4.2 5.8 -5.5 12.5c-1.3 4.7 -2.7 10.3 -4 17c-12 48.7 -34.8 92 -68.5 130 +s-74.2 66.3 -121.5 85c-10 4 -16 7.7 -18 11c0 8.7 6 14.3 18 17c47.3 18.7 87.8 47 +121.5 85s56.5 81.3 68.5 130c0.7 2 1.3 5 2 9s1.2 6.7 1.5 8c0.3 1.3 1 3.3 2 6 +s2.2 4.5 3.5 5.5c1.3 1 3.3 1.8 6 2.5s6 1 10 1c14 0 21 -3.7 21 -11 +c0 -2 -2 -10.3 -6 -25c-20 -79.3 -65 -146.7 -135 -202l-3 -3h399890z +M100 620v40h399900v-40z M0 241v40h399900v-40zM0 241v40h399900v-40z`,rightarrowabovebar:`M0 241v40h399891c-47.3 35.3-84 78-110 128-16.7 32 +-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 11 8 0 +13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 39 +-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85-40.5 +-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5 +-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67 +151.7 139 205zm96 379h399894v40H0zm0 0h399904v40H0z`,baraboveshortleftharpoon:`M507,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11 +c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17 +c2,0.7,5,1,9,1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21 +c-32,-87.3,-82.7,-157.7,-152,-211c0,0,-3,-3,-3,-3l399351,0l0,-40 +c-398570,0,-399437,0,-399437,0z M593 435 v40 H399500 v-40z +M0 281 v-40 H399908 v40z M0 281 v-40 H399908 v40z`,rightharpoonaboveshortbar:`M0,241 l0,40c399126,0,399993,0,399993,0 +c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199, +-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6 +c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z +M0 241 v40 H399908 v-40z M0 475 v-40 H399500 v40z M0 475 v-40 H399500 v40z`,shortbaraboveleftharpoon:`M7,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11 +c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17c2,0.7,5,1,9, +1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21c-32,-87.3,-82.7,-157.7, +-152,-211c0,0,-3,-3,-3,-3l399907,0l0,-40c-399126,0,-399993,0,-399993,0z +M93 435 v40 H400000 v-40z M500 241 v40 H400000 v-40z M500 241 v40 H400000 v-40z`,shortrightharpoonabovebar:`M53,241l0,40c398570,0,399437,0,399437,0 +c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199, +-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6 +c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z +M500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z`},fa=mt(function(e,t){switch(e){case"lbrack":return"M403 1759 V84 H666 V0 H319 V1759 v"+t+` v1759 h347 v-84 +H403z M403 1759 V0 H319 V1759 v`+t+" v1759 h84z";case"rbrack":return"M347 1759 V0 H0 V84 H263 V1759 v"+t+` v1759 H0 v84 H347z +M347 1759 V0 H263 V1759 v`+t+" v1759 h84z";case"vert":return"M145 15 v585 v"+t+` v585 c2.667,10,9.667,15,21,15 +c10,0,16.667,-5,20,-15 v-585 v`+-t+` v-585 c-2.667,-10,-9.667,-15,-21,-15 +c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+t+" v585 h43z";case"doublevert":return"M145 15 v585 v"+t+` v585 c2.667,10,9.667,15,21,15 +c10,0,16.667,-5,20,-15 v-585 v`+-t+` v-585 c-2.667,-10,-9.667,-15,-21,-15 +c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+t+` v585 h43z +M367 15 v585 v`+t+` v585 c2.667,10,9.667,15,21,15 +c10,0,16.667,-5,20,-15 v-585 v`+-t+` v-585 c-2.667,-10,-9.667,-15,-21,-15 +c-10,0,-16.667,5,-20,15z M410 15 H367 v585 v`+t+" v585 h43z";case"lfloor":return"M319 602 V0 H403 V602 v"+t+` v1715 h263 v84 H319z +MM319 602 V0 H403 V602 v`+t+" v1715 H319z";case"rfloor":return"M319 602 V0 H403 V602 v"+t+` v1799 H0 v-84 H319z +MM319 602 V0 H403 V602 v`+t+" v1715 H319z";case"lceil":return"M403 1759 V84 H666 V0 H319 V1759 v"+t+` v602 h84z +M403 1759 V0 H319 V1759 v`+t+" v602 h84z";case"rceil":return"M347 1759 V0 H0 V84 H263 V1759 v"+t+` v602 h84z +M347 1759 V0 h-84 V1759 v`+t+" v602 h84z";case"lparen":return`M863,9c0,-2,-2,-5,-6,-9c0,0,-17,0,-17,0c-12.7,0,-19.3,0.3,-20,1 +c-5.3,5.3,-10.3,11,-15,17c-242.7,294.7,-395.3,682,-458,1162c-21.3,163.3,-33.3,349, +-36,557 l0,`+(t+84)+`c0.2,6,0,26,0,60c2,159.3,10,310.7,24,454c53.3,528,210, +949.7,470,1265c4.7,6,9.7,11.7,15,17c0.7,0.7,7,1,19,1c0,0,18,0,18,0c4,-4,6,-7,6,-9 +c0,-2.7,-3.3,-8.7,-10,-18c-135.3,-192.7,-235.5,-414.3,-300.5,-665c-65,-250.7,-102.5, +-544.7,-112.5,-882c-2,-104,-3,-167,-3,-189 +l0,-`+(t+92)+`c0,-162.7,5.7,-314,17,-454c20.7,-272,63.7,-513,129,-723c65.3, +-210,155.3,-396.3,270,-559c6.7,-9.3,10,-15.3,10,-18z`;case"rparen":return`M76,0c-16.7,0,-25,3,-25,9c0,2,2,6.3,6,13c21.3,28.7,42.3,60.3, +63,95c96.7,156.7,172.8,332.5,228.5,527.5c55.7,195,92.8,416.5,111.5,664.5 +c11.3,139.3,17,290.7,17,454c0,28,1.7,43,3.3,45l0,`+(t+9)+` +c-3,4,-3.3,16.7,-3.3,38c0,162,-5.7,313.7,-17,455c-18.7,248,-55.8,469.3,-111.5,664 +c-55.7,194.7,-131.8,370.3,-228.5,527c-20.7,34.7,-41.7,66.3,-63,95c-2,3.3,-4,7,-6,11 +c0,7.3,5.7,11,17,11c0,0,11,0,11,0c9.3,0,14.3,-0.3,15,-1c5.3,-5.3,10.3,-11,15,-17 +c242.7,-294.7,395.3,-681.7,458,-1161c21.3,-164.7,33.3,-350.7,36,-558 +l0,-`+(t+144)+`c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7, +-470,-1265c-4.7,-6,-9.7,-11.7,-15,-17c-0.7,-0.7,-6.7,-1,-18,-1z`;default:throw new Error("Unknown stretchy delimiter.")}},"tallDelim"),ma=class{static{mt(this,"DocumentFragment")}constructor(e){this.children=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.children=e,this.classes=[],this.height=0,this.depth=0,this.maxFontSize=0,this.style={}}hasClass(e){return Wi.contains(this.classes,e)}toNode(){for(var e=document.createDocumentFragment(),t=0;t<this.children.length;t++)e.appendChild(this.children[t].toNode());return e}toMarkup(){for(var e="",t=0;t<this.children.length;t++)e+=this.children[t].toMarkup();return e}toText(){var e=mt(e=>e.toText(),"toText");return this.children.map(e).join("")}},ya={"AMS-Regular":{32:[0,0,0,0,.25],65:[0,.68889,0,0,.72222],66:[0,.68889,0,0,.66667],67:[0,.68889,0,0,.72222],68:[0,.68889,0,0,.72222],69:[0,.68889,0,0,.66667],70:[0,.68889,0,0,.61111],71:[0,.68889,0,0,.77778],72:[0,.68889,0,0,.77778],73:[0,.68889,0,0,.38889],74:[.16667,.68889,0,0,.5],75:[0,.68889,0,0,.77778],76:[0,.68889,0,0,.66667],77:[0,.68889,0,0,.94445],78:[0,.68889,0,0,.72222],79:[.16667,.68889,0,0,.77778],80:[0,.68889,0,0,.61111],81:[.16667,.68889,0,0,.77778],82:[0,.68889,0,0,.72222],83:[0,.68889,0,0,.55556],84:[0,.68889,0,0,.66667],85:[0,.68889,0,0,.72222],86:[0,.68889,0,0,.72222],87:[0,.68889,0,0,1],88:[0,.68889,0,0,.72222],89:[0,.68889,0,0,.72222],90:[0,.68889,0,0,.66667],107:[0,.68889,0,0,.55556],160:[0,0,0,0,.25],165:[0,.675,.025,0,.75],174:[.15559,.69224,0,0,.94666],240:[0,.68889,0,0,.55556],295:[0,.68889,0,0,.54028],710:[0,.825,0,0,2.33334],732:[0,.9,0,0,2.33334],770:[0,.825,0,0,2.33334],771:[0,.9,0,0,2.33334],989:[.08167,.58167,0,0,.77778],1008:[0,.43056,.04028,0,.66667],8245:[0,.54986,0,0,.275],8463:[0,.68889,0,0,.54028],8487:[0,.68889,0,0,.72222],8498:[0,.68889,0,0,.55556],8502:[0,.68889,0,0,.66667],8503:[0,.68889,0,0,.44445],8504:[0,.68889,0,0,.66667],8513:[0,.68889,0,0,.63889],8592:[-.03598,.46402,0,0,.5],8594:[-.03598,.46402,0,0,.5],8602:[-.13313,.36687,0,0,1],8603:[-.13313,.36687,0,0,1],8606:[.01354,.52239,0,0,1],8608:[.01354,.52239,0,0,1],8610:[.01354,.52239,0,0,1.11111],8611:[.01354,.52239,0,0,1.11111],8619:[0,.54986,0,0,1],8620:[0,.54986,0,0,1],8621:[-.13313,.37788,0,0,1.38889],8622:[-.13313,.36687,0,0,1],8624:[0,.69224,0,0,.5],8625:[0,.69224,0,0,.5],8630:[0,.43056,0,0,1],8631:[0,.43056,0,0,1],8634:[.08198,.58198,0,0,.77778],8635:[.08198,.58198,0,0,.77778],8638:[.19444,.69224,0,0,.41667],8639:[.19444,.69224,0,0,.41667],8642:[.19444,.69224,0,0,.41667],8643:[.19444,.69224,0,0,.41667],8644:[.1808,.675,0,0,1],8646:[.1808,.675,0,0,1],8647:[.1808,.675,0,0,1],8648:[.19444,.69224,0,0,.83334],8649:[.1808,.675,0,0,1],8650:[.19444,.69224,0,0,.83334],8651:[.01354,.52239,0,0,1],8652:[.01354,.52239,0,0,1],8653:[-.13313,.36687,0,0,1],8654:[-.13313,.36687,0,0,1],8655:[-.13313,.36687,0,0,1],8666:[.13667,.63667,0,0,1],8667:[.13667,.63667,0,0,1],8669:[-.13313,.37788,0,0,1],8672:[-.064,.437,0,0,1.334],8674:[-.064,.437,0,0,1.334],8705:[0,.825,0,0,.5],8708:[0,.68889,0,0,.55556],8709:[.08167,.58167,0,0,.77778],8717:[0,.43056,0,0,.42917],8722:[-.03598,.46402,0,0,.5],8724:[.08198,.69224,0,0,.77778],8726:[.08167,.58167,0,0,.77778],8733:[0,.69224,0,0,.77778],8736:[0,.69224,0,0,.72222],8737:[0,.69224,0,0,.72222],8738:[.03517,.52239,0,0,.72222],8739:[.08167,.58167,0,0,.22222],8740:[.25142,.74111,0,0,.27778],8741:[.08167,.58167,0,0,.38889],8742:[.25142,.74111,0,0,.5],8756:[0,.69224,0,0,.66667],8757:[0,.69224,0,0,.66667],8764:[-.13313,.36687,0,0,.77778],8765:[-.13313,.37788,0,0,.77778],8769:[-.13313,.36687,0,0,.77778],8770:[-.03625,.46375,0,0,.77778],8774:[.30274,.79383,0,0,.77778],8776:[-.01688,.48312,0,0,.77778],8778:[.08167,.58167,0,0,.77778],8782:[.06062,.54986,0,0,.77778],8783:[.06062,.54986,0,0,.77778],8785:[.08198,.58198,0,0,.77778],8786:[.08198,.58198,0,0,.77778],8787:[.08198,.58198,0,0,.77778],8790:[0,.69224,0,0,.77778],8791:[.22958,.72958,0,0,.77778],8796:[.08198,.91667,0,0,.77778],8806:[.25583,.75583,0,0,.77778],8807:[.25583,.75583,0,0,.77778],8808:[.25142,.75726,0,0,.77778],8809:[.25142,.75726,0,0,.77778],8812:[.25583,.75583,0,0,.5],8814:[.20576,.70576,0,0,.77778],8815:[.20576,.70576,0,0,.77778],8816:[.30274,.79383,0,0,.77778],8817:[.30274,.79383,0,0,.77778],8818:[.22958,.72958,0,0,.77778],8819:[.22958,.72958,0,0,.77778],8822:[.1808,.675,0,0,.77778],8823:[.1808,.675,0,0,.77778],8828:[.13667,.63667,0,0,.77778],8829:[.13667,.63667,0,0,.77778],8830:[.22958,.72958,0,0,.77778],8831:[.22958,.72958,0,0,.77778],8832:[.20576,.70576,0,0,.77778],8833:[.20576,.70576,0,0,.77778],8840:[.30274,.79383,0,0,.77778],8841:[.30274,.79383,0,0,.77778],8842:[.13597,.63597,0,0,.77778],8843:[.13597,.63597,0,0,.77778],8847:[.03517,.54986,0,0,.77778],8848:[.03517,.54986,0,0,.77778],8858:[.08198,.58198,0,0,.77778],8859:[.08198,.58198,0,0,.77778],8861:[.08198,.58198,0,0,.77778],8862:[0,.675,0,0,.77778],8863:[0,.675,0,0,.77778],8864:[0,.675,0,0,.77778],8865:[0,.675,0,0,.77778],8872:[0,.69224,0,0,.61111],8873:[0,.69224,0,0,.72222],8874:[0,.69224,0,0,.88889],8876:[0,.68889,0,0,.61111],8877:[0,.68889,0,0,.61111],8878:[0,.68889,0,0,.72222],8879:[0,.68889,0,0,.72222],8882:[.03517,.54986,0,0,.77778],8883:[.03517,.54986,0,0,.77778],8884:[.13667,.63667,0,0,.77778],8885:[.13667,.63667,0,0,.77778],8888:[0,.54986,0,0,1.11111],8890:[.19444,.43056,0,0,.55556],8891:[.19444,.69224,0,0,.61111],8892:[.19444,.69224,0,0,.61111],8901:[0,.54986,0,0,.27778],8903:[.08167,.58167,0,0,.77778],8905:[.08167,.58167,0,0,.77778],8906:[.08167,.58167,0,0,.77778],8907:[0,.69224,0,0,.77778],8908:[0,.69224,0,0,.77778],8909:[-.03598,.46402,0,0,.77778],8910:[0,.54986,0,0,.76042],8911:[0,.54986,0,0,.76042],8912:[.03517,.54986,0,0,.77778],8913:[.03517,.54986,0,0,.77778],8914:[0,.54986,0,0,.66667],8915:[0,.54986,0,0,.66667],8916:[0,.69224,0,0,.66667],8918:[.0391,.5391,0,0,.77778],8919:[.0391,.5391,0,0,.77778],8920:[.03517,.54986,0,0,1.33334],8921:[.03517,.54986,0,0,1.33334],8922:[.38569,.88569,0,0,.77778],8923:[.38569,.88569,0,0,.77778],8926:[.13667,.63667,0,0,.77778],8927:[.13667,.63667,0,0,.77778],8928:[.30274,.79383,0,0,.77778],8929:[.30274,.79383,0,0,.77778],8934:[.23222,.74111,0,0,.77778],8935:[.23222,.74111,0,0,.77778],8936:[.23222,.74111,0,0,.77778],8937:[.23222,.74111,0,0,.77778],8938:[.20576,.70576,0,0,.77778],8939:[.20576,.70576,0,0,.77778],8940:[.30274,.79383,0,0,.77778],8941:[.30274,.79383,0,0,.77778],8994:[.19444,.69224,0,0,.77778],8995:[.19444,.69224,0,0,.77778],9416:[.15559,.69224,0,0,.90222],9484:[0,.69224,0,0,.5],9488:[0,.69224,0,0,.5],9492:[0,.37788,0,0,.5],9496:[0,.37788,0,0,.5],9585:[.19444,.68889,0,0,.88889],9586:[.19444,.74111,0,0,.88889],9632:[0,.675,0,0,.77778],9633:[0,.675,0,0,.77778],9650:[0,.54986,0,0,.72222],9651:[0,.54986,0,0,.72222],9654:[.03517,.54986,0,0,.77778],9660:[0,.54986,0,0,.72222],9661:[0,.54986,0,0,.72222],9664:[.03517,.54986,0,0,.77778],9674:[.11111,.69224,0,0,.66667],9733:[.19444,.69224,0,0,.94445],10003:[0,.69224,0,0,.83334],10016:[0,.69224,0,0,.83334],10731:[.11111,.69224,0,0,.66667],10846:[.19444,.75583,0,0,.61111],10877:[.13667,.63667,0,0,.77778],10878:[.13667,.63667,0,0,.77778],10885:[.25583,.75583,0,0,.77778],10886:[.25583,.75583,0,0,.77778],10887:[.13597,.63597,0,0,.77778],10888:[.13597,.63597,0,0,.77778],10889:[.26167,.75726,0,0,.77778],10890:[.26167,.75726,0,0,.77778],10891:[.48256,.98256,0,0,.77778],10892:[.48256,.98256,0,0,.77778],10901:[.13667,.63667,0,0,.77778],10902:[.13667,.63667,0,0,.77778],10933:[.25142,.75726,0,0,.77778],10934:[.25142,.75726,0,0,.77778],10935:[.26167,.75726,0,0,.77778],10936:[.26167,.75726,0,0,.77778],10937:[.26167,.75726,0,0,.77778],10938:[.26167,.75726,0,0,.77778],10949:[.25583,.75583,0,0,.77778],10950:[.25583,.75583,0,0,.77778],10955:[.28481,.79383,0,0,.77778],10956:[.28481,.79383,0,0,.77778],57350:[.08167,.58167,0,0,.22222],57351:[.08167,.58167,0,0,.38889],57352:[.08167,.58167,0,0,.77778],57353:[0,.43056,.04028,0,.66667],57356:[.25142,.75726,0,0,.77778],57357:[.25142,.75726,0,0,.77778],57358:[.41951,.91951,0,0,.77778],57359:[.30274,.79383,0,0,.77778],57360:[.30274,.79383,0,0,.77778],57361:[.41951,.91951,0,0,.77778],57366:[.25142,.75726,0,0,.77778],57367:[.25142,.75726,0,0,.77778],57368:[.25142,.75726,0,0,.77778],57369:[.25142,.75726,0,0,.77778],57370:[.13597,.63597,0,0,.77778],57371:[.13597,.63597,0,0,.77778]},"Caligraphic-Regular":{32:[0,0,0,0,.25],65:[0,.68333,0,.19445,.79847],66:[0,.68333,.03041,.13889,.65681],67:[0,.68333,.05834,.13889,.52653],68:[0,.68333,.02778,.08334,.77139],69:[0,.68333,.08944,.11111,.52778],70:[0,.68333,.09931,.11111,.71875],71:[.09722,.68333,.0593,.11111,.59487],72:[0,.68333,.00965,.11111,.84452],73:[0,.68333,.07382,0,.54452],74:[.09722,.68333,.18472,.16667,.67778],75:[0,.68333,.01445,.05556,.76195],76:[0,.68333,0,.13889,.68972],77:[0,.68333,0,.13889,1.2009],78:[0,.68333,.14736,.08334,.82049],79:[0,.68333,.02778,.11111,.79611],80:[0,.68333,.08222,.08334,.69556],81:[.09722,.68333,0,.11111,.81667],82:[0,.68333,0,.08334,.8475],83:[0,.68333,.075,.13889,.60556],84:[0,.68333,.25417,0,.54464],85:[0,.68333,.09931,.08334,.62583],86:[0,.68333,.08222,0,.61278],87:[0,.68333,.08222,.08334,.98778],88:[0,.68333,.14643,.13889,.7133],89:[.09722,.68333,.08222,.08334,.66834],90:[0,.68333,.07944,.13889,.72473],160:[0,0,0,0,.25]},"Fraktur-Regular":{32:[0,0,0,0,.25],33:[0,.69141,0,0,.29574],34:[0,.69141,0,0,.21471],38:[0,.69141,0,0,.73786],39:[0,.69141,0,0,.21201],40:[.24982,.74947,0,0,.38865],41:[.24982,.74947,0,0,.38865],42:[0,.62119,0,0,.27764],43:[.08319,.58283,0,0,.75623],44:[0,.10803,0,0,.27764],45:[.08319,.58283,0,0,.75623],46:[0,.10803,0,0,.27764],47:[.24982,.74947,0,0,.50181],48:[0,.47534,0,0,.50181],49:[0,.47534,0,0,.50181],50:[0,.47534,0,0,.50181],51:[.18906,.47534,0,0,.50181],52:[.18906,.47534,0,0,.50181],53:[.18906,.47534,0,0,.50181],54:[0,.69141,0,0,.50181],55:[.18906,.47534,0,0,.50181],56:[0,.69141,0,0,.50181],57:[.18906,.47534,0,0,.50181],58:[0,.47534,0,0,.21606],59:[.12604,.47534,0,0,.21606],61:[-.13099,.36866,0,0,.75623],63:[0,.69141,0,0,.36245],65:[0,.69141,0,0,.7176],66:[0,.69141,0,0,.88397],67:[0,.69141,0,0,.61254],68:[0,.69141,0,0,.83158],69:[0,.69141,0,0,.66278],70:[.12604,.69141,0,0,.61119],71:[0,.69141,0,0,.78539],72:[.06302,.69141,0,0,.7203],73:[0,.69141,0,0,.55448],74:[.12604,.69141,0,0,.55231],75:[0,.69141,0,0,.66845],76:[0,.69141,0,0,.66602],77:[0,.69141,0,0,1.04953],78:[0,.69141,0,0,.83212],79:[0,.69141,0,0,.82699],80:[.18906,.69141,0,0,.82753],81:[.03781,.69141,0,0,.82699],82:[0,.69141,0,0,.82807],83:[0,.69141,0,0,.82861],84:[0,.69141,0,0,.66899],85:[0,.69141,0,0,.64576],86:[0,.69141,0,0,.83131],87:[0,.69141,0,0,1.04602],88:[0,.69141,0,0,.71922],89:[.18906,.69141,0,0,.83293],90:[.12604,.69141,0,0,.60201],91:[.24982,.74947,0,0,.27764],93:[.24982,.74947,0,0,.27764],94:[0,.69141,0,0,.49965],97:[0,.47534,0,0,.50046],98:[0,.69141,0,0,.51315],99:[0,.47534,0,0,.38946],100:[0,.62119,0,0,.49857],101:[0,.47534,0,0,.40053],102:[.18906,.69141,0,0,.32626],103:[.18906,.47534,0,0,.5037],104:[.18906,.69141,0,0,.52126],105:[0,.69141,0,0,.27899],106:[0,.69141,0,0,.28088],107:[0,.69141,0,0,.38946],108:[0,.69141,0,0,.27953],109:[0,.47534,0,0,.76676],110:[0,.47534,0,0,.52666],111:[0,.47534,0,0,.48885],112:[.18906,.52396,0,0,.50046],113:[.18906,.47534,0,0,.48912],114:[0,.47534,0,0,.38919],115:[0,.47534,0,0,.44266],116:[0,.62119,0,0,.33301],117:[0,.47534,0,0,.5172],118:[0,.52396,0,0,.5118],119:[0,.52396,0,0,.77351],120:[.18906,.47534,0,0,.38865],121:[.18906,.47534,0,0,.49884],122:[.18906,.47534,0,0,.39054],160:[0,0,0,0,.25],8216:[0,.69141,0,0,.21471],8217:[0,.69141,0,0,.21471],58112:[0,.62119,0,0,.49749],58113:[0,.62119,0,0,.4983],58114:[.18906,.69141,0,0,.33328],58115:[.18906,.69141,0,0,.32923],58116:[.18906,.47534,0,0,.50343],58117:[0,.69141,0,0,.33301],58118:[0,.62119,0,0,.33409],58119:[0,.47534,0,0,.50073]},"Main-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.35],34:[0,.69444,0,0,.60278],35:[.19444,.69444,0,0,.95833],36:[.05556,.75,0,0,.575],37:[.05556,.75,0,0,.95833],38:[0,.69444,0,0,.89444],39:[0,.69444,0,0,.31944],40:[.25,.75,0,0,.44722],41:[.25,.75,0,0,.44722],42:[0,.75,0,0,.575],43:[.13333,.63333,0,0,.89444],44:[.19444,.15556,0,0,.31944],45:[0,.44444,0,0,.38333],46:[0,.15556,0,0,.31944],47:[.25,.75,0,0,.575],48:[0,.64444,0,0,.575],49:[0,.64444,0,0,.575],50:[0,.64444,0,0,.575],51:[0,.64444,0,0,.575],52:[0,.64444,0,0,.575],53:[0,.64444,0,0,.575],54:[0,.64444,0,0,.575],55:[0,.64444,0,0,.575],56:[0,.64444,0,0,.575],57:[0,.64444,0,0,.575],58:[0,.44444,0,0,.31944],59:[.19444,.44444,0,0,.31944],60:[.08556,.58556,0,0,.89444],61:[-.10889,.39111,0,0,.89444],62:[.08556,.58556,0,0,.89444],63:[0,.69444,0,0,.54305],64:[0,.69444,0,0,.89444],65:[0,.68611,0,0,.86944],66:[0,.68611,0,0,.81805],67:[0,.68611,0,0,.83055],68:[0,.68611,0,0,.88194],69:[0,.68611,0,0,.75555],70:[0,.68611,0,0,.72361],71:[0,.68611,0,0,.90416],72:[0,.68611,0,0,.9],73:[0,.68611,0,0,.43611],74:[0,.68611,0,0,.59444],75:[0,.68611,0,0,.90138],76:[0,.68611,0,0,.69166],77:[0,.68611,0,0,1.09166],78:[0,.68611,0,0,.9],79:[0,.68611,0,0,.86388],80:[0,.68611,0,0,.78611],81:[.19444,.68611,0,0,.86388],82:[0,.68611,0,0,.8625],83:[0,.68611,0,0,.63889],84:[0,.68611,0,0,.8],85:[0,.68611,0,0,.88472],86:[0,.68611,.01597,0,.86944],87:[0,.68611,.01597,0,1.18888],88:[0,.68611,0,0,.86944],89:[0,.68611,.02875,0,.86944],90:[0,.68611,0,0,.70277],91:[.25,.75,0,0,.31944],92:[.25,.75,0,0,.575],93:[.25,.75,0,0,.31944],94:[0,.69444,0,0,.575],95:[.31,.13444,.03194,0,.575],97:[0,.44444,0,0,.55902],98:[0,.69444,0,0,.63889],99:[0,.44444,0,0,.51111],100:[0,.69444,0,0,.63889],101:[0,.44444,0,0,.52708],102:[0,.69444,.10903,0,.35139],103:[.19444,.44444,.01597,0,.575],104:[0,.69444,0,0,.63889],105:[0,.69444,0,0,.31944],106:[.19444,.69444,0,0,.35139],107:[0,.69444,0,0,.60694],108:[0,.69444,0,0,.31944],109:[0,.44444,0,0,.95833],110:[0,.44444,0,0,.63889],111:[0,.44444,0,0,.575],112:[.19444,.44444,0,0,.63889],113:[.19444,.44444,0,0,.60694],114:[0,.44444,0,0,.47361],115:[0,.44444,0,0,.45361],116:[0,.63492,0,0,.44722],117:[0,.44444,0,0,.63889],118:[0,.44444,.01597,0,.60694],119:[0,.44444,.01597,0,.83055],120:[0,.44444,0,0,.60694],121:[.19444,.44444,.01597,0,.60694],122:[0,.44444,0,0,.51111],123:[.25,.75,0,0,.575],124:[.25,.75,0,0,.31944],125:[.25,.75,0,0,.575],126:[.35,.34444,0,0,.575],160:[0,0,0,0,.25],163:[0,.69444,0,0,.86853],168:[0,.69444,0,0,.575],172:[0,.44444,0,0,.76666],176:[0,.69444,0,0,.86944],177:[.13333,.63333,0,0,.89444],184:[.17014,0,0,0,.51111],198:[0,.68611,0,0,1.04166],215:[.13333,.63333,0,0,.89444],216:[.04861,.73472,0,0,.89444],223:[0,.69444,0,0,.59722],230:[0,.44444,0,0,.83055],247:[.13333,.63333,0,0,.89444],248:[.09722,.54167,0,0,.575],305:[0,.44444,0,0,.31944],338:[0,.68611,0,0,1.16944],339:[0,.44444,0,0,.89444],567:[.19444,.44444,0,0,.35139],710:[0,.69444,0,0,.575],711:[0,.63194,0,0,.575],713:[0,.59611,0,0,.575],714:[0,.69444,0,0,.575],715:[0,.69444,0,0,.575],728:[0,.69444,0,0,.575],729:[0,.69444,0,0,.31944],730:[0,.69444,0,0,.86944],732:[0,.69444,0,0,.575],733:[0,.69444,0,0,.575],915:[0,.68611,0,0,.69166],916:[0,.68611,0,0,.95833],920:[0,.68611,0,0,.89444],923:[0,.68611,0,0,.80555],926:[0,.68611,0,0,.76666],928:[0,.68611,0,0,.9],931:[0,.68611,0,0,.83055],933:[0,.68611,0,0,.89444],934:[0,.68611,0,0,.83055],936:[0,.68611,0,0,.89444],937:[0,.68611,0,0,.83055],8211:[0,.44444,.03194,0,.575],8212:[0,.44444,.03194,0,1.14999],8216:[0,.69444,0,0,.31944],8217:[0,.69444,0,0,.31944],8220:[0,.69444,0,0,.60278],8221:[0,.69444,0,0,.60278],8224:[.19444,.69444,0,0,.51111],8225:[.19444,.69444,0,0,.51111],8242:[0,.55556,0,0,.34444],8407:[0,.72444,.15486,0,.575],8463:[0,.69444,0,0,.66759],8465:[0,.69444,0,0,.83055],8467:[0,.69444,0,0,.47361],8472:[.19444,.44444,0,0,.74027],8476:[0,.69444,0,0,.83055],8501:[0,.69444,0,0,.70277],8592:[-.10889,.39111,0,0,1.14999],8593:[.19444,.69444,0,0,.575],8594:[-.10889,.39111,0,0,1.14999],8595:[.19444,.69444,0,0,.575],8596:[-.10889,.39111,0,0,1.14999],8597:[.25,.75,0,0,.575],8598:[.19444,.69444,0,0,1.14999],8599:[.19444,.69444,0,0,1.14999],8600:[.19444,.69444,0,0,1.14999],8601:[.19444,.69444,0,0,1.14999],8636:[-.10889,.39111,0,0,1.14999],8637:[-.10889,.39111,0,0,1.14999],8640:[-.10889,.39111,0,0,1.14999],8641:[-.10889,.39111,0,0,1.14999],8656:[-.10889,.39111,0,0,1.14999],8657:[.19444,.69444,0,0,.70277],8658:[-.10889,.39111,0,0,1.14999],8659:[.19444,.69444,0,0,.70277],8660:[-.10889,.39111,0,0,1.14999],8661:[.25,.75,0,0,.70277],8704:[0,.69444,0,0,.63889],8706:[0,.69444,.06389,0,.62847],8707:[0,.69444,0,0,.63889],8709:[.05556,.75,0,0,.575],8711:[0,.68611,0,0,.95833],8712:[.08556,.58556,0,0,.76666],8715:[.08556,.58556,0,0,.76666],8722:[.13333,.63333,0,0,.89444],8723:[.13333,.63333,0,0,.89444],8725:[.25,.75,0,0,.575],8726:[.25,.75,0,0,.575],8727:[-.02778,.47222,0,0,.575],8728:[-.02639,.47361,0,0,.575],8729:[-.02639,.47361,0,0,.575],8730:[.18,.82,0,0,.95833],8733:[0,.44444,0,0,.89444],8734:[0,.44444,0,0,1.14999],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.31944],8741:[.25,.75,0,0,.575],8743:[0,.55556,0,0,.76666],8744:[0,.55556,0,0,.76666],8745:[0,.55556,0,0,.76666],8746:[0,.55556,0,0,.76666],8747:[.19444,.69444,.12778,0,.56875],8764:[-.10889,.39111,0,0,.89444],8768:[.19444,.69444,0,0,.31944],8771:[.00222,.50222,0,0,.89444],8773:[.027,.638,0,0,.894],8776:[.02444,.52444,0,0,.89444],8781:[.00222,.50222,0,0,.89444],8801:[.00222,.50222,0,0,.89444],8804:[.19667,.69667,0,0,.89444],8805:[.19667,.69667,0,0,.89444],8810:[.08556,.58556,0,0,1.14999],8811:[.08556,.58556,0,0,1.14999],8826:[.08556,.58556,0,0,.89444],8827:[.08556,.58556,0,0,.89444],8834:[.08556,.58556,0,0,.89444],8835:[.08556,.58556,0,0,.89444],8838:[.19667,.69667,0,0,.89444],8839:[.19667,.69667,0,0,.89444],8846:[0,.55556,0,0,.76666],8849:[.19667,.69667,0,0,.89444],8850:[.19667,.69667,0,0,.89444],8851:[0,.55556,0,0,.76666],8852:[0,.55556,0,0,.76666],8853:[.13333,.63333,0,0,.89444],8854:[.13333,.63333,0,0,.89444],8855:[.13333,.63333,0,0,.89444],8856:[.13333,.63333,0,0,.89444],8857:[.13333,.63333,0,0,.89444],8866:[0,.69444,0,0,.70277],8867:[0,.69444,0,0,.70277],8868:[0,.69444,0,0,.89444],8869:[0,.69444,0,0,.89444],8900:[-.02639,.47361,0,0,.575],8901:[-.02639,.47361,0,0,.31944],8902:[-.02778,.47222,0,0,.575],8968:[.25,.75,0,0,.51111],8969:[.25,.75,0,0,.51111],8970:[.25,.75,0,0,.51111],8971:[.25,.75,0,0,.51111],8994:[-.13889,.36111,0,0,1.14999],8995:[-.13889,.36111,0,0,1.14999],9651:[.19444,.69444,0,0,1.02222],9657:[-.02778,.47222,0,0,.575],9661:[.19444,.69444,0,0,1.02222],9667:[-.02778,.47222,0,0,.575],9711:[.19444,.69444,0,0,1.14999],9824:[.12963,.69444,0,0,.89444],9825:[.12963,.69444,0,0,.89444],9826:[.12963,.69444,0,0,.89444],9827:[.12963,.69444,0,0,.89444],9837:[0,.75,0,0,.44722],9838:[.19444,.69444,0,0,.44722],9839:[.19444,.69444,0,0,.44722],10216:[.25,.75,0,0,.44722],10217:[.25,.75,0,0,.44722],10815:[0,.68611,0,0,.9],10927:[.19667,.69667,0,0,.89444],10928:[.19667,.69667,0,0,.89444],57376:[.19444,.69444,0,0,0]},"Main-BoldItalic":{32:[0,0,0,0,.25],33:[0,.69444,.11417,0,.38611],34:[0,.69444,.07939,0,.62055],35:[.19444,.69444,.06833,0,.94444],37:[.05556,.75,.12861,0,.94444],38:[0,.69444,.08528,0,.88555],39:[0,.69444,.12945,0,.35555],40:[.25,.75,.15806,0,.47333],41:[.25,.75,.03306,0,.47333],42:[0,.75,.14333,0,.59111],43:[.10333,.60333,.03306,0,.88555],44:[.19444,.14722,0,0,.35555],45:[0,.44444,.02611,0,.41444],46:[0,.14722,0,0,.35555],47:[.25,.75,.15806,0,.59111],48:[0,.64444,.13167,0,.59111],49:[0,.64444,.13167,0,.59111],50:[0,.64444,.13167,0,.59111],51:[0,.64444,.13167,0,.59111],52:[.19444,.64444,.13167,0,.59111],53:[0,.64444,.13167,0,.59111],54:[0,.64444,.13167,0,.59111],55:[.19444,.64444,.13167,0,.59111],56:[0,.64444,.13167,0,.59111],57:[0,.64444,.13167,0,.59111],58:[0,.44444,.06695,0,.35555],59:[.19444,.44444,.06695,0,.35555],61:[-.10889,.39111,.06833,0,.88555],63:[0,.69444,.11472,0,.59111],64:[0,.69444,.09208,0,.88555],65:[0,.68611,0,0,.86555],66:[0,.68611,.0992,0,.81666],67:[0,.68611,.14208,0,.82666],68:[0,.68611,.09062,0,.87555],69:[0,.68611,.11431,0,.75666],70:[0,.68611,.12903,0,.72722],71:[0,.68611,.07347,0,.89527],72:[0,.68611,.17208,0,.8961],73:[0,.68611,.15681,0,.47166],74:[0,.68611,.145,0,.61055],75:[0,.68611,.14208,0,.89499],76:[0,.68611,0,0,.69777],77:[0,.68611,.17208,0,1.07277],78:[0,.68611,.17208,0,.8961],79:[0,.68611,.09062,0,.85499],80:[0,.68611,.0992,0,.78721],81:[.19444,.68611,.09062,0,.85499],82:[0,.68611,.02559,0,.85944],83:[0,.68611,.11264,0,.64999],84:[0,.68611,.12903,0,.7961],85:[0,.68611,.17208,0,.88083],86:[0,.68611,.18625,0,.86555],87:[0,.68611,.18625,0,1.15999],88:[0,.68611,.15681,0,.86555],89:[0,.68611,.19803,0,.86555],90:[0,.68611,.14208,0,.70888],91:[.25,.75,.1875,0,.35611],93:[.25,.75,.09972,0,.35611],94:[0,.69444,.06709,0,.59111],95:[.31,.13444,.09811,0,.59111],97:[0,.44444,.09426,0,.59111],98:[0,.69444,.07861,0,.53222],99:[0,.44444,.05222,0,.53222],100:[0,.69444,.10861,0,.59111],101:[0,.44444,.085,0,.53222],102:[.19444,.69444,.21778,0,.4],103:[.19444,.44444,.105,0,.53222],104:[0,.69444,.09426,0,.59111],105:[0,.69326,.11387,0,.35555],106:[.19444,.69326,.1672,0,.35555],107:[0,.69444,.11111,0,.53222],108:[0,.69444,.10861,0,.29666],109:[0,.44444,.09426,0,.94444],110:[0,.44444,.09426,0,.64999],111:[0,.44444,.07861,0,.59111],112:[.19444,.44444,.07861,0,.59111],113:[.19444,.44444,.105,0,.53222],114:[0,.44444,.11111,0,.50167],115:[0,.44444,.08167,0,.48694],116:[0,.63492,.09639,0,.385],117:[0,.44444,.09426,0,.62055],118:[0,.44444,.11111,0,.53222],119:[0,.44444,.11111,0,.76777],120:[0,.44444,.12583,0,.56055],121:[.19444,.44444,.105,0,.56166],122:[0,.44444,.13889,0,.49055],126:[.35,.34444,.11472,0,.59111],160:[0,0,0,0,.25],168:[0,.69444,.11473,0,.59111],176:[0,.69444,0,0,.94888],184:[.17014,0,0,0,.53222],198:[0,.68611,.11431,0,1.02277],216:[.04861,.73472,.09062,0,.88555],223:[.19444,.69444,.09736,0,.665],230:[0,.44444,.085,0,.82666],248:[.09722,.54167,.09458,0,.59111],305:[0,.44444,.09426,0,.35555],338:[0,.68611,.11431,0,1.14054],339:[0,.44444,.085,0,.82666],567:[.19444,.44444,.04611,0,.385],710:[0,.69444,.06709,0,.59111],711:[0,.63194,.08271,0,.59111],713:[0,.59444,.10444,0,.59111],714:[0,.69444,.08528,0,.59111],715:[0,.69444,0,0,.59111],728:[0,.69444,.10333,0,.59111],729:[0,.69444,.12945,0,.35555],730:[0,.69444,0,0,.94888],732:[0,.69444,.11472,0,.59111],733:[0,.69444,.11472,0,.59111],915:[0,.68611,.12903,0,.69777],916:[0,.68611,0,0,.94444],920:[0,.68611,.09062,0,.88555],923:[0,.68611,0,0,.80666],926:[0,.68611,.15092,0,.76777],928:[0,.68611,.17208,0,.8961],931:[0,.68611,.11431,0,.82666],933:[0,.68611,.10778,0,.88555],934:[0,.68611,.05632,0,.82666],936:[0,.68611,.10778,0,.88555],937:[0,.68611,.0992,0,.82666],8211:[0,.44444,.09811,0,.59111],8212:[0,.44444,.09811,0,1.18221],8216:[0,.69444,.12945,0,.35555],8217:[0,.69444,.12945,0,.35555],8220:[0,.69444,.16772,0,.62055],8221:[0,.69444,.07939,0,.62055]},"Main-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.12417,0,.30667],34:[0,.69444,.06961,0,.51444],35:[.19444,.69444,.06616,0,.81777],37:[.05556,.75,.13639,0,.81777],38:[0,.69444,.09694,0,.76666],39:[0,.69444,.12417,0,.30667],40:[.25,.75,.16194,0,.40889],41:[.25,.75,.03694,0,.40889],42:[0,.75,.14917,0,.51111],43:[.05667,.56167,.03694,0,.76666],44:[.19444,.10556,0,0,.30667],45:[0,.43056,.02826,0,.35778],46:[0,.10556,0,0,.30667],47:[.25,.75,.16194,0,.51111],48:[0,.64444,.13556,0,.51111],49:[0,.64444,.13556,0,.51111],50:[0,.64444,.13556,0,.51111],51:[0,.64444,.13556,0,.51111],52:[.19444,.64444,.13556,0,.51111],53:[0,.64444,.13556,0,.51111],54:[0,.64444,.13556,0,.51111],55:[.19444,.64444,.13556,0,.51111],56:[0,.64444,.13556,0,.51111],57:[0,.64444,.13556,0,.51111],58:[0,.43056,.0582,0,.30667],59:[.19444,.43056,.0582,0,.30667],61:[-.13313,.36687,.06616,0,.76666],63:[0,.69444,.1225,0,.51111],64:[0,.69444,.09597,0,.76666],65:[0,.68333,0,0,.74333],66:[0,.68333,.10257,0,.70389],67:[0,.68333,.14528,0,.71555],68:[0,.68333,.09403,0,.755],69:[0,.68333,.12028,0,.67833],70:[0,.68333,.13305,0,.65277],71:[0,.68333,.08722,0,.77361],72:[0,.68333,.16389,0,.74333],73:[0,.68333,.15806,0,.38555],74:[0,.68333,.14028,0,.525],75:[0,.68333,.14528,0,.76888],76:[0,.68333,0,0,.62722],77:[0,.68333,.16389,0,.89666],78:[0,.68333,.16389,0,.74333],79:[0,.68333,.09403,0,.76666],80:[0,.68333,.10257,0,.67833],81:[.19444,.68333,.09403,0,.76666],82:[0,.68333,.03868,0,.72944],83:[0,.68333,.11972,0,.56222],84:[0,.68333,.13305,0,.71555],85:[0,.68333,.16389,0,.74333],86:[0,.68333,.18361,0,.74333],87:[0,.68333,.18361,0,.99888],88:[0,.68333,.15806,0,.74333],89:[0,.68333,.19383,0,.74333],90:[0,.68333,.14528,0,.61333],91:[.25,.75,.1875,0,.30667],93:[.25,.75,.10528,0,.30667],94:[0,.69444,.06646,0,.51111],95:[.31,.12056,.09208,0,.51111],97:[0,.43056,.07671,0,.51111],98:[0,.69444,.06312,0,.46],99:[0,.43056,.05653,0,.46],100:[0,.69444,.10333,0,.51111],101:[0,.43056,.07514,0,.46],102:[.19444,.69444,.21194,0,.30667],103:[.19444,.43056,.08847,0,.46],104:[0,.69444,.07671,0,.51111],105:[0,.65536,.1019,0,.30667],106:[.19444,.65536,.14467,0,.30667],107:[0,.69444,.10764,0,.46],108:[0,.69444,.10333,0,.25555],109:[0,.43056,.07671,0,.81777],110:[0,.43056,.07671,0,.56222],111:[0,.43056,.06312,0,.51111],112:[.19444,.43056,.06312,0,.51111],113:[.19444,.43056,.08847,0,.46],114:[0,.43056,.10764,0,.42166],115:[0,.43056,.08208,0,.40889],116:[0,.61508,.09486,0,.33222],117:[0,.43056,.07671,0,.53666],118:[0,.43056,.10764,0,.46],119:[0,.43056,.10764,0,.66444],120:[0,.43056,.12042,0,.46389],121:[.19444,.43056,.08847,0,.48555],122:[0,.43056,.12292,0,.40889],126:[.35,.31786,.11585,0,.51111],160:[0,0,0,0,.25],168:[0,.66786,.10474,0,.51111],176:[0,.69444,0,0,.83129],184:[.17014,0,0,0,.46],198:[0,.68333,.12028,0,.88277],216:[.04861,.73194,.09403,0,.76666],223:[.19444,.69444,.10514,0,.53666],230:[0,.43056,.07514,0,.71555],248:[.09722,.52778,.09194,0,.51111],338:[0,.68333,.12028,0,.98499],339:[0,.43056,.07514,0,.71555],710:[0,.69444,.06646,0,.51111],711:[0,.62847,.08295,0,.51111],713:[0,.56167,.10333,0,.51111],714:[0,.69444,.09694,0,.51111],715:[0,.69444,0,0,.51111],728:[0,.69444,.10806,0,.51111],729:[0,.66786,.11752,0,.30667],730:[0,.69444,0,0,.83129],732:[0,.66786,.11585,0,.51111],733:[0,.69444,.1225,0,.51111],915:[0,.68333,.13305,0,.62722],916:[0,.68333,0,0,.81777],920:[0,.68333,.09403,0,.76666],923:[0,.68333,0,0,.69222],926:[0,.68333,.15294,0,.66444],928:[0,.68333,.16389,0,.74333],931:[0,.68333,.12028,0,.71555],933:[0,.68333,.11111,0,.76666],934:[0,.68333,.05986,0,.71555],936:[0,.68333,.11111,0,.76666],937:[0,.68333,.10257,0,.71555],8211:[0,.43056,.09208,0,.51111],8212:[0,.43056,.09208,0,1.02222],8216:[0,.69444,.12417,0,.30667],8217:[0,.69444,.12417,0,.30667],8220:[0,.69444,.1685,0,.51444],8221:[0,.69444,.06961,0,.51444],8463:[0,.68889,0,0,.54028]},"Main-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.27778],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.77778],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.19444,.10556,0,0,.27778],45:[0,.43056,0,0,.33333],46:[0,.10556,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.64444,0,0,.5],49:[0,.64444,0,0,.5],50:[0,.64444,0,0,.5],51:[0,.64444,0,0,.5],52:[0,.64444,0,0,.5],53:[0,.64444,0,0,.5],54:[0,.64444,0,0,.5],55:[0,.64444,0,0,.5],56:[0,.64444,0,0,.5],57:[0,.64444,0,0,.5],58:[0,.43056,0,0,.27778],59:[.19444,.43056,0,0,.27778],60:[.0391,.5391,0,0,.77778],61:[-.13313,.36687,0,0,.77778],62:[.0391,.5391,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.77778],65:[0,.68333,0,0,.75],66:[0,.68333,0,0,.70834],67:[0,.68333,0,0,.72222],68:[0,.68333,0,0,.76389],69:[0,.68333,0,0,.68056],70:[0,.68333,0,0,.65278],71:[0,.68333,0,0,.78472],72:[0,.68333,0,0,.75],73:[0,.68333,0,0,.36111],74:[0,.68333,0,0,.51389],75:[0,.68333,0,0,.77778],76:[0,.68333,0,0,.625],77:[0,.68333,0,0,.91667],78:[0,.68333,0,0,.75],79:[0,.68333,0,0,.77778],80:[0,.68333,0,0,.68056],81:[.19444,.68333,0,0,.77778],82:[0,.68333,0,0,.73611],83:[0,.68333,0,0,.55556],84:[0,.68333,0,0,.72222],85:[0,.68333,0,0,.75],86:[0,.68333,.01389,0,.75],87:[0,.68333,.01389,0,1.02778],88:[0,.68333,0,0,.75],89:[0,.68333,.025,0,.75],90:[0,.68333,0,0,.61111],91:[.25,.75,0,0,.27778],92:[.25,.75,0,0,.5],93:[.25,.75,0,0,.27778],94:[0,.69444,0,0,.5],95:[.31,.12056,.02778,0,.5],97:[0,.43056,0,0,.5],98:[0,.69444,0,0,.55556],99:[0,.43056,0,0,.44445],100:[0,.69444,0,0,.55556],101:[0,.43056,0,0,.44445],102:[0,.69444,.07778,0,.30556],103:[.19444,.43056,.01389,0,.5],104:[0,.69444,0,0,.55556],105:[0,.66786,0,0,.27778],106:[.19444,.66786,0,0,.30556],107:[0,.69444,0,0,.52778],108:[0,.69444,0,0,.27778],109:[0,.43056,0,0,.83334],110:[0,.43056,0,0,.55556],111:[0,.43056,0,0,.5],112:[.19444,.43056,0,0,.55556],113:[.19444,.43056,0,0,.52778],114:[0,.43056,0,0,.39167],115:[0,.43056,0,0,.39445],116:[0,.61508,0,0,.38889],117:[0,.43056,0,0,.55556],118:[0,.43056,.01389,0,.52778],119:[0,.43056,.01389,0,.72222],120:[0,.43056,0,0,.52778],121:[.19444,.43056,.01389,0,.52778],122:[0,.43056,0,0,.44445],123:[.25,.75,0,0,.5],124:[.25,.75,0,0,.27778],125:[.25,.75,0,0,.5],126:[.35,.31786,0,0,.5],160:[0,0,0,0,.25],163:[0,.69444,0,0,.76909],167:[.19444,.69444,0,0,.44445],168:[0,.66786,0,0,.5],172:[0,.43056,0,0,.66667],176:[0,.69444,0,0,.75],177:[.08333,.58333,0,0,.77778],182:[.19444,.69444,0,0,.61111],184:[.17014,0,0,0,.44445],198:[0,.68333,0,0,.90278],215:[.08333,.58333,0,0,.77778],216:[.04861,.73194,0,0,.77778],223:[0,.69444,0,0,.5],230:[0,.43056,0,0,.72222],247:[.08333,.58333,0,0,.77778],248:[.09722,.52778,0,0,.5],305:[0,.43056,0,0,.27778],338:[0,.68333,0,0,1.01389],339:[0,.43056,0,0,.77778],567:[.19444,.43056,0,0,.30556],710:[0,.69444,0,0,.5],711:[0,.62847,0,0,.5],713:[0,.56778,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.66786,0,0,.27778],730:[0,.69444,0,0,.75],732:[0,.66786,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.68333,0,0,.625],916:[0,.68333,0,0,.83334],920:[0,.68333,0,0,.77778],923:[0,.68333,0,0,.69445],926:[0,.68333,0,0,.66667],928:[0,.68333,0,0,.75],931:[0,.68333,0,0,.72222],933:[0,.68333,0,0,.77778],934:[0,.68333,0,0,.72222],936:[0,.68333,0,0,.77778],937:[0,.68333,0,0,.72222],8211:[0,.43056,.02778,0,.5],8212:[0,.43056,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5],8224:[.19444,.69444,0,0,.44445],8225:[.19444,.69444,0,0,.44445],8230:[0,.123,0,0,1.172],8242:[0,.55556,0,0,.275],8407:[0,.71444,.15382,0,.5],8463:[0,.68889,0,0,.54028],8465:[0,.69444,0,0,.72222],8467:[0,.69444,0,.11111,.41667],8472:[.19444,.43056,0,.11111,.63646],8476:[0,.69444,0,0,.72222],8501:[0,.69444,0,0,.61111],8592:[-.13313,.36687,0,0,1],8593:[.19444,.69444,0,0,.5],8594:[-.13313,.36687,0,0,1],8595:[.19444,.69444,0,0,.5],8596:[-.13313,.36687,0,0,1],8597:[.25,.75,0,0,.5],8598:[.19444,.69444,0,0,1],8599:[.19444,.69444,0,0,1],8600:[.19444,.69444,0,0,1],8601:[.19444,.69444,0,0,1],8614:[.011,.511,0,0,1],8617:[.011,.511,0,0,1.126],8618:[.011,.511,0,0,1.126],8636:[-.13313,.36687,0,0,1],8637:[-.13313,.36687,0,0,1],8640:[-.13313,.36687,0,0,1],8641:[-.13313,.36687,0,0,1],8652:[.011,.671,0,0,1],8656:[-.13313,.36687,0,0,1],8657:[.19444,.69444,0,0,.61111],8658:[-.13313,.36687,0,0,1],8659:[.19444,.69444,0,0,.61111],8660:[-.13313,.36687,0,0,1],8661:[.25,.75,0,0,.61111],8704:[0,.69444,0,0,.55556],8706:[0,.69444,.05556,.08334,.5309],8707:[0,.69444,0,0,.55556],8709:[.05556,.75,0,0,.5],8711:[0,.68333,0,0,.83334],8712:[.0391,.5391,0,0,.66667],8715:[.0391,.5391,0,0,.66667],8722:[.08333,.58333,0,0,.77778],8723:[.08333,.58333,0,0,.77778],8725:[.25,.75,0,0,.5],8726:[.25,.75,0,0,.5],8727:[-.03472,.46528,0,0,.5],8728:[-.05555,.44445,0,0,.5],8729:[-.05555,.44445,0,0,.5],8730:[.2,.8,0,0,.83334],8733:[0,.43056,0,0,.77778],8734:[0,.43056,0,0,1],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.27778],8741:[.25,.75,0,0,.5],8743:[0,.55556,0,0,.66667],8744:[0,.55556,0,0,.66667],8745:[0,.55556,0,0,.66667],8746:[0,.55556,0,0,.66667],8747:[.19444,.69444,.11111,0,.41667],8764:[-.13313,.36687,0,0,.77778],8768:[.19444,.69444,0,0,.27778],8771:[-.03625,.46375,0,0,.77778],8773:[-.022,.589,0,0,.778],8776:[-.01688,.48312,0,0,.77778],8781:[-.03625,.46375,0,0,.77778],8784:[-.133,.673,0,0,.778],8801:[-.03625,.46375,0,0,.77778],8804:[.13597,.63597,0,0,.77778],8805:[.13597,.63597,0,0,.77778],8810:[.0391,.5391,0,0,1],8811:[.0391,.5391,0,0,1],8826:[.0391,.5391,0,0,.77778],8827:[.0391,.5391,0,0,.77778],8834:[.0391,.5391,0,0,.77778],8835:[.0391,.5391,0,0,.77778],8838:[.13597,.63597,0,0,.77778],8839:[.13597,.63597,0,0,.77778],8846:[0,.55556,0,0,.66667],8849:[.13597,.63597,0,0,.77778],8850:[.13597,.63597,0,0,.77778],8851:[0,.55556,0,0,.66667],8852:[0,.55556,0,0,.66667],8853:[.08333,.58333,0,0,.77778],8854:[.08333,.58333,0,0,.77778],8855:[.08333,.58333,0,0,.77778],8856:[.08333,.58333,0,0,.77778],8857:[.08333,.58333,0,0,.77778],8866:[0,.69444,0,0,.61111],8867:[0,.69444,0,0,.61111],8868:[0,.69444,0,0,.77778],8869:[0,.69444,0,0,.77778],8872:[.249,.75,0,0,.867],8900:[-.05555,.44445,0,0,.5],8901:[-.05555,.44445,0,0,.27778],8902:[-.03472,.46528,0,0,.5],8904:[.005,.505,0,0,.9],8942:[.03,.903,0,0,.278],8943:[-.19,.313,0,0,1.172],8945:[-.1,.823,0,0,1.282],8968:[.25,.75,0,0,.44445],8969:[.25,.75,0,0,.44445],8970:[.25,.75,0,0,.44445],8971:[.25,.75,0,0,.44445],8994:[-.14236,.35764,0,0,1],8995:[-.14236,.35764,0,0,1],9136:[.244,.744,0,0,.412],9137:[.244,.745,0,0,.412],9651:[.19444,.69444,0,0,.88889],9657:[-.03472,.46528,0,0,.5],9661:[.19444,.69444,0,0,.88889],9667:[-.03472,.46528,0,0,.5],9711:[.19444,.69444,0,0,1],9824:[.12963,.69444,0,0,.77778],9825:[.12963,.69444,0,0,.77778],9826:[.12963,.69444,0,0,.77778],9827:[.12963,.69444,0,0,.77778],9837:[0,.75,0,0,.38889],9838:[.19444,.69444,0,0,.38889],9839:[.19444,.69444,0,0,.38889],10216:[.25,.75,0,0,.38889],10217:[.25,.75,0,0,.38889],10222:[.244,.744,0,0,.412],10223:[.244,.745,0,0,.412],10229:[.011,.511,0,0,1.609],10230:[.011,.511,0,0,1.638],10231:[.011,.511,0,0,1.859],10232:[.024,.525,0,0,1.609],10233:[.024,.525,0,0,1.638],10234:[.024,.525,0,0,1.858],10236:[.011,.511,0,0,1.638],10815:[0,.68333,0,0,.75],10927:[.13597,.63597,0,0,.77778],10928:[.13597,.63597,0,0,.77778],57376:[.19444,.69444,0,0,0]},"Math-BoldItalic":{32:[0,0,0,0,.25],48:[0,.44444,0,0,.575],49:[0,.44444,0,0,.575],50:[0,.44444,0,0,.575],51:[.19444,.44444,0,0,.575],52:[.19444,.44444,0,0,.575],53:[.19444,.44444,0,0,.575],54:[0,.64444,0,0,.575],55:[.19444,.44444,0,0,.575],56:[0,.64444,0,0,.575],57:[.19444,.44444,0,0,.575],65:[0,.68611,0,0,.86944],66:[0,.68611,.04835,0,.8664],67:[0,.68611,.06979,0,.81694],68:[0,.68611,.03194,0,.93812],69:[0,.68611,.05451,0,.81007],70:[0,.68611,.15972,0,.68889],71:[0,.68611,0,0,.88673],72:[0,.68611,.08229,0,.98229],73:[0,.68611,.07778,0,.51111],74:[0,.68611,.10069,0,.63125],75:[0,.68611,.06979,0,.97118],76:[0,.68611,0,0,.75555],77:[0,.68611,.11424,0,1.14201],78:[0,.68611,.11424,0,.95034],79:[0,.68611,.03194,0,.83666],80:[0,.68611,.15972,0,.72309],81:[.19444,.68611,0,0,.86861],82:[0,.68611,.00421,0,.87235],83:[0,.68611,.05382,0,.69271],84:[0,.68611,.15972,0,.63663],85:[0,.68611,.11424,0,.80027],86:[0,.68611,.25555,0,.67778],87:[0,.68611,.15972,0,1.09305],88:[0,.68611,.07778,0,.94722],89:[0,.68611,.25555,0,.67458],90:[0,.68611,.06979,0,.77257],97:[0,.44444,0,0,.63287],98:[0,.69444,0,0,.52083],99:[0,.44444,0,0,.51342],100:[0,.69444,0,0,.60972],101:[0,.44444,0,0,.55361],102:[.19444,.69444,.11042,0,.56806],103:[.19444,.44444,.03704,0,.5449],104:[0,.69444,0,0,.66759],105:[0,.69326,0,0,.4048],106:[.19444,.69326,.0622,0,.47083],107:[0,.69444,.01852,0,.6037],108:[0,.69444,.0088,0,.34815],109:[0,.44444,0,0,1.0324],110:[0,.44444,0,0,.71296],111:[0,.44444,0,0,.58472],112:[.19444,.44444,0,0,.60092],113:[.19444,.44444,.03704,0,.54213],114:[0,.44444,.03194,0,.5287],115:[0,.44444,0,0,.53125],116:[0,.63492,0,0,.41528],117:[0,.44444,0,0,.68102],118:[0,.44444,.03704,0,.56666],119:[0,.44444,.02778,0,.83148],120:[0,.44444,0,0,.65903],121:[.19444,.44444,.03704,0,.59028],122:[0,.44444,.04213,0,.55509],160:[0,0,0,0,.25],915:[0,.68611,.15972,0,.65694],916:[0,.68611,0,0,.95833],920:[0,.68611,.03194,0,.86722],923:[0,.68611,0,0,.80555],926:[0,.68611,.07458,0,.84125],928:[0,.68611,.08229,0,.98229],931:[0,.68611,.05451,0,.88507],933:[0,.68611,.15972,0,.67083],934:[0,.68611,0,0,.76666],936:[0,.68611,.11653,0,.71402],937:[0,.68611,.04835,0,.8789],945:[0,.44444,0,0,.76064],946:[.19444,.69444,.03403,0,.65972],947:[.19444,.44444,.06389,0,.59003],948:[0,.69444,.03819,0,.52222],949:[0,.44444,0,0,.52882],950:[.19444,.69444,.06215,0,.50833],951:[.19444,.44444,.03704,0,.6],952:[0,.69444,.03194,0,.5618],953:[0,.44444,0,0,.41204],954:[0,.44444,0,0,.66759],955:[0,.69444,0,0,.67083],956:[.19444,.44444,0,0,.70787],957:[0,.44444,.06898,0,.57685],958:[.19444,.69444,.03021,0,.50833],959:[0,.44444,0,0,.58472],960:[0,.44444,.03704,0,.68241],961:[.19444,.44444,0,0,.6118],962:[.09722,.44444,.07917,0,.42361],963:[0,.44444,.03704,0,.68588],964:[0,.44444,.13472,0,.52083],965:[0,.44444,.03704,0,.63055],966:[.19444,.44444,0,0,.74722],967:[.19444,.44444,0,0,.71805],968:[.19444,.69444,.03704,0,.75833],969:[0,.44444,.03704,0,.71782],977:[0,.69444,0,0,.69155],981:[.19444,.69444,0,0,.7125],982:[0,.44444,.03194,0,.975],1009:[.19444,.44444,0,0,.6118],1013:[0,.44444,0,0,.48333],57649:[0,.44444,0,0,.39352],57911:[.19444,.44444,0,0,.43889]},"Math-Italic":{32:[0,0,0,0,.25],48:[0,.43056,0,0,.5],49:[0,.43056,0,0,.5],50:[0,.43056,0,0,.5],51:[.19444,.43056,0,0,.5],52:[.19444,.43056,0,0,.5],53:[.19444,.43056,0,0,.5],54:[0,.64444,0,0,.5],55:[.19444,.43056,0,0,.5],56:[0,.64444,0,0,.5],57:[.19444,.43056,0,0,.5],65:[0,.68333,0,.13889,.75],66:[0,.68333,.05017,.08334,.75851],67:[0,.68333,.07153,.08334,.71472],68:[0,.68333,.02778,.05556,.82792],69:[0,.68333,.05764,.08334,.7382],70:[0,.68333,.13889,.08334,.64306],71:[0,.68333,0,.08334,.78625],72:[0,.68333,.08125,.05556,.83125],73:[0,.68333,.07847,.11111,.43958],74:[0,.68333,.09618,.16667,.55451],75:[0,.68333,.07153,.05556,.84931],76:[0,.68333,0,.02778,.68056],77:[0,.68333,.10903,.08334,.97014],78:[0,.68333,.10903,.08334,.80347],79:[0,.68333,.02778,.08334,.76278],80:[0,.68333,.13889,.08334,.64201],81:[.19444,.68333,0,.08334,.79056],82:[0,.68333,.00773,.08334,.75929],83:[0,.68333,.05764,.08334,.6132],84:[0,.68333,.13889,.08334,.58438],85:[0,.68333,.10903,.02778,.68278],86:[0,.68333,.22222,0,.58333],87:[0,.68333,.13889,0,.94445],88:[0,.68333,.07847,.08334,.82847],89:[0,.68333,.22222,0,.58056],90:[0,.68333,.07153,.08334,.68264],97:[0,.43056,0,0,.52859],98:[0,.69444,0,0,.42917],99:[0,.43056,0,.05556,.43276],100:[0,.69444,0,.16667,.52049],101:[0,.43056,0,.05556,.46563],102:[.19444,.69444,.10764,.16667,.48959],103:[.19444,.43056,.03588,.02778,.47697],104:[0,.69444,0,0,.57616],105:[0,.65952,0,0,.34451],106:[.19444,.65952,.05724,0,.41181],107:[0,.69444,.03148,0,.5206],108:[0,.69444,.01968,.08334,.29838],109:[0,.43056,0,0,.87801],110:[0,.43056,0,0,.60023],111:[0,.43056,0,.05556,.48472],112:[.19444,.43056,0,.08334,.50313],113:[.19444,.43056,.03588,.08334,.44641],114:[0,.43056,.02778,.05556,.45116],115:[0,.43056,0,.05556,.46875],116:[0,.61508,0,.08334,.36111],117:[0,.43056,0,.02778,.57246],118:[0,.43056,.03588,.02778,.48472],119:[0,.43056,.02691,.08334,.71592],120:[0,.43056,0,.02778,.57153],121:[.19444,.43056,.03588,.05556,.49028],122:[0,.43056,.04398,.05556,.46505],160:[0,0,0,0,.25],915:[0,.68333,.13889,.08334,.61528],916:[0,.68333,0,.16667,.83334],920:[0,.68333,.02778,.08334,.76278],923:[0,.68333,0,.16667,.69445],926:[0,.68333,.07569,.08334,.74236],928:[0,.68333,.08125,.05556,.83125],931:[0,.68333,.05764,.08334,.77986],933:[0,.68333,.13889,.05556,.58333],934:[0,.68333,0,.08334,.66667],936:[0,.68333,.11,.05556,.61222],937:[0,.68333,.05017,.08334,.7724],945:[0,.43056,.0037,.02778,.6397],946:[.19444,.69444,.05278,.08334,.56563],947:[.19444,.43056,.05556,0,.51773],948:[0,.69444,.03785,.05556,.44444],949:[0,.43056,0,.08334,.46632],950:[.19444,.69444,.07378,.08334,.4375],951:[.19444,.43056,.03588,.05556,.49653],952:[0,.69444,.02778,.08334,.46944],953:[0,.43056,0,.05556,.35394],954:[0,.43056,0,0,.57616],955:[0,.69444,0,0,.58334],956:[.19444,.43056,0,.02778,.60255],957:[0,.43056,.06366,.02778,.49398],958:[.19444,.69444,.04601,.11111,.4375],959:[0,.43056,0,.05556,.48472],960:[0,.43056,.03588,0,.57003],961:[.19444,.43056,0,.08334,.51702],962:[.09722,.43056,.07986,.08334,.36285],963:[0,.43056,.03588,0,.57141],964:[0,.43056,.1132,.02778,.43715],965:[0,.43056,.03588,.02778,.54028],966:[.19444,.43056,0,.08334,.65417],967:[.19444,.43056,0,.05556,.62569],968:[.19444,.69444,.03588,.11111,.65139],969:[0,.43056,.03588,0,.62245],977:[0,.69444,0,.08334,.59144],981:[.19444,.69444,0,.08334,.59583],982:[0,.43056,.02778,0,.82813],1009:[.19444,.43056,0,.08334,.51702],1013:[0,.43056,0,.05556,.4059],57649:[0,.43056,0,.02778,.32246],57911:[.19444,.43056,0,.08334,.38403]},"SansSerif-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.36667],34:[0,.69444,0,0,.55834],35:[.19444,.69444,0,0,.91667],36:[.05556,.75,0,0,.55],37:[.05556,.75,0,0,1.02912],38:[0,.69444,0,0,.83056],39:[0,.69444,0,0,.30556],40:[.25,.75,0,0,.42778],41:[.25,.75,0,0,.42778],42:[0,.75,0,0,.55],43:[.11667,.61667,0,0,.85556],44:[.10556,.13056,0,0,.30556],45:[0,.45833,0,0,.36667],46:[0,.13056,0,0,.30556],47:[.25,.75,0,0,.55],48:[0,.69444,0,0,.55],49:[0,.69444,0,0,.55],50:[0,.69444,0,0,.55],51:[0,.69444,0,0,.55],52:[0,.69444,0,0,.55],53:[0,.69444,0,0,.55],54:[0,.69444,0,0,.55],55:[0,.69444,0,0,.55],56:[0,.69444,0,0,.55],57:[0,.69444,0,0,.55],58:[0,.45833,0,0,.30556],59:[.10556,.45833,0,0,.30556],61:[-.09375,.40625,0,0,.85556],63:[0,.69444,0,0,.51945],64:[0,.69444,0,0,.73334],65:[0,.69444,0,0,.73334],66:[0,.69444,0,0,.73334],67:[0,.69444,0,0,.70278],68:[0,.69444,0,0,.79445],69:[0,.69444,0,0,.64167],70:[0,.69444,0,0,.61111],71:[0,.69444,0,0,.73334],72:[0,.69444,0,0,.79445],73:[0,.69444,0,0,.33056],74:[0,.69444,0,0,.51945],75:[0,.69444,0,0,.76389],76:[0,.69444,0,0,.58056],77:[0,.69444,0,0,.97778],78:[0,.69444,0,0,.79445],79:[0,.69444,0,0,.79445],80:[0,.69444,0,0,.70278],81:[.10556,.69444,0,0,.79445],82:[0,.69444,0,0,.70278],83:[0,.69444,0,0,.61111],84:[0,.69444,0,0,.73334],85:[0,.69444,0,0,.76389],86:[0,.69444,.01528,0,.73334],87:[0,.69444,.01528,0,1.03889],88:[0,.69444,0,0,.73334],89:[0,.69444,.0275,0,.73334],90:[0,.69444,0,0,.67223],91:[.25,.75,0,0,.34306],93:[.25,.75,0,0,.34306],94:[0,.69444,0,0,.55],95:[.35,.10833,.03056,0,.55],97:[0,.45833,0,0,.525],98:[0,.69444,0,0,.56111],99:[0,.45833,0,0,.48889],100:[0,.69444,0,0,.56111],101:[0,.45833,0,0,.51111],102:[0,.69444,.07639,0,.33611],103:[.19444,.45833,.01528,0,.55],104:[0,.69444,0,0,.56111],105:[0,.69444,0,0,.25556],106:[.19444,.69444,0,0,.28611],107:[0,.69444,0,0,.53056],108:[0,.69444,0,0,.25556],109:[0,.45833,0,0,.86667],110:[0,.45833,0,0,.56111],111:[0,.45833,0,0,.55],112:[.19444,.45833,0,0,.56111],113:[.19444,.45833,0,0,.56111],114:[0,.45833,.01528,0,.37222],115:[0,.45833,0,0,.42167],116:[0,.58929,0,0,.40417],117:[0,.45833,0,0,.56111],118:[0,.45833,.01528,0,.5],119:[0,.45833,.01528,0,.74445],120:[0,.45833,0,0,.5],121:[.19444,.45833,.01528,0,.5],122:[0,.45833,0,0,.47639],126:[.35,.34444,0,0,.55],160:[0,0,0,0,.25],168:[0,.69444,0,0,.55],176:[0,.69444,0,0,.73334],180:[0,.69444,0,0,.55],184:[.17014,0,0,0,.48889],305:[0,.45833,0,0,.25556],567:[.19444,.45833,0,0,.28611],710:[0,.69444,0,0,.55],711:[0,.63542,0,0,.55],713:[0,.63778,0,0,.55],728:[0,.69444,0,0,.55],729:[0,.69444,0,0,.30556],730:[0,.69444,0,0,.73334],732:[0,.69444,0,0,.55],733:[0,.69444,0,0,.55],915:[0,.69444,0,0,.58056],916:[0,.69444,0,0,.91667],920:[0,.69444,0,0,.85556],923:[0,.69444,0,0,.67223],926:[0,.69444,0,0,.73334],928:[0,.69444,0,0,.79445],931:[0,.69444,0,0,.79445],933:[0,.69444,0,0,.85556],934:[0,.69444,0,0,.79445],936:[0,.69444,0,0,.85556],937:[0,.69444,0,0,.79445],8211:[0,.45833,.03056,0,.55],8212:[0,.45833,.03056,0,1.10001],8216:[0,.69444,0,0,.30556],8217:[0,.69444,0,0,.30556],8220:[0,.69444,0,0,.55834],8221:[0,.69444,0,0,.55834]},"SansSerif-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.05733,0,.31945],34:[0,.69444,.00316,0,.5],35:[.19444,.69444,.05087,0,.83334],36:[.05556,.75,.11156,0,.5],37:[.05556,.75,.03126,0,.83334],38:[0,.69444,.03058,0,.75834],39:[0,.69444,.07816,0,.27778],40:[.25,.75,.13164,0,.38889],41:[.25,.75,.02536,0,.38889],42:[0,.75,.11775,0,.5],43:[.08333,.58333,.02536,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,.01946,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,.13164,0,.5],48:[0,.65556,.11156,0,.5],49:[0,.65556,.11156,0,.5],50:[0,.65556,.11156,0,.5],51:[0,.65556,.11156,0,.5],52:[0,.65556,.11156,0,.5],53:[0,.65556,.11156,0,.5],54:[0,.65556,.11156,0,.5],55:[0,.65556,.11156,0,.5],56:[0,.65556,.11156,0,.5],57:[0,.65556,.11156,0,.5],58:[0,.44444,.02502,0,.27778],59:[.125,.44444,.02502,0,.27778],61:[-.13,.37,.05087,0,.77778],63:[0,.69444,.11809,0,.47222],64:[0,.69444,.07555,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,.08293,0,.66667],67:[0,.69444,.11983,0,.63889],68:[0,.69444,.07555,0,.72223],69:[0,.69444,.11983,0,.59722],70:[0,.69444,.13372,0,.56945],71:[0,.69444,.11983,0,.66667],72:[0,.69444,.08094,0,.70834],73:[0,.69444,.13372,0,.27778],74:[0,.69444,.08094,0,.47222],75:[0,.69444,.11983,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,.08094,0,.875],78:[0,.69444,.08094,0,.70834],79:[0,.69444,.07555,0,.73611],80:[0,.69444,.08293,0,.63889],81:[.125,.69444,.07555,0,.73611],82:[0,.69444,.08293,0,.64584],83:[0,.69444,.09205,0,.55556],84:[0,.69444,.13372,0,.68056],85:[0,.69444,.08094,0,.6875],86:[0,.69444,.1615,0,.66667],87:[0,.69444,.1615,0,.94445],88:[0,.69444,.13372,0,.66667],89:[0,.69444,.17261,0,.66667],90:[0,.69444,.11983,0,.61111],91:[.25,.75,.15942,0,.28889],93:[.25,.75,.08719,0,.28889],94:[0,.69444,.0799,0,.5],95:[.35,.09444,.08616,0,.5],97:[0,.44444,.00981,0,.48056],98:[0,.69444,.03057,0,.51667],99:[0,.44444,.08336,0,.44445],100:[0,.69444,.09483,0,.51667],101:[0,.44444,.06778,0,.44445],102:[0,.69444,.21705,0,.30556],103:[.19444,.44444,.10836,0,.5],104:[0,.69444,.01778,0,.51667],105:[0,.67937,.09718,0,.23889],106:[.19444,.67937,.09162,0,.26667],107:[0,.69444,.08336,0,.48889],108:[0,.69444,.09483,0,.23889],109:[0,.44444,.01778,0,.79445],110:[0,.44444,.01778,0,.51667],111:[0,.44444,.06613,0,.5],112:[.19444,.44444,.0389,0,.51667],113:[.19444,.44444,.04169,0,.51667],114:[0,.44444,.10836,0,.34167],115:[0,.44444,.0778,0,.38333],116:[0,.57143,.07225,0,.36111],117:[0,.44444,.04169,0,.51667],118:[0,.44444,.10836,0,.46111],119:[0,.44444,.10836,0,.68334],120:[0,.44444,.09169,0,.46111],121:[.19444,.44444,.10836,0,.46111],122:[0,.44444,.08752,0,.43472],126:[.35,.32659,.08826,0,.5],160:[0,0,0,0,.25],168:[0,.67937,.06385,0,.5],176:[0,.69444,0,0,.73752],184:[.17014,0,0,0,.44445],305:[0,.44444,.04169,0,.23889],567:[.19444,.44444,.04169,0,.26667],710:[0,.69444,.0799,0,.5],711:[0,.63194,.08432,0,.5],713:[0,.60889,.08776,0,.5],714:[0,.69444,.09205,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,.09483,0,.5],729:[0,.67937,.07774,0,.27778],730:[0,.69444,0,0,.73752],732:[0,.67659,.08826,0,.5],733:[0,.69444,.09205,0,.5],915:[0,.69444,.13372,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,.07555,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,.12816,0,.66667],928:[0,.69444,.08094,0,.70834],931:[0,.69444,.11983,0,.72222],933:[0,.69444,.09031,0,.77778],934:[0,.69444,.04603,0,.72222],936:[0,.69444,.09031,0,.77778],937:[0,.69444,.08293,0,.72222],8211:[0,.44444,.08616,0,.5],8212:[0,.44444,.08616,0,1],8216:[0,.69444,.07816,0,.27778],8217:[0,.69444,.07816,0,.27778],8220:[0,.69444,.14205,0,.5],8221:[0,.69444,.00316,0,.5]},"SansSerif-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.31945],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.75834],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,0,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.65556,0,0,.5],49:[0,.65556,0,0,.5],50:[0,.65556,0,0,.5],51:[0,.65556,0,0,.5],52:[0,.65556,0,0,.5],53:[0,.65556,0,0,.5],54:[0,.65556,0,0,.5],55:[0,.65556,0,0,.5],56:[0,.65556,0,0,.5],57:[0,.65556,0,0,.5],58:[0,.44444,0,0,.27778],59:[.125,.44444,0,0,.27778],61:[-.13,.37,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,0,0,.66667],67:[0,.69444,0,0,.63889],68:[0,.69444,0,0,.72223],69:[0,.69444,0,0,.59722],70:[0,.69444,0,0,.56945],71:[0,.69444,0,0,.66667],72:[0,.69444,0,0,.70834],73:[0,.69444,0,0,.27778],74:[0,.69444,0,0,.47222],75:[0,.69444,0,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,0,0,.875],78:[0,.69444,0,0,.70834],79:[0,.69444,0,0,.73611],80:[0,.69444,0,0,.63889],81:[.125,.69444,0,0,.73611],82:[0,.69444,0,0,.64584],83:[0,.69444,0,0,.55556],84:[0,.69444,0,0,.68056],85:[0,.69444,0,0,.6875],86:[0,.69444,.01389,0,.66667],87:[0,.69444,.01389,0,.94445],88:[0,.69444,0,0,.66667],89:[0,.69444,.025,0,.66667],90:[0,.69444,0,0,.61111],91:[.25,.75,0,0,.28889],93:[.25,.75,0,0,.28889],94:[0,.69444,0,0,.5],95:[.35,.09444,.02778,0,.5],97:[0,.44444,0,0,.48056],98:[0,.69444,0,0,.51667],99:[0,.44444,0,0,.44445],100:[0,.69444,0,0,.51667],101:[0,.44444,0,0,.44445],102:[0,.69444,.06944,0,.30556],103:[.19444,.44444,.01389,0,.5],104:[0,.69444,0,0,.51667],105:[0,.67937,0,0,.23889],106:[.19444,.67937,0,0,.26667],107:[0,.69444,0,0,.48889],108:[0,.69444,0,0,.23889],109:[0,.44444,0,0,.79445],110:[0,.44444,0,0,.51667],111:[0,.44444,0,0,.5],112:[.19444,.44444,0,0,.51667],113:[.19444,.44444,0,0,.51667],114:[0,.44444,.01389,0,.34167],115:[0,.44444,0,0,.38333],116:[0,.57143,0,0,.36111],117:[0,.44444,0,0,.51667],118:[0,.44444,.01389,0,.46111],119:[0,.44444,.01389,0,.68334],120:[0,.44444,0,0,.46111],121:[.19444,.44444,.01389,0,.46111],122:[0,.44444,0,0,.43472],126:[.35,.32659,0,0,.5],160:[0,0,0,0,.25],168:[0,.67937,0,0,.5],176:[0,.69444,0,0,.66667],184:[.17014,0,0,0,.44445],305:[0,.44444,0,0,.23889],567:[.19444,.44444,0,0,.26667],710:[0,.69444,0,0,.5],711:[0,.63194,0,0,.5],713:[0,.60889,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.67937,0,0,.27778],730:[0,.69444,0,0,.66667],732:[0,.67659,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.69444,0,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,0,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,0,0,.66667],928:[0,.69444,0,0,.70834],931:[0,.69444,0,0,.72222],933:[0,.69444,0,0,.77778],934:[0,.69444,0,0,.72222],936:[0,.69444,0,0,.77778],937:[0,.69444,0,0,.72222],8211:[0,.44444,.02778,0,.5],8212:[0,.44444,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5]},"Script-Regular":{32:[0,0,0,0,.25],65:[0,.7,.22925,0,.80253],66:[0,.7,.04087,0,.90757],67:[0,.7,.1689,0,.66619],68:[0,.7,.09371,0,.77443],69:[0,.7,.18583,0,.56162],70:[0,.7,.13634,0,.89544],71:[0,.7,.17322,0,.60961],72:[0,.7,.29694,0,.96919],73:[0,.7,.19189,0,.80907],74:[.27778,.7,.19189,0,1.05159],75:[0,.7,.31259,0,.91364],76:[0,.7,.19189,0,.87373],77:[0,.7,.15981,0,1.08031],78:[0,.7,.3525,0,.9015],79:[0,.7,.08078,0,.73787],80:[0,.7,.08078,0,1.01262],81:[0,.7,.03305,0,.88282],82:[0,.7,.06259,0,.85],83:[0,.7,.19189,0,.86767],84:[0,.7,.29087,0,.74697],85:[0,.7,.25815,0,.79996],86:[0,.7,.27523,0,.62204],87:[0,.7,.27523,0,.80532],88:[0,.7,.26006,0,.94445],89:[0,.7,.2939,0,.70961],90:[0,.7,.24037,0,.8212],160:[0,0,0,0,.25]},"Size1-Regular":{32:[0,0,0,0,.25],40:[.35001,.85,0,0,.45834],41:[.35001,.85,0,0,.45834],47:[.35001,.85,0,0,.57778],91:[.35001,.85,0,0,.41667],92:[.35001,.85,0,0,.57778],93:[.35001,.85,0,0,.41667],123:[.35001,.85,0,0,.58334],125:[.35001,.85,0,0,.58334],160:[0,0,0,0,.25],710:[0,.72222,0,0,.55556],732:[0,.72222,0,0,.55556],770:[0,.72222,0,0,.55556],771:[0,.72222,0,0,.55556],8214:[-99e-5,.601,0,0,.77778],8593:[1e-5,.6,0,0,.66667],8595:[1e-5,.6,0,0,.66667],8657:[1e-5,.6,0,0,.77778],8659:[1e-5,.6,0,0,.77778],8719:[.25001,.75,0,0,.94445],8720:[.25001,.75,0,0,.94445],8721:[.25001,.75,0,0,1.05556],8730:[.35001,.85,0,0,1],8739:[-.00599,.606,0,0,.33333],8741:[-.00599,.606,0,0,.55556],8747:[.30612,.805,.19445,0,.47222],8748:[.306,.805,.19445,0,.47222],8749:[.306,.805,.19445,0,.47222],8750:[.30612,.805,.19445,0,.47222],8896:[.25001,.75,0,0,.83334],8897:[.25001,.75,0,0,.83334],8898:[.25001,.75,0,0,.83334],8899:[.25001,.75,0,0,.83334],8968:[.35001,.85,0,0,.47222],8969:[.35001,.85,0,0,.47222],8970:[.35001,.85,0,0,.47222],8971:[.35001,.85,0,0,.47222],9168:[-99e-5,.601,0,0,.66667],10216:[.35001,.85,0,0,.47222],10217:[.35001,.85,0,0,.47222],10752:[.25001,.75,0,0,1.11111],10753:[.25001,.75,0,0,1.11111],10754:[.25001,.75,0,0,1.11111],10756:[.25001,.75,0,0,.83334],10758:[.25001,.75,0,0,.83334]},"Size2-Regular":{32:[0,0,0,0,.25],40:[.65002,1.15,0,0,.59722],41:[.65002,1.15,0,0,.59722],47:[.65002,1.15,0,0,.81111],91:[.65002,1.15,0,0,.47222],92:[.65002,1.15,0,0,.81111],93:[.65002,1.15,0,0,.47222],123:[.65002,1.15,0,0,.66667],125:[.65002,1.15,0,0,.66667],160:[0,0,0,0,.25],710:[0,.75,0,0,1],732:[0,.75,0,0,1],770:[0,.75,0,0,1],771:[0,.75,0,0,1],8719:[.55001,1.05,0,0,1.27778],8720:[.55001,1.05,0,0,1.27778],8721:[.55001,1.05,0,0,1.44445],8730:[.65002,1.15,0,0,1],8747:[.86225,1.36,.44445,0,.55556],8748:[.862,1.36,.44445,0,.55556],8749:[.862,1.36,.44445,0,.55556],8750:[.86225,1.36,.44445,0,.55556],8896:[.55001,1.05,0,0,1.11111],8897:[.55001,1.05,0,0,1.11111],8898:[.55001,1.05,0,0,1.11111],8899:[.55001,1.05,0,0,1.11111],8968:[.65002,1.15,0,0,.52778],8969:[.65002,1.15,0,0,.52778],8970:[.65002,1.15,0,0,.52778],8971:[.65002,1.15,0,0,.52778],10216:[.65002,1.15,0,0,.61111],10217:[.65002,1.15,0,0,.61111],10752:[.55001,1.05,0,0,1.51112],10753:[.55001,1.05,0,0,1.51112],10754:[.55001,1.05,0,0,1.51112],10756:[.55001,1.05,0,0,1.11111],10758:[.55001,1.05,0,0,1.11111]},"Size3-Regular":{32:[0,0,0,0,.25],40:[.95003,1.45,0,0,.73611],41:[.95003,1.45,0,0,.73611],47:[.95003,1.45,0,0,1.04445],91:[.95003,1.45,0,0,.52778],92:[.95003,1.45,0,0,1.04445],93:[.95003,1.45,0,0,.52778],123:[.95003,1.45,0,0,.75],125:[.95003,1.45,0,0,.75],160:[0,0,0,0,.25],710:[0,.75,0,0,1.44445],732:[0,.75,0,0,1.44445],770:[0,.75,0,0,1.44445],771:[0,.75,0,0,1.44445],8730:[.95003,1.45,0,0,1],8968:[.95003,1.45,0,0,.58334],8969:[.95003,1.45,0,0,.58334],8970:[.95003,1.45,0,0,.58334],8971:[.95003,1.45,0,0,.58334],10216:[.95003,1.45,0,0,.75],10217:[.95003,1.45,0,0,.75]},"Size4-Regular":{32:[0,0,0,0,.25],40:[1.25003,1.75,0,0,.79167],41:[1.25003,1.75,0,0,.79167],47:[1.25003,1.75,0,0,1.27778],91:[1.25003,1.75,0,0,.58334],92:[1.25003,1.75,0,0,1.27778],93:[1.25003,1.75,0,0,.58334],123:[1.25003,1.75,0,0,.80556],125:[1.25003,1.75,0,0,.80556],160:[0,0,0,0,.25],710:[0,.825,0,0,1.8889],732:[0,.825,0,0,1.8889],770:[0,.825,0,0,1.8889],771:[0,.825,0,0,1.8889],8730:[1.25003,1.75,0,0,1],8968:[1.25003,1.75,0,0,.63889],8969:[1.25003,1.75,0,0,.63889],8970:[1.25003,1.75,0,0,.63889],8971:[1.25003,1.75,0,0,.63889],9115:[.64502,1.155,0,0,.875],9116:[1e-5,.6,0,0,.875],9117:[.64502,1.155,0,0,.875],9118:[.64502,1.155,0,0,.875],9119:[1e-5,.6,0,0,.875],9120:[.64502,1.155,0,0,.875],9121:[.64502,1.155,0,0,.66667],9122:[-99e-5,.601,0,0,.66667],9123:[.64502,1.155,0,0,.66667],9124:[.64502,1.155,0,0,.66667],9125:[-99e-5,.601,0,0,.66667],9126:[.64502,1.155,0,0,.66667],9127:[1e-5,.9,0,0,.88889],9128:[.65002,1.15,0,0,.88889],9129:[.90001,0,0,0,.88889],9130:[0,.3,0,0,.88889],9131:[1e-5,.9,0,0,.88889],9132:[.65002,1.15,0,0,.88889],9133:[.90001,0,0,0,.88889],9143:[.88502,.915,0,0,1.05556],10216:[1.25003,1.75,0,0,.80556],10217:[1.25003,1.75,0,0,.80556],57344:[-.00499,.605,0,0,1.05556],57345:[-.00499,.605,0,0,1.05556],57680:[0,.12,0,0,.45],57681:[0,.12,0,0,.45],57682:[0,.12,0,0,.45],57683:[0,.12,0,0,.45]},"Typewriter-Regular":{32:[0,0,0,0,.525],33:[0,.61111,0,0,.525],34:[0,.61111,0,0,.525],35:[0,.61111,0,0,.525],36:[.08333,.69444,0,0,.525],37:[.08333,.69444,0,0,.525],38:[0,.61111,0,0,.525],39:[0,.61111,0,0,.525],40:[.08333,.69444,0,0,.525],41:[.08333,.69444,0,0,.525],42:[0,.52083,0,0,.525],43:[-.08056,.53055,0,0,.525],44:[.13889,.125,0,0,.525],45:[-.08056,.53055,0,0,.525],46:[0,.125,0,0,.525],47:[.08333,.69444,0,0,.525],48:[0,.61111,0,0,.525],49:[0,.61111,0,0,.525],50:[0,.61111,0,0,.525],51:[0,.61111,0,0,.525],52:[0,.61111,0,0,.525],53:[0,.61111,0,0,.525],54:[0,.61111,0,0,.525],55:[0,.61111,0,0,.525],56:[0,.61111,0,0,.525],57:[0,.61111,0,0,.525],58:[0,.43056,0,0,.525],59:[.13889,.43056,0,0,.525],60:[-.05556,.55556,0,0,.525],61:[-.19549,.41562,0,0,.525],62:[-.05556,.55556,0,0,.525],63:[0,.61111,0,0,.525],64:[0,.61111,0,0,.525],65:[0,.61111,0,0,.525],66:[0,.61111,0,0,.525],67:[0,.61111,0,0,.525],68:[0,.61111,0,0,.525],69:[0,.61111,0,0,.525],70:[0,.61111,0,0,.525],71:[0,.61111,0,0,.525],72:[0,.61111,0,0,.525],73:[0,.61111,0,0,.525],74:[0,.61111,0,0,.525],75:[0,.61111,0,0,.525],76:[0,.61111,0,0,.525],77:[0,.61111,0,0,.525],78:[0,.61111,0,0,.525],79:[0,.61111,0,0,.525],80:[0,.61111,0,0,.525],81:[.13889,.61111,0,0,.525],82:[0,.61111,0,0,.525],83:[0,.61111,0,0,.525],84:[0,.61111,0,0,.525],85:[0,.61111,0,0,.525],86:[0,.61111,0,0,.525],87:[0,.61111,0,0,.525],88:[0,.61111,0,0,.525],89:[0,.61111,0,0,.525],90:[0,.61111,0,0,.525],91:[.08333,.69444,0,0,.525],92:[.08333,.69444,0,0,.525],93:[.08333,.69444,0,0,.525],94:[0,.61111,0,0,.525],95:[.09514,0,0,0,.525],96:[0,.61111,0,0,.525],97:[0,.43056,0,0,.525],98:[0,.61111,0,0,.525],99:[0,.43056,0,0,.525],100:[0,.61111,0,0,.525],101:[0,.43056,0,0,.525],102:[0,.61111,0,0,.525],103:[.22222,.43056,0,0,.525],104:[0,.61111,0,0,.525],105:[0,.61111,0,0,.525],106:[.22222,.61111,0,0,.525],107:[0,.61111,0,0,.525],108:[0,.61111,0,0,.525],109:[0,.43056,0,0,.525],110:[0,.43056,0,0,.525],111:[0,.43056,0,0,.525],112:[.22222,.43056,0,0,.525],113:[.22222,.43056,0,0,.525],114:[0,.43056,0,0,.525],115:[0,.43056,0,0,.525],116:[0,.55358,0,0,.525],117:[0,.43056,0,0,.525],118:[0,.43056,0,0,.525],119:[0,.43056,0,0,.525],120:[0,.43056,0,0,.525],121:[.22222,.43056,0,0,.525],122:[0,.43056,0,0,.525],123:[.08333,.69444,0,0,.525],124:[.08333,.69444,0,0,.525],125:[.08333,.69444,0,0,.525],126:[0,.61111,0,0,.525],127:[0,.61111,0,0,.525],160:[0,0,0,0,.525],176:[0,.61111,0,0,.525],184:[.19445,0,0,0,.525],305:[0,.43056,0,0,.525],567:[.22222,.43056,0,0,.525],711:[0,.56597,0,0,.525],713:[0,.56555,0,0,.525],714:[0,.61111,0,0,.525],715:[0,.61111,0,0,.525],728:[0,.61111,0,0,.525],730:[0,.61111,0,0,.525],770:[0,.61111,0,0,.525],771:[0,.61111,0,0,.525],776:[0,.61111,0,0,.525],915:[0,.61111,0,0,.525],916:[0,.61111,0,0,.525],920:[0,.61111,0,0,.525],923:[0,.61111,0,0,.525],926:[0,.61111,0,0,.525],928:[0,.61111,0,0,.525],931:[0,.61111,0,0,.525],933:[0,.61111,0,0,.525],934:[0,.61111,0,0,.525],936:[0,.61111,0,0,.525],937:[0,.61111,0,0,.525],8216:[0,.61111,0,0,.525],8217:[0,.61111,0,0,.525],8242:[0,.61111,0,0,.525],9251:[.11111,.21944,0,0,.525]}},va={slant:[.25,.25,.25],space:[0,0,0],stretch:[0,0,0],shrink:[0,0,0],xHeight:[.431,.431,.431],quad:[1,1.171,1.472],extraSpace:[0,0,0],num1:[.677,.732,.925],num2:[.394,.384,.387],num3:[.444,.471,.504],denom1:[.686,.752,1.025],denom2:[.345,.344,.532],sup1:[.413,.503,.504],sup2:[.363,.431,.404],sup3:[.289,.286,.294],sub1:[.15,.143,.2],sub2:[.247,.286,.4],supDrop:[.386,.353,.494],subDrop:[.05,.071,.1],delim1:[2.39,1.7,1.98],delim2:[1.01,1.157,1.42],axisHeight:[.25,.25,.25],defaultRuleThickness:[.04,.049,.049],bigOpSpacing1:[.111,.111,.111],bigOpSpacing2:[.166,.166,.166],bigOpSpacing3:[.2,.2,.2],bigOpSpacing4:[.6,.611,.611],bigOpSpacing5:[.1,.143,.143],sqrtRuleThickness:[.04,.04,.04],ptPerEm:[10,10,10],doubleRuleSep:[.2,.2,.2],arrayRuleWidth:[.04,.04,.04],fboxsep:[.3,.3,.3],fboxrule:[.04,.04,.04]},xa={"Å":"A","Ð":"D","Þ":"o","å":"a","ð":"d","þ":"o","А":"A","Б":"B","В":"B","Г":"F","Д":"A","Е":"E","Ж":"K","З":"3","И":"N","Й":"N","К":"K","Л":"N","М":"M","Н":"H","О":"O","П":"N","Р":"P","С":"C","Т":"T","У":"y","Ф":"O","Х":"X","Ц":"U","Ч":"h","Ш":"W","Щ":"W","Ъ":"B","Ы":"X","Ь":"B","Э":"3","Ю":"X","Я":"R","а":"a","б":"b","в":"a","г":"r","д":"y","е":"e","ж":"m","з":"e","и":"n","й":"n","к":"n","л":"n","м":"m","н":"n","о":"o","п":"n","р":"p","с":"c","т":"o","у":"y","ф":"b","х":"x","ц":"n","ч":"n","ш":"w","щ":"w","ъ":"a","ы":"m","ь":"a","э":"e","ю":"m","я":"r"},mt(pi,"setFontMetrics"),mt(gi,"getCharacterMetrics"),ba={},mt(fi,"getGlobalMetrics"),wa=[[1,1,1],[2,1,1],[3,1,1],[4,2,1],[5,2,1],[6,3,1],[7,4,2],[8,6,3],[9,7,6],[10,8,7],[11,10,9]],ka=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],Ta=mt(function(e,t){return t.size<2?e:wa[e-1][t.size-1]},"sizeAtStyle"),(Ea=class i{static{mt(this,"Options")}constructor(e){this.style=void 0,this.color=void 0,this.size=void 0,this.textSize=void 0,this.phantom=void 0,this.font=void 0,this.fontFamily=void 0,this.fontWeight=void 0,this.fontShape=void 0,this.sizeMultiplier=void 0,this.maxSize=void 0,this.minRuleThickness=void 0,this._fontMetrics=void 0,this.style=e.style,this.color=e.color,this.size=e.size||i.BASESIZE,this.textSize=e.textSize||this.size,this.phantom=!!e.phantom,this.font=e.font||"",this.fontFamily=e.fontFamily||"",this.fontWeight=e.fontWeight||"",this.fontShape=e.fontShape||"",this.sizeMultiplier=ka[this.size-1],this.maxSize=e.maxSize,this.minRuleThickness=e.minRuleThickness,this._fontMetrics=void 0}extend(e){var t,r={style:this.style,size:this.size,textSize:this.textSize,color:this.color,phantom:this.phantom,font:this.font,fontFamily:this.fontFamily,fontWeight:this.fontWeight,fontShape:this.fontShape,maxSize:this.maxSize,minRuleThickness:this.minRuleThickness};for(t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);return new i(r)}havingStyle(e){return this.style===e?this:this.extend({style:e,size:Ta(this.textSize,e)})}havingCrampedStyle(){return this.havingStyle(this.style.cramp())}havingSize(e){return this.size===e&&this.textSize===e?this:this.extend({style:this.style.text(),size:e,textSize:e,sizeMultiplier:ka[e-1]})}havingBaseStyle(e){e=e||this.style.text();var t=Ta(i.BASESIZE,e);return this.size===t&&this.textSize===i.BASESIZE&&this.style===e?this:this.extend({style:e,size:t})}havingBaseSizing(){var e;switch(this.style.id){case 4:case 5:e=3;break;case 6:case 7:e=1;break;default:e=6}return this.extend({style:this.style.text(),size:e})}withColor(e){return this.extend({color:e})}withPhantom(){return this.extend({phantom:!0})}withFont(e){return this.extend({font:e})}withTextFontFamily(e){return this.extend({fontFamily:e,font:""})}withTextFontWeight(e){return this.extend({fontWeight:e,font:""})}withTextFontShape(e){return this.extend({fontShape:e,font:""})}sizingClasses(e){return e.size!==this.size?["sizing","reset-size"+e.size,"size"+this.size]:[]}baseSizingClasses(){return this.size!==i.BASESIZE?["sizing","reset-size"+this.size,"size"+i.BASESIZE]:[]}fontMetrics(){return this._fontMetrics||(this._fontMetrics=fi(this.size)),this._fontMetrics}getColor(){return this.phantom?"transparent":this.color}}).BASESIZE=6,Ca={pt:1,mm:7227/2540,cm:7227/254,in:72.27,bp:1.00375,pc:12,dd:1238/1157,cc:14856/1157,nd:685/642,nc:1370/107,sp:1/65536,px:1.00375},_a={ex:!0,em:!0,mu:!0},Sa=mt(function(e){return(e="string"!=typeof e?e.unit:e)in Ca||e in _a||"ex"===e},"validUnit"),Aa=mt(function(e,t){var r;if(e.unit in Ca)r=Ca[e.unit]/t.fontMetrics().ptPerEm/t.sizeMultiplier;else if("mu"===e.unit)r=t.fontMetrics().cssEmPerMu;else{var n=t.style.isTight()?t.havingStyle(t.style.text()):t;if("ex"===e.unit)r=n.fontMetrics().xHeight;else{if("em"!==e.unit)throw new X("Invalid unit: '"+e.unit+"'");r=n.fontMetrics().quad}n!==t&&(r*=n.sizeMultiplier/t.sizeMultiplier)}return Math.min(e.number*r,t.maxSize)},"calculateSize"),K=mt(function(e){return+e.toFixed(4)+"em"},"makeEm"),La=mt(function(e){return e.filter(e=>e).join(" ")},"createClass"),Na=mt(function(e,t,r){this.classes=e||[],this.attributes={},this.height=0,this.depth=0,this.maxFontSize=0,this.style=r||{},t&&(t.style.isTight()&&this.classes.push("mtight"),e=t.getColor())&&(this.style.color=e)},"initNode"),Ia=mt(function(e){var t,r,n=document.createElement(e);for(t in n.className=La(this.classes),this.style)this.style.hasOwnProperty(t)&&(n.style[t]=this.style[t]);for(r in this.attributes)this.attributes.hasOwnProperty(r)&&n.setAttribute(r,this.attributes[r]);for(var i=0;i<this.children.length;i++)n.appendChild(this.children[i].toNode());return n},"toNode"),Ra=/[\s"'>/=\x00-\x1f]/,Ma=mt(function(e){var t,r,n="<"+e,i=(this.classes.length&&(n+=' class="'+Wi.escape(La(this.classes))+'"'),"");for(t in this.style)this.style.hasOwnProperty(t)&&(i+=Wi.hyphenate(t)+":"+this.style[t]+";");for(r in i&&(n+=' style="'+Wi.escape(i)+'"'),this.attributes)if(this.attributes.hasOwnProperty(r)){if(Ra.test(r))throw new X("Invalid attribute name '"+r+"'");n+=" "+r+'="'+Wi.escape(this.attributes[r])+'"'}n+=">";for(var a=0;a<this.children.length;a++)n+=this.children[a].toMarkup();return n+"</"+e+">"},"toMarkup"),Da=class{static{mt(this,"Span")}constructor(e,t,r,n){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.width=void 0,this.maxFontSize=void 0,this.style=void 0,Na.call(this,e,r,n),this.children=t||[]}setAttribute(e,t){this.attributes[e]=t}hasClass(e){return Wi.contains(this.classes,e)}toNode(){return Ia.call(this,"span")}toMarkup(){return Ma.call(this,"span")}},Oa=class{static{mt(this,"Anchor")}constructor(e,t,r,n){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,Na.call(this,t,n),this.children=r||[],this.setAttribute("href",e)}setAttribute(e,t){this.attributes[e]=t}hasClass(e){return Wi.contains(this.classes,e)}toNode(){return Ia.call(this,"a")}toMarkup(){return Ma.call(this,"a")}},Pa=class{static{mt(this,"Img")}constructor(e,t,r){this.src=void 0,this.alt=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.alt=t,this.src=e,this.classes=["mord"],this.style=r}hasClass(e){return Wi.contains(this.classes,e)}toNode(){var e,t=document.createElement("img");for(e in t.src=this.src,t.alt=this.alt,t.className="mord",this.style)this.style.hasOwnProperty(e)&&(t.style[e]=this.style[e]);return t}toMarkup(){var e,t='<img src="'+Wi.escape(this.src)+'" alt="'+Wi.escape(this.alt)+'"',r="";for(e in this.style)this.style.hasOwnProperty(e)&&(r+=Wi.hyphenate(e)+":"+this.style[e]+";");return r&&(t+=' style="'+Wi.escape(r)+'"'),t+"'/>"}},Ba={"î":"ı̂","ï":"ı̈","í":"ı́","ì":"ı̀"},$a=class{static{mt(this,"SymbolNode")}constructor(e,t,r,n,i,a,s,o){this.text=void 0,this.height=void 0,this.depth=void 0,this.italic=void 0,this.skew=void 0,this.width=void 0,this.maxFontSize=void 0,this.classes=void 0,this.style=void 0,this.text=e,this.height=t||0,this.depth=r||0,this.italic=n||0,this.skew=i||0,this.width=a||0,this.classes=s||[],this.style=o||{},this.maxFontSize=0,(e=ui(this.text.charCodeAt(0)))&&this.classes.push(e+"_fallback"),/[îïíì]/.test(this.text)&&(this.text=Ba[this.text])}hasClass(e){return Wi.contains(this.classes,e)}toNode(){var e,t=document.createTextNode(this.text),r=null;for(e in 0<this.italic&&((r=document.createElement("span")).style.marginRight=K(this.italic)),0<this.classes.length&&((r=r||document.createElement("span")).className=La(this.classes)),this.style)this.style.hasOwnProperty(e)&&(r=r||document.createElement("span"),r.style[e]=this.style[e]);return r?(r.appendChild(t),r):t}toMarkup(){var e,t=!1,r="<span",n=(this.classes.length&&(t=!0,r=(r+=' class="')+Wi.escape(La(this.classes))+'"'),"");for(e in 0<this.italic&&(n+="margin-right:"+this.italic+"em;"),this.style)this.style.hasOwnProperty(e)&&(n+=Wi.hyphenate(e)+":"+this.style[e]+";");n&&(t=!0,r+=' style="'+Wi.escape(n)+'"');var i=Wi.escape(this.text);return t?(r+=">")+i+"</span>":i}},Fa=class{static{mt(this,"SvgNode")}constructor(e,t){this.children=void 0,this.attributes=void 0,this.children=e||[],this.attributes=t||{}}toNode(){var e,t=document.createElementNS("http://www.w3.org/2000/svg","svg");for(e in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,e)&&t.setAttribute(e,this.attributes[e]);for(var r=0;r<this.children.length;r++)t.appendChild(this.children[r].toNode());return t}toMarkup(){var e,t='<svg xmlns="http://www.w3.org/2000/svg"';for(e in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,e)&&(t+=" "+e+'="'+Wi.escape(this.attributes[e])+'"');t+=">";for(var r=0;r<this.children.length;r++)t+=this.children[r].toMarkup();return t+"</svg>"}},za=class{static{mt(this,"PathNode")}constructor(e,t){this.pathName=void 0,this.alternate=void 0,this.pathName=e,this.alternate=t}toNode(){var e=document.createElementNS("http://www.w3.org/2000/svg","path");return this.alternate?e.setAttribute("d",this.alternate):e.setAttribute("d",ga[this.pathName]),e}toMarkup(){return this.alternate?'<path d="'+Wi.escape(this.alternate)+'"/>':'<path d="'+Wi.escape(ga[this.pathName])+'"/>'}},Ga=class{static{mt(this,"LineNode")}constructor(e){this.attributes=void 0,this.attributes=e||{}}toNode(){var e,t=document.createElementNS("http://www.w3.org/2000/svg","line");for(e in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,e)&&t.setAttribute(e,this.attributes[e]);return t}toMarkup(){var e,t="<line";for(e in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,e)&&(t+=" "+e+'="'+Wi.escape(this.attributes[e])+'"');return t+"/>"}},mt(mi,"assertSymbolDomNode"),mt(yi,"assertSpan"),Ua={bin:1,close:1,inner:1,open:1,punct:1,rel:1},qa={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1},ja={math:{},text:{}},mt(t,"defineSymbol"),u="text",f="ams",Bl="accent-token",g="bin",cl="close",fl="inner",Ya="mathord",Pl="op-token",el="open",pl="punct",Jo="spacing",p="textord",t(h="math",d="main",m="rel","≡","\\equiv",!0),t(h,d,m,"≺","\\prec",!0),t(h,d,m,"≻","\\succ",!0),t(h,d,m,"∼","\\sim",!0),t(h,d,m,"⊥","\\perp"),t(h,d,m,"⪯","\\preceq",!0),t(h,d,m,"⪰","\\succeq",!0),t(h,d,m,"≃","\\simeq",!0),t(h,d,m,"∣","\\mid",!0),t(h,d,m,"≪","\\ll",!0),t(h,d,m,"≫","\\gg",!0),t(h,d,m,"≍","\\asymp",!0),t(h,d,m,"∥","\\parallel"),t(h,d,m,"⋈","\\bowtie",!0),t(h,d,m,"⌣","\\smile",!0),t(h,d,m,"⊑","\\sqsubseteq",!0),t(h,d,m,"⊒","\\sqsupseteq",!0),t(h,d,m,"≐","\\doteq",!0),t(h,d,m,"⌢","\\frown",!0),t(h,d,m,"∋","\\ni",!0),t(h,d,m,"∝","\\propto",!0),t(h,d,m,"⊢","\\vdash",!0),t(h,d,m,"⊣","\\dashv",!0),t(h,d,m,"∋","\\owns"),t(h,d,pl,".","\\ldotp"),t(h,d,pl,"⋅","\\cdotp"),t(h,d,p,"#","\\#"),t(u,d,p,"#","\\#"),t(h,d,p,"&","\\&"),t(u,d,p,"&","\\&"),t(h,d,p,"ℵ","\\aleph",!0),t(h,d,p,"∀","\\forall",!0),t(h,d,p,"ℏ","\\hbar",!0),t(h,d,p,"∃","\\exists",!0),t(h,d,p,"∇","\\nabla",!0),t(h,d,p,"♭","\\flat",!0),t(h,d,p,"ℓ","\\ell",!0),t(h,d,p,"♮","\\natural",!0),t(h,d,p,"♣","\\clubsuit",!0),t(h,d,p,"℘","\\wp",!0),t(h,d,p,"♯","\\sharp",!0),t(h,d,p,"♢","\\diamondsuit",!0),t(h,d,p,"ℜ","\\Re",!0),t(h,d,p,"♡","\\heartsuit",!0),t(h,d,p,"ℑ","\\Im",!0),t(h,d,p,"♠","\\spadesuit",!0),t(h,d,p,"§","\\S",!0),t(u,d,p,"§","\\S"),t(h,d,p,"¶","\\P",!0),t(u,d,p,"¶","\\P"),t(h,d,p,"†","\\dag"),t(u,d,p,"†","\\dag"),t(u,d,p,"†","\\textdagger"),t(h,d,p,"‡","\\ddag"),t(u,d,p,"‡","\\ddag"),t(u,d,p,"‡","\\textdaggerdbl"),t(h,d,cl,"⎱","\\rmoustache",!0),t(h,d,el,"⎰","\\lmoustache",!0),t(h,d,cl,"⟯","\\rgroup",!0),t(h,d,el,"⟮","\\lgroup",!0),t(h,d,g,"∓","\\mp",!0),t(h,d,g,"⊖","\\ominus",!0),t(h,d,g,"⊎","\\uplus",!0),t(h,d,g,"⊓","\\sqcap",!0),t(h,d,g,"∗","\\ast"),t(h,d,g,"⊔","\\sqcup",!0),t(h,d,g,"◯","\\bigcirc",!0),t(h,d,g,"∙","\\bullet",!0),t(h,d,g,"‡","\\ddagger"),t(h,d,g,"≀","\\wr",!0),t(h,d,g,"⨿","\\amalg"),t(h,d,g,"&","\\And"),t(h,d,m,"⟵","\\longleftarrow",!0),t(h,d,m,"⇐","\\Leftarrow",!0),t(h,d,m,"⟸","\\Longleftarrow",!0),t(h,d,m,"⟶","\\longrightarrow",!0),t(h,d,m,"⇒","\\Rightarrow",!0),t(h,d,m,"⟹","\\Longrightarrow",!0),t(h,d,m,"↔","\\leftrightarrow",!0),t(h,d,m,"⟷","\\longleftrightarrow",!0),t(h,d,m,"⇔","\\Leftrightarrow",!0),t(h,d,m,"⟺","\\Longleftrightarrow",!0),t(h,d,m,"↦","\\mapsto",!0),t(h,d,m,"⟼","\\longmapsto",!0),t(h,d,m,"↗","\\nearrow",!0),t(h,d,m,"↩","\\hookleftarrow",!0),t(h,d,m,"↪","\\hookrightarrow",!0),t(h,d,m,"↘","\\searrow",!0),t(h,d,m,"↼","\\leftharpoonup",!0),t(h,d,m,"⇀","\\rightharpoonup",!0),t(h,d,m,"↙","\\swarrow",!0),t(h,d,m,"↽","\\leftharpoondown",!0),t(h,d,m,"⇁","\\rightharpoondown",!0),t(h,d,m,"↖","\\nwarrow",!0),t(h,d,m,"⇌","\\rightleftharpoons",!0),t(h,f,m,"≮","\\nless",!0),t(h,f,m,"","\\@nleqslant"),t(h,f,m,"","\\@nleqq"),t(h,f,m,"⪇","\\lneq",!0),t(h,f,m,"≨","\\lneqq",!0),t(h,f,m,"","\\@lvertneqq"),t(h,f,m,"⋦","\\lnsim",!0),t(h,f,m,"⪉","\\lnapprox",!0),t(h,f,m,"⊀","\\nprec",!0),t(h,f,m,"⋠","\\npreceq",!0),t(h,f,m,"⋨","\\precnsim",!0),t(h,f,m,"⪹","\\precnapprox",!0),t(h,f,m,"≁","\\nsim",!0),t(h,f,m,"","\\@nshortmid"),t(h,f,m,"∤","\\nmid",!0),t(h,f,m,"⊬","\\nvdash",!0),t(h,f,m,"⊭","\\nvDash",!0),t(h,f,m,"⋪","\\ntriangleleft"),t(h,f,m,"⋬","\\ntrianglelefteq",!0),t(h,f,m,"⊊","\\subsetneq",!0),t(h,f,m,"","\\@varsubsetneq"),t(h,f,m,"⫋","\\subsetneqq",!0),t(h,f,m,"","\\@varsubsetneqq"),t(h,f,m,"≯","\\ngtr",!0),t(h,f,m,"","\\@ngeqslant"),t(h,f,m,"","\\@ngeqq"),t(h,f,m,"⪈","\\gneq",!0),t(h,f,m,"≩","\\gneqq",!0),t(h,f,m,"","\\@gvertneqq"),t(h,f,m,"⋧","\\gnsim",!0),t(h,f,m,"⪊","\\gnapprox",!0),t(h,f,m,"⊁","\\nsucc",!0),t(h,f,m,"⋡","\\nsucceq",!0),t(h,f,m,"⋩","\\succnsim",!0),t(h,f,m,"⪺","\\succnapprox",!0),t(h,f,m,"≆","\\ncong",!0),t(h,f,m,"","\\@nshortparallel"),t(h,f,m,"∦","\\nparallel",!0),t(h,f,m,"⊯","\\nVDash",!0),t(h,f,m,"⋫","\\ntriangleright"),t(h,f,m,"⋭","\\ntrianglerighteq",!0),t(h,f,m,"","\\@nsupseteqq"),t(h,f,m,"⊋","\\supsetneq",!0),t(h,f,m,"","\\@varsupsetneq"),t(h,f,m,"⫌","\\supsetneqq",!0),t(h,f,m,"","\\@varsupsetneqq"),t(h,f,m,"⊮","\\nVdash",!0),t(h,f,m,"⪵","\\precneqq",!0),t(h,f,m,"⪶","\\succneqq",!0),t(h,f,m,"","\\@nsubseteqq"),t(h,f,g,"⊴","\\unlhd"),t(h,f,g,"⊵","\\unrhd"),t(h,f,m,"↚","\\nleftarrow",!0),t(h,f,m,"↛","\\nrightarrow",!0),t(h,f,m,"⇍","\\nLeftarrow",!0),t(h,f,m,"⇏","\\nRightarrow",!0),t(h,f,m,"↮","\\nleftrightarrow",!0),t(h,f,m,"⇎","\\nLeftrightarrow",!0),t(h,f,m,"△","\\vartriangle"),t(h,f,p,"ℏ","\\hslash"),t(h,f,p,"▽","\\triangledown"),t(h,f,p,"◊","\\lozenge"),t(h,f,p,"Ⓢ","\\circledS"),t(h,f,p,"®","\\circledR"),t(u,f,p,"®","\\circledR"),t(h,f,p,"∡","\\measuredangle",!0),t(h,f,p,"∄","\\nexists"),t(h,f,p,"℧","\\mho"),t(h,f,p,"Ⅎ","\\Finv",!0),t(h,f,p,"⅁","\\Game",!0),t(h,f,p,"‵","\\backprime"),t(h,f,p,"▲","\\blacktriangle"),t(h,f,p,"▼","\\blacktriangledown"),t(h,f,p,"■","\\blacksquare"),t(h,f,p,"⧫","\\blacklozenge"),t(h,f,p,"★","\\bigstar"),t(h,f,p,"∢","\\sphericalangle",!0),t(h,f,p,"∁","\\complement",!0),t(h,f,p,"ð","\\eth",!0),t(u,d,p,"ð","ð"),t(h,f,p,"╱","\\diagup"),t(h,f,p,"╲","\\diagdown"),t(h,f,p,"□","\\square"),t(h,f,p,"□","\\Box"),t(h,f,p,"◊","\\Diamond"),t(h,f,p,"¥","\\yen",!0),t(u,f,p,"¥","\\yen",!0),t(h,f,p,"✓","\\checkmark",!0),t(u,f,p,"✓","\\checkmark"),t(h,f,p,"ℶ","\\beth",!0),t(h,f,p,"ℸ","\\daleth",!0),t(h,f,p,"ℷ","\\gimel",!0),t(h,f,p,"ϝ","\\digamma",!0),t(h,f,p,"ϰ","\\varkappa"),t(h,f,el,"┌","\\@ulcorner",!0),t(h,f,cl,"┐","\\@urcorner",!0),t(h,f,el,"└","\\@llcorner",!0),t(h,f,cl,"┘","\\@lrcorner",!0),t(h,f,m,"≦","\\leqq",!0),t(h,f,m,"⩽","\\leqslant",!0),t(h,f,m,"⪕","\\eqslantless",!0),t(h,f,m,"≲","\\lesssim",!0),t(h,f,m,"⪅","\\lessapprox",!0),t(h,f,m,"≊","\\approxeq",!0),t(h,f,g,"⋖","\\lessdot"),t(h,f,m,"⋘","\\lll",!0),t(h,f,m,"≶","\\lessgtr",!0),t(h,f,m,"⋚","\\lesseqgtr",!0),t(h,f,m,"⪋","\\lesseqqgtr",!0),t(h,f,m,"≑","\\doteqdot"),t(h,f,m,"≓","\\risingdotseq",!0),t(h,f,m,"≒","\\fallingdotseq",!0),t(h,f,m,"∽","\\backsim",!0),t(h,f,m,"⋍","\\backsimeq",!0),t(h,f,m,"⫅","\\subseteqq",!0),t(h,f,m,"⋐","\\Subset",!0),t(h,f,m,"⊏","\\sqsubset",!0),t(h,f,m,"≼","\\preccurlyeq",!0),t(h,f,m,"⋞","\\curlyeqprec",!0),t(h,f,m,"≾","\\precsim",!0),t(h,f,m,"⪷","\\precapprox",!0),t(h,f,m,"⊲","\\vartriangleleft"),t(h,f,m,"⊴","\\trianglelefteq"),t(h,f,m,"⊨","\\vDash",!0),t(h,f,m,"⊪","\\Vvdash",!0),t(h,f,m,"⌣","\\smallsmile"),t(h,f,m,"⌢","\\smallfrown"),t(h,f,m,"≏","\\bumpeq",!0),t(h,f,m,"≎","\\Bumpeq",!0),t(h,f,m,"≧","\\geqq",!0),t(h,f,m,"⩾","\\geqslant",!0),t(h,f,m,"⪖","\\eqslantgtr",!0),t(h,f,m,"≳","\\gtrsim",!0),t(h,f,m,"⪆","\\gtrapprox",!0),t(h,f,g,"⋗","\\gtrdot"),t(h,f,m,"⋙","\\ggg",!0),t(h,f,m,"≷","\\gtrless",!0),t(h,f,m,"⋛","\\gtreqless",!0),t(h,f,m,"⪌","\\gtreqqless",!0),t(h,f,m,"≖","\\eqcirc",!0),t(h,f,m,"≗","\\circeq",!0),t(h,f,m,"≜","\\triangleq",!0),t(h,f,m,"∼","\\thicksim"),t(h,f,m,"≈","\\thickapprox"),t(h,f,m,"⫆","\\supseteqq",!0),t(h,f,m,"⋑","\\Supset",!0),t(h,f,m,"⊐","\\sqsupset",!0),t(h,f,m,"≽","\\succcurlyeq",!0),t(h,f,m,"⋟","\\curlyeqsucc",!0),t(h,f,m,"≿","\\succsim",!0),t(h,f,m,"⪸","\\succapprox",!0),t(h,f,m,"⊳","\\vartriangleright"),t(h,f,m,"⊵","\\trianglerighteq"),t(h,f,m,"⊩","\\Vdash",!0),t(h,f,m,"∣","\\shortmid"),t(h,f,m,"∥","\\shortparallel"),t(h,f,m,"≬","\\between",!0),t(h,f,m,"⋔","\\pitchfork",!0),t(h,f,m,"∝","\\varpropto"),t(h,f,m,"◀","\\blacktriangleleft"),t(h,f,m,"∴","\\therefore",!0),t(h,f,m,"∍","\\backepsilon"),t(h,f,m,"▶","\\blacktriangleright"),t(h,f,m,"∵","\\because",!0),t(h,f,m,"⋘","\\llless"),t(h,f,m,"⋙","\\gggtr"),t(h,f,g,"⊲","\\lhd"),t(h,f,g,"⊳","\\rhd"),t(h,f,m,"≂","\\eqsim",!0),t(h,d,m,"⋈","\\Join"),t(h,f,m,"≑","\\Doteq",!0),t(h,f,g,"∔","\\dotplus",!0),t(h,f,g,"∖","\\smallsetminus"),t(h,f,g,"⋒","\\Cap",!0),t(h,f,g,"⋓","\\Cup",!0),t(h,f,g,"⩞","\\doublebarwedge",!0),t(h,f,g,"⊟","\\boxminus",!0),t(h,f,g,"⊞","\\boxplus",!0),t(h,f,g,"⋇","\\divideontimes",!0),t(h,f,g,"⋉","\\ltimes",!0),t(h,f,g,"⋊","\\rtimes",!0),t(h,f,g,"⋋","\\leftthreetimes",!0),t(h,f,g,"⋌","\\rightthreetimes",!0),t(h,f,g,"⋏","\\curlywedge",!0),t(h,f,g,"⋎","\\curlyvee",!0),t(h,f,g,"⊝","\\circleddash",!0),t(h,f,g,"⊛","\\circledast",!0),t(h,f,g,"⋅","\\centerdot"),t(h,f,g,"⊺","\\intercal",!0),t(h,f,g,"⋒","\\doublecap"),t(h,f,g,"⋓","\\doublecup"),t(h,f,g,"⊠","\\boxtimes",!0),t(h,f,m,"⇢","\\dashrightarrow",!0),t(h,f,m,"⇠","\\dashleftarrow",!0),t(h,f,m,"⇇","\\leftleftarrows",!0),t(h,f,m,"⇆","\\leftrightarrows",!0),t(h,f,m,"⇚","\\Lleftarrow",!0),t(h,f,m,"↞","\\twoheadleftarrow",!0),t(h,f,m,"↢","\\leftarrowtail",!0),t(h,f,m,"↫","\\looparrowleft",!0),t(h,f,m,"⇋","\\leftrightharpoons",!0),t(h,f,m,"↶","\\curvearrowleft",!0),t(h,f,m,"↺","\\circlearrowleft",!0),t(h,f,m,"↰","\\Lsh",!0),t(h,f,m,"⇈","\\upuparrows",!0),t(h,f,m,"↿","\\upharpoonleft",!0),t(h,f,m,"⇃","\\downharpoonleft",!0),t(h,d,m,"⊶","\\origof",!0),t(h,d,m,"⊷","\\imageof",!0),t(h,f,m,"⊸","\\multimap",!0),t(h,f,m,"↭","\\leftrightsquigarrow",!0),t(h,f,m,"⇉","\\rightrightarrows",!0),t(h,f,m,"⇄","\\rightleftarrows",!0),t(h,f,m,"↠","\\twoheadrightarrow",!0),t(h,f,m,"↣","\\rightarrowtail",!0),t(h,f,m,"↬","\\looparrowright",!0),t(h,f,m,"↷","\\curvearrowright",!0),t(h,f,m,"↻","\\circlearrowright",!0),t(h,f,m,"↱","\\Rsh",!0),t(h,f,m,"⇊","\\downdownarrows",!0),t(h,f,m,"↾","\\upharpoonright",!0),t(h,f,m,"⇂","\\downharpoonright",!0),t(h,f,m,"⇝","\\rightsquigarrow",!0),t(h,f,m,"⇝","\\leadsto"),t(h,f,m,"⇛","\\Rrightarrow",!0),t(h,f,m,"↾","\\restriction"),t(h,d,p,"‘","`"),t(h,d,p,"$","\\$"),t(u,d,p,"$","\\$"),t(u,d,p,"$","\\textdollar"),t(h,d,p,"%","\\%"),t(u,d,p,"%","\\%"),t(h,d,p,"_","\\_"),t(u,d,p,"_","\\_"),t(u,d,p,"_","\\textunderscore"),t(h,d,p,"∠","\\angle",!0),t(h,d,p,"∞","\\infty",!0),t(h,d,p,"′","\\prime"),t(h,d,p,"△","\\triangle"),t(h,d,p,"Γ","\\Gamma",!0),t(h,d,p,"Δ","\\Delta",!0),t(h,d,p,"Θ","\\Theta",!0),t(h,d,p,"Λ","\\Lambda",!0),t(h,d,p,"Ξ","\\Xi",!0),t(h,d,p,"Π","\\Pi",!0),t(h,d,p,"Σ","\\Sigma",!0),t(h,d,p,"Υ","\\Upsilon",!0),t(h,d,p,"Φ","\\Phi",!0),t(h,d,p,"Ψ","\\Psi",!0),t(h,d,p,"Ω","\\Omega",!0),t(h,d,p,"A","Α"),t(h,d,p,"B","Β"),t(h,d,p,"E","Ε"),t(h,d,p,"Z","Ζ"),t(h,d,p,"H","Η"),t(h,d,p,"I","Ι"),t(h,d,p,"K","Κ"),t(h,d,p,"M","Μ"),t(h,d,p,"N","Ν"),t(h,d,p,"O","Ο"),t(h,d,p,"P","Ρ"),t(h,d,p,"T","Τ"),t(h,d,p,"X","Χ"),t(h,d,p,"¬","\\neg",!0),t(h,d,p,"¬","\\lnot"),t(h,d,p,"⊤","\\top"),t(h,d,p,"⊥","\\bot"),t(h,d,p,"∅","\\emptyset"),t(h,f,p,"∅","\\varnothing"),t(h,d,Ya,"α","\\alpha",!0),t(h,d,Ya,"β","\\beta",!0),t(h,d,Ya,"γ","\\gamma",!0),t(h,d,Ya,"δ","\\delta",!0),t(h,d,Ya,"ϵ","\\epsilon",!0),t(h,d,Ya,"ζ","\\zeta",!0),t(h,d,Ya,"η","\\eta",!0),t(h,d,Ya,"θ","\\theta",!0),t(h,d,Ya,"ι","\\iota",!0),t(h,d,Ya,"κ","\\kappa",!0),t(h,d,Ya,"λ","\\lambda",!0),t(h,d,Ya,"μ","\\mu",!0),t(h,d,Ya,"ν","\\nu",!0),t(h,d,Ya,"ξ","\\xi",!0),t(h,d,Ya,"ο","\\omicron",!0),t(h,d,Ya,"π","\\pi",!0),t(h,d,Ya,"ρ","\\rho",!0),t(h,d,Ya,"σ","\\sigma",!0),t(h,d,Ya,"τ","\\tau",!0),t(h,d,Ya,"υ","\\upsilon",!0),t(h,d,Ya,"ϕ","\\phi",!0),t(h,d,Ya,"χ","\\chi",!0),t(h,d,Ya,"ψ","\\psi",!0),t(h,d,Ya,"ω","\\omega",!0),t(h,d,Ya,"ε","\\varepsilon",!0),t(h,d,Ya,"ϑ","\\vartheta",!0),t(h,d,Ya,"ϖ","\\varpi",!0),t(h,d,Ya,"ϱ","\\varrho",!0),t(h,d,Ya,"ς","\\varsigma",!0),t(h,d,Ya,"φ","\\varphi",!0),t(h,d,g,"∗","*",!0),t(h,d,g,"+","+"),t(h,d,g,"−","-",!0),t(h,d,g,"⋅","\\cdot",!0),t(h,d,g,"∘","\\circ",!0),t(h,d,g,"÷","\\div",!0),t(h,d,g,"±","\\pm",!0),t(h,d,g,"×","\\times",!0),t(h,d,g,"∩","\\cap",!0),t(h,d,g,"∪","\\cup",!0),t(h,d,g,"∖","\\setminus",!0),t(h,d,g,"∧","\\land"),t(h,d,g,"∨","\\lor"),t(h,d,g,"∧","\\wedge",!0),t(h,d,g,"∨","\\vee",!0),t(h,d,p,"√","\\surd"),t(h,d,el,"⟨","\\langle",!0),t(h,d,el,"∣","\\lvert"),t(h,d,el,"∥","\\lVert"),t(h,d,cl,"?","?"),t(h,d,cl,"!","!"),t(h,d,cl,"⟩","\\rangle",!0),t(h,d,cl,"∣","\\rvert"),t(h,d,cl,"∥","\\rVert"),t(h,d,m,"=","="),t(h,d,m,":",":"),t(h,d,m,"≈","\\approx",!0),t(h,d,m,"≅","\\cong",!0),t(h,d,m,"≥","\\ge"),t(h,d,m,"≥","\\geq",!0),t(h,d,m,"←","\\gets"),t(h,d,m,">","\\gt",!0),t(h,d,m,"∈","\\in",!0),t(h,d,m,"","\\@not"),t(h,d,m,"⊂","\\subset",!0),t(h,d,m,"⊃","\\supset",!0),t(h,d,m,"⊆","\\subseteq",!0),t(h,d,m,"⊇","\\supseteq",!0),t(h,f,m,"⊈","\\nsubseteq",!0),t(h,f,m,"⊉","\\nsupseteq",!0),t(h,d,m,"⊨","\\models"),t(h,d,m,"←","\\leftarrow",!0),t(h,d,m,"≤","\\le"),t(h,d,m,"≤","\\leq",!0),t(h,d,m,"<","\\lt",!0),t(h,d,m,"→","\\rightarrow",!0),t(h,d,m,"→","\\to"),t(h,f,m,"≱","\\ngeq",!0),t(h,f,m,"≰","\\nleq",!0),t(h,d,Jo," ","\\ "),t(h,d,Jo," ","\\space"),t(h,d,Jo," ","\\nobreakspace"),t(u,d,Jo," ","\\ "),t(u,d,Jo," "," "),t(u,d,Jo," ","\\space"),t(u,d,Jo," ","\\nobreakspace"),t(h,d,Jo,null,"\\nobreak"),t(h,d,Jo,null,"\\allowbreak"),t(h,d,pl,",",","),t(h,d,pl,";",";"),t(h,f,g,"⊼","\\barwedge",!0),t(h,f,g,"⊻","\\veebar",!0),t(h,d,g,"⊙","\\odot",!0),t(h,d,g,"⊕","\\oplus",!0),t(h,d,g,"⊗","\\otimes",!0),t(h,d,p,"∂","\\partial",!0),t(h,d,g,"⊘","\\oslash",!0),t(h,f,g,"⊚","\\circledcirc",!0),t(h,f,g,"⊡","\\boxdot",!0),t(h,d,g,"△","\\bigtriangleup"),t(h,d,g,"▽","\\bigtriangledown"),t(h,d,g,"†","\\dagger"),t(h,d,g,"⋄","\\diamond"),t(h,d,g,"⋆","\\star"),t(h,d,g,"◃","\\triangleleft"),t(h,d,g,"▹","\\triangleright"),t(h,d,el,"{","\\{"),t(u,d,p,"{","\\{"),t(u,d,p,"{","\\textbraceleft"),t(h,d,cl,"}","\\}"),t(u,d,p,"}","\\}"),t(u,d,p,"}","\\textbraceright"),t(h,d,el,"{","\\lbrace"),t(h,d,cl,"}","\\rbrace"),t(h,d,el,"[","\\lbrack",!0),t(u,d,p,"[","\\lbrack",!0),t(h,d,cl,"]","\\rbrack",!0),t(u,d,p,"]","\\rbrack",!0),t(h,d,el,"(","\\lparen",!0),t(h,d,cl,")","\\rparen",!0),t(u,d,p,"<","\\textless",!0),t(u,d,p,">","\\textgreater",!0),t(h,d,el,"⌊","\\lfloor",!0),t(h,d,cl,"⌋","\\rfloor",!0),t(h,d,el,"⌈","\\lceil",!0),t(h,d,cl,"⌉","\\rceil",!0),t(h,d,p,"\\","\\backslash"),t(h,d,p,"∣","|"),t(h,d,p,"∣","\\vert"),t(u,d,p,"|","\\textbar",!0),t(h,d,p,"∥","\\|"),t(h,d,p,"∥","\\Vert"),t(u,d,p,"∥","\\textbardbl"),t(u,d,p,"~","\\textasciitilde"),t(u,d,p,"\\","\\textbackslash"),t(u,d,p,"^","\\textasciicircum"),t(h,d,m,"↑","\\uparrow",!0),t(h,d,m,"⇑","\\Uparrow",!0),t(h,d,m,"↓","\\downarrow",!0),t(h,d,m,"⇓","\\Downarrow",!0),t(h,d,m,"↕","\\updownarrow",!0),t(h,d,m,"⇕","\\Updownarrow",!0),t(h,d,Pl,"∐","\\coprod"),t(h,d,Pl,"⋁","\\bigvee"),t(h,d,Pl,"⋀","\\bigwedge"),t(h,d,Pl,"⨄","\\biguplus"),t(h,d,Pl,"⋂","\\bigcap"),t(h,d,Pl,"⋃","\\bigcup"),t(h,d,Pl,"∫","\\int"),t(h,d,Pl,"∫","\\intop"),t(h,d,Pl,"∬","\\iint"),t(h,d,Pl,"∭","\\iiint"),t(h,d,Pl,"∏","\\prod"),t(h,d,Pl,"∑","\\sum"),t(h,d,Pl,"⨂","\\bigotimes"),t(h,d,Pl,"⨁","\\bigoplus"),t(h,d,Pl,"⨀","\\bigodot"),t(h,d,Pl,"∮","\\oint"),t(h,d,Pl,"∯","\\oiint"),t(h,d,Pl,"∰","\\oiiint"),t(h,d,Pl,"⨆","\\bigsqcup"),t(h,d,Pl,"∫","\\smallint"),t(u,d,fl,"…","\\textellipsis"),t(h,d,fl,"…","\\mathellipsis"),t(u,d,fl,"…","\\ldots",!0),t(h,d,fl,"…","\\ldots",!0),t(h,d,fl,"⋯","\\@cdots",!0),t(h,d,fl,"⋱","\\ddots",!0),t(h,d,p,"⋮","\\varvdots"),t(u,d,p,"⋮","\\varvdots"),t(h,d,Bl,"ˊ","\\acute"),t(h,d,Bl,"ˋ","\\grave"),t(h,d,Bl,"¨","\\ddot"),t(h,d,Bl,"~","\\tilde"),t(h,d,Bl,"ˉ","\\bar"),t(h,d,Bl,"˘","\\breve"),t(h,d,Bl,"ˇ","\\check"),t(h,d,Bl,"^","\\hat"),t(h,d,Bl,"⃗","\\vec"),t(h,d,Bl,"˙","\\dot"),t(h,d,Bl,"˚","\\mathring"),t(h,d,Ya,"","\\@imath"),t(h,d,Ya,"","\\@jmath"),t(h,d,p,"ı","ı"),t(h,d,p,"ȷ","ȷ"),t(u,d,p,"ı","\\i",!0),t(u,d,p,"ȷ","\\j",!0),t(u,d,p,"ß","\\ss",!0),t(u,d,p,"æ","\\ae",!0),t(u,d,p,"œ","\\oe",!0),t(u,d,p,"ø","\\o",!0),t(u,d,p,"Æ","\\AE",!0),t(u,d,p,"Œ","\\OE",!0),t(u,d,p,"Ø","\\O",!0),t(u,d,Bl,"ˊ","\\'"),t(u,d,Bl,"ˋ","\\`"),t(u,d,Bl,"ˆ","\\^"),t(u,d,Bl,"˜","\\~"),t(u,d,Bl,"ˉ","\\="),t(u,d,Bl,"˘","\\u"),t(u,d,Bl,"˙","\\."),t(u,d,Bl,"¸","\\c"),t(u,d,Bl,"˚","\\r"),t(u,d,Bl,"ˇ","\\v"),t(u,d,Bl,"¨",'\\"'),t(u,d,Bl,"˝","\\H"),t(u,d,Bl,"◯","\\textcircled"),Wa={"--":!0,"---":!0,"``":!0,"''":!0},t(u,d,p,"–","--",!0),t(u,d,p,"–","\\textendash"),t(u,d,p,"—","---",!0),t(u,d,p,"—","\\textemdash"),t(u,d,p,"‘","`",!0),t(u,d,p,"‘","\\textquoteleft"),t(u,d,p,"’","'",!0),t(u,d,p,"’","\\textquoteright"),t(u,d,p,"“","``",!0),t(u,d,p,"“","\\textquotedblleft"),t(u,d,p,"”","''",!0),t(u,d,p,"”","\\textquotedblright"),t(h,d,p,"°","\\degree",!0),t(u,d,p,"°","\\degree"),t(u,d,p,"°","\\textdegree",!0),t(h,d,p,"£","\\pounds"),t(h,d,p,"£","\\mathsterling",!0),t(u,d,p,"£","\\pounds"),t(u,d,p,"£","\\textsterling",!0),t(h,f,p,"✠","\\maltese"),t(u,f,p,"✠","\\maltese"),Ha='0123456789/@."',Xa=0;Xa<Ha.length;Xa++)Va=Ha.charAt(Xa),t(h,d,p,Va,Va);for(Ka='0123456789!@*()-=+";:?/.,',Qa=0;Qa<Ka.length;Qa++)Za=Ka.charAt(Qa),t(u,d,p,Za,Za);for(Ja="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",ts=0;ts<Ja.length;ts++)es=Ja.charAt(ts),t(h,d,Ya,es,es),t(u,d,p,es,es);for(t(h,f,p,"C","ℂ"),t(u,f,p,"C","ℂ"),t(h,f,p,"H","ℍ"),t(u,f,p,"H","ℍ"),t(h,f,p,"N","ℕ"),t(u,f,p,"N","ℕ"),t(h,f,p,"P","ℙ"),t(u,f,p,"P","ℙ"),t(h,f,p,"Q","ℚ"),t(u,f,p,"Q","ℚ"),t(h,f,p,"R","ℝ"),t(u,f,p,"R","ℝ"),t(h,f,p,"Z","ℤ"),t(u,f,p,"Z","ℤ"),t(h,d,Ya,"h","ℎ"),t(u,d,Ya,"h","ℎ"),rs="",is=0;is<Ja.length;is++)ns=Ja.charAt(is),rs=String.fromCharCode(55349,56320+is),t(h,d,Ya,ns,rs),t(u,d,p,ns,rs),rs=String.fromCharCode(55349,56372+is),t(h,d,Ya,ns,rs),t(u,d,p,ns,rs),rs=String.fromCharCode(55349,56424+is),t(h,d,Ya,ns,rs),t(u,d,p,ns,rs),rs=String.fromCharCode(55349,56580+is),t(h,d,Ya,ns,rs),t(u,d,p,ns,rs),rs=String.fromCharCode(55349,56684+is),t(h,d,Ya,ns,rs),t(u,d,p,ns,rs),rs=String.fromCharCode(55349,56736+is),t(h,d,Ya,ns,rs),t(u,d,p,ns,rs),rs=String.fromCharCode(55349,56788+is),t(h,d,Ya,ns,rs),t(u,d,p,ns,rs),rs=String.fromCharCode(55349,56840+is),t(h,d,Ya,ns,rs),t(u,d,p,ns,rs),rs=String.fromCharCode(55349,56944+is),t(h,d,Ya,ns,rs),t(u,d,p,ns,rs),is<26&&(rs=String.fromCharCode(55349,56632+is),t(h,d,Ya,ns,rs),t(u,d,p,ns,rs),rs=String.fromCharCode(55349,56476+is),t(h,d,Ya,ns,rs),t(u,d,p,ns,rs));for(t(h,d,Ya,"k",rs="𝕜"),t(u,d,p,"k",rs),ss=0;ss<10;ss++)as=ss.toString(),rs=String.fromCharCode(55349,57294+ss),t(h,d,Ya,as,rs),t(u,d,p,as,rs),rs=String.fromCharCode(55349,57314+ss),t(h,d,Ya,as,rs),t(u,d,p,as,rs),rs=String.fromCharCode(55349,57324+ss),t(h,d,Ya,as,rs),t(u,d,p,as,rs),rs=String.fromCharCode(55349,57334+ss),t(h,d,Ya,as,rs),t(u,d,p,as,rs);for(os="ÐÞþ",cs=0;cs<os.length;cs++)ls=os.charAt(cs),t(h,d,Ya,ls,ls),t(u,d,p,ls,ls);hs=[["mathbf","textbf","Main-Bold"],["mathbf","textbf","Main-Bold"],["mathnormal","textit","Math-Italic"],["mathnormal","textit","Math-Italic"],["boldsymbol","boldsymbol","Main-BoldItalic"],["boldsymbol","boldsymbol","Main-BoldItalic"],["mathscr","textscr","Script-Regular"],["","",""],["","",""],["","",""],["mathfrak","textfrak","Fraktur-Regular"],["mathfrak","textfrak","Fraktur-Regular"],["mathbb","textbb","AMS-Regular"],["mathbb","textbb","AMS-Regular"],["mathboldfrak","textboldfrak","Fraktur-Regular"],["mathboldfrak","textboldfrak","Fraktur-Regular"],["mathsf","textsf","SansSerif-Regular"],["mathsf","textsf","SansSerif-Regular"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathitsf","textitsf","SansSerif-Italic"],["mathitsf","textitsf","SansSerif-Italic"],["","",""],["","",""],["mathtt","texttt","Typewriter-Regular"],["mathtt","texttt","Typewriter-Regular"]],us=[["mathbf","textbf","Main-Bold"],["","",""],["mathsf","textsf","SansSerif-Regular"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathtt","texttt","Typewriter-Regular"]],ds=mt(function(e,t){var r,n=1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320)+65536,t="math"===t?0:1;if(119808<=n&&n<120484)return r=Math.floor((n-119808)/26),[hs[r][2],hs[r][t]];if(120782<=n&&n<=120831)return r=Math.floor((n-120782)/10),[us[r][2],us[r][t]];if(120485==n||120486==n)return[hs[0][2],hs[0][t]];if(120486<n&&n<120782)return["",""];throw new X("Unsupported character: "+e)},"wideCharacterFont"),ps=mt(function(e,t,r){return{value:e=ja[r][e]&&ja[r][e].replace?ja[r][e].replace:e,metrics:gi(e,t,r)}},"lookupSymbol"),gs=mt(function(e,t,r,n,i){var a=ps(e,t,r),s=a.metrics;return e=a.value,a=s?(a=s.italic,("text"===r||n&&"mathit"===n.font)&&(a=0),new $a(e,s.height,s.depth,a,s.skew,s.width,i)):(typeof console<"u"&&console.warn("No character metrics for '"+e+"' in style '"+t+"' and mode '"+r+"'"),new $a(e,0,0,0,0,0,i)),n&&(a.maxFontSize=n.sizeMultiplier,n.style.isTight()&&a.classes.push("mtight"),s=n.getColor())&&(a.style.color=s),a},"makeSymbol"),Jo=mt(function(e,t,r,n){return void 0===n&&(n=[]),"boldsymbol"===r.font&&ps(e,"Main-Bold",t).metrics?gs(e,"Main-Bold",t,r,n.concat(["mathbf"])):"\\"===e||"main"===ja[t][e].font?gs(e,"Main-Regular",t,r,n):gs(e,"AMS-Regular",t,r,n.concat(["amsrm"]))},"mathsym"),fs=mt(function(e,t,r,n,i){return"textord"!==i&&ps(e,"Math-BoldItalic",t).metrics?{fontName:"Math-BoldItalic",fontClass:"boldsymbol"}:{fontName:"Main-Bold",fontClass:"mathbf"}},"boldsymbol"),pl=mt(function(e,t,r){var n,i,a=e.mode,s=e.text,o=["mord"],l=(e="math"===a||"text"===a&&t.font)?t.font:t.fontFamily,c="",h="";if(55349===s.charCodeAt(0)&&([c,h]=ds(s,a)),0<c.length)return gs(s,c,a,t,o.concat(h));if(l){if(i="boldsymbol"===l?(n=(c=fs(s,a,t,o,r)).fontName,[c.fontClass]):e?(n=Ts[l].fontName,[l]):(n=ks(l,t.fontWeight,t.fontShape),[l,t.fontWeight,t.fontShape]),ps(s,n,a).metrics)return gs(s,n,a,t,o.concat(i));if(Wa.hasOwnProperty(s)&&"Typewriter"===n.slice(0,10)){for(var u=[],d=0;d<s.length;d++)u.push(gs(s[d],n,a,t,o.concat(i)));return bs(u)}}if("mathord"===r)return gs(s,"Math-Italic",a,t,o.concat(["mathnormal"]));if("textord"===r)return"ams"===(h=ja[a][s]&&ja[a][s].font)?(c=ks("amsrm",t.fontWeight,t.fontShape),gs(s,c,a,t,o.concat("amsrm",t.fontWeight,t.fontShape))):"main"!==h&&h?(e=ks(h,t.fontWeight,t.fontShape),gs(s,e,a,t,o.concat(e,t.fontWeight,t.fontShape))):(l=ks("textrm",t.fontWeight,t.fontShape),gs(s,l,a,t,o.concat(t.fontWeight,t.fontShape)));throw new Error("unexpected type: "+r+" in makeOrd")},"makeOrd"),ms=mt((e,t)=>{if(La(e.classes)!==La(t.classes)||e.skew!==t.skew||e.maxFontSize!==t.maxFontSize)return!1;if(1===e.classes.length){var r=e.classes[0];if("mbin"===r||"mord"===r)return!1}for(var n in e.style)if(e.style.hasOwnProperty(n)&&e.style[n]!==t.style[n])return!1;for(var i in t.style)if(t.style.hasOwnProperty(i)&&e.style[i]!==t.style[i])return!1;return!0},"canCombine"),g=mt(e=>{for(var t=0;t<e.length-1;t++){var r=e[t],n=e[t+1];r instanceof $a&&n instanceof $a&&ms(r,n)&&(r.text+=n.text,r.height=Math.max(r.height,n.height),r.depth=Math.max(r.depth,n.depth),r.italic=n.italic,e.splice(t+1,1),t--)}return e},"tryCombineChars"),ys=mt(function(e){for(var t=0,r=0,n=0,i=0;i<e.children.length;i++){var a=e.children[i];a.height>t&&(t=a.height),r<a.depth&&(r=a.depth),n<a.maxFontSize&&(n=a.maxFontSize)}e.height=t,e.depth=r,e.maxFontSize=n},"sizeElementFromChildren"),vs=mt(function(e,t,r,n){return e=new Da(e,t,r,n),ys(e),e},"makeSpan"),xs=mt((e,t,r,n)=>new Da(e,t,r,n),"makeSvgSpan"),el=mt(function(e,t,r){return(e=vs([e],[],t)).height=Math.max(r||t.fontMetrics().defaultRuleThickness,t.minRuleThickness),e.style.borderBottomWidth=K(e.height),e.maxFontSize=1,e},"makeLineSpan"),cl=mt(function(e,t,r,n){return e=new Oa(e,t,r,n),ys(e),e},"makeAnchor"),bs=mt(function(e){return e=new ma(e),ys(e),e},"makeFragment"),m=mt(function(e,t){return e instanceof ma?vs([],[e],t):e},"wrapFragment"),ws=mt(function(e){if("individualShift"===e.positionType){for(var t=e.children,r=[t[0]],n=-t[0].shift-t[0].elem.depth,i=n,a=1;a<t.length;a++){var s=-t[a].shift-i-t[a].elem.depth,o=s-(t[a-1].elem.height+t[a-1].elem.depth);i+=s,r.push({type:"kern",size:o}),r.push(t[a])}return{children:r,depth:n}}var l;if("top"===e.positionType){for(var c=e.positionData,h=0;h<e.children.length;h++){var u=e.children[h];c-="kern"===u.type?u.size:u.elem.height+u.elem.depth}l=c}else if("bottom"===e.positionType)l=-e.positionData;else{if("elem"!==(n=e.children[0]).type)throw new Error('First child must have type "elem".');if("shift"===e.positionType)l=-n.elem.depth-e.positionData;else{if("firstBaseline"!==e.positionType)throw new Error("Invalid positionType "+e.positionType+".");l=-n.elem.depth}}return{children:e.children,depth:l}},"getVListChildrenAndDepth"),Pl=mt(function(e,t){for(var{children:r,depth:e}=ws(e),n=0,i=0;i<r.length;i++){var a=r[i];"elem"===a.type&&(a=a.elem,n=Math.max(n,a.maxFontSize,a.height))}n+=2;var s=vs(["pstrut"],[]);s.style.height=K(n);for(var o=[],l=e,c=e,h=e,u=0;u<r.length;u++){var d,p,g,f=r[u];"kern"===f.type?h+=f.size:(d=f.elem,g=f.wrapperClasses||[],p=f.wrapperStyle||{},(g=vs(g,[s,d],void 0,p)).style.top=K(-n-h-d.depth),f.marginLeft&&(g.style.marginLeft=f.marginLeft),f.marginRight&&(g.style.marginRight=f.marginRight),o.push(g),h+=d.height+d.depth),l=Math.min(l,h),c=Math.max(c,h)}(e=vs(["vlist"],o)).style.height=K(c);var m=l<0?(y=vs([],[]),(y=vs(["vlist"],[y])).style.height=K(-l),m=vs(["vlist-s"],[new $a("​")]),[vs(["vlist-r"],[e,m]),vs(["vlist-r"],[y])]):[vs(["vlist-r"],[e])],y=vs(["vlist-t"],m);return 2===m.length&&y.classes.push("vlist-t2"),y.height=c,y.depth=-l,y},"makeVList"),fl=mt((e,t)=>{var r=vs(["mspace"],[],t),e=Aa(e,t);return r.style.marginRight=K(e),r},"makeGlue"),ks=mt(function(e,t,r){var n="";switch(e){case"amsrm":n="AMS";break;case"textrm":n="Main";break;case"textsf":n="SansSerif";break;case"texttt":n="Typewriter";break;default:n=e}return n+"-"+("textbf"===t&&"textit"===r?"BoldItalic":"textbf"===t?"Bold":"textit"===t?"Italic":"Regular")},"retrieveTextFontName"),Ts={mathbf:{variant:"bold",fontName:"Main-Bold"},mathrm:{variant:"normal",fontName:"Main-Regular"},textit:{variant:"italic",fontName:"Main-Italic"},mathit:{variant:"italic",fontName:"Main-Italic"},mathnormal:{variant:"italic",fontName:"Math-Italic"},mathsfit:{variant:"sans-serif-italic",fontName:"SansSerif-Italic"},mathbb:{variant:"double-struck",fontName:"AMS-Regular"},mathcal:{variant:"script",fontName:"Caligraphic-Regular"},mathfrak:{variant:"fraktur",fontName:"Fraktur-Regular"},mathscr:{variant:"script",fontName:"Script-Regular"},mathsf:{variant:"sans-serif",fontName:"SansSerif-Regular"},mathtt:{variant:"monospace",fontName:"Typewriter-Regular"}},Es={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]},Bl=mt(function(e,t){var[e,r,n]=Es[e],e=new za(e),e=new Fa([e],{width:K(r),height:K(n),style:"width:"+K(r),viewBox:"0 0 "+1e3*r+" "+1e3*n,preserveAspectRatio:"xMinYMin"});return(e=xs(["overlay"],[e],t)).height=n,e.style.height=K(n),e.style.width=K(r),e},"staticSvg"),Z={fontMap:Ts,makeSymbol:gs,mathsym:Jo,makeSpan:vs,makeSvgSpan:xs,makeLineSpan:el,makeAnchor:cl,makeFragment:bs,wrapFragment:m,makeVList:Pl,makeOrd:pl,makeGlue:fl,staticSvg:Bl,svgData:Es,tryCombineChars:g},Cs={mord:{mop:f={number:3,unit:"mu"},mbin:Jo={number:4,unit:"mu"},mrel:el={number:5,unit:"mu"},minner:f},mop:{mord:f,mop:f,mrel:el,minner:f},mbin:{mord:Jo,mop:Jo,mopen:Jo,minner:Jo},mrel:{mord:el,mop:el,mopen:el,minner:el},mopen:{},mclose:{mop:f,mbin:Jo,mrel:el,minner:f},mpunct:{mord:f,mop:f,mrel:el,mopen:f,mclose:f,mpunct:f,minner:f},minner:{mord:f,mop:f,mbin:Jo,mrel:el,mopen:f,mpunct:f,minner:f}},_s={mord:{mop:f},mop:{mord:f,mop:f},mbin:{},mrel:{},mopen:{},mclose:{mop:f},mpunct:{},minner:{mop:f}},Ss={},As={},Ls={},mt(o,"defineFunction"),mt(vi,"defineFunctionBuilders"),Ns=mt(function(e){return"ordgroup"===e.type&&1===e.body.length?e.body[0]:e},"normalizeArgument"),Is=mt(function(e){return"ordgroup"===e.type?e.body:[e]},"ordargument"),Rs=Z.makeSpan,Ms=["leftmost","mbin","mopen","mrel","mop","mpunct"],Ds=["rightmost","mrel","mclose","mpunct"],Os={display:ra.DISPLAY,text:ra.TEXT,script:ra.SCRIPT,scriptscript:ra.SCRIPTSCRIPT},Ps={mord:"mord",mop:"mop",mbin:"mbin",mrel:"mrel",mopen:"mopen",mclose:"mclose",mpunct:"mpunct",minner:"minner"},Bs=mt(function(e,t,r,n){void 0===n&&(n=[null,null]);for(var i,a,s=[],o=0;o<e.length;o++){var l,c=qs(e[o],t);c instanceof ma?(l=c.children,s.push(...l)):s.push(c)}return Z.tryCombineChars(s),r&&(i=t,1===e.length&&("sizing"===(a=e[0]).type?i=t.havingSize(a.size):"styling"===a.type&&(i=t.havingStyle(Os[a.style]))),a=Rs([n[0]||"leftmost"],[],t),n=Rs([n[1]||"rightmost"],[],t),$s(s,(e,t)=>{var r=t.classes[0],n=e.classes[0];"mbin"===r&&Wi.contains(Ds,n)?t.classes[0]="mord":"mbin"===n&&Wi.contains(Ms,r)&&(e.classes[0]="mord")},{node:a},n,r="root"===r),$s(s,(e,t)=>{var t=Gs(t),r=Gs(e);if(e=t&&r?(e.hasClass("mtight")?_s:Cs)[t][r]:null)return Z.makeGlue(e,i)},{node:a},n,r)),s},"buildExpression"),$s=mt(function e(r,t,n,i,a){i&&r.push(i);for(var s=0;s<r.length;s++){var o,l=r[s],c=Fs(l);c?e(c.children,t,n,null,a):((c=!l.hasClass("mspace"))&&(o=t(l,n.node))&&(n.insertAfter?n.insertAfter(o):(r.unshift(o),s++)),c?n.node=l:a&&l.hasClass("newline")&&(n.node=Rs(["leftmost"])),n.insertAfter=(t=>e=>{r.splice(t+1,0,e),s++})(s))}i&&r.pop()},"traverseNonSpaceNodes"),Fs=mt(function(e){return e instanceof ma||e instanceof Oa||e instanceof Da&&e.hasClass("enclosing")?e:null},"checkPartialGroup"),zs=mt(function e(t,r){var n=Fs(t);if(n&&(n=n.children).length){if("right"===r)return e(n[n.length-1],"right");if("left"===r)return e(n[0],"left")}return t},"getOutermostNode"),Gs=mt(function(e,t){return e&&(t&&(e=zs(e,t)),Ps[e.classes[0]])||null},"getTypeOfDomTree"),Us=mt(function(e,t){return e=["nulldelimiter"].concat(e.baseSizingClasses()),Rs(t.concat(e))},"makeNullDelimiter"),qs=mt(function(e,t,r){if(!e)return Rs();var n;if(As[e.type])return n=As[e.type](e,t),r&&t.size!==r.size&&(n=Rs(t.sizingClasses(r),[n],t),t=t.sizeMultiplier/r.sizeMultiplier,n.height*=t,n.depth*=t),n;throw new X("Got group of unknown type: '"+e.type+"'")},"buildGroup"),mt(xi,"buildHTMLUnbreakable"),mt(bi,"buildHTML"),mt(wi,"newDocumentFragment"),js=class{static{mt(this,"MathNode")}constructor(e,t,r){this.type=void 0,this.attributes=void 0,this.children=void 0,this.classes=void 0,this.type=e,this.attributes={},this.children=t||[],this.classes=r||[]}setAttribute(e,t){this.attributes[e]=t}getAttribute(e){return this.attributes[e]}toNode(){var e,t=document.createElementNS("http://www.w3.org/1998/Math/MathML",this.type);for(e in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,e)&&t.setAttribute(e,this.attributes[e]);0<this.classes.length&&(t.className=La(this.classes));for(var r=0;r<this.children.length;r++)if(this.children[r]instanceof Ys&&this.children[r+1]instanceof Ys){for(var n=this.children[r].toText()+this.children[++r].toText();this.children[r+1]instanceof Ys;)n+=this.children[++r].toText();t.appendChild(new Ys(n).toNode())}else t.appendChild(this.children[r].toNode());return t}toMarkup(){var e,t="<"+this.type;for(e in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,e)&&(t+=" "+e+'="',t+=Wi.escape(this.attributes[e]),t+='"');0<this.classes.length&&(t+=' class ="'+Wi.escape(La(this.classes))+'"'),t+=">";for(var r=0;r<this.children.length;r++)t+=this.children[r].toMarkup();return t+("</"+this.type)+">"}toText(){return this.children.map(e=>e.toText()).join("")}},Ys=class{static{mt(this,"TextNode")}constructor(e){this.text=void 0,this.text=e}toNode(){return document.createTextNode(this.text)}toMarkup(){return Wi.escape(this.toText())}toText(){return this.text}},cl=class{static{mt(this,"SpaceNode")}constructor(e){this.width=void 0,this.character=void 0,this.width=e,this.character=.05555<=e&&e<=.05556?" ":.1666<=e&&e<=.1667?" ":.2222<=e&&e<=.2223?" ":.2777<=e&&e<=.2778?"  ":-.05556<=e&&e<=-.05555?" ⁣":-.1667<=e&&e<=-.1666?" ⁣":-.2223<=e&&e<=-.2222?" ⁣":-.2778<=e&&e<=-.2777?" ⁣":null}toNode(){var e;return this.character?document.createTextNode(this.character):((e=document.createElementNS("http://www.w3.org/1998/Math/MathML","mspace")).setAttribute("width",K(this.width)),e)}toMarkup(){return this.character?"<mtext>"+this.character+"</mtext>":'<mspace width="'+K(this.width)+'"/>'}toText(){return this.character||" "}},E={MathNode:js,TextNode:Ys,SpaceNode:cl,newDocumentFragment:wi},Ws=mt(function(e,t,r){return!ja[t][e]||!ja[t][e].replace||55349===e.charCodeAt(0)||Wa.hasOwnProperty(e)&&r&&(r.fontFamily&&"tt"===r.fontFamily.slice(4,6)||r.font&&"tt"===r.font.slice(4,6))||(e=ja[t][e].replace),new E.TextNode(e)},"makeText"),Hs=mt(function(e){return 1===e.length?e[0]:new E.MathNode("mrow",e)},"makeRow"),Vs=mt(function(e,t){var r;return"texttt"===t.fontFamily?"monospace":"textsf"===t.fontFamily?"textit"===t.fontShape&&"textbf"===t.fontWeight?"sans-serif-bold-italic":"textit"===t.fontShape?"sans-serif-italic":"textbf"===t.fontWeight?"bold-sans-serif":"sans-serif":"textit"===t.fontShape&&"textbf"===t.fontWeight?"bold-italic":"textit"===t.fontShape?"italic":"textbf"===t.fontWeight?"bold":(t=t.font)&&"mathnormal"!==t?(r=e.mode,"mathit"===t?"italic":"boldsymbol"===t?"textord"===e.type?"bold":"bold-italic":"mathbf"===t?"bold":"mathbb"===t?"double-struck":"mathsfit"===t?"sans-serif-italic":"mathfrak"===t?"fraktur":"mathscr"===t||"mathcal"===t?"script":"mathsf"===t?"sans-serif":"mathtt"===t?"monospace":!Wi.contains(["\\imath","\\jmath"],e=e.text)&&gi(e=ja[r][e]&&ja[r][e].replace?ja[r][e].replace:e,Z.fontMap[t].fontName,r)?Z.fontMap[t].variant:null):null},"getVariant"),mt(ki,"isNumberPunctuation"),Xs=mt(function(e,t,r){var n;if(1===e.length)return n=Zs(e[0],t),r&&n instanceof js&&"mo"===n.type&&(n.setAttribute("lspace","0em"),n.setAttribute("rspace","0em")),[n];for(var i,a=[],s=0;s<e.length;s++){var o,l,c=Zs(e[s],t);if(c instanceof js&&i instanceof js){if("mtext"===c.type&&"mtext"===i.type&&c.getAttribute("mathvariant")===i.getAttribute("mathvariant")){i.children.push(...c.children);continue}if("mn"===c.type&&"mn"===i.type){i.children.push(...c.children);continue}if(ki(c)&&"mn"===i.type){i.children.push(...c.children);continue}"mn"===c.type&&ki(i)?(c.children=[...i.children,...c.children],a.pop()):("msup"===c.type||"msub"===c.type)&&1<=c.children.length&&("mn"===i.type||ki(i))?(o=c.children[0])instanceof js&&"mn"===o.type&&(o.children=[...i.children,...o.children],a.pop()):"mi"===i.type&&1===i.children.length&&(o=i.children[0])instanceof Ys&&"̸"===o.text&&("mo"===c.type||"mi"===c.type||"mn"===c.type)&&(l=c.children[0])instanceof Ys&&0<l.text.length&&(l.text=l.text.slice(0,1)+"̸"+l.text.slice(1),a.pop())}a.push(c),i=c}return a},"buildExpression"),Ks=mt(function(e,t,r){return Hs(Xs(e,t,r))},"buildExpressionRow"),Zs=mt(function(e,t){if(!e)return new E.MathNode("mrow");if(Ls[e.type])return Ls[e.type](e,t);throw new X("Got group of unknown type: '"+e.type+"'")},"buildGroup"),mt(Ti,"buildMathML"),Qs=mt(function(e){return new Ea({style:e.displayMode?ra.DISPLAY:ra.TEXT,maxSize:e.maxSize,minRuleThickness:e.minRuleThickness})},"optionsFromSettings"),Js=mt(function(e,t){var r;return t.displayMode&&(r=["katex-display"],t.leqno&&r.push("leqno"),t.fleqn&&r.push("fleqn"),e=Z.makeSpan(r,[e])),e},"displayWrap"),eo=mt(function(e,t,r){var n,i=Qs(r);return"mathml"===r.output?Ti(e,t,i,r.displayMode,!0):(e="html"===r.output?(n=bi(e,i),Z.makeSpan(["katex"],[n])):(n=Ti(e,t,i,r.displayMode,!1),t=bi(e,i),Z.makeSpan(["katex"],[n,t])),Js(e,r))},"buildTree"),to=mt(function(e,t,r){return e=bi(e,Qs(r)),e=Z.makeSpan(["katex"],[e]),Js(e,r)},"buildHTMLTree"),ro={widehat:"^",widecheck:"ˇ",widetilde:"~",utilde:"~",overleftarrow:"←",underleftarrow:"←",xleftarrow:"←",overrightarrow:"→",underrightarrow:"→",xrightarrow:"→",underbrace:"⏟",overbrace:"⏞",overgroup:"⏠",undergroup:"⏡",overleftrightarrow:"↔",underleftrightarrow:"↔",xleftrightarrow:"↔",Overrightarrow:"⇒",xRightarrow:"⇒",overleftharpoon:"↼",xleftharpoonup:"↼",overrightharpoon:"⇀",xrightharpoonup:"⇀",xLeftarrow:"⇐",xLeftrightarrow:"⇔",xhookleftarrow:"↩",xhookrightarrow:"↪",xmapsto:"↦",xrightharpoondown:"⇁",xleftharpoondown:"↽",xrightleftharpoons:"⇌",xleftrightharpoons:"⇋",xtwoheadleftarrow:"↞",xtwoheadrightarrow:"↠",xlongequal:"=",xtofrom:"⇄",xrightleftarrows:"⇄",xrightequilibrium:"⇌",xleftequilibrium:"⇋","\\cdrightarrow":"→","\\cdleftarrow":"←","\\cdlongequal":"="},m=mt(function(e){return(e=new E.MathNode("mo",[new E.TextNode(ro[e.replace(/^\\/,"")])])).setAttribute("stretchy","true"),e},"mathMLnode"),no={overrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],overleftarrow:[["leftarrow"],.888,522,"xMinYMin"],underrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],underleftarrow:[["leftarrow"],.888,522,"xMinYMin"],xrightarrow:[["rightarrow"],1.469,522,"xMaxYMin"],"\\cdrightarrow":[["rightarrow"],3,522,"xMaxYMin"],xleftarrow:[["leftarrow"],1.469,522,"xMinYMin"],"\\cdleftarrow":[["leftarrow"],3,522,"xMinYMin"],Overrightarrow:[["doublerightarrow"],.888,560,"xMaxYMin"],xRightarrow:[["doublerightarrow"],1.526,560,"xMaxYMin"],xLeftarrow:[["doubleleftarrow"],1.526,560,"xMinYMin"],overleftharpoon:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoonup:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoondown:[["leftharpoondown"],.888,522,"xMinYMin"],overrightharpoon:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoonup:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoondown:[["rightharpoondown"],.888,522,"xMaxYMin"],xlongequal:[["longequal"],.888,334,"xMinYMin"],"\\cdlongequal":[["longequal"],3,334,"xMinYMin"],xtwoheadleftarrow:[["twoheadleftarrow"],.888,334,"xMinYMin"],xtwoheadrightarrow:[["twoheadrightarrow"],.888,334,"xMaxYMin"],overleftrightarrow:[["leftarrow","rightarrow"],.888,522],overbrace:[["leftbrace","midbrace","rightbrace"],1.6,548],underbrace:[["leftbraceunder","midbraceunder","rightbraceunder"],1.6,548],underleftrightarrow:[["leftarrow","rightarrow"],.888,522],xleftrightarrow:[["leftarrow","rightarrow"],1.75,522],xLeftrightarrow:[["doubleleftarrow","doublerightarrow"],1.75,560],xrightleftharpoons:[["leftharpoondownplus","rightharpoonplus"],1.75,716],xleftrightharpoons:[["leftharpoonplus","rightharpoondownplus"],1.75,716],xhookleftarrow:[["leftarrow","righthook"],1.08,522],xhookrightarrow:[["lefthook","rightarrow"],1.08,522],overlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],underlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],overgroup:[["leftgroup","rightgroup"],.888,342],undergroup:[["leftgroupunder","rightgroupunder"],.888,342],xmapsto:[["leftmapsto","rightarrow"],1.5,522],xtofrom:[["leftToFrom","rightToFrom"],1.75,528],xrightleftarrows:[["baraboveleftarrow","rightarrowabovebar"],1.75,901],xrightequilibrium:[["baraboveshortleftharpoon","rightharpoonaboveshortbar"],1.75,716],xleftequilibrium:[["shortbaraboveleftharpoon","shortrightharpoonabovebar"],1.75,716]},io=mt(function(e){return"ordgroup"===e.type?e.body.length:1},"groupLength"),Pl=mt(function(f,m){function e(){var e,t,r=4e5,n=f.label.slice(1);if(Wi.contains(["widehat","widecheck","widetilde","utilde"],n))return t=5<(t=io(f.base))?"widehat"===n||"widecheck"===n?(a=420,r=2364,e=.42,n+"4"):(a=312,r=2340,e=.34,"tilde4"):(t=[1,1,2,2,3,3][t],"widehat"===n||"widecheck"===n?(r=[0,1062,2364,2364,2364][t],a=[0,239,300,360,420][t],e=[0,.24,.3,.3,.36,.42][t],n+t):(r=[0,600,1033,2339,2340][t],a=[0,260,286,306,312][t],e=[0,.26,.286,.3,.306,.34][t],"tilde"+t)),t=new za(t),t=new Fa([t],{width:"100%",height:K(e),viewBox:"0 0 "+r+" "+a,preserveAspectRatio:"none"}),{span:Z.makeSvgSpan([],[t],m),minWidth:0,height:e};var i=[],a=no[n],[s,o,l]=a,c=l/1e3,h=s.length;if(1===h)var u=["hide-tail"],d=[a[3]];else if(2===h)u=["halfarrow-left","halfarrow-right"],d=["xMinYMin","xMaxYMin"];else{if(3!==h)throw new Error(`Correct katexImagesData or update code here to support + `+h+" children.");u=["brace-left","brace-center","brace-right"],d=["xMinYMin","xMidYMin","xMaxYMin"]}for(var p=0;p<h;p++){var g=new za(s[p]),g=new Fa([g],{width:"400em",height:K(c),viewBox:"0 0 "+r+" "+l,preserveAspectRatio:d[p]+" slice"}),g=Z.makeSvgSpan([u[p]],[g],m);if(1===h)return{span:g,minWidth:o,height:c};g.style.height=K(c),i.push(g)}return{span:Z.makeSpan(["stretchy"],i,m),minWidth:o,height:c}}mt(e,"buildSvgSpan_");var{span:t,minWidth:r,height:n}=e();return t.height=n,t.style.height=K(n),0<r&&(t.style.minWidth=K(r)),t},"svgSpan"),pl=mt(function(e,t,r,n,i){var a,e=e.height+e.depth+r+n;return/fbox|color|angl/.test(t)?(a=Z.makeSpan(["stretchy",t],[],i),"fbox"===t&&(r=i.color&&i.getColor())&&(a.style.borderColor=r)):(n=[],/^[bx]cancel$/.test(t)&&n.push(new Ga({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(t)&&n.push(new Ga({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"})),r=new Fa(n,{width:"100%",height:K(e)}),a=Z.makeSvgSpan([],[r],i)),a.height=e,a.style.height=K(e),a},"encloseSpan"),ao={encloseSpan:pl,mathMLnode:m,svgSpan:Pl},mt(Ei,"assertNodeType"),mt(Ci,"assertSymbolNodeType"),mt(_i,"checkSymbolNodeType"),so=mt((e,t)=>{e&&"supsub"===e.type?(o=(r=Ei(e.base,"accent")).base,e.base=o,n=yi(qs(e,t)),e.base=r):o=(r=Ei(e,"accent")).base;var r,n,i,a,e=qs(o,t.havingCrampedStyle()),s=0,o=(r.isShifty&&Wi.isCharacterBox(o)&&(o=Wi.getBaseElem(o),s=mi(qs(o,t.havingCrampedStyle())).skew),"\\c"===r.label),l=o?e.height+e.depth:Math.min(e.height,t.fontMetrics().xHeight),c=r.isStretchy?(c=ao.svgSpan(r,t),Z.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:e},{type:"elem",elem:c,wrapperClasses:["svg-align"],wrapperStyle:0<s?{width:"calc(100% - "+K(2*s)+")",marginLeft:K(2*s)}:void 0}]},t)):("\\vec"===r.label?(a=Z.staticSvg("vec",t),i=Z.svgData.vec[1]):((a=mi(a=Z.makeOrd({mode:r.mode,text:r.label},t,"textord"))).italic=0,i=a.width,o&&(l+=a.depth)),c=Z.makeSpan(["accent-body"],[a]),(o="\\textcircled"===r.label)&&(c.classes.push("accent-full"),l=e.height),a=s,o||(a-=i/2),c.style.left=K(a),"\\textcircled"===r.label&&(c.style.top=".2em"),Z.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:e},{type:"kern",size:-l},{type:"elem",elem:c}]},t)),s=Z.makeSpan(["mord","accent"],[c],t);return n?(n.children[0]=s,n.height=Math.max(s.height,n.height),n.classes[0]="mord",n):s},"htmlBuilder$a"),fl=mt((e,t)=>{var r=e.isStretchy?ao.mathMLnode(e.label):new E.MathNode("mo",[Ws(e.label,e.mode)]);return(e=new E.MathNode("mover",[Zs(e.base,t),r])).setAttribute("accent","true"),e},"mathmlBuilder$9"),oo=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map(e=>"\\"+e).join("|")),o({type:"accent",names:["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring","\\widecheck","\\widehat","\\widetilde","\\overrightarrow","\\overleftarrow","\\Overrightarrow","\\overleftrightarrow","\\overgroup","\\overlinesegment","\\overleftharpoon","\\overrightharpoon"],props:{numArgs:1},handler:mt((e,t)=>{var t=Ns(t[0]),r=!oo.test(e.funcName),n=!r||"\\widehat"===e.funcName||"\\widetilde"===e.funcName||"\\widecheck"===e.funcName;return{type:"accent",mode:e.parser.mode,label:e.funcName,isStretchy:r,isShifty:n,base:t}},"handler"),htmlBuilder:so,mathmlBuilder:fl}),o({type:"accent",names:["\\'","\\`","\\^","\\~","\\=","\\u","\\.",'\\"',"\\c","\\r","\\H","\\v","\\textcircled"],props:{numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["primitive"]},handler:mt((e,t)=>{var t=t[0],r=e.parser.mode;return"math"===r&&(e.parser.settings.reportNonstrict("mathVsTextAccents","LaTeX's accent "+e.funcName+" works only in text mode"),r="text"),{type:"accent",mode:r,label:e.funcName,isStretchy:!1,isShifty:!0,base:t}},"handler"),htmlBuilder:so,mathmlBuilder:fl}),o({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleftrightarrow","\\undergroup","\\underlinesegment","\\utilde"],props:{numArgs:1},handler:mt((e,t)=>{var{parser:e,funcName:r}=e,t=t[0];return{type:"accentUnder",mode:e.mode,label:r,base:t}},"handler"),htmlBuilder:mt((e,t)=>{var r=qs(e.base,t),n=ao.svgSpan(e,t),e="\\utilde"===e.label?.12:0,n=Z.makeVList({positionType:"top",positionData:r.height,children:[{type:"elem",elem:n,wrapperClasses:["svg-align"]},{type:"kern",size:e},{type:"elem",elem:r}]},t);return Z.makeSpan(["mord","accentunder"],[n],t)},"htmlBuilder"),mathmlBuilder:mt((e,t)=>{var r=ao.mathMLnode(e.label);return(e=new E.MathNode("munder",[Zs(e.base,t),r])).setAttribute("accentunder","true"),e},"mathmlBuilder")}),lo=mt(e=>((e=new E.MathNode("mpadded",e?[e]:[])).setAttribute("width","+0.6em"),e.setAttribute("lspace","0.3em"),e),"paddedNode"),o({type:"xArrow",names:["\\xleftarrow","\\xrightarrow","\\xLeftarrow","\\xRightarrow","\\xleftrightarrow","\\xLeftrightarrow","\\xhookleftarrow","\\xhookrightarrow","\\xmapsto","\\xrightharpoondown","\\xrightharpoonup","\\xleftharpoondown","\\xleftharpoonup","\\xrightleftharpoons","\\xleftrightharpoons","\\xlongequal","\\xtwoheadrightarrow","\\xtwoheadleftarrow","\\xtofrom","\\xrightleftarrows","\\xrightequilibrium","\\xleftequilibrium","\\\\cdrightarrow","\\\\cdleftarrow","\\\\cdlongequal"],props:{numArgs:1,numOptionalArgs:1},handler(e,t,r){var{parser:e,funcName:n}=e;return{type:"xArrow",mode:e.mode,label:n,body:t[0],below:r[0]}},htmlBuilder(e,t){var r,n=t.style,i=t.havingStyle(n.sup()),a=Z.wrapFragment(qs(e.body,i,t),t),s="\\x"===e.label.slice(0,2)?"x":"cd",n=(a.classes.push(s+"-arrow-pad"),e.below&&(i=t.havingStyle(n.sub()),(r=Z.wrapFragment(qs(e.below,i,t),t)).classes.push(s+"-arrow-pad")),ao.svgSpan(e,t)),i=-t.fontMetrics().axisHeight+.5*n.height,s=-t.fontMetrics().axisHeight-.5*n.height-.111;return(.25<a.depth||"\\xleftequilibrium"===e.label)&&(s-=a.depth),(r=r?(e=-t.fontMetrics().axisHeight+r.height+.5*n.height+.111,Z.makeVList({positionType:"individualShift",children:[{type:"elem",elem:a,shift:s},{type:"elem",elem:n,shift:i},{type:"elem",elem:r,shift:e}]},t)):Z.makeVList({positionType:"individualShift",children:[{type:"elem",elem:a,shift:s},{type:"elem",elem:n,shift:i}]},t)).children[0].children[0].children[1].classes.push("svg-align"),Z.makeSpan(["mrel","x-arrow"],[r],t)},mathmlBuilder(e,t){var r,n,i=ao.mathMLnode(e.label);return i.setAttribute("minsize","x"===e.label.charAt(0)?"1.75em":"3.0em"),e.body?(r=lo(Zs(e.body,t)),e.below?(n=lo(Zs(e.below,t)),new E.MathNode("munderover",[i,n,r])):new E.MathNode("mover",[i,r])):e.below?(n=lo(Zs(e.below,t)),new E.MathNode("munder",[i,n])):(r=lo(),new E.MathNode("mover",[i,r]))}}),co=Z.makeSpan,mt(Si,"htmlBuilder$9"),mt(Ai,"mathmlBuilder$8"),o({type:"mclass",names:["\\mathord","\\mathbin","\\mathrel","\\mathopen","\\mathclose","\\mathpunct","\\mathinner"],props:{numArgs:1,primitive:!0},handler(e,t){var{parser:e,funcName:r}=e,t=t[0];return{type:"mclass",mode:e.mode,mclass:"m"+r.slice(5),body:Is(t),isCharacterBox:Wi.isCharacterBox(t)}},htmlBuilder:Si,mathmlBuilder:Ai}),ho=mt(e=>"atom"!==(e="ordgroup"===e.type&&e.body.length?e.body[0]:e).type||"bin"!==e.family&&"rel"!==e.family?"mord":"m"+e.family,"binrelClass"),o({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler(e,t){return{type:"mclass",mode:(e=e.parser).mode,mclass:ho(t[0]),body:Is(t[1]),isCharacterBox:Wi.isCharacterBox(t[1])}}}),o({type:"mclass",names:["\\stackrel","\\overset","\\underset"],props:{numArgs:2},handler(e,t){var{parser:e,funcName:r}=e,n=t[1],t=t[0],i="\\stackrel"!==r?ho(n):"mrel",n={type:"op",mode:n.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:"\\stackrel"!==r,body:Is(n)},n={type:"supsub",mode:t.mode,base:n,sup:"\\underset"===r?null:t,sub:"\\underset"===r?t:null};return{type:"mclass",mode:e.mode,mclass:i,body:[n],isCharacterBox:Wi.isCharacterBox(n)}},htmlBuilder:Si,mathmlBuilder:Ai}),o({type:"pmb",names:["\\pmb"],props:{numArgs:1,allowedInText:!0},handler(e,t){return{type:"pmb",mode:(e=e.parser).mode,mclass:ho(t[0]),body:Is(t[0])}},htmlBuilder(e,t){var r=Bs(e.body,t,!0);return(e=Z.makeSpan([e.mclass],r,t)).style.textShadow="0.02em 0.01em 0.04px",e},mathmlBuilder(e,t){return e=Xs(e.body,t),(t=new E.MathNode("mstyle",e)).setAttribute("style","text-shadow: 0.02em 0.01em 0.04px"),t}}),uo={">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"},po=mt(()=>({type:"styling",body:[],mode:"math",style:"display"}),"newCell"),go=mt(e=>"textord"===e.type&&"@"===e.text,"isStartOfArrow"),fo=mt((e,t)=>("mathord"===e.type||"atom"===e.type)&&e.text===t,"isLabelEnd"),mt(Li,"cdArrow"),mt(Ni,"parseCD"),o({type:"cdlabel",names:["\\\\cdleft","\\\\cdright"],props:{numArgs:1},handler(e,t){var{parser:e,funcName:r}=e;return{type:"cdlabel",mode:e.mode,side:r.slice(4),label:t[0]}},htmlBuilder(e,t){var r=t.havingStyle(t.style.sup());return(r=Z.wrapFragment(qs(e.label,r,t),t)).classes.push("cd-label-"+e.side),r.style.bottom=K(.8-r.depth),r.height=0,r.depth=0,r},mathmlBuilder(e,t){return t=new E.MathNode("mrow",[Zs(e.label,t)]),(t=new E.MathNode("mpadded",[t])).setAttribute("width","0"),"left"===e.side&&t.setAttribute("lspace","-1width"),t.setAttribute("voffset","0.7em"),(t=new E.MathNode("mstyle",[t])).setAttribute("displaystyle","false"),t.setAttribute("scriptlevel","1"),t}}),o({type:"cdlabelparent",names:["\\\\cdparent"],props:{numArgs:1},handler(e,t){return{type:"cdlabelparent",mode:(e=e.parser).mode,fragment:t[0]}},htmlBuilder(e,t){return(e=Z.wrapFragment(qs(e.fragment,t),t)).classes.push("cd-vert-arrow"),e},mathmlBuilder(e,t){return new E.MathNode("mrow",[Zs(e.fragment,t)])}}),o({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler(e,t){for(var e=e.parser,r=Ei(t[0],"ordgroup").body,n="",i=0;i<r.length;i++)n+=Ei(r[i],"textord").text;if(t=parseInt(n),isNaN(t))throw new X("\\@char has non-numeric argument "+n);if(t<0||1114111<=t)throw new X("\\@char with invalid code point "+n);return t=t<=65535?String.fromCharCode(t):(t-=65536,String.fromCharCode(55296+(t>>10),56320+(1023&t))),{type:"textord",mode:e.mode,text:t}}}),Bl=mt((e,t)=>(t=Bs(e.body,t.withColor(e.color),!1),Z.makeFragment(t)),"htmlBuilder$8"),g=mt((e,t)=>(t=Xs(e.body,t.withColor(e.color)),(t=new E.MathNode("mstyle",t)).setAttribute("mathcolor",e.color),t),"mathmlBuilder$7"),o({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,argTypes:["color","original"]},handler(e,t){var e=e.parser,r=Ei(t[0],"color-token").color;return{type:"color",mode:e.mode,color:r,body:Is(t[1])}},htmlBuilder:Bl,mathmlBuilder:g}),o({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,argTypes:["color"]},handler(e,t){var{parser:e,breakOnTokenText:r}=e,t=Ei(t[0],"color-token").color,r=(e.gullet.macros.set("\\current@color",t),e.parseExpression(!0,r));return{type:"color",mode:e.mode,color:t,body:r}},htmlBuilder:Bl,mathmlBuilder:g}),o({type:"cr",names:["\\\\"],props:{numArgs:0,numOptionalArgs:0,allowedInText:!0},handler(e,t,r){var n="["===(e=e.parser).gullet.future().text?e.parseSizeGroup(!0):null,i=!e.settings.displayMode||!e.settings.useStrictBehavior("newLineInDisplayMode","In LaTeX, \\\\ or \\newline does nothing in display mode");return{type:"cr",mode:e.mode,newLine:i,size:n&&Ei(n,"size").value}},htmlBuilder(e,t){var r=Z.makeSpan(["mspace"],[],t);return e.newLine&&(r.classes.push("newline"),e.size)&&(r.style.marginTop=K(Aa(e.size,t))),r},mathmlBuilder(e,t){var r=new E.MathNode("mspace");return e.newLine&&(r.setAttribute("linebreak","newline"),e.size)&&r.setAttribute("height",K(Aa(e.size,t))),r}}),mo={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},yo=mt(e=>{var t=e.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(t))throw new X("Expected a control sequence",e);return t},"checkControlSequence"),vo=mt(e=>{var t=e.gullet.popToken();return"="===t.text&&" "===(t=e.gullet.popToken()).text?e.gullet.popToken():t},"getRHS"),xo=mt((e,t,r,n)=>{var i=e.gullet.macros.get(r.text);null==i&&(r.noexpand=!0,i={tokens:[r],numArgs:0,unexpandable:!e.gullet.isExpandable(r.text)}),e.gullet.macros.set(t,i,n)},"letCommand"),o({type:"internal",names:["\\global","\\long","\\\\globallong"],props:{numArgs:0,allowedInText:!0},handler(e){var{parser:e,funcName:t}=e,r=(e.consumeSpaces(),e.fetch());if(mo[r.text])return"\\global"!==t&&"\\\\globallong"!==t||(r.text=mo[r.text]),Ei(e.parseFunction(),"internal");throw new X("Invalid token after macro prefix",r)}}),o({type:"internal",names:["\\def","\\gdef","\\edef","\\xdef"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:e}=e,r=t.gullet.popToken(),n=r.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(n))throw new X("Expected a control sequence",r);for(var i,a=0,s=[[]];"{"!==t.gullet.future().text;)if("#"===(r=t.gullet.popToken()).text){if("{"===t.gullet.future().text){i=t.gullet.future(),s[a].push("{");break}if(r=t.gullet.popToken(),!/^[1-9]$/.test(r.text))throw new X('Invalid argument number "'+r.text+'"');if(parseInt(r.text)!==a+1)throw new X('Argument number "'+r.text+'" out of order');a++,s.push([])}else{if("EOF"===r.text)throw new X("Expected a macro definition");s[a].push(r.text)}var o=t.gullet.consumeArg().tokens;return i&&o.unshift(i),"\\edef"!==e&&"\\xdef"!==e||(o=t.gullet.expandTokens(o)).reverse(),t.gullet.macros.set(n,{tokens:o,numArgs:a,delimiters:s},e===mo[e]),{type:"internal",mode:t.mode}}}),o({type:"internal",names:["\\let","\\\\globallet"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:e,funcName:t}=e,r=yo(e.gullet.popToken()),n=(e.gullet.consumeSpaces(),vo(e));return xo(e,r,n,"\\\\globallet"===t),{type:"internal",mode:e.mode}}}),o({type:"internal",names:["\\futurelet","\\\\globalfuture"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:e,funcName:t}=e,r=yo(e.gullet.popToken()),n=e.gullet.popToken(),i=e.gullet.popToken();return xo(e,r,i,"\\\\globalfuture"===t),e.gullet.pushToken(i),e.gullet.pushToken(n),{type:"internal",mode:e.mode}}}),bo=mt(function(e,t,r){if(r=gi(ja.math[e]&&ja.math[e].replace||e,t,r))return r;throw new Error("Unsupported symbol "+e+" and font size "+t+".")},"getMetrics"),wo=mt(function(e,t,r,n){return t=r.havingBaseStyle(t),n=Z.makeSpan(n.concat(t.sizingClasses(r)),[e],r),e=t.sizeMultiplier/r.sizeMultiplier,n.height*=e,n.depth*=e,n.maxFontSize=t.sizeMultiplier,n},"styleWrap"),ko=mt(function(e,t,r){r=t.havingBaseStyle(r),r=(1-t.sizeMultiplier/r.sizeMultiplier)*t.fontMetrics().axisHeight,e.classes.push("delimcenter"),e.style.top=K(r),e.height-=r,e.depth+=r},"centerSpan"),To=mt(function(e,t,r,n,i,a){return e=Z.makeSymbol(e,"Main-Regular",i,n),i=wo(e,t,n,a),r&&ko(i,n,t),i},"makeSmallDelim"),Eo=mt(function(e,t,r,n){return Z.makeSymbol(e,"Size"+t+"-Regular",r,n)},"mathrmSize"),Co=mt(function(e,t,r,n,i,a){return e=Eo(e,t,i,n),i=wo(Z.makeSpan(["delimsizing","size"+t],[e],n),ra.TEXT,n,a),r&&ko(i,n,ra.TEXT),i},"makeLargeDelim"),_o=mt(function(e,t,r){return{type:"elem",elem:Z.makeSpan(["delimsizinginner","Size1-Regular"===t?"delim-size1":"delim-size4"],[Z.makeSpan([],[Z.makeSymbol(e,t,r)])])}},"makeGlyphSpan"),So=mt(function(e,t,r){var n=(ya["Size4-Regular"][e.charCodeAt(0)]?ya["Size4-Regular"]:ya["Size1-Regular"])[e.charCodeAt(0)][4],e=new za("inner",pa(e,Math.round(1e3*t))),e=new Fa([e],{width:K(n),height:K(t),style:"width:"+K(n),viewBox:"0 0 "+1e3*n+" "+Math.round(1e3*t),preserveAspectRatio:"xMinYMin"});return(e=Z.makeSvgSpan([],[e],r)).height=t,e.style.height=K(t),e.style.width=K(n),{type:"elem",elem:e}},"makeInner"),Ao={type:"kern",size:-.008},Lo=["|","\\lvert","\\rvert","\\vert"],No=["\\|","\\lVert","\\rVert","\\Vert"],Io=mt(function(e,t,r,n,i,a){var s,o,l,c="",h=0,u=s=o=e,d=null,p="Size1-Regular",e=("\\uparrow"===e?s=o="⏐":"\\Uparrow"===e?s=o="‖":"\\downarrow"===e?u=s="⏐":"\\Downarrow"===e?u=s="‖":"\\updownarrow"===e?(u="\\uparrow",s="⏐",o="\\downarrow"):"\\Updownarrow"===e?(u="\\Uparrow",s="‖",o="\\Downarrow"):Wi.contains(Lo,e)?(s="∣",c="vert",h=333):Wi.contains(No,e)?(s="∥",c="doublevert",h=556):"["===e||"\\lbrack"===e?(u="⎡",s="⎢",o="⎣",p="Size4-Regular",c="lbrack",h=667):"]"===e||"\\rbrack"===e?(u="⎤",s="⎥",o="⎦",p="Size4-Regular",c="rbrack",h=667):"\\lfloor"===e||"⌊"===e?(s=u="⎢",o="⎣",p="Size4-Regular",c="lfloor",h=667):"\\lceil"===e||"⌈"===e?(u="⎡",s=o="⎢",p="Size4-Regular",c="lceil",h=667):"\\rfloor"===e||"⌋"===e?(s=u="⎥",o="⎦",p="Size4-Regular",c="rfloor",h=667):"\\rceil"===e||"⌉"===e?(u="⎤",s=o="⎥",p="Size4-Regular",c="rceil",h=667):"("===e||"\\lparen"===e?(u="⎛",s="⎜",o="⎝",p="Size4-Regular",c="lparen",h=875):")"===e||"\\rparen"===e?(u="⎞",s="⎟",o="⎠",p="Size4-Regular",c="rparen",h=875):"\\{"===e||"\\lbrace"===e?(u="⎧",d="⎨",o="⎩",s="⎪",p="Size4-Regular"):"\\}"===e||"\\rbrace"===e?(u="⎫",d="⎬",o="⎭",s="⎪",p="Size4-Regular"):"\\lgroup"===e||"⟮"===e?(u="⎧",o="⎩",s="⎪",p="Size4-Regular"):"\\rgroup"===e||"⟯"===e?(u="⎫",o="⎭",s="⎪",p="Size4-Regular"):"\\lmoustache"===e||"⎰"===e?(u="⎧",o="⎭",s="⎪",p="Size4-Regular"):"\\rmoustache"!==e&&"⎱"!==e||(u="⎫",o="⎩",s="⎪",p="Size4-Regular"),(e=bo(u,p,i)).height+e.depth),g=(g=bo(s,p,i)).height+g.depth,f=(f=bo(o,p,i)).height+f.depth,m=0,y=1,t=(null!==d&&(m=(v=bo(d,p,i)).height+v.depth,y=2),(v=e+f+m)+Math.max(0,Math.ceil((t-v)/(y*g)))*y*g),v=n.fontMetrics().axisHeight,y=(r&&(v*=n.sizeMultiplier),t/2-v),g=[],v=(0<c.length?(r=t-e-f,v=Math.round(1e3*t),r=fa(c,Math.round(1e3*r)),c=new za(c,r),r=(h/1e3).toFixed(3)+"em",l=(v/1e3).toFixed(3)+"em",c=new Fa([c],{width:r,height:l,viewBox:"0 0 "+h+" "+v}),(h=Z.makeSvgSpan([],[c],n)).height=v/1e3,h.style.width=r,h.style.height=l,g.push({type:"elem",elem:h})):(g.push(_o(o,p,i)),g.push(Ao),null===d?g.push(So(s,t-e-f+.016,n)):(g.push(So(s,c=(t-e-f-m)/2+.016,n)),g.push(Ao),g.push(_o(d,p,i)),g.push(Ao),g.push(So(s,c,n))),g.push(Ao),g.push(_o(u,p,i))),n.havingBaseStyle(ra.TEXT)),r=Z.makeVList({positionType:"bottom",positionData:y,children:g},v);return wo(Z.makeSpan(["delimsizing","mult"],[r],v),ra.TEXT,n,a)},"makeStackedDelim"),Ro=mt(function(e,t,r,n,i){return n=da(e,n,r),e=new za(e,n),n=new Fa([e],{width:"400em",height:K(t),viewBox:"0 0 400000 "+r,preserveAspectRatio:"xMinYMin slice"}),Z.makeSvgSpan(["hide-tail"],[n],i)},"sqrtSvg"),Jo=mt(function(e,t){var r,n=t.havingBaseSizing(),i=Go("\\surd",e*n.sizeMultiplier,Fo,n),n=n.sizeMultiplier,a=Math.max(0,t.minRuleThickness-t.fontMetrics().sqrtRuleThickness),s=0,o=0,l=0,i="small"===i.type?(e<1?n=1:e<1.4&&(n=.7),o=(1+a)/n,(r=Ro("sqrtMain",s=(1+a+.08)/n,l=1e3+1e3*a+80,a,t)).style.minWidth="0.853em",.833/n):"large"===i.type?(l=1080*Po[i.size],o=(Po[i.size]+a)/n,s=(Po[i.size]+a+.08)/n,(r=Ro("sqrtSize"+i.size,s,l,a,t)).style.minWidth="1.02em",1/n):(s=e+a+.08,o=e+a,l=Math.floor(1e3*e+a)+80,(r=Ro("sqrtTall",s,l,a,t)).style.minWidth="0.742em",1.056);return r.height=o,r.style.height=K(s),{span:r,advanceWidth:i,ruleWidth:(t.fontMetrics().sqrtRuleThickness+a)*n}},"makeSqrtImage"),Mo=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","\\surd"],Do=["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱"],Oo=["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"],Po=[0,1.2,1.8,2.4,3],el=mt(function(e,t,r,n,i){if("<"===e||"\\lt"===e||"⟨"===e?e="\\langle":">"!==e&&"\\gt"!==e&&"⟩"!==e||(e="\\rangle"),Wi.contains(Mo,e)||Wi.contains(Oo,e))return Co(e,t,!1,r,n,i);if(Wi.contains(Do,e))return Io(e,Po[t],!1,r,n,i);throw new X("Illegal delimiter: '"+e+"'")},"makeSizedDelim"),Bo=[{type:"small",style:ra.SCRIPTSCRIPT},{type:"small",style:ra.SCRIPT},{type:"small",style:ra.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],$o=[{type:"small",style:ra.SCRIPTSCRIPT},{type:"small",style:ra.SCRIPT},{type:"small",style:ra.TEXT},{type:"stack"}],Fo=[{type:"small",style:ra.SCRIPTSCRIPT},{type:"small",style:ra.SCRIPT},{type:"small",style:ra.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],zo=mt(function(e){if("small"===e.type)return"Main-Regular";if("large"===e.type)return"Size"+e.size+"-Regular";if("stack"===e.type)return"Size4-Regular";throw new Error("Add support for delim type '"+e.type+"' here.")},"delimTypeToFont"),Go=mt(function(e,t,r,n){for(var i=Math.min(2,3-n.style.size);i<r.length&&"stack"!==r[i].type;i++){var a=(a=bo(e,zo(r[i]),"math")).height+a.depth;if("small"===r[i].type&&(a*=n.havingBaseStyle(r[i].style).sizeMultiplier),t<a)return r[i]}return r[r.length-1]},"traverseSequence"),Uo=mt(function(e,t,r,n,i,a){"<"===e||"\\lt"===e||"⟨"===e?e="\\langle":">"!==e&&"\\gt"!==e&&"⟩"!==e||(e="\\rangle");var s=Wi.contains(Oo,e)?Bo:Wi.contains(Mo,e)?Fo:$o;return"small"===(s=Go(e,t,s,n)).type?To(e,s.style,r,n,i,a):"large"===s.type?Co(e,s.size,r,n,i,a):Io(e,t,r,n,i,a)},"makeCustomSizedDelim"),f=mt(function(e,t,r,n,i,a){var s=n.fontMetrics().axisHeight*n.sizeMultiplier,o=5/n.fontMetrics().ptPerEm,t=Math.max(t-s,r+s),r=Math.max(t/500*901,2*t-o);return Uo(e,r,!0,n,i,a)},"makeLeftRightDelim"),qo={sqrtImage:Jo,sizedDelim:el,sizeToMaxHeight:Po,customSizedDelim:Uo,leftRightDelim:f},jo={"\\bigl":{mclass:"mopen",size:1},"\\Bigl":{mclass:"mopen",size:2},"\\biggl":{mclass:"mopen",size:3},"\\Biggl":{mclass:"mopen",size:4},"\\bigr":{mclass:"mclose",size:1},"\\Bigr":{mclass:"mclose",size:2},"\\biggr":{mclass:"mclose",size:3},"\\Biggr":{mclass:"mclose",size:4},"\\bigm":{mclass:"mrel",size:1},"\\Bigm":{mclass:"mrel",size:2},"\\biggm":{mclass:"mrel",size:3},"\\Biggm":{mclass:"mrel",size:4},"\\big":{mclass:"mord",size:1},"\\Big":{mclass:"mord",size:2},"\\bigg":{mclass:"mord",size:3},"\\Bigg":{mclass:"mord",size:4}},Yo=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","<",">","\\langle","⟨","\\rangle","⟩","\\lt","\\gt","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱","/","\\backslash","|","\\vert","\\|","\\Vert","\\uparrow","\\Uparrow","\\downarrow","\\Downarrow","\\updownarrow","\\Updownarrow","."],mt(Ii,"checkDelimiter"),o({type:"delimsizing",names:["\\bigl","\\Bigl","\\biggl","\\Biggl","\\bigr","\\Bigr","\\biggr","\\Biggr","\\bigm","\\Bigm","\\biggm","\\Biggm","\\big","\\Big","\\bigg","\\Bigg"],props:{numArgs:1,argTypes:["primitive"]},handler:mt((e,t)=>(t=Ii(t[0],e),{type:"delimsizing",mode:e.parser.mode,size:jo[e.funcName].size,mclass:jo[e.funcName].mclass,delim:t.text}),"handler"),htmlBuilder:mt((e,t)=>"."===e.delim?Z.makeSpan([e.mclass]):qo.sizedDelim(e.delim,e.size,t,e.mode,[e.mclass]),"htmlBuilder"),mathmlBuilder:mt(e=>{var t=[],t=("."!==e.delim&&t.push(Ws(e.delim,e.mode)),new E.MathNode("mo",t)),e=("mopen"===e.mclass||"mclose"===e.mclass?t.setAttribute("fence","true"):t.setAttribute("fence","false"),t.setAttribute("stretchy","true"),K(qo.sizeToMaxHeight[e.size]));return t.setAttribute("minsize",e),t.setAttribute("maxsize",e),t},"mathmlBuilder")}),mt(Ri,"assertParsed"),o({type:"leftright-right",names:["\\right"],props:{numArgs:1,primitive:!0},handler:mt((e,t)=>{var r=e.parser.gullet.macros.get("\\current@color");if(r&&"string"!=typeof r)throw new X("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:e.parser.mode,delim:Ii(t[0],e).text,color:r}},"handler")}),o({type:"leftright",names:["\\left"],props:{numArgs:1,primitive:!0},handler:mt((e,t)=>{var t=Ii(t[0],e),r=(++(e=e.parser).leftrightDepth,e.parseExpression(!1)),n=(--e.leftrightDepth,e.expect("\\right",!1),Ei(e.parseFunction(),"leftright-right"));return{type:"leftright",mode:e.mode,body:r,left:t.text,right:n.delim,rightColor:n.color}},"handler"),htmlBuilder:mt((e,t)=>{Ri(e);for(var r,n=Bs(e.body,t,!0,["mopen","mclose"]),i=0,a=0,s=!1,o=0;o<n.length;o++)n[o].isMiddle?s=!0:(i=Math.max(n[o].height,i),a=Math.max(n[o].depth,a));if(i*=t.sizeMultiplier,a*=t.sizeMultiplier,r="."===e.left?Us(t,["mopen"]):qo.leftRightDelim(e.left,i,a,t,e.mode,["mopen"]),n.unshift(r),s)for(var l=1;l<n.length;l++){var c=n[l].isMiddle;c&&(n[l]=qo.leftRightDelim(c.delim,i,a,c.options,e.mode,[]))}return r="."===e.right?Us(t,["mclose"]):(r=e.rightColor?t.withColor(e.rightColor):t,qo.leftRightDelim(e.right,i,a,r,e.mode,["mclose"])),n.push(r),Z.makeSpan(["minner"],n,t)},"htmlBuilder"),mathmlBuilder:mt((e,t)=>{Ri(e);var r,t=Xs(e.body,t);return"."!==e.left&&((r=new E.MathNode("mo",[Ws(e.left,e.mode)])).setAttribute("fence","true"),t.unshift(r)),"."!==e.right&&((r=new E.MathNode("mo",[Ws(e.right,e.mode)])).setAttribute("fence","true"),e.rightColor&&r.setAttribute("mathcolor",e.rightColor),t.push(r)),Hs(t)},"mathmlBuilder")}),o({type:"middle",names:["\\middle"],props:{numArgs:1,primitive:!0},handler:mt((e,t)=>{if(t=Ii(t[0],e),e.parser.leftrightDepth)return{type:"middle",mode:e.parser.mode,delim:t.text};throw new X("\\middle without preceding \\left",t)},"handler"),htmlBuilder:mt((e,t)=>{var r;return"."===e.delim?r=Us(t,[]):(r=qo.sizedDelim(e.delim,1,t,e.mode,[]),e={delim:e.delim,options:t},r.isMiddle=e),r},"htmlBuilder"),mathmlBuilder:mt((e,t)=>(e="\\vert"===e.delim||"|"===e.delim?Ws("|","text"):Ws(e.delim,e.mode),(e=new E.MathNode("mo",[e])).setAttribute("fence","true"),e.setAttribute("lspace","0.05em"),e.setAttribute("rspace","0.05em"),e),"mathmlBuilder")}),cl=mt((e,t)=>{var r,n,i,a,s,o=Z.wrapFragment(qs(e.body,t),t),l=e.label.slice(1),c=t.sizeMultiplier,h=0,u=Wi.isCharacterBox(e.body);return"sout"===l?((r=Z.makeSpan(["stretchy","sout"])).height=t.fontMetrics().defaultRuleThickness/c,h=-.5*t.fontMetrics().xHeight):"phase"===l?(a=Aa({number:.6,unit:"pt"},t),s=Aa({number:.35,unit:"ex"},t),c/=t.havingBaseSizing().sizeMultiplier,n=o.height+o.depth+a+s,o.style.paddingLeft=K(n/2+a),c=Math.floor(1e3*n*c),i=ha(c),i=new Fa([new za("phase",i)],{width:"400em",height:K(c/1e3),viewBox:"0 0 400000 "+c,preserveAspectRatio:"xMinYMin slice"}),(r=Z.makeSvgSpan(["hide-tail"],[i],t)).style.height=K(n),h=o.depth+a+s):(/cancel/.test(l)?u||o.classes.push("cancel-pad"):"angl"===l?o.classes.push("anglpad"):o.classes.push("boxpad"),n=i=c=0,i=/box/.test(l)?(n=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness),c=t.fontMetrics().fboxsep+("colorbox"===l?0:n)):"angl"===l?(c=4*(n=Math.max(t.fontMetrics().defaultRuleThickness,t.minRuleThickness)),Math.max(0,.25-o.depth)):c=u?.2:0,r=ao.encloseSpan(o,l,c,i,t),/fbox|boxed|fcolorbox/.test(l)?(r.style.borderStyle="solid",r.style.borderWidth=K(n)):"angl"===l&&.049!==n&&(r.style.borderTopWidth=K(n),r.style.borderRightWidth=K(n)),h=o.depth+i,e.backgroundColor&&(r.style.backgroundColor=e.backgroundColor,e.borderColor)&&(r.style.borderColor=e.borderColor)),s=e.backgroundColor?Z.makeVList({positionType:"individualShift",children:[{type:"elem",elem:r,shift:h},{type:"elem",elem:o,shift:0}]},t):(a=/cancel|phase/.test(l)?["svg-align"]:[],Z.makeVList({positionType:"individualShift",children:[{type:"elem",elem:o,shift:0},{type:"elem",elem:r,shift:h,wrapperClasses:a}]},t)),/cancel/.test(l)&&(s.height=o.height,s.depth=o.depth),/cancel/.test(l)&&!u?Z.makeSpan(["mord","cancel-lap"],[s],t):Z.makeSpan(["mord"],[s],t)},"htmlBuilder$7"),pl=mt((e,t)=>{var r=new E.MathNode(-1<e.label.indexOf("colorbox")?"mpadded":"menclose",[Zs(e.body,t)]);switch(e.label){case"\\cancel":r.setAttribute("notation","updiagonalstrike");break;case"\\bcancel":r.setAttribute("notation","downdiagonalstrike");break;case"\\phase":r.setAttribute("notation","phasorangle");break;case"\\sout":r.setAttribute("notation","horizontalstrike");break;case"\\fbox":r.setAttribute("notation","box");break;case"\\angl":r.setAttribute("notation","actuarial");break;case"\\fcolorbox":case"\\colorbox":var n=t.fontMetrics().fboxsep*t.fontMetrics().ptPerEm;r.setAttribute("width","+"+2*n+"pt"),r.setAttribute("height","+"+2*n+"pt"),r.setAttribute("lspace",n+"pt"),r.setAttribute("voffset",n+"pt"),"\\fcolorbox"===e.label&&(n=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness),r.setAttribute("style","border: "+n+"em solid "+String(e.borderColor)));break;case"\\xcancel":r.setAttribute("notation","updiagonalstrike downdiagonalstrike")}return e.backgroundColor&&r.setAttribute("mathbackground",e.backgroundColor),r},"mathmlBuilder$6"),o({type:"enclose",names:["\\colorbox"],props:{numArgs:2,allowedInText:!0,argTypes:["color","text"]},handler(e,t,r){var{parser:e,funcName:n}=e,i=Ei(t[0],"color-token").color;return{type:"enclose",mode:e.mode,label:n,backgroundColor:i,body:t[1]}},htmlBuilder:cl,mathmlBuilder:pl}),o({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,argTypes:["color","color","text"]},handler(e,t,r){var{parser:e,funcName:n}=e,i=Ei(t[0],"color-token").color,a=Ei(t[1],"color-token").color;return{type:"enclose",mode:e.mode,label:n,backgroundColor:a,borderColor:i,body:t[2]}},htmlBuilder:cl,mathmlBuilder:pl}),o({type:"enclose",names:["\\fbox"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!0},handler(e,t){return{type:"enclose",mode:(e=e.parser).mode,label:"\\fbox",body:t[0]}}}),o({type:"enclose",names:["\\cancel","\\bcancel","\\xcancel","\\sout","\\phase"],props:{numArgs:1},handler(e,t){var{parser:e,funcName:r}=e,t=t[0];return{type:"enclose",mode:e.mode,label:r,body:t}},htmlBuilder:cl,mathmlBuilder:pl}),o({type:"enclose",names:["\\angl"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!1},handler(e,t){return{type:"enclose",mode:(e=e.parser).mode,label:"\\angl",body:t[0]}}}),Wo={},mt(Mi,"defineEnvironment"),Ho={},mt(l,"defineMacro"),mt(Di,"getHLines"),Vo=mt(e=>{if(!e.parser.settings.displayMode)throw new X("{"+e.envName+"} can be used only in display mode.")},"validateAmsEnvironmentContext"),mt(Oi,"getAutoTag"),mt(Pi,"parseArray"),mt(Bi,"dCellStyle"),m=mt(function(e,t){var r=e.body.length,P=e.hLinesBeforeRow,n=0,i=new Array(r),a=[],s=Math.max(t.fontMetrics().arrayRuleWidth,t.minRuleThickness),o=1/t.fontMetrics().ptPerEm,l=5*o,c=(e.colSeparationType&&"small"===e.colSeparationType&&(l=t.havingStyle(ra.SCRIPT).sizeMultiplier/t.sizeMultiplier*.2778),"CD"===e.colSeparationType?Aa({number:3,unit:"ex"},t):12*o),B=3*o,$=.7*(o=e.arraystretch*c),F=.3*o,h=0;function u(e){for(var t=0;t<e.length;++t)0<t&&(h+=.25),a.push({pos:h,isDashed:e[t]})}for(mt(u,"setHLinePos"),u(P[0]),M=0;M<e.body.length;++M){for(var d=e.body[M],p=$,g=F,f=(n<d.length&&(n=d.length),new Array(d.length)),m=0;m<d.length;++m){var y=qs(d[m],t);g<y.depth&&(g=y.depth),p<y.height&&(p=y.height),f[m]=y}var z=e.rowGaps[M],v=0;z&&0<(v=Aa(z,t))&&(g<(v+=F)&&(g=v),v=0),e.addJot&&(g+=B),f.height=p,f.depth=g,h+=p,f.pos=h,h+=g+v,i[M]=f,u(P[M+1])}var x,b,w=h/2+t.fontMetrics().axisHeight,k=e.cols||[],T=[],E=[];if(e.tags&&e.tags.some(e=>e))for(M=0;M<r;++M){var C=i[M],G=C.pos-w,_=e.tags[M],S=void 0;(S=!0===_?Z.makeSpan(["eqn-num"],[],t):!1===_?Z.makeSpan([],[],t):Z.makeSpan([],Bs(_,t,!0),t)).depth=C.depth,S.height=C.height,E.push({type:"elem",elem:S,shift:G})}for(b=m=0;m<n||b<k.length;++m,++b){for(var A=k[b]||{},U=!0;"separator"===A.type;){if(U||((x=Z.makeSpan(["arraycolsep"],[])).style.width=K(t.fontMetrics().doubleRuleSep),T.push(x)),"|"!==A.separator&&":"!==A.separator)throw new X("Invalid separator type: "+A.separator);var L="|"===A.separator?"solid":"dashed",N=Z.makeSpan(["vertical-separator"],[],t);N.style.height=K(h),N.style.borderRightWidth=K(s),N.style.borderRightStyle=L,N.style.margin="0 "+K(-s/2),(L=h-w)&&(N.style.verticalAlign=K(-L)),T.push(N),A=k[++b]||{},U=!1}if(!(n<=m)){for(var I=void 0,R=((0<m||e.hskipBeforeAndAfter)&&0!==(I=Wi.deflt(A.pregap,l))&&((x=Z.makeSpan(["arraycolsep"],[])).style.width=K(I),T.push(x)),[]),M=0;M<r;++M){var q,D=i[M],O=D[m];O&&(q=D.pos-w,O.depth=D.depth,O.height=D.height,R.push({type:"elem",elem:O,shift:q}))}R=Z.makeVList({positionType:"individualShift",children:R},t),R=Z.makeSpan(["col-align-"+(A.align||"c")],[R]),T.push(R),(m<n-1||e.hskipBeforeAndAfter)&&0!==(I=Wi.deflt(A.postgap,l))&&((x=Z.makeSpan(["arraycolsep"],[])).style.width=K(I),T.push(x))}}if(i=Z.makeSpan(["mtable"],T),0<a.length){for(var j=Z.makeLineSpan("hline",t,s),Y=Z.makeLineSpan("hdashline",t,s),W=[{type:"elem",elem:i,shift:0}];0<a.length;){var H=a.pop(),V=H.pos-w;W.push(H.isDashed?{type:"elem",elem:Y,shift:V}:{type:"elem",elem:j,shift:V})}i=Z.makeVList({positionType:"individualShift",children:W},t)}return 0===E.length?Z.makeSpan(["mord"],[i],t):(c=Z.makeVList({positionType:"individualShift",children:E},t),c=Z.makeSpan(["tag"],[c],t),Z.makeFragment([i,c]))},"htmlBuilder"),Xo={c:"center ",l:"left ",r:"right "},Pl=mt(function(e,t){for(var r=[],n=new E.MathNode("mtd",[],["mtr-glue"]),i=new E.MathNode("mtd",[],["mml-eqn-num"]),a=0;a<e.body.length;a++){for(var s=e.body[a],o=[],l=0;l<s.length;l++)o.push(new E.MathNode("mtd",[Zs(s[l],t)]));e.tags&&e.tags[a]&&(o.unshift(n),o.push(n),e.leqno?o.unshift(i):o.push(i)),r.push(new E.MathNode("mtr",o))}var c=new E.MathNode("mtable",r),h=.5===e.arraystretch?.1:.16+e.arraystretch-1+(e.addJot?.09:0),h=(c.setAttribute("rowspacing",K(h)),""),u="";if(e.cols&&0<e.cols.length){var d=e.cols,p="",g=!1,f=0,m=d.length;"separator"===d[0].type&&(h+="top ",f=1),"separator"===d[d.length-1].type&&(h+="bottom ",--m);for(var y=f;y<m;y++)"align"===d[y].type?(u+=Xo[d[y].align],g&&(p+="none "),g=!0):"separator"===d[y].type&&g&&(p+="|"===d[y].separator?"solid ":"dashed ",g=!1);c.setAttribute("columnalign",u.trim()),/[sd]/.test(p)&&c.setAttribute("columnlines",p.trim())}if("align"===e.colSeparationType){for(var v=e.cols||[],x="",b=1;b<v.length;b++)x+=b%2?"0em ":"1em ";c.setAttribute("columnspacing",x.trim())}else"alignat"===e.colSeparationType||"gather"===e.colSeparationType?c.setAttribute("columnspacing","0em"):"small"===e.colSeparationType?c.setAttribute("columnspacing","0.2778em"):"CD"===e.colSeparationType?c.setAttribute("columnspacing","0.5em"):c.setAttribute("columnspacing","1em");for(var w="",k=e.hLinesBeforeRow,h=(h+=0<k[0].length?"left ":"")+(0<k[k.length-1].length?"right ":""),T=1;T<k.length-1;T++)w+=0===k[T].length?"none ":k[T][0]?"dashed ":"solid ";return/[sd]/.test(w)&&c.setAttribute("rowlines",w.trim()),""!==h&&(c=new E.MathNode("menclose",[c])).setAttribute("notation",h.trim()),e.arraystretch&&e.arraystretch<1&&(c=new E.MathNode("mstyle",[c])).setAttribute("scriptlevel","1"),c},"mathmlBuilder"),fl=mt(function(e,t){-1===e.envName.indexOf("ed")&&Vo(e);var i,r=[],n=-1<e.envName.indexOf("at")?"alignat":"align",a="split"===e.envName,n=Pi(e.parser,{cols:r,addJot:!0,autoTag:a?void 0:Oi(e.envName),emptySingleRow:!0,colSeparationType:n,maxNumCols:a?2:void 0,leqno:e.parser.settings.leqno},"display"),s=0,o={type:"ordgroup",mode:e.mode,body:[]};if(t[0]&&"ordgroup"===t[0].type){for(var l="",c=0;c<t[0].body.length;c++)l+=Ei(t[0].body[c],"textord").text;i=Number(l),s=2*i}var h=!s;n.body.forEach(function(e){for(var t=1;t<e.length;t+=2){var r=Ei(e[t],"styling");Ei(r.body[0],"ordgroup").body.unshift(o)}if(h)s<e.length&&(s=e.length);else{var n=e.length/2;if(i<n)throw new X("Too many math in a row: expected "+i+", but got "+n,e[0])}});for(var u=0;u<s;++u){var d="r",p=0;u%2==1?d="l":0<u&&h&&(p=1),r[u]={type:"align",align:d,pregap:p,postgap:0}}return n.colSeparationType=h?"align":"alignat",n},"alignedHandler"),Mi({type:"array",names:["array","darray"],props:{numArgs:1},handler(e,t){return t={cols:t=(_i(t[0])?[t[0]]:Ei(t[0],"ordgroup").body).map(function(e){var t=Ci(e).text;if(-1!=="lcr".indexOf(t))return{type:"align",align:t};if("|"===t)return{type:"separator",separator:"|"};if(":"===t)return{type:"separator",separator:":"};throw new X("Unknown column alignment: "+t,e)}),hskipBeforeAndAfter:!0,maxNumCols:t.length},Pi(e.parser,t,Bi(e.envName))},htmlBuilder:m,mathmlBuilder:Pl}),Mi({type:"array",names:["matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix","matrix*","pmatrix*","bmatrix*","Bmatrix*","vmatrix*","Vmatrix*"],props:{numArgs:0},handler(e){var t={matrix:null,pmatrix:["(",")"],bmatrix:["[","]"],Bmatrix:["\\{","\\}"],vmatrix:["|","|"],Vmatrix:["\\Vert","\\Vert"]}[e.envName.replace("*","")],r="c",n={hskipBeforeAndAfter:!1,cols:[{type:"align",align:r}]};if("*"===e.envName.charAt(e.envName.length-1)){var i=e.parser;if(i.consumeSpaces(),"["===i.fetch().text){if(i.consume(),i.consumeSpaces(),r=i.fetch().text,-1==="lcr".indexOf(r))throw new X("Expected l or c or r",i.nextToken);i.consume(),i.consumeSpaces(),i.expect("]"),i.consume(),n.cols=[{type:"align",align:r}]}}return i=Pi(e.parser,n,Bi(e.envName)),n=Math.max(0,...i.body.map(e=>e.length)),i.cols=new Array(n).fill({type:"align",align:r}),t?{type:"leftright",mode:e.mode,body:[i],left:t[0],right:t[1],rightColor:void 0}:i},htmlBuilder:m,mathmlBuilder:Pl}),Mi({type:"array",names:["smallmatrix"],props:{numArgs:0},handler(e){return(e=Pi(e.parser,{arraystretch:.5},"script")).colSeparationType="small",e},htmlBuilder:m,mathmlBuilder:Pl}),Mi({type:"array",names:["subarray"],props:{numArgs:1},handler(e,t){if(1<(t=(_i(t[0])?[t[0]]:Ei(t[0],"ordgroup").body).map(function(e){var t=Ci(e).text;if(-1!=="lc".indexOf(t))return{type:"align",align:t};throw new X("Unknown column alignment: "+t,e)})).length)throw new X("{subarray} can contain only one column");if(0<(e=Pi(e.parser,{cols:t,hskipBeforeAndAfter:!1,arraystretch:.5},"script")).body.length&&1<e.body[0].length)throw new X("{subarray} can contain only one column");return e},htmlBuilder:m,mathmlBuilder:Pl}),Mi({type:"array",names:["cases","dcases","rcases","drcases"],props:{numArgs:0},handler(e){var t=Pi(e.parser,{arraystretch:1.2,cols:[{type:"align",align:"l",pregap:0,postgap:1},{type:"align",align:"l",pregap:0,postgap:0}]},Bi(e.envName));return{type:"leftright",mode:e.mode,body:[t],left:-1<e.envName.indexOf("r")?".":"\\{",right:-1<e.envName.indexOf("r")?"\\}":".",rightColor:void 0}},htmlBuilder:m,mathmlBuilder:Pl}),Mi({type:"array",names:["align","align*","aligned","split"],props:{numArgs:0},handler:fl,htmlBuilder:m,mathmlBuilder:Pl}),Mi({type:"array",names:["gathered","gather","gather*"],props:{numArgs:0},handler(e){Wi.contains(["gather","gather*"],e.envName)&&Vo(e);var t={cols:[{type:"align",align:"c"}],addJot:!0,colSeparationType:"gather",autoTag:Oi(e.envName),emptySingleRow:!0,leqno:e.parser.settings.leqno};return Pi(e.parser,t,"display")},htmlBuilder:m,mathmlBuilder:Pl}),Mi({type:"array",names:["alignat","alignat*","alignedat"],props:{numArgs:1},handler:fl,htmlBuilder:m,mathmlBuilder:Pl}),Mi({type:"array",names:["equation","equation*"],props:{numArgs:0},handler(e){Vo(e);var t={autoTag:Oi(e.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:e.parser.settings.leqno};return Pi(e.parser,t,"display")},htmlBuilder:m,mathmlBuilder:Pl}),Mi({type:"array",names:["CD"],props:{numArgs:0},handler(e){return Vo(e),Ni(e.parser)},htmlBuilder:m,mathmlBuilder:Pl}),l("\\nonumber","\\gdef\\@eqnsw{0}"),l("\\notag","\\nonumber"),o({type:"text",names:["\\hline","\\hdashline"],props:{numArgs:0,allowedInText:!0,allowedInMath:!0},handler(e,t){throw new X(e.funcName+" valid only within array environment")}}),Ko=Wo,o({type:"environment",names:["\\begin","\\end"],props:{numArgs:1,argTypes:["text"]},handler(e,t){var{parser:e,funcName:r}=e,n=t[0];if("ordgroup"!==n.type)throw new X("Invalid environment name",n);for(var i="",a=0;a<n.body.length;++a)i+=Ei(n.body[a],"textord").text;if("\\begin"!==r)return{type:"environment",mode:e.mode,name:i,nameGroup:n};if(!Ko.hasOwnProperty(i))throw new X("No such environment: "+i,n);var t=Ko[i],{args:r,optArgs:s}=e.parseArguments("\\begin{"+i+"}",t),o={mode:e.mode,envName:i,parser:e},t=t.handler(o,r,s),o=(e.expect("\\end",!1),e.nextToken);if((r=Ei(e.parseFunction(),"environment")).name!==i)throw new X("Mismatch: \\begin{"+i+"} matched by \\end{"+r.name+"}",o);return t}}),Bl=mt((e,t)=>{var r=e.font,t=t.withFont(r);return qs(e.body,t)},"htmlBuilder$5"),g=mt((e,t)=>{var r=e.font,t=t.withFont(r);return Zs(e.body,t)},"mathmlBuilder$4"),Zo={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak","\\bm":"\\boldsymbol"},o({type:"font",names:["\\mathrm","\\mathit","\\mathbf","\\mathnormal","\\mathsfit","\\mathbb","\\mathcal","\\mathfrak","\\mathscr","\\mathsf","\\mathtt","\\Bbb","\\bold","\\frak"],props:{numArgs:1,allowedInArgument:!0},handler:mt((e,t)=>{var{parser:e,funcName:r}=e,t=Ns(t[0]);return{type:"font",mode:e.mode,font:(r=r in Zo?Zo[r]:r).slice(1),body:t}},"handler"),htmlBuilder:Bl,mathmlBuilder:g}),o({type:"mclass",names:["\\boldsymbol","\\bm"],props:{numArgs:1},handler:mt((e,t)=>{var e=e.parser,t=t[0],r=Wi.isCharacterBox(t);return{type:"mclass",mode:e.mode,mclass:ho(t),body:[{type:"font",mode:e.mode,font:"boldsymbol",body:t}],isCharacterBox:r}},"handler")}),o({type:"font",names:["\\rm","\\sf","\\tt","\\bf","\\it","\\cal"],props:{numArgs:0,allowedInText:!0},handler:mt((e,t)=>{var{parser:e,funcName:r,breakOnTokenText:n}=e,i=e.mode,n=e.parseExpression(!0,n);return{type:"font",mode:i,font:"math"+r.slice(1),body:{type:"ordgroup",mode:e.mode,body:n}}},"handler"),htmlBuilder:Bl,mathmlBuilder:g}),Qo=mt((e,t)=>("display"===e?t=t.id>=ra.SCRIPT.id?t.text():ra.DISPLAY:"text"===e&&t.size===ra.DISPLAY.size?t=ra.TEXT:"script"===e?t=ra.SCRIPT:"scriptscript"===e&&(t=ra.SCRIPTSCRIPT),t),"adjustStyle"),Jo=mt((e,t)=>{var r,n,i,a,s=Qo(e.size,t.style),o=s.fracNum(),l=s.fracDen(),o=t.havingStyle(o),c=qs(e.numer,o,t),h=(e.continued&&(h=8.5/t.fontMetrics().ptPerEm,u=3.5/t.fontMetrics().ptPerEm,c.height=c.height<h?h:c.height,c.depth=c.depth<u?u:c.depth),o=t.havingStyle(l),qs(e.denom,o,t)),u=e.hasBarLine?(n=(a=e.barSize?(n=Aa(e.barSize,t),Z.makeLineSpan("frac-line",t,n)):Z.makeLineSpan("frac-line",t)).height,a.height):(a=null,n=0,t.fontMetrics().defaultRuleThickness),l=s.size===ra.DISPLAY.size||"display"===e.size?(r=t.fontMetrics().num1,i=0<n?3*u:7*u,t.fontMetrics().denom1):(i=0<n?(r=t.fontMetrics().num2,u):(r=t.fontMetrics().num3,3*u),t.fontMetrics().denom2),u=a?(u=t.fontMetrics().axisHeight,r-c.depth-(u+.5*n)<i&&(r+=i-(r-c.depth-(u+.5*n))),u-.5*n-(h.height-l)<i&&(l+=i-(u-.5*n-(h.height-l))),Z.makeVList({positionType:"individualShift",children:[{type:"elem",elem:h,shift:l},{type:"elem",elem:a,shift:-(u-.5*n)},{type:"elem",elem:c,shift:-r}]},t)):((a=r-c.depth-(h.height-l))<i&&(r+=.5*(i-a),l+=.5*(i-a)),Z.makeVList({positionType:"individualShift",children:[{type:"elem",elem:h,shift:l},{type:"elem",elem:c,shift:-r}]},t));return o=t.havingStyle(s),u.height*=o.sizeMultiplier/t.sizeMultiplier,u.depth*=o.sizeMultiplier/t.sizeMultiplier,n=s.size===ra.DISPLAY.size?t.fontMetrics().delim1:(s.size===ra.SCRIPTSCRIPT.size?t.havingStyle(ra.SCRIPT):t).fontMetrics().delim2,i=null==e.leftDelim?Us(t,["mopen"]):qo.customSizedDelim(e.leftDelim,n,!0,t.havingStyle(s),e.mode,["mopen"]),a=e.continued?Z.makeSpan([]):null==e.rightDelim?Us(t,["mclose"]):qo.customSizedDelim(e.rightDelim,n,!0,t.havingStyle(s),e.mode,["mclose"]),Z.makeSpan(["mord"].concat(o.sizingClasses(t)),[i,Z.makeSpan(["mfrac"],[u]),a],t)},"htmlBuilder$4"),el=mt((e,t)=>{var r=new E.MathNode("mfrac",[Zs(e.numer,t),Zs(e.denom,t)]),n=(e.hasBarLine?e.barSize&&(n=Aa(e.barSize,t),r.setAttribute("linethickness",K(n))):r.setAttribute("linethickness","0px"),Qo(e.size,t.style));return n.size!==t.style.size&&(r=new E.MathNode("mstyle",[r]),t=n.size===ra.DISPLAY.size?"true":"false",r.setAttribute("displaystyle",t),r.setAttribute("scriptlevel","0")),null!=e.leftDelim||null!=e.rightDelim?(n=[],null!=e.leftDelim&&((t=new E.MathNode("mo",[new E.TextNode(e.leftDelim.replace("\\",""))])).setAttribute("fence","true"),n.push(t)),n.push(r),null!=e.rightDelim&&((t=new E.MathNode("mo",[new E.TextNode(e.rightDelim.replace("\\",""))])).setAttribute("fence","true"),n.push(t)),Hs(n)):r},"mathmlBuilder$3"),o({type:"genfrac",names:["\\dfrac","\\frac","\\tfrac","\\dbinom","\\binom","\\tbinom","\\\\atopfrac","\\\\bracefrac","\\\\brackfrac"],props:{numArgs:2,allowedInArgument:!0},handler:mt((e,t)=>{var r,{parser:e,funcName:n}=e,i=t[0],t=t[1],a=null,s=null,o="auto";switch(n){case"\\dfrac":case"\\frac":case"\\tfrac":r=!0;break;case"\\\\atopfrac":r=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":r=!1,a="(",s=")";break;case"\\\\bracefrac":r=!1,a="\\{",s="\\}";break;case"\\\\brackfrac":r=!1,a="[",s="]";break;default:throw new Error("Unrecognized genfrac command")}switch(n){case"\\dfrac":case"\\dbinom":o="display";break;case"\\tfrac":case"\\tbinom":o="text"}return{type:"genfrac",mode:e.mode,continued:!1,numer:i,denom:t,hasBarLine:r,leftDelim:a,rightDelim:s,size:o,barSize:null}},"handler"),htmlBuilder:Jo,mathmlBuilder:el}),o({type:"genfrac",names:["\\cfrac"],props:{numArgs:2},handler:mt((e,t)=>{var e=e.parser,r=t[0];return{type:"genfrac",mode:e.mode,continued:!0,numer:r,denom:t[1],hasBarLine:!0,leftDelim:null,rightDelim:null,size:"display",barSize:null}},"handler")}),o({type:"infix",names:["\\over","\\choose","\\atop","\\brace","\\brack"],props:{numArgs:0,infix:!0},handler(e){var t,{parser:e,funcName:r,token:n}=e;switch(r){case"\\over":t="\\frac";break;case"\\choose":t="\\binom";break;case"\\atop":t="\\\\atopfrac";break;case"\\brace":t="\\\\bracefrac";break;case"\\brack":t="\\\\brackfrac";break;default:throw new Error("Unrecognized infix genfrac command")}return{type:"infix",mode:e.mode,replaceWith:t,token:n}}}),tl=["display","text","script","scriptscript"],rl=mt(function(e){var t=null;return 0<e.length?"."===(t=e)?null:e:t},"delimFromValue"),o({type:"genfrac",names:["\\genfrac"],props:{numArgs:6,allowedInArgument:!0,argTypes:["math","math","size","text","math","math"]},handler(e,t){var r,e=e.parser,n=t[4],i=t[5],a="atom"===(a=Ns(t[0])).type&&"open"===a.family?rl(a.text):null,s="atom"===(s=Ns(t[1])).type&&"close"===s.family?rl(s.text):null,o=null,l=!!(l=Ei(t[2],"size")).isBlank||0<(o=l.value).number,c="auto";return"ordgroup"===(t=t[3]).type?0<t.body.length&&(r=Ei(t.body[0],"textord"),c=tl[Number(r.text)]):(t=Ei(t,"textord"),c=tl[Number(t.text)]),{type:"genfrac",mode:e.mode,numer:n,denom:i,continued:!1,hasBarLine:l,barSize:o,leftDelim:a,rightDelim:s,size:c}},htmlBuilder:Jo,mathmlBuilder:el}),o({type:"infix",names:["\\above"],props:{numArgs:1,argTypes:["size"],infix:!0},handler(e,t){var{parser:e,token:r}=e;return{type:"infix",mode:e.mode,replaceWith:"\\\\abovefrac",size:Ei(t[0],"size").value,token:r}}}),o({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:mt((e,t)=>{var e=e.parser,r=t[0],n=Yi(Ei(t[1],"infix").size),t=t[2],i=0<n.number;return{type:"genfrac",mode:e.mode,numer:r,denom:t,continued:!1,hasBarLine:i,barSize:n,leftDelim:null,rightDelim:null,size:"auto"}},"handler"),htmlBuilder:Jo,mathmlBuilder:el}),nl=mt((e,t)=>{var r,n,i=t.style,i="supsub"===e.type?(r=e.sup?qs(e.sup,t.havingStyle(i.sup()),t):qs(e.sub,t.havingStyle(i.sub()),t),Ei(e.base,"horizBrace")):Ei(e,"horizBrace"),e=qs(i.base,t.havingBaseStyle(ra.DISPLAY)),a=ao.svgSpan(i,t);return(i.isOver?(n=Z.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:e},{type:"kern",size:.1},{type:"elem",elem:a}]},t)).children[0].children[0].children[1]:(n=Z.makeVList({positionType:"bottom",positionData:e.depth+.1+a.height,children:[{type:"elem",elem:a},{type:"kern",size:.1},{type:"elem",elem:e}]},t)).children[0].children[0].children[0]).classes.push("svg-align"),r&&(a=Z.makeSpan(["mord",i.isOver?"mover":"munder"],[n],t),n=i.isOver?Z.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:a},{type:"kern",size:.2},{type:"elem",elem:r}]},t):Z.makeVList({positionType:"bottom",positionData:a.depth+.2+r.height+r.depth,children:[{type:"elem",elem:r},{type:"kern",size:.2},{type:"elem",elem:a}]},t)),Z.makeSpan(["mord",i.isOver?"mover":"munder"],[n],t)},"htmlBuilder$3"),f=mt((e,t)=>{var r=ao.mathMLnode(e.label);return new E.MathNode(e.isOver?"mover":"munder",[Zs(e.base,t),r])},"mathmlBuilder$2"),o({type:"horizBrace",names:["\\overbrace","\\underbrace"],props:{numArgs:1},handler(e,t){var{parser:e,funcName:r}=e;return{type:"horizBrace",mode:e.mode,label:r,isOver:/^\\over/.test(r),base:t[0]}},htmlBuilder:nl,mathmlBuilder:f}),o({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:mt((e,t)=>{var e=e.parser,r=t[1],t=Ei(t[0],"url").url;return e.settings.isTrusted({command:"\\href",url:t})?{type:"href",mode:e.mode,href:t,body:Is(r)}:e.formatUnsupportedCmd("\\href")},"handler"),htmlBuilder:mt((e,t)=>{var r=Bs(e.body,t,!1);return Z.makeAnchor(e.href,[],r,t)},"htmlBuilder"),mathmlBuilder:mt((e,t)=>((t=(t=Ks(e.body,t))instanceof js?t:new js("mrow",[t])).setAttribute("href",e.href),t),"mathmlBuilder")}),o({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:mt((e,t)=>{var e=e.parser,r=Ei(t[0],"url").url;if(!e.settings.isTrusted({command:"\\url",url:r}))return e.formatUnsupportedCmd("\\url");for(var n=[],i=0;i<r.length;i++){var a=r[i];n.push({type:"textord",mode:"text",text:"~"===a?"\\textasciitilde":a})}return t={type:"text",mode:e.mode,font:"\\texttt",body:n},{type:"href",mode:e.mode,href:r,body:Is(t)}},"handler")}),o({type:"hbox",names:["\\hbox"],props:{numArgs:1,argTypes:["text"],allowedInText:!0,primitive:!0},handler(e,t){return{type:"hbox",mode:(e=e.parser).mode,body:Is(t[0])}},htmlBuilder(e,t){return e=Bs(e.body,t,!1),Z.makeFragment(e)},mathmlBuilder(e,t){return new E.MathNode("mrow",Xs(e.body,t))}}),o({type:"html",names:["\\htmlClass","\\htmlId","\\htmlStyle","\\htmlData"],props:{numArgs:2,argTypes:["raw","original"],allowedInText:!0},handler:mt((e,t)=>{var{parser:e,funcName:r}=e,n=Ei(t[0],"raw").string,t=t[1];e.settings.strict&&e.settings.reportNonstrict("htmlExtension","HTML extension is disabled on strict mode");var i,a={};switch(r){case"\\htmlClass":i={command:"\\htmlClass",class:a.class=n};break;case"\\htmlId":i={command:"\\htmlId",id:a.id=n};break;case"\\htmlStyle":i={command:"\\htmlStyle",style:a.style=n};break;case"\\htmlData":for(var s=n.split(","),o=0;o<s.length;o++){var l=s[o].split("=");if(2!==l.length)throw new X("Error parsing key-value for \\htmlData");a["data-"+l[0].trim()]=l[1].trim()}i={command:"\\htmlData",attributes:a};break;default:throw new Error("Unrecognized html command")}return e.settings.isTrusted(i)?{type:"html",mode:e.mode,attributes:a,body:Is(t)}:e.formatUnsupportedCmd(r)},"handler"),htmlBuilder:mt((e,t)=>{var r,n=Bs(e.body,t,!1),i=["enclosing"],a=(e.attributes.class&&i.push(...e.attributes.class.trim().split(/\s+/)),Z.makeSpan(i,n,t));for(r in e.attributes)"class"!==r&&e.attributes.hasOwnProperty(r)&&a.setAttribute(r,e.attributes[r]);return a},"htmlBuilder"),mathmlBuilder:mt((e,t)=>Ks(e.body,t),"mathmlBuilder")}),o({type:"htmlmathml",names:["\\html@mathml"],props:{numArgs:2,allowedInText:!0},handler:mt((e,t)=>({type:"htmlmathml",mode:(e=e.parser).mode,html:Is(t[0]),mathml:Is(t[1])}),"handler"),htmlBuilder:mt((e,t)=>(e=Bs(e.html,t,!1),Z.makeFragment(e)),"htmlBuilder"),mathmlBuilder:mt((e,t)=>Ks(e.mathml,t),"mathmlBuilder")}),il=mt(function(e){if(/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(e))return{number:+e,unit:"bp"};var t=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(e);if(!t)throw new X("Invalid size: '"+e+"' in \\includegraphics");if(e={number:+(t[1]+t[2]),unit:t[3]},Sa(e))return e;throw new X("Invalid unit: '"+e.unit+"' in \\includegraphics.")},"sizeData"),o({type:"includegraphics",names:["\\includegraphics"],props:{numArgs:1,numOptionalArgs:1,argTypes:["raw","url"],allowedInText:!1},handler:mt((e,t,r)=>{var e=e.parser,n={number:0,unit:"em"},i={number:.9,unit:"em"},a={number:0,unit:"em"},s="";if(r[0])for(var o=Ei(r[0],"raw").string.split(","),l=0;l<o.length;l++){var c=o[l].split("=");if(2===c.length){var h=c[1].trim();switch(c[0].trim()){case"alt":s=h;break;case"width":n=il(h);break;case"height":i=il(h);break;case"totalheight":a=il(h);break;default:throw new X("Invalid key: '"+c[0]+"' in \\includegraphics.")}}}return r=Ei(t[0],"url").url,""===s&&(s=(s=(s=r).replace(/^.*[\\/]/,"")).substring(0,s.lastIndexOf("."))),e.settings.isTrusted({command:"\\includegraphics",url:r})?{type:"includegraphics",mode:e.mode,alt:s,width:n,height:i,totalheight:a,src:r}:e.formatUnsupportedCmd("\\includegraphics")},"handler"),htmlBuilder:mt((e,t)=>{var r=Aa(e.height,t),n=0,i=(0<e.totalheight.number&&(n=Aa(e.totalheight,t)-r),0),t=(0<e.width.number&&(i=Aa(e.width,t)),{height:K(r+n)});return 0<i&&(t.width=K(i)),0<n&&(t.verticalAlign=K(-n)),(i=new Pa(e.src,e.alt,t)).height=r,i.depth=n,i},"htmlBuilder"),mathmlBuilder:mt((e,t)=>{var r=new E.MathNode("mglyph",[]),n=(r.setAttribute("alt",e.alt),Aa(e.height,t)),i=0;return 0<e.totalheight.number&&(i=Aa(e.totalheight,t)-n,r.setAttribute("valign",K(-i))),r.setAttribute("height",K(n+i)),0<e.width.number&&(n=Aa(e.width,t),r.setAttribute("width",K(n))),r.setAttribute("src",e.src),r},"mathmlBuilder")}),o({type:"kern",names:["\\kern","\\mkern","\\hskip","\\mskip"],props:{numArgs:1,argTypes:["size"],primitive:!0,allowedInText:!0},handler(e,t){var r,n,{parser:e,funcName:i}=e,t=Ei(t[0],"size");return e.settings.strict&&(r="m"===i[1],n="mu"===t.value.unit,r?(n||e.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+i+" supports only mu units, not "+t.value.unit+" units"),"math"!==e.mode&&e.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+i+" works only in math mode")):n&&e.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+i+" doesn't support mu units")),{type:"kern",mode:e.mode,dimension:t.value}},htmlBuilder(e,t){return Z.makeGlue(e.dimension,t)},mathmlBuilder(e,t){return e=Aa(e.dimension,t),new E.SpaceNode(e)}}),o({type:"lap",names:["\\mathllap","\\mathrlap","\\mathclap"],props:{numArgs:1,allowedInText:!0},handler:mt((e,t)=>{var{parser:e,funcName:r}=e,t=t[0];return{type:"lap",mode:e.mode,alignment:r.slice(5),body:t}},"handler"),htmlBuilder:mt((e,t)=>{var r="clap"===e.alignment?(r=Z.makeSpan([],[qs(e.body,t)]),Z.makeSpan(["inner"],[r],t)):Z.makeSpan(["inner"],[qs(e.body,t)]),n=Z.makeSpan(["fix"],[]),e=Z.makeSpan([e.alignment],[r,n],t);return(r=Z.makeSpan(["strut"])).style.height=K(e.height+e.depth),e.depth&&(r.style.verticalAlign=K(-e.depth)),e.children.unshift(r),e=Z.makeSpan(["thinbox"],[e],t),Z.makeSpan(["mord","vbox"],[e],t)},"htmlBuilder"),mathmlBuilder:mt((e,t)=>(t=new E.MathNode("mpadded",[Zs(e.body,t)]),"rlap"!==e.alignment&&(e="llap"===e.alignment?"-1":"-0.5",t.setAttribute("lspace",e+"width")),t.setAttribute("width","0px"),t),"mathmlBuilder")}),o({type:"styling",names:["\\(","$"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,t){var{funcName:e,parser:r}=e,n=r.mode,e=(r.switchMode("math"),"\\("===e?"\\)":"$"),i=r.parseExpression(!1,e);return r.expect(e),r.switchMode(n),{type:"styling",mode:r.mode,style:"text",body:i}}}),o({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,t){throw new X("Mismatched "+e.funcName)}}),al=mt((e,t)=>{switch(t.style.size){case ra.DISPLAY.size:return e.display;case ra.TEXT.size:return e.text;case ra.SCRIPT.size:return e.script;case ra.SCRIPTSCRIPT.size:return e.scriptscript;default:return e.text}},"chooseMathStyle"),o({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4,primitive:!0},handler:mt((e,t)=>({type:"mathchoice",mode:(e=e.parser).mode,display:Is(t[0]),text:Is(t[1]),script:Is(t[2]),scriptscript:Is(t[3])}),"handler"),htmlBuilder:mt((e,t)=>(e=al(e,t),e=Bs(e,t,!1),Z.makeFragment(e)),"htmlBuilder"),mathmlBuilder:mt((e,t)=>(e=al(e,t),Ks(e,t)),"mathmlBuilder")}),sl=mt((e,t,r,n,i,a,s)=>{e=Z.makeSpan([],[e]);var o,l,c=r&&Wi.isCharacterBox(r);if(t&&(o={elem:t=qs(t,n.havingStyle(i.sup()),n),kern:Math.max(n.fontMetrics().bigOpSpacing1,n.fontMetrics().bigOpSpacing3-t.depth)}),r&&(l={elem:t=qs(r,n.havingStyle(i.sub()),n),kern:Math.max(n.fontMetrics().bigOpSpacing2,n.fontMetrics().bigOpSpacing4-t.height)}),o&&l)var r=n.fontMetrics().bigOpSpacing5+l.elem.height+l.elem.depth+l.kern+e.depth+s,h=Z.makeVList({positionType:"bottom",positionData:r,children:[{type:"kern",size:n.fontMetrics().bigOpSpacing5},{type:"elem",elem:l.elem,marginLeft:K(-a)},{type:"kern",size:l.kern},{type:"elem",elem:e},{type:"kern",size:o.kern},{type:"elem",elem:o.elem,marginLeft:K(a)},{type:"kern",size:n.fontMetrics().bigOpSpacing5}]},n);else if(l)i=e.height-s,h=Z.makeVList({positionType:"top",positionData:i,children:[{type:"kern",size:n.fontMetrics().bigOpSpacing5},{type:"elem",elem:l.elem,marginLeft:K(-a)},{type:"kern",size:l.kern},{type:"elem",elem:e}]},n);else{if(!o)return e;t=e.depth+s,h=Z.makeVList({positionType:"bottom",positionData:t,children:[{type:"elem",elem:e},{type:"kern",size:o.kern},{type:"elem",elem:o.elem,marginLeft:K(a)},{type:"kern",size:n.fontMetrics().bigOpSpacing5}]},n)}return r=[h],l&&0!==a&&!c&&((i=Z.makeSpan(["mspace"],[],n)).style.marginRight=K(a),r.unshift(i)),Z.makeSpan(["mop","op-limits"],r,n)},"assembleSupSub"),ol=["\\smallint"],ll=mt((e,t)=>{var r,n,i,a=!1,s=("supsub"===e.type?(r=e.sup,n=e.sub,i=Ei(e.base,"op"),a=!0):i=Ei(e,"op"),!1);if((e=t.style).size===ra.DISPLAY.size&&i.symbol&&!Wi.contains(ol,i.name)&&(s=!0),i.symbol){var o,l=s?"Size2-Regular":"Size1-Regular",c="";"\\oiint"!==i.name&&"\\oiiint"!==i.name||(c=i.name.slice(1),i.name="oiint"===c?"\\iint":"\\iiint"),l=Z.makeSymbol(i.name,l,"math",t,["mop","op-symbol",s?"large-op":"small-op"]),0<c.length&&(o=l.italic,h=Z.staticSvg(c+"Size"+(s?"2":"1"),t),l=Z.makeVList({positionType:"individualShift",children:[{type:"elem",elem:l,shift:0},{type:"elem",elem:h,shift:s?.08:0}]},t),i.name="\\"+c,l.classes.unshift("mop"),l.italic=o)}else if(i.body){var h=Bs(i.body,t,!0);1===h.length&&h[0]instanceof $a?(l=h[0]).classes[0]="mop":l=Z.makeSpan(["mop"],h,t)}else{for(var u=[],d=1;d<i.name.length;d++)u.push(Z.mathsym(i.name[d],i.mode,t));l=Z.makeSpan(["mop"],u,t)}return c=s=0,(l instanceof $a||"\\oiint"===i.name||"\\oiiint"===i.name)&&!i.suppressBaseShift&&(s=(l.height-l.depth)/2-t.fontMetrics().axisHeight,c=l.italic),a?sl(l,r,n,t,e,c,s):(s&&(l.style.position="relative",l.style.top=K(s)),l)},"htmlBuilder$2"),cl=mt((e,t)=>{var r;return e.symbol?(r=new js("mo",[Ws(e.name,e.mode)]),Wi.contains(ol,e.name)&&r.setAttribute("largeop","false")):r=e.body?new js("mo",Xs(e.body,t)):(r=new js("mi",[new Ys(e.name.slice(1))]),t=new js("mo",[Ws("⁡","text")]),e.parentIsSupSub?new js("mrow",[r,t]):wi([r,t])),r},"mathmlBuilder$1"),hl={"∏":"\\prod","∐":"\\coprod","∑":"\\sum","⋀":"\\bigwedge","⋁":"\\bigvee","⋂":"\\bigcap","⋃":"\\bigcup","⨀":"\\bigodot","⨁":"\\bigoplus","⨂":"\\bigotimes","⨄":"\\biguplus","⨆":"\\bigsqcup"},o({type:"op",names:["\\coprod","\\bigvee","\\bigwedge","\\biguplus","\\bigcap","\\bigcup","\\intop","\\prod","\\sum","\\bigotimes","\\bigoplus","\\bigodot","\\bigsqcup","\\smallint","∏","∐","∑","⋀","⋁","⋂","⋃","⨀","⨁","⨂","⨄","⨆"],props:{numArgs:0},handler:mt((e,t)=>{var{parser:e,funcName:r}=e;return 1===r.length&&(r=hl[r]),{type:"op",mode:e.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:r}},"handler"),htmlBuilder:ll,mathmlBuilder:cl}),o({type:"op",names:["\\mathop"],props:{numArgs:1,primitive:!0},handler:mt((e,t)=>(e=e.parser,t=t[0],{type:"op",mode:e.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:Is(t)}),"handler"),htmlBuilder:ll,mathmlBuilder:cl}),ul={"∫":"\\int","∬":"\\iint","∭":"\\iiint","∮":"\\oint","∯":"\\oiint","∰":"\\oiiint"},o({type:"op",names:["\\arcsin","\\arccos","\\arctan","\\arctg","\\arcctg","\\arg","\\ch","\\cos","\\cosec","\\cosh","\\cot","\\cotg","\\coth","\\csc","\\ctg","\\cth","\\deg","\\dim","\\exp","\\hom","\\ker","\\lg","\\ln","\\log","\\sec","\\sin","\\sinh","\\sh","\\tan","\\tanh","\\tg","\\th"],props:{numArgs:0},handler(e){var{parser:e,funcName:t}=e;return{type:"op",mode:e.mode,limits:!1,parentIsSupSub:!1,symbol:!1,name:t}},htmlBuilder:ll,mathmlBuilder:cl}),o({type:"op",names:["\\det","\\gcd","\\inf","\\lim","\\max","\\min","\\Pr","\\sup"],props:{numArgs:0},handler(e){var{parser:e,funcName:t}=e;return{type:"op",mode:e.mode,limits:!0,parentIsSupSub:!1,symbol:!1,name:t}},htmlBuilder:ll,mathmlBuilder:cl}),o({type:"op",names:["\\int","\\iint","\\iiint","\\oint","\\oiint","\\oiiint","∫","∬","∭","∮","∯","∰"],props:{numArgs:0},handler(e){var{parser:e,funcName:t}=e;return 1===t.length&&(t=ul[t]),{type:"op",mode:e.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:t}},htmlBuilder:ll,mathmlBuilder:cl}),dl=mt((e,t)=>{var r,n,i,a,s=!1;if("supsub"===e.type?(r=e.sup,n=e.sub,i=Ei(e.base,"operatorname"),s=!0):i=Ei(e,"operatorname"),0<i.body.length){for(var e=i.body.map(e=>{var t=e.text;return"string"==typeof t?{type:"textord",mode:e.mode,text:t}:e}),o=Bs(e,t.withFont("mathrm"),!0),l=0;l<o.length;l++){var c=o[l];c instanceof $a&&(c.text=c.text.replace(/\u2212/,"-").replace(/\u2217/,"*"))}a=Z.makeSpan(["mop"],o,t)}else a=Z.makeSpan(["mop"],[],t);return s?sl(a,r,n,t,t.style,0,0):a},"htmlBuilder$1"),pl=mt((e,t)=>{for(var r=Xs(e.body,t.withFont("mathrm")),n=!0,i=0;i<r.length;i++){var a=r[i];if(!(a instanceof E.SpaceNode))if(a instanceof E.MathNode)switch(a.type){case"mi":case"mn":case"ms":case"mspace":case"mtext":break;case"mo":var s=a.children[0];1===a.children.length&&s instanceof E.TextNode?s.text=s.text.replace(/\u2212/,"-").replace(/\u2217/,"*"):n=!1;break;default:n=!1}else n=!1}n&&(t=r.map(e=>e.toText()).join(""),r=[new E.TextNode(t)]),(t=new E.MathNode("mi",r)).setAttribute("mathvariant","normal");var o=new E.MathNode("mo",[Ws("⁡","text")]);return e.parentIsSupSub?new E.MathNode("mrow",[t,o]):E.newDocumentFragment([t,o])},"mathmlBuilder"),o({type:"operatorname",names:["\\operatorname@","\\operatornamewithlimits"],props:{numArgs:1},handler:mt((e,t)=>{var{parser:e,funcName:r}=e,t=t[0];return{type:"operatorname",mode:e.mode,body:Is(t),alwaysHandleSupSub:"\\operatornamewithlimits"===r,limits:!1,parentIsSupSub:!1}},"handler"),htmlBuilder:dl,mathmlBuilder:pl}),l("\\operatorname","\\@ifstar\\operatornamewithlimits\\operatorname@"),vi({type:"ordgroup",htmlBuilder(e,t){return e.semisimple?Z.makeFragment(Bs(e.body,t,!1)):Z.makeSpan(["mord"],Bs(e.body,t,!0),t)},mathmlBuilder(e,t){return Ks(e.body,t,!0)}}),o({type:"overline",names:["\\overline"],props:{numArgs:1},handler(e,t){return e=e.parser,t=t[0],{type:"overline",mode:e.mode,body:t}},htmlBuilder(e,t){var e=qs(e.body,t.havingCrampedStyle()),r=Z.makeLineSpan("overline-line",t),n=t.fontMetrics().defaultRuleThickness,e=Z.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:e},{type:"kern",size:3*n},{type:"elem",elem:r},{type:"kern",size:n}]},t);return Z.makeSpan(["mord","overline"],[e],t)},mathmlBuilder(e,t){var r=new E.MathNode("mo",[new E.TextNode("‾")]);return r.setAttribute("stretchy","true"),(e=new E.MathNode("mover",[Zs(e.body,t),r])).setAttribute("accent","true"),e}}),o({type:"phantom",names:["\\phantom"],props:{numArgs:1,allowedInText:!0},handler:mt((e,t)=>(e=e.parser,t=t[0],{type:"phantom",mode:e.mode,body:Is(t)}),"handler"),htmlBuilder:mt((e,t)=>(e=Bs(e.body,t.withPhantom(),!1),Z.makeFragment(e)),"htmlBuilder"),mathmlBuilder:mt((e,t)=>(e=Xs(e.body,t),new E.MathNode("mphantom",e)),"mathmlBuilder")}),o({type:"hphantom",names:["\\hphantom"],props:{numArgs:1,allowedInText:!0},handler:mt((e,t)=>(e=e.parser,t=t[0],{type:"hphantom",mode:e.mode,body:t}),"handler"),htmlBuilder:mt((e,t)=>{var r=Z.makeSpan([],[qs(e.body,t.withPhantom())]);if(r.height=0,r.depth=0,r.children)for(var n=0;n<r.children.length;n++)r.children[n].height=0,r.children[n].depth=0;return r=Z.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:r}]},t),Z.makeSpan(["mord"],[r],t)},"htmlBuilder"),mathmlBuilder:mt((e,t)=>(e=Xs(Is(e.body),t),t=new E.MathNode("mphantom",e),(e=new E.MathNode("mpadded",[t])).setAttribute("height","0px"),e.setAttribute("depth","0px"),e),"mathmlBuilder")}),o({type:"vphantom",names:["\\vphantom"],props:{numArgs:1,allowedInText:!0},handler:mt((e,t)=>(e=e.parser,t=t[0],{type:"vphantom",mode:e.mode,body:t}),"handler"),htmlBuilder:mt((e,t)=>{var e=Z.makeSpan(["inner"],[qs(e.body,t.withPhantom())]),r=Z.makeSpan(["fix"],[]);return Z.makeSpan(["mord","rlap"],[e,r],t)},"htmlBuilder"),mathmlBuilder:mt((e,t)=>(e=Xs(Is(e.body),t),t=new E.MathNode("mphantom",e),(e=new E.MathNode("mpadded",[t])).setAttribute("width","0px"),e),"mathmlBuilder")}),o({type:"raisebox",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler(e,t){var e=e.parser,r=Ei(t[0],"size").value;return{type:"raisebox",mode:e.mode,dy:r,body:t[1]}},htmlBuilder(e,t){var r=qs(e.body,t),e=Aa(e.dy,t);return Z.makeVList({positionType:"shift",positionData:-e,children:[{type:"elem",elem:r}]},t)},mathmlBuilder(e,t){return t=new E.MathNode("mpadded",[Zs(e.body,t)]),e=e.dy.number+e.dy.unit,t.setAttribute("voffset",e),t}}),o({type:"internal",names:["\\relax"],props:{numArgs:0,allowedInText:!0,allowedInArgument:!0},handler(e){return{type:"internal",mode:(e=e.parser).mode}}}),o({type:"rule",names:["\\rule"],props:{numArgs:2,numOptionalArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["size","size","size"]},handler(e,t,r){var e=e.parser,r=r[0],n=Ei(t[0],"size"),t=Ei(t[1],"size");return{type:"rule",mode:e.mode,shift:r&&Ei(r,"size").value,width:n.value,height:t.value}},htmlBuilder(e,t){var r=Z.makeSpan(["mord","rule"],[],t),n=Aa(e.width,t),i=Aa(e.height,t),e=e.shift?Aa(e.shift,t):0;return r.style.borderRightWidth=K(n),r.style.borderTopWidth=K(i),r.style.bottom=K(e),r.width=n,r.height=i+e,r.depth=-e,r.maxFontSize=1.125*i*t.sizeMultiplier,r},mathmlBuilder(e,t){var r=Aa(e.width,t),n=Aa(e.height,t),e=e.shift?Aa(e.shift,t):0,t=t.color&&t.getColor()||"black",i=new E.MathNode("mspace"),t=(i.setAttribute("mathbackground",t),i.setAttribute("width",K(r)),i.setAttribute("height",K(n)),new E.MathNode("mpadded",[i]));return 0<=e?t.setAttribute("height",K(e)):(t.setAttribute("height",K(e)),t.setAttribute("depth",K(-e))),t.setAttribute("voffset",K(e)),t}}),mt($i,"sizingGroup"),gl=["\\tiny","\\sixptsize","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"],fl=mt((e,t)=>{var r=t.havingSize(e.size);return $i(e.body,r,t)},"htmlBuilder"),o({type:"sizing",names:gl,props:{numArgs:0,allowedInText:!0},handler:mt((e,t)=>{var{breakOnTokenText:e,funcName:r,parser:n}=e,e=n.parseExpression(!1,e);return{type:"sizing",mode:n.mode,size:gl.indexOf(r)+1,body:e}},"handler"),htmlBuilder:fl,mathmlBuilder:mt((e,t)=>(t=t.havingSize(e.size),e=Xs(e.body,t),(e=new E.MathNode("mstyle",e)).setAttribute("mathsize",K(t.sizeMultiplier)),e),"mathmlBuilder")}),o({type:"smash",names:["\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:mt((e,t,r)=>{var e=e.parser,n=!1,i=!1,a=r[0]&&Ei(r[0],"ordgroup");if(a)for(var s,o=0;o<a.body.length;++o)if("t"===(s=a.body[o].text))n=!0;else{if("b"!==s){i=n=!1;break}i=!0}else i=n=!0;return r=t[0],{type:"smash",mode:e.mode,body:r,smashHeight:n,smashDepth:i}},"handler"),htmlBuilder:mt((e,t)=>{var r=Z.makeSpan([],[qs(e.body,t)]);if(!e.smashHeight&&!e.smashDepth)return r;if(e.smashHeight&&(r.height=0,r.children))for(var n=0;n<r.children.length;n++)r.children[n].height=0;if(e.smashDepth&&(r.depth=0,r.children))for(var i=0;i<r.children.length;i++)r.children[i].depth=0;return e=Z.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:r}]},t),Z.makeSpan(["mord"],[e],t)},"htmlBuilder"),mathmlBuilder:mt((e,t)=>(t=new E.MathNode("mpadded",[Zs(e.body,t)]),e.smashHeight&&t.setAttribute("height","0px"),e.smashDepth&&t.setAttribute("depth","0px"),t),"mathmlBuilder")}),o({type:"sqrt",names:["\\sqrt"],props:{numArgs:1,numOptionalArgs:1},handler(e,t,r){return e=e.parser,r=r[0],t=t[0],{type:"sqrt",mode:e.mode,body:t,index:r}},htmlBuilder(e,t){0===(r=qs(e.body,t.havingCrampedStyle())).height&&(r.height=t.fontMetrics().xHeight);var r=Z.wrapFragment(r,t),n=i=t.fontMetrics().defaultRuleThickness,n=i+(t.style.id<ra.TEXT.id?t.fontMetrics().xHeight:n)/4,i=r.height+r.depth+n+i,{span:i,ruleWidth:a,advanceWidth:s}=qo.sqrtImage(i,t),o=((o=i.height-a)>r.height+r.depth+n&&(n=(n+o-r.height-r.depth)/2),i.height-r.height-n-a),n=(r.style.paddingLeft=K(s),Z.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:r,wrapperClasses:["svg-align"]},{type:"kern",size:-(r.height+o)},{type:"elem",elem:i},{type:"kern",size:a}]},t));return e.index?(s=t.havingStyle(ra.SCRIPTSCRIPT),r=qs(e.index,s,t),o=.6*(n.height-n.depth),i=Z.makeVList({positionType:"shift",positionData:-o,children:[{type:"elem",elem:r}]},t),a=Z.makeSpan(["root"],[i]),Z.makeSpan(["mord","sqrt"],[a,n],t)):Z.makeSpan(["mord","sqrt"],[n],t)},mathmlBuilder(e,t){var{body:e,index:r}=e;return r?new E.MathNode("mroot",[Zs(e,t),Zs(r,t)]):new E.MathNode("msqrt",[Zs(e,t)])}}),ml={display:ra.DISPLAY,text:ra.TEXT,script:ra.SCRIPT,scriptscript:ra.SCRIPTSCRIPT},o({type:"styling",names:["\\displaystyle","\\textstyle","\\scriptstyle","\\scriptscriptstyle"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e,t){var{breakOnTokenText:e,funcName:r,parser:n}=e,e=n.parseExpression(!0,e),r=r.slice(1,r.length-5);return{type:"styling",mode:n.mode,style:r,body:e}},htmlBuilder(e,t){var r=ml[e.style],r=t.havingStyle(r).withFont("");return $i(e.body,r,t)},mathmlBuilder(e,t){var r=ml[e.style],t=t.havingStyle(r),r=Xs(e.body,t),t=new E.MathNode("mstyle",r),r={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]}[e.style];return t.setAttribute("scriptlevel",r[0]),t.setAttribute("displaystyle",r[1]),t}}),yl=mt(function(e,t){var r=e.base;return r?"op"===r.type?r.limits&&(t.style.size===ra.DISPLAY.size||r.alwaysHandleSupSub)?ll:null:"operatorname"===r.type?r.alwaysHandleSupSub&&(t.style.size===ra.DISPLAY.size||r.limits)?dl:null:"accent"===r.type?Wi.isCharacterBox(r.base)?so:null:"horizBrace"===r.type&&!e.sub===r.isOver?nl:null:null},"htmlBuilderDelegate"),vi({type:"supsub",htmlBuilder(e,t){if(a=yl(e,t))return a(e,t);var r,n,i,{base:a,sup:s,sub:o}=e,l=qs(a,t),c=t.fontMetrics(),h=0,u=0,a=a&&Wi.isCharacterBox(a),o=(s&&(i=t.havingStyle(t.style.sup()),r=qs(s,i,t),a||(h=l.height-i.fontMetrics().supDrop*i.sizeMultiplier/t.sizeMultiplier)),o&&(s=t.havingStyle(t.style.sub()),n=qs(o,s,t),a||(u=l.depth+s.fontMetrics().subDrop*s.sizeMultiplier/t.sizeMultiplier)),i=t.style===ra.DISPLAY?c.sup1:t.style.cramped?c.sup3:c.sup2,t.sizeMultiplier),a=K(.5/c.ptPerEm/o),s=null;if(n&&(o=e.base&&"op"===e.base.type&&e.base.name&&("\\oiint"===e.base.name||"\\oiiint"===e.base.name),l instanceof $a||o)&&(s=K(-l.italic)),r&&n){h=Math.max(h,i,r.depth+.25*c.xHeight),u=Math.max(u,c.sub2),e=4*c.defaultRuleThickness,h-r.depth-(n.height-u)<e&&(u=e-(h-r.depth)+n.height,0<(o=.8*c.xHeight-(h-r.depth)))&&(h+=o,u-=o);var d=Z.makeVList({positionType:"individualShift",children:[{type:"elem",elem:n,shift:u,marginRight:a,marginLeft:s},{type:"elem",elem:r,shift:-h,marginRight:a}]},t)}else if(n)u=Math.max(u,c.sub1,n.height-.8*c.xHeight),d=Z.makeVList({positionType:"shift",positionData:u,children:[{type:"elem",elem:n,marginLeft:s,marginRight:a}]},t);else{if(!r)throw new Error("supsub must have either sup or sub.");h=Math.max(h,i,r.depth+.25*c.xHeight),d=Z.makeVList({positionType:"shift",positionData:-h,children:[{type:"elem",elem:r,marginRight:a}]},t)}return e=Gs(l,"right")||"mord",Z.makeSpan([e],[l,Z.makeSpan(["msupsub"],[d])],t)},mathmlBuilder(e,t){var r,n=!1,i=(e.base&&"horizBrace"===e.base.type&&!!e.sup===e.base.isOver&&(n=!0,r=e.base.isOver),!e.base||"op"!==e.base.type&&"operatorname"!==e.base.type||(e.base.parentIsSupSub=!0),[Zs(e.base,t)]);return e.sub&&i.push(Zs(e.sub,t)),e.sup&&i.push(Zs(e.sup,t)),r=n?r?"mover":"munder":e.sub?e.sup?(n=e.base)&&"op"===n.type&&n.limits&&t.style===ra.DISPLAY||n&&"operatorname"===n.type&&n.alwaysHandleSupSub&&(t.style===ra.DISPLAY||n.limits)?"munderover":"msubsup":(r=e.base)&&"op"===r.type&&r.limits&&(t.style===ra.DISPLAY||r.alwaysHandleSupSub)||r&&"operatorname"===r.type&&r.alwaysHandleSupSub&&(r.limits||t.style===ra.DISPLAY)?"munder":"msub":(n=e.base)&&"op"===n.type&&n.limits&&(t.style===ra.DISPLAY||n.alwaysHandleSupSub)||n&&"operatorname"===n.type&&n.alwaysHandleSupSub&&(n.limits||t.style===ra.DISPLAY)?"mover":"msup",new E.MathNode(r,i)}}),vi({type:"atom",htmlBuilder(e,t){return Z.mathsym(e.text,e.mode,t,["m"+e.family])},mathmlBuilder(e,t){var r=new E.MathNode("mo",[Ws(e.text,e.mode)]);return"bin"===e.family?"bold-italic"===(t=Vs(e,t))&&r.setAttribute("mathvariant",t):"punct"===e.family?r.setAttribute("separator","true"):"open"!==e.family&&"close"!==e.family||r.setAttribute("stretchy","false"),r}}),vl={mi:"italic",mn:"normal",mtext:"normal"},vi({type:"mathord",htmlBuilder(e,t){return Z.makeOrd(e,t,"mathord")},mathmlBuilder(e,t){var r=new E.MathNode("mi",[Ws(e.text,e.mode,t)]);return(e=Vs(e,t)||"italic")!==vl[r.type]&&r.setAttribute("mathvariant",e),r}}),vi({type:"textord",htmlBuilder(e,t){return Z.makeOrd(e,t,"textord")},mathmlBuilder(e,t){var r=Ws(e.text,e.mode,t),t=Vs(e,t)||"normal",e="text"===e.mode?new E.MathNode("mtext",[r]):/[0-9]/.test(e.text)?new E.MathNode("mn",[r]):"\\prime"===e.text?new E.MathNode("mo",[r]):new E.MathNode("mi",[r]);return t!==vl[e.type]&&e.setAttribute("mathvariant",t),e}}),xl={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},bl={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}},vi({type:"spacing",htmlBuilder(e,t){var r,n;if(bl.hasOwnProperty(e.text))return r=bl[e.text].className||"","text"===e.mode?((n=Z.makeOrd(e,t,"textord")).classes.push(r),n):Z.makeSpan(["mspace",r],[Z.mathsym(e.text,e.mode,t)],t);if(xl.hasOwnProperty(e.text))return Z.makeSpan(["mspace",xl[e.text]],[],t);throw new X('Unknown type of space "'+e.text+'"')},mathmlBuilder(e,t){if(bl.hasOwnProperty(e.text))return new E.MathNode("mtext",[new E.TextNode(" ")]);if(xl.hasOwnProperty(e.text))return new E.MathNode("mspace");throw new X('Unknown type of space "'+e.text+'"')}}),wl=mt(()=>{var e=new E.MathNode("mtd",[]);return e.setAttribute("width","50%"),e},"pad"),vi({type:"tag",mathmlBuilder(e,t){return(e=new E.MathNode("mtable",[new E.MathNode("mtr",[wl(),new E.MathNode("mtd",[Ks(e.body,t)]),wl(),new E.MathNode("mtd",[Ks(e.tag,t)])])])).setAttribute("width","100%"),e}}),kl={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},Tl={"\\textbf":"textbf","\\textmd":"textmd"},El={"\\textit":"textit","\\textup":"textup"},Cl=mt((e,t)=>(e=e.font)?kl[e]?t.withTextFontFamily(kl[e]):Tl[e]?t.withTextFontWeight(Tl[e]):"\\emph"===e?"textit"===t.fontShape?t.withTextFontShape("textup"):t.withTextFontShape("textit"):t.withTextFontShape(El[e]):t,"optionsWithFont"),o({type:"text",names:["\\text","\\textrm","\\textsf","\\texttt","\\textnormal","\\textbf","\\textmd","\\textit","\\textup","\\emph"],props:{numArgs:1,argTypes:["text"],allowedInArgument:!0,allowedInText:!0},handler(e,t){var{parser:e,funcName:r}=e,t=t[0];return{type:"text",mode:e.mode,body:Is(t),font:r}},htmlBuilder(e,t){return t=Cl(e,t),e=Bs(e.body,t,!0),Z.makeSpan(["mord","text"],e,t)},mathmlBuilder(e,t){return t=Cl(e,t),Ks(e.body,t)}}),o({type:"underline",names:["\\underline"],props:{numArgs:1,allowedInText:!0},handler(e,t){return{type:"underline",mode:(e=e.parser).mode,body:t[0]}},htmlBuilder(e,t){var e=qs(e.body,t),r=Z.makeLineSpan("underline-line",t),n=t.fontMetrics().defaultRuleThickness,r=Z.makeVList({positionType:"top",positionData:e.height,children:[{type:"kern",size:n},{type:"elem",elem:r},{type:"kern",size:3*n},{type:"elem",elem:e}]},t);return Z.makeSpan(["mord","underline"],[r],t)},mathmlBuilder(e,t){var r=new E.MathNode("mo",[new E.TextNode("‾")]);return r.setAttribute("stretchy","true"),(e=new E.MathNode("munder",[Zs(e.body,t),r])).setAttribute("accentunder","true"),e}}),o({type:"vcenter",names:["\\vcenter"],props:{numArgs:1,argTypes:["original"],allowedInText:!1},handler(e,t){return{type:"vcenter",mode:(e=e.parser).mode,body:t[0]}},htmlBuilder(e,t){var e=qs(e.body,t),r=t.fontMetrics().axisHeight,r=.5*(e.height-r-(e.depth+r));return Z.makeVList({positionType:"shift",positionData:r,children:[{type:"elem",elem:e}]},t)},mathmlBuilder(e,t){return new E.MathNode("mpadded",[Zs(e.body,t)],["vcenter"])}}),o({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler(e,t,r){throw new X("\\verb ended by end of line instead of matching delimiter")},htmlBuilder(e,t){for(var r=_l(e),n=[],i=t.havingStyle(t.style.text()),a=0;a<r.length;a++){var s=r[a];"~"===s&&(s="\\textasciitilde"),n.push(Z.makeSymbol(s,"Typewriter-Regular",e.mode,i,["mord","texttt"]))}return Z.makeSpan(["mord","text"].concat(i.sizingClasses(t)),Z.tryCombineChars(n),i)},mathmlBuilder(e,t){return e=new E.TextNode(_l(e)),(e=new E.MathNode("mtext",[e])).setAttribute("mathvariant","monospace"),e}}),_l=mt(e=>e.body.replace(/ /g,e.star?"␣":" "),"makeVerb"),Sl=Ss,Al=new RegExp("[̀-ͯ]+$"),Ll=class{static{mt(this,"Lexer")}constructor(e,t){this.input=void 0,this.settings=void 0,this.tokenRegex=void 0,this.catcodes=void 0,this.input=e,this.settings=t,this.tokenRegex=new RegExp("([ \r\n\t]+)|\\\\(\n|[ \r\t]+\n?)[ \r\t]*|([!-\\[\\]-‧‪-퟿豈-￿][̀-ͯ]*|[\ud800-\udbff][\udc00-\udfff][̀-ͯ]*|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5|(\\\\[a-zA-Z@]+)[ \r\n\t]*|\\\\[^\ud800-\udfff])","g"),this.catcodes={"%":14,"~":13}}setCatcode(e,t){this.catcodes[e]=t}lex(){var e=this.input,t=this.tokenRegex.lastIndex;if(t===e.length)return new zi("EOF",new Fi(this,t,t));if(null===(n=this.tokenRegex.exec(e))||n.index!==t)throw new X("Unexpected character: '"+e[t]+"'",new zi(e[t],new Fi(this,t,t+1)));var r,n=n[6]||n[3]||(n[2]?"\\ ":" ");return 14===this.catcodes[n]?(-1===(r=e.indexOf(` +`,this.tokenRegex.lastIndex))?(this.tokenRegex.lastIndex=e.length,this.settings.reportNonstrict("commentAtEnd","% comment has no terminating newline; LaTeX would fail because of commenting the end of math mode (e.g. $)")):this.tokenRegex.lastIndex=r+1,this.lex()):new zi(n,new Fi(this,t,this.tokenRegex.lastIndex))}},Nl=class{static{mt(this,"Namespace")}constructor(e,t){void 0===e&&(e={}),void 0===t&&(t={}),this.current=void 0,this.builtins=void 0,this.undefStack=void 0,this.current=t,this.builtins=e,this.undefStack=[]}beginGroup(){this.undefStack.push({})}endGroup(){if(0===this.undefStack.length)throw new X("Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug");var e,t=this.undefStack.pop();for(e in t)t.hasOwnProperty(e)&&(null==t[e]?delete this.current[e]:this.current[e]=t[e])}endGroups(){for(;0<this.undefStack.length;)this.endGroup()}has(e){return this.current.hasOwnProperty(e)||this.builtins.hasOwnProperty(e)}get(e){return(this.current.hasOwnProperty(e)?this.current:this.builtins)[e]}set(e,t,r){if(r=void 0!==r&&r){for(var n=0;n<this.undefStack.length;n++)delete this.undefStack[n][e];0<this.undefStack.length&&(this.undefStack[this.undefStack.length-1][e]=t)}else(r=this.undefStack[this.undefStack.length-1])&&!r.hasOwnProperty(e)&&(r[e]=this.current[e]);null==t?delete this.current[e]:this.current[e]=t}},Il=Ho,l("\\noexpand",function(e){var t=e.popToken();return e.isExpandable(t.text)&&(t.noexpand=!0,t.treatAsRelax=!0),{tokens:[t],numArgs:0}}),l("\\expandafter",function(e){var t=e.popToken();return e.expandOnce(!0),{tokens:[t],numArgs:0}}),l("\\@firstoftwo",function(e){return{tokens:e.consumeArgs(2)[0],numArgs:0}}),l("\\@secondoftwo",function(e){return{tokens:e.consumeArgs(2)[1],numArgs:0}}),l("\\@ifnextchar",function(e){var t=e.consumeArgs(3),e=(e.consumeSpaces(),e.future());return 1===t[0].length&&t[0][0].text===e.text?{tokens:t[1],numArgs:0}:{tokens:t[2],numArgs:0}}),l("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}"),l("\\TextOrMath",function(e){var t=e.consumeArgs(2);return"text"===e.mode?{tokens:t[0],numArgs:0}:{tokens:t[1],numArgs:0}}),Rl={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15},l("\\char",function(e){var t,r,n=e.popToken(),i="";if("'"===n.text)t=8,n=e.popToken();else if('"'===n.text)t=16,n=e.popToken();else if("`"===n.text)if("\\"===(n=e.popToken()).text[0])i=n.text.charCodeAt(1);else{if("EOF"===n.text)throw new X("\\char` missing argument");i=n.text.charCodeAt(0)}else t=10;if(t){if(null==(i=Rl[n.text])||t<=i)throw new X("Invalid base-"+t+" digit "+n.text);for(;null!=(r=Rl[e.future().text])&&r<t;)i=i*t+r,e.popToken()}return"\\@char{"+i+"}"}),Ml=mt((e,t,r,n)=>{var i=e.consumeArg().tokens;if(1!==i.length)throw new X("\\newcommand's first argument must be a macro name");var a=i[0].text,s=e.isDefined(a);if(s&&!t)throw new X("\\newcommand{"+a+"} attempting to redefine "+a+"; use \\renewcommand");if(!s&&!r)throw new X("\\renewcommand{"+a+"} when command "+a+" does not yet exist; use \\newcommand");if(t=0,1===(i=e.consumeArg().tokens).length&&"["===i[0].text){for(var o="",l=e.expandNextToken();"]"!==l.text&&"EOF"!==l.text;)o+=l.text,l=e.expandNextToken();if(!o.match(/^\s*[0-9]+\s*$/))throw new X("Invalid number of arguments: "+o);t=parseInt(o),i=e.consumeArg().tokens}return s&&n||e.macros.set(a,{tokens:i,numArgs:t}),""},"newcommand"),l("\\newcommand",e=>Ml(e,!1,!0,!1)),l("\\renewcommand",e=>Ml(e,!0,!1,!1)),l("\\providecommand",e=>Ml(e,!0,!0,!0)),l("\\message",e=>(e=e.consumeArgs(1)[0],console.log(e.reverse().map(e=>e.text).join("")),"")),l("\\errmessage",e=>(e=e.consumeArgs(1)[0],console.error(e.reverse().map(e=>e.text).join("")),"")),l("\\show",e=>{var t=e.popToken(),r=t.text;return console.log(t,e.macros.get(r),Sl[r],ja.math[r],ja.text[r]),""}),l("\\bgroup","{"),l("\\egroup","}"),l("~","\\nobreakspace"),l("\\lq","`"),l("\\rq","'"),l("\\aa","\\r a"),l("\\AA","\\r A"),l("\\textcopyright","\\html@mathml{\\textcircled{c}}{\\char`©}"),l("\\copyright","\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}"),l("\\textregistered","\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`®}"),l("ℬ","\\mathscr{B}"),l("ℰ","\\mathscr{E}"),l("ℱ","\\mathscr{F}"),l("ℋ","\\mathscr{H}"),l("ℐ","\\mathscr{I}"),l("ℒ","\\mathscr{L}"),l("ℳ","\\mathscr{M}"),l("ℛ","\\mathscr{R}"),l("ℭ","\\mathfrak{C}"),l("ℌ","\\mathfrak{H}"),l("ℨ","\\mathfrak{Z}"),l("\\Bbbk","\\Bbb{k}"),l("·","\\cdotp"),l("\\llap","\\mathllap{\\textrm{#1}}"),l("\\rlap","\\mathrlap{\\textrm{#1}}"),l("\\clap","\\mathclap{\\textrm{#1}}"),l("\\mathstrut","\\vphantom{(}"),l("\\underbar","\\underline{\\text{#1}}"),l("\\not",'\\html@mathml{\\mathrel{\\mathrlap\\@not}}{\\char"338}'),l("\\neq","\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`≠}}"),l("\\ne","\\neq"),l("≠","\\neq"),l("\\notin","\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`∉}}"),l("∉","\\notin"),l("≘","\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`≘}}"),l("≙","\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`≘}}"),l("≚","\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`≚}}"),l("≛","\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`≛}}"),l("≝","\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`≝}}"),l("≞","\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`≞}}"),l("≟","\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`≟}}"),l("⟂","\\perp"),l("‼","\\mathclose{!\\mkern-0.8mu!}"),l("∌","\\notni"),l("⌜","\\ulcorner"),l("⌝","\\urcorner"),l("⌞","\\llcorner"),l("⌟","\\lrcorner"),l("©","\\copyright"),l("®","\\textregistered"),l("️","\\textregistered"),l("\\ulcorner",'\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}'),l("\\urcorner",'\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}'),l("\\llcorner",'\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}'),l("\\lrcorner",'\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}'),l("\\vdots","{\\varvdots\\rule{0pt}{15pt}}"),l("⋮","\\vdots"),l("\\varGamma","\\mathit{\\Gamma}"),l("\\varDelta","\\mathit{\\Delta}"),l("\\varTheta","\\mathit{\\Theta}"),l("\\varLambda","\\mathit{\\Lambda}"),l("\\varXi","\\mathit{\\Xi}"),l("\\varPi","\\mathit{\\Pi}"),l("\\varSigma","\\mathit{\\Sigma}"),l("\\varUpsilon","\\mathit{\\Upsilon}"),l("\\varPhi","\\mathit{\\Phi}"),l("\\varPsi","\\mathit{\\Psi}"),l("\\varOmega","\\mathit{\\Omega}"),l("\\substack","\\begin{subarray}{c}#1\\end{subarray}"),l("\\colon","\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax"),l("\\boxed","\\fbox{$\\displaystyle{#1}$}"),l("\\iff","\\DOTSB\\;\\Longleftrightarrow\\;"),l("\\implies","\\DOTSB\\;\\Longrightarrow\\;"),l("\\impliedby","\\DOTSB\\;\\Longleftarrow\\;"),l("\\dddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ...}}{#1}}"),l("\\ddddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ....}}{#1}}"),Dl={",":"\\dotsc","\\not":"\\dotsb","+":"\\dotsb","=":"\\dotsb","<":"\\dotsb",">":"\\dotsb","-":"\\dotsb","*":"\\dotsb",":":"\\dotsb","\\DOTSB":"\\dotsb","\\coprod":"\\dotsb","\\bigvee":"\\dotsb","\\bigwedge":"\\dotsb","\\biguplus":"\\dotsb","\\bigcap":"\\dotsb","\\bigcup":"\\dotsb","\\prod":"\\dotsb","\\sum":"\\dotsb","\\bigotimes":"\\dotsb","\\bigoplus":"\\dotsb","\\bigodot":"\\dotsb","\\bigsqcup":"\\dotsb","\\And":"\\dotsb","\\longrightarrow":"\\dotsb","\\Longrightarrow":"\\dotsb","\\longleftarrow":"\\dotsb","\\Longleftarrow":"\\dotsb","\\longleftrightarrow":"\\dotsb","\\Longleftrightarrow":"\\dotsb","\\mapsto":"\\dotsb","\\longmapsto":"\\dotsb","\\hookrightarrow":"\\dotsb","\\doteq":"\\dotsb","\\mathbin":"\\dotsb","\\mathrel":"\\dotsb","\\relbar":"\\dotsb","\\Relbar":"\\dotsb","\\xrightarrow":"\\dotsb","\\xleftarrow":"\\dotsb","\\DOTSI":"\\dotsi","\\int":"\\dotsi","\\oint":"\\dotsi","\\iint":"\\dotsi","\\iiint":"\\dotsi","\\iiiint":"\\dotsi","\\idotsint":"\\dotsi","\\DOTSX":"\\dotsx"},l("\\dots",function(e){var t="\\dotso";return(e=e.expandAfterFuture().text)in Dl?t=Dl[e]:("\\not"===e.slice(0,4)||e in ja.math&&Wi.contains(["bin","rel"],ja.math[e].group))&&(t="\\dotsb"),t}),Ol={")":!0,"]":!0,"\\rbrack":!0,"\\}":!0,"\\rbrace":!0,"\\rangle":!0,"\\rceil":!0,"\\rfloor":!0,"\\rgroup":!0,"\\rmoustache":!0,"\\right":!0,"\\bigr":!0,"\\biggr":!0,"\\Bigr":!0,"\\Biggr":!0,$:!0,";":!0,".":!0,",":!0},l("\\dotso",function(e){return e.future().text in Ol?"\\ldots\\,":"\\ldots"}),l("\\dotsc",function(e){return(e=e.future().text)in Ol&&","!==e?"\\ldots\\,":"\\ldots"}),l("\\cdots",function(e){return e.future().text in Ol?"\\@cdots\\,":"\\@cdots"}),l("\\dotsb","\\cdots"),l("\\dotsm","\\cdots"),l("\\dotsi","\\!\\cdots"),l("\\dotsx","\\ldots\\,"),l("\\DOTSI","\\relax"),l("\\DOTSB","\\relax"),l("\\DOTSX","\\relax"),l("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax"),l("\\,","\\tmspace+{3mu}{.1667em}"),l("\\thinspace","\\,"),l("\\>","\\mskip{4mu}"),l("\\:","\\tmspace+{4mu}{.2222em}"),l("\\medspace","\\:"),l("\\;","\\tmspace+{5mu}{.2777em}"),l("\\thickspace","\\;"),l("\\!","\\tmspace-{3mu}{.1667em}"),l("\\negthinspace","\\!"),l("\\negmedspace","\\tmspace-{4mu}{.2222em}"),l("\\negthickspace","\\tmspace-{5mu}{.277em}"),l("\\enspace","\\kern.5em "),l("\\enskip","\\hskip.5em\\relax"),l("\\quad","\\hskip1em\\relax"),l("\\qquad","\\hskip2em\\relax"),l("\\tag","\\@ifstar\\tag@literal\\tag@paren"),l("\\tag@paren","\\tag@literal{({#1})}"),l("\\tag@literal",e=>{if(e.macros.get("\\df@tag"))throw new X("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"}),l("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}"),l("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)"),l("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}"),l("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1"),l("\\newline","\\\\\\relax"),l("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}"),l("\\LaTeX","\\textrm{\\html@mathml{L\\kern-.36em\\raisebox{"+(Pl=K(ya["Main-Regular"][84][1]-.7*ya["Main-Regular"][65][1]))+"}{\\scriptstyle A}\\kern-.15em\\TeX}{LaTeX}}"),l("\\KaTeX","\\textrm{\\html@mathml{K\\kern-.17em\\raisebox{"+Pl+"}{\\scriptstyle A}\\kern-.15em\\TeX}{KaTeX}}"),l("\\hspace","\\@ifstar\\@hspacer\\@hspace"),l("\\@hspace","\\hskip #1\\relax"),l("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax"),l("\\ordinarycolon",":"),l("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}"),l("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}'),l("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}'),l("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}'),l("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}'),l("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}'),l("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}'),l("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}'),l("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}'),l("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}'),l("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}'),l("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}'),l("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}'),l("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}'),l("∷","\\dblcolon"),l("∹","\\eqcolon"),l("≔","\\coloneqq"),l("≕","\\eqqcolon"),l("⩴","\\Coloneqq"),l("\\ratio","\\vcentcolon"),l("\\coloncolon","\\dblcolon"),l("\\colonequals","\\coloneqq"),l("\\coloncolonequals","\\Coloneqq"),l("\\equalscolon","\\eqqcolon"),l("\\equalscoloncolon","\\Eqqcolon"),l("\\colonminus","\\coloneq"),l("\\coloncolonminus","\\Coloneq"),l("\\minuscolon","\\eqcolon"),l("\\minuscoloncolon","\\Eqcolon"),l("\\coloncolonapprox","\\Colonapprox"),l("\\coloncolonsim","\\Colonsim"),l("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),l("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}"),l("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),l("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}"),l("\\notni","\\html@mathml{\\not\\ni}{\\mathrel{\\char`∌}}"),l("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}"),l("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}"),l("\\injlim","\\DOTSB\\operatorname*{inj\\,lim}"),l("\\projlim","\\DOTSB\\operatorname*{proj\\,lim}"),l("\\varlimsup","\\DOTSB\\operatorname*{\\overline{lim}}"),l("\\varliminf","\\DOTSB\\operatorname*{\\underline{lim}}"),l("\\varinjlim","\\DOTSB\\operatorname*{\\underrightarrow{lim}}"),l("\\varprojlim","\\DOTSB\\operatorname*{\\underleftarrow{lim}}"),l("\\gvertneqq","\\html@mathml{\\@gvertneqq}{≩}"),l("\\lvertneqq","\\html@mathml{\\@lvertneqq}{≨}"),l("\\ngeqq","\\html@mathml{\\@ngeqq}{≱}"),l("\\ngeqslant","\\html@mathml{\\@ngeqslant}{≱}"),l("\\nleqq","\\html@mathml{\\@nleqq}{≰}"),l("\\nleqslant","\\html@mathml{\\@nleqslant}{≰}"),l("\\nshortmid","\\html@mathml{\\@nshortmid}{∤}"),l("\\nshortparallel","\\html@mathml{\\@nshortparallel}{∦}"),l("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{⊈}"),l("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{⊉}"),l("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{⊊}"),l("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{⫋}"),l("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{⊋}"),l("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{⫌}"),l("\\imath","\\html@mathml{\\@imath}{ı}"),l("\\jmath","\\html@mathml{\\@jmath}{ȷ}"),l("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`⟦}}"),l("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`⟧}}"),l("⟦","\\llbracket"),l("⟧","\\rrbracket"),l("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`⦃}}"),l("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`⦄}}"),l("⦃","\\lBrace"),l("⦄","\\rBrace"),l("\\minuso","\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`⦵}}"),l("⦵","\\minuso"),l("\\darr","\\downarrow"),l("\\dArr","\\Downarrow"),l("\\Darr","\\Downarrow"),l("\\lang","\\langle"),l("\\rang","\\rangle"),l("\\uarr","\\uparrow"),l("\\uArr","\\Uparrow"),l("\\Uarr","\\Uparrow"),l("\\N","\\mathbb{N}"),l("\\R","\\mathbb{R}"),l("\\Z","\\mathbb{Z}"),l("\\alef","\\aleph"),l("\\alefsym","\\aleph"),l("\\Alpha","\\mathrm{A}"),l("\\Beta","\\mathrm{B}"),l("\\bull","\\bullet"),l("\\Chi","\\mathrm{X}"),l("\\clubs","\\clubsuit"),l("\\cnums","\\mathbb{C}"),l("\\Complex","\\mathbb{C}"),l("\\Dagger","\\ddagger"),l("\\diamonds","\\diamondsuit"),l("\\empty","\\emptyset"),l("\\Epsilon","\\mathrm{E}"),l("\\Eta","\\mathrm{H}"),l("\\exist","\\exists"),l("\\harr","\\leftrightarrow"),l("\\hArr","\\Leftrightarrow"),l("\\Harr","\\Leftrightarrow"),l("\\hearts","\\heartsuit"),l("\\image","\\Im"),l("\\infin","\\infty"),l("\\Iota","\\mathrm{I}"),l("\\isin","\\in"),l("\\Kappa","\\mathrm{K}"),l("\\larr","\\leftarrow"),l("\\lArr","\\Leftarrow"),l("\\Larr","\\Leftarrow"),l("\\lrarr","\\leftrightarrow"),l("\\lrArr","\\Leftrightarrow"),l("\\Lrarr","\\Leftrightarrow"),l("\\Mu","\\mathrm{M}"),l("\\natnums","\\mathbb{N}"),l("\\Nu","\\mathrm{N}"),l("\\Omicron","\\mathrm{O}"),l("\\plusmn","\\pm"),l("\\rarr","\\rightarrow"),l("\\rArr","\\Rightarrow"),l("\\Rarr","\\Rightarrow"),l("\\real","\\Re"),l("\\reals","\\mathbb{R}"),l("\\Reals","\\mathbb{R}"),l("\\Rho","\\mathrm{P}"),l("\\sdot","\\cdot"),l("\\sect","\\S"),l("\\spades","\\spadesuit"),l("\\sub","\\subset"),l("\\sube","\\subseteq"),l("\\supe","\\supseteq"),l("\\Tau","\\mathrm{T}"),l("\\thetasym","\\vartheta"),l("\\weierp","\\wp"),l("\\Zeta","\\mathrm{Z}"),l("\\argmin","\\DOTSB\\operatorname*{arg\\,min}"),l("\\argmax","\\DOTSB\\operatorname*{arg\\,max}"),l("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits"),l("\\bra","\\mathinner{\\langle{#1}|}"),l("\\ket","\\mathinner{|{#1}\\rangle}"),l("\\braket","\\mathinner{\\langle{#1}\\rangle}"),l("\\Bra","\\left\\langle#1\\right|"),l("\\Ket","\\left|#1\\right\\rangle"),l("\\bra@ket",(Bl=mt(l=>e=>{var t=e.consumeArg().tokens,n=e.consumeArg().tokens,i=e.consumeArg().tokens,r=e.consumeArg().tokens,a=e.macros.get("|"),s=e.macros.get("\\|"),o=(e.macros.beginGroup(),mt(r=>e=>{l&&(e.macros.set("|",a),i.length)&&e.macros.set("\\|",s);var t=r;return!r&&i.length&&"|"===e.future().text&&(e.popToken(),t=!0),{tokens:t?i:n,numArgs:0}},"midMacro")),o=(e.macros.set("|",o(!1)),i.length&&e.macros.set("\\|",o(!0)),e.consumeArg().tokens),r=e.expandTokens([...r,...o,...t]);return e.macros.endGroup(),{tokens:r.reverse(),numArgs:0}},"braketHelper"))(!1)),l("\\bra@set",Bl(!0)),l("\\Braket","\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}"),l("\\Set","\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}"),l("\\set","\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}"),l("\\angln","{\\angl n}"),l("\\blue","\\textcolor{##6495ed}{#1}"),l("\\orange","\\textcolor{##ffa500}{#1}"),l("\\pink","\\textcolor{##ff00af}{#1}"),l("\\red","\\textcolor{##df0030}{#1}"),l("\\green","\\textcolor{##28ae7b}{#1}"),l("\\gray","\\textcolor{gray}{#1}"),l("\\purple","\\textcolor{##9d38bd}{#1}"),l("\\blueA","\\textcolor{##ccfaff}{#1}"),l("\\blueB","\\textcolor{##80f6ff}{#1}"),l("\\blueC","\\textcolor{##63d9ea}{#1}"),l("\\blueD","\\textcolor{##11accd}{#1}"),l("\\blueE","\\textcolor{##0c7f99}{#1}"),l("\\tealA","\\textcolor{##94fff5}{#1}"),l("\\tealB","\\textcolor{##26edd5}{#1}"),l("\\tealC","\\textcolor{##01d1c1}{#1}"),l("\\tealD","\\textcolor{##01a995}{#1}"),l("\\tealE","\\textcolor{##208170}{#1}"),l("\\greenA","\\textcolor{##b6ffb0}{#1}"),l("\\greenB","\\textcolor{##8af281}{#1}"),l("\\greenC","\\textcolor{##74cf70}{#1}"),l("\\greenD","\\textcolor{##1fab54}{#1}"),l("\\greenE","\\textcolor{##0d923f}{#1}"),l("\\goldA","\\textcolor{##ffd0a9}{#1}"),l("\\goldB","\\textcolor{##ffbb71}{#1}"),l("\\goldC","\\textcolor{##ff9c39}{#1}"),l("\\goldD","\\textcolor{##e07d10}{#1}"),l("\\goldE","\\textcolor{##a75a05}{#1}"),l("\\redA","\\textcolor{##fca9a9}{#1}"),l("\\redB","\\textcolor{##ff8482}{#1}"),l("\\redC","\\textcolor{##f9685d}{#1}"),l("\\redD","\\textcolor{##e84d39}{#1}"),l("\\redE","\\textcolor{##bc2612}{#1}"),l("\\maroonA","\\textcolor{##ffbde0}{#1}"),l("\\maroonB","\\textcolor{##ff92c6}{#1}"),l("\\maroonC","\\textcolor{##ed5fa6}{#1}"),l("\\maroonD","\\textcolor{##ca337c}{#1}"),l("\\maroonE","\\textcolor{##9e034e}{#1}"),l("\\purpleA","\\textcolor{##ddd7ff}{#1}"),l("\\purpleB","\\textcolor{##c6b9fc}{#1}"),l("\\purpleC","\\textcolor{##aa87ff}{#1}"),l("\\purpleD","\\textcolor{##7854ab}{#1}"),l("\\purpleE","\\textcolor{##543b78}{#1}"),l("\\mintA","\\textcolor{##f5f9e8}{#1}"),l("\\mintB","\\textcolor{##edf2df}{#1}"),l("\\mintC","\\textcolor{##e0e5cc}{#1}"),l("\\grayA","\\textcolor{##f6f7f7}{#1}"),l("\\grayB","\\textcolor{##f0f1f2}{#1}"),l("\\grayC","\\textcolor{##e3e5e6}{#1}"),l("\\grayD","\\textcolor{##d6d8da}{#1}"),l("\\grayE","\\textcolor{##babec2}{#1}"),l("\\grayF","\\textcolor{##888d93}{#1}"),l("\\grayG","\\textcolor{##626569}{#1}"),l("\\grayH","\\textcolor{##3b3e40}{#1}"),l("\\grayI","\\textcolor{##21242c}{#1}"),l("\\kaBlue","\\textcolor{##314453}{#1}"),l("\\kaGreen","\\textcolor{##71B307}{#1}"),$l={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0},Fl=class{static{mt(this,"MacroExpander")}constructor(e,t,r){this.settings=void 0,this.expansionCount=void 0,this.lexer=void 0,this.macros=void 0,this.stack=void 0,this.mode=void 0,this.settings=t,this.expansionCount=0,this.feed(e),this.macros=new Nl(Il,t.macros),this.mode=r,this.stack=[]}feed(e){this.lexer=new Ll(e,this.settings)}switchMode(e){this.mode=e}beginGroup(){this.macros.beginGroup()}endGroup(){this.macros.endGroup()}endGroups(){this.macros.endGroups()}future(){return 0===this.stack.length&&this.pushToken(this.lexer.lex()),this.stack[this.stack.length-1]}popToken(){return this.future(),this.stack.pop()}pushToken(e){this.stack.push(e)}pushTokens(e){this.stack.push(...e)}scanArgument(e){var t,r,n;if(e){if(this.consumeSpaces(),"["!==this.future().text)return null;t=this.popToken(),{tokens:n,end:r}=this.consumeArg(["]"])}else({tokens:n,start:t,end:r}=this.consumeArg());return this.pushToken(new zi("EOF",r.loc)),this.pushTokens(n),t.range(r,"")}consumeSpaces(){for(;" "===this.future().text;)this.stack.pop()}consumeArg(e){var t,r=[],n=e&&0<e.length,i=(n||this.consumeSpaces(),this.future()),a=0,s=0;do{if(t=this.popToken(),r.push(t),"{"===t.text)++a;else if("}"===t.text){if(-1==--a)throw new X("Extra }",t)}else if("EOF"===t.text)throw new X("Unexpected end of input in a macro argument, expected '"+(e&&n?e[s]:"}")+"'",t);if(e&&n)if((0===a||1===a&&"{"===e[s])&&t.text===e[s]){if(++s===e.length){r.splice(-s,s);break}}else s=0}while(0!==a||n);return"{"===i.text&&"}"===r[r.length-1].text&&(r.pop(),r.shift()),r.reverse(),{tokens:r,start:i,end:t}}consumeArgs(e,t){if(t){if(t.length!==e+1)throw new X("The length of delimiters doesn't match the number of args!");for(var r=t[0],n=0;n<r.length;n++){var i=this.popToken();if(r[n]!==i.text)throw new X("Use of the macro doesn't match its definition",i)}}for(var a=[],s=0;s<e;s++)a.push(this.consumeArg(t&&t[s+1]).tokens);return a}countExpansion(e){if(this.expansionCount+=e,this.expansionCount>this.settings.maxExpand)throw new X("Too many expansions: infinite loop or need to increase maxExpand setting")}expandOnce(e){var t=this.popToken(),r=t.text,n=t.noexpand?null:this._getExpansion(r);if(null==n||e&&n.unexpandable){if(e&&null==n&&"\\"===r[0]&&!this.isDefined(r))throw new X("Undefined control sequence: "+r);return this.pushToken(t),!1}this.countExpansion(1);var i=n.tokens,a=this.consumeArgs(n.numArgs,n.delimiters);if(n.numArgs)for(var s=(i=i.slice()).length-1;0<=s;--s){var o=i[s];if("#"===o.text){if(0===s)throw new X("Incomplete placeholder at end of macro body",o);if("#"===(o=i[--s]).text)i.splice(s+1,1);else{if(!/^[1-9]$/.test(o.text))throw new X("Not a valid argument number",o);i.splice(s,2,...a[+o.text-1])}}}return this.pushTokens(i),i.length}expandAfterFuture(){return this.expandOnce(),this.future()}expandNextToken(){for(;;){var e;if(!1===this.expandOnce())return(e=this.stack.pop()).treatAsRelax&&(e.text="\\relax"),e}throw new Error}expandMacro(e){return this.macros.has(e)?this.expandTokens([new zi(e)]):void 0}expandTokens(e){var t,r=[],n=this.stack.length;for(this.pushTokens(e);this.stack.length>n;)!1===this.expandOnce(!0)&&((t=this.stack.pop()).treatAsRelax&&(t.noexpand=!1,t.treatAsRelax=!1),r.push(t));return this.countExpansion(r.length),r}expandMacroAsText(e){return(e=this.expandMacro(e))&&e.map(e=>e.text).join("")}_getExpansion(e){var t=this.macros.get(e);if(null==t)return t;if(1!==e.length||null==(e=this.lexer.catcodes[e])||13===e){if("string"!=typeof(e="function"==typeof t?t(this):t))return e;var r=0;if(-1!==e.indexOf("#"))for(var n=e.replace(/##/g,"");-1!==n.indexOf("#"+(r+1));)++r;for(var i=new Ll(e,this.settings),a=[],s=i.lex();"EOF"!==s.text;)a.push(s),s=i.lex();return a.reverse(),{tokens:a,numArgs:r}}}isDefined(e){return this.macros.has(e)||Sl.hasOwnProperty(e)||ja.math.hasOwnProperty(e)||ja.text.hasOwnProperty(e)||$l.hasOwnProperty(e)}isExpandable(e){var t=this.macros.get(e);return null!=t?"string"==typeof t||"function"==typeof t||!t.unexpandable:Sl.hasOwnProperty(e)&&!Sl[e].primitive}},zl=/^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/,Gl=Object.freeze({"₊":"+","₋":"-","₌":"=","₍":"(","₎":")","₀":"0","₁":"1","₂":"2","₃":"3","₄":"4","₅":"5","₆":"6","₇":"7","₈":"8","₉":"9","ₐ":"a","ₑ":"e","ₕ":"h","ᵢ":"i","ⱼ":"j","ₖ":"k","ₗ":"l","ₘ":"m","ₙ":"n","ₒ":"o","ₚ":"p","ᵣ":"r","ₛ":"s","ₜ":"t","ᵤ":"u","ᵥ":"v","ₓ":"x","ᵦ":"β","ᵧ":"γ","ᵨ":"ρ","ᵩ":"ϕ","ᵪ":"χ","⁺":"+","⁻":"-","⁼":"=","⁽":"(","⁾":")","⁰":"0","¹":"1","²":"2","³":"3","⁴":"4","⁵":"5","⁶":"6","⁷":"7","⁸":"8","⁹":"9","ᴬ":"A","ᴮ":"B","ᴰ":"D","ᴱ":"E","ᴳ":"G","ᴴ":"H","ᴵ":"I","ᴶ":"J","ᴷ":"K","ᴸ":"L","ᴹ":"M","ᴺ":"N","ᴼ":"O","ᴾ":"P","ᴿ":"R","ᵀ":"T","ᵁ":"U","ⱽ":"V","ᵂ":"W","ᵃ":"a","ᵇ":"b","ᶜ":"c","ᵈ":"d","ᵉ":"e","ᶠ":"f","ᵍ":"g","ʰ":"h","ⁱ":"i","ʲ":"j","ᵏ":"k","ˡ":"l","ᵐ":"m","ⁿ":"n","ᵒ":"o","ᵖ":"p","ʳ":"r","ˢ":"s","ᵗ":"t","ᵘ":"u","ᵛ":"v","ʷ":"w","ˣ":"x","ʸ":"y","ᶻ":"z","ᵝ":"β","ᵞ":"γ","ᵟ":"δ","ᵠ":"ϕ","ᵡ":"χ","ᶿ":"θ"}),Ul={"́":{text:"\\'",math:"\\acute"},"̀":{text:"\\`",math:"\\grave"},"̈":{text:'\\"',math:"\\ddot"},"̃":{text:"\\~",math:"\\tilde"},"̄":{text:"\\=",math:"\\bar"},"̆":{text:"\\u",math:"\\breve"},"̌":{text:"\\v",math:"\\check"},"̂":{text:"\\^",math:"\\hat"},"̇":{text:"\\.",math:"\\dot"},"̊":{text:"\\r",math:"\\mathring"},"̋":{text:"\\H"},"̧":{text:"\\c"}},ql={"á":"á","à":"à","ä":"ä","ǟ":"ǟ","ã":"ã","ā":"ā","ă":"ă","ắ":"ắ","ằ":"ằ","ẵ":"ẵ","ǎ":"ǎ","â":"â","ấ":"ấ","ầ":"ầ","ẫ":"ẫ","ȧ":"ȧ","ǡ":"ǡ","å":"å","ǻ":"ǻ","ḃ":"ḃ","ć":"ć","ḉ":"ḉ","č":"č","ĉ":"ĉ","ċ":"ċ","ç":"ç","ď":"ď","ḋ":"ḋ","ḑ":"ḑ","é":"é","è":"è","ë":"ë","ẽ":"ẽ","ē":"ē","ḗ":"ḗ","ḕ":"ḕ","ĕ":"ĕ","ḝ":"ḝ","ě":"ě","ê":"ê","ế":"ế","ề":"ề","ễ":"ễ","ė":"ė","ȩ":"ȩ","ḟ":"ḟ","ǵ":"ǵ","ḡ":"ḡ","ğ":"ğ","ǧ":"ǧ","ĝ":"ĝ","ġ":"ġ","ģ":"ģ","ḧ":"ḧ","ȟ":"ȟ","ĥ":"ĥ","ḣ":"ḣ","ḩ":"ḩ","í":"í","ì":"ì","ï":"ï","ḯ":"ḯ","ĩ":"ĩ","ī":"ī","ĭ":"ĭ","ǐ":"ǐ","î":"î","ǰ":"ǰ","ĵ":"ĵ","ḱ":"ḱ","ǩ":"ǩ","ķ":"ķ","ĺ":"ĺ","ľ":"ľ","ļ":"ļ","ḿ":"ḿ","ṁ":"ṁ","ń":"ń","ǹ":"ǹ","ñ":"ñ","ň":"ň","ṅ":"ṅ","ņ":"ņ","ó":"ó","ò":"ò","ö":"ö","ȫ":"ȫ","õ":"õ","ṍ":"ṍ","ṏ":"ṏ","ȭ":"ȭ","ō":"ō","ṓ":"ṓ","ṑ":"ṑ","ŏ":"ŏ","ǒ":"ǒ","ô":"ô","ố":"ố","ồ":"ồ","ỗ":"ỗ","ȯ":"ȯ","ȱ":"ȱ","ő":"ő","ṕ":"ṕ","ṗ":"ṗ","ŕ":"ŕ","ř":"ř","ṙ":"ṙ","ŗ":"ŗ","ś":"ś","ṥ":"ṥ","š":"š","ṧ":"ṧ","ŝ":"ŝ","ṡ":"ṡ","ş":"ş","ẗ":"ẗ","ť":"ť","ṫ":"ṫ","ţ":"ţ","ú":"ú","ù":"ù","ü":"ü","ǘ":"ǘ","ǜ":"ǜ","ǖ":"ǖ","ǚ":"ǚ","ũ":"ũ","ṹ":"ṹ","ū":"ū","ṻ":"ṻ","ŭ":"ŭ","ǔ":"ǔ","û":"û","ů":"ů","ű":"ű","ṽ":"ṽ","ẃ":"ẃ","ẁ":"ẁ","ẅ":"ẅ","ŵ":"ŵ","ẇ":"ẇ","ẘ":"ẘ","ẍ":"ẍ","ẋ":"ẋ","ý":"ý","ỳ":"ỳ","ÿ":"ÿ","ỹ":"ỹ","ȳ":"ȳ","ŷ":"ŷ","ẏ":"ẏ","ẙ":"ẙ","ź":"ź","ž":"ž","ẑ":"ẑ","ż":"ż","Á":"Á","À":"À","Ä":"Ä","Ǟ":"Ǟ","Ã":"Ã","Ā":"Ā","Ă":"Ă","Ắ":"Ắ","Ằ":"Ằ","Ẵ":"Ẵ","Ǎ":"Ǎ","Â":"Â","Ấ":"Ấ","Ầ":"Ầ","Ẫ":"Ẫ","Ȧ":"Ȧ","Ǡ":"Ǡ","Å":"Å","Ǻ":"Ǻ","Ḃ":"Ḃ","Ć":"Ć","Ḉ":"Ḉ","Č":"Č","Ĉ":"Ĉ","Ċ":"Ċ","Ç":"Ç","Ď":"Ď","Ḋ":"Ḋ","Ḑ":"Ḑ","É":"É","È":"È","Ë":"Ë","Ẽ":"Ẽ","Ē":"Ē","Ḗ":"Ḗ","Ḕ":"Ḕ","Ĕ":"Ĕ","Ḝ":"Ḝ","Ě":"Ě","Ê":"Ê","Ế":"Ế","Ề":"Ề","Ễ":"Ễ","Ė":"Ė","Ȩ":"Ȩ","Ḟ":"Ḟ","Ǵ":"Ǵ","Ḡ":"Ḡ","Ğ":"Ğ","Ǧ":"Ǧ","Ĝ":"Ĝ","Ġ":"Ġ","Ģ":"Ģ","Ḧ":"Ḧ","Ȟ":"Ȟ","Ĥ":"Ĥ","Ḣ":"Ḣ","Ḩ":"Ḩ","Í":"Í","Ì":"Ì","Ï":"Ï","Ḯ":"Ḯ","Ĩ":"Ĩ","Ī":"Ī","Ĭ":"Ĭ","Ǐ":"Ǐ","Î":"Î","İ":"İ","Ĵ":"Ĵ","Ḱ":"Ḱ","Ǩ":"Ǩ","Ķ":"Ķ","Ĺ":"Ĺ","Ľ":"Ľ","Ļ":"Ļ","Ḿ":"Ḿ","Ṁ":"Ṁ","Ń":"Ń","Ǹ":"Ǹ","Ñ":"Ñ","Ň":"Ň","Ṅ":"Ṅ","Ņ":"Ņ","Ó":"Ó","Ò":"Ò","Ö":"Ö","Ȫ":"Ȫ","Õ":"Õ","Ṍ":"Ṍ","Ṏ":"Ṏ","Ȭ":"Ȭ","Ō":"Ō","Ṓ":"Ṓ","Ṑ":"Ṑ","Ŏ":"Ŏ","Ǒ":"Ǒ","Ô":"Ô","Ố":"Ố","Ồ":"Ồ","Ỗ":"Ỗ","Ȯ":"Ȯ","Ȱ":"Ȱ","Ő":"Ő","Ṕ":"Ṕ","Ṗ":"Ṗ","Ŕ":"Ŕ","Ř":"Ř","Ṙ":"Ṙ","Ŗ":"Ŗ","Ś":"Ś","Ṥ":"Ṥ","Š":"Š","Ṧ":"Ṧ","Ŝ":"Ŝ","Ṡ":"Ṡ","Ş":"Ş","Ť":"Ť","Ṫ":"Ṫ","Ţ":"Ţ","Ú":"Ú","Ù":"Ù","Ü":"Ü","Ǘ":"Ǘ","Ǜ":"Ǜ","Ǖ":"Ǖ","Ǚ":"Ǚ","Ũ":"Ũ","Ṹ":"Ṹ","Ū":"Ū","Ṻ":"Ṻ","Ŭ":"Ŭ","Ǔ":"Ǔ","Û":"Û","Ů":"Ů","Ű":"Ű","Ṽ":"Ṽ","Ẃ":"Ẃ","Ẁ":"Ẁ","Ẅ":"Ẅ","Ŵ":"Ŵ","Ẇ":"Ẇ","Ẍ":"Ẍ","Ẋ":"Ẋ","Ý":"Ý","Ỳ":"Ỳ","Ÿ":"Ÿ","Ỹ":"Ỹ","Ȳ":"Ȳ","Ŷ":"Ŷ","Ẏ":"Ẏ","Ź":"Ź","Ž":"Ž","Ẑ":"Ẑ","Ż":"Ż","ά":"ά","ὰ":"ὰ","ᾱ":"ᾱ","ᾰ":"ᾰ","έ":"έ","ὲ":"ὲ","ή":"ή","ὴ":"ὴ","ί":"ί","ὶ":"ὶ","ϊ":"ϊ","ΐ":"ΐ","ῒ":"ῒ","ῑ":"ῑ","ῐ":"ῐ","ό":"ό","ὸ":"ὸ","ύ":"ύ","ὺ":"ὺ","ϋ":"ϋ","ΰ":"ΰ","ῢ":"ῢ","ῡ":"ῡ","ῠ":"ῠ","ώ":"ώ","ὼ":"ὼ","Ύ":"Ύ","Ὺ":"Ὺ","Ϋ":"Ϋ","Ῡ":"Ῡ","Ῠ":"Ῠ","Ώ":"Ώ","Ὼ":"Ὼ"},(jl=class a{static{mt(this,"Parser")}constructor(e,t){this.mode=void 0,this.gullet=void 0,this.settings=void 0,this.leftrightDepth=void 0,this.nextToken=void 0,this.mode="math",this.gullet=new Fl(e,t,this.mode),this.settings=t,this.leftrightDepth=0}expect(e,t){if(void 0===t&&(t=!0),this.fetch().text!==e)throw new X("Expected '"+e+"', got '"+this.fetch().text+"'",this.fetch());t&&this.consume()}consume(){this.nextToken=null}fetch(){return null==this.nextToken&&(this.nextToken=this.gullet.expandNextToken()),this.nextToken}switchMode(e){this.mode=e,this.gullet.switchMode(e)}parse(){this.settings.globalGroup||this.gullet.beginGroup(),this.settings.colorIsTextColor&&this.gullet.macros.set("\\color","\\textcolor");try{var e=this.parseExpression(!1);return this.expect("EOF"),this.settings.globalGroup||this.gullet.endGroup(),e}finally{this.gullet.endGroups()}}subparse(e){var t=this.nextToken,e=(this.consume(),this.gullet.pushToken(new zi("}")),this.gullet.pushTokens(e),this.parseExpression(!1));return this.expect("}"),this.nextToken=t,e}parseExpression(e,t){for(var r=[];;){"math"===this.mode&&this.consumeSpaces();var n=this.fetch();if(-1!==a.endOfExpression.indexOf(n.text)||t&&n.text===t||e&&Sl[n.text]&&Sl[n.text].infix)break;if(!(n=this.parseAtom(t)))break;"internal"!==n.type&&r.push(n)}return"text"===this.mode&&this.formLigatures(r),this.handleInfixNodes(r)}handleInfixNodes(e){for(var t,r,n,i=-1,a=0;a<e.length;a++)if("infix"===e[a].type){if(-1!==i)throw new X("only one infix operator per group",e[a].token);t=e[i=a].replaceWith}return-1!==i&&t?(r=e.slice(0,i),n=e.slice(i+1),r=1===r.length&&"ordgroup"===r[0].type?r[0]:{type:"ordgroup",mode:this.mode,body:r},n=1===n.length&&"ordgroup"===n[0].type?n[0]:{type:"ordgroup",mode:this.mode,body:n},["\\\\abovefrac"===t?this.callFunction(t,[r,e[i],n],[]):this.callFunction(t,[r,n],[])]):e}handleSupSubscript(e){var t=this.fetch(),r=t.text;this.consume(),this.consumeSpaces();do{var n=this.parseGroup(e)}while("internal"===(null==n?void 0:n.type));if(n)return n;throw new X("Expected group after '"+r+"'",t)}formatUnsupportedCmd(e){for(var t=[],r=0;r<e.length;r++)t.push({type:"textord",mode:"text",text:e[r]});var n={type:"text",mode:this.mode,body:t};return{type:"color",mode:this.mode,color:this.settings.errorColor,body:[n]}}parseAtom(e){var t,r,n=this.parseGroup("atom",e);if("internal"===n?.type||"text"===this.mode)return n;for(;;){this.consumeSpaces();var i=this.fetch();if("\\limits"===i.text||"\\nolimits"===i.text){if(n&&"op"===n.type){var a="\\limits"===i.text;n.limits=a,n.alwaysHandleSupSub=!0}else{if(!n||"operatorname"!==n.type)throw new X("Limit controls must follow a math operator",i);n.alwaysHandleSupSub&&(n.limits="\\limits"===i.text)}this.consume()}else if("^"===i.text){if(t)throw new X("Double superscript",i);t=this.handleSupSubscript("superscript")}else if("_"===i.text){if(r)throw new X("Double subscript",i);r=this.handleSupSubscript("subscript")}else if("'"===i.text){if(t)throw new X("Double superscript",i);var s={type:"textord",mode:this.mode,text:"\\prime"},o=[s];for(this.consume();"'"===this.fetch().text;)o.push(s),this.consume();"^"===this.fetch().text&&o.push(this.handleSupSubscript("superscript")),t={type:"ordgroup",mode:this.mode,body:o}}else{if(!Gl[i.text])break;var l=zl.test(i.text),c=[];for(c.push(new zi(Gl[i.text])),this.consume();;){var h=this.fetch().text;if(!Gl[h]||zl.test(h)!==l)break;c.unshift(new zi(Gl[h])),this.consume()}a=this.subparse(c),l?r={type:"ordgroup",mode:"math",body:a}:t={type:"ordgroup",mode:"math",body:a}}}return t||r?{type:"supsub",mode:this.mode,base:n,sup:t,sub:r}:n}parseFunction(e,t){var r=this.fetch(),n=r.text;if(!(i=Sl[n]))return null;if(this.consume(),t&&"atom"!==t&&!i.allowedInArgument)throw new X("Got function '"+n+"' with no arguments"+(t?" as "+t:""),r);if("text"===this.mode&&!i.allowedInText)throw new X("Can't use function '"+n+"' in text mode",r);if("math"===this.mode&&!1===i.allowedInMath)throw new X("Can't use function '"+n+"' in math mode",r);var{args:t,optArgs:i}=this.parseArguments(n,i);return this.callFunction(n,t,i,r,e)}callFunction(e,t,r,n,i){var a=Sl[e];if(a&&a.handler)return a.handler({funcName:e,parser:this,token:n,breakOnTokenText:i},t,r);throw new X("No function handler for "+e)}parseArguments(e,t){var r=t.numArgs+t.numOptionalArgs;if(0===r)return{args:[],optArgs:[]};for(var n=[],i=[],a=0;a<r;a++){var s=t.argTypes&&t.argTypes[a],o=a<t.numOptionalArgs,s=((t.primitive&&null==s||"sqrt"===t.type&&1===a&&null==i[0])&&(s="primitive"),this.parseGroupOfType("argument to '"+e+"'",s,o));if(o)i.push(s);else{if(null==s)throw new X("Null argument, please report this as a bug");n.push(s)}}return{args:n,optArgs:i}}parseGroupOfType(e,t,r){switch(t){case"color":return this.parseColorGroup(r);case"size":return this.parseSizeGroup(r);case"url":return this.parseUrlGroup(r);case"math":case"text":return this.parseArgumentGroup(r,t);case"hbox":var n=this.parseArgumentGroup(r,"text");return null!=n?{type:"styling",mode:n.mode,body:[n],style:"text"}:null;case"raw":return null!=(n=this.parseStringGroup("raw",r))?{type:"raw",mode:"text",string:n.text}:null;case"primitive":if(r)throw new X("A primitive argument cannot be optional");if(null==(n=this.parseGroup(e)))throw new X("Expected group as "+e,this.fetch());return n;case"original":case null:case void 0:return this.parseArgumentGroup(r);default:throw new X("Unknown group type as "+e,this.fetch())}}consumeSpaces(){for(;" "===this.fetch().text;)this.consume()}parseStringGroup(e,t){if(null==(t=this.gullet.scanArgument(t)))return null;for(var r,n="";"EOF"!==(r=this.fetch()).text;)n+=r.text,this.consume();return this.consume(),t.text=n,t}parseRegexGroup(e,t){for(var r,n=this.fetch(),i=n,a="";"EOF"!==(r=this.fetch()).text&&e.test(a+r.text);)a+=(i=r).text,this.consume();if(""===a)throw new X("Invalid "+t+": '"+n.text+"'",n);return n.range(i,a)}parseColorGroup(e){if(null==(e=this.parseStringGroup("color",e)))return null;var t=/^(#[a-f0-9]{3}|#?[a-f0-9]{6}|[a-z]+)$/i.exec(e.text);if(t)return t=t[0],/^[0-9a-f]{6}$/i.test(t)&&(t="#"+t),{type:"color-token",mode:this.mode,color:t};throw new X("Invalid color: '"+e.text+"'",e)}parseSizeGroup(e){var t,r=!1;if(this.gullet.consumeSpaces(),!(t=e||"{"===this.gullet.future().text?this.parseStringGroup("size",e):this.parseRegexGroup(/^[-+]? *(?:$|\d+|\d+\.\d*|\.\d*) *[a-z]{0,2} *$/,"size")))return null;if(e||0!==t.text.length||(t.text="0pt",r=!0),!(e=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(t.text)))throw new X("Invalid size: '"+t.text+"'",t);if(e={number:+(e[1]+e[2]),unit:e[3]},Sa(e))return{type:"size",mode:this.mode,value:e,isBlank:r};throw new X("Invalid unit: '"+e.unit+"'",t)}parseUrlGroup(e){return this.gullet.lexer.setCatcode("%",13),this.gullet.lexer.setCatcode("~",12),e=this.parseStringGroup("url",e),this.gullet.lexer.setCatcode("%",14),this.gullet.lexer.setCatcode("~",13),null==e?null:(e=e.text.replace(/\\([#$%&~_^{}])/g,"$1"),{type:"url",mode:this.mode,url:e})}parseArgumentGroup(e,t){var r,n;return null==(e=this.gullet.scanArgument(e))?null:(r=this.mode,t&&this.switchMode(t),this.gullet.beginGroup(),n=this.parseExpression(!1,"EOF"),this.expect("EOF"),this.gullet.endGroup(),e={type:"ordgroup",mode:this.mode,loc:e.loc,body:n},t&&this.switchMode(r),e)}parseGroup(e,t){var r=this.fetch(),n=r.text;if("{"===n||"\\begingroup"===n){this.consume();var i="{"===n?"}":"\\endgroup",a=(this.gullet.beginGroup(),this.parseExpression(!1,i)),s=this.fetch();this.expect(i),this.gullet.endGroup(),i={type:"ordgroup",mode:this.mode,loc:Fi.range(r,s),body:a,semisimple:"\\begingroup"===n||void 0}}else if(null==(i=this.parseFunction(t,e)||this.parseSymbol())&&"\\"===n[0]&&!$l.hasOwnProperty(n)){if(this.settings.throwOnError)throw new X("Undefined control sequence: "+n,r);i=this.formatUnsupportedCmd(n),this.consume()}return i}formLigatures(e){for(var t=e.length-1,r=0;r<t;++r){var n=e[r],i=n.text;"-"===i&&"-"===e[r+1].text&&(r+1<t&&"-"===e[r+2].text?(e.splice(r,3,{type:"textord",mode:"text",loc:Fi.range(n,e[r+2]),text:"---"}),t-=2):(e.splice(r,2,{type:"textord",mode:"text",loc:Fi.range(n,e[r+1]),text:"--"}),--t)),"'"!==i&&"`"!==i||e[r+1].text!==i||(e.splice(r,2,{type:"textord",mode:"text",loc:Fi.range(n,e[r+1]),text:i+i}),--t)}}parseSymbol(){var e=this.fetch(),t=e.text;if(/^\\verb[^a-zA-Z]/.test(t)){if(this.consume(),(n=(i="*"===(n=t.slice(5)).charAt(0))?n.slice(1):n).length<2||n.charAt(0)!==n.slice(-1))throw new X(`\\verb assertion failed -- + please report what input caused this bug`);return{type:"verb",mode:"text",body:n=n.slice(1,-1),star:i}}ql.hasOwnProperty(t[0])&&!ja[this.mode][t[0]]&&(this.settings.strict&&"math"===this.mode&&this.settings.reportNonstrict("unicodeTextInMathMode",'Accented Unicode text character "'+t[0]+'" used in math mode',e),t=ql[t[0]]+t.slice(1));var r=Al.exec(t);if(r&&("i"===(t=t.substring(0,r.index))?t="ı":"j"===t&&(t="ȷ")),ja[this.mode][t]){this.settings.strict&&"math"===this.mode&&0<=os.indexOf(t)&&this.settings.reportNonstrict("unicodeTextInMathMode",'Latin-1/Unicode text character "'+t[0]+'" used in math mode',e);var n=ja[this.mode][t].group,i=Fi.range(e),a=Ua.hasOwnProperty(n)?{type:"atom",mode:this.mode,family:n,loc:i,text:t}:{type:n,mode:this.mode,loc:i,text:t}}else{if(!(128<=t.charCodeAt(0)))return null;this.settings.strict&&(di(t.charCodeAt(0))?"math"===this.mode&&this.settings.reportNonstrict("unicodeTextInMathMode",'Unicode text character "'+t[0]+'" used in math mode',e):this.settings.reportNonstrict("unknownSymbol",'Unrecognized Unicode character "'+t[0]+'" ('+t.charCodeAt(0)+")",e)),a={type:"textord",mode:"text",loc:Fi.range(e),text:t}}if(this.consume(),r)for(var s=0;s<r[0].length;s++){var o=r[0][s];if(!Ul[o])throw new X("Unknown accent ' "+o+"'",e);var l=Ul[o][this.mode]||Ul[o].text;if(!l)throw new X("Accent "+o+" unsupported in "+this.mode+" mode",e);a={type:"accent",mode:this.mode,loc:Fi.range(e),label:l,isStretchy:!1,isShifty:!0,base:a}}return a}}).endOfExpression=["}","\\endgroup","\\end","\\right","&"],Yl=mt(function(e,t){if(!("string"==typeof e||e instanceof String))throw new TypeError("KaTeX can only parse string typed expression");delete(e=new jl(e,t)).gullet.macros.current["\\df@tag"];var r=e.parse();if(delete e.gullet.macros.current["\\current@color"],delete e.gullet.macros.current["\\color"],e.gullet.macros.get("\\df@tag")){if(!t.displayMode)throw new X("\\tag works only in display equations");r=[{type:"tag",mode:"text",body:r,tag:e.subparse([new zi("\\df@tag")])}]}return r},"parseTree"),Wl=mt(function(e,t,r){t.textContent="",e=Kl(e,r).toNode(),t.appendChild(e)},"render"),typeof document<"u"&&"CSS1Compat"!==document.compatMode&&(typeof console<"u"&&console.warn("Warning: KaTeX doesn't work in quirks mode. Make sure your website has a suitable doctype."),Wl=mt(function(){throw new X("KaTeX doesn't work in quirks mode.")},"render")),Hl=mt(function(e,t){return Kl(e,t).toMarkup()},"renderToString"),Vl=mt(function(e,t){return t=new Vi(t),Yl(e,t)},"generateParseTree"),Xl=mt(function(e,t,r){if(!r.throwOnError&&e instanceof X)return(t=Z.makeSpan(["katex-error"],[new $a(t)])).setAttribute("title",e.toString()),t.setAttribute("style","color:"+r.errorColor),t;throw e},"renderError"),Kl=mt(function(e,t){t=new Vi(t);try{var r=Yl(e,t);return eo(r,e,t)}catch(r){return Xl(r,e,t)}},"renderToDomTree"),Zl=mt(function(e,t){t=new Vi(t);try{var r=Yl(e,t);return to(r,e,t)}catch(r){return Xl(r,e,t)}},"renderToHTMLTree"),ec={version:Ql="0.16.22",render:Wl,renderToString:Hl,ParseError:X,SETTINGS_SCHEMA:Hi,__parse:Vl,__renderToDomTree:Kl,__renderToHTMLTree:Zl,__setFontMetrics:pi,__defineSymbol:t,__defineFunction:o,__defineMacro:l,__domTree:Jl={Span:Da,Anchor:Oa,SymbolNode:$a,SvgNode:Fa,PathNode:za,LineNode:Ga}}});function rc(){let t="data-temp-href-target";si.addHook("beforeSanitizeAttributes",e=>{"A"===e.tagName&&e.hasAttribute("target")&&e.setAttribute(t,e.getAttribute("target")??"")}),si.addHook("afterSanitizeAttributes",e=>{"A"===e.tagName&&e.hasAttribute(t)&&(e.setAttribute("target",e.getAttribute(t)??""),e.removeAttribute(t),"_blank"===e.getAttribute("target"))&&e.setAttribute("rel","noopener")})}var nc,ic,ac,sc,oc,lc,cc,hc,uc,dc,pc,gc,fc,mc,yc,vc,xc,bc,wc,kc,Tc,Ec,Cc,_c,Sc,L,Ac,Lc,Nc,Ic,Rc,Mc,Dc,Oc=b(()=>{oi(),nc=/<br\s*\/?>/gi,ic=mt(e=>e?pc(e).replace(/\\n/g,"#br#").split("#br#"):[""],"getRows"),ac=(()=>{let e=!1;return()=>{e||(rc(),e=!0)}})(),mt(rc,"setupDompurifyHooks"),sc=mt(e=>(ac(),si.sanitize(e)),"removeScript"),oc=mt((e,t)=>(!1!==t.flowchart?.htmlLabels&&("antiscript"===(t=t.securityLevel)||"strict"===t?e=sc(e):"loose"!==t&&(e=(e=(e=pc(e)).replace(/</g,"<").replace(/>/g,">")).replace(/=/g,"="),e=dc(e))),e),"sanitizeMore"),lc=mt((e,t)=>e&&(t.dompurifyConfig?si.sanitize(oc(e,t),t.dompurifyConfig):si.sanitize(oc(e,t),{FORBID_TAGS:["style"]})).toString(),"sanitizeText"),cc=mt((e,t)=>"string"==typeof e?lc(e,t):e.flat().map(e=>lc(e,t)),"sanitizeTextOrArray"),hc=mt(e=>nc.test(e),"hasBreaks"),uc=mt(e=>e.split(nc),"splitBreaks"),dc=mt(e=>e.replace(/#br#/g,"<br/>"),"placeholderToBreak"),pc=mt(e=>e.replace(nc,"#br#"),"breakToPlaceholder"),gc=mt(e=>{let t="";return e&&(t=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,t=CSS.escape(t)),t},"getUrl"),fc=mt(e=>!(!1===e||["false","null","0"].includes(String(e).trim().toLowerCase())),"evaluate"),mc=mt(function(...e){return e=e.filter(e=>!isNaN(e)),Math.max(...e)},"getMax"),yc=mt(function(...e){return e=e.filter(e=>!isNaN(e)),Math.min(...e)},"getMin"),vc=mt(function(e){var r,n,i=e.split(/(,)/),a=[];for(let t=0;t<i.length;t++){let e=i[t];","===e&&0<t&&t+1<i.length&&(r=i[t-1],n=i[t+1],bc(r,n))&&(e=r+","+n,t++,a.pop()),a.push(wc(e))}return a.join("")},"parseGenericTypes"),xc=mt((e,t)=>Math.max(0,e.split(t).length-1),"countOccurrence"),bc=mt((e,t)=>(e=xc(e,"~"),t=xc(t,"~"),1===e&&1===t),"shouldCombineSets"),wc=mt(e=>{let t=xc(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("~"),a=n.lastIndexOf("~");for(;-1!==i&&-1!==a&&i!==a;)n[i]="<",n[a]=">",i=n.indexOf("~"),a=n.lastIndexOf("~");return r&&n.unshift("~"),n.join("")},"processSet"),kc=mt(()=>void 0!==window.MathMLElement,"isMathMLSupported"),Tc=/\$\$(.*)\$\$/g,Ec=mt(e=>0<(e.match(Tc)?.length??0),"hasKatex"),Cc=mt(async(e,t)=>{var r=document.createElement("div"),e=(r.innerHTML=await Sc(e,t),r.id="katex-temp",r.style.visibility="hidden",r.style.position="absolute",r.style.top="0",document.querySelector("body")?.insertAdjacentElement("beforeend",r),{width:r.clientWidth,height:r.clientHeight});return r.remove(),e},"calculateMathMLDimensions"),_c=mt(async(e,t)=>{if(!Ec(e))return e;if(!(kc()||t.legacyMathML||t.forceLegacyMathML))return e.replace(Tc,"MathML is unsupported in this environment.");{let r=(await Promise.resolve().then(()=>(tc(),li))).default,n=t.forceLegacyMathML||!kc()&&t.legacyMathML?"htmlAndMathml":"mathml";return e.split(nc).map(e=>Ec(e)?`<div style="display: flex; align-items: center; justify-content: center; white-space: nowrap;">${e}</div>`:`<div>${e}</div>`).join("").replace(Tc,(e,t)=>r.renderToString(t,{throwOnError:!0,displayMode:!0,output:n}).replace(/\n/g," ").replace(/<annotation.*<\/annotation>/g,""))}},"renderKatexUnsanitized"),Sc=mt(async(e,t)=>lc(await _c(e,t),t),"renderKatexSanitized"),L={getRows:ic,sanitizeText:lc,sanitizeTextOrArray:cc,hasBreaks:hc,splitBreaks:uc,lineBreakRegex:nc,removeScript:sc,getUrl:gc,evaluate:fc,getMax:mc,getMin:yc}}),Pc=b(()=>{fr(),rn(),Oc(),e(),Ac={body:'<g><rect width="80" height="80" style="fill: #087ebf; stroke-width: 0px;"/><text transform="translate(21.16 64.67)" style="fill: #fff; font-family: ArialMT, Arial; font-size: 67.75px;"><tspan x="0" y="0">?</tspan></text></g>',height:80,width:80},Lc=new Map,Nc=new Map,Ic=mt(e=>{for(var t of e){if(!t.name)throw new Error('Invalid icon loader. Must have a "name" property with non-empty string value.');if(D.debug("Registering icon pack:",t.name),"loader"in t)Nc.set(t.name,t.loader);else{if(!("icons"in t))throw D.error("Invalid icon loader:",t),new Error('Invalid icon loader. Must have either "icons" or "loader" property.');Lc.set(t.name,t.icons)}}},"registerIconPacks"),Rc=mt(async(e,t)=>{var r=A(e,!0,void 0!==t);if(!r)throw new Error("Invalid icon name: "+e);if(!(t=r.prefix||t))throw new Error("Icon name must contain a prefix: "+e);let n=Lc.get(t);if(!n){var i=Nc.get(t);if(!i)throw new Error("Icon set not found: "+r.prefix);try{n={...await i(),prefix:t},Lc.set(t,n)}catch(e){throw D.error(e),new Error("Failed to load icon set: "+r.prefix)}}if(i=oe(n,r.name))return i;throw new Error("Icon not found: "+e)},"getRegisteredIconData"),Mc=mt(async e=>{try{return await Rc(e),!0}catch{return!1}},"isIconAvailable"),Dc=mt(async(e,t,r)=>{let n;try{n=await Rc(e,t?.fallbackPrefix)}catch(e){D.error(e),n=Ac}return t=_e(we((e=ve(n,t)).body),{...e.attributes,...r}),lc(t,ar())},"getIconSVG")});function Bc(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];var n,i=Array.from("string"==typeof e?[e]:e),e=(i[i.length-1]=i[i.length-1].replace(/\r?\n([\t ]*)$/,""),i.reduce(function(e,t){return(t=t.match(/\n([\t ]+|(?!\s).)/g))?e.concat(t.map(function(e){return null!=(e=null==(e=e.match(/[\t ]/g))?void 0:e.length)?e:0})):e},[])),a=(e.length&&(n=new RegExp(` +[ ]{`+Math.min.apply(Math,e)+"}","g"),i=i.map(function(e){return e.replace(n,` +`)})),i[0]=i[0].replace(/^\r?\n/,""),i[0]);return t.forEach(function(e,t){var r=(n=a.match(/(?:^|\n)( *)$/))?n[1]:"",n=e;"string"==typeof e&&e.includes(` +`)&&(n=String(e).split(` +`).map(function(e,t){return 0===t?e:""+r+e}).join(` +`)),a+=n+i[t+1]}),a}var $c,Fc,zc,Gc,Uc,qc,jc,Yc,Wc,Hc,Vc,Xc,Kc,Zc,Qc,Jc,eh,th,rh,nh=b(()=>{mt(Bc,"dedent")}),ih=b(()=>{$c=/^-{3}\s*[\n\r](.*?)[\n\r]-{3}\s*[\n\r]+/s,Fc=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,zc=/\s*%%.*\n/gm}),ah=b(()=>{Gc=class extends Error{static{mt(this,"UnknownDiagramError")}constructor(e){super(e),this.name="UnknownDiagramError"}}}),sh=b(()=>{e(),ih(),ah(),Uc={},qc=mt(function(e,t){e=e.replace($c,"").replace(Fc,"").replace(zc,` +`);for(var[r,{detector:n}]of Object.entries(Uc))if(n(e,t))return r;throw new Gc("No diagram type detected matching given configuration for text: "+e)},"detectType"),jc=mt((...e)=>{for(var{id:t,detector:r,loader:n}of e)Yc(t,r,n)},"registerLazyLoadedDiagrams"),Yc=mt((e,t,r)=>{Uc[e]&&D.warn(`Detector with key ${e} already exists. Overwriting.`),Uc[e]={detector:t,loader:r},D.debug(`Detector with key ${e} added`+(r?" with loader":""))},"addDetector"),Wc=mt(e=>Uc[e].loader,"getDiagramLoader")}),oh=b(()=>{function B(){this.yy={}}var e=mt(function(e,t,r,n){for(r=r||{},n=e.length;n--;r[e[n]]=t);return r},"o"),t=[1,24],r=[1,25],$=[1,26],F=[1,27],z=[1,28],n=[1,63],i=[1,64],a=[1,65],s=[1,66],o=[1,67],l=[1,68],h=[1,69],u=[1,29],d=[1,30],p=[1,31],g=[1,32],f=[1,33],m=[1,34],y=[1,35],v=[1,36],x=[1,37],b=[1,38],w=[1,39],k=[1,40],T=[1,41],E=[1,42],C=[1,43],_=[1,44],S=[1,45],A=[1,46],L=[1,47],N=[1,48],I=[1,50],G=[1,51],U=[1,52],q=[1,53],j=[1,54],Y=[1,55],W=[1,56],H=[1,57],V=[1,58],X=[1,59],K=[1,60],Z=[14,42],Q=[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],J=[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],R=[1,82],M=[1,83],D=[1,84],O=[1,85],P=[12,14,42],ee=[12,14,33,42],te=[12,14,33,42,76,77,79,80],re=[12,33],ne=[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],t={trace:mt(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:mt(function(e,t,r,n,i,a,s){var o=a.length-1;switch(i){case 3:n.setDirection("TB");break;case 4:n.setDirection("BT");break;case 5:n.setDirection("RL");break;case 6:n.setDirection("LR");break;case 8:case 9:case 10:case 11:case 12:n.setC4Type(a[o-3]);break;case 19:n.setTitle(a[o].substring(6)),this.$=a[o].substring(6);break;case 20:n.setAccDescription(a[o].substring(15)),this.$=a[o].substring(15);break;case 21:this.$=a[o].trim(),n.setTitle(this.$);break;case 22:case 23:this.$=a[o].trim(),n.setAccDescription(this.$);break;case 28:a[o].splice(2,0,"ENTERPRISE"),n.addPersonOrSystemBoundary(...a[o]),this.$=a[o];break;case 29:a[o].splice(2,0,"SYSTEM"),n.addPersonOrSystemBoundary(...a[o]),this.$=a[o];break;case 30:n.addPersonOrSystemBoundary(...a[o]),this.$=a[o];break;case 31:a[o].splice(2,0,"CONTAINER"),n.addContainerBoundary(...a[o]),this.$=a[o];break;case 32:n.addDeploymentNode("node",...a[o]),this.$=a[o];break;case 33:n.addDeploymentNode("nodeL",...a[o]),this.$=a[o];break;case 34:n.addDeploymentNode("nodeR",...a[o]),this.$=a[o];break;case 35:n.popBoundaryParseStack();break;case 39:n.addPersonOrSystem("person",...a[o]),this.$=a[o];break;case 40:n.addPersonOrSystem("external_person",...a[o]),this.$=a[o];break;case 41:n.addPersonOrSystem("system",...a[o]),this.$=a[o];break;case 42:n.addPersonOrSystem("system_db",...a[o]),this.$=a[o];break;case 43:n.addPersonOrSystem("system_queue",...a[o]),this.$=a[o];break;case 44:n.addPersonOrSystem("external_system",...a[o]),this.$=a[o];break;case 45:n.addPersonOrSystem("external_system_db",...a[o]),this.$=a[o];break;case 46:n.addPersonOrSystem("external_system_queue",...a[o]),this.$=a[o];break;case 47:n.addContainer("container",...a[o]),this.$=a[o];break;case 48:n.addContainer("container_db",...a[o]),this.$=a[o];break;case 49:n.addContainer("container_queue",...a[o]),this.$=a[o];break;case 50:n.addContainer("external_container",...a[o]),this.$=a[o];break;case 51:n.addContainer("external_container_db",...a[o]),this.$=a[o];break;case 52:n.addContainer("external_container_queue",...a[o]),this.$=a[o];break;case 53:n.addComponent("component",...a[o]),this.$=a[o];break;case 54:n.addComponent("component_db",...a[o]),this.$=a[o];break;case 55:n.addComponent("component_queue",...a[o]),this.$=a[o];break;case 56:n.addComponent("external_component",...a[o]),this.$=a[o];break;case 57:n.addComponent("external_component_db",...a[o]),this.$=a[o];break;case 58:n.addComponent("external_component_queue",...a[o]),this.$=a[o];break;case 60:n.addRel("rel",...a[o]),this.$=a[o];break;case 61:n.addRel("birel",...a[o]),this.$=a[o];break;case 62:n.addRel("rel_u",...a[o]),this.$=a[o];break;case 63:n.addRel("rel_d",...a[o]),this.$=a[o];break;case 64:n.addRel("rel_l",...a[o]),this.$=a[o];break;case 65:n.addRel("rel_r",...a[o]),this.$=a[o];break;case 66:n.addRel("rel_b",...a[o]),this.$=a[o];break;case 67:a[o].splice(0,1),n.addRel("rel",...a[o]),this.$=a[o];break;case 68:n.updateElStyle("update_el_style",...a[o]),this.$=a[o];break;case 69:n.updateRelStyle("update_rel_style",...a[o]),this.$=a[o];break;case 70:n.updateLayoutConfig("update_layout_config",...a[o]),this.$=a[o];break;case 71:this.$=[a[o]];break;case 72:a[o].unshift(a[o-1]),this.$=a[o];break;case 73:case 75:this.$=a[o].trim();break;case 74:var l={};l[a[o-1].trim()]=a[o].trim(),this.$=l;break;case 76:this.$=""}},"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:$,26:F,28:z,29:49,30:61,32:62,34:n,36:i,37:a,38:s,39:o,40:l,41:h,43:23,44:u,45:d,46:p,47:g,48:f,49:m,50:y,51:v,52:x,53:b,54:w,55:k,56:T,57:E,58:C,59:_,60:S,61:A,62:L,63:N,64:I,65:G,66:U,67:q,68:j,69:Y,70:W,71:H,72:V,73:X,74:K},{13:70,19:20,20:21,21:22,22:t,23:r,24:$,26:F,28:z,29:49,30:61,32:62,34:n,36:i,37:a,38:s,39:o,40:l,41:h,43:23,44:u,45:d,46:p,47:g,48:f,49:m,50:y,51:v,52:x,53:b,54:w,55:k,56:T,57:E,58:C,59:_,60:S,61:A,62:L,63:N,64:I,65:G,66:U,67:q,68:j,69:Y,70:W,71:H,72:V,73:X,74:K},{13:71,19:20,20:21,21:22,22:t,23:r,24:$,26:F,28:z,29:49,30:61,32:62,34:n,36:i,37:a,38:s,39:o,40:l,41:h,43:23,44:u,45:d,46:p,47:g,48:f,49:m,50:y,51:v,52:x,53:b,54:w,55:k,56:T,57:E,58:C,59:_,60:S,61:A,62:L,63:N,64:I,65:G,66:U,67:q,68:j,69:Y,70:W,71:H,72:V,73:X,74:K},{13:72,19:20,20:21,21:22,22:t,23:r,24:$,26:F,28:z,29:49,30:61,32:62,34:n,36:i,37:a,38:s,39:o,40:l,41:h,43:23,44:u,45:d,46:p,47:g,48:f,49:m,50:y,51:v,52:x,53:b,54:w,55:k,56:T,57:E,58:C,59:_,60:S,61:A,62:L,63:N,64:I,65:G,66:U,67:q,68:j,69:Y,70:W,71:H,72:V,73:X,74:K},{13:73,19:20,20:21,21:22,22:t,23:r,24:$,26:F,28:z,29:49,30:61,32:62,34:n,36:i,37:a,38:s,39:o,40:l,41:h,43:23,44:u,45:d,46:p,47:g,48:f,49:m,50:y,51:v,52:x,53:b,54:w,55:k,56:T,57:E,58:C,59:_,60:S,61:A,62:L,63:N,64:I,65:G,66:U,67:q,68:j,69:Y,70:W,71:H,72:V,73:X,74:K},{14:[1,74]},e(Z,[2,13],{43:23,29:49,30:61,32:62,20:75,34:n,36:i,37:a,38:s,39:o,40:l,41:h,44:u,45:d,46:p,47:g,48:f,49:m,50:y,51:v,52:x,53:b,54:w,55:k,56:T,57:E,58:C,59:_,60:S,61:A,62:L,63:N,64:I,65:G,66:U,67:q,68:j,69:Y,70:W,71:H,72:V,73:X,74:K}),e(Z,[2,14]),e(Q,[2,16],{12:[1,76]}),e(Z,[2,36],{12:[1,77]}),e(J,[2,19]),e(J,[2,20]),{25:[1,78]},{27:[1,79]},e(J,[2,23]),{35:80,75:81,76:R,77:M,79:D,80:O},{35:86,75:81,76:R,77:M,79:D,80:O},{35:87,75:81,76:R,77:M,79:D,80:O},{35:88,75:81,76:R,77:M,79:D,80:O},{35:89,75:81,76:R,77:M,79:D,80:O},{35:90,75:81,76:R,77:M,79:D,80:O},{35:91,75:81,76:R,77:M,79:D,80:O},{35:92,75:81,76:R,77:M,79:D,80:O},{35:93,75:81,76:R,77:M,79:D,80:O},{35:94,75:81,76:R,77:M,79:D,80:O},{35:95,75:81,76:R,77:M,79:D,80:O},{35:96,75:81,76:R,77:M,79:D,80:O},{35:97,75:81,76:R,77:M,79:D,80:O},{35:98,75:81,76:R,77:M,79:D,80:O},{35:99,75:81,76:R,77:M,79:D,80:O},{35:100,75:81,76:R,77:M,79:D,80:O},{35:101,75:81,76:R,77:M,79:D,80:O},{35:102,75:81,76:R,77:M,79:D,80:O},{35:103,75:81,76:R,77:M,79:D,80:O},{35:104,75:81,76:R,77:M,79:D,80:O},e(P,[2,59]),{35:105,75:81,76:R,77:M,79:D,80:O},{35:106,75:81,76:R,77:M,79:D,80:O},{35:107,75:81,76:R,77:M,79:D,80:O},{35:108,75:81,76:R,77:M,79:D,80:O},{35:109,75:81,76:R,77:M,79:D,80:O},{35:110,75:81,76:R,77:M,79:D,80:O},{35:111,75:81,76:R,77:M,79:D,80:O},{35:112,75:81,76:R,77:M,79:D,80:O},{35:113,75:81,76:R,77:M,79:D,80:O},{35:114,75:81,76:R,77:M,79:D,80:O},{35:115,75:81,76:R,77:M,79:D,80:O},{20:116,29:49,30:61,32:62,34:n,36:i,37:a,38:s,39:o,40:l,41:h,43:23,44:u,45:d,46:p,47:g,48:f,49:m,50:y,51:v,52:x,53:b,54:w,55:k,56:T,57:E,58:C,59:_,60:S,61:A,62:L,63:N,64:I,65:G,66:U,67:q,68:j,69:Y,70:W,71:H,72:V,73:X,74:K},{12:[1,118],33:[1,117]},{35:119,75:81,76:R,77:M,79:D,80:O},{35:120,75:81,76:R,77:M,79:D,80:O},{35:121,75:81,76:R,77:M,79:D,80:O},{35:122,75:81,76:R,77:M,79:D,80:O},{35:123,75:81,76:R,77:M,79:D,80:O},{35:124,75:81,76:R,77:M,79:D,80:O},{35:125,75:81,76:R,77:M,79:D,80:O},{14:[1,126]},{14:[1,127]},{14:[1,128]},{14:[1,129]},{1:[2,8]},e(Z,[2,15]),e(Q,[2,17],{21:22,19:130,22:t,23:r,24:$,26:F,28:z}),e(Z,[2,37],{19:20,20:21,21:22,43:23,29:49,30:61,32:62,13:131,22:t,23:r,24:$,26:F,28:z,34:n,36:i,37:a,38:s,39:o,40:l,41:h,44:u,45:d,46:p,47:g,48:f,49:m,50:y,51:v,52:x,53:b,54:w,55:k,56:T,57:E,58:C,59:_,60:S,61:A,62:L,63:N,64:I,65:G,66:U,67:q,68:j,69:Y,70:W,71:H,72:V,73:X,74:K}),e(J,[2,21]),e(J,[2,22]),e(P,[2,39]),e(ee,[2,71],{75:81,35:132,76:R,77:M,79:D,80:O}),e(te,[2,73]),{78:[1,133]},e(te,[2,75]),e(te,[2,76]),e(P,[2,40]),e(P,[2,41]),e(P,[2,42]),e(P,[2,43]),e(P,[2,44]),e(P,[2,45]),e(P,[2,46]),e(P,[2,47]),e(P,[2,48]),e(P,[2,49]),e(P,[2,50]),e(P,[2,51]),e(P,[2,52]),e(P,[2,53]),e(P,[2,54]),e(P,[2,55]),e(P,[2,56]),e(P,[2,57]),e(P,[2,58]),e(P,[2,60]),e(P,[2,61]),e(P,[2,62]),e(P,[2,63]),e(P,[2,64]),e(P,[2,65]),e(P,[2,66]),e(P,[2,67]),e(P,[2,68]),e(P,[2,69]),e(P,[2,70]),{31:134,42:[1,135]},{12:[1,136]},{33:[1,137]},e(re,[2,28]),e(re,[2,29]),e(re,[2,30]),e(re,[2,31]),e(re,[2,32]),e(re,[2,33]),e(re,[2,34]),{1:[2,9]},{1:[2,10]},{1:[2,11]},{1:[2,12]},e(Q,[2,18]),e(Z,[2,38]),e(ee,[2,72]),e(te,[2,74]),e(P,[2,24]),e(P,[2,35]),e(ne,[2,25]),e(ne,[2,26],{12:[1,138]}),e(ne,[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:mt(function(e,t){var r;if(!t.recoverable)throw(r=new Error(e)).hash=t,r;this.trace(e)},"parseError"),parse:mt(function(e){var t,r=this,n=[0],i=[],a=[null],s=[],o=this.table,l="",c=0,h=0,u=0,d=1,p=s.slice.call(arguments,1),g=Object.create(this.lexer),f={yy:{}};for(t in this.yy)Object.prototype.hasOwnProperty.call(this.yy,t)&&(f.yy[t]=this.yy[t]);g.setInput(e,f.yy),f.yy.lexer=g,f.yy.parser=this,"u"<typeof g.yylloc&&(g.yylloc={});var m=g.yylloc,y=(s.push(m),g.options&&g.options.ranges);function v(){var e=i.pop()||g.lex()||d;return"number"!=typeof e&&(e instanceof Array&&(e=(i=e).pop()),e=r.symbols_[e]||e),e}"function"==typeof f.yy.parseError?this.parseError=f.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,mt(function(e){n.length=n.length-2*e,a.length=a.length-e,s.length=s.length-e},"popStack"),mt(v,"lex");for(var x,b,w,k,T,E,C,_={};;){if(w=n[n.length-1],"u"<typeof(k=this.defaultActions[w]||((null===x||"u"<typeof x)&&(x=v()),o[w]&&o[w][x]))||!k.length||!k[0]){var S,A=[];for(T in o[w])this.terminals_[T]&&2<T&&A.push("'"+this.terminals_[T]+"'");S=g.showPosition?"Parse error on line "+(c+1)+`: +`+g.showPosition()+` +Expecting `+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(c+1)+": Unexpected "+(x==d?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(S,{text:g.match,token:this.terminals_[x]||x,line:g.yylineno,loc:m,expected:A})}if(k[0]instanceof Array&&1<k.length)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+x);switch(k[0]){case 1:n.push(x),a.push(g.yytext),s.push(g.yylloc),n.push(k[1]),x=null,b?(x=b,b=null):(h=g.yyleng,l=g.yytext,c=g.yylineno,m=g.yylloc,0<u&&u--);break;case 2:if(E=this.productions_[k[1]][1],_.$=a[a.length-E],_._$={first_line:s[s.length-(E||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(E||1)].first_column,last_column:s[s.length-1].last_column},y&&(_._$.range=[s[s.length-(E||1)].range[0],s[s.length-1].range[1]]),typeof(C=this.performAction.apply(_,[l,h,c,f.yy,k[1],a,s].concat(p)))<"u")return C;E&&(n=n.slice(0,-1*E*2),a=a.slice(0,-1*E),s=s.slice(0,-1*E)),n.push(this.productions_[k[1]][0]),a.push(_.$),s.push(_._$),C=o[n[n.length-2]][n[n.length-1]],n.push(C);break;case 3:return!0}}return!0},"parse")},r={EOF:1,parseError:mt(function(e,t){if(!this.yy.parser)throw new Error(e);this.yy.parser.parseError(e,t)},"parseError"),setInput:mt(function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:mt(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},"input"),unput:mt(function(e){var t=e.length,r=e.split(/(?:\r\n?|\n)/g),e=(this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t,this.match.split(/(?:\r\n?|\n)/g)),n=(this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),r.length-1&&(this.yylineno-=r.length-1),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:r?(r.length===e.length?this.yylloc.first_column:0)+e[e.length-r.length].length-r[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[n[0],n[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},"unput"),more:mt(function(){return this._more=!0,this},"more"),reject:mt(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):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})},"reject"),less:mt(function(e){this.unput(this.match.slice(e))},"less"),pastInput:mt(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(20<e.length?"...":"")+e.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:mt(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(20<e.length?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:mt(function(){var e=this.pastInput(),t=new Array(e.length+1).join("-");return e+this.upcomingInput()+` +`+t+"^"},"showPosition"),test_match:mt(function(e,t){var r,n;if(this.options.backtrack_lexer&&(n={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges)&&(n.yylloc.range=this.yylloc.range.slice(0)),(r=e[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],r=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack)for(var i in n)this[i]=n[i];return!1},"test_match"),next:mt(function(){if(this.done)return this.EOF;var e,t,r,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((r=this._input.match(this.rules[i[a]]))&&(!t||r[0].length>t[0].length)){if(t=r,n=a,this.options.backtrack_lexer){if(!1!==(e=this.test_match(r,i[a])))return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?!1!==(e=this.test_match(t,i[n]))&&e:""===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:mt(function(){return this.next()||this.lex()},"lex"),begin:mt(function(e){this.conditionStack.push(e)},"begin"),popState:mt(function(){return 0<this.conditionStack.length-1?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:mt(function(){return(this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]]:this.conditions.INITIAL).rules},"_currentRules"),topState:mt(function(e){return 0<=(e=this.conditionStack.length-1-Math.abs(e||0))?this.conditionStack[e]:"INITIAL"},"topState"),pushState:mt(function(e){this.begin(e)},"pushState"),stateStackSize:mt(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:mt(function(e,t,r,n){switch(r){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;case 7:return this.popState(),"acc_title_value";case 8:return this.begin("acc_descr"),26;case 9:return this.popState(),"acc_descr_value";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;case 23:return this.begin("person"),44;case 24:return this.begin("system_ext_queue"),51;case 25:return this.begin("system_ext_db"),50;case 26:return this.begin("system_ext"),49;case 27:return this.begin("system_queue"),48;case 28:return this.begin("system_db"),47;case 29:return this.begin("system"),46;case 30:return this.begin("boundary"),37;case 31:return this.begin("enterprise_boundary"),34;case 32:return this.begin("system_boundary"),36;case 33:return this.begin("container_ext_queue"),57;case 34:return this.begin("container_ext_db"),56;case 35:return this.begin("container_ext"),55;case 36:return this.begin("container_queue"),54;case 37:return this.begin("container_db"),53;case 38:return this.begin("container"),52;case 39:return this.begin("container_boundary"),38;case 40:return this.begin("component_ext_queue"),63;case 41:return this.begin("component_ext_db"),62;case 42:return this.begin("component_ext"),61;case 43:return this.begin("component_queue"),60;case 44:return this.begin("component_db"),59;case 45:return this.begin("component"),58;case 46:case 47:return this.begin("node"),39;case 48:return this.begin("node_l"),40;case 49:return this.begin("node_r"),41;case 50:return this.begin("rel"),64;case 51:return this.begin("birel"),65;case 52:case 53:return this.begin("rel_u"),66;case 54:case 55:return this.begin("rel_d"),67;case 56:case 57:return this.begin("rel_l"),68;case 58:case 59:return this.begin("rel_r"),69;case 60:return this.begin("rel_b"),70;case 61:return this.begin("rel_index"),71;case 62:return this.begin("update_el_style"),72;case 63:return this.begin("update_rel_style"),73;case 64:return this.begin("update_layout_config"),74;case 65:return"EOF_IN_STRUCT";case 66:return this.begin("attribute"),"ATTRIBUTE_EMPTY";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";case 77:this.popState(),this.begin("string_kv_value");break;case 78:return"STR_VALUE";case 79:this.popState(),this.popState();break;case 80:return"STR";case 81:return"LBRACE";case 82:return"RBRACE";case 83:return"SPACE";case 84:return"EOL";case 85:return 14}},"anonymous"),rules:[/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:title\s[^#\n;]+)/,/^(?:accDescription\s[^#\n;]+)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:%%(?!\{)*[^\n]*(\r?\n?)+)/,/^(?:%%[^\n]*(\r?\n)*)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:C4Context\b)/,/^(?:C4Container\b)/,/^(?:C4Component\b)/,/^(?:C4Dynamic\b)/,/^(?:C4Deployment\b)/,/^(?:Person_Ext\b)/,/^(?:Person\b)/,/^(?:SystemQueue_Ext\b)/,/^(?:SystemDb_Ext\b)/,/^(?:System_Ext\b)/,/^(?:SystemQueue\b)/,/^(?:SystemDb\b)/,/^(?:System\b)/,/^(?:Boundary\b)/,/^(?:Enterprise_Boundary\b)/,/^(?:System_Boundary\b)/,/^(?:ContainerQueue_Ext\b)/,/^(?:ContainerDb_Ext\b)/,/^(?:Container_Ext\b)/,/^(?:ContainerQueue\b)/,/^(?:ContainerDb\b)/,/^(?:Container\b)/,/^(?:Container_Boundary\b)/,/^(?:ComponentQueue_Ext\b)/,/^(?:ComponentDb_Ext\b)/,/^(?:Component_Ext\b)/,/^(?:ComponentQueue\b)/,/^(?:ComponentDb\b)/,/^(?:Component\b)/,/^(?:Deployment_Node\b)/,/^(?:Node\b)/,/^(?:Node_L\b)/,/^(?:Node_R\b)/,/^(?:Rel\b)/,/^(?:BiRel\b)/,/^(?:Rel_Up\b)/,/^(?:Rel_U\b)/,/^(?:Rel_Down\b)/,/^(?:Rel_D\b)/,/^(?:Rel_Left\b)/,/^(?:Rel_L\b)/,/^(?:Rel_Right\b)/,/^(?:Rel_R\b)/,/^(?:Rel_Back\b)/,/^(?:RelIndex\b)/,/^(?:UpdateElementStyle\b)/,/^(?:UpdateRelStyle\b)/,/^(?:UpdateLayoutConfig\b)/,/^(?:$)/,/^(?:[(][ ]*[,])/,/^(?:[(])/,/^(?:[)])/,/^(?:,,)/,/^(?:,)/,/^(?:[ ]*["]["])/,/^(?:[ ]*["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:[ ]*[\$])/,/^(?:[^=]*)/,/^(?:[=][ ]*["])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:[^,]+)/,/^(?:\{)/,/^(?:\})/,/^(?:[\s]+)/,/^(?:[\n\r]+)/,/^(?:$)/],conditions:{acc_descr_multiline:{rules:[11,12],inclusive:!1},acc_descr:{rules:[9],inclusive:!1},acc_title:{rules:[7],inclusive:!1},string_kv_value:{rules:[78,79],inclusive:!1},string_kv_key:{rules:[77],inclusive:!1},string_kv:{rules:[76],inclusive:!1},string:{rules:[73,74],inclusive:!1},attribute:{rules:[68,69,70,71,72,75,80],inclusive:!1},update_layout_config:{rules:[65,66,67,68],inclusive:!1},update_rel_style:{rules:[65,66,67,68],inclusive:!1},update_el_style:{rules:[65,66,67,68],inclusive:!1},rel_b:{rules:[65,66,67,68],inclusive:!1},rel_r:{rules:[65,66,67,68],inclusive:!1},rel_l:{rules:[65,66,67,68],inclusive:!1},rel_d:{rules:[65,66,67,68],inclusive:!1},rel_u:{rules:[65,66,67,68],inclusive:!1},rel_bi:{rules:[],inclusive:!1},rel:{rules:[65,66,67,68],inclusive:!1},node_r:{rules:[65,66,67,68],inclusive:!1},node_l:{rules:[65,66,67,68],inclusive:!1},node:{rules:[65,66,67,68],inclusive:!1},index:{rules:[],inclusive:!1},rel_index:{rules:[65,66,67,68],inclusive:!1},component_ext_queue:{rules:[],inclusive:!1},component_ext_db:{rules:[65,66,67,68],inclusive:!1},component_ext:{rules:[65,66,67,68],inclusive:!1},component_queue:{rules:[65,66,67,68],inclusive:!1},component_db:{rules:[65,66,67,68],inclusive:!1},component:{rules:[65,66,67,68],inclusive:!1},container_boundary:{rules:[65,66,67,68],inclusive:!1},container_ext_queue:{rules:[65,66,67,68],inclusive:!1},container_ext_db:{rules:[65,66,67,68],inclusive:!1},container_ext:{rules:[65,66,67,68],inclusive:!1},container_queue:{rules:[65,66,67,68],inclusive:!1},container_db:{rules:[65,66,67,68],inclusive:!1},container:{rules:[65,66,67,68],inclusive:!1},birel:{rules:[65,66,67,68],inclusive:!1},system_boundary:{rules:[65,66,67,68],inclusive:!1},enterprise_boundary:{rules:[65,66,67,68],inclusive:!1},boundary:{rules:[65,66,67,68],inclusive:!1},system_ext_queue:{rules:[65,66,67,68],inclusive:!1},system_ext_db:{rules:[65,66,67,68],inclusive:!1},system_ext:{rules:[65,66,67,68],inclusive:!1},system_queue:{rules:[65,66,67,68],inclusive:!1},system_db:{rules:[65,66,67,68],inclusive:!1},system:{rules:[65,66,67,68],inclusive:!1},person_ext:{rules:[65,66,67,68],inclusive:!1},person:{rules:[65,66,67,68],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,8,10,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,81,82,83,84,85],inclusive:!0}}};t.lexer=r,mt(B,"Parser"),(Hc=new((B.prototype=t).Parser=B)).parser=Hc,Vc=Hc}),lh=b(()=>{e(),Xc=mt(function(e,t){for(var r of t)e.attr(r[0],r[1])},"d3Attrs"),Kc=mt(function(e,t,r){var 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"),Zc=mt(function(e,t,r,n){t=Kc(t,r,n),Xc(e,t)},"configureSvgSize"),Qc=mt(function(e,t,r,n){var i=t.node().getBBox(),a=i.width,s=(D.info(`SVG bounds: ${a}x`+(s=i.height),i),D.info("Graph bounds: 0x0",e),D.info(`Calculated bounds: ${e=a+2*r}x`+(a=s+2*r)),Zc(t,a,e,n),`${i.x-r} ${i.y-r} ${i.width+2*r} `+(i.height+2*r));t.attr("viewBox",s)},"setupGraphViewbox")}),ch=b(()=>{e(),Jc={},eh=mt((e,t,r)=>{let n="";return e in Jc&&Jc[e]?n=Jc[e](r):D.warn("No theme found for "+e),` & { + font-family: ${r.fontFamily}; + font-size: ${r.fontSize}; + fill: ${r.textColor} + } + @keyframes edge-animation-frame { + from { + stroke-dashoffset: 0; + } + } + @keyframes dash { + to { + stroke-dashoffset: 0; + } + } + & .edge-animation-slow { + stroke-dasharray: 9,5 !important; + stroke-dashoffset: 900; + animation: dash 50s linear infinite; + stroke-linecap: round; + } + & .edge-animation-fast { + stroke-dasharray: 9,5 !important; + stroke-dashoffset: 900; + animation: dash 20s linear infinite; + stroke-linecap: round; + } + /* Classes common for multiple diagrams */ + + & .error-icon { + fill: ${r.errorBkgColor}; + } + & .error-text { + fill: ${r.errorTextColor}; + stroke: ${r.errorTextColor}; + } + + & .edge-thickness-normal { + stroke-width: 1px; + } + & .edge-thickness-thick { + stroke-width: 3.5px + } + & .edge-pattern-solid { + stroke-dasharray: 0; + } + & .edge-thickness-invisible { + stroke-width: 0; + fill: none; + } + & .edge-pattern-dashed{ + stroke-dasharray: 3; + } + .edge-pattern-dotted { + stroke-dasharray: 2; + } + + & .marker { + fill: ${r.lineColor}; + stroke: ${r.lineColor}; + } + & .marker.cross { + stroke: ${r.lineColor}; + } + + & svg { + font-family: ${r.fontFamily}; + font-size: ${r.fontSize}; + } + & p { + margin: 0 + } + + ${n} + + ${t} +`},"getStyles"),th=mt((e,t)=>{void 0!==t&&(Jc[e]=t)},"addStylesForDiagram"),rh=eh}),hh={};OFe(hh,{clear:()=>fh,getAccDescription:()=>xh,getAccTitle:()=>yh,getDiagramTitle:()=>wh,setAccDescription:()=>vh,setAccTitle:()=>mh,setDiagramTitle:()=>bh});var uh,dh,ph,gh,fh,mh,yh,vh,xh,bh,wh,kh,Th,O,Eh,Ch,_h,Sh,Ah,Lh,Nh,Ih,Rh,Mh,Dh,Oh,Ph,Bh,$h,Fh,zh,Gh,Uh,qh,jh,Yh,Wh,Hh,Vh,Xh,Kh,Zh,Qh,Jh,eu,tu,ru,nu,iu,au,su,ou,lu,cu,hu,uu,du,pu,gu,fu,mu,yu,vu,xu,bu,wu,ku=b(()=>{Oc(),rn(),ph=dh=uh="",gh=mt(e=>lc(e,ar()),"sanitizeText"),fh=mt(()=>{dh=ph=uh=""},"clear"),mh=mt(e=>{uh=gh(e).replace(/^\s+/g,"")},"setAccTitle"),yh=mt(()=>uh,"getAccTitle"),vh=mt(e=>{ph=gh(e).replace(/\n\s+/g,` +`)},"setAccDescription"),xh=mt(()=>ph,"getAccDescription"),bh=mt(e=>{dh=gh(e)},"setDiagramTitle"),wh=mt(()=>dh,"getDiagramTitle")}),Tu=b(()=>{sh(),e(),rn(),Oc(),lh(),ch(),ku(),kh=D,Th=Ie,O=ar,Eh=ir,Ch=Vt,_h=mt(e=>lc(e,O()),"sanitizeText"),Sh=Qc,Ah=mt(()=>hh,"getCommonDb"),Lh={},Nh=mt((e,t,r)=>{Lh[e]&&kh.warn(`Diagram with id ${e} already registered. Overwriting.`),Lh[e]=t,r&&Yc(e,r),th(e,t.styles),t.injectUtils?.(kh,Th,O,_h,Sh,Ah(),()=>{})},"registerDiagram"),Ih=mt(e=>{if(e in Lh)return Lh[e];throw new Rh(e)},"getDiagram"),Rh=class extends Error{static{mt(this,"DiagramNotFoundError")}constructor(e){super(`Diagram ${e} not found.`)}}}),Eu=b(()=>{Tu(),Oc(),ku(),Mh=[],Dh=[""],Bh=[{alias:Oh="global",label:{text:"global"},type:{text:"global"},tags:null,link:null,parentBoundary:Ph=""}],Fh="",zh=!($h=[]),Gh=4,Uh=2,jh=mt(function(){return qh},"getC4Type"),Yh=mt(function(e){qh=lc(e,O())},"setC4Type"),Wh=mt(function(r,n,i,a,s,o,l,c,h){if(null!=r&&null!=n&&null!=i&&null!=a){let e={},t=$h.find(e=>e.from===n&&e.to===i);t?e=t:$h.push(e),e.type=r,e.from=n,e.to=i,e.label={text:a},null==s?e.techn={text:""}:"object"==typeof s?([r,a]=Object.entries(s)[0],e[r]={text:a}):e.techn={text:s},null==o?e.descr={text:""}:"object"==typeof o?([r,a]=Object.entries(o)[0],e[r]={text:a}):e.descr={text:o},"object"==typeof l?([s,r]=Object.entries(l)[0],e[s]=r):e.sprite=l,"object"==typeof c?([a,o]=Object.entries(c)[0],e[a]=o):e.tags=c,"object"==typeof h?([s,r]=Object.entries(h)[0],e[s]=r):e.link=h,e.wrap=fu()}},"addRel"),Hh=mt(function(r,n,i,a,s,o,l){if(null!==n&&null!==i){let e={},t=Mh.find(e=>e.alias===n);var c;t&&n===t.alias?e=t:(e.alias=n,Mh.push(e)),e.label=null==i?{text:""}:{text:i},null==a?e.descr={text:""}:"object"==typeof a?([i,c]=Object.entries(a)[0],e[i]={text:c}):e.descr={text:a},"object"==typeof s?([i,c]=Object.entries(s)[0],e[i]=c):e.sprite=s,"object"==typeof o?([a,i]=Object.entries(o)[0],e[a]=i):e.tags=o,"object"==typeof l?([c,s]=Object.entries(l)[0],e[c]=s):e.link=l,e.typeC4Shape={text:r},e.parentBoundary=Oh,e.wrap=fu()}},"addPersonOrSystem"),Vh=mt(function(r,n,i,a,s,o,l,c){if(null!==n&&null!==i){let e={},t=Mh.find(e=>e.alias===n);var h;t&&n===t.alias?e=t:(e.alias=n,Mh.push(e)),e.label=null==i?{text:""}:{text:i},null==a?e.techn={text:""}:"object"==typeof a?([i,h]=Object.entries(a)[0],e[i]={text:h}):e.techn={text:a},null==s?e.descr={text:""}:"object"==typeof s?([i,h]=Object.entries(s)[0],e[i]={text:h}):e.descr={text:s},"object"==typeof o?([a,i]=Object.entries(o)[0],e[a]=i):e.sprite=o,"object"==typeof l?([h,s]=Object.entries(l)[0],e[h]=s):e.tags=l,"object"==typeof c?([a,i]=Object.entries(c)[0],e[a]=i):e.link=c,e.wrap=fu(),e.typeC4Shape={text:r},e.parentBoundary=Oh}},"addContainer"),Xh=mt(function(r,n,i,a,s,o,l,c){if(null!==n&&null!==i){let e={},t=Mh.find(e=>e.alias===n);var h;t&&n===t.alias?e=t:(e.alias=n,Mh.push(e)),e.label=null==i?{text:""}:{text:i},null==a?e.techn={text:""}:"object"==typeof a?([i,h]=Object.entries(a)[0],e[i]={text:h}):e.techn={text:a},null==s?e.descr={text:""}:"object"==typeof s?([i,h]=Object.entries(s)[0],e[i]={text:h}):e.descr={text:s},"object"==typeof o?([a,i]=Object.entries(o)[0],e[a]=i):e.sprite=o,"object"==typeof l?([h,s]=Object.entries(l)[0],e[h]=s):e.tags=l,"object"==typeof c?([a,i]=Object.entries(c)[0],e[a]=i):e.link=c,e.wrap=fu(),e.typeC4Shape={text:r},e.parentBoundary=Oh}},"addComponent"),Kh=mt(function(r,n,i,a,s){if(null!==r&&null!==n){let e={},t=Bh.find(e=>e.alias===r);var o;t&&r===t.alias?e=t:(e.alias=r,Bh.push(e)),e.label=null==n?{text:""}:{text:n},null==i?e.type={text:"system"}:"object"==typeof i?([n,o]=Object.entries(i)[0],e[n]={text:o}):e.type={text:i},"object"==typeof a?([n,o]=Object.entries(a)[0],e[n]=o):e.tags=a,"object"==typeof s?([i,n]=Object.entries(s)[0],e[i]=n):e.link=s,e.parentBoundary=Oh,e.wrap=fu(),Ph=Oh,Oh=r,Dh.push(Ph)}},"addPersonOrSystemBoundary"),Zh=mt(function(r,n,i,a,s){if(null!==r&&null!==n){let e={},t=Bh.find(e=>e.alias===r);var o;t&&r===t.alias?e=t:(e.alias=r,Bh.push(e)),e.label=null==n?{text:""}:{text:n},null==i?e.type={text:"container"}:"object"==typeof i?([n,o]=Object.entries(i)[0],e[n]={text:o}):e.type={text:i},"object"==typeof a?([n,o]=Object.entries(a)[0],e[n]=o):e.tags=a,"object"==typeof s?([i,n]=Object.entries(s)[0],e[i]=n):e.link=s,e.parentBoundary=Oh,e.wrap=fu(),Ph=Oh,Oh=r,Dh.push(Ph)}},"addContainerBoundary"),Qh=mt(function(r,n,i,a,s,e,o,l){if(null!==n&&null!==i){let e={},t=Bh.find(e=>e.alias===n);var c;t&&n===t.alias?e=t:(e.alias=n,Bh.push(e)),e.label=null==i?{text:""}:{text:i},null==a?e.type={text:"node"}:"object"==typeof a?([i,c]=Object.entries(a)[0],e[i]={text:c}):e.type={text:a},null==s?e.descr={text:""}:"object"==typeof s?([i,c]=Object.entries(s)[0],e[i]={text:c}):e.descr={text:s},"object"==typeof o?([a,i]=Object.entries(o)[0],e[a]=i):e.tags=o,"object"==typeof l?([c,s]=Object.entries(l)[0],e[c]=s):e.link=l,e.nodeType=r,e.parentBoundary=Oh,e.wrap=fu(),Ph=Oh,Oh=n,Dh.push(Ph)}},"addDeploymentNode"),Jh=mt(function(){Oh=Ph,Dh.pop(),Ph=Dh.pop(),Dh.push(Ph)},"popBoundaryParseStack"),eu=mt(function(e,t,r,n,i,a,s,o,l,c,h){let u=Mh.find(e=>e.alias===t);var d,p;void 0===u&&void 0===(u=Bh.find(e=>e.alias===t))||(null!=r&&("object"==typeof r?([p,d]=Object.entries(r)[0],u[p]=d):u.bgColor=r),null!=n&&("object"==typeof n?([p,d]=Object.entries(n)[0],u[p]=d):u.fontColor=n),null!=i&&("object"==typeof i?([r,p]=Object.entries(i)[0],u[r]=p):u.borderColor=i),null!=a&&("object"==typeof a?([d,n]=Object.entries(a)[0],u[d]=n):u.shadowing=a),null!=s&&("object"==typeof s?([r,p]=Object.entries(s)[0],u[r]=p):u.shape=s),null!=o&&("object"==typeof o?([i,d]=Object.entries(o)[0],u[i]=d):u.sprite=o),null!=l&&("object"==typeof l?([n,a]=Object.entries(l)[0],u[n]=a):u.techn=l),null!=c&&("object"==typeof c?([r,p]=Object.entries(c)[0],u[r]=p):u.legendText=c),null!=h&&("object"==typeof h?([s,i]=Object.entries(h)[0],u[s]=i):u.legendSprite=h))},"updateElStyle"),tu=mt(function(e,t,r,n,i,a,s){var o,l,c=$h.find(e=>e.from===t&&e.to===r);void 0!==c&&(null!=n&&("object"==typeof n?([o,l]=Object.entries(n)[0],c[o]=l):c.textColor=n),null!=i&&("object"==typeof i?([o,l]=Object.entries(i)[0],c[o]=l):c.lineColor=i),null!=a&&("object"==typeof a?([n,o]=Object.entries(a)[0],c[n]=parseInt(o)):c.offsetX=parseInt(a)),null!=s)&&("object"==typeof s?([l,i]=Object.entries(s)[0],c[l]=parseInt(i)):c.offsetY=parseInt(s))},"updateRelStyle"),ru=mt(function(e,t,r){var t="object"==typeof t?(n=Object.values(t)[0],parseInt(n)):parseInt(t),n="object"==typeof r?(n=Object.values(r)[0],parseInt(n)):parseInt(r);1<=t&&(Gh=t),1<=n&&(Uh=n)},"updateLayoutConfig"),nu=mt(function(){return Gh},"getC4ShapeInRow"),iu=mt(function(){return Uh},"getC4BoundaryInRow"),au=mt(function(){return Oh},"getCurrentBoundaryParse"),su=mt(function(){return Ph},"getParentBoundaryParse"),ou=mt(function(t){return null==t?Mh:Mh.filter(e=>e.parentBoundary===t)},"getC4ShapeArray"),lu=mt(function(t){return Mh.find(e=>e.alias===t)},"getC4Shape"),cu=mt(function(e){return Object.keys(ou(e))},"getC4ShapeKeys"),hu=mt(function(t){return null==t?Bh:Bh.filter(e=>e.parentBoundary===t)},"getBoundaries"),uu=hu,du=mt(function(){return $h},"getRels"),pu=mt(function(){return Fh},"getTitle"),gu=mt(function(e){zh=e},"setWrap"),fu=mt(function(){return zh},"autoWrap"),mu=mt(function(){Mh=[],Bh=[{alias:"global",label:{text:"global"},type:{text:"global"},tags:null,link:null,parentBoundary:""}],Oh="global",Dh=[Ph=""],Dh=[Fh=""],zh=!($h=[]),Gh=4,Uh=2},"clear"),yu={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},vu={FILLED:0,OPEN:1},xu={LEFTOF:0,RIGHTOF:1,OVER:2},bu=mt(function(e){Fh=lc(e,O())},"setTitle"),wu={addPersonOrSystem:Hh,addPersonOrSystemBoundary:Kh,addContainer:Vh,addContainerBoundary:Zh,addComponent:Xh,addDeploymentNode:Qh,popBoundaryParseStack:Jh,addRel:Wh,updateElStyle:eu,updateRelStyle:tu,updateLayoutConfig:ru,autoWrap:fu,setWrap:gu,getC4ShapeArray:ou,getC4Shape:lu,getC4ShapeKeys:cu,getBoundaries:hu,getBoundarys:uu,getCurrentBoundaryParse:au,getParentBoundaryParse:su,getRels:du,getTitle:pu,getC4Type:jh,getC4ShapeInRow:nu,getC4BoundaryInRow:iu,setAccTitle:mh,getAccTitle:yh,getAccDescription:xh,setAccDescription:vh,getConfig:mt(()=>O().c4,"getConfig"),clear:mu,LINETYPE:yu,ARROWTYPE:vu,PLACEMENT:xu,setTitle:bu,setC4Type:Yh}});function Cu(e,t){return null==e||null==t?NaN:e<t?-1:t<e?1:t<=e?0:NaN}var _u=b(()=>{mt(Cu,"ascending")});function Su(e,t){return null==e||null==t?NaN:t<e?-1:e<t?1:e<=t?0:NaN}var Au=b(()=>{mt(Su,"descending")});function Lu(r){let a,s,i;function o(e,t,r=0,n=e.length){if(r<n){if(0!==a(t,t))return n;do{var i=r+n>>>1}while(s(e[i],t)<0?r=1+i:n=i,r<n)}return r}function e(e,t,r=0,n=e.length){if(r<n){if(0!==a(t,t))return n;do{var i=r+n>>>1}while(s(e[i],t)<=0?r=1+i:n=i,r<n)}return r}function t(e,t,r=0,n=e.length){return r<(n=o(e,t,r,n-1))&&i(e[n-1],t)>-i(e[n],t)?n-1:n}return i=2!==r.length?(a=Cu,s=mt((e,t)=>Cu(r(e),t),"compare2"),mt((e,t)=>r(e)-t,"delta")):(a=r===Cu||r===Su?r:Nu,s=r),mt(o,"left"),mt(e,"right"),mt(t,"center"),{left:o,center:t,right:e}}function Nu(){return 0}var Iu=b(()=>{_u(),Au(),mt(Lu,"bisector"),mt(Nu,"zero")});function Ru(e){return null===e?NaN:+e}var Mu,Du,Ou=b(()=>{mt(Ru,"number")}),Pu=b(()=>{_u(),Iu(),Ou(),Mu=Lu(Cu).right,Lu(Ru).center,Du=Mu});function Bu({_intern:e,_key:t},r){return t=t(r),e.has(t)?e.get(t):r}function $u({_intern:e,_key:t},r){return t=t(r),e.has(t)?e.get(t):(e.set(t,r),r)}function Fu({_intern:e,_key:t},r){return t=t(r),e.has(t)&&(r=e.get(t),e.delete(t)),r}function zu(e){return null!==e&&"object"==typeof e?e.valueOf():e}var Gu,Uu=b(()=>{Gu=class extends Map{static{mt(this,"InternMap")}constructor(e,t=zu){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:t}}),null!=e)for(var[r,n]of e)this.set(r,n)}get(e){return super.get(Bu(this,e))}has(e){return super.has(Bu(this,e))}set(e,t){return super.set($u(this,e),t)}delete(e){return super.delete(Fu(this,e))}},mt(Bu,"intern_get"),mt($u,"intern_set"),mt(Fu,"intern_delete"),mt(zu,"keyof")});function qu(e,t,r){let n=(t-e)/Math.max(0,r),i=Math.floor(Math.log10(n)),a=n/Math.pow(10,i),s=Hu<=a?10:Vu<=a?5:Xu<=a?2:1,o,l,c;return i<0?(c=Math.pow(10,-i)/s,o=Math.round(e*c),l=Math.round(t*c),o/c<e&&++o,l/c>t&&--l,c=-c):(c=Math.pow(10,i)*s,o=Math.round(e/c),l=Math.round(t/c),o*c<e&&++o,l*c>t&&--l),l<o&&.5<=r&&r<2?qu(e,t,2*r):[o,l,c]}function ju(e,t,r){if(!(0<(r=+r)))return[];if((e=+e)==(t=+t))return[e];var n=t<e,[i,a,s]=n?qu(t,e,r):qu(e,t,r);if(!(i<=a))return[];var o=a-i+1,l=new Array(o);if(n)if(s<0)for(let e=0;e<o;++e)l[e]=(a-e)/-s;else for(let e=0;e<o;++e)l[e]=(a-e)*s;else if(s<0)for(let e=0;e<o;++e)l[e]=(i+e)/-s;else for(let e=0;e<o;++e)l[e]=(i+e)*s;return l}function Yu(e,t,r){return qu(e=+e,t=+t,r=+r)[2]}function Wu(e,t,r){r=+r;var n=(t=+t)<(e=+e);return(n?-1:1)*((e=n?Yu(t,e,r):Yu(e,t,r))<0?1/-e:e)}var Hu,Vu,Xu,Ku=b(()=>{Hu=Math.sqrt(50),Vu=Math.sqrt(10),Xu=Math.sqrt(2),mt(qu,"tickSpec"),mt(ju,"ticks"),mt(Yu,"tickIncrement"),mt(Wu,"tickStep")});function Zu(t,r){let n;if(void 0===r)for(var e of t)null!=e&&(n<e||void 0===n&&e<=e)&&(n=e);else{let e=-1;for(var i of t)null!=(i=r(i,++e,t))&&(n<i||void 0===n&&i<=i)&&(n=i)}return n}var Qu=b(()=>{mt(Zu,"max")});function Ju(t,r){let n;if(void 0===r)for(var e of t)null!=e&&(n>e||void 0===n&&e<=e)&&(n=e);else{let e=-1;for(var i of t)null!=(i=r(i,++e,t))&&(n>i||void 0===n&&i<=i)&&(n=i)}return n}var ed=b(()=>{mt(Ju,"min")});function td(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=0|Math.max(0,Math.ceil((t-e)/r)),a=new Array(i);++n<i;)a[n]=e+n*r;return a}var rd=b(()=>{mt(td,"range")}),nd=b(()=>{Pu(),Iu(),Qu(),ed(),rd(),Ku(),Uu()});function id(e){return e}var ad=b(()=>{mt(id,"default")});function sd(e){return"translate("+e+",0)"}function od(e){return"translate(0,"+e+")"}function ld(t){return e=>+t(e)}function cd(t,r){return r=Math.max(0,t.bandwidth()-2*r)/2,t.round()&&(r=Math.round(r)),e=>+t(e)+r}function hd(){return!this.__axis}function ud(p,g){var f=[],m=null,y=null,v=6,x=6,b=3,w=typeof window<"u"&&1<window.devicePixelRatio?0:.5,k=p===gd||4===p?-1:1,T=4===p||2===p?"x":"y",E=p===gd||p===fd?sd:od;function t(e){var t=m??(g.ticks?g.ticks.apply(g,f):g.domain()),r=y??(g.tickFormat?g.tickFormat.apply(g,f):id),n=Math.max(v,0)+b,i=+(a=g.range())[0]+w,a=+a[a.length-1]+w,s=(g.bandwidth?cd:ld)(g.copy(),w),o=e.selection?e.selection():e,l=o.selectAll(".domain").data([null]),c=(t=o.selectAll(".tick").data(t,g).order()).exit(),h=t.enter().append("g").attr("class","tick"),u=t.select("line"),d=t.select("text"),l=l.merge(l.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),t=t.merge(h),u=u.merge(h.append("line").attr("stroke","currentColor").attr(T+"2",k*v)),d=d.merge(h.append("text").attr("fill","currentColor").attr(T,k*n).attr("dy",p===gd?"0em":p===fd?"0.71em":"0.32em"));e!==o&&(l=l.transition(e),t=t.transition(e),u=u.transition(e),d=d.transition(e),c=c.transition(e).attr("opacity",1e-6).attr("transform",function(e){return isFinite(e=s(e))?E(e+w):this.getAttribute("transform")}),h.attr("opacity",1e-6).attr("transform",function(e){var t=this.parentNode.__axis;return E((t&&isFinite(t=t(e))?t:s(e))+w)})),c.remove(),l.attr("d",4===p||2===p?x?"M"+k*x+","+i+"H"+w+"V"+a+"H"+k*x:"M"+w+","+i+"V"+a:x?"M"+i+","+k*x+"V"+w+"H"+a+"V"+k*x:"M"+i+","+w+"H"+a),t.attr("opacity",1).attr("transform",function(e){return E(s(e)+w)}),u.attr(T+"2",k*v),d.attr(T,k*n).text(r),o.filter(hd).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",2===p?"start":4===p?"end":"middle"),o.each(function(){this.__axis=s})}return mt(t,"axis"),t.scale=function(e){return arguments.length?(g=e,t):g},t.ticks=function(){return f=Array.from(arguments),t},t.tickArguments=function(e){return arguments.length?(f=null==e?[]:Array.from(e),t):f.slice()},t.tickValues=function(e){return arguments.length?(m=null==e?null:Array.from(e),t):m&&m.slice()},t.tickFormat=function(e){return arguments.length?(y=e,t):y},t.tickSize=function(e){return arguments.length?(v=x=+e,t):v},t.tickSizeInner=function(e){return arguments.length?(v=+e,t):v},t.tickSizeOuter=function(e){return arguments.length?(x=+e,t):x},t.tickPadding=function(e){return arguments.length?(b=+e,t):b},t.offset=function(e){return arguments.length?(w=+e,t):w},t}function dd(e){return ud(gd,e)}function pd(e){return ud(fd,e)}var gd,fd,md=b(()=>{ad(),gd=1,fd=3,mt(sd,"translateX"),mt(od,"translateY"),mt(ld,"number"),mt(cd,"center"),mt(hd,"entering"),mt(ud,"axis"),mt(dd,"axisTop"),mt(pd,"axisBottom")}),yd=b(()=>{md()});function vd(){for(var e,t=0,r=arguments.length,n={};t<r;++t){if(!(e=arguments[t]+"")||e in n||/[\s.]/.test(e))throw new Error("illegal type: "+e);n[e]=[]}return new xd(n)}function xd(e){this._=e}function bd(e,n){return e.trim().split(/^|\s+/).map(function(e){var t="",r=e.indexOf(".");if(0<=r&&(t=e.slice(r+1),e=e.slice(0,r)),e&&!n.hasOwnProperty(e))throw new Error("unknown type: "+e);return{type:e,name:t}})}function wd(e,t){for(var r,n=0,i=e.length;n<i;++n)if((r=e[n]).name===t)return r.value}function kd(e,t,r){for(var n=0,i=e.length;n<i;++n)if(e[n].name===t){e[n]=Td,e=e.slice(0,n).concat(e.slice(n+1));break}return null!=r&&e.push({name:t,value:r}),e}var Td,Ed,Cd,_d,Sd=b(()=>{Td={value:mt(()=>{},"value")},mt(vd,"dispatch"),mt(xd,"Dispatch"),mt(bd,"parseTypenames"),xd.prototype=vd.prototype={constructor:xd,on:mt(function(e,t){var r,n=this._,i=bd(e+"",n),a=-1,s=i.length;if(!(arguments.length<2)){if(null!=t&&"function"!=typeof t)throw new Error("invalid callback: "+t);for(;++a<s;)if(r=(e=i[a]).type)n[r]=kd(n[r],e.name,t);else if(null==t)for(r in n)n[r]=kd(n[r],e.name,null);return this}for(;++a<s;)if(r=(r=(e=i[a]).type)&&wd(n[r],e.name))return r},"on"),copy:mt(function(){var e,t={},r=this._;for(e in r)t[e]=r[e].slice();return new xd(t)},"copy"),call:mt(function(e,t){if(0<(r=arguments.length-2))for(var r,n,i=new Array(r),a=0;a<r;++a)i[a]=arguments[a+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(a=0,r=(n=this._[e]).length;a<r;++a)n[a].value.apply(t,i)},"call"),apply:mt(function(e,t,r){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var n=this._[e],i=0,a=n.length;i<a;++i)n[i].value.apply(t,r)},"apply")},mt(wd,"get"),mt(kd,"set"),Ed=vd}),Ad=b(()=>{Sd()}),Ld=b(()=>{_d={svg:"http://www.w3.org/2000/svg",xhtml:Cd="http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"}});function Nd(e){var t=e+="",r=t.indexOf(":");return 0<=r&&"xmlns"!==(t=e.slice(0,r))&&(e=e.slice(r+1)),_d.hasOwnProperty(t)?{space:_d[t],local:e}:e}var Id=b(()=>{Ld(),mt(Nd,"default")});function Rd(r){return function(){var e=this.ownerDocument,t=this.namespaceURI;return t===Cd&&e.documentElement.namespaceURI===Cd?e.createElement(r):e.createElementNS(t,r)}}function Md(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function Dd(e){return((e=Nd(e)).local?Md:Rd)(e)}var Od=b(()=>{Id(),Ld(),mt(Rd,"creatorInherit"),mt(Md,"creatorFixed"),mt(Dd,"default")});function Pd(){}function Bd(e){return null==e?Pd:function(){return this.querySelector(e)}}var $d=b(()=>{mt(Pd,"none"),mt(Bd,"default")});function Fd(e){"function"!=typeof e&&(e=Bd(e));for(var t=this._groups,r=t.length,n=new Array(r),i=0;i<r;++i)for(var a,s,o=t[i],l=o.length,c=n[i]=new Array(l),h=0;h<l;++h)(a=o[h])&&(s=e.call(a,a.__data__,h,o))&&("__data__"in a&&(s.__data__=a.__data__),c[h]=s);return new dg(n,this._parents)}var zd=b(()=>{yg(),$d(),mt(Fd,"default")});function Gd(e){return null==e?[]:Array.isArray(e)?e:Array.from(e)}var Ud=b(()=>{mt(Gd,"array")});function qd(){return[]}function jd(e){return null==e?qd:function(){return this.querySelectorAll(e)}}var Yd=b(()=>{mt(qd,"empty"),mt(jd,"default")});function Wd(e){return function(){return Gd(e.apply(this,arguments))}}function Hd(e){e=("function"==typeof e?Wd:jd)(e);for(var t=this._groups,r=t.length,n=[],i=[],a=0;a<r;++a)for(var s,o=t[a],l=o.length,c=0;c<l;++c)(s=o[c])&&(n.push(e.call(s,s.__data__,c,o)),i.push(s));return new dg(n,i)}var Vd=b(()=>{yg(),Ud(),Yd(),mt(Wd,"arrayAll"),mt(Hd,"default")});function Xd(e){return function(){return this.matches(e)}}function Kd(t){return function(e){return e.matches(t)}}var Zd=b(()=>{mt(Xd,"default"),mt(Kd,"childMatcher")});function Qd(e){return function(){return tp.call(this.children,e)}}function Jd(){return this.firstElementChild}function ep(e){return this.select(null==e?Jd:Qd("function"==typeof e?e:Kd(e)))}var tp,rp=b(()=>{Zd(),tp=Array.prototype.find,mt(Qd,"childFind"),mt(Jd,"childFirst"),mt(ep,"default")});function np(){return Array.from(this.children)}function ip(e){return function(){return sp.call(this.children,e)}}function ap(e){return this.selectAll(null==e?np:ip("function"==typeof e?e:Kd(e)))}var sp,op=b(()=>{Zd(),sp=Array.prototype.filter,mt(np,"children"),mt(ip,"childrenFilter"),mt(ap,"default")});function lp(e){"function"!=typeof e&&(e=Xd(e));for(var t=this._groups,r=t.length,n=new Array(r),i=0;i<r;++i)for(var a,s=t[i],o=s.length,l=n[i]=[],c=0;c<o;++c)(a=s[c])&&e.call(a,a.__data__,c,s)&&l.push(a);return new dg(n,this._parents)}var cp=b(()=>{yg(),Zd(),mt(lp,"default")});function hp(e){return new Array(e.length)}var up=b(()=>{mt(hp,"default")});function dp(){return new dg(this._enter||this._groups.map(hp),this._parents)}function pp(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}var gp=b(()=>{up(),yg(),mt(dp,"default"),mt(pp,"EnterNode"),pp.prototype={constructor:pp,appendChild:mt(function(e){return this._parent.insertBefore(e,this._next)},"appendChild"),insertBefore:mt(function(e,t){return this._parent.insertBefore(e,t)},"insertBefore"),querySelector:mt(function(e){return this._parent.querySelector(e)},"querySelector"),querySelectorAll:mt(function(e){return this._parent.querySelectorAll(e)},"querySelectorAll")}});function fp(e){return function(){return e}}var mp=b(()=>{mt(fp,"default")});function yp(e,t,r,n,i,a){for(var s,o=0,l=t.length,c=a.length;o<c;++o)(s=t[o])?(s.__data__=a[o],n[o]=s):r[o]=new pp(e,a[o]);for(;o<l;++o)(s=t[o])&&(i[o]=s)}function vp(e,t,r,n,i,a,s){for(var o,l,c=new Map,h=t.length,u=a.length,d=new Array(h),p=0;p<h;++p)(o=t[p])&&(d[p]=l=s.call(o,o.__data__,p,t)+"",c.has(l)?i[p]=o:c.set(l,o));for(p=0;p<u;++p)l=s.call(e,a[p],p,a)+"",(o=c.get(l))?((n[p]=o).__data__=a[p],c.delete(l)):r[p]=new pp(e,a[p]);for(p=0;p<h;++p)(o=t[p])&&c.get(d[p])===o&&(i[p]=o)}function xp(e){return e.__data__}function bp(e,t){if(!arguments.length)return Array.from(this,xp);var r=t?vp:yp,n=this._parents,i=this._groups;"function"!=typeof e&&(e=fp(e));for(var a=i.length,s=new Array(a),o=new Array(a),l=new Array(a),c=0;c<a;++c){var h=n[c],u=i[c],d=u.length,p=wp(e.call(h,h&&h.__data__,c,n)),g=p.length,f=o[c]=new Array(g),m=s[c]=new Array(g);r(h,u,f,m,l[c]=new Array(d),p,t);for(var y,v,x=0,b=0;x<g;++x)if(y=f[x]){for(b<=x&&(b=x+1);!(v=m[b])&&++b<g;);y._next=v||null}}return(s=new dg(s,n))._enter=o,s._exit=l,s}function wp(e){return"object"==typeof e&&"length"in e?e:Array.from(e)}var kp=b(()=>{yg(),gp(),mp(),mt(yp,"bindIndex"),mt(vp,"bindKey"),mt(xp,"datum"),mt(bp,"default"),mt(wp,"arraylike")});function Tp(){return new dg(this._exit||this._groups.map(hp),this._parents)}var Ep=b(()=>{up(),yg(),mt(Tp,"default")});function Cp(e,t,r){var n=this.enter(),i=this,a=this.exit(),n="function"==typeof e?(n=e(n))&&n.selection():n.append(e+"");return null!=t&&(i=(i=t(i))&&i.selection()),null==r?a.remove():r(a),n&&i?n.merge(i).order():i}var _p=b(()=>{mt(Cp,"default")});function Sp(e){for(var e=e.selection?e.selection():e,t=this._groups,r=e._groups,n=t.length,e=r.length,i=Math.min(n,e),a=new Array(n),s=0;s<i;++s)for(var o,l=t[s],c=r[s],h=l.length,u=a[s]=new Array(h),d=0;d<h;++d)(o=l[d]||c[d])&&(u[d]=o);for(;s<n;++s)a[s]=t[s];return new dg(a,this._parents)}var Ap=b(()=>{yg(),mt(Sp,"default")});function Lp(){for(var e=this._groups,t=-1,r=e.length;++t<r;)for(var n,i=e[t],a=i.length-1,s=i[a];0<=--a;)(n=i[a])&&(s&&4^n.compareDocumentPosition(s)&&s.parentNode.insertBefore(n,s),s=n);return this}var Np=b(()=>{mt(Lp,"default")});function Ip(r){function e(e,t){return e&&t?r(e.__data__,t.__data__):!e-!t}r=r||Rp,mt(e,"compareNode");for(var t=this._groups,n=t.length,i=new Array(n),a=0;a<n;++a){for(var s,o=t[a],l=o.length,c=i[a]=new Array(l),h=0;h<l;++h)(s=o[h])&&(c[h]=s);c.sort(e)}return new dg(i,this._parents).order()}function Rp(e,t){return e<t?-1:t<e?1:t<=e?0:NaN}var Mp=b(()=>{yg(),mt(Ip,"default"),mt(Rp,"ascending")});function Dp(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}var Op=b(()=>{mt(Dp,"default")});function Pp(){return Array.from(this)}var Bp=b(()=>{mt(Pp,"default")});function $p(){for(var e=this._groups,t=0,r=e.length;t<r;++t)for(var n=e[t],i=0,a=n.length;i<a;++i){var s=n[i];if(s)return s}return null}var Fp=b(()=>{mt($p,"default")});function zp(){let e=0;for(var t of this)++e;return e}var Gp=b(()=>{mt(zp,"default")});function Up(){return!this.node()}var qp=b(()=>{mt(Up,"default")});function jp(e){for(var t=this._groups,r=0,n=t.length;r<n;++r)for(var i,a=t[r],s=0,o=a.length;s<o;++s)(i=a[s])&&e.call(i,i.__data__,s,a);return this}var Yp=b(()=>{mt(jp,"default")});function Wp(e){return function(){this.removeAttribute(e)}}function Hp(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Vp(e,t){return function(){this.setAttribute(e,t)}}function Xp(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function Kp(t,r){return function(){var e=r.apply(this,arguments);null==e?this.removeAttribute(t):this.setAttribute(t,e)}}function Zp(t,r){return function(){var e=r.apply(this,arguments);null==e?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,e)}}function Qp(e,t){var r,e=Nd(e);return arguments.length<2?(r=this.node(),e.local?r.getAttributeNS(e.space,e.local):r.getAttribute(e)):this.each((null==t?e.local?Hp:Wp:"function"==typeof t?e.local?Zp:Kp:e.local?Xp:Vp)(e,t))}var Jp=b(()=>{Id(),mt(Wp,"attrRemove"),mt(Hp,"attrRemoveNS"),mt(Vp,"attrConstant"),mt(Xp,"attrConstantNS"),mt(Kp,"attrFunction"),mt(Zp,"attrFunctionNS"),mt(Qp,"default")});function e0(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}var t0=b(()=>{mt(e0,"default")});function r0(e){return function(){this.style.removeProperty(e)}}function n0(e,t,r){return function(){this.style.setProperty(e,t,r)}}function i0(t,r,n){return function(){var e=r.apply(this,arguments);null==e?this.style.removeProperty(t):this.style.setProperty(t,e,n)}}function a0(e,t,r){return 1<arguments.length?this.each((null==t?r0:"function"==typeof t?i0:n0)(e,t,r??"")):s0(this.node(),e)}function s0(e,t){return e.style.getPropertyValue(t)||e0(e).getComputedStyle(e,null).getPropertyValue(t)}var o0=b(()=>{t0(),mt(r0,"styleRemove"),mt(n0,"styleConstant"),mt(i0,"styleFunction"),mt(a0,"default"),mt(s0,"styleValue")});function l0(e){return function(){delete this[e]}}function c0(e,t){return function(){this[e]=t}}function h0(t,r){return function(){var e=r.apply(this,arguments);null==e?delete this[t]:this[t]=e}}function u0(e,t){return 1<arguments.length?this.each((null==t?l0:"function"==typeof t?h0:c0)(e,t)):this.node()[e]}var d0=b(()=>{mt(l0,"propertyRemove"),mt(c0,"propertyConstant"),mt(h0,"propertyFunction"),mt(u0,"default")});function p0(e){return e.trim().split(/^|\s+/)}function g0(e){return e.classList||new f0(e)}function f0(e){this._node=e,this._names=p0(e.getAttribute("class")||"")}function m0(e,t){for(var r=g0(e),n=-1,i=t.length;++n<i;)r.add(t[n])}function y0(e,t){for(var r=g0(e),n=-1,i=t.length;++n<i;)r.remove(t[n])}function v0(e){return function(){m0(this,e)}}function x0(e){return function(){y0(this,e)}}function b0(e,t){return function(){(t.apply(this,arguments)?m0:y0)(this,e)}}function w0(e,t){var r=p0(e+"");if(arguments.length<2){for(var n=g0(this.node()),i=-1,a=r.length;++i<a;)if(!n.contains(r[i]))return!1;return!0}return this.each(("function"==typeof t?b0:t?v0:x0)(r,t))}var k0=b(()=>{mt(p0,"classArray"),mt(g0,"classList"),mt(f0,"ClassList"),f0.prototype={add:mt(function(e){this._names.indexOf(e)<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},"add"),remove:mt(function(e){0<=(e=this._names.indexOf(e))&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},"remove"),contains:mt(function(e){return 0<=this._names.indexOf(e)},"contains")},mt(m0,"classedAdd"),mt(y0,"classedRemove"),mt(v0,"classedTrue"),mt(x0,"classedFalse"),mt(b0,"classedFunction"),mt(w0,"default")});function T0(){this.textContent=""}function E0(e){return function(){this.textContent=e}}function C0(t){return function(){var e=t.apply(this,arguments);this.textContent=e??""}}function _0(e){return arguments.length?this.each(null==e?T0:("function"==typeof e?C0:E0)(e)):this.node().textContent}var S0=b(()=>{mt(T0,"textRemove"),mt(E0,"textConstant"),mt(C0,"textFunction"),mt(_0,"default")});function A0(){this.innerHTML=""}function L0(e){return function(){this.innerHTML=e}}function N0(t){return function(){var e=t.apply(this,arguments);this.innerHTML=e??""}}function I0(e){return arguments.length?this.each(null==e?A0:("function"==typeof e?N0:L0)(e)):this.node().innerHTML}var R0=b(()=>{mt(A0,"htmlRemove"),mt(L0,"htmlConstant"),mt(N0,"htmlFunction"),mt(I0,"default")});function M0(){this.nextSibling&&this.parentNode.appendChild(this)}function D0(){return this.each(M0)}var O0=b(()=>{mt(M0,"raise"),mt(D0,"default")});function P0(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function B0(){return this.each(P0)}var $0=b(()=>{mt(P0,"lower"),mt(B0,"default")});function F0(e){var t="function"==typeof e?e:Dd(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}var z0=b(()=>{Od(),mt(F0,"default")});function G0(){return null}function U0(e,t){var r="function"==typeof e?e:Dd(e),n=null==t?G0:"function"==typeof t?t:Bd(t);return this.select(function(){return this.insertBefore(r.apply(this,arguments),n.apply(this,arguments)||null)})}var q0=b(()=>{Od(),$d(),mt(G0,"constantNull"),mt(U0,"default")});function j0(){var e=this.parentNode;e&&e.removeChild(this)}function Y0(){return this.each(j0)}var W0=b(()=>{mt(j0,"remove"),mt(Y0,"default")});function H0(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function V0(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function X0(e){return this.select(e?V0:H0)}var K0=b(()=>{mt(H0,"selection_cloneShallow"),mt(V0,"selection_cloneDeep"),mt(X0,"default")});function Z0(e){return arguments.length?this.property("__data__",e):this.node().__data__}var Q0=b(()=>{mt(Z0,"default")});function J0(t){return function(e){t.call(this,e,this.__data__)}}function eg(e){return e.trim().split(/^|\s+/).map(function(e){var t="",r=e.indexOf(".");return 0<=r&&(t=e.slice(r+1),e=e.slice(0,r)),{type:e,name:t}})}function tg(a){return function(){var e=this.__on;if(e){for(var t,r=0,n=-1,i=e.length;r<i;++r)t=e[r],a.type&&t.type!==a.type||t.name!==a.name?e[++n]=t:this.removeEventListener(t.type,t.listener,t.options);++n?e.length=n:delete this.__on}}}function rg(a,s,o){return function(){var e,t=this.__on,r=J0(s);if(t)for(var n=0,i=t.length;n<i;++n)if((e=t[n]).type===a.type&&e.name===a.name)return this.removeEventListener(e.type,e.listener,e.options),this.addEventListener(e.type,e.listener=r,e.options=o),void(e.value=s);this.addEventListener(a.type,r,o),e={type:a.type,name:a.name,value:s,listener:r,options:o},t?t.push(e):this.__on=[e]}}function ng(e,t,r){var n,i,a=eg(e+""),s=a.length;if(!(arguments.length<2)){for(o=t?rg:tg,n=0;n<s;++n)this.each(o(a[n],t,r));return this}var o=this.node().__on;if(o)for(var l,c=0,h=o.length;c<h;++c)for(n=0,l=o[c];n<s;++n)if((i=a[n]).type===l.type&&i.name===l.name)return l.value}var ig=b(()=>{mt(J0,"contextListener"),mt(eg,"parseTypenames"),mt(tg,"onRemove"),mt(rg,"onAdd"),mt(ng,"default")});function ag(e,t,r){var n=e0(e),i=n.CustomEvent;"function"==typeof i?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 sg(e,t){return function(){return ag(this,e,t)}}function og(e,t){return function(){return ag(this,e,t.apply(this,arguments))}}function lg(e,t){return this.each(("function"==typeof t?og:sg)(e,t))}var cg=b(()=>{t0(),mt(ag,"dispatchEvent"),mt(sg,"dispatchConstant"),mt(og,"dispatchFunction"),mt(lg,"default")});function*hg(){for(var e=this._groups,t=0,r=e.length;t<r;++t)for(var n,i=e[t],a=0,s=i.length;a<s;++a)(n=i[a])&&(yield n)}var ug=b(()=>{mt(hg,"default")});function dg(e,t){this._groups=e,this._parents=t}function pg(){return new dg([[document.documentElement]],fg)}function gg(){return this}var fg,mg,yg=b(()=>{zd(),Vd(),rp(),op(),cp(),kp(),gp(),Ep(),_p(),Ap(),Np(),Mp(),Op(),Bp(),Fp(),Gp(),qp(),Yp(),Jp(),o0(),d0(),k0(),S0(),R0(),O0(),$0(),z0(),q0(),W0(),K0(),Q0(),ig(),cg(),ug(),fg=[null],mt(dg,"Selection"),mt(pg,"selection"),mt(gg,"selection_selection"),dg.prototype=pg.prototype={constructor:dg,select:Fd,selectAll:Hd,selectChild:ep,selectChildren:ap,filter:lp,data:bp,enter:dp,exit:Tp,join:Cp,merge:Sp,selection:gg,order:Lp,sort:Ip,call:Dp,nodes:Pp,node:$p,size:zp,empty:Up,each:jp,attr:Qp,style:a0,property:u0,classed:w0,text:_0,html:I0,raise:D0,lower:B0,append:F0,insert:U0,remove:Y0,clone:X0,datum:Z0,on:ng,dispatch:lg,[Symbol.iterator]:hg},mg=pg});function H(e){return"string"==typeof e?new dg([[document.querySelector(e)]],[document.documentElement]):new dg([[e]],fg)}var vg=b(()=>{yg(),mt(H,"default")}),xg=b(()=>{Zd(),Id(),vg(),yg(),$d(),Yd(),o0()}),bg=b(()=>{});function wg(e,t,r){(e.prototype=t.prototype=r).constructor=e}function kg(e,t){var r,n=Object.create(e.prototype);for(r in t)n[r]=t[r];return n}var Tg=b(()=>{mt(wg,"default"),mt(kg,"extend")});function Eg(){}function Cg(){return this.rgb().formatHex()}function _g(){return this.rgb().formatHex8()}function Sg(){return Ug(this).formatHsl()}function Ag(){return this.rgb().formatRgb()}function Lg(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=Zg.exec(e))?(r=t[1].length,t=parseInt(t[1],16),6===r?Ng(t):3===r?new Dg(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===r?Ig(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===r?Ig(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=Qg.exec(e))?new Dg(t[1],t[2],t[3],1):(t=Jg.exec(e))?new Dg(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=e1.exec(e))?Ig(t[1],t[2],t[3],t[4]):(t=t1.exec(e))?Ig(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=r1.exec(e))?Gg(t[1],t[2]/100,t[3]/100,1):(t=n1.exec(e))?Gg(t[1],t[2]/100,t[3]/100,t[4]):i1.hasOwnProperty(e)?Ng(i1[e]):"transparent"===e?new Dg(NaN,NaN,NaN,0):null}function Ng(e){return new Dg(e>>16&255,e>>8&255,255&e,1)}function Ig(e,t,r,n){return new Dg(e=n<=0?t=r=NaN:e,t,r,n)}function Rg(e){return(e=e instanceof Eg?e:Lg(e))?new Dg((e=e.rgb()).r,e.g,e.b,e.opacity):new Dg}function Mg(e,t,r,n){return 1===arguments.length?Rg(e):new Dg(e,t,r,n??1)}function Dg(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}function Og(){return"#"+zg(this.r)+zg(this.g)+zg(this.b)}function Pg(){return"#"+zg(this.r)+zg(this.g)+zg(this.b)+zg(255*(isNaN(this.opacity)?1:this.opacity))}function Bg(){var e=$g(this.opacity);return(1===e?"rgb(":"rgba(")+Fg(this.r)+`, ${Fg(this.g)}, `+Fg(this.b)+(1===e?")":`, ${e})`)}function $g(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Fg(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function zg(e){return((e=Fg(e))<16?"0":"")+e.toString(16)}function Gg(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||1<=r?e=t=NaN:t<=0&&(e=NaN),new jg(e,t,r,n)}function Ug(e){var t,r,n,i,a,s,o,l;return e instanceof jg?new jg(e.h,e.s,e.l,e.opacity):(e=e instanceof Eg?e:Lg(e))?e instanceof jg?e:(t=(e=e.rgb()).r/255,r=e.g/255,n=e.b/255,i=Math.min(t,r,n),s=NaN,l=((a=Math.max(t,r,n))+i)/2,(o=a-i)?(s=t===a?(r-n)/o+6*(r<n):r===a?(n-t)/o+2:(t-r)/o+4,o/=l<.5?a+i:2-a-i,s*=60):o=0<l&&l<1?0:s,new jg(s,o,l,e.opacity)):new jg}function qg(e,t,r,n){return 1===arguments.length?Ug(e):new jg(e,t,r,n??1)}function jg(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}function Yg(e){return(e=(e||0)%360)<0?e+360:e}function Wg(e){return Math.max(0,Math.min(1,e||0))}function Hg(e,t,r){return 255*(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)}var Vg,Xg,Kg,Zg,Qg,Jg,e1,t1,r1,n1,i1,a1,s1,o1=b(()=>{Tg(),mt(Eg,"Color"),Vg="\\s*([+-]?\\d+)\\s*",Xg="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Kg="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Zg=/^#([0-9a-f]{3,8})$/,Qg=new RegExp(`^rgb\\(${Vg},${Vg},${Vg}\\)$`),Jg=new RegExp(`^rgb\\(${Kg},${Kg},${Kg}\\)$`),e1=new RegExp(`^rgba\\(${Vg},${Vg},${Vg},${Xg}\\)$`),t1=new RegExp(`^rgba\\(${Kg},${Kg},${Kg},${Xg}\\)$`),r1=new RegExp(`^hsl\\(${Xg},${Kg},${Kg}\\)$`),n1=new RegExp(`^hsla\\(${Xg},${Kg},${Kg},${Xg}\\)$`),i1={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},wg(Eg,Lg,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Cg,formatHex:Cg,formatHex8:_g,formatHsl:Sg,formatRgb:Ag,toString:Ag}),mt(Cg,"color_formatHex"),mt(_g,"color_formatHex8"),mt(Sg,"color_formatHsl"),mt(Ag,"color_formatRgb"),mt(Lg,"color"),mt(Ng,"rgbn"),mt(Ig,"rgba"),mt(Rg,"rgbConvert"),mt(Mg,"rgb"),mt(Dg,"Rgb"),wg(Dg,Mg,kg(Eg,{brighter(e){return e=null==e?1/.7:Math.pow(1/.7,e),new Dg(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?.7:Math.pow(.7,e),new Dg(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Dg(Fg(this.r),Fg(this.g),Fg(this.b),$g(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:Og,formatHex:Og,formatHex8:Pg,formatRgb:Bg,toString:Bg})),mt(Og,"rgb_formatHex"),mt(Pg,"rgb_formatHex8"),mt(Bg,"rgb_formatRgb"),mt($g,"clampa"),mt(Fg,"clampi"),mt(zg,"hex"),mt(Gg,"hsla"),mt(Ug,"hslConvert"),mt(qg,"hsl"),mt(jg,"Hsl"),wg(jg,qg,kg(Eg,{brighter(e){return e=null==e?1/.7:Math.pow(1/.7,e),new jg(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?.7:Math.pow(.7,e),new jg(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l;return new Dg(Hg(240<=e?e-240:120+e,r=2*r-(t=r+(r<.5?r:1-r)*t),t),Hg(e,r,t),Hg(e<120?240+e:e-120,r,t),this.opacity)},clamp(){return new jg(Yg(this.h),Wg(this.s),Wg(this.l),$g(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(){var e=$g(this.opacity);return(1===e?"hsl(":"hsla(")+Yg(this.h)+`, ${100*Wg(this.s)}%, ${100*Wg(this.l)}%`+(1===e?")":`, ${e})`)}})),mt(Yg,"clamph"),mt(Wg,"clampt"),mt(Hg,"hsl2rgb")}),l1=b(()=>{a1=Math.PI/180,s1=180/Math.PI});function c1(e){var t,r,n,i,a,s;return e instanceof u1?new u1(e.l,e.a,e.b,e.opacity):e instanceof v1?x1(e):(i=d1(.2225045*(t=f1((e=e instanceof Dg?e:Rg(e)).r))+.7168786*(r=f1(e.g))+.0606169*(n=f1(e.b))),t===r&&r===n?a=s=i:(a=d1((.4360747*t+.3850649*r+.1430804*n)/.96422),s=d1((.0139322*t+.0971045*r+.7141733*n)/.82521)),new u1(116*i-16,500*(a-i),200*(i-s),e.opacity))}function h1(e,t,r,n){return 1===arguments.length?c1(e):new u1(e,t,r,n??1)}function u1(e,t,r,n){this.l=+e,this.a=+t,this.b=+r,this.opacity=+n}function d1(e){return T1<e?Math.pow(e,1/3):e/k1+b1}function p1(e){return w1<e?e*e*e:k1*(e-b1)}function g1(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function f1(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function m1(e){var t;return e instanceof v1?new v1(e.h,e.c,e.l,e.opacity):0===(e=e instanceof u1?e:c1(e)).a&&0===e.b?new v1(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity):new v1((t=Math.atan2(e.b,e.a)*s1)<0?360+t:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}function y1(e,t,r,n){return 1===arguments.length?m1(e):new v1(e,t,r,n??1)}function v1(e,t,r,n){this.h=+e,this.c=+t,this.l=+r,this.opacity=+n}function x1(e){var t;return isNaN(e.h)?new u1(e.l,0,0,e.opacity):(t=e.h*a1,new u1(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity))}var b1,w1,k1,T1,E1=b(()=>{Tg(),o1(),l1(),b1=4/29,k1=3*(w1=6/29)*w1,T1=w1*w1*w1,mt(c1,"labConvert"),mt(h1,"lab"),mt(u1,"Lab"),wg(u1,h1,kg(Eg,{brighter(e){return new u1(this.l+18*(e??1),this.a,this.b,this.opacity)},darker(e){return new u1(this.l-18*(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 new Dg(g1(3.1338561*(t=.96422*p1(t))-1.6168667*(e=+p1(e))-.4906146*(r=.82521*p1(r))),g1(-.9787684*t+1.9161415*e+.033454*r),g1(.0719453*t-.2289914*e+1.4052427*r),this.opacity)}})),mt(d1,"xyz2lab"),mt(p1,"lab2xyz"),mt(g1,"lrgb2rgb"),mt(f1,"rgb2lrgb"),mt(m1,"hclConvert"),mt(y1,"hcl"),mt(v1,"Hcl"),mt(x1,"hcl2lab"),wg(v1,y1,kg(Eg,{brighter(e){return new v1(this.h,this.c,this.l+18*(e??1),this.opacity)},darker(e){return new v1(this.h,this.c,this.l-18*(e??1),this.opacity)},rgb(){return x1(this).rgb()}}))}),C1=b(()=>{o1(),E1()});function _1(e,t,r,n,i){var a=e*e,s=a*e;return((1-3*e+3*a-s)*t+(4-6*a+3*s)*r+(1+3*e+3*a-3*s)*n+s*i)/6}function S1(s){var o=s.length-1;return function(e){var t=e<=0?e=0:1<=e?o-(e=1):Math.floor(e*o),r=s[t],n=s[t+1],i=0<t?s[t-1]:2*r-n,a=t<o-1?s[t+2]:2*n-r;return _1((e-t/o)*o,i,r,n,a)}}var A1=b(()=>{mt(_1,"basis"),mt(S1,"default")});function L1(n){var i=n.length;return function(e){var t=Math.floor(((e%=1)<0?++e:e)*i),r=n[(t+i-1)%i];return _1((e-t/i)*i,r,n[t%i],n[(t+1)%i],n[(t+2)%i])}}var N1,I1=b(()=>{A1(),mt(L1,"default")}),R1=b(()=>{N1=mt(e=>()=>e,"default")});function M1(t,r){return function(e){return t+e*r}}function D1(t,r,n){return t=Math.pow(t,n),r=Math.pow(r,n)-t,n=1/n,function(e){return Math.pow(t+e*r,n)}}function O1(e,t){var r=t-e;return r?M1(e,180<r||r<-180?r-360*Math.round(r/360):r):N1(isNaN(e)?t:e)}function P1(r){return 1==(r=+r)?B1:function(e,t){return t-e?D1(e,t,r):N1(isNaN(e)?t:e)}}function B1(e,t){var r=t-e;return r?M1(e,r):N1(isNaN(e)?t:e)}var $1=b(()=>{R1(),mt(M1,"linear"),mt(D1,"exponential"),mt(O1,"hue"),mt(P1,"gamma"),mt(B1,"nogamma")});function F1(o){return function(e){for(var t,r=e.length,n=new Array(r),i=new Array(r),a=new Array(r),s=0;s<r;++s)t=Mg(e[s]),n[s]=t.r||0,i[s]=t.g||0,a[s]=t.b||0;return n=o(n),i=o(i),a=o(a),t.opacity=1,function(e){return t.r=n(e),t.g=i(e),t.b=a(e),t+""}}}var z1,G1=b(()=>{C1(),A1(),I1(),$1(),z1=mt(function e(t){var s=P1(t);function r(t,e){var r=s((t=Mg(t)).r,(e=Mg(e)).r),n=s(t.g,e.g),i=s(t.b,e.b),a=B1(t.opacity,e.opacity);return function(e){return t.r=r(e),t.g=n(e),t.b=i(e),t.opacity=a(e),t+""}}return mt(r,"rgb"),r.gamma=e,r},"rgbGamma")(1),mt(F1,"rgbSpline"),F1(S1),F1(L1)});function U1(t,r){r=r||[];var n,i=t?Math.min(r.length,t.length):0,a=r.slice();return function(e){for(n=0;n<i;++n)a[n]=t[n]*(1-e)+r[n]*e;return a}}function q1(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}var j1=b(()=>{mt(U1,"default"),mt(q1,"isNumberArray")});function Y1(e,t){for(var r=t?t.length:0,n=e?Math.min(r,e.length):0,i=new Array(n),a=new Array(r),s=0;s<n;++s)i[s]=sf(e[s],t[s]);for(;s<r;++s)a[s]=t[s];return function(e){for(s=0;s<n;++s)a[s]=i[s](e);return a}}var W1=b(()=>{of(),mt(Y1,"genericArray")});function H1(t,r){var n=new Date;return t=+t,r=+r,function(e){return n.setTime(t*(1-e)+r*e),n}}var V1=b(()=>{mt(H1,"default")});function X1(t,r){return t=+t,r=+r,function(e){return t*(1-e)+r*e}}var K1=b(()=>{mt(X1,"default")});function Z1(e,t){var r,n={},i={};for(r in null!==e&&"object"==typeof e||(e={}),t=null!==t&&"object"==typeof t?t:{})r in e?n[r]=sf(e[r],t[r]):i[r]=t[r];return function(e){for(r in n)i[r]=n[r](e);return i}}var Q1=b(()=>{of(),mt(Z1,"default")});function J1(e){return function(){return e}}function ef(t){return function(e){return t(e)+""}}function tf(e,n){var t,r,i,a=rf.lastIndex=nf.lastIndex=0,s=-1,o=[],l=[];for(e+="",n+="";(t=rf.exec(e))&&(r=nf.exec(n));)(i=r.index)>a&&(i=n.slice(a,i),o[s]?o[s]+=i:o[++s]=i),(t=t[0])===(r=r[0])?o[s]?o[s]+=r:o[++s]=r:(o[++s]=null,l.push({i:s,x:X1(t,r)})),a=nf.lastIndex;return a<n.length&&(i=n.slice(a),o[s]?o[s]+=i:o[++s]=i),o.length<2?l[0]?ef(l[0].x):J1(n):(n=l.length,function(e){for(var t,r=0;r<n;++r)o[(t=l[r]).i]=t.x(e);return o.join("")})}var rf,nf,af=b(()=>{K1(),rf=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,nf=new RegExp(rf.source,"g"),mt(J1,"zero"),mt(ef,"one"),mt(tf,"default")});function sf(e,t){var r=typeof t;return null==t||"boolean"==r?N1(t):("number"==r?X1:"string"==r?(r=Lg(t))?(t=r,z1):tf:t instanceof Lg?z1:t instanceof Date?H1:q1(t)?U1:Array.isArray(t)?Y1:"function"!=typeof t.valueOf&&"function"!=typeof t.toString||isNaN(t)?Z1:X1)(e,t)}var of=b(()=>{C1(),G1(),W1(),V1(),K1(),Q1(),af(),R1(),j1(),mt(sf,"default")});function lf(t,r){return t=+t,r=+r,function(e){return Math.round(t*(1-e)+r*e)}}var cf=b(()=>{mt(lf,"default")});function hf(e,t,r,n,i,a){var s,o,l;return(s=Math.sqrt(e*e+t*t))&&(e/=s,t/=s),(l=e*r+t*n)&&(r-=e*l,n-=t*l),(o=Math.sqrt(r*r+n*n))&&(r/=o,n/=o,l/=o),e*n<t*r&&(e=-e,t=-t,l=-l,s=-s),{translateX:i,translateY:a,rotate:Math.atan2(t,e)*uf,skewX:Math.atan(l)*uf,scaleX:s,scaleY:o}}var uf,df,pf=b(()=>{uf=180/Math.PI,df={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1},mt(hf,"default")});function gf(e){return(e=new("function"==typeof DOMMatrix?DOMMatrix:WebKitCSSMatrix)(e+"")).isIdentity?df:hf(e.a,e.b,e.c,e.d,e.e,e.f)}function ff(e){return null!=e&&((mf=mf||document.createElementNS("http://www.w3.org/2000/svg","g")).setAttribute("transform",e),e=mf.transform.baseVal.consolidate())?hf((e=e.matrix).a,e.b,e.c,e.d,e.e,e.f):df}var mf,yf=b(()=>{pf(),mt(gf,"parseCss"),mt(ff,"parseSvg")});function vf(r,o,l,i){function c(e){return e.length?e.pop()+" ":""}function n(e,t,r,n,i,a){var s;e!==r||t!==n?(s=i.push("translate(",null,o,null,l),a.push({i:s-4,x:X1(e,r)},{i:s-2,x:X1(t,n)})):(r||n)&&i.push("translate("+r+o+n+l)}function s(e,t,r,n){e!==t?(180<e-t?t+=360:180<t-e&&(e+=360),n.push({i:r.push(c(r)+"rotate(",null,i)-2,x:X1(e,t)})):t&&r.push(c(r)+"rotate("+t+i)}function h(e,t,r,n){e!==t?n.push({i:r.push(c(r)+"skewX(",null,i)-2,x:X1(e,t)}):t&&r.push(c(r)+"skewX("+t+i)}function u(e,t,r,n,i,a){var s;e!==r||t!==n?(s=i.push(c(i)+"scale(",null,",",null,")"),a.push({i:s-4,x:X1(e,r)},{i:s-2,x:X1(t,n)})):1===r&&1===n||i.push(c(i)+"scale("+r+","+n+")")}return mt(c,"pop"),mt(n,"translate"),mt(s,"rotate"),mt(h,"skewX"),mt(u,"scale"),function(e,t){var i=[],a=[];return e=r(e),t=r(t),n(e.translateX,e.translateY,t.translateX,t.translateY,i,a),s(e.rotate,t.rotate,i,a),h(e.skewX,t.skewX,i,a),u(e.scaleX,e.scaleY,t.scaleX,t.scaleY,i,a),function(e){for(var t,r=-1,n=a.length;++r<n;)i[(t=a[r]).i]=t.x(e);return i.join("")}}}var xf,bf,wf=b(()=>{K1(),yf(),mt(vf,"interpolateTransform"),xf=vf(gf,"px, ","px)","deg)"),bf=vf(ff,", ",")",")")});function kf(s){return function(t,e){var r=s((t=y1(t)).h,(e=y1(e)).h),n=B1(t.c,e.c),i=B1(t.l,e.l),a=B1(t.opacity,e.opacity);return function(e){return t.h=r(e),t.c=n(e),t.l=i(e),t.opacity=a(e),t+""}}}var Tf,Ef=b(()=>{C1(),$1(),mt(kf,"hcl"),Tf=kf(O1),kf(B1)}),Cf=b(()=>{of(),K1(),cf(),af(),wf(),G1(),Ef()});function _f(){return Uf||(Yf(Sf),Uf=jf.now()+qf)}function Sf(){Uf=0}function Af(){this._call=this._time=this._next=null}function Lf(e,t,r){var n=new Af;return n.restart(e,t,r),n}function Nf(){_f(),++Of;for(var e,t=Ff;t;)0<=(e=Uf-t._time)&&t._call.call(void 0,e),t=t._next;--Of}function If(){Uf=(Gf=jf.now())+qf,Of=Pf=0;try{Nf()}finally{Of=0,Mf(),Uf=0}}function Rf(){var e=jf.now(),t=e-Gf;$f<t&&(qf-=t,Gf=e)}function Mf(){for(var e,t,r=Ff,n=1/0;r;)r=r._call?(n>r._time&&(n=r._time),(e=r)._next):(t=r._next,r._next=null,e?e._next=t:Ff=t);zf=e,Df(n)}function Df(e){Of||(Pf=Pf&&clearTimeout(Pf),24<e-Uf?(e<1/0&&(Pf=setTimeout(If,e-jf.now()-qf)),Bf=Bf&&clearInterval(Bf)):(Bf||(Gf=jf.now(),Bf=setInterval(Rf,$f)),Of=1,Yf(If)))}var Of,Pf,Bf,$f,Ff,zf,Gf,Uf,qf,jf,Yf,Wf=b(()=>{$f=1e3,qf=Uf=Gf=Bf=Pf=Of=0,jf="object"==typeof performance&&performance.now?performance:Date,Yf="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)},mt(_f,"now"),mt(Sf,"clearNow"),mt(Af,"Timer"),Af.prototype=Lf.prototype={constructor:Af,restart:mt(function(e,t,r){if("function"!=typeof e)throw new TypeError("callback is not a function");r=(null==r?_f():+r)+(null==t?0:+t),this._next||zf===this||(zf?zf._next=this:Ff=this,zf=this),this._call=e,this._time=r,Df()},"restart"),stop:mt(function(){this._call&&(this._call=null,this._time=1/0,Df())},"stop")},mt(Lf,"timer"),mt(Nf,"timerFlush"),mt(If,"wake"),mt(Rf,"poke"),mt(Mf,"nap"),mt(Df,"sleep")});function Hf(t,r,e){var n=new Af;return r=null==r?0:+r,n.restart(e=>{n.stop(),t(e+r)},r,e),n}var Vf=b(()=>{Wf(),mt(Hf,"default")}),Xf=b(()=>{Wf(),Vf()});function Kf(e,t,r,n,i,a){var s=e.__transition;if(s){if(r in s)return}else e.__transition={};em(e,r,{name:t,index:n,group:i,on:tm,tween:rm,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:nm})}function Zf(e,t){if((e=Jf(e,t)).state>nm)throw new Error("too late; already scheduled");return e}function Qf(e,t){if((e=Jf(e,t)).state>sm)throw new Error("too late; already running");return e}function Jf(e,t){if(e=(e=e.__transition)&&e[t])return e;throw new Error("transition not found")}function em(a,s,o){var l,c=a.__transition;function e(e){o.state=im,o.timer.restart(h,o.delay,o.time),o.delay<=e&&h(e-o.delay)}function h(e){var t,r,n,i;if(o.state!==im)return d();for(t in c)if(i=c[t],i.name===o.name){if(i.state===sm)return Hf(h);i.state===om?(i.state=cm,i.timer.stop(),i.on.call("interrupt",a,a.__data__,i.index,i.group),delete c[t]):+t<s&&(i.state=cm,i.timer.stop(),i.on.call("cancel",a,a.__data__,i.index,i.group),delete c[t])}if(Hf(function(){o.state===sm&&(o.state=om,o.timer.restart(u,o.delay,o.time),u(e))}),o.state=am,o.on.call("start",a,a.__data__,o.index,o.group),o.state===am){for(o.state=sm,l=new Array(n=o.tween.length),t=0,r=-1;t<n;++t)(i=o.tween[t].value.call(a,a.__data__,o.index,o.group))&&(l[++r]=i);l.length=r+1}}function u(e){for(var t=e<o.duration?o.ease.call(null,e/o.duration):(o.timer.restart(d),o.state=lm,1),r=-1,n=l.length;++r<n;)l[r].call(a,t);o.state===lm&&(o.on.call("end",a,a.__data__,o.index,o.group),d())}function d(){for(var e in o.state=cm,o.timer.stop(),delete c[s],c)return;delete a.__transition}(c[s]=o).timer=Lf(e,0,o.time),mt(e,"schedule"),mt(h,"start"),mt(u,"tick"),mt(d,"stop")}var tm,rm,nm,im,am,sm,om,lm,cm,hm=b(()=>{Ad(),Xf(),tm=Ed("start","end","cancel","interrupt"),rm=[],nm=0,im=1,am=2,sm=3,om=4,lm=5,cm=6,mt(Kf,"default"),mt(Zf,"init"),mt(Qf,"set"),mt(Jf,"get"),mt(em,"create")});function um(e,t){var r,n,i,a=e.__transition,s=!0;if(a){for(i in t=null==t?null:t+"",a)(r=a[i]).name!==t?s=!1:(n=am<r.state&&r.state<lm,r.state=cm,r.timer.stop(),r.on.call(n?"interrupt":"cancel",e,e.__data__,r.index,r.group),delete a[i]);s&&delete e.__transition}}var dm=b(()=>{hm(),mt(um,"default")});function pm(e){return this.each(function(){um(this,e)})}var gm=b(()=>{dm(),mt(pm,"default")});function fm(i,a){var s,o;return function(){var e=Qf(this,i),t=e.tween;if(t!==s)for(var r=0,n=(o=s=t).length;r<n;++r)if(o[r].name===a){(o=o.slice()).splice(r,1);break}e.tween=o}}function mm(a,s,o){var l,c;if("function"!=typeof o)throw new Error;return function(){var e=Qf(this,a),t=e.tween;if(t!==l){c=(l=t).slice();for(var r={name:s,value:o},n=0,i=c.length;n<i;++n)if(c[n].name===s){c[n]=r;break}n===i&&c.push(r)}e.tween=c}}function ym(e,t){var r=this._id;if(e+="",arguments.length<2){for(var n,i=Jf(this.node(),r).tween,a=0,s=i.length;a<s;++a)if((n=i[a]).name===e)return n.value;return null}return this.each((null==t?fm:mm)(r,e,t))}function vm(e,t,r){var n=e._id;return e.each(function(){var e=Qf(this,n);(e.value||(e.value={}))[t]=r.apply(this,arguments)}),function(e){return Jf(e,n).value[t]}}var xm=b(()=>{hm(),mt(fm,"tweenRemove"),mt(mm,"tweenFunction"),mt(ym,"default"),mt(vm,"tweenValue")});function bm(e,t){var r;return("number"==typeof t?X1:t instanceof Lg?z1:(r=Lg(t))?(t=r,z1):tf)(e,t)}var wm=b(()=>{C1(),Cf(),mt(bm,"default")});function km(e){return function(){this.removeAttribute(e)}}function Tm(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Em(t,r,n){var i,a,s=n+"";return function(){var e=this.getAttribute(t);return e===s?null:e===i?a:a=r(i=e,n)}}function Cm(t,r,n){var i,a,s=n+"";return function(){var e=this.getAttributeNS(t.space,t.local);return e===s?null:e===i?a:a=r(i=e,n)}}function _m(n,i,a){var s,o,l;return function(){var e,t,r=a(this);return null==r?void this.removeAttribute(n):(e=this.getAttribute(n))===(t=r+"")?null:e===s&&t===o?l:(o=t,l=i(s=e,r))}}function Sm(n,i,a){var s,o,l;return function(){var e,t,r=a(this);return null==r?void this.removeAttributeNS(n.space,n.local):(e=this.getAttributeNS(n.space,n.local))===(t=r+"")?null:e===s&&t===o?l:(o=t,l=i(s=e,r))}}function Am(e,t){var r=Nd(e),n="transform"===r?bf:bm;return this.attrTween(e,"function"==typeof t?(r.local?Sm:_m)(r,n,vm(this,"attr."+e,t)):null==t?(r.local?Tm:km)(r):(r.local?Cm:Em)(r,n,t))}var Lm=b(()=>{Cf(),xg(),xm(),wm(),mt(km,"attrRemove"),mt(Tm,"attrRemoveNS"),mt(Em,"attrConstant"),mt(Cm,"attrConstantNS"),mt(_m,"attrFunction"),mt(Sm,"attrFunctionNS"),mt(Am,"default")});function Nm(t,r){return function(e){this.setAttribute(t,r.call(this,e))}}function Im(t,r){return function(e){this.setAttributeNS(t.space,t.local,r.call(this,e))}}function Rm(t,r){var n,i;function e(){var e=r.apply(this,arguments);return n=e!==i?(i=e)&&Im(t,e):n}return mt(e,"tween"),e._value=r,e}function Mm(t,r){var n,i;function e(){var e=r.apply(this,arguments);return n=e!==i?(i=e)&&Nm(t,e):n}return mt(e,"tween"),e._value=r,e}function Dm(e,t){var r="attr."+e;if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==t)return this.tween(r,null);if("function"!=typeof t)throw new Error;return e=Nd(e),this.tween(r,(e.local?Rm:Mm)(e,t))}var Om=b(()=>{xg(),mt(Nm,"attrInterpolate"),mt(Im,"attrInterpolateNS"),mt(Rm,"attrTweenNS"),mt(Mm,"attrTween"),mt(Dm,"default")});function Pm(e,t){return function(){Zf(this,e).delay=+t.apply(this,arguments)}}function Bm(e,t){return t=+t,function(){Zf(this,e).delay=t}}function $m(e){var t=this._id;return arguments.length?this.each(("function"==typeof e?Pm:Bm)(t,e)):Jf(this.node(),t).delay}var Fm=b(()=>{hm(),mt(Pm,"delayFunction"),mt(Bm,"delayConstant"),mt($m,"default")});function zm(e,t){return function(){Qf(this,e).duration=+t.apply(this,arguments)}}function Gm(e,t){return t=+t,function(){Qf(this,e).duration=t}}function Um(e){var t=this._id;return arguments.length?this.each(("function"==typeof e?zm:Gm)(t,e)):Jf(this.node(),t).duration}var qm=b(()=>{hm(),mt(zm,"durationFunction"),mt(Gm,"durationConstant"),mt(Um,"default")});function jm(e,t){if("function"!=typeof t)throw new Error;return function(){Qf(this,e).ease=t}}function Ym(e){var t=this._id;return arguments.length?this.each(jm(t,e)):Jf(this.node(),t).ease}var Wm=b(()=>{hm(),mt(jm,"easeConstant"),mt(Ym,"default")});function Hm(t,r){return function(){var e=r.apply(this,arguments);if("function"!=typeof e)throw new Error;Qf(this,t).ease=e}}function Vm(e){if("function"!=typeof e)throw new Error;return this.each(Hm(this._id,e))}var Xm=b(()=>{hm(),mt(Hm,"easeVarying"),mt(Vm,"default")});function Km(e){"function"!=typeof e&&(e=Xd(e));for(var t=this._groups,r=t.length,n=new Array(r),i=0;i<r;++i)for(var a,s=t[i],o=s.length,l=n[i]=[],c=0;c<o;++c)(a=s[c])&&e.call(a,a.__data__,c,s)&&l.push(a);return new By(n,this._parents,this._name,this._id)}var Zm=b(()=>{xg(),Uy(),mt(Km,"default")});function Qm(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,r=e._groups,n=t.length,e=r.length,i=Math.min(n,e),a=new Array(n),s=0;s<i;++s)for(var o,l=t[s],c=r[s],h=l.length,u=a[s]=new Array(h),d=0;d<h;++d)(o=l[d]||c[d])&&(u[d]=o);for(;s<n;++s)a[s]=t[s];return new By(a,this._parents,this._name,this._id)}var Jm=b(()=>{Uy(),mt(Qm,"default")});function ey(e){return(e+"").trim().split(/^|\s+/).every(function(e){var t=e.indexOf(".");return!(e=0<=t?e.slice(0,t):e)||"start"===e})}function ty(r,n,i){var a,s,o=ey(n)?Zf:Qf;return function(){var e=o(this,r),t=e.on;t!==a&&(s=(a=t).copy()).on(n,i),e.on=s}}function ry(e,t){var r=this._id;return arguments.length<2?Jf(this.node(),r).on.on(e):this.each(ty(r,e,t))}var ny=b(()=>{hm(),mt(ey,"start"),mt(ty,"onFunction"),mt(ry,"default")});function iy(r){return function(){var e,t=this.parentNode;for(e in this.__transition)if(+e!==r)return;t&&t.removeChild(this)}}function ay(){return this.on("end.remove",iy(this._id))}var sy=b(()=>{mt(iy,"removeFunction"),mt(ay,"default")});function oy(e){var t=this._name,r=this._id;"function"!=typeof e&&(e=Bd(e));for(var n=this._groups,i=n.length,a=new Array(i),s=0;s<i;++s)for(var o,l,c=n[s],h=c.length,u=a[s]=new Array(h),d=0;d<h;++d)(o=c[d])&&(l=e.call(o,o.__data__,d,c))&&("__data__"in o&&(l.__data__=o.__data__),u[d]=l,Kf(u[d],t,r,d,u,Jf(o,r)));return new By(a,this._parents,t,r)}var ly=b(()=>{xg(),Uy(),hm(),mt(oy,"default")});function cy(e){var t=this._name,r=this._id;"function"!=typeof e&&(e=jd(e));for(var n=this._groups,i=n.length,a=[],s=[],o=0;o<i;++o)for(var l,c=n[o],h=c.length,u=0;u<h;++u)if(l=c[u]){for(var d,p=e.call(l,l.__data__,u,c),g=Jf(l,r),f=0,m=p.length;f<m;++f)(d=p[f])&&Kf(d,t,r,f,p,g);a.push(p),s.push(l)}return new By(a,s,t,r)}var hy=b(()=>{xg(),Uy(),hm(),mt(cy,"default")});function uy(){return new dy(this._groups,this._parents)}var dy,py=b(()=>{xg(),dy=mg.prototype.constructor,mt(uy,"default")});function gy(r,n){var i,a,s;return function(){var e=s0(this,r),t=(this.style.removeProperty(r),s0(this,r));return e===t?null:e===i&&t===a?s:s=n(i=e,a=t)}}function fy(e){return function(){this.style.removeProperty(e)}}function my(t,r,n){var i,a,s=n+"";return function(){var e=s0(this,t);return e===s?null:e===i?a:a=r(i=e,n)}}function yy(n,i,a){var s,o,l;return function(){var e=s0(this,n),t=a(this),r=t+"";return null==t&&(this.style.removeProperty(n),r=t=s0(this,n)),e===r?null:e===s&&r===o?l:(o=r,l=i(s=e,t))}}function vy(n,i){var a,s,o,l,c="style."+i,h="end."+c;return function(){var e=Qf(this,n),t=e.on,r=null==e.value[c]?l=l||fy(i):void 0;t===a&&o===r||(s=(a=t).copy()).on(h,o=r),e.on=s}}function xy(e,t,r){var n="transform"==(e+="")?xf:bm;return null==t?this.styleTween(e,gy(e,n)).on("end.style."+e,fy(e)):"function"==typeof t?this.styleTween(e,yy(e,n,vm(this,"style."+e,t))).each(vy(this._id,e)):this.styleTween(e,my(e,n,t),r).on("end.style."+e,null)}var by=b(()=>{Cf(),xg(),hm(),xm(),wm(),mt(gy,"styleNull"),mt(fy,"styleRemove"),mt(my,"styleConstant"),mt(yy,"styleFunction"),mt(vy,"styleMaybeRemove"),mt(xy,"default")});function wy(t,r,n){return function(e){this.style.setProperty(t,r.call(this,e),n)}}function ky(t,r,n){var i,a;function e(){var e=r.apply(this,arguments);return i=e!==a?(a=e)&&wy(t,e,n):i}return mt(e,"tween"),e._value=r,e}function Ty(e,t,r){var n="style."+(e+="");if(arguments.length<2)return(n=this.tween(n))&&n._value;if(null==t)return this.tween(n,null);if("function"!=typeof t)throw new Error;return this.tween(n,ky(e,t,r??""))}var Ey=b(()=>{mt(wy,"styleInterpolate"),mt(ky,"styleTween"),mt(Ty,"default")});function Cy(e){return function(){this.textContent=e}}function _y(t){return function(){var e=t(this);this.textContent=e??""}}function Sy(e){return this.tween("text","function"==typeof e?_y(vm(this,"text",e)):Cy(null==e?"":e+""))}var Ay=b(()=>{xm(),mt(Cy,"textConstant"),mt(_y,"textFunction"),mt(Sy,"default")});function Ly(t){return function(e){this.textContent=t.call(this,e)}}function Ny(t){var r,n;function e(){var e=t.apply(this,arguments);return r=e!==n?(n=e)&&Ly(e):r}return mt(e,"tween"),e._value=t,e}function Iy(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(null==e)return this.tween(t,null);if("function"!=typeof e)throw new Error;return this.tween(t,Ny(e))}var Ry=b(()=>{mt(Ly,"textInterpolate"),mt(Ny,"textTween"),mt(Iy,"default")});function My(){for(var e=this._name,t=this._id,r=++zy,n=this._groups,i=n.length,a=0;a<i;++a)for(var s,o=n[a],l=o.length,c=0;c<l;++c)(s=o[c])&&Kf(s,e,r,c,o,{time:(s=Jf(s,t)).time+s.delay+s.duration,delay:0,duration:s.duration,ease:s.ease});return new By(n,this._parents,e,r)}var Dy=b(()=>{Uy(),hm(),mt(My,"default")});function Oy(){var i,a,s=this,o=s._id,l=s.size();return new Promise(function(e,t){var r={value:t},n={value:mt(function(){0==--l&&e()},"value")};s.each(function(){var e=Qf(this,o),t=e.on;t!==i&&((a=(i=t).copy())._.cancel.push(r),a._.interrupt.push(r),a._.end.push(n)),e.on=a}),0===l&&e()})}var Py=b(()=>{hm(),mt(Oy,"default")});function By(e,t,r,n){this._groups=e,this._parents=t,this._name=r,this._id=n}function $y(e){return mg().transition(e)}function Fy(){return++zy}var zy,Gy,Uy=b(()=>{xg(),Lm(),Om(),Fm(),qm(),Wm(),Xm(),Zm(),Jm(),ny(),sy(),ly(),hy(),py(),by(),Ey(),Ay(),Ry(),Dy(),xm(),Py(),zy=0,mt(By,"Transition"),mt($y,"transition"),mt(Fy,"newId"),Gy=mg.prototype,By.prototype=$y.prototype={constructor:By,select:oy,selectAll:cy,selectChild:Gy.selectChild,selectChildren:Gy.selectChildren,filter:Km,merge:Qm,selection:uy,transition:My,call:Gy.call,nodes:Gy.nodes,node:Gy.node,size:Gy.size,empty:Gy.empty,each:Gy.each,on:ry,attr:Am,attrTween:Dm,style:xy,styleTween:Ty,text:Sy,textTween:Iy,remove:ay,tween:ym,delay:$m,duration:Um,ease:Ym,easeVarying:Vm,end:Oy,[Symbol.iterator]:Gy[Symbol.iterator]}});function qy(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var jy=b(()=>{mt(qy,"cubicInOut")}),Yy=b(()=>{jy()});function Wy(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 Hy(e){var t,r;e=e instanceof By?(t=e._id,e._name):(t=++zy,(r=Vy).time=_f(),null==e?null:e+"");for(var n=this._groups,i=n.length,a=0;a<i;++a)for(var s,o=n[a],l=o.length,c=0;c<l;++c)(s=o[c])&&Kf(s,e,t,c,o,r||Wy(s,t));return new By(n,this._parents,e,t)}var Vy,Xy=b(()=>{Uy(),hm(),Yy(),Xf(),Vy={time:null,delay:0,duration:250,ease:qy},mt(Wy,"inherit"),mt(Hy,"default")}),Ky=b(()=>{xg(),gm(),Xy(),mg.prototype.interrupt=pm,mg.prototype.transition=Hy}),Zy=b(()=>{Ky()}),Qy=b(()=>{}),Jy=b(()=>{}),e2=b(()=>{});function t2(e){return[+e[0],+e[1]]}function r2(e){return[t2(e[0]),t2(e[1])]}function n2(e){return{type:e}}var i2,a2,s2,o2=b(()=>{Zy(),Qy(),Jy(),e2(),{abs:i2,max:a2,min:s2}=Math,mt(t2,"number1"),mt(r2,"number2"),["w","e"].map(n2),mt(function(e,t){return null==e?null:[[+e[0],t[0][1]],[+e[1],t[1][1]]]},"input"),mt(function(e){return e&&[e[0][0],e[1][0]]},"output"),["n","s"].map(n2),mt(function(e,t){return null==e?null:[[t[0][0],+e[0]],[t[1][0],+e[1]]]},"input"),mt(function(e){return e&&[e[0][1],e[1][1]]},"output"),["n","w","e","s","nw","ne","sw","se"].map(n2),mt(function(e){return null==e?null:r2(e)},"input"),mt(function(e){return e},"output"),mt(n2,"type")}),l2=b(()=>{o2()});function c2(r){this._+=r[0];for(let e=1,t=r.length;e<t;++e)this._+=arguments[e]+r[e]}function h2(e){var t=Math.floor(e);if(!(0<=t))throw new Error("invalid digits: "+e);if(15<t)return c2;let n=10**t;return function(r){this._+=r[0];for(let e=1,t=r.length;e<t;++e)this._+=Math.round(arguments[e]*n)/n+r[e]}}function u2(){return new m2}var d2,p2,g2,f2,m2,y2=b(()=>{d2=Math.PI,f2=(p2=2*d2)-(g2=1e-6),mt(c2,"append"),mt(h2,"appendRound"),m2=class{static{mt(this,"Path")}constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=null==e?c2:h2(e)}moveTo(e,t){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}`}closePath(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(e,t){this._append`L${this._x1=+e},${this._y1=+t}`}quadraticCurveTo(e,t,r,n){this._append`Q${+e},${+t},${this._x1=+r},${this._y1=+n}`}bezierCurveTo(e,t,r,n,i,a){this._append`C${+e},${+t},${+r},${+n},${this._x1=+i},${this._y1=+a}`}arcTo(e,t,r,n,i){if(e=+e,t=+t,r=+r,n=+n,(i=+i)<0)throw new Error("negative radius: "+i);var a,s,o=this._x1,l=this._y1,c=r-e,h=n-t,u=o-e,d=l-t,p=u*u+d*d;null===this._x1?this._append`M${this._x1=e},${this._y1=t}`:g2<p&&(Math.abs(d*c-h*u)>g2&&i?(s=c*c+h*h,n=(r-=o)*r+(o=n-l)*o,l=Math.sqrt(s),a=Math.sqrt(p),p=(s=i*Math.tan((d2-Math.acos((s+p-n)/(2*l*a)))/2))/a,n=s/l,Math.abs(p-1)>g2&&this._append`L${e+p*u},${t+p*d}`,this._append`A${i},${i},0,0,${+(u*o<d*r)},${this._x1=e+n*c},${this._y1=t+n*h}`):this._append`L${this._x1=e},${this._y1=t}`)}arc(e,t,r,n,i,a){if(e=+e,t=+t,a=!!a,(r=+r)<0)throw new Error("negative radius: "+r);var s=r*Math.cos(n),o=r*Math.sin(n),l=e+s,c=t+o,h=1^a,a=a?n-i:i-n;null===this._x1?this._append`M${l},${c}`:(Math.abs(this._x1-l)>g2||Math.abs(this._y1-c)>g2)&&this._append`L${l},${c}`,r&&((a=a<0?a%p2+p2:a)>f2?this._append`A${r},${r},0,1,${h},${e-s},${t-o}A${r},${r},0,1,${h},${this._x1=l},${this._y1=c}`:g2<a&&this._append`A${r},${r},0,${+(d2<=a)},${h},${this._x1=e+r*Math.cos(i)},${this._y1=t+r*Math.sin(i)}`)}rect(e,t,r,n){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}h${r=+r}v${+n}h${-r}Z`}toString(){return this._}},mt(u2,"path"),u2.prototype=m2.prototype}),v2=b(()=>{y2()}),x2=b(()=>{}),b2=b(()=>{}),w2=b(()=>{}),k2=b(()=>{}),T2=b(()=>{}),E2=b(()=>{}),C2=b(()=>{});function _2(e){return 1e21<=Math.abs(e=Math.round(e))?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function S2(e,t){var r;return(t=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0?null:[1<(r=e.slice(0,t)).length?r[0]+r.slice(2):r,+e.slice(t+1)]}var A2=b(()=>{mt(_2,"default"),mt(S2,"formatDecimalParts")});function L2(e){return(e=S2(Math.abs(e)))?e[1]:NaN}var N2=b(()=>{A2(),mt(L2,"default")});function I2(o,l){return function(e,t){for(var r=e.length,n=[],i=0,a=o[0],s=0;0<r&&0<a&&(t<s+a+1&&(a=Math.max(1,t-s)),n.push(e.substring(r-=a,r+a)),!((s+=a+1)>t));)a=o[i=(i+1)%o.length];return n.reverse().join(l)}}var R2=b(()=>{mt(I2,"default")});function M2(t){return function(e){return e.replace(/[0-9]/g,function(e){return t[+e]})}}var D2=b(()=>{mt(M2,"default")});function O2(e){var t;if(t=B2.exec(e))return new P2({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]});throw new Error("invalid format: "+e)}function P2(e){this.fill=void 0===e.fill?" ":e.fill+"",this.align=void 0===e.align?">":e.align+"",this.sign=void 0===e.sign?"-":e.sign+"",this.symbol=void 0===e.symbol?"":e.symbol+"",this.zero=!!e.zero,this.width=void 0===e.width?void 0:+e.width,this.comma=!!e.comma,this.precision=void 0===e.precision?void 0:+e.precision,this.trim=!!e.trim,this.type=void 0===e.type?"":e.type+""}var B2,$2=b(()=>{B2=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i,mt(O2,"formatSpecifier"),O2.prototype=P2.prototype,mt(P2,"FormatSpecifier"),P2.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type}});function F2(e){e:for(var t,r=e.length,n=1,i=-1;n<r;++n)switch(e[n]){case".":i=t=n;break;case"0":0===i&&(i=n),t=n;break;default:if(!+e[n])break e;0<i&&(i=0)}return 0<i?e.slice(0,i)+e.slice(t+1):e}var z2=b(()=>{mt(F2,"default")});function G2(e,t){var r,n,i=S2(e,t);return i?(r=i[0],(i=(i=i[1])-(U2=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1)===(n=r.length)?r:n<i?r+new Array(i-n+1).join("0"):0<i?r.slice(0,i)+"."+r.slice(i):"0."+new Array(1-i).join("0")+S2(e,Math.max(0,t+i-1))[0]):e+""}var U2,q2=b(()=>{A2(),mt(G2,"default")});function j2(e,t){var r;return(t=S2(e,t))?(r=t[0],(t=t[1])<0?"0."+new Array(-t).join("0")+r:r.length>t+1?r.slice(0,t+1)+"."+r.slice(t+1):r+new Array(t-r.length+2).join("0")):e+""}var Y2,W2=b(()=>{A2(),mt(j2,"default")}),H2=b(()=>{A2(),q2(),W2(),Y2={"%":mt((e,t)=>(100*e).toFixed(t),"%"),b:mt(e=>Math.round(e).toString(2),"b"),c:mt(e=>e+"","c"),d:_2,e:mt((e,t)=>e.toExponential(t),"e"),f:mt((e,t)=>e.toFixed(t),"f"),g:mt((e,t)=>e.toPrecision(t),"g"),o:mt(e=>Math.round(e).toString(8),"o"),p:mt((e,t)=>j2(100*e,t),"p"),r:j2,s:G2,X:mt(e=>Math.round(e).toString(16).toUpperCase(),"X"),x:mt(e=>Math.round(e).toString(16),"x")}});function V2(e){return e}var X2=b(()=>{mt(V2,"default")});function K2(e){var k=void 0===e.grouping||void 0===e.thousands?V2:I2(Z2.call(e.grouping,Number),e.thousands+""),n=void 0===e.currency?"":e.currency[0]+"",i=void 0===e.currency?"":e.currency[1]+"",T=void 0===e.decimal?".":e.decimal+"",E=void 0===e.numerals?V2:M2(Z2.call(e.numerals,String)),a=void 0===e.percent?"%":e.percent+"",C=void 0===e.minus?"−":e.minus+"",_=void 0===e.nan?"NaN":e.nan+"";function s(e){var c=(e=O2(e)).fill,h=e.align,u=e.sign,t=e.symbol,d=e.zero,p=e.width,g=e.comma,f=e.precision,m=e.trim,y=e.type,v=("n"===y?(g=!0,y="g"):Y2[y]||(void 0===f&&(f=12),m=!0,y="g"),(d||"0"===c&&"="===h)&&(d=!0,c="0",h="="),"$"===t?n:"#"===t&&/[boxX]/.test(y)?"0"+y.toLowerCase():""),x="$"===t?i:/[%p]/.test(y)?a:"",b=Y2[y],w=/[defgprs%]/.test(y);function r(e){var t,r,n,i=v,a=x;if("c"===y)a=b(e)+a,e="";else{var s=(e=+e)<0||1/e<0;if(e=isNaN(e)?_:b(Math.abs(e),f),m&&(e=F2(e)),i=((s=(!s||0!=+e||"+"===u)&&s)?"("===u?u:C:"-"===u||"("===u?"":u)+i,a=("s"===y?Q2[8+U2/3]:"")+a+(s&&"("===u?")":""),w)for(t=-1,r=e.length;++t<r;)if((n=e.charCodeAt(t))<48||57<n){a=(46===n?T+e.slice(t+1):e.slice(t))+a,e=e.slice(0,t);break}}g&&!d&&(e=k(e,1/0));var o=i.length+e.length+a.length,l=o<p?new Array(p-o+1).join(c):"";switch(g&&d&&(e=k(l+e,l.length?p-a.length:1/0),l=""),h){case"<":e=i+e+a+l;break;case"=":e=i+l+e+a;break;case"^":e=l.slice(0,o=l.length>>1)+i+e+a+l.slice(o);break;default:e=l+i+e+a}return E(e)}return f=void 0===f?6:/[gprs]/.test(y)?Math.max(1,Math.min(21,f)):Math.max(0,Math.min(20,f)),mt(r,"format"),r.toString=function(){return e+""},r}function t(e,t){var r=s(((e=O2(e)).type="f",e)),e=3*Math.max(-8,Math.min(8,Math.floor(L2(t)/3))),n=Math.pow(10,-e),i=Q2[8+e/3];return function(e){return r(n*e)+i}}return mt(s,"newFormat"),mt(t,"formatPrefix"),{format:s,formatPrefix:t}}var Z2,Q2,J2=b(()=>{N2(),R2(),D2(),$2(),z2(),H2(),q2(),X2(),Z2=Array.prototype.map,Q2=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"],mt(K2,"default")});function ev(e){return tv=K2(e),rv=tv.format,nv=tv.formatPrefix,tv}var tv,rv,nv,iv=b(()=>{J2(),ev({thousands:",",grouping:[3],currency:["$",""]}),mt(ev,"defaultLocale")});function av(e){return Math.max(0,-L2(Math.abs(e)))}var sv=b(()=>{N2(),mt(av,"default")});function ov(e,t){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(L2(t)/3)))-L2(Math.abs(e)))}var lv=b(()=>{N2(),mt(ov,"default")});function cv(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,L2(t)-L2(e))+1}var hv=b(()=>{N2(),mt(cv,"default")}),uv=b(()=>{iv(),$2(),sv(),lv(),hv()}),dv=b(()=>{});function pv(e){var t=0,r=e.children,n=r&&r.length;if(n)for(;0<=--n;)t+=r[n].value;else t=1;e.value=t}function gv(){return this.eachAfter(pv)}var fv=b(()=>{mt(pv,"count"),mt(gv,"default")});function mv(e,t){let r=-1;for(var n of this)e.call(t,n,++r,this);return this}var yv=b(()=>{mt(mv,"default")});function vv(e,t){for(var r,n,i,a=[this],s=-1;r=a.pop();)if(e.call(t,r,++s,this),n=r.children)for(i=n.length-1;0<=i;--i)a.push(n[i]);return this}var xv=b(()=>{mt(vv,"default")});function bv(e,t){for(var r,n,i,a=this,s=[a],o=[],l=-1;a=s.pop();)if(o.push(a),r=a.children)for(n=0,i=r.length;n<i;++n)s.push(r[n]);for(;a=o.pop();)e.call(t,a,++l,this);return this}var wv=b(()=>{mt(bv,"default")});function kv(e,t){let r=-1;for(var n of this)if(e.call(t,n,++r,this))return n}var Tv=b(()=>{mt(kv,"default")});function Ev(i){return this.eachAfter(function(e){for(var t=+i(e.data)||0,r=e.children,n=r&&r.length;0<=--n;)t+=r[n].value;e.value=t})}var Cv=b(()=>{mt(Ev,"default")});function _v(t){return this.eachBefore(function(e){e.children&&e.children.sort(t)})}var Sv=b(()=>{mt(_v,"default")});function Av(e){for(var t=this,r=Lv(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 Lv(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 Nv=b(()=>{mt(Av,"default"),mt(Lv,"leastCommonAncestor")});function Iv(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t}var Rv=b(()=>{mt(Iv,"default")});function Mv(){return Array.from(this)}var Dv=b(()=>{mt(Mv,"default")});function Ov(){var t=[];return this.eachBefore(function(e){e.children||t.push(e)}),t}var Pv=b(()=>{mt(Ov,"default")});function Bv(){var t=this,r=[];return t.each(function(e){e!==t&&r.push({source:e.parent,target:e})}),r}var $v=b(()=>{mt(Bv,"default")});function*Fv(){var e,t,r,n,i,a=[this];do{for(t=a.reverse(),a=[];e=t.pop();)if(yield e,r=e.children)for(n=0,i=r.length;n<i;++n)a.push(r[n])}while(a.length)}var zv=b(()=>{mt(Fv,"default")});function Gv(e,t){e instanceof Map?(e=[void 0,e],void 0===t&&(t=jv)):void 0===t&&(t=qv);for(var r,n,i,a,s,o=[e=new Hv(e)];r=o.pop();)if((i=t(r.data))&&(s=(i=Array.from(i)).length))for(r.children=i,a=s-1;0<=a;--a)o.push(n=i[a]=new Hv(i[a])),n.parent=r,n.depth=r.depth+1;return e.eachBefore(Wv)}function Uv(){return Gv(this).eachBefore(Yv)}function qv(e){return e.children}function jv(e){return Array.isArray(e)?e[1]:null}function Yv(e){void 0!==e.data.value&&(e.value=e.data.value),e.data=e.data.data}function Wv(e){for(var t=0;e.height=t,(e=e.parent)&&e.height<++t;);}function Hv(e){this.data=e,this.depth=this.height=0,this.parent=null}var Vv=b(()=>{fv(),yv(),xv(),wv(),Tv(),Cv(),Sv(),Nv(),Rv(),Dv(),Pv(),$v(),zv(),mt(Gv,"hierarchy"),mt(Uv,"node_copy"),mt(qv,"objectChildren"),mt(jv,"mapChildren"),mt(Yv,"copyData"),mt(Wv,"computeHeight"),mt(Hv,"Node"),Hv.prototype=Gv.prototype={constructor:Hv,count:gv,each:mv,eachAfter:bv,eachBefore:vv,find:kv,sum:Ev,sort:_v,path:Av,ancestors:Iv,descendants:Mv,leaves:Ov,links:Bv,copy:Uv,[Symbol.iterator]:Fv}});function Xv(e){if("function"!=typeof e)throw new Error;return e}var Kv=b(()=>{mt(Xv,"required")});function Zv(){return 0}function Qv(e){return function(){return e}}var Jv=b(()=>{mt(Zv,"constantZero"),mt(Qv,"default")});function ex(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 tx=b(()=>{mt(ex,"default")});function rx(e,t,r,n,i){for(var a,s=e.children,o=-1,l=s.length,c=e.value&&(n-t)/e.value;++o<l;)(a=s[o]).y0=r,a.y1=i,a.x0=t,a.x1=t+=a.value*c}var nx=b(()=>{mt(rx,"default")});function ix(e,t,r,n,i){for(var a,s=e.children,o=-1,l=s.length,c=e.value&&(i-r)/e.value;++o<l;)(a=s[o]).x0=t,a.x1=n,a.y0=r,a.y1=r+=a.value*c}var ax=b(()=>{mt(ix,"default")});function sx(e,t,r,n,i,a){for(var s,o,l,c,h,u,d,p,g,f,m,y=[],v=t.children,x=0,b=0,w=v.length,k=t.value;x<w;){for(l=i-r,c=a-n;!(h=v[b++].value)&&b<w;);for(m=(u=d=h)*h*(f=Math.max(c/l,l/c)/(k*e)),g=Math.max(d/m,m/u);b<w;++b){if(h+=o=v[b].value,o<u&&(u=o),d<o&&(d=o),m=h*h*f,g<(p=Math.max(d/m,m/u))){h-=o;break}g=p}y.push(s={value:h,dice:l<c,children:v.slice(x,b)}),s.dice?rx(s,r,n,i,k?n+=c*h/k:a):ix(s,r,n,k?r+=l*h/k:i,a),k-=h,x=b}return y}var ox,lx,cx=b(()=>{nx(),ax(),ox=(1+Math.sqrt(5))/2,mt(sx,"squarifyRatio"),lx=mt(function t(a){function e(e,t,r,n,i){sx(a,e,t,r,n,i)}return mt(e,"squarify"),e.ratio=function(e){return t(1<(e=+e)?e:1)},e},"custom")(ox)});function hx(){var s=lx,t=!1,r=1,n=1,o=[0],l=Zv,c=Zv,h=Zv,u=Zv,d=Zv;function i(e){return e.x0=e.y0=0,e.x1=r,e.y1=n,e.eachBefore(a),o=[0],t&&e.eachBefore(ex),e}function a(e){var t=o[e.depth],r=e.x0+t,n=e.y0+t,i=e.x1-t,a=e.y1-t;i<r&&(r=i=(r+i)/2),a<n&&(n=a=(n+a)/2),e.x0=r,e.y0=n,e.x1=i,e.y1=a,e.children&&(t=o[e.depth+1]=l(e)/2,r+=d(e)-t,n+=c(e)-t,(i-=h(e)-t)<r&&(r=i=(r+i)/2),(a-=u(e)-t)<n&&(n=a=(n+a)/2),s(e,r,n,i,a))}return mt(i,"treemap"),mt(a,"positionNode"),i.round=function(e){return arguments.length?(t=!!e,i):t},i.size=function(e){return arguments.length?(r=+e[0],n=+e[1],i):[r,n]},i.tile=function(e){return arguments.length?(s=Xv(e),i):s},i.padding=function(e){return arguments.length?i.paddingInner(e).paddingOuter(e):i.paddingInner()},i.paddingInner=function(e){return arguments.length?(l="function"==typeof e?e:Qv(+e),i):l},i.paddingOuter=function(e){return arguments.length?i.paddingTop(e).paddingRight(e).paddingBottom(e).paddingLeft(e):i.paddingTop()},i.paddingTop=function(e){return arguments.length?(c="function"==typeof e?e:Qv(+e),i):c},i.paddingRight=function(e){return arguments.length?(h="function"==typeof e?e:Qv(+e),i):h},i.paddingBottom=function(e){return arguments.length?(u="function"==typeof e?e:Qv(+e),i):u},i.paddingLeft=function(e){return arguments.length?(d="function"==typeof e?e:Qv(+e),i):d},i}var ux=b(()=>{tx(),cx(),Kv(),Jv(),mt(hx,"default")}),dx=b(()=>{Vv(),ux()}),px=b(()=>{}),gx=b(()=>{});function fx(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e)}return this}var mx=b(()=>{mt(fx,"initRange")});function yx(){var r=new Gu,n=[],i=[],a=vx;function s(e){let t=r.get(e);if(void 0===t){if(a!==vx)return a;r.set(e,t=n.push(e)-1)}return i[t%i.length]}return mt(s,"scale"),s.domain=function(e){if(!arguments.length)return n.slice();n=[],r=new Gu;for(var t of e)r.has(t)||r.set(t,n.push(t)-1);return s},s.range=function(e){return arguments.length?(i=Array.from(e),s):i.slice()},s.unknown=function(e){return arguments.length?(a=e,s):a},s.copy=function(){return yx(n,i).unknown(a)},fx.apply(s,arguments),s}var vx,xx=b(()=>{nd(),mx(),vx=Symbol("implicit"),mt(yx,"ordinal")});function bx(){var i,a,e=yx().unknown(void 0),s=e.domain,o=e.range,l=0,c=1,h=!1,u=0,d=0,p=.5;function t(){var e=s().length,t=c<l,r=t?c:l,n=(i=((n=t?l:c)-r)/Math.max(1,e-u+2*d),h&&(i=Math.floor(i)),r+=(n-r-i*(e-u))*p,a=i*(1-u),h&&(r=Math.round(r),a=Math.round(a)),td(e).map(function(e){return r+i*e}));return o(t?n.reverse():n)}return delete e.unknown,mt(t,"rescale"),e.domain=function(e){return(arguments.length?(s(e),t):s)()},e.range=function(e){return arguments.length?([l,c]=e,l=+l,c=+c,t()):[l,c]},e.rangeRound=function(e){return[l,c]=e,l=+l,c=+c,h=!0,t()},e.bandwidth=function(){return a},e.step=function(){return i},e.round=function(e){return arguments.length?(h=!!e,t()):h},e.padding=function(e){return arguments.length?(u=Math.min(1,d=+e),t()):u},e.paddingInner=function(e){return arguments.length?(u=Math.min(1,e),t()):u},e.paddingOuter=function(e){return arguments.length?(d=+e,t()):d},e.align=function(e){return arguments.length?(p=Math.max(0,Math.min(1,e)),t()):p},e.copy=function(){return bx(s(),[l,c]).round(h).paddingInner(u).paddingOuter(d).align(p)},fx.apply(t(),arguments)}var wx=b(()=>{nd(),mx(),xx(),mt(bx,"band")});function kx(e){return function(){return e}}var Tx=b(()=>{mt(kx,"constants")});function Ex(e){return+e}var Cx=b(()=>{mt(Ex,"number")});function _x(e){return e}function Sx(t,r){return(r-=t=+t)?function(e){return(e-t)/r}:kx(isNaN(r)?NaN:.5)}function Ax(t,r){var e;return r<t&&(e=t,t=r,r=e),function(e){return Math.max(t,Math.min(r,e))}}function Lx(e,t,r){var n=e[0],e=e[1],i=t[0],t=t[1],i=e<n?(n=Sx(e,n),r(t,i)):(n=Sx(n,e),r(i,t));return function(e){return i(n(e))}}function Nx(r,e,t){var n=Math.min(r.length,e.length)-1,i=new Array(n),a=new Array(n),s=-1;for(r[n]<r[0]&&(r=r.slice().reverse(),e=e.slice().reverse());++s<n;)i[s]=Sx(r[s],r[s+1]),a[s]=t(e[s],e[s+1]);return function(e){var t=Du(r,e,1,n)-1;return a[t](i[t](e))}}function Ix(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function Rx(){var r,n,t,i,a,s,o=Dx,l=Dx,c=sf,h=_x;function u(){var e=Math.min(o.length,l.length);return h!==_x&&(h=Ax(o[0],o[e-1])),i=2<e?Nx:Lx,a=s=null,d}function d(e){return null==e||isNaN(e=+e)?t:(a=a||i(o.map(r),l,c))(r(h(e)))}return mt(u,"rescale"),mt(d,"scale"),d.invert=function(e){return h(n((s=s||i(l,o.map(r),X1))(e)))},d.domain=function(e){return arguments.length?(o=Array.from(e,Ex),u()):o.slice()},d.range=function(e){return arguments.length?(l=Array.from(e),u()):l.slice()},d.rangeRound=function(e){return l=Array.from(e),c=lf,u()},d.clamp=function(e){return arguments.length?(h=!!e||_x,u()):h!==_x},d.interpolate=function(e){return arguments.length?(c=e,u()):c},d.unknown=function(e){return arguments.length?(t=e,d):t},function(e,t){return r=e,n=t,u()}}function Mx(){return Rx()(_x,_x)}var Dx,Ox=b(()=>{nd(),Cf(),Tx(),Cx(),Dx=[0,1],mt(_x,"identity"),mt(Sx,"normalize"),mt(Ax,"clamper"),mt(Lx,"bimap"),mt(Nx,"polymap"),mt(Ix,"copy"),mt(Rx,"transformer"),mt(Mx,"continuous")});function Px(e,t,r,n){var i,a=Wu(e,t,r);switch((n=O2(n??",f")).type){case"s":var s=Math.max(Math.abs(e),Math.abs(t));return null!=n.precision||isNaN(i=ov(a,s))||(n.precision=i),nv(n,s);case"":case"e":case"g":case"p":case"r":null!=n.precision||isNaN(i=cv(a,Math.max(Math.abs(e),Math.abs(t))))||(n.precision=i-("e"===n.type));break;case"f":case"%":null!=n.precision||isNaN(i=av(a))||(n.precision=i-2*("%"===n.type))}return rv(n)}var Bx=b(()=>{nd(),uv(),mt(Px,"tickFormat")});function $x(c){var h=c.domain;return c.ticks=function(e){var t=h();return ju(t[0],t[t.length-1],e??10)},c.tickFormat=function(e,t){var r=h();return Px(r[0],r[r.length-1],e??10,t)},c.nice=function(e){null==e&&(e=10);var t,r,n=h(),i=0,a=n.length-1,s=n[i],o=n[a],l=10;for(o<s&&(r=s,s=o,o=r,r=i,i=a,a=r);0<l--;){if((r=Yu(s,o,e))===t)return n[i]=s,n[a]=o,h(n);if(0<r)s=Math.floor(s/r)*r,o=Math.ceil(o/r)*r;else{if(!(r<0))break;s=Math.ceil(s*r)/r,o=Math.floor(o*r)/r}t=r}return c},c}function Fx(){var e=Mx();return e.copy=function(){return Ix(e,Fx())},fx.apply(e,arguments),$x(e)}var zx=b(()=>{nd(),Ox(),mx(),Bx(),mt($x,"linearish"),mt(Fx,"linear")});function Gx(e,t){var r,n=0,i=(e=e.slice()).length-1,a=e[n],s=e[i];return s<a&&(r=n,n=i,i=r,r=a,a=s,s=r),e[n]=t.floor(a),e[i]=t.ceil(s),e}var Ux=b(()=>{mt(Gx,"nice")});function qx(a,s,r,n){function o(e){return a(e=0===arguments.length?new Date:new Date(+e)),e}return mt(o,"interval"),o.floor=e=>(a(e=new Date(+e)),e),o.ceil=e=>(a(e=new Date(e-1)),s(e,1),a(e),e),o.round=e=>{var t=o(e),r=o.ceil(e);return e-t<r-e?t:r},o.offset=(e,t)=>(s(e=new Date(+e),null==t?1:Math.floor(t)),e),o.range=(e,t,r)=>{var n,i=[];if(e=o.ceil(e),r=null==r?1:Math.floor(r),e<t&&0<r)for(;i.push(n=new Date(+e)),s(e,r),a(e),n<e&&e<t;);return i},o.filter=r=>qx(e=>{if(e<=e)for(;a(e),!r(e);)e.setTime(e-1)},(e,t)=>{if(e<=e)if(t<0)for(;++t<=0;)for(;s(e,-1),!r(e););else for(;0<=--t;)for(;s(e,1),!r(e););}),r&&(o.count=(e,t)=>(jx.setTime(+e),Yx.setTime(+t),a(jx),a(Yx),Math.floor(r(jx,Yx))),o.every=t=>(t=Math.floor(t),isFinite(t)&&0<t?1<t?o.filter(n?e=>n(e)%t==0:e=>o.count(0,e)%t==0):o:null)),o}var jx,Yx,Wx,Hx,Vx,Xx,Kx,Zx,Qx,Jx,eb,tb=b(()=>{jx=new Date,Yx=new Date,mt(qx,"timeInterval")}),rb=b(()=>{tb(),(Wx=qx(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e)).every=r=>(r=Math.floor(r),isFinite(r)&&0<r?1<r?qx(e=>{e.setTime(Math.floor(e/r)*r)},(e,t)=>{e.setTime(+e+t*r)},(e,t)=>(t-e)/r):Wx:null)}),nb=b(()=>{tb(),(Hx=qx(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+1e3*t)},(e,t)=>(t-e)/1e3,e=>e.getUTCSeconds())).range}),ib=b(()=>{tb(),(Vx=qx(e=>{e.setTime(e-e.getMilliseconds()-1e3*e.getSeconds())},(e,t)=>{e.setTime(+e+6e4*t)},(e,t)=>(t-e)/6e4,e=>e.getMinutes())).range,(Xx=qx(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+6e4*t)},(e,t)=>(t-e)/6e4,e=>e.getUTCMinutes())).range}),ab=b(()=>{tb(),(Kx=qx(e=>{e.setTime(e-e.getMilliseconds()-1e3*e.getSeconds()-6e4*e.getMinutes())},(e,t)=>{e.setTime(+e+36e5*t)},(e,t)=>(t-e)/36e5,e=>e.getHours())).range,(Zx=qx(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+36e5*t)},(e,t)=>(t-e)/36e5,e=>e.getUTCHours())).range}),sb=b(()=>{tb(),(Qx=qx(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-6e4*(t.getTimezoneOffset()-e.getTimezoneOffset()))/864e5,e=>e.getDate()-1)).range,(Jx=qx(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/864e5,e=>e.getUTCDate()-1)).range,(eb=qx(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/864e5,e=>Math.floor(e/864e5))).range});function ob(t){return qx(e=>{e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)},(e,t)=>{e.setDate(e.getDate()+7*t)},(e,t)=>(t-e-6e4*(t.getTimezoneOffset()-e.getTimezoneOffset()))/6048e5)}function lb(t){return qx(e=>{e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+7*t)},(e,t)=>(t-e)/6048e5)}var cb,hb,ub,db,pb,gb,fb,mb,yb,vb,xb,bb,wb,kb,Tb,Eb,Cb,_b,Sb=b(()=>{tb(),mt(ob,"timeWeekday"),cb=ob(0),hb=ob(1),ub=ob(2),db=ob(3),pb=ob(4),gb=ob(5),fb=ob(6),cb.range,hb.range,ub.range,db.range,pb.range,gb.range,fb.range,mt(lb,"utcWeekday"),mb=lb(0),yb=lb(1),vb=lb(2),xb=lb(3),bb=lb(4),wb=lb(5),kb=lb(6),mb.range,yb.range,vb.range,xb.range,bb.range,wb.range,kb.range}),Ab=b(()=>{tb(),(Tb=qx(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+12*(t.getFullYear()-e.getFullYear()),e=>e.getMonth())).range,(Eb=qx(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+12*(t.getUTCFullYear()-e.getUTCFullYear()),e=>e.getUTCMonth())).range}),Lb=b(()=>{tb(),(Cb=qx(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())).every=r=>isFinite(r=Math.floor(r))&&0<r?qx(e=>{e.setFullYear(Math.floor(e.getFullYear()/r)*r),e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t*r)}):null,(_b=qx(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())).every=r=>isFinite(r=Math.floor(r))&&0<r?qx(e=>{e.setUTCFullYear(Math.floor(e.getUTCFullYear()/r)*r),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t*r)}):null});function Nb(a,e,t,r,n,i){let s=[[Hx,1,1e3],[Hx,5,5e3],[Hx,15,15e3],[Hx,30,3e4],[i,1,6e4],[i,5,3e5],[i,15,9e5],[i,30,18e5],[n,1,36e5],[n,3,108e5],[n,6,216e5],[n,12,432e5],[r,1,864e5],[r,2,1728e5],[t,1,6048e5],[e,1,2592e6],[e,3,7776e6],[a,1,31536e6]];function o(e,t,r){var n=t<e;return n&&([e,t]=[t,e]),r=(r=r&&"function"==typeof r.range?r:l(e,t,r))?r.range(e,+t+1):[],n?r.reverse():r}function l(e,t,r){var n=Math.abs(t-e)/r,i=Lu(([,,e])=>e).right(s,n);return i===s.length?a.every(Wu(e/31536e6,t/31536e6,r)):0===i?Wx.every(Math.max(Wu(e,t,r),1)):([e,t]=s[n/s[i-1][2]<s[i][2]/n?i-1:i],e.every(t))}return mt(o,"ticks"),mt(l,"tickInterval"),[o,l]}var Ib,Rb,Mb,Db,Ob=b(()=>{nd(),rb(),nb(),ib(),ab(),sb(),Sb(),Ab(),Lb(),mt(Nb,"ticker"),[Ib,Rb]=Nb(_b,Eb,mb,eb,Zx,Xx),[Mb,Db]=Nb(Cb,Tb,cb,Qx,Kx,Vx)}),Pb=b(()=>{rb(),nb(),ib(),ab(),sb(),Sb(),Ab(),Lb(),Ob()});function Bb(e){var t;return 0<=e.y&&e.y<100?((t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L)).setFullYear(e.y),t):new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function $b(e){var t;return 0<=e.y&&e.y<100?((t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L))).setUTCFullYear(e.y),t):new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function Fb(e,t,r){return{y:e,m:t,d:r,H:0,M:0,S:0,L:0}}function zb(e){var n=e.dateTime,i=e.date,a=e.time,t=e.periods,r=e.days,s=e.shortDays,o=e.months,l=e.shortMonths,c=qb(t),h=jb(t),P=qb(r),B=jb(r),$=qb(s),F=jb(s),z=qb(o),G=jb(o),U=qb(l),q=jb(l),u={a:E,A:C,b:_,B:S,c:null,d:u4,e:u4,f:m4,g:S4,G:L4,H:d4,I:p4,j:g4,L:f4,m:y4,M:v4,p:A,q:L,Q:Q4,s:J4,S:x4,u:b4,U:w4,V:T4,w:E4,W:C4,x:null,X:null,y:_4,Y:A4,Z:N4,"%":Z4},d={a:N,A:I,b:R,B:M,c:null,d:I4,e:I4,f:P4,g:H4,G:X4,H:R4,I:M4,j:D4,L:O4,m:B4,M:$4,p:D,q:O,Q:Q4,s:J4,S:F4,u:z4,U:G4,V:q4,w:j4,W:Y4,x:null,X:null,y:W4,Y:V4,Z:K4,"%":Z4},j={a:y,A:v,b:x,B:b,c:w,d:t4,e:t4,f:o4,g:Zb,G:Kb,H:n4,I:n4,j:r4,L:s4,m:e4,M:i4,p:m,q:Jb,Q:c4,s:h4,S:a4,u:Wb,U:Hb,V:Vb,w:Yb,W:Xb,x:k,X:T,y:Zb,Y:Kb,Z:Qb,"%":l4};function p(l,c){return function(e){var t,r,n,i=[],a=-1,s=0,o=l.length;for(e instanceof Date||(e=new Date(+e));++a<o;)37===l.charCodeAt(a)&&(i.push(l.slice(s,a)),null!=(r=e5[t=l.charAt(++a)])?t=l.charAt(++a):r="e"===t?" ":"0",(n=c[t])&&(t=n(e,r)),i.push(t),s=a+1);return i.push(l.slice(s,a)),i.join("")}}function g(i,a){return function(e){var t,r,n=Fb(1900,void 0,1);if(f(n,i,e+="",0)!=e.length)return null;if("Q"in n)return new Date(n.Q);if("s"in n)return new Date(1e3*n.s+("L"in n?n.L:0));if(!a||"Z"in n||(n.Z=0),"p"in n&&(n.H=n.H%12+12*n.p),void 0===n.m&&(n.m="q"in n?n.q:0),"V"in n){if(n.V<1||53<n.V)return null;"w"in n||(n.w=1),"Z"in n?(t=4<(r=(t=$b(Fb(n.y,0,1))).getUTCDay())||0===r?yb.ceil(t):yb(t),t=Jx.offset(t,7*(n.V-1)),n.y=t.getUTCFullYear(),n.m=t.getUTCMonth(),n.d=t.getUTCDate()+(n.w+6)%7):(t=4<(r=(t=Bb(Fb(n.y,0,1))).getDay())||0===r?hb.ceil(t):hb(t),t=Qx.offset(t,7*(n.V-1)),n.y=t.getFullYear(),n.m=t.getMonth(),n.d=t.getDate()+(n.w+6)%7)}else("W"in n||"U"in n)&&("w"in n||(n.w="u"in n?n.u%7:"W"in n?1:0),r="Z"in n?$b(Fb(n.y,0,1)).getUTCDay():Bb(Fb(n.y,0,1)).getDay(),n.m=0,n.d="W"in n?(n.w+6)%7+7*n.W-(r+5)%7:n.w+7*n.U-(r+6)%7);return("Z"in n?(n.H+=n.Z/100|0,n.M+=n.Z%100,$b):Bb)(n)}}function f(e,t,r,n){for(var i,a,s=0,o=t.length,l=r.length;s<o;){if(l<=n)return-1;if(37===(i=t.charCodeAt(s++))){if(i=t.charAt(s++),!(a=j[i in e5?t.charAt(s++):i])||(n=a(e,r,n))<0)return-1}else if(i!=r.charCodeAt(n++))return-1}return n}function m(e,t,r){return(t=c.exec(t.slice(r)))?(e.p=h.get(t[0].toLowerCase()),r+t[0].length):-1}function y(e,t,r){return(t=$.exec(t.slice(r)))?(e.w=F.get(t[0].toLowerCase()),r+t[0].length):-1}function v(e,t,r){return(t=P.exec(t.slice(r)))?(e.w=B.get(t[0].toLowerCase()),r+t[0].length):-1}function x(e,t,r){return(t=U.exec(t.slice(r)))?(e.m=q.get(t[0].toLowerCase()),r+t[0].length):-1}function b(e,t,r){return(t=z.exec(t.slice(r)))?(e.m=G.get(t[0].toLowerCase()),r+t[0].length):-1}function w(e,t,r){return f(e,n,t,r)}function k(e,t,r){return f(e,i,t,r)}function T(e,t,r){return f(e,a,t,r)}function E(e){return s[e.getDay()]}function C(e){return r[e.getDay()]}function _(e){return l[e.getMonth()]}function S(e){return o[e.getMonth()]}function A(e){return t[+(12<=e.getHours())]}function L(e){return 1+~~(e.getMonth()/3)}function N(e){return s[e.getUTCDay()]}function I(e){return r[e.getUTCDay()]}function R(e){return l[e.getUTCMonth()]}function M(e){return o[e.getUTCMonth()]}function D(e){return t[+(12<=e.getUTCHours())]}function O(e){return 1+~~(e.getUTCMonth()/3)}return u.x=p(i,u),u.X=p(a,u),u.c=p(n,u),d.x=p(i,d),d.X=p(a,d),d.c=p(n,d),mt(p,"newFormat"),mt(g,"newParse"),mt(f,"parseSpecifier"),mt(m,"parsePeriod"),mt(y,"parseShortWeekday"),mt(v,"parseWeekday"),mt(x,"parseShortMonth"),mt(b,"parseMonth"),mt(w,"parseLocaleDateTime"),mt(k,"parseLocaleDate"),mt(T,"parseLocaleTime"),mt(E,"formatShortWeekday"),mt(C,"formatWeekday"),mt(_,"formatShortMonth"),mt(S,"formatMonth"),mt(A,"formatPeriod"),mt(L,"formatQuarter"),mt(N,"formatUTCShortWeekday"),mt(I,"formatUTCWeekday"),mt(R,"formatUTCShortMonth"),mt(M,"formatUTCMonth"),mt(D,"formatUTCPeriod"),mt(O,"formatUTCQuarter"),{format:mt(function(e){var t=p(e+="",u);return t.toString=function(){return e},t},"format"),parse:mt(function(e){var t=g(e+="",!1);return t.toString=function(){return e},t},"parse"),utcFormat:mt(function(e){var t=p(e+="",d);return t.toString=function(){return e},t},"utcFormat"),utcParse:mt(function(e){var t=g(e+="",!0);return t.toString=function(){return e},t},"utcParse")}}function Gb(e,t,r){var n=e<0?"-":"",i=(e=(n?-e:e)+"").length;return n+(i<r?new Array(r-i+1).join(t)+e:e)}function Ub(e){return e.replace(n5,"\\$&")}function qb(e){return new RegExp("^(?:"+e.map(Ub).join("|")+")","i")}function jb(e){return new Map(e.map((e,t)=>[e.toLowerCase(),t]))}function Yb(e,t,r){return(t=t5.exec(t.slice(r,r+1)))?(e.w=+t[0],r+t[0].length):-1}function Wb(e,t,r){return(t=t5.exec(t.slice(r,r+1)))?(e.u=+t[0],r+t[0].length):-1}function Hb(e,t,r){return(t=t5.exec(t.slice(r,r+2)))?(e.U=+t[0],r+t[0].length):-1}function Vb(e,t,r){return(t=t5.exec(t.slice(r,r+2)))?(e.V=+t[0],r+t[0].length):-1}function Xb(e,t,r){return(t=t5.exec(t.slice(r,r+2)))?(e.W=+t[0],r+t[0].length):-1}function Kb(e,t,r){return(t=t5.exec(t.slice(r,r+4)))?(e.y=+t[0],r+t[0].length):-1}function Zb(e,t,r){return(t=t5.exec(t.slice(r,r+2)))?(e.y=+t[0]+(68<+t[0]?1900:2e3),r+t[0].length):-1}function Qb(e,t,r){return(t=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(r,r+6)))?(e.Z=t[1]?0:-(t[2]+(t[3]||"00")),r+t[0].length):-1}function Jb(e,t,r){return(t=t5.exec(t.slice(r,r+1)))?(e.q=3*t[0]-3,r+t[0].length):-1}function e4(e,t,r){return(t=t5.exec(t.slice(r,r+2)))?(e.m=t[0]-1,r+t[0].length):-1}function t4(e,t,r){return(t=t5.exec(t.slice(r,r+2)))?(e.d=+t[0],r+t[0].length):-1}function r4(e,t,r){return(t=t5.exec(t.slice(r,r+3)))?(e.m=0,e.d=+t[0],r+t[0].length):-1}function n4(e,t,r){return(t=t5.exec(t.slice(r,r+2)))?(e.H=+t[0],r+t[0].length):-1}function i4(e,t,r){return(t=t5.exec(t.slice(r,r+2)))?(e.M=+t[0],r+t[0].length):-1}function a4(e,t,r){return(t=t5.exec(t.slice(r,r+2)))?(e.S=+t[0],r+t[0].length):-1}function s4(e,t,r){return(t=t5.exec(t.slice(r,r+3)))?(e.L=+t[0],r+t[0].length):-1}function o4(e,t,r){return(t=t5.exec(t.slice(r,r+6)))?(e.L=Math.floor(t[0]/1e3),r+t[0].length):-1}function l4(e,t,r){return(t=r5.exec(t.slice(r,r+1)))?r+t[0].length:-1}function c4(e,t,r){return(t=t5.exec(t.slice(r)))?(e.Q=+t[0],r+t[0].length):-1}function h4(e,t,r){return(t=t5.exec(t.slice(r)))?(e.s=+t[0],r+t[0].length):-1}function u4(e,t){return Gb(e.getDate(),t,2)}function d4(e,t){return Gb(e.getHours(),t,2)}function p4(e,t){return Gb(e.getHours()%12||12,t,2)}function g4(e,t){return Gb(1+Qx.count(Cb(e),e),t,3)}function f4(e,t){return Gb(e.getMilliseconds(),t,3)}function m4(e,t){return f4(e,t)+"000"}function y4(e,t){return Gb(e.getMonth()+1,t,2)}function v4(e,t){return Gb(e.getMinutes(),t,2)}function x4(e,t){return Gb(e.getSeconds(),t,2)}function b4(e){return 0===(e=e.getDay())?7:e}function w4(e,t){return Gb(cb.count(Cb(e)-1,e),t,2)}function k4(e){var t=e.getDay();return 4<=t||0===t?pb(e):pb.ceil(e)}function T4(e,t){return e=k4(e),Gb(pb.count(Cb(e),e)+(4===Cb(e).getDay()),t,2)}function E4(e){return e.getDay()}function C4(e,t){return Gb(hb.count(Cb(e)-1,e),t,2)}function _4(e,t){return Gb(e.getFullYear()%100,t,2)}function S4(e,t){return Gb((e=k4(e)).getFullYear()%100,t,2)}function A4(e,t){return Gb(e.getFullYear()%1e4,t,4)}function L4(e,t){var r=e.getDay();return Gb((e=4<=r||0===r?pb(e):pb.ceil(e)).getFullYear()%1e4,t,4)}function N4(e){return(0<(e=e.getTimezoneOffset())?"-":(e*=-1,"+"))+Gb(e/60|0,"0",2)+Gb(e%60,"0",2)}function I4(e,t){return Gb(e.getUTCDate(),t,2)}function R4(e,t){return Gb(e.getUTCHours(),t,2)}function M4(e,t){return Gb(e.getUTCHours()%12||12,t,2)}function D4(e,t){return Gb(1+Jx.count(_b(e),e),t,3)}function O4(e,t){return Gb(e.getUTCMilliseconds(),t,3)}function P4(e,t){return O4(e,t)+"000"}function B4(e,t){return Gb(e.getUTCMonth()+1,t,2)}function $4(e,t){return Gb(e.getUTCMinutes(),t,2)}function F4(e,t){return Gb(e.getUTCSeconds(),t,2)}function z4(e){return 0===(e=e.getUTCDay())?7:e}function G4(e,t){return Gb(mb.count(_b(e)-1,e),t,2)}function U4(e){var t=e.getUTCDay();return 4<=t||0===t?bb(e):bb.ceil(e)}function q4(e,t){return e=U4(e),Gb(bb.count(_b(e),e)+(4===_b(e).getUTCDay()),t,2)}function j4(e){return e.getUTCDay()}function Y4(e,t){return Gb(yb.count(_b(e)-1,e),t,2)}function W4(e,t){return Gb(e.getUTCFullYear()%100,t,2)}function H4(e,t){return Gb((e=U4(e)).getUTCFullYear()%100,t,2)}function V4(e,t){return Gb(e.getUTCFullYear()%1e4,t,4)}function X4(e,t){var r=e.getUTCDay();return Gb((e=4<=r||0===r?bb(e):bb.ceil(e)).getUTCFullYear()%1e4,t,4)}function K4(){return"+0000"}function Z4(){return"%"}function Q4(e){return+e}function J4(e){return Math.floor(+e/1e3)}var e5,t5,r5,n5,i5=b(()=>{Pb(),mt(Bb,"localDate"),mt($b,"utcDate"),mt(Fb,"newDate"),mt(zb,"formatLocale"),e5={"-":"",_:" ",0:"0"},t5=/^\s*\d+/,r5=/^%/,n5=/[\\^$*+?|[\]().{}]/g,mt(Gb,"pad"),mt(Ub,"requote"),mt(qb,"formatRe"),mt(jb,"formatLookup"),mt(Yb,"parseWeekdayNumberSunday"),mt(Wb,"parseWeekdayNumberMonday"),mt(Hb,"parseWeekNumberSunday"),mt(Vb,"parseWeekNumberISO"),mt(Xb,"parseWeekNumberMonday"),mt(Kb,"parseFullYear"),mt(Zb,"parseYear"),mt(Qb,"parseZone"),mt(Jb,"parseQuarter"),mt(e4,"parseMonthNumber"),mt(t4,"parseDayOfMonth"),mt(r4,"parseDayOfYear"),mt(n4,"parseHour24"),mt(i4,"parseMinutes"),mt(a4,"parseSeconds"),mt(s4,"parseMilliseconds"),mt(o4,"parseMicroseconds"),mt(l4,"parseLiteralPercent"),mt(c4,"parseUnixTimestamp"),mt(h4,"parseUnixTimestampSeconds"),mt(u4,"formatDayOfMonth"),mt(d4,"formatHour24"),mt(p4,"formatHour12"),mt(g4,"formatDayOfYear"),mt(f4,"formatMilliseconds"),mt(m4,"formatMicroseconds"),mt(y4,"formatMonthNumber"),mt(v4,"formatMinutes"),mt(x4,"formatSeconds"),mt(b4,"formatWeekdayNumberMonday"),mt(w4,"formatWeekNumberSunday"),mt(k4,"dISO"),mt(T4,"formatWeekNumberISO"),mt(E4,"formatWeekdayNumberSunday"),mt(C4,"formatWeekNumberMonday"),mt(_4,"formatYear"),mt(S4,"formatYearISO"),mt(A4,"formatFullYear"),mt(L4,"formatFullYearISO"),mt(N4,"formatZone"),mt(I4,"formatUTCDayOfMonth"),mt(R4,"formatUTCHour24"),mt(M4,"formatUTCHour12"),mt(D4,"formatUTCDayOfYear"),mt(O4,"formatUTCMilliseconds"),mt(P4,"formatUTCMicroseconds"),mt(B4,"formatUTCMonthNumber"),mt($4,"formatUTCMinutes"),mt(F4,"formatUTCSeconds"),mt(z4,"formatUTCWeekdayNumberMonday"),mt(G4,"formatUTCWeekNumberSunday"),mt(U4,"UTCdISO"),mt(q4,"formatUTCWeekNumberISO"),mt(j4,"formatUTCWeekdayNumberSunday"),mt(Y4,"formatUTCWeekNumberMonday"),mt(W4,"formatUTCYear"),mt(H4,"formatUTCYearISO"),mt(V4,"formatUTCFullYear"),mt(X4,"formatUTCFullYearISO"),mt(K4,"formatUTCZone"),mt(Z4,"formatLiteralPercent"),mt(Q4,"formatUnixTimestamp"),mt(J4,"formatUnixTimestampSeconds")});function a5(e){return s5=zb(e),o5=s5.format,s5}var s5,o5,l5=b(()=>{i5(),a5({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"]}),mt(a5,"defaultLocale")}),c5=b(()=>{l5()});function h5(e){return new Date(e)}function u5(e){return e instanceof Date?+e:+new Date(+e)}function d5(r,n,t,i,a,s,o,l,c,h){var u=Mx(),d=u.invert,p=u.domain,g=h(".%L"),f=h(":%S"),m=h("%I:%M"),y=h("%I %p"),v=h("%a %d"),x=h("%b %d"),b=h("%B"),w=h("%Y");function k(e){return(c(e)<e?g:l(e)<e?f:o(e)<e?m:s(e)<e?y:i(e)<e?a(e)<e?v:x:t(e)<e?b:w)(e)}return mt(k,"tickFormat"),u.invert=function(e){return new Date(d(e))},u.domain=function(e){return arguments.length?p(Array.from(e,u5)):p().map(h5)},u.ticks=function(e){var t=p();return r(t[0],t[t.length-1],e??10)},u.tickFormat=function(e,t){return null==t?k:h(t)},u.nice=function(e){var t=p();return(e=e&&"function"==typeof e.range?e:n(t[0],t[t.length-1],e??10))?p(Gx(t,e)):u},u.copy=function(){return Ix(u,d5(r,n,t,i,a,s,o,l,c,h))},u}function p5(){return fx.apply(d5(Mb,Db,Cb,Tb,cb,Qx,Kx,Vx,Hx,o5).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}var g5=b(()=>{Pb(),c5(),Ox(),mx(),Ux(),mt(h5,"date"),mt(u5,"number"),mt(d5,"calendar"),mt(p5,"time")}),f5=b(()=>{wx(),zx(),xx(),g5()});function m5(e){for(var t=e.length/6|0,r=new Array(t),n=0;n<t;)r[n]="#"+e.slice(6*n,6*++n);return r}var y5,v5=b(()=>{mt(m5,"default")}),x5=b(()=>{v5(),y5=m5("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab")}),b5=b(()=>{x5()});function w5(e){return mt(function(){return e},"constant")}var k5=b(()=>{mt(w5,"default")});function T5(e){return 1<e?0:e<-1?M5:Math.acos(e)}function E5(e){return 1<=e?D5:e<=-1?-D5:Math.asin(e)}var C5,_5,S5,A5,L5,N5,I5,R5,M5,D5,O5,P5=b(()=>{C5=Math.abs,_5=Math.atan2,S5=Math.cos,A5=Math.max,L5=Math.min,N5=Math.sin,I5=Math.sqrt,R5=1e-12,D5=(M5=Math.PI)/2,O5=2*M5,mt(T5,"acos"),mt(E5,"asin")});function B5(r){let n=3;return r.digits=function(e){if(!arguments.length)return n;if(null==e)n=null;else{var t=Math.floor(e);if(!(0<=t))throw new RangeError("invalid digits: "+e);n=t}return r},()=>new m2(n)}var $5=b(()=>{v2(),mt(B5,"withPath")});function F5(e){return e.innerRadius}function z5(e){return e.outerRadius}function G5(e){return e.startAngle}function U5(e){return e.endAngle}function q5(e){return e&&e.padAngle}function j5(e,t,r,n,i,a,s,o){var l=(o-=a)*(r-=e)-(s-=i)*(n-=t);if(!(l*l<R5))return[e+(l=(s*(t-a)-o*(e-i))/l)*r,t+l*n]}function Y5(e,t,r,n,i,a,s){var o=(s=(s?a:-a)/I5((l=e-r)*l+(o=t-n)*o))*o,s=-s*l,l=e+o,e=t+s,t=r+o,r=n+s,n=(l+t)/2,c=(e+r)/2,h=t-l,u=r-e,d=h*h+u*u,t=((l=l*r-t*e)*u-h*(r=(u<0?-1:1)*I5(A5(0,(a=i-a)*a*d-l*l))))/d,e=(-l*h-u*r)/d,p=(l*u+h*r)/d,l=(-l*h+u*r)/d;return(r=p-n)*r+(d=l-c)*d<(h=t-n)*h+(u=e-c)*u&&(t=p,e=l),{cx:t,cy:e,x01:-o,y01:-s,x11:t*(i/a-1),y11:e*(i/a-1)}}function W5(){var A=F5,L=z5,N=w5(0),I=null,R=G5,M=U5,D=q5,O=null,P=B5(t);function t(){var e,t,r,n,i,a,s,o,l,c,h,u,d,p,g,f,m,y,v,x,b,w,k=+A.apply(this,arguments),T=+L.apply(this,arguments),E=R.apply(this,arguments)-D5,C=M.apply(this,arguments)-D5,_=C5(C-E),S=E<C;if(O=O||(e=P()),T<k&&(t=T,T=k,k=t),R5<T?O5-R5<_?(O.moveTo(T*S5(E),T*N5(E)),O.arc(0,0,T,E,C,!S),R5<k&&(O.moveTo(k*S5(C),k*N5(C)),O.arc(0,0,k,C,E,S))):(n=t=E,i=r=C,s=a=_,h=D.apply(this,arguments)/2,d=R5<h&&(I?+I.apply(this,arguments):I5(k*k+T*T)),w=b=o=L5(C5(T-k)/2,+N.apply(this,arguments)),R5<d&&(u=E5(d/k*N5(h)),d=E5(d/T*N5(h)),(a-=2*u)>R5?(n+=u*=S?1:-1,i-=u):(a=0,n=i=(E+C)/2),(s-=2*d)>R5?(t+=d*=S?1:-1,r-=d):(s=0,t=r=(E+C)/2)),h=T*S5(t),u=T*N5(t),d=k*S5(i),E=k*N5(i),R5<o&&(p=T*S5(r),g=T*N5(r),f=k*S5(n),m=k*N5(n),_<M5)&&((C=j5(h,u,f,m,p,g,d,E))?(_=h-C[0],x=u-C[1],y=p-C[0],v=g-C[1],_=1/N5(T5((_*y+x*v)/(I5(_*_+x*x)*I5(y*y+v*v)))/2),x=I5(C[0]*C[0]+C[1]*C[1]),b=L5(o,(k-x)/(_-1)),w=L5(o,(T-x)/(1+_))):b=w=0),R5<s?R5<w?(l=Y5(f,m,h,u,T,w,S),c=Y5(p,g,d,E,T,w,S),O.moveTo(l.cx+l.x01,l.cy+l.y01),w<o?O.arc(l.cx,l.cy,w,_5(l.y01,l.x01),_5(c.y01,c.x01),!S):(O.arc(l.cx,l.cy,w,_5(l.y01,l.x01),_5(l.y11,l.x11),!S),O.arc(0,0,T,_5(l.cy+l.y11,l.cx+l.x11),_5(c.cy+c.y11,c.cx+c.x11),!S),O.arc(c.cx,c.cy,w,_5(c.y11,c.x11),_5(c.y01,c.x01),!S))):(O.moveTo(h,u),O.arc(0,0,T,t,r,!S)):O.moveTo(h,u),R5<k&&R5<a?R5<b?(l=Y5(d,E,p,g,k,-b,S),c=Y5(h,u,f,m,k,-b,S),O.lineTo(l.cx+l.x01,l.cy+l.y01),b<o?O.arc(l.cx,l.cy,b,_5(l.y01,l.x01),_5(c.y01,c.x01),!S):(O.arc(l.cx,l.cy,b,_5(l.y01,l.x01),_5(l.y11,l.x11),!S),O.arc(0,0,k,_5(l.cy+l.y11,l.cx+l.x11),_5(c.cy+c.y11,c.cx+c.x11),S),O.arc(c.cx,c.cy,b,_5(c.y11,c.x11),_5(c.y01,c.x01),!S))):O.arc(0,0,k,i,n,S):O.lineTo(d,E)):O.moveTo(0,0),O.closePath(),e)return O=null,e+""||null}return mt(t,"arc"),t.centroid=function(){var e=(+A.apply(this,arguments)+ +L.apply(this,arguments))/2,t=(+R.apply(this,arguments)+ +M.apply(this,arguments))/2-M5/2;return[S5(t)*e,N5(t)*e]},t.innerRadius=function(e){return arguments.length?(A="function"==typeof e?e:w5(+e),t):A},t.outerRadius=function(e){return arguments.length?(L="function"==typeof e?e:w5(+e),t):L},t.cornerRadius=function(e){return arguments.length?(N="function"==typeof e?e:w5(+e),t):N},t.padRadius=function(e){return arguments.length?(I=null==e?null:"function"==typeof e?e:w5(+e),t):I},t.startAngle=function(e){return arguments.length?(R="function"==typeof e?e:w5(+e),t):R},t.endAngle=function(e){return arguments.length?(M="function"==typeof e?e:w5(+e),t):M},t.padAngle=function(e){return arguments.length?(D="function"==typeof e?e:w5(+e),t):D},t.context=function(e){return arguments.length?(O=e??null,t):O},t}var H5=b(()=>{k5(),P5(),$5(),mt(F5,"arcInnerRadius"),mt(z5,"arcOuterRadius"),mt(G5,"arcStartAngle"),mt(U5,"arcEndAngle"),mt(q5,"arcPadAngle"),mt(j5,"intersect"),mt(Y5,"cornerTangents"),mt(W5,"default")});function V5(e){return"object"==typeof e&&"length"in e?e:Array.from(e)}var X5=b(()=>{Array.prototype.slice,mt(V5,"default")});function K5(e){this._context=e}function Z5(e){return new K5(e)}var Q5=b(()=>{mt(K5,"Linear"),K5.prototype={areaStart:mt(function(){this._line=0},"areaStart"),areaEnd:mt(function(){this._line=NaN},"areaEnd"),lineStart:mt(function(){this._point=0},"lineStart"),lineEnd:mt(function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},"lineEnd"),point:mt(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)}},"point")},mt(Z5,"default")});function J5(e){return e[0]}function e3(e){return e[1]}var t3=b(()=>{mt(J5,"x"),mt(e3,"y")});function r3(s,o){var l=w5(!0),c=null,h=Z5,u=null,d=B5(t);function t(e){var t,r,n,i=(e=V5(e)).length,a=!1;for(null==c&&(u=h(n=d())),t=0;t<=i;++t)!(t<i&&l(r=e[t],t,e))===a&&((a=!a)?u.lineStart():u.lineEnd()),a&&u.point(+s(r,t,e),+o(r,t,e));if(n)return u=null,n+""||null}return s="function"==typeof s?s:void 0===s?J5:w5(s),o="function"==typeof o?o:void 0===o?e3:w5(o),mt(t,"line"),t.x=function(e){return arguments.length?(s="function"==typeof e?e:w5(+e),t):s},t.y=function(e){return arguments.length?(o="function"==typeof e?e:w5(+e),t):o},t.defined=function(e){return arguments.length?(l="function"==typeof e?e:w5(!!e),t):l},t.curve=function(e){return arguments.length?(h=e,null!=c&&(u=h(c)),t):h},t.context=function(e){return arguments.length?(null==e?c=u=null:u=h(c=e),t):c},t}var n3=b(()=>{X5(),k5(),Q5(),$5(),t3(),mt(r3,"default")});function i3(e,t){return t<e?-1:e<t?1:e<=t?0:NaN}var a3=b(()=>{mt(i3,"default")});function s3(e){return e}var o3=b(()=>{mt(s3,"default")});function l3(){var p=s3,g=i3,f=null,m=w5(0),y=w5(O5),v=w5(0);function t(r){for(var e,t,n,i=(r=V5(r)).length,a=0,s=new Array(i),o=new Array(i),l=+m.apply(this,arguments),c=Math.min(O5,Math.max(-O5,y.apply(this,arguments)-l)),h=Math.min(Math.abs(c)/i,v.apply(this,arguments)),u=h*(c<0?-1:1),d=0;d<i;++d)0<(n=o[s[d]=d]=+p(r[d],d,r))&&(a+=n);for(null!=g?s.sort(function(e,t){return g(o[e],o[t])}):null!=f&&s.sort(function(e,t){return f(r[e],r[t])}),d=0,e=a?(c-i*u)/a:0;d<i;++d,l=t)t=s[d],n=o[t],o[t]={data:r[t],index:d,value:n,startAngle:l,endAngle:t=l+(0<n?n*e:0)+u,padAngle:h};return o}return mt(t,"pie"),t.value=function(e){return arguments.length?(p="function"==typeof e?e:w5(+e),t):p},t.sortValues=function(e){return arguments.length?(g=e,f=null,t):g},t.sort=function(e){return arguments.length?(f=e,g=null,t):f},t.startAngle=function(e){return arguments.length?(m="function"==typeof e?e:w5(+e),t):m},t.endAngle=function(e){return arguments.length?(y="function"==typeof e?e:w5(+e),t):y},t.padAngle=function(e){return arguments.length?(v="function"==typeof e?e:w5(+e),t):v},t}var c3=b(()=>{X5(),k5(),a3(),o3(),P5(),mt(l3,"default")});function h3(e){return new d3(e,!0)}function u3(e){return new d3(e,!1)}var d3,p3=b(()=>{d3=class{static{mt(this,"Bump")}constructor(e,t){this._context=e,this._x=t}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line}point(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._x?this._context.bezierCurveTo(this._x0=(this._x0+e)/2,this._y0,this._x0,t,e,t):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+t)/2,e,this._y0,e,t)}this._x0=e,this._y0=t}},mt(h3,"bumpX"),mt(u3,"bumpY")});function g3(){}var f3=b(()=>{mt(g3,"default")});function m3(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 y3(e){this._context=e}function v3(e){return new y3(e)}var x3=b(()=>{mt(m3,"point"),mt(y3,"Basis"),y3.prototype={areaStart:mt(function(){this._line=0},"areaStart"),areaEnd:mt(function(){this._line=NaN},"areaEnd"),lineStart:mt(function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},"lineStart"),lineEnd:mt(function(){switch(this._point){case 3:m3(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},"lineEnd"),point:mt(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:m3(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t},"point")},mt(v3,"default")});function b3(e){this._context=e}function w3(e){return new b3(e)}var k3=b(()=>{f3(),x3(),mt(b3,"BasisClosed"),b3.prototype={areaStart:g3,areaEnd:g3,lineStart:mt(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:mt(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)}},"lineEnd"),point:mt(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:m3(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t},"point")},mt(w3,"default")});function T3(e){this._context=e}function E3(e){return new T3(e)}var C3=b(()=>{x3(),mt(T3,"BasisOpen"),T3.prototype={areaStart:mt(function(){this._line=0},"areaStart"),areaEnd:mt(function(){this._line=NaN},"areaEnd"),lineStart:mt(function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},"lineStart"),lineEnd:mt(function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},"lineEnd"),point:mt(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:m3(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t},"point")},mt(E3,"default")});function _3(e,t){this._basis=new y3(e),this._beta=t}var S3,A3=b(()=>{x3(),mt(_3,"Bundle"),_3.prototype={lineStart:mt(function(){this._x=[],this._y=[],this._basis.lineStart()},"lineStart"),lineEnd:mt(function(){var e=this._x,t=this._y,r=e.length-1;if(0<r)for(var n,i=e[0],a=t[0],s=e[r]-i,o=t[r]-a,l=-1;++l<=r;)this._basis.point(this._beta*e[l]+(1-this._beta)*(i+(n=l/r)*s),this._beta*t[l]+(1-this._beta)*(a+n*o));this._x=this._y=null,this._basis.lineEnd()},"lineEnd"),point:mt(function(e,t){this._x.push(+e),this._y.push(+t)},"point")},S3=mt(function t(r){function e(e){return 1===r?new y3(e):new _3(e,r)}return mt(e,"bundle"),e.beta=function(e){return t(+e)},e},"custom")(.85)});function L3(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 N3(e,t){this._context=e,this._k=(1-t)/6}var I3,R3=b(()=>{mt(L3,"point"),mt(N3,"Cardinal"),N3.prototype={areaStart:mt(function(){this._line=0},"areaStart"),areaEnd:mt(function(){this._line=NaN},"areaEnd"),lineStart:mt(function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},"lineStart"),lineEnd:mt(function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:L3(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},"lineEnd"),point:mt(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:L3(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t},"point")},I3=mt(function t(r){function e(e){return new N3(e,r)}return mt(e,"cardinal"),e.tension=function(e){return t(+e)},e},"custom")(0)});function M3(e,t){this._context=e,this._k=(1-t)/6}var D3,O3=b(()=>{f3(),R3(),mt(M3,"CardinalClosed"),M3.prototype={areaStart:g3,areaEnd:g3,lineStart:mt(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:mt(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)}},"lineEnd"),point:mt(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:L3(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t},"point")},D3=mt(function t(r){function e(e){return new M3(e,r)}return mt(e,"cardinal"),e.tension=function(e){return t(+e)},e},"custom")(0)});function P3(e,t){this._context=e,this._k=(1-t)/6}var B3,$3=b(()=>{R3(),mt(P3,"CardinalOpen"),P3.prototype={areaStart:mt(function(){this._line=0},"areaStart"),areaEnd:mt(function(){this._line=NaN},"areaEnd"),lineStart:mt(function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},"lineStart"),lineEnd:mt(function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},"lineEnd"),point:mt(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:L3(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t},"point")},B3=mt(function t(r){function e(e){return new P3(e,r)}return mt(e,"cardinal"),e.tension=function(e){return t(+e)},e},"custom")(0)});function F3(e,t,r){var n,i,a=e._x1,s=e._y1,o=e._x2,l=e._y2;R5<e._l01_a&&(a=(a*(n=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a)-e._x0*e._l12_2a+e._x2*e._l01_2a)/(i=3*e._l01_a*(e._l01_a+e._l12_a)),s=(s*n-e._y0*e._l12_2a+e._y2*e._l01_2a)/i),R5<e._l23_a&&(o=(o*(n=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a)+e._x1*e._l23_2a-t*e._l12_2a)/(i=3*e._l23_a*(e._l23_a+e._l12_a)),l=(l*n+e._y1*e._l23_2a-r*e._l12_2a)/i),e._context.bezierCurveTo(a,s,o,l,e._x2,e._y2)}function z3(e,t){this._context=e,this._alpha=t}var G3,U3=b(()=>{P5(),R3(),mt(F3,"point"),mt(z3,"CatmullRom"),z3.prototype={areaStart:mt(function(){this._line=0},"areaStart"),areaEnd:mt(function(){this._line=NaN},"areaEnd"),lineStart:mt(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:mt(function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},"lineEnd"),point:mt(function(e,t){var r,n;switch(e=+e,t=+t,this._point&&(r=this._x2-e,n=this._y2-t,this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+n*n,this._alpha))),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:F3(this,e,t)}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")},G3=mt(function t(r){function e(e){return r?new z3(e,r):new N3(e,0)}return mt(e,"catmullRom"),e.alpha=function(e){return t(+e)},e},"custom")(.5)});function q3(e,t){this._context=e,this._alpha=t}var j3,Y3=b(()=>{O3(),f3(),U3(),mt(q3,"CatmullRomClosed"),q3.prototype={areaStart:g3,areaEnd:g3,lineStart:mt(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:mt(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)}},"lineEnd"),point:mt(function(e,t){var r,n;switch(e=+e,t=+t,this._point&&(r=this._x2-e,n=this._y2-t,this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+n*n,this._alpha))),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:F3(this,e,t)}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")},j3=mt(function t(r){function e(e){return r?new q3(e,r):new M3(e,0)}return mt(e,"catmullRom"),e.alpha=function(e){return t(+e)},e},"custom")(.5)});function W3(e,t){this._context=e,this._alpha=t}var H3,V3=b(()=>{$3(),U3(),mt(W3,"CatmullRomOpen"),W3.prototype={areaStart:mt(function(){this._line=0},"areaStart"),areaEnd:mt(function(){this._line=NaN},"areaEnd"),lineStart:mt(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:mt(function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},"lineEnd"),point:mt(function(e,t){var r,n;switch(e=+e,t=+t,this._point&&(r=this._x2-e,n=this._y2-t,this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+n*n,this._alpha))),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:F3(this,e,t)}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")},H3=mt(function t(r){function e(e){return r?new W3(e,r):new P3(e,0)}return mt(e,"catmullRom"),e.alpha=function(e){return t(+e)},e},"custom")(.5)});function X3(e){this._context=e}function K3(e){return new X3(e)}var Z3=b(()=>{f3(),mt(X3,"LinearClosed"),X3.prototype={areaStart:g3,areaEnd:g3,lineStart:mt(function(){this._point=0},"lineStart"),lineEnd:mt(function(){this._point&&this._context.closePath()},"lineEnd"),point:mt(function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))},"point")},mt(K3,"default")});function Q3(e){return e<0?-1:1}function J3(e,t,r){var n=e._x1-e._x0,t=t-e._x1,i=(e._y1-e._y0)/(n||t<0&&-0),e=(i*t+(r=(r-e._y1)/(t||n<0&&-0))*n)/(n+t);return(Q3(i)+Q3(r))*Math.min(Math.abs(i),Math.abs(r),.5*Math.abs(e))||0}function ew(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function tw(e,t,r){var n=e._x0,i=e._x1,a=e._y1,s=(i-n)/3;e._context.bezierCurveTo(n+s,e._y0+s*t,i-s,a-s*r,i,a)}function rw(e){this._context=e}function nw(e){this._context=new iw(e)}function iw(e){this._context=e}function aw(e){return new rw(e)}function sw(e){return new nw(e)}var ow=b(()=>{mt(Q3,"sign"),mt(J3,"slope3"),mt(ew,"slope2"),mt(tw,"point"),mt(rw,"MonotoneX"),rw.prototype={areaStart:mt(function(){this._line=0},"areaStart"),areaEnd:mt(function(){this._line=NaN},"areaEnd"),lineStart:mt(function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},"lineStart"),lineEnd:mt(function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:tw(this,this._t0,ew(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},"lineEnd"),point:mt(function(e,t){var r=NaN;if(t=+t,(e=+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,tw(this,ew(this,r=J3(this,e,t)),r);break;default:tw(this,this._t0,r=J3(this,e,t))}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}},"point")},mt(nw,"MonotoneY"),(nw.prototype=Object.create(rw.prototype)).point=function(e,t){rw.prototype.point.call(this,t,e)},mt(iw,"ReflectContext"),iw.prototype={moveTo:mt(function(e,t){this._context.moveTo(t,e)},"moveTo"),closePath:mt(function(){this._context.closePath()},"closePath"),lineTo:mt(function(e,t){this._context.lineTo(t,e)},"lineTo"),bezierCurveTo:mt(function(e,t,r,n,i,a){this._context.bezierCurveTo(t,e,n,r,a,i)},"bezierCurveTo")},mt(aw,"monotoneX"),mt(sw,"monotoneY")});function lw(e){this._context=e}function cw(e){var t,r,n=e.length-1,i=new Array(n),a=new Array(n),s=new Array(n);for(a[i[0]=0]=2,s[0]=e[0]+2*e[1],t=1;t<n-1;++t)i[t]=1,a[t]=4,s[t]=4*e[t]+2*e[t+1];for(i[n-1]=2,a[n-1]=7,s[n-1]=8*e[n-1]+e[n],t=1;t<n;++t)r=i[t]/a[t-1],a[t]-=r,s[t]-=r*s[t-1];for(i[n-1]=s[n-1]/a[n-1],t=n-2;0<=t;--t)i[t]=(s[t]-i[t+1])/a[t];for(a[n-1]=(e[n]+i[n-1])/2,t=0;t<n-1;++t)a[t]=2*e[t+1]-i[t+1];return[i,a]}function hw(e){return new lw(e)}var uw=b(()=>{mt(lw,"Natural"),lw.prototype={areaStart:mt(function(){this._line=0},"areaStart"),areaEnd:mt(function(){this._line=NaN},"areaEnd"),lineStart:mt(function(){this._x=[],this._y=[]},"lineStart"),lineEnd:mt(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]),2===r)this._context.lineTo(e[1],t[1]);else for(var n=cw(e),i=cw(t),a=0,s=1;s<r;++a,++s)this._context.bezierCurveTo(n[0][a],i[0][a],n[1][a],i[1][a],e[s],t[s]);(this._line||0!==this._line&&1===r)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},"lineEnd"),point:mt(function(e,t){this._x.push(+e),this._y.push(+t)},"point")},mt(cw,"controlPoints"),mt(hw,"default")});function dw(e,t){this._context=e,this._t=t}function pw(e){return new dw(e,.5)}function gw(e){return new dw(e,0)}function fw(e){return new dw(e,1)}var mw=b(()=>{mt(dw,"Step"),dw.prototype={areaStart:mt(function(){this._line=0},"areaStart"),areaEnd:mt(function(){this._line=NaN},"areaEnd"),lineStart:mt(function(){this._x=this._y=NaN,this._point=0},"lineStart"),lineEnd:mt(function(){0<this._t&&this._t<1&&2===this._point&&this._context.lineTo(this._x,this._y),(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),0<=this._line&&(this._t=1-this._t,this._line=1-this._line)},"lineEnd"),point:mt(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:var r;this._t<=0?(this._context.lineTo(this._x,t),this._context.lineTo(e,t)):(r=this._x*(1-this._t)+e*this._t,this._context.lineTo(r,this._y),this._context.lineTo(r,t))}this._x=e,this._y=t},"point")},mt(pw,"default"),mt(gw,"stepBefore"),mt(fw,"stepAfter")}),yw=b(()=>{H5(),n3(),c3(),k3(),C3(),x3(),p3(),A3(),O3(),$3(),R3(),Y3(),V3(),U3(),Z3(),Q5(),ow(),uw(),mw()}),vw=b(()=>{}),xw=b(()=>{});function bw(e,t,r){this.k=e,this.x=t,this.y=r}function ww(e){for(;!e.__zoom;)if(!(e=e.parentNode))return kw;return e.__zoom}var kw,Tw,Ew,Cw,_w,Sw,Aw,Lw,Nw,Iw,Rw,Mw,Dw,Ow,Pw,Bw,$w,Fw,zw,Gw,Uw,qw,jw,Yw,Ww,Hw,Vw,Xw,Kw,Zw,Qw,Jw,e6=b(()=>{mt(bw,"Transform"),bw.prototype={constructor:bw,scale:mt(function(e){return 1===e?this:new bw(this.k*e,this.x,this.y)},"scale"),translate:mt(function(e,t){return 0===e&0===t?this:new bw(this.k,this.x+this.k*e,this.y+this.k*t)},"translate"),apply:mt(function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},"apply"),applyX:mt(function(e){return e*this.k+this.x},"applyX"),applyY:mt(function(e){return e*this.k+this.y},"applyY"),invert:mt(function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},"invert"),invertX:mt(function(e){return(e-this.x)/this.k},"invertX"),invertY:mt(function(e){return(e-this.y)/this.k},"invertY"),rescaleX:mt(function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},"rescaleX"),rescaleY:mt(function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},"rescaleY"),toString:mt(function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"},"toString")},kw=new bw(1,0,0),ww.prototype=bw.prototype,mt(ww,"transform")}),t6=b(()=>{}),r6=b(()=>{Zy(),vw(),xw(),e6(),t6()}),n6=b(()=>{r6(),e6()}),i6=b(()=>{nd(),yd(),l2(),x2(),C1(),b2(),w2(),Ad(),bg(),k2(),Yy(),T2(),C2(),uv(),dv(),dx(),Cf(),v2(),px(),E2(),gx(),f5(),b5(),xg(),yw(),Pb(),c5(),Xf(),Zy(),n6()}),a6=NFe(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.BLANK_URL=e.relativeFirstCharacters=e.whitespaceEscapeCharsRegex=e.urlSchemeRegex=e.ctrlCharactersRegex=e.htmlCtrlEntityRegex=e.htmlEntitiesRegex=e.invalidProtocolRegex=void 0,e.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im,e.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g,e.htmlCtrlEntityRegex=/&(newline|tab);/gi,e.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,e.urlSchemeRegex=/^.+(:|:)/gim,e.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g,e.relativeFirstCharacters=[".","/"],e.BLANK_URL="about:blank"}),s6=NFe(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.sanitizeUrl=void 0;var a=a6();function s(e){return-1<a.relativeFirstCharacters.indexOf(e[0])}function o(e){return e.replace(a.ctrlCharactersRegex,"").replace(a.htmlEntitiesRegex,function(e,t){return String.fromCharCode(t)})}function l(e){return URL.canParse(e)}function c(e){try{return decodeURIComponent(e)}catch{return e}}function t(e){if(!e)return a.BLANK_URL;for(var t,r,n,i=c(e.trim());(t=(i=c(i=o(i).replace(a.htmlCtrlEntityRegex,"").replace(a.ctrlCharactersRegex,"").replace(a.whitespaceEscapeCharsRegex,"").trim())).match(a.ctrlCharactersRegex)||i.match(a.htmlEntitiesRegex)||i.match(a.htmlCtrlEntityRegex)||i.match(a.whitespaceEscapeCharsRegex))&&0<t.length;);return(e=i)?!s(e)&&(n=(r=e.trimStart()).match(a.urlSchemeRegex))?(n=n[0].toLowerCase().trim(),a.invalidProtocolRegex.test(n)?a.BLANK_URL:(r=r.replace(/\\/g,"/"),"mailto:"===n||n.includes("://")||"http:"!==n&&"https:"!==n?r:l(r)?((n=new URL(r)).protocol=n.protocol.toLowerCase(),n.hostname=n.hostname.toLowerCase(),n.toString()):a.BLANK_URL)):e:a.BLANK_URL}mt(s,"isRelativeUrlWithoutProtocol"),mt(o,"decodeHtmlCharacters"),mt(l,"isValidUrl"),mt(c,"decodeURI"),mt(t,"sanitizeUrl"),e.sanitizeUrl=t}),o6=b(()=>{Tw=q(s6(),1),Oc(),Ew=mt((e,t)=>{var 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),void 0!==t.attrs)for(var n in t.attrs)r.attr(n,t.attrs[n]);return t.class&&r.attr("class",t.class),r},"drawRect"),Cw=mt((e,t)=>{t={x:t.startx,y:t.starty,width:t.stopx-t.startx,height:t.stopy-t.starty,fill:t.fill,stroke:t.stroke,class:"rect"},Ew(e,t).lower()},"drawBackgroundRect"),_w=mt((e,t)=>{var r=t.text.replace(nc," "),n=((e=e.append("text")).attr("x",t.x),e.attr("y",t.y),e.attr("class","legend"),e.style("text-anchor",t.anchor),t.class&&e.attr("class",t.class),e.append("tspan"));return n.attr("x",t.x+2*t.textMargin),n.text(r),e},"drawText"),Sw=mt((e,t,r,n)=>{(e=e.append("image")).attr("x",t),e.attr("y",r),t=(0,Tw.sanitizeUrl)(n),e.attr("xlink:href",t)},"drawImage"),Aw=mt((e,t,r,n)=>{(e=e.append("use")).attr("x",t),e.attr("y",r),t=(0,Tw.sanitizeUrl)(n),e.attr("xlink:href","#"+t)},"drawEmbeddedImage"),Lw=mt(()=>({x:0,y:0,width:100,height:100,fill:"#EDF2AE",stroke:"#666",anchor:"start",rx:0,ry:0}),"getNoteRect"),Nw=mt(()=>({x:0,y:0,width:100,height:100,"text-anchor":"start",style:"#666",textMargin:0,rx:0,ry:0,tspan:!0}),"getTextObj")}),l6=b(()=>{function t(e,t,r,n,i,a,s){g(t.append("text").attr("x",r+i/2).attr("y",n+a/2+5).style("text-anchor","middle").text(e),s)}function l(e,t,r,n,i,a,s,o){var{fontSize:l,fontFamily:c,fontWeight:h}=o,u=e.split(L.lineBreakRegex);for(let e=0;e<u.length;e++){var d=e*l-l*(u.length-1)/2,p=t.append("text").attr("x",r+i/2).attr("y",n).style("text-anchor","middle").attr("dominant-baseline","middle").style("font-size",l).style("font-weight",h).style("font-family",c);p.append("tspan").attr("dy",d).text(u[e]).attr("alignment-baseline","mathematical"),g(p,s)}}function r(e,t,r,n,i,a,s,o){(a=(t=t.append("switch")).append("foreignObject").attr("x",r).attr("y",n).attr("width",i).attr("height",a).append("xhtml:div").style("display","table").style("height","100%").style("width","100%")).append("div").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(e),l(e,t,r,n,i,0,s,o),g(a,s)}function g(e,t){for(var r in t)t.hasOwnProperty(r)&&e.attr(r,t[r])}Oc(),o6(),Iw=q(s6(),1),Rw=mt(function(e,t){return Ew(e,t)},"drawRect"),Mw=mt(function(e,t,r,n,i,a){(e=e.append("image")).attr("width",t),e.attr("height",r),e.attr("x",n),e.attr("y",i),t=a.startsWith("data:image/png;base64")?a:(0,Iw.sanitizeUrl)(a),e.attr("xlink:href",t)},"drawImage"),Dw=mt((e,t,r)=>{let n=e.append("g"),i=0;for(var a of t){var s,o=a.textColor||"#444444",l=a.lineColor||"#444444",c=a.offsetX?parseInt(a.offsetX):0,h=a.offsetY?parseInt(a.offsetY):0,l=(0===i?((s=n.append("line")).attr("x1",a.startPoint.x),s.attr("y1",a.startPoint.y),s.attr("x2",a.endPoint.x),s.attr("y2",a.endPoint.y),s.attr("stroke-width","1"),s.attr("stroke",l),s.style("fill","none"),"rel_b"!==a.type&&s.attr("marker-end","url(#arrowhead)"),"birel"!==a.type&&"rel_b"!==a.type||s.attr("marker-start","url(#arrowend)"),i=-1):((s=n.append("path")).attr("fill","none").attr("stroke-width","1").attr("stroke",l).attr("d","Mstartx,starty Qcontrolx,controly stopx,stopy ".replaceAll("startx",a.startPoint.x).replaceAll("starty",a.startPoint.y).replaceAll("controlx",a.startPoint.x+(a.endPoint.x-a.startPoint.x)/2-(a.endPoint.x-a.startPoint.x)/4).replaceAll("controly",a.startPoint.y+(a.endPoint.y-a.startPoint.y)/2).replaceAll("stopx",a.endPoint.x).replaceAll("stopy",a.endPoint.y)),"rel_b"!==a.type&&s.attr("marker-end","url(#arrowhead)"),"birel"!==a.type&&"rel_b"!==a.type||s.attr("marker-start","url(#arrowend)")),r.messageFont());Ww(r)(a.label.text,n,Math.min(a.startPoint.x,a.endPoint.x)+Math.abs(a.endPoint.x-a.startPoint.x)/2+c,Math.min(a.startPoint.y,a.endPoint.y)+Math.abs(a.endPoint.y-a.startPoint.y)/2+h,a.label.width,a.label.height,{fill:o},l),a.techn&&""!==a.techn.text&&(l=r.messageFont(),Ww(r)("["+a.techn.text+"]",n,Math.min(a.startPoint.x,a.endPoint.x)+Math.abs(a.endPoint.x-a.startPoint.x)/2+c,Math.min(a.startPoint.y,a.endPoint.y)+Math.abs(a.endPoint.y-a.startPoint.y)/2+r.messageFontSize+5+h,Math.max(a.label.width,a.techn.width),a.techn.height,{fill:o,"font-style":"italic"},l))}},"drawRels"),Ow=mt(function(e,t,r){let n=e.append("g"),i=t.bgColor||"none",a=t.borderColor||"#444444",s=t.fontColor||"black",o=t.nodeType?{"stroke-width":1}:{"stroke-width":1,"stroke-dasharray":"7.0,7.0"},l=(Rw(n,e={x:t.x,y:t.y,fill:i,stroke:a,width:t.width,height:t.height,rx:2.5,ry:2.5,attrs:o}),r.boundaryFont());l.fontWeight="bold",l.fontSize=l.fontSize+2,l.fontColor=s,Ww(r)(t.label.text,n,t.x,t.y+t.label.Y,t.width,t.height,{fill:"#444444"},l),t.type&&""!==t.type.text&&((l=r.boundaryFont()).fontColor=s,Ww(r)(t.type.text,n,t.x,t.y+t.type.Y,t.width,t.height,{fill:"#444444"},l)),t.descr&&""!==t.descr.text&&((l=r.boundaryFont()).fontSize=l.fontSize-2,l.fontColor=s,Ww(r)(t.descr.text,n,t.x,t.y+t.descr.Y,t.width,t.height,{fill:"#444444"},l))},"drawBoundary"),Pw=mt(function(e,t,r){let n=t.bgColor||r[t.typeC4Shape.text+"_bg_color"],i=t.borderColor||r[t.typeC4Shape.text+"_border_color"],a=t.fontColor||"#FFFFFF",s="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAACD0lEQVR4Xu2YoU4EMRCGT+4j8Ai8AhaH4QHgAUjQuFMECUgMIUgwJAgMhgQsAYUiJCiQIBBY+EITsjfTdme6V24v4c8vyGbb+ZjOtN0bNcvjQXmkH83WvYBWto6PLm6v7p7uH1/w2fXD+PBycX1Pv2l3IdDm/vn7x+dXQiAubRzoURa7gRZWd0iGRIiJbOnhnfYBQZNJjNbuyY2eJG8fkDE3bbG4ep6MHUAsgYxmE3nVs6VsBWJSGccsOlFPmLIViMzLOB7pCVO2AtHJMohH7Fh6zqitQK7m0rJvAVYgGcEpe//PLdDz65sM4pF9N7ICcXDKIB5Nv6j7tD0NoSdM2QrU9Gg0ewE1LqBhHR3BBdvj2vapnidjHxD/q6vd7Pvhr31AwcY8eXMTXAKECZZJFXuEq27aLgQK5uLMohCenGGuGewOxSjBvYBqeG6B+Nqiblggdjnc+ZXDy+FNFpFzw76O3UBAROuXh6FoiAcf5g9eTvUgzy0nWg6I8cXHRUpg5bOVBCo+KDpFajOf23GgPme7RSQ+lacIENUgJ6gg1k6HjgOlqnLqip4tEuhv0hNEMXUD0clyXE3p6pZA0S2nnvTlXwLJEZWlb7cTQH1+USgTN4VhAenm/wea1OCAOmqo6fE1WCb9WSKBah+rbUWPWAmE2Rvk0ApiB45eOyNAzU8xcTvj8KvkKEoOaIYeHNA3ZuygAvFMUO0AAAAASUVORK5CYII=";switch(t.typeC4Shape.text){case"person":s="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAACD0lEQVR4Xu2YoU4EMRCGT+4j8Ai8AhaH4QHgAUjQuFMECUgMIUgwJAgMhgQsAYUiJCiQIBBY+EITsjfTdme6V24v4c8vyGbb+ZjOtN0bNcvjQXmkH83WvYBWto6PLm6v7p7uH1/w2fXD+PBycX1Pv2l3IdDm/vn7x+dXQiAubRzoURa7gRZWd0iGRIiJbOnhnfYBQZNJjNbuyY2eJG8fkDE3bbG4ep6MHUAsgYxmE3nVs6VsBWJSGccsOlFPmLIViMzLOB7pCVO2AtHJMohH7Fh6zqitQK7m0rJvAVYgGcEpe//PLdDz65sM4pF9N7ICcXDKIB5Nv6j7tD0NoSdM2QrU9Gg0ewE1LqBhHR3BBdvj2vapnidjHxD/q6vd7Pvhr31AwcY8eXMTXAKECZZJFXuEq27aLgQK5uLMohCenGGuGewOxSjBvYBqeG6B+Nqiblggdjnc+ZXDy+FNFpFzw76O3UBAROuXh6FoiAcf5g9eTvUgzy0nWg6I8cXHRUpg5bOVBCo+KDpFajOf23GgPme7RSQ+lacIENUgJ6gg1k6HjgOlqnLqip4tEuhv0hNEMXUD0clyXE3p6pZA0S2nnvTlXwLJEZWlb7cTQH1+USgTN4VhAenm/wea1OCAOmqo6fE1WCb9WSKBah+rbUWPWAmE2Rvk0ApiB45eOyNAzU8xcTvj8KvkKEoOaIYeHNA3ZuygAvFMUO0AAAAASUVORK5CYII=";break;case"external_person":s="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAAB6ElEQVR4Xu2YLY+EMBCG9+dWr0aj0Wg0Go1Go0+j8Xdv2uTCvv1gpt0ebHKPuhDaeW4605Z9mJvx4AdXUyTUdd08z+u6flmWZRnHsWkafk9DptAwDPu+f0eAYtu2PEaGWuj5fCIZrBAC2eLBAnRCsEkkxmeaJp7iDJ2QMDdHsLg8SxKFEJaAo8lAXnmuOFIhTMpxxKATebo4UiFknuNo4OniSIXQyRxEA3YsnjGCVEjVXD7yLUAqxBGUyPv/Y4W2beMgGuS7kVQIBycH0fD+oi5pezQETxdHKmQKGk1eQEYldK+jw5GxPfZ9z7Mk0Qnhf1W1m3w//EUn5BDmSZsbR44QQLBEqrBHqOrmSKaQAxdnLArCrxZcM7A7ZKs4ioRq8LFC+NpC3WCBJsvpVw5edm9iEXFuyNfxXAgSwfrFQ1c0iNda8AdejvUgnktOtJQQxmcfFzGglc5WVCj7oDgFqU18boeFSs52CUh8LE8BIVQDT1ABrB0HtgSEYlX5doJnCwv9TXocKCaKbnwhdDKPq4lf3SwU3HLq4V/+WYhHVMa/3b4IlfyikAduCkcBc7mQ3/z/Qq/cTuikhkzB12Ae/mcJC9U+Vo8Ej1gWAtgbeGgFsAMHr50BIWOLCbezvhpBFUdY6EJuJ/QDW0XoMX60zZ0AAAAASUVORK5CYII="}var o=e.append("g"),l=(o.attr("class","person-man"),Lw());switch(t.typeC4Shape.text){case"person":case"external_person":case"system":case"external_system":case"container":case"external_container":case"component":case"external_component":l.x=t.x,l.y=t.y,l.fill=n,l.width=t.width,l.height=t.height,l.stroke=i,l.rx=2.5,l.ry=2.5,l.attrs={"stroke-width":.5},Rw(o,l);break;case"system_db":case"external_system_db":case"container_db":case"external_container_db":case"component_db":case"external_component_db":o.append("path").attr("fill",n).attr("stroke-width","0.5").attr("stroke",i).attr("d","Mstartx,startyc0,-10 half,-10 half,-10c0,0 half,0 half,10l0,heightc0,10 -half,10 -half,10c0,0 -half,0 -half,-10l0,-height".replaceAll("startx",t.x).replaceAll("starty",t.y).replaceAll("half",t.width/2).replaceAll("height",t.height)),o.append("path").attr("fill","none").attr("stroke-width","0.5").attr("stroke",i).attr("d","Mstartx,startyc0,10 half,10 half,10c0,0 half,0 half,-10".replaceAll("startx",t.x).replaceAll("starty",t.y).replaceAll("half",t.width/2));break;case"system_queue":case"external_system_queue":case"container_queue":case"external_container_queue":case"component_queue":case"external_component_queue":o.append("path").attr("fill",n).attr("stroke-width","0.5").attr("stroke",i).attr("d","Mstartx,startylwidth,0c5,0 5,half 5,halfc0,0 0,half -5,halfl-width,0c-5,0 -5,-half -5,-halfc0,0 0,-half 5,-half".replaceAll("startx",t.x).replaceAll("starty",t.y).replaceAll("width",t.width).replaceAll("half",t.height/2)),o.append("path").attr("fill","none").attr("stroke-width","0.5").attr("stroke",i).attr("d","Mstartx,startyc-5,0 -5,half -5,halfc0,half 5,half 5,half".replaceAll("startx",t.x+t.width).replaceAll("starty",t.y).replaceAll("half",t.height/2))}switch(e=Yw(r,t.typeC4Shape.text),o.append("text").attr("fill",a).attr("font-family",e.fontFamily).attr("font-size",e.fontSize-2).attr("font-style","italic").attr("lengthAdjust","spacing").attr("textLength",t.typeC4Shape.width).attr("x",t.x+t.width/2-t.typeC4Shape.width/2).attr("y",t.y+t.typeC4Shape.Y).text("<<"+t.typeC4Shape.text+">>"),t.typeC4Shape.text){case"person":case"external_person":Mw(o,48,48,t.x+t.width/2-24,t.y+t.image.Y,s)}let c=r[t.typeC4Shape.text+"Font"]();return c.fontWeight="bold",c.fontSize=c.fontSize+2,c.fontColor=a,Ww(r)(t.label.text,o,t.x,t.y+t.label.Y,t.width,t.height,{fill:a},c),(c=r[t.typeC4Shape.text+"Font"]()).fontColor=a,t.techn&&""!==t.techn?.text?Ww(r)(t.techn.text,o,t.x,t.y+t.techn.Y,t.width,t.height,{fill:a,"font-style":"italic"},c):t.type&&""!==t.type.text&&Ww(r)(t.type.text,o,t.x,t.y+t.type.Y,t.width,t.height,{fill:a,"font-style":"italic"},c),t.descr&&""!==t.descr.text&&((c=r.personFont()).fontColor=a,Ww(r)(t.descr.text,o,t.x,t.y+t.descr.Y,t.width,t.height,{fill:a},c)),t.height},"drawC4Shape"),Bw=mt(function(e){e.append("defs").append("symbol").attr("id","database").attr("fill-rule","evenodd").attr("clip-rule","evenodd").append("path").attr("transform","scale(.5)").attr("d","M12.258.001l.256.004.255.005.253.008.251.01.249.012.247.015.246.016.242.019.241.02.239.023.236.024.233.027.231.028.229.031.225.032.223.034.22.036.217.038.214.04.211.041.208.043.205.045.201.046.198.048.194.05.191.051.187.053.183.054.18.056.175.057.172.059.168.06.163.061.16.063.155.064.15.066.074.033.073.033.071.034.07.034.069.035.068.035.067.035.066.035.064.036.064.036.062.036.06.036.06.037.058.037.058.037.055.038.055.038.053.038.052.038.051.039.05.039.048.039.047.039.045.04.044.04.043.04.041.04.04.041.039.041.037.041.036.041.034.041.033.042.032.042.03.042.029.042.027.042.026.043.024.043.023.043.021.043.02.043.018.044.017.043.015.044.013.044.012.044.011.045.009.044.007.045.006.045.004.045.002.045.001.045v17l-.001.045-.002.045-.004.045-.006.045-.007.045-.009.044-.011.045-.012.044-.013.044-.015.044-.017.043-.018.044-.02.043-.021.043-.023.043-.024.043-.026.043-.027.042-.029.042-.03.042-.032.042-.033.042-.034.041-.036.041-.037.041-.039.041-.04.041-.041.04-.043.04-.044.04-.045.04-.047.039-.048.039-.05.039-.051.039-.052.038-.053.038-.055.038-.055.038-.058.037-.058.037-.06.037-.06.036-.062.036-.064.036-.064.036-.066.035-.067.035-.068.035-.069.035-.07.034-.071.034-.073.033-.074.033-.15.066-.155.064-.16.063-.163.061-.168.06-.172.059-.175.057-.18.056-.183.054-.187.053-.191.051-.194.05-.198.048-.201.046-.205.045-.208.043-.211.041-.214.04-.217.038-.22.036-.223.034-.225.032-.229.031-.231.028-.233.027-.236.024-.239.023-.241.02-.242.019-.246.016-.247.015-.249.012-.251.01-.253.008-.255.005-.256.004-.258.001-.258-.001-.256-.004-.255-.005-.253-.008-.251-.01-.249-.012-.247-.015-.245-.016-.243-.019-.241-.02-.238-.023-.236-.024-.234-.027-.231-.028-.228-.031-.226-.032-.223-.034-.22-.036-.217-.038-.214-.04-.211-.041-.208-.043-.204-.045-.201-.046-.198-.048-.195-.05-.19-.051-.187-.053-.184-.054-.179-.056-.176-.057-.172-.059-.167-.06-.164-.061-.159-.063-.155-.064-.151-.066-.074-.033-.072-.033-.072-.034-.07-.034-.069-.035-.068-.035-.067-.035-.066-.035-.064-.036-.063-.036-.062-.036-.061-.036-.06-.037-.058-.037-.057-.037-.056-.038-.055-.038-.053-.038-.052-.038-.051-.039-.049-.039-.049-.039-.046-.039-.046-.04-.044-.04-.043-.04-.041-.04-.04-.041-.039-.041-.037-.041-.036-.041-.034-.041-.033-.042-.032-.042-.03-.042-.029-.042-.027-.042-.026-.043-.024-.043-.023-.043-.021-.043-.02-.043-.018-.044-.017-.043-.015-.044-.013-.044-.012-.044-.011-.045-.009-.044-.007-.045-.006-.045-.004-.045-.002-.045-.001-.045v-17l.001-.045.002-.045.004-.045.006-.045.007-.045.009-.044.011-.045.012-.044.013-.044.015-.044.017-.043.018-.044.02-.043.021-.043.023-.043.024-.043.026-.043.027-.042.029-.042.03-.042.032-.042.033-.042.034-.041.036-.041.037-.041.039-.041.04-.041.041-.04.043-.04.044-.04.046-.04.046-.039.049-.039.049-.039.051-.039.052-.038.053-.038.055-.038.056-.038.057-.037.058-.037.06-.037.061-.036.062-.036.063-.036.064-.036.066-.035.067-.035.068-.035.069-.035.07-.034.072-.034.072-.033.074-.033.151-.066.155-.064.159-.063.164-.061.167-.06.172-.059.176-.057.179-.056.184-.054.187-.053.19-.051.195-.05.198-.048.201-.046.204-.045.208-.043.211-.041.214-.04.217-.038.22-.036.223-.034.226-.032.228-.031.231-.028.234-.027.236-.024.238-.023.241-.02.243-.019.245-.016.247-.015.249-.012.251-.01.253-.008.255-.005.256-.004.258-.001.258.001zm-9.258 20.499v.01l.001.021.003.021.004.022.005.021.006.022.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.023.018.024.019.024.021.024.022.025.023.024.024.025.052.049.056.05.061.051.066.051.07.051.075.051.079.052.084.052.088.052.092.052.097.052.102.051.105.052.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.048.144.049.147.047.152.047.155.047.16.045.163.045.167.043.171.043.176.041.178.041.183.039.187.039.19.037.194.035.197.035.202.033.204.031.209.03.212.029.216.027.219.025.222.024.226.021.23.02.233.018.236.016.24.015.243.012.246.01.249.008.253.005.256.004.259.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.021.224-.024.22-.026.216-.027.212-.028.21-.031.205-.031.202-.034.198-.034.194-.036.191-.037.187-.039.183-.04.179-.04.175-.042.172-.043.168-.044.163-.045.16-.046.155-.046.152-.047.148-.048.143-.049.139-.049.136-.05.131-.05.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.053.083-.051.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.05.023-.024.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.023.01-.022.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.127l-.077.055-.08.053-.083.054-.085.053-.087.052-.09.052-.093.051-.095.05-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.045-.118.044-.12.043-.122.042-.124.042-.126.041-.128.04-.13.04-.132.038-.134.038-.135.037-.138.037-.139.035-.142.035-.143.034-.144.033-.147.032-.148.031-.15.03-.151.03-.153.029-.154.027-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.01-.179.008-.179.008-.181.006-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.006-.179-.008-.179-.008-.178-.01-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.027-.153-.029-.151-.03-.15-.03-.148-.031-.146-.032-.145-.033-.143-.034-.141-.035-.14-.035-.137-.037-.136-.037-.134-.038-.132-.038-.13-.04-.128-.04-.126-.041-.124-.042-.122-.042-.12-.044-.117-.043-.116-.045-.113-.045-.112-.046-.109-.047-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.05-.093-.052-.09-.051-.087-.052-.085-.053-.083-.054-.08-.054-.077-.054v4.127zm0-5.654v.011l.001.021.003.021.004.021.005.022.006.022.007.022.009.022.01.022.011.023.012.023.013.023.015.024.016.023.017.024.018.024.019.024.021.024.022.024.023.025.024.024.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.052.11.051.114.051.119.052.123.05.127.051.131.05.135.049.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.044.171.042.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.022.23.02.233.018.236.016.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.012.241-.015.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.048.139-.05.136-.049.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.051.051-.049.023-.025.023-.024.021-.025.02-.024.019-.024.018-.024.017-.024.015-.023.014-.023.013-.024.012-.022.01-.023.01-.023.008-.022.006-.022.006-.022.004-.021.004-.022.001-.021.001-.021v-4.139l-.077.054-.08.054-.083.054-.085.052-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.044-.118.044-.12.044-.122.042-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.035-.143.033-.144.033-.147.033-.148.031-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.009-.179.009-.179.007-.181.007-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.007-.179-.007-.179-.009-.178-.009-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.031-.146-.033-.145-.033-.143-.033-.141-.035-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.04-.126-.041-.124-.042-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.051-.093-.051-.09-.051-.087-.053-.085-.052-.083-.054-.08-.054-.077-.054v4.139zm0-5.666v.011l.001.02.003.022.004.021.005.022.006.021.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.024.018.023.019.024.021.025.022.024.023.024.024.025.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.051.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.043.171.043.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.021.23.02.233.018.236.017.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.013.241-.014.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.049.139-.049.136-.049.131-.051.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.049.023-.025.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.022.01-.023.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.153l-.077.054-.08.054-.083.053-.085.053-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.048-.105.048-.106.048-.109.046-.111.046-.114.046-.115.044-.118.044-.12.043-.122.043-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.034-.143.034-.144.033-.147.032-.148.032-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.024-.161.024-.162.023-.163.023-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.01-.178.01-.179.009-.179.007-.181.006-.182.006-.182.004-.184.003-.184.001-.185.001-.185-.001-.184-.001-.184-.003-.182-.004-.182-.006-.181-.006-.179-.007-.179-.009-.178-.01-.176-.01-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.023-.162-.023-.161-.024-.159-.024-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.032-.146-.032-.145-.033-.143-.034-.141-.034-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.041-.126-.041-.124-.041-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.048-.105-.048-.102-.048-.1-.05-.097-.049-.095-.051-.093-.051-.09-.052-.087-.052-.085-.053-.083-.053-.08-.054-.077-.054v4.153zm8.74-8.179l-.257.004-.254.005-.25.008-.247.011-.244.012-.241.014-.237.016-.233.018-.231.021-.226.022-.224.023-.22.026-.216.027-.212.028-.21.031-.205.032-.202.033-.198.034-.194.036-.191.038-.187.038-.183.04-.179.041-.175.042-.172.043-.168.043-.163.045-.16.046-.155.046-.152.048-.148.048-.143.048-.139.049-.136.05-.131.05-.126.051-.123.051-.118.051-.114.052-.11.052-.106.052-.101.052-.096.052-.092.052-.088.052-.083.052-.079.052-.074.051-.07.052-.065.051-.06.05-.056.05-.051.05-.023.025-.023.024-.021.024-.02.025-.019.024-.018.024-.017.023-.015.024-.014.023-.013.023-.012.023-.01.023-.01.022-.008.022-.006.023-.006.021-.004.022-.004.021-.001.021-.001.021.001.021.001.021.004.021.004.022.006.021.006.023.008.022.01.022.01.023.012.023.013.023.014.023.015.024.017.023.018.024.019.024.02.025.021.024.023.024.023.025.051.05.056.05.06.05.065.051.07.052.074.051.079.052.083.052.088.052.092.052.096.052.101.052.106.052.11.052.114.052.118.051.123.051.126.051.131.05.136.05.139.049.143.048.148.048.152.048.155.046.16.046.163.045.168.043.172.043.175.042.179.041.183.04.187.038.191.038.194.036.198.034.202.033.205.032.21.031.212.028.216.027.22.026.224.023.226.022.231.021.233.018.237.016.241.014.244.012.247.011.25.008.254.005.257.004.26.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.022.224-.023.22-.026.216-.027.212-.028.21-.031.205-.032.202-.033.198-.034.194-.036.191-.038.187-.038.183-.04.179-.041.175-.042.172-.043.168-.043.163-.045.16-.046.155-.046.152-.048.148-.048.143-.048.139-.049.136-.05.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.05.051-.05.023-.025.023-.024.021-.024.02-.025.019-.024.018-.024.017-.023.015-.024.014-.023.013-.023.012-.023.01-.023.01-.022.008-.022.006-.023.006-.021.004-.022.004-.021.001-.021.001-.021-.001-.021-.001-.021-.004-.021-.004-.022-.006-.021-.006-.023-.008-.022-.01-.022-.01-.023-.012-.023-.013-.023-.014-.023-.015-.024-.017-.023-.018-.024-.019-.024-.02-.025-.021-.024-.023-.024-.023-.025-.051-.05-.056-.05-.06-.05-.065-.051-.07-.052-.074-.051-.079-.052-.083-.052-.088-.052-.092-.052-.096-.052-.101-.052-.106-.052-.11-.052-.114-.052-.118-.051-.123-.051-.126-.051-.131-.05-.136-.05-.139-.049-.143-.048-.148-.048-.152-.048-.155-.046-.16-.046-.163-.045-.168-.043-.172-.043-.175-.042-.179-.041-.183-.04-.187-.038-.191-.038-.194-.036-.198-.034-.202-.033-.205-.032-.21-.031-.212-.028-.216-.027-.22-.026-.224-.023-.226-.022-.231-.021-.233-.018-.237-.016-.241-.014-.244-.012-.247-.011-.25-.008-.254-.005-.257-.004-.26-.001-.26.001z")},"insertDatabaseIcon"),$w=mt(function(e){e.append("defs").append("symbol").attr("id","computer").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M2 2v13h20v-13h-20zm18 11h-16v-9h16v9zm-10.228 6l.466-1h3.524l.467 1h-4.457zm14.228 3h-24l2-6h2.104l-1.33 4h18.45l-1.297-4h2.073l2 6zm-5-10h-14v-7h14v7z")},"insertComputerIcon"),Fw=mt(function(e){e.append("defs").append("symbol").attr("id","clock").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm5.848 12.459c.202.038.202.333.001.372-1.907.361-6.045 1.111-6.547 1.111-.719 0-1.301-.582-1.301-1.301 0-.512.77-5.447 1.125-7.445.034-.192.312-.181.343.014l.985 6.238 5.394 1.011z")},"insertClockIcon"),zw=mt(function(e){e.append("defs").append("marker").attr("id","arrowhead").attr("refX",9).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z")},"insertArrowHead"),Gw=mt(function(e){e.append("defs").append("marker").attr("id","arrowend").attr("refX",1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 10 0 L 0 5 L 10 10 z")},"insertArrowEnd"),Uw=mt(function(e){e.append("defs").append("marker").attr("id","filled-head").attr("refX",18).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"insertArrowFilledHead"),qw=mt(function(e){e.append("defs").append("marker").attr("id","sequencenumber").attr("refX",15).attr("refY",15).attr("markerWidth",60).attr("markerHeight",40).attr("orient","auto").append("circle").attr("cx",15).attr("cy",15).attr("r",6)},"insertDynamicNumber"),jw=mt(function(e){(e=e.append("defs").append("marker").attr("id","crosshead").attr("markerWidth",15).attr("markerHeight",8).attr("orient","auto").attr("refX",16).attr("refY",4)).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"),e.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"),Yw=mt((e,t)=>({fontFamily:e[t+"FontFamily"],fontSize:e[t+"FontSize"],fontWeight:e[t+"FontWeight"]}),"getC4ShapeFont"),mt(t,"byText"),mt(l,"byTspan"),mt(r,"byFo"),mt(g,"_setTextAttrs"),Ww=function(e){return"fo"===e.textPlacement?r:"old"===e.textPlacement?t:l},Hw={drawRect:Rw,drawBoundary:Ow,drawC4Shape:Pw,drawRels:Dw,drawImage:Mw,insertArrowHead:zw,insertArrowEnd:Gw,insertArrowFilledHead:Uw,insertDynamicNumber:qw,insertArrowCrossHead:jw,insertDatabaseIcon:Bw,insertComputerIcon:$w,insertClockIcon:Fw}}),c6=b(()=>{Vw="object"==typeof global&&global&&global.Object===Object&&global,Xw=Vw}),h6=b(()=>{c6(),Kw="object"==typeof self&&self&&self.Object===Object&&self,Kw=Xw||Kw||Function("return this")(),Zw=Kw}),u6=b(()=>{h6(),Qw=Zw.Symbol,Jw=Qw});function d6(e){var t=g6.call(e,m6),r=e[m6];try{var n=!(e[m6]=void 0)}catch{}var i=f6.call(e);return n&&(t?e[m6]=r:delete e[m6]),i}var p6,g6,f6,m6,y6,v6=b(()=>{u6(),p6=Object.prototype,g6=p6.hasOwnProperty,f6=p6.toString,m6=Jw?Jw.toStringTag:void 0,mt(d6,"getRawTag"),y6=d6});function x6(e){return w6.call(e)}var b6,w6,k6,T6=b(()=>{b6=Object.prototype,w6=b6.toString,mt(x6,"objectToString"),k6=x6});function E6(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":(C6&&C6 in Object(e)?y6:k6)(e)}var C6,_6,S6=b(()=>{u6(),v6(),T6(),C6=Jw?Jw.toStringTag:void 0,mt(E6,"baseGetTag"),_6=E6});function A6(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}var L6,N6=b(()=>{mt(A6,"isObject"),L6=A6});function I6(e){return!!L6(e)&&("[object Function]"==(e=_6(e))||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e)}var R6,M6,D6,O6=b(()=>{S6(),N6(),mt(I6,"isFunction"),R6=I6}),P6=b(()=>{h6(),M6=Zw["__core-js_shared__"],D6=M6});function B6(e){return!!$6&&$6 in e}var $6,F6,z6=b(()=>{var e;P6(),e=/[^.]+$/.exec(D6&&D6.keys&&D6.keys.IE_PROTO||""),$6=e?"Symbol(src)_1."+e:"",mt(B6,"isMasked"),F6=B6});function G6(e){if(null!=e){try{return q6.call(e)}catch{}try{return e+""}catch{}}return""}var U6,q6,j6,Y6=b(()=>{U6=Function.prototype,q6=U6.toString,mt(G6,"toSource"),j6=G6});function W6(e){return!(!L6(e)||F6(e))&&(R6(e)?Z6:V6).test(j6(e))}var H6,V6,X6,K6,Z6,Q6,J6=b(()=>{O6(),z6(),N6(),Y6(),H6=/[\\^$.*+?()[\]{}|]/g,V6=/^\[object .+?Constructor\]$/,X6=Function.prototype,K6=Object.prototype,X6=X6.toString,K6=K6.hasOwnProperty,Z6=RegExp("^"+X6.call(K6).replace(H6,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),mt(W6,"baseIsNative"),Q6=W6});function ek(e,t){return e?.[t]}var tk,rk=b(()=>{mt(ek,"getValue"),tk=ek});function nk(e,t){return e=tk(e,t),Q6(e)?e:void 0}var ik,ak,sk,ok=b(()=>{J6(),rk(),mt(nk,"getNative"),ik=nk}),lk=b(()=>{ok(),ak=ik(Object,"create"),sk=ak});function ck(){this.__data__=sk?sk(null):{},this.size=0}var hk,uk=b(()=>{lk(),mt(ck,"hashClear"),hk=ck});function dk(e){return e=this.has(e)&&delete this.__data__[e],this.size-=e?1:0,e}var pk,gk=b(()=>{mt(dk,"hashDelete"),pk=dk});function fk(e){var t,r=this.__data__;return sk?"__lodash_hash_undefined__"===(t=r[e])?void 0:t:yk.call(r,e)?r[e]:void 0}var mk,yk,vk,xk=b(()=>{lk(),mk=Object.prototype,yk=mk.hasOwnProperty,mt(fk,"hashGet"),vk=fk});function bk(e){var t=this.__data__;return sk?void 0!==t[e]:kk.call(t,e)}var wk,kk,Tk,Ek=b(()=>{lk(),wk=Object.prototype,kk=wk.hasOwnProperty,mt(bk,"hashHas"),Tk=bk});function Ck(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=sk&&void 0===t?"__lodash_hash_undefined__":t,this}var _k,Sk=b(()=>{lk(),mt(Ck,"hashSet"),_k=Ck});function Ak(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}var Lk,Nk=b(()=>{uk(),gk(),xk(),Ek(),Sk(),mt(Ak,"Hash"),Ak.prototype.clear=hk,Ak.prototype.delete=pk,Ak.prototype.get=vk,Ak.prototype.has=Tk,Ak.prototype.set=_k,Lk=Ak});function Ik(){this.__data__=[],this.size=0}var Rk,Mk=b(()=>{mt(Ik,"listCacheClear"),Rk=Ik});function Dk(e,t){return e===t||e!=e&&t!=t}var Ok,Pk=b(()=>{mt(Dk,"eq"),Ok=Dk});function Bk(e,t){for(var r=e.length;r--;)if(Ok(e[r][0],t))return r;return-1}var $k,Fk=b(()=>{Pk(),mt(Bk,"assocIndexOf"),$k=Bk});function zk(e){var t=this.__data__;return!((e=$k(t,e))<0||(e==t.length-1?t.pop():Uk.call(t,e,1),--this.size,0))}var Gk,Uk,qk,jk=b(()=>{Fk(),Gk=Array.prototype,Uk=Gk.splice,mt(zk,"listCacheDelete"),qk=zk});function Yk(e){var t=this.__data__;return(e=$k(t,e))<0?void 0:t[e][1]}var Wk,Hk=b(()=>{Fk(),mt(Yk,"listCacheGet"),Wk=Yk});function Vk(e){return-1<$k(this.__data__,e)}var Xk,Kk=b(()=>{Fk(),mt(Vk,"listCacheHas"),Xk=Vk});function Zk(e,t){var r=this.__data__,n=$k(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}var Qk,Jk=b(()=>{Fk(),mt(Zk,"listCacheSet"),Qk=Zk});function eT(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}var tT,rT,nT,iT=b(()=>{Mk(),jk(),Hk(),Kk(),Jk(),mt(eT,"ListCache"),eT.prototype.clear=Rk,eT.prototype.delete=qk,eT.prototype.get=Wk,eT.prototype.has=Xk,eT.prototype.set=Qk,tT=eT}),aT=b(()=>{ok(),h6(),rT=ik(Zw,"Map"),nT=rT});function sT(){this.size=0,this.__data__={hash:new Lk,map:new(nT||tT),string:new Lk}}var oT,lT=b(()=>{Nk(),iT(),aT(),mt(sT,"mapCacheClear"),oT=sT});function cT(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}var hT,uT=b(()=>{mt(cT,"isKeyable"),hT=cT});function dT(e,t){return e=e.__data__,hT(t)?e["string"==typeof t?"string":"hash"]:e.map}var pT,gT=b(()=>{uT(),mt(dT,"getMapData"),pT=dT});function fT(e){return e=pT(this,e).delete(e),this.size-=e?1:0,e}var mT,yT=b(()=>{gT(),mt(fT,"mapCacheDelete"),mT=fT});function vT(e){return pT(this,e).get(e)}var xT,bT=b(()=>{gT(),mt(vT,"mapCacheGet"),xT=vT});function wT(e){return pT(this,e).has(e)}var kT,TT=b(()=>{gT(),mt(wT,"mapCacheHas"),kT=wT});function ET(e,t){var r=pT(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}var CT,_T=b(()=>{gT(),mt(ET,"mapCacheSet"),CT=ET});function ST(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}var AT,LT=b(()=>{lT(),yT(),bT(),TT(),_T(),mt(ST,"MapCache"),ST.prototype.clear=oT,ST.prototype.delete=mT,ST.prototype.get=xT,ST.prototype.has=kT,ST.prototype.set=CT,AT=ST});function NT(n,i){if("function"!=typeof n||null!=i&&"function"!=typeof i)throw new TypeError(IT);var a=mt(function(){var e=arguments,t=i?i.apply(this,e):e[0],r=a.cache;return r.has(t)?r.get(t):(e=n.apply(this,e),a.cache=r.set(t,e)||r,e)},"memoized");return a.cache=new(NT.Cache||AT),a}var IT,RT,MT=b(()=>{LT(),IT="Expected a function",mt(NT,"memoize"),NT.Cache=AT,RT=NT});function DT(){this.__data__=new tT,this.size=0}var OT,PT=b(()=>{iT(),mt(DT,"stackClear"),OT=DT});function BT(e){var t=this.__data__,e=t.delete(e);return this.size=t.size,e}var $T,FT=b(()=>{mt(BT,"stackDelete"),$T=BT});function zT(e){return this.__data__.get(e)}var GT,UT=b(()=>{mt(zT,"stackGet"),GT=zT});function qT(e){return this.__data__.has(e)}var jT,YT=b(()=>{mt(qT,"stackHas"),jT=qT});function WT(e,t){var r=this.__data__;if(r instanceof tT){var n=r.__data__;if(!nT||n.length<199)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new AT(n)}return r.set(e,t),this.size=r.size,this}var HT,VT=b(()=>{iT(),aT(),LT(),mt(WT,"stackSet"),HT=WT});function XT(e){e=this.__data__=new tT(e),this.size=e.size}var KT,ZT,QT,JT=b(()=>{iT(),PT(),FT(),UT(),YT(),VT(),mt(XT,"Stack"),XT.prototype.clear=OT,XT.prototype.delete=$T,XT.prototype.get=GT,XT.prototype.has=jT,XT.prototype.set=HT,KT=XT}),e7=b(()=>{ok(),ZT=(()=>{try{var e=ik(Object,"defineProperty");return e({},"",{}),e}catch{}})(),QT=ZT});function t7(e,t,r){"__proto__"==t&&QT?QT(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}var r7,n7=b(()=>{e7(),mt(t7,"baseAssignValue"),r7=t7});function i7(e,t,r){(void 0===r||Ok(e[t],r))&&(void 0!==r||t in e)||r7(e,t,r)}var a7,s7=b(()=>{n7(),Pk(),mt(i7,"assignMergeValue"),a7=i7});function o7(l){return function(e,t,r){for(var n=-1,i=Object(e),a=r(e),s=a.length;s--;){var o=a[l?s:++n];if(!1===t(i[o],o,i))break}return e}}var l7,c7,h7,u7=b(()=>{mt(o7,"createBaseFor"),l7=o7}),d7=b(()=>{u7(),c7=l7(),h7=c7});function p7(e,t){return t?e.slice():(t=e.length,t=m7?m7(t):new e.constructor(t),e.copy(t),t)}var g7,f7,m7,y7,v7,x7,b7=b(()=>{h6(),g7="object"==typeof exports&&exports&&!exports.nodeType&&exports,f7=(f7=g7&&"object"==typeof module&&module&&!module.nodeType&&module)&&f7.exports===g7?Zw.Buffer:void 0,m7=f7?f7.allocUnsafe:void 0,mt(p7,"cloneBuffer"),y7=p7}),w7=b(()=>{h6(),v7=Zw.Uint8Array,x7=v7});function k7(e){var t=new e.constructor(e.byteLength);return new x7(t).set(new x7(e)),t}var T7,E7=b(()=>{w7(),mt(k7,"cloneArrayBuffer"),T7=k7});function C7(e,t){return t=t?T7(e.buffer):e.buffer,new e.constructor(t,e.byteOffset,e.length)}var _7,S7=b(()=>{E7(),mt(C7,"cloneTypedArray"),_7=C7});function A7(e,t){var r=-1,n=e.length;for(t=t||Array(n);++r<n;)t[r]=e[r];return t}var L7,N7,I7,R7=b(()=>{mt(A7,"copyArray"),L7=A7}),M7=b(()=>{function t(){}N6(),N7=Object.create,mt(t,"object"),I7=function(e){return L6(e)?N7?N7(e):(t.prototype=e,e=new t,t.prototype=void 0,e):{}}});function D7(t,r){return function(e){return t(r(e))}}var O7,P7,B7,$7=b(()=>{mt(D7,"overArg"),O7=D7}),F7=b(()=>{$7(),P7=O7(Object.getPrototypeOf,Object),B7=P7});function z7(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||G7)}var G7,U7,q7=b(()=>{G7=Object.prototype,mt(z7,"isPrototype"),U7=z7});function j7(e){return"function"!=typeof e.constructor||U7(e)?{}:I7(B7(e))}var Y7,W7=b(()=>{M7(),F7(),q7(),mt(j7,"initCloneObject"),Y7=j7});function H7(e){return null!=e&&"object"==typeof e}var V7,X7=b(()=>{mt(H7,"isObjectLike"),V7=H7});function K7(e){return V7(e)&&"[object Arguments]"==_6(e)}var Z7,Q7,J7,e8,t8,r8,n8,i8=b(()=>{S6(),X7(),mt(K7,"baseIsArguments"),Z7=K7}),a8=b(()=>{i8(),X7(),e8=Object.prototype,Q7=e8.hasOwnProperty,J7=e8.propertyIsEnumerable,e8=Z7(function(){return arguments}())?Z7:function(e){return V7(e)&&Q7.call(e,"callee")&&!J7.call(e,"callee")},t8=e8}),s8=b(()=>{r8=Array.isArray,n8=r8});function o8(e){return"number"==typeof e&&-1<e&&e%1==0&&e<=9007199254740991}var l8,c8=b(()=>{mt(o8,"isLength"),l8=o8});function h8(e){return null!=e&&l8(e.length)&&!R6(e)}var u8,d8=b(()=>{O6(),c8(),mt(h8,"isArrayLike"),u8=h8});function p8(e){return V7(e)&&u8(e)}var g8,f8=b(()=>{d8(),X7(),mt(p8,"isArrayLikeObject"),g8=p8});function m8(){return!1}var y8,v8,x8,b8,w8=b(()=>{mt(m8,"stubFalse"),y8=m8}),k8=b(()=>{h6(),w8(),x8="object"==typeof exports&&exports&&!exports.nodeType&&exports,v8=(v8=x8&&"object"==typeof module&&module&&!module.nodeType&&module)&&v8.exports===x8?Zw.Buffer:void 0,x8=v8?v8.isBuffer:void 0,b8=x8||y8});function T8(e){return!(!V7(e)||"[object Object]"!=_6(e))&&(null===(e=B7(e))||"function"==typeof(e=S8.call(e,"constructor")&&e.constructor)&&e instanceof e&&_8.call(e)==A8)}var E8,C8,_8,S8,A8,L8,N8=b(()=>{S6(),F7(),X7(),E8=Function.prototype,C8=Object.prototype,_8=E8.toString,S8=C8.hasOwnProperty,A8=_8.call(Object),mt(T8,"isPlainObject"),L8=T8});function I8(e){return V7(e)&&l8(e.length)&&!!R8[_6(e)]}var R8,M8,D8=b(()=>{S6(),c8(),X7(),(R8={})["[object Float32Array]"]=R8["[object Float64Array]"]=R8["[object Int8Array]"]=R8["[object Int16Array]"]=R8["[object Int32Array]"]=R8["[object Uint8Array]"]=R8["[object Uint8ClampedArray]"]=R8["[object Uint16Array]"]=R8["[object Uint32Array]"]=!0,R8["[object Arguments]"]=R8["[object Array]"]=R8["[object ArrayBuffer]"]=R8["[object Boolean]"]=R8["[object DataView]"]=R8["[object Date]"]=R8["[object Error]"]=R8["[object Function]"]=R8["[object Map]"]=R8["[object Number]"]=R8["[object Object]"]=R8["[object RegExp]"]=R8["[object Set]"]=R8["[object String]"]=R8["[object WeakMap]"]=!1,mt(I8,"baseIsTypedArray"),M8=I8});function O8(t){return function(e){return t(e)}}var P8,B8,$8,F8,z8,G8,U8,q8=b(()=>{mt(O8,"baseUnary"),P8=O8}),j8=b(()=>{c6(),F8="object"==typeof exports&&exports&&!exports.nodeType&&exports,B8=F8&&"object"==typeof module&&module&&!module.nodeType&&module,F8=B8&&B8.exports===F8,$8=F8&&Xw.process,F8=(()=>{try{return B8&&B8.require&&B8.require("util").types||$8&&$8.binding&&$8.binding("util")}catch{}})(),z8=F8}),Y8=b(()=>{D8(),q8(),j8(),G8=(G8=z8&&z8.isTypedArray)?P8(G8):M8,U8=G8});function W8(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var H8,V8=b(()=>{mt(W8,"safeGet"),H8=W8});function X8(e,t,r){var n=e[t];Z8.call(e,t)&&Ok(n,r)&&(void 0!==r||t in e)||r7(e,t,r)}var K8,Z8,Q8,J8=b(()=>{n7(),Pk(),K8=Object.prototype,Z8=K8.hasOwnProperty,mt(X8,"assignValue"),Q8=X8});function eE(e,t,r,n){var i=!r;r=r||{};for(var a=-1,s=t.length;++a<s;){var o=t[a],l=n?n(r[o],e[o],o,r,e):void 0;void 0===l&&(l=e[o]),(i?r7:Q8)(r,o,l)}return r}var tE,rE=b(()=>{J8(),n7(),mt(eE,"copyObject"),tE=eE});function nE(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}var iE,aE=b(()=>{mt(nE,"baseTimes"),iE=nE});function sE(e,t){var r=typeof e;return!!(t=t??9007199254740991)&&("number"==r||"symbol"!=r&&oE.test(e))&&-1<e&&e%1==0&&e<t}var oE,lE,cE=b(()=>{oE=/^(?:0|[1-9]\d*)$/,mt(sE,"isIndex"),lE=sE});function hE(e,t){var r,n=n8(e),i=!n&&t8(e),a=!n&&!i&&b8(e),s=!n&&!i&&!a&&U8(e),o=n||i||a||s,l=o?iE(e.length,String):[],c=l.length;for(r in e)!t&&!dE.call(e,r)||o&&("length"==r||a&&("offset"==r||"parent"==r)||s&&("buffer"==r||"byteLength"==r||"byteOffset"==r)||lE(r,c))||l.push(r);return l}var uE,dE,pE,gE=b(()=>{aE(),a8(),s8(),k8(),cE(),Y8(),uE=Object.prototype,dE=uE.hasOwnProperty,mt(hE,"arrayLikeKeys"),pE=hE});function fE(e){var t=[];if(null!=e)for(var r in Object(e))t.push(r);return t}var mE,yE=b(()=>{mt(fE,"nativeKeysIn"),mE=fE});function vE(e){if(!L6(e))return mE(e);var t,r=U7(e),n=[];for(t in e)("constructor"!=t||!r&&bE.call(e,t))&&n.push(t);return n}var xE,bE,wE,kE=b(()=>{N6(),q7(),yE(),xE=Object.prototype,bE=xE.hasOwnProperty,mt(vE,"baseKeysIn"),wE=vE});function TE(e){return u8(e)?pE(e,!0):wE(e)}var EE,CE=b(()=>{gE(),kE(),d8(),mt(TE,"keysIn"),EE=TE});function _E(e){return tE(e,EE(e))}var SE,AE=b(()=>{rE(),CE(),mt(_E,"toPlainObject"),SE=_E});function LE(e,t,r,n,i,a,s){var o,l,c,h=H8(e,r),u=H8(t,r),d=s.get(u);d||((t=void 0===(d=a?a(h,u,r+"",e,t,s):void 0))&&(l=!(o=n8(u))&&b8(u),c=!o&&!l&&U8(u),d=u,o||l||c?d=n8(h)?h:g8(h)?L7(h):l?y7(u,!(t=!1)):c?_7(u,!(t=!1)):[]:L8(u)||t8(u)?t8(d=h)?d=SE(h):L6(h)&&!R6(h)||(d=Y7(u)):t=!1),t&&(s.set(u,d),i(d,u,n,a,s),s.delete(u))),a7(e,r,d)}var NE,IE=b(()=>{s7(),b7(),S7(),R7(),W7(),a8(),s8(),f8(),k8(),O6(),N6(),N8(),Y8(),V8(),AE(),mt(LE,"baseMergeDeep"),NE=LE});function RE(n,i,a,s,o){n!==i&&h7(i,function(e,t){var r;o=o||new KT,L6(e)?NE(n,i,t,a,RE,s,o):(r=s?s(H8(n,t),e,t+"",n,i,o):void 0,a7(n,t,void 0===r?e:r))},EE)}var ME,DE=b(()=>{JT(),s7(),d7(),IE(),N6(),CE(),V8(),mt(RE,"baseMerge"),ME=RE});function OE(e){return e}var PE,BE=b(()=>{mt(OE,"identity"),PE=OE});function $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 FE,zE=b(()=>{mt($E,"apply"),FE=$E});function GE(a,s,o){return s=UE(void 0===s?a.length-1:s,0),function(){for(var e=arguments,t=-1,r=UE(e.length-s,0),n=Array(r);++t<r;)n[t]=e[s+t];for(var t=-1,i=Array(s+1);++t<s;)i[t]=e[t];return i[s]=o(n),FE(a,this,i)}}var UE,qE,jE=b(()=>{zE(),UE=Math.max,mt(GE,"overRest"),qE=GE});function YE(e){return function(){return e}}var WE,HE,VE=b(()=>{mt(YE,"constant"),WE=YE}),XE=b(()=>{VE(),e7(),BE(),HE=QT?function(e,t){return QT(e,"toString",{configurable:!0,enumerable:!1,value:WE(t),writable:!0})}:PE});function KE(r){var n=0,i=0;return function(){var e=ZE(),t=16-(e-i);if(i=e,0<t){if(800<=++n)return arguments[0]}else n=0;return r.apply(void 0,arguments)}}var ZE,QE,JE,eC,tC=b(()=>{ZE=Date.now,mt(KE,"shortOut"),QE=KE}),rC=b(()=>{XE(),tC(),JE=QE(HE),eC=JE});function nC(e,t){return eC(qE(e,t,PE),e+"")}var iC,aC=b(()=>{BE(),jE(),rC(),mt(nC,"baseRest"),iC=nC});function sC(e,t,r){var n;return!!L6(r)&&!!("number"==(n=typeof t)?u8(r)&&lE(t,r.length):"string"==n&&t in r)&&Ok(r[t],e)}var oC,lC=b(()=>{Pk(),d8(),cE(),N6(),mt(sC,"isIterateeCall"),oC=sC});function cC(o){return iC(function(e,t){var r=-1,n=t.length,i=1<n?t[n-1]:void 0,a=2<n?t[2]:void 0,i=3<o.length&&"function"==typeof i?(n--,i):void 0;for(a&&oC(t[0],t[1],a)&&(i=n<3?void 0:i,n=1),e=Object(e);++r<n;){var s=t[r];s&&o(e,s,r,i)}return e})}var hC,uC,dC,pC=b(()=>{aC(),lC(),mt(cC,"createAssigner"),hC=cC}),gC=b(()=>{DE(),pC(),uC=hC(function(e,t,r){ME(e,t,r)}),dC=uC});function fC(e,t){return e?(e="curve"+(e.charAt(0).toUpperCase()+e.slice(1)),IC[e]??t):t}function mC(e,t){if(e=e.trim())return"loose"!==t.securityLevel?(0,LC.sanitizeUrl)(e):e}function yC(e,t){return e&&t?Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2)):0}function vC(e){let t,r=0;e.forEach(e=>{r+=yC(e,t),t=e});var n=r/2;return FC(e,n)}function xC(e){return 1===e.length?e[0]:vC(e)}function bC(e,t,r){var r=structuredClone(r),n=(D.info("our points",r),"start_left"!==t&&"start_right"!==t&&r.reverse(),25+e),n=FC(r,n),e=10+.5*e,i=Math.atan2(r[0].y-n.y,r[0].x-n.x),a={x:0,y:0};return"start_left"===t?(a.x=Math.sin(i+Math.PI)*e+(r[0].x+n.x)/2,a.y=-Math.cos(i+Math.PI)*e+(r[0].y+n.y)/2):"end_right"===t?(a.x=Math.sin(i-Math.PI)*e+(r[0].x+n.x)/2-5,a.y=-Math.cos(i-Math.PI)*e+(r[0].y+n.y)/2-5):"end_left"===t?(a.x=Math.sin(i)*e+(r[0].x+n.x)/2-5,a.y=-Math.cos(i)*e+(r[0].y+n.y)/2-5):(a.x=Math.sin(i)*e+(r[0].x+n.x)/2,a.y=-Math.cos(i)*e+(r[0].y+n.y)/2),a}function wC(e){let t="",r="";for(var n of e)void 0!==n&&(n.startsWith("color:")||n.startsWith("text-align:")?r=r+n+";":t=t+n+";");return{style:t,labelStyle:r}}function kC(t){let r="",n="0123456789abcdef",i=n.length;for(let e=0;e<t;e++)r+=n.charAt(Math.floor(Math.random()*i));return r}function TC(e,t){return VC(e,t).height}function EC(e,t){return VC(e,t).width}function CC(e){return"str"in e}function _C(e,t){return dC({},e,t)}function SC(e){return e??null}function AC(e,t){var r=Math.round(e.x),e=Math.round(e.y);return(t=t.replace(/(\d+\.\d+)/g,e=>Math.round(parseFloat(e)).toString())).includes(r.toString())||t.includes(e.toString())}var LC,NC,IC,RC,MC,DC,OC,PC,BC,$C,FC,zC,GC,UC,qC,jC,YC,WC,HC,VC,XC,KC,ZC,QC,JC,e_,t_,r_,n_,i_=b(()=>{LC=q(s6(),1),i6(),Oc(),tn(),e(),sh(),mr(),MT(),gC(),ih(),NC="​",IC={curveBasis:v3,curveBasisClosed:w3,curveBasisOpen:E3,curveBumpX:h3,curveBumpY:u3,curveBundle:S3,curveCardinalClosed:D3,curveCardinalOpen:B3,curveCardinal:I3,curveCatmullRomClosed:j3,curveCatmullRomOpen:H3,curveCatmullRom:G3,curveLinear:Z5,curveLinearClosed:K3,curveMonotoneX:aw,curveMonotoneY:sw,curveNatural:hw,curveStep:pw,curveStepAfter:fw,curveStepBefore:gw},RC=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,MC=mt(function(e,t){var r,n=DC(e,/(?:init\b)|(?:initialize\b)/),i={};if(i=Array.isArray(n)?(r=n.map(e=>e.args),Wt(r),Ae(i,[...r])):n.args)return r=qc(e,t),void 0!==i[n="config"]&&(i[r="flowchart-v2"===r?"flowchart":r]=i[n],delete i[n]),i},"detectInit"),DC=mt(function(e,t=null){try{var r=new RegExp(`[%]{2}(?![{]${RC.source})(?=[}][%]{2}).* +`,"ig");e=e.trim().replace(r,"").replace(/'/gm,'"'),D.debug(`Detecting diagram directive${null!==t?" type:"+t:""} based on the text:`+e);for(var n,i,a,s=[];null!==(n=Fc.exec(e));)n.index===Fc.lastIndex&&Fc.lastIndex++,(n&&!t||t&&n[1]?.match(t)||t&&n[2]?.match(t))&&(i=n[1]||n[2],a=n[3]?n[3].trim():n[4]?JSON.parse(n[4].trim()):null,s.push({type:i,args:a}));return 0===s.length?{type:e,args:null}:1===s.length?s[0]:s}catch(r){return D.error(`ERROR: ${r.message} - Unable to parse directive type: '${t}' based on the text: '${e}'`),{type:void 0,args:null}}},"detectDirective"),OC=mt(function(e){return e.replace(Fc,"")},"removeDirectives"),PC=mt(function(e,t){for(var[r,n]of t.entries())if(n.match(e))return r;return-1},"isSubstringInArray"),mt(fC,"interpolateToCurve"),mt(mC,"formatUrl"),BC=mt((t,...e)=>{let r=t.split("."),n=r.length-1,i=r[n],a=window;for(let e=0;e<n;e++)if(!(a=a[r[e]]))return void D.error(`Function name: ${t} not found in window`);a[i](...e)},"runFunc"),mt(yC,"distance"),mt(vC,"traverseEdge"),mt(xC,"calcLabelPosition"),$C=mt((e,t=2)=>(t=Math.pow(10,t),Math.round(e*t)/t),"roundNumber"),FC=mt((e,t)=>{let r,n=t;for(var i of e){if(r){var a=yC(i,r);if(0===a)return r;if(a<n)n-=a;else{if((a=n/a)<=0)return r;if(1<=a)return{x:i.x,y:i.y};if(0<a&&a<1)return{x:$C((1-a)*r.x+a*i.x,5),y:$C((1-a)*r.y+a*i.y,5)}}}r=i}throw new Error("Could not find a suitable point for the given distance")},"calculatePoint"),zC=mt((e,t,r)=>{D.info("our points "+JSON.stringify(t)),t[0]!==r&&(t=t.reverse());var r=FC(t,25),e=e?10:5,n=Math.atan2(t[0].y-r.y,t[0].x-r.x),i={x:0,y:0};return i.x=Math.sin(n)*e+(t[0].x+r.x)/2,i.y=-Math.cos(n)*e+(t[0].y+r.y)/2,i},"calcCardinalityPosition"),mt(bC,"calcTerminalLabelPosition"),mt(wC,"getStylesFromArray"),GC=0,UC=mt(()=>(GC++,"id-"+Math.random().toString(36).substr(2,12)+"-"+GC),"generateId"),mt(kC,"makeRandomHex"),qC=mt(e=>kC(e.length),"random"),jC=mt(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"),YC=mt(function(e,t){var r=t.text.replace(L.lineBreakRegex," "),[,n]=JC(t.fontSize);return(e=e.append("text")).attr("x",t.x),e.attr("y",t.y),e.style("text-anchor",t.anchor),e.style("font-family",t.fontFamily),e.style("font-size",n),e.style("font-weight",t.fontWeight),e.attr("fill",t.fill),void 0!==t.class&&e.attr("class",t.class),(n=e.append("tspan")).attr("x",t.x+2*t.textMargin),n.attr("fill",t.fill),n.text(r),e},"drawSimpleText"),WC=RT((e,s,o)=>{if(!e||(o=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},o),L.lineBreakRegex.test(e)))return e;let l=e.split(" ").filter(Boolean),c=[],h="";return l.forEach((e,t)=>{var r,n,i=EC(e+" ",o),a=EC(h,o);h=s<i?({hyphenatedStrings:r,remainingWord:n}=HC(e,s,"-",o),c.push(h,...r),n):s<=a+i?(c.push(h),e):[h,e].filter(Boolean).join(" "),t+1===l.length&&c.push(h)}),c.filter(e=>""!==e).join(o.joinWith)},(e,t,r)=>""+e+t+r.fontSize+r.fontWeight+r.fontFamily+r.joinWith),HC=RT((e,n,i="-",a)=>{a=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},a);let s=[...e],o=[],l="";return s.forEach((e,t)=>{var r,e=""+l+e;l=EC(e,a)>=n?(t+=1,t=s.length===t,r=e+i,o.push(t?e:r),""):e}),{hyphenatedStrings:o,remainingWord:l}},(e,t,r="-",n)=>""+e+t+r+n.fontSize+n.fontWeight+n.fontFamily),mt(TC,"calculateTextHeight"),mt(EC,"calculateTextWidth"),VC=RT((e,t)=>{var{fontSize:t=12,fontFamily:r="Arial",fontWeight:n=400}=t;if(!e)return{width:0,height:0};var[,i]=JC(t),t=["sans-serif",r],a=e.split(L.lineBreakRegex),s=[];if(!(r=H("body")).remove)return{width:0,height:0,lineHeight:0};var o,l=r.append("svg");for(o of t){var c,h={width:0,height:0,lineHeight:0};for(c of a){var u=jC();if(u.text=c||NC,0===(u=((u=YC(l,u).style("font-size",i).style("font-weight",n).style("font-family",o))._groups||u)[0][0].getBBox()).width&&0===u.height)throw new Error("svg element not in render tree");h.width=Math.round(Math.max(h.width,u.width)),u=Math.round(u.height),h.height+=u,h.lineHeight=Math.round(Math.max(h.lineHeight,u))}s.push(h)}return l.remove(),s[isNaN(s[1].height)||isNaN(s[1].width)||isNaN(s[1].lineHeight)||s[0].height>s[1].height&&s[0].width>s[1].width&&s[0].lineHeight>s[1].lineHeight?0:1]},(e,t)=>""+e+t.fontSize+t.fontWeight+t.fontFamily),XC=class{constructor(e=!1,t){this.count=0,this.count=t?t.length:0,this.next=e?()=>this.count++:()=>Date.now()}static{mt(this,"InitIDGenerator")}},ZC=mt(function(e){return KC=KC||document.createElement("div"),e=escape(e).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),KC.innerHTML=e,unescape(KC.textContent)},"entityDecode"),mt(CC,"isDetailedError"),QC=mt((e,t,r,n)=>{var i;n&&(i=e.node()?.getBBox())&&e.append("text").text(n).attr("text-anchor","middle").attr("x",i.x+i.width/2).attr("y",-r).attr("class",t)},"insertTitle"),JC=mt(e=>{var t;return"number"==typeof e?[e,e+"px"]:(t=parseInt(e??"",10),Number.isNaN(t)?[void 0,void 0]:e===String(t)?[t,e+"px"]:[t,e])},"parseFontSize"),mt(_C,"cleanAndMerge"),e_={assignWithDepth:Ae,wrapLabel:WC,calculateTextHeight:TC,calculateTextWidth:EC,calculateTextDimensions:VC,cleanAndMerge:_C,detectInit:MC,detectDirective:DC,isSubstringInArray:PC,interpolateToCurve:fC,calcLabelPosition:xC,calcCardinalityPosition:zC,calcTerminalLabelPosition:bC,formatUrl:mC,getStylesFromArray:wC,generateId:UC,random:qC,runFunc:BC,entityDecode:ZC,insertTitle:QC,isLabelCoordinateInPath:AC,parseFontSize:JC,InitIDGenerator:XC},t_=mt(function(e){let t=e;return t=(t=(t=t.replace(/style.*:\S*#.*;/g,function(e){return e.substring(0,e.length-1)})).replace(/classDef.*:\S*#.*;/g,function(e){return e.substring(0,e.length-1)})).replace(/#\w+;/g,function(e){return e=e.substring(1,e.length-1),/^\+?\d+$/.test(e)?"fl°°"+e+"¶ß":"fl°"+e+"¶ß"})},"encodeEntities"),r_=mt(function(e){return e.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),n_=mt((e,t,{counter:r=0,prefix:n,suffix:i},a)=>a||(n?n+"_":"")+e+`_${t}_`+r+(i?"_"+i:""),"getEdgeId"),mt(SC,"handleUndefinedAttr"),mt(AC,"isLabelCoordinateInPath")});function a_(e,t,r,n,i){if(!t[e].width)if(r)t[e].text=WC(t[e].text,i,n),t[e].textLines=t[e].text.split(L.lineBreakRegex).length,t[e].width=i,t[e].height=TC(t[e].text,n);else{var a,s,r=t[e].text.split(L.lineBreakRegex);t[e].textLines=r.length,t[e].height=0,t[e].width=0;for(s of r)t[e].width=Math.max(EC(s,n),t[e].width),a=TC(s,n),t[e].height=t[e].height+a}}function s_(t,r,n,e,i){var a,s,o=new d_(i);o.data.widthLimit=n.data.widthLimit/Math.min(h_,e.length);for([a,s]of e.entries()){let e=0;s.image={width:0,height:0,Y:0},s.sprite&&(s.image.width=48,s.image.height=48,s.image.Y=e,e=s.image.Y+s.image.height);var l=s.wrap&&u_.wrap,c=f_(u_),l=(c.fontSize=c.fontSize+2,c.fontWeight="bold",a_("label",s,l,c,o.data.widthLimit),s.label.Y=e+8,e=s.label.Y+s.label.height,s.type&&""!==s.type.text&&(s.type.text="["+s.type.text+"]",a_("type",s,l,c=f_(u_),o.data.widthLimit),s.type.Y=e+5,e=s.type.Y+s.type.height),s.descr&&""!==s.descr.text&&((c=f_(u_)).fontSize=c.fontSize-2,a_("descr",s,l,c,o.data.widthLimit),s.descr.Y=e+20,e=s.descr.Y+s.descr.height),c=0==a||a%h_==0?(l=n.data.startx+u_.diagramMarginX,n.data.stopy+u_.diagramMarginY+e):(l=o.data.stopx!==o.data.startx?o.data.stopx+u_.diagramMarginX:o.data.startx,o.data.starty),o.setData(l,l,c,c),o.name=s.alias,i.db.getC4ShapeArray(s.alias));0<(c=i.db.getC4ShapeKeys(s.alias)).length&&v_(o,t,l,c),r=s.alias,0<(l=i.db.getBoundaries(r)).length&&s_(t,0,o,l,i),"global"!==s.alias&&y_(t,s,o),n.data.stopy=Math.max(o.data.stopy+u_.c4ShapeMargin,n.data.stopy),n.data.stopx=Math.max(o.data.stopx+u_.c4ShapeMargin,n.data.stopx),o_=Math.max(o_,n.data.stopx),l_=Math.max(l_,n.data.stopy)}}var o_,l_,c_,h_,u_,d_,p_,g_,f_,m_,y_,v_,x_,b_,w_,k_,T_,E_,C_,__,S_=b(()=>{i6(),l6(),e(),oh(),Oc(),Eu(),Tu(),mr(),i_(),lh(),l_=o_=0,c_=4,h_=2,Hc.yy=wu,u_={},d_=class{static{mt(this,"Bounds")}constructor(e){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,p_(e.db.getConfig())}setData(e,t,r,n){this.nextData.startx=this.data.startx=e,this.nextData.stopx=this.data.stopx=t,this.nextData.starty=this.data.starty=r,this.nextData.stopy=this.data.stopy=n}updateVal(e,t,r,n){void 0===e[t]?e[t]=r:e[t]=n(r,e[t])}insert(e){this.nextData.cnt=this.nextData.cnt+1;let t=this.nextData.startx===this.nextData.stopx?this.nextData.stopx+e.margin:this.nextData.stopx+2*e.margin,r=t+e.width,n=this.nextData.starty+2*e.margin,i=n+e.height;(t>=this.data.widthLimit||r>=this.data.widthLimit||this.nextData.cnt>c_)&&(t=this.nextData.startx+e.margin+u_.nextLinePaddingX,n=this.nextData.stopy+2*e.margin,this.nextData.stopx=r=t+e.width,this.nextData.starty=this.nextData.stopy,this.nextData.stopy=i=n+e.height,this.nextData.cnt=1),e.x=t,e.y=n,this.updateVal(this.data,"startx",t,Math.min),this.updateVal(this.data,"starty",n,Math.min),this.updateVal(this.data,"stopx",r,Math.max),this.updateVal(this.data,"stopy",i,Math.max),this.updateVal(this.nextData,"startx",t,Math.min),this.updateVal(this.nextData,"starty",n,Math.min),this.updateVal(this.nextData,"stopx",r,Math.max),this.updateVal(this.nextData,"stopy",i,Math.max)}init(e){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},p_(e.db.getConfig())}bumpLastMargin(e){this.data.stopx+=e,this.data.stopy+=e}},p_=mt(function(e){Ae(u_,e),e.fontFamily&&(u_.personFontFamily=u_.systemFontFamily=u_.messageFontFamily=e.fontFamily),e.fontSize&&(u_.personFontSize=u_.systemFontSize=u_.messageFontSize=e.fontSize),e.fontWeight&&(u_.personFontWeight=u_.systemFontWeight=u_.messageFontWeight=e.fontWeight)},"setConf"),g_=mt((e,t)=>({fontFamily:e[t+"FontFamily"],fontSize:e[t+"FontSize"],fontWeight:e[t+"FontWeight"]}),"c4ShapeFont"),f_=mt(e=>({fontFamily:e.boundaryFontFamily,fontSize:e.boundaryFontSize,fontWeight:e.boundaryFontWeight}),"boundaryFont"),m_=mt(e=>({fontFamily:e.messageFontFamily,fontSize:e.messageFontSize,fontWeight:e.messageFontWeight}),"messageFont"),mt(a_,"calcC4ShapeTextWH"),y_=mt(function(e,t,r){t.x=r.data.startx,t.y=r.data.starty,t.width=r.data.stopx-r.data.startx,t.height=r.data.stopy-r.data.starty,t.label.y=u_.c4ShapeMargin-35;var r=t.wrap&&u_.wrap,n=f_(u_),i=(n.fontSize=n.fontSize+2,n.fontWeight="bold",EC(t.label.text,n));a_("label",t,r,n,i),Hw.drawBoundary(e,t,u_)},"drawBoundary"),v_=mt(function(r,n,i,e){let a=0;for(var s of e){a=0;var o=i[s];switch((s=g_(u_,o.typeC4Shape.text)).fontSize=s.fontSize-2,o.typeC4Shape.width=EC("«"+o.typeC4Shape.text+"»",s),o.typeC4Shape.height=s.fontSize+2,o.typeC4Shape.Y=u_.c4ShapePadding,a=o.typeC4Shape.Y+o.typeC4Shape.height-4,o.image={width:0,height:0,Y:0},o.typeC4Shape.text){case"person":case"external_person":o.image.width=48,o.image.height=48,o.image.Y=a,a=o.image.Y+o.image.height}o.sprite&&(o.image.width=48,o.image.height=48,o.image.Y=a,a=o.image.Y+o.image.height);var s=o.wrap&&u_.wrap,l=u_.width-2*u_.c4ShapePadding,c=g_(u_,o.typeC4Shape.text);c.fontSize=c.fontSize+2,c.fontWeight="bold",a_("label",o,s,c,l),o.label.Y=a+8,a=o.label.Y+o.label.height,o.type&&""!==o.type.text?(o.type.text="["+o.type.text+"]",a_("type",o,s,g_(u_,o.typeC4Shape.text),l),o.type.Y=a+5,a=o.type.Y+o.type.height):o.techn&&""!==o.techn.text&&(o.techn.text="["+o.techn.text+"]",a_("techn",o,s,g_(u_,o.techn.text),l),o.techn.Y=a+5,a=o.techn.Y+o.techn.height);let e=a,t=o.label.width;o.descr&&""!==o.descr.text&&(a_("descr",o,s,g_(u_,o.typeC4Shape.text),l),o.descr.Y=a+20,a=o.descr.Y+o.descr.height,t=Math.max(o.label.width,o.descr.width),e=a-5*o.descr.textLines),t+=u_.c4ShapePadding,o.width=Math.max(o.width||u_.width,t,u_.width),o.height=Math.max(o.height||u_.height,e,u_.height),o.margin=o.margin||u_.c4ShapeMargin,r.insert(o),Hw.drawC4Shape(n,o,u_)}r.bumpLastMargin(u_.c4ShapeMargin)},"drawC4ShapeArray"),x_=class{static{mt(this,"Point")}constructor(e,t){this.x=e,this.y=t}},b_=mt(function(e,t){let r=e.x,n=e.y,i=t.x,a=t.y,s=r+e.width/2,o=n+e.height/2,l=Math.abs(r-i),c=Math.abs(n-a),h=c/l,u=e.height/e.width,d=null;return n==a&&r<i?d=new x_(r+e.width,o):n==a&&i<r?d=new x_(r,o):r==i&&n<a?d=new x_(s,n+e.height):r==i&&a<n&&(d=new x_(s,n)),i<r&&n<a?d=h<=u?new x_(r,o+h*e.width/2):new x_(s-l/c*e.height/2,n+e.height):r<i&&n<a?d=h<=u?new x_(r+e.width,o+h*e.width/2):new x_(s+l/c*e.height/2,n+e.height):r<i&&a<n?d=h<=u?new x_(r+e.width,o-h*e.width/2):new x_(s+e.height/2*l/c,n):i<r&&a<n&&(d=h<=u?new x_(r,o-e.width/2*h):new x_(s-e.height/2*l/c,n)),d},"getIntersectPoint"),w_=mt(function(e,t){var r={x:0,y:0},n=(r.x=t.x+t.width/2,r.y=t.y+t.height/2,b_(e,r));return r.x=e.x+e.width/2,r.y=e.y+e.height/2,{startPoint:n,endPoint:e=b_(t,r)}},"getIntersectPoints"),k_=mt(function(e,t,r,n){let i=0;for(var a of t){i+=1;var s=a.wrap&&u_.wrap,o=m_(u_);"C4Dynamic"===n.db.getC4Type()&&(a.label.text=i+": "+a.label.text);let e=EC(a.label.text,o);a_("label",a,s,o,e),a.techn&&""!==a.techn.text&&a_("techn",a,s,o,e=EC(a.techn.text,o)),a.descr&&""!==a.descr.text&&a_("descr",a,s,o,e=EC(a.descr.text,o)),s=r(a.from),o=r(a.to),s=w_(s,o),a.startPoint=s.startPoint,a.endPoint=s.endPoint}Hw.drawRels(e,t,u_)},"drawRels"),mt(s_,"drawInsideBoundary"),T_=mt(function(e,t,r,n){u_=O().c4;let i=O().securityLevel,a;"sandbox"===i&&(a=H("#i"+t));var s=H("sandbox"===i?a.nodes()[0].contentDocument.body:"body"),o=n.db,o=(n.db.setWrap(u_.wrap),c_=o.getC4ShapeInRow(),h_=o.getC4BoundaryInRow(),D.debug("C:"+JSON.stringify(u_,null,2)),"sandbox"===i?s.select(`[id="${t}"]`):H(`[id="${t}"]`)),s=(Hw.insertComputerIcon(o),Hw.insertDatabaseIcon(o),Hw.insertClockIcon(o),(s=new d_(n)).setData(u_.diagramMarginX,u_.diagramMarginX,u_.diagramMarginY,u_.diagramMarginY),s.data.widthLimit=screen.availWidth,o_=u_.diagramMarginX,l_=u_.diagramMarginY,t=n.db.getTitle(),s_(o,0,s,n.db.getBoundaries(""),n),Hw.insertArrowHead(o),Hw.insertArrowEnd(o),Hw.insertArrowCrossHead(o),Hw.insertArrowFilledHead(o),k_(o,n.db.getRels(),n.db.getC4Shape,n),s.data.stopx=o_,s.data.stopy=l_,(n=s.data).stopy-n.starty+2*u_.diagramMarginY),l=n.stopx-n.startx+2*u_.diagramMarginX,t=(t&&o.append("text").text(t).attr("x",(n.stopx-n.startx)/2-4*u_.diagramMarginX).attr("y",n.starty+u_.diagramMarginY),Zc(o,s,l,u_.useMaxWidth),t?60:0);o.attr("viewBox",n.startx-u_.diagramMarginX+" -"+(u_.diagramMarginY+t)+" "+l+" "+(s+t)),D.debug("models:",n)},"draw"),E_={drawPersonOrSystemArray:v_,drawBoundary:y_,setConf:p_,draw:T_}}),A_=b(()=>{C_=mt(e=>`.person { + stroke: ${e.personBorder}; + fill: ${e.personBkg}; + } +`,"getStyles"),__=C_}),L_={};OFe(L_,{diagram:()=>N_});var N_,I_=b(()=>{oh(),Eu(),S_(),A_(),N_={parser:Vc,db:wu,renderer:E_,styles:__,init:mt(({c4:e,wrap:t})=>{E_.setConf(e),wu.setWrap(t)},"init")}});function R_(e){return"u"<typeof e||null===e}function M_(e){return"object"==typeof e&&null!==e}function D_(e){return Array.isArray(e)?e:R_(e)?[]:[e]}function O_(e,t){var r,n,i,a;if(t)for(r=0,n=(a=Object.keys(t)).length;r<n;r+=1)e[i=a[r]]=t[i];return e}function P_(e,t){for(var r="",n=0;n<t;n+=1)r+=e;return r}function B_(e){return 0===e&&Number.NEGATIVE_INFINITY===1/e}function $_(e,t){var r="",n=e.reason||"(unknown reason)";return e.mark?(e.mark.name&&(r+='in "'+e.mark.name+'" '),r+="("+(e.mark.line+1)+":"+(e.mark.column+1)+")",!t&&e.mark.snippet&&(r+=` + +`+e.mark.snippet),n+" "+r):n}function F_(e,t){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=t,this.message=$_(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack||""}function z_(e,t,r,n,i){var a="",s="";return(i=Math.floor(i/2)-1)<n-t&&(t=n-i+(a=" ... ").length),i<r-n&&(r=n+i-(s=" ...").length),{str:a+e.slice(t,r).replace(/\t/g,"→")+s,pos:n-t+a.length}}function G_(e,t){return BA.repeat(" ",t-e.length)+e}function U_(e,t){if(t=Object.create(t||null),!e.buffer)return null;t.maxLength||(t.maxLength=79),"number"!=typeof t.indent&&(t.indent=1),"number"!=typeof t.linesBefore&&(t.linesBefore=3),"number"!=typeof t.linesAfter&&(t.linesAfter=2);for(var r,n=/\r?\n|\r|\0/g,i=[0],a=[],s=-1;r=n.exec(e.buffer);)a.push(r.index),i.push(r.index+r[0].length),e.position<=r.index&&s<0&&(s=i.length-2);s<0&&(s=i.length-1);for(var o,l="",c=Math.min(e.line+t.linesAfter,a.length).toString().length,h=t.maxLength-(t.indent+c+3),u=1;u<=t.linesBefore&&!(s-u<0);u++)o=z_(e.buffer,i[s-u],a[s-u],e.position-(i[s]-i[s-u]),h),l=BA.repeat(" ",t.indent)+G_((e.line-u+1).toString(),c)+" | "+o.str+` +`+l;for(o=z_(e.buffer,i[s],a[s],e.position,h),l=(l+=BA.repeat(" ",t.indent)+G_((e.line+1).toString(),c)+" | "+o.str+` +`)+BA.repeat("-",t.indent+c+3+o.pos)+`^ +`,u=1;u<=t.linesAfter&&!(a.length<=s+u);u++)o=z_(e.buffer,i[s+u],a[s+u],e.position-(i[s]-i[s+u]),h),l+=BA.repeat(" ",t.indent)+G_((e.line+u+1).toString(),c)+" | "+o.str+` +`;return l.replace(/\n$/,"")}function q_(e){var r={};return null!==e&&Object.keys(e).forEach(function(t){e[t].forEach(function(e){r[String(e)]=t})}),r}function j_(t,e){if(e=e||{},Object.keys(e).forEach(function(e){if(-1===zA.indexOf(e))throw new $A('Unknown option "'+e+'" is met in definition of "'+t+'" YAML type.')}),this.options=e,this.tag=t,this.kind=e.kind||null,this.resolve=e.resolve||function(){return!0},this.construct=e.construct||function(e){return e},this.instanceOf=e.instanceOf||null,this.predicate=e.predicate||null,this.represent=e.represent||null,this.representName=e.representName||null,this.defaultStyle=e.defaultStyle||null,this.multi=e.multi||!1,this.styleAliases=q_(e.styleAliases||null),-1===GA.indexOf(this.kind))throw new $A('Unknown kind "'+this.kind+'" is specified for "'+t+'" YAML type.')}function Y_(e,t){var i=[];return e[t].forEach(function(r){var n=i.length;i.forEach(function(e,t){e.tag===r.tag&&e.kind===r.kind&&e.multi===r.multi&&(n=t)}),i[n]=r}),i}function W_(){var e,t,r={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function n(e){e.multi?(r.multi[e.kind].push(e),r.multi.fallback.push(e)):r[e.kind][e.tag]=r.fallback[e.tag]=e}for(mt(n,"collectType"),e=0,t=arguments.length;e<t;e+=1)arguments[e].forEach(n);return r}function H_(e){return this.extend(e)}function V_(e){var t;return null===e||1===(t=e.length)&&"~"===e||4===t&&("null"===e||"Null"===e||"NULL"===e)}function X_(){return null}function K_(e){return null===e}function Z_(e){var t;return null!==e&&(4===(t=e.length)&&("true"===e||"True"===e||"TRUE"===e)||5===t&&("false"===e||"False"===e||"FALSE"===e))}function Q_(e){return"true"===e||"True"===e||"TRUE"===e}function J_(e){return"[object Boolean]"===Object.prototype.toString.call(e)}function eS(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}function tS(e){return 48<=e&&e<=55}function rS(e){return 48<=e&&e<=57}function nS(e){if(null===e)return!1;var t,r=e.length,n=0,i=!1;if(!r)return!1;if("0"===(t="-"!==(t=e[n])&&"+"!==t?t:e[++n])){if(n+1===r)return!0;if("b"===(t=e[++n])){for(n++;n<r;n++)if("_"!==(t=e[n])){if("0"!==t&&"1"!==t)return!1;i=!0}return i&&"_"!==t}if("x"===t){for(n++;n<r;n++)if("_"!==(t=e[n])){if(!eS(e.charCodeAt(n)))return!1;i=!0}return i&&"_"!==t}if("o"===t){for(n++;n<r;n++)if("_"!==(t=e[n])){if(!tS(e.charCodeAt(n)))return!1;i=!0}return i&&"_"!==t}}if("_"===t)return!1;for(;n<r;n++)if("_"!==(t=e[n])){if(!rS(e.charCodeAt(n)))return!1;i=!0}return!(!i||"_"===t)}function iS(e){var t,r=1;if("-"!==(t=(e=-1!==e.indexOf("_")?e.replace(/_/g,""):e)[0])&&"+"!==t||("-"===t&&(r=-1),t=(e=e.slice(1))[0]),"0"===e)return 0;if("0"===t){if("b"===e[1])return r*parseInt(e.slice(2),2);if("x"===e[1])return r*parseInt(e.slice(2),16);if("o"===e[1])return r*parseInt(e.slice(2),8)}return r*parseInt(e,10)}function aS(e){return"[object Number]"===Object.prototype.toString.call(e)&&e%1==0&&!BA.isNegativeZero(e)}function sS(e){return!(null===e||!qA.test(e)||"_"===e[e.length-1])}function oS(e){var t="-"===(e=e.replace(/_/g,"").toLowerCase())[0]?-1:1;return".inf"===(e=0<="+-".indexOf(e[0])?e.slice(1):e)?1==t?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:".nan"===e?NaN:t*parseFloat(e,10)}function lS(e,t){if(isNaN(e))switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(BA.isNegativeZero(e))return"-0.0";return t=e.toString(10),jA.test(t)?t.replace("e",".e"):t}function cS(e){return"[object Number]"===Object.prototype.toString.call(e)&&(e%1!=0||BA.isNegativeZero(e))}function hS(e){return null!==e&&(null!==WA.exec(e)||null!==HA.exec(e))}function uS(e){var t,r,n,i,a,s=0,o=null,l=WA.exec(e);if(null===(l=null===l?HA.exec(e):l))throw new Error("Date resolve error");if(e=+l[1],t=+l[2]-1,r=+l[3],!l[4])return new Date(Date.UTC(e,t,r));if(n=+l[4],i=+l[5],a=+l[6],l[7]){for(s=l[7].slice(0,3);s.length<3;)s+="0";s=+s}return l[9]&&(o=6e4*(60*+l[10]+ +(l[11]||0)),"-"===l[9])&&(o=-o),l=new Date(Date.UTC(e,t,r,n,i,a,s)),o&&l.setTime(l.getTime()-o),l}function dS(e){return e.toISOString()}function pS(e){return"<<"===e||null===e}function gS(e){if(null===e)return!1;for(var t,r=0,n=e.length,i=KA,a=0;a<n;a++)if(!(64<(t=i.indexOf(e.charAt(a))))){if(t<0)return!1;r+=6}return r%8==0}function fS(e){for(var t=e.replace(/[\r\n=]/g,""),r=t.length,n=KA,i=0,a=[],s=0;s<r;s++)s%4==0&&s&&(a.push(i>>16&255),a.push(i>>8&255),a.push(255&i)),i=i<<6|n.indexOf(t.charAt(s));return 0==(e=r%4*6)?(a.push(i>>16&255),a.push(i>>8&255),a.push(255&i)):18==e?(a.push(i>>10&255),a.push(i>>2&255)):12==e&&a.push(i>>4&255),new Uint8Array(a)}function mS(e){for(var t,r="",n=0,i=e.length,a=KA,s=0;s<i;s++)s%3==0&&s&&(r=(r=(r=(r+=a[n>>18&63])+a[n>>12&63])+a[n>>6&63])+a[63&n]),n=(n<<8)+e[s];return 0==(t=i%3)?r=(r=(r=(r+=a[n>>18&63])+a[n>>12&63])+a[n>>6&63])+a[63&n]:2==t?r=(r=(r=(r+=a[n>>10&63])+a[n>>4&63])+a[n<<2&63])+a[64]:1==t&&(r=(r=(r=(r+=a[n>>2&63])+a[n<<4&63])+a[64])+a[64]),r}function yS(e){return"[object Uint8Array]"===Object.prototype.toString.call(e)}function vS(e){if(null!==e)for(var t,r,n,i=[],a=e,s=0,o=a.length;s<o;s+=1){if(t=a[s],n=!1,"[object Object]"!==JA.call(t))return!1;for(r in t)if(QA.call(t,r)){if(n)return!1;n=!0}if(!n)return!1;if(-1!==i.indexOf(r))return!1;i.push(r)}return!0}function xS(e){return null!==e?e:[]}function bS(e){if(null!==e)for(var t,r,n=e,i=new Array(n.length),a=0,s=n.length;a<s;a+=1){if(t=n[a],"[object Object]"!==t9.call(t)||1!==(r=Object.keys(t)).length)return!1;i[a]=[r[0],t[r[0]]]}return!0}function wS(e){if(null===e)return[];for(var t,r,n=e,i=new Array(n.length),a=0,s=n.length;a<s;a+=1)t=n[a],r=Object.keys(t),i[a]=[r[0],t[r[0]]];return i}function kS(e){if(null!==e){var t,r=e;for(t in r)if(n9.call(r,t)&&null!==r[t])return!1}return!0}function TS(e){return null!==e?e:{}}function ES(e){return Object.prototype.toString.call(e)}function CS(e){return 10===e||13===e}function _S(e){return 9===e||32===e}function SS(e){return 9===e||32===e||10===e||13===e}function AS(e){return 44===e||91===e||93===e||123===e||125===e}function LS(e){return 48<=e&&e<=57?e-48:97<=(e|=32)&&e<=102?e-97+10:-1}function NS(e){return 120===e?2:117===e?4:85===e?8:0}function IS(e){return 48<=e&&e<=57?e-48:-1}function RS(e){return 48===e?"\0":97===e?"":98===e?"\b":116===e||9===e?"\t":110===e?` +`:118===e?"\v":102===e?"\f":114===e?"\r":101===e?"":32===e?" ":34===e?'"':47===e?"/":92===e?"\\":78===e?"…":95===e?" ":76===e?"\u2028":80===e?"\u2029":""}function MS(e){return e<=65535?String.fromCharCode(e):String.fromCharCode(55296+(e-65536>>10),56320+(e-65536&1023))}function DS(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||a9,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function OS(e,t){return(e={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart}).snippet=FA(e),new $A(t,e)}function PS(e,t){throw OS(e,t)}function BS(e,t){e.onWarning&&e.onWarning.call(null,OS(e,t))}function $S(e,t,r,n){var i,a,s,o;if(t<r){if(o=e.input.slice(t,r),n)for(i=0,a=o.length;i<a;i+=1)9===(s=o.charCodeAt(i))||32<=s&&s<=1114111||PS(e,"expected valid JSON character");else g9.test(o)&&PS(e,"the stream contains non-printable characters");e.result+=o}}function FS(e,t,r,n){var i,a,s,o;for(BA.isObject(r)||PS(e,"cannot merge mappings; the provided source object is unacceptable"),s=0,o=(i=Object.keys(r)).length;s<o;s+=1)a=i[s],s9.call(t,a)||(t[a]=r[a],n[a]=!0)}function zS(e,t,r,n,i,a,s,o,l){var c,h;if(Array.isArray(i))for(c=0,h=(i=Array.prototype.slice.call(i)).length;c<h;c+=1)Array.isArray(i[c])&&PS(e,"nested arrays are not supported inside keys"),"object"==typeof i&&"[object Object]"===ES(i[c])&&(i[c]="[object Object]");if("object"==typeof i&&"[object Object]"===ES(i)&&(i="[object Object]"),i=String(i),null===t&&(t={}),"tag:yaml.org,2002:merge"===n)if(Array.isArray(a))for(c=0,h=a.length;c<h;c+=1)FS(e,t,a[c],r);else FS(e,t,a,r);else e.json||s9.call(r,i)||!s9.call(t,i)||(e.line=s||e.line,e.lineStart=o||e.lineStart,e.position=l||e.position,PS(e,"duplicated mapping key")),"__proto__"===i?Object.defineProperty(t,i,{configurable:!0,enumerable:!0,writable:!0,value:a}):t[i]=a,delete r[i];return t}function GS(e){var t=e.input.charCodeAt(e.position);10===t?e.position++:13===t?(e.position++,10===e.input.charCodeAt(e.position)&&e.position++):PS(e,"a line break is expected"),e.line+=1,e.lineStart=e.position,e.firstTabInLine=-1}function US(e,t,r){for(var n=0,i=e.input.charCodeAt(e.position);0!==i;){for(;_S(i);)9===i&&-1===e.firstTabInLine&&(e.firstTabInLine=e.position),i=e.input.charCodeAt(++e.position);if(t&&35===i)for(;10!==(i=e.input.charCodeAt(++e.position))&&13!==i&&0!==i;);if(!CS(i))break;for(GS(e),i=e.input.charCodeAt(e.position),n++,e.lineIndent=0;32===i;)e.lineIndent++,i=e.input.charCodeAt(++e.position)}return-1!==r&&0!==n&&e.lineIndent<r&&BS(e,"deficient indentation"),n}function qS(e){var t=e.position,r=e.input.charCodeAt(t);return!(45!==r&&46!==r||r!==e.input.charCodeAt(t+1)||r!==e.input.charCodeAt(t+2)||0!==(r=e.input.charCodeAt(t+=3))&&!SS(r))}function jS(e,t){1===t?e.result+=" ":1<t&&(e.result+=BA.repeat(` +`,t-1))}function YS(e,t,r){var n,i,a,s,o,l,c,h=e.kind,u=e.result,d=e.input.charCodeAt(e.position);if(SS(d)||AS(d)||35===d||38===d||42===d||33===d||124===d||62===d||39===d||34===d||37===d||64===d||96===d||(63===d||45===d)&&(SS(n=e.input.charCodeAt(e.position+1))||r&&AS(n)))return!1;for(e.kind="scalar",e.result="",i=a=e.position,s=!1;0!==d;){if(58===d){if(SS(n=e.input.charCodeAt(e.position+1))||r&&AS(n))break}else if(35===d){if(SS(e.input.charCodeAt(e.position-1)))break}else{if(e.position===e.lineStart&&qS(e)||r&&AS(d))break;if(CS(d)){if(o=e.line,l=e.lineStart,c=e.lineIndent,US(e,!1,-1),t<=e.lineIndent){s=!0,d=e.input.charCodeAt(e.position);continue}e.position=a,e.line=o,e.lineStart=l,e.lineIndent=c;break}}s&&($S(e,i,a,!1),jS(e,e.line-o),i=a=e.position,s=!1),_S(d)||(a=e.position+1),d=e.input.charCodeAt(++e.position)}return $S(e,i,a,!1),!!e.result||(e.kind=h,e.result=u,!1)}function WS(e,t){var r,n,i=e.input.charCodeAt(e.position);if(39!==i)return!1;for(e.kind="scalar",e.result="",e.position++,r=n=e.position;0!==(i=e.input.charCodeAt(e.position));)if(39===i){if($S(e,r,e.position,!0),39!==(i=e.input.charCodeAt(++e.position)))return!0;r=e.position,e.position++,n=e.position}else CS(i)?($S(e,r,n,!0),jS(e,US(e,!1,t)),r=n=e.position):e.position===e.lineStart&&qS(e)?PS(e,"unexpected end of the document within a single quoted scalar"):(e.position++,n=e.position);PS(e,"unexpected end of the stream within a single quoted scalar")}function HS(e,t){var r,n,i,a,s,o=e.input.charCodeAt(e.position);if(34!==o)return!1;for(e.kind="scalar",e.result="",e.position++,r=n=e.position;0!==(o=e.input.charCodeAt(e.position));){if(34===o)return $S(e,r,e.position,!0),e.position++,!0;if(92===o){if($S(e,r,e.position,!0),CS(o=e.input.charCodeAt(++e.position)))US(e,!1,t);else if(o<256&&x9[o])e.result+=b9[o],e.position++;else if(0<(s=NS(o))){for(i=s,a=0;0<i;i--)0<=(s=LS(o=e.input.charCodeAt(++e.position)))?a=(a<<4)+s:PS(e,"expected hexadecimal character");e.result+=MS(a),e.position++}else PS(e,"unknown escape sequence");r=n=e.position}else CS(o)?($S(e,r,n,!0),jS(e,US(e,!1,t)),r=n=e.position):e.position===e.lineStart&&qS(e)?PS(e,"unexpected end of the document within a double quoted scalar"):(e.position++,n=e.position)}PS(e,"unexpected end of the stream within a double quoted scalar")}function VS(e,t){var r,n,i,a,s,o,l,c,h,u,d,p=!0,g=e.tag,f=e.anchor,m=Object.create(null),y=e.input.charCodeAt(e.position);if(91===y)c=!(s=93),a=[];else{if(123!==y)return!1;s=125,c=!0,a={}}for(null!==e.anchor&&(e.anchorMap[e.anchor]=a),y=e.input.charCodeAt(++e.position);0!==y;){if(US(e,!0,t),(y=e.input.charCodeAt(e.position))===s)return e.position++,e.tag=g,e.anchor=f,e.kind=c?"mapping":"sequence",e.result=a,!0;p?44===y&&PS(e,"expected the node content, but found ','"):PS(e,"missed comma between flow collection entries"),d=null,o=l=!1,63===y&&SS(e.input.charCodeAt(e.position+1))&&(o=l=!0,e.position++,US(e,!0,t)),r=e.line,n=e.lineStart,i=e.position,tA(e,t,o9,!1,!0),u=e.tag,h=e.result,US(e,!0,t),y=e.input.charCodeAt(e.position),!l&&e.line!==r||58!==y||(o=!0,y=e.input.charCodeAt(++e.position),US(e,!0,t),tA(e,t,o9,!1,!0),d=e.result),c?zS(e,a,m,u,h,d,r,n,i):o?a.push(zS(e,null,m,u,h,d,r,n,i)):a.push(h),US(e,!0,t),44===(y=e.input.charCodeAt(e.position))?(p=!0,y=e.input.charCodeAt(++e.position)):p=!1}PS(e,"unexpected end of the stream within a flow collection")}function XS(e,t){var r,n,i,a=u9,s=!1,o=!1,l=t,c=0,h=!1,u=e.input.charCodeAt(e.position);if(124===u)n=!1;else{if(62!==u)return!1;n=!0}for(e.kind="scalar",e.result="";0!==u;)if(43===(u=e.input.charCodeAt(++e.position))||45===u)u9===a?a=43===u?p9:d9:PS(e,"repeat of a chomping mode identifier");else{if(!(0<=(i=IS(u))))break;0===i?PS(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):o?PS(e,"repeat of an indentation width identifier"):(l=t+i-1,o=!0)}if(_S(u)){for(;_S(u=e.input.charCodeAt(++e.position)););if(35===u)for(;!CS(u=e.input.charCodeAt(++e.position))&&0!==u;);}for(;0!==u;){for(GS(e),e.lineIndent=0,u=e.input.charCodeAt(e.position);(!o||e.lineIndent<l)&&32===u;)e.lineIndent++,u=e.input.charCodeAt(++e.position);if(!o&&e.lineIndent>l&&(l=e.lineIndent),CS(u))c++;else{if(e.lineIndent<l){a===p9?e.result+=BA.repeat(` +`,s?1+c:c):a===u9&&s&&(e.result+=` +`);break}for(n?_S(u)?(h=!0,e.result+=BA.repeat(` +`,s?1+c:c)):h?(h=!1,e.result+=BA.repeat(` +`,c+1)):0===c?s&&(e.result+=" "):e.result+=BA.repeat(` +`,c):e.result+=BA.repeat(` +`,s?1+c:c),o=s=!0,c=0,r=e.position;!CS(u)&&0!==u;)u=e.input.charCodeAt(++e.position);$S(e,r,e.position,!1)}}return!0}function KS(e,t){var r,n,i=e.tag,a=e.anchor,s=[],o=!1;if(-1!==e.firstTabInLine)return!1;for(null!==e.anchor&&(e.anchorMap[e.anchor]=s),n=e.input.charCodeAt(e.position);0!==n&&(-1!==e.firstTabInLine&&(e.position=e.firstTabInLine,PS(e,"tab characters must not be used in indentation")),45===n)&&SS(e.input.charCodeAt(e.position+1));)if(o=!0,e.position++,US(e,!0,-1)&&e.lineIndent<=t)s.push(null),n=e.input.charCodeAt(e.position);else if(r=e.line,tA(e,t,c9,!1,!0),s.push(e.result),US(e,!0,-1),n=e.input.charCodeAt(e.position),(e.line===r||e.lineIndent>t)&&0!==n)PS(e,"bad indentation of a sequence entry");else if(e.lineIndent<t)break;return!!o&&(e.tag=i,e.anchor=a,e.kind="sequence",e.result=s,!0)}function ZS(e,t,r){var n,i,a,s,o,l,c,h=e.tag,u=e.anchor,d={},p=Object.create(null),g=null,f=null,m=null,y=!1,v=!1;if(-1!==e.firstTabInLine)return!1;for(null!==e.anchor&&(e.anchorMap[e.anchor]=d),c=e.input.charCodeAt(e.position);0!==c;){if(y||-1===e.firstTabInLine||(e.position=e.firstTabInLine,PS(e,"tab characters must not be used in indentation")),n=e.input.charCodeAt(e.position+1),a=e.line,63!==c&&58!==c||!SS(n)){if(s=e.line,o=e.lineStart,l=e.position,!tA(e,r,l9,!1,!0))break;if(e.line===a){for(c=e.input.charCodeAt(e.position);_S(c);)c=e.input.charCodeAt(++e.position);if(58===c)SS(c=e.input.charCodeAt(++e.position))||PS(e,"a whitespace character is expected after the key-value separator within a block mapping"),y&&(zS(e,d,p,g,f,null,s,o,l),g=f=m=null),i=y=!(v=!0),g=e.tag,f=e.result;else{if(!v)return e.tag=h,e.anchor=u,!0;PS(e,"can not read an implicit mapping pair; a colon is missed")}}else{if(!v)return e.tag=h,e.anchor=u,!0;PS(e,"can not read a block mapping entry; a multiline key may not be an implicit key")}}else 63===c?(y&&(zS(e,d,p,g,f,null,s,o,l),g=f=m=null),i=y=v=!0):y?i=!(y=!1):PS(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),e.position+=1,c=n;if((e.line===a||e.lineIndent>t)&&(y&&(s=e.line,o=e.lineStart,l=e.position),tA(e,t,h9,!0,i)&&(y?f=e.result:m=e.result),y||(zS(e,d,p,g,f,m,s,o,l),g=f=m=null),US(e,!0,-1),c=e.input.charCodeAt(e.position)),(e.line===a||e.lineIndent>t)&&0!==c)PS(e,"bad indentation of a mapping entry");else if(e.lineIndent<t)break}return y&&zS(e,d,p,g,f,null,s,o,l),v&&(e.tag=h,e.anchor=u,e.kind="mapping",e.result=d),v}function QS(e){var t,r,n,i=!1,a=!1,s=e.input.charCodeAt(e.position);if(33!==s)return!1;if(null!==e.tag&&PS(e,"duplication of a tag property"),60===(s=e.input.charCodeAt(++e.position))?(i=!0,s=e.input.charCodeAt(++e.position)):33===s?(a=!0,r="!!",s=e.input.charCodeAt(++e.position)):r="!",t=e.position,i){for(;0!==(s=e.input.charCodeAt(++e.position))&&62!==s;);e.position<e.length?(n=e.input.slice(t,e.position),s=e.input.charCodeAt(++e.position)):PS(e,"unexpected end of the stream within a verbatim tag")}else{for(;0!==s&&!SS(s);)33===s&&(a?PS(e,"tag suffix cannot contain exclamation marks"):(r=e.input.slice(t-1,e.position+1),y9.test(r)||PS(e,"named tag handle cannot contain such characters"),a=!0,t=e.position+1)),s=e.input.charCodeAt(++e.position);n=e.input.slice(t,e.position),m9.test(n)&&PS(e,"tag suffix cannot contain flow indicator characters")}n&&!v9.test(n)&&PS(e,"tag name cannot contain such characters: "+n);try{n=decodeURIComponent(n)}catch{PS(e,"tag name is malformed: "+n)}return i?e.tag=n:s9.call(e.tagMap,r)?e.tag=e.tagMap[r]+n:"!"===r?e.tag="!"+n:"!!"===r?e.tag="tag:yaml.org,2002:"+n:PS(e,'undeclared tag handle "'+r+'"'),!0}function JS(e){var t,r=e.input.charCodeAt(e.position);if(38!==r)return!1;for(null!==e.anchor&&PS(e,"duplication of an anchor property"),r=e.input.charCodeAt(++e.position),t=e.position;0!==r&&!SS(r)&&!AS(r);)r=e.input.charCodeAt(++e.position);return e.position===t&&PS(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(t,e.position),!0}function eA(e){var t,r=e.input.charCodeAt(e.position);if(42!==r)return!1;for(r=e.input.charCodeAt(++e.position),t=e.position;0!==r&&!SS(r)&&!AS(r);)r=e.input.charCodeAt(++e.position);return e.position===t&&PS(e,"name of an alias node must contain at least one character"),t=e.input.slice(t,e.position),s9.call(e.anchorMap,t)||PS(e,'unidentified alias "'+t+'"'),e.result=e.anchorMap[t],US(e,!0,-1),!0}function tA(e,t,r,n,i){var a,s,o,l,c,h,u,d=1,p=!1,g=!1;if(null!==e.listener&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,a=s=o=h9===r||c9===r,n&&US(e,!0,-1)&&(p=!0,e.lineIndent>t?d=1:e.lineIndent===t?d=0:e.lineIndent<t&&(d=-1)),1===d)for(;QS(e)||JS(e);)US(e,!0,-1)?(p=!0,o=a,e.lineIndent>t?d=1:e.lineIndent===t?d=0:e.lineIndent<t&&(d=-1)):o=!1;if(o=o&&(p||i),1!==d&&h9!==r||(n=o9===r||l9===r?t:t+1,i=e.position-e.lineStart,1===d?o&&(KS(e,i)||ZS(e,i,n))||VS(e,n)?g=!0:(s&&XS(e,n)||WS(e,n)||HS(e,n)?g=!0:eA(e)?(g=!0,null===e.tag&&null===e.anchor||PS(e,"alias node should not have any properties")):YS(e,n,o9===r)&&(g=!0,null===e.tag)&&(e.tag="?"),null!==e.anchor&&(e.anchorMap[e.anchor]=e.result)):0===d&&(g=o&&KS(e,i))),null===e.tag)null!==e.anchor&&(e.anchorMap[e.anchor]=e.result);else if("?"===e.tag){for(null!==e.result&&"scalar"!==e.kind&&PS(e,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+e.kind+'"'),l=0,c=e.implicitTypes.length;l<c;l+=1)if((u=e.implicitTypes[l]).resolve(e.result)){e.result=u.construct(e.result),e.tag=u.tag,null!==e.anchor&&(e.anchorMap[e.anchor]=e.result);break}}else if("!"!==e.tag){if(s9.call(e.typeMap[e.kind||"fallback"],e.tag))u=e.typeMap[e.kind||"fallback"][e.tag];else for(u=null,l=0,c=(h=e.typeMap.multi[e.kind||"fallback"]).length;l<c;l+=1)if(e.tag.slice(0,h[l].tag.length)===h[l].tag){u=h[l];break}u||PS(e,"unknown tag !<"+e.tag+">"),null!==e.result&&u.kind!==e.kind&&PS(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+u.kind+'", not "'+e.kind+'"'),u.resolve(e.result,e.tag)?(e.result=u.construct(e.result,e.tag),null!==e.anchor&&(e.anchorMap[e.anchor]=e.result)):PS(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}return null!==e.listener&&e.listener("close",e),null!==e.tag||null!==e.anchor||g}function rA(e){var t,r,n,i,a=e.position,s=!1;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);0!==(i=e.input.charCodeAt(e.position))&&(US(e,!0,-1),i=e.input.charCodeAt(e.position),!(0<e.lineIndent||37!==i));){for(s=!0,i=e.input.charCodeAt(++e.position),t=e.position;0!==i&&!SS(i);)i=e.input.charCodeAt(++e.position);for(n=[],(r=e.input.slice(t,e.position)).length<1&&PS(e,"directive name must not be less than one character in length");0!==i;){for(;_S(i);)i=e.input.charCodeAt(++e.position);if(35===i){for(;0!==(i=e.input.charCodeAt(++e.position))&&!CS(i););break}if(CS(i))break;for(t=e.position;0!==i&&!SS(i);)i=e.input.charCodeAt(++e.position);n.push(e.input.slice(t,e.position))}0!==i&&GS(e),s9.call(k9,r)?k9[r](e,r,n):BS(e,'unknown document directive "'+r+'"')}US(e,!0,-1),0===e.lineIndent&&45===e.input.charCodeAt(e.position)&&45===e.input.charCodeAt(e.position+1)&&45===e.input.charCodeAt(e.position+2)?(e.position+=3,US(e,!0,-1)):s&&PS(e,"directives end mark is expected"),tA(e,e.lineIndent-1,h9,!1,!0),US(e,!0,-1),e.checkLineBreaks&&f9.test(e.input.slice(a,e.position))&&BS(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&qS(e)?46===e.input.charCodeAt(e.position)&&(e.position+=3,US(e,!0,-1)):e.position<e.length-1&&PS(e,"end of the stream or a document separator is expected")}function nA(e,t){t=t||{};var r=new DS(e=0!==(e=String(e)).length&&(10!==e.charCodeAt(e.length-1)&&13!==e.charCodeAt(e.length-1)&&(e+=` +`),65279===e.charCodeAt(0))?e.slice(1):e,t);for(-1!==(t=e.indexOf("\0"))&&(r.position=t,PS(r,"null byte is not allowed in input")),r.input+="\0";32===r.input.charCodeAt(r.position);)r.lineIndent+=1,r.position+=1;for(;r.position<r.length-1;)rA(r);return r.documents}function iA(e,t,r){null!==t&&"object"==typeof t&&"u"<typeof r&&(r=t,t=null);var n=nA(e,r);if("function"!=typeof t)return n;for(var i=0,a=n.length;i<a;i+=1)t(n[i])}function aA(e,t){if(0!==(e=nA(e,t)).length){if(1===e.length)return e[0];throw new $A("expected a single document in the stream, but found more")}}function sA(e,t){var r,n,i,a,s,o,l;if(null===t)return{};for(r={},i=0,a=(n=Object.keys(t)).length;i<a;i+=1)s=n[i],o=String(t[s]),"!!"===s.slice(0,2)&&(s="tag:yaml.org,2002:"+s.slice(2)),(l=e.compiledTypeMap.fallback[s])&&C9.call(l.styleAliases,o)&&(o=l.styleAliases[o]),r[s]=o;return r}function oA(e){var t,r,n=e.toString(16).toUpperCase();if(e<=255)t="x",r=2;else if(e<=65535)t="u",r=4;else{if(!(e<=4294967295))throw new $A("code point within a string may not be greater than 0xFFFFFFFF");t="U",r=8}return"\\"+t+BA.repeat("0",r-n.length)+n}function lA(e){this.schema=e.schema||a9,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=BA.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=sA(this.schema,e.styles||null),this.sortKeys=e.sortKeys||!1,this.lineWidth=e.lineWidth||80,this.noRefs=e.noRefs||!1,this.noCompatMode=e.noCompatMode||!1,this.condenseFlow=e.condenseFlow||!1,this.quotingType='"'===e.quotingType?I9:1,this.forceQuotes=e.forceQuotes||!1,this.replacer="function"==typeof e.replacer?e.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function cA(e,t){for(var r,n,i=BA.repeat(" ",t),a=0,s="",o=e.length;a<o;)a=-1===(r=e.indexOf(` +`,a))?(n=e.slice(a),o):(n=e.slice(a,r+1),r+1),n.length&&n!==` +`&&(s+=i),s+=n;return s}function hA(e,t){return` +`+BA.repeat(" ",e.indent*t)}function uA(e,t){for(var r=0,n=e.implicitTypes.length;r<n;r+=1)if(e.implicitTypes[r].resolve(t))return!0;return!1}function dA(e){return 32===e||9===e}function pA(e){return 32<=e&&e<=126||161<=e&&e<=55295&&8232!==e&&8233!==e||57344<=e&&e<=65533&&e!==_9||65536<=e&&e<=1114111}function gA(e){return pA(e)&&e!==_9&&13!==e&&e!==S9}function fA(e,t,r){var n=gA(e),i=n&&!dA(e);return(r?n:n&&44!==e&&91!==e&&93!==e&&123!==e&&125!==e)&&35!==e&&!(58===t&&!i)||gA(t)&&!dA(t)&&35===e||58===t&&i}function mA(e){return pA(e)&&e!==_9&&!dA(e)&&45!==e&&63!==e&&58!==e&&44!==e&&91!==e&&93!==e&&123!==e&&125!==e&&35!==e&&38!==e&&42!==e&&33!==e&&124!==e&&61!==e&&62!==e&&39!==e&&34!==e&&37!==e&&64!==e&&96!==e}function yA(e){return!dA(e)&&58!==e}function vA(e,t){var r=e.charCodeAt(t);return 55296<=r&&r<=56319&&t+1<e.length&&56320<=(e=e.charCodeAt(t+1))&&e<=57343?1024*(r-55296)+e-56320+65536:r}function xA(e){return/^\n* /.test(e)}function bA(e,t,r,n,i,a,s,o){var l,c=0,h=null,u=!1,d=!1,p=-1!==n,g=-1,f=mA(vA(e,0))&&yA(vA(e,e.length-1));if(t||s)for(l=0;l<e.length;65536<=c?l+=2:l++){if(!pA(c=vA(e,l)))return P9;f=f&&fA(c,h,o),h=c}else{for(l=0;l<e.length;65536<=c?l+=2:l++){if((c=vA(e,l))===S9)u=!0,p&&(d=d||n<l-g-1&&" "!==e[g+1],g=l);else if(!pA(c))return P9;f=f&&fA(c,h,o),h=c}d=d||p&&n<l-g-1&&" "!==e[g+1]}return u||d?9<r&&xA(e)?P9:s?a===I9?P9:M9:d?O9:D9:!f||s||i(e)?a===I9?P9:M9:R9}function wA(i,a,s,o,l){i.dump=(()=>{if(0===a.length)return i.quotingType===I9?'""':"''";if(!i.noCompatMode&&(-1!==L9.indexOf(a)||N9.test(a)))return i.quotingType===I9?'"'+a+'"':"'"+a+"'";var e=i.indent*Math.max(1,s),t=-1===i.lineWidth?-1:Math.max(Math.min(i.lineWidth,40),i.lineWidth-e),r=o||-1<i.flowLevel&&s>=i.flowLevel;function n(e){return uA(i,e)}switch(mt(n,"testAmbiguity"),bA(a,r,i.indent,t,n,i.quotingType,i.forceQuotes&&!o,l)){case R9:return a;case M9:return"'"+a.replace(/'/g,"''")+"'";case D9:return"|"+kA(a,i.indent)+TA(cA(a,e));case O9:return">"+kA(a,i.indent)+TA(cA(EA(a,t),e));case P9:return'"'+_A(a)+'"';default:throw new $A("impossible error: invalid scalar style")}})()}function kA(e,t){var t=xA(e)?String(t):"",r=e[e.length-1]===` +`;return t+(!r||e[e.length-2]!==` +`&&e!==` +`?r?"":"-":"+")+` +`}function TA(e){return e[e.length-1]===` +`?e.slice(0,-1):e}function EA(e,t){for(var r,n=/(\n+)([^\n]*)/g,i=(r=-1!==(r=e.indexOf(` +`))?r:e.length,n.lastIndex=r,CA(e.slice(0,r),t)),a=e[0]===` +`||" "===e[0];o=n.exec(e);){var s=o[1],o=o[2],l=" "===o[0];i+=s+(a||l||""===o?"":` +`)+CA(o,t),a=l}return i}function CA(e,t){if(""===e||" "===e[0])return e;for(var r,n,i=/ [^ ]/g,a=0,s=0,o="";n=i.exec(e);)t<(n=n.index)-a&&(o+=` +`+e.slice(a,r=a<s?s:n),a=r+1),s=n;return o+=` +`,e.length-a>t&&a<s?o+=e.slice(a,s)+` +`+e.slice(s+1):o+=e.slice(a),o.slice(1)}function _A(e){for(var t,r,n="",i=0;i<e.length;65536<=t?i+=2:i++)t=vA(e,i),!(r=A9[t])&&pA(t)?(n+=e[i],65536<=t&&(n+=e[i+1])):n+=r||oA(t);return n}function SA(e,t,r){for(var n,i="",a=e.tag,s=0,o=r.length;s<o;s+=1)n=r[s],e.replacer&&(n=e.replacer.call(r,String(s),n)),(RA(e,t,n,!1,!1)||"u"<typeof n&&RA(e,t,null,!1,!1))&&(""!==i&&(i+=","+(e.condenseFlow?"":" ")),i+=e.dump);e.tag=a,e.dump="["+i+"]"}function AA(e,t,r,n){for(var i,a="",s=e.tag,o=0,l=r.length;o<l;o+=1)i=r[o],e.replacer&&(i=e.replacer.call(r,String(o),i)),(RA(e,t+1,i,!0,!0,!1,!0)||"u"<typeof i&&RA(e,t+1,null,!0,!0,!1,!0))&&(n&&""===a||(a+=hA(e,t)),e.dump&&S9===e.dump.charCodeAt(0)?a+="-":a+="- ",a+=e.dump);e.tag=s,e.dump=a||"[]"}function LA(e,t,r){for(var n,i,a,s="",o=e.tag,l=Object.keys(r),c=0,h=l.length;c<h;c+=1)(a="")!==s&&(a+=", "),e.condenseFlow&&(a+='"'),i=r[n=l[c]],e.replacer&&(i=e.replacer.call(r,n,i)),RA(e,t,n,!1,!1)&&(1024<e.dump.length&&(a+="? "),a+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),RA(e,t,i,!1,!1))&&(s+=a+=e.dump);e.tag=o,e.dump="{"+s+"}"}function NA(e,t,r,n){var i,a,s,o,l,c="",h=e.tag,u=Object.keys(r);if(!0===e.sortKeys)u.sort();else if("function"==typeof e.sortKeys)u.sort(e.sortKeys);else if(e.sortKeys)throw new $A("sortKeys must be a boolean or a function");for(i=0,a=u.length;i<a;i+=1)l="",n&&""===c||(l+=hA(e,t)),s=r[o=u[i]],e.replacer&&(s=e.replacer.call(r,o,s)),RA(e,t+1,o,!0,!0,!0)&&((o=null!==e.tag&&"?"!==e.tag||e.dump&&1024<e.dump.length)&&(e.dump&&S9===e.dump.charCodeAt(0)?l+="?":l+="? "),l+=e.dump,o&&(l+=hA(e,t)),RA(e,t+1,s,!0,o))&&(e.dump&&S9===e.dump.charCodeAt(0)?l+=":":l+=": ",c+=l+=e.dump);e.tag=h,e.dump=c||"{}"}function IA(e,t,r){for(var n,i,a,s=r?e.explicitTypes:e.implicitTypes,o=0,l=s.length;o<l;o+=1)if(((i=s[o]).instanceOf||i.predicate)&&(!i.instanceOf||"object"==typeof t&&t instanceof i.instanceOf)&&(!i.predicate||i.predicate(t))){if(r?i.multi&&i.representName?e.tag=i.representName(t):e.tag=i.tag:e.tag="?",i.represent){if(a=e.styleMap[i.tag]||i.defaultStyle,"[object Function]"===E9.call(i.represent))n=i.represent(t,a);else{if(!C9.call(i.represent,a))throw new $A("!<"+i.tag+'> tag resolver accepts not "'+a+'" style');n=i.represent[a](t,a)}e.dump=n}return!0}return!1}function RA(e,t,r,n,i,a,s){e.tag=null,e.dump=r,IA(e,r,!1)||IA(e,r,!0);var o,l,c=E9.call(e.dump),h=n,u=(n=n&&(e.flowLevel<0||e.flowLevel>t),"[object Object]"===c||"[object Array]"===c);if(u&&(l=-1!==(o=e.duplicates.indexOf(r))),(null!==e.tag&&"?"!==e.tag||l||2!==e.indent&&0<t)&&(i=!1),l&&e.usedDuplicates[o])e.dump="*ref_"+o;else{if(u&&l&&!e.usedDuplicates[o]&&(e.usedDuplicates[o]=!0),"[object Object]"===c)n&&0!==Object.keys(e.dump).length?(NA(e,t,e.dump,i),l&&(e.dump="&ref_"+o+e.dump)):(LA(e,t,e.dump),l&&(e.dump="&ref_"+o+" "+e.dump));else if("[object Array]"===c)n&&0!==e.dump.length?(e.noArrayIndent&&!s&&0<t?AA(e,t-1,e.dump,i):AA(e,t,e.dump,i),l&&(e.dump="&ref_"+o+e.dump)):(SA(e,t,e.dump),l&&(e.dump="&ref_"+o+" "+e.dump));else{if("[object String]"!==c){if("[object Undefined]"===c)return!1;if(e.skipInvalid)return!1;throw new $A("unacceptable kind of an object to dump "+c)}"?"!==e.tag&&wA(e,e.dump,t,a,h)}null!==e.tag&&"?"!==e.tag&&(r=encodeURI("!"===e.tag[0]?e.tag.slice(1):e.tag).replace(/!/g,"%21"),r="!"===e.tag[0]?"!"+r:"tag:yaml.org,2002:"===r.slice(0,18)?"!!"+r.slice(18):"!<"+r+">",e.dump=r+" "+e.dump)}return!0}function MA(e,t){var r,n,i=[],a=[];for(DA(e,i,a),r=0,n=a.length;r<n;r+=1)t.duplicates.push(i[a[r]]);t.usedDuplicates=new Array(n)}function DA(e,t,r){var n,i,a;if(null!==e&&"object"==typeof e)if(-1!==(i=t.indexOf(e)))-1===r.indexOf(i)&&r.push(i);else if(t.push(e),Array.isArray(e))for(i=0,a=e.length;i<a;i+=1)DA(e[i],t,r);else for(i=0,a=(n=Object.keys(e)).length;i<a;i+=1)DA(e[n[i]],t,r)}function OA(e,t){return(t=new lA(t=t||{})).noRefs||MA(e,t),t.replacer&&(e=t.replacer.call({"":e},"",e)),RA(t,0,e,!0,!0)?t.dump+` +`:""}function PA(e,t){return function(){throw new Error("Function yaml."+e+" is removed in js-yaml 4. Use yaml."+t+" instead, which is now safe by default.")}}var BA,$A,FA,zA,GA,UA,qA,jA,YA,WA,HA,VA,XA,KA,ZA,QA,JA,e9,t9,r9,n9,i9,a9,s9,o9,l9,c9,h9,u9,d9,p9,g9,f9,m9,y9,v9,x9,b9,w9,k9,T9,E9,C9,_9,S9,A9,L9,N9,I9,R9,M9,D9,O9,P9,B9,$9,F9=b(()=>{for(mt(R_,"isNothing"),mt(M_,"isObject"),mt(D_,"toArray"),mt(O_,"extend"),mt(P_,"repeat"),mt(B_,"isNegativeZero"),BA={isNothing:R_,isObject:M_,toArray:D_,repeat:P_,isNegativeZero:B_,extend:O_},mt($_,"formatError"),mt(F_,"YAMLException$1"),((F_.prototype=Object.create(Error.prototype)).constructor=F_).prototype.toString=mt(function(e){return this.name+": "+$_(this,e)},"toString"),$A=F_,mt(z_,"getLine"),mt(G_,"padStart"),mt(U_,"makeSnippet"),FA=U_,zA=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],GA=["scalar","sequence","mapping"],mt(q_,"compileStyleAliases"),mt(j_,"Type$1"),UA=j_,mt(Y_,"compileList"),mt(W_,"compileMap"),mt(H_,"Schema$1"),H_.prototype.extend=mt(function(e){var t=[],r=[];if(e instanceof UA)r.push(e);else if(Array.isArray(e))r=r.concat(e);else{if(!e||!Array.isArray(e.implicit)&&!Array.isArray(e.explicit))throw new $A("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");e.implicit&&(t=t.concat(e.implicit)),e.explicit&&(r=r.concat(e.explicit))}return t.forEach(function(e){if(!(e instanceof UA))throw new $A("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(e.loadKind&&"scalar"!==e.loadKind)throw new $A("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(e.multi)throw new $A("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),r.forEach(function(e){if(!(e instanceof UA))throw new $A("Specified list of YAML types (or a single Type object) contains a non-Type object.")}),(e=Object.create(H_.prototype)).implicit=(this.implicit||[]).concat(t),e.explicit=(this.explicit||[]).concat(r),e.compiledImplicit=Y_(e,"implicit"),e.compiledExplicit=Y_(e,"explicit"),e.compiledTypeMap=W_(e.compiledImplicit,e.compiledExplicit),e},"extend"),YA=H_,T9=new UA("tag:yaml.org,2002:str",{kind:"scalar",construct:mt(function(e){return null!==e?e:""},"construct")}),VA=new UA("tag:yaml.org,2002:seq",{kind:"sequence",construct:mt(function(e){return null!==e?e:[]},"construct")}),XA=new UA("tag:yaml.org,2002:map",{kind:"mapping",construct:mt(function(e){return null!==e?e:{}},"construct")}),YA=new YA({explicit:[T9,VA,XA]}),mt(V_,"resolveYamlNull"),mt(X_,"constructYamlNull"),mt(K_,"isNull"),T9=new UA("tag:yaml.org,2002:null",{kind:"scalar",resolve:V_,construct:X_,predicate:K_,represent:{canonical:mt(function(){return"~"},"canonical"),lowercase:mt(function(){return"null"},"lowercase"),uppercase:mt(function(){return"NULL"},"uppercase"),camelcase:mt(function(){return"Null"},"camelcase"),empty:mt(function(){return""},"empty")},defaultStyle:"lowercase"}),mt(Z_,"resolveYamlBoolean"),mt(Q_,"constructYamlBoolean"),mt(J_,"isBoolean"),VA=new UA("tag:yaml.org,2002:bool",{kind:"scalar",resolve:Z_,construct:Q_,predicate:J_,represent:{lowercase:mt(function(e){return e?"true":"false"},"lowercase"),uppercase:mt(function(e){return e?"TRUE":"FALSE"},"uppercase"),camelcase:mt(function(e){return e?"True":"False"},"camelcase")},defaultStyle:"lowercase"}),mt(eS,"isHexCode"),mt(tS,"isOctCode"),mt(rS,"isDecCode"),mt(nS,"resolveYamlInteger"),mt(iS,"constructYamlInteger"),mt(aS,"isInteger"),XA=new UA("tag:yaml.org,2002:int",{kind:"scalar",resolve:nS,construct:iS,predicate:aS,represent:{binary:mt(function(e){return 0<=e?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},"binary"),octal:mt(function(e){return 0<=e?"0o"+e.toString(8):"-0o"+e.toString(8).slice(1)},"octal"),decimal:mt(function(e){return e.toString(10)},"decimal"),hexadecimal:mt(function(e){return 0<=e?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)},"hexadecimal")},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),qA=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),mt(sS,"resolveYamlFloat"),mt(oS,"constructYamlFloat"),jA=/^[-+]?[0-9]+e/,mt(lS,"representYamlFloat"),mt(cS,"isFloat"),ZA=new UA("tag:yaml.org,2002:float",{kind:"scalar",resolve:sS,construct:oS,predicate:cS,represent:lS,defaultStyle:"lowercase"}),YA=YA.extend({implicit:[T9,VA,XA,ZA]}),T9=YA,WA=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),HA=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]))?))?$"),mt(hS,"resolveYamlTimestamp"),mt(uS,"constructYamlTimestamp"),mt(dS,"representYamlTimestamp"),VA=new UA("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:hS,construct:uS,instanceOf:Date,represent:dS}),mt(pS,"resolveYamlMerge"),XA=new UA("tag:yaml.org,2002:merge",{kind:"scalar",resolve:pS}),KA=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/= +\r`,mt(gS,"resolveYamlBinary"),mt(fS,"constructYamlBinary"),mt(mS,"representYamlBinary"),mt(yS,"isBinary"),ZA=new UA("tag:yaml.org,2002:binary",{kind:"scalar",resolve:gS,construct:fS,predicate:yS,represent:mS}),QA=Object.prototype.hasOwnProperty,JA=Object.prototype.toString,mt(vS,"resolveYamlOmap"),mt(xS,"constructYamlOmap"),e9=new UA("tag:yaml.org,2002:omap",{kind:"sequence",resolve:vS,construct:xS}),t9=Object.prototype.toString,mt(bS,"resolveYamlPairs"),mt(wS,"constructYamlPairs"),r9=new UA("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:bS,construct:wS}),n9=Object.prototype.hasOwnProperty,mt(kS,"resolveYamlSet"),mt(TS,"constructYamlSet"),i9=new UA("tag:yaml.org,2002:set",{kind:"mapping",resolve:kS,construct:TS}),a9=T9.extend({implicit:[VA,XA],explicit:[ZA,e9,r9,i9]}),s9=Object.prototype.hasOwnProperty,h9=4,u9=o9=1,d9=l9=2,p9=c9=3,g9=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,f9=/[\x85\u2028\u2029]/,m9=/[,\[\]\{\}]/,y9=/^(?:!|!!|![a-z\-]+!)$/i,v9=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i,mt(ES,"_class"),mt(CS,"is_EOL"),mt(_S,"is_WHITE_SPACE"),mt(SS,"is_WS_OR_EOL"),mt(AS,"is_FLOW_INDICATOR"),mt(LS,"fromHexCode"),mt(NS,"escapedHexLen"),mt(IS,"fromDecimalCode"),mt(RS,"simpleEscapeSequence"),mt(MS,"charFromCodepoint"),x9=new Array(256),b9=new Array(256),w9=0;w9<256;w9++)x9[w9]=RS(w9)?1:0,b9[w9]=RS(w9);mt(DS,"State$1"),mt(OS,"generateError"),mt(PS,"throwError"),mt(BS,"throwWarning"),k9={YAML:mt(function(e,t,r){var n,i;null!==e.version&&PS(e,"duplication of %YAML directive"),1!==r.length&&PS(e,"YAML directive accepts exactly one argument"),null===(i=/^([0-9]+)\.([0-9]+)$/.exec(r[0]))&&PS(e,"ill-formed argument of the YAML directive"),n=parseInt(i[1],10),i=parseInt(i[2],10),1!==n&&PS(e,"unacceptable YAML version of the document"),e.version=r[0],e.checkLineBreaks=i<2,1!==i&&2!==i&&BS(e,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:mt(function(e,t,r){var n;2!==r.length&&PS(e,"TAG directive accepts exactly two arguments"),n=r[1],y9.test(r=r[0])||PS(e,"ill-formed tag handle (first argument) of the TAG directive"),s9.call(e.tagMap,r)&&PS(e,'there is a previously declared suffix for "'+r+'" tag handle'),v9.test(n)||PS(e,"ill-formed tag prefix (second argument) of the TAG directive");try{n=decodeURIComponent(n)}catch{PS(e,"tag prefix is malformed: "+n)}e.tagMap[r]=n},"handleTagDirective")},mt($S,"captureSegment"),mt(FS,"mergeMappings"),mt(zS,"storeMappingPair"),mt(GS,"readLineBreak"),mt(US,"skipSeparationSpace"),mt(qS,"testDocumentSeparator"),mt(jS,"writeFoldedLines"),mt(YS,"readPlainScalar"),mt(WS,"readSingleQuotedScalar"),mt(HS,"readDoubleQuotedScalar"),mt(VS,"readFlowCollection"),mt(XS,"readBlockScalar"),mt(KS,"readBlockSequence"),mt(ZS,"readBlockMapping"),mt(QS,"readTagProperty"),mt(JS,"readAnchorProperty"),mt(eA,"readAlias"),mt(tA,"composeNode"),mt(rA,"readDocument"),mt(nA,"loadDocuments"),mt(iA,"loadAll$1"),mt(aA,"load$1"),T9={loadAll:iA,load:aA},E9=Object.prototype.toString,C9=Object.prototype.hasOwnProperty,_9=65279,S9=10,A9={0:"\\0",7:"\\a",8:"\\b",9:"\\t",10:"\\n",11:"\\v",12:"\\f",13:"\\r",27:"\\e",34:'\\"',92:"\\\\",133:"\\N",160:"\\_",8232:"\\L",8233:"\\P"},L9=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],N9=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/,mt(sA,"compileStyleMap"),mt(oA,"encodeHex"),I9=2,mt(lA,"State"),mt(cA,"indentString"),mt(hA,"generateNextLine"),mt(uA,"testImplicitResolving"),mt(dA,"isWhitespace"),mt(pA,"isPrintable"),mt(gA,"isNsCharOrWhitespace"),mt(fA,"isPlainSafe"),mt(mA,"isPlainSafeFirst"),mt(yA,"isPlainSafeLast"),mt(vA,"codePointAt"),mt(xA,"needIndentIndicator"),R9=1,M9=2,D9=3,O9=4,P9=5,mt(bA,"chooseScalarStyle"),mt(wA,"writeScalar"),mt(kA,"blockHeader"),mt(TA,"dropEndingNewline"),mt(EA,"foldString"),mt(CA,"foldLine"),mt(_A,"escapeString"),mt(SA,"writeFlowSequence"),mt(AA,"writeBlockSequence"),mt(LA,"writeFlowMapping"),mt(NA,"writeBlockMapping"),mt(IA,"detectType"),mt(RA,"writeNode"),mt(MA,"getDuplicateReferences"),mt(DA,"inspectNode"),mt(OA,"dump$1"),mt(PA,"renamed"),B9=YA,$9=T9.load,PA("safeLoad","load"),PA("safeLoadAll","loadAll"),PA("safeDump","dump")});function z9(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}function G9(e){Z9=e}function U9(e,t=""){let n="string"==typeof e?e:e.source,i={replace:mt((e,t)=>{let r="string"==typeof t?t:t.source;return r=r.replace(J9.caret,"$1"),n=n.replace(e,r),i},"replace"),getRegex:mt(()=>new RegExp(n,t),"getRegex")};return i}function q9(e,t){if(t){if(J9.escapeTest.test(e))return e.replace(J9.escapeReplace,EL)}else if(J9.escapeTestNoEncode.test(e))return e.replace(J9.escapeReplaceNoEncode,EL);return e}function j9(e){try{e=encodeURI(e).replace(J9.percentDecode,"%")}catch{return null}return e}function Y9(e,t){let r=e.replace(J9.findPipe,(e,t,r)=>{let n=!1,i=t;for(;0<=--i&&"\\"===r[i];)n=!n;return n?"|":" |"}),n=r.split(J9.splitPipe),i=0;if(n[0].trim()||n.shift(),0<n.length&&!n.at(-1)?.trim()&&n.pop(),t)if(n.length>t)n.splice(t);else for(;n.length<t;)n.push("");for(;i<n.length;i++)n[i]=n[i].trim().replace(J9.slashPipe,"|");return n}function W9(e,t,r){var n=e.length;if(0===n)return"";let i=0;for(;i<n;){var a=e.charAt(n-i-1);if((a!==t||r)&&(a===t||!r))break;i++}return e.slice(0,n-i)}function H9(t,r){if(-1===t.indexOf(r[1]))return-1;let n=0;for(let e=0;e<t.length;e++)if("\\"===t[e])e++;else if(t[e]===r[0])n++;else if(t[e]===r[1]&&--n<0)return e;return 0<n?-2:-1}function V9(e,t,r,n,i){var a=t.href,t=t.title||null,i=e[1].replace(i.other.outputLinkReplace,"$1"),e=(n.state.inLink=!0,{type:"!"===e[0].charAt(0)?"image":"link",raw:r,href:a,title:t,text:i,tokens:n.inlineTokens(i)});return n.state.inLink=!1,e}function X9(e,t,r){if(null===(e=e.match(r.other.indentCodeCompensation)))return t;let n=e[1];return t.split(` +`).map(e=>{var t=e.match(r.other.beginningSpace);return null!==t&&([t]=t,t.length>=n.length)?e.slice(n.length):e}).join(` +`)}function K9(e,t){return RL.parse(e,t)}var Z9,Q9,J9,eL,tL,rL,nL,iL,aL,sL,oL,lL,cL,hL,uL,dL,pL,gL,fL,mL,yL,vL,xL,bL,wL,kL,TL,EL,CL,_L,SL,AL,LL,NL,IL,RL,ML=b(()=>{mt(z9,"L"),Z9=z9(),mt(G9,"G"),Q9={exec:mt(()=>null,"exec")},mt(U9,"h"),J9={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:mt(e=>new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),"listItemRegex"),nextBulletRegex:mt(e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),"nextBulletRegex"),hrRegex:mt(e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),"hrRegex"),fencesBeginRegex:mt(e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),"fencesBeginRegex"),headingBeginRegex:mt(e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),"headingBeginRegex"),htmlBeginRegex:mt(e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i"),"htmlBeginRegex")},aL=/^(?:[ \t]*(?:\n|$))+/,sL=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,rL=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,hL=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,nL=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,iL=/(?:[*+-]|\d{1,9}[.)])/,xL=U9(gL=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g,iL).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(),gL=U9(gL).replace(/bull/g,iL).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(),yL=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,uL=/^[^\n]+/,fL=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,tL=U9(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",fL).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),iL=U9(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,iL).getRegex(),vL="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",pL=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,bL=U9("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$))","i").replace("comment",pL).replace("tag",vL).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),dL=U9(yL).replace("hr",hL).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",vL).getRegex(),eL={blockquote:U9(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",dL).getRegex(),code:sL,def:tL,fences:rL,heading:nL,hr:hL,html:bL,lheading:xL,list:iL,newline:aL,paragraph:dL,table:Q9,text:uL},sL=U9("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",hL).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3}\t)[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",vL).getRegex(),tL={...eL,lheading:gL,table:sL,paragraph:U9(yL).replace("hr",hL).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",sL).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",vL).getRegex()},rL={...eL,html:U9(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",pL).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Q9,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:U9(yL).replace("hr",hL).replace("heading",` *#{1,6} *[^ +]`).replace("lheading",xL).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},nL=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,bL=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,iL=/^( {2,}|\\)\n(?!\s*$)/,aL=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,dL=/[\p{P}\p{S}]/u,uL=/[\s\p{P}\p{S}]/u,gL=/[^\s\p{P}\p{S}]/u,sL=U9(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,uL).getRegex(),vL=/(?!~)[\p{P}\p{S}]/u,yL=/(?!~)[\s\p{P}\p{S}]/u,hL=/(?:[^\s\p{P}\p{S}]|~)/u,xL=/\[[^\[\]]*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)|`[^`]*?`|<(?! )[^<>]*?>/g,IL=U9(oL=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,"u").replace(/punct/g,dL).getRegex(),oL=U9(oL,"u").replace(/punct/g,vL).getRegex(),lL=U9(cL="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)","gu").replace(/notPunctSpace/g,gL).replace(/punctSpace/g,uL).replace(/punct/g,dL).getRegex(),cL=U9(cL,"gu").replace(/notPunctSpace/g,hL).replace(/punctSpace/g,yL).replace(/punct/g,vL).getRegex(),hL=U9("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,gL).replace(/punctSpace/g,uL).replace(/punct/g,dL).getRegex(),yL=U9(/\\(punct)/,"gu").replace(/punct/g,dL).getRegex(),vL=U9(/^<(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(),gL=U9(pL).replace("(?:--\x3e|$)","--\x3e").getRegex(),uL=U9("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",gL).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),dL=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`[^`]*`|[^\[\]\\`])*?/,pL=U9(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",dL).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),gL=U9(/^!?\[(label)\]\[(ref)\]/).replace("label",dL).replace("ref",fL).getRegex(),fL=U9(/^!?\[(ref)\](?:\[\])?/).replace("ref",fL).getRegex(),mL=U9("reflink|nolink(?!\\()","g").replace("reflink",gL).replace("nolink",fL).getRegex(),vL={...yL={_backpedal:Q9,anyPunctuation:yL,autolink:vL,blockSkip:xL,br:iL,code:bL,del:Q9,emStrongLDelim:IL,emStrongRDelimAst:lL,emStrongRDelimUnd:hL,escape:nL,link:pL,nolink:fL,punctuation:sL,reflink:gL,reflinkSearch:mL,tag:uL,text:aL,url:Q9},link:U9(/^!?\[(label)\]\((.*?)\)/).replace("label",dL).getRegex(),reflink:U9(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",dL).getRegex()},xL={...yL,emStrongRDelimAst:cL,emStrongLDelim:oL,url:U9(/^((?: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]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},bL={...xL,br:U9(iL).replace("{2,}","*").getRegex(),text:U9(xL.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},wL={normal:eL,gfm:tL,pedantic:rL},kL={normal:yL,gfm:xL,breaks:bL,pedantic:vL},TL={"&":"&","<":"<",">":">",'"':""","'":"'"},EL=mt(e=>TL[e],"ke"),mt(q9,"w"),mt(j9,"J"),mt(Y9,"V"),mt(W9,"z"),mt(H9,"ge"),mt(V9,"fe"),mt(X9,"Je"),CL=class{static{mt(this,"y")}options;rules;lexer;constructor(e){this.options=e||Z9}space(e){if((e=this.rules.block.newline.exec(e))&&0<e[0].length)return{type:"space",raw:e[0]}}code(e){var t;if(e=this.rules.block.code.exec(e))return t=e[0].replace(this.rules.other.codeRemoveIndent,""),{type:"code",raw:e[0],codeBlockStyle:"indented",text:this.options.pedantic?t:W9(t,` +`)}}fences(e){var t,r;if(e=this.rules.block.fences.exec(e))return r=X9(t=e[0],e[3]||"",this.rules),{type:"code",raw:t,lang:e[2]&&e[2].trim().replace(this.rules.inline.anyPunctuation,"$1"),text:r}}heading(t){var r;if(t=this.rules.block.heading.exec(t)){let e=t[2].trim();return this.rules.other.endingHash.test(e)&&(r=W9(e,"#"),!this.options.pedantic&&r&&!this.rules.other.endingSpaceChar.test(r)||(e=r.trim())),{type:"heading",raw:t[0],depth:t[1].length,text:e,tokens:this.lexer.inline(e)}}}hr(e){if(e=this.rules.block.hr.exec(e))return{type:"hr",raw:W9(e[0],` +`)}}blockquote(e){if(e=this.rules.block.blockquote.exec(e)){let n=W9(e[0],` +`).split(` +`),i="",a="",s=[];for(;0<n.length;){let e=!1,t=[],r;for(r=0;r<n.length;r++)if(this.rules.other.blockquoteStart.test(n[r]))t.push(n[r]),e=!0;else{if(e)break;t.push(n[r])}n=n.slice(r);var o,l=(c=t.join(` +`)).replace(this.rules.other.blockquoteSetextReplace,` + $1`).replace(this.rules.other.blockquoteSetextReplace2,""),c=(i=i?i+` +`+c:c,a=a?a+` +`+l:l,this.lexer.state.top);if(this.lexer.state.top=!0,this.lexer.blockTokens(l,s,!0),this.lexer.state.top=c,0===n.length)break;if("code"===(l=s.at(-1))?.type)break;if("blockquote"===l?.type){var h=(c=l).raw+` +`+n.join(` +`),h=this.blockquote(h);s[s.length-1]=h,i=i.substring(0,i.length-c.raw.length)+h.raw,a=a.substring(0,a.length-c.text.length)+h.text;break}"list"===l?.type&&(h=(c=l).raw+` +`+n.join(` +`),o=this.list(h),s[s.length-1]=o,i=i.substring(0,i.length-l.raw.length)+o.raw,a=a.substring(0,a.length-c.raw.length)+o.raw,n=h.substring(s.at(-1).raw.length).split(` +`))}return{type:"blockquote",raw:i,tokens:s,text:a}}}list(d){let p=this.rules.block.list.exec(d);if(p){let e=p[1].trim(),t=1<e.length,c={type:"list",raw:"",ordered:t,start:t?+e.slice(0,-1):"",loose:!1,items:[]},h=(e=t?"\\d{1,9}\\"+e.slice(-1):"\\"+e,this.options.pedantic&&(e=t?e:"[*+-]"),this.rules.other.listItemRegex(e)),u=!1;for(;d;){let e=!1,t="",r="";if(!(p=h.exec(d))||this.rules.block.hr.test(d))break;t=p[0],d=d.substring(t.length);let n=p[2].split(` +`,1)[0].replace(this.rules.other.listReplaceTabs,e=>" ".repeat(3*e.length)),i=d.split(` +`,1)[0],a=!n.trim(),s=0;if(this.options.pedantic?(s=2,r=n.trimStart()):a?s=p[1].length+1:(s=4<(s=p[2].search(this.rules.other.nonSpaceChar))?1:s,r=n.slice(s),s+=p[1].length),a&&this.rules.other.blankLine.test(i)&&(t+=i+` +`,d=d.substring(i.length+1),e=!0),!e)for(var g=this.rules.other.nextBulletRegex(s),f=this.rules.other.hrRegex(s),m=this.rules.other.fencesBeginRegex(s),y=this.rules.other.headingBeginRegex(s),v=this.rules.other.htmlBeginRegex(s);d;){var x,b=d.split(` +`,1)[0];if(i=b,x=this.options.pedantic?i=i.replace(this.rules.other.listReplaceNesting," "):i.replace(this.rules.other.tabCharGlobal," "),m.test(i)||y.test(i)||v.test(i)||g.test(i)||f.test(i))break;if(x.search(this.rules.other.nonSpaceChar)>=s||!i.trim())r+=` +`+x.slice(s);else{if(a||4<=n.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)||m.test(n)||y.test(n)||f.test(n))break;r+=` +`+i}a||i.trim()||(a=!0),t+=b+` +`,d=d.substring(b.length+1),n=x.slice(s)}c.loose||(u?c.loose=!0:this.rules.other.doubleBlankLine.test(t)&&(u=!0));let o=null,l;this.options.gfm&&(o=this.rules.other.listIsTask.exec(r))&&(l="[ ] "!==o[0],r=r.replace(this.rules.other.listReplaceTask,"")),c.items.push({type:"list_item",raw:t,task:!!o,checked:l,loose:!1,text:r,tokens:[]}),c.raw+=t}var r,n=c.items.at(-1);if(n){n.raw=n.raw.trimEnd(),n.text=n.text.trimEnd(),c.raw=c.raw.trimEnd();for(let e=0;e<c.items.length;e++)this.lexer.state.top=!1,c.items[e].tokens=this.lexer.blockTokens(c.items[e].text,[]),c.loose||(r=0<(r=c.items[e].tokens.filter(e=>"space"===e.type)).length&&r.some(e=>this.rules.other.anyLine.test(e.raw)),c.loose=r);if(c.loose)for(let e=0;e<c.items.length;e++)c.items[e].loose=!0;return c}}}html(e){if(e=this.rules.block.html.exec(e))return{type:"html",block:!0,raw:e[0],pre:"pre"===e[1]||"script"===e[1]||"style"===e[1],text:e[0]}}def(e){var t,r,n;if(e=this.rules.block.def.exec(e))return t=e[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),r=e[2]?e[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",n=e[3]&&e[3].substring(1,e[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"),{type:"def",tag:t,raw:e[0],href:r,title:n}}table(i){if((i=this.rules.block.table.exec(i))&&this.rules.other.tableDelimiter.test(i[2])){let t=Y9(i[1]),e=i[2].replace(this.rules.other.tableAlignChars,"").split("|"),r=i[3]?.trim()?i[3].replace(this.rules.other.tableRowBlankLine,"").split(` +`):[],n={type:"table",raw:i[0],header:[],align:[],rows:[]};if(t.length===e.length){for(var a of e)this.rules.other.tableAlignRight.test(a)?n.align.push("right"):this.rules.other.tableAlignCenter.test(a)?n.align.push("center"):this.rules.other.tableAlignLeft.test(a)?n.align.push("left"):n.align.push(null);for(let e=0;e<t.length;e++)n.header.push({text:t[e],tokens:this.lexer.inline(t[e]),header:!0,align:n.align[e]});for(var s of r)n.rows.push(Y9(s,n.header.length).map((e,t)=>({text:e,tokens:this.lexer.inline(e),header:!1,align:n.align[t]})));return n}}}lheading(e){if(e=this.rules.block.lheading.exec(e))return{type:"heading",raw:e[0],depth:"="===e[2].charAt(0)?1:2,text:e[1],tokens:this.lexer.inline(e[1])}}paragraph(e){var t;if(e=this.rules.block.paragraph.exec(e))return t=e[1].charAt(e[1].length-1)===` +`?e[1].slice(0,-1):e[1],{type:"paragraph",raw:e[0],text:t,tokens:this.lexer.inline(t)}}text(e){if(e=this.rules.block.text.exec(e))return{type:"text",raw:e[0],text:e[0],tokens:this.lexer.inline(e[0])}}escape(e){if(e=this.rules.inline.escape.exec(e))return{type:"escape",raw:e[0],text:e[1]}}tag(e){if(e=this.rules.inline.tag.exec(e))return!this.lexer.state.inLink&&this.rules.other.startATag.test(e[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(e[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:e[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:e[0]}}link(r){if(r=this.rules.inline.link.exec(r)){var n,i=r[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(i)){if(!this.rules.other.endAngleBracket.test(i))return;var a=W9(i.slice(0,-1),"\\");if((i.length-a.length)%2==0)return}else{if(-2===(a=H9(r[2],"()")))return;-1<a&&(n=(0===r[0].indexOf("!")?5:4)+r[1].length+a,r[2]=r[2].substring(0,a),r[0]=r[0].substring(0,n).trim(),r[3]="")}let e=r[2],t="";return this.options.pedantic?(a=this.rules.other.pedanticHrefTitle.exec(e))&&(e=a[1],t=a[3]):t=r[3]?r[3].slice(1,-1):"",e=e.trim(),V9(r,{href:(e=this.rules.other.startAngleBracket.test(e)?this.options.pedantic&&!this.rules.other.endAngleBracket.test(i)?e.slice(1):e.slice(1,-1):e)&&e.replace(this.rules.inline.anyPunctuation,"$1"),title:t&&t.replace(this.rules.inline.anyPunctuation,"$1")},r[0],this.lexer,this.rules)}}reflink(e,t){var r;if(r=(r=this.rules.inline.reflink.exec(e))||this.rules.inline.nolink.exec(e))return(e=t[(r[2]||r[1]).replace(this.rules.other.multipleSpaceGlobal," ").toLowerCase()])?V9(r,e,r[0],this.lexer,this.rules):{type:"text",raw:t=r[0].charAt(0),text:t}}emStrong(s,o,e=""){let l=this.rules.inline.emStrongLDelim.exec(s);if(!(!l||l[3]&&e.match(this.rules.other.unicodeAlphaNumeric))&&(!l[1]&&!l[2]||!e||this.rules.inline.punctuation.exec(e))){let e=[...l[0]].length-1,t,r,n=e,i=0,a="*"===l[0][0]?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(a.lastIndex=0,o=o.slice(-1*s.length+e);null!=(l=a.exec(o));){var c,h;if(t=l[1]||l[2]||l[3]||l[4]||l[5]||l[6])if(r=[...t].length,l[3]||l[4])n+=r;else if((l[5]||l[6])&&e%3&&!((e+r)%3))i+=r;else if(!(0<(n-=r)))return r=Math.min(r,r+n+i),c=[...l[0]][0].length,c=s.slice(0,e+l.index+c+r),Math.min(e,r)%2?(h=c.slice(1,-1),{type:"em",raw:c,text:h,tokens:this.lexer.inlineTokens(h)}):(h=c.slice(2,-2),{type:"strong",raw:c,text:h,tokens:this.lexer.inlineTokens(h)})}}}codespan(n){if(n=this.rules.inline.code.exec(n)){let e=n[2].replace(this.rules.other.newLineCharGlobal," "),t=this.rules.other.nonSpaceChar.test(e),r=this.rules.other.startingSpaceChar.test(e)&&this.rules.other.endingSpaceChar.test(e);return t&&r&&(e=e.substring(1,e.length-1)),{type:"codespan",raw:n[0],text:e}}}br(e){if(e=this.rules.inline.br.exec(e))return{type:"br",raw:e[0]}}del(e){if(e=this.rules.inline.del.exec(e))return{type:"del",raw:e[0],text:e[2],tokens:this.lexer.inlineTokens(e[2])}}autolink(r){if(r=this.rules.inline.autolink.exec(r)){let e,t;return t="@"===r[2]?"mailto:"+(e=r[1]):e=r[1],{type:"link",raw:r[0],text:e,href:t,tokens:[{type:"text",raw:e,text:e}]}}}url(e){var r,n;if(r=this.rules.inline.url.exec(e)){let e,t;if("@"===r[2])e=r[0],t="mailto:"+e;else{for(;n=r[0],r[0]=this.rules.inline._backpedal.exec(r[0])?.[0]??"",n!==r[0];);e=r[0],t="www."===r[1]?"http://"+r[0]:r[0]}return{type:"link",raw:r[0],text:e,href:t,tokens:[{type:"text",raw:e,text:e}]}}}inlineText(e){var t;if(e=this.rules.inline.text.exec(e))return t=this.lexer.state.inRawBlock,{type:"text",raw:e[0],text:e[0],escaped:t}}},_L=class r{static{mt(this,"l")}tokens;options;state;tokenizer;inlineQueue;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||Z9,this.options.tokenizer=this.options.tokenizer||new CL,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,(this.tokenizer.lexer=this).inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0},e={other:J9,block:wL.normal,inline:kL.normal},this.options.pedantic?(e.block=wL.pedantic,e.inline=kL.pedantic):this.options.gfm&&(e.block=wL.gfm,this.options.breaks?e.inline=kL.breaks:e.inline=kL.gfm),this.tokenizer.rules=e}static get rules(){return{block:wL,inline:kL}}static lex(e,t){return new r(t).lex(e)}static lexInline(e,t){return new r(t).inlineTokens(e)}lex(e){e=e.replace(J9.carriageReturn,` +`),this.blockTokens(e,this.tokens);for(let e=0;e<this.inlineQueue.length;e++){var t=this.inlineQueue[e];this.inlineTokens(t.src,t.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(i,r=[],n=!1){for(this.options.pedantic&&(i=i.replace(J9.tabCharGlobal," ").replace(J9.spaceLine,""));i;){let t;if(!this.options.extensions?.block?.some(e=>!!(t=e.call({lexer:this},i,r))&&(i=i.substring(t.raw.length),r.push(t),!0)))if(t=this.tokenizer.space(i)){i=i.substring(t.raw.length);var e=r.at(-1);1===t.raw.length&&void 0!==e?e.raw+=` +`:r.push(t)}else if(t=this.tokenizer.code(i))i=i.substring(t.raw.length),"paragraph"===(e=r.at(-1))?.type||"text"===e?.type?(e.raw+=(e.raw.endsWith(` +`)?"":` +`)+t.raw,e.text+=` +`+t.text,this.inlineQueue.at(-1).src=e.text):r.push(t);else if(t=this.tokenizer.fences(i))i=i.substring(t.raw.length),r.push(t);else if(t=this.tokenizer.heading(i))i=i.substring(t.raw.length),r.push(t);else if(t=this.tokenizer.hr(i))i=i.substring(t.raw.length),r.push(t);else if(t=this.tokenizer.blockquote(i))i=i.substring(t.raw.length),r.push(t);else if(t=this.tokenizer.list(i))i=i.substring(t.raw.length),r.push(t);else if(t=this.tokenizer.html(i))i=i.substring(t.raw.length),r.push(t);else if(t=this.tokenizer.def(i)){i=i.substring(t.raw.length);var a=r.at(-1);"paragraph"===a?.type||"text"===a?.type?(a.raw+=(a.raw.endsWith(` +`)?"":` +`)+t.raw,a.text+=` +`+t.raw,this.inlineQueue.at(-1).src=a.text):this.tokens.links[t.tag]||(this.tokens.links[t.tag]={href:t.href,title:t.title},r.push(t))}else if(t=this.tokenizer.table(i))i=i.substring(t.raw.length),r.push(t);else if(t=this.tokenizer.lheading(i))i=i.substring(t.raw.length),r.push(t);else{let e=i;if(this.options.extensions?.startBlock){let t=1/0,r=i.slice(1),n;this.options.extensions.startBlock.forEach(e=>{"number"==typeof(n=e.call({lexer:this},r))&&0<=n&&(t=Math.min(t,n))}),t<1/0&&0<=t&&(e=i.substring(0,t+1))}if(this.state.top&&(t=this.tokenizer.paragraph(e)))a=r.at(-1),n&&"paragraph"===a?.type?(a.raw+=(a.raw.endsWith(` +`)?"":` +`)+t.raw,a.text+=` +`+t.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=a.text):r.push(t),n=e.length!==i.length,i=i.substring(t.raw.length);else if(t=this.tokenizer.text(i)){i=i.substring(t.raw.length);var s=r.at(-1);"text"===s?.type?(s.raw+=(s.raw.endsWith(` +`)?"":` +`)+t.raw,s.text+=` +`+t.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=s.text):r.push(t)}else if(i){if(s="Infinite loop on byte: "+i.charCodeAt(0),this.options.silent){console.error(s);break}throw new Error(s)}}}return this.state.top=!0,r}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(i,r=[]){let e=i,t=null;if(this.tokens.links){var n=Object.keys(this.tokens.links);if(0<n.length)for(;null!=(t=this.tokenizer.rules.inline.reflinkSearch.exec(e));)n.includes(t[0].slice(t[0].lastIndexOf("[")+1,-1))&&(e=e.slice(0,t.index)+"["+"a".repeat(t[0].length-2)+"]"+e.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(t=this.tokenizer.rules.inline.anyPunctuation.exec(e));)e=e.slice(0,t.index)+"++"+e.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;null!=(t=this.tokenizer.rules.inline.blockSkip.exec(e));)e=e.slice(0,t.index)+"["+"a".repeat(t[0].length-2)+"]"+e.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);e=this.options.hooks?.emStrongMask?.call({lexer:this},e)??e;let a=!1,s="";for(;i;){a||(s=""),a=!1;let t;if(!this.options.extensions?.inline?.some(e=>!!(t=e.call({lexer:this},i,r))&&(i=i.substring(t.raw.length),r.push(t),!0)))if(t=this.tokenizer.escape(i))i=i.substring(t.raw.length),r.push(t);else if(t=this.tokenizer.tag(i))i=i.substring(t.raw.length),r.push(t);else if(t=this.tokenizer.link(i))i=i.substring(t.raw.length),r.push(t);else if(t=this.tokenizer.reflink(i,this.tokens.links)){i=i.substring(t.raw.length);var o=r.at(-1);"text"===t.type&&"text"===o?.type?(o.raw+=t.raw,o.text+=t.text):r.push(t)}else if(t=this.tokenizer.emStrong(i,e,s))i=i.substring(t.raw.length),r.push(t);else if(t=this.tokenizer.codespan(i))i=i.substring(t.raw.length),r.push(t);else if(t=this.tokenizer.br(i))i=i.substring(t.raw.length),r.push(t);else if(t=this.tokenizer.del(i))i=i.substring(t.raw.length),r.push(t);else if(t=this.tokenizer.autolink(i))i=i.substring(t.raw.length),r.push(t);else if(!this.state.inLink&&(t=this.tokenizer.url(i)))i=i.substring(t.raw.length),r.push(t);else{let e=i;if(this.options.extensions?.startInline){let t=1/0,r=i.slice(1),n;this.options.extensions.startInline.forEach(e=>{"number"==typeof(n=e.call({lexer:this},r))&&0<=n&&(t=Math.min(t,n))}),t<1/0&&0<=t&&(e=i.substring(0,t+1))}if(t=this.tokenizer.inlineText(e))i=i.substring(t.raw.length),"_"!==t.raw.slice(-1)&&(s=t.raw.slice(-1)),a=!0,"text"===(o=r.at(-1))?.type?(o.raw+=t.raw,o.text+=t.text):r.push(t);else if(i){var l="Infinite loop on byte: "+i.charCodeAt(0);if(this.options.silent){console.error(l);break}throw new Error(l)}}}return r}},SL=class{static{mt(this,"P")}options;parser;constructor(e){this.options=e||Z9}space(e){return""}code({text:e,lang:t,escaped:r}){return t=(t||"").match(J9.notSpaceStart)?.[0],e=e.replace(J9.endingNewline,"")+` +`,t?'<pre><code class="language-'+q9(t)+'">'+(r?e:q9(e,!0))+`</code></pre> +`:"<pre><code>"+(r?e:q9(e,!0))+`</code></pre> +`}blockquote({tokens:e}){return`<blockquote> +${this.parser.parse(e)}</blockquote> +`}html({text:e}){return e}def(e){return""}heading({tokens:e,depth:t}){return`<h${t}>${this.parser.parseInline(e)}</h${t}> +`}hr(e){return`<hr> +`}list(t){let e=t.ordered,r=t.start,n="";for(let e=0;e<t.items.length;e++){var i=t.items[e];n+=this.listitem(i)}var a=e?"ol":"ul";return"<"+a+(e&&1!==r?' start="'+r+'"':"")+`> +`+n+"</"+a+`> +`}listitem(e){let t="",r;return e.task&&(r=this.checkbox({checked:!!e.checked}),e.loose?"paragraph"===e.tokens[0]?.type?(e.tokens[0].text=r+" "+e.tokens[0].text,e.tokens[0].tokens&&0<e.tokens[0].tokens.length&&"text"===e.tokens[0].tokens[0].type&&(e.tokens[0].tokens[0].text=r+" "+q9(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+" "),`<li>${t+=this.parser.parse(e.tokens,!!e.loose)}</li> +`}checkbox({checked:e}){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:e}){return`<p>${this.parser.parseInline(e)}</p> +`}table(t){let e="",r="";for(let e=0;e<t.header.length;e++)r+=this.tablecell(t.header[e]);e+=this.tablerow({text:r});let n="";for(let e=0;e<t.rows.length;e++){var i=t.rows[e];r="";for(let e=0;e<i.length;e++)r+=this.tablecell(i[e]);n+=this.tablerow({text:r})}return`<table> +<thead> +`+e+`</thead> +`+(n=n&&`<tbody>${n}</tbody>`)+`</table> +`}tablerow({text:e}){return`<tr> +${e}</tr> +`}tablecell(e){var t=this.parser.parseInline(e.tokens),r=e.header?"th":"td";return(e.align?`<${r} align="${e.align}">`:`<${r}>`)+t+`</${r}> +`}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${q9(e,!0)}</code>`}br(e){return"<br>"}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:t,tokens:r}){var r=this.parser.parseInline(r),n=j9(e);if(null===n)return r;let i='<a href="'+(e=n)+'"';return t&&(i+=' title="'+q9(t)+'"'),i+=">"+r+"</a>"}image({href:e,title:t,text:r,tokens:n}){if(n&&(r=this.parser.parseInline(n,this.parser.textRenderer)),null===(n=j9(e)))return q9(r);let i=`<img src="${e=n}" alt="${r}"`;return t&&(i+=` title="${q9(t)}"`),i+=">"}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:q9(e.text)}},AL=class{static{mt(this,"$")}strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return""+e}image({text:e}){return""+e}br(){return""}},LL=class n{static{mt(this,"l")}options;renderer;textRenderer;constructor(e){this.options=e||Z9,this.options.renderer=this.options.renderer||new SL,this.renderer=this.options.renderer,this.renderer.options=this.options,(this.renderer.parser=this).textRenderer=new AL}static parse(e,t){return new n(t).parse(e)}static parseInline(e,t){return new n(t).parseInline(e)}parse(n,i=!0){let a="";for(let r=0;r<n.length;r++){var e=n[r];if(this.options.extensions?.renderers?.[e.type]){var t=e,s=this.options.extensions.renderers[t.type].call({parser:this},t);if(!1!==s||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(t.type)){a+=s||"";continue}}var o=e;switch(o.type){case"space":a+=this.renderer.space(o);continue;case"hr":a+=this.renderer.hr(o);continue;case"heading":a+=this.renderer.heading(o);continue;case"code":a+=this.renderer.code(o);continue;case"table":a+=this.renderer.table(o);continue;case"blockquote":a+=this.renderer.blockquote(o);continue;case"list":a+=this.renderer.list(o);continue;case"html":a+=this.renderer.html(o);continue;case"def":a+=this.renderer.def(o);continue;case"paragraph":a+=this.renderer.paragraph(o);continue;case"text":{let e=o,t=this.renderer.text(e);for(;r+1<n.length&&"text"===n[r+1].type;)e=n[++r],t+=` +`+this.renderer.text(e);a+=i?this.renderer.paragraph({type:"paragraph",raw:t,text:t,tokens:[{type:"text",raw:t,text:t,escaped:!0}]}):t;continue}default:var l='Token with "'+o.type+'" type was not found.';if(this.options.silent)return console.error(l),"";throw new Error(l)}}return a}parseInline(t,r=this.renderer){let n="";for(let e=0;e<t.length;e++){var i=t[e];if(this.options.extensions?.renderers?.[i.type]){var a=this.options.extensions.renderers[i.type].call({parser:this},i);if(!1!==a||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(i.type)){n+=a||"";continue}}var s=i;switch(s.type){case"escape":n+=r.text(s);break;case"html":n+=r.html(s);break;case"link":n+=r.link(s);break;case"image":n+=r.image(s);break;case"strong":n+=r.strong(s);break;case"em":n+=r.em(s);break;case"codespan":n+=r.codespan(s);break;case"br":n+=r.br(s);break;case"del":n+=r.del(s);break;case"text":n+=r.text(s);break;default:var o='Token with "'+s.type+'" type was not found.';if(this.options.silent)return console.error(o),"";throw new Error(o)}}return n}},NL=class{static{mt(this,"S")}options;block;constructor(e){this.options=e||Z9}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens","emStrongMask"]);static passThroughHooksRespectAsync=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}emStrongMask(e){return e}provideLexer(){return this.block?_L.lex:_L.lexInline}provideParser(){return this.block?LL.parse:LL.parseInline}},IL=class{static{mt(this,"B")}defaults=z9();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=LL;Renderer=SL;TextRenderer=AL;Lexer=_L;Tokenizer=CL;Hooks=NL;constructor(...e){this.use(...e)}walkTokens(e,r){let n=[];for(var i of e)switch(n=n.concat(r.call(this,i)),i.type){case"table":var t,a,s=i;for(t of s.header)n=n.concat(this.walkTokens(t.tokens,r));for(a of s.rows)for(var o of a)n=n.concat(this.walkTokens(o.tokens,r));break;case"list":s=i,n=n.concat(this.walkTokens(s.items,r));break;default:{let t=i;this.defaults.extensions?.childTokens?.[t.type]?this.defaults.extensions.childTokens[t.type].forEach(e=>{e=t[e].flat(1/0),n=n.concat(this.walkTokens(e,r))}):t.tokens&&(n=n.concat(this.walkTokens(t.tokens,r)))}}return n}use(...e){let i=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(a=>{var e={...a};if(e.async=this.defaults.async||e.async||!1,a.extensions&&(a.extensions.forEach(n=>{if(!n.name)throw new Error("extension name required");if("renderer"in n){let r=i.renderers[n.name];r?i.renderers[n.name]=function(...e){var t=n.renderer.apply(this,e);return!1===t?r.apply(this,e):t}:i.renderers[n.name]=n.renderer}if("tokenizer"in n){if(!n.level||"block"!==n.level&&"inline"!==n.level)throw new Error("extension level must be 'block' or 'inline'");var e=i[n.level];e?e.unshift(n.tokenizer):i[n.level]=[n.tokenizer],n.start&&("block"===n.level?i.startBlock?i.startBlock.push(n.start):i.startBlock=[n.start]:"inline"===n.level&&(i.startInline?i.startInline.push(n.start):i.startInline=[n.start]))}"childTokens"in n&&n.childTokens&&(i.childTokens[n.name]=n.childTokens)}),e.extensions=i),a.renderer){let i=this.defaults.renderer||new SL(this.defaults);for(var t in a.renderer){if(!(t in i))throw new Error(`renderer '${t}' does not exist`);if(!["options","parser"].includes(t)){let e=t,r=a.renderer[e],n=i[e];i[e]=(...e)=>{var t=r.apply(i,e);return(!1===t?n.apply(i,e):t)||""}}}e.renderer=i}if(a.tokenizer){let i=this.defaults.tokenizer||new CL(this.defaults);for(var s in a.tokenizer){if(!(s in i))throw new Error(`tokenizer '${s}' does not exist`);if(!["options","rules","lexer"].includes(s)){let e=s,r=a.tokenizer[e],n=i[e];i[e]=(...e)=>{var t=r.apply(i,e);return!1===t?n.apply(i,e):t}}}e.tokenizer=i}if(a.hooks){let i=this.defaults.hooks||new NL;for(let t in a.hooks){if(!(t in i))throw new Error(`hook '${t}' does not exist`);if(!["options","block"].includes(t)){let e=t,r=a.hooks[e],n=i[e];NL.passThroughHooks.has(t)?i[e]=e=>this.defaults.async&&NL.passThroughHooksRespectAsync.has(t)?Promise.resolve(r.call(i,e)).then(e=>n.call(i,e)):(e=r.call(i,e),n.call(i,e)):i[e]=(...e)=>{var t=r.apply(i,e);return!1===t?n.apply(i,e):t}}}e.hooks=i}if(a.walkTokens){let r=this.defaults.walkTokens,n=a.walkTokens;e.walkTokens=function(e){let t=[];return t.push(n.call(this,e)),t=r?t.concat(r.call(this,e)):t}}this.defaults={...this.defaults,...e}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return _L.lex(e,t??this.defaults)}parser(e,t){return LL.parse(e,t??this.defaults)}parseMarkdown(o){return(r,e)=>{let t={...e},n={...this.defaults,...t},i=this.onError(!!n.silent,!!n.async);if(!0===this.defaults.async&&!1===t.async)return i(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("u"<typeof r||null===r)return i(new Error("marked(): input parameter is undefined or null"));if("string"!=typeof r)return i(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(r)+", string expected"));n.hooks&&((n.hooks.options=n).hooks.block=o);let a=n.hooks?n.hooks.provideLexer():o?_L.lex:_L.lexInline,s=n.hooks?n.hooks.provideParser():o?LL.parse:LL.parseInline;if(n.async)return Promise.resolve(n.hooks?n.hooks.preprocess(r):r).then(e=>a(e,n)).then(e=>n.hooks?n.hooks.processAllTokens(e):e).then(e=>n.walkTokens?Promise.all(this.walkTokens(e,n.walkTokens)).then(()=>e):e).then(e=>s(e,n)).then(e=>n.hooks?n.hooks.postprocess(e):e).catch(i);try{n.hooks&&(r=n.hooks.preprocess(r));let e=a(r,n),t=(n.hooks&&(e=n.hooks.processAllTokens(e)),n.walkTokens&&this.walkTokens(e,n.walkTokens),s(e,n));return n.hooks?n.hooks.postprocess(t):t}catch(e){return i(e)}}}onError(r,n){return e=>{var t;if(e.message+=` +Please report this to https://github.com/markedjs/marked.`,r)return t="<p>An error occurred:</p><pre>"+q9(e.message+"",!0)+"</pre>",n?Promise.resolve(t):t;if(n)return Promise.reject(e);throw e}}},RL=new IL,mt(K9,"d"),K9.options=K9.setOptions=function(e){return RL.setOptions(e),G9(K9.defaults=RL.defaults),K9},K9.getDefaults=z9,K9.defaults=Z9,K9.use=function(...e){return RL.use(...e),G9(K9.defaults=RL.defaults),K9},K9.walkTokens=function(e,t){return RL.walkTokens(e,t)},K9.parseInline=RL.parseInline,K9.Parser=LL,K9.parser=LL.parse,K9.Renderer=SL,K9.TextRenderer=AL,K9.Lexer=_L,K9.lexer=_L.lex,K9.Tokenizer=CL,K9.Hooks=NL,K9.parse=K9,_L.lex});function DL(e,{markdownAutoWrap:t}){return e=Bc(e.replace(/<br\/>/g,` +`).replace(/\n{2,}/g,` +`)),!1===t?e.replace(/ /g," "):e}function OL(e,t={}){let r=DL(e,t),n=K9.lexer(r),i=[[]],a=0;function s(t,r="normal"){"text"===t.type?t.text.split(` +`).forEach((e,t)=>{0!==t&&(a++,i.push([])),e.split(" ").forEach(e=>{(e=e.replace(/'/g,"'"))&&i[a].push({content:e,type:r})})}):"strong"===t.type||"em"===t.type?t.tokens.forEach(e=>{s(e,t.type)}):"html"===t.type&&i[a].push({content:t.text,type:"normal"})}return mt(s,"processNode"),n.forEach(e=>{"paragraph"===e.type?e.tokens?.forEach(e=>{s(e)}):"html"===e.type?i[a].push({content:e.text,type:"normal"}):i[a].push({content:e.raw,type:"normal"})}),i}function PL(e,{markdownAutoWrap:t}={}){function r(e){return"text"===e.type?!1===t?e.text.replace(/\n */g,"<br/>").replace(/ /g," "):e.text.replace(/\n */g,"<br/>"):"strong"===e.type?`<strong>${e.tokens?.map(r).join("")}</strong>`:"em"===e.type?`<em>${e.tokens?.map(r).join("")}</em>`:"paragraph"===e.type?`<p>${e.tokens?.map(r).join("")}</p>`:"space"===e.type?"":"html"===e.type?""+e.text:"escape"===e.type?e.text:(D.warn("Unsupported markdown: "+e.type),e.raw)}return e=K9.lexer(e),mt(r,"output"),e.map(r).join("")}var BL=b(()=>{ML(),nh(),e(),mt(DL,"preprocessMarkdown"),mt(OL,"markdownToLines"),mt(PL,"markdownToHTML")});function $L(e){return Intl.Segmenter?[...(new Intl.Segmenter).segment(e)].map(e=>e.segment):[...e]}function FL(e,t){return zL(e,[],$L(t.content),t.type)}function zL(e,t,r,n){var i,a,s;return 0===r.length?[{content:t.join(""),type:n},{content:"",type:n}]:([i,...a]=r,e([{content:(s=[...t,i]).join(""),type:n}])?zL(e,s,a,n):(0===t.length&&i&&(t.push(i),r.shift()),[{content:t.join(""),type:n},{content:r.join(""),type:n}]))}function GL(e,t){if(e.some(({content:e})=>e.includes(` +`)))throw new Error("splitLineToFitWidth does not support newlines in the line");return UL(e,t)}function UL(e,t,r=[],n=[]){if(0===e.length)return 0<n.length&&r.push(n),0<r.length?r:[];let i="";" "===e[0].content&&(i=" ",e.shift());var a=e.shift()??{content:" ",type:"normal"},s=[...n];return""!==i&&s.push({content:i,type:"normal"}),s.push(a),t(s)?UL(e,t,r,s):(0<n.length?(r.push(n),e.unshift(a)):a.content&&([s,n]=FL(t,a),r.push([s]),n.content)&&e.unshift(n),UL(e,t,r))}var qL=b(()=>{mt($L,"splitTextToChars"),mt(FL,"splitWordToFitWidth"),mt(zL,"splitWordToFitWidthRecursion"),mt(GL,"splitLineToFitWidth"),mt(UL,"splitLineToFitWidthRecursion")});function jL(e,t){t&&e.attr("style",t)}async function YL(e,t,r,n,i=!1,a=ar()){(e=e.append("foreignObject")).attr("width",10*r+"px"),e.attr("height",10*r+"px");var s=e.append("xhtml:div"),a=Ec(t.label)?await Sc(t.label.replace(L.lineBreakRegex,` +`),a):lc(t.label,a),o=t.isNode?"nodeLabel":"edgeLabel",l=s.append("span");return l.html(a),jL(l,t.labelStyle),l.attr("class",o+" "+n),jL(s,t.labelStyle),s.style("display","table-cell"),s.style("white-space","nowrap"),s.style("line-height","1.5"),s.style("max-width",r+"px"),s.style("text-align","center"),s.attr("xmlns","http://www.w3.org/1999/xhtml"),i&&s.attr("class","labelBkg"),(a=s.node().getBoundingClientRect()).width===r&&(s.style("display","table"),s.style("white-space","break-spaces"),s.style("width",r+"px"),a=s.node().getBoundingClientRect()),e.node()}function WL(e,t,r){return e.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",t*r-.1+"em").attr("dy",r+"em")}function HL(e,t,r){return KL(t=WL(e=e.append("text"),1,t),r),r=t.node().getComputedTextLength(),e.remove(),r}function VL(e,t,r){return KL(t=WL(e=e.append("text"),1,t),[{content:r,type:"normal"}]),(r=t.node()?.getBoundingClientRect())&&e.remove(),r}function XL(t,e,r,n=!1){let i=e.append("g"),a=i.insert("rect").attr("class","background").attr("style","stroke: none"),s=i.append("text").attr("y","-10.1"),o=0;for(var l of r){var c,h=mt(e=>HL(i,1.1,e)<=t,"checkWidth");for(c of h(l)?[l]:GL(l,h))KL(WL(s,o,1.1),c),o++}return(n?(e=s.node().getBBox(),a.attr("x",e.x-2).attr("y",e.y-2).attr("width",e.width+4).attr("height",e.height+4),i):s).node()}function KL(n,e){n.text(""),e.forEach((e,t)=>{var r=n.append("tspan").attr("font-style","em"===e.type?"italic":"normal").attr("class","text-inner-tspan").attr("font-weight","strong"===e.type?"bold":"normal");0===t?r.text(e.content):r.text(" "+e.content)})}async function ZL(e,i={}){let a=[],t=(e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(t,r,n)=>(a.push((async()=>{var e=r+":"+n;return await Mc(e)?await Dc(e,void 0,{class:"label-icon"}):`<i class='${lc(t,i).replace(":"," ")}'></i>`})()),t)),await Promise.all(a));return e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>t.shift()??"")}var QL,JL=b(()=>{i6(),Oc(),e(),BL(),i_(),Pc(),qL(),rn(),mt(jL,"applyStyle"),mt(YL,"addHtmlSpan"),mt(WL,"createTspan"),mt(HL,"computeWidthOfText"),mt(VL,"computeDimensionOfText"),mt(XL,"createFormattedText"),mt(KL,"updateTextContentAndStyles"),mt(ZL,"replaceIconSubstring"),QL=mt(async(e,t="",{style:r="",isTitle:n=!1,classes:i="",useHtmlLabels:a=!0,isNode:s=!0,width:o=200,addSvgBackground:l=!1}={},c)=>(D.debug("XYZ createText",t,r,n,i,a,s,"addSvgBackground: ",l),a?(n=PL(t,c),a=await ZL(r_(n),c),n=t.replace(/\\\\/g,"\\"),YL(e,{isNode:s,label:Ec(t)?n:a,labelStyle:r.replace("fill:","color:")},o,i,l,c)):(n=XL(o,e,OL(t.replace(/<br\s*\/?>/g,"<br/>").replace("<br>","<br/>"),c),!!t&&l),s?(a=(r=/stroke:/.exec(r)?r.replace("stroke:","lineColor:"):r).replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:"),H(n).attr("style",a)):(i=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:"),H(n).select("rect").attr("style",i.replace(/background:/g,"fill:")),o=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:"),H(n).select("text").attr("style",o)),n)),"createText")});function eN(e){return(e=e.map((e,t)=>(0===t?"M":"L")+e.x+","+e.y)).push("Z"),e.join(" ")}function tN(t,e,r,n,i,a){var s=[],o=r-t,l=2*Math.PI/(o/a),c=e+(n-e)/2;for(let e=0;e<=50;e++){var h=t+e/50*o,u=c+i*Math.sin(l*(h-t));s.push({x:h,y:u})}return s}function rN(t,r,n,i,e,a){var s=[],o=e*Math.PI/180,l=(a*Math.PI/180-o)/(i-1);for(let e=0;e<i;e++){var c=o+e*l,h=t+n*Math.cos(c),c=r+n*Math.sin(c);s.push({x:-h,y:-c})}return s}var nN,iN,aN,sN,i=b(()=>{JL(),Tu(),i6(),en(),Oc(),i_(),nN=mt(async(e,t,r)=>{let n,i=t.useHtmlLabels||fc(O()?.htmlLabels),a=(n=r||"node default",e.insert("g").attr("class",n).attr("id",t.domId||t.id)),s=a.insert("g").attr("class","label").attr("style",SC(t.labelStyle)),o,l=(o=void 0===t.label?"":"string"==typeof t.label?t.label:t.label[0],await QL(s,lc(r_(o),O()),{useHtmlLabels:i,width:t.width||O().flowchart?.wrappingWidth,cssClasses:"markdown-node-label",style:t.labelStyle,addSvgBackground:!!t.icon||!!t.img})),c=l.getBBox(),h=(t?.padding??0)/2;if(i){var r=l.children[0],e=H(l),u=r.getElementsByTagName("img");if(u){let n=""===o.replace(/<img[^>]*>/g,"").trim();await Promise.all([...u].map(r=>new Promise(t=>{function e(){var e;r.style.display="flex",r.style.flexDirection="column",n?(e=(O().fontSize?O():window.getComputedStyle(document.body)).fontSize,[e=Yt.fontSize]=JC(e),r.style.minWidth=e=5*e+"px",r.style.maxWidth=e):r.style.width="100%",t(r)}mt(e,"setupImage"),setTimeout(()=>{r.complete&&e()}),r.addEventListener("error",e),r.addEventListener("load",e)})))}c=r.getBoundingClientRect(),e.attr("width",c.width),e.attr("height",c.height)}return i?s.attr("transform","translate("+-c.width/2+", "+-c.height/2+")"):s.attr("transform","translate(0, "+-c.height/2+")"),t.centerLabel&&s.attr("transform","translate("+-c.width/2+", "+-c.height/2+")"),s.insert("rect",":first-child"),{shapeSvg:a,bbox:c,halfPadding:h,label:s}},"labelHelper"),iN=mt(async(e,t,r)=>{let n=r.useHtmlLabels||fc(O()?.flowchart?.htmlLabels),i=e.insert("g").attr("class","label").attr("style",r.labelStyle||""),a=await QL(i,lc(r_(t),O()),{useHtmlLabels:n,width:r.width||O()?.flowchart?.wrappingWidth,style:r.labelStyle,addSvgBackground:!!r.icon||!!r.img}),s=a.getBBox(),o=r.padding/2,l;return fc(O()?.flowchart?.htmlLabels)&&(t=a.children[0],l=H(a),s=t.getBoundingClientRect(),l.attr("width",s.width),l.attr("height",s.height)),n?i.attr("transform","translate("+-s.width/2+", "+-s.height/2+")"):i.attr("transform","translate(0, "+-s.height/2+")"),r.centerLabel&&i.attr("transform","translate("+-s.width/2+", "+-s.height/2+")"),i.insert("rect",":first-child"),{shapeSvg:e,bbox:s,halfPadding:o,label:i}},"insertLabel"),aN=mt((e,t)=>{t=t.node().getBBox(),e.width=t.width,e.height=t.height},"updateNodeBounds"),sN=mt((e,t)=>("handDrawn"===e.look?"rough-node":"node")+" "+e.cssClasses+" "+(t||""),"getNodeClasses"),mt(eN,"createPathFromPoints"),mt(tN,"generateFullSineWavePoints"),mt(rN,"generateCirclePoints")});function oN(e,t){return e.intersect(t)}var lN,cN=b(()=>{mt(oN,"intersectNode"),lN=oN});function hN(e,t,r,n){var i=e.x,e=e.y,a=i-n.x,s=e-n.y,o=Math.sqrt(t*t*s*s+r*r*a*a),a=Math.abs(t*r*a/o),t=(n.x<i&&(a=-a),Math.abs(t*r*s/o));return{x:i+a,y:e+(t=n.y<e?-t:t)}}var uN,dN=b(()=>{mt(hN,"intersectEllipse"),uN=hN});function pN(e,t,r){return uN(e,t,t,r)}var gN,fN=b(()=>{dN(),mt(pN,"intersectCircle"),gN=pN});function mN(e,t,r,n){var i=t.y-e.y,a=e.x-t.x,s=t.x*e.y-e.x*t.y,o=i*r.x+a*r.y+s,l=i*n.x+a*n.y+s;if(!(0!=o&&0!=l&&0<o*l||(n=(o=n.y-r.y)*e.x+(l=r.x-n.x)*e.y+(r=n.x*r.y-r.x*n.y),e=o*t.x+l*t.y+r,Math.abs(n)<1e-6&&Math.abs(e)<1e-6&&0<n*e)||0==(t=i*l-o*a)))return n=Math.abs(t/2),{x:(e=a*r-l*s)<0?(e-n)/t:(e+n)/t,y:(e=o*s-i*r)<0?(e-n)/t:(e+n)/t}}function yN(e,t){return 0<e*t}var vN,xN=b(()=>{mt(mN,"intersectLine"),mt(yN,"sameSign"),vN=mN});function bN(t,r,n){let e=t.x,i=t.y,a=[],s=Number.POSITIVE_INFINITY,o=Number.POSITIVE_INFINITY;"function"==typeof r.forEach?r.forEach(function(e){s=Math.min(s,e.x),o=Math.min(o,e.y)}):(s=Math.min(s,r.x),o=Math.min(o,r.y));var l=e-t.width/2-s,c=i-t.height/2-o;for(let e=0;e<r.length;e++){var h=r[e],u=r[e<r.length-1?e+1:0];(h=vN(t,n,{x:l+h.x,y:c+h.y},{x:l+u.x,y:c+u.y}))&&a.push(h)}return a.length?(1<a.length&&a.sort(function(e,t){var r=e.x-n.x,e=e.y-n.y,r=Math.sqrt(r*r+e*e),e=t.x-n.x,t=t.y-n.y;return r<(e=Math.sqrt(e*e+t*t))?-1:r===e?0:1}),a[0]):t}var wN,kN,TN,V,EN,CN,_N,SN,Q,AN,LN,NN=b(()=>{xN(),mt(bN,"intersectPolygon"),wN=bN}),IN=b(()=>{kN=mt((e,t)=>{var r,n=e.x,i=e.y,a=t.x-n,t=t.y-i,s=e.width/2,e=e.height/2,e=Math.abs(t)*s>Math.abs(a)*e?(t<0&&(e=-e),r=0==t?0:e*a/t,e):(r=s=a<0?-s:s,0==a?0:s*t/a);return{x:n+r,y:i+e}},"intersectRect"),TN=kN}),RN=b(()=>{cN(),fN(),dN(),NN(),IN(),V={node:lN,circle:gN,ellipse:uN,polygon:wN,rect:TN}}),MN=b(()=>{Tu(),EN=mt(e=>({fill:e,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:e,seed:O().handDrawnSeed}),"solidStateFill"),CN=mt(e=>({stylesMap:e=_N([...e.cssCompiledStyles||[],...e.cssStyles||[],...e.labelStyle||[]]),stylesArray:[...e]}),"compileStyles"),_N=mt(e=>{let r=new Map;return e.forEach(e=>{var[e,t]=e.split(":");r.set(e.trim(),t?.trim())}),r},"styles2Map"),SN=mt(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"===e,"isLabelStyle"),Q=mt(e=>{let t=CN(e).stylesArray,r=[],n=[],i=[],a=[];return t.forEach(e=>{var t=e[0];SN(t)?r.push(e.join(":")+" !important"):(n.push(e.join(":")+" !important"),t.includes("stroke")&&i.push(e.join(":")+" !important"),"fill"===t&&a.push(e.join(":")+" !important"))}),{labelStyles:r.join(";"),nodeStyles:n.join(";"),stylesArray:t,borderStyles:i,backgroundStyles:a}},"styles2String"),AN=mt((e,t)=>{var{themeVariables:r,handDrawnSeed:n}=O(),{nodeBorder:r,mainBkg:i}=r,e=CN(e).stylesMap;return Object.assign({roughness:.7,fill:e.get("fill")||i,fillStyle:"hachure",fillWeight:4,hachureGap:5.2,stroke:e.get("stroke")||r,seed:n,strokeWidth:e.get("stroke-width")?.replace("px","")||1.3,fillLineDash:[0,0],strokeLineDash:LN(e.get("stroke-dasharray"))},t)},"userNodeOverrides"),LN=mt(e=>{var t;return e?1===(e=e.trim().split(/\s+/).map(Number)).length?[t=isNaN(e[0])?0:e[0],t]:[isNaN(e[0])?0:e[0],isNaN(e[1])?0:e[1]]:[0,0]},"getStrokeDashArray")});function DN(e,t,r){if(e&&e.length){var n,[i,a]=t,t=Math.PI/180*r,s=Math.cos(t),o=Math.sin(t);for(n of e){var[l,c]=n;n[0]=(l-i)*s-(c-a)*o+i,n[1]=(l-i)*o+(c-a)*s+a}}}function ON(e,t){return e[0]===t[0]&&e[1]===t[1]}function PN(e,r,n,t=1){var i=n,n=Math.max(r,.1),p=e[0]&&e[0][0]&&"number"==typeof e[0][0]?[e]:e,a=[0,0];if(i)for(var s of p)DN(s,a,i);if(r=((t,i)=>{var e,r=[];for(e of p){var n=[...e];ON(n[0],n[n.length-1])||n.push([n[0][0],n[0][1]]),2<n.length&&r.push(n)}var a,s=[],o=(t=Math.max(t,.1),[]);for(a of r)for(let e=0;e<a.length-1;e++){var l,c=a[e],h=a[e+1];c[1]!==h[1]&&(l=Math.min(c[1],h[1]),o.push({ymin:l,ymax:Math.max(c[1],h[1]),x:(l===c[1]?c:h)[0],islope:(h[0]-c[0])/(h[1]-c[1])}))}if(o.sort((e,t)=>e.ymin<t.ymin?-1:e.ymin>t.ymin?1:e.x<t.x?-1:e.x>t.x?1:e.ymax===t.ymax?0:(e.ymax-t.ymax)/Math.abs(e.ymax-t.ymax)),o.length){let r=[],n=o[0].ymin,e=0;for(;r.length||o.length;){if(o.length){let t=-1;for(let e=0;e<o.length&&!(o[e].ymin>n);e++)t=e;o.splice(0,t+1).forEach(e=>{r.push({s:n,edge:e})})}if((r=r.filter(e=>!(e.edge.ymax<=n))).sort((e,t)=>e.edge.x===t.edge.x?0:(e.edge.x-t.edge.x)/Math.abs(e.edge.x-t.edge.x)),(1!==i||e%t==0)&&1<r.length)for(let e=0;e<r.length&&!((d=e+1)>=r.length);e+=2){var u=r[e].edge,d=r[d].edge;s.push([[Math.round(u.x),n],[Math.round(d.x),n]])}n+=i,r.forEach(e=>{e.edge.x=e.edge.x+i*e.edge.islope}),e++}}return s})(n,t),i){for(var o of p)DN(o,a,-i);{e=a,n=-i;let t=[];r.forEach(e=>t.push(...e)),DN(t,e,n)}}return r}function BN(e,t){let r,n=t.hachureAngle+90,i=t.hachureGap,a=(i<0&&(i=4*t.strokeWidth),i=Math.round(Math.max(i,.1)),1);return 1<=t.roughness&&.7<((null==(r=t.randomizer)?void 0:r.next())||Math.random())&&(a=i),PN(e,i,n,a||1)}function $N(e){var t=e[0],e=e[1];return Math.sqrt(Math.pow(t[0]-e[0],2)+Math.pow(t[1]-e[1],2))}function FN(e,t){return e.type===t}function zN(e){let n=[],i=(e=>{for(var t=new Array;""!==e;){if(!e.match(/^([ \t\r\n,]+)/))if(e.match(/^([aAcChHlLmMqQsStTvVzZ])/))t[t.length]={type:LI,text:RegExp.$1};else{if(!e.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];t[t.length]={type:NI,text:""+parseFloat(RegExp.$1)}}e=e.substr(RegExp.$1.length)}return t[t.length]={type:II,text:""},t})(e),a="BOD",s=0,o=i[s];for(;!FN(o,II);){let t=0,r=[];if("BOD"===a){if("M"!==o.text&&"m"!==o.text)return zN("M0,0"+e);s++,t=RI[o.text],a=o.text}else FN(o,NI)?t=RI[a]:(s++,t=RI[o.text],a=o.text);if(!(s+t<i.length))throw new Error("Path data ended short");for(let e=s;e<s+t;e++){var l=i[e];if(!FN(l,NI))throw new Error("Param not a number: "+a+","+l.text);r[r.length]=+l.text}if("number"!=typeof RI[a])throw new Error("Bad segment: "+a);var c={key:a,data:r};n.push(c),s+=t,o=i[s],"m"===(a="M"===a?"L":a)&&(a="l")}return n}function GN(e){let r=0,n=0,t=0,i=0,a=[];for(var{key:s,data:o}of e)switch(s){case"M":a.push({key:"M",data:[...o]}),[r,n]=o,[t,i]=o;break;case"m":r+=o[0],n+=o[1],a.push({key:"M",data:[r,n]}),t=r,i=n;break;case"L":a.push({key:"L",data:[...o]}),[r,n]=o;break;case"l":r+=o[0],n+=o[1],a.push({key:"L",data:[r,n]});break;case"C":a.push({key:"C",data:[...o]}),r=o[4],n=o[5];break;case"c":var l=o.map((e,t)=>t%2?e+n:e+r);a.push({key:"C",data:l}),r=l[4],n=l[5];break;case"Q":a.push({key:"Q",data:[...o]}),r=o[2],n=o[3];break;case"q":l=o.map((e,t)=>t%2?e+n:e+r),a.push({key:"Q",data:l}),r=l[2],n=l[3];break;case"A":a.push({key:"A",data:[...o]}),r=o[5],n=o[6];break;case"a":r+=o[5],n+=o[6],a.push({key:"A",data:[o[0],o[1],o[2],o[3],o[4],r,n]});break;case"H":a.push({key:"H",data:[...o]}),r=o[0];break;case"h":r+=o[0],a.push({key:"H",data:[r]});break;case"V":a.push({key:"V",data:[...o]}),n=o[0];break;case"v":n+=o[0],a.push({key:"V",data:[n]});break;case"S":a.push({key:"S",data:[...o]}),r=o[2],n=o[3];break;case"s":var c=o.map((e,t)=>t%2?e+n:e+r);a.push({key:"S",data:c}),r=c[2],n=c[3];break;case"T":a.push({key:"T",data:[...o]}),r=o[0],n=o[1];break;case"t":r+=o[0],n+=o[1],a.push({key:"T",data:[r,n]});break;case"Z":case"z":a.push({key:"Z",data:[]}),r=t,n=i}return a}function UN(e){let i=[],a="",s=0,o=0,t=0,r=0,l=0,c=0;for(var{key:n,data:h}of e){switch(n){case"M":i.push({key:"M",data:[...h]}),[s,o]=h,[t,r]=h;break;case"C":i.push({key:"C",data:[...h]}),s=h[4],o=h[5],l=h[2],c=h[3];break;case"L":i.push({key:"L",data:[...h]}),[s,o]=h;break;case"H":s=h[0],i.push({key:"L",data:[s,o]});break;case"V":o=h[0],i.push({key:"L",data:[s,o]});break;case"S":{let e=0,t;t="C"===a||"S"===a?(e=s+(s-l),o+(o-c)):(e=s,o),i.push({key:"C",data:[e,t,...h]}),l=h[0],c=h[1],s=h[2],o=h[3];break}case"T":{let[e,t]=h,r=0,n;n="Q"===a||"T"===a?(r=s+(s-l),o+(o-c)):(r=s,o);var u=s+2*(r-s)/3,d=o+2*(n-o)/3,p=e+2*(r-e)/3,g=t+2*(n-t)/3;i.push({key:"C",data:[u,d,p,g,e,t]}),l=r,c=n,s=e,o=t;break}case"Q":var[u,d,p,g]=h,f=s+2*(u-s)/3,m=o+2*(d-o)/3;i.push({key:"C",data:[f,m,p+2*(u-p)/3,g+2*(d-g)/3,p,g]}),l=u,c=d,s=p,o=g;break;case"A":var f=Math.abs(h[0]),m=Math.abs(h[1]),y=h[2],v=h[3],x=h[4],b=h[5],w=h[6];0===f||0===m?(i.push({key:"C",data:[s,o,b,w,b,w]}),s=b,o=w):s===b&&o===w||(jN(s,o,b,w,f,m,y,v,x).forEach(function(e){i.push({key:"C",data:e})}),s=b,o=w);break;case"Z":i.push({key:"Z",data:[]}),s=t,o=r}a=n}return i}function qN(e,t,r){return[e*Math.cos(r)-t*Math.sin(r),e*Math.sin(r)+t*Math.cos(r)]}function jN(e,t,r,n,i,a,s,o,l,c){let h=Math.PI*s/180,u=[],d=0,p=0,g=0,f=0;c?[d,p,g,f]=c:([e,t]=qN(e,t,-h),[r,n]=qN(r,n,-h),1<(m=(y=(e-r)/2)*y/(i*i)+(v=(t-n)/2)*v/(a*a))&&(i*=m=Math.sqrt(m),a*=m),m=i*i,x=a*a,o=(o===l?-1:1)*Math.sqrt(Math.abs((m*x-m*v*v-x*y*y)/(m*v*v+x*y*y))),g=o*i*v/a+(e+r)/2,f=o*-a*y/i+(t+n)/2,d=Math.asin(parseFloat(((t-f)/a).toFixed(9))),p=Math.asin(parseFloat(((n-f)/a).toFixed(9))),e<g&&(d=Math.PI-d),r<g&&(p=Math.PI-p),d<0&&(d=2*Math.PI+d),p<0&&(p=2*Math.PI+p),l&&d>p&&(d-=2*Math.PI),!l&&p>d&&(p-=2*Math.PI));var m=p-d,y=(Math.abs(m)>120*Math.PI/180&&(x=p,v=r,o=n,p=l&&p>d?d+120*Math.PI/180*1:d+120*Math.PI/180*-1,u=jN(r=g+i*Math.cos(p),n=f+a*Math.sin(p),v,o,i,a,s,0,l,[p,x,g,f])),m=p-d,Math.cos(d)),v=Math.sin(d),o=Math.cos(p),s=Math.sin(p),x=4/3*i*(l=Math.tan(m/4)),i=[e,t],a=[e+x*v,t-(m=4/3*a*l)*y],l=[r+x*s,n-m*o],e=[r,n];if(a[0]=2*i[0]-a[0],a[1]=2*i[1]-a[1],c)return[a,l,e].concat(u);u=[a,l,e].concat(u);var b=[];for(let e=0;e<u.length;e+=3){var w=qN(u[e][0],u[e][1],h),k=qN(u[e+1][0],u[e+1][1],h),T=qN(u[e+2][0],u[e+2][1],h);b.push([w[0],w[1],k[0],k[1],T[0],T[1]])}return b}function YN(e,t,r,n,i){return{type:"path",ops:aI(e,t,r,n,i)}}function WN(t,e,r){var n=(t||[]).length;if(2<n){var i=[];for(let e=0;e<n-1;e++)i.push(...aI(t[e][0],t[e][1],t[e+1][0],t[e+1][1],r));return e&&i.push(...aI(t[n-1][0],t[n-1][1],t[0][0],t[0][1],r)),{type:"path",ops:i}}return 2===n?YN(t[0][0],t[0][1],t[1][0],t[1][1],r):{type:"path",ops:[]}}function HN(e,t,r,n,i){return WN([[e,t],[e+r,t],[e+r,t+n],[e,t+n]],!0,i)}function VN(e,t){if(e.length){var r="number"==typeof e[0][0]?[e]:e,n=oI(r[0],1+.2*t.roughness,t),i=t.disableMultiStroke?[]:oI(r[0],1.5*(1+.22*t.roughness),tI(t));for(let e=1;e<r.length;e++)if((l=r[e]).length){var a,s,o=oI(l,1+.2*t.roughness,t),l=t.disableMultiStroke?[]:oI(l,1.5*(1+.22*t.roughness),tI(t));for(a of o)"move"!==a.op&&n.push(a);for(s of l)"move"!==s.op&&i.push(s)}return{type:"path",ops:n.concat(i)}}return{type:"path",ops:[]}}function XN(e,t,r){var n=Math.sqrt(2*Math.PI*Math.sqrt((Math.pow(e/2,2)+Math.pow(t/2,2))/2)),n=Math.ceil(Math.max(r.curveStepCount,r.curveStepCount/Math.sqrt(200)*n)),n=2*Math.PI/n,e=Math.abs(e/2),t=Math.abs(t/2),i=1-r.curveFitting;return{increment:n,rx:e+=iI(e*i,r),ry:t+=iI(t*i,r)}}function KN(e,t,r,n){let[i,a]=cI(n.increment,e,t,n.rx,n.ry,1,n.increment*nI(.1,nI(.4,1,r),r),r),s=lI(i,null,r);return r.disableMultiStroke||0===r.roughness||([e]=cI(n.increment,e,t,n.rx,n.ry,1.5,0,r),t=lI(e,null,r),s=s.concat(t)),{estimatedPoints:a,opset:{type:"path",ops:s}}}function ZN(e,t,r,n,i,a,s,o,l){r=Math.abs(r/2),n=Math.abs(n/2),r+=iI(.01*r,l),n+=iI(.01*n,l);let c=i,h=a;for(;c<0;)c+=2*Math.PI,h+=2*Math.PI;return h-c>2*Math.PI&&(c=0,h=2*Math.PI),i=2*Math.PI/l.curveStepCount,i=hI(a=Math.min(i/2,(h-c)/2),e,t,r,n,c,h,1,l),l.disableMultiStroke||(a=hI(a,e,t,r,n,c,h,1.5,l),i.push(...a)),s&&(o?i.push(...aI(e,t,e+r*Math.cos(c),t+n*Math.sin(c),l),...aI(e,t,e+r*Math.cos(h),t+n*Math.sin(h),l)):i.push({op:"lineTo",data:[e,t]},{op:"lineTo",data:[e+r*Math.cos(c),t+n*Math.sin(c)]})),{type:"path",ops:i}}function QN(e,t){let r=UN(GN(zN(e))),n=[],i=[0,0],a=[0,0];for(var{key:s,data:o}of r)switch(s){case"M":a=[o[0],o[1]],i=[o[0],o[1]];break;case"L":n.push(...aI(a[0],a[1],o[0],o[1],t)),a=[o[0],o[1]];break;case"C":var[l,c,h,u,d,p]=o;n.push(...uI(l,c,h,u,d,p,a,t)),a=[d,p];break;case"Z":n.push(...aI(a[0],a[1],i[0],i[1],t)),a=[i[0],i[1]]}return{type:"path",ops:n}}function JN(e,t){var r,n=[];for(r of e)if(r.length){var i=t.maxRandomnessOffset||0,a=r.length;if(2<a){n.push({op:"move",data:[r[0][0]+iI(i,t),r[0][1]+iI(i,t)]});for(let e=1;e<a;e++)n.push({op:"lineTo",data:[r[e][0]+iI(i,t),r[e][1]+iI(i,t)]})}}return{type:"fillPath",ops:n}}function eI(e,r){return(e=>{let t=r.fillStyle||"hachure";if(!SI[t])switch(t){case"zigzag":SI[t]||(SI[t]=new kI(e));break;case"cross-hatch":SI[t]||(SI[t]=new TI(e));break;case"dots":SI[t]||(SI[t]=new EI(e));break;case"dashed":SI[t]||(SI[t]=new CI(e));break;case"zigzag-line":SI[t]||(SI[t]=new _I(e));break;default:t="hachure",SI[t]||(SI[t]=new wI(e))}return SI[t]})(MI).fillPolygons(e,r)}function tI(e){var t=Object.assign({},e);return t.randomizer=void 0,e.seed&&(t.seed=e.seed+1),t}function rI(e){return e.randomizer||(e.randomizer=new AI(e.seed||0)),e.randomizer.next()}function nI(e,t,r,n=1){return r.roughness*n*(rI(r)*(t-e)+e)}function iI(e,t,r=1){return nI(-e,e,t,r)}function aI(e,t,r,n,i,a=!1){var a=a?i.disableMultiStrokeFill:i.disableMultiStroke,s=sI(e,t,r,n,i,!0,!1);return a?s:(a=sI(e,t,r,n,i,!0,!0),s.concat(a))}function sI(e,t,r,n,i,a,s){let o=Math.pow(e-r,2)+Math.pow(t-n,2),l=Math.sqrt(o),c,h=(c=l<200?1:500<l?.4:-.0016668*l+1.233334,i.maxRandomnessOffset||0),u=(h=h*h*100>o?l/10:h)/2,d=.2+.2*rI(i),p=i.bowing*i.maxRandomnessOffset*(n-t)/200,g=i.bowing*i.maxRandomnessOffset*(e-r)/200;p=iI(p,i,c),g=iI(g,i,c);var f=[],m=mt(()=>iI(u,i,c),"M"),y=mt(()=>iI(h,i,c),"k"),v=i.preserveVertices;return a&&f.push(s?{op:"move",data:[e+(v?0:m()),t+(v?0:m())]}:{op:"move",data:[e+(v?0:iI(h,i,c)),t+(v?0:iI(h,i,c))]}),f.push(s?{op:"bcurveTo",data:[p+e+(r-e)*d+m(),g+t+(n-t)*d+m(),p+e+2*(r-e)*d+m(),g+t+2*(n-t)*d+m(),r+(v?0:m()),n+(v?0:m())]}:{op:"bcurveTo",data:[p+e+(r-e)*d+y(),g+t+(n-t)*d+y(),p+e+2*(r-e)*d+y(),g+t+2*(n-t)*d+y(),r+(v?0:y()),n+(v?0:y())]}),f}function oI(t,r,n){if(!t.length)return[];var i=[];i.push([t[0][0]+iI(r,n),t[0][1]+iI(r,n)]),i.push([t[0][0]+iI(r,n),t[0][1]+iI(r,n)]);for(let e=1;e<t.length;e++)i.push([t[e][0]+iI(r,n),t[e][1]+iI(r,n)]),e===t.length-1&&i.push([t[e][0]+iI(r,n),t[e][1]+iI(r,n)]);return lI(i,null,n)}function lI(t,e,r){var n=t.length,i=[];if(3<n){var a,s=[],o=1-r.curveTightness;i.push({op:"move",data:[t[1][0],t[1][1]]});for(let e=1;e+2<n;e++){var l=t[e];s[0]=[l[0],l[1]],s[1]=[l[0]+(o*t[e+1][0]-o*t[e-1][0])/6,l[1]+(o*t[e+1][1]-o*t[e-1][1])/6],s[2]=[t[e+1][0]+(o*t[e][0]-o*t[e+2][0])/6,t[e+1][1]+(o*t[e][1]-o*t[e+2][1])/6],s[3]=[t[e+1][0],t[e+1][1]],i.push({op:"bcurveTo",data:[s[1][0],s[1][1],s[2][0],s[2][1],s[3][0],s[3][1]]})}e&&2===e.length&&(a=r.maxRandomnessOffset,i.push({op:"lineTo",data:[e[0]+iI(a,r),e[1]+iI(a,r)]}))}else 3===n?(i.push({op:"move",data:[t[1][0],t[1][1]]}),i.push({op:"bcurveTo",data:[t[1][0],t[1][1],t[2][0],t[2][1],t[2][0],t[2][1]]})):2===n&&i.push(...sI(t[0][0],t[0][1],t[1][0],t[1][1],r,!0,!0));return i}function cI(t,r,n,i,a,s,e,o){var l=[],c=[];if(0===o.roughness){t/=4,c.push([r+i*Math.cos(-t),n+a*Math.sin(-t)]);for(let e=0;e<=2*Math.PI;e+=t){var h=[r+i*Math.cos(e),n+a*Math.sin(e)];l.push(h),c.push(h)}c.push([r+i*Math.cos(0),n+a*Math.sin(0)]),c.push([r+i*Math.cos(t),n+a*Math.sin(t)])}else{var u=iI(.5,o)-Math.PI/2,d=(c.push([iI(s,o)+r+.9*i*Math.cos(u-t),iI(s,o)+n+.9*a*Math.sin(u-t)]),2*Math.PI+u-.01);for(let e=u;e<d;e+=t){var p=[iI(s,o)+r+i*Math.cos(e),iI(s,o)+n+a*Math.sin(e)];l.push(p),c.push(p)}c.push([iI(s,o)+r+i*Math.cos(u+2*Math.PI+.5*e),iI(s,o)+n+a*Math.sin(u+2*Math.PI+.5*e)]),c.push([iI(s,o)+r+.98*i*Math.cos(u+e),iI(s,o)+n+.98*a*Math.sin(u+e)]),c.push([iI(s,o)+r+.9*i*Math.cos(u+.5*e),iI(s,o)+n+.9*a*Math.sin(u+.5*e)])}return[c,l]}function hI(t,r,n,i,a,s,o,l,c){var s=s+iI(.1,c),h=[];h.push([iI(l,c)+r+.9*i*Math.cos(s-t),iI(l,c)+n+.9*a*Math.sin(s-t)]);for(let e=s;e<=o;e+=t)h.push([iI(l,c)+r+i*Math.cos(e),iI(l,c)+n+a*Math.sin(e)]);return h.push([r+i*Math.cos(o),n+a*Math.sin(o)]),h.push([r+i*Math.cos(o),n+a*Math.sin(o)]),lI(h,null,c)}function uI(t,r,n,i,a,s,o,l){var c,h=[],u=[l.maxRandomnessOffset||1,(l.maxRandomnessOffset||1)+.3],d=l.disableMultiStroke?1:2,p=l.preserveVertices;for(let e=0;e<d;e++)0===e?h.push({op:"move",data:[o[0],o[1]]}):h.push({op:"move",data:[o[0]+(p?0:iI(u[0],l)),o[1]+(p?0:iI(u[0],l))]}),c=p?[a,s]:[a+iI(u[e],l),s+iI(u[e],l)],h.push({op:"bcurveTo",data:[t+iI(u[e],l),r+iI(u[e],l),n+iI(u[e],l),i+iI(u[e],l),c[0],c[1]]});return h}function dI(e){return[...e]}function pI(t,e=0){var r=t.length;if(r<3)throw new Error("A curve must have at least three points.");var n=[];if(3===r)n.push(dI(t[0]),dI(t[1]),dI(t[2]),dI(t[2]));else{var i=[];i.push(t[0],t[0]);for(let e=1;e<t.length;e++)i.push(t[e]),e===t.length-1&&i.push(t[e]);var a=[],s=1-e;n.push(dI(i[0]));for(let e=1;e+2<i.length;e++){var o=i[e];a[0]=[o[0],o[1]],a[1]=[o[0]+(s*i[e+1][0]-s*i[e-1][0])/6,o[1]+(s*i[e+1][1]-s*i[e-1][1])/6],a[2]=[i[e+1][0]+(s*i[e][0]-s*i[e+2][0])/6,i[e+1][1]+(s*i[e][1]-s*i[e+2][1])/6],a[3]=[i[e+1][0],i[e+1][1]],n.push(a[1],a[2],a[3])}}return n}function gI(e,t){return Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2)}function fI(e,t,r){var n=gI(t,r);return 0===n?gI(e,t):(n=((e[0]-t[0])*(r[0]-t[0])+(e[1]-t[1])*(r[1]-t[1]))/n,gI(e,mI(t,r,Math.max(0,Math.min(1,n)))))}function mI(e,t,r){return[e[0]+(t[0]-e[0])*r,e[1]+(t[1]-e[1])*r]}function yI(l,c,e,t){var r,n,i,a,s,o,t=t||[];return(()=>{let e=l[c+0],t=l[c+1],r=l[c+2],n=l[c+3],i=3*t[0]-2*e[0]-n[0],a=(i*=i,3*t[1]-2*e[1]-n[1]);a*=a;var s=3*r[0]-2*n[0]-e[0],o=(s*=s,3*r[1]-2*n[1]-e[1]);return o*=o,i<s&&(i=s),a<o&&(a=o),i+a})()<e?(r=l[c+0],(!t.length||(o=t[t.length-1],1<Math.sqrt(gI(o,r))))&&t.push(r),t.push(l[c+3])):(n=mI(o=l[c+0],r=l[c+1],.5),s=mI(r,r=l[c+2],.5),i=mI(r,r=l[c+3],.5),a=mI(n,s,.5),s=mI(s,i,.5),yI([o,n,a,o=mI(a,s,.5)],0,e,t),yI([o,s,i,r],0,e,t)),t}function vI(e,t){return xI(e,0,e.length,t)}function xI(t,r,n,e,i){let a=i||[],s=t[r],o=t[n-1],l=0,c=1;for(let e=r+1;e<n-1;++e){var h=fI(t[e],s,o);h>l&&(l=h,c=e)}return Math.sqrt(l)>e?(xI(t,r,c+1,e,a),xI(t,c,n,e,a)):(a.length||a.push(s),a.push(o)),a}function bI(t,r=.15,e){var n=[],i=(t.length-1)/3;for(let e=0;e<i;e++)yI(t,3*e,r,n);return e&&0<e?xI(n,0,n.length,e):n}var wI,kI,TI,EI,CI,_I,SI,AI,LI,NI,II,RI,MI,DI,OI,PI,BI,$I,FI,zI=b(()=>{mt(DN,"t"),mt(ON,"e"),mt(PN,"s"),mt(BN,"n"),wI=class{static{mt(this,"o")}constructor(e){this.helper=e}fillPolygons(e,t){return this._fillPolygons(e,t)}_fillPolygons(e,t){return e=BN(e,t),{type:"fillSketch",ops:this.renderLines(e,t)}}renderLines(e,t){var r,n=[];for(r of e)n.push(...this.helper.doubleLineOps(r[0][0],r[0][1],r[1][0],r[1][1],t));return n}},mt($N,"a"),kI=class extends wI{static{mt(this,"h")}fillPolygons(e,t){let r=t.hachureGap;r<0&&(r=4*t.strokeWidth),r=Math.max(r,.1);var n,i,e=BN(e,Object.assign({},t,{hachureGap:r})),a=Math.PI/180*t.hachureAngle,s=[],o=.5*r*Math.cos(a),l=.5*r*Math.sin(a);for([n,i]of e)$N([n,i])&&s.push([[n[0]-o,n[1]+l],[...i]],[[n[0]+o,n[1]-l],[...i]]);return{type:"fillSketch",ops:this.renderLines(s,t)}}},TI=class extends wI{static{mt(this,"r")}fillPolygons(e,t){var r=this._fillPolygons(e,t),t=Object.assign({},t,{hachureAngle:t.hachureAngle+90}),e=this._fillPolygons(e,t);return r.ops=r.ops.concat(e.ops),r}},EI=class{static{mt(this,"i")}constructor(e){this.helper=e}fillPolygons(e,t){return e=BN(e,t=Object.assign({},t,{hachureAngle:0})),this.dotsOnLines(e,t)}dotsOnLines(e,t){let r=[],n=t.hachureGap,i=(n<0&&(n=4*t.strokeWidth),n=Math.max(n,.1),t.fillWeight);i<0&&(i=t.strokeWidth/2);var a,s=n/4;for(a of e){var o=$N(a),l=o/n,c=Math.ceil(l)-1,h=o-c*n,u=(a[0][0]+a[1][0])/2-n/4,d=Math.min(a[0][1],a[1][1]);for(let e=0;e<c;e++){var p=d+h+e*n,g=u-s+2*Math.random()*s,p=p-s+2*Math.random()*s,g=this.helper.ellipse(g,p,i,i,t);r.push(...g.ops)}}return{type:"fillSketch",ops:r}}},CI=class{static{mt(this,"c")}constructor(e){this.helper=e}fillPolygons(e,t){return e=BN(e,t),{type:"fillSketch",ops:this.dashedLine(e,t)}}dashedLine(e,c){let h=c.dashOffset<0?c.hachureGap<0?4*c.strokeWidth:c.hachureGap:c.dashOffset,u=c.dashGap<0?c.hachureGap<0?4*c.strokeWidth:c.hachureGap:c.dashGap,d=[];return e.forEach(e=>{let t=$N(e),r=Math.floor(t/(h+u)),n=(t+u-r*(h+u))/2,i=e[0],a=e[1];i[0]>a[0]&&(i=e[1],a=e[0]);var s=Math.atan((a[1]-i[1])/(a[0]-i[0]));for(let e=0;e<r;e++){var o=(l=e*(h+u))+h,l=[i[0]+l*Math.cos(s)+n*Math.cos(s),i[1]+l*Math.sin(s)+n*Math.sin(s)],o=[i[0]+o*Math.cos(s)+n*Math.cos(s),i[1]+o*Math.sin(s)+n*Math.sin(s)];d.push(...this.helper.doubleLineOps(l[0],l[1],o[0],o[1],c))}}),d}},_I=class{static{mt(this,"l")}constructor(e){this.helper=e}fillPolygons(e,t){var r=t.hachureGap<0?4*t.strokeWidth:t.hachureGap,n=t.zigzagOffset<0?r:t.zigzagOffset,e=BN(e,t=Object.assign({},t,{hachureGap:r+n}));return{type:"fillSketch",ops:this.zigzagLines(e,n,t)}}zigzagLines(e,c,h){let u=[];return e.forEach(e=>{let t=$N(e),r=Math.round(t/(2*c)),n=e[0],i=e[1];n[0]>i[0]&&(n=e[1],i=e[0]);var a=Math.atan((i[1]-n[1])/(i[0]-n[0]));for(let e=0;e<r;e++){var s=2*e*c,o=2*(e+1)*c,l=Math.sqrt(2*Math.pow(c,2)),s=[n[0]+s*Math.cos(a),n[1]+s*Math.sin(a)],o=[n[0]+o*Math.cos(a),n[1]+o*Math.sin(a)],l=[s[0]+l*Math.cos(a+Math.PI/4),s[1]+l*Math.sin(a+Math.PI/4)];u.push(...this.helper.doubleLineOps(s[0],s[1],l[0],l[1],h),...this.helper.doubleLineOps(l[0],l[1],o[0],o[1],h))}}),u}},SI={},AI=class{static{mt(this,"p")}constructor(e){this.seed=e}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}},RI={A:7,a:7,C:6,c:6,H:NI=1,h:1,L:II=2,l:2,M:2,m:2,Q:4,q:4,S:4,s:4,T:2,t:2,V:1,v:1,Z:LI=0,z:0},mt(FN,"k"),mt(zN,"b"),mt(GN,"y"),mt(UN,"m"),mt(qN,"w"),mt(jN,"x"),MI={randOffset:mt(function(e,t){return iI(e,t)},"randOffset"),randOffsetWithRange:mt(function(e,t,r){return nI(e,t,r)},"randOffsetWithRange"),ellipse:mt(function(e,t,r,n,i){return KN(e,t,i,XN(r,n,i)).opset},"ellipse"),doubleLineOps:mt(function(e,t,r,n,i){return aI(e,t,r,n,i,!0)},"doubleLineOps")},mt(YN,"v"),mt(WN,"S"),mt(HN,"O"),mt(VN,"L"),mt(XN,"T"),mt(KN,"D"),mt(ZN,"A"),mt(QN,"_"),mt(JN,"I"),mt(eI,"C"),mt(tI,"z"),mt(rI,"W"),mt(nI,"E"),mt(iI,"G"),mt(aI,"$"),mt(sI,"R"),mt(oI,"j"),mt(lI,"q"),mt(cI,"F"),mt(hI,"V"),mt(uI,"Z"),mt(dI,"Q"),mt(pI,"H"),mt(gI,"N"),mt(fI,"B"),mt(mI,"J"),mt(yI,"K"),mt(vI,"U"),mt(xI,"X"),mt(bI,"Y"),DI="none",OI=class{static{mt(this,"et")}constructor(e){this.defaultOptions={maxRandomnessOffset:2,roughness:1,bowing:1,stroke:"#000",strokeWidth:1,curveTightness:0,curveFitting:.95,curveStepCount:9,fillStyle:"hachure",fillWeight:-1,hachureAngle:-41,hachureGap:-1,dashOffset:-1,dashGap:-1,zigzagOffset:-1,seed:0,disableMultiStroke:!1,disableMultiStrokeFill:!1,preserveVertices:!1,fillShapeRoughnessGain:.8},this.config=e||{},this.config.options&&(this.defaultOptions=this._o(this.config.options))}static newSeed(){return Math.floor(Math.random()*2**31)}_o(e){return e?Object.assign({},this.defaultOptions,e):this.defaultOptions}_d(e,t,r){return{shape:e,sets:t||[],options:r||this.defaultOptions}}line(e,t,r,n,i){return i=this._o(i),this._d("line",[YN(e,t,r,n,i)],i)}rectangle(e,t,r,n,i){var a=[],s=HN(e,t,r,n,i=this._o(i));return i.fill&&(r=[[e,t],[e+r,t],[e+r,t+n],[e,t+n]],"solid"===i.fillStyle?a.push(JN([r],i)):a.push(eI([r],i))),i.stroke!==DI&&a.push(s),this._d("rectangle",a,i)}ellipse(e,t,r,n,i){var a=[],n=KN(e,t,i=this._o(i),r=XN(r,n,i));return i.fill&&("solid"===i.fillStyle?((e=KN(e,t,i,r).opset).type="fillPath",a.push(e)):a.push(eI([n.estimatedPoints],i))),i.stroke!==DI&&a.push(n.opset),this._d("ellipse",a,i)}circle(e,t,r,n){return(e=this.ellipse(e,t,r,r,n)).shape="circle",e}linearPath(e,t){return t=this._o(t),this._d("linearPath",[WN(e,!1,t)],t)}arc(d,p,g,e,t,r,n=!1,i){var i=this._o(i),a=[],s=ZN(d,p,g,e,t,r,n,!0,i);return n&&i.fill&&("solid"===i.fillStyle?(n=Object.assign({},i),(n=ZN(d,p,g,e,t,r,n.disableMultiStroke=!0,!1,n)).type="fillPath",a.push(n)):a.push(((e,t,r,n)=>{var i=d,a=p,s=Math.abs(g/2),o=Math.abs(e/2);s+=iI(.01*s,n),o+=iI(.01*o,n);let l=t,c=r;for(;l<0;)l+=2*Math.PI,c+=2*Math.PI;c-l>2*Math.PI&&(l=0,c=2*Math.PI);var h=(c-l)/n.curveStepCount,u=[];for(let e=l;e<=c;e+=h)u.push([i+s*Math.cos(e),a+o*Math.sin(e)]);return u.push([i+s*Math.cos(c),a+o*Math.sin(c)]),u.push([i,a]),eI([u],n)})(e,t,r,i))),i.stroke!==DI&&a.push(s),this._d("arc",a,i)}curve(e,t){var r=this._o(t),t=[],n=VN(e,r);if(r.fill&&r.fill!==DI)if("solid"===r.fillStyle){var i=VN(e,Object.assign(Object.assign({},r),{disableMultiStroke:!0,roughness:r.roughness?r.roughness+r.fillShapeRoughnessGain:0}));t.push({type:"fillPath",ops:this._mergedShape(i.ops)})}else{var a,s=[];if((i=e).length)for(a of"number"==typeof i[0][0]?[i]:i)a.length<3?s.push(...a):3===a.length?s.push(...bI(pI([a[0],a[0],a[1],a[2]]),10,(1+r.roughness)/2)):s.push(...bI(pI(a),10,(1+r.roughness)/2));s.length&&t.push(eI([s],r))}return r.stroke!==DI&&t.push(n),this._d("curve",t,r)}polygon(e,t){var r=[],n=WN(e,!0,t=this._o(t));return t.fill&&("solid"===t.fillStyle?r.push(JN([e],t)):r.push(eI([e],t))),t.stroke!==DI&&r.push(n),this._d("polygon",r,t)}path(e,t){let r=this._o(t),n=[];var i,a,s,o;return e&&(e=(e||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," "),t=r.fill&&"transparent"!==r.fill&&r.fill!==DI,i=r.stroke!==DI,s=((e,t)=>{let r=UN(GN(zN(e))),n=[],i=[],a=[0,0],s=[],o=mt(()=>{4<=s.length&&i.push(...bI(s,1)),s=[]},"i"),l=mt(()=>{o(),i.length&&(n.push(i),i=[])},"c");for(var{key:c,data:h}of r)switch(c){case"M":l(),a=[h[0],h[1]],i.push(a);break;case"L":o(),i.push([h[0],h[1]]);break;case"C":var u;s.length||(u=i.length?i[i.length-1]:a,s.push([u[0],u[1]])),s.push([h[0],h[1]]),s.push([h[2],h[3]]),s.push([h[4],h[5]]);break;case"Z":o(),i.push([a[0],a[1]])}if(l(),!t)return n;var d,p=[];for(d of n){var g=vI(d,t);g.length&&p.push(g)}return p})(e,(a=!!(r.simplification&&r.simplification<1))?4-4*(r.simplification||1):(1+r.roughness)/2),o=QN(e,r),t&&("solid"===r.fillStyle?1===s.length?(t=QN(e,Object.assign(Object.assign({},r),{disableMultiStroke:!0,roughness:r.roughness?r.roughness+r.fillShapeRoughnessGain:0})),n.push({type:"fillPath",ops:this._mergedShape(t.ops)})):n.push(JN(s,r)):n.push(eI(s,r))),i)&&(a?s.forEach(e=>{n.push(WN(e,!1,r))}):n.push(o)),this._d("path",n,r)}opsToPath(e,t){let r="";for(var n of e.ops){var i="number"==typeof t&&0<=t?n.data.map(e=>+e.toFixed(t)):n.data;switch(n.op){case"move":r+=`M${i[0]} ${i[1]} `;break;case"bcurveTo":r+=`C${i[0]} ${i[1]}, ${i[2]} ${i[3]}, ${i[4]} ${i[5]} `;break;case"lineTo":r+=`L${i[0]} ${i[1]} `}}return r.trim()}toPaths(e){var t,r=e.sets||[],n=e.options||this.defaultOptions,i=[];for(t of r){let e=null;switch(t.type){case"path":e={d:this.opsToPath(t),stroke:n.stroke,strokeWidth:n.strokeWidth,fill:DI};break;case"fillPath":e={d:this.opsToPath(t),stroke:DI,strokeWidth:0,fill:n.fill||DI};break;case"fillSketch":e=this.fillSketch(t,n)}e&&i.push(e)}return i}fillSketch(e,t){let r=t.fillWeight;return r<0&&(r=t.strokeWidth/2),{d:this.opsToPath(e),stroke:t.fill||DI,strokeWidth:r,fill:DI}}_mergedShape(e){return e.filter((e,t)=>0===t||"move"!==e.op)}},PI=class{static{mt(this,"st")}constructor(e,t){this.canvas=e,this.ctx=this.canvas.getContext("2d"),this.gen=new OI(t)}draw(e){var t,r=e.sets||[],n=e.options||this.getDefaultOptions(),i=this.ctx,a=e.options.fixedDecimalPlaceDigits;for(t of r)switch(t.type){case"path":i.save(),i.strokeStyle="none"===n.stroke?"transparent":n.stroke,i.lineWidth=n.strokeWidth,n.strokeLineDash&&i.setLineDash(n.strokeLineDash),n.strokeLineDashOffset&&(i.lineDashOffset=n.strokeLineDashOffset),this._drawToContext(i,t,a),i.restore();break;case"fillPath":i.save(),i.fillStyle=n.fill||"";var s="curve"===e.shape||"polygon"===e.shape||"path"===e.shape?"evenodd":"nonzero";this._drawToContext(i,t,a,s),i.restore();break;case"fillSketch":this.fillSketch(i,t,n)}}fillSketch(e,t,r){let n=r.fillWeight;n<0&&(n=r.strokeWidth/2),e.save(),r.fillLineDash&&e.setLineDash(r.fillLineDash),r.fillLineDashOffset&&(e.lineDashOffset=r.fillLineDashOffset),e.strokeStyle=r.fill||"",e.lineWidth=n,this._drawToContext(e,t,r.fixedDecimalPlaceDigits),e.restore()}_drawToContext(e,t,r,n="nonzero"){e.beginPath();for(var i of t.ops){var a="number"==typeof r&&0<=r?i.data.map(e=>+e.toFixed(r)):i.data;switch(i.op){case"move":e.moveTo(a[0],a[1]);break;case"bcurveTo":e.bezierCurveTo(a[0],a[1],a[2],a[3],a[4],a[5]);break;case"lineTo":e.lineTo(a[0],a[1])}}"fillPath"===t.type?e.fill(n):e.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(e,t,r,n,i){return e=this.gen.line(e,t,r,n,i),this.draw(e),e}rectangle(e,t,r,n,i){return e=this.gen.rectangle(e,t,r,n,i),this.draw(e),e}ellipse(e,t,r,n,i){return e=this.gen.ellipse(e,t,r,n,i),this.draw(e),e}circle(e,t,r,n){return e=this.gen.circle(e,t,r,n),this.draw(e),e}linearPath(e,t){return e=this.gen.linearPath(e,t),this.draw(e),e}polygon(e,t){return e=this.gen.polygon(e,t),this.draw(e),e}arc(e,t,r,n,i,a,s=!1,o){return e=this.gen.arc(e,t,r,n,i,a,s,o),this.draw(e),e}curve(e,t){return e=this.gen.curve(e,t),this.draw(e),e}path(e,t){return e=this.gen.path(e,t),this.draw(e),e}},BI="http://www.w3.org/2000/svg",$I=class{static{mt(this,"ot")}constructor(e,t){this.svg=e,this.gen=new OI(t)}draw(t){var r,e=t.sets||[],n=t.options||this.getDefaultOptions(),i=this.svg.ownerDocument||window.document,a=i.createElementNS(BI,"g"),s=t.options.fixedDecimalPlaceDigits;for(r of e){let e=null;switch(r.type){case"path":(e=i.createElementNS(BI,"path")).setAttribute("d",this.opsToPath(r,s)),e.setAttribute("stroke",n.stroke),e.setAttribute("stroke-width",n.strokeWidth+""),e.setAttribute("fill","none"),n.strokeLineDash&&e.setAttribute("stroke-dasharray",n.strokeLineDash.join(" ").trim()),n.strokeLineDashOffset&&e.setAttribute("stroke-dashoffset",""+n.strokeLineDashOffset);break;case"fillPath":(e=i.createElementNS(BI,"path")).setAttribute("d",this.opsToPath(r,s)),e.setAttribute("stroke","none"),e.setAttribute("stroke-width","0"),e.setAttribute("fill",n.fill||""),"curve"!==t.shape&&"polygon"!==t.shape||e.setAttribute("fill-rule","evenodd");break;case"fillSketch":e=this.fillSketch(i,r,n)}e&&a.appendChild(e)}return a}fillSketch(e,t,r){let n=r.fillWeight;return n<0&&(n=r.strokeWidth/2),(e=e.createElementNS(BI,"path")).setAttribute("d",this.opsToPath(t,r.fixedDecimalPlaceDigits)),e.setAttribute("stroke",r.fill||""),e.setAttribute("stroke-width",n+""),e.setAttribute("fill","none"),r.fillLineDash&&e.setAttribute("stroke-dasharray",r.fillLineDash.join(" ").trim()),r.fillLineDashOffset&&e.setAttribute("stroke-dashoffset",""+r.fillLineDashOffset),e}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(e,t){return this.gen.opsToPath(e,t)}line(e,t,r,n,i){return e=this.gen.line(e,t,r,n,i),this.draw(e)}rectangle(e,t,r,n,i){return e=this.gen.rectangle(e,t,r,n,i),this.draw(e)}ellipse(e,t,r,n,i){return e=this.gen.ellipse(e,t,r,n,i),this.draw(e)}circle(e,t,r,n){return e=this.gen.circle(e,t,r,n),this.draw(e)}linearPath(e,t){return e=this.gen.linearPath(e,t),this.draw(e)}polygon(e,t){return e=this.gen.polygon(e,t),this.draw(e)}arc(e,t,r,n,i,a,s=!1,o){return e=this.gen.arc(e,t,r,n,i,a,s,o),this.draw(e)}curve(e,t){return e=this.gen.curve(e,t),this.draw(e)}path(e,t){return e=this.gen.path(e,t),this.draw(e)}},FI={canvas:mt((e,t)=>new PI(e,t),"canvas"),svg:mt((e,t)=>new $I(e,t),"svg"),generator:mt(e=>new OI(e),"generator"),newSeed:mt(()=>OI.newSeed(),"newSeed")}});function GI(e,t){var r=Q(t).labelStyles;t.labelStyle=r;let n=sN(t),i=n,a=(n||(i="anchor"),e.insert("g").attr("class",i).attr("id",t.domId||t.id)),s=t.cssStyles,o=FI.svg(a),l=AN(t,{fill:"black",stroke:"none",fillStyle:"solid"}),c=("handDrawn"!==t.look&&(l.roughness=0),o.circle(0,0,2,l)),h=a.insert(()=>c,":first-child");return h.attr("class","anchor").attr("style",SC(s)),aN(t,h),t.intersect=function(e){return D.info("Circle intersect",t,1,e),V.circle(t,1,e)},a}var UI=b(()=>{e(),i(),RN(),MN(),zI(),i_(),mt(GI,"anchor")});function qI(e,t,r,n,i,a,s){var o=(e+r)/2,l=(t+n)/2,c=Math.atan2(n-t,r-e),h=Math.sqrt(((r-e)/2/i)**2+((n-t)/2/a)**2);if(1<h)throw new Error("The given radii are too small to create an arc between the points.");let u=Math.sqrt(1-h**2),d=o+u*a*Math.sin(c)*(s?-1:1),p=l-u*i*Math.cos(c)*(s?-1:1),g=Math.atan2((t-p)/a,(e-d)/i),f=Math.atan2((n-p)/a,(r-d)/i)-g;s&&f<0&&(f+=2*Math.PI),!s&&0<f&&(f-=2*Math.PI);var m=[];for(let e=0;e<20;e++){var y=g+e/19*f,v=d+i*Math.cos(y),y=p+a*Math.sin(y);m.push({x:v,y:y})}return m}async function jI(e,t){var{labelStyles:r,nodeStyles:n}=Q(t);t.labelStyle=r;let{shapeSvg:i,bbox:a}=await nN(e,t,sN(t)),s=a.width+t.padding+20,o=a.height+t.padding,l=o/2,c=l/(2.5+o/50),h=t.cssStyles,u=[{x:s/2,y:-o/2},{x:-s/2,y:-o/2},...qI(-s/2,-o/2,-s/2,o/2,c,l,!1),{x:s/2,y:o/2},...qI(s/2,o/2,s/2,-o/2,c,l,!0)],d=FI.svg(i),p=AN(t,{}),g=("handDrawn"!==t.look&&(p.roughness=0,p.fillStyle="solid"),eN(u)),f=d.path(g,p),m=i.insert(()=>f,":first-child");return m.attr("class","basic label-container"),h&&"handDrawn"!==t.look&&m.selectAll("path").attr("style",h),n&&"handDrawn"!==t.look&&m.selectAll("path").attr("style",n),m.attr("transform",`translate(${c/2}, 0)`),aN(t,m),t.intersect=function(e){return V.polygon(t,u,e)},i}var YI=b(()=>{i(),RN(),MN(),zI(),mt(qI,"generateArcPoints"),mt(jI,"bowTieRect")});function WI(e,t,r,n){return e.insert("polygon",":first-child").attr("points",n.map(function(e){return e.x+","+e.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-t/2+","+r/2+")")}var HI=b(()=>{mt(WI,"insertPolygonShape")});async function VI(e,i){var{labelStyles:t,nodeStyles:r}=Q(i);i.labelStyle=t;let{shapeSvg:a,bbox:n}=await nN(e,i,sN(i)),s=n.height+i.padding,o=n.width+i.padding+12,l=o,c=-s,h=[{x:12,y:c},{x:l,y:c},{x:l,y:0},{x:0,y:0},{x:0,y:12+c},{x:12,y:c}],u,d=i.cssStyles;if("handDrawn"===i.look){let e=FI.svg(a),t=AN(i,{}),r=eN(h),n=e.path(r,t);u=a.insert(()=>n,":first-child").attr("transform",`translate(${-o/2}, ${s/2})`),d&&u.attr("style",d)}else u=WI(a,o,s,h);return r&&u.attr("style",r),aN(i,u),i.intersect=function(e){return V.polygon(i,h,e)},a}var XI=b(()=>{i(),RN(),MN(),zI(),HI(),i(),mt(VI,"card")});function KI(e,t){var r=Q(t).nodeStyles;t.label="";let n=e.insert("g").attr("class",sN(t)).attr("id",t.domId??t.id),i=t.cssStyles,a=Math.max(28,t.width??0),s=[{x:0,y:a/2},{x:a/2,y:0},{x:0,y:-a/2},{x:-a/2,y:0}],o=FI.svg(n),l=AN(t,{}),c=("handDrawn"!==t.look&&(l.roughness=0,l.fillStyle="solid"),eN(s)),h=o.path(c,l),u=n.insert(()=>h,":first-child");return i&&"handDrawn"!==t.look&&u.selectAll("path").attr("style",i),r&&"handDrawn"!==t.look&&u.selectAll("path").attr("style",r),t.width=28,t.height=28,t.intersect=function(e){return V.polygon(t,s,e)},n}var ZI=b(()=>{RN(),zI(),MN(),i(),mt(KI,"choice")});async function QI(e,n,t){var{labelStyles:r,nodeStyles:i}=Q(n);n.labelStyle=r;let{shapeSvg:a,bbox:s,halfPadding:o}=await nN(e,n,sN(n)),l=t?.padding??o,c=s.width/2+l,h,u=n.cssStyles;if("handDrawn"===n.look){let e=FI.svg(a),t=AN(n,{}),r=e.circle(0,0,2*c,t);(h=a.insert(()=>r,":first-child")).attr("class","basic label-container").attr("style",SC(u))}else h=a.insert("circle",":first-child").attr("class","basic label-container").attr("style",i).attr("r",c).attr("cx",0).attr("cy",0);return aN(n,h),n.calcIntersect=function(e,t){var r=e.width/2;return V.circle(e,r,t)},n.intersect=function(e){return D.info("Circle intersect",n,c,e),V.circle(n,c,e)},a}var JI=b(()=>{zI(),e(),i_(),RN(),MN(),i(),mt(QI,"circle")});function eR(e){var t=Math.cos(Math.PI/4),r=Math.sin(Math.PI/4);return`M ${-(e*=2)/2*t},${e/2*r} L ${e/2*t},${-e/2*r} + M ${e/2*t},${e/2*r} L ${-e/2*t},`+-e/2*r}function tR(e,t){var{labelStyles:r,nodeStyles:n}=Q(t);t.labelStyle=r,t.label="";let i=e.insert("g").attr("class",sN(t)).attr("id",t.domId??t.id),a=Math.max(30,t?.width??0),s=t.cssStyles,o=FI.svg(i),l=AN(t,{}),c=("handDrawn"!==t.look&&(l.roughness=0,l.fillStyle="solid"),o.circle(0,0,2*a,l)),h=eR(a),u=o.path(h,l),d=i.insert(()=>c,":first-child");return d.insert(()=>u),s&&"handDrawn"!==t.look&&d.selectAll("path").attr("style",s),n&&"handDrawn"!==t.look&&d.selectAll("path").attr("style",n),aN(t,d),t.intersect=function(e){return D.info("crossedCircle intersect",t,{radius:a,point:e}),V.circle(t,a,e)},i}var rR=b(()=>{e(),i(),MN(),zI(),RN(),mt(eR,"createLine"),mt(tR,"crossedCircle")});function nR(t,r,n,i=100,e=0,a=180){var s=[],o=e*Math.PI/180,l=(a*Math.PI/180-o)/(i-1);for(let e=0;e<i;e++){var c=o+e*l,h=t+n*Math.cos(c),c=r+n*Math.sin(c);s.push({x:-h,y:-c})}return s}async function iR(e,t){var{labelStyles:r,nodeStyles:n}=Q(t);t.labelStyle=r;let{shapeSvg:i,bbox:a,label:s}=await nN(e,t,sN(t)),o=a.width+(t.padding??0),l=a.height+(t.padding??0),c=Math.max(5,.1*l),h=t.cssStyles,u=[...nR(o/2,-l/2,c,30,-90,0),{x:-o/2-c,y:c},...nR(o/2+2*c,-c,c,20,-180,-270),...nR(o/2+2*c,c,c,20,-90,-180),{x:-o/2-c,y:-l/2},...nR(o/2,l/2,c,20,0,90)],d=[{x:o/2,y:-l/2-c},{x:-o/2,y:-l/2-c},...nR(o/2,-l/2,c,20,-90,0),{x:-o/2-c,y:-c},...nR(o/2+.1*o,-c,c,20,-180,-270),...nR(o/2+.1*o,c,c,20,-90,-180),{x:-o/2-c,y:l/2},...nR(o/2,l/2,c,20,0,90),{x:-o/2,y:l/2+c},{x:o/2,y:l/2+c}],p=FI.svg(i),g=AN(t,{fill:"none"}),f=("handDrawn"!==t.look&&(g.roughness=0,g.fillStyle="solid"),eN(u).replace("Z","")),m=p.path(f,g),y=eN(d),v=p.path(y,{...g}),x=i.insert("g",":first-child");return x.insert(()=>v,":first-child").attr("stroke-opacity",0),x.insert(()=>m,":first-child"),x.attr("class","text"),h&&"handDrawn"!==t.look&&x.selectAll("path").attr("style",h),n&&"handDrawn"!==t.look&&x.selectAll("path").attr("style",n),x.attr("transform",`translate(${c}, 0)`),s.attr("transform",`translate(${-o/2+c-(a.x-(a.left??0))},${-l/2+(t.padding??0)/2-(a.y-(a.top??0))})`),aN(t,x),t.intersect=function(e){return V.polygon(t,d,e)},i}var aR=b(()=>{i(),RN(),MN(),zI(),mt(nR,"generateCirclePoints"),mt(iR,"curlyBraceLeft")});function sR(t,r,n,i=100,e=0,a=180){var s=[],o=e*Math.PI/180,l=(a*Math.PI/180-o)/(i-1);for(let e=0;e<i;e++){var c=o+e*l,h=t+n*Math.cos(c),c=r+n*Math.sin(c);s.push({x:h,y:c})}return s}async function oR(e,t){var{labelStyles:r,nodeStyles:n}=Q(t);t.labelStyle=r;let{shapeSvg:i,bbox:a,label:s}=await nN(e,t,sN(t)),o=a.width+(t.padding??0),l=a.height+(t.padding??0),c=Math.max(5,.1*l),h=t.cssStyles,u=[...sR(o/2,-l/2,c,20,-90,0),{x:o/2+c,y:-c},...sR(o/2+2*c,-c,c,20,-180,-270),...sR(o/2+2*c,c,c,20,-90,-180),{x:o/2+c,y:l/2},...sR(o/2,l/2,c,20,0,90)],d=[{x:-o/2,y:-l/2-c},{x:o/2,y:-l/2-c},...sR(o/2,-l/2,c,20,-90,0),{x:o/2+c,y:-c},...sR(o/2+2*c,-c,c,20,-180,-270),...sR(o/2+2*c,c,c,20,-90,-180),{x:o/2+c,y:l/2},...sR(o/2,l/2,c,20,0,90),{x:o/2,y:l/2+c},{x:-o/2,y:l/2+c}],p=FI.svg(i),g=AN(t,{fill:"none"}),f=("handDrawn"!==t.look&&(g.roughness=0,g.fillStyle="solid"),eN(u).replace("Z","")),m=p.path(f,g),y=eN(d),v=p.path(y,{...g}),x=i.insert("g",":first-child");return x.insert(()=>v,":first-child").attr("stroke-opacity",0),x.insert(()=>m,":first-child"),x.attr("class","text"),h&&"handDrawn"!==t.look&&x.selectAll("path").attr("style",h),n&&"handDrawn"!==t.look&&x.selectAll("path").attr("style",n),x.attr("transform",`translate(${-c}, 0)`),s.attr("transform",`translate(${-o/2+(t.padding??0)/2-(a.x-(a.left??0))},${-l/2+(t.padding??0)/2-(a.y-(a.top??0))})`),aN(t,x),t.intersect=function(e){return V.polygon(t,d,e)},i}var lR=b(()=>{i(),RN(),MN(),zI(),mt(sR,"generateCirclePoints"),mt(oR,"curlyBraceRight")});function cR(t,r,n,i=100,e=0,a=180){var s=[],o=e*Math.PI/180,l=(a*Math.PI/180-o)/(i-1);for(let e=0;e<i;e++){var c=o+e*l,h=t+n*Math.cos(c),c=r+n*Math.sin(c);s.push({x:-h,y:-c})}return s}async function hR(e,t){var{labelStyles:r,nodeStyles:n}=Q(t);t.labelStyle=r;let{shapeSvg:i,bbox:a,label:s}=await nN(e,t,sN(t)),o=a.width+(t.padding??0),l=a.height+(t.padding??0),c=Math.max(5,.1*l),h=t.cssStyles,u=[...cR(o/2,-l/2,c,30,-90,0),{x:-o/2-c,y:c},...cR(o/2+2*c,-c,c,20,-180,-270),...cR(o/2+2*c,c,c,20,-90,-180),{x:-o/2-c,y:-l/2},...cR(o/2,l/2,c,20,0,90)],d=[...cR(-o/2+c+c/2,-l/2,c,20,-90,-180),{x:o/2-c/2,y:c},...cR(-o/2-c/2,-c,c,20,0,90),...cR(-o/2-c/2,c,c,20,-90,0),{x:o/2-c/2,y:-c},...cR(-o/2+c+c/2,l/2,c,30,-180,-270)],p=[{x:o/2,y:-l/2-c},{x:-o/2,y:-l/2-c},...cR(o/2,-l/2,c,20,-90,0),{x:-o/2-c,y:-c},...cR(o/2+2*c,-c,c,20,-180,-270),...cR(o/2+2*c,c,c,20,-90,-180),{x:-o/2-c,y:l/2},...cR(o/2,l/2,c,20,0,90),{x:-o/2,y:l/2+c},{x:o/2-c-c/2,y:l/2+c},...cR(-o/2+c+c/2,-l/2,c,20,-90,-180),{x:o/2-c/2,y:c},...cR(-o/2-c/2,-c,c,20,0,90),...cR(-o/2-c/2,c,c,20,-90,0),{x:o/2-c/2,y:-c},...cR(-o/2+c+c/2,l/2,c,30,-180,-270)],g=FI.svg(i),f=AN(t,{fill:"none"}),m=("handDrawn"!==t.look&&(f.roughness=0,f.fillStyle="solid"),eN(u).replace("Z","")),y=g.path(m,f),v=eN(d).replace("Z",""),x=g.path(v,f),b=eN(p),w=g.path(b,{...f}),k=i.insert("g",":first-child");return k.insert(()=>w,":first-child").attr("stroke-opacity",0),k.insert(()=>y,":first-child"),k.insert(()=>x,":first-child"),k.attr("class","text"),h&&"handDrawn"!==t.look&&k.selectAll("path").attr("style",h),n&&"handDrawn"!==t.look&&k.selectAll("path").attr("style",n),k.attr("transform",`translate(${c-c/4}, 0)`),s.attr("transform",`translate(${-o/2+(t.padding??0)/2-(a.x-(a.left??0))},${-l/2+(t.padding??0)/2-(a.y-(a.top??0))})`),aN(t,k),t.intersect=function(e){return V.polygon(t,p,e)},i}var uR=b(()=>{i(),RN(),MN(),zI(),mt(cR,"generateCirclePoints"),mt(hR,"curlyBraces")});async function dR(e,t){var{labelStyles:r,nodeStyles:n}=Q(t),{shapeSvg:r,bbox:e}=(t.labelStyle=r,await nN(e,t,sN(t))),i=Math.max(80,1.25*(e.width+2*(t.padding??0)),t?.width??0),a=(e=Math.max(20,e.height+2*(t.padding??0),t?.height??0))/2,s=t.cssStyles,o=FI.svg(r),l=AN(t,{});"handDrawn"!==t.look&&(l.roughness=0,l.fillStyle="solid");let c=i,h=e,u=c-a,d=h/4,p=[{x:u,y:0},{x:d,y:0},{x:0,y:h/2},{x:d,y:h},{x:u,y:h},...rN(-u,-h/2,a,50,270,90)],g=eN(p),f=o.path(g,l),m=r.insert(()=>f,":first-child");return m.attr("class","basic label-container"),s&&"handDrawn"!==t.look&&m.selectChildren("path").attr("style",s),n&&"handDrawn"!==t.look&&m.selectChildren("path").attr("style",n),m.attr("transform",`translate(${-i/2}, ${-e/2})`),aN(t,m),t.intersect=function(e){return V.polygon(t,p,e)},r}var pR=b(()=>{i(),RN(),MN(),zI(),mt(dR,"curvedTrapezoid")});async function gR(e,a){var{labelStyles:t,nodeStyles:r}=Q(a);a.labelStyle=t;let{shapeSvg:s,bbox:n,label:i}=await nN(e,a,sN(a)),o=Math.max(n.width+a.padding,a.width??0),l=o/2,c=l/(2.5+o/50),h=Math.max(n.height+c+a.padding,a.height??0),u,d=a.cssStyles;if("handDrawn"===a.look){let e=FI.svg(s),t=mR(0,0,o,h,l,c),r=yR(0,c,o,h,l,c),n=e.path(t,AN(a,{})),i=e.path(r,AN(a,{fill:"none"}));u=s.insert(()=>i,":first-child"),(u=s.insert(()=>n,":first-child")).attr("class","basic label-container"),d&&u.attr("style",d)}else t=fR(0,0,o,h,l,c),u=s.insert("path",":first-child").attr("d",t).attr("class","basic label-container").attr("style",SC(d)).attr("style",r);return u.attr("label-offset-y",c),u.attr("transform",`translate(${-o/2}, ${-(h/2+c)})`),aN(a,u),i.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${-n.height/2+(a.padding??0)/1.5-(n.y-(n.top??0))})`),a.intersect=function(t){var r=V.rect(a,t),n=r.x-(a.x??0);if(0!=l&&(Math.abs(n)<(a.width??0)/2||Math.abs(n)==(a.width??0)/2&&Math.abs(r.y-(a.y??0))>(a.height??0)/2-c)){let e=c*c*(1-n*n/(l*l));0<e&&(e=Math.sqrt(e)),e=c-e,0<t.y-(a.y??0)&&(e=-e),r.y+=e}return r},s}var fR,mR,yR,vR=b(()=>{i(),RN(),MN(),zI(),i_(),fR=mt((e,t,r,n,i,a)=>[`M${e},`+(t+a),`a${i},${a} 0,0,0 ${r},0`,`a${i},${a} 0,0,0 ${-r},0`,"l0,"+n,`a${i},${a} 0,0,0 ${r},0`,"l0,"+-n].join(" "),"createCylinderPathD"),mR=mt((e,t,r,n,i,a)=>[`M${e},`+(t+a),`M${e+r},`+(t+a),`a${i},${a} 0,0,0 ${-r},0`,"l0,"+n,`a${i},${a} 0,0,0 ${r},0`,"l0,"+-n].join(" "),"createOuterCylinderPathD"),yR=mt((e,t,r,n,i,a)=>[`M${e-r/2},`+-n/2,`a${i},${a} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD"),mt(gR,"cylinder")});async function xR(e,t){var{labelStyles:r,nodeStyles:n}=Q(t),{shapeSvg:r,bbox:e,label:i}=(t.labelStyle=r,await nN(e,t,sN(t))),a=e.width+t.padding,s=.2*(o=e.height+t.padding),a=-a/2,o=-o/2-s/2,l=t.cssStyles,c=FI.svg(r),h=AN(t,{});"handDrawn"!==t.look&&(h.roughness=0,h.fillStyle="solid");let u=[{x:a,y:o+s},{x:-a,y:o+s},{x:-a,y:-o},{x:a,y:-o},{x:a,y:o},{x:-a,y:o},{x:-a,y:o+s}],d=c.polygon(u.map(e=>[e.x,e.y]),h),p=r.insert(()=>d,":first-child");return p.attr("class","basic label-container"),l&&"handDrawn"!==t.look&&p.selectAll("path").attr("style",l),n&&"handDrawn"!==t.look&&p.selectAll("path").attr("style",n),i.attr("transform",`translate(${a+(t.padding??0)/2-(e.x-(e.left??0))}, ${o+s+(t.padding??0)/2-(e.y-(e.top??0))})`),aN(t,p),t.intersect=function(e){return V.rect(t,e)},r}var bR=b(()=>{i(),RN(),MN(),zI(),mt(xR,"dividedRectangle")});async function wR(e,t){var r,{labelStyles:n,nodeStyles:i}=Q(t);t.labelStyle=n;let{shapeSvg:a,bbox:s,halfPadding:o}=await nN(e,t,sN(t)),l=s.width/2+o+5,c=s.width/2+o,h,u=t.cssStyles;return"handDrawn"===t.look?(n=FI.svg(a),e=AN(t,{roughness:.2,strokeWidth:2.5}),r=AN(t,{roughness:.2,strokeWidth:1.5}),e=n.circle(0,0,2*l,e),n=n.circle(0,0,2*c,r),(h=a.insert("g",":first-child")).attr("class",SC(t.cssClasses)).attr("style",SC(u)),h.node()?.appendChild(e),h.node()?.appendChild(n)):(r=(h=a.insert("g",":first-child")).insert("circle",":first-child"),e=h.insert("circle"),h.attr("class","basic label-container").attr("style",i),r.attr("class","outer-circle").attr("style",i).attr("r",l).attr("cx",0).attr("cy",0),e.attr("class","inner-circle").attr("style",i).attr("r",c).attr("cx",0).attr("cy",0)),aN(t,h),t.intersect=function(e){return D.info("DoubleCircle intersect",t,l,e),V.circle(t,l,e)},a}var kR=b(()=>{e(),i(),RN(),MN(),zI(),i_(),mt(wR,"doublecircle")});function TR(e,t,{config:{themeVariables:r}}){var{labelStyles:n,nodeStyles:i}=Q(t);t.label="",t.labelStyle=n;let a=e.insert("g").attr("class",sN(t)).attr("id",t.domId??t.id),s=t.cssStyles,o=FI.svg(a),l=r.nodeBorder,c=AN(t,{fillStyle:"solid"}),h=("handDrawn"!==t.look&&(c.roughness=0),o.circle(0,0,14,c)),u=a.insert(()=>h,":first-child");return u.selectAll("path").attr("style",`fill: ${l} !important;`),s&&0<s.length&&"handDrawn"!==t.look&&u.selectAll("path").attr("style",s),i&&"handDrawn"!==t.look&&u.selectAll("path").attr("style",i),aN(t,u),t.intersect=function(e){return D.info("filledCircle intersect",t,{radius:7,point:e}),V.circle(t,7,e)},a}var ER=b(()=>{zI(),e(),RN(),MN(),i(),mt(TR,"filledCircle")});async function CR(e,t){var{labelStyles:r,nodeStyles:n}=Q(t);t.labelStyle=r;let{shapeSvg:i,bbox:a,label:s}=await nN(e,t,sN(t)),o=a.width+(t.padding??0),l=o+a.height,c=o+a.height,h=[{x:0,y:-l},{x:c,y:-l},{x:c/2,y:0}],u=t.cssStyles,d=FI.svg(i),p=AN(t,{}),g=("handDrawn"!==t.look&&(p.roughness=0,p.fillStyle="solid"),eN(h)),f=d.path(g,p),m=i.insert(()=>f,":first-child").attr("transform",`translate(${-l/2}, ${l/2})`);return u&&"handDrawn"!==t.look&&m.selectChildren("path").attr("style",u),n&&"handDrawn"!==t.look&&m.selectChildren("path").attr("style",n),t.width=o,t.height=l,aN(t,m),s.attr("transform",`translate(${-a.width/2-(a.x-(a.left??0))}, ${-l/2+(t.padding??0)/2+(a.y-(a.top??0))})`),t.intersect=function(e){return D.info("Triangle intersect",t,h,e),V.polygon(t,h,e)},i}var _R=b(()=>{e(),i(),RN(),MN(),zI(),i(),mt(CR,"flippedTriangle")});function SR(e,t,{dir:r,config:{state:n,themeVariables:i}}){var a=Q(t).nodeStyles;t.label="";let s=e.insert("g").attr("class",sN(t)).attr("id",t.domId??t.id),o=t.cssStyles,l=Math.max(70,t?.width??0),c=Math.max(10,t?.height??0);"LR"===r&&(l=Math.max(10,t?.width??0),c=Math.max(70,t?.height??0));var e=-1*l/2,r=-1*c/2,h=FI.svg(s),i=AN(t,{stroke:i.lineColor,fill:i.lineColor});"handDrawn"!==t.look&&(i.roughness=0,i.fillStyle="solid");let u=h.rectangle(e,r,l,c,i),d=s.insert(()=>u,":first-child");return o&&"handDrawn"!==t.look&&d.selectAll("path").attr("style",o),a&&"handDrawn"!==t.look&&d.selectAll("path").attr("style",a),aN(t,d),h=n?.padding??0,t.width&&t.height&&(t.width+=h/2||0,t.height+=h/2||0),t.intersect=function(e){return V.rect(t,e)},s}var AR=b(()=>{zI(),RN(),MN(),i(),mt(SR,"forkJoin")});async function LR(e,t){var{labelStyles:r,nodeStyles:n}=Q(t);t.labelStyle=r;let{shapeSvg:i,bbox:a}=await nN(e,t,sN(t)),s=Math.max(80,a.width+2*(t.padding??0),t?.width??0),o=Math.max(50,a.height+2*(t.padding??0),t?.height??0),l=o/2,c=t.cssStyles,h=FI.svg(i),u=AN(t,{}),d=("handDrawn"!==t.look&&(u.roughness=0,u.fillStyle="solid"),[{x:-s/2,y:-o/2},{x:s/2-l,y:-o/2},...rN(-s/2+l,0,l,50,90,270),{x:s/2-l,y:o/2},{x:-s/2,y:o/2}]),p=eN(d),g=h.path(p,u),f=i.insert(()=>g,":first-child");return f.attr("class","basic label-container"),c&&"handDrawn"!==t.look&&f.selectChildren("path").attr("style",c),n&&"handDrawn"!==t.look&&f.selectChildren("path").attr("style",n),aN(t,f),t.intersect=function(e){return D.info("Pill intersect",t,{radius:l,point:e}),V.polygon(t,d,e)},i}var NR=b(()=>{e(),i(),RN(),MN(),zI(),mt(LR,"halfRoundedRectangle")});async function IR(e,t){var{labelStyles:r,nodeStyles:n}=Q(t),{shapeSvg:r,bbox:e}=(t.labelStyle=r,await nN(e,t,sN(t))),i=e.height+(t.padding??0),e=e.width+2.5*(t.padding??0),a=t.cssStyles,s=FI.svg(r),o=AN(t,{}),l=("handDrawn"!==t.look&&(o.roughness=0,o.fillStyle="solid"),e/2);let c=i/2,h=c/2,u=(l+=l/6)-h,d=[{x:-u,y:-c},{x:0,y:-c},{x:u,y:-c},{x:l,y:0},{x:u,y:c},{x:0,y:c},{x:-u,y:c},{x:-l,y:0}],p=eN(d),g=s.path(p,o),f=r.insert(()=>g,":first-child");return f.attr("class","basic label-container"),a&&"handDrawn"!==t.look&&f.selectChildren("path").attr("style",a),n&&"handDrawn"!==t.look&&f.selectChildren("path").attr("style",n),t.width=e,t.height=i,aN(t,f),t.intersect=function(e){return V.polygon(t,d,e)},r}var RR=b(()=>{i(),RN(),MN(),zI(),mt(IR,"hexagon")});async function MR(e,t){var{labelStyles:r,nodeStyles:n}=Q(t),r=(t.label="",t.labelStyle=r,(await nN(e,t,sN(t))).shapeSvg),e=Math.max(30,t?.width??0),i=Math.max(30,t?.height??0),a=t.cssStyles,s=FI.svg(r),o=AN(t,{});"handDrawn"!==t.look&&(o.roughness=0,o.fillStyle="solid");let l=[{x:0,y:0},{x:e,y:0},{x:0,y:i},{x:e,y:i}],c=eN(l),h=s.path(c,o),u=r.insert(()=>h,":first-child");return u.attr("class","basic label-container"),a&&"handDrawn"!==t.look&&u.selectChildren("path").attr("style",a),n&&"handDrawn"!==t.look&&u.selectChildren("path").attr("style",n),u.attr("transform",`translate(${-e/2}, ${-i/2})`),aN(t,u),t.intersect=function(e){return D.info("Pill intersect",t,{points:l}),V.polygon(t,l,e)},r}var DR=b(()=>{e(),i(),RN(),MN(),zI(),mt(MR,"hourglass")});async function OR(e,i,{config:{themeVariables:t,flowchart:r}}){var n,a=Q(i).labelStyles,a=(i.labelStyle=a,i.assetHeight??48),a=Math.max(a,i.assetWidth??48),r=r?.wrappingWidth;i.width=Math.max(a,r??0);let{shapeSvg:s,bbox:o,label:l}=await nN(e,i,"icon-shape default"),c="t"===i.pos,h=a,u=a,d=t.nodeBorder,p=CN(i).stylesMap,g=-u/2,f=-h/2,m=i.label?8:0,y=FI.svg(s),v=AN(i,{stroke:"none",fill:"none"}),x=("handDrawn"!==i.look&&(v.roughness=0,v.fillStyle="solid"),y.rectangle(g,f,u,h,v)),b=Math.max(u,o.width),w=h+o.height+m,k=y.rectangle(-b/2,-w/2,b,w,{...v,fill:"transparent",stroke:"none"}),T=s.insert(()=>x,":first-child"),E=s.insert(()=>k);return i.icon&&((r=s.append("g")).html(`<g>${await Dc(i.icon,{height:a,width:a,fallbackPrefix:""})}</g>`),t=(e=r.node().getBBox()).width,a=e.height,n=e.y,r.attr("transform",`translate(${-t/2-e.x},${c?o.height/2+m/2-a/2-n:-o.height/2-m/2-a/2-n})`),r.attr("style",`color: ${p.get("stroke")??d};`)),l.attr("transform",`translate(${-o.width/2-(o.x-(o.left??0))},${c?-w/2:w/2-o.height})`),T.attr("transform",`translate(0,${c?o.height/2+m/2:-o.height/2-m/2})`),aN(i,E),i.intersect=function(e){var t,r,n;return D.info("iconSquare intersect",i,e),i.label?(n=i.x??0,t=i.y??0,r=i.height??0,n=c?[{x:n-o.width/2,y:t-r/2},{x:n+o.width/2,y:t-r/2},{x:n+o.width/2,y:t-r/2+o.height+m},{x:n+u/2,y:t-r/2+o.height+m},{x:n+u/2,y:t+r/2},{x:n-u/2,y:t+r/2},{x:n-u/2,y:t-r/2+o.height+m},{x:n-o.width/2,y:t-r/2+o.height+m}]:[{x:n-u/2,y:t-r/2},{x:n+u/2,y:t-r/2},{x:n+u/2,y:t-r/2+h},{x:n+o.width/2,y:t-r/2+h},{x:n+o.width/2/2,y:t+r/2},{x:n-o.width/2,y:t+r/2},{x:n-o.width/2,y:t-r/2+h},{x:n-u/2,y:t-r/2+h}],V.polygon(i,n,e)):V.rect(i,e)},s}var PR=b(()=>{zI(),e(),Pc(),RN(),MN(),i(),mt(OR,"icon")});async function BR(e,t,{config:{themeVariables:r,flowchart:n}}){var i=Q(t).labelStyles,i=(t.labelStyle=i,t.assetHeight??48),i=Math.max(i,t.assetWidth??48),n=n?.wrappingWidth,{shapeSvg:n,bbox:e,label:a}=(t.width=Math.max(i,n??0),await nN(e,t,"icon-shape default")),s=t.label?8:0,o="t"===t.pos,{nodeBorder:r,mainBkg:l}=r,c=CN(t).stylesMap,h=FI.svg(n),u=AN(t,{}),d=("handDrawn"!==t.look&&(u.roughness=0,u.fillStyle="solid"),c.get("fill")),d=(u.stroke=d??l,n.append("g"));t.icon&&d.html(`<g>${await Dc(t.icon,{height:i,width:i,fallbackPrefix:""})}</g>`);let p=d.node().getBBox(),g=p.width,f=p.height,m=p.x,y=p.y,v=Math.max(g,f)*Math.SQRT2+40,x=h.circle(0,0,v,u),b=Math.max(v,e.width),w=v+e.height+s,k=h.rectangle(-b/2,-w/2,b,w,{...u,fill:"transparent",stroke:"none"}),T=n.insert(()=>x,":first-child"),E=n.insert(()=>k);return d.attr("transform",`translate(${-g/2-m},${o?e.height/2+s/2-f/2-y:-e.height/2-s/2-f/2-y})`),d.attr("style",`color: ${c.get("stroke")??r};`),a.attr("transform",`translate(${-e.width/2-(e.x-(e.left??0))},${o?-w/2:w/2-e.height})`),T.attr("transform",`translate(0,${o?e.height/2+s/2:-e.height/2-s/2})`),aN(t,E),t.intersect=function(e){return D.info("iconSquare intersect",t,e),V.rect(t,e)},n}var $R,FR=b(()=>{zI(),e(),Pc(),RN(),MN(),i(),mt(BR,"iconCircle")}),zR=b(()=>{$R=mt((e,t,r,n,i)=>["M",e+i,t,"H",e+r-i,"A",i,i,0,0,1,e+r,t+i,"V",t+n-i,"A",i,i,0,0,1,e+r-i,t+n,"H",e+i,"A",i,i,0,0,1,e,t+n-i,"V",t+i,"A",i,i,0,0,1,e+i,t,"Z"].join(" "),"createRoundedRectPathD")});async function GR(e,i,{config:{themeVariables:t,flowchart:r}}){var n=Q(i).labelStyles,n=(i.labelStyle=n,i.assetHeight??48),n=Math.max(n,i.assetWidth??48),r=r?.wrappingWidth;i.width=Math.max(n,r??0);let{shapeSvg:a,bbox:s,halfPadding:o,label:l}=await nN(e,i,"icon-shape default"),c="t"===i.pos,h=n+2*o,u=n+2*o,{nodeBorder:d,mainBkg:p}=t,g=CN(i).stylesMap,f=-u/2,m=-h/2,y=i.label?8:0,v=FI.svg(a),x=AN(i,{});"handDrawn"!==i.look&&(x.roughness=0,x.fillStyle="solid");var b,r=g.get("fill");x.stroke=r??p;let w=v.path($R(f,m,u,h,5),x),k=Math.max(u,s.width),T=h+s.height+y,E=v.rectangle(-k/2,-T/2,k,T,{...x,fill:"transparent",stroke:"none"}),C=a.insert(()=>w,":first-child").attr("class","icon-shape2"),_=a.insert(()=>E);return i.icon&&((e=a.append("g")).html(`<g>${await Dc(i.icon,{height:n,width:n,fallbackPrefix:""})}</g>`),r=(t=e.node().getBBox()).width,n=t.height,b=t.y,e.attr("transform",`translate(${-r/2-t.x},${c?s.height/2+y/2-n/2-b:-s.height/2-y/2-n/2-b})`),e.attr("style",`color: ${g.get("stroke")??d};`)),l.attr("transform",`translate(${-s.width/2-(s.x-(s.left??0))},${c?-T/2:T/2-s.height})`),C.attr("transform",`translate(0,${c?s.height/2+y/2:-s.height/2-y/2})`),aN(i,_),i.intersect=function(e){var t,r,n;return D.info("iconSquare intersect",i,e),i.label?(n=i.x??0,t=i.y??0,r=i.height??0,n=c?[{x:n-s.width/2,y:t-r/2},{x:n+s.width/2,y:t-r/2},{x:n+s.width/2,y:t-r/2+s.height+y},{x:n+u/2,y:t-r/2+s.height+y},{x:n+u/2,y:t+r/2},{x:n-u/2,y:t+r/2},{x:n-u/2,y:t-r/2+s.height+y},{x:n-s.width/2,y:t-r/2+s.height+y}]:[{x:n-u/2,y:t-r/2},{x:n+u/2,y:t-r/2},{x:n+u/2,y:t-r/2+h},{x:n+s.width/2,y:t-r/2+h},{x:n+s.width/2/2,y:t+r/2},{x:n-s.width/2,y:t+r/2},{x:n-s.width/2,y:t-r/2+h},{x:n-u/2,y:t-r/2+h}],V.polygon(i,n,e)):V.rect(i,e)},a}var UR=b(()=>{zI(),e(),Pc(),RN(),MN(),zR(),i(),mt(GR,"iconRounded")});async function qR(e,i,{config:{themeVariables:t,flowchart:r}}){var n=Q(i).labelStyles,n=(i.labelStyle=n,i.assetHeight??48),n=Math.max(n,i.assetWidth??48),r=r?.wrappingWidth;i.width=Math.max(n,r??0);let{shapeSvg:a,bbox:s,halfPadding:o,label:l}=await nN(e,i,"icon-shape default"),c="t"===i.pos,h=n+2*o,u=n+2*o,{nodeBorder:d,mainBkg:p}=t,g=CN(i).stylesMap,f=-u/2,m=-h/2,y=i.label?8:0,v=FI.svg(a),x=AN(i,{});"handDrawn"!==i.look&&(x.roughness=0,x.fillStyle="solid");var b,r=g.get("fill");x.stroke=r??p;let w=v.path($R(f,m,u,h,.1),x),k=Math.max(u,s.width),T=h+s.height+y,E=v.rectangle(-k/2,-T/2,k,T,{...x,fill:"transparent",stroke:"none"}),C=a.insert(()=>w,":first-child"),_=a.insert(()=>E);return i.icon&&((e=a.append("g")).html(`<g>${await Dc(i.icon,{height:n,width:n,fallbackPrefix:""})}</g>`),r=(t=e.node().getBBox()).width,n=t.height,b=t.y,e.attr("transform",`translate(${-r/2-t.x},${c?s.height/2+y/2-n/2-b:-s.height/2-y/2-n/2-b})`),e.attr("style",`color: ${g.get("stroke")??d};`)),l.attr("transform",`translate(${-s.width/2-(s.x-(s.left??0))},${c?-T/2:T/2-s.height})`),C.attr("transform",`translate(0,${c?s.height/2+y/2:-s.height/2-y/2})`),aN(i,_),i.intersect=function(e){var t,r,n;return D.info("iconSquare intersect",i,e),i.label?(n=i.x??0,t=i.y??0,r=i.height??0,n=c?[{x:n-s.width/2,y:t-r/2},{x:n+s.width/2,y:t-r/2},{x:n+s.width/2,y:t-r/2+s.height+y},{x:n+u/2,y:t-r/2+s.height+y},{x:n+u/2,y:t+r/2},{x:n-u/2,y:t+r/2},{x:n-u/2,y:t-r/2+s.height+y},{x:n-s.width/2,y:t-r/2+s.height+y}]:[{x:n-u/2,y:t-r/2},{x:n+u/2,y:t-r/2},{x:n+u/2,y:t-r/2+h},{x:n+s.width/2,y:t-r/2+h},{x:n+s.width/2/2,y:t+r/2},{x:n-s.width/2,y:t+r/2},{x:n-s.width/2,y:t-r/2+h},{x:n-u/2,y:t-r/2+h}],V.polygon(i,n,e)):V.rect(i,e)},a}var jR=b(()=>{zI(),e(),Pc(),RN(),zR(),MN(),i(),mt(qR,"iconSquare")});async function YR(e,i,{config:{flowchart:t}}){(n=new Image).src=i?.img??"",await n.decode();var r=Number(n.naturalWidth.toString().replace("px","")),n=Number(n.naturalHeight.toString().replace("px","")),a=(i.imageAspectRatio=r/n,Q(i).labelStyles),a=(i.labelStyle=a,t?.wrappingWidth);i.defaultWidth=t?.wrappingWidth;let s=Math.max(i.label?a??0:0,i?.assetWidth??r),o="on"===i.constraint&&i?.assetHeight?i.assetHeight*i.imageAspectRatio:s,l="on"===i.constraint?o/i.imageAspectRatio:i?.assetHeight??n,{shapeSvg:c,bbox:h,label:u}=(i.width=Math.max(o,a??0),await nN(e,i,"image-shape default")),d="t"===i.pos,p=-o/2,g=-l/2,f=i.label?8:0,m=FI.svg(c),y=AN(i,{}),v=("handDrawn"!==i.look&&(y.roughness=0,y.fillStyle="solid"),m.rectangle(p,g,o,l,y)),x=Math.max(o,h.width),b=l+h.height+f,w=m.rectangle(-x/2,-b/2,x,b,{...y,fill:"none",stroke:"none"}),k=c.insert(()=>v,":first-child"),T=c.insert(()=>w);return i.img&&((t=c.append("image")).attr("href",i.img),t.attr("width",o),t.attr("height",l),t.attr("preserveAspectRatio","none"),t.attr("transform",`translate(${-o/2},${d?b/2-l:-b/2})`)),u.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${d?-l/2-h.height/2-f/2:l/2-h.height/2+f/2})`),k.attr("transform",`translate(0,${d?h.height/2+f/2:-h.height/2-f/2})`),aN(i,T),i.intersect=function(e){var t,r,n;return D.info("iconSquare intersect",i,e),i.label?(n=i.x??0,t=i.y??0,r=i.height??0,n=d?[{x:n-h.width/2,y:t-r/2},{x:n+h.width/2,y:t-r/2},{x:n+h.width/2,y:t-r/2+h.height+f},{x:n+o/2,y:t-r/2+h.height+f},{x:n+o/2,y:t+r/2},{x:n-o/2,y:t+r/2},{x:n-o/2,y:t-r/2+h.height+f},{x:n-h.width/2,y:t-r/2+h.height+f}]:[{x:n-o/2,y:t-r/2},{x:n+o/2,y:t-r/2},{x:n+o/2,y:t-r/2+l},{x:n+h.width/2,y:t-r/2+l},{x:n+h.width/2/2,y:t+r/2},{x:n-h.width/2,y:t+r/2},{x:n-h.width/2,y:t-r/2+l},{x:n-o/2,y:t-r/2+l}],V.polygon(i,n,e)):V.rect(i,e)},c}var WR=b(()=>{zI(),e(),RN(),MN(),i(),mt(YR,"imageSquare")});async function HR(e,i){var{labelStyles:t,nodeStyles:r}=Q(i);i.labelStyle=t;let{shapeSvg:a,bbox:n}=await nN(e,i,sN(i)),s=Math.max(n.width+2*(i.padding??0),i?.width??0),o=Math.max(n.height+2*(i.padding??0),i?.height??0),l=[{x:0,y:0},{x:s,y:0},{x:s+3*o/6,y:-o},{x:-3*o/6,y:-o}],c,h=i.cssStyles;if("handDrawn"===i.look){let e=FI.svg(a),t=AN(i,{}),r=eN(l),n=e.path(r,t);c=a.insert(()=>n,":first-child").attr("transform",`translate(${-s/2}, ${o/2})`),h&&c.attr("style",h)}else c=WI(a,s,o,l);return r&&c.attr("style",r),i.width=s,i.height=o,aN(i,c),i.intersect=function(e){return V.polygon(i,l,e)},a}var VR=b(()=>{i(),RN(),MN(),zI(),HI(),mt(HR,"inv_trapezoid")});async function XR(e,n,t){var{labelStyles:r,nodeStyles:i}=Q(n);n.labelStyle=r;let{shapeSvg:a,bbox:s}=await nN(e,n,sN(n)),o=Math.max(s.width+2*t.labelPaddingX,n?.width||0),l=Math.max(s.height+2*t.labelPaddingY,n?.height||0),c=-o/2,h=-l/2,u,{rx:d,ry:p}=n,g=n.cssStyles;if(t?.rx&&t.ry&&(d=t.rx,p=t.ry),"handDrawn"===n.look){let e=FI.svg(a),t=AN(n,{}),r=d||p?e.path($R(c,h,o,l,d||0),t):e.rectangle(c,h,o,l,t);(u=a.insert(()=>r,":first-child")).attr("class","basic label-container").attr("style",SC(g))}else(u=a.insert("rect",":first-child")).attr("class","basic label-container").attr("style",i).attr("rx",SC(d)).attr("ry",SC(p)).attr("x",c).attr("y",h).attr("width",o).attr("height",l);return aN(n,u),n.calcIntersect=function(e,t){return V.rect(e,t)},n.intersect=function(e){return V.rect(n,e)},a}var KR=b(()=>{i(),RN(),zR(),MN(),zI(),i_(),mt(XR,"drawRect")});async function ZR(e,t){var{shapeSvg:e,bbox:r,label:n}=await nN(e,t,"label"),i=e.insert("rect",":first-child");return i.attr("width",.1).attr("height",.1),e.attr("class","label edgeLabel"),n.attr("transform",`translate(${-r.width/2-(r.x-(r.left??0))}, ${-r.height/2-(r.y-(r.top??0))})`),aN(t,i),t.intersect=function(e){return V.rect(t,e)},e}var QR=b(()=>{KR(),i(),RN(),mt(ZR,"labelRect")});async function JR(e,i){var{labelStyles:t,nodeStyles:r}=Q(i);i.labelStyle=t;let{shapeSvg:a,bbox:n}=await nN(e,i,sN(i)),s=Math.max(n.width+(i.padding??0),i?.width??0),o=Math.max(n.height+(i.padding??0),i?.height??0),l=[{x:0,y:0},{x:s+3*o/6,y:0},{x:s,y:-o},{x:-3*o/6,y:-o}],c,h=i.cssStyles;if("handDrawn"===i.look){let e=FI.svg(a),t=AN(i,{}),r=eN(l),n=e.path(r,t);c=a.insert(()=>n,":first-child").attr("transform",`translate(${-s/2}, ${o/2})`),h&&c.attr("style",h)}else c=WI(a,s,o,l);return r&&c.attr("style",r),i.width=s,i.height=o,aN(i,c),i.intersect=function(e){return V.polygon(i,l,e)},a}var eM=b(()=>{i(),RN(),MN(),zI(),HI(),mt(JR,"lean_left")});async function tM(e,i){var{labelStyles:t,nodeStyles:r}=Q(i);i.labelStyle=t;let{shapeSvg:a,bbox:n}=await nN(e,i,sN(i)),s=Math.max(n.width+(i.padding??0),i?.width??0),o=Math.max(n.height+(i.padding??0),i?.height??0),l=[{x:-3*o/6,y:0},{x:s,y:0},{x:s+3*o/6,y:-o},{x:0,y:-o}],c,h=i.cssStyles;if("handDrawn"===i.look){let e=FI.svg(a),t=AN(i,{}),r=eN(l),n=e.path(r,t);c=a.insert(()=>n,":first-child").attr("transform",`translate(${-s/2}, ${o/2})`),h&&c.attr("style",h)}else c=WI(a,s,o,l);return r&&c.attr("style",r),i.width=s,i.height=o,aN(i,c),i.intersect=function(e){return V.polygon(i,l,e)},a}var rM=b(()=>{i(),RN(),MN(),zI(),HI(),mt(tM,"lean_right")});function nM(e,t){var{labelStyles:r,nodeStyles:n}=Q(t);t.label="",t.labelStyle=r;let i=e.insert("g").attr("class",sN(t)).attr("id",t.domId??t.id),a=t.cssStyles,s=Math.max(35,t?.width??0),o=Math.max(35,t?.height??0),l=[{x:s,y:0},{x:0,y:o+3.5},{x:s-14,y:o+3.5},{x:0,y:2*o},{x:s,y:o-3.5},{x:14,y:o-3.5}],c=FI.svg(i),h=AN(t,{}),u=("handDrawn"!==t.look&&(h.roughness=0,h.fillStyle="solid"),eN(l)),d=c.path(u,h),p=i.insert(()=>d,":first-child");return a&&"handDrawn"!==t.look&&p.selectAll("path").attr("style",a),n&&"handDrawn"!==t.look&&p.selectAll("path").attr("style",n),p.attr("transform",`translate(-${s/2},${-o})`),aN(t,p),t.intersect=function(e){return D.info("lightningBolt intersect",t,e),V.polygon(t,l,e)},i}var iM=b(()=>{e(),i(),MN(),zI(),RN(),i(),mt(nM,"lightningBolt")});async function aM(e,s){var{labelStyles:t,nodeStyles:r}=Q(s);s.labelStyle=t;let{shapeSvg:o,bbox:n,label:i}=await nN(e,s,sN(s)),l=Math.max(n.width+(s.padding??0),s.width??0),c=l/2,h=c/(2.5+l/50),u=Math.max(n.height+h+(s.padding??0),s.height??0),d=.1*u,p,g=s.cssStyles;if("handDrawn"===s.look){let e=FI.svg(o),t=oM(0,0,l,u,c,h,d),r=lM(0,h,l,u,c,h),n=AN(s,{}),i=e.path(t,n),a=e.path(r,n);o.insert(()=>a,":first-child").attr("class","line"),(p=o.insert(()=>i,":first-child")).attr("class","basic label-container"),g&&p.attr("style",g)}else t=sM(0,0,l,u,c,h,d),p=o.insert("path",":first-child").attr("d",t).attr("class","basic label-container").attr("style",SC(g)).attr("style",r);return p.attr("label-offset-y",h),p.attr("transform",`translate(${-l/2}, ${-(u/2+h)})`),aN(s,p),i.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${-n.height/2+h-(n.y-(n.top??0))})`),s.intersect=function(t){var r=V.rect(s,t),n=r.x-(s.x??0);if(0!=c&&(Math.abs(n)<(s.width??0)/2||Math.abs(n)==(s.width??0)/2&&Math.abs(r.y-(s.y??0))>(s.height??0)/2-h)){let e=h*h*(1-n*n/(c*c));0<e&&(e=Math.sqrt(e)),e=h-e,0<t.y-(s.y??0)&&(e=-e),r.y+=e}return r},o}var sM,oM,lM,cM=b(()=>{i(),RN(),MN(),zI(),i_(),sM=mt((e,t,r,n,i,a,s)=>[`M${e},`+(t+a),`a${i},${a} 0,0,0 ${r},0`,`a${i},${a} 0,0,0 ${-r},0`,"l0,"+n,`a${i},${a} 0,0,0 ${r},0`,"l0,"+-n,`M${e},`+(t+a+s),`a${i},${a} 0,0,0 ${r},0`].join(" "),"createCylinderPathD"),oM=mt((e,t,r,n,i,a,s)=>[`M${e},`+(t+a),`M${e+r},`+(t+a),`a${i},${a} 0,0,0 ${-r},0`,"l0,"+n,`a${i},${a} 0,0,0 ${r},0`,"l0,"+-n,`M${e},`+(t+a+s),`a${i},${a} 0,0,0 ${r},0`].join(" "),"createOuterCylinderPathD"),lM=mt((e,t,r,n,i,a)=>[`M${e-r/2},`+-n/2,`a${i},${a} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD"),mt(aM,"linedCylinder")});async function hM(e,t){var{labelStyles:r,nodeStyles:n}=Q(t),{shapeSvg:r,bbox:e,label:i}=(t.labelStyle=r,await nN(e,t,sN(t))),a=Math.max(e.width+2*(t.padding??0),t?.width??0),s=Math.max(e.height+2*(t.padding??0),t?.height??0),o=s/4,l=s+o,c=t.cssStyles,h=FI.svg(r),u=AN(t,{});"handDrawn"!==t.look&&(u.roughness=0,u.fillStyle="solid");let d=[{x:-a/2-a/2*.1,y:-l/2},{x:-a/2-a/2*.1,y:l/2},...tN(-a/2-a/2*.1,l/2,a/2+a/2*.1,l/2,o,.8),{x:a/2+a/2*.1,y:-l/2},{x:-a/2-a/2*.1,y:-l/2},{x:-a/2,y:-l/2},{x:-a/2,y:l/2*1.1},{x:-a/2,y:-l/2}],p=h.polygon(d.map(e=>[e.x,e.y]),u),g=r.insert(()=>p,":first-child");return g.attr("class","basic label-container"),c&&"handDrawn"!==t.look&&g.selectAll("path").attr("style",c),n&&"handDrawn"!==t.look&&g.selectAll("path").attr("style",n),g.attr("transform",`translate(0,${-o/2})`),i.attr("transform",`translate(${-a/2+(t.padding??0)+a/2*.1/2-(e.x-(e.left??0))},${-s/2+(t.padding??0)-o/2-(e.y-(e.top??0))})`),aN(t,g),t.intersect=function(e){return V.polygon(t,d,e)},r}var uM=b(()=>{i(),RN(),zI(),MN(),mt(hM,"linedWaveEdgedRect")});async function dM(e,t){var{labelStyles:r,nodeStyles:n}=Q(t);t.labelStyle=r;let{shapeSvg:i,bbox:a,label:s}=await nN(e,t,sN(t)),o=Math.max(a.width+2*(t.padding??0),t?.width??0),l=Math.max(a.height+2*(t.padding??0),t?.height??0),c=-o/2,h=-l/2,u=t.cssStyles,d=FI.svg(i),p=AN(t,{}),g=[{x:c-5,y:5+h},{x:c-5,y:h+l+5},{x:c+o-5,y:h+l+5},{x:c+o-5,y:h+l},{x:c+o,y:h+l},{x:c+o,y:h+l-5},{x:c+o+5,y:h+l-5},{x:c+o+5,y:h-5},{x:5+c,y:h-5},{x:5+c,y:h},{x:c,y:h},{x:c,y:5+h}],f=[{x:c,y:5+h},{x:c+o-5,y:5+h},{x:c+o-5,y:h+l},{x:c+o,y:h+l},{x:c+o,y:h},{x:c,y:h}],m=("handDrawn"!==t.look&&(p.roughness=0,p.fillStyle="solid"),eN(g)),y=d.path(m,p),v=eN(f),x=d.path(v,{...p,fill:"none"}),b=i.insert(()=>x,":first-child");return b.insert(()=>y,":first-child"),b.attr("class","basic label-container"),u&&"handDrawn"!==t.look&&b.selectAll("path").attr("style",u),n&&"handDrawn"!==t.look&&b.selectAll("path").attr("style",n),s.attr("transform",`translate(${-a.width/2-5-(a.x-(a.left??0))}, ${-a.height/2+5-(a.y-(a.top??0))})`),aN(t,b),t.intersect=function(e){return V.polygon(t,g,e)},i}var pM=b(()=>{i(),MN(),zI(),RN(),mt(dM,"multiRect")});async function gM(e,t){var{labelStyles:r,nodeStyles:n}=Q(t);t.labelStyle=r;let{shapeSvg:i,bbox:a,label:s}=await nN(e,t,sN(t)),o=Math.max(a.width+2*(t.padding??0),t?.width??0),l=Math.max(a.height+2*(t.padding??0),t?.height??0),c=l/4,h=l+c,u=-o/2,d=-h/2,p=t.cssStyles,g=tN(u-5,d+h+5,u+o-5,d+h+5,c,.8),f=g?.[g.length-1],m=[{x:u-5,y:5+d},{x:u-5,y:d+h+5},...g,{x:u+o-5,y:f.y-5},{x:u+o,y:f.y-5},{x:u+o,y:f.y-10},{x:u+o+5,y:f.y-10},{x:u+o+5,y:d-5},{x:5+u,y:d-5},{x:5+u,y:d},{x:u,y:d},{x:u,y:5+d}],y=[{x:u,y:5+d},{x:u+o-5,y:5+d},{x:u+o-5,y:f.y-5},{x:u+o,y:f.y-5},{x:u+o,y:d},{x:u,y:d}],v=FI.svg(i),x=AN(t,{}),b=("handDrawn"!==t.look&&(x.roughness=0,x.fillStyle="solid"),eN(m)),w=v.path(b,x),k=eN(y),T=v.path(k,x),E=i.insert(()=>w,":first-child");return E.insert(()=>T),E.attr("class","basic label-container"),p&&"handDrawn"!==t.look&&E.selectAll("path").attr("style",p),n&&"handDrawn"!==t.look&&E.selectAll("path").attr("style",n),E.attr("transform",`translate(0,${-c/2})`),s.attr("transform",`translate(${-a.width/2-5-(a.x-(a.left??0))}, ${-a.height/2+5-c/2-(a.y-(a.top??0))})`),aN(t,E),t.intersect=function(e){return V.polygon(t,m,e)},i}var fM=b(()=>{i(),RN(),zI(),MN(),mt(gM,"multiWaveEdgedRectangle")});async function mM(e,t,{config:{themeVariables:r}}){var{labelStyles:n,nodeStyles:i}=Q(t),{shapeSvg:n,bbox:e,label:a}=(t.labelStyle=n,t.useHtmlLabels||!1!==ar().flowchart?.htmlLabels||(t.centerLabel=!0),await nN(e,t,sN(t))),s=Math.max(e.width+2*(t.padding??0),t?.width??0),o=Math.max(e.height+2*(t.padding??0),t?.height??0),l=-s/2,c=-o/2,h=t.cssStyles,u=FI.svg(n),r=AN(t,{fill:r.noteBkgColor,stroke:r.noteBorderColor});"handDrawn"!==t.look&&(r.roughness=0,r.fillStyle="solid");let d=u.rectangle(l,c,s,o,r),p=n.insert(()=>d,":first-child");return p.attr("class","basic label-container"),h&&"handDrawn"!==t.look&&p.selectAll("path").attr("style",h),i&&"handDrawn"!==t.look&&p.selectAll("path").attr("style",i),a.attr("transform",`translate(${-e.width/2-(e.x-(e.left??0))}, ${-e.height/2-(e.y-(e.top??0))})`),aN(t,p),t.intersect=function(e){return V.rect(t,e)},n}var yM=b(()=>{zI(),RN(),MN(),i(),rn(),mt(mM,"note")});async function vM(e,i){var{labelStyles:t,nodeStyles:r}=Q(i);i.labelStyle=t;let{shapeSvg:a,bbox:n}=await nN(e,i,sN(i)),s=n.width+i.padding,o=n.height+i.padding,l=s+o,c=[{x:l/2,y:0},{x:l,y:-l/2},{x:l/2,y:-l},{x:0,y:-l/2}],h,u=i.cssStyles;if("handDrawn"===i.look){let e=FI.svg(a),t=AN(i,{}),r=xM(0,0,l),n=e.path(r,t);h=a.insert(()=>n,":first-child").attr("transform",`translate(${-l/2+.5}, ${l/2})`),u&&h.attr("style",u)}else(h=WI(a,l,l,c)).attr("transform",`translate(${-l/2+.5}, ${l/2})`);return r&&h.attr("style",r),aN(i,h),i.calcIntersect=function(e,t){var r=e.width;return{x:(e=V.polygon(e,[{x:r/2,y:0},{x:r,y:-r/2},{x:r/2,y:-r},{x:0,y:-r/2}],t)).x-.5,y:e.y-.5}},i.intersect=function(e){return this.calcIntersect(i,e)},a}var xM,bM=b(()=>{i(),RN(),MN(),zI(),HI(),xM=mt((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"),mt(vM,"question")});async function wM(e,t){var{labelStyles:r,nodeStyles:n}=Q(t);t.labelStyle=r;let{shapeSvg:i,bbox:a,label:s}=await nN(e,t,sN(t)),o=Math.max(a.width+(t.padding??0),t?.width??0),l=Math.max(a.height+(t.padding??0),t?.height??0),c=-o/2,h=-l/2,u=h/2,d=[{x:c+u,y:h},{x:c,y:0},{x:c+u,y:-h},{x:-c,y:-h},{x:-c,y:h}],p=t.cssStyles,g=FI.svg(i),f=AN(t,{}),m=("handDrawn"!==t.look&&(f.roughness=0,f.fillStyle="solid"),eN(d)),y=g.path(m,f),v=i.insert(()=>y,":first-child");return v.attr("class","basic label-container"),p&&"handDrawn"!==t.look&&v.selectAll("path").attr("style",p),n&&"handDrawn"!==t.look&&v.selectAll("path").attr("style",n),v.attr("transform",`translate(${-u/2},0)`),s.attr("transform",`translate(${-u/2-a.width/2-(a.x-(a.left??0))}, ${-a.height/2-(a.y-(a.top??0))})`),aN(t,v),t.intersect=function(e){return V.polygon(t,d,e)},i}var kM=b(()=>{i(),RN(),MN(),zI(),mt(wM,"rect_left_inv_arrow")});function TM(e,t){t&&e.attr("style",t)}async function EM(e){let t=H(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")),r=t.append("xhtml:div"),n=O(),i=e.label;e.label&&Ec(e.label)&&(i=await Sc(e.label.replace(L.lineBreakRegex,` +`),n));var a='<span class="'+(e.isNode?"nodeLabel":"edgeLabel")+'" '+(e.labelStyle?'style="'+e.labelStyle+'"':"")+">"+i+"</span>";return r.html(lc(a,n)),TM(r,e.labelStyle),r.style("display","inline-block"),r.style("padding-right","1px"),r.style("white-space","nowrap"),r.attr("xmlns","http://www.w3.org/1999/xhtml"),t.node()}var CM,_M,SM=b(()=>{i6(),Tu(),Oc(),e(),i_(),mt(TM,"applyStyle"),mt(EM,"addHtmlLabel"),CM=mt(async(e,t,r,n)=>{let i=e||"";if("object"==typeof i&&(i=i[0]),fc(O().flowchart.htmlLabels))return i=i.replace(/\\n|\n/g,"<br />"),D.info("vertexText"+i),EM({isNode:n,label:r_(i).replace(/fa[blrs]?:fa-[\w-]+/g,e=>`<i class='${e.replace(":"," ")}'></i>`),labelStyle:t&&t.replace("fill:","color:")});var a,s=document.createElementNS("http://www.w3.org/2000/svg","text");s.setAttribute("style",t.replace("color:","fill:"));for(a of"string"==typeof i?i.split(/\\n|\n|<br\s*\/?>/gi):Array.isArray(i)?i:[]){var o=document.createElementNS("http://www.w3.org/2000/svg","tspan");o.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),o.setAttribute("dy","1em"),o.setAttribute("x","0"),r?o.setAttribute("class","title-row"):o.setAttribute("class","row"),o.textContent=a.trim(),s.appendChild(o)}return s},"createLabel"),_M=CM});async function AM(i,a){var{labelStyles:e,nodeStyles:t}=Q(a);a.labelStyle=e;let r,s=(r=a.cssClasses?"node "+a.cssClasses:"node default",i.insert("g").attr("class",r).attr("id",a.domId||a.id)),n=s.insert("g"),o=s.insert("g").attr("class","label").attr("style",t),l=a.description,c=a.label,h=o.node().appendChild(await _M(c,a.labelStyle,!0,!0)),u={width:0,height:0};fc(O()?.flowchart?.htmlLabels)&&(e=h.children[0],i=H(h),u=e.getBoundingClientRect(),i.attr("width",u.width),i.attr("height",u.height)),D.info("Text 2",l);var e=l||[],i=h.getBBox(),d=(e=o.node().appendChild(await _M(e.join?e.join("<br/>"):e,a.labelStyle,!0,!0))).children[0],p=H(e),d=(u=d.getBoundingClientRect(),p.attr("width",u.width),p.attr("height",u.height),(a.padding||0)/2);H(e).attr("transform","translate( "+(u.width>i.width?0:(i.width-u.width)/2)+", "+(i.height+d+5)+")"),H(h).attr("transform","translate( "+(u.width<i.width?0:-(i.width-u.width)/2)+", 0)"),u=o.node().getBBox(),o.attr("transform","translate("+-u.width/2+", "+(-u.height/2-d+3)+")");let g=u.width+(a.padding||0),f=u.height+(a.padding||0),m=-u.width/2-d,y=-u.height/2-d,v,x;if("handDrawn"===a.look){let e=FI.svg(s),t=AN(a,{}),r=e.path($R(m,y,g,f,a.rx||0),t),n=e.line(-u.width/2-d,-u.height/2-d+i.height+d,u.width/2+d,-u.height/2-d+i.height+d,t);x=s.insert(()=>(D.debug("Rough node insert CXC",r),n),":first-child"),v=s.insert(()=>(D.debug("Rough node insert CXC",r),r),":first-child")}else v=n.insert("rect",":first-child"),x=n.insert("line"),v.attr("class","outer title-state").attr("style",t).attr("x",-u.width/2-d).attr("y",-u.height/2-d).attr("width",u.width+(a.padding||0)).attr("height",u.height+(a.padding||0)),x.attr("class","divider").attr("x1",-u.width/2-d).attr("x2",u.width/2+d).attr("y1",-u.height/2-d+i.height+d).attr("y2",-u.height/2-d+i.height+d);return aN(a,v),a.intersect=function(e){return V.rect(a,e)},s}var LM=b(()=>{i6(),Oc(),i(),SM(),RN(),MN(),zI(),Tu(),zR(),e(),mt(AM,"rectWithTitle")});function NM(e,t,r,n,i,a,s){var o=(e+r)/2,l=(t+n)/2,c=Math.atan2(n-t,r-e),h=Math.sqrt(((r-e)/2/i)**2+((n-t)/2/a)**2);if(1<h)throw new Error("The given radii are too small to create an arc between the points.");let u=Math.sqrt(1-h**2),d=o+u*a*Math.sin(c)*(s?-1:1),p=l-u*i*Math.cos(c)*(s?-1:1),g=Math.atan2((t-p)/a,(e-d)/i),f=Math.atan2((n-p)/a,(r-d)/i)-g;s&&f<0&&(f+=2*Math.PI),!s&&0<f&&(f-=2*Math.PI);var m=[];for(let e=0;e<20;e++){var y=g+e/19*f,v=d+i*Math.cos(y),y=p+a*Math.sin(y);m.push({x:v,y:y})}return m}async function IM(e,t){var{labelStyles:r,nodeStyles:n}=Q(t),{shapeSvg:r,bbox:e}=(t.labelStyle=r,await nN(e,t,sN(t))),i=t?.padding??0,a=t?.padding??0,i=(t?.width||e.width)+2*i,e=(t?.height||e.height)+2*a,a=t.radius||5,s=t.taper||5,o=t.cssStyles,l=FI.svg(r),c=AN(t,{});t.stroke&&(c.stroke=t.stroke),"handDrawn"!==t.look&&(c.roughness=0,c.fillStyle="solid");let h=[{x:-i/2+s,y:-e/2},{x:i/2-s,y:-e/2},...NM(i/2-s,-e/2,i/2,-e/2+s,a,a,!0),{x:i/2,y:-e/2+s},{x:i/2,y:e/2-s},...NM(i/2,e/2-s,i/2-s,e/2,a,a,!0),{x:i/2-s,y:e/2},{x:-i/2+s,y:e/2},...NM(-i/2+s,e/2,-i/2,e/2-s,a,a,!0),{x:-i/2,y:e/2-s},{x:-i/2,y:-e/2+s},...NM(-i/2,-e/2+s,-i/2+s,-e/2,a,a,!0)],u=eN(h),d=l.path(u,c),p=r.insert(()=>d,":first-child");return p.attr("class","basic label-container outer-path"),o&&"handDrawn"!==t.look&&p.selectChildren("path").attr("style",o),n&&"handDrawn"!==t.look&&p.selectChildren("path").attr("style",n),aN(t,p),t.intersect=function(e){return V.polygon(t,h,e)},r}var RM=b(()=>{i(),RN(),MN(),zI(),mt(NM,"generateArcPoints"),mt(IM,"roundedRect")});async function MM(e,t){var{labelStyles:r,nodeStyles:n}=Q(t),{shapeSvg:r,bbox:e,label:i}=(t.labelStyle=r,await nN(e,t,sN(t))),a=t?.padding??0,s=Math.max(e.width+2*(t.padding??0),t?.width??0),o=Math.max(e.height+2*(t.padding??0),t?.height??0),l=-e.width/2-a,a=-e.height/2-a,c=t.cssStyles,h=FI.svg(r),u=AN(t,{});"handDrawn"!==t.look&&(u.roughness=0,u.fillStyle="solid");let d=[{x:l,y:a},{x:l+s+8,y:a},{x:l+s+8,y:a+o},{x:l-8,y:a+o},{x:l-8,y:a},{x:l,y:a},{x:l,y:a+o}],p=h.polygon(d.map(e=>[e.x,e.y]),u),g=r.insert(()=>p,":first-child");return g.attr("class","basic label-container").attr("style",SC(c)),n&&"handDrawn"!==t.look&&g.selectAll("path").attr("style",n),c&&"handDrawn"!==t.look&&g.selectAll("path").attr("style",n),i.attr("transform",`translate(${-s/2+4+(t.padding??0)-(e.x-(e.left??0))},${-o/2+(t.padding??0)-(e.y-(e.top??0))})`),aN(t,g),t.intersect=function(e){return V.rect(t,e)},r}var DM=b(()=>{i(),RN(),MN(),zI(),i_(),mt(MM,"shadedProcess")});async function OM(e,t){var{labelStyles:r,nodeStyles:n}=Q(t),{shapeSvg:r,bbox:e,label:i}=(t.labelStyle=r,await nN(e,t,sN(t))),a=Math.max(e.width+2*(t.padding??0),t?.width??0),s=Math.max(e.height+2*(t.padding??0),t?.height??0),o=-a/2,l=-s/2,c=t.cssStyles,h=FI.svg(r),u=AN(t,{});"handDrawn"!==t.look&&(u.roughness=0,u.fillStyle="solid");let d=[{x:o,y:l},{x:o,y:l+s},{x:o+a,y:l+s},{x:o+a,y:l-s/2}],p=eN(d),g=h.path(p,u),f=r.insert(()=>g,":first-child");return f.attr("class","basic label-container"),c&&"handDrawn"!==t.look&&f.selectChildren("path").attr("style",c),n&&"handDrawn"!==t.look&&f.selectChildren("path").attr("style",n),f.attr("transform",`translate(0, ${s/4})`),i.attr("transform",`translate(${-a/2+(t.padding??0)-(e.x-(e.left??0))}, ${-s/4+(t.padding??0)-(e.y-(e.top??0))})`),aN(t,f),t.intersect=function(e){return V.polygon(t,d,e)},r}var PM=b(()=>{i(),RN(),MN(),zI(),mt(OM,"slopedRect")});async function BM(e,t){return XR(e,t,{rx:0,ry:0,classes:"",labelPaddingX:t.labelPaddingX??2*(t?.padding||0),labelPaddingY:+(t?.padding||0)})}var $M=b(()=>{KR(),mt(BM,"squareRect")});async function FM(e,t){var{labelStyles:r,nodeStyles:n}=Q(t),{shapeSvg:r,bbox:e}=(t.labelStyle=r,await nN(e,t,sN(t))),i=e.height+t.padding,e=e.width+i/4+t.padding,a=i/2,s=t.cssStyles,o=FI.svg(r),l=AN(t,{});"handDrawn"!==t.look&&(l.roughness=0,l.fillStyle="solid");let c=[{x:-e/2+a,y:-i/2},{x:e/2-a,y:-i/2},...rN(-e/2+a,0,a,50,90,270),{x:e/2-a,y:i/2},...rN(e/2-a,0,a,50,270,450)],h=eN(c),u=o.path(h,l),d=r.insert(()=>u,":first-child");return d.attr("class","basic label-container outer-path"),s&&"handDrawn"!==t.look&&d.selectChildren("path").attr("style",s),n&&"handDrawn"!==t.look&&d.selectChildren("path").attr("style",n),aN(t,d),t.intersect=function(e){return V.polygon(t,c,e)},r}var zM=b(()=>{i(),RN(),MN(),zI(),mt(FM,"stadium")});async function GM(e,t){return XR(e,t,{rx:5,ry:5,classes:"flowchart-node"})}var UM=b(()=>{KR(),mt(GM,"state")});function qM(e,t,{config:{themeVariables:r}}){var{labelStyles:n,nodeStyles:i}=Q(t),n=(t.labelStyle=n,t.cssStyles),{lineColor:r,stateBorder:a,nodeBorder:s}=r,e=e.insert("g").attr("class","node default").attr("id",t.domId||t.id),o=FI.svg(e),l=AN(t,{});"handDrawn"!==t.look&&(l.roughness=0,l.fillStyle="solid");let c=o.circle(0,0,14,{...l,stroke:r,strokeWidth:2}),h=a??s,u=o.circle(0,0,5,{...l,fill:h,stroke:h,strokeWidth:2,fillStyle:"solid"}),d=e.insert(()=>c,":first-child");return d.insert(()=>u),n&&d.selectAll("path").attr("style",n),i&&d.selectAll("path").attr("style",i),aN(t,d),t.intersect=function(e){return V.circle(t,7,e)},e}var jM=b(()=>{zI(),RN(),MN(),i(),mt(qM,"stateEnd")});function YM(e,t,{config:{themeVariables:r}}){let n=r.lineColor,i=e.insert("g").attr("class","node default").attr("id",t.domId||t.id),a;if("handDrawn"===t.look){let e=FI.svg(i).circle(0,0,14,EN(n));(a=i.insert(()=>e)).attr("class","state-start").attr("r",7).attr("width",14).attr("height",14)}else(a=i.insert("circle",":first-child")).attr("class","state-start").attr("r",7).attr("width",14).attr("height",14);return aN(t,a),t.intersect=function(e){return V.circle(t,7,e)},i}var WM=b(()=>{zI(),RN(),MN(),i(),mt(YM,"stateStart")});async function HM(a,s){var{labelStyles:o,nodeStyles:e}=Q(s);s.labelStyle=o;let{shapeSvg:l,bbox:t}=await nN(a,s,sN(s)),r=(s?.padding||0)/2,c=t.width+s.padding,h=t.height+s.padding,u=-t.width/2-r,d=-t.height/2-r,n=[{x:0,y:0},{x:c,y:0},{x:c,y:-h},{x:0,y:-h},{x:0,y:0},{x:-8,y:0},{x:c+8,y:0},{x:c+8,y:-h},{x:-8,y:-h},{x:-8,y:0}];if("handDrawn"===s.look){let e=FI.svg(l),t=AN(s,{}),r=e.rectangle(u-8,d,c+16,h,t),n=e.line(u,d,u,d+h,t),i=e.line(u+c,d,u+c,d+h,t);l.insert(()=>n,":first-child"),l.insert(()=>i,":first-child"),o=l.insert(()=>r,":first-child"),a=s.cssStyles,o.attr("class","basic label-container").attr("style",SC(a)),aN(s,o)}else a=WI(l,c,h,n),e&&a.attr("style",e),aN(s,a);return s.intersect=function(e){return V.polygon(s,n,e)},l}var VM=b(()=>{i(),RN(),MN(),zI(),HI(),i_(),mt(HM,"subroutine")});async function XM(e,t){var{labelStyles:r,nodeStyles:n}=Q(t);t.labelStyle=r;let{shapeSvg:i,bbox:a}=await nN(e,t,sN(t)),s=Math.max(a.width+2*(t.padding??0),t?.width??0),o=Math.max(a.height+2*(t.padding??0),t?.height??0),l=-s/2,c=-o/2,h=.2*o,u=.2*o,d=t.cssStyles,p=FI.svg(i),g=AN(t,{}),f=[{x:l-h/2,y:c},{x:l+s+h/2,y:c},{x:l+s+h/2,y:c+o},{x:l-h/2,y:c+o}],m=[{x:l+s-h/2,y:c+o},{x:l+s+h/2,y:c+o},{x:l+s+h/2,y:c+o-u}],y=("handDrawn"!==t.look&&(g.roughness=0,g.fillStyle="solid"),eN(f)),v=p.path(y,g),x=eN(m),b=p.path(x,{...g,fillStyle:"solid"}),w=i.insert(()=>b,":first-child");return w.insert(()=>v,":first-child"),w.attr("class","basic label-container"),d&&"handDrawn"!==t.look&&w.selectAll("path").attr("style",d),n&&"handDrawn"!==t.look&&w.selectAll("path").attr("style",n),aN(t,w),t.intersect=function(e){return V.polygon(t,f,e)},i}var KM=b(()=>{i(),MN(),zI(),RN(),mt(XM,"taggedRect")});async function ZM(e,t){var{labelStyles:r,nodeStyles:n}=Q(t),{shapeSvg:r,bbox:e,label:i}=(t.labelStyle=r,await nN(e,t,sN(t))),a=Math.max(e.width+2*(t.padding??0),t?.width??0),s=Math.max(e.height+2*(t.padding??0),t?.height??0),o=s/4,l=.2*a,c=.2*s,h=s+o,u=t.cssStyles,d=FI.svg(r),p=AN(t,{});"handDrawn"!==t.look&&(p.roughness=0,p.fillStyle="solid");let g=[{x:-a/2-a/2*.1,y:h/2},...tN(-a/2-a/2*.1,h/2,a/2+a/2*.1,h/2,o,.8),{x:a/2+a/2*.1,y:-h/2},{x:-a/2-a/2*.1,y:-h/2}],f=-a/2+a/2*.1,m=-h/2-.4*c,y=[{x:f+a-l,y:1.4*(m+s)},{x:f+a,y:m+s-c},{x:f+a,y:.9*(m+s)},...tN(f+a,1.3*(m+s),f+a-l,1.5*(m+s),.03*-s,.5)],v=eN(g),x=d.path(v,p),b=eN(y),w=d.path(b,{...p,fillStyle:"solid"}),k=r.insert(()=>w,":first-child");return k.insert(()=>x,":first-child"),k.attr("class","basic label-container"),u&&"handDrawn"!==t.look&&k.selectAll("path").attr("style",u),n&&"handDrawn"!==t.look&&k.selectAll("path").attr("style",n),k.attr("transform",`translate(0,${-o/2})`),i.attr("transform",`translate(${-a/2+(t.padding??0)-(e.x-(e.left??0))},${-s/2+(t.padding??0)-o/2-(e.y-(e.top??0))})`),aN(t,k),t.intersect=function(e){return V.polygon(t,g,e)},r}var QM=b(()=>{i(),RN(),zI(),MN(),mt(ZM,"taggedWaveEdgedRectangle")});async function JM(e,t){var{labelStyles:r,nodeStyles:n}=Q(t),{shapeSvg:r,bbox:e}=(t.labelStyle=r,await nN(e,t,sN(t))),i=Math.max(e.width+t.padding,t?.width||0),a=-i/2,s=-(e=Math.max(e.height+t.padding,t?.height||0))/2,o=r.insert("rect",":first-child");return o.attr("class","text").attr("style",n).attr("rx",0).attr("ry",0).attr("x",a).attr("y",s).attr("width",i).attr("height",e),aN(t,o),t.intersect=function(e){return V.rect(t,e)},r}var eD=b(()=>{i(),RN(),MN(),mt(JM,"text")});async function tD(e,a){var{labelStyles:t,nodeStyles:r}=Q(a);a.labelStyle=t;let{shapeSvg:s,bbox:n,label:i,halfPadding:o}=await nN(e,a,sN(a)),l="neo"===a.look?2*o:o,c=n.height+l,h=c/2,u=h/(2.5+c/50),d=n.width+u+l,p=a.cssStyles,g;if("handDrawn"===a.look){let e=FI.svg(s),t=nD(0,0,d,c,u,h),r=iD(0,0,d,c,u,h),n=e.path(t,AN(a,{})),i=e.path(r,AN(a,{fill:"none"}));g=s.insert(()=>i,":first-child"),(g=s.insert(()=>n,":first-child")).attr("class","basic label-container"),p&&g.attr("style",p)}else t=rD(0,0,d,c,u,h),(g=s.insert("path",":first-child").attr("d",t).attr("class","basic label-container").attr("style",SC(p)).attr("style",r)).attr("class","basic label-container"),p&&g.selectAll("path").attr("style",p),r&&g.selectAll("path").attr("style",r);return g.attr("label-offset-x",u),g.attr("transform",`translate(${-d/2}, ${c/2} )`),i.attr("transform",`translate(${-n.width/2-u-(n.x-(n.left??0))}, ${-n.height/2-(n.y-(n.top??0))})`),aN(a,g),a.intersect=function(t){var r=V.rect(a,t),n=r.y-(a.y??0);if(0!=h&&(Math.abs(n)<(a.height??0)/2||Math.abs(n)==(a.height??0)/2&&Math.abs(r.x-(a.x??0))>(a.width??0)/2-u)){let e=u*u*(1-n*n/(h*h));0!=e&&(e=Math.sqrt(Math.abs(e))),e=u-e,0<t.x-(a.x??0)&&(e=-e),r.x+=e}return r},s}var rD,nD,iD,aD=b(()=>{i(),MN(),zI(),RN(),i_(),rD=mt((e,t,r,n,i,a)=>`M${e},${t} + a${i},${a} 0,0,1 0,${-n} + l${r},0 + a${i},${a} 0,0,1 0,${n} + M${r},${-n} + a${i},${a} 0,0,0 0,${n} + l${-r},0`,"createCylinderPathD"),nD=mt((e,t,r,n,i,a)=>[`M${e},`+t,`M${e+r},`+t,`a${i},${a} 0,0,0 0,`+-n,`l${-r},0`,`a${i},${a} 0,0,0 0,`+n,`l${r},0`].join(" "),"createOuterCylinderPathD"),iD=mt((e,t,r,n,i,a)=>[`M${e+r/2},`+-n/2,`a${i},${a} 0,0,0 0,`+n].join(" "),"createInnerCylinderPathD"),mt(tD,"tiltedCylinder")});async function sD(e,i){var{labelStyles:t,nodeStyles:r}=Q(i);i.labelStyle=t;let{shapeSvg:a,bbox:n}=await nN(e,i,sN(i)),s=n.width+i.padding,o=n.height+i.padding,l=[{x:-3*o/6,y:0},{x:s+3*o/6,y:0},{x:s,y:-o},{x:0,y:-o}],c,h=i.cssStyles;if("handDrawn"===i.look){let e=FI.svg(a),t=AN(i,{}),r=eN(l),n=e.path(r,t);c=a.insert(()=>n,":first-child").attr("transform",`translate(${-s/2}, ${o/2})`),h&&c.attr("style",h)}else c=WI(a,s,o,l);return r&&c.attr("style",r),i.width=s,i.height=o,aN(i,c),i.intersect=function(e){return V.polygon(i,l,e)},a}var oD=b(()=>{i(),RN(),MN(),zI(),HI(),mt(sD,"trapezoid")});async function lD(e,t){var{labelStyles:r,nodeStyles:n}=Q(t),{shapeSvg:r,bbox:e}=(t.labelStyle=r,await nN(e,t,sN(t))),i=Math.max(60,e.width+2*(t.padding??0),t?.width??0),e=Math.max(20,e.height+2*(t.padding??0),t?.height??0),a=t.cssStyles,s=FI.svg(r),o=AN(t,{});"handDrawn"!==t.look&&(o.roughness=0,o.fillStyle="solid");let l=[{x:-i/2*.8,y:-e/2},{x:i/2*.8,y:-e/2},{x:i/2,y:-e/2*.6},{x:i/2,y:e/2},{x:-i/2,y:e/2},{x:-i/2,y:-e/2*.6}],c=eN(l),h=s.path(c,o),u=r.insert(()=>h,":first-child");return u.attr("class","basic label-container"),a&&"handDrawn"!==t.look&&u.selectChildren("path").attr("style",a),n&&"handDrawn"!==t.look&&u.selectChildren("path").attr("style",n),aN(t,u),t.intersect=function(e){return V.polygon(t,l,e)},r}var cD=b(()=>{i(),RN(),MN(),zI(),mt(lD,"trapezoidalPentagon")});async function hD(e,t){var{labelStyles:r,nodeStyles:n}=Q(t);t.labelStyle=r;let{shapeSvg:i,bbox:a,label:s}=await nN(e,t,sN(t)),o=fc(O().flowchart?.htmlLabels),l=a.width+(t.padding??0),c=l+a.height,h=l+a.height,u=[{x:0,y:0},{x:h,y:0},{x:h/2,y:-c}],d=t.cssStyles,p=FI.svg(i),g=AN(t,{}),f=("handDrawn"!==t.look&&(g.roughness=0,g.fillStyle="solid"),eN(u)),m=p.path(f,g),y=i.insert(()=>m,":first-child").attr("transform",`translate(${-c/2}, ${c/2})`);return d&&"handDrawn"!==t.look&&y.selectChildren("path").attr("style",d),n&&"handDrawn"!==t.look&&y.selectChildren("path").attr("style",n),t.width=l,t.height=c,aN(t,y),s.attr("transform",`translate(${-a.width/2-(a.x-(a.left??0))}, ${c/2-(a.height+(t.padding??0)/(o?2:1)-(a.y-(a.top??0)))})`),t.intersect=function(e){return D.info("Triangle intersect",t,u,e),V.polygon(t,u,e)},i}var uD=b(()=>{e(),i(),RN(),MN(),zI(),i(),Oc(),Tu(),mt(hD,"triangle")});async function dD(e,t){var{labelStyles:r,nodeStyles:n}=Q(t),{shapeSvg:r,bbox:e,label:i}=(t.labelStyle=r,await nN(e,t,sN(t))),a=Math.max(e.width+2*(t.padding??0),t?.width??0),s=Math.max(e.height+2*(t.padding??0),t?.height??0),o=s/8,l=s+o,c=t.cssStyles,h=0<(h=70-a)?h/2:0,u=FI.svg(r),d=AN(t,{});"handDrawn"!==t.look&&(d.roughness=0,d.fillStyle="solid");let p=[{x:-a/2-h,y:l/2},...tN(-a/2-h,l/2,a/2+h,l/2,o,.8),{x:a/2+h,y:-l/2},{x:-a/2-h,y:-l/2}],g=eN(p),f=u.path(g,d),m=r.insert(()=>f,":first-child");return m.attr("class","basic label-container"),c&&"handDrawn"!==t.look&&m.selectAll("path").attr("style",c),n&&"handDrawn"!==t.look&&m.selectAll("path").attr("style",n),m.attr("transform",`translate(0,${-o/2})`),i.attr("transform",`translate(${-a/2+(t.padding??0)-(e.x-(e.left??0))},${-s/2+(t.padding??0)-o-(e.y-(e.top??0))})`),aN(t,m),t.intersect=function(e){return V.polygon(t,p,e)},r}var pD=b(()=>{i(),RN(),zI(),MN(),mt(dD,"waveEdgedRectangle")});async function gD(e,t){var{labelStyles:r,nodeStyles:n}=Q(t);t.labelStyle=r;let{shapeSvg:i,bbox:a}=await nN(e,t,sN(t)),s=Math.max(a.width+2*(t.padding??0),t?.width??0),o=Math.max(a.height+2*(t.padding??0),t?.height??0),l=s/o,c=s,h=o;c>h*l?h=c/l:c=h*l,c=Math.max(c,100),h=Math.max(h,50);var r=Math.min(.2*h,h/4),e=h+2*r,u=t.cssStyles,d=FI.svg(i),p=AN(t,{});"handDrawn"!==t.look&&(p.roughness=0,p.fillStyle="solid");let g=[{x:-c/2,y:e/2},...tN(-c/2,e/2,c/2,e/2,r,1),{x:c/2,y:-e/2},...tN(c/2,-e/2,-c/2,-e/2,r,-1)],f=eN(g),m=d.path(f,p),y=i.insert(()=>m,":first-child");return y.attr("class","basic label-container"),u&&"handDrawn"!==t.look&&y.selectAll("path").attr("style",u),n&&"handDrawn"!==t.look&&y.selectAll("path").attr("style",n),aN(t,y),t.intersect=function(e){return V.polygon(t,g,e)},i}var fD=b(()=>{i(),RN(),MN(),zI(),mt(gD,"waveRectangle")});async function mD(e,t){var{labelStyles:r,nodeStyles:n}=Q(t);t.labelStyle=r;let{shapeSvg:i,bbox:a,label:s}=await nN(e,t,sN(t)),o=Math.max(a.width+2*(t.padding??0),t?.width??0),l=Math.max(a.height+2*(t.padding??0),t?.height??0),c=-o/2,h=-l/2,u=t.cssStyles,d=FI.svg(i),p=AN(t,{}),g=[{x:c-5,y:h-5},{x:c-5,y:h+l},{x:c+o,y:h+l},{x:c+o,y:h-5}],f=`M${c-5},${h-5} L${c+o},${h-5} L${c+o},${h+l} L${c-5},${h+l} L${c-5},${h-5} + M${c-5},${h} L${c+o},${h} + M${c},${h-5} L${c},`+(h+l),m=("handDrawn"!==t.look&&(p.roughness=0,p.fillStyle="solid"),d.path(f,p)),y=i.insert(()=>m,":first-child");return y.attr("transform","translate(2.5, 2.5)"),y.attr("class","basic label-container"),u&&"handDrawn"!==t.look&&y.selectAll("path").attr("style",u),n&&"handDrawn"!==t.look&&y.selectAll("path").attr("style",n),s.attr("transform",`translate(${-a.width/2+2.5-(a.x-(a.left??0))}, ${-a.height/2+2.5-(a.y-(a.top??0))})`),aN(t,y),t.intersect=function(e){return V.polygon(t,g,e)},i}var yD=b(()=>{i(),MN(),zI(),RN(),mt(mD,"windowPane")});async function vD(e,t){var r,n=t,i=(n.alias&&(t.label=n.alias),"handDrawn"===t.look&&(A=(A=ar().themeVariables).background,await vD(e,{...t,id:t.id+"-background",look:"default",cssStyles:["stroke: none","fill: "+A]})),ar());t.useHtmlLabels=i.htmlLabels;let o=i.er?.diagramPadding??10,l=i.er?.entityPadding??6,a=t.cssStyles,{labelStyles:s,nodeStyles:c}=Q(t);if(0===n.attributes.length&&t.label)return A={rx:0,ry:0,labelPaddingX:o,labelPaddingY:1.5*o,classes:""},EC(t.label,i)+2*A.labelPaddingX<i.er.minEntityWidth&&(t.width=i.er.minEntityWidth),A=await XR(e,t,A),fc(i.htmlLabels)||(E=(S=A.select("text")).node()?.getBBox(),S.attr("transform",`translate(${-E.width/2}, 0)`)),A;i.htmlLabels||(o*=1.25,l*=1.25);let h=sN(t),u=(h=h||"node default",e.insert("g").attr("class",h).attr("id",t.domId||t.id)),d=await xD(u,t.label??"",i,0,0,["name"],s),p=(d.height+=l,0),g=[],f=[],m=0,y=0,v=0,x=0,b=!0,w=!0;for(r of n.attributes){var k=await xD(u,r.type,i,0,p,["attribute-type"],s),P=(m=Math.max(m,k.width+o),await xD(u,r.name,i,0,p,["attribute-name"],s)),B=(y=Math.max(y,P.width+o),await xD(u,r.keys.join(),i,0,p,["attribute-keys"],s)),$=(v=Math.max(v,B.width+o),await xD(u,r.comment,i,0,p,["attribute-comment"],s)),k=(x=Math.max(x,$.width+o),Math.max(k.height,P.height,B.height,$.height)+l);f.push({yOffset:p,rowHeight:k}),p+=k}let T=4;v<=o&&(b=!1,v=0,T--),x<=o&&(w=!1,x=0,T--);var E,F,C,_,S=u.node().getBBox(),A=(0<d.width+2*o-(m+y+v+x)&&(E=d.width+2*o-(m+y+v+x),m+=E/T,y+=E/T,0<v&&(v+=E/T),0<x)&&(x+=E/T),m+y+v+x),L=FI.svg(u),N=AN(t,{});"handDrawn"!==t.look&&(N.roughness=0,N.fillStyle="solid");let z=0,I=(0<f.length&&(z=f.reduce((e,t)=>e+(t?.rowHeight??0),0)),Math.max(S.width+2*o,t?.width||0,A)),R=Math.max((z??0)+d.height,t?.height||0),M=-I/2,D=-R/2,G=(u.selectAll("g:not(:first-child)").each((e,t,r)=>{let n=H(r[t]),i=n.attr("transform"),a=0,s=0;i&&(r=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(i))&&(a=parseFloat(r[1]),s=parseFloat(r[2]),n.attr("class").includes("attribute-name")?a+=m:n.attr("class").includes("attribute-keys")?a+=m+y:n.attr("class").includes("attribute-comment")&&(a+=m+y+v)),n.attr("transform",`translate(${M+o/2+a}, ${s+D+d.height+l/2})`)}),u.select(".name").attr("transform","translate("+-d.width/2+", "+(D+l/2)+")"),L.rectangle(M,D,I,R,N)),U=u.insert(()=>G,":first-child").attr("style",a.join("")),q=ar().themeVariables,{rowEven:j,rowOdd:Y,nodeBorder:W}=q;g.push(0);for([F,C]of f.entries()){let e=(F+1)%2==0&&0!==C.yOffset,t=L.rectangle(M,d.height+D+C?.yOffset,I,C?.rowHeight,{...N,fill:e?j:Y,stroke:W});u.insert(()=>t,"g.label").attr("style",a.join("")).attr("class","row-rect-"+(e?"even":"odd"))}let O=L.line(M,d.height+D,I+M,d.height+D,N);u.insert(()=>O).attr("class","divider"),O=L.line(m+M,d.height+D,m+M,R+D,N),u.insert(()=>O).attr("class","divider"),b&&(O=L.line(m+y+M,d.height+D,m+y+M,R+D,N),u.insert(()=>O).attr("class","divider")),w&&(O=L.line(m+y+v+M,d.height+D,m+y+v+M,R+D,N),u.insert(()=>O).attr("class","divider"));for(_ of g)O=L.line(M,d.height+D+_,I+M,d.height+D+_,N),u.insert(()=>O).attr("class","divider");return aN(t,U),c&&"handDrawn"!==t.look&&(e=c.split(";")?.filter(e=>e.includes("stroke"))?.map(e=>""+e).join("; "),u.selectAll("path").attr("style",e??""),u.selectAll(".row-rect-even path").attr("style",c)),t.intersect=function(e){return V.rect(t,e)},u}async function xD(e,t,r,n=0,i=0,a=[],s=""){if(e=e.insert("g").attr("class","label "+a.join(" ")).attr("transform",`translate(${n}, ${i})`).attr("style",s),t!==vc(t)&&(t=(t=vc(t)).replaceAll("<","<").replaceAll(">",">")),a=e.node().appendChild(await QL(e,t,{width:EC(t,r)+100,style:s,useHtmlLabels:r.htmlLabels},r)),t.includes("<")||t.includes(">")){let e=a.children[0];for(e.textContent=e.textContent.replaceAll("<","<").replaceAll(">",">");e.childNodes[0];)(e=e.childNodes[0]).textContent=e.textContent.replaceAll("<","<").replaceAll(">",">")}let o=a.getBBox();return fc(r.htmlLabels)&&((n=a.children[0]).style.textAlign="start",i=H(a),o=n.getBoundingClientRect(),i.attr("width",o.width),i.attr("height",o.height)),o}var bD=b(()=>{i(),RN(),MN(),zI(),KR(),rn(),JL(),Oc(),i6(),i_(),mt(vD,"erBox"),mt(xD,"addText")});async function wD(e,t,r,n,i=r.class.padding??12){let a=n?0:3,s=e.insert("g").attr("class",sN(t)).attr("id",t.domId||t.id),o=null,l=null,c=null,h=null,u=0,d,p=0;var g,f;o=s.insert("g").attr("class","annotation-group text"),0<t.annotations.length&&(n=t.annotations[0],await kD(o,{text:`«${n}»`},0),u=o.node().getBBox().height),await kD(l=s.insert("g").attr("class","label-group text"),t,0,["font-weight: bolder"]),d=(e=l.node().getBBox()).height,c=s.insert("g").attr("class","members-group text");let m=0;for(g of t.members){var y=await kD(c,g,m,[g.parseClassifier()]);m+=y+a}(p=c.node().getBBox().height)<=0&&(p=i/2),h=s.insert("g").attr("class","methods-group text");let v=0;for(f of t.methods){var x=await kD(h,f,v,[f.parseClassifier()]);v+=x+a}return s.node().getBBox(),null!==o&&(n=o.node().getBBox(),o.attr("transform",`translate(${-n.width/2})`)),l.attr("transform",`translate(${-e.width/2}, ${u})`),s.node().getBBox(),c.attr("transform",`translate(0, ${u+d+2*i})`),s.node().getBBox(),h.attr("transform",`translate(0, ${u+d+(p?p+4*i:2*i)})`),t=s.node().getBBox(),{shapeSvg:s,bbox:t}}async function kD(e,t,r,n=[]){let i=e.insert("g").attr("class","label").attr("style",n.join("; ")),a=ar(),s="useHtmlLabels"in t?t.useHtmlLabels:fc(a.htmlLabels)??!0,o="",l=(o="text"in t?t.text:t.label,!s&&o.startsWith("\\")&&(o=o.substring(1)),Ec(o)&&(s=!0),await QL(i,_h(r_(o)),{width:EC(o,a)+50,classes:"markdown-node-label",useHtmlLabels:s},a)),c,h=1;if(s){var e=l.children[0],t=H(l),u=(h=e.innerHTML.split("<br>").length,e.innerHTML.includes("</math>")&&(h+=e.innerHTML.split("<mrow>").length-1),e.getElementsByTagName("img"));if(u){let n=""===o.replace(/<img[^>]*>/g,"").trim();await Promise.all([...u].map(r=>new Promise(t=>{function e(){var e;r.style.display="flex",r.style.flexDirection="column",n?(e=a.fontSize?.toString()??window.getComputedStyle(document.body).fontSize,e=5*parseInt(e,10)+"px",r.style.minWidth=e,r.style.maxWidth=e):r.style.width="100%",t(r)}mt(e,"setupImage"),setTimeout(()=>{r.complete&&e()}),r.addEventListener("error",e),r.addEventListener("load",e)})))}c=e.getBoundingClientRect(),t.attr("width",c.width),t.attr("height",c.height)}else n.includes("font-weight: bolder")&&H(l).selectAll("tspan").attr("font-weight",""),h=l.children.length,u=l.children[0],""!==l.textContent&&!l.textContent.includes(">")||(u.textContent=o[0]+o.substring(1).replaceAll(">",">").replaceAll("<","<").trim()," "!==o[1])||(u.textContent=u.textContent[0]+" "+u.textContent.substring(1)),"undefined"===u.textContent&&(u.textContent=""),c=l.getBBox();return i.attr("transform","translate(0,"+(-c.height/(2*h)+r)+")"),c.height}var TD=b(()=>{i6(),rn(),i(),i_(),Tu(),JL(),Oc(),mt(wD,"textHelper"),mt(kD,"addText")});async function ED(t,r){let e=O(),s=e.class.padding??12,n=s,o=r.useHtmlLabels??fc(e.htmlLabels)??!0,l=r,{shapeSvg:c,bbox:i}=(l.annotations=l.annotations??[],l.members=l.members??[],l.methods=l.methods??[],await wD(t,r,e,o,n)),{labelStyles:a,nodeStyles:h}=Q(r),u=(r.labelStyle=a,r.cssStyles=l.styles||"",t=l.styles?.join(";")||h||"",r.cssStyles||(r.cssStyles=t.replaceAll("!important","").split(";")),0===l.members.length&&0===l.methods.length&&!e.class?.hideEmptyMembersBox),d=FI.svg(c),p=AN(r,{}),g=("handDrawn"!==r.look&&(p.roughness=0,p.fillStyle="solid"),i.width),f=i.height,m=(0===l.members.length&&0===l.methods.length?f+=n:0<l.members.length&&0===l.methods.length&&(f+=2*n),-g/2),y=-f/2,v=d.rectangle(m-s,y-s-(u?s:0===l.members.length&&0===l.methods.length?-s/2:0),g+2*s,f+2*s+(u?2*s:0===l.members.length&&0===l.methods.length?-s:0),p),x=c.insert(()=>v,":first-child");x.attr("class","basic label-container");var b=x.node().getBBox(),w=(c.selectAll(".text").each((e,t,r)=>{let n=(t=H(r[t])).attr("transform"),i=(n&&(r=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(n))?parseFloat(r[2]):0)+y+s-(u?s:0===l.members.length&&0===l.methods.length?-s/2:0),a=(o||(i-=4),m);(t.attr("class").includes("label-group")||t.attr("class").includes("annotation-group"))&&(a=-t.node()?.getBBox().width/2||0,c.selectAll("text").each(function(e,t,r){"middle"===window.getComputedStyle(r[t]).textAnchor&&(a=0)})),t.attr("transform",`translate(${a}, ${i})`)}),c.select(".annotation-group").node().getBBox().height-(u?s/2:0)||0),k=c.select(".label-group").node().getBBox().height-(u?s/2:0)||0,T=c.select(".members-group").node().getBBox().height-(u?s/2:0)||0;if(0<l.members.length||0<l.methods.length||u){let e=d.line(b.x,w+k+y+s,b.x+b.width,w+k+y+s,p);c.insert(()=>e).attr("class","divider").attr("style",t)}if(u||0<l.members.length||0<l.methods.length){let e=d.line(b.x,w+k+T+y+2*n+s,b.x+b.width,w+k+T+y+s+2*n,p);c.insert(()=>e).attr("class","divider").attr("style",t)}return"handDrawn"!==l.look&&c.selectAll("path").attr("style",t),x.select(":nth-child(2)").attr("style",t),c.selectAll(".divider").select("path").attr("style",t),r.labelStyle?c.selectAll("span").attr("style",r.labelStyle):c.selectAll("span").attr("style",t),o||((w=(b=RegExp(/color\s*:\s*([^;]*)/)).exec(t))?(k=w[0].replace("color","fill"),c.selectAll("tspan").attr("style",k)):a&&(T=b.exec(a))&&(t=T[0].replace("color","fill"),c.selectAll("tspan").attr("style",t))),aN(r,x),r.intersect=function(e){return V.rect(r,e)},c}var CD=b(()=>{i(),Tu(),i6(),zI(),MN(),RN(),TD(),Oc(),mt(ED,"classBox")});async function _D(e,t){var{labelStyles:r,nodeStyles:n}=Q(t);t.labelStyle=r;let i=t,a=t,s="verifyMethod"in t,o=sN(t),l=e.insert("g").attr("class",o).attr("id",t.domId??t.id),c,h=c=s?await SD(l,`<<${i.type}>>`,0,t.labelStyle):await SD(l,"<<Element>>",0,t.labelStyle),u=await SD(l,i.name,h,t.labelStyle+"; font-weight: bold;"),d=(h+=u+20,s?(r=await SD(l,i.requirementId?"ID: "+i.requirementId:"",h,t.labelStyle),h+=r,e=await SD(l,i.text?"Text: "+i.text:"",h,t.labelStyle),h+=e,r=await SD(l,i.risk?"Risk: "+i.risk:"",h,t.labelStyle),h+=r,await SD(l,i.verifyMethod?"Verification: "+i.verifyMethod:"",h,t.labelStyle)):(e=await SD(l,a.type?"Type: "+a.type:"",h,t.labelStyle),h+=e,await SD(l,a.docRef?"Doc Ref: "+a.docRef:"",h,t.labelStyle)),(l.node()?.getBBox().width??200)+20),p=(l.node()?.getBBox().height??200)+20,g=-d/2,f=-p/2,m=FI.svg(l),y=AN(t,{}),v=("handDrawn"!==t.look&&(y.roughness=0,y.fillStyle="solid"),m.rectangle(g,f,d,p,y)),x=l.insert(()=>v,":first-child");if(x.attr("class","basic label-container").attr("style",n),l.selectAll(".label").each((e,t,r)=>{let n=H(r[t]),i=n.attr("transform"),a=0,s=0,o=(i&&(r=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(i))&&(a=parseFloat(r[1]),s=parseFloat(r[2])),s-p/2),l=10+g;0!==t&&1!==t||(l=a),n.attr("transform",`translate(${l}, ${20+o})`)}),h>c+u+20){let e=m.line(g,f+c+u+20,g+d,f+c+u+20,y);l.insert(()=>e).attr("style",n)}return aN(t,x),t.intersect=function(e){return V.rect(t,e)},l}async function SD(e,t,r,n=""){if(""===t)return 0;let i=e.insert("g").attr("class","label").attr("style",n),a=O(),s=a.htmlLabels??!0,o=await QL(i,_h(r_(t)),{width:EC(t,a)+50,classes:"markdown-node-label",useHtmlLabels:s,style:n},a),l;if(s)e=o.children[0],t=H(o),l=e.getBoundingClientRect(),t.attr("width",l.width),t.attr("height",l.height);else{var c;for(c of o.children[0].children)c.textContent=c.textContent.replaceAll(">",">").replaceAll("<","<"),n&&c.setAttribute("style",n);(l=o.getBBox()).height+=6}return i.attr("transform",`translate(${-l.width/2},${-l.height/2+r})`),l.height}var AD=b(()=>{i(),RN(),MN(),zI(),i_(),Tu(),JL(),i6(),mt(_D,"requirementBox"),mt(SD,"addText")});async function LD(e,n,{config:t}){var{labelStyles:i,nodeStyles:r}=Q(n),i=(n.labelStyle=i||"",n.width);n.width=(n.width??200)-10;let{shapeSvg:a,bbox:s,label:o}=await nN(e,n,sN(n)),l=n.padding||10,c,h,u=("ticket"in n&&n.ticket&&t?.kanban?.ticketBaseUrl&&(c=t?.kanban?.ticketBaseUrl.replace("#TICKET#",n.ticket),h=a.insert("svg:a",":first-child").attr("class","kanban-ticket-link").attr("xlink:href",c).attr("target","_blank")),{useHtmlLabels:n.useHtmlLabels,labelStyle:n.labelStyle||"",width:n.width,img:n.img,padding:n.padding||8,centerLabel:!1}),d,p;h?{label:d,bbox:p}=await iN(h,"ticket"in n&&n.ticket||"",u):{label:d,bbox:p}=await iN(a,"ticket"in n&&n.ticket||"",u);var{label:e,bbox:t}=await iN(a,"assigned"in n&&n.assigned||"",u),i=(n.width=i,n?.width||0),g=Math.max(p.height,t.height)/2,f=Math.max(s.height+20,n?.height||0)+g,m=-i/2,y=-f/2;o.attr("transform","translate("+(l-i/2)+", "+(-g-s.height/2)+")"),d.attr("transform","translate("+(l-i/2)+", "+(-g+s.height/2)+")"),e.attr("transform","translate("+(l+i/2-t.width-20)+", "+(-g+s.height/2)+")");let v,{rx:x,ry:b}=n,w=n.cssStyles;if("handDrawn"===n.look){let e=FI.svg(a),t=AN(n,{}),r=x||b?e.path($R(m,y,i,f,x||0),t):e.rectangle(m,y,i,f,t);(v=a.insert(()=>r,":first-child")).attr("class","basic label-container").attr("style",w||null)}else(v=a.insert("rect",":first-child")).attr("class","basic label-container __APA__").attr("style",r).attr("rx",x??5).attr("ry",b??5).attr("x",m).attr("y",y).attr("width",i).attr("height",f),(e="priority"in n&&n.priority)&&(t=a.append("line"),g=2+m,r=y+Math.floor((x??0)/2),i=y+f-Math.floor((x??0)/2),t.attr("x1",g).attr("y1",r).attr("x2",g).attr("y2",i).attr("stroke-width","4").attr("stroke",ND(e)));return aN(n,v),n.height=f,n.intersect=function(e){return V.rect(n,e)},a}var ND,ID=b(()=>{i(),RN(),zR(),MN(),zI(),ND=mt(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"),mt(LD,"kanbanItem")});async function RD(e,n){var{labelStyles:i,nodeStyles:t}=Q(n),{shapeSvg:i,bbox:e,halfPadding:r,label:a}=(n.labelStyle=i,await nN(e,n,sN(n))),s=e.width+10*r,r=e.height+8*r,o=.15*s,l=n.cssStyles,c=e.height+20,s=Math.max(s,e.width+20),r=Math.max(r,c);a.attr("transform",`translate(${-e.width/2}, ${-e.height/2})`);let h,u=`M0 0 + a${o},${o} 1 0,0 ${.25*s},${-1*r*.1} + a${o},${o} 1 0,0 ${.25*s},0 + a${o},${o} 1 0,0 ${.25*s},0 + a${o},${o} 1 0,0 ${.25*s},${.1*r} + + a${o},${o} 1 0,0 ${.15*s},${.33*r} + a${.8*o},${.8*o} 1 0,0 0,${.34*r} + a${o},${o} 1 0,0 ${-1*s*.15},${.33*r} + + a${o},${o} 1 0,0 ${-1*s*.25},${.15*r} + a${o},${o} 1 0,0 ${-1*s*.25},0 + a${o},${o} 1 0,0 ${-1*s*.25},0 + a${o},${o} 1 0,0 ${-1*s*.25},${-1*r*.15} + + a${o},${o} 1 0,0 ${-1*s*.1},${-1*r*.33} + a${.8*o},${.8*o} 1 0,0 0,${-1*r*.34} + a${o},${o} 1 0,0 ${.1*s},${-1*r*.33} + H0 V0 Z`;if("handDrawn"===n.look){let e=FI.svg(i),t=AN(n,{}),r=e.path(u,t);(h=i.insert(()=>r,":first-child")).attr("class","basic label-container").attr("style",SC(l))}else h=i.insert("path",":first-child").attr("class","basic label-container").attr("style",t).attr("d",u);return h.attr("transform",`translate(${-s/2}, ${-r/2})`),aN(n,h),n.calcIntersect=function(e,t){return V.rect(e,t)},n.intersect=function(e){return D.info("Bang intersect",n,e),V.rect(n,e)},i}var MD=b(()=>{e(),i(),RN(),MN(),zI(),i_(),mt(RD,"bang")});async function DD(e,n){var{labelStyles:t,nodeStyles:r}=Q(n);n.labelStyle=t;let{shapeSvg:i,bbox:a,halfPadding:s,label:o}=await nN(e,n,sN(n)),l=a.width+2*s,c=a.height+2*s,h=.15*l,u=.25*l,d=.35*l,p=.2*l,g=n.cssStyles,f,m=`M0 0 + a${h},${h} 0 0,1 ${.25*l},${-1*l*.1} + a${d},${d} 1 0,1 ${.4*l},${-1*l*.1} + a${u},${u} 1 0,1 ${.35*l},${.2*l} + + a${h},${h} 1 0,1 ${.15*l},${.35*c} + a${p},${p} 1 0,1 ${-1*l*.15},${.65*c} + + a${u},${h} 1 0,1 ${-1*l*.25},${.15*l} + a${d},${d} 1 0,1 ${-1*l*.5},0 + a${h},${h} 1 0,1 ${-1*l*.25},${-1*l*.15} + + a${h},${h} 1 0,1 ${-1*l*.1},${-1*c*.35} + a${p},${p} 1 0,1 ${.1*l},${-1*c*.65} + H0 V0 Z`;if("handDrawn"===n.look){let e=FI.svg(i),t=AN(n,{}),r=e.path(m,t);(f=i.insert(()=>r,":first-child")).attr("class","basic label-container").attr("style",SC(g))}else f=i.insert("path",":first-child").attr("class","basic label-container").attr("style",r).attr("d",m);return o.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`),f.attr("transform",`translate(${-l/2}, ${-c/2})`),aN(n,f),n.calcIntersect=function(e,t){return V.rect(e,t)},n.intersect=function(e){return D.info("Cloud intersect",n,e),V.rect(n,e)},i}var OD=b(()=>{zI(),e(),i_(),RN(),MN(),i(),mt(DD,"cloud")});async function PD(e,t){var{labelStyles:r,nodeStyles:n}=Q(t);t.labelStyle=r;let{shapeSvg:i,bbox:a,halfPadding:s,label:o}=await nN(e,t,sN(t)),l=a.width+8*s,c=a.height+2*s,h=` + M${-l/2} ${c/2-5} + v${10-c} + q0,-5 5,-5 + h${l-10} + q5,0 5,5 + v${c-10} + q0,5 -5,5 + h${10-l} + q-5,0 -5,-5 + Z + `,u=i.append("path").attr("id","node-"+t.id).attr("class","node-bkg node-"+t.type).attr("style",n).attr("d",h);return i.append("line").attr("class","node-line-").attr("x1",-l/2).attr("y1",c/2).attr("x2",l/2).attr("y2",c/2),o.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`),i.append(()=>o.node()),aN(t,u),t.calcIntersect=function(e,t){return V.rect(e,t)},t.intersect=function(e){return V.rect(t,e)},i}var BD=b(()=>{RN(),MN(),i(),mt(PD,"defaultMindmapNode")});async function $D(e,t){return QI(e,t,{padding:t.padding??0})}var FD=b(()=>{JI(),mt($D,"mindmapCircle")});function zD(e){return e in qD}var GD,UD,qD,jD,YD,WD,HD,VD,XD,KD,ZD,QD,JD,eO,tO,rO=b(()=>{UI(),YI(),XI(),ZI(),JI(),rR(),aR(),lR(),uR(),pR(),vR(),bR(),kR(),ER(),_R(),AR(),NR(),RR(),DR(),PR(),FR(),UR(),jR(),WR(),VR(),QR(),eM(),rM(),iM(),cM(),uM(),pM(),fM(),yM(),bM(),kM(),LM(),RM(),DM(),PM(),$M(),zM(),UM(),jM(),WM(),VM(),KM(),QM(),eD(),aD(),oD(),cD(),uD(),pD(),fD(),yD(),bD(),CD(),AD(),ID(),MD(),OD(),BD(),FD(),GD=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:BM},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:IM},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:FM},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:HM},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:gR},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:QI},{semanticName:"Bang",name:"Bang",shortName:"bang",description:"Bang",aliases:["bang"],handler:RD},{semanticName:"Cloud",name:"Cloud",shortName:"cloud",description:"cloud",aliases:["cloud"],handler:DD},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:vM},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:IR},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:tM},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:JR},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:sD},{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:HR},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:wR},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:JM},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:VI},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:MM},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:YM},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:qM},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:SR},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:MR},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:iR},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:oR},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:hR},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:nM},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:dD},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:LR},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:tD},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:aM},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:dR},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:xR},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:hD},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:mD},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:TR},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:lD},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:CR},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:OM},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:gM},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:dM},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:jI},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:tR},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:ZM},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:XM},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:gD},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:wM},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:hM}],UD=mt(()=>{var e=[...Object.entries({state:GM,choice:KI,note:mM,rectWithTitle:AM,labelRect:ZR,iconSquare:qR,iconCircle:BR,icon:OR,iconRounded:GR,imageSquare:YR,anchor:GI,kanbanItem:LD,mindmapCircle:$D,defaultMindmapNode:PD,classBox:ED,erBox:vD,requirementBox:_D}),...GD.flatMap(t=>[t.shortName,..."aliases"in t?t.aliases:[],..."internalAliases"in t?t.internalAliases:[]].map(e=>[e,t.handler]))];return Object.fromEntries(e)},"generateShapeMap"),qD=UD(),mt(zD,"isValidShape")}),nO=b(()=>{i6(),F9(),Tu(),e(),rO(),i_(),Oc(),ku(),jD=class{constructor(){this.vertexCounter=0,this.config=O(),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=mh,this.setAccDescription=vh,this.setDiagramTitle=bh,this.getAccTitle=yh,this.getAccDescription=xh,this.getDiagramTitle=wh,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{mt(this,"FlowDB")}sanitizeText(e){return L.sanitizeText(e,this.config)}lookUpDomId(e){for(var t of this.vertices.values())if(t.id===e)return t.domId;return e}addVertex(n,i,a,s,o,l,c={},e){if(n&&0!==n.trim().length){let r;var t;if(void 0!==e&&(t=e.includes(` +`)?e+` +`:`{ +`+e+` +}`,r=$9(t,{schema:B9})),e=this.edges.find(e=>e.id===n))void 0!==(t=r)?.animate&&(e.animate=t.animate),void 0!==t?.animation&&(e.animation=t.animation),void 0!==t?.curve&&(e.interpolate=t.curve);else{let e,t=this.vertices.get(n);if(void 0===t&&(t={id:n,labelType:"text",domId:"flowchart-"+n+"-"+this.vertexCounter,styles:[],classes:[]},this.vertices.set(n,t)),this.vertexCounter++,void 0!==i?(this.config=O(),e=this.sanitizeText(i.text.trim()),t.labelType=i.type,e.startsWith('"')&&e.endsWith('"')&&(e=e.substring(1,e.length-1)),t.text=e):void 0===t.text&&(t.text=n),void 0!==a&&(t.type=a),s?.forEach(e=>{t.styles.push(e)}),o?.forEach(e=>{t.classes.push(e)}),void 0!==l&&(t.dir=l),void 0===t.props?t.props=c:void 0!==c&&Object.assign(t.props,c),void 0!==r){if(r.shape){if(r.shape!==r.shape.toLowerCase()||r.shape.includes("_"))throw new Error(`No such shape: ${r.shape}. Shape names should be lowercase.`);if(!zD(r.shape))throw new Error(`No such shape: ${r.shape}.`);t.type=r?.shape}r?.label&&(t.text=r?.label),r?.icon&&(t.icon=r?.icon,!r.label?.trim())&&t.text===n&&(t.text=""),r?.form&&(t.form=r?.form),r?.pos&&(t.pos=r?.pos),r?.img&&(t.img=r?.img,!r.label?.trim())&&t.text===n&&(t.text=""),r?.constraint&&(t.constraint=r.constraint),r.w&&(t.assetWidth=Number(r.w)),r.h&&(t.assetHeight=Number(r.h))}}}}addSingleLink(e,t,r,n){let i={start:e,end:t,type:void 0,text:"",labelType:"text",classes:[],isUserDefinedId:!1,interpolate:this.edges.defaultInterpolate};if(D.info("abc78 Got edge...",i),void 0!==(e=r.text)&&(i.text=this.sanitizeText(e.text.trim()),i.text.startsWith('"')&&i.text.endsWith('"')&&(i.text=i.text.substring(1,i.text.length-1)),i.labelType=e.type),void 0!==r&&(i.type=r.type,i.stroke=r.stroke,i.length=10<r.length?10:r.length),n&&!this.edges.some(e=>e.id===n)?(i.id=n,i.isUserDefinedId=!0):0===(t=this.edges.filter(e=>e.start===i.start&&e.end===i.end)).length?i.id=n_(i.start,i.end,{counter:0,prefix:"L"}):i.id=n_(i.start,i.end,{counter:t.length+1,prefix:"L"}),!(this.edges.length<(this.config.maxEdges??500)))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.`);D.info("Pushing edge..."),this.edges.push(i)}isLinkData(e){return null!==e&&"object"==typeof e&&"id"in e&&"string"==typeof e.id}addLink(e,t,r){var n,i=this.isLinkData(r)?r.id.replace("@",""):void 0;D.info("addLink",e,t,i);for(n of e)for(var a of t){var s=n===e[e.length-1],o=a===t[0];s&&o?this.addSingleLink(n,a,r,i):this.addSingleLink(n,a,r,void 0)}}updateLinkInterpolate(e,t){e.forEach(e=>{"default"===e?this.edges.defaultInterpolate=t:this.edges[e].interpolate=t})}updateLink(e,t){e.forEach(e=>{if("number"==typeof e&&e>=this.edges.length)throw new Error(`The index ${e} 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.)`);"default"===e?this.edges.defaultStyle=t:(this.edges[e].style=t,0<(this.edges[e]?.style?.length??0)&&!this.edges[e]?.style?.some(e=>e?.startsWith("fill"))&&this.edges[e]?.style?.push("fill:none"))})}addClass(e,t){let n=t.join().replace(/\\,/g,"§§§").replace(/,/g,";").replace(/§§§/g,",").split(";");e.split(",").forEach(e=>{let r=this.classes.get(e);void 0===r&&(r={id:e,styles:[],textStyles:[]},this.classes.set(e,r)),n?.forEach(e=>{var t;/color/.exec(e)&&(t=e.replace("fill","bgFill"),r.textStyles.push(t)),r.styles.push(e)})})}setDirection(e){this.direction=e.trim(),/.*</.exec(this.direction)&&(this.direction="RL"),/.*\^/.exec(this.direction)&&(this.direction="BT"),/.*>/.exec(this.direction)&&(this.direction="LR"),/.*v/.exec(this.direction)&&(this.direction="TB"),"TD"===this.direction&&(this.direction="TB")}setClass(e,r){for(let t of e.split(",")){var n=this.vertices.get(t);n&&n.classes.push(r),(n=this.edges.find(e=>e.id===t))&&n.classes.push(r),(n=this.subGraphLookup.get(t))&&n.classes.push(r)}}setTooltip(e,t){if(void 0!==t){t=this.sanitizeText(t);for(var r of e.split(","))this.tooltips.set("gen-1"===this.version?this.lookUpDomId(r):r,t)}}setClickFun(e,t,n){let i=this.lookUpDomId(e);if("loose"===O().securityLevel&&void 0!==t){let r=[];if("string"==typeof n){r=n.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let t=0;t<r.length;t++){let e=r[t].trim();e.startsWith('"')&&e.endsWith('"')&&(e=e.substr(1,e.length-2)),r[t]=e}}0===r.length&&r.push(e),(n=this.vertices.get(e))&&(n.haveCallback=!0,this.funs.push(()=>{var e=document.querySelector(`[id="${i}"]`);null!==e&&e.addEventListener("click",()=>{e_.runFunc(t,...r)},!1)}))}}setLink(e,t,r){e.split(",").forEach(e=>{void 0!==(e=this.vertices.get(e))&&(e.link=e_.formatUrl(t,this.config),e.linkTarget=r)}),this.setClass(e,"clickable")}getTooltip(e){return this.tooltips.get(e)}setClickEvent(e,t,r){e.split(",").forEach(e=>{this.setClickFun(e,t,r)}),this.setClass(e,"clickable")}bindFunctions(t){this.funs.forEach(e=>{e(t)})}getDirection(){return this.direction?.trim()}getVertices(){return this.vertices}getEdges(){return this.edges}getClasses(){return this.classes}setupToolTips(e){let r=H(".mermaidTooltip");null===(r._groups||r)[0][0]&&(r=H("body").append("div").attr("class","mermaidTooltip").style("opacity",0)),H(e).select("svg").selectAll("g.node").on("mouseover",e=>{var t=H(e.currentTarget);null!==t.attr("title")&&(e=e.currentTarget?.getBoundingClientRect(),r.transition().duration(200).style("opacity",".9"),r.text(t.attr("title")).style("left",window.scrollX+e.left+(e.right-e.left)/2+"px").style("top",window.scrollY+e.bottom+"px"),r.html(r.html().replace(/<br\/>/g,"<br/>")),t.classed("hover",!0))}).on("mouseout",e=>{r.transition().duration(500).style("opacity",0),H(e.currentTarget).classed("hover",!1)})}clear(e="gen-2"){this.vertices=new Map,this.classes=new Map,this.edges=[],this.funs=[this.setupToolTips.bind(this)],this.subGraphs=[],this.subGraphLookup=new Map,this.subCount=0,this.tooltips=new Map,this.firstGraphFlag=!0,this.version=e,this.config=O(),fh()}setGen(e){this.version=e||"gen-2"}defaultStyle(){return"fill:#ffa;stroke: #f66; stroke-width: 3px; stroke-dasharray: 5, 5;fill:#ffa;stroke: #666;"}addSubGraph(e,t,r){let n=e.text.trim(),i=r.text;e===r&&/\s/.exec(r.text)&&(n=void 0);var a=(e=mt(e=>{let r={boolean:{},number:{},string:{}},n=[],i;return{nodeList:e.filter(function(e){var t=typeof e;return e.stmt&&"dir"===e.stmt?(i=e.value,!1):""!==e.trim()&&(t in r?!r[t].hasOwnProperty(e)&&(r[t][e]=!0):!n.includes(e)&&n.push(e))}),dir:i}},"uniq")(t.flat())).nodeList,t=e.dir,e=O().flowchart??{},t=t??(e.inheritDir?this.getDirection()??O().direction??void 0:void 0);if("gen-1"===this.version)for(let e=0;e<a.length;e++)a[e]=this.lookUpDomId(a[e]);return n=n??"subGraph"+this.subCount,i=this.sanitizeText(i=i||""),this.subCount=this.subCount+1,e={id:n,nodes:a,title:i.trim(),classes:[],dir:t,labelType:r.type},D.info("Adding",e.id,e.nodes,e.dir),e.nodes=this.makeUniq(e,this.subGraphs).nodes,this.subGraphs.push(e),this.subGraphLookup.set(n,e),n}getPosForId(e){for(var[t,r]of this.subGraphs.entries())if(r.id===e)return t;return-1}indexNodes2(e,t){var r=this.subGraphs[t].nodes;if(this.secCount=this.secCount+1,2e3<this.secCount)return{result:!1,count:0};if(this.posCrossRef[this.secCount]=t,this.subGraphs[t].id===e)return{result:!0,count:0};let n=0,i=1;for(;n<r.length;){var a=this.getPosForId(r[n]);if(0<=a){if((a=this.indexNodes2(e,a)).result)return{result:!0,count:i+a.count};i+=a.count}n+=1}return{result:!1,count:i}}getDepthFirstPos(e){return this.posCrossRef[e]}indexNodes(){this.secCount=-1,0<this.subGraphs.length&&this.indexNodes2("none",this.subGraphs.length-1)}getSubGraphs(){return this.subGraphs}firstGraph(){return!!this.firstGraphFlag&&!(this.firstGraphFlag=!1)}destructStartLink(e){let t=e.trim(),r="arrow_open";switch(t[0]){case"<":r="arrow_point",t=t.slice(1);break;case"x":r="arrow_cross",t=t.slice(1);break;case"o":r="arrow_circle",t=t.slice(1)}let n="normal";return t.includes("=")&&(n="thick"),t.includes(".")&&(n="dotted"),{type:r,stroke:n}}countChar(t,r){let n=r.length,i=0;for(let e=0;e<n;++e)r[e]===t&&++i;return i}destructEndLink(e){let t=e.trim(),r=t.slice(0,-1),n="arrow_open";switch(t.slice(-1)){case"x":n="arrow_cross",t.startsWith("x")&&(n="double_"+n,r=r.slice(1));break;case">":n="arrow_point",t.startsWith("<")&&(n="double_"+n,r=r.slice(1));break;case"o":n="arrow_circle",t.startsWith("o")&&(n="double_"+n,r=r.slice(1))}let i="normal",a=r.length-1;return r.startsWith("=")&&(i="thick"),r.startsWith("~")&&(i="invisible"),(e=this.countChar(".",r))&&(i="dotted",a=e),{type:n,stroke:i,length:a}}destructLink(e,t){if(e=this.destructEndLink(e),t){if((t=this.destructStartLink(t)).stroke!==e.stroke)return{type:"INVALID",stroke:"INVALID"};if("arrow_open"===t.type)t.type=e.type;else{if(t.type!==e.type)return{type:"INVALID",stroke:"INVALID"};t.type="double_"+t.type}return"double_arrow"===t.type&&(t.type="double_arrow_point"),t.length=e.length,t}return e}exists(e,t){for(var r of e)if(r.nodes.includes(t))return!0;return!1}makeUniq(r,n){let i=[];return r.nodes.forEach((e,t)=>{this.exists(n,e)||i.push(r.nodes[t])}),{nodes:i}}getTypeFromVertex(e){if(e.img)return"imageSquare";if(e.icon)return"circle"===e.form?"iconCircle":"square"===e.form?"iconSquare":"rounded"===e.form?"iconRounded":"icon";switch(e.type){case"square":case void 0:return"squareRect";case"round":return"roundedRect";case"ellipse":return"ellipse";default:return e.type}}findNode(e,t){return e.find(e=>e.id===t)}destructEdgeType(e){let t="none",r="arrow_point";switch(e){case"arrow_point":case"arrow_circle":case"arrow_cross":r=e;break;case"double_arrow_point":case"double_arrow_circle":case"double_arrow_cross":t=e.replace("double_",""),r=t}return{arrowTypeStart:t,arrowTypeEnd:r}}addNodeFromVertex(e,t,r,n,i,a){var r=r.get(e.id),n=n.get(e.id)??!1,s=this.findNode(t,e.id);s?(s.cssStyles=e.styles,s.cssCompiledStyles=this.getCompiledStyles(e.classes),s.cssClasses=e.classes.join(" ")):(s={id:e.id,label:e.text,labelStyle:"",parentId:r,padding:i.flowchart?.padding||8,cssStyles:e.styles,cssCompiledStyles:this.getCompiledStyles(["default","node",...e.classes]),cssClasses:"default "+e.classes.join(" "),dir:e.dir,domId:e.domId,look:a,link:e.link,linkTarget:e.linkTarget,tooltip:this.getTooltip(e.id),icon:e.icon,pos:e.pos,img:e.img,assetWidth:e.assetWidth,assetHeight:e.assetHeight,constraint:e.constraint},n?t.push({...s,isGroup:!0,shape:"rect"}):t.push({...s,isGroup:!1,shape:this.getTypeFromVertex(e)}))}getCompiledStyles(e){let t=[];for(var r of e)(r=this.classes.get(r))?.styles&&(t=[...t,...r.styles??[]].map(e=>e.trim())),r?.textStyles&&(t=[...t,...r.textStyles??[]].map(e=>e.trim()));return t}getData(){let a=O(),t=[],s=[],r=this.getSubGraphs(),n=new Map,i=new Map;for(let e=r.length-1;0<=e;e--){var o,l=r[e];0<l.nodes.length&&i.set(l.id,!0);for(o of l.nodes)n.set(o,l.id)}for(let e=r.length-1;0<=e;e--){var c=r[e];t.push({id:c.id,label:c.title,labelStyle:"",parentId:n.get(c.id),padding:8,cssCompiledStyles:this.getCompiledStyles(c.classes),cssClasses:c.classes.join(" "),shape:"rect",dir:c.dir,isGroup:!0,look:a.look})}this.getVertices().forEach(e=>{this.addNodeFromVertex(e,t,n,i,a,a.look||"classic")});let h=this.getEdges();return h.forEach((e,t)=>{var{arrowTypeStart:r,arrowTypeEnd:n}=this.destructEdgeType(e.type),i=[...h.defaultStyle??[]],t=(e.style&&i.push(...e.style),{id:n_(e.start,e.end,{counter:t,prefix:"L"},e.id),isUserDefinedId:e.isUserDefinedId,start:e.start,end:e.end,type:e.type??"normal",label:e.text,labelpos:"c",thickness:e.stroke,minlen:e.length,classes:"invisible"===e?.stroke?"":"edge-thickness-normal edge-pattern-solid flowchart-link",arrowTypeStart:"invisible"===e?.stroke||"arrow_open"===e?.type?"none":r,arrowTypeEnd:"invisible"===e?.stroke||"arrow_open"===e?.type?"none":n,arrowheadStyle:"fill: #333",cssCompiledStyles:this.getCompiledStyles(e.classes),labelStyle:i,style:i,pattern:e.stroke,look:a.look,animate:e.animate,animation:e.animation,curve:e.interpolate||this.edges.defaultInterpolate||a.flowchart?.curve});s.push(t)}),{nodes:t,edges:s,other:{},config:a}}defaultConfig(){return Ch.flowchart}}}),iO=b(()=>{i6(),YD=mt((e,t)=>{let r;return"sandbox"===t&&(r=H("#i"+e)),H("sandbox"===t?r.nodes()[0].contentDocument.body:"body").select(`[id="${e}"]`)},"getDiagramElement")}),aO=b(()=>{WD=mt(({flowchart:e})=>{var t=e?.subGraphTitleMargin?.top??0;return{subGraphTitleTopMargin:t,subGraphTitleBottomMargin:e=e?.subGraphTitleMargin?.bottom??0,subGraphTitleTotalMargin:t+e}},"getSubGraphTitleMargins")}),sO=b(()=>{Tu(),Oc(),e(),aO(),i6(),zI(),JL(),IN(),SM(),zR(),MN(),HD=mt(async(n,i)=>{D.info("Creating subgraph rect for ",i.id,i);let e=O(),{themeVariables:t,handDrawnSeed:a}=e,{clusterBkg:s,clusterBorder:o}=t,{labelStyles:r,nodeStyles:l,borderStyles:c,backgroundStyles:h}=Q(i),u=n.insert("g").attr("class","cluster "+i.cssClasses).attr("id",i.id).attr("data-look",i.look),d=fc(e.flowchart.htmlLabels),p=u.insert("g").attr("class","cluster-label "),g=await QL(p,i.label,{style:i.labelStyle,useHtmlLabels:d,isNode:!0}),f=g.getBBox();fc(e.flowchart.htmlLabels)&&(n=g.children[0],m=H(g),f=n.getBoundingClientRect(),m.attr("width",f.width),m.attr("height",f.height));var n=i.width<=f.width+i.padding?f.width+i.padding:i.width,m=(i.width<=f.width+i.padding?i.diff=(n-i.width)/2-i.padding:i.diff=-i.padding,i.height),y=i.x-n/2,v=i.y-m/2;D.trace("Data ",i,JSON.stringify(i));let x;if("handDrawn"===i.look){let e=FI.svg(u),t=AN(i,{roughness:.7,fill:s,stroke:o,fillWeight:3,seed:a}),r=e.path($R(y,v,n,m,0),t);(x=u.insert(()=>(D.debug("Rough node insert CXC",r),r),":first-child")).select("path:nth-child(2)").attr("style",c.join(";")),x.select("path").attr("style",h.join(";").replace("fill","stroke"))}else(x=u.insert("rect",":first-child")).attr("style",l).attr("rx",i.rx).attr("ry",i.ry).attr("x",y).attr("y",v).attr("width",n).attr("height",m);return y=WD(e).subGraphTitleTopMargin,p.attr("transform",`translate(${i.x-f.width/2}, ${i.y-i.height/2+y})`),r&&(v=p.select("span"))&&v.attr("style",r),n=x.node().getBBox(),i.offsetX=0,i.width=n.width,i.height=n.height,i.offsetY=f.height-i.padding/2,i.intersect=function(e){return TN(i,e)},{cluster:u,labelBBox:f}},"rect"),VD=mt((e,t)=>{var r=(e=e.insert("g").attr("class","note-cluster").attr("id",t.id)).insert("rect",":first-child"),n=0*t.padding,i=n/2,i=(r.attr("rx",t.rx).attr("ry",t.ry).attr("x",t.x-t.width/2-i).attr("y",t.y-t.height/2-i).attr("width",t.width+n).attr("height",t.height+n).attr("fill","none"),r.node().getBBox());return t.width=i.width,t.height=i.height,t.intersect=function(e){return TN(t,e)},{cluster:e,labelBBox:{width:0,height:0}}},"noteGroup"),XD=mt(async(i,a)=>{let e=O(),{themeVariables:t,handDrawnSeed:s}=e,{altBackground:o,compositeBackground:l,compositeTitleBackground:c,nodeBorder:h}=t,u=i.insert("g").attr("class",a.cssClasses).attr("id",a.id).attr("data-id",a.id).attr("data-look",a.look),r=u.insert("g",":first-child"),n=u.insert("g").attr("class","cluster-label"),d=u.append("rect"),p=n.node().appendChild(await _M(a.label,a.labelStyle,void 0,!0)),g=p.getBBox();fc(e.flowchart.htmlLabels)&&(i=p.children[0],f=H(p),g=i.getBoundingClientRect(),f.attr("width",g.width),f.attr("height",g.height));var f=(i=0*a.padding)/2,m=(a.width<=g.width+a.padding?g.width+a.padding:a.width)+i,y=(a.width<=g.width+a.padding?a.diff=(m-a.width)/2-a.padding:a.diff=-a.padding,a.height+i),i=a.height+i-g.height-6,v=a.x-m/2,x=a.y-y/2;a.width=m;let b=a.y-a.height/2-f+g.height+2,w;if("handDrawn"===a.look){let e=a.cssClasses.includes("statediagram-cluster-alt"),t=FI.svg(u),r=a.rx||a.ry?t.path($R(v,x,m,y,10),{roughness:.7,fill:c,fillStyle:"solid",stroke:h,seed:s}):t.rectangle(v,x,m,y,{seed:s}),n=(w=u.insert(()=>r,":first-child"),t.rectangle(v,b,m,i,{fill:e?o:l,fillStyle:e?"hachure":"solid",stroke:h,seed:s}));w=u.insert(()=>r,":first-child"),d=u.insert(()=>n)}else(w=r.insert("rect",":first-child")).attr("class","outer").attr("x",v).attr("y",x).attr("width",m).attr("height",y).attr("data-look",a.look),d.attr("class","inner").attr("x",v).attr("y",b).attr("width",m).attr("height",i);return n.attr("transform",`translate(${a.x-g.width/2}, ${1+x-(fc(e.flowchart.htmlLabels)?0:3)})`),f=w.node().getBBox(),a.height=f.height,a.offsetX=0,a.offsetY=g.height-a.padding/2,a.labelBBox=g,a.intersect=function(e){return TN(a,e)},{cluster:u,labelBBox:g}},"roundedWithTitle"),KD=mt(async(n,i)=>{D.info("Creating subgraph rect for ",i.id,i);let e=O(),{themeVariables:t,handDrawnSeed:a}=e,{clusterBkg:s,clusterBorder:o}=t,{labelStyles:r,nodeStyles:l,borderStyles:c,backgroundStyles:h}=Q(i),u=n.insert("g").attr("class","cluster "+i.cssClasses).attr("id",i.id).attr("data-look",i.look),d=fc(e.flowchart.htmlLabels),p=u.insert("g").attr("class","cluster-label "),g=await QL(p,i.label,{style:i.labelStyle,useHtmlLabels:d,isNode:!0,width:i.width}),f=g.getBBox();fc(e.flowchart.htmlLabels)&&(n=g.children[0],m=H(g),f=n.getBoundingClientRect(),m.attr("width",f.width),m.attr("height",f.height));var n=i.width<=f.width+i.padding?f.width+i.padding:i.width,m=(i.width<=f.width+i.padding?i.diff=(n-i.width)/2-i.padding:i.diff=-i.padding,i.height),y=i.x-n/2,v=i.y-m/2;D.trace("Data ",i,JSON.stringify(i));let x;if("handDrawn"===i.look){let e=FI.svg(u),t=AN(i,{roughness:.7,fill:s,stroke:o,fillWeight:4,seed:a}),r=e.path($R(y,v,n,m,i.rx),t);(x=u.insert(()=>(D.debug("Rough node insert CXC",r),r),":first-child")).select("path:nth-child(2)").attr("style",c.join(";")),x.select("path").attr("style",h.join(";").replace("fill","stroke"))}else(x=u.insert("rect",":first-child")).attr("style",l).attr("rx",i.rx).attr("ry",i.ry).attr("x",y).attr("y",v).attr("width",n).attr("height",m);return y=WD(e).subGraphTitleTopMargin,p.attr("transform",`translate(${i.x-f.width/2}, ${i.y-i.height/2+y})`),r&&(v=p.select("span"))&&v.attr("style",r),n=x.node().getBBox(),i.offsetX=0,i.width=n.width,i.height=n.height,i.offsetY=f.height-i.padding/2,i.intersect=function(e){return TN(i,e)},{cluster:u,labelBBox:f}},"kanbanSection"),ZD=mt((t,r)=>{var{themeVariables:n,handDrawnSeed:i}=O(),n=n.nodeBorder,e=(t=t.insert("g").attr("class",r.cssClasses).attr("id",r.id).attr("data-look",r.look)).insert("g",":first-child"),a=0*r.padding,s=r.width+a,a=(r.diff=-r.padding,r.height+a),o=r.x-s/2,l=r.y-a/2;r.width=s;let c;if("handDrawn"===r.look){let e=FI.svg(t).rectangle(o,l,s,a,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:n,seed:i});c=t.insert(()=>e,":first-child")}else(c=e.insert("rect",":first-child")).attr("class","divider").attr("x",o).attr("y",l).attr("width",s).attr("height",a).attr("data-look",r.look);return n=c.node().getBBox(),r.height=n.height,r.offsetX=0,r.offsetY=0,r.intersect=function(e){return TN(r,e)},{cluster:t,labelBBox:{}}},"divider"),QD={rect:HD,squareRect:HD,roundedWithTitle:XD,noteGroup:VD,divider:ZD,kanbanSection:KD},JD=new Map,eO=mt(async(e,t)=>{var r=t.shape||"rect",r=await QD[r](e,t);return JD.set(t.id,r),r},"insertCluster"),tO=mt(()=>{JD=new Map},"clear")});function oO(e,t){if(void 0===e||void 0===t)return{angle:0,deltaX:0,deltaY:0};e=hO(e),t=hO(t);var[e,r]=[e.x,e.y],[t,n]=[t.x,t.y],t=t-e,e=n-r;return{angle:Math.atan(e/t),deltaX:t,deltaY:e}}var lO,cO,hO,uO,dO,pO,gO,fO=b(()=>{lO={aggregation:17.25,extension:17.25,composition:17.25,dependency:6,lollipop:13.5,arrow_point:4},cO={arrow_point:9,arrow_cross:12.5,arrow_circle:12.5},mt(oO,"calculateDeltaAndAngle"),hO=mt(e=>Array.isArray(e)?{x:e[0],y:e[1]}:e,"pointTransformer"),uO=mt(c=>({x:mt(function(e,t,r){let n=0,i=hO(r[0]).x<hO(r[r.length-1]).x?"left":"right";0===t&&Object.hasOwn(lO,c.arrowTypeStart)?({angle:a,deltaX:s}=oO(r[0],r[1]),n=lO[c.arrowTypeStart]*Math.cos(a)*(0<=s?1:-1)):t===r.length-1&&Object.hasOwn(lO,c.arrowTypeEnd)&&({angle:a,deltaX:s}=oO(r[r.length-1],r[r.length-2]),n=lO[c.arrowTypeEnd]*Math.cos(a)*(0<=s?1:-1));var t=Math.abs(hO(e).x-hO(r[r.length-1]).x),a=Math.abs(hO(e).y-hO(r[r.length-1]).y),s=Math.abs(hO(e).x-hO(r[0]).x),r=Math.abs(hO(e).y-hO(r[0]).y),o=lO[c.arrowTypeStart],l=lO[c.arrowTypeEnd];return t<l&&0<t&&a<l&&(a=l+1-t,a*="right"==i?-1:1,n-=a),s<o&&0<s&&r<o&&(l=o+1-s,l*="right"==i?-1:1,n+=l),hO(e).x+n},"x"),y:mt(function(e,t,r){let n=0,i=hO(r[0]).y<hO(r[r.length-1]).y?"down":"up";0===t&&Object.hasOwn(lO,c.arrowTypeStart)?({angle:a,deltaY:s}=oO(r[0],r[1]),n=lO[c.arrowTypeStart]*Math.abs(Math.sin(a))*(0<=s?1:-1)):t===r.length-1&&Object.hasOwn(lO,c.arrowTypeEnd)&&({angle:a,deltaY:s}=oO(r[r.length-1],r[r.length-2]),n=lO[c.arrowTypeEnd]*Math.abs(Math.sin(a))*(0<=s?1:-1));var t=Math.abs(hO(e).y-hO(r[r.length-1]).y),a=Math.abs(hO(e).x-hO(r[r.length-1]).x),s=Math.abs(hO(e).y-hO(r[0]).y),r=Math.abs(hO(e).x-hO(r[0]).x),o=lO[c.arrowTypeStart],l=lO[c.arrowTypeEnd];return t<l&&0<t&&a<l&&(a=l+1-t,a*="up"==i?-1:1,n-=a),s<o&&0<s&&r<o&&(l=o+1-s,l*="up"==i?-1:1,n+=l),hO(e).y+n},"y")}),"getLineFunctionsWithOffset")}),mO=b(()=>{e(),dO=mt((e,t,r,n,i,a)=>{t.arrowTypeStart&&gO(e,"start",t.arrowTypeStart,r,n,i,a),t.arrowTypeEnd&&gO(e,"end",t.arrowTypeEnd,r,n,i,a)},"addEdgeMarkers"),pO={arrow_cross:{type:"cross",fill:!1},arrow_point:{type:"point",fill:!0},arrow_barb:{type:"barb",fill:!0},arrow_circle:{type:"circle",fill:!1},aggregation:{type:"aggregation",fill:!1},extension:{type:"extension",fill:!1},composition:{type:"composition",fill:!0},dependency:{type:"dependency",fill:!0},lollipop:{type:"lollipop",fill:!1},only_one:{type:"onlyOne",fill:!1},zero_or_one:{type:"zeroOrOne",fill:!1},one_or_more:{type:"oneOrMore",fill:!1},zero_or_more:{type:"zeroOrMore",fill:!1},requirement_arrow:{type:"requirement_arrow",fill:!1},requirement_contains:{type:"requirement_contains",fill:!1}},gO=mt((e,t,r,n,i,a,s)=>{let o=pO[r],l,c;o?(i=i+`_${a}-`+o.type+("start"===t?"Start":"End"),s&&""!==s.trim()?(a=i+"_"+s.replace(/[^\dA-Za-z]/g,"_"),document.getElementById(a)||(l=document.getElementById(i))&&((c=l.cloneNode(!0)).id=a,c.querySelectorAll("path, circle, line").forEach(e=>{e.setAttribute("stroke",s),o.fill&&e.setAttribute("fill",s)}),l.parentNode?.appendChild(c)),e.attr("marker-"+t,`url(${n}#${a})`)):e.attr("marker-"+t,`url(${n}#${i})`)):D.warn("Unknown arrow type: "+r)},"addEdgeMarker")});function yO(e,t){O().flowchart.htmlLabels&&e&&(e.style.width=9*t.length+"px",e.style.height="12px")}function vO(t){var r=[],n=[];for(let e=1;e<t.length-1;e++){var i=t[e-1],a=t[e],s=t[e+1];(i.x===a.x&&a.y===s.y&&5<Math.abs(a.x-s.x)&&5<Math.abs(a.y-i.y)||i.y===a.y&&a.x===s.x&&5<Math.abs(a.x-i.x)&&5<Math.abs(a.y-s.y))&&(r.push(a),n.push(e))}return{cornerPoints:r,cornerPointPositions:n}}function xO(t,r){if(t.length<2)return"";let n="",i=t.length;for(let e=0;e<i;e++){var a,s,o,l,c,h=t[e],u=t[e-1],d=t[e+1];0===e?n+=`M${h.x},`+h.y:e===i-1||(c=h.x-u.x,u=h.y-u.y,a=d.x-h.x,d=d.y-h.y,o=Math.hypot(c,u),l=Math.hypot(a,d),o<1e-5)||l<1e-5||(c/=o,u/=o,a/=l,d/=l,s=Math.max(-1,Math.min(1,c*a+u*d)),(s=Math.acos(s))<1e-5)||Math.abs(Math.PI-s)<1e-5?n+=`L${h.x},`+h.y:(s=Math.min(r/Math.sin(s/2),o/2,l/2),o=h.x-c*s,l=h.y-u*s,c=h.x+a*s,u=h.y+d*s,n=(n+=`L${o},`+l)+`Q${h.x},${h.y} ${c},`+u)}return n}function bO(e,t){var r;return e&&t?(r=t.x-e.x,t=t.y-e.y,{angle:Math.atan2(t,r),deltaX:r,deltaY:t}):{angle:0,deltaX:0,deltaY:0}}function wO(e,t){var r,n,i,a=e.map(e=>({...e})),s=(2<=e.length&&lO[t.arrowTypeStart]&&(i=lO[t.arrowTypeStart],s=bO(n=e[0],e[1]).angle,r=i*Math.cos(s),i*=Math.sin(s),a[0].x=n.x+r,a[0].y=n.y+i),e.length);return 2<=s&&lO[t.arrowTypeEnd]&&(r=lO[t.arrowTypeEnd],n=e[s-1],i=bO(e[s-2],n).angle,t=r*Math.cos(i),e=r*Math.sin(i),a[s-1].x=n.x-t,a[s-1].y=n.y-e),a}var kO,TO,EO,CO,_O,SO,AO,LO,NO,IO,RO,MO,DO,OO,PO,BO,$O,FO,zO,GO,UO,qO,jO,YO,WO,HO,VO,XO,KO,ZO,QO,JO=b(()=>{Tu(),Oc(),e(),JL(),i_(),fO(),aO(),i6(),zI(),SM(),mO(),MN(),kO=new Map,TO=new Map,EO=mt(()=>{kO.clear(),TO.clear()},"clear"),CO=mt(e=>e?e.reduce((e,t)=>e+";"+t,""):"","getLabelStyles"),_O=mt(async(e,t)=>{var r,n=fc(O().flowchart.htmlLabels),i=Q(t).labelStyles,i=(t.labelStyle=i,await QL(e,t.label,{style:t.labelStyle,useHtmlLabels:n,addSvgBackground:!0,isNode:!1})),a=(D.info("abc82",t,t.labelType),e.insert("g").attr("class","edgeLabel")),s=a.insert("g").attr("class","label").attr("data-id",t.id);s.node().appendChild(i);let o=i.getBBox();n&&(n=i.children[0],r=H(i),o=n.getBoundingClientRect(),r.attr("width",o.width),r.attr("height",o.height)),s.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"),kO.set(t.id,a),t.width=o.width,t.height=o.height;let l;return t.startLabelLeft&&(n=await _M(t.startLabelLeft,CO(t.labelStyle)),s=(r=e.insert("g").attr("class","edgeTerminals")).insert("g").attr("class","inner"),l=s.node().appendChild(n),a=n.getBBox(),s.attr("transform","translate("+-a.width/2+", "+-a.height/2+")"),TO.get(t.id)||TO.set(t.id,{}),TO.get(t.id).startLeft=r,yO(l,t.startLabelLeft)),t.startLabelRight&&(n=await _M(t.startLabelRight,CO(t.labelStyle)),a=(s=e.insert("g").attr("class","edgeTerminals")).insert("g").attr("class","inner"),l=s.node().appendChild(n),a.node().appendChild(n),r=n.getBBox(),a.attr("transform","translate("+-r.width/2+", "+-r.height/2+")"),TO.get(t.id)||TO.set(t.id,{}),TO.get(t.id).startRight=s,yO(l,t.startLabelRight)),t.endLabelLeft&&(n=await _M(t.endLabelLeft,CO(t.labelStyle)),r=(a=e.insert("g").attr("class","edgeTerminals")).insert("g").attr("class","inner"),l=r.node().appendChild(n),s=n.getBBox(),r.attr("transform","translate("+-s.width/2+", "+-s.height/2+")"),a.node().appendChild(n),TO.get(t.id)||TO.set(t.id,{}),TO.get(t.id).endLeft=a,yO(l,t.endLabelLeft)),t.endLabelRight&&(r=await _M(t.endLabelRight,CO(t.labelStyle)),n=(s=e.insert("g").attr("class","edgeTerminals")).insert("g").attr("class","inner"),l=n.node().appendChild(r),a=r.getBBox(),n.attr("transform","translate("+-a.width/2+", "+-a.height/2+")"),s.node().appendChild(r),TO.get(t.id)||TO.set(t.id,{}),TO.get(t.id).endRight=s,yO(l,t.endLabelRight)),i},"insertEdgeLabel"),mt(yO,"setTerminalWidth"),SO=mt((n,i)=>{D.debug("Moving label abc88 ",n.id,n.label,kO.get(n.id),i);var a,s=i.updatedPath||i.originalPath,o=O(),o=WD(o).subGraphTitleTotalMargin;if(n.label){let e=kO.get(n.id),t=n.x,r=n.y;s&&(a=e_.calcLabelPosition(s),D.debug("Moving label "+n.label+" from (",t,",",r,") to (",a.x,",",a.y,") abc88"),i.updatedPath)&&(t=a.x,r=a.y),e.attr("transform",`translate(${t}, ${r+o/2})`)}if(n.startLabelLeft){let e=TO.get(n.id).startLeft,t=n.x,r=n.y;s&&(i=e_.calcTerminalLabelPosition(n.arrowTypeStart?10:0,"start_left",s),t=i.x,r=i.y),e.attr("transform",`translate(${t}, ${r})`)}if(n.startLabelRight){let e=TO.get(n.id).startRight,t=n.x,r=n.y;s&&(a=e_.calcTerminalLabelPosition(n.arrowTypeStart?10:0,"start_right",s),t=a.x,r=a.y),e.attr("transform",`translate(${t}, ${r})`)}if(n.endLabelLeft){let e=TO.get(n.id).endLeft,t=n.x,r=n.y;s&&(o=e_.calcTerminalLabelPosition(n.arrowTypeEnd?10:0,"end_left",s),t=o.x,r=o.y),e.attr("transform",`translate(${t}, ${r})`)}if(n.endLabelRight){let e=TO.get(n.id).endRight,t=n.x,r=n.y;s&&(i=e_.calcTerminalLabelPosition(n.arrowTypeEnd?10:0,"end_right",s),t=i.x,r=i.y),e.attr("transform",`translate(${t}, ${r})`)}},"positionEdgeLabel"),AO=mt((e,t)=>{var r=e.x,n=e.y,r=Math.abs(t.x-r),t=Math.abs(t.y-n);return e.width/2<=r||e.height/2<=t},"outsideNode"),LO=mt((e,n,i)=>{D.debug(`intersection calc abc89: + outsidePoint: ${JSON.stringify(n)} + insidePoint : ${JSON.stringify(i)} + node : x:${e.x} y:${e.y} w:${e.width} h:`+e.height);let a=e.x,t=e.y,r=Math.abs(a-i.x),s=e.width/2,o=i.x<n.x?s-r:s+r,l=e.height/2,c=Math.abs(n.y-i.y),h=Math.abs(n.x-i.x),u;if(Math.abs(t-n.y)*s>Math.abs(a-n.x)*l)return e=i.y<n.y?n.y-l-t:t-l-n.y,o=h*e/c,u={x:i.x<n.x?i.x+o:i.x-h+o,y:i.y<n.y?i.y+c-e:i.y-c+e},0===o&&(u.x=n.x,u.y=n.y),0===h&&(u.x=n.x),0===c&&(u.y=n.y),D.debug(`abc89 top/bottom calc, Q ${c}, q ${e}, R ${h}, r `+o,u),u;{let e=c*(o=i.x<n.x?n.x-s-a:a-s-n.x)/h,t=i.x<n.x?i.x+h-o:i.x-h+o,r=i.y<n.y?i.y+e:i.y-e;return D.debug(`sides calc abc89, Q ${c}, q ${e}, R ${h}, r `+o,{_x:t,_y:r}),0===o&&(t=n.x,r=n.y),0===h&&(t=n.x),0===c&&(r=n.y),{x:t,y:r}}},"intersection"),NO=mt((e,n)=>{D.warn("abc88 cutPathAtIntersect",e,n);let i=[],a=e[0],s=!1;return e.forEach(e=>{if(D.info("abc88 checking point",e,n),AO(n,e)||s)D.warn("abc88 outside",e,a),a=e,s||i.push(e);else{let t=LO(n,a,e),r=(D.debug("abc88 inside",e,a,t),D.debug("abc88 intersection",t,n),!1);i.forEach(e=>{r=r||e.x===t.x&&e.y===t.y}),i.some(e=>e.x===t.x&&e.y===t.y)?D.warn("abc88 no intersect",t,i):i.push(t),s=!0}}),D.debug("returning points",i),i},"cutPathAtIntersect"),mt(vO,"extractCornerPoints"),IO=mt(function(e,t,r){var n=t.x-e.x,e=t.y-e.y,r=r/Math.sqrt(n*n+e*e);return{x:t.x-r*n,y:t.y-r*e}},"findAdjacentPoint"),RO=mt(function(n){var e=vO(n).cornerPointPositions,i=[];for(let r=0;r<n.length;r++)if(e.includes(r)){var a=n[r-1],s=n[r+1],o=n[r],l=IO(a,o,5),c=IO(s,o,5),h=c.x-l.x,u=c.y-l.y;i.push(l);let e=2*Math.sqrt(2),t={x:o.x,y:o.y};10<Math.abs(s.x-a.x)&&10<=Math.abs(s.y-a.y)?(D.debug("Corner point fixing",Math.abs(s.x-a.x),Math.abs(s.y-a.y)),t=o.x===l.x?{x:h<0?l.x-5+e:l.x+5-e,y:u<0?l.y-e:l.y+e}:{x:h<0?l.x-e:l.x+e,y:u<0?l.y-5+e:l.y+5-e}):D.debug("Corner point skipping fixing",Math.abs(s.x-a.x),Math.abs(s.y-a.y)),i.push(t,c)}else i.push(n[r]);return i},"fixCorners"),MO=mt((e,t,r)=>(e=Math.floor((e-t-r)/4),`0 ${t} ${Array(e).fill("2 2").join(" ")} `+r),"generateDashArray"),DO=mt(function(n,i,a,e,t,r,s,o=!1){let l=O().handDrawnSeed,c=i.points,h=!1,u=t,d=r;var p,g=[];for(p in i.cssCompiledStyles)SN(p)||g.push(i.cssCompiledStyles[p]);D.debug("UIO intersect check",i.points,d.x,u.x),d.intersect&&u.intersect&&!o&&((c=c.slice(1,i.points.length-1)).unshift(u.intersect(c[0])),D.debug("Last point UIO",i.start,"--\x3e",i.end,c[c.length-1],d,d.intersect(c[c.length-1])),c.push(d.intersect(c[c.length-1]))),t=btoa(JSON.stringify(c)),i.toCluster&&(D.info("to cluster abc88",a.get(i.toCluster)),c=NO(i.points,a.get(i.toCluster).node),h=!0),i.fromCluster&&(D.debug("from cluster abc88",a.get(i.fromCluster),JSON.stringify(c,null,2)),c=NO(c.reverse(),a.get(i.fromCluster).node).reverse(),h=!0),r=c.filter(e=>!Number.isNaN(e.y)),r=RO(r);let f=v3;switch(f=Z5,i.curve){case"linear":f=Z5;break;case"basis":f=v3;break;case"cardinal":f=I3;break;case"bumpX":f=h3;break;case"bumpY":f=u3;break;case"catmullRom":f=G3;break;case"monotoneX":f=aw;break;case"monotoneY":f=sw;break;case"natural":f=hw;break;case"step":f=pw;break;case"stepAfter":f=fw;break;case"stepBefore":f=gw;break;default:f=v3}let{x:m,y}=uO(i),v=r3().x(m).y(y).curve(f),x;switch(i.thickness){case"normal":x="edge-thickness-normal";break;case"thick":x="edge-thickness-thick";break;case"invisible":x="edge-thickness-invisible";break;default:x="edge-thickness-normal"}switch(i.pattern){case"solid":x+=" edge-pattern-solid";break;case"dotted":x+=" edge-pattern-dotted";break;case"dashed":x+=" edge-pattern-dashed";break;default:x+=" edge-pattern-solid"}let b,w="rounded"===i.curve?xO(wO(r,i),5):v(r),k=Array.isArray(i.style)?i.style:[i.style],T=k.find(e=>e?.startsWith("stroke:")),E;if("handDrawn"===i.look)o=FI.svg(n),Object.assign([],r),a=o.path(w,{roughness:.3,seed:l}),x+=" transition",o=(b=H(a).select("path").attr("id",i.id).attr("class"," "+x+(i.classes?" "+i.classes:"")).attr("style",k?k.reduce((e,t)=>e+";"+t,""):"")).attr("d"),b.attr("d",o),n.node().appendChild(b.node());else{let e=g.join(";"),t=k?k.reduce((e,t)=>e+t+";",""):"",r="";i.animate&&(r=" edge-animation-fast"),i.animation&&(r=" edge-animation-"+i.animation),a=(e?e+";"+t+";":t)+";"+(k?k.reduce((e,t)=>e+";"+t,""):""),b=n.append("path").attr("d",w).attr("id",i.id).attr("class"," "+x+(i.classes?" "+i.classes:"")+(r??"")).attr("style",a),T=a.match(/stroke:([^;]+)/)?.[1],E=!0===i.animate||!!i.animation||e.includes("animation");var a="function"==typeof(o=b.node()).getTotalLength?o.getTotalLength():0,o=cO[i.arrowTypeStart]||0,C=cO[i.arrowTypeEnd]||0;"neo"!==i.look||E||(a=`stroke-dasharray: ${"dotted"===i.pattern||"dashed"===i.pattern?MO(a,o,C):`0 ${o} ${a-o-C} `+C}; stroke-dashoffset: 0;`,b.attr("style",a+b.attr("style")))}b.attr("data-edge",!0),b.attr("data-et","edge"),b.attr("data-id",i.id),b.attr("data-points",t),i.showPoints&&r.forEach(e=>{n.append("circle").style("stroke","red").style("fill","red").attr("r",1).attr("cx",e.x).attr("cy",e.y)});let _="";return(O().flowchart.arrowMarkerAbsolute||O().state.arrowMarkerAbsolute)&&(_=(_=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search).replace(/\(/g,"\\(").replace(/\)/g,"\\)")),D.info("arrowTypeStart",i.arrowTypeStart),D.info("arrowTypeEnd",i.arrowTypeEnd),dO(b,i,_,s,e,T),o=Math.floor(c.length/2),C=c[o],a={},(h=!e_.isLabelCoordinateInPath(C,b.attr("d"))||h)&&(a.updatedPath=c),a.originalPath=i.points,a},"insertEdge"),mt(xO,"generateRoundedPath"),mt(bO,"calculateDeltaAndAngle"),mt(wO,"applyMarkerOffsetsToPoints")}),eP=b(()=>{e(),OO=mt((t,e,r,n)=>{e.forEach(e=>{ZO[e](t,r,n)})},"insertMarkers"),PO=mt((e,t,r)=>{D.trace("Making markers for ",r),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionStart").attr("class","marker extension "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionEnd").attr("class","marker extension "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z")},"extension"),BO=mt((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionStart").attr("class","marker composition "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionEnd").attr("class","marker composition "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"composition"),$O=mt((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationStart").attr("class","marker aggregation "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationEnd").attr("class","marker aggregation "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"aggregation"),FO=mt((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyStart").attr("class","marker dependency "+t).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyEnd").attr("class","marker dependency "+t).attr("refX",13).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"dependency"),zO=mt((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopStart").attr("class","marker lollipop "+t).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopEnd").attr("class","marker lollipop "+t).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6)},"lollipop"),GO=mt((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-pointEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-pointStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",4.5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"point"),UO=mt((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-circleEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-circleStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"circle"),qO=mt((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-crossEnd").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-crossStart").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0")},"cross"),jO=mt((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"),YO=mt((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"),WO=mt((e,t,r)=>{var 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"),(n=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")).append("circle").attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),n.append("path").attr("d","M21,0 L21,18")},"zero_or_one"),HO=mt((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"),VO=mt((e,t,r)=>{var 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"),(n=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")).append("circle").attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),n.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")},"zero_or_more"),XO=mt((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"),KO=mt((e,t,r)=>{(e=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")).append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),e.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),e.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10)},"requirement_contains"),ZO={extension:PO,composition:BO,aggregation:$O,dependency:FO,lollipop:zO,point:GO,circle:UO,cross:qO,barb:jO,only_one:YO,zero_or_one:WO,one_or_more:HO,zero_or_more:VO,requirement_arrow:XO,requirement_contains:KO},QO=OO});async function tP(t,r,n){let i,a;"rect"===r.shape&&(r.rx&&r.ry?r.shape="roundedRect":r.shape="squareRect");var s=r.shape?qD[r.shape]:void 0;if(!s)throw new Error(`No such shape: ${r.shape}. Please check your syntax.`);if(r.link){let e;"sandbox"===n.config.securityLevel?e="_top":r.linkTarget&&(e=r.linkTarget||"_blank"),i=t.insert("svg:a").attr("xlink:href",r.link).attr("target",e??null),a=await s(i,r,n)}else a=await s(t,r,n),i=a;return r.tooltip&&a.attr("title",r.tooltip),rP.set(r.id,i),r.haveCallback&&i.attr("class",i.attr("class")+" clickable"),i}var rP,nP,iP,aP,sP,oP=b(()=>{e(),rO(),rP=new Map,mt(tP,"insertNode"),nP=mt((e,t)=>{rP.set(t.id,e)},"setNodeElem"),iP=mt(()=>{rP.clear()},"clear"),aP=mt(e=>{var t=rP.get(e.id),r=(D.trace("Transforming node",e.diff,e,"translate("+(e.x-e.width/2-5)+", "+e.width/2+")"),e.diff||0);return e.clusterNode?t.attr("transform","translate("+(e.x+r-e.width/2)+", "+(e.y-e.height/2-8)+")"):t.attr("transform","translate("+e.x+", "+e.y+")"),r},"positionNode")}),lP=b(()=>{rn(),Oc(),e(),sO(),JO(),eP(),oP(),i(),i_(),sP={common:L,getConfig:ar,insertCluster:eO,insertEdge:DO,insertEdgeLabel:_O,insertMarkers:QO,insertNode:tP,interpolateToCurve:fC,labelHelper:nN,log:D,positionEdgeLabel:SO}});function cP(e){return"symbol"==typeof e||V7(e)&&"[object Symbol]"==_6(e)}var hP,uP=b(()=>{S6(),X7(),mt(cP,"isSymbol"),hP=cP});function dP(e,t){for(var r=-1,n=null==e?0:e.length,i=Array(n);++r<n;)i[r]=t(e[r],r,e);return i}var pP,gP=b(()=>{mt(dP,"arrayMap"),pP=dP});function fP(e){var t;return"string"==typeof e?e:n8(e)?pP(e,fP)+"":hP(e)?vP?vP.call(e):"":"0"==(t=e+"")&&1/e==-mP?"-0":t}var mP,yP,vP,xP,bP=b(()=>{u6(),gP(),s8(),uP(),mP=1/0,yP=Jw?Jw.prototype:void 0,vP=yP?yP.toString:void 0,mt(fP,"baseToString"),xP=fP});function wP(e){for(var t=e.length;t--&&kP.test(e.charAt(t)););return t}var kP,TP,EP=b(()=>{kP=/\s/,mt(wP,"trimmedEndIndex"),TP=wP});function CP(e){return e&&e.slice(0,TP(e)+1).replace(_P,"")}var _P,SP,AP=b(()=>{EP(),_P=/^\s+/,mt(CP,"baseTrim"),SP=CP});function LP(e){if("number"==typeof e)return e;if(hP(e))return NP;if(L6(e)&&(t="function"==typeof e.valueOf?e.valueOf():e,e=L6(t)?t+"":t),"string"!=typeof e)return 0===e?e:+e;e=SP(e);var t=RP.test(e);return t||MP.test(e)?DP(e.slice(2),t?2:8):IP.test(e)?NP:+e}var NP,IP,RP,MP,DP,OP,PP=b(()=>{AP(),N6(),uP(),NP=NaN,IP=/^[-+]0x[0-9a-f]+$/i,RP=/^0b[01]+$/i,MP=/^0o[0-7]+$/i,DP=parseInt,mt(LP,"toNumber"),OP=LP});function BP(e){return e?(e=OP(e))===1/0||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}var $P,FP=b(()=>{PP(),mt(BP,"toFinite"),$P=BP});function zP(e){var t=(e=$P(e))%1;return e==e?t?e-t:e:0}var GP,UP,qP,jP=b(()=>{FP(),mt(zP,"toInteger"),GP=zP}),YP=b(()=>{ok(),h6(),UP=ik(Zw,"WeakMap"),qP=UP});function WP(){}var HP,VP=b(()=>{mt(WP,"noop"),HP=WP});function XP(e,t){for(var r=-1,n=null==e?0:e.length;++r<n&&!1!==t(e[r],r,e););return e}var KP,ZP=b(()=>{mt(XP,"arrayEach"),KP=XP});function QP(e,t,r,n){for(var i=e.length,a=r+(n?1:-1);n?a--:++a<i;)if(t(e[a],a,e))return a;return-1}var JP,eB=b(()=>{mt(QP,"baseFindIndex"),JP=QP});function tB(e){return e!=e}var rB,nB=b(()=>{mt(tB,"baseIsNaN"),rB=tB});function iB(e,t,r){for(var n=r-1,i=e.length;++n<i;)if(e[n]===t)return n;return-1}var aB,sB=b(()=>{mt(iB,"strictIndexOf"),aB=iB});function oB(e,t,r){return t==t?aB(e,t,r):JP(e,rB,r)}var lB,cB=b(()=>{eB(),nB(),sB(),mt(oB,"baseIndexOf"),lB=oB});function hB(e,t){return!(null==e||!e.length)&&-1<lB(e,t,0)}var uB,dB,pB,gB=b(()=>{cB(),mt(hB,"arrayIncludes"),uB=hB}),fB=b(()=>{$7(),dB=O7(Object.keys,Object),pB=dB});function mB(e){if(!U7(e))return pB(e);var t,r=[];for(t in Object(e))vB.call(e,t)&&"constructor"!=t&&r.push(t);return r}var yB,vB,xB,bB=b(()=>{q7(),fB(),yB=Object.prototype,vB=yB.hasOwnProperty,mt(mB,"baseKeys"),xB=mB});function wB(e){return(u8(e)?pE:xB)(e)}var kB,TB,EB,CB,_B=b(()=>{gE(),bB(),d8(),mt(wB,"keys"),kB=wB}),SB=b(()=>{J8(),rE(),pC(),d8(),q7(),_B(),EB=Object.prototype,TB=EB.hasOwnProperty,EB=hC(function(e,t){if(U7(t)||u8(t))tE(t,kB(t),e);else for(var r in t)TB.call(t,r)&&Q8(e,r,t[r])}),CB=EB});function AB(e,t){var r;return!n8(e)&&(!("number"!=(r=typeof e)&&"symbol"!=r&&"boolean"!=r&&null!=e&&!hP(e))||NB.test(e)||!LB.test(e)||null!=t&&e in Object(t))}var LB,NB,IB,RB=b(()=>{s8(),uP(),LB=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,NB=/^\w*$/,mt(AB,"isKey"),IB=AB});function MB(e){var t=(e=RT(e,function(e){return 500===t.size&&t.clear(),e})).cache;return e}var DB,OB,PB,BB,$B,FB=b(()=>{MT(),mt(MB,"memoizeCapped"),DB=MB}),zB=b(()=>{FB(),OB=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,PB=/\\(\\)?/g,BB=DB(function(e){var i=[];return 46===e.charCodeAt(0)&&i.push(""),e.replace(OB,function(e,t,r,n){i.push(r?n.replace(PB,"$1"):t||e)}),i}),$B=BB});function GB(e){return null==e?"":xP(e)}var UB,qB=b(()=>{bP(),mt(GB,"toString"),UB=GB});function jB(e,t){return n8(e)?e:IB(e,t)?[e]:$B(UB(e))}var YB,WB=b(()=>{s8(),RB(),zB(),qB(),mt(jB,"castPath"),YB=jB});function HB(e){var t;return"string"==typeof e||hP(e)?e:"0"==(t=e+"")&&1/e==-1/0?"-0":t}var VB,XB=b(()=>{uP(),mt(HB,"toKey"),VB=HB});function KB(e,t){for(var r=0,n=(t=YB(t,e)).length;null!=e&&r<n;)e=e[VB(t[r++])];return r&&r==n?e:void 0}var ZB,QB=b(()=>{WB(),XB(),mt(KB,"baseGet"),ZB=KB});function JB(e,t,r){return void 0===(e=null==e?void 0:ZB(e,t))?r:e}var e$,t$=b(()=>{QB(),mt(JB,"get"),e$=JB});function r$(e,t){for(var r=-1,n=t.length,i=e.length;++r<n;)e[i+r]=t[r];return e}var n$,i$=b(()=>{mt(r$,"arrayPush"),n$=r$});function a$(e){return n8(e)||t8(e)||!!(s$&&e&&e[s$])}var s$,o$,l$=b(()=>{u6(),a8(),s8(),s$=Jw?Jw.isConcatSpreadable:void 0,mt(a$,"isFlattenable"),o$=a$});function c$(e,t,r,n,i){var a=-1,s=e.length;for(r=r||o$,i=i||[];++a<s;){var o=e[a];0<t&&r(o)?1<t?c$(o,t-1,r,n,i):n$(i,o):n||(i[i.length]=o)}return i}var h$,u$=b(()=>{i$(),l$(),mt(c$,"baseFlatten"),h$=c$});function d$(e){return null!=e&&e.length?h$(e,1):[]}var p$,g$=b(()=>{u$(),mt(d$,"flatten"),p$=d$});function f$(e){return eC(qE(e,void 0,p$),e+"")}var m$,y$=b(()=>{g$(),jE(),rC(),mt(f$,"flatRest"),m$=f$});function v$(e,t,r){var n=-1,i=e.length;(r=i<r?i:r)<0&&(r+=i),i=r<(t=t<0?i<-t?0:i+t:t)?0:r-t>>>0,t>>>=0;for(var a=Array(i);++n<i;)a[n]=e[n+t];return a}var x$,b$=b(()=>{mt(v$,"baseSlice"),x$=v$});function w$(e){return k$.test(e)}var k$,T$,E$=b(()=>{k$=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]"),mt(w$,"hasUnicode"),T$=w$});function C$(e,t,r,n){var i=-1,a=null==e?0:e.length;for(n&&a&&(r=e[++i]);++i<a;)r=t(r,e[i],i,e);return r}var _$,S$=b(()=>{mt(C$,"arrayReduce"),_$=C$});function A$(e,t){return e&&tE(t,kB(t),e)}var L$,N$=b(()=>{rE(),_B(),mt(A$,"baseAssign"),L$=A$});function I$(e,t){return e&&tE(t,EE(t),e)}var R$,M$=b(()=>{rE(),CE(),mt(I$,"baseAssignIn"),R$=I$});function D$(e,t){for(var r=-1,n=null==e?0:e.length,i=0,a=[];++r<n;){var s=e[r];t(s,r,e)&&(a[i++]=s)}return a}var O$,P$=b(()=>{mt(D$,"arrayFilter"),O$=D$});function B$(){return[]}var $$,F$,z$,G$,U$,q$=b(()=>{mt(B$,"stubArray"),$$=B$}),j$=b(()=>{P$(),q$(),F$=Object.prototype,z$=F$.propertyIsEnumerable,U$=(G$=Object.getOwnPropertySymbols)?function(t){return null==t?[]:(t=Object(t),O$(G$(t),function(e){return z$.call(t,e)}))}:$$});function Y$(e,t){return tE(e,U$(e),t)}var W$,H$,V$,X$=b(()=>{rE(),j$(),mt(Y$,"copySymbols"),W$=Y$}),K$=b(()=>{i$(),F7(),j$(),q$(),H$=Object.getOwnPropertySymbols,V$=H$?function(e){for(var t=[];e;)n$(t,U$(e)),e=B7(e);return t}:$$});function Z$(e,t){return tE(e,V$(e),t)}var Q$,J$=b(()=>{rE(),K$(),mt(Z$,"copySymbolsIn"),Q$=Z$});function eF(e,t,r){return t=t(e),n8(e)?t:n$(t,r(e))}var tF,rF=b(()=>{i$(),s8(),mt(eF,"baseGetAllKeys"),tF=eF});function nF(e){return tF(e,kB,U$)}var iF,aF=b(()=>{rF(),j$(),_B(),mt(nF,"getAllKeys"),iF=nF});function sF(e){return tF(e,EE,V$)}var oF,lF,cF,hF,uF,dF,pF,gF,fF,mF,yF,vF,xF,bF,wF,kF,TF,EF,CF,_F=b(()=>{rF(),K$(),CE(),mt(sF,"getAllKeysIn"),oF=sF}),SF=b(()=>{ok(),h6(),lF=ik(Zw,"DataView"),cF=lF}),AF=b(()=>{ok(),h6(),hF=ik(Zw,"Promise"),uF=hF}),LF=b(()=>{ok(),h6(),dF=ik(Zw,"Set"),pF=dF}),NF=b(()=>{SF(),aT(),AF(),LF(),YP(),S6(),Y6(),gF="[object Map]",fF="[object Promise]",mF="[object Set]",yF="[object WeakMap]",vF="[object DataView]",xF=j6(cF),bF=j6(nT),wF=j6(uF),kF=j6(pF),TF=j6(qP),EF=_6,(cF&&EF(new cF(new ArrayBuffer(1)))!=vF||nT&&EF(new nT)!=gF||uF&&EF(uF.resolve())!=fF||pF&&EF(new pF)!=mF||qP&&EF(new qP)!=yF)&&(EF=mt(function(e){var t=_6(e);if(e=(e="[object Object]"==t?e.constructor:void 0)?j6(e):"")switch(e){case xF:return vF;case bF:return gF;case wF:return fF;case kF:return mF;case TF:return yF}return t},"getTag")),CF=EF});function IF(e){var t=e.length,r=new e.constructor(t);return t&&"string"==typeof e[0]&&MF.call(e,"index")&&(r.index=e.index,r.input=e.input),r}var RF,MF,DF,OF=b(()=>{RF=Object.prototype,MF=RF.hasOwnProperty,mt(IF,"initCloneArray"),DF=IF});function PF(e,t){return t=t?T7(e.buffer):e.buffer,new e.constructor(t,e.byteOffset,e.byteLength)}var BF,$F=b(()=>{E7(),mt(PF,"cloneDataView"),BF=PF});function FF(e){var t=new e.constructor(e.source,zF.exec(e));return t.lastIndex=e.lastIndex,t}var zF,GF,UF=b(()=>{zF=/\w*$/,mt(FF,"cloneRegExp"),GF=FF});function qF(e){return YF?Object(YF.call(e)):{}}var jF,YF,WF,HF=b(()=>{u6(),jF=Jw?Jw.prototype:void 0,YF=jF?jF.valueOf:void 0,mt(qF,"cloneSymbol"),WF=qF});function VF(e,t,r){var n=e.constructor;switch(t){case"[object ArrayBuffer]":return T7(e);case"[object Boolean]":case"[object Date]":return new n(+e);case"[object DataView]":return BF(e,r);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return _7(e,r);case"[object Map]":return new n;case"[object Number]":case"[object String]":return new n(e);case"[object RegExp]":return GF(e);case"[object Set]":return new n;case"[object Symbol]":return WF(e)}}var XF,KF=b(()=>{E7(),$F(),UF(),HF(),S7(),mt(VF,"initCloneByTag"),XF=VF});function ZF(e){return V7(e)&&"[object Map]"==CF(e)}var QF,JF,ez,tz=b(()=>{NF(),X7(),mt(ZF,"baseIsMap"),QF=ZF}),rz=b(()=>{tz(),q8(),j8(),JF=(JF=z8&&z8.isMap)?P8(JF):QF,ez=JF});function nz(e){return V7(e)&&"[object Set]"==CF(e)}var iz,az,sz,oz=b(()=>{NF(),X7(),mt(nz,"baseIsSet"),iz=nz}),lz=b(()=>{oz(),q8(),j8(),az=(az=z8&&z8.isSet)?P8(az):iz,sz=az});function cz(r,n,i,e,t,a){var s,o=n&hz,l=n&uz,c=n&dz;if(void 0===(s=i?t?i(r,e,t,a):i(r):s)){if(!L6(r))return r;if(e=n8(r)){if(s=DF(r),!o)return L7(r,s)}else{var h=CF(r),u=h==gz||h==fz;if(b8(r))return y7(r,o);if(h==mz||h==pz||u&&!t){if(s=l||u?{}:Y7(r),!o)return l?Q$(r,R$(s,r)):W$(r,L$(s,r))}else{if(!yz[h])return t?r:{};s=XF(r,h,o)}}if(u=(a=a||new KT).get(r))return u;a.set(r,s),sz(r)?r.forEach(function(e){s.add(cz(e,n,i,e,r,a))}):ez(r)&&r.forEach(function(e,t){s.set(t,cz(e,n,i,t,r,a))});var d=e?void 0:(c?l?oF:iF:l?EE:kB)(r);KP(d||r,function(e,t){d&&(e=r[t=e]),Q8(s,t,cz(e,n,i,t,r,a))})}return s}var hz,uz,dz,pz,gz,fz,mz,yz,vz,xz=b(()=>{JT(),ZP(),J8(),N$(),M$(),b7(),R7(),X$(),J$(),aF(),_F(),NF(),OF(),KF(),W7(),s8(),k8(),rz(),N6(),lz(),_B(),CE(),hz=1,uz=2,dz=4,gz="[object Function]",fz="[object GeneratorFunction]",mz="[object Object]",(yz={})[pz="[object Arguments]"]=yz["[object Array]"]=yz["[object ArrayBuffer]"]=yz["[object DataView]"]=yz["[object Boolean]"]=yz["[object Date]"]=yz["[object Float32Array]"]=yz["[object Float64Array]"]=yz["[object Int8Array]"]=yz["[object Int16Array]"]=yz["[object Int32Array]"]=yz["[object Map]"]=yz["[object Number]"]=yz[mz]=yz["[object RegExp]"]=yz["[object Set]"]=yz["[object String]"]=yz["[object Symbol]"]=yz["[object Uint8Array]"]=yz["[object Uint8ClampedArray]"]=yz["[object Uint16Array]"]=yz["[object Uint32Array]"]=!0,yz["[object Error]"]=yz[gz]=yz["[object WeakMap]"]=!1,mt(cz,"baseClone"),vz=cz});function bz(e){return vz(e,4)}var wz,kz=b(()=>{xz(),mt(bz,"clone"),wz=bz});function Tz(e){return vz(e,5)}var Ez,Cz=b(()=>{xz(),mt(Tz,"cloneDeep"),Ez=Tz});function _z(e){for(var t=-1,r=null==e?0:e.length,n=0,i=[];++t<r;){var a=e[t];a&&(i[n++]=a)}return i}var Sz,Az=b(()=>{mt(_z,"compact"),Sz=_z});function Lz(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this}var Nz,Iz=b(()=>{mt(Lz,"setCacheAdd"),Nz=Lz});function Rz(e){return this.__data__.has(e)}var Mz,Dz=b(()=>{mt(Rz,"setCacheHas"),Mz=Rz});function Oz(e){var t=-1,r=null==e?0:e.length;for(this.__data__=new AT;++t<r;)this.add(e[t])}var Pz,Bz=b(()=>{LT(),Iz(),Dz(),mt(Oz,"SetCache"),Oz.prototype.add=Oz.prototype.push=Nz,Oz.prototype.has=Mz,Pz=Oz});function $z(e,t){for(var r=-1,n=null==e?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}var Fz,zz=b(()=>{mt($z,"arraySome"),Fz=$z});function Gz(e,t){return e.has(t)}var Uz,qz=b(()=>{mt(Gz,"cacheHas"),Uz=Gz});function jz(e,t,r,n,i,a){var s=1&r,o=e.length;if(o!=(l=t.length)&&!(s&&o<l))return!1;var l=a.get(e),c=a.get(t);if(l&&c)return l==t&&c==e;var h=-1,u=!0,d=2&r?new Pz:void 0;for(a.set(e,t),a.set(t,e);++h<o;){var p,g=e[h],f=t[h];if(void 0!==(p=n?s?n(f,g,h,t,e,a):n(g,f,h,e,t,a):p)){if(p)continue;u=!1;break}if(d){if(!Fz(t,function(e,t){if(!Uz(d,t)&&(g===e||i(g,e,r,n,a)))return d.push(t)})){u=!1;break}}else if(g!==f&&!i(g,f,r,n,a)){u=!1;break}}return a.delete(e),a.delete(t),u}var Yz,Wz=b(()=>{Bz(),zz(),qz(),mt(jz,"equalArrays"),Yz=jz});function Hz(e){var r=-1,n=Array(e.size);return e.forEach(function(e,t){n[++r]=[t,e]}),n}var Vz,Xz=b(()=>{mt(Hz,"mapToArray"),Vz=Hz});function Kz(e){var t=-1,r=Array(e.size);return e.forEach(function(e){r[++t]=e}),r}var Zz,Qz=b(()=>{mt(Kz,"setToArray"),Zz=Kz});function Jz(e,t,r,n,i,a,s){switch(r){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!a(new x7(e),new x7(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return Ok(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var o=Vz;case"[object Set]":var l,o=o||Zz;return!!(e.size==t.size||1&n)&&((l=s.get(e))?l==t:(n|=2,s.set(e,t),l=Yz(o(e),o(t),n,i,a,s),s.delete(e),l));case"[object Symbol]":if(tG)return tG.call(e)==tG.call(t)}return!1}var eG,tG,rG,nG=b(()=>{u6(),w7(),Pk(),Wz(),Xz(),Qz(),eG=Jw?Jw.prototype:void 0,tG=eG?eG.valueOf:void 0,mt(Jz,"equalByTag"),rG=Jz});function iG(e,t,r,n,i,a){var s=1&r,o=iF(e),l=o.length;if(l!=iF(t).length&&!s)return!1;for(var c=l;c--;){var h=o[c];if(!(s?h in t:sG.call(t,h)))return!1}var u=a.get(e),d=a.get(t);if(u&&d)return u==t&&d==e;var p=!0;a.set(e,t),a.set(t,e);for(var g=s;++c<l;){var f,m=e[h=o[c]],y=t[h];if(!(void 0===(f=n?s?n(y,m,h,t,e,a):n(m,y,h,e,t,a):f)?m===y||i(m,y,r,n,a):f)){p=!1;break}g=g||"constructor"==h}return p&&!g&&(u=e.constructor)!=(d=t.constructor)&&"constructor"in e&&"constructor"in t&&!("function"==typeof u&&u instanceof u&&"function"==typeof d&&d instanceof d)&&(p=!1),a.delete(e),a.delete(t),p}var aG,sG,oG,lG=b(()=>{aF(),aG=Object.prototype,sG=aG.hasOwnProperty,mt(iG,"equalObjects"),oG=iG});function cG(e,t,r,n,i,a){var s=n8(e),o=n8(t),l=s?uG:CF(e),o=o?uG:CF(t),c=(l=l==hG?dG:l)==dG,h=(o=o==hG?dG:o)==dG;if((o=l==o)&&b8(e)){if(!b8(t))return!1;c=!(s=!0)}return o&&!c?(a=a||new KT,s||U8(e)?Yz(e,t,r,n,i,a):rG(e,t,l,r,n,i,a)):1&r||(s=c&&gG.call(e,"__wrapped__"),l=h&&gG.call(t,"__wrapped__"),!s&&!l)?o&&(a=a||new KT,oG(e,t,r,n,i,a)):i(s?e.value():e,l?t.value():t,r,n,a=a||new KT)}var hG,uG,dG,pG,gG,fG,mG=b(()=>{JT(),Wz(),nG(),lG(),NF(),s8(),k8(),Y8(),hG="[object Arguments]",uG="[object Array]",dG="[object Object]",pG=Object.prototype,gG=pG.hasOwnProperty,mt(cG,"baseIsEqualDeep"),fG=cG});function yG(e,t,r,n,i){return e===t||(null==e||null==t||!V7(e)&&!V7(t)?e!=e&&t!=t:fG(e,t,r,n,yG,i))}var vG,xG=b(()=>{mG(),X7(),mt(yG,"baseIsEqual"),vG=yG});function bG(e,t,r,n){var i=r.length,a=i,s=!n;if(null==e)return!a;for(e=Object(e);i--;){var o=r[i];if(s&&o[2]?o[1]!==e[o[0]]:!(o[0]in e))return!1}for(;++i<a;){var l=(o=r[i])[0],c=e[l],h=o[1];if(s&&o[2]){if(void 0===c&&!(l in e))return!1}else{var u,d=new KT;if(!(void 0===(u=n?n(c,h,l,e,t,d):u)?vG(h,c,3,n,d):u))return!1}}return!0}var wG,kG=b(()=>{JT(),xG(),mt(bG,"baseIsMatch"),wG=bG});function TG(e){return e==e&&!L6(e)}var EG,CG=b(()=>{N6(),mt(TG,"isStrictComparable"),EG=TG});function _G(e){for(var t=kB(e),r=t.length;r--;){var n=t[r],i=e[n];t[r]=[n,i,EG(i)]}return t}var SG,AG=b(()=>{CG(),_B(),mt(_G,"getMatchData"),SG=_G});function LG(t,r){return function(e){return null!=e&&e[t]===r&&(void 0!==r||t in Object(e))}}var NG,IG=b(()=>{mt(LG,"matchesStrictComparable"),NG=LG});function RG(t){var r=SG(t);return 1==r.length&&r[0][2]?NG(r[0][0],r[0][1]):function(e){return e===t||wG(e,t,r)}}var MG,DG=b(()=>{kG(),AG(),IG(),mt(RG,"baseMatches"),MG=RG});function OG(e,t){return null!=e&&t in Object(e)}var PG,BG=b(()=>{mt(OG,"baseHasIn"),PG=OG});function $G(e,t,r){for(var n=-1,i=(t=YB(t,e)).length,a=!1;++n<i;){var s=VB(t[n]);if(!(a=null!=e&&r(e,s)))break;e=e[s]}return a||++n!=i?a:!!(i=null==e?0:e.length)&&l8(i)&&lE(s,i)&&(n8(e)||t8(e))}var FG,zG=b(()=>{WB(),a8(),s8(),cE(),c8(),XB(),mt($G,"hasPath"),FG=$G});function GG(e,t){return null!=e&&FG(e,t,PG)}var UG,qG=b(()=>{BG(),zG(),mt(GG,"hasIn"),UG=GG});function jG(r,n){return IB(r)&&EG(n)?NG(VB(r),n):function(e){var t=e$(e,r);return void 0===t&&t===n?UG(e,r):vG(n,t,3)}}var YG,WG=b(()=>{xG(),t$(),qG(),RB(),CG(),IG(),XB(),mt(jG,"baseMatchesProperty"),YG=jG});function HG(t){return function(e){return e?.[t]}}var VG,XG=b(()=>{mt(HG,"baseProperty"),VG=HG});function KG(t){return function(e){return ZB(e,t)}}var ZG,QG=b(()=>{QB(),mt(KG,"basePropertyDeep"),ZG=KG});function JG(e){return IB(e)?VG(VB(e)):ZG(e)}var eU,tU=b(()=>{XG(),QG(),RB(),XB(),mt(JG,"property"),eU=JG});function rU(e){return"function"==typeof e?e:null==e?PE:"object"==typeof e?n8(e)?YG(e[0],e[1]):MG(e):eU(e)}var nU,iU=b(()=>{DG(),WG(),BE(),s8(),tU(),mt(rU,"baseIteratee"),nU=rU});function aU(e,t,r,n){for(var i=-1,a=null==e?0:e.length;++i<a;){var s=e[i];t(n,s,r(s),e)}return n}var sU,oU=b(()=>{mt(aU,"arrayAggregator"),sU=aU});function lU(e,t){return e&&h7(e,t,kB)}var cU,hU=b(()=>{d7(),_B(),mt(lU,"baseForOwn"),cU=lU});function uU(a,s){return function(e,t){if(null!=e){if(!u8(e))return a(e,t);for(var r=e.length,n=s?r:-1,i=Object(e);(s?n--:++n<r)&&!1!==t(i[n],n,i););}return e}}var dU,pU,gU,fU=b(()=>{d8(),mt(uU,"createBaseEach"),dU=uU}),mU=b(()=>{hU(),fU(),pU=dU(cU),gU=pU});function yU(e,n,i,a){return gU(e,function(e,t,r){n(a,e,i(e),r)}),a}var vU,xU=b(()=>{mU(),mt(yU,"baseAggregator"),vU=yU});function bU(i,a){return function(e,t){var r=n8(e)?sU:vU,n=a?a():{};return r(e,i,nU(t,2),n)}}var wU,kU,TU,EU,CU,_U,SU,AU=b(()=>{oU(),xU(),iU(),s8(),mt(bU,"createAggregator"),wU=bU}),LU=b(()=>{h6(),kU=mt(function(){return Zw.Date.now()},"now"),TU=kU}),NU=b(()=>{aC(),Pk(),lC(),CE(),EU=Object.prototype,CU=EU.hasOwnProperty,_U=iC(function(e,t){e=Object(e);var r=-1,n=t.length,i=2<n?t[2]:void 0;for(i&&oC(t[0],t[1],i)&&(n=1);++r<n;)for(var a=t[r],s=EE(a),o=-1,l=s.length;++o<l;){var c=s[o],h=e[c];(void 0===h||Ok(h,EU[c])&&!CU.call(e,c))&&(e[c]=a[c])}return e}),SU=_U});function IU(e,t,r){for(var n=-1,i=null==e?0:e.length;++n<i;)if(r(t,e[n]))return!0;return!1}var RU,MU=b(()=>{mt(IU,"arrayIncludesWith"),RU=IU});function DU(e,t,r,n){var i=-1,a=uB,s=!0,o=e.length,l=[],c=t.length;if(o){r&&(t=pP(t,P8(r))),n?(a=RU,s=!1):200<=t.length&&(a=Uz,s=!1,t=new Pz(t));e:for(;++i<o;){var h=e[i],u=null==r?h:r(h),h=n||0!==h?h:0;if(s&&u==u){for(var d=c;d--;)if(t[d]===u)continue e;l.push(h)}else a(t,u,n)||l.push(h)}}return l}var OU,PU,BU,$U=b(()=>{Bz(),gB(),MU(),gP(),q8(),qz(),mt(DU,"baseDifference"),OU=DU}),FU=b(()=>{$U(),u$(),aC(),f8(),PU=iC(function(e,t){return g8(e)?OU(e,h$(t,1,g8,!0)):[]}),BU=PU});function zU(e){var t=null==e?0:e.length;return t?e[t-1]:void 0}var GU,UU=b(()=>{mt(zU,"last"),GU=zU});function qU(e,t,r){var n=null==e?0:e.length;return n?(t=r||void 0===t?1:GP(t),x$(e,t<0?0:t,n)):[]}var jU,YU=b(()=>{b$(),jP(),mt(qU,"drop"),jU=qU});function WU(e,t,r){var n=null==e?0:e.length;return n?(t=r||void 0===t?1:GP(t),x$(e,0,(t=n-t)<0?0:t)):[]}var HU,VU=b(()=>{b$(),jP(),mt(WU,"dropRight"),HU=WU});function XU(e){return"function"==typeof e?e:PE}var KU,ZU=b(()=>{BE(),mt(XU,"castFunction"),KU=XU});function QU(e,t){return(n8(e)?KP:gU)(e,KU(t))}var v,JU=b(()=>{ZP(),mU(),ZU(),s8(),mt(QU,"forEach"),v=QU}),eq=b(()=>{JU()});function tq(e,t){for(var r=-1,n=null==e?0:e.length;++r<n;)if(!t(e[r],r,e))return!1;return!0}var rq,nq=b(()=>{mt(tq,"arrayEvery"),rq=tq});function iq(e,n){var i=!0;return gU(e,function(e,t,r){return i=!!n(e,t,r)}),i}var aq,sq=b(()=>{mU(),mt(iq,"baseEvery"),aq=iq});function oq(e,t,r){var n=n8(e)?rq:aq;return r&&oC(e,t,r)&&(t=void 0),n(e,nU(t,3))}var lq,cq=b(()=>{nq(),sq(),iU(),s8(),lC(),mt(oq,"every"),lq=oq});function hq(e,n){var i=[];return gU(e,function(e,t,r){n(e,t,r)&&i.push(e)}),i}var uq,dq=b(()=>{mU(),mt(hq,"baseFilter"),uq=hq});function pq(e,t){return(n8(e)?O$:uq)(e,nU(t,3))}var gq,fq=b(()=>{P$(),dq(),iU(),s8(),mt(pq,"filter"),gq=pq});function mq(a){return function(e,t,r){var n,i=Object(e);return u8(e)||(n=nU(t,3),e=kB(e),t=mt(function(e){return n(i[e],e,i)},"predicate")),-1<(t=a(e,t,r))?i[n?e[t]:t]:void 0}}var yq,vq=b(()=>{iU(),d8(),_B(),mt(mq,"createFind"),yq=mq});function xq(e,t,r){var n=null==e?0:e.length;return n?((r=null==r?0:GP(r))<0&&(r=bq(n+r,0)),JP(e,nU(t,3),r)):-1}var bq,wq,kq,Tq,Eq=b(()=>{eB(),iU(),jP(),bq=Math.max,mt(xq,"findIndex"),wq=xq}),Cq=b(()=>{vq(),Eq(),kq=yq(wq),Tq=kq});function _q(e){return e&&e.length?e[0]:void 0}var Sq,Aq=b(()=>{mt(_q,"head"),Sq=_q}),Lq=b(()=>{Aq()});function Nq(e,n){var i=-1,a=u8(e)?Array(e.length):[];return gU(e,function(e,t,r){a[++i]=n(e,t,r)}),a}var Iq,Rq=b(()=>{mU(),d8(),mt(Nq,"baseMap"),Iq=Nq});function Mq(e,t){return(n8(e)?pP:Iq)(e,nU(t,3))}var x,Dq=b(()=>{gP(),iU(),Rq(),s8(),mt(Mq,"map"),x=Mq});function Oq(e,t){return h$(x(e,t),1)}var Pq,Bq=b(()=>{u$(),Dq(),mt(Oq,"flatMap"),Pq=Oq});function $q(e,t){return null==e?e:h7(e,KU(t),EE)}var Fq,zq=b(()=>{d7(),ZU(),CE(),mt($q,"forIn"),Fq=$q});function Gq(e,t){return e&&cU(e,KU(t))}var Uq,qq,jq,Yq,Wq=b(()=>{hU(),ZU(),mt(Gq,"forOwn"),Uq=Gq}),Hq=b(()=>{n7(),AU(),jq=Object.prototype,qq=jq.hasOwnProperty,jq=wU(function(e,t,r){qq.call(e,r)?e[r].push(t):r7(e,r,[t])}),Yq=jq});function Vq(e,t){return t<e}var Xq,Kq=b(()=>{mt(Vq,"baseGt"),Xq=Vq});function Zq(e,t){return null!=e&&Jq.call(e,t)}var Qq,Jq,ej,tj=b(()=>{Qq=Object.prototype,Jq=Qq.hasOwnProperty,mt(Zq,"baseHas"),ej=Zq});function rj(e,t){return null!=e&&FG(e,t,ej)}var nj,ij=b(()=>{tj(),zG(),mt(rj,"has"),nj=rj});function aj(e){return"string"==typeof e||!n8(e)&&V7(e)&&"[object String]"==_6(e)}var sj,oj=b(()=>{S6(),s8(),X7(),mt(aj,"isString"),sj=aj});function lj(t,e){return pP(e,function(e){return t[e]})}var cj,hj=b(()=>{gP(),mt(lj,"baseValues"),cj=lj});function uj(e){return null==e?[]:cj(e,kB(e))}var dj,pj=b(()=>{hj(),_B(),mt(uj,"values"),dj=uj});function gj(e,t,r,n){return e=u8(e)?e:dj(e),r=r&&!n?GP(r):0,n=e.length,r<0&&(r=fj(n+r,0)),sj(e)?r<=n&&-1<e.indexOf(t,r):!!n&&-1<lB(e,t,r)}var fj,mj,yj=b(()=>{cB(),d8(),oj(),jP(),pj(),fj=Math.max,mt(gj,"includes"),mj=gj});function vj(e,t,r){var n=null==e?0:e.length;return n?((r=null==r?0:GP(r))<0&&(r=xj(n+r,0)),lB(e,t,r)):-1}var xj,bj,wj=b(()=>{cB(),jP(),xj=Math.max,mt(vj,"indexOf"),bj=vj});function kj(e){if(null!=e){if(u8(e)&&(n8(e)||"string"==typeof e||"function"==typeof e.splice||b8(e)||U8(e)||t8(e)))return!e.length;var t,r=CF(e);if("[object Map]"==r||"[object Set]"==r)return!e.size;if(U7(e))return!xB(e).length;for(t in e)if(Ej.call(e,t))return!1}return!0}var Tj,Ej,Cj,_j=b(()=>{bB(),NF(),a8(),s8(),d8(),k8(),q7(),Y8(),Tj=Object.prototype,Ej=Tj.hasOwnProperty,mt(kj,"isEmpty"),Cj=kj});function Sj(e){return V7(e)&&"[object RegExp]"==_6(e)}var Aj,Lj,Nj,Ij=b(()=>{S6(),X7(),mt(Sj,"baseIsRegExp"),Aj=Sj}),Rj=b(()=>{Ij(),q8(),j8(),Lj=(Lj=z8&&z8.isRegExp)?P8(Lj):Aj,Nj=Lj});function Mj(e){return void 0===e}var Dj,Oj=b(()=>{mt(Mj,"isUndefined"),Dj=Mj});function Pj(e,t){return e<t}var Bj,$j=b(()=>{mt(Pj,"baseLt"),Bj=Pj});function Fj(e,n){var i={};return n=nU(n,3),cU(e,function(e,t,r){r7(i,t,n(e,t,r))}),i}var zj,Gj=b(()=>{n7(),hU(),iU(),mt(Fj,"mapValues"),zj=Fj});function Uj(e,t,r){for(var n=-1,i=e.length;++n<i;){var a,s,o=e[n],l=t(o);null!=l&&(void 0===a?l==l&&!hP(l):r(l,a))&&(a=l,s=o)}return s}var qj,jj=b(()=>{uP(),mt(Uj,"baseExtremum"),qj=Uj});function Yj(e){return e&&e.length?qj(e,PE,Xq):void 0}var Wj,Hj=b(()=>{jj(),Kq(),BE(),mt(Yj,"max"),Wj=Yj});function Vj(e){return e&&e.length?qj(e,PE,Bj):void 0}var Xj,Kj=b(()=>{jj(),$j(),BE(),mt(Vj,"min"),Xj=Vj});function Zj(e,t){return e&&e.length?qj(e,nU(t,2),Bj):void 0}var Qj,Jj=b(()=>{jj(),iU(),$j(),mt(Zj,"minBy"),Qj=Zj});function eY(t){if("function"!=typeof t)throw new TypeError("Expected a function");return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}}var tY,rY=b(()=>{mt(eY,"negate"),tY=eY});function nY(e,t,r,n){if(L6(e))for(var i=-1,a=(t=YB(t,e)).length,s=a-1,o=e;null!=o&&++i<a;){var l,c=VB(t[i]),h=r;if("__proto__"===c||"constructor"===c||"prototype"===c)return e;i!=s&&(l=o[c],void 0===(h=n?n(l,c,o):void 0))&&(h=L6(l)?l:lE(t[i+1])?[]:{}),Q8(o,c,h),o=o[c]}return e}var iY,aY=b(()=>{J8(),WB(),cE(),N6(),XB(),mt(nY,"baseSet"),iY=nY});function sY(e,t,r){for(var n=-1,i=t.length,a={};++n<i;){var s=t[n],o=ZB(e,s);r(o,s)&&iY(a,YB(s,e),o)}return a}var oY,lY=b(()=>{QB(),aY(),WB(),mt(sY,"basePickBy"),oY=sY});function cY(e,r){var t;return null==e?{}:(t=pP(oF(e),function(e){return[e]}),r=nU(r),oY(e,t,function(e,t){return r(e,t[0])}))}var hY,uY=b(()=>{gP(),iU(),lY(),_F(),mt(cY,"pickBy"),hY=cY});function dY(e,t){var r=e.length;for(e.sort(t);r--;)e[r]=e[r].value;return e}var pY,gY=b(()=>{mt(dY,"baseSortBy"),pY=dY});function fY(e,t){if(e!==t){var r=void 0!==e,n=null===e,i=e==e,a=hP(e),s=void 0!==t,o=null===t,l=t==t,c=hP(t);if(!o&&!c&&!a&&t<e||a&&s&&l&&!o&&!c||n&&s&&l||!r&&l||!i)return 1;if(!n&&!a&&!c&&e<t||c&&r&&i&&!n&&!a||o&&r&&i||!s&&i||!l)return-1}return 0}var mY,yY=b(()=>{uP(),mt(fY,"compareAscending"),mY=fY});function vY(e,t,r){for(var n=-1,i=e.criteria,a=t.criteria,s=i.length,o=r.length;++n<s;){var l=mY(i[n],a[n]);if(l)return o<=n?l:l*("desc"==r[n]?-1:1)}return e.index-t.index}var xY,bY=b(()=>{yY(),mt(vY,"compareMultiple"),xY=vY});function wY(e,n,r){n=n.length?pP(n,function(t){return n8(t)?function(e){return ZB(e,1===t.length?t[0]:t)}:t}):[PE];var i=-1,e=(n=pP(n,P8(nU)),Iq(e,function(t,e,r){return{criteria:pP(n,function(e){return e(t)}),index:++i,value:t}}));return pY(e,function(e,t){return xY(e,t,r)})}var kY,TY,EY,CY=b(()=>{gP(),QB(),iU(),Rq(),gY(),q8(),bY(),BE(),s8(),mt(wY,"baseOrderBy"),kY=wY}),_Y=b(()=>{XG(),TY=VG("length"),EY=TY});function SY(e){for(var t=OY.lastIndex=0;OY.test(e);)++t;return t}var AY,LY,NY,IY,RY,MY,DY,OY,PY,BY=b(()=>{AY="["+(IY="\\ud800-\\udfff")+"]",LY="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",NY="\\ud83c[\\udffb-\\udfff]",DY="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?",MY="[\\ufe0e\\ufe0f]?",RY="(?:\\u200d(?:"+[IY="[^"+IY+"]","(?:\\ud83c[\\udde6-\\uddff]){2}","[\\ud800-\\udbff][\\udc00-\\udfff]"].join("|")+")"+MY+DY+")*",MY=MY+DY+RY,DY="(?:"+[IY+LY+"?",LY,"(?:\\ud83c[\\udde6-\\uddff]){2}","[\\ud800-\\udbff][\\udc00-\\udfff]",AY].join("|")+")",OY=RegExp(NY+"(?="+NY+")|"+DY+MY,"g"),mt(SY,"unicodeSize"),PY=SY});function $Y(e){return(T$(e)?PY:EY)(e)}var FY,zY=b(()=>{_Y(),E$(),BY(),mt($Y,"stringSize"),FY=$Y});function GY(r,e){return oY(r,e,function(e,t){return UG(r,t)})}var UY,qY,jY,YY=b(()=>{lY(),qG(),mt(GY,"basePick"),UY=GY}),WY=b(()=>{YY(),y$(),qY=m$(function(e,t){return null==e?{}:UY(e,t)}),jY=qY});function HY(e,t,r,n){for(var i=-1,a=XY(VY((t-e)/(r||1)),0),s=Array(a);a--;)s[n?a:++i]=e,e+=r;return s}var VY,XY,KY,ZY=b(()=>{VY=Math.ceil,XY=Math.max,mt(HY,"baseRange"),KY=HY});function QY(n){return function(e,t,r){return r&&"number"!=typeof r&&oC(e,t,r)&&(t=r=void 0),e=$P(e),void 0===t?(t=e,e=0):t=$P(t),r=void 0===r?e<t?1:-1:$P(r),KY(e,t,r,n)}}var JY,eW,tW,rW=b(()=>{ZY(),lC(),FP(),mt(QY,"createRange"),JY=QY}),nW=b(()=>{rW(),eW=JY(),tW=eW});function iW(e,n,i,a,t){return t(e,function(e,t,r){i=a?(a=!1,e):n(i,e,t,r)}),i}var aW,sW=b(()=>{mt(iW,"baseReduce"),aW=iW});function oW(e,t,r){var n=n8(e)?_$:aW,i=arguments.length<3;return n(e,nU(t,4),r,i,gU)}var lW,cW=b(()=>{S$(),mU(),iU(),sW(),s8(),mt(oW,"reduce"),lW=oW});function hW(e,t){return(n8(e)?O$:uq)(e,tY(nU(t,3)))}var uW,dW=b(()=>{P$(),dq(),iU(),s8(),rY(),mt(hW,"reject"),uW=hW});function pW(e){var t;return null==e?0:u8(e)?sj(e)?FY(e):e.length:"[object Map]"==(t=CF(e))||"[object Set]"==t?e.size:xB(e).length}var gW,fW=b(()=>{bB(),NF(),d8(),oj(),zY(),mt(pW,"size"),gW=pW});function mW(e,n){var i;return gU(e,function(e,t,r){return!(i=n(e,t,r))}),!!i}var yW,vW=b(()=>{mU(),mt(mW,"baseSome"),yW=mW});function xW(e,t,r){var n=n8(e)?Fz:yW;return r&&oC(e,t,r)&&(t=void 0),n(e,nU(t,3))}var bW,wW,kW,TW,EW,CW=b(()=>{zz(),iU(),vW(),s8(),lC(),mt(xW,"some"),bW=xW}),_W=b(()=>{u$(),CY(),aC(),lC(),wW=iC(function(e,t){var r;return null==e?[]:(1<(r=t.length)&&oC(e,t[0],t[1])?t=[]:2<r&&oC(t[0],t[1],t[2])&&(t=[t[0]]),kY(e,h$(t,1),[]))}),kW=wW}),SW=b(()=>{LF(),VP(),Qz(),TW=pF&&1/Zz(new pF([,-0]))[1]==1/0?function(e){return new pF(e)}:HP,EW=TW});function AW(e,t,r){var n=-1,i=uB,a=e.length,s=!0,o=[],l=o;if(r)s=!1,i=RU;else if(200<=a){var c=t?null:EW(e);if(c)return Zz(c);s=!1,i=Uz,l=new Pz}else l=t?[]:o;e:for(;++n<a;){var h=e[n],u=t?t(h):h,h=r||0!==h?h:0;if(s&&u==u){for(var d=l.length;d--;)if(l[d]===u)continue e;t&&l.push(u),o.push(h)}else i(l,u,r)||(l!==o&&l.push(u),o.push(h))}return o}var LW,NW,IW,RW=b(()=>{Bz(),gB(),MU(),qz(),SW(),Qz(),mt(AW,"baseUniq"),LW=AW}),MW=b(()=>{u$(),aC(),RW(),f8(),NW=iC(function(e){return LW(h$(e,1,g8,!0))}),IW=NW});function DW(e){return e&&e.length?LW(e):[]}var OW,PW=b(()=>{RW(),mt(DW,"uniq"),OW=DW});function BW(e,t){return e&&e.length?LW(e,nU(t,2)):[]}var $W,FW=b(()=>{iU(),RW(),mt(BW,"uniqBy"),$W=BW});function zW(e){var t=++GW;return UB(e)+t}var GW,UW,qW=b(()=>{qB(),GW=0,mt(zW,"uniqueId"),UW=zW});function jW(e,t,r){for(var n=-1,i=e.length,a=t.length,s={};++n<i;){var o=n<a?t[n]:void 0;r(s,e[n],o)}return s}var YW,WW=b(()=>{mt(jW,"baseZipObject"),YW=jW});function HW(e,t){return YW(e||[],t||[],Q8)}var VW,XW=b(()=>{J8(),WW(),mt(HW,"zipObject"),VW=HW}),KW=b(()=>{SB(),kz(),Cz(),Az(),VE(),NU(),FU(),YU(),VU(),eq(),cq(),fq(),Cq(),Lq(),Bq(),g$(),JU(),zq(),Wq(),Hq(),ij(),BE(),yj(),wj(),s8(),_j(),O6(),N6(),Rj(),oj(),Oj(),_B(),UU(),Dq(),Gj(),Hj(),gC(),Kj(),Jj(),VP(),LU(),WY(),uY(),nW(),cW(),dW(),fW(),CW(),_W(),MW(),PW(),qW(),pj(),XW()});function ZW(e,t){e[t]?e[t]++:e[t]=1}function QW(e,t){--e[t]||delete e[t]}function JW(e,t,r,n){return t=""+t,r=""+r,!e&&r<t&&(e=t,t=r,r=e),t+""+r+""+(Dj(n)?"\0":n)}function eH(e,t,r,n){return t=""+t,r=""+r,!e&&r<t&&(e=t,t=r,r=e),e={v:t,w:r},n&&(e.name=n),e}function tH(e,t){return JW(e,t.v,t.w,t.name)}var rH,nH,iH=b(()=>{KW(),rH="\0",(nH=class{static{mt(this,"Graph")}constructor(e={}){this._isDirected=!Object.prototype.hasOwnProperty.call(e,"directed")||e.directed,this._isMultigraph=!!Object.prototype.hasOwnProperty.call(e,"multigraph")&&e.multigraph,this._isCompound=!!Object.prototype.hasOwnProperty.call(e,"compound")&&e.compound,this._label=void 0,this._defaultNodeLabelFn=WE(void 0),this._defaultEdgeLabelFn=WE(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[rH]={}),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(e){return this._label=e,this}graph(){return this._label}setDefaultNodeLabel(e){return R6(e)||(e=WE(e)),this._defaultNodeLabelFn=e,this}nodeCount(){return this._nodeCount}nodes(){return kB(this._nodes)}sources(){var t=this;return gq(this.nodes(),function(e){return Cj(t._in[e])})}sinks(){var t=this;return gq(this.nodes(),function(e){return Cj(t._out[e])})}setNodes(e,t){var r=arguments,n=this;return v(e,function(e){1<r.length?n.setNode(e,t):n.setNode(e)}),this}setNode(e,t){return Object.prototype.hasOwnProperty.call(this._nodes,e)?1<arguments.length&&(this._nodes[e]=t):(this._nodes[e]=1<arguments.length?t:this._defaultNodeLabelFn(e),this._isCompound&&(this._parent[e]=rH,this._children[e]={},this._children[rH][e]=!0),this._in[e]={},this._preds[e]={},this._out[e]={},this._sucs[e]={},++this._nodeCount),this}node(e){return this._nodes[e]}hasNode(e){return Object.prototype.hasOwnProperty.call(this._nodes,e)}removeNode(e){var t;return Object.prototype.hasOwnProperty.call(this._nodes,e)&&(t=mt(e=>this.removeEdge(this._edgeObjs[e]),"removeEdge"),delete this._nodes[e],this._isCompound&&(this._removeFromParentsChildList(e),delete this._parent[e],v(this.children(e),e=>{this.setParent(e)}),delete this._children[e]),v(kB(this._in[e]),t),delete this._in[e],delete this._preds[e],v(kB(this._out[e]),t),delete this._out[e],delete this._sucs[e],--this._nodeCount),this}setParent(e,t){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(Dj(t))t=rH;else{for(var r=t+="";!Dj(r);r=this.parent(r))if(r===e)throw new Error("Setting "+t+" as parent of "+e+" would create a cycle");this.setNode(t)}return this.setNode(e),this._removeFromParentsChildList(e),this._parent[e]=t,this._children[t][e]=!0,this}_removeFromParentsChildList(e){delete this._children[this._parent[e]][e]}parent(e){if(this._isCompound&&(e=this._parent[e])!==rH)return e}children(e){var t;return Dj(e)&&(e=rH),this._isCompound?(t=this._children[e])?kB(t):void 0:e===rH?this.nodes():this.hasNode(e)?[]:void 0}predecessors(e){if(e=this._preds[e])return kB(e)}successors(e){if(e=this._sucs[e])return kB(e)}neighbors(e){var t=this.predecessors(e);if(t)return IW(t,this.successors(e))}isLeaf(e){return 0===(e=this.isDirected()?this.successors(e):this.neighbors(e)).length}filterNodes(r){var n=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound}),i=(n.setGraph(this.graph()),this),a=(v(this._nodes,function(e,t){r(t)&&n.setNode(t,e)}),v(this._edgeObjs,function(e){n.hasNode(e.v)&&n.hasNode(e.w)&&n.setEdge(e,i.edge(e))}),{});function s(e){var t=i.parent(e);return void 0===t||n.hasNode(t)?a[e]=t:t in a?a[t]:s(t)}return mt(s,"findParent"),this._isCompound&&v(n.nodes(),function(e){n.setParent(e,s(e))}),n}setDefaultEdgeLabel(e){return R6(e)||(e=WE(e)),this._defaultEdgeLabelFn=e,this}edgeCount(){return this._edgeCount}edges(){return dj(this._edgeObjs)}setPath(e,r){var n=this,i=arguments;return lW(e,function(e,t){return 1<i.length?n.setEdge(e,t,r):n.setEdge(e,t),t}),this}setEdge(){var e,t,r=!1,n=("object"==typeof(n=arguments[0])&&null!==n&&"v"in n?(i=n.v,a=n.w,e=n.name,2===arguments.length&&(t=arguments[1],r=!0)):(i=n,a=arguments[1],e=arguments[3],2<arguments.length&&(t=arguments[2],r=!0)),i=""+i,a=""+a,Dj(e)||(e=""+e),JW(this._isDirected,i,a,e));if(Object.prototype.hasOwnProperty.call(this._edgeLabels,n))r&&(this._edgeLabels[n]=t);else{if(!Dj(e)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(i),this.setNode(a),this._edgeLabels[n]=r?t:this._defaultEdgeLabelFn(i,a,e);var i=(r=eH(this._isDirected,i,a,e)).v,a=r.w;Object.freeze(r),this._edgeObjs[n]=r,ZW(this._preds[a],i),ZW(this._sucs[i],a),this._in[a][n]=r,this._out[i][n]=r,this._edgeCount++}return this}edge(e,t,r){return e=1===arguments.length?tH(this._isDirected,e):JW(this._isDirected,e,t,r),this._edgeLabels[e]}hasEdge(e,t,r){return e=1===arguments.length?tH(this._isDirected,e):JW(this._isDirected,e,t,r),Object.prototype.hasOwnProperty.call(this._edgeLabels,e)}removeEdge(e,t,r){var r=1===arguments.length?tH(this._isDirected,arguments[0]):JW(this._isDirected,e,t,r),n=this._edgeObjs[r];return n&&(e=n.v,t=n.w,delete this._edgeLabels[r],delete this._edgeObjs[r],QW(this._preds[t],e),QW(this._sucs[e],t),delete this._in[t][r],delete this._out[e][r],this._edgeCount--),this}inEdges(e,t){if(e=this._in[e])return e=dj(e),t?gq(e,function(e){return e.v===t}):e}outEdges(e,t){if(e=this._out[e])return e=dj(e),t?gq(e,function(e){return e.w===t}):e}nodeEdges(e,t){var r=this.inEdges(e,t);if(r)return r.concat(this.outEdges(e,t))}}).prototype._nodeCount=0,nH.prototype._edgeCount=0,mt(ZW,"incrementOrInitEntry"),mt(QW,"decrementOrRemoveEntry"),mt(JW,"edgeArgsToId"),mt(eH,"edgeArgsToObj"),mt(tH,"edgeObjToId")}),aH=b(()=>{iH()});function sH(e){e._prev._next=e._next,e._next._prev=e._prev,delete e._next,delete e._prev}function oH(e,t){if("_next"!==e&&"_prev"!==e)return t}var lH,cH=b(()=>{lH=class{static{mt(this,"List")}constructor(){var e={};e._next=e._prev=e,this._sentinel=e}dequeue(){var e=this._sentinel,t=e._prev;if(t!==e)return sH(t),t}enqueue(e){var t=this._sentinel;e._prev&&e._next&&sH(e),e._next=t._next,t._next._prev=e,(t._next=e)._prev=t}toString(){for(var e=[],t=this._sentinel,r=t._prev;r!==t;)e.push(JSON.stringify(r,oH)),r=r._prev;return"["+e.join(", ")+"]"}},mt(sH,"unlink"),mt(oH,"filterOutLinks")});function hH(t,e){return t.nodeCount()<=1?[]:(e=uH((e=pH(t,e||fH)).graph,e.buckets,e.zeroIdx),p$(x(e,function(e){return t.outEdges(e.v,e.w)})))}function uH(e,t,r){for(var n,i=[],a=t[t.length-1],s=t[0];e.nodeCount();){for(;n=s.dequeue();)dH(e,t,r,n);for(;n=a.dequeue();)dH(e,t,r,n);if(e.nodeCount())for(var o=t.length-2;0<o;--o)if(n=t[o].dequeue()){i=i.concat(dH(e,t,r,n,!0));break}}return i}function dH(n,i,a,e,s){var o=s?[]:void 0;return v(n.inEdges(e.v),function(e){var t=n.edge(e),r=n.node(e.v);s&&o.push({v:e.v,w:e.w}),r.out-=t,gH(i,a,r)}),v(n.outEdges(e.v),function(e){var t=n.edge(e),e=e.w;(e=n.node(e)).in-=t,gH(i,a,e)}),n.removeNode(e.v),o}function pH(e,n){var i=new nH,a=0,s=0,t=(v(e.nodes(),function(e){i.setNode(e,{v:e,in:0,out:0})}),v(e.edges(),function(e){var t=i.edge(e.v,e.w)||0,r=n(e);i.setEdge(e.v,e.w,t+r),s=Math.max(s,i.node(e.v).out+=r),a=Math.max(a,i.node(e.w).in+=r)}),tW(s+a+3).map(function(){return new lH})),r=a+1;return v(i.nodes(),function(e){gH(t,r,i.node(e))}),{graph:i,buckets:t,zeroIdx:r}}function gH(e,t,r){(r.out?r.in?e[r.out-r.in+t]:e[e.length-1]:e[0]).enqueue(r)}var fH,mH=b(()=>{KW(),aH(),cH(),fH=WE(1),mt(hH,"greedyFAS"),mt(uH,"doGreedyFAS"),mt(dH,"removeNode"),mt(pH,"buildState"),mt(gH,"assignBucket")});function yH(r){var e="greedy"===r.graph().acyclicer?hH(r,t(r)):vH(r);function t(t){return function(e){return t.edge(e).weight}}v(e,function(e){var t=r.edge(e);r.removeEdge(e),t.forwardName=e.name,t.reversed=!0,r.setEdge(e.w,e.v,t,UW("rev"))}),mt(t,"weightFn")}function vH(t){var r=[],n={},i={};function a(e){Object.prototype.hasOwnProperty.call(i,e)||(i[e]=!0,n[e]=!0,v(t.outEdges(e),function(e){Object.prototype.hasOwnProperty.call(n,e.w)?r.push(e):a(e.w)}),delete n[e])}return mt(a,"dfs"),v(t.nodes(),a),r}function xH(n){v(n.edges(),function(e){var t,r=n.edge(e);r.reversed&&(n.removeEdge(e),t=r.forwardName,delete r.reversed,delete r.forwardName,n.setEdge(e.w,e.v,r,t))})}var bH=b(()=>{KW(),mH(),mt(yH,"run"),mt(vH,"dfsFAS"),mt(xH,"undo")});function wH(e,t,r,n){for(var i;i=UW(n),e.hasNode(i););return r.dummy=t,e.setNode(i,r),i}function kH(n){var i=(new nH).setGraph(n.graph());return v(n.nodes(),function(e){i.setNode(e,n.node(e))}),v(n.edges(),function(e){var t=i.edge(e.v,e.w)||{weight:0,minlen:1},r=n.edge(e);i.setEdge(e.v,e.w,{weight:t.weight+r.weight,minlen:Math.max(t.minlen,r.minlen)})}),i}function TH(t){var r=new nH({multigraph:t.isMultigraph()}).setGraph(t.graph());return v(t.nodes(),function(e){t.children(e).length||r.setNode(e,t.node(e))}),v(t.edges(),function(e){r.setEdge(e,t.edge(e))}),r}function EH(e,t){var r,n=e.x,i=e.y,a=t.x-n,t=t.y-i,s=e.width/2,e=e.height/2;if(a||t)return e=Math.abs(t)*s>Math.abs(a)*e?(r=(e=t<0?-e:e)*a/t,e):(r=a<0?-s:s)*t/a,{x:n+r,y:i+e};throw new Error("Not possible to find intersection inside of the rectangle")}function CH(n){var i=x(tW(LH(n)+1),function(){return[]});return v(n.nodes(),function(e){var t=n.node(e),r=t.rank;Dj(r)||(i[r][t.order]=e)}),i}function _H(t){var r=Xj(x(t.nodes(),function(e){return t.node(e).rank}));v(t.nodes(),function(e){e=t.node(e),nj(e,"rank")&&(e.rank-=r)})}function SH(r){var n=Xj(x(r.nodes(),function(e){return r.node(e).rank})),i=[],a=(v(r.nodes(),function(e){var t=r.node(e).rank-n;i[t]||(i[t]=[]),i[t].push(e)}),0),s=r.graph().nodeRankFactor;v(i,function(e,t){Dj(e)&&t%s!=0?--a:a&&v(e,function(e){r.node(e).rank+=a})})}function AH(e,t,r,n){var i={width:0,height:0};return 4<=arguments.length&&(i.rank=r,i.order=n),wH(e,"border",i,t)}function LH(t){return Wj(x(t.nodes(),function(e){if(e=t.node(e).rank,!Dj(e))return e}))}function NH(e,t){var r={lhs:[],rhs:[]};return v(e,function(e){(t(e)?r.lhs:r.rhs).push(e)}),r}function IH(e,t){var r=TU();try{return t()}finally{console.log(e+" time: "+(TU()-r)+"ms")}}function RH(e,t){return t()}var MH=b(()=>{KW(),aH(),mt(wH,"addDummyNode"),mt(kH,"simplify"),mt(TH,"asNonCompoundGraph"),mt(EH,"intersectRect"),mt(CH,"buildLayerMatrix"),mt(_H,"normalizeRanks"),mt(SH,"removeEmptyRanks"),mt(AH,"addBorderNode"),mt(LH,"maxRank"),mt(NH,"partition"),mt(IH,"time"),mt(RH,"notime")});function DH(a){function s(e){var t=a.children(e),r=a.node(e);if(t.length&&v(t,s),Object.prototype.hasOwnProperty.call(r,"minRank")){r.borderLeft=[],r.borderRight=[];for(var n=r.minRank,i=r.maxRank+1;n<i;++n)OH(a,"borderLeft","_bl",e,r,n),OH(a,"borderRight","_br",e,r,n)}}mt(s,"dfs"),v(a.children(),s)}function OH(e,t,r,n,i,a){var s=i[t][a-1],r=wH(e,"border",{width:0,height:0,rank:a,borderType:t},r);i[t][a]=r,e.setParent(r,n),s&&e.setEdge(s,r,{weight:1})}var PH=b(()=>{KW(),MH(),mt(DH,"addBorderSegments"),mt(OH,"addBorderNode")});function BH(e){var t=e.graph().rankdir.toLowerCase();"lr"!==t&&"rl"!==t||FH(e)}function $H(e){var t=e.graph().rankdir.toLowerCase();"bt"!==t&&"rl"!==t||GH(e),"lr"!==t&&"rl"!==t||(qH(e),FH(e))}function FH(t){v(t.nodes(),function(e){zH(t.node(e))}),v(t.edges(),function(e){zH(t.edge(e))})}function zH(e){var t=e.width;e.width=e.height,e.height=t}function GH(t){v(t.nodes(),function(e){UH(t.node(e))}),v(t.edges(),function(e){e=t.edge(e),v(e.points,UH),Object.prototype.hasOwnProperty.call(e,"y")&&UH(e)})}function UH(e){e.y=-e.y}function qH(t){v(t.nodes(),function(e){jH(t.node(e))}),v(t.edges(),function(e){e=t.edge(e),v(e.points,jH),Object.prototype.hasOwnProperty.call(e,"x")&&jH(e)})}function jH(e){var t=e.x;e.x=e.y,e.y=t}var YH=b(()=>{KW(),mt(BH,"adjust"),mt($H,"undo"),mt(FH,"swapWidthHeight"),mt(zH,"swapWidthHeightOne"),mt(GH,"reverseY"),mt(UH,"reverseYOne"),mt(qH,"swapXY"),mt(jH,"swapXYOne")});function WH(t){t.graph().dummyChains=[],v(t.edges(),function(e){HH(t,e)})}function HH(e,t){var r=t.v,n=e.node(r).rank,i=t.w,a=e.node(i).rank,s=t.name,o=e.edge(t),l=o.labelRank;if(a!==n+1){e.removeEdge(t);var c,h=void 0,u=0;for(++n;n<a;++u,++n)o.points=[],c=wH(e,"edge",h={width:0,height:0,edgeLabel:o,edgeObj:t,rank:n},"_d"),n===l&&(h.width=o.width,h.height=o.height,h.dummy="edge-label",h.labelpos=o.labelpos),e.setEdge(r,c,{weight:o.weight},s),0===u&&e.graph().dummyChains.push(c),r=c;e.setEdge(r,i,{weight:o.weight},s)}}function VH(i){v(i.graph().dummyChains,function(e){var t,r=i.node(e),n=r.edgeLabel;for(i.setEdge(r.edgeObj,n);r.dummy;)t=i.successors(e)[0],i.removeNode(e),n.points.push({x:r.x,y:r.y}),"edge-label"===r.dummy&&(n.x=r.x,n.y=r.y,n.width=r.width,n.height=r.height),r=i.node(e=t)})}var XH=b(()=>{KW(),MH(),mt(WH,"run"),mt(HH,"normalizeEdge"),mt(VH,"undo")});function KH(r){var n={};function i(e){var t=r.node(e);return Object.prototype.hasOwnProperty.call(n,e)?t.rank:(n[e]=!0,(e=Xj(x(r.outEdges(e),function(e){return i(e.w)-r.edge(e).minlen})))!==Number.POSITIVE_INFINITY&&null!=e||(e=0),t.rank=e)}mt(i,"dfs"),v(r.sources(),i)}function ZH(e,t){return e.node(t.w).rank-e.node(t.v).rank-e.edge(t).minlen}var QH=b(()=>{KW(),mt(KH,"longestPath"),mt(ZH,"slack")});function JH(e){var t,r=new nH({directed:!1}),n=e.nodes()[0],i=e.nodeCount();for(r.setNode(n,{});eV(r,e)<i;)t=tV(r,e),t=r.hasNode(t.v)?ZH(e,t):-ZH(e,t),rV(r,e,t);return r}function eV(n,i){function a(r){v(i.nodeEdges(r),function(e){var t=e.v,t=r===t?e.w:t;n.hasNode(t)||ZH(i,e)||(n.setNode(t,{}),n.setEdge(r,t,{}),a(t))})}return mt(a,"dfs"),v(n.nodes(),a),n.nodeCount()}function tV(t,r){return Qj(r.edges(),function(e){if(t.hasNode(e.v)!==t.hasNode(e.w))return ZH(r,e)})}function rV(e,t,r){v(e.nodes(),function(e){t.node(e).rank+=r})}var nV=b(()=>{KW(),aH(),QH(),mt(JH,"feasibleTree"),mt(eV,"tightTree"),mt(tV,"findMinSlackEdge"),mt(rV,"shiftRanks")}),iV=b(()=>{}),aV=b(()=>{}),sV=b(()=>{KW(),aV(),WE(1)}),oV=b(()=>{sV()}),lV=b(()=>{}),cV=b(()=>{lV()}),hV=b(()=>{KW(),WE(1)});function uV(t){var r={},n={},i=[];function a(e){if(Object.prototype.hasOwnProperty.call(n,e))throw new dV;Object.prototype.hasOwnProperty.call(r,e)||(n[e]=!0,r[e]=!0,v(t.predecessors(e),a),delete n[e],i.push(e))}if(mt(a,"visit"),v(t.sinks(),a),gW(r)!==t.nodeCount())throw new dV;return i}function dV(){}var pV=b(()=>{KW(),uV.CycleException=dV,mt(uV,"topsort"),mt(dV,"CycleException"),dV.prototype=new Error}),gV=b(()=>{pV()});function fV(t,e,r){n8(e)||(e=[e]);var n=(t.isDirected()?t.successors:t.neighbors).bind(t),i=[],a={};return v(e,function(e){if(!t.hasNode(e))throw new Error("Graph does not have node: "+e);mV(t,e,"post"===r,a,n,i)}),i}function mV(t,e,r,n,i,a){Object.prototype.hasOwnProperty.call(n,e)||(n[e]=!0,r||a.push(e),v(i(e),function(e){mV(t,e,r,n,i,a)}),r&&a.push(e))}var yV=b(()=>{KW(),mt(fV,"dfs"),mt(mV,"doDfs")});function vV(e,t){return fV(e,t,"post")}var xV=b(()=>{yV(),mt(vV,"postorder")});function bV(e,t){return fV(e,t,"pre")}var wV=b(()=>{yV(),mt(bV,"preorder")}),kV=b(()=>{aV(),iH()}),TV=b(()=>{iV(),sV(),oV(),cV(),hV(),gV(),xV(),wV(),kV(),lV(),pV()});function EV(e){KH(e=kH(e));var t,r=JH(e);for(AV(r),CV(r,e);t=NV(r);)RV(r,e,t,IV(r,e,t))}function CV(t,r){var e=(e=vV(t,t.nodes())).slice(0,e.length-1);v(e,function(e){_V(t,r,e)})}function _V(e,t,r){var n=e.node(r).parent;e.edge(r,n).cutvalue=SV(e,t,r)}function SV(n,i,a){var s=n.node(a).parent,o=!0,e=i.edge(a,s),l=0;return e||(o=!1,e=i.edge(s,a)),l=e.weight,v(i.nodeEdges(a),function(e){var t=e.v===a,r=t?e.w:e.v;r!==s&&(t=t===o,e=i.edge(e).weight,l+=t?e:-e,DV(n,a,r))&&(e=n.edge(a,r).cutvalue,l+=t?-e:e)}),l}function AV(e,t){arguments.length<2&&(t=e.nodes()[0]),LV(e,{},1,t)}function LV(t,r,n,i,e){var a=n,s=t.node(i);return r[i]=!0,v(t.neighbors(i),function(e){Object.prototype.hasOwnProperty.call(r,e)||(n=LV(t,r,n,e,i))}),s.low=a,s.lim=n++,e?s.parent=e:delete s.parent,n}function NV(t){return Tq(t.edges(),function(e){return t.edge(e).cutvalue<0})}function IV(t,r,e){var n=e.v,i=e.w,e=(r.hasEdge(n,i)||(n=e.w,i=e.v),t.node(n)),n=t.node(i),a=e,s=!1,i=(e.lim>n.lim&&(a=n,s=!0),gq(r.edges(),function(e){return s===OV(0,t.node(e.v),a)&&s!==OV(0,t.node(e.w),a)}));return Qj(i,function(e){return ZH(r,e)})}function RV(e,t,r,n){var i=r.v;e.removeEdge(i,r.w),e.setEdge(n.v,n.w,{}),AV(e),CV(e,t),MV(e,t)}function MV(i,a){var e=Tq(i.nodes(),function(e){return!a.node(e).parent}),e=(e=bV(i,e)).slice(1);v(e,function(e){var t=i.node(e).parent,r=a.edge(e,t),n=!1;r||(r=a.edge(t,e),n=!0),a.node(e).rank=a.node(t).rank+(n?r.minlen:-r.minlen)})}function DV(e,t,r){return e.hasEdge(t,r)}function OV(e,t,r){return r.low<=t.lim&&t.lim<=r.lim}var PV=b(()=>{KW(),TV(),MH(),nV(),QH(),EV.initLowLimValues=AV,EV.initCutValues=CV,EV.calcCutValue=SV,EV.leaveEdge=NV,EV.enterEdge=IV,EV.exchangeEdges=RV,mt(EV,"networkSimplex"),mt(CV,"initCutValues"),mt(_V,"assignCutValue"),mt(SV,"calcCutValue"),mt(AV,"initLowLimValues"),mt(LV,"dfsAssignLowLim"),mt(NV,"leaveEdge"),mt(IV,"enterEdge"),mt(RV,"exchangeEdges"),mt(MV,"updateRanks"),mt(DV,"isTreeEdge"),mt(OV,"isDescendant")});function BV(e){switch(e.graph().ranker){case"network-simplex":FV(e);break;case"tight-tree":$V(e);break;case"longest-path":zV(e);break;default:FV(e)}}function $V(e){KH(e),JH(e)}function FV(e){EV(e)}var zV,GV=b(()=>{nV(),PV(),QH(),mt(BV,"rank"),zV=KH,mt($V,"tightTreeRanker"),mt(FV,"networkSimplexRanker")});function UV(t){var r=wH(t,"root",{},"_root"),n=jV(t),i=Wj(dj(n))-1,a=2*i+1,s=(t.graph().nestingRoot=r,v(t.edges(),function(e){t.edge(e).minlen*=a}),YV(t)+1);v(t.children(),function(e){qV(t,r,a,s,i,n,e)}),t.graph().nodeRankFactor=a}function qV(i,a,s,o,l,c,h){var u,d,e,t=i.children(h);t.length?(u=AH(i,"_bt"),d=AH(i,"_bb"),e=i.node(h),i.setParent(u,h),e.borderTop=u,i.setParent(d,h),e.borderBottom=d,v(t,function(e){qV(i,a,s,o,l,c,e);var t=i.node(e),r=t.borderTop||e,n=r!==(e=t.borderBottom||e)?1:l-c[h]+1;i.setEdge(u,r,{weight:t=t.borderTop?o:2*o,minlen:n,nestingEdge:!0}),i.setEdge(e,d,{weight:t,minlen:n,nestingEdge:!0})}),i.parent(h)||i.setEdge(a,u,{weight:0,minlen:l+c[h]})):h!==a&&i.setEdge(a,h,{weight:0,minlen:s})}function jV(n){var i={};function a(e,t){var r=n.children(e);r&&r.length&&v(r,function(e){a(e,t+1)}),i[e]=t}return mt(a,"dfs"),v(n.children(),function(e){a(e,1)}),i}function YV(r){return lW(r.edges(),function(e,t){return e+r.edge(t).weight},0)}function WV(t){var e=t.graph();t.removeNode(e.nestingRoot),delete e.nestingRoot,v(t.edges(),function(e){t.edge(e).nestingEdge&&t.removeEdge(e)})}var HV=b(()=>{KW(),MH(),mt(UV,"run"),mt(qV,"dfs"),mt(jV,"treeDepths"),mt(YV,"sumWeights"),mt(WV,"cleanup")});function VV(i,a,e){var s,o={};v(e,function(e){for(var t,r,n=i.parent(e);n;){if((t=i.parent(n))?(r=o[t],o[t]=n):(r=s,s=n),r&&r!==n)return void a.setEdge(r,n);n=t}})}var XV=b(()=>{KW(),mt(VV,"addSubgraphConstraints")});function KV(i,r,a){var s=ZV(i),o=new nH({compound:!0}).setGraph({root:s}).setDefaultNodeLabel(function(e){return i.node(e)});return v(i.nodes(),function(n){var e=i.node(n),t=i.parent(n);(e.rank===r||e.minRank<=r&&r<=e.maxRank)&&(o.setNode(n),o.setParent(n,t||s),v(i[a](n),function(e){var t=e.v===n?e.w:e.v,r=o.edge(t,n),r=Dj(r)?0:r.weight;o.setEdge(t,n,{weight:i.edge(e).weight+r})}),Object.prototype.hasOwnProperty.call(e,"minRank"))&&o.setNode(n,{borderLeft:e.borderLeft[r],borderRight:e.borderRight[r]})}),o}function ZV(e){for(var t;e.hasNode(t=UW("_root")););return t}var QV=b(()=>{KW(),aH(),mt(KV,"buildLayerGraph"),mt(ZV,"createRootNode")});function JV(e,t){for(var r=0,n=1;n<t.length;++n)r+=eX(e,t[n-1],t[n]);return r}function eX(t,e,r){for(var n=VW(r,x(r,function(e,t){return t})),e=p$(x(e,function(e){return kW(x(t.outEdges(e),function(e){return{pos:n[e.w],weight:t.edge(e).weight}}),"pos")})),i=1;i<r.length;)i<<=1;var a=2*i-1,s=(--i,x(new Array(a),function(){return 0})),o=0;return v(e.forEach(function(e){var t=e.pos+i;s[t]+=e.weight;for(var r=0;0<t;)t%2&&(r+=s[t+1]),s[t=t-1>>1]+=e.weight;o+=e.weight*r})),o}var tX=b(()=>{KW(),mt(JV,"crossCount"),mt(eX,"twoLayerCrossCount")});function rX(r){var n={},e=gq(r.nodes(),function(e){return!r.children(e).length}),t=Wj(x(e,function(e){return r.node(e).rank})),i=x(tW(t+1),function(){return[]});function a(e){var t;nj(n,e)||(n[e]=!0,t=r.node(e),i[t.rank].push(e),v(r.successors(e),a))}return mt(a,"dfs"),t=kW(e,function(e){return r.node(e).rank}),v(t,a),i}var nX=b(()=>{KW(),mt(rX,"initOrder")});function iX(n,e){return x(e,function(e){var t=n.inEdges(e);return t.length?{v:e,barycenter:(t=lW(t,function(e,t){var r=n.edge(t),t=n.node(t.v);return{sum:e.sum+r.weight*t.order,weight:e.weight+r.weight}},{sum:0,weight:0})).sum/t.weight,weight:t.weight}:{v:e}})}var aX=b(()=>{KW(),mt(iX,"barycenter")});function sX(e,t){var n={};return v(e,function(e,t){t=n[e.v]={indegree:0,in:[],out:[],vs:[e.v],i:t},Dj(e.barycenter)||(t.barycenter=e.barycenter,t.weight=e.weight)}),v(t.edges(),function(e){var t=n[e.v],r=n[e.w];Dj(t)||Dj(r)||(r.indegree++,t.out.push(n[e.w]))}),oX(gq(n,function(e){return!e.indegree}))}function oX(r){var e=[];function t(t){return function(e){e.merged||(Dj(e.barycenter)||Dj(t.barycenter)||e.barycenter>=t.barycenter)&&lX(t,e)}}function n(t){return function(e){e.in.push(t),0==--e.indegree&&r.push(e)}}for(mt(t,"handleIn"),mt(n,"handleOut");r.length;){var i=r.pop();e.push(i),v(i.in.reverse(),t(i)),v(i.out,n(i))}return x(gq(e,function(e){return!e.merged}),function(e){return jY(e,["vs","i","barycenter","weight"])})}function lX(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 cX=b(()=>{KW(),mt(sX,"resolveConflicts"),mt(oX,"doResolveConflicts"),mt(lX,"mergeEntries")});function hX(e,t){var r=(e=NH(e,function(e){return Object.prototype.hasOwnProperty.call(e,"barycenter")})).lhs,n=kW(e.rhs,function(e){return-e.i}),i=[],a=0,s=0,o=0,e=(r.sort(dX(!!t)),o=uX(i,n,o),v(r,function(e){o+=e.vs.length,i.push(e.vs),a+=e.barycenter*e.weight,s+=e.weight,o=uX(i,n,o)}),{vs:p$(i)});return s&&(e.barycenter=a/s,e.weight=s),e}function uX(e,t,r){for(var n;t.length&&(n=GU(t)).i<=r;)t.pop(),e.push(n.vs),r++;return r}function dX(r){return function(e,t){return e.barycenter<t.barycenter?-1:e.barycenter>t.barycenter?1:r?t.i-e.i:e.i-t.i}}var pX=b(()=>{KW(),MH(),mt(hX,"sort"),mt(uX,"consumeUnsortable"),mt(dX,"compareWithBias")});function gX(r,e,n,i){var t,a=r.children(e),s=(e=r.node(e))?e.borderLeft:void 0,o=e?e.borderRight:void 0,l={},e=(s&&(a=gq(a,function(e){return e!==s&&e!==o})),iX(r,a));return v(e,function(e){var t;r.children(e.v).length&&(t=gX(r,e.v,n,i),l[e.v]=t,Object.prototype.hasOwnProperty.call(t,"barycenter"))&&mX(e,t)}),fX(a=sX(e,n),l),e=hX(a,i),s&&(e.vs=p$([s,e.vs,o]),r.predecessors(s).length)&&(a=r.node(r.predecessors(s)[0]),t=r.node(r.predecessors(o)[0]),Object.prototype.hasOwnProperty.call(e,"barycenter")||(e.barycenter=0,e.weight=0),e.barycenter=(e.barycenter*e.weight+a.order+t.order)/(e.weight+2),e.weight+=2),e}function fX(e,t){v(e,function(e){e.vs=p$(e.vs.map(function(e){return t[e]?t[e].vs:e}))})}function mX(e,t){Dj(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 yX=b(()=>{KW(),aX(),cX(),pX(),mt(gX,"sortSubgraph"),mt(fX,"expandSubgraphs"),mt(mX,"mergeBarycenters")});function vX(e){var t=LH(e),r=xX(e,tW(1,t+1),"inEdges"),n=xX(e,tW(t-1,-1,-1),"outEdges");wX(e,rX(e));for(var i,a=Number.POSITIVE_INFINITY,s=0,o=0;o<4;++s,++o){bX(s%2?r:n,2<=s%4);var l,c=JV(e,l=CH(e));c<a&&(o=0,i=Ez(l),a=c)}wX(e,i)}function xX(t,e,r){return x(e,function(e){return KV(t,e,r)})}function bX(e,t){var n=new nH;v(e,function(r){var e=r.graph().root,e=gX(r,e,n,t);v(e.vs,function(e,t){r.node(e).order=t}),VV(r,n,e.vs)})}function wX(r,e){v(e,function(e){v(e,function(e,t){r.node(e).order=t})})}var kX=b(()=>{KW(),aH(),MH(),XV(),QV(),tX(),nX(),yX(),mt(vX,"order"),mt(xX,"buildLayerGraphs"),mt(bX,"sweepLayerGraphs"),mt(wX,"assignOrder")});function TX(c){var h=CX(c);v(c.graph().dummyChains,function(e){for(var t,r=c.node(e).edgeObj,n=EX(c,h,r.v,r.w),i=n.path,a=n.lca,s=0,o=i[s],l=!0;e!==r.w;){if(t=c.node(e),l){for(;(o=i[s])!==a&&c.node(o).maxRank<t.rank;)s++;o===a&&(l=!1)}if(!l){for(;s<i.length-1&&c.node(o=i[s+1]).minRank<=t.rank;)s++;o=i[s]}c.setParent(e,o),e=c.successors(e)[0]}})}function EX(e,t,r,n){for(var i,a=[],s=[],o=Math.min(t[r].low,t[n].low),l=Math.max(t[r].lim,t[n].lim),c=r;c=e.parent(c),a.push(c),c&&(t[c].low>o||l>t[c].lim););for(i=c,c=n;(c=e.parent(c))!==i;)s.push(c);return{path:a.concat(s.reverse()),lca:i}}function CX(r){var n={},i=0;function a(e){var t=i;v(r.children(e),a),n[e]={low:t,lim:i++}}return mt(a,"dfs"),v(r.children(),a),n}var _X=b(()=>{KW(),mt(TX,"parentDummyChains"),mt(EX,"findPath"),mt(CX,"postorder")});function SX(c,e){var h={};function t(e,n){var a=0,s=0,o=e.length,l=GU(n);return v(n,function(e,t){var r=LX(c,e),i=r?c.node(r).order:o;!r&&e!==l||(v(n.slice(s,t+1),function(n){v(c.predecessors(n),function(e){var t=c.node(e),r=t.order;!(r<a||i<r)||t.dummy&&c.node(n).dummy||NX(h,e,n)})}),s=t+1,a=i)}),n}return mt(t,"visitLayer"),lW(e,t),h}function AX(o,e){var s={};function l(t,e,r,n,i){var a;v(tW(e,r),function(e){a=t[e],o.node(a).dummy&&v(o.predecessors(a),function(e){var t=o.node(e);t.dummy&&(t.order<n||t.order>i)&&NX(s,e,a)})})}function t(r,n){var i,a=-1,s=0;return v(n,function(e,t){"border"===o.node(e).dummy&&(e=o.predecessors(e)).length&&(i=o.node(e[0]).order,l(n,s,t,a,i),s=t,a=i),l(n,s,n.length,i,r.length)}),n}return mt(l,"scan"),mt(t,"visitLayer"),lW(e,t),s}function LX(t,e){if(t.node(e).dummy)return Tq(t.predecessors(e),function(e){return t.node(e).dummy})}function NX(e,t,r){r<t&&(n=t,t=r,r=n);var n=e[t];n||(e[t]=n={}),n[r]=!0}function IX(e,t,r){var n;return r<t&&(n=t,t=r,r=n),!!e[t]&&Object.prototype.hasOwnProperty.call(e[t],r)}function RX(e,t,o,l){var c={},h={},u={};return v(t,function(e){v(e,function(e,t){u[h[c[e]=e]=e]=t})}),v(t,function(e){var s=-1;v(e,function(e){var t=l(e);if(t.length)for(var r=((t=kW(t,function(e){return u[e]})).length-1)/2,n=Math.floor(r),i=Math.ceil(r);n<=i;++n){var a=t[n];h[e]===e&&s<u[a]&&!IX(o,e,a)&&(h[a]=e,h[e]=c[e]=c[a],s=u[a])}})}),{root:c,align:h}}function MX(n,e,t,r,i){var a={},s=DX(n,e,t,i),o=i?"borderLeft":"borderRight";function l(e,t){for(var r=s.nodes(),n=r.pop(),i={};n;)i[n]?e(n):(i[n]=!0,r.push(n),r=r.concat(t(n))),n=r.pop()}function c(e){a[e]=s.inEdges(e).reduce(function(e,t){return Math.max(e,a[t.v]+s.edge(t))},0)}function h(e){var t=s.outEdges(e).reduce(function(e,t){return Math.min(e,a[t.w]-s.edge(t))},Number.POSITIVE_INFINITY),r=n.node(e);t!==Number.POSITIVE_INFINITY&&r.borderType!==o&&(a[e]=Math.max(a[e],t))}return mt(l,"iterate"),mt(c,"pass1"),mt(h,"pass2"),l(c,s.predecessors.bind(s)),l(h,s.successors.bind(s)),v(r,function(e){a[e]=a[t[e]]}),a}function DX(a,e,s,t){var o=new nH,r=a.graph(),l=FX(r.nodesep,r.edgesep,t);return v(e,function(e){var i;v(e,function(e){var t,r,n=s[e];o.setNode(n),i&&(t=s[i],r=o.edge(t,n),o.setEdge(t,n,Math.max(l(a,e,i),r||0))),i=e})}),o}function OX(i,e){return Qj(dj(e),function(e){var r=Number.NEGATIVE_INFINITY,n=Number.POSITIVE_INFINITY;return Fq(e,function(e,t){t=zX(i,t)/2,r=Math.max(e+t,r),n=Math.min(e-t,n)}),r-n})}function PX(s,o){var e=dj(o),l=Xj(e),c=Wj(e);v(["u","d"],function(a){v(["l","r"],function(e){var t,r,n=a+e,i=s[n];i!==o&&(t=dj(i),r="l"===e?l-Xj(t):c-Wj(t))&&(s[n]=zj(i,function(e){return e+r}))})})}function BX(r,n){return zj(r.ul,function(e,t){return n?r[n.toLowerCase()][t]:((t=kW(x(r,t)))[1]+t[2])/2})}function $X(n){var i,e=CH(n),a=dC(SX(n,e),AX(n,e)),s={},t=(v(["u","d"],function(r){i="u"===r?e:dj(e).reverse(),v(["l","r"],function(e){"r"===e&&(i=x(i,function(e){return dj(e).reverse()}));var t=("u"===r?n.predecessors:n.successors).bind(n),t=RX(0,i,a,t),t=MX(n,i,t.root,t.align,"r"===e);"r"===e&&(t=zj(t,function(e){return-e})),s[r+e]=t})}),OX(n,s));return PX(s,t),BX(s,n.graph().align)}function FX(s,o,l){return function(e,t,r){var n,i=e.node(t),a=e.node(r),t=0;if(t+=i.width/2,Object.prototype.hasOwnProperty.call(i,"labelpos"))switch(i.labelpos.toLowerCase()){case"l":n=-i.width/2;break;case"r":n=i.width/2}if(n&&(t+=l?n:-n),n=0,t=(t=(t+=(i.dummy?o:s)/2)+(a.dummy?o:s)/2)+a.width/2,Object.prototype.hasOwnProperty.call(a,"labelpos"))switch(a.labelpos.toLowerCase()){case"l":n=a.width/2;break;case"r":n=-a.width/2}return n&&(t+=l?n:-n),n=0,t}}function zX(e,t){return e.node(t).width}var GX=b(()=>{KW(),aH(),MH(),mt(SX,"findType1Conflicts"),mt(AX,"findType2Conflicts"),mt(LX,"findOtherInnerSegmentNode"),mt(NX,"addConflict"),mt(IX,"hasConflict"),mt(RX,"verticalAlignment"),mt(MX,"horizontalCompaction"),mt(DX,"buildBlockGraph"),mt(OX,"findSmallestWidthAlignment"),mt(PX,"alignCoordinates"),mt(BX,"balance"),mt($X,"positionX"),mt(FX,"sep"),mt(zX,"width")});function UX(r){qX(r=TH(r)),Uq($X(r),function(e,t){r.node(t).x=e})}function qX(r){var e=CH(r),n=r.graph().ranksep,i=0;v(e,function(e){var t=Wj(x(e,function(e){return r.node(e).height}));v(e,function(e){r.node(e).y=i+t/2}),i+=t+n})}var jX=b(()=>{KW(),MH(),GX(),mt(UX,"position"),mt(qX,"positionY")});function YX(t,e){var r=e&&e.debugTiming?IH:RH;r("layout",()=>{var e=r(" buildLayoutGraph",()=>VX(t));r(" runLayout",()=>WX(e,r)),r(" updateInputGraph",()=>HX(t,e))})}function WX(e,t){t(" makeSpaceForEdgeLabels",()=>XX(e)),t(" removeSelfEdges",()=>iK(e)),t(" acyclic",()=>yH(e)),t(" nestingGraph.run",()=>UV(e)),t(" rank",()=>BV(TH(e))),t(" injectEdgeLabelProxies",()=>KX(e)),t(" removeEmptyRanks",()=>SH(e)),t(" nestingGraph.cleanup",()=>WV(e)),t(" normalizeRanks",()=>_H(e)),t(" assignRankMinMax",()=>ZX(e)),t(" removeEdgeLabelProxies",()=>QX(e)),t(" normalize.run",()=>WH(e)),t(" parentDummyChains",()=>TX(e)),t(" addBorderSegments",()=>DH(e)),t(" order",()=>vX(e)),t(" insertSelfEdges",()=>aK(e)),t(" adjustCoordinateSystem",()=>BH(e)),t(" position",()=>UX(e)),t(" positionSelfEdges",()=>sK(e)),t(" removeBorderNodes",()=>nK(e)),t(" normalize.undo",()=>VH(e)),t(" fixupEdgeLabelCoords",()=>tK(e)),t(" undoCoordinateSystem",()=>$H(e)),t(" translateGraph",()=>JX(e)),t(" assignNodeIntersects",()=>eK(e)),t(" reversePoints",()=>rK(e)),t(" acyclic.undo",()=>xH(e))}function HX(n,i){v(n.nodes(),function(e){var t=n.node(e),r=i.node(e);t&&(t.x=r.x,t.y=r.y,i.children(e).length)&&(t.width=r.width,t.height=r.height)}),v(n.edges(),function(e){var t=n.edge(e),e=i.edge(e);t.points=e.points,Object.prototype.hasOwnProperty.call(e,"x")&&(t.x=e.x,t.y=e.y)}),n.graph().width=i.graph().width,n.graph().height=i.graph().height}function VX(r){var n=new nH({multigraph:!0,compound:!0}),e=lK(r.graph());return n.setGraph(dC({},hK,oK(e,cK),jY(e,uK))),v(r.nodes(),function(e){var t=lK(r.node(e));n.setNode(e,SU(oK(t,dK),pK)),n.setParent(e,r.parent(e))}),v(r.edges(),function(e){var t=lK(r.edge(e));n.setEdge(e,dC({},fK,oK(t,gK),jY(t,mK)))}),n}function XX(t){var r=t.graph();r.ranksep/=2,v(t.edges(),function(e){(e=t.edge(e)).minlen*=2,"c"!==e.labelpos.toLowerCase()&&("TB"===r.rankdir||"BT"===r.rankdir?e.width+=e.labeloffset:e.height+=e.labeloffset)})}function KX(r){v(r.edges(),function(e){var t=r.edge(e);t.width&&t.height&&(t=r.node(e.v),t={rank:(r.node(e.w).rank-t.rank)/2+t.rank,e:e},wH(r,"edge-proxy",t,"_ep"))})}function ZX(t){var r=0;v(t.nodes(),function(e){(e=t.node(e)).borderTop&&(e.minRank=t.node(e.borderTop).rank,e.maxRank=t.node(e.borderBottom).rank,r=Wj(r,e.maxRank))}),t.graph().maxRank=r}function QX(r){v(r.nodes(),function(e){var t=r.node(e);"edge-proxy"===t.dummy&&(r.edge(t.e).labelRank=t.rank,r.removeNode(e))})}function JX(t){var i=Number.POSITIVE_INFINITY,a=0,s=Number.POSITIVE_INFINITY,o=0,e=t.graph(),r=e.marginx||0,n=e.marginy||0;function l(e){var t=e.x,r=e.y,n=e.width,e=e.height;i=Math.min(i,t-n/2),a=Math.max(a,t+n/2),s=Math.min(s,r-e/2),o=Math.max(o,r+e/2)}mt(l,"getExtremes"),v(t.nodes(),function(e){l(t.node(e))}),v(t.edges(),function(e){e=t.edge(e),Object.prototype.hasOwnProperty.call(e,"x")&&l(e)}),i-=r,s-=n,v(t.nodes(),function(e){(e=t.node(e)).x-=i,e.y-=s}),v(t.edges(),function(e){e=t.edge(e),v(e.points,function(e){e.x-=i,e.y-=s}),Object.prototype.hasOwnProperty.call(e,"x")&&(e.x-=i),Object.prototype.hasOwnProperty.call(e,"y")&&(e.y-=s)}),e.width=a-i+r,e.height=o-s+n}function eK(a){v(a.edges(),function(e){var t,r=a.edge(e),n=a.node(e.v),e=a.node(e.w),i=r.points?(t=r.points[0],r.points[r.points.length-1]):(r.points=[],t=e,n);r.points.unshift(EH(n,t)),r.points.push(EH(e,i))})}function tK(r){v(r.edges(),function(e){var t=r.edge(e);if(Object.prototype.hasOwnProperty.call(t,"x"))switch("l"!==t.labelpos&&"r"!==t.labelpos||(t.width-=t.labeloffset),t.labelpos){case"l":t.x-=t.width/2+t.labeloffset;break;case"r":t.x+=t.width/2+t.labeloffset}})}function rK(t){v(t.edges(),function(e){(e=t.edge(e)).reversed&&e.points.reverse()})}function nK(a){v(a.nodes(),function(e){var t,r,n,i;a.children(e).length&&(e=a.node(e),t=a.node(e.borderTop),r=a.node(e.borderBottom),n=a.node(GU(e.borderLeft)),i=a.node(GU(e.borderRight)),e.width=Math.abs(i.x-n.x),e.height=Math.abs(r.y-t.y),e.x=n.x+e.width/2,e.y=t.y+e.height/2)}),v(a.nodes(),function(e){"border"===a.node(e).dummy&&a.removeNode(e)})}function iK(r){v(r.edges(),function(e){var t;e.v===e.w&&((t=r.node(e.v)).selfEdges||(t.selfEdges=[]),t.selfEdges.push({e:e,label:r.edge(e)}),r.removeEdge(e))})}function aK(i){var e=CH(i);v(e,function(e){var n=0;v(e,function(e,t){var r=i.node(e);r.order=t+n,v(r.selfEdges,function(e){wH(i,"selfedge",{width:e.label.width,height:e.label.height,rank:r.rank,order:t+ ++n,e:e.e,label:e.label},"_se")}),delete r.selfEdges})})}function sK(s){v(s.nodes(),function(e){var t,r,n,i,a=s.node(e);"selfedge"===a.dummy&&(t=(i=s.node(a.e.v)).x+i.width/2,r=i.y,n=a.x-t,i=i.height/2,s.setEdge(a.e,a.label),s.removeNode(e),a.label.points=[{x:t+2*n/3,y:r-i},{x:t+5*n/6,y:r-i},{x:t+n,y:r},{x:t+5*n/6,y:r+i},{x:t+2*n/3,y:r+i}],a.label.x=a.x,a.label.y=a.y)})}function oK(e,t){return zj(jY(e,t),Number)}function lK(e){var r={};return v(e,function(e,t){r[t.toLowerCase()]=e}),r}var cK,hK,uK,dK,pK,gK,fK,mK,yK=b(()=>{KW(),aH(),PH(),YH(),bH(),XH(),GV(),HV(),kX(),_X(),jX(),MH(),mt(YX,"layout"),mt(WX,"runLayout"),mt(HX,"updateInputGraph"),cK=["nodesep","edgesep","ranksep","marginx","marginy"],hK={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},uK=["acyclicer","ranker","rankdir","align"],dK=["width","height"],pK={width:0,height:0},gK=["minlen","weight","width","height","labeloffset"],fK={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},mK=["labelpos"],mt(VX,"buildLayoutGraph"),mt(XX,"makeSpaceForEdgeLabels"),mt(KX,"injectEdgeLabelProxies"),mt(ZX,"assignRankMinMax"),mt(QX,"removeEdgeLabelProxies"),mt(JX,"translateGraph"),mt(eK,"assignNodeIntersects"),mt(tK,"fixupEdgeLabelCoords"),mt(rK,"reversePointsForReversedEdges"),mt(nK,"removeBorderNodes"),mt(iK,"removeSelfEdges"),mt(aK,"insertSelfEdges"),mt(sK,"positionSelfEdges"),mt(oK,"selectNumberAttrs"),mt(lK,"canonicalize")}),vK=b(()=>{bH(),yK(),XH(),GV()});function xK(e){var t={options:{directed:e.isDirected(),multigraph:e.isMultigraph(),compound:e.isCompound()},nodes:bK(e),edges:wK(e)};return Dj(e.graph())||(t.value=wz(e.graph())),t}function bK(n){return x(n.nodes(),function(e){var t=n.node(e),r=n.parent(e),e={v:e};return Dj(t)||(e.value=t),Dj(r)||(e.parent=r),e})}function wK(n){return x(n.edges(),function(e){var t=n.edge(e),r={v:e.v,w:e.w};return Dj(e.name)||(r.name=e.name),Dj(t)||(r.value=t),r})}var kK,TK,EK,CK,_K,SK,AK,LK,NK,IK,RK,MK,DK,OK,PK,BK=b(()=>{KW(),iH(),mt(xK,"write"),mt(bK,"writeNodes"),mt(wK,"writeEdges")}),$K=b(()=>{e(),aH(),BK(),kK=new Map,TK=new Map,EK=new Map,CK=mt(()=>{TK.clear(),EK.clear(),kK.clear()},"clear"),_K=mt((e,t)=>{var r=TK.get(t)||[];return D.trace("In isDescendant",t," ",e," = ",r.includes(e)),r.includes(e)},"isDescendant"),SK=mt((e,t)=>{var r=TK.get(t)||[];return D.info("Descendants of ",t," is ",r),D.info("Edge is ",e),e.v!==t&&e.w!==t&&(r?r.includes(e.v)||_K(e.v,t)||_K(e.w,t)||r.includes(e.w):(D.debug("Tilt, ",t,",not in descendants"),!1))},"edgeInCluster"),AK=mt((r,n,i,a)=>{D.warn("Copying children of ",r,"root",a,"data",n.node(r),a);var e=n.children(r)||[];r!==a&&e.push(r),D.warn("Copying (nodes) clusterId",r,"nodes",e),e.forEach(e=>{var t;0<n.children(e).length?AK(e,n,i,a):(t=n.node(e),D.info("cp ",e," to ",a," with parent ",r),i.setNode(e,t),a!==n.parent(e)&&(D.warn("Setting parent",e,n.parent(e)),i.setParent(e,n.parent(e))),r!==a&&e!==r?(D.debug("Setting parent",e,r),i.setParent(e,r)):(D.info("In copy ",r,"root",a,"data",n.node(r),a),D.debug("Not Setting parent for node=",e,"cluster!==rootId",r!==a,"node!==clusterId",e!==r)),t=n.edges(e),D.debug("Copying Edges",t),t.forEach(e=>{D.info("Edge",e);var t=n.edge(e.v,e.w,e.name);D.info("Edge data",t,a);try{SK(e,a)?(D.info("Copying as ",e.v,e.w,t,e.name),i.setEdge(e.v,e.w,t,e.name),D.info("newGraph edges ",i.edges(),i.edge(i.edges()[0]))):D.info("Skipping copy of edge ",e.v,"--\x3e",e.w," rootId: ",a," clusterId:",r)}catch(e){D.error(e)}})),D.debug("Removing node",e),n.removeNode(e)})},"copy"),LK=mt((e,t)=>{let r=t.children(e),n=[...r];for(var i of r)EK.set(i,e),n=[...n,...LK(i,t)];return n},"extractDescendants"),NK=mt((e,t,r)=>{let n=e.edges().filter(e=>e.v===t||e.w===t),i=e.edges().filter(e=>e.v===r||e.w===r),a=n.map(e=>({v:e.v===t?r:e.v,w:e.w===t?t:e.w})),s=i.map(e=>({v:e.v,w:e.w}));return a.filter(t=>s.some(e=>t.v===e.v&&t.w===e.w))},"findCommonEdges"),IK=mt((e,t,r)=>{var n,i=t.children(e);if(D.trace("Searching children of id ",e,i),i.length<1)return e;let a;for(n of i){var s=IK(n,t,r),o=NK(t,r,s);if(s){if(!(0<o.length))return s;a=s}}return a},"findNonClusterChild"),RK=mt(e=>kK.has(e)&&kK.get(e).externalConnections&&kK.has(e)?kK.get(e).id:e,"getAnchorId"),MK=mt((a,e)=>{if(!a||10<e)D.debug("Opting out, no graph ");else{D.debug("Opting in, graph "),a.nodes().forEach(function(e){0<a.children(e).length&&(D.warn("Cluster identified",e," Replacement id in edges: ",IK(e,a,e)),TK.set(e,LK(e,a)),kK.set(e,{id:IK(e,a,e),clusterData:a.node(e)}))}),a.nodes().forEach(function(t){var e=a.children(t),r=a.edges();0<e.length?(D.debug("Cluster identified",t,TK),r.forEach(e=>{_K(e.v,t)^_K(e.w,t)&&(D.warn("Edge: ",e," leaves cluster ",t),D.warn("Descendants of XXX ",t,": ",TK.get(t)),kK.get(t).externalConnections=!0)})):D.debug("Not a cluster ",t,TK)});for(var t of kK.keys()){var r=kK.get(t).id;(r=a.parent(r))!==t&&kK.has(r)&&!kK.get(r).externalConnections&&(kK.get(t).id=r)}a.edges().forEach(function(e){var t,r,n,i=a.edge(e);D.warn("Edge "+e.v+" -> "+e.w+": "+JSON.stringify(e)),D.warn("Edge "+e.v+" -> "+e.w+": "+JSON.stringify(a.edge(e))),e.v,D.warn("Fix XXX",kK,"ids:",e.v,e.w,"Translating: ",kK.get(e.v)," --- ",kK.get(e.w)),(kK.get(e.v)||kK.get(e.w))&&(D.warn("Fixing and trying - removing XXX",e.v,e.w,e.name),t=RK(e.v),r=RK(e.w),a.removeEdge(e.v,e.w,e.name),t!==e.v&&(n=a.parent(t),kK.get(n).externalConnections=!0,i.fromCluster=e.v),r!==e.w&&(n=a.parent(r),kK.get(n).externalConnections=!0,i.toCluster=e.w),D.warn("Fix Replacing with XXX",t,r,e.name),a.setEdge(t,r,i,e.name))}),D.warn("Adjusted Graph",xK(a)),DK(a,0),D.trace(kK)}},"adjustClustersAndEdges"),DK=mt((r,n)=>{if(D.warn("extractor - ",n,xK(r),r.children("D")),10<n)D.error("Bailing out");else{let e=r.nodes(),t=!1;for(var i of e)i=r.children(i),t=t||0<i.length;if(t){D.debug("Nodes = ",e,n);for(var a of e)if(D.debug("Extracting node",a,kK,kK.has(a)&&!kK.get(a).externalConnections,!r.parent(a),r.node(a),r.children("D")," Depth ",n),kK.has(a))if(!kK.get(a).externalConnections&&r.children(a)&&0<r.children(a).length){D.warn("Cluster without external connections, without a parent and with children",a,n);let e="TB"===r.graph().rankdir?"LR":"TB";kK.get(a)?.clusterData?.dir&&(e=kK.get(a).clusterData.dir,D.warn("Fixing dir",kK.get(a).clusterData.dir,e));var s=new nH({multigraph:!0,compound:!0}).setGraph({rankdir:e,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});D.warn("Old graph before copy",xK(r)),AK(a,r,s,a),r.setNode(a,{clusterNode:!0,id:a,clusterData:kK.get(a).clusterData,label:kK.get(a).label,graph:s}),D.warn("New graph after copy node: (",a,")",xK(s)),D.debug("Old graph after copy",xK(r))}else D.warn("Cluster ** ",a," **not meeting the criteria !externalConnections:",!kK.get(a).externalConnections," no parent: ",!r.parent(a)," children ",r.children(a)&&0<r.children(a).length,r.children("D"),n),D.debug(kK);else D.debug("Not a cluster",a,n);e=r.nodes(),D.warn("New list of nodes",e);for(var o of e){var l=r.node(o);D.warn(" Now next level",o,l),l?.clusterNode&&DK(l.graph,n+1)}}else D.debug("Done, no node has children",r.nodes())}},"extractor"),OK=mt((t,e)=>{if(0===e.length)return[];let r=Object.assign([],e);return e.forEach(e=>{e=t.children(e),e=OK(t,e),r=[...r,...e]}),r},"sorter"),PK=mt(e=>OK(e,e.children()),"sortNodesByHierarchy")}),FK={};OFe(FK,{render:()=>GK});var zK,GK,UK=b(()=>{vK(),BK(),aH(),eP(),i(),$K(),oP(),sO(),JO(),e(),aO(),Tu(),zK=mt(async(e,i,a,s,o,l)=>{D.warn("Graph in recursive render:XAX",xK(i),o);let c=i.graph().rankdir,n=(D.trace("Dir in recursive render - dir:",c),e=e.insert("g").attr("class","root"),i.nodes()?D.info("Recursive render XXX",i.nodes()):D.info("No nodes found for",i),0<i.edges().length&&D.info("Recursive edges",i.edge(i.edges()[0])),e.insert("g").attr("class","clusters")),h=e.insert("g").attr("class","edgePaths"),r=e.insert("g").attr("class","edgeLabels"),u=e.insert("g").attr("class","nodes"),d=(await Promise.all(i.nodes().map(async function(e){var t,r,n=i.node(e);void 0!==o&&(t=JSON.parse(JSON.stringify(o.clusterData)),D.trace(`Setting data for parent cluster XXX + Node.id = `,e,` + data=`,t.height,` +Parent cluster`,o.height),i.setNode(o.id,t),i.parent(e)||(D.trace("Setting parent",e,o.id),i.setParent(e,o.id,t))),D.info("(Insert) Node XXX"+e+": "+JSON.stringify(i.node(e))),n?.clusterNode?(D.info("Cluster identified XBX",e,n.width,i.node(e)),{ranksep:t,nodesep:r}=i.graph(),n.graph.setGraph({...n.graph.graph(),ranksep:t+25,nodesep:r}),r=(t=await zK(u,n.graph,a,s,i.node(e),l)).elem,aN(n,r),n.diff=t.diff||0,D.info("New compound node after recursive render XAX",e,"width",n.width,"height",n.height),nP(r,n)):0<i.children(e).length?(D.trace("Cluster - the non recursive path XBX",e,n.id,n,n.width,"Graph:",i),D.trace(IK(n.id,i)),kK.set(n.id,{id:IK(n.id,i),node:n})):(D.trace("Node - the non recursive path XAX",e,u,i.node(e),c),await tP(u,i.node(e),{config:l,dir:c}))})),await mt(async()=>{var e=i.edges().map(async function(e){var t=i.edge(e.v,e.w,e.name);D.info("Edge "+e.v+" -> "+e.w+": "+JSON.stringify(e)),D.info("Edge "+e.v+" -> "+e.w+": ",e," ",JSON.stringify(i.edge(e))),D.info("Fix",kK,"ids:",e.v,e.w,"Translating: ",kK.get(e.v),kK.get(e.w)),await _O(r,t)});await Promise.all(e)},"processEdges")(),D.info("Graph before layout:",JSON.stringify(xK(i))),D.info("############################################# XXX"),D.info("### Layout ### XXX"),D.info("############################################# XXX"),YX(i),D.info("Graph after layout:",JSON.stringify(xK(i))),0),p=WD(l).subGraphTitleTotalMargin;return await Promise.all(PK(i).map(async function(e){var t,r=i.node(e);D.info("Position XBX => "+e+": ("+r.x,","+r.y,") width: ",r.width," height: ",r.height),r?.clusterNode?(r.y+=p,D.info("A tainted cluster node XBX1",e,r.id,r.width,r.height,r.x,r.y,i.parent(e)),kK.get(r.id).node=r,aP(r)):0<i.children(e).length?(D.info("A pure cluster node XBX1",e,r.id,r.x,r.y,r.width,r.height,i.parent(e)),r.height+=p,i.node(r.parentId),e=r?.padding/2||0,t=r?.labelBBox?.height||0,D.debug("OffsetY",t-e||0,"labelHeight",t,"halfPadding",e),await eO(n,r),kK.get(r.id).node=r):(t=i.node(r.parentId),r.y+=p/2,D.info("A regular node XBX1 - using the padding",r.id,"parent",r.parentId,r.width,r.height,r.x,r.y,"offsetY",r.offsetY,"parent",t,t?.offsetY,r),aP(r))})),i.edges().forEach(function(e){var t=i.edge(e),r=(D.info("Edge "+e.v+" -> "+e.w+": "+JSON.stringify(t),t),t.points.forEach(e=>e.y+=p/2),i.node(e.v)),e=i.node(e.w),r=DO(h,t,kK,a,r,e,s);SO(t,r)}),i.nodes().forEach(function(e){var t=i.node(e);D.info(e,t.type,t.diff),t.isGroup&&(d=t.diff)}),D.warn("Returning from recursive render XAX",e,d),{elem:e,diff:d}},"recursiveRender"),GK=mt(async(e,t)=>{let l=new nH({multigraph:!0,compound:!0}).setGraph({rankdir:e.direction,nodesep:e.config?.nodeSpacing||e.config?.flowchart?.nodeSpacing||e.nodeSpacing,ranksep:e.config?.rankSpacing||e.config?.flowchart?.rankSpacing||e.rankSpacing,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}}),r=t.select("g");QO(r,e.markers,e.type,e.diagramId),iP(),EO(),tO(),CK(),e.nodes.forEach(e=>{l.setNode(e.id,{...e}),e.parentId&&l.setParent(e.id,e.parentId)}),D.debug("Edges:",e.edges),e.edges.forEach(e=>{var t,r,n,i,a,s,o;e.start===e.end?(r=(t=e.start)+"---"+t+"---1",n=t+"---"+t+"---2",i=l.node(t),l.setNode(r,{domId:r,id:r,parentId:i.parentId,labelStyle:"",label:"",padding:0,shape:"labelRect",style:"",width:10,height:10}),l.setParent(r,i.parentId),l.setNode(n,{domId:n,id:n,parentId:i.parentId,labelStyle:"",padding:0,shape:"labelRect",label:"",style:"",width:10,height:10}),l.setParent(n,i.parentId),a=structuredClone(e),s=structuredClone(e),o=structuredClone(e),a.label="",a.arrowTypeEnd="none",a.id=t+"-cyclic-special-1",s.arrowTypeStart="none",s.arrowTypeEnd="none",s.id=t+"-cyclic-special-mid",o.label="",i.isGroup&&(a.fromCluster=t,o.toCluster=t),o.id=t+"-cyclic-special-2",o.arrowTypeStart="none",l.setEdge(t,r,a,t+"-cyclic-special-0"),l.setEdge(r,n,s,t+"-cyclic-special-1"),l.setEdge(n,t,o,t+"-cyc<lic-special-2")):l.setEdge(e.start,e.end,{...e},e.id)}),D.warn("Graph at first:",JSON.stringify(xK(l))),MK(l),D.warn("Graph after XAX:",JSON.stringify(xK(l))),t=O(),await zK(r,l,e.type,e.diagramId,void 0,t)},"render")});function qK(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function jK(e){if(Array.isArray(e))return e}function YK(e){if(Array.isArray(e))return qK(e)}function WK(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function HK(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,iZ(n.key),n)}}function VK(e,t,r){return t&&HK(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function XK(e,t){var r,n,i,a,s=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(s)return i=!(n=!0),{s:mt(function(){s=s.call(e)},"s"),n:mt(function(){var e=s.next();return n=e.done,e},"n"),e:mt(function(e){i=!0,r=e},"e"),f:mt(function(){try{n||null==s.return||s.return()}finally{if(i)throw r}},"f")};if(Array.isArray(e)||(s=sZ(e))||t)return s&&(e=s),a=0,{s:t=mt(function(){},"F"),n:mt(function(){return a>=e.length?{done:!0}:{done:!1,value:e[a++]}},"n"),e:mt(function(e){throw e},"e"),f:t};throw new TypeError(`Invalid attempt to iterate non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function KK(e,t,r){return(t=iZ(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ZK(e){if(typeof Symbol<"u"&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function QK(e,t){var r=null==e?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,a,s,o=[],l=!0,c=!1;try{if(a=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=a.call(r)).done)&&(o.push(n.value),o.length!==t);l=!0);}catch(e){c=!0,i=e}finally{try{if(!l&&null!=r.return&&(s=r.return(),Object(s)!==s))return}finally{if(c)throw i}}return o}}function JK(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function eZ(){throw new TypeError(`Invalid attempt to spread non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function tZ(e,t){return jK(e)||QK(e,t)||sZ(e,t)||JK()}function rZ(e){return YK(e)||ZK(e)||sZ(e)||eZ()}function nZ(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0===r)return String(e);if("object"!=typeof(r=r.call(e,t)))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}function iZ(e){return"symbol"==typeof(e=nZ(e,"string"))?e:e+""}function aZ(e){return(aZ="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function sZ(e,t){var r;if(e)return"string"==typeof e?qK(e,t):"Map"===(r="Object"===(r={}.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:r)||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?qK(e,t):void 0}function oZ(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function lZ(){return ste||(ste=1,mt(e,"isObject"),ate=e),ate;function e(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}}function cZ(){var e;return lte||(lte=1,e="object"==typeof ite&&ite&&ite.Object===Object&&ite,ote=e),ote}function hZ(){var e,t;return hte||(hte=1,t=cZ(),e="object"==typeof self&&self&&self.Object===Object&&self,t=t||e||Function("return this")(),cte=t),cte}function uZ(){var e,t;return dte||(dte=1,e=hZ(),t=mt(function(){return e.Date.now()},"now"),ute=t),ute}function dZ(){var r;return gte||(gte=1,r=/\s/,mt(e,"trimmedEndIndex"),pte=e),pte;function e(e){for(var t=e.length;t--&&r.test(e.charAt(t)););return t}}function pZ(){var t,r;return mte||(mte=1,t=dZ(),r=/^\s+/,mt(e,"baseTrim"),fte=e),fte;function e(e){return e&&e.slice(0,t(e)+1).replace(r,"")}}function gZ(){var e;return vte||(vte=1,e=hZ().Symbol,yte=e),yte}function fZ(){var e,t,a,s,o;return bte||(bte=1,e=gZ(),t=Object.prototype,a=t.hasOwnProperty,s=t.toString,o=e?e.toStringTag:void 0,mt(r,"getRawTag"),xte=r),xte;function r(e){var t=a.call(e,o),r=e[o];try{var n=!(e[o]=void 0)}catch{}var i=s.call(e);return n&&(t?e[o]=r:delete e[o]),i}}function mZ(){var t;return kte||(kte=1,t=Object.prototype.toString,mt(e,"objectToString"),wte=e),wte;function e(e){return t.call(e)}}function yZ(){var e,t,r,n;return Ete||(Ete=1,e=gZ(),t=fZ(),r=mZ(),n=e?e.toStringTag:void 0,mt(i,"baseGetTag"),Tte=i),Tte;function i(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":(n&&n in Object(e)?t:r)(e)}}function vZ(){return _te||(_te=1,mt(e,"isObjectLike"),Cte=e),Cte;function e(e){return null!=e&&"object"==typeof e}}function xZ(){var t,r;return Ate||(Ate=1,t=yZ(),r=vZ(),mt(e,"isSymbol"),Ste=e),Ste;function e(e){return"symbol"==typeof e||r(e)&&"[object Symbol]"==t(e)}}function bZ(){var r,n,i,a,s,o,l;return Nte||(Nte=1,r=pZ(),n=lZ(),i=xZ(),a=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,o=/^0o[0-7]+$/i,l=parseInt,mt(e,"toNumber"),Lte=e),Lte;function e(e){if("number"==typeof e)return e;if(i(e))return NaN;if(n(e)&&(t="function"==typeof e.valueOf?e.valueOf():e,e=n(t)?t+"":t),"string"!=typeof e)return 0===e?e:+e;e=r(e);var t=s.test(e);return t||o.test(e)?l(e.slice(2),t?2:8):a.test(e)?NaN:+e}}function wZ(){var k,T,E,C,_;return Rte||(Rte=1,k=lZ(),T=uZ(),E=bZ(),C=Math.max,_=Math.min,mt(e,"debounce"),Ite=e),Ite;function e(n,r,e){var i,a,s,o,l,c,h=0,t=!1,u=!1,d=!0;if("function"!=typeof n)throw new TypeError("Expected a function");function p(e){var t=i,r=a;return i=a=void 0,h=e,o=n.apply(r,t)}function g(e){return h=e,l=setTimeout(y,r),t?p(e):o}function f(e){var t=r-(e-c);return u?_(t,s-(e-h)):t}function m(e){var t=e-c;return void 0===c||r<=t||t<0||u&&s<=e-h}function y(){var e=T();if(m(e))return v(e);l=setTimeout(y,f(e))}function v(e){return l=void 0,d&&i?p(e):(i=a=void 0,o)}function x(){void 0!==l&&clearTimeout(l),i=c=a=l=void(h=0)}function b(){return void 0===l?o:v(T())}function w(){var e=T(),t=m(e);if(i=arguments,a=this,c=e,t){if(void 0===l)return g(c);if(u)return clearTimeout(l),l=setTimeout(y,r),p(c)}return void 0===l&&(l=setTimeout(y,r)),o}return r=E(r)||0,k(e)&&(t=!!e.leading,u="maxWait"in e,s=u?C(E(e.maxWait)||0,r):s,d="trailing"in e?!!e.trailing:d),mt(p,"invokeFunc"),mt(g,"leadingEdge"),mt(f,"remainingWait"),mt(m,"shouldInvoke"),mt(y,"timerExpired"),mt(v,"trailingEdge"),mt(x,"cancel"),mt(b,"flush"),mt(w,"debounced"),w.cancel=x,w.flush=b,w}}function kZ(e,t,r,n,i){return i=i*Math.PI/180,{x:Math.cos(i)*(e-r)-Math.sin(i)*(t-n)+r,y:Math.sin(i)*(e-r)+Math.cos(i)*(t-n)+n}}function TZ(e,t,r){var n,i,a;return 0===r?e:(n=(t.x1+t.x2)/2,a=1/(i=t.w/t.h),t=kZ(e.x,e.y,n,e=(t.y1+t.y2)/2,r),{x:(r=Xte(t.x,t.y,n,e,i,a)).x,y:r.y})}function EZ(){return Tre||(Tre=1,s=wre,function(){var d,l,p,g,t,c,r,f,m,e,n,i,h,u;function a(e){this.cmp=e??d,this.nodes=[]}l=Math.floor,m=Math.min,d=mt(function(e,t){return e<t?-1:t<e?1:0},"defaultCmp"),f=mt(function(e,t,r,n,i){var a;if(null==i&&(i=d),(r=null==r?0:r)<0)throw new Error("lo must be non-negative");for(null==n&&(n=e.length);r<n;)i(t,e[a=l((r+n)/2)])<0?n=a:r=a+1;return[].splice.apply(e,[r,r-r].concat(t)),t},"insort"),t=mt(function(e,t,r){return null==r&&(r=d),e.push(t),h(e,0,e.length-1,r)},"heappush"),g=mt(function(e,t){var r,n;return null==t&&(t=d),r=e.pop(),e.length?(n=e[0],e[0]=r,u(e,0,t)):n=r,n},"heappop"),r=mt(function(e,t,r){var n;return null==r&&(r=d),n=e[0],e[0]=t,u(e,0,r),n},"heapreplace"),c=mt(function(e,t,r){var n;return null==r&&(r=d),e.length&&r(e[0],t)<0&&(t=(n=[e[0],t])[0],e[0]=n[1],u(e,0,r)),t},"heappushpop"),p=mt(function(r,e){var t,n,i,a,s,o;for(null==e&&(e=d),s=[],n=0,i=(a=function(){o=[];for(var e=0,t=l(r.length/2);0<=t?e<t:t<e;0<=t?e++:e--)o.push(e);return o}.apply(this).reverse()).length;n<i;n++)t=a[n],s.push(u(r,t,e));return s},"heapify"),i=mt(function(e,t,r){if(null==r&&(r=d),-1!==(t=e.indexOf(t)))return h(e,0,t,r),u(e,t,r)},"updateItem"),e=mt(function(e,t,r){var n,i,a,s,o;if(null==r&&(r=d),!(i=e.slice(0,t)).length)return i;for(p(i,r),a=0,s=(o=e.slice(t)).length;a<s;a++)n=o[a],c(i,n,r);return i.sort(r).reverse()},"nlargest"),n=mt(function(e,t,r){var n,i,a,s,o,l,c,h,u;if(null==r&&(r=d),10*t<=e.length){if((a=e.slice(0,t).sort(r)).length)for(i=a[a.length-1],s=0,l=(c=e.slice(t)).length;s<l;s++)r(n=c[s],i)<0&&(f(a,n,0,null,r),a.pop(),i=a[a.length-1]);return a}for(p(e,r),u=[],o=0,h=m(t,e.length);0<=h?o<h:h<o;0<=h?++o:--o)u.push(g(e,r));return u},"nsmallest"),h=mt(function(e,t,r,n){var i,a,s;for(null==n&&(n=d),i=e[r];t<r&&n(i,a=e[s=r-1>>1])<0;)e[r]=a,r=s;return e[r]=i},"_siftdown"),u=mt(function(e,t,r){var n,i,a,s,o;for(null==r&&(r=d),i=e.length,a=e[o=t],n=2*t+1;n<i;)(s=n+1)<i&&!(r(e[n],e[s])<0)&&(n=s),e[t]=e[n],n=2*(t=n)+1;return e[t]=a,h(e,o,t,r)},"_siftup"),a.push=t,a.pop=g,a.replace=r,a.pushpop=c,a.heapify=p,a.updateItem=i,a.nlargest=e,a.nsmallest=n,mt(a,"Heap"),a.prototype.push=function(e){return t(this.nodes,e,this.cmp)},a.prototype.pop=function(){return g(this.nodes,this.cmp)},a.prototype.peek=function(){return this.nodes[0]},a.prototype.contains=function(e){return-1!==this.nodes.indexOf(e)},a.prototype.replace=function(e){return r(this.nodes,e,this.cmp)},a.prototype.pushpop=function(e){return c(this.nodes,e,this.cmp)},a.prototype.heapify=function(){return p(this.nodes,this.cmp)},a.prototype.updateItem=function(e){return i(this.nodes,e,this.cmp)},a.prototype.clear=function(){return this.nodes=[]},a.prototype.empty=function(){return 0===this.nodes.length},a.prototype.size=function(){return this.nodes.length},a.prototype.clone=function(){var e=new a;return e.nodes=this.nodes.slice(0),e},a.prototype.toArray=function(){return this.nodes.slice(0)},a.prototype.insert=a.prototype.push,a.prototype.top=a.prototype.peek,a.prototype.front=a.prototype.peek,a.prototype.has=a.prototype.contains,a.prototype.copy=a.prototype.clone,s.exports=a}.call(kre)),wre.exports;var s}function CZ(){return Cre||(Cre=1,Ere=EZ()),Ere}function _Z(e,r){if(e.length<3)throw new Error("Need at least 3 vertices");var a=mt(function(e,t){return{x:e.x+t.x,y:e.y+t.y}},"add"),s=mt(function(e,t){return{x:e.x-t.x,y:e.y-t.y}},"sub"),o=mt(function(e,t){return{x:e.x*t,y:e.y*t}},"scale"),l=mt(function(e,t){return e.x*t.y-e.y*t.x},"cross"),t=mt(function(e){var t=une(e.x,e.y);return 0===t?{x:0,y:0}:{x:e.x/t,y:e.y/t}},"normalize"),n=mt(function(e){for(var t=0,r=0;r<e.length;r++){var n=e[r],i=e[(r+1)%e.length];t+=n.x*i.y-i.x*n.y}return t/2},"signedArea"),i=mt(function(e,t,r,n){var t=s(t,e),n=s(n,r),i=l(t,n);return Math.abs(i)<1e-9?a(e,o(t,.5)):(r=l(s(r,e),n)/i,a(e,o(t,r)))},"intersectLines"),c=e.map(function(e){return{x:e.x,y:e.y}});n(c)<0&&c.reverse();for(var h=c.length,u=[],d=0;d<h;d++){var p=c[d],g=c[(d+1)%h],p=t({x:(g=s(g,p)).y,y:-g.x});u.push(p)}for(var f=u.map(function(e,t){return{p1:a(c[t],o(e,r)),p2:a(c[(t+1)%h],o(e,r))}}),m=[],y=0;y<h;y++){var v=f[(y-1+h)%h],x=f[y],v=i(v.p1,v.p2,x.p1,x.p2);m.push(v)}return m}function SZ(e,t,r,n,i,a){var e=_Z(Lne(e,t,r,n,i),a),s=Jre();return e.forEach(function(e){return nne(s,e.x,e.y)}),s}function AZ(e,t){function r(e){for(var t=[],r=0;r<e.length;r++){var n=-(i={x:(i=e[(r+1)%e.length]).x-(n=e[r]).x,y:i.y-n.y}).y,i=i.x,a=Math.sqrt(n*n+i*i);t.push({x:n/a,y:i/a})}return t}function n(e,t){var r,n=1/0,i=-1/0,a=XK(e);try{for(a.s();!(r=a.n()).done;)var s=r.value,o=s.x*t.x+s.y*t.y,n=Math.min(n,o),i=Math.max(i,o)}catch(e){a.e(e)}finally{a.f()}return{min:n,max:i}}function i(e,t){return!(e.max<t.min||t.max<e.min)}mt(r,"getAxes"),mt(n,"project"),mt(i,"overlaps");var a,s=XK([].concat(rZ(r(e)),rZ(r(t))));try{for(s.s();!(a=s.n()).done;){var o=a.value;if(!i(n(e,o),n(t,o)))return!1}}catch(e){s.e(e)}finally{s.f()}return!0}function LZ(e,t,r,n,i,a){var s=Tee(e)?e:hie[e]||hie.euclidean;return 0===t&&Tee(e)?s(i,a):s(t,r,n,i,a)}function NZ(){var e;return Kie||(Kie=1,e=Array.isArray,Xie=e),Xie}function IZ(){var n,i,a,s;return Qie||(Qie=1,n=NZ(),i=xZ(),a=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,s=/^\w*$/,mt(e,"isKey"),Zie=e),Zie;function e(e,t){var r;return!n(e)&&(!("number"!=(r=typeof e)&&"symbol"!=r&&"boolean"!=r&&null!=e&&!i(e))||s.test(e)||!a.test(e)||null!=t&&e in Object(t))}}function RZ(){var t,r;return eae||(eae=1,t=yZ(),r=lZ(),mt(e,"isFunction"),Jie=e),Jie;function e(e){return!!r(e)&&("[object Function]"==(e=t(e))||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e)}}function MZ(){var e;return rae||(rae=1,e=hZ()["__core-js_shared__"],tae=e),tae}function DZ(){var t,e;return iae||(iae=1,e=MZ(),t=(e=/[^.]+$/.exec(e&&e.keys&&e.keys.IE_PROTO||""))?"Symbol(src)_1."+e:"",mt(r,"isMasked"),nae=r),nae;function r(e){return!!t&&t in e}}function OZ(){var t;return sae||(sae=1,t=Function.prototype.toString,mt(e,"toSource"),aae=e),aae;function e(e){if(null!=e){try{return t.call(e)}catch{}try{return e+""}catch{}}return""}}function PZ(){var t,r,n,i,a,e,s,o;return lae||(lae=1,t=RZ(),r=DZ(),n=lZ(),i=OZ(),a=/^\[object .+?Constructor\]$/,e=Function.prototype,s=Object.prototype,e=e.toString,s=s.hasOwnProperty,o=RegExp("^"+e.call(s).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),mt(l,"baseIsNative"),oae=l),oae;function l(e){return!(!n(e)||r(e))&&(t(e)?o:a).test(i(e))}}function BZ(){return hae||(hae=1,mt(e,"getValue"),cae=e),cae;function e(e,t){return e?.[t]}}function $Z(){var r,n;return dae||(dae=1,r=PZ(),n=BZ(),mt(e,"getNative"),uae=e),uae;function e(e,t){return e=n(e,t),r(e)?e:void 0}}function FZ(){var e;return gae||(gae=1,e=$Z()(Object,"create"),pae=e),pae}function zZ(){var e;return mae||(mae=1,e=FZ(),mt(t,"hashClear"),fae=t),fae;function t(){this.__data__=e?e(null):{},this.size=0}}function GZ(){return vae||(vae=1,mt(e,"hashDelete"),yae=e),yae;function e(e){return e=this.has(e)&&delete this.__data__[e],this.size-=e?1:0,e}}function UZ(){var n,i;return bae||(bae=1,n=FZ(),i=Object.prototype.hasOwnProperty,mt(e,"hashGet"),xae=e),xae;function e(e){var t,r=this.__data__;return n?"__lodash_hash_undefined__"===(t=r[e])?void 0:t:i.call(r,e)?r[e]:void 0}}function qZ(){var r,n;return kae||(kae=1,r=FZ(),n=Object.prototype.hasOwnProperty,mt(e,"hashHas"),wae=e),wae;function e(e){var t=this.__data__;return r?void 0!==t[e]:n.call(t,e)}}function jZ(){var n;return Eae||(Eae=1,n=FZ(),mt(e,"hashSet"),Tae=e),Tae;function e(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=n&&void 0===t?"__lodash_hash_undefined__":t,this}}function YZ(){var e,t,r,n,i;return _ae||(_ae=1,e=zZ(),t=GZ(),r=UZ(),n=qZ(),i=jZ(),mt(a,"Hash"),a.prototype.clear=e,a.prototype.delete=t,a.prototype.get=r,a.prototype.has=n,a.prototype.set=i,Cae=a),Cae;function a(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}}function WZ(){return Aae||(Aae=1,mt(e,"listCacheClear"),Sae=e),Sae;function e(){this.__data__=[],this.size=0}}function HZ(){return Nae||(Nae=1,mt(e,"eq"),Lae=e),Lae;function e(e,t){return e===t||e!=e&&t!=t}}function VZ(){var n;return Rae||(Rae=1,n=HZ(),mt(e,"assocIndexOf"),Iae=e),Iae;function e(e,t){for(var r=e.length;r--;)if(n(e[r][0],t))return r;return-1}}function XZ(){var r,n;return Dae||(Dae=1,r=VZ(),n=Array.prototype.splice,mt(e,"listCacheDelete"),Mae=e),Mae;function e(e){var t=this.__data__;return!((e=r(t,e))<0||(e==t.length-1?t.pop():n.call(t,e,1),--this.size,0))}}function KZ(){var r;return Pae||(Pae=1,r=VZ(),mt(e,"listCacheGet"),Oae=e),Oae;function e(e){var t=this.__data__;return(e=r(t,e))<0?void 0:t[e][1]}}function ZZ(){var t;return $ae||($ae=1,t=VZ(),mt(e,"listCacheHas"),Bae=e),Bae;function e(e){return-1<t(this.__data__,e)}}function QZ(){var i;return zae||(zae=1,i=VZ(),mt(e,"listCacheSet"),Fae=e),Fae;function e(e,t){var r=this.__data__,n=i(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}}function JZ(){var e,t,r,n,i;return Uae||(Uae=1,e=WZ(),t=XZ(),r=KZ(),n=ZZ(),i=QZ(),mt(a,"ListCache"),a.prototype.clear=e,a.prototype.delete=t,a.prototype.get=r,a.prototype.has=n,a.prototype.set=i,Gae=a),Gae;function a(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}}function eQ(){var e;return jae||(jae=1,e=$Z()(hZ(),"Map"),qae=e),qae}function tQ(){var e,t,r;return Wae||(Wae=1,e=YZ(),t=JZ(),r=eQ(),mt(n,"mapCacheClear"),Yae=n),Yae;function n(){this.size=0,this.__data__={hash:new e,map:new(r||t),string:new e}}}function rQ(){return Vae||(Vae=1,mt(e,"isKeyable"),Hae=e),Hae;function e(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}}function nQ(){var r;return Kae||(Kae=1,r=rQ(),mt(e,"getMapData"),Xae=e),Xae;function e(e,t){return e=e.__data__,r(t)?e["string"==typeof t?"string":"hash"]:e.map}}function iQ(){var t;return Qae||(Qae=1,t=nQ(),mt(e,"mapCacheDelete"),Zae=e),Zae;function e(e){return e=t(this,e).delete(e),this.size-=e?1:0,e}}function aQ(){var t;return ese||(ese=1,t=nQ(),mt(e,"mapCacheGet"),Jae=e),Jae;function e(e){return t(this,e).get(e)}}function sQ(){var t;return rse||(rse=1,t=nQ(),mt(e,"mapCacheHas"),tse=e),tse;function e(e){return t(this,e).has(e)}}function oQ(){var i;return ise||(ise=1,i=nQ(),mt(e,"mapCacheSet"),nse=e),nse;function e(e,t){var r=i(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}}function lQ(){var e,t,r,n,i;return sse||(sse=1,e=tQ(),t=iQ(),r=aQ(),n=sQ(),i=oQ(),mt(a,"MapCache"),a.prototype.clear=e,a.prototype.delete=t,a.prototype.get=r,a.prototype.has=n,a.prototype.set=i,ase=a),ase;function a(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}}function cQ(){var e;return lse||(lse=1,e=lQ(),mt(t,"memoize"),t.Cache=e,ose=t),ose;function t(n,i){if("function"!=typeof n||null!=i&&"function"!=typeof i)throw new TypeError("Expected a function");var a=mt(function(){var e=arguments,t=i?i.apply(this,e):e[0],r=a.cache;return r.has(t)?r.get(t):(e=n.apply(this,e),a.cache=r.set(t,e)||r,e)},"memoized");return a.cache=new(t.Cache||e),a}}function hQ(){var r;return hse||(hse=1,r=cQ(),mt(e,"memoizeCapped"),cse=e),cse;function e(e){var t=(e=r(e,function(e){return 500===t.size&&t.clear(),e})).cache;return e}}function uQ(){var t,a,e;return dse||(dse=1,e=hQ(),t=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,a=/\\(\\)?/g,e=e(function(e){var i=[];return 46===e.charCodeAt(0)&&i.push(""),e.replace(t,function(e,t,r,n){i.push(r?n.replace(a,"$1"):t||e)}),i}),use=e),use}function dQ(){return gse||(gse=1,mt(e,"arrayMap"),pse=e),pse;function e(e,t){for(var r=-1,n=null==e?0:e.length,i=Array(n);++r<n;)i[r]=t(e[r],r,e);return i}}function pQ(){var r,n,i,e,a;return mse||(mse=1,e=gZ(),r=dQ(),n=NZ(),i=xZ(),e=e?e.prototype:void 0,a=e?e.toString:void 0,mt(s,"baseToString"),fse=s),fse;function s(e){var t;return"string"==typeof e?e:n(e)?r(e,s)+"":i(e)?a?a.call(e):"":"0"==(t=e+"")&&1/e==-1/0?"-0":t}}function gQ(){var t;return vse||(vse=1,t=pQ(),mt(e,"toString"),yse=e),yse;function e(e){return null==e?"":t(e)}}function fQ(){var r,n,i,a;return bse||(bse=1,r=NZ(),n=IZ(),i=uQ(),a=gQ(),mt(e,"castPath"),xse=e),xse;function e(e,t){return r(e)?e:n(e,t)?[e]:i(a(e))}}function mQ(){var r;return kse||(kse=1,r=xZ(),mt(e,"toKey"),wse=e),wse;function e(e){var t;return"string"==typeof e||r(e)?e:"0"==(t=e+"")&&1/e==-1/0?"-0":t}}function yQ(){var i,a;return Ese||(Ese=1,i=fQ(),a=mQ(),mt(e,"baseGet"),Tse=e),Tse;function e(e,t){for(var r=0,n=(t=i(t,e)).length;null!=e&&r<n;)e=e[a(t[r++])];return r&&r==n?e:void 0}}function vQ(){var n;return _se||(_se=1,n=yQ(),mt(e,"get"),Cse=e),Cse;function e(e,t,r){return void 0===(e=null==e?void 0:n(e,t))?r:e}}function xQ(){var t,e;return Lse||(Lse=1,t=$Z(),e=(()=>{try{var e=t(Object,"defineProperty");return e({},"",{}),e}catch{}})(),Ase=e),Ase}function bQ(){var n;return Ise||(Ise=1,n=xQ(),mt(e,"baseAssignValue"),Nse=e),Nse;function e(e,t,r){"__proto__"==t&&n?n(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}}function wQ(){var i,a,s;return Mse||(Mse=1,i=bQ(),a=HZ(),s=Object.prototype.hasOwnProperty,mt(e,"assignValue"),Rse=e),Rse;function e(e,t,r){var n=e[t];s.call(e,t)&&a(n,r)&&(void 0!==r||t in e)||i(e,t,r)}}function kQ(){var n;return Ose||(Ose=1,n=/^(?:0|[1-9]\d*)$/,mt(e,"isIndex"),Dse=e),Dse;function e(e,t){var r=typeof e;return!!(t=t??9007199254740991)&&("number"==r||"symbol"!=r&&n.test(e))&&-1<e&&e%1==0&&e<t}}function TQ(){var u,d,p,g,f;return Bse||(Bse=1,u=wQ(),d=fQ(),p=kQ(),g=lZ(),f=mQ(),mt(e,"baseSet"),Pse=e),Pse;function e(e,t,r,n){if(g(e))for(var i=-1,a=(t=d(t,e)).length,s=a-1,o=e;null!=o&&++i<a;){var l,c=f(t[i]),h=r;if("__proto__"===c||"constructor"===c||"prototype"===c)return e;i!=s&&(l=o[c],void 0===(h=n?n(l,c,o):void 0))&&(h=g(l)?l:p(t[i+1])?[]:{}),u(o,c,h),o=o[c]}return e}}function EQ(){var n;return Fse||(Fse=1,n=TQ(),mt(e,"set"),$se=e),$se;function e(e,t,r){return null==e?e:n(e,t,r)}}function CQ(){return Use||(Use=1,mt(e,"copyArray"),Gse=e),Gse;function e(e,t){var r=-1,n=e.length;for(t=t||Array(n);++r<n;)t[r]=e[r];return t}}function _Q(){var t,r,n,i,a,s,o;return jse||(jse=1,t=dQ(),r=CQ(),n=NZ(),i=xZ(),a=uQ(),s=mQ(),o=gQ(),mt(e,"toPath"),qse=e),qse;function e(e){return n(e)?t(e,s):i(e)?[e]:r(a(o(e)))}}function SQ(e,t,r,n){for(var i=[],a=new xre,s=e.cy().hasCompoundNodes(),o=0;o<e.length;o++){var l=e[o];r?i.push(l):s&&n(i,a,l)}for(;0<i.length;){var c=i.shift();t(c),a.add(c.id()),s&&n(i,a,c)}return e}function AQ(e,t,r){if(r.isParent())for(var n=r._private.children,i=0;i<n.length;i++){var a=n[i];t.has(a.id())||e.push(a)}}function LQ(e,t,r){r.isChild()&&(r=r._private.parent,t.has(r.id())||e.push(r))}function NQ(e,t,r){LQ(e,t,r),AQ(e,t,r)}function IQ(s){return function(e){if(void 0===e&&(e=!0),0!==this.length&&this.isNode()&&!this.removed()){for(var t=0,r=this[0],n=r._private.edges,i=0;i<n.length;i++){var a=n[i];!e&&a.isLoop()||(t+=s(r,a))}return t}}}function RQ(a,s){return function(e){for(var t,r=this.nodes(),n=0;n<r.length;n++){var i=r[n][a](e);void 0===i||void 0!==t&&!s(i,t)||(t=i)}return t}}function MQ(){return!1}function DQ(){return!0}function OQ(){for(var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:zoe,t=1<arguments.length?arguments[1]:void 0,r=0;r<Foe.length;r++){var n=Foe[r];this[n]=e[n]||$oe[n]}this.context=t||this.context,this.listeners=[],this.emitting=0}function PQ(e,t,r){var n,i=r._private;return null==(n=(i=i.styleCache=i.styleCache||[])[e])?i[e]=t(r):n}function BQ(t,r){return t=Wte(t),mt(function(e){return PQ(t,r,e)},"cachedStyleFunction")}function $Q(t,r){t=Wte(t);var n=mt(function(e){return r.call(e)},"selfFn");return mt(function(){var e=this[0];if(e)return PQ(t,n,e)},"cachedPrototypeStyleFunction")}function FQ(e,t){var r=e._private.data.parent?e.parents():null;if(r)for(var n=0;n<r.length;n++)if(!t(r[n]))return!1;return!0}function zQ(e){var n=e.ok,i=e.edgeOkViaNode||e.ok,a=e.parentOk||e.ok;return function(){var e,t,r=this.cy();return!r.styleEnabled()||(e=this[0],r=r.hasCompoundNodes(),e?(t=e._private,!!n(e)&&(e.isNode()?!r||FQ(e,a):(e=t.source,t=t.target,i(e)&&(!r||FQ(e,i))&&(e===t||i(t)&&(!r||FQ(t,i)))))):void 0)}}function GQ(l){return function(){var e=[];if(2===(t=arguments).length)this.on(l.event,t[0],t[1]);else if(1===t.length&&Tee(t[0]))this.on(l.event,t[0]);else if(0===t.length||1===t.length&&Eee(t[0])){for(var t=1===t.length?t[0]:null,r=0;r<this.length;r++){var n=this[r],i=!l.ableField||n._private[l.ableField],a=n._private[l.field]!=l.value;if(l.overrideAble){var s=l.overrideAble(n);if(void 0!==s&&!(i=s))return this}i&&(n._private[l.field]=l.value,a)&&e.push(n)}var o=this.spawn(e);o.updateStyle(),o.emit(l.event),t&&o.emit(t)}return this}}function UQ(r){Koe[r.field]=function(){var e=this[0];if(e){if(r.overrideField){var t=r.overrideField(e);if(void 0!==t)return t}return e._private[r.field]}},Koe[r.on]=GQ({event:r.on,field:r.field,ableField:r.ableField,overrideAble:r.overrideAble,value:!0}),Koe[r.off]=GQ({event:r.off,field:r.field,ableField:r.ableField,overrideAble:r.overrideAble,value:!1})}function qQ(i){return mt(function(e){for(var t=[],r=0;r<this.length;r++){var n=this[r]._private[i.attr];n&&t.push(n)}return this.spawn(t,!0).filter(e)},"sourceImpl")}function jQ(h){return mt(function(e){var t=[],r=this._private.cy,n=h||{};kee(e)&&(e=r.$(e));for(var i=0;i<e.length;i++)for(var a=e[i]._private.edges,s=0;s<a.length;s++){var o=a[s],l=o._private.data,c=this.hasElementWithId(l.source)&&e.hasElementWithId(l.target),l=e.hasElementWithId(l.source)&&this.hasElementWithId(l.target);!c&&!l||(n.thisIsSrc||n.thisIsTgt)&&(n.thisIsSrc&&!c||n.thisIsTgt&&!l)||t.push(o)}return this.spawn(t,!0)},"edgesWithImpl")}function YQ(f){return f=Xee({},{codirected:!1},f),mt(function(e){for(var t=[],r=this.edges(),n=f,i=0;i<r.length;i++)for(var a=r[i]._private,s=a.source,o=s._private.data.id,l=a.data.target,c=s._private.edges,h=0;h<c.length;h++){var u=c[h],d=(p=u._private.data).target,p=p.source,g=d===l&&p===o;(n.codirected&&g||!n.codirected&&(g||o===d&&l===p))&&t.push(u)}return this.spawn(t,!0).filter(e)},"parallelEdgesImpl")}function WQ(s,t,o,r){var e=typeof Float32Array<"u";if(4!==arguments.length)return!1;for(var n=0;n<4;++n)if("number"!=typeof arguments[n]||isNaN(arguments[n])||!isFinite(arguments[n]))return!1;s=Math.min(s,1),o=Math.min(o,1),s=Math.max(s,0),o=Math.max(o,0);var a=new(e?Float32Array:Array)(11);function i(e,t){return 1-3*t+3*e}function l(e,t,r){return((i(t,r)*e+(3*r-6*t))*e+3*t)*e}function c(e,t,r){return 3*i(t,r)*e*e+2*(3*r-6*t)*e+3*t}function h(e,t){for(var r=0;r<4;++r){var n=c(t,s,o);if(0===n)return t;t-=(l(t,s,o)-e)/n}return t}function u(){for(var e=0;e<11;++e)a[e]=l(.1*e,s,o)}function d(e,t,r){for(var n,i,a=0;0<(n=l(i=t+(r-t)/2,s,o)-e)?r=i:t=i,1e-7<Math.abs(n)&&++a<10;);return i}function p(e){for(var t=0,r=1;10!==r&&a[r]<=e;++r)t+=.1;var n=t+(e-a[--r])/(a[r+1]-a[r])*.1,i=c(n,s,o);return.001<=i?h(e,n):0===i?n:d(e,t,t+.1)}mt(i,"A"),mt(function(e,t){return 3*t-6*e},"B"),mt(function(e){return 3*e},"C"),mt(l,"calcBezier"),mt(c,"getSlope"),mt(h,"newtonRaphsonIterate"),mt(u,"calcSampleValues"),mt(d,"binarySubdivide"),mt(p,"getTForX");var g=!1;function f(){g=!0,s===t&&o===r||u()}mt(f,"precompute"),(e=mt(function(e){return g||f(),s===t&&o===r?e:0===e?0:1===e?1:l(p(e),t,r)},"f")).getControlPoints=function(){return[{x:s,y:t},{x:o,y:r}]};var m="generateBezier("+[s,t,o,r]+")";return e.toString=function(){return m},e}function HQ(e,t,r,n,i){return 1===n||t===r?r:(i=i(t,r,n),null!=e&&((e.roundValue||e.color)&&(i=Math.round(i)),void 0!==e.min&&(i=Math.max(i,e.min)),void 0!==e.max)?Math.min(i,e.max):i)}function VQ(e,t){return null!=e.pfValue||null!=e.value?null==e.pfValue||null!=t&&"%"===t.type.units?e.value:e.pfValue:e}function XQ(e,t,r,n,i){var a=null!=i?i.type:null,s=(r<0?r=0:1<r&&(r=1),VQ(e,i)),o=VQ(t,i);if(he(s)&&he(o))return HQ(a,s,o,r,n);if(Eee(s)&&Eee(o)){for(var l=[],c=0;c<o.length;c++){var h=s[c],u=o[c];null!=h&&null!=u?(h=HQ(a,h,u,r,n),l.push(h)):l.push(u)}return l}}function KQ(e,t,r,n){var i=!n,a=e._private,s=t._private,t=s.easing,o=s.startTime,l=(n?e:e.cy()).style(),c=(s.easingImpl||(null==t?s.easingImpl=ele.linear:(t=kee(t)?l.parse("transition-timing-function",t).value:t,0<(t=kee(t)?(u=t,[]):(u=t[1],t.slice(2).map(function(e){return+e}))).length?("spring"===u&&t.push(s.duration),s.easingImpl=ele[u].apply(null,t)):s.easingImpl=ele[u])),s.easingImpl),h=0===s.duration?1:(r-o)/s.duration;if((h=s.applying?s.progress:h)<0?h=0:1<h&&(h=1),null==s.delay){var t=s.startPosition,o=((u=s.position)&&i&&!e.locked()&&(r={},ZQ(t.x,u.x)&&(r.x=XQ(t.x,u.x,h,c)),ZQ(t.y,u.y)&&(r.y=XQ(t.y,u.y,h,c)),e.position(r)),s.startPan),t=s.pan,u=a.pan,u=((r=null!=t&&n)&&(ZQ(o.x,t.x)&&(u.x=XQ(o.x,t.x,h,c)),ZQ(o.y,t.y)&&(u.y=XQ(o.y,t.y,h,c)),e.emit("pan")),s.startZoom),d=((t=null!=(o=s.zoom)&&n)&&(ZQ(u,o)&&(a.zoom=Qre(a.minZoom,XQ(u,o,h,c),a.maxZoom)),e.emit("zoom")),(r||t)&&e.emit("viewport"),s.style);if(d&&0<d.length&&i){for(var p=0;p<d.length;p++){var g=(m=d[p]).name,f=s.startStyle[g],m=XQ(f,m,h,c,l.properties[f.name]);l.overrideBypass(e,g,m)}e.emit("style")}}return s.progress=h}function ZQ(e,t){return!(null==e||null==t||!(he(e)&&he(t)||e&&t))}function QQ(e,t,r,n){(t=t._private).started=!0,t.startTime=r-t.progress*t.duration}function JQ(h,e){var t=e._private.aniEles,u=[];function r(e,t){var r,n=(i=e._private).animation.current,i=i.animation.queue,a=!1;0===n.length&&(r=i.shift())&&n.push(r);for(var s=mt(function(e){for(var t=e.length-1;0<=t;t--)(0,e[t])();e.splice(0,e.length)},"callbacks"),o=n.length-1;0<=o;o--){var l=n[o],c=l._private;c.stopped?(n.splice(o,1),c.hooked=!1,c.playing=!1,c.started=!1,s(c.frames)):(c.playing||c.applying)&&(c.playing&&c.applying&&(c.applying=!1),c.started||QQ(0,l,h),KQ(e,l,h,t),c.applying&&(c.applying=!1),s(c.frames),null!=c.step&&c.step(h),l.completed()&&(n.splice(o,1),c.hooked=!1,c.playing=!1,c.started=!1,s(c.completes)),a=!0)}return t||0!==n.length||0!==i.length||u.push(e),a}mt(r,"stepOne");for(var n=!1,i=0;i<t.length;i++)var a=r(t[i]),n=n||a;var s=r(e,!0);(n||s)&&(0<t.length?e.notify("draw",t):e.notify("draw")),t.unmerge(u),e.emit("step")}function eJ(e){this.options=Xee({},cle,hle,e)}function tJ(e){this.options=Xee({},ple,e)}function rJ(e){this.options=Xee({},gle,e)}function nJ(e){this.options=Xee({},mle,e);var i=(this.options.layout=this).options.eles.nodes(),e=this.options.eles.edges().filter(function(e){var t=e.source().data("id"),r=e.target().data("id"),e=i.some(function(e){return e.data("id")===t}),n=i.some(function(e){return e.data("id")===r});return!e||!n});this.options.eles=this.options.eles.not(e)}function iJ(e){this.options=Xee({},Ple,e)}function aJ(e){this.options=Xee({},Ble,e)}function sJ(e){this.options=Xee({},$le,e)}function oJ(e){this.options=Xee({},Fle,e)}function lJ(e){this.options=e,this.notifications=0}function cJ(e,t){0===t.radius?e.lineTo(t.cx,t.cy):e.arc(t.cx,t.cy,t.radius,t.startAngle,t.endAngle,t.counterClockwise)}function hJ(e,t,r,n){return 0===n||0===t.radius?{cx:t.x,cy:t.y,radius:0,startX:t.x,startY:t.y,stopX:t.x,stopY:t.y,startAngle:void 0,endAngle:void 0,counterClockwise:void 0}:(ace(e,t,r,n,!(4<arguments.length&&void 0!==arguments[4])||arguments[4]),{cx:Gle,cy:Ule,radius:Vle,startX:Qle,startY:Jle,stopX:ece,stopY:tce,startAngle:qle.ang+Math.PI/2*Yle,endAngle:jle.ang-Math.PI/2*Yle,counterClockwise:Wle})}function uJ(e){var t=[];if(null!=e){for(var r=0;r<e.length;r+=2)t.push({x:e[r],y:e[r+1]});return t}}function dJ(e,t,r){for(var n=mt(function(e,t,r,n){return Xre(e,t,r,n)},"qbezierAt$1"),i=t._private.rstyle.bezierPts,a=0;a<e.bezierProjPcts.length;a++){var s=e.bezierProjPcts[a];i.push({x:n(r[0],r[2],r[4],s),y:n(r[1],r[3],r[5],s)})}}function pJ(e,t){for(var r=0;r<t.length;r++){var n=t[r];e.lineTo(n.x,n.y)}}function gJ(e,t,r){for(var n,i=0;i<t.length;i++){var a=t[i];0===i&&(n=a),e.lineTo(a.x,a.y)}e.quadraticCurveTo(r.x,r.y,n.x,n.y)}function fJ(e,t,r){e.beginPath&&e.beginPath();for(var n=t,i=0;i<n.length;i++){var a=n[i];e.lineTo(a.x,a.y)}var s=r,t=r[0];for(e.moveTo(t.x,t.y),i=1;i<s.length;i++)a=s[i],e.lineTo(a.x,a.y);e.closePath&&e.closePath()}function mJ(e,t,r,n,i){e.beginPath&&e.beginPath(),e.arc(r,n,i,0,2*Math.PI,!1);var a=t,r=a[0];e.moveTo(r.x,r.y);for(var s=0;s<a.length;s++){var o=a[s];e.lineTo(o.x,o.y)}e.closePath&&e.closePath()}function yJ(e,t,r,n){e.arc(t,r,n,0,2*Math.PI,!1)}function vJ(e,t,r,n,i){var a=Math.min(n,i)/2,t=t+n/2,n=r+i/2;e.beginPath(),e.arc(t,n,a,0,2*Math.PI),e.closePath()}function xJ(e,t,r,n,i){var a=Math.min(5<arguments.length&&void 0!==arguments[5]?arguments[5]:5,n/2,i/2);e.beginPath(),e.moveTo(t+a,r),e.lineTo(t+n-a,r),e.quadraticCurveTo(t+n,r,t+n,r+a),e.lineTo(t+n,r+i-a),e.quadraticCurveTo(t+n,r+i,t+n-a,r+i),e.lineTo(t+a,r+i),e.quadraticCurveTo(t,r+i,t,r+i-a),e.lineTo(t,r+a),e.quadraticCurveTo(t,r,t+a,r),e.closePath()}function bJ(e,t,r){if(t=e.createShader(t),e.shaderSource(t,r),e.compileShader(t),e.getShaderParameter(t,e.COMPILE_STATUS))return t;throw new Error(e.getShaderInfoLog(t))}function wJ(e,t,r){var t=bJ(e,e.VERTEX_SHADER,t),r=bJ(e,e.FRAGMENT_SHADER,r),n=e.createProgram();if(e.attachShader(n,t),e.attachShader(n,r),e.linkProgram(n),e.getProgramParameter(n,e.LINK_STATUS))return n;throw new Error("Could not initialize shaders")}function kJ(e,t,r){var n=e.makeOffscreenCanvas(t,r=void 0===r?t:r),i=n.context=n.getContext("2d");return n.clear=function(){return i.clearRect(0,0,n.width,n.height)},n.clear(),n}function TJ(e){var t=e.pixelRatio;return{zoom:e.cy.zoom()*t,pan:{x:(e=e.cy.pan()).x*t,y:e.y*t}}}function EJ(e){var t=e.pixelRatio;return e.cy.zoom()*t}function CJ(e,t,r,n,i){return n=n*r+t.x,i=i*r+t.y,[n,Math.round(e.canvasHeight-i)]}function _J(e){return"solid"===e.pstyle("background-fill").value&&"none"===e.pstyle("background-image").strValue&&(0===e.pstyle("border-width").value||0===e.pstyle("border-opacity").value||"solid"===e.pstyle("border-style").value)}function SJ(e,t){if(e.length!==t.length)return!1;for(var r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}function AJ(e,t,r){var n=e[0]/255,i=e[1]/255,e=e[2]/255;return(r=r||new Array(4))[0]=n*t,r[1]=i*t,r[2]=e*t,r[3]=t,r}function LJ(e,t){return(t=t||new Array(4))[0]=(e>>0&255)/255,t[1]=(e>>8&255)/255,t[2]=(e>>16&255)/255,t[3]=(e>>24&255)/255,t}function NJ(e){return e[0]+(e[1]<<8)+(e[2]<<16)+(e[3]<<24)}function IJ(t,e){var r=t.createTexture();return r.buffer=function(e){t.bindTexture(t.TEXTURE_2D,r),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.LINEAR),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.LINEAR_MIPMAP_NEAREST),t.pixelStorei(t.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!0),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,t.RGBA,t.UNSIGNED_BYTE,e),t.generateMipmap(t.TEXTURE_2D),t.bindTexture(t.TEXTURE_2D,null)},r.deleteTexture=function(){t.deleteTexture(r)},r}function RJ(e,t){switch(t){case"float":return[1,e.FLOAT,4];case"vec2":return[2,e.FLOAT,4];case"vec3":return[3,e.FLOAT,4];case"vec4":return[4,e.FLOAT,4];case"int":return[1,e.INT,4];case"ivec2":return[2,e.INT,4]}}function MJ(e,t,r){switch(t){case e.FLOAT:return new Float32Array(r);case e.INT:return new Int32Array(r)}}function DJ(e,t,r,n,i,a){switch(t){case e.FLOAT:return new Float32Array(r.buffer,a*n,i);case e.INT:return new Int32Array(r.buffer,a*n,i)}}function OJ(e,t,r,n){var i=(t=tZ(RJ(e,t),2))[0],n=MJ(e,t=t[1],n),a=e.createBuffer();return e.bindBuffer(e.ARRAY_BUFFER,a),e.bufferData(e.ARRAY_BUFFER,n,e.STATIC_DRAW),t===e.FLOAT?e.vertexAttribPointer(r,i,t,!1,0,0):t===e.INT&&e.vertexAttribIPointer(r,i,t,0,0),e.enableVertexAttribArray(r),e.bindBuffer(e.ARRAY_BUFFER,null),a}function PJ(t,e,r,n){var i=(r=tZ(RJ(t,r),3))[0],a=r[1],r=r[2],s=MJ(t,a,e*i),o=i*r,l=t.createBuffer();t.bindBuffer(t.ARRAY_BUFFER,l),t.bufferData(t.ARRAY_BUFFER,e*o,t.DYNAMIC_DRAW),t.enableVertexAttribArray(n),a===t.FLOAT?t.vertexAttribPointer(n,i,a,!1,o,0):a===t.INT&&t.vertexAttribIPointer(n,i,a,o,0),t.vertexAttribDivisor(n,1),t.bindBuffer(t.ARRAY_BUFFER,null);for(var c=new Array(e),h=0;h<e;h++)c[h]=DJ(t,a,s,o,i,h);return l.dataArray=s,l.stride=o,l.size=i,l.getView=function(e){return c[e]},l.setPoint=function(e,t,r){(e=c[e])[0]=t,e[1]=r},l.bufferSubData=function(e){t.bindBuffer(t.ARRAY_BUFFER,l),e?t.bufferSubData(t.ARRAY_BUFFER,0,s,0,e*i):t.bufferSubData(t.ARRAY_BUFFER,0,s)},l}function BJ(e,t,r){for(var n=new Float32Array(9*t),i=new Array(t),a=0;a<t;a++)i[a]=new Float32Array(n.buffer,9*a*4,9);var s=e.createBuffer();e.bindBuffer(e.ARRAY_BUFFER,s),e.bufferData(e.ARRAY_BUFFER,n.byteLength,e.DYNAMIC_DRAW);for(var o=0;o<3;o++){var l=r+o;e.enableVertexAttribArray(l),e.vertexAttribPointer(l,3,e.FLOAT,!1,36,12*o),e.vertexAttribDivisor(l,1)}return e.bindBuffer(e.ARRAY_BUFFER,null),s.getMatrixView=function(e){return i[e]},s.setData=function(e,t){i[t].set(e,0)},s.bufferSubData=function(){e.bindBuffer(e.ARRAY_BUFFER,s),e.bufferSubData(e.ARRAY_BUFFER,0,n)},s}function $J(r){var e=r.createFramebuffer(),n=(r.bindFramebuffer(r.FRAMEBUFFER,e),r.createTexture());return r.bindTexture(r.TEXTURE_2D,n),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_MIN_FILTER,r.LINEAR),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_S,r.CLAMP_TO_EDGE),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_T,r.CLAMP_TO_EDGE),r.framebufferTexture2D(r.FRAMEBUFFER,r.COLOR_ATTACHMENT0,r.TEXTURE_2D,n,0),r.bindFramebuffer(r.FRAMEBUFFER,null),e.setFramebufferAttachmentSizes=function(e,t){r.bindTexture(r.TEXTURE_2D,n),r.texImage2D(r.TEXTURE_2D,0,r.RGBA,e,t,0,r.RGBA,r.UNSIGNED_BYTE,null)},e}function FJ(){var e=new Fce(9);return Fce!=Float32Array&&(e[1]=0,e[2]=0,e[3]=0,e[5]=0,e[6]=0,e[7]=0),e[0]=1,e[4]=1,e[8]=1,e}function zJ(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=1,e[5]=0,e[6]=0,e[7]=0,e[8]=1,e}function GJ(e,t,r){var n=t[0],i=t[1],a=t[2],s=t[3],o=t[4],l=t[5],c=t[6],h=t[7],t=t[8],u=r[0],d=r[1],p=r[2],g=r[3],f=r[4],m=r[5],y=r[6],v=r[7],r=r[8];return e[0]=u*n+d*s+p*c,e[1]=u*i+d*o+p*h,e[2]=u*a+d*l+p*t,e[3]=g*n+f*s+m*c,e[4]=g*i+f*o+m*h,e[5]=g*a+f*l+m*t,e[6]=y*n+v*s+r*c,e[7]=y*i+v*o+r*h,e[8]=y*a+v*l+r*t,e}function UJ(e,t,r){var n=t[0],i=t[1],a=t[2],s=t[3],o=t[4],l=t[5],c=t[6],h=t[7],t=t[8],u=r[0],r=r[1];return e[0]=n,e[1]=i,e[2]=a,e[3]=s,e[4]=o,e[5]=l,e[6]=u*n+r*s+c,e[7]=u*i+r*o+h,e[8]=u*a+r*l+t,e}function qJ(e,t,r){var n=t[0],i=t[1],a=t[2],s=t[3],o=t[4],l=t[5],c=t[6],h=t[7],t=t[8],u=Math.sin(r),r=Math.cos(r);return e[0]=r*n+u*s,e[1]=r*i+u*o,e[2]=r*a+u*l,e[3]=r*s-u*n,e[4]=r*o-u*i,e[5]=r*l-u*a,e[6]=c,e[7]=h,e[8]=t,e}function jJ(e,t,r){var n=r[0],r=r[1];return e[0]=n*t[0],e[1]=n*t[1],e[2]=n*t[2],e[3]=r*t[3],e[4]=r*t[4],e[5]=r*t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e}function YJ(e,t,r){return e[0]=2/t,e[1]=0,e[2]=0,e[3]=0,e[4]=-2/r,e[5]=0,e[6]=-1,e[7]=1,e[8]=1,e}function WJ(e,t){return e.intersection?e.intersection(t):new Set(rZ(e).filter(function(e){return t.has(e)}))}function HJ(e){return e=(e=e.cy.container())&&e.style&&e.style.backgroundColor||"white",ete(e)}function VJ(e,t){return e=e._private.rscratch,mre(e,"labelWrapCachedLines",t)||[]}function XJ(i){var r=i.render,t=(i.render=function(e){e=e||{};var t=i.cy;i.webgl&&(7.99<t.zoom()?(KJ(i),r.call(i,e)):(ZJ(i),see(i,e,jce.SCREEN)))},i.matchCanvasSize),e=(i.matchCanvasSize=function(e){t.call(i,e),i.pickingFrameBuffer.setFramebufferAttachmentSizes(i.canvasWidth,i.canvasHeight),i.pickingFrameBuffer.needsDraw=!0},i.findNearestElements=function(e,t,r,n){return iee(i,e,t)},i.invalidateCachedZSortedEles),n=(i.invalidateCachedZSortedEles=function(){e.call(i),i.pickingFrameBuffer.needsDraw=!0},i.notify);i.notify=function(e,t){n.call(i,e,t),"viewport"===e||"bounds"===e?i.pickingFrameBuffer.needsDraw=!0:"background"===e&&i.drawing.invalidate(t,{type:"node-body"})}}function KJ(e){(e=e.data.contexts[e.WEBGL]).clear(e.COLOR_BUFFER_BIT|e.DEPTH_BUFFER_BIT)}function ZJ(t){var e=mt(function(e){e.save(),e.setTransform(1,0,0,1,0,0),e.clearRect(0,0,t.canvasWidth,t.canvasHeight),e.restore()},"clear");e(t.data.contexts[t.NODE]),e(t.data.contexts[t.DRAG])}function QJ(e){var t=e.canvasWidth,r=e.canvasHeight,n=(e=TJ(e)).pan,e=e.zoom,i=FJ();return UJ(i,i,[n.x,n.y]),jJ(i,i,[e,e]),YJ(n=FJ(),t,r),GJ(e=FJ(),n,i),e}function JJ(e,t){var r=e.canvasWidth,n=e.canvasHeight,i=(e=TJ(e)).pan,e=e.zoom;t.setTransform(1,0,0,1,0,0),t.clearRect(0,0,r,n),t.translate(i.x,i.y),t.scale(e,e)}function eee(t,e){t.drawSelectionRectangle(e,function(e){return JJ(t,e)})}function tee(e){var t=e.data.contexts[e.NODE];t.save(),JJ(e,t),t.strokeStyle="rgba(0, 0, 0, 0.3)",t.beginPath(),t.moveTo(-1e3,0),t.lineTo(1e3,0),t.stroke(),t.beginPath(),t.moveTo(0,-1e3),t.lineTo(0,1e3),t.stroke(),t.restore()}function ree(u){var e=mt(function(e,t,r){for(var e=e.atlasManager.getAtlasCollection(t),n=u.data.contexts[u.NODE],i=e.atlases,a=0;a<i.length;a++){var s,o,l,c,h=i[a].canvas;h&&(s=h.width,o=h.height,l=s*a,c=h.height*r,n.save(),n.scale(.4,.4),n.drawImage(h,l,c),n.strokeStyle="black",n.rect(l,c,s,o),n.stroke(),n.restore())}},"draw");e(u.drawing,"node",0),e(u.drawing,"label",1)}function nee(e,t,r,n,i){var a=TJ(e),t=(a=tZ(CJ(e,a.pan,a.zoom,t,r),2))[0]-3,r=a[1]-3,s=((a=e.data.contexts[e.WEBGL]).bindFramebuffer(a.FRAMEBUFFER,e.pickingFrameBuffer),e.pickingFrameBuffer.needsDraw&&(a.viewport(0,0,a.canvas.width,a.canvas.height),see(e,null,jce.PICKING),e.pickingFrameBuffer.needsDraw=!1),new Uint8Array(144));a.readPixels(t,r,6,6,a.RGBA,a.UNSIGNED_BYTE,s),a.bindFramebuffer(a.FRAMEBUFFER,null);for(var o=new Set,l=0;l<36;l++){var c=NJ(s.slice(4*l,4*l+4))-1;0<=c&&o.add(c)}return o}function iee(e,t,r){var n,i,a,t=nee(e,t,r),s=e.getCachedZSortedEles(),o=XK(t);try{for(o.s();!(a=o.n()).done;){var l=s[a.value];if(!n&&l.isNode()&&(n=l),!i&&l.isEdge()&&(i=l),n&&i)break}}catch(e){o.e(e)}finally{o.f()}return[n,i].filter(Boolean)}function aee(e,t,r){e=e.drawing,t+=1,r.isNode()?(e.drawNode(r,t,"node-underlay"),e.drawNode(r,t,"node-body"),e.drawTexture(r,t,"label"),e.drawNode(r,t,"node-overlay")):(e.drawEdgeLine(r,t),e.drawEdgeArrow(r,t,"source"),e.drawEdgeArrow(r,t,"target"),e.drawTexture(r,t,"label"),e.drawTexture(r,t,"edge-source-label"),e.drawTexture(r,t,"edge-target-label"))}function see(e,t,r){e.webglDebug&&(c=performance.now());var n=e.drawing,i=0;if(r.screen&&e.data.canvasNeedsRedraw[e.SELECT_BOX]&&eee(e,t),e.data.canvasNeedsRedraw[e.NODE]||r.picking){var t=e.data.contexts[e.WEBGL],t=(r.screen?(t.clearColor(0,0,0,0),t.enable(t.BLEND),t.blendFunc(t.ONE,t.ONE_MINUS_SRC_ALPHA)):t.disable(t.BLEND),t.clear(t.COLOR_BUFFER_BIT|t.DEPTH_BUFFER_BIT),t.viewport(0,0,t.canvas.width,t.canvas.height),QJ(e)),a=e.getCachedZSortedEles(),i=a.length;if(n.startFrame(t,r),r.screen){for(var s=0;s<a.nondrag.length;s++)aee(e,s,a.nondrag[s]);for(var o=0;o<a.drag.length;o++)aee(e,o,a.drag[o])}else if(r.picking)for(var l=0;l<a.length;l++)aee(e,l,a[l]);n.endFrame(),r.screen&&e.webglDebugShowAtlases&&(tee(e),ree(e)),e.data.canvasNeedsRedraw[e.NODE]=!1,e.data.canvasNeedsRedraw[e.DRAG]=!1}if(e.webglDebug){var t=performance.now(),t=Math.ceil(t-c),c=n.getDebugInfo(),i=["".concat(i," elements"),"".concat(c.totalInstances," instances"),"".concat(c.batchCount," batches"),"".concat(c.totalAtlases," atlases"),"".concat(c.wrappedCount," wrapped textures"),"".concat(c.simpleCount," simple shapes")].join(", ");console.log("WebGL (".concat(r.name,") - frame time ").concat(t,"ms")),console.log("Totals:"),console.log(" ".concat(i)),console.log("Texture Atlases Used:");var h,u=XK(c.atlasInfo);try{for(u.s();!(h=u.n()).done;){var d=h.value;console.log(" ".concat(d.type,": ").concat(d.keyCount," keys, ").concat(d.atlasCount," atlases"))}}catch(e){u.e(e)}finally{u.f()}console.log("")}e.data.gc&&(console.log("Garbage Collect!"),e.data.gc=!1,n.gc())}function oee(e,t){for(var r=atob(e),e=new ArrayBuffer(r.length),n=new Uint8Array(e),i=0;i<r.length;i++)n[i]=r.charCodeAt(i);return new Blob([e],{type:t})}function lee(e){var t=e.indexOf(",");return e.substr(t+1)}function cee(e,n,i){var t=mt(function(){return n.toDataURL(i,e.quality)},"getB64Uri");switch(e.output){case"blob-promise":return new Hie(function(t,r){try{n.toBlob(function(e){null!=e?t(e):r(new Error("`canvas.toBlob()` sent a null value in its callback"))},i,e.quality)}catch(e){r(e)}});case"blob":return oee(lee(t()),i);case"base64":return lee(t());default:return t()}}function hee(e){var a=this,t=a.cy.window().document,r=(e.webgl&&(she.CANVAS_LAYERS=a.CANVAS_LAYERS=4,console.log("webgl rendering enabled")),a.data={canvases:new Array(she.CANVAS_LAYERS),contexts:new Array(she.CANVAS_LAYERS),canvasNeedsRedraw:new Array(she.CANVAS_LAYERS),bufferCanvases:new Array(she.BUFFER_COUNT),bufferContexts:new Array(she.CANVAS_LAYERS)},"-webkit-tap-highlight-color"),n="rgba(0,0,0,0)",i=(a.data.canvasContainer=t.createElement("div"),a.data.canvasContainer.style),s=(a.data.canvasContainer.style[r]=n,i.position="relative",i.zIndex="0",i.overflow="hidden",(i=e.cy.container()).appendChild(a.data.canvasContainer),i.style[r]=n,{"-webkit-user-select":"none","-moz-user-select":"-moz-none","user-select":"none","-webkit-tap-highlight-color":"rgba(0,0,0,0)","outline-style":"none"});Fee()&&(s["-ms-touch-action"]="none",s["touch-action"]="none");for(var o=0;o<she.CANVAS_LAYERS;o++){var l=a.data.canvases[o]=t.createElement("canvas"),c=she.CANVAS_TYPES[o];a.data.contexts[o]=l.getContext(c),a.data.contexts[o]||ire("Could not create canvas of type "+c),Object.keys(s).forEach(function(e){l.style[e]=s[e]}),l.style.position="absolute",l.setAttribute("data-id","layer"+o),l.style.zIndex=String(she.CANVAS_LAYERS-o),a.data.canvasContainer.appendChild(l),a.data.canvasNeedsRedraw[o]=!1}for(a.data.topCanvas=a.data.canvases[0],a.data.canvases[she.NODE].setAttribute("data-id","layer"+she.NODE+"-node"),a.data.canvases[she.SELECT_BOX].setAttribute("data-id","layer"+she.SELECT_BOX+"-selectbox"),a.data.canvases[she.DRAG].setAttribute("data-id","layer"+she.DRAG+"-drag"),a.data.canvases[she.WEBGL]&&a.data.canvases[she.WEBGL].setAttribute("data-id","layer"+she.WEBGL+"-webgl"),o=0;o<she.BUFFER_COUNT;o++)a.data.bufferCanvases[o]=t.createElement("canvas"),a.data.bufferContexts[o]=a.data.bufferCanvases[o].getContext("2d"),a.data.bufferCanvases[o].style.position="absolute",a.data.bufferCanvases[o].setAttribute("data-id","buffer"+o),a.data.bufferCanvases[o].style.zIndex=String(-o-1),a.data.bufferCanvases[o].style.visibility="hidden";a.pathsEnabled=!0;var h=Jre(),P=mt(function(e){return{x:(e.x1+e.x2)/2,y:(e.y1+e.y2)/2}},"getBoxCenter"),u=mt(function(e){return{x:-e.w/2,y:-e.h/2}},"getCenterOffset"),i=mt(function(e){return!((e=e[0]._private).oldBackgroundTimestamp===e.backgroundTimestamp)},"backgroundTimestampHasChanged"),r=mt(function(e){return e[0]._private.nodeKey},"getStyleKey"),n=mt(function(e){return e[0]._private.labelStyleKey},"getLabelKey"),d=mt(function(e){return e[0]._private.sourceLabelStyleKey},"getSourceLabelKey"),p=mt(function(e){return e[0]._private.targetLabelStyleKey},"getTargetLabelKey"),g=mt(function(e,t,r,n,i){return a.drawElement(e,t,r,!1,!1,i)},"drawElement"),f=mt(function(e,t,r,n,i){return a.drawElementText(e,t,r,n,"main",i)},"drawLabel"),m=mt(function(e,t,r,n,i){return a.drawElementText(e,t,r,n,"source",i)},"drawSourceLabel"),y=mt(function(e,t,r,n,i){return a.drawElementText(e,t,r,n,"target",i)},"drawTargetLabel"),v=mt(function(e){return e.boundingBox(),e[0]._private.bodyBounds},"getElementBox"),x=mt(function(e){return e.boundingBox(),e[0]._private.labelBounds.main||h},"getLabelBox"),b=mt(function(e){return e.boundingBox(),e[0]._private.labelBounds.source||h},"getSourceLabelBox"),w=mt(function(e){return e.boundingBox(),e[0]._private.labelBounds.target||h},"getTargetLabelBox"),k=mt(function(e,t){return t},"isLabelVisibleAtScale"),T=mt(function(e){return P(v(e))},"getElementRotationPoint"),E=mt(function(e,t,r){return{x:t.x+r.pstyle((e=e?e+"-":"")+"text-margin-x").pfValue,y:t.y+r.pstyle(e+"text-margin-y").pfValue}},"addTextMargin"),C=mt(function(e,t,r){return{x:(e=e[0]._private.rscratch)[t],y:e[r]}},"getRsPt"),_=mt(function(e){return E("",C(e,"labelX","labelY"),e)},"getLabelRotationPoint"),S=mt(function(e){return E("source",C(e,"sourceLabelX","sourceLabelY"),e)},"getSourceLabelRotationPoint"),A=mt(function(e){return E("target",C(e,"targetLabelX","targetLabelY"),e)},"getTargetLabelRotationPoint"),L=mt(function(e){return u(v(e))},"getElementRotationOffset"),N=mt(function(e){return u(b(e))},"getSourceLabelRotationOffset"),I=mt(function(e){return u(w(e))},"getTargetLabelRotationOffset"),R=mt(function(e){var t=x(e),r=u(x(e));if(e.isNode()){switch(e.pstyle("text-halign").value){case"left":r.x=-t.w-(t.leftPad||0);break;case"right":r.x=-(t.rightPad||0)}switch(e.pstyle("text-valign").value){case"top":r.y=-t.h-(t.topPad||0);break;case"bottom":r.y=-(t.botPad||0)}}return r},"getLabelRotationOffset"),M=a.data.eleTxrCache=new vce(a,{getKey:r,doesEleInvalidateKey:i,drawElement:g,getBoundingBox:v,getRotationPoint:T,getRotationOffset:L,allowEdgeTxrCaching:!1,allowParentTxrCaching:!1}),D=a.data.lblTxrCache=new vce(a,{getKey:n,drawElement:f,getBoundingBox:x,getRotationPoint:_,getRotationOffset:R,isVisible:k}),O=a.data.slbTxrCache=new vce(a,{getKey:d,drawElement:m,getBoundingBox:b,getRotationPoint:S,getRotationOffset:N,isVisible:k}),B=a.data.tlbTxrCache=new vce(a,{getKey:p,drawElement:y,getBoundingBox:w,getRotationPoint:A,getRotationOffset:I,isVisible:k}),$=a.data.lyrTxrCache=new xce(a),i=(a.onUpdateEleCalcs(mt(function(e,t){M.invalidateElements(t),D.invalidateElements(t),O.invalidateElements(t),B.invalidateElements(t),$.invalidateElements(t);for(var r=0;r<t.length;r++){var n=t[r]._private;n.oldBackgroundTimestamp=n.backgroundTimestamp}},"invalidateTextureCaches")),mt(function(e){for(var t=0;t<e.length;t++)$.enqueueElementRefinement(e[t].ele)},"refineInLayers"));M.onDequeue(i),D.onDequeue(i),O.onDequeue(i),B.onDequeue(i),e.webgl&&a.initWebgl(e,{getStyleKey:r,getLabelKey:n,getSourceLabelKey:d,getTargetLabelKey:p,drawElement:g,drawLabel:f,drawSourceLabel:m,drawTargetLabel:y,getElementBox:v,getLabelBox:x,getSourceLabelBox:b,getTargetLabelBox:w,getElementRotationPoint:T,getElementRotationOffset:L,getLabelRotationPoint:_,getSourceLabelRotationPoint:S,getTargetLabelRotationPoint:A,getLabelRotationOffset:R,getSourceLabelRotationOffset:N,getTargetLabelRotationOffset:I})}function uee(t,r,n){var e=n,i=mt(function(e){sre("Can not register `"+r+"` for `"+t+"` since `"+e+"` already exists in the prototype and can not be overridden")},"overrideErr");if("core"===t){if(ole.prototype[r])return i(r);ole.prototype[r]=n}else if("collection"===t){if(Zoe.prototype[r])return i(r);Zoe.prototype[r]=n}else if("layout"===t){for(var a=(g=mt(function(e){this.options=e,n.call(this,e),Cee(this._private)||(this._private={}),this._private.cy=e.cy,this._private.listeners=[],this.createEmitter()},"Layout")).prototype=Object.create(n.prototype),s=[],o=0;o<s.length;o++){var l=s[o];a[l]=a[l]||function(){return this}}a.start&&!a.run?a.run=function(){return this.start(),this}:!a.start&&a.run&&(a.start=function(){return this.run(),this});var c=n.prototype.stop,h=(a.stop=function(){var e=this.options;if(e&&e.animate){var t=this.animations;if(t)for(var r=0;r<t.length;r++)t[r].stop()}return c?c.call(this):this.emit("layoutstop"),this},a.destroy||(a.destroy=function(){return this}),a.cy=function(){return this._private.cy},mt(function(e){return e._private.cy},"getCy")),u={addEventFields:mt(function(e,t){t.layout=e,t.cy=h(e),t.target=e},"addEventFields"),bubble:mt(function(){return!0},"bubble"),parent:mt(function(e){return h(e)},"parent")};Xee(a,{createEmitter:mt(function(){return this._private.emitter=new OQ(u,this),this},"createEmitter"),emitter:mt(function(){return this._private.emitter},"emitter"),on:mt(function(e,t){return this.emitter().on(e,t),this},"on"),one:mt(function(e,t){return this.emitter().one(e,t),this},"one"),once:mt(function(e,t){return this.emitter().one(e,t),this},"once"),removeListener:mt(function(e,t){return this.emitter().removeListener(e,t),this},"removeListener"),removeAllListeners:mt(function(){return this.emitter().removeAllListeners(),this},"removeAllListeners"),emit:mt(function(e,t){return this.emitter().emit(e,t),this},"emit")}),Wse.eventAliasesOn(a),e=g}else if("renderer"===t&&"null"!==r&&"base"!==r){var d,p,g,f=dee("renderer","base"),m=f.prototype,y=n,v=n.prototype,x=(g=mt(function(){f.apply(this,arguments),y.apply(this,arguments)},"Renderer")).prototype;for(d in m){var b=m[d];if(null!=v[d])return i(d);x[d]=b}for(p in v)x[p]=v[p];m.clientFunctions.forEach(function(e){x[e]=x[e]||function(){ire("Renderer does not implement `renderer."+e+"()` on its prototype")}}),e=g}else if("__proto__"===t||"constructor"===t||"prototype"===t)return ire(t+" is an illegal type to be registered, possibly lead to prototype pollutions");return rte({map:che,keys:[t,r],value:e})}function dee(e,t){return nte({map:che,keys:[e,t]})}function pee(e,t,r,n,i){return rte({map:hhe,keys:[e,t,r,n],value:i})}function gee(e,t,r,n){return nte({map:hhe,keys:[e,t,r,n]})}var fee,mee,yee,vee,xee,bee,wee,kee,Tee,Eee,Cee,_ee,he,See,Aee,Lee,Nee,Iee,Ree,Mee,Dee,Oee,Pee,Bee,$ee,Fee,zee,Gee,Uee,qee,jee,Yee,Wee,Hee,Vee,Xee,Kee,Zee,Qee,Jee,ete,tte,rte,nte,ite,ate,ste,ote,lte,cte,hte,ute,dte,pte,gte,fte,mte,yte,vte,xte,bte,wte,kte,Tte,Ete,Cte,_te,Ste,Ate,Lte,Nte,Ite,Rte,Mte,Dte,Ote,Pte,Bte,$te,Fte,zte,Gte,Ute,qte,jte,Yte,Wte,Hte,Vte,Xte,Kte,Zte,Qte,Jte,ere,tre,rre,nre,ire,are,sre,ore,lre,cre,hre,ure,dre,pre,gre,fre,mre,yre,vre,xre,bre,wre,kre,Tre,Ere,Cre,_re,Sre,Are,Lre,Nre,Ire,Rre,Mre,Dre,Ore,Pre,Bre,$re,Fre,zre,Gre,Ure,qre,jre,Yre,Wre,Hre,Vre,Xre,Kre,Zre,Qre,Jre,ene,tne,rne,nne,ine,ane,sne,one,lne,cne,hne,une,dne,pne,gne,fne,mne,yne,vne,xne,bne,wne,kne,Tne,Ene,Cne,_ne,Sne,Ane,Lne,Nne,Ine,Rne,Mne,Dne,One,Pne,Bne,$ne,Fne,zne,Gne,Une,qne,jne,Yne,Wne,Hne,Vne,Xne,Kne,Zne,Qne,Jne,eie,tie,rie,nie,iie,aie,sie,oie,lie,cie,hie,uie,die,pie,gie,fie,mie,yie,vie,xie,bie,wie,kie,Tie,Eie,Cie,_ie,Sie,Aie,Lie,Nie,Iie,Rie,Mie,Die,Oie,Pie,Bie,$ie,Fie,zie,Gie,Uie,qie,jie,Yie,Wie,Hie,Vie,Xie,Kie,Zie,Qie,Jie,eae,tae,rae,nae,iae,aae,sae,oae,lae,cae,hae,uae,dae,pae,gae,fae,mae,yae,vae,xae,bae,wae,kae,Tae,Eae,Cae,_ae,Sae,Aae,Lae,Nae,Iae,Rae,Mae,Dae,Oae,Pae,Bae,$ae,Fae,zae,Gae,Uae,qae,jae,Yae,Wae,Hae,Vae,Xae,Kae,Zae,Qae,Jae,ese,tse,rse,nse,ise,ase,sse,ose,lse,cse,hse,use,dse,pse,gse,fse,mse,yse,vse,xse,bse,wse,kse,Tse,Ese,Cse,_se,Sse,Ase,Lse,Nse,Ise,Rse,Mse,Dse,Ose,Pse,Bse,$se,Fse,zse,Gse,Use,qse,jse,Yse,Wse,Hse,Vse,Xse,Kse,Zse,Qse,Jse,eoe,toe,roe,noe,ioe,aoe,soe,ooe,loe,coe,hoe,uoe,doe,poe,goe,foe,moe,yoe,voe,xoe,boe,woe,koe,Toe,Eoe,Coe,_oe,Soe,Aoe,Loe,Noe,Ioe,Roe,Moe,Doe,Ooe,Poe,Boe,$oe,Foe,zoe,Goe,Uoe,qoe,joe,Yoe,Woe,Hoe,Voe,Xoe,Koe,Zoe,Qoe,Joe,ele,tle,rle,nle,ile,ale,sle,ole,lle,cle,hle,ule,dle,ple,gle,fle,mle,yle,vle,xle,ble,wle,kle,Tle,Ele,Cle,_le,Sle,Ale,Lle,Nle,Ile,Rle,Mle,Dle,Ole,Ple,Ble,$le,Fle,zle,Gle,Ule,qle,jle,Yle,Wle,Hle,Vle,Xle,Kle,Zle,Qle,Jle,ece,tce,rce,nce,ice,ace,sce,oce,lce,cce,hce,uce,dce,pce,gce,J,fce,mce,yce,vce,xce,bce,wce,kce,Tce,Ece,Cce,_ce,Sce,Ace,Lce,Nce,Ice,Rce,Mce,Dce,Oce,Pce,Bce,$ce,Fce,zce,Gce,Uce,qce,jce,Yce,Wce,Hce,Vce,Xce,Kce,Zce,Qce,Jce,ehe,the,rhe,nhe,ihe,ahe,she,ohe,lhe,che,hhe,uhe,dhe,phe,ghe,fhe=b(()=>{function n(e){if(WK(this,n),this._obj=Object.create(null),this.size=0,null!=e)for(var t=null!=e.instanceString&&e.instanceString()===this.instanceString()?e.toArray():e,r=0;r<t.length;r++)this.add(t[r])}function e(){WK(this,e),this._obj={}}mt(qK,"_arrayLikeToArray"),mt(jK,"_arrayWithHoles"),mt(YK,"_arrayWithoutHoles"),mt(WK,"_classCallCheck"),mt(HK,"_defineProperties"),mt(VK,"_createClass"),mt(XK,"_createForOfIteratorHelper"),mt(KK,"_defineProperty$1"),mt(ZK,"_iterableToArray"),mt(QK,"_iterableToArrayLimit"),mt(JK,"_nonIterableRest"),mt(eZ,"_nonIterableSpread"),mt(tZ,"_slicedToArray"),mt(rZ,"_toConsumableArray"),mt(nZ,"_toPrimitive"),mt(iZ,"_toPropertyKey"),mt(aZ,"_typeof"),mt(sZ,"_unsupportedIterableToArray"),fee="u"<typeof window?null:window,mee=fee?fee.navigator:null,fee&&fee.document,yee=aZ(""),vee=aZ({}),xee=aZ(function(){}),bee="u"<typeof HTMLElement?"undefined":aZ(HTMLElement),wee=mt(function(e){return e&&e.instanceString&&Tee(e.instanceString)?e.instanceString():null},"instanceStr"),kee=mt(function(e){return null!=e&&aZ(e)==yee},"string"),Tee=mt(function(e){return null!=e&&aZ(e)===xee},"fn"),Eee=mt(function(e){return!Lee(e)&&(Array.isArray?Array.isArray(e):null!=e&&e instanceof Array)},"array"),Cee=mt(function(e){return null!=e&&aZ(e)===vee&&!Eee(e)&&e.constructor===Object},"plainObject"),_ee=mt(function(e){return null!=e&&aZ(e)===vee},"object"),he=mt(function(e){return null!=e&&aZ(e)===aZ(1)&&!isNaN(e)},"number"),See=mt(function(e){return he(e)&&Math.floor(e)===e},"integer"),Aee=mt(function(e){if("undefined"!==bee)return null!=e&&e instanceof HTMLElement},"htmlElement"),Lee=mt(function(e){return Nee(e)||Iee(e)},"elementOrCollection"),Nee=mt(function(e){return"collection"===wee(e)&&e._private.single},"element"),Iee=mt(function(e){return"collection"===wee(e)&&!e._private.single},"collection"),Ree=mt(function(e){return"core"===wee(e)},"core"),Mee=mt(function(e){return"stylesheet"===wee(e)},"stylesheet"),Dee=mt(function(e){return"event"===wee(e)},"event"),Oee=mt(function(e){return null==e||!(""!==e&&!e.match(/^\s+$/))},"emptyString"),Pee=mt(function(e){return!("u"<typeof HTMLElement)&&e instanceof HTMLElement},"domElement"),Bee=mt(function(e){return Cee(e)&&he(e.x1)&&he(e.x2)&&he(e.y1)&&he(e.y2)},"boundingBox"),$ee=mt(function(e){return _ee(e)&&Tee(e.then)},"promise"),Fee=mt(function(){return mee&&mee.userAgent.match(/msie|trident|edge/i)},"ms"),zee=mt(function(n,i){i=i||mt(function(){if(1===arguments.length)return arguments[0];if(0===arguments.length)return"undefined";for(var e=[],t=0;t<arguments.length;t++)e.push(arguments[t]);return e.join("$")},"keyFn");var a=mt(function(){var e=arguments,t=i.apply(this,e),r=a.cache;return r[t]||(r[t]=n.apply(this,e))},"memoizedFn");return a.cache={},a},"memoize"),Gee=zee(function(e){return e.replace(/([A-Z])/g,function(e){return"-"+e.toLowerCase()})}),Uee=zee(function(e){return e.replace(/(-\w)/g,function(e){return e[1].toUpperCase()})}),qee=zee(function(e,t){return e+t[0].toUpperCase()+t.substring(1)},function(e,t){return e+"$"+t}),jee=mt(function(e){return Oee(e)?e:e.charAt(0).toUpperCase()+e.substring(1)},"capitalize"),Yee=mt(function(e,t){return e.slice(-1*t.length)===t},"endsWith"),Wee="(?:[-+]?(?:(?:\\d+|\\d*\\.\\d+)(?:[Ee][+-]?\\d+)?))",Hee=mt(function(e,t){return e<t?-1:t<e?1:0},"ascending"),Vee=mt(function(e,t){return-1*Hee(e,t)},"descending"),Xee=null!=Object.assign?Object.assign.bind(Object):function(e){for(var t=arguments,r=1;r<t.length;r++){var n=t[r];if(null!=n)for(var i=Object.keys(n),a=0;a<i.length;a++){var s=i[a];e[s]=n[s]}}return e},Kee=mt(function(e){var t,r;if((4===e.length||7===e.length)&&"#"===e[0])return e=4===e.length?(t=parseInt(e[1]+e[1],16),r=parseInt(e[2]+e[2],16),parseInt(e[3]+e[3],16)):(t=parseInt(e[1]+e[2],16),r=parseInt(e[3]+e[4],16),parseInt(e[5]+e[6],16)),[t,r,e]},"hex2tuple"),Zee=mt(function(e){var t,r,n,i,a,s,o;function l(e,t,r){return r<0&&(r+=1),1<r&&--r,r<1/6?e+6*(t-e)*r:r<.5?t:r<2/3?e+(t-e)*(2/3-r)*6:e}if(mt(l,"hue2rgb"),e=new RegExp("^hsl[a]?\\(((?:[-+]?(?:(?:\\d+|\\d*\\.\\d+)(?:[Ee][+-]?\\d+)?)))\\s*,\\s*((?:[-+]?(?:(?:\\d+|\\d*\\.\\d+)(?:[Ee][+-]?\\d+)?))[%])\\s*,\\s*((?:[-+]?(?:(?:\\d+|\\d*\\.\\d+)(?:[Ee][+-]?\\d+)?))[%])(?:\\s*,\\s*((?:[-+]?(?:(?:\\d+|\\d*\\.\\d+)(?:[Ee][+-]?\\d+)?))))?\\)$").exec(e)){if((t=parseInt(e[1]))<0?t=(360- -1*t%360)%360:360<t&&(t%=360),t/=360,(r=parseFloat(e[2]))<0||100<r||(r/=100,(i=parseFloat(e[3]))<0)||100<i||(i/=100,void 0!==(n=e[4])&&((n=parseFloat(n))<0||1<n)))return;0===r?a=s=o=Math.round(255*i):(i=2*i-(e=i<.5?i*(1+r):i+r-i*r),a=Math.round(255*l(i,e,t+1/3)),s=Math.round(255*l(i,e,t)),o=Math.round(255*l(i,e,t-1/3))),r=[a,s,o,n]}return r},"hsl2tuple"),Qee=mt(function(e){var t=new RegExp("^rgb[a]?\\(((?:[-+]?(?:(?:\\d+|\\d*\\.\\d+)(?:[Ee][+-]?\\d+)?))[%]?)\\s*,\\s*((?:[-+]?(?:(?:\\d+|\\d*\\.\\d+)(?:[Ee][+-]?\\d+)?))[%]?)\\s*,\\s*((?:[-+]?(?:(?:\\d+|\\d*\\.\\d+)(?:[Ee][+-]?\\d+)?))[%]?)(?:\\s*,\\s*((?:[-+]?(?:(?:\\d+|\\d*\\.\\d+)(?:[Ee][+-]?\\d+)?))))?\\)$").exec(e);if(t){for(var r=[],n=[],i=1;i<=3;i++){var a=t[i];if("%"===a[a.length-1]&&(n[i]=!0),a=parseFloat(a),(a=n[i]?a/100*255:a)<0||255<a)return;r.push(Math.floor(a))}if((n[1]||n[2]||n[3])&&!(n[1]&&n[2]&&n[3]))return;if(void 0!==(e=t[4])){if((e=parseFloat(e))<0||1<e)return;r.push(e)}}return r},"rgb2tuple"),Jee=mt(function(e){return tte[e.toLowerCase()]},"colorname2tuple"),ete=mt(function(e){return(Eee(e)?e:null)||Jee(e)||Kee(e)||Qee(e)||Zee(e)},"color2tuple"),tte={transparent:[0,0,0,0],aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],grey:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},rte=mt(function(e){for(var t=e.map,r=e.keys,n=r.length,i=0;i<n;i++){var a=r[i];if(Cee(a))throw Error("Tried to set map with object key");i<r.length-1?(null==t[a]&&(t[a]={}),t=t[a]):t[a]=e.value}},"setMap"),nte=mt(function(e){for(var t=e.map,r=e.keys,n=r.length,i=0;i<n;i++){var a=r[i];if(Cee(a))throw Error("Tried to get map with object key");if(null==(t=t[a]))return t}return t},"getMap"),ite=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},mt(oZ,"getDefaultExportFromCjs"),mt(lZ,"requireIsObject"),mt(cZ,"require_freeGlobal"),mt(hZ,"require_root"),mt(uZ,"requireNow"),mt(dZ,"require_trimmedEndIndex"),mt(pZ,"require_baseTrim"),mt(gZ,"require_Symbol"),mt(fZ,"require_getRawTag"),mt(mZ,"require_objectToString"),mt(yZ,"require_baseGetTag"),mt(vZ,"requireIsObjectLike"),mt(xZ,"requireIsSymbol"),mt(bZ,"requireToNumber"),mt(wZ,"requireDebounce"),ere=wZ(),Mte=oZ(ere),Dte=fee?fee.performance:null,Ote=Dte&&Dte.now?function(){return Dte.now()}:function(){return Date.now()},Pte=(()=>{if(fee){if(fee.requestAnimationFrame)return function(e){fee.requestAnimationFrame(e)};if(fee.mozRequestAnimationFrame)return function(e){fee.mozRequestAnimationFrame(e)};if(fee.webkitRequestAnimationFrame)return function(e){fee.webkitRequestAnimationFrame(e)};if(fee.msRequestAnimationFrame)return function(e){fee.msRequestAnimationFrame(e)}}return function(e){e&&setTimeout(function(){e(Ote())},1e3/60)}})(),Bte=mt(function(e){return Pte(e)},"requestAnimationFrame"),$te=Ote,Fte=mt(function(e){for(var t,r=1<arguments.length&&void 0!==arguments[1]?arguments[1]:9261;!(t=e.next()).done;)r=65599*r+t.value|0;return r},"hashIterableInts"),zte=mt(function(e){return 65599*(1<arguments.length&&void 0!==arguments[1]?arguments[1]:9261)+e|0},"hashInt"),Gte=mt(function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:5381;return(t<<5)+t+e|0},"hashIntAlt"),Ute=mt(function(e,t){return 2097152*e+t},"combineHashes"),qte=mt(function(e){return 2097152*e[0]+e[1]},"combineHashesArray"),jte=mt(function(e,t){return[zte(e[0],t[0]),Gte(e[1],t[1])]},"hashArrays"),Yte=mt(function(e,t){var r={value:0,done:!1},n=0,i=e.length,a={next:mt(function(){return n<i?r.value=e[n++]:r.done=!0,r},"next")};return Fte(a,t)},"hashIntsArray"),Wte=mt(function(e,t){var r={value:0,done:!1},n=0,i=e.length,a={next:mt(function(){return n<i?r.value=e.charCodeAt(n++):r.done=!0,r},"next")};return Fte(a,t)},"hashString"),Hte=mt(function(){return Vte(arguments)},"hashStrings"),Vte=mt(function(e){for(var t=0;t<e.length;t++)var r=e[t],n=0===t?Wte(r):Wte(r,n);return n},"hashStringsArray"),mt(kZ,"rotatePoint"),Xte=mt(function(e,t,r,n,i,a){return{x:(e-r)*i+r,y:(t-n)*a+n}},"movePointByBoxAspect"),mt(TZ,"rotatePosAndSkewByBox"),Kte=!0,Zte=null!=console.warn,Qte=null!=console.trace,Jte=Number.MAX_SAFE_INTEGER||9007199254740991,ere=mt(function(){return!0},"trueify"),tre=mt(function(){return!1},"falsify"),rre=mt(function(){return 0},"zeroify"),nre=mt(function(){},"noop"),ire=mt(function(e){throw new Error(e)},"error"),are=mt(function(e){if(void 0===e)return Kte;Kte=!!e},"warnings"),sre=mt(function(e){are()&&(Zte?console.warn(e):(console.log(e),Qte&&console.trace()))},"warn"),ore=mt(function(e){return Xee({},e)},"clone"),lre=mt(function(e){return null==e?e:Eee(e)?e.slice():Cee(e)?ore(e):e},"copy"),cre=mt(function(e){return e.slice()},"copyArray"),hre=mt(function(e,t){for(t=e="";e++<36;t+=51*e&52?(15^e?8^Math.random()*(20^e?16:4):4).toString(16):"-");return t},"uuid"),ure={},dre=mt(function(){return ure},"staticEmptyObject"),ahe=mt(function(a){var s=Object.keys(a);return function(e){for(var t={},r=0;r<s.length;r++){var n=s[r],i=e?.[n];t[n]=void 0===i?a[n]:i}return t}},"defaults"),pre=mt(function(e,t,r){for(var n=e.length-1;0<=n;n--)e[n]===t&&e.splice(n,1)},"removeFromArray"),gre=mt(function(e){e.splice(0,e.length)},"clearArray"),fre=mt(function(e,t){for(var r=0;r<t.length;r++)e.push(t[r])},"push"),mre=mt(function(e,t,r){return e[t=r?qee(r,t):t]},"getPrefixedProperty"),yre=mt(function(e,t,r,n){e[t=r?qee(r,t):t]=n},"setPrefixedProperty"),mt(e,"ObjectMap"),Pce=VK(e,[{key:"set",value:mt(function(e,t){return this._obj[e]=t,this},"set")},{key:"delete",value:mt(function(e){return this._obj[e]=void 0,this},"_delete")},{key:"clear",value:mt(function(){this._obj={}},"clear")},{key:"has",value:mt(function(e){return void 0!==this._obj[e]},"has")},{key:"get",value:mt(function(e){return this._obj[e]},"get")}]),vre=typeof Map<"u"?Map:Pce,mt(n,"ObjectSet"),Pce=VK(n,[{key:"instanceString",value:mt(function(){return"set"},"instanceString")},{key:"add",value:mt(function(e){var t=this._obj;1!==t[e]&&(t[e]=1,this.size++)},"add")},{key:"delete",value:mt(function(e){var t=this._obj;1===t[e]&&(t[e]=0,this.size--)},"_delete")},{key:"clear",value:mt(function(){this._obj=Object.create(null)},"clear")},{key:"has",value:mt(function(e){return 1===this._obj[e]},"has")},{key:"toArray",value:mt(function(){var t=this;return Object.keys(this._obj).filter(function(e){return t.has(e)})},"toArray")},{key:"forEach",value:mt(function(e,t){return this.toArray().forEach(e,t)},"forEach")}]),xre="undefined"!==("u"<typeof Set?"undefined":aZ(Set))?Set:Pce,bre=mt(function(e,t){var r=!(2<arguments.length&&void 0!==arguments[2])||arguments[2];if(void 0!==e&&void 0!==t&&Ree(e)){var n=t.group;if("nodes"!==(n=null==n?t.data&&null!=t.data.source&&null!=t.data.target?"edges":"nodes":n)&&"edges"!==n)ire("An element must be of type `nodes` or `edges`; you specified `"+n+"`");else{this.length=1;var i,a=(this[0]=this)._private={cy:e,single:!0,data:t.data||{},position:t.position||{x:0,y:0},autoWidth:void 0,autoHeight:void 0,autoPadding:void 0,compoundBoundsClean:!1,listeners:[],group:n,style:{},rstyle:{},styleCxts:[],styleKeys:{},removed:!0,selected:!!t.selected,selectable:void 0===t.selectable||!!t.selectable,locked:!!t.locked,grabbed:!1,grabbable:void 0===t.grabbable||!!t.grabbable,pannable:void 0===t.pannable?"edges"===n:!!t.pannable,active:!1,classes:new xre,animation:{current:[],queue:[]},rscratch:{},scratch:t.scratch||{},edges:[],children:[],parent:t.parent&&t.parent.isNode()?t.parent:null,traversalCache:{},backgrounding:!1,bbCache:null,bbCacheShift:{x:0,y:0},bodyBounds:null,overlayBounds:null,labelBounds:{all:null,source:null,target:null,main:null},arrowBounds:{source:null,target:null,"mid-source":null,"mid-target":null}},s=(null==a.position.x&&(a.position.x=0),null==a.position.y&&(a.position.y=0),t.renderedPosition&&(n=t.renderedPosition,i=e.pan(),e=e.zoom(),a.position={x:(n.x-i.x)/e,y:(n.y-i.y)/e}),[]);Eee(t.classes)?s=t.classes:kee(t.classes)&&(s=t.classes.split(/\s+/));for(var o=0,l=s.length;o<l;o++){var c=s[o];c&&""!==c&&a.classes.add(c)}this.createEmitter(),void 0!==r&&!r||this.restore(),(n=t.style||t.css)&&(sre("Setting a `style` bypass at element creation should be done only when absolutely necessary. Try to use the stylesheet instead."),this.style(n))}}else ire("An element must have a core reference and parameters set")},"Element"),(Pce={breadthFirstSearch:(Pce=mt(function(T){return T={bfs:T.bfs||!T.dfs,dfs:T.dfs||!T.bfs},mt(function(e,u,d){Cee(e)&&!Lee(e)&&(e=(t=e).roots||t.root,u=t.visit,d=t.directed),d=2!==arguments.length||Tee(u)?d:u,u=Tee(u)?u:function(){};for(var p,t=this._private.cy,r=e=kee(e)?this.filter(e):e,g=[],f=[],m={},y={},v={},x=0,e=this.byGroup(),b=e.nodes,w=e.edges,n=0;n<r.length;n++){var i=r[n],a=i.id();i.isNode()&&(g.unshift(i),T.bfs&&(v[a]=!0,f.push(i)),y[a]=0)}for(var s,o=mt(function(){var t=T.bfs?g.shift():g.pop(),e=t.id();if(T.dfs){if(v[e])return 0;v[e]=!0,f.push(t)}var r=y[e],n=m[e],i=null!=n?n.source():null,a=null!=n?n.target():null,a=null==n?void 0:(t.same(i)?a:i)[0];if(!0===(i=u(t,n,a,x++,r)))return p=t,1;if(!1===i)return 1;for(var s=t.connectedEdges().filter(function(e){return(!d||e.source().same(t))&&w.has(e)}),o=0;o<s.length;o++){var l=s[o],c=l.connectedNodes().filter(function(e){return!e.same(t)&&b.has(e)}),h=c.id();0===c.length||v[h]||(c=c[0],g.push(c),T.bfs&&(v[h]=!0,f.push(c)),m[h]=l,y[h]=y[e]+1)}},"_loop");0!==g.length&&(0===(s=o())||1!==s););for(var l=t.collection(),c=0;c<f.length;c++){var h=f[c],k=m[h.id()];null!=k&&l.push(k),l.push(h)}return{path:t.collection(l),found:t.collection(p)}},"searchFn")},"defineSearch"))({bfs:!0}),depthFirstSearch:Pce({dfs:!0})}).bfs=Pce.breadthFirstSearch,Pce.dfs=Pce.depthFirstSearch,kre=(wre={exports:{}}).exports,mt(EZ,"requireHeap$1"),mt(CZ,"requireHeap"),phe=CZ(),_re=oZ(phe),Sre=ahe({root:null,weight:mt(function(e){return 1},"weight"),directed:!1}),phe={dijkstra:mt(function(e){Cee(e)||(e={root:(t=arguments)[0],weight:t[1],directed:t[2]});var t=Sre(e),e=t.root,l=t.directed,a=this,c=t.weight,r=(kee(e)?this.filter(e):e)[0],n={},s={},i={},o=(t=this.byGroup()).nodes,h=t.edges;h.unmergeBy(function(e){return e.isLoop()});for(var u=mt(function(e){return n[e.id()]},"getDist"),d=mt(function(e,t){n[e.id()]=t,p.updateItem(e)},"setDist"),p=new _re(function(e,t){return u(e)-u(t)}),g=0;g<o.length;g++){var f=o[g];n[f.id()]=f.same(r)?0:1/0,p.push(f)}for(var m=mt(function(e,t){for(var r,n=(l?e.edgesTo(t):e.edgesWith(t)).intersect(h),i=1/0,a=0;a<n.length;a++){var s=n[a],o=c(s);(o<i||!r)&&(i=o,r=s)}return{edge:r,dist:i}},"distBetween");0<p.size();){var y=p.pop(),v=u(y),x=y.id();if((i[x]=v)!==1/0)for(var b=y.neighborhood().intersect(o),w=0;w<b.length;w++){var k=b[w],T=k.id(),E=m(y,k),C=v+E.dist;C<u(k)&&(d(k,C),s[T]={node:y,edge:E.edge})}}return{distanceTo:mt(function(e){return e=(kee(e)?o.filter(e):e)[0],i[e.id()]},"distanceTo"),pathTo:mt(function(e){var t=[],r=e=(kee(e)?o.filter(e):e)[0],n=r.id();if(0<e.length)for(t.unshift(e);s[n];){var i=s[n];t.unshift(i.edge),t.unshift(i.node),n=(r=i.node).id()}return a.spawn(t)},"pathTo")}},"dijkstra")},Bce={kruskal:mt(function(r){r=r||function(e){return 1};for(var e=(t=this.byGroup()).nodes,t=t.edges,n=e.length,i=new Array(n),a=e,s=mt(function(e){for(var t=0;t<i.length;t++)if(i[t].has(e))return t},"findSetIndex"),o=0;o<n;o++)i[o]=this.spawn(e[o]);for(var l=t.sort(function(e,t){return r(e)-r(t)}),c=0;c<l.length;c++){var h=l[c],u=h.source()[0],d=h.target()[0],u=s(u),d=s(d),p=i[u],g=i[d];u!==d&&(a.merge(h),p.merge(g),i.splice(d,1))}return a},"kruskal")},Are=ahe({root:null,goal:null,weight:mt(function(e){return 1},"weight"),heuristic:mt(function(e){return 0},"heuristic"),directed:!1}),Dce={aStar:mt(function(e){var t,r,n=this.cy(),i=(e=Are(e)).root,a=e.goal,s=e.heuristic,o=e.directed,l=e.weight,i=n.collection(i)[0],a=n.collection(a)[0],e=i.id(),c=a.id(),h={},u={},d={},p=new _re(function(e,t){return u[e.id()]-u[t.id()]}),g=new xre,f={},m={},y=mt(function(e,t){p.push(e),g.add(t)},"addToOpenSet"),v=mt(function(){t=p.pop(),r=t.id(),g.delete(r)},"popFromOpenSet"),x=mt(function(e){return g.has(e)},"isInOpenSet");y(i,e),h[e]=0,u[e]=s(i);for(var b=0;0<p.size();){if(v(),b++,r===c){for(var w=[],k=a,T=c,E=m[T];w.unshift(k),null!=E&&w.unshift(E),null!=(k=f[T]);)E=m[T=k.id()];return{found:!0,distance:h[r],path:this.spawn(w),steps:b}}d[r]=!0;for(var C=t._private.edges,_=0;_<C.length;_++){var S,A,L,N=C[_];!this.hasElementWithId(N.id())||o&&N.data("source")!==r||(S=N.source(),A=N.target(),A=(S=S.id()!==r?S:A).id(),this.hasElementWithId(A)&&!d[A]&&(L=h[r]+l(N),x(A)?L<h[A]&&(u[A]=(h[A]=L)+s(S),f[A]=t,m[A]=N):(u[A]=(h[A]=L)+s(S),y(S,A),f[A]=t,m[A]=N)))}}return{found:!1,distance:void 0,path:void 0,steps:b}},"aStar")},Lre=ahe({weight:mt(function(e){return 1},"weight"),directed:!1}),zle={floydWarshall:mt(function(e){for(var s=this.cy(),t=(e=Lre(e)).weight,r=e.directed,n=t,i=(e=this.byGroup()).nodes,a=e.edges,o=i.length,l=o*o,c=mt(function(e){return i.indexOf(e)},"indexOf"),h=mt(function(e){return i[e]},"atIndex"),u=new Array(l),d=0;d<l;d++){var p=d%o;u[d]=(d-p)/o==p?0:1/0}for(var g=new Array(l),f=new Array(l),m=0;m<a.length;m++){var y,v,x=a[m],b=x.source()[0],w=x.target()[0];b!==w&&(b=c(b),w=c(w),v=b*o+w,y=n(x),u[v]>y&&(u[v]=y,g[v]=w,f[v]=x),r||(v=w*o+b,!r&&u[v]>y&&(u[v]=y,g[v]=b,f[v]=x)))}for(var k=0;k<o;k++)for(var T=0;T<o;T++)for(var E=T*o+k,C=0;C<o;C++){var _=T*o+C,S=k*o+C;u[E]+u[S]<u[_]&&(u[_]=u[E]+u[S],g[_]=g[E])}var A=mt(function(e){return(kee(e)?s.filter(e):e)[0]},"getArgEle"),L=mt(function(e){return c(A(e))},"indexOfArgEle");return{distance:mt(function(e,t){return e=L(e),t=L(t),u[e*o+t]},"distance"),path:mt(function(e,t){var r=L(e),n=L(t),e=h(r);if(r===n)return e.collection();if(null==g[r*o+n])return s.collection();var i,a=s.collection();for(a.merge(e);r!==n;)r=g[(i=r)*o+n],i=f[i*o+r],a.merge(i),a.merge(h(r));return a},"path")}},"floydWarshall")},Nre=ahe({weight:mt(function(e){return 1},"weight"),directed:!1,root:null}),Ece={bellmanFord:mt(function(e){var P=this,t=(m=Nre(e)).weight,r=m.directed,s=m.root,n=t,o=this,i=this.cy(),a=(m=this.byGroup()).edges,l=m.nodes,c=l.length,h=new vre,u=!1,d=[],s=i.collection(s)[0];a.unmergeBy(function(e){return e.isLoop()});for(var p=a.length,g=mt(function(e){var t=h.get(e.id());return t||(t={},h.set(e.id(),t)),t},"getInfo"),f=mt(function(e){return(kee(e)?i.$(e):e)[0]},"getNodeFromTo"),t=mt(function(e){return g(f(e)).dist},"distanceTo"),m=mt(function(e){for(var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:s,r=[],n=f(e);;){if(null==n)return P.spawn();var i=(a=g(n)).edge,a=a.pred;if(r.unshift(n[0]),n.same(t)&&0<r.length)break;null!=i&&r.unshift(i),n=a}return o.spawn(r)},"pathTo"),y=0;y<c;y++){var v=l[y],x=g(v);v.same(s)?x.dist=0:x.dist=1/0,x.pred=null,x.edge=null}for(var b=!1,B=mt(function(e,t,r,n,i,a){(a=n.dist+a)<i.dist&&!r.same(n.edge)&&(i.dist=a,i.pred=e,i.edge=r,b=!0)},"checkForEdgeReplacement"),$=1;$<c;$++){for(var b=!1,w=0;w<p;w++){var k=a[w],T=k.source(),E=k.target(),F=n(k),z=g(T),G=g(E);B(T,E,k,z,G,F),r||B(E,T,k,G,z,F)}if(!b)break}if(b)for(var U=[],C=0;C<p;C++){var q=(_=a[C]).source(),j=_.target(),_=n(_),S=g(q).dist,A=g(j).dist;if(S+_<A||!r&&A+_<S){if(u||(sre("Graph contains a negative weight cycle for Bellman-Ford"),u=!0),!1===e.findNegativeWeightCycles)break;var L=[];S+_<A&&L.push(q),!r&&A+_<S&&L.push(j);for(var Y=L.length,N=0;N<Y;N++){var I=L[N],R=[I];R.push(g(I).edge);for(var M=g(I).pred;-1===R.indexOf(M);)R.push(M),R.push(g(M).edge),M=g(M).pred;for(var W=(R=R.slice(R.indexOf(M)))[0].id(),D=0,O=2;O<R.length;O+=2)R[O].id()<W&&(W=R[O].id(),D=O);(R=R.slice(D).concat(R.slice(0,D))).push(R[0]),I=R.map(function(e){return e.id()}).join(","),-1===U.indexOf(I)&&(d.push(o.spawn(R)),U.push(I))}}}return{distanceTo:t,pathTo:m,hasNegativeWeightCycle:u,negativeWeightCycles:d}},"bellmanFord")},Ire=Math.sqrt(2),Rre=mt(function(e,t,r){0===r.length&&ire("Karger-Stein must be run on a connected (sub)graph");for(var n=t[(e=r[e])[1]],i=t[e[2]],a=r,s=a.length-1;0<=s;s--){var o=(l=a[s])[1],l=l[2];(t[o]===n&&t[l]===i||t[o]===i&&t[l]===n)&&a.splice(s,1)}for(var c=0;c<a.length;c++){var h=a[c];h[1]===i?(a[c]=h.slice(),a[c][1]=n):h[2]===i&&(a[c]=h.slice(),a[c][2]=n)}for(var u=0;u<t.length;u++)t[u]===i&&(t[u]=n);return a},"collapse"),Mre=mt(function(e,t,r,n){for(;n<r;){var i=Math.floor(Math.random()*t.length);t=Rre(i,e,t),r--}return t},"contractUntil"),Ice={kargerStein:mt(function(){var r=this,e=this.byGroup(),t=e.nodes,n=e.edges,i=(n.unmergeBy(function(e){return e.isLoop()}),t.length),a=n.length,s=Math.ceil(Math.pow(Math.log(i)/Math.LN2,2)),o=Math.floor(i/Ire);if(!(i<2)){for(var l=[],c=0;c<a;c++){var h=n[c];l.push([c,t.indexOf(h.source()),t.indexOf(h.target())])}for(var u=1/0,d=[],p=new Array(i),g=new Array(i),f=new Array(i),m=mt(function(e,t){for(var r=0;r<i;r++)t[r]=e[r]},"copyNodesMap"),y=0;y<=s;y++){for(var v=0;v<i;v++)g[v]=v;var x=(b=Mre(g,l.slice(),i,o)).slice(),b=(m(g,f),Mre(g,b,o,2)),x=Mre(f,x,o,2);b.length<=x.length&&b.length<u?(u=b.length,d=b,m(g,p)):x.length<=b.length&&x.length<u&&(u=x.length,d=x,m(f,p))}for(var w=this.spawn(d.map(function(e){return n[e[0]]})),k=this.spawn(),T=this.spawn(),E=p[0],C=0;C<p.length;C++){var _=p[C],S=t[C];(_===E?k:T).merge(S)}return e=[(e=mt(function(e){var t=r.spawn();return e.forEach(function(e){t.merge(e),e.connectedEdges().forEach(function(e){r.contains(e)&&!w.contains(e)&&t.merge(e)})}),t},"constructComponent"))(k),e(T)],{cut:w,components:e,partition1:k,partition2:T}}ire("At least 2 nodes are required for Karger-Stein algorithm")},"kargerStein")},Dre=mt(function(e){return{x:e.x,y:e.y}},"copyPosition"),Ore=mt(function(e,t,r){return{x:e.x*t+r.x,y:e.y*t+r.y}},"modelToRenderedPosition"),Pre=mt(function(e,t,r){return{x:(e.x-r.x)/t,y:(e.y-r.y)/t}},"renderedToModelPosition"),Bre=mt(function(e){return{x:e[0],y:e[1]}},"array2point"),$re=mt(function(e){for(var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:0,r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:e.length,n=1/0,i=t;i<r;i++){var a=e[i];isFinite(a)&&(n=Math.min(a,n))}return n},"min"),Fre=mt(function(e){for(var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:0,r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:e.length,n=-1/0,i=t;i<r;i++){var a=e[i];isFinite(a)&&(n=Math.max(a,n))}return n},"max"),zre=mt(function(e){for(var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:0,r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:e.length,n=0,i=0,a=t;a<r;a++){var s=e[a];isFinite(s)&&(n+=s,i++)}return n/i},"mean"),Gre=mt(function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:0,r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:e.length,n=!(3<arguments.length&&void 0!==arguments[3])||arguments[3],i=!(4<arguments.length&&void 0!==arguments[4])||arguments[4],a=!(5<arguments.length&&void 0!==arguments[5])||arguments[5];n?e=e.slice(t,r):(r<e.length&&e.splice(r,e.length-r),0<t&&e.splice(0,t));for(var s=0,o=e.length-1;0<=o;o--){var l=e[o];a?isFinite(l)||(e[o]=-1/0,s++):e.splice(o,1)}return i&&e.sort(function(e,t){return e-t}),n=e.length,r=Math.floor(n/2),n%2!=0?e[r+1+s]:(e[r-1+s]+e[r+s])/2},"median"),Ure=mt(function(e){return Math.PI*e/180},"deg2rad"),qre=mt(function(e,t){return Math.atan2(t,e)-Math.PI/2},"getAngleFromDisp"),jre=Math.log2||function(e){return Math.log(e)/Math.log(2)},Yre=mt(function(e){return 0<e?1:e<0?-1:0},"signum"),Wre=mt(function(e,t){return Math.sqrt(Hre(e,t))},"dist"),Hre=mt(function(e,t){var r=t.x-e.x;return r*r+(t=t.y-e.y)*t},"sqdist"),Vre=mt(function(e){for(var t=e.length,r=0,n=0;n<t;n++)r+=e[n];for(var i=0;i<t;i++)e[i]=e[i]/r;return e},"inPlaceSumNormalize"),Xre=mt(function(e,t,r,n){return(1-n)*(1-n)*e+2*(1-n)*n*t+n*n*r},"qbezierAt"),Kre=mt(function(e,t,r,n){return{x:Xre(e.x,t.x,r.x,n),y:Xre(e.y,t.y,r.y,n)}},"qbezierPtAt"),Zre=mt(function(e,t,r,n){var i=t.x-e.x,a=t.y-e.y,t=Wre(e,t);return r=r??0,{x:e.x+i/t*(n=n??r*t),y:e.y+a/t*n}},"lineAt"),Qre=mt(function(e,t,r){return Math.max(e,Math.min(r,t))},"bound"),Jre=mt(function(e){return null==e?{x1:1/0,y1:1/0,x2:-1/0,y2:-1/0,w:0,h:0}:null!=e.x1&&null!=e.y1?null!=e.x2&&null!=e.y2&&e.x2>=e.x1&&e.y2>=e.y1?{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2,w:e.x2-e.x1,h:e.y2-e.y1}:null!=e.w&&null!=e.h&&0<=e.w&&0<=e.h?{x1:e.x1,y1:e.y1,x2:e.x1+e.w,y2:e.y1+e.h,w:e.w,h:e.h}:void 0:void 0},"makeBoundingBox"),ene=mt(function(e){return{x1:e.x1,x2:e.x2,w:e.w,y1:e.y1,y2:e.y2,h:e.h}},"copyBoundingBox"),tne=mt(function(e){e.x1=1/0,e.y1=1/0,e.x2=-1/0,e.y2=-1/0,e.w=0,e.h=0},"clearBoundingBox"),rne=mt(function(e,t){e.x1=Math.min(e.x1,t.x1),e.x2=Math.max(e.x2,t.x2),e.w=e.x2-e.x1,e.y1=Math.min(e.y1,t.y1),e.y2=Math.max(e.y2,t.y2),e.h=e.y2-e.y1},"updateBoundingBox"),nne=mt(function(e,t,r){e.x1=Math.min(e.x1,t),e.x2=Math.max(e.x2,t),e.w=e.x2-e.x1,e.y1=Math.min(e.y1,r),e.y2=Math.max(e.y2,r),e.h=e.y2-e.y1},"expandBoundingBoxByPoint"),ine=mt(function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:0;return e.x1-=t,e.x2+=t,e.y1-=t,e.y2+=t,e.w=e.x2-e.x1,e.h=e.y2-e.y1,e},"expandBoundingBox"),ane=mt(function(e){var t,r,n,i,a=1<arguments.length&&void 0!==arguments[1]?arguments[1]:[0];return 1===a.length?t=r=n=i=a[0]:2===a.length?(t=n=a[0],i=r=a[1]):4===a.length&&(t=(a=tZ(a,4))[0],r=a[1],n=a[2],i=a[3]),e.x1-=i,e.x2+=r,e.y1-=t,e.y2+=n,e.w=e.x2-e.x1,e.h=e.y2-e.y1,e},"expandBoundingBoxSides"),sne=mt(function(e,t){e.x1=t.x1,e.y1=t.y1,e.x2=t.x2,e.y2=t.y2,e.w=e.x2-e.x1,e.h=e.y2-e.y1},"assignBoundingBox"),one=mt(function(e,t){return!(e.x1>t.x2||t.x1>e.x2||e.x2<t.x1||t.x2<e.x1||e.y2<t.y1||t.y2<e.y1||e.y1>t.y2||t.y1>e.y2)},"boundingBoxesIntersect"),lne=mt(function(e,t,r){return e.x1<=t&&t<=e.x2&&e.y1<=r&&r<=e.y2},"inBoundingBox"),cne=mt(function(e,t){return lne(e,t.x,t.y)},"pointInBoundingBox"),hne=mt(function(e,t){return lne(e,t.x1,t.y1)&&lne(e,t.x2,t.y2)},"boundingBoxInBoundingBox"),une=null!=(Kce=Math.hypot)?Kce:function(e,t){return Math.sqrt(e*e+t*t)},mt(_Z,"inflatePolygon"),mt(SZ,"miterBox"),dne=mt(function(e,t,r,n,i,a,s){var o,l="auto"===(l=7<arguments.length&&void 0!==arguments[7]?arguments[7]:"auto")?Pne(i,a):l,i=i/2,a=a/2,c=(l=Math.min(l,i,a))!==i,h=l!==a;if(c){var u=n-a-s;if(0<(u=Ane(e,t,r,n,r-i+l-s,u,r+i-l+s,u,!1)).length)return u}return h&&0<(u=Ane(e,t,r,n,o=r+i+s,n-a+l-s,o,n+a-l+s,!1)).length||c&&0<(u=Ane(e,t,r,n,r-i+l-s,o=n+a+s,r+i-l+s,o,!1)).length||h&&0<(u=Ane(e,t,r,n,c=r-i-s,n-a+l-s,c,n+a-l+s,!1)).length?u:0<(c=_ne(e,t,r,n,o=r-i+l,h=n-a+l,l+s)).length&&c[0]<=o&&c[1]<=h||0<(c=_ne(e,t,r,n,u=r+i-l,o=n-a+l,l+s)).length&&c[0]>=u&&c[1]<=o||0<(c=_ne(e,t,r,n,h=r+i-l,u=n+a-l,l+s)).length&&c[0]>=h&&c[1]>=u||0<(c=_ne(e,t,r,n,o=r-i+l,h=n+a-l,l+s)).length&&c[0]<=o&&c[1]>=h?[c[0],c[1]]:[]},"roundRectangleIntersectLine"),pne=mt(function(e,t,r,n,i,a,s){var o=Math.min(r,i),r=Math.max(r,i),i=Math.min(n,a),n=Math.max(n,a);return o-s<=e&&e<=r+s&&i-s<=t&&t<=n+s},"inLineVicinity"),gne=mt(function(e,t,r,n,i,a,s,o,l){var c=Math.min(r,s,i)-l,r=Math.max(r,s,i)+l,s=Math.min(n,o,a)-l,i=Math.max(n,o,a)+l;return!(e<c||r<e||t<s||i<t)},"inBezierVicinity"),fne=mt(function(e,t,r,n){return(n=t*t-4*e*(r-=n))<0?[]:[(-t+(r=Math.sqrt(n)))/(n=2*e),(-t-r)/n]},"solveQuadratic"),mne=mt(function(e,t,r,n,i){var a,s,o;n=-27*(n/=e=0===e?1e-5:e)+(t/=e)*(9*(r/=e)-t*t*2),r=(e=(3*r-t*t)/9)*e*e+(n/=54)*n,t/=3,(i[1]=0)<r?(a=(a=n+Math.sqrt(r))<0?-Math.pow(-a,1/3):Math.pow(a,1/3),s=(s=n-Math.sqrt(r))<0?-Math.pow(-s,1/3):Math.pow(s,1/3),i[0]=-t+a+s,i[4]=i[2]=-(t+=(a+s)/2),t=Math.sqrt(3)*(-s+a)/2,i[3]=t,i[5]=-t):(i[5]=i[3]=0)==r?(o=n<0?-Math.pow(-n,1/3):Math.pow(n,1/3),i[0]=2*o-t,i[4]=i[2]=-(o+t)):(e=-e,s=Math.acos(n/Math.sqrt(e*e*e)),o=2*Math.sqrt(e),i[0]=-t+o*Math.cos(s/3),i[2]=-t+o*Math.cos((s+2*Math.PI)/3),i[4]=-t+o*Math.cos((s+4*Math.PI)/3))},"solveCubic"),yne=mt(function(e,t,r,n,i,a,s,o){var l=[];mne(+r*r-4*r*i+2*r*s+4*i*i-4*i*s+s*s+n*n-4*n*a+2*n*o+4*a*a-4*a*o+o*o,9*r*i-3*r*r-3*r*s-6*i*i+3*i*s+9*n*a-3*n*n-3*n*o-6*a*a+3*a*o,3*r*r-6*r*i+r*s-r*e+2*i*i+2*i*e-s*e+3*n*n-6*n*a+n*o-n*t+2*a*a+2*a*t-o*t,+r*i-r*r+r*e-i*e+n*a-n*n+n*t-a*t,l);for(var c=[],h=0;h<6;h+=2)Math.abs(l[h+1])<1e-7&&0<=l[h]&&l[h]<=1&&c.push(l[h]);c.push(1),c.push(0);for(var u,d,p=-1,g=0;g<c.length;g++)d=Math.pow(1-c[g],2)*r+2*(1-c[g])*c[g]*i+c[g]*c[g]*s,u=Math.pow(1-c[g],2)*n+2*(1-c[g])*c[g]*a+c[g]*c[g]*o,d=Math.pow(d-e,2)+Math.pow(u-t,2),0<=p&&!(d<p)||(p=d);return p},"sqdistToQuadraticBezier"),vne=mt(function(e,t,r,n,i,a){var s=[e-r,t-n],n=(r=[i-r,a-n])[0]*r[0]+r[1]*r[1],o=s[0]*s[0]+s[1]*s[1],r=(s=s[0]*r[0]+s[1]*r[1])*s/n;return s<0?o:n<r?(e-i)*(e-i)+(t-a)*(t-a):o-r},"sqdistToFiniteLine"),xne=mt(function(e,t,r){for(var n,i,a,s,o=0,l=0;l<r.length/2;l++)if(i=r[2*l+1],s=l+1<r.length/2?(a=r[2*(l+1)],r[2*(l+1)+1]):(a=r[2*(l+1-r.length/2)],r[2*(l+1-r.length/2)+1]),(n=r[2*l])!=e||a!=e){if(!(e<=n&&a<=e||n<=e&&e<=a))continue;t<(e-n)/(a-n)*(s-i)+i&&o++}return o%2!=0},"pointInsidePolygonPoints"),bne=mt(function(e,t,r,n,i,a,s,o,l){var c=new Array(r.length);null!=o[0]?(h=Math.atan(o[1]/o[0]),o[0]<0?h+=Math.PI/2:h=-h-Math.PI/2):h=o;for(var h,u=Math.cos(-h),d=Math.sin(-h),p=0;p<c.length/2;p++)c[2*p]=a/2*(r[2*p]*u-r[2*p+1]*d),c[2*p+1]=s/2*(r[2*p+1]*u+r[2*p]*d),c[2*p]+=n,c[2*p+1]+=i;return h=0<l?(o=Tne(c,-l),kne(o)):c,xne(e,t,h)},"pointInsidePolygon"),wne=mt(function(e,t,r,n,i,a,s,o){for(var l=new Array(2*r.length),c=0;c<o.length;c++){var h=o[c];if(l[4*c+0]=h.startX,l[4*c+1]=h.startY,l[4*c+2]=h.stopX,l[4*c+3]=h.stopY,Math.pow(h.cx-e,2)+Math.pow(h.cy-t,2)<=Math.pow(h.radius,2))return!0}return xne(e,t,l)},"pointInsideRoundPolygon"),kne=mt(function(e){for(var t,r,n,i=new Array(e.length/2),a=0;a<e.length/4;a++){var s=a<e.length/4-1?(t=e[4*(a+1)],r=e[4*(a+1)+1],n=e[4*(a+1)+2],e[4*(a+1)+3]):(t=e[0],r=e[1],n=e[2],e[3]),s=Ane(e[4*a],e[4*a+1],e[4*a+2],e[4*a+3],t,r,n,s,!0);i[2*a]=s[0],i[2*a+1]=s[1]}return i},"joinLines"),Tne=mt(function(e,t){for(var r,n=new Array(2*e.length),i=0;i<e.length/2;i++){var a,s,o,l=(o=i<e.length/2-1?(r=e[2*(i+1)],e[2*(i+1)+1]):(r=e[0],e[1]))-(s=e[2*i+1]),c=-(r-(a=e[2*i])),h=Math.sqrt(l*l+c*c),c=c/h;n[4*i]=a+(l/=h)*t,n[4*i+1]=s+c*t,n[4*i+2]=r+l*t,n[4*i+3]=o+c*t}return n},"expandPolygon"),Ene=mt(function(e,t,r,n,i,a){var s=r-e,o=n-t;return s/=i,o/=a,(a=(i=Math.sqrt(s*s+o*o))-1)<0?[]:[(r-e)*(s=a/i)+e,(n-t)*s+t]},"intersectLineEllipse"),Cne=mt(function(e,t,r,n,i,a,s){return(e=(e-i)/(r/2+s))*e+(t=(t-a)/(n/2+s))*t<=1},"checkInEllipse"),_ne=mt(function(e,t,r,n,i,a,s){return r=[r-e,n-t],n=[e-i,t-a],i=r[0]*r[0]+r[1]*r[1],(n=(a=2*(n[0]*r[0]+n[1]*r[1]))*a-4*i*(n[0]*n[0]+n[1]*n[1]-s*s))<0||(s=(-a+Math.sqrt(n))/(2*i),a=(-a-Math.sqrt(n))/(2*i),n=Math.min(s,a),i=Math.max(s,a),s=[],0<=n&&n<=1&&s.push(n),0<=i&&i<=1&&s.push(i),0===s.length)?[]:(a=s[0]*r[0]+e,n=s[0]*r[1]+t,1<s.length&&s[0]!=s[1]?[a,n,s[1]*r[0]+e,s[1]*r[1]+t]:[a,n])},"intersectLineCircle"),Sne=mt(function(e,t,r){return t<=e&&e<=r||r<=e&&e<=t?e:e<=t&&t<=r||r<=t&&t<=e?t:r},"midOfThree"),Ane=mt(function(e,t,r,n,i,a,s,o,l){var c=e-i,h=r-e,u=s-i,d=n-t,p=o-a,g=u*(f=t-a)-p*c,f=h*f-d*c;return 0!=(c=p*h-u*d)?(p=f/c,-.001<=(u=g/c)&&u<=1.001&&-.001<=p&&p<=1.001||l?[e+u*h,t+u*d]:[]):0==g||0==f?Sne(e,r,s)===s?[s,o]:Sne(e,r,i)===i?[i,a]:Sne(i,s,r)===r?[r,n]:[]:[]},"finiteLinesIntersect"),Lne=mt(function(e,t,r,n,i){var a=[],s=n/2,o=i/2,l=t,c=r;a.push({x:l+s*e[0],y:c+o*e[1]});for(var h=1;h<e.length/2;h++)a.push({x:l+s*e[2*h],y:c+o*e[2*h+1]});return a},"transformPoints"),Nne=mt(function(e,t,r,n,i,a,s,o){var l=[],c=new Array(r.length);if(null!=a){for(var h,u=0;u<c.length/2;u++)c[2*u]=r[2*u]*a+n,c[2*u+1]=r[2*u+1]*s+i;h=0<o?(o=Tne(c,-o),kne(o)):c}else h=r;for(var d,p,g,f,m=0;m<h.length/2;m++)d=h[2*m],p=h[2*m+1],f=m<h.length/2-1?(g=h[2*(m+1)],h[2*(m+1)+1]):(g=h[0],h[1]),0!==(d=Ane(e,t,n,i,d,p,g,f)).length&&l.push(d[0],d[1]);return l},"polygonIntersectLine"),Ine=mt(function(r,n,e,i,a,t,s,o,l){var c,h=[],u=new Array(2*e.length);l.forEach(function(e,t){0===t?(u[u.length-2]=e.startX,u[u.length-1]=e.startY):(u[4*t-2]=e.startX,u[4*t-1]=e.startY),u[4*t]=e.stopX,u[4*t+1]=e.stopY,0!==(c=_ne(r,n,i,a,e.cx,e.cy,e.radius)).length&&h.push(c[0],c[1])});for(var d=0;d<u.length/4;d++)0!==(c=Ane(r,n,i,a,u[4*d],u[4*d+1],u[4*d+2],u[4*d+3],!1)).length&&h.push(c[0],c[1]);if(2<h.length){for(var p=[h[0],h[1]],g=Math.pow(p[0]-r,2)+Math.pow(p[1]-n,2),f=1;f<h.length/2;f++){var m=Math.pow(h[2*f]-r,2)+Math.pow(h[2*f+1]-n,2);m<=g&&(p[0]=h[2*f],p[1]=h[2*f+1],g=m)}return p}return h},"roundPolygonIntersectLine"),Rne=mt(function(e,t,r){var e=[e[0]-t[0],e[1]-t[1]],n=Math.sqrt(e[0]*e[0]+e[1]*e[1]),r=(n-r)/n;return[t[0]+(r=r<0?1e-5:r)*e[0],t[1]+r*e[1]]},"shortenIntersection"),Mne=mt(function(e,t){return e=One(e,t),Dne(e)},"generateUnitNgonPointsFitToSquare"),Dne=mt(function(e){for(var t,r,n=e.length/2,i=1/0,a=1/0,s=-1/0,o=-1/0,l=0;l<n;l++)t=e[2*l],r=e[2*l+1],i=Math.min(i,t),s=Math.max(s,t),a=Math.min(a,r),o=Math.max(o,r);for(var c=2/(s-i),h=2/(o-a),u=0;u<n;u++)t=e[2*u]=e[2*u]*c,r=e[2*u+1]=e[2*u+1]*h,i=Math.min(i,t),s=Math.max(s,t),a=Math.min(a,r),o=Math.max(o,r);if(a<-1)for(var d=0;d<n;d++)r=e[2*d+1]=e[2*d+1]+(-1-a);return e},"fitPolygonToSquare"),One=mt(function(e,t){var r=1/e*2*Math.PI,n=e%2==0?Math.PI/2+r/2:Math.PI/2;n+=t;for(var i,a=new Array(2*e),s=0;s<e;s++)i=s*r+n,a[2*s]=Math.cos(i),a[2*s+1]=Math.sin(-i);return a},"generateUnitNgonPoints"),Pne=mt(function(e,t){return Math.min(e/4,t/4,8)},"getRoundRectangleRadius"),Bne=mt(function(e,t){return Math.min(e/10,t/10,8)},"getRoundPolygonRadius"),$ne=mt(function(){return 8},"getCutRectangleCornerLength"),Fne=mt(function(e,t,r){return[e-2*t+r,2*(t-e),e]},"bezierPtsToQuadCoeff"),zne=mt(function(e,t){return{heightOffset:Math.min(15,.05*t),widthOffset:Math.min(100,.25*e),ctrlPtOffsetPct:.05}},"getBarrelCurveConstants"),mt(AZ,"satPolygonIntersection"),Gne=ahe({dampingFactor:.8,precision:1e-6,iterations:200,weight:mt(function(e){return 1},"weight")}),Kce={pageRank:mt(function(e){for(var t=(e=Gne(e)).dampingFactor,r=e.precision,n=e.iterations,i=e.weight,a=this._private.cy,s=(e=this.byGroup()).nodes,o=e.edges,l=s.length,c=o.length,h=new Array(l*l),u=new Array(l),d=(1-t)/l,p=0;p<l;p++){for(var g=0;g<l;g++)h[p*l+g]=0;u[p]=0}for(var f=0;f<c;f++){var m=o[f],y=m.data("source"),v=m.data("target");y!==v&&(y=s.indexOfId(y),v=s.indexOfId(v),m=i(m),h[v*l+y]+=m,u[y]+=m)}for(var x=1/l+d,b=0;b<l;b++)if(0===u[b])for(var w=0;w<l;w++)h[w*l+b]=x;else for(var k=0;k<l;k++){var T=k*l+b;h[T]=h[T]/u[b]+d}for(var E=new Array(l),C=new Array(l),_=0;_<l;_++)E[_]=1;for(var S=0;S<n;S++){for(var A=0;A<l;A++)C[A]=0;for(var L=0;L<l;L++)for(var N=0;N<l;N++)C[L]+=h[L*l+N]*E[N];Vre(C);for(var I=E,E=C,C=I,R=0,M=0;M<l;M++){var D=I[M]-E[M];R+=D*D}if(R<r)break}return{rank:mt(function(e){return e=a.collection(e)[0],E[s.indexOf(e)]},"rank")}},"pageRank")},Une=ahe({root:null,weight:mt(function(e){return 1},"weight"),directed:!1,alpha:0}),(nhe={degreeCentralityNormalized:mt(function(e){e=Une(e);var t=this.cy(),r=this.nodes(),n=r.length;if(e.directed){for(var i={},a={},s=0,o=0,l=0;l<n;l++){var c=(h=r[l]).id(),h=(e.root=h,this.degreeCentrality(e));s<h.indegree&&(s=h.indegree),o<h.outdegree&&(o=h.outdegree),i[c]=h.indegree,a[c]=h.outdegree}return{indegree:mt(function(e){return 0==s?0:(kee(e)&&(e=t.filter(e)),i[e.id()]/s)},"indegree"),outdegree:mt(function(e){return 0===o?0:(kee(e)&&(e=t.filter(e)),a[e.id()]/o)},"outdegree")}}for(var u={},d=0,p=0;p<n;p++){var g=r[p],f=(e.root=g,this.degreeCentrality(e));d<f.degree&&(d=f.degree),u[g.id()]=f.degree}return{degree:mt(function(e){return 0===d?0:(kee(e)&&(e=t.filter(e)),u[e.id()]/d)},"degree")}},"degreeCentralityNormalized"),degreeCentrality:mt(function(e){e=Une(e);var t=this.cy(),r=this,n=e.root,i=e.weight,a=e.directed,e=e.alpha,n=t.collection(n)[0];if(a){for(var s=(t=n.connectedEdges()).filter(function(e){return e.target().same(n)&&r.has(e)}),o=t.filter(function(e){return e.source().same(n)&&r.has(e)}),a=s.length,t=o.length,l=0,c=0,h=0;h<s.length;h++)l+=i(s[h]);for(var u=0;u<o.length;u++)c+=i(o[u]);return{indegree:Math.pow(a,1-e)*Math.pow(l,e),outdegree:Math.pow(t,1-e)*Math.pow(c,e)}}for(var d=n.connectedEdges().intersection(r),a=d.length,p=0,g=0;g<d.length;g++)p+=i(d[g]);return{degree:Math.pow(a,1-e)*Math.pow(p,e)}},"degreeCentrality")}).dc=nhe.degreeCentrality,nhe.dcn=nhe.degreeCentralityNormalised=nhe.degreeCentralityNormalized,qne=ahe({harmonic:!0,weight:mt(function(){return 1},"weight"),directed:!1,root:null}),(J={closenessCentralityNormalized:mt(function(e){for(var t=(e=qne(e)).harmonic,r=e.weight,e=e.directed,n=this.cy(),i={},a=0,s=this.nodes(),o=this.floydWarshall({weight:r,directed:e}),l=0;l<s.length;l++){for(var c,h=0,u=s[l],d=0;d<s.length;d++)l!==d&&(c=o.distance(u,s[d]),h+=t?1/c:c);a<(h=t?h:1/h)&&(a=h),i[u.id()]=h}return{closeness:mt(function(e){return 0==a?0:(e=(kee(e)?n.filter(e)[0]:e).id(),i[e]/a)},"closeness")}},"closenessCentralityNormalized"),closenessCentrality:mt(function(e){for(var t=(e=qne(e)).root,r=e.weight,n=e.directed,i=e.harmonic,t=this.filter(t)[0],a=this.dijkstra({root:t,weight:r,directed:n}),s=0,o=this.nodes(),l=0;l<o.length;l++){var c=o[l];c.same(t)||(c=a.distanceTo(c),s+=i?1/c:c)}return i?s:1/s},"closenessCentrality")}).cc=J.closenessCentrality,J.ccn=J.closenessCentralityNormalised=J.closenessCentralityNormalized,jne=ahe({weight:null,directed:!1}),(pce={betweennessCentrality:mt(function(e){for(var t=(e=jne(e)).directed,b=e.weight,w=null!=b,k=this.cy(),T=this.nodes(),E={},r={},n=0,C={set:mt(function(e,t){n<(r[e]=t)&&(n=t)},"set"),get:mt(function(e){return r[e]},"get")},i=0;i<T.length;i++){var a=T[i],s=a.id();E[s]=(t?a.outgoers():a.openNeighborhood()).nodes(),C.set(s,0)}for(var o=mt(function(){for(var e=T[_].id(),t=[],r={},n={},i={},a=new _re(function(e,t){return i[e]-i[t]}),s=0;s<T.length;s++){var o=T[s].id();r[o]=[],i[o]=1/(n[o]=0)}for(n[e]=1,i[e]=0,a.push(e);!a.empty();){var l=a.pop();if(t.push(l),w)for(var c=0;c<E[l].length;c++){var h=E[l][c],u=(0<(d=k.getElementById(l)).edgesTo(h).length?d.edgesTo(h):h.edgesTo(d))[0],d=b(u),h=h.id();i[l]+d<i[h]&&(i[h]=i[l]+d,a.nodes.indexOf(h)<0?a.push(h):a.updateItem(h),n[h]=0,r[h]=[]),i[h]==i[l]+d&&(n[h]=n[h]+n[l],r[h].push(l))}else for(var p=0;p<E[l].length;p++){var g=E[l][p].id();i[g]==1/0&&(a.push(g),i[g]=i[l]+1),i[g]==i[l]+1&&(n[g]=n[g]+n[l],r[g].push(l))}}for(var f={},m=0;m<T.length;m++)f[T[m].id()]=0;for(;0<t.length;){for(var y=t.pop(),v=0;v<r[y].length;v++){var x=r[y][v];f[x]=f[x]+n[x]/n[y]*(1+f[y])}y!=T[_].id()&&C.set(y,C.get(y)+f[y])}},"_loop"),_=0;_<T.length;_++)o();return(e={betweenness:mt(function(e){return e=k.collection(e).id(),C.get(e)},"betweenness"),betweennessNormalized:mt(function(e){return 0==n?0:(e=k.collection(e).id(),C.get(e)/n)},"betweennessNormalized")}).betweennessNormalised=e.betweennessNormalized,e},"betweennessCentrality")}).bc=pce.betweennessCentrality,Yne=ahe({expandFactor:2,inflateFactor:2,multFactor:1,maxIterations:20,attributes:[function(e){return 1}]}),Wne=mt(function(e){return Yne(e)},"setOptions"),Hne=mt(function(e,t){for(var r=0,n=0;n<t.length;n++)r+=t[n](e);return r},"getSimilarity"),Vne=mt(function(e,t,r){for(var n=0;n<t;n++)e[n*t+n]=r},"addLoops"),Xne=mt(function(e,t){for(var r=0;r<t;r++){for(var n=0,i=0;i<t;i++)n+=e[i*t+r];for(var a=0;a<t;a++)e[a*t+r]=e[a*t+r]/n}},"normalize"),Kne=mt(function(e,t,r){for(var n=new Array(r*r),i=0;i<r;i++){for(var a=0;a<r;a++)n[i*r+a]=0;for(var s=0;s<r;s++)for(var o=0;o<r;o++)n[i*r+o]+=e[i*r+s]*t[s*r+o]}return n},"mmult"),Zne=mt(function(e,t,r){for(var n=e.slice(0),i=1;i<r;i++)e=Kne(e,n,t);return e},"expand"),Qne=mt(function(e,t,r){for(var n=new Array(t*t),i=0;i<t*t;i++)n[i]=Math.pow(e[i],r);return Xne(n,t),n},"inflate"),Jne=mt(function(e,t,r,n){for(var i=0;i<r;i++)if(Math.round(e[i]*Math.pow(10,n))/Math.pow(10,n)!=Math.round(t[i]*Math.pow(10,n))/Math.pow(10,n))return!1;return!0},"hasConverged"),eie=mt(function(e,t,r,n){for(var i=[],a=0;a<t;a++){for(var s=[],o=0;o<t;o++)0<Math.round(1e3*e[a*t+o])/1e3&&s.push(r[o]);0!==s.length&&i.push(n.collection(s))}return i},"assign"),tie=mt(function(e,t){for(var r=0;r<e.length;r++)if(!t[r]||e[r].id()!==t[r].id())return!1;return!0},"isDuplicate"),rie=mt(function(e){for(var t=0;t<e.length;t++)for(var r=0;r<e.length;r++)t!=r&&tie(e[t],e[r])&&e.splice(r,1);return e},"removeDuplicates"),Oce={markovClustering:Oce=mt(function(e){for(var t=this.nodes(),r=this.edges(),n=this.cy(),i=Wne(e),a={},s=0;s<t.length;s++)a[t[s].id()]=s;for(var o,l=t.length,c=l*l,h=new Array(c),u=0;u<c;u++)h[u]=0;for(var d=0;d<r.length;d++){var p=a[(f=r[d]).source().id()],g=a[f.target().id()],f=Hne(f,i.attributes);h[p*l+g]+=f,h[g*l+p]+=f}Vne(h,l,i.multFactor),Xne(h,l);for(var m=!0,y=0;m&&y<i.maxIterations;)m=!1,o=Zne(h,l,i.expandFactor),h=Qne(o,l,i.inflateFactor),Jne(h,o,c,4)||(m=!0),y++;return e=eie(h,l,t,n),rie(e)},"markovClustering"),mcl:Oce},nie=mt(function(e){return e},"identity"),iie=mt(function(e,t){return Math.abs(t-e)},"absDiff"),aie=mt(function(e,t,r){return e+iie(t,r)},"addAbsDiff"),sie=mt(function(e,t,r){return e+Math.pow(r-t,2)},"addSquaredDiff"),oie=mt(function(e){return Math.sqrt(e)},"sqrt"),lie=mt(function(e,t,r){return Math.max(e,iie(t,r))},"maxAbsDiff"),cie=mt(function(e,t,r,n,i){for(var a=5<arguments.length&&void 0!==arguments[5]?arguments[5]:nie,s=n,o=0;o<e;o++)s=i(s,t(o),r(o));return a(s)},"getDistance"),(hie={euclidean:mt(function(e,t,r){return 2<=e?cie(e,t,r,0,sie,oie):cie(e,t,r,0,aie)},"euclidean"),squaredEuclidean:mt(function(e,t,r){return cie(e,t,r,0,sie)},"squaredEuclidean"),manhattan:mt(function(e,t,r){return cie(e,t,r,0,aie)},"manhattan"),max:mt(function(e,t,r){return cie(e,t,r,-1/0,lie)},"max")})["squared-euclidean"]=hie.squaredEuclidean,hie.squaredeuclidean=hie.squaredEuclidean,mt(LZ,"clusteringDistance"),uie=ahe({k:2,m:2,sensitivityThreshold:1e-4,distance:"euclidean",maxIterations:10,attributes:[],testMode:!1,testCentroids:null}),die=mt(function(e){return uie(e)},"setOptions"),pie=mt(function(e,t,r,n,i){var i="kMedoids"!==i?function(e){return r[e]}:function(e){return n[e](r)},a=mt(function(e){return n[e](t)},"getQ");return LZ(e,n.length,i,a,r,t)},"getDist"),gie=mt(function(e,t,r){for(var n=r.length,i=new Array(n),a=new Array(n),s=new Array(t),o=null,l=0;l<n;l++)i[l]=e.min(r[l]).value,a[l]=e.max(r[l]).value;for(var c=0;c<t;c++){for(var o=[],h=0;h<n;h++)o[h]=Math.random()*(a[h]-i[h])+i[h];s[c]=o}return s},"randomCentroids"),fie=mt(function(e,t,r,n,i){for(var a=1/0,s=0,o=0;o<t.length;o++){var l=pie(r,e,t[o],n,i);l<a&&(a=l,s=o)}return s},"classify"),mie=mt(function(e,t,r){for(var n=[],i=null,a=0;a<t.length;a++)r[(i=t[a]).id()]===e&&n.push(i);return n},"buildCluster"),yie=mt(function(e,t,r){return Math.abs(t-e)<=r},"haveValuesConverged"),vie=mt(function(e,t,r){for(var n=0;n<e.length;n++)for(var i=0;i<e[n].length;i++)if(r<Math.abs(e[n][i]-t[n][i]))return!1;return!0},"haveMatricesConverged"),xie=mt(function(e,t,r){for(var n=0;n<r;n++)if(e===t[n])return!0;return!1},"seenBefore"),bie=mt(function(e,t){var r=new Array(t);if(e.length<50)for(var n=0;n<t;n++){for(var i=e[Math.floor(Math.random()*e.length)];xie(i,r,n);)i=e[Math.floor(Math.random()*e.length)];r[n]=i}else for(var a=0;a<t;a++)r[a]=e[Math.floor(Math.random()*e.length)];return r},"randomMedoids"),wie=mt(function(e,t,r){for(var n=0,i=0;i<t.length;i++)n+=pie("manhattan",t[i],e,r,"kMedoids");return n},"findCost"),Mce=mt(function(e){for(var t=this.cy(),r=this.nodes(),n=null,i=die(e),a=new Array(i.k),s={},o=i.testMode?"number"==typeof i.testCentroids?(i.testCentroids,gie(r,i.k,i.attributes)):"object"===aZ(i.testCentroids)?i.testCentroids:gie(r,i.k,i.attributes):gie(r,i.k,i.attributes),l=!0,c=0;l&&c<i.maxIterations;){for(var h=0;h<r.length;h++)s[(n=r[h]).id()]=fie(n,o,i.distance,i.attributes,"kMeans");for(var l=!1,u=0;u<i.k;u++){var d=mie(u,r,s);if(0!==d.length){for(var p=i.attributes.length,g=o[u],f=new Array(p),m=new Array(p),y=0;y<p;y++){for(var v=m[y]=0;v<d.length;v++)n=d[v],m[y]+=i.attributes[y](n);f[y]=m[y]/d.length,yie(f[y],g[y],i.sensitivityThreshold)||(l=!0)}o[u]=f,a[u]=t.collection(d)}}c++}return a},"kMeans"),Rce=mt(function(e){var t,r,n=this.cy(),i=this.nodes(),a=null,s=die(e),o=new Array(s.k),l={},c=new Array(s.k);s.testMode?"number"!=typeof s.testCentroids&&(t="object"===aZ(s.testCentroids)?s.testCentroids:bie(i,s.k)):t=bie(i,s.k);for(var h=!0,u=0;h&&u<s.maxIterations;){for(var d=0;d<i.length;d++)l[(a=i[d]).id()]=fie(a,t,s.distance,s.attributes,"kMedoids");for(var h=!1,p=0;p<t.length;p++){var g=mie(p,i,l);if(0!==g.length){c[p]=wie(t[p],g,s.attributes);for(var f=0;f<g.length;f++)(r=wie(g[f],g,s.attributes))<c[p]&&(c[p]=r,t[p]=g[f],h=!0);o[p]=n.collection(g)}}u++}return o},"kMedoids"),kie=mt(function(e,t,r,n,i){for(var a=0;a<t.length;a++)for(var s=0;s<e.length;s++)n[a][s]=Math.pow(r[a][s],i.m);for(var o=0;o<e.length;o++)for(var l=0;l<i.attributes.length;l++){for(var c=0,h=0,u=0;u<t.length;u++)c+=n[u][o]*i.attributes[l](t[u]),h+=n[u][o];e[o][l]=c/h}},"updateCentroids"),Tie=mt(function(e,t,r,n,i){for(var a=0;a<e.length;a++)t[a]=e[a].slice();for(var s,o,l=2/(i.m-1),c=0;c<r.length;c++)for(var h=0;h<n.length;h++){for(var u=0,d=0;d<r.length;d++)s=pie(i.distance,n[h],r[c],i.attributes,"cmeans"),o=pie(i.distance,n[h],r[d],i.attributes,"cmeans"),u+=Math.pow(s/o,l);e[h][c]=1/u}},"updateMembership"),Eie=mt(function(e,t,r,n){for(var i=new Array(r.k),a=0;a<i.length;a++)i[a]=[];for(var s=0;s<t.length;s++){for(var o=-1/0,l=-1,c=0;c<t[0].length;c++)t[s][c]>o&&(o=t[s][c],l=c);i[l].push(e[s])}for(var h=0;h<i.length;h++)i[h]=n.collection(i[h]);return i},"assign"),lhe=mt(function(e){for(var t=this.cy(),r=this.nodes(),n=die(e),i=new Array(r.length),a=0;a<r.length;a++)i[a]=new Array(n.k);for(var s=new Array(r.length),o=0;o<r.length;o++)s[o]=new Array(n.k);for(var l=0;l<r.length;l++){for(var c=0,h=0;h<n.k;h++)s[l][h]=Math.random(),c+=s[l][h];for(var u=0;u<n.k;u++)s[l][u]=s[l][u]/c}for(var d=new Array(n.k),p=0;p<n.k;p++)d[p]=new Array(n.attributes.length);for(var g=new Array(r.length),f=0;f<r.length;f++)g[f]=new Array(n.k);for(var m=!0,y=0;m&&y<n.maxIterations;)m=!1,kie(d,r,s,g,n),Tie(s,i,d,r,n),vie(s,i,n.sensitivityThreshold)||(m=!0),y++;return{clusters:Eie(r,s,n,t),degreeOfMembership:s}},"fuzzyCMeans"),Cie=ahe({distance:"euclidean",linkage:"min",mode:"threshold",threshold:1/0,addDendrogram:!(Mce={kMeans:Mce,kMedoids:Rce,fuzzyCMeans:lhe,fcm:lhe}),dendrogramDepth:0,attributes:[]}),_ie={single:"min",complete:"max"},Sie=mt(function(e){var e=Cie(e),t=_ie[e.linkage];return null!=t&&(e.linkage=t),e},"setOptions"),Aie=mt(function(e,t,r,n,i){for(var a,s=0,o=1/0,l=i.attributes,c=mt(function(t,r){return LZ(i.distance,l.length,function(e){return l[e](t)},function(e){return l[e](r)},t,r)},"getDist"),h=0;h<e.length;h++){var u=e[h].key,d=r[u][n[u]];d<o&&(s=u,o=d)}if("threshold"===i.mode&&o>=i.threshold||"dendrogram"===i.mode&&1===e.length)return!1;var p=t[s],g=t[n[s]],f="dendrogram"===i.mode?{left:p,right:g,key:p.key}:{value:p.value.concat(g.value),key:p.key};e[p.index]=f,e.splice(g.index,1),t[p.key]=f;for(var m=0;m<e.length;m++){var y=e[m];p.key===y.key?a=1/0:"min"===i.linkage?(a=r[p.key][y.key],r[p.key][y.key]>r[g.key][y.key]&&(a=r[g.key][y.key])):"max"===i.linkage?(a=r[p.key][y.key],r[p.key][y.key]<r[g.key][y.key]&&(a=r[g.key][y.key])):a="mean"===i.linkage?(r[p.key][y.key]*p.size+r[g.key][y.key]*g.size)/(p.size+g.size):"dendrogram"===i.mode?c(y.value,p.value):c(y.value[0],p.value[0]),r[p.key][y.key]=r[y.key][p.key]=a}for(var v=0;v<e.length;v++){var x=e[v].key;if(n[x]===p.key||n[x]===g.key){for(var b=x,w=0;w<e.length;w++){var k=e[w].key;r[x][k]<r[x][b]&&(b=k)}n[x]=b}e[v].index=v}return!(p.key=g.key=p.index=g.index=null)},"mergeClosest"),Lie=mt(function(e,t,r){e&&(e.value?t.push(e.value):(e.left&&Lie(e.left,t),e.right&&Lie(e.right,t)))},"getAllChildren"),Nie=mt(function(e,t){var r,n,i;return e?e.left&&e.right?(r=Nie(e.left,t),n=Nie(e.right,t),i=t.add({group:"nodes",data:{id:r+","+n}}),t.add({group:"edges",data:{source:r,target:i.id()}}),t.add({group:"edges",data:{source:n,target:i.id()}}),i.id()):e.value?e.value.id():void 0:""},"buildDendrogram"),Iie=mt(function(e,t,r){var n,i,a;return e?(n=[],i=[],0===t?(e.left&&Lie(e.left,n),e.right&&Lie(e.right,i),a=n.concat(i),[r.collection(a)]):1===t?e.value?[r.collection(e.value)]:(e.left&&Lie(e.left,n),e.right&&Lie(e.right,i),[r.collection(n),r.collection(i)]):e.value?[r.collection(e.value)]:(e.left&&(n=Iie(e.left,t-1,r)),e.right&&(i=Iie(e.right,t-1,r)),n.concat(i))):[]},"buildClustersFromTree"),Rce=mt(function(e){for(var r=this.cy(),t=this.nodes(),n=Sie(e),i=n.attributes,a=mt(function(t,r){return LZ(n.distance,i.length,function(e){return i[e](t)},function(e){return i[e](r)},t,r)},"getDist"),s=[],o=[],l=[],c=[],h=0;h<t.length;h++){var u={value:"dendrogram"===n.mode?t[h]:[t[h]],key:h,index:h};c[h]=s[h]=u,o[h]=[],l[h]=0}for(var d=0;d<s.length;d++)for(var p=0;p<=d;p++){var g="dendrogram"===n.mode?d===p?1/0:a(s[d].value,s[p].value):d===p?1/0:a(s[d].value[0],s[p].value[0]);o[d][p]=g,(o[p][d]=g)<o[d][l[d]]&&(l[d]=p)}for(var f,m=Aie(s,c,o,l,n);m;)m=Aie(s,c,o,l,n);return"dendrogram"===n.mode?(f=Iie(s[0],n.dendrogramDepth,r),n.addDendrogram&&Nie(s[0],r)):(f=new Array(s.length),s.forEach(function(e,t){e.key=e.index=null,f[t]=r.collection(e.value)})),f},"hierarchicalClustering"),lhe={hierarchicalClustering:Rce,hca:Rce},Rie=ahe({distance:"euclidean",preference:"median",damping:.8,maxIterations:1e3,minIterations:100,attributes:[]}),Mie=mt(function(e){var t=e.damping,r=e.preference;return.5<=t&&t<1||ire("Damping must range on [0.5, 1). Got: ".concat(t)),(t=["median","mean","min","max"]).some(function(e){return e===r})||he(r)||ire("Preference must be one of [".concat(t.map(function(e){return"'".concat(e,"'")}).join(", "),"] or a number. Got: ").concat(r)),Rie(e)},"setOptions"),Die=mt(function(e,t,r,n){var i=mt(function(e,t){return n[t](e)},"attr");return-LZ(e,n.length,function(e){return i(t,e)},function(e){return i(r,e)},t,r)},"getSimilarity"),Oie=mt(function(e,t){return"median"===t?Gre(e):"mean"===t?zre(e):"min"===t?$re(e):"max"===t?Fre(e):t},"getPreference"),Pie=mt(function(e,t,r){for(var n=[],i=0;i<e;i++)0<t[i*e+i]+r[i*e+i]&&n.push(i);return n},"findExemplars"),Bie=mt(function(e,t,r){for(var n=[],i=0;i<e;i++){for(var a=-1,s=-1/0,o=0;o<r.length;o++){var l=r[o];t[i*e+l]>s&&(s=t[i*e+(a=l)])}0<a&&n.push(a)}for(var c=0;c<r.length;c++)n[r[c]]=r[c];return n},"assignClusters"),$ie=mt(function(e,t,r){for(var n=Bie(e,t,r),i=0;i<r.length;i++){for(var a=[],s=0;s<n.length;s++)n[s]===r[i]&&a.push(s);for(var o=-1,l=-1/0,c=0;c<a.length;c++){for(var h=0,u=0;u<a.length;u++)h+=t[a[u]*e+a[c]];l<h&&(o=c,l=h)}r[i]=a[o]}return Bie(e,t,r)},"assign"),Rce=mt(function(P){for(var B=this.cy(),e=this.nodes(),t=Mie(P),$={},r=0;r<e.length;r++)$[e[r].id()]=r;for(var n,i=(n=e.length)*n,a=new Array(i),s=0;s<i;s++)a[s]=-1/0;for(var o=0;o<n;o++)for(var l=0;l<n;l++)o!==l&&(a[o*n+l]=Die(t.distance,e[o],e[l],t.attributes));for(var F=Oie(a,t.preference),c=0;c<n;c++)a[c*n+c]=F;for(var h=new Array(i),u=0;u<i;u++)h[u]=0;for(var d=new Array(i),p=0;p<i;p++)d[p]=0;for(var g=new Array(n),f=new Array(n),m=new Array(n),y=0;y<n;y++)g[y]=0,f[y]=0,m[y]=0;for(var v,x=new Array(n*t.minIterations),z=0;z<x.length;z++)x[z]=0;for(v=0;v<t.maxIterations;v++){for(var b=0;b<n;b++){for(var w,k=-1/0,T=-1/0,E=-1,C=0;C<n;C++)g[C]=h[b*n+C],k<=(w=d[b*n+C]+a[b*n+C])?(T=k,k=w,E=C):T<w&&(T=w);for(var _=0;_<n;_++)h[b*n+_]=(1-t.damping)*(a[b*n+_]-k)+t.damping*g[_];h[b*n+E]=(1-t.damping)*(a[b*n+E]-T)+t.damping*g[E]}for(var S=0;S<n;S++){for(var A=0,L=0;L<n;L++)g[L]=d[L*n+S],f[L]=Math.max(0,h[L*n+S]),A+=f[L];A-=f[S],f[S]=h[S*n+S],A+=f[S];for(var N=0;N<n;N++)d[N*n+S]=(1-t.damping)*Math.min(0,A-f[N])+t.damping*g[N];d[S*n+S]=(1-t.damping)*(A-f[S])+t.damping*g[S]}for(var G=0,I=0;I<n;I++){var U=0<d[I*n+I]+h[I*n+I]?1:0;G+=x[v%t.minIterations*n+I]=U}if(0<G&&(v>=t.minIterations-1||v==t.maxIterations-1)){for(var q=0,R=0;R<n;R++){for(var j=m[R]=0;j<t.minIterations;j++)m[R]+=x[j*n+R];0!==m[R]&&m[R]!==t.minIterations||q++}if(q===n)break}}for(var M=Pie(n,h,d),Y=$ie(n,a,M),W={},H=0;H<M.length;H++)W[M[H]]=[];for(var D=0;D<e.length;D++){var V=Y[$[e[D].id()]];null!=V&&W[V].push(e[D])}for(var X=new Array(M.length),O=0;O<M.length;O++)X[O]=B.collection(W[M[O]]);return X},"affinityPropagation"),Fie=ahe({root:void 0,directed:!(Rce={affinityPropagation:Rce,ap:Rce})}),kce={hierholzer:mt(function(e){Cee(e)||(e={root:(r=arguments)[0],directed:r[1]});var a,s,t,r=Fie(e),e=r.root,o=r.directed,l=!1,c=(e&&(t=(kee(e)?this.filter(e):e)[0].id()),{}),h={},n=(o?this.forEach(function(e){var t,r,n,i=e.id();e.isNode()?(r=e.indegree(!0),n=(t=e.outdegree(!0))-r,1==(r-=t)?a?l=!0:a=i:1==n?s?l=!0:s=i:(1<n||1<r)&&(l=!0),c[i]=[],e.outgoers().forEach(function(e){e.isEdge()&&c[i].push(e.id())})):h[i]=[void 0,e.target().id()]}):this.forEach(function(e){var t=e.id();e.isNode()?(e.degree(!0)%2&&(a?s?l=!0:s=t:a=t),c[t]=[],e.connectedEdges().forEach(function(e){return c[t].push(e.id())})):h[t]=[e.source().id(),e.target().id()]}),{found:!1,trail:void 0});if(!l){if(s&&a)if(o){if(t&&s!=t)return n;t=s}else{if(t&&s!=t&&a!=t)return n;t=t||s}else t=t||this[0].id();for(var i,u=mt(function(e){for(var t,r,n,i=e,a=[e];c[i].length;)t=c[i].shift(),r=h[t][0],i!=(n=h[t][1])?(c[n]=c[n].filter(function(e){return e!=t}),i=n):o||i==r||(c[r]=c[r].filter(function(e){return e!=t}),i=r),a.unshift(t),a.unshift(i);return a},"walk"),d=[],p=[],p=u(t);1!=p.length;)0==c[p[0]].length?(d.unshift(this.getElementById(p.shift())),d.unshift(this.getElementById(p.shift()))):p=u(p.shift()).concat(p);for(i in d.unshift(this.getElementById(p.shift())),c)if(c[i].length)return n;n.found=!0,n.trail=this.spawn(d,!0)}return n},"hierholzer")},ihe={hopcroftTarjanBiconnected:ihe=mt(function(){var s=this,o={},l=0,c=0,h=[],u=[],d={},p=mt(function(e,t){for(var r=u.length-1,n=[],i=s.spawn();u[r].x!=e||u[r].y!=t;)n.push(u.pop().edge),r--;n.push(u.pop().edge),n.forEach(function(e){var t=e.connectedNodes().intersection(s);i.merge(e),t.forEach(function(e){var t=e.id(),r=e.connectedEdges().intersection(s);i.merge(e),o[t].cutVertex?i.merge(r.filter(function(e){return e.isLoop()})):i.merge(r)})}),h.push(i)},"buildComponent"),g=mt(function(t,r,n){t===n&&(c+=1),o[r]={id:l,low:l++,cutVertex:!1};var i,a,e=s.getElementById(r).connectedEdges().intersection(s);0===e.size()?h.push(s.spawn(s.getElementById(r))):e.forEach(function(e){a=e.source().id(),i=e.target().id(),(i=a===r?i:a)!==n&&(a=e.id(),d[a]||(d[a]=!0,u.push({x:r,y:i,edge:e})),i in o?o[r].low=Math.min(o[r].low,o[i].id):(g(t,i,r),o[r].low=Math.min(o[r].low,o[i].low),o[r].id<=o[i].low&&(o[r].cutVertex=!0,p(r,i))))})},"biconnectedSearch"),e=(s.forEach(function(e){!e.isNode()||(e=e.id())in o||(c=0,g(e,e),o[e].cutVertex=1<c)}),Object.keys(o).filter(function(e){return o[e].cutVertex}).map(function(e){return s.getElementById(e)}));return{cut:s.spawn(e),components:h}},"hopcroftTarjanBiconnected"),htbc:ihe,htb:ihe,hopcroftTarjanBiconnectedComponents:ihe},Hce=mt(function(){var i=this,a={},s=0,o=[],l=[],c=i.spawn(i),h=mt(function(t){if(l.push(t),a[t]={index:s,low:s++,explored:!1},i.getElementById(t).connectedEdges().intersection(i).forEach(function(e){(e=e.target().id())!==t&&(e in a||h(e),a[e].explored||(a[t].low=Math.min(a[t].low,a[e].low)))}),a[t].index===a[t].low){for(var e=i.spawn();;){var r=l.pop();if(e.merge(i.getElementById(r)),a[r].low=a[t].index,a[r].explored=!0,r===t)break}var n=e.edgesWith(e),n=e.merge(n);o.push(n),c=c.difference(n)}},"stronglyConnectedSearch");return i.forEach(function(e){!e.isNode()||(e=e.id())in a||h(e)}),{cut:c,components:o}},"tarjanStronglyConnected"),zie={},[Pce,phe,Bce,Dce,zle,Ece,Ice,Kce,nhe,J,pce,Oce,Mce,lhe,Rce,kce,ihe,{tarjanStronglyConnected:Hce,tsc:Hce,tscc:Hce,tarjanStronglyConnectedComponents:Hce}].forEach(function(e){Xee(zie,e)}),(Gie=mt(function(e){if(!(this instanceof Gie))return new Gie(e);this.id="Thenable/1.0.7",this.state=0,this.fulfillValue=void 0,this.rejectReason=void 0,this.onFulfilled=[],this.onRejected=[],this.proxy={then:this.then.bind(this)},"function"==typeof e&&e.call(this,this.fulfill.bind(this),this.reject.bind(this))},"api")).prototype={fulfill:mt(function(e){return Uie(this,1,"fulfillValue",e)},"fulfill"),reject:mt(function(e){return Uie(this,2,"rejectReason",e)},"reject"),then:mt(function(e,t){var r=new Gie;return this.onFulfilled.push(Yie(e,r,"fulfill")),this.onRejected.push(Yie(t,r,"reject")),qie(this),r.proxy},"then")},Uie=mt(function(e,t,r,n){return 0===e.state&&(e.state=t,e[r]=n,qie(e)),e},"deliver"),qie=mt(function(e){1===e.state?jie(e,"onFulfilled",e.fulfillValue):2===e.state&&jie(e,"onRejected",e.rejectReason)},"execute"),jie=mt(function(e,t,r){var n;0!==e[t].length&&(n=e[t],e[t]=[],e=mt(function(){for(var e=0;e<n.length;e++)n[e](r)},"func"),"function"==typeof setImmediate?setImmediate(e):setTimeout(e,0))},"execute_handlers"),Yie=mt(function(r,n,i){return function(e){if("function"!=typeof r)n[i].call(n,e);else{var t;try{t=r(e)}catch(e){return void n.reject(e)}Wie(n,t)}}},"resolver"),Wie=mt(function(t,r){if(t===r||t.proxy===r)t.reject(new TypeError("cannot resolve promise with itself"));else{var e;if("object"===aZ(r)&&null!==r||"function"==typeof r)try{e=r.then}catch(e){return void t.reject(e)}if("function"==typeof e){var n=!1;try{e.call(r,function(e){n||(n=!0,e===r?t.reject(new TypeError("circular thenable chain")):Wie(t,e))},function(e){n||(n=!0,t.reject(e))})}catch(e){n||t.reject(e)}}else t.fulfill(r)}},"resolve"),Gie.all=function(o){return new Gie(function(r,n){for(var i=new Array(o.length),a=0,s=mt(function(e,t){i[e]=t,++a===o.length&&r(i)},"fulfill"),e=0;e<o.length;e++)(t=>{var e=o[t];null!=e&&null!=e.then?e.then(function(e){s(t,e)},function(e){n(e)}):s(t,e)})(e)})},Gie.resolve=function(r){return new Gie(function(e,t){e(r)})},Gie.reject=function(r){return new Gie(function(e,t){t(r)})},Hie=typeof Promise<"u"?Promise:Gie,Vie=mt(function(e,t,r){var n=Ree(e),i=!n;(t=this._private=Xee({duration:1e3},t,r)).target=e,t.style=t.style||t.css,t.started=!1,t.playing=!1,t.hooked=!1,t.applying=!1,t.progress=0,t.completes=[],t.frames=[],t.complete&&Tee(t.complete)&&t.completes.push(t.complete),i&&(r=e.position(),t.startPosition=t.startPosition||{x:r.x,y:r.y},t.startStyle=t.startStyle||e.cy().style().getAnimationStartStyle(e,t.style)),n&&(i=e.pan(),t.startPan={x:i.x,y:i.y},t.startZoom=e.zoom()),this.length=1,this[0]=this},"Animation"),Pce=Vie.prototype,Xee(Pce,{instanceString:mt(function(){return"animation"},"instanceString"),hook:mt(function(){var e,t=this._private;return t.hooked||(e=t.target._private.animation,(t.queue?e.queue:e.current).push(this),Lee(t.target)&&t.target.cy().addToAnimationPool(t.target),t.hooked=!0),this},"hook"),play:mt(function(){var e=this._private;return 1===e.progress&&(e.progress=0),e.playing=!0,e.started=!1,e.stopped=!1,this.hook(),this},"play"),playing:mt(function(){return this._private.playing},"playing"),apply:mt(function(){var e=this._private;return e.applying=!0,e.started=!1,e.stopped=!1,this.hook(),this},"apply"),applying:mt(function(){return this._private.applying},"applying"),pause:mt(function(){var e=this._private;return e.playing=!1,e.started=!1,this},"pause"),stop:mt(function(){var e=this._private;return e.playing=!1,e.started=!1,e.stopped=!0,this},"stop"),rewind:mt(function(){return this.progress(0)},"rewind"),fastforward:mt(function(){return this.progress(1)},"fastforward"),time:mt(function(e){var t=this._private;return void 0===e?t.progress*t.duration:this.progress(e/t.duration)},"time"),progress:mt(function(e){var t=this._private,r=t.playing;return void 0===e?t.progress:(r&&this.pause(),t.progress=e,t.started=!1,r&&this.play(),this)},"progress"),completed:mt(function(){return 1===this._private.progress},"completed"),reverse:mt(function(){var n=this._private,e=n.playing,t=(e&&this.pause(),n.progress=1-n.progress,n.started=!1,mt(function(e,t){var r=n[e];null!=r&&(n[e]=n[t],n[t]=r)},"swap"));if(t("zoom","startZoom"),t("pan","startPan"),t("position","startPosition"),n.style)for(var r=0;r<n.style.length;r++){var i=n.style[r],a=i.name,s=n.startStyle[a];n.startStyle[a]=i,n.style[r]=s}return e&&this.play(),this},"reverse"),promise:mt(function(e){var r,t=this._private;switch(e){case"frame":r=t.frames;break;default:case"complete":case"completed":r=t.completes}return new Hie(function(e,t){r.push(function(){e()})})},"promise")}),Pce.complete=Pce.completed,Pce.run=Pce.play,Pce.running=Pce.playing,phe={animated:mt(function(){return mt(function(){var e=void 0!==this.length?this:[this];return!!(this._private.cy||this).styleEnabled()&&((e=e[0])?0<e._private.animation.current.length:void 0)},"animatedImpl")},"animated"),clearQueue:mt(function(){return mt(function(){var e=void 0!==this.length?this:[this];if((this._private.cy||this).styleEnabled())for(var t=0;t<e.length;t++)e[t]._private.animation.queue=[];return this},"clearQueueImpl")},"clearQueue"),delay:mt(function(){return mt(function(e,t){return(this._private.cy||this).styleEnabled()?this.animate({delay:e,duration:e,complete:t}):this},"delayImpl")},"delay"),delayAnimation:mt(function(){return mt(function(e,t){return(this._private.cy||this).styleEnabled()?this.animation({delay:e,duration:e,complete:t}):this},"delayAnimationImpl")},"delayAnimation"),animation:mt(function(){return mt(function(e,t){var r=void 0!==this.length,n=r?this:[this],i=this._private.cy||this,a=!(r=!r);if(!i.styleEnabled())return this;var s=i.style();if(e=Xee({},e,t),!(t=0===Object.keys(e).length)){switch(void 0===e.duration&&(e.duration=400),e.duration){case"slow":e.duration=600;break;case"fast":e.duration=200}a&&(e.style=s.getPropsList(e.style||e.css),e.css=void 0),a&&null!=e.renderedPosition&&(t=e.renderedPosition,s=i.pan(),a=i.zoom(),e.position=Pre(t,a,s)),r&&null!=e.panBy&&(t=e.panBy,a=i.pan(),e.pan={x:a.x+t.x,y:a.y+t.y}),s=e.center||e.centre,r&&null!=s&&null!=(a=i.getCenterPan(s.eles,e.zoom))&&(e.pan=a),r&&null!=e.fit&&(t=e.fit,null!=(s=i.getFitViewport(t.eles||t.boundingBox,t.padding)))&&(e.pan=s.pan,e.zoom=s.zoom),r&&Cee(e.zoom)&&(null!=(a=i.getZoomedViewport(e.zoom))?(a.zoomed&&(e.zoom=a.zoom),a.panned&&(e.pan=a.pan)):e.zoom=null)}return new Vie(n[0],e)},"animationImpl")},"animation"),animate:mt(function(){return mt(function(e,t){var r=void 0!==this.length?this:[this];if((this._private.cy||this).styleEnabled()){t&&(e=Xee({},e,t));for(var n=0;n<r.length;n++){var i=r[n],a=i.animated()&&(void 0===e.queue||e.queue);i.animation(e,a?{queue:!0}:void 0).play()}}return this},"animateImpl")},"animate"),stop:mt(function(){return mt(function(e,t){var r=void 0!==this.length?this:[this],n=this._private.cy||this;if(n.styleEnabled()){for(var i=0;i<r.length;i++){for(var a=r[i]._private,s=a.animation.current,o=0;o<s.length;o++){var l=s[o]._private;t&&(l.duration=0)}e&&(a.animation.queue=[]),t||(a.animation.current=[])}n.notify("draw")}return this},"stopImpl")},"stop")},mt(NZ,"requireIsArray"),mt(IZ,"require_isKey"),mt(RZ,"requireIsFunction"),mt(MZ,"require_coreJsData"),mt(DZ,"require_isMasked"),mt(OZ,"require_toSource"),mt(PZ,"require_baseIsNative"),mt(BZ,"require_getValue"),mt($Z,"require_getNative"),mt(FZ,"require_nativeCreate"),mt(zZ,"require_hashClear"),mt(GZ,"require_hashDelete"),mt(UZ,"require_hashGet"),mt(qZ,"require_hashHas"),mt(jZ,"require_hashSet"),mt(YZ,"require_Hash"),mt(WZ,"require_listCacheClear"),mt(HZ,"requireEq"),mt(VZ,"require_assocIndexOf"),mt(XZ,"require_listCacheDelete"),mt(KZ,"require_listCacheGet"),mt(ZZ,"require_listCacheHas"),mt(QZ,"require_listCacheSet"),mt(JZ,"require_ListCache"),mt(eQ,"require_Map"),mt(tQ,"require_mapCacheClear"),mt(rQ,"require_isKeyable"),mt(nQ,"require_getMapData"),mt(iQ,"require_mapCacheDelete"),mt(aQ,"require_mapCacheGet"),mt(sQ,"require_mapCacheHas"),mt(oQ,"require_mapCacheSet"),mt(lQ,"require_MapCache"),mt(cQ,"requireMemoize"),mt(hQ,"require_memoizeCapped"),mt(uQ,"require_stringToPath"),mt(dQ,"require_arrayMap"),mt(pQ,"require_baseToString"),mt(gQ,"requireToString"),mt(fQ,"require_castPath"),mt(mQ,"require_toKey"),mt(yQ,"require_baseGet"),mt(vQ,"requireGet"),Bce=vQ(),Sse=oZ(Bce),mt(xQ,"require_defineProperty"),mt(bQ,"require_baseAssignValue"),mt(wQ,"require_assignValue"),mt(kQ,"require_isIndex"),mt(TQ,"require_baseSet"),mt(EQ,"requireSet"),Dce=EQ(),zse=oZ(Dce),mt(CQ,"require_copyArray"),mt(_Q,"requireToPath"),zle=_Q(),Yse=oZ(zle),Ece={data:mt(function(b){var e={field:"data",bindingEvent:"data",allowBinding:!1,allowSetting:!1,allowGetting:!1,settingEvent:"data",settingTriggersEvent:!1,triggerFnName:"trigger",immutableKeys:{},updateStyle:!1,beforeGet:mt(function(e){},"beforeGet"),beforeSet:mt(function(e,t){},"beforeSet"),onSet:mt(function(e){},"onSet"),canSet:mt(function(e){return!0},"canSet")};return b=Xee({},e,b),mt(function(e,t){var r,n=b,i=this,a=void 0!==i.length,s=a?i:[i],o=a?i[0]:i;if(kee(e)){var l,c=-1!==e.indexOf(".")&&Yse(e);if(n.allowGetting&&void 0===t)return o&&(n.beforeGet(o),l=c&&void 0===o._private[n.field][e]?Sse(o._private[n.field],c):o._private[n.field][e]),l;if(n.allowSetting&&void 0!==t&&!n.immutableKeys[e]){a=KK({},e,t),n.beforeSet(i,a);for(var h=0,u=s.length;h<u;h++){var d=s[h];n.canSet(d)&&(c&&void 0===o._private[n.field][e]?zse(d._private[n.field],c,t):d._private[n.field][e]=t)}n.updateStyle&&i.updateStyle(),n.onSet(i),n.settingTriggersEvent&&i[n.triggerFnName](n.settingEvent)}}else if(n.allowSetting&&Cee(e)){var p=e,g=Object.keys(p);n.beforeSet(i,p);for(var f=0;f<g.length;f++){var m,y=p[m=g[f]];if(!n.immutableKeys[m])for(var v=0;v<s.length;v++){var x=s[v];n.canSet(x)&&(x._private[n.field][m]=y)}}n.updateStyle&&i.updateStyle(),n.onSet(i),n.settingTriggersEvent&&i[n.triggerFnName](n.settingEvent)}else if(n.allowBinding&&Tee(e))i.on(n.bindingEvent,e);else if(n.allowGetting&&void 0===e)return o&&(n.beforeGet(o),r=o._private[n.field]),r;return i},"dataImpl")},"data"),removeData:mt(function(f){return f=Xee({},{field:"data",event:"data",triggerFnName:"trigger",triggerEvent:!1,immutableKeys:{}},f),mt(function(e){var t=f,r=void 0!==this.length?this:[this];if(kee(e)){for(var n=e.split(/\s+/),i=n.length,a=0;a<i;a++){var s=n[a];if(!Oee(s)&&!t.immutableKeys[s])for(var o=0,l=r.length;o<l;o++)r[o]._private[t.field][s]=void 0}t.triggerEvent&&this[t.triggerFnName](t.event)}else if(void 0===e){for(var c=0,h=r.length;c<h;c++)for(var u=r[c]._private[t.field],d=Object.keys(u),p=0;p<d.length;p++){var g=d[p];t.immutableKeys[g]||(u[g]=void 0)}t.triggerEvent&&this[t.triggerFnName](t.event)}return this},"removeDataImpl")},"removeData")},Ice={eventAliasesOn:mt(function(e){e.addListener=e.listen=e.bind=e.on,e.unlisten=e.unbind=e.off=e.removeListener,e.trigger=e.emit,e.pon=e.promiseOn=function(e,t){var i=this,a=Array.prototype.slice.call(arguments,0);return new Hie(function(t,e){var r=mt(function(e){i.off.apply(i,n),t(e)},"callback"),n=(r=a.concat([r])).concat([]);i.on.apply(i,r)})}},"eventAliasesOn")},Wse={},[phe,Ece,Ice].forEach(function(e){Xee(Wse,e)}),Kce={animate:Wse.animate(),animation:Wse.animation(),animated:Wse.animated(),clearQueue:Wse.clearQueue(),delay:Wse.delay(),delayAnimation:Wse.delayAnimation(),stop:Wse.stop()},(nhe={classes:mt(function(e){var t;if(void 0===e)return t=[],this[0]._private.classes.forEach(function(e){return t.push(e)}),t;Eee(e)||(e=(e||"").match(/\S+/g)||[]);for(var r=[],n=new xre(e),i=0;i<this.length;i++){for(var a=this[i],s=a._private,o=s.classes,l=!1,c=0;c<e.length;c++){var h=e[c];if(!o.has(h)){l=!0;break}}(l=l||o.size!==e.length)&&(s.classes=n,r.push(a))}return 0<r.length&&this.spawn(r).updateStyle().emit("class"),this},"classes"),addClass:mt(function(e){return this.toggleClass(e,!0)},"addClass"),hasClass:mt(function(e){var t=this[0];return null!=t&&t._private.classes.has(e)},"hasClass"),toggleClass:mt(function(e,t){Eee(e)||(e=e.match(/\S+/g)||[]);for(var r=void 0===t,n=[],i=0,a=this.length;i<a;i++)for(var s=this[i],o=s._private.classes,l=!1,c=0;c<e.length;c++){var h=e[c],u=o.has(h),d=!1;t||r&&!u?(o.add(h),d=!0):(!t||r&&u)&&(o.delete(h),d=!0),!l&&d&&(n.push(s),l=!0)}return 0<n.length&&this.spawn(n).updateStyle().emit("class"),this},"toggleClass"),removeClass:mt(function(e){return this.toggleClass(e,!1)},"removeClass"),flashClass:mt(function(e,t){var r=this;if(null==t)t=250;else if(0===t)return r;return r.addClass(e),setTimeout(function(){r.removeClass(e)},t),r},"flashClass")}).className=nhe.classNames=nhe.classes,(Hse={metaChar:"[\\!\\\"\\#\\$\\%\\&\\'\\(\\)\\*\\+\\,\\.\\/\\:\\;\\<\\=\\>\\?\\@\\[\\]\\^\\`\\{\\|\\}\\~]",comparatorOp:"=|\\!=|>|>=|<|<=|\\$=|\\^=|\\*=",boolOp:"\\?|\\!|\\^",string:`"(?:\\\\"|[^"])*"|'(?:\\\\'|[^'])*'`,number:Wee,meta:"degree|indegree|outdegree",separator:"\\s*,\\s*",descendant:"\\s+",child:"\\s+>\\s+",subject:"\\$",group:"node|edge|\\*",directedEdge:"\\s+->\\s+",undirectedEdge:"\\s+<->\\s+"}).variable="(?:[\\w-.]|(?:\\\\"+Hse.metaChar+"))+",Hse.className="(?:[\\w-]|(?:\\\\"+Hse.metaChar+"))+",Hse.value=Hse.string+"|"+Hse.number,Hse.id=Hse.variable;for(var t,r=Hse.comparatorOp.split("|"),i=0;i<r.length;i++)t=r[i],Hse.comparatorOp+="|@"+t;for(r=Hse.comparatorOp.split("|"),i=0;i<r.length;i++)0<=(t=r[i]).indexOf("!")||"="===t||(Hse.comparatorOp+="|\\!"+t);function o(e){return-e.tension*e.x-e.friction*e.v}function l(e,t,r){return{dx:(r={x:e.x+r.dx*t,v:e.v+r.dv*t,tension:e.tension,friction:e.friction}).v,dv:o(r)}}function h(e,t){var r=l(e,.5*t,s={dx:e.v,dv:o(e)}),n=l(e,.5*t,r),i=l(e,t,n),a=1/6*(s.dx+2*(r.dx+n.dx)+i.dx),s=1/6*(s.dv+2*(r.dv+n.dv)+i.dv);return e.x=e.x+a*t,e.v=e.v+s*t,e}Vse=mt(function(){return{checks:[]}},"newQuery"),Xse={GROUP:0,COLLECTION:1,FILTER:2,DATA_COMPARE:3,DATA_EXIST:4,DATA_BOOL:5,META_COMPARE:6,STATE:7,ID:8,CLASS:9,UNDIRECTED_EDGE:10,DIRECTED_EDGE:11,NODE_SOURCE:12,NODE_TARGET:13,NODE_NEIGHBOR:14,CHILD:15,DESCENDANT:16,PARENT:17,ANCESTOR:18,COMPOUND_SPLIT:19,TRUE:20},Kse=[{selector:":selected",matches:mt(function(e){return e.selected()},"matches")},{selector:":unselected",matches:mt(function(e){return!e.selected()},"matches")},{selector:":selectable",matches:mt(function(e){return e.selectable()},"matches")},{selector:":unselectable",matches:mt(function(e){return!e.selectable()},"matches")},{selector:":locked",matches:mt(function(e){return e.locked()},"matches")},{selector:":unlocked",matches:mt(function(e){return!e.locked()},"matches")},{selector:":visible",matches:mt(function(e){return e.visible()},"matches")},{selector:":hidden",matches:mt(function(e){return!e.visible()},"matches")},{selector:":transparent",matches:mt(function(e){return e.transparent()},"matches")},{selector:":grabbed",matches:mt(function(e){return e.grabbed()},"matches")},{selector:":free",matches:mt(function(e){return!e.grabbed()},"matches")},{selector:":removed",matches:mt(function(e){return e.removed()},"matches")},{selector:":inside",matches:mt(function(e){return!e.removed()},"matches")},{selector:":grabbable",matches:mt(function(e){return e.grabbable()},"matches")},{selector:":ungrabbable",matches:mt(function(e){return!e.grabbable()},"matches")},{selector:":animated",matches:mt(function(e){return e.animated()},"matches")},{selector:":unanimated",matches:mt(function(e){return!e.animated()},"matches")},{selector:":parent",matches:mt(function(e){return e.isParent()},"matches")},{selector:":childless",matches:mt(function(e){return e.isChildless()},"matches")},{selector:":child",matches:mt(function(e){return e.isChild()},"matches")},{selector:":orphan",matches:mt(function(e){return e.isOrphan()},"matches")},{selector:":nonorphan",matches:mt(function(e){return e.isChild()},"matches")},{selector:":compound",matches:mt(function(e){return e.isNode()?e.isParent():e.source().isParent()||e.target().isParent()},"matches")},{selector:":loop",matches:mt(function(e){return e.isLoop()},"matches")},{selector:":simple",matches:mt(function(e){return e.isSimple()},"matches")},{selector:":active",matches:mt(function(e){return e.active()},"matches")},{selector:":inactive",matches:mt(function(e){return!e.active()},"matches")},{selector:":backgrounding",matches:mt(function(e){return e.backgrounding()},"matches")},{selector:":nonbackgrounding",matches:mt(function(e){return!e.backgrounding()},"matches")}].sort(function(e,t){return Vee(e.selector,t.selector)}),Zse=(()=>{for(var e,t={},r=0;r<Kse.length;r++)t[(e=Kse[r]).selector]=e.matches;return t})(),Qse=mt(function(e,t){return Zse[e](t)},"stateSelectorMatches"),J="("+Kse.map(function(e){return e.selector}).join("|")+")",Jse=mt(function(e){return e.replace(new RegExp("\\\\("+Hse.metaChar+")","g"),function(e,t){return t})},"cleanMetaChars"),eoe=mt(function(e,t,r){e[e.length-1]=r},"replaceLastQuery"),(toe=[{name:"group",query:!0,regex:"("+Hse.group+")",populate:mt(function(e,t,r){r=tZ(r,1)[0],t.checks.push({type:Xse.GROUP,value:"*"===r?r:r+"s"})},"populate")},{name:"state",query:!0,regex:J,populate:mt(function(e,t,r){r=tZ(r,1)[0],t.checks.push({type:Xse.STATE,value:r})},"populate")},{name:"id",query:!0,regex:"\\#("+Hse.id+")",populate:mt(function(e,t,r){r=tZ(r,1)[0],t.checks.push({type:Xse.ID,value:Jse(r)})},"populate")},{name:"className",query:!0,regex:"\\.("+Hse.className+")",populate:mt(function(e,t,r){r=tZ(r,1)[0],t.checks.push({type:Xse.CLASS,value:Jse(r)})},"populate")},{name:"dataExists",query:!0,regex:"\\[\\s*("+Hse.variable+")\\s*\\]",populate:mt(function(e,t,r){r=tZ(r,1)[0],t.checks.push({type:Xse.DATA_EXIST,field:Jse(r)})},"populate")},{name:"dataCompare",query:!0,regex:"\\[\\s*("+Hse.variable+")\\s*("+Hse.comparatorOp+")\\s*("+Hse.value+")\\s*\\]",populate:mt(function(e,t,r){var n=(r=tZ(r,3))[0],i=r[1],r=r[2],r=null!=new RegExp("^"+Hse.string+"$").exec(r)?r.substring(1,r.length-1):parseFloat(r);t.checks.push({type:Xse.DATA_COMPARE,field:Jse(n),operator:i,value:r})},"populate")},{name:"dataBool",query:!0,regex:"\\[\\s*("+Hse.boolOp+")\\s*("+Hse.variable+")\\s*\\]",populate:mt(function(e,t,r){var n=(r=tZ(r,2))[0];t.checks.push({type:Xse.DATA_BOOL,field:Jse(r[1]),operator:n})},"populate")},{name:"metaCompare",query:!0,regex:"\\[\\[\\s*("+Hse.meta+")\\s*("+Hse.comparatorOp+")\\s*("+Hse.number+")\\s*\\]\\]",populate:mt(function(e,t,r){var n=(r=tZ(r,3))[0],i=r[1],r=r[2];t.checks.push({type:Xse.META_COMPARE,field:Jse(n),operator:i,value:parseFloat(r)})},"populate")},{name:"nextQuery",separator:!0,regex:Hse.separator,populate:mt(function(e,t){var r=e.currentSubject,n=e.edgeCount,i=e.compoundCount,a=e[e.length-1];return null!=r&&(a.subject=r,e.currentSubject=null),a.edgeCount=n,a.compoundCount=i,e.edgeCount=0,e.compoundCount=0,e[e.length++]=Vse()},"populate")},{name:"directedEdge",separator:!0,regex:Hse.directedEdge,populate:mt(function(e,t){var r,n,i;return null==e.currentSubject?(n=Vse(),r=t,i=Vse(),n.checks.push({type:Xse.DIRECTED_EDGE,source:r,target:i}),eoe(e,t,n)):(r=Vse(),n=t,i=Vse(),r.checks.push({type:Xse.NODE_SOURCE,source:n,target:i}),eoe(e,t,r)),e.edgeCount++,i},"populate")},{name:"undirectedEdge",separator:!0,regex:Hse.undirectedEdge,populate:mt(function(e,t){var r,n,i;return null==e.currentSubject?(n=Vse(),r=t,i=Vse(),n.checks.push({type:Xse.UNDIRECTED_EDGE,nodes:[r,i]}),eoe(e,t,n),e.edgeCount++):(r=Vse(),n=t,i=Vse(),r.checks.push({type:Xse.NODE_NEIGHBOR,node:n,neighbor:i}),eoe(e,t,r)),i},"populate")},{name:"child",separator:!0,regex:Hse.child,populate:mt(function(e,t){var r,n,i,a,s,o;return null==e.currentSubject?(o=Vse(),a=Vse(),r=e[e.length-1],o.checks.push({type:Xse.CHILD,parent:r,child:a}),eoe(e,t,o),e.compoundCount++,a):e.currentSubject===t?(r=Vse(),o=e[e.length-1],a=Vse(),n=Vse(),i=Vse(),s=Vse(),r.checks.push({type:Xse.COMPOUND_SPLIT,left:o,right:a,subject:n}),n.checks=t.checks,t.checks=[{type:Xse.TRUE}],s.checks.push({type:Xse.TRUE}),a.checks.push({type:Xse.PARENT,parent:s,child:i}),eoe(e,o,r),e.currentSubject=n,e.compoundCount++,i):(a=Vse(),s=Vse(),o=[{type:Xse.PARENT,parent:a,child:s}],a.checks=t.checks,t.checks=o,e.compoundCount++,s)},"populate")},{name:"descendant",separator:!0,regex:Hse.descendant,populate:mt(function(e,t){var r,n,i,a,s,o;return null==e.currentSubject?(o=Vse(),a=Vse(),r=e[e.length-1],o.checks.push({type:Xse.DESCENDANT,ancestor:r,descendant:a}),eoe(e,t,o),e.compoundCount++,a):e.currentSubject===t?(r=Vse(),o=e[e.length-1],a=Vse(),n=Vse(),i=Vse(),s=Vse(),r.checks.push({type:Xse.COMPOUND_SPLIT,left:o,right:a,subject:n}),n.checks=t.checks,t.checks=[{type:Xse.TRUE}],s.checks.push({type:Xse.TRUE}),a.checks.push({type:Xse.ANCESTOR,ancestor:s,descendant:i}),eoe(e,o,r),e.currentSubject=n,e.compoundCount++,i):(a=Vse(),s=Vse(),o=[{type:Xse.ANCESTOR,ancestor:a,descendant:s}],a.checks=t.checks,t.checks=o,e.compoundCount++,s)},"populate")},{name:"subject",modifier:!0,regex:Hse.subject,populate:mt(function(e,t){if(null!=e.currentSubject&&e.currentSubject!==t)return sre("Redefinition of subject in selector `"+e.toString()+"`"),!1;e.currentSubject=t,(e=null==(t=e[e.length-1].checks[0])?null:t.type)===Xse.DIRECTED_EDGE?t.type=Xse.NODE_TARGET:e===Xse.UNDIRECTED_EDGE&&(t.type=Xse.NODE_NEIGHBOR,t.node=t.nodes[1],t.neighbor=t.nodes[0],t.nodes=null)},"populate")}]).forEach(function(e){return e.regexObj=new RegExp("^"+e.regex)}),roe=mt(function(e){for(var t=0;t<toe.length;t++){var r=(o=toe[t]).name,n=e.match(o.regexObj);if(null!=n){var i=n,a=o,s=r,o=n[0];e=e.substring(o.length);break}}return{expr:a,match:i,name:s,remaining:e}},"consumeExpr"),noe=mt(function(e){var t=e.match(/^\s+/);return t&&(t=t[0],e=e.substring(t.length)),e},"consumeWhitespace"),pce=mt(function(e){var t=this,r=t.inputText=e,n=t[0]=Vse();for(t.length=1,r=noe(r);;){var i=roe(r);if(null==i.expr)return sre("The selector `"+e+"`is invalid"),!1;var a=i.match.slice(1);if(!1===(a=i.expr.populate(t,n,a)))return!1;if(null!=a&&(n=a),(r=i.remaining).match(/^\s*$/))break}var s=t[t.length-1];null!=t.currentSubject&&(s.subject=t.currentSubject),s.edgeCount=t.edgeCount,s.compoundCount=t.compoundCount;for(var o=0;o<t.length;o++){var l=t[o];if(0<l.compoundCount&&0<l.edgeCount)return sre("The selector `"+e+"` is invalid because it uses both a compound selector and an edge selector"),!1;if(1<l.edgeCount)return sre("The selector `"+e+"` is invalid because it uses multiple edge selectors"),!1;1===l.edgeCount&&sre("The selector `"+e+"` is deprecated. Edge selectors do not take effect on changes to source and target nodes after an edge is added, for performance reasons. Use a class or data selector on edges instead, updating the class or data of an edge when your app detects a change in source or target nodes.")}return!0},"parse"),Oce=mt(function(){if(null!=this.toStringCache)return this.toStringCache;for(var o=mt(function(e){return e??""},"clean"),l=mt(function(e){return kee(e)?'"'+e+'"':o(e)},"cleanVal"),c=mt(function(e){return" "+e+" "},"space"),a=mt(function(e,t){var r=e.type,n=e.value;switch(r){case Xse.GROUP:return(i=o(n)).substring(0,i.length-1);case Xse.DATA_COMPARE:return"["+e.field+c(o(e.operator))+l(n)+"]";case Xse.DATA_BOOL:var i=e.operator,a=e.field;return"["+o(i)+a+"]";case Xse.DATA_EXIST:return"["+e.field+"]";case Xse.META_COMPARE:return i=e.operator,"[["+e.field+c(o(i))+l(n)+"]]";case Xse.STATE:return n;case Xse.ID:return"#"+n;case Xse.CLASS:return"."+n;case Xse.PARENT:case Xse.CHILD:return h(e.parent,t)+c(">")+h(e.child,t);case Xse.ANCESTOR:case Xse.DESCENDANT:return h(e.ancestor,t)+" "+h(e.descendant,t);case Xse.COMPOUND_SPLIT:var a=h(e.left,t),i=h(e.subject,t),s=h(e.right,t);return a+(0<a.length?" ":"")+i+s;case Xse.TRUE:return""}},"checkToString"),h=mt(function(n,i){return n.checks.reduce(function(e,t,r){return e+(i===n&&0===r?"$":"")+a(t,i)},"")},"queryToString"),e="",t=0;t<this.length;t++){var r=this[t];e+=h(r,r.subject),1<this.length&&t<this.length-1&&(e+=", ")}return this.toStringCache=e},"toString"),Mce={parse:pce,toString:Oce},ioe=mt(function(e,t,r){var n,i,a,s=kee(e),o=he(e),l=kee(r),c=!1,h=!1,u=!1;switch(0<=t.indexOf("!")&&(t=t.replace("!",""),h=!0),0<=t.indexOf("@")&&(t=t.replace("@",""),c=!0),(s||l||c)&&(i=s||o?""+e:"",a=""+r),c&&(e=i=i.toLowerCase(),r=a=a.toLowerCase()),t){case"*=":n=0<=i.indexOf(a);break;case"$=":n=0<=i.indexOf(a,i.length-a.length);break;case"^=":n=0===i.indexOf(a);break;case"=":n=e===r;break;case">":u=!0,n=r<e;break;case">=":u=!0,n=r<=e;break;case"<":u=!0,n=e<r;break;case"<=":u=!0,n=e<=r;break;default:n=!1}return!h||null==e&&u?n:!n},"valCmp"),aoe=mt(function(e,t){switch(t){case"?":return!!e;case"!":return!e;case"^":return void 0===e}},"boolCmp"),soe=mt(function(e){return void 0!==e},"existCmp"),ooe=mt(function(e,t){return e.data(t)},"data"),loe=mt(function(e,t){return e[t]()},"meta"),coe=[],hoe=mt(function(e,t){return e.checks.every(function(e){return coe[e.type](e,t)})},"matches"),coe[Xse.GROUP]=function(e,t){return"*"===(e=e.value)||e===t.group()},coe[Xse.STATE]=function(e,t){return e=e.value,Qse(e,t)},coe[Xse.ID]=function(e,t){return e=e.value,t.id()===e},coe[Xse.CLASS]=function(e,t){return e=e.value,t.hasClass(e)},coe[Xse.META_COMPARE]=function(e,t){var r=e.field,n=e.operator,e=e.value;return ioe(loe(t,r),n,e)},coe[Xse.DATA_COMPARE]=function(e,t){var r=e.field,n=e.operator,e=e.value;return ioe(ooe(t,r),n,e)},coe[Xse.DATA_BOOL]=function(e,t){var r=e.field,e=e.operator;return aoe(ooe(t,r),e)},coe[Xse.DATA_EXIST]=function(e,t){return e=e.field,soe(ooe(t,e))},coe[Xse.UNDIRECTED_EDGE]=function(e,t){var r=e.nodes[0],e=e.nodes[1],n=t.source(),t=t.target();return hoe(r,n)&&hoe(e,t)||hoe(e,n)&&hoe(r,t)},coe[Xse.NODE_NEIGHBOR]=function(t,e){return hoe(t.node,e)&&e.neighborhood().some(function(e){return e.isNode()&&hoe(t.neighbor,e)})},coe[Xse.DIRECTED_EDGE]=function(e,t){return hoe(e.source,t.source())&&hoe(e.target,t.target())},coe[Xse.NODE_SOURCE]=function(t,e){return hoe(t.source,e)&&e.outgoers().some(function(e){return e.isNode()&&hoe(t.target,e)})},coe[Xse.NODE_TARGET]=function(t,e){return hoe(t.target,e)&&e.incomers().some(function(e){return e.isNode()&&hoe(t.source,e)})},coe[Xse.CHILD]=function(e,t){return hoe(e.child,t)&&hoe(e.parent,t.parent())},coe[Xse.PARENT]=function(t,e){return hoe(t.parent,e)&&e.children().some(function(e){return hoe(t.child,e)})},coe[Xse.DESCENDANT]=function(t,e){return hoe(t.descendant,e)&&e.ancestors().some(function(e){return hoe(t.ancestor,e)})},coe[Xse.ANCESTOR]=function(t,e){return hoe(t.ancestor,e)&&e.descendants().some(function(e){return hoe(t.descendant,e)})},coe[Xse.COMPOUND_SPLIT]=function(e,t){return hoe(e.subject,t)&&hoe(e.left,t)&&hoe(e.right,t)},coe[Xse.TRUE]=function(){return!0},coe[Xse.COLLECTION]=function(e,t){return e.value.has(t)},coe[Xse.FILTER]=function(e,t){return(0,e.value)(t)},lhe=mt(function(e){var t,n=this;return 1===n.length&&1===n[0].checks.length&&n[0].checks[0].type===Xse.ID?e.getElementById(n[0].checks[0].value).collection():(t=mt(function(e){for(var t=0;t<n.length;t++){var r=n[t];if(hoe(r,e))return!0}return!1},"selectorFunction"),null==n.text()&&(t=mt(function(){return!0},"selectorFunction")),e.filter(t))},"filter"),Rce=mt(function(e){for(var t=0;t<this.length;t++){var r=this[t];if(hoe(r,e))return!0}return!1},"matches"),kce={matches:Rce,filter:lhe},uoe=mt(function(e){this.inputText=e,this.currentSubject=null,this.compoundCount=0,this.edgeCount=0,this.length=0,null==e||kee(e)&&e.match(/^\s*$/)||(Lee(e)?this.addQuery({checks:[{type:Xse.COLLECTION,value:e.collection()}]}):Tee(e)?this.addQuery({checks:[{type:Xse.FILTER,value:e}]}):kee(e)?this.parse(e)||(this.invalid=!0):ire("A selector must be created from a string; found "))},"Selector"),doe=uoe.prototype,[Mce,kce].forEach(function(e){return Xee(doe,e)}),doe.text=function(){return this.inputText},doe.size=function(){return this.length},doe.eq=function(e){return this[e]},doe.sameText=function(e){return!this.invalid&&!e.invalid&&this.text()===e.text()},doe.addQuery=function(e){this[this.length++]=e},doe.selector=doe.toString,(ihe={allAre:mt(function(e){var t=new uoe(e);return this.every(function(e){return t.matches(e)})},"allAre"),is:mt(function(e){var t=new uoe(e);return this.some(function(e){return t.matches(e)})},"is"),some:mt(function(e,t){for(var r=0;r<this.length;r++)if(t?e.apply(t,[this[r],r,this]):e(this[r],r,this))return!0;return!1},"some"),every:mt(function(e,t){for(var r=0;r<this.length;r++)if(!(t?e.apply(t,[this[r],r,this]):e(this[r],r,this)))return!1;return!0},"every"),same:mt(function(t){if(this===t)return!0;t=this.cy().collection(t);var e=this.length;return e===t.length&&(1===e?this[0]===t[0]:this.every(function(e){return t.hasElementWithId(e.id())}))},"same"),anySame:mt(function(t){return t=this.cy().collection(t),this.some(function(e){return t.hasElementWithId(e.id())})},"anySame"),allAreNeighbors:mt(function(e){e=this.cy().collection(e);var t=this.neighborhood();return e.every(function(e){return t.hasElementWithId(e.id())})},"allAreNeighbors"),contains:mt(function(e){e=this.cy().collection(e);var t=this;return e.every(function(e){return t.hasElementWithId(e.id())})},"contains")}).allAreNeighbours=ihe.allAreNeighbors,ihe.has=ihe.contains,ihe.equal=ihe.equals=ihe.same,Hce=mt(function(s,o){return mt(function(e,t,r,n){var i,a=e;return null==a?i="":Lee(a)&&1===a.length&&(i=a.id()),1===this.length&&i?(a=(a=(a=this[0]._private).traversalCache=a.traversalCache||{})[o]=a[o]||[])[i=Wte(i)]||(a[i]=s.call(this,e,t,r,n)):s.call(this,e,t,r,n)},"traversalCache")},"cache"),Pce={parent:mt(function(e){var t=[];if(1===this.length){var r=this[0]._private.parent;if(r)return r}for(var n=0;n<this.length;n++){var i=this[n]._private.parent;i&&t.push(i)}return this.spawn(t,!0).filter(e)},"parent"),parents:mt(function(e){for(var t=[],r=this.parent();r.nonempty();){for(var n=0;n<r.length;n++){var i=r[n];t.push(i)}r=r.parent()}return this.spawn(t,!0).filter(e)},"parents"),commonAncestors:mt(function(e){for(var t=0;t<this.length;t++)var r=this[t].parents(),n=(n=n||r).intersect(r);return n.filter(e)},"commonAncestors"),orphans:mt(function(e){return this.stdFilter(function(e){return e.isOrphan()}).filter(e)},"orphans"),nonorphans:mt(function(e){return this.stdFilter(function(e){return e.isChild()}).filter(e)},"nonorphans"),children:Hce(function(e){for(var t=[],r=0;r<this.length;r++)for(var n=this[r]._private.children,i=0;i<n.length;i++)t.push(n[i]);return this.spawn(t,!0).filter(e)},"children"),siblings:mt(function(e){return this.parent().children().not(this).filter(e)},"siblings"),isParent:mt(function(){var e=this[0];if(e)return e.isNode()&&0!==e._private.children.length},"isParent"),isChildless:mt(function(){var e=this[0];if(e)return e.isNode()&&0===e._private.children.length},"isChildless"),isChild:mt(function(){var e=this[0];if(e)return e.isNode()&&null!=e._private.parent},"isChild"),isOrphan:mt(function(){var e=this[0];if(e)return e.isNode()&&null==e._private.parent},"isOrphan"),descendants:mt(function(e){var n=[];function i(e){for(var t=0;t<e.length;t++){var r=e[t];n.push(r),r.children().nonempty()&&i(r.children())}}return mt(i,"add"),i(this.children()),this.spawn(n,!0).filter(e)},"descendants")},mt(SQ,"forEachCompound"),mt(AQ,"addChildren"),Pce.forEachDown=function(e){return SQ(this,e,!(1<arguments.length&&void 0!==arguments[1])||arguments[1],AQ)},mt(LQ,"addParent"),Pce.forEachUp=function(e){return SQ(this,e,!(1<arguments.length&&void 0!==arguments[1])||arguments[1],LQ)},mt(NQ,"addParentAndChildren"),Pce.forEachUpAndDown=function(e){return SQ(this,e,!(1<arguments.length&&void 0!==arguments[1])||arguments[1],NQ)},Pce.ancestors=Pce.parents,(Dce=Bce={data:Wse.data({field:"data",bindingEvent:"data",allowBinding:!0,allowSetting:!0,settingEvent:"data",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,immutableKeys:{id:!0,source:!0,target:!0,parent:!0},updateStyle:!0}),removeData:Wse.removeData({field:"data",event:"data",triggerFnName:"trigger",triggerEvent:!0,immutableKeys:{id:!0,source:!0,target:!0,parent:!0},updateStyle:!0}),scratch:Wse.data({field:"scratch",bindingEvent:"scratch",allowBinding:!0,allowSetting:!0,settingEvent:"scratch",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeScratch:Wse.removeData({field:"scratch",event:"scratch",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0}),rscratch:Wse.data({field:"rscratch",allowBinding:!1,allowSetting:!0,settingTriggersEvent:!1,allowGetting:!0}),removeRscratch:Wse.removeData({field:"rscratch",triggerEvent:!1}),id:mt(function(){var e=this[0];if(e)return e._private.data.id},"id")}).attr=Dce.data,Dce.removeAttr=Dce.removeData,zle=Bce,phe={},mt(IQ,"defineDegreeFunction"),Xee(phe,{degree:IQ(function(e,t){return t.source().same(t.target())?2:1}),indegree:IQ(function(e,t){return t.target().same(e)?1:0}),outdegree:IQ(function(e,t){return t.source().same(e)?1:0})}),mt(RQ,"defineDegreeBoundsFunction"),Xee(phe,{minDegree:RQ("degree",function(e,t){return e<t}),maxDegree:RQ("degree",function(e,t){return t<e}),minIndegree:RQ("indegree",function(e,t){return e<t}),maxIndegree:RQ("indegree",function(e,t){return t<e}),minOutdegree:RQ("outdegree",function(e,t){return e<t}),maxOutdegree:RQ("outdegree",function(e,t){return t<e})}),Xee(phe,{totalDegree:mt(function(e){for(var t=0,r=this.nodes(),n=0;n<r.length;n++)t+=r[n].degree(e);return t},"totalDegree")}),poe=mt(function(e,t,r){for(var n=0;n<e.length;n++){var i,a=e[n];a.locked()||(i=a._private.position,i={x:null!=t.x?t.x-i.x:0,y:null!=t.y?t.y-i.y:0},!a.isParent()||0===i.x&&0===i.y||a.children().shift(i,r),a.dirtyBoundingBoxCache())}},"beforePositionSet"),Ece={field:"position",bindingEvent:"position",allowBinding:!0,allowSetting:!0,settingEvent:"position",settingTriggersEvent:!0,triggerFnName:"emitAndNotify",allowGetting:!0,validKeys:["x","y"],beforeGet:mt(function(e){e.updateCompoundBounds()},"beforeGet"),beforeSet:mt(function(e,t){poe(e,t,!1)},"beforeSet"),onSet:mt(function(e){e.dirtyCompoundBoundsCache()},"onSet"),canSet:mt(function(e){return!e.locked()},"canSet")},(J=Ice={position:Wse.data(Ece),silentPosition:Wse.data(Xee({},Ece,{allowBinding:!1,allowSetting:!0,settingTriggersEvent:!1,allowGetting:!1,beforeSet:mt(function(e,t){poe(e,t,!0)},"beforeSet"),onSet:mt(function(e){e.dirtyCompoundBoundsCache()},"onSet")})),positions:mt(function(e,t){if(Cee(e))t?this.silentPosition(e):this.position(e);else if(Tee(e)){var r=e;(e=this.cy()).startBatch();for(var n=0;n<this.length;n++){var i,a=this[n];(i=r(a,n))&&(t?a.silentPosition(i):a.position(i))}e.endBatch()}return this},"positions"),silentPositions:mt(function(e){return this.positions(e,!0)},"silentPositions"),shift:mt(function(e,t,r){var n;if(Cee(e)?(n={x:he(e.x)?e.x:0,y:he(e.y)?e.y:0},r=t):kee(e)&&he(t)&&((n={x:0,y:0})[e]=t),null!=n){var i=this.cy();i.startBatch();for(var a=0;a<this.length;a++){var s,o=this[a];i.hasCompoundNodes()&&o.isChild()&&o.ancestors().anySame(this)||(s={x:(s=o.position()).x+n.x,y:s.y+n.y},r?o.silentPosition(s):o.position(s))}i.endBatch()}return this},"shift"),silentShift:mt(function(e,t){return Cee(e)?this.shift(e,!0):kee(e)&&he(t)&&this.shift(e,t,!0),this},"silentShift"),renderedPosition:mt(function(e,t){var r=this[0],n=(s=this.cy()).zoom(),i=s.pan(),a=Cee(e)?e:void 0,s=void 0!==a||void 0!==t&&kee(e);if(r&&r.isNode()){if(!s)return r=r.position(),a=Ore(r,n,i),void 0===e?a:a[e];for(var o=0;o<this.length;o++){var l=this[o];void 0!==t?l.position(e,(t-i[e])/n):void 0!==a&&l.position(Pre(a,n,i))}}else if(!s)return;return this},"renderedPosition"),relativePosition:mt(function(e,t){var r,n=this[0],i=this.cy(),a=Cee(e)?e:void 0,s=void 0!==a||void 0!==t&&kee(e),o=i.hasCompoundNodes();if(n&&n.isNode()){if(!s)return i=n.position(),(r=(n=o?n.parent():null)&&0<n.length)&&(n=n[0]),r=r?n.position():{x:0,y:0},a={x:i.x-r.x,y:i.y-r.y},void 0===e?a:a[e];for(var l=0;l<this.length;l++){var c=this[l],h=o?c.parent():null,u=((u=h&&0<h.length)&&(h=h[0]),u?h.position():{x:0,y:0});void 0!==t?c.position(e,t+u[e]):void 0!==a&&c.position({x:a.x+u.x,y:a.y+u.y})}}else if(!s)return;return this},"relativePosition")}).modelPosition=J.point=J.position,J.modelPositions=J.points=J.positions,J.renderedPoint=J.renderedPosition,J.relativePoint=J.relativePosition,pce=Ice,Rce=Oce={renderedBoundingBox:function(e){var e=this.boundingBox(e),t=(r=this.cy()).zoom(),r=r.pan(),n=e.x1*t+r.x,i=e.x2*t+r.x,a=e.y1*t+r.y;return{x1:n,x2:i,y1:a,y2:e=e.y2*t+r.y,w:i-n,h:e-a}},dirtyCompoundBoundsCache:function(){var r=0<arguments.length&&void 0!==arguments[0]&&arguments[0],e=this.cy();return e.styleEnabled()&&e.hasCompoundNodes()&&this.forEachUp(function(e){var t;e.isParent()&&((t=e._private).compoundBoundsClean=!1,t.bbCache=null,r||e.emitAndNotify("bounds"))}),this},updateCompoundBounds:function(){var e=0<arguments.length&&void 0!==arguments[0]&&arguments[0],t=this.cy();if(t.styleEnabled()&&t.hasCompoundNodes()&&(e||!t.batching())){mt(a,"update");for(var r=0;r<this.length;r++){var n=this[r],i=n._private;i.compoundBoundsClean&&!e||(a(n),t.batching())||(i.compoundBoundsClean=!0)}}return this;function a(e){var t,r,n,i,a,s,o,l;function c(e,t,r){var n=0,i=0,a=t+r;return 0<e&&0<a&&(n=t/a*e,i=r/a*e),{biasDiff:n,biasComplementDiff:i}}function h(e,t,r,n){if("%"!==r.units)return"px"===r.units?r.pfValue:0;switch(n){case"width":return 0<e?r.pfValue*e:0;case"height":return 0<t?r.pfValue*t:0;case"average":return 0<e&&0<t?r.pfValue*(e+t)/2:0;case"min":return 0<e&&0<t?t<e?r.pfValue*t:r.pfValue*e:0;case"max":return 0<e&&0<t?t<e?r.pfValue*e:r.pfValue*t:0;default:return 0}}e.isParent()&&(t=e._private,n=e.children(),i="include"===e.pstyle("compound-sizing-wrt-labels").value,r={width:{val:e.pstyle("min-width").pfValue,left:e.pstyle("min-width-bias-left"),right:e.pstyle("min-width-bias-right")},height:{val:e.pstyle("min-height").pfValue,top:e.pstyle("min-height-bias-top"),bottom:e.pstyle("min-height-bias-bottom")}},n=n.boundingBox({includeLabels:i,includeOverlays:!1,useCache:!1}),i=t.position,0!==n.w&&0!==n.h||((n={w:e.pstyle("width").pfValue,h:e.pstyle("height").pfValue}).x1=i.x-n.w/2,n.x2=i.x+n.w/2,n.y1=i.y-n.h/2,n.y2=i.y+n.h/2),mt(c,"computeBiasValues"),mt(h,"computePaddingValues"),s=r.width.left.value,"px"===r.width.left.units&&0<r.width.val&&(s=100*s/r.width.val),a=r.width.right.value,"px"===r.width.right.units&&0<r.width.val&&(a=100*a/r.width.val),l=r.height.top.value,"px"===r.height.top.units&&0<r.height.val&&(l=100*l/r.height.val),o=r.height.bottom.value,"px"===r.height.bottom.units&&0<r.height.val&&(o=100*o/r.height.val),a=(s=c(r.width.val-n.w,s,a)).biasDiff,s=s.biasComplementDiff,o=(l=c(r.height.val-n.h,l,o)).biasDiff,l=l.biasComplementDiff,t.autoPadding=h(n.w,n.h,e.pstyle("padding"),e.pstyle("padding-relative-to").value),t.autoWidth=Math.max(n.w,r.width.val),i.x=(-a+n.x1+n.x2+s)/2,t.autoHeight=Math.max(n.h,r.height.val),i.y=(-o+n.y1+n.y2+l)/2)}}},goe=mt(function(e){return e===1/0||e===-1/0?0:e},"noninf"),foe=mt(function(e,t,r,n,i){n-t!=0&&i-r!=0&&null!=t&&null!=r&&null!=n&&null!=i&&(e.x1=t<e.x1?t:e.x1,e.x2=e.x2<n?n:e.x2,e.y1=r<e.y1?r:e.y1,e.y2=e.y2<i?i:e.y2,e.w=e.x2-e.x1,e.h=e.y2-e.y1)},"updateBounds"),moe=mt(function(e,t){return null==t?e:foe(e,t.x1,t.y1,t.x2,t.y2)},"updateBoundsFromBox"),yoe=mt(function(e,t,r){return mre(e,t,r)},"prefixedProperty"),voe=mt(function(e,t,r){var n,i,a,s;t.cy().headless()||(n=(a=(s=t._private).rstyle).arrowWidth/2,"none"!==t.pstyle(r+"-arrow-shape").value&&(t="source"===r?(i=a.srcX,a.srcY):"target"===r?(i=a.tgtX,a.tgtY):(i=a.midX,a.midY),(s=(a=s.arrowBounds=s.arrowBounds||{})[r]=a[r]||{}).x1=i-n,s.y1=t-n,s.x2=i+n,s.y2=t+n,s.w=s.x2-s.x1,s.h=s.y2-s.y1,ine(s,1),foe(e,s.x1,s.y1,s.x2,s.y2)))},"updateBoundsFromArrow"),xoe=mt(function(e,t,r){if(!t.cy().headless()){var n=t._private,i=n.rstyle;if(t.pstyle((p=r?r+"-":"")+"label").strValue){var a=t.pstyle("text-halign"),s=t.pstyle("text-valign"),o=yoe(i,"labelWidth",r),l=yoe(i,"labelHeight",r),c=yoe(i,"labelX",r),h=yoe(i,"labelY",r),i=t.pstyle(p+"text-margin-x").pfValue,u=t.pstyle(p+"text-margin-y").pfValue,d=t.isEdge(),p=t.pstyle(p+"text-rotation"),g=t.pstyle("text-outline-width").pfValue,f=t.pstyle("text-border-width").pfValue/2,t=t.pstyle("text-background-padding").pfValue,m=l,y=o,v=y/2,x=m/2;if(d)E=c-v,C=c+v,_=h-x,S=h+x;else{switch(a.value){case"left":E=c-y,C=c;break;case"center":E=c-v,C=c+v;break;case"right":C=(E=c)+y}switch(s.value){case"top":_=h-m,S=h;break;case"center":_=h-x,S=h+x;break;case"bottom":S=(_=h)+m}}if(E+=l=i-Math.max(g,f)-t-2,C+=o=i+Math.max(g,f)+t+2,_+=i=u-Math.max(g,f)-t-2,S+=u=u+Math.max(g,f)+t+2,(t=(f=n.labelBounds)[g=r||"main"]=f[g]||{}).x1=E,t.y1=_,t.x2=C,t.y2=S,t.w=C-E,t.h=S-_,t.leftPad=l,t.rightPad=o,t.topPad=i,t.botPad=u,l=d&&"autorotate"===p.strValue,o=null!=p.pfValue&&0!==p.pfValue,l||o){var i=l?yoe(n.rstyle,"labelAngle",r):p.pfValue,b=Math.cos(i),w=Math.sin(i),k=(E+C)/2,T=(_+S)/2;if(!d){switch(a.value){case"left":k=C;break;case"right":k=E}switch(s.value){case"top":T=S;break;case"bottom":T=_}}var u=(t=mt(function(e,t){return{x:(e-=k)*b-(t-=T)*w+k,y:e*w+t*b+T}},"rotate"))(E,_),o=t(E,S),l=t(C,_),r=t(C,S),E=Math.min(u.x,o.x,l.x,r.x),C=Math.max(u.x,o.x,l.x,r.x),_=Math.min(u.y,o.y,l.y,r.y),S=Math.max(u.y,o.y,l.y,r.y)}(i=f[p=g+"Rot"]=f[p]||{}).x1=E,i.y1=_,i.x2=C,i.y2=S,i.w=C-E,i.h=S-_,foe(e,E,_,C,S),foe(n.labelBounds.all,E,_,C,S)}return e}},"updateBoundsFromLabel"),boe=mt(function(e,t){var r,n;t.cy().headless()||(r=t.pstyle("outline-opacity").value,n=t.pstyle("outline-width").value+t.pstyle("outline-offset").value,woe(e,t,r,n,"outside",n/2))},"updateBoundsFromOutline"),woe=mt(function(e,t,r,n,i,a){var s,o,l;0===r||n<=0||"inside"===i||(r=t.cy(),o=t.pstyle("shape").value,r=r.renderer().nodeShapes[o],s=(o=t.position()).x,o=o.y,l=t.width(),t=t.height(),r.hasMiterBounds?("center"===i&&(n/=2),i=r.miterBounds(s,o,l,t,n),moe(e,i)):null!=a&&0<a&&ane(e,[a,a,a,a]))},"updateBoundsFromMiter"),koe=mt(function(e,t){var r,n,i;t.cy().headless()||(r=t.pstyle("border-opacity").value,n=t.pstyle("border-width").pfValue,i=t.pstyle("border-position").value,woe(e,t,r,n,i))},"updateBoundsFromMiterBorder"),Toe=mt(function(e,t){var r=(n=e._private.cy).styleEnabled(),n=n.headless(),i=Jre(),a=e._private,s=e.isNode(),o=e.isEdge(),l=a.rstyle,c=s&&r?e.pstyle("bounds-expansion").pfValue:[0],h=mt(function(e){return"none"!==e.pstyle("display").value},"isDisplayed");if(h=!r||h(e)&&(!o||h(e.source())&&h(e.target()))){var u=0,d=(r&&t.includeOverlays&&0!==e.pstyle("overlay-opacity").value&&(u=e.pstyle("overlay-padding").value),0),u=(r&&t.includeUnderlays&&0!==e.pstyle("underlay-opacity").value&&(d=e.pstyle("underlay-padding").value),Math.max(u,d)),p=0;if(r&&(p=e.pstyle("width").pfValue/2),s&&t.includeNodes){var s=(d=e.position()).x,d=d.y,g=e.outerWidth()/2,f=e.outerHeight()/2;foe(i,y=s-g,x=d-f,v=s+g,b=d+f),r&&boe(i,e),r&&t.includeOutlines&&!n&&boe(i,e),r&&koe(i,e)}else if(o&&t.includeEdges)if(r&&!n){var m,s=e.pstyle("curve-style").strValue,y=Math.min(l.srcX,l.midX,l.tgtX),v=Math.max(l.srcX,l.midX,l.tgtX),x=Math.min(l.srcY,l.midY,l.tgtY),b=Math.max(l.srcY,l.midY,l.tgtY);if(foe(i,y-=p,x-=p,v+=p,b+=p),"haystack"===s)(g=l.haystackPts)&&2===g.length&&(y=g[0].x,x=g[0].y,(v=g[1].x)<y&&(d=y,y=v,v=d),(b=g[1].y)<x&&(f=x,x=b,b=f),foe(i,y-p,x-p,v+p,b+p));else if("bezier"===s||"unbundled-bezier"===s||Yee(s,"segments")||Yee(s,"taxi")){switch(s){case"bezier":case"unbundled-bezier":m=l.bezierPts;break;case"segments":case"taxi":case"round-segments":case"round-taxi":m=l.linePts}if(null!=m)for(var w=0;w<m.length;w++){var k=m[w],y=k.x-p;foe(i,y,x=k.y-p,v=k.x+p,b=k.y+p)}}}else n=e.source().position(),d=e.target().position(),y=n.x,v=d.x,x=n.y,v<y&&(g=y,y=v,v=g),(b=d.y)<x&&(f=x,x=b,b=f),foe(i,y-=p,x-=p,v+=p,b+=p);r&&t.includeEdges&&o&&(voe(i,e,"mid-source"),voe(i,e,"mid-target"),voe(i,e,"source"),voe(i,e,"target")),r&&"yes"===e.pstyle("ghost").value&&(s=e.pstyle("ghost-offset-x").pfValue,n=e.pstyle("ghost-offset-y").pfValue,foe(i,i.x1+s,i.y1+n,i.x2+s,i.y2+n)),g=a.bodyBounds=a.bodyBounds||{},sne(g,i),ane(g,c),ine(g,1),r&&(y=i.x1,v=i.x2,x=i.y1,b=i.y2,foe(i,y-u,x-u,v+u,b+u)),d=a.overlayBounds=a.overlayBounds||{},sne(d,i),ane(d,c),ine(d,1),null!=(f=a.labelBounds=a.labelBounds||{}).all?tne(f.all):f.all=Jre(),r&&t.includeLabels&&(t.includeMainLabels&&xoe(i,e,null),o)&&(t.includeSourceLabels&&xoe(i,e,"source"),t.includeTargetLabels)&&xoe(i,e,"target")}return i.x1=goe(i.x1),i.y1=goe(i.y1),i.x2=goe(i.x2),i.y2=goe(i.y2),i.w=goe(i.x2-i.x1),i.h=goe(i.y2-i.y1),0<i.w&&0<i.h&&h&&(ane(i,c),ine(i,1)),i},"boundingBoxImpl"),Eoe=mt(function(e){var t=0,r=mt(function(e){return(e?1:0)<<t++},"tf"),n=0;return(n+=r(e.incudeNodes))+r(e.includeEdges)+r(e.includeLabels)+r(e.includeMainLabels)+r(e.includeSourceLabels)+r(e.includeTargetLabels)+r(e.includeOverlays)+r(e.includeOutlines)},"getKey"),Coe=mt(function(e){var t,r,n=mt(function(e){return Math.round(e)},"r");return e.isEdge()?(r=e.source().position(),t=e.target().position(),Yte([n(r.x),n(r.y),n(t.x),n(t.y)])):(r=e.position(),Yte([n(r.x),n(r.y)]))},"getBoundingBoxPosKey"),_oe=mt(function(e,t){var r,n=e._private,i=e.isEdge(),a=(null==t?Aoe:Eoe(t))===Aoe;return null==n.bbCache?(r=Toe(e,Soe),n.bbCache=r,n.bbCachePosKey=Coe(e)):r=n.bbCache,a||(a=e.isNode(),r=Jre(),(t.includeNodes&&a||t.includeEdges&&!a)&&(t.includeOverlays?moe(r,n.overlayBounds):moe(r,n.bodyBounds)),t.includeLabels&&(t.includeMainLabels&&(!i||t.includeSourceLabels&&t.includeTargetLabels)?moe(r,n.labelBounds.all):(t.includeMainLabels&&moe(r,n.labelBounds.mainRot),t.includeSourceLabels&&moe(r,n.labelBounds.sourceRot),t.includeTargetLabels&&moe(r,n.labelBounds.targetRot))),r.w=r.x2-r.x1,r.h=r.y2-r.y1),r},"cachedBoundingBoxImpl"),Aoe=Eoe(Soe={includeNodes:!0,includeEdges:!0,includeLabels:!0,includeMainLabels:!0,includeSourceLabels:!0,includeTargetLabels:!0,includeOverlays:!0,includeUnderlays:!0,includeOutlines:!0,useCache:!0}),Loe=ahe(Soe),Oce.boundingBox=function(e){var t=void 0===e||void 0===e.useCache||!0===e.useCache,r=zee(function(e){var t=e._private;return null==t.bbCache||t.styleDirty||t.bbCachePosKey!==Coe(e)},function(e){return e.id()});if(t&&1===this.length&&!r(this[0]))e=void 0===e?Soe:Loe(e),n=_oe(this[0],e);else{var n=Jre(),i=Loe(e=e||Soe),e=this.cy().styleEnabled();this.edges().forEach(r),this.nodes().forEach(r),e&&this.recalculateRenderedStyle(t),this.updateCompoundBounds(!t);for(var a=0;a<this.length;a++){var s=this[a];r(s)&&s.dirtyBoundingBoxCache(),moe(n,_oe(s,i))}}return n.x1=goe(n.x1),n.y1=goe(n.y1),n.x2=goe(n.x2),n.y2=goe(n.y2),n.w=goe(n.x2-n.x1),n.h=goe(n.y2-n.y1),n},Oce.dirtyBoundingBoxCache=function(){for(var e=0;e<this.length;e++){var t=this[e]._private;t.bbCache=null,t.bbCachePosKey=null,t.bodyBounds=null,t.overlayBounds=null,t.labelBounds.all=null,t.labelBounds.source=null,t.labelBounds.target=null,t.labelBounds.main=null,t.labelBounds.sourceRot=null,t.labelBounds.targetRot=null,t.labelBounds.mainRot=null,t.arrowBounds.source=null,t.arrowBounds.target=null,t.arrowBounds["mid-source"]=null,t.arrowBounds["mid-target"]=null}return this.emitAndNotify("bounds"),this},Oce.boundingBoxAt=function(r){var e,t=this.nodes(),n=this.cy(),i=n.hasCompoundNodes(),a=n.collection(),s=(i&&(a=t.filter(function(e){return e.isParent()}),t=t.not(a)),Cee(r)&&(e=r,r=mt(function(){return e},"fn")),mt(function(e,t){return e._private.bbAtOldPos=r(e,t)},"storeOldPos")),o=mt(function(e){return e._private.bbAtOldPos},"getOldPos"),s=(n.startBatch(),t.forEach(s).silentPositions(r),i&&(a.dirtyCompoundBoundsCache(),a.dirtyBoundingBoxCache(),a.updateCompoundBounds(!0)),ene(this.boundingBox({useCache:!1})));return t.silentPositions(o),i&&(a.dirtyCompoundBoundsCache(),a.dirtyBoundingBoxCache(),a.updateCompoundBounds(!0)),n.endBatch(),s},Rce.boundingbox=Rce.bb=Rce.boundingBox,Rce.renderedBoundingbox=Rce.renderedBoundingBox,lhe=Oce,Noe=Mce={},(kce=mt(function(n){n.uppercaseName=jee(n.name),n.autoName="auto"+n.uppercaseName,n.labelName="label"+n.uppercaseName,n.outerName="outer"+n.uppercaseName,n.uppercaseOuterName=jee(n.outerName),Noe[n.name]=mt(function(){var e=this[0],t=e._private,r=t.cy._private.styleEnabled;if(e)return r?e.isParent()?(e.updateCompoundBounds(),t[n.autoName]||0):"label"!==(r=e.pstyle(n.name)).strValue?r.pfValue:(e.recalculateRenderedStyle(),t.rstyle[n.labelName]||0):1},"dimImpl"),Noe["outer"+n.uppercaseName]=mt(function(){var e=this[0],t=e._private.cy._private.styleEnabled;if(e)return t?e[n.name]()+("center"===(t=e.pstyle("border-position").value)?e.pstyle("border-width").pfValue:"outside"===t?2*e.pstyle("border-width").pfValue:0)+2*e.padding():1},"outerDimImpl"),Noe["rendered"+n.uppercaseName]=mt(function(){var e=this[0];if(e)return e[n.name]()*this.cy().zoom()},"renderedDimImpl"),Noe["rendered"+n.uppercaseOuterName]=mt(function(){var e=this[0];if(e)return e[n.outerName]()*this.cy().zoom()},"renderedOuterDimImpl")},"defineDimFns"))({name:"width"}),kce({name:"height"}),Mce.padding=function(){var e=this[0],t=e._private;return e.isParent()&&(e.updateCompoundBounds(),void 0!==t.autoPadding)?t.autoPadding:e.pstyle("padding").pfValue},Mce.paddedHeight=function(){var e=this[0];return e.height()+2*e.padding()},Mce.paddedWidth=function(){var e=this[0];return e.width()+2*e.padding()},Dce=Mce,Ioe=mt(function(e,t){if(e.isEdge()&&e.takesUpSpace())return t(e)},"ifEdge"),Roe=mt(function(e,t){var r;if(e.isEdge()&&e.takesUpSpace())return r=e.cy(),Ore(t(e),r.zoom(),r.pan())},"ifEdgeRenderedPosition"),Moe=mt(function(e,t){var r,n,i;if(e.isEdge()&&e.takesUpSpace())return r=e.cy(),n=r.pan(),i=r.zoom(),t(e).map(function(e){return Ore(e,i,n)})},"ifEdgeRenderedPositions"),Bce=mt(function(e){return e.renderer().getControlPoints(e)},"controlPoints"),Ece=mt(function(e){return e.renderer().getSegmentPoints(e)},"segmentPoints"),J=mt(function(e){return e.renderer().getSourceEndpoint(e)},"sourceEndpoint"),Ice=mt(function(e){return e.renderer().getTargetEndpoint(e)},"targetEndpoint"),Rce=mt(function(e){return e.renderer().getEdgeMidpoint(e)},"midpoint"),Doe={controlPoints:{get:Bce,mult:!0},segmentPoints:{get:Ece,mult:!0},sourceEndpoint:{get:J},targetEndpoint:{get:Ice},midpoint:{get:Rce}},Ooe=mt(function(e){return"rendered"+e[0].toUpperCase()+e.substr(1)},"renderedName"),Oce=Object.keys(Doe).reduce(function(e,t){var r=Doe[t],n=Ooe(t);return e[t]=function(){return Ioe(this,r.get)},r.mult?e[n]=function(){return Moe(this,r.get)}:e[n]=function(){return Roe(this,r.get)},e},{}),kce=Xee({},pce,lhe,Dce,Oce),Poe=mt(function(e,t){this.recycle(e,t)},"Event"),mt(MQ,"returnFalse"),mt(DQ,"returnTrue"),Poe.prototype={instanceString:mt(function(){return"event"},"instanceString"),recycle:mt(function(e,t){var r,n;this.isImmediatePropagationStopped=this.isPropagationStopped=this.isDefaultPrevented=MQ,null!=e&&e.preventDefault?(this.type=e.type,this.isDefaultPrevented=e.defaultPrevented?DQ:MQ):null!=e&&e.type?t=e:this.type=e,null!=t&&(this.originalEvent=t.originalEvent,this.type=(null!=t.type?t:this).type,this.cy=t.cy,this.target=t.target,this.position=t.position,this.renderedPosition=t.renderedPosition,this.namespace=t.namespace,this.layout=t.layout),null!=this.cy&&null!=this.position&&null==this.renderedPosition&&(t=this.position,r=this.cy.zoom(),n=this.cy.pan(),this.renderedPosition={x:t.x*r+n.x,y:t.y*r+n.y}),this.timeStamp=e&&e.timeStamp||Date.now()},"recycle"),preventDefault:mt(function(){this.isDefaultPrevented=DQ;var e=this.originalEvent;e&&e.preventDefault&&e.preventDefault()},"preventDefault"),stopPropagation:mt(function(){this.isPropagationStopped=DQ;var e=this.originalEvent;e&&e.stopPropagation&&e.stopPropagation()},"stopPropagation"),stopImmediatePropagation:mt(function(){this.isImmediatePropagationStopped=DQ,this.stopPropagation()},"stopImmediatePropagation"),isDefaultPrevented:MQ,isPropagationStopped:MQ,isImmediatePropagationStopped:MQ},Boe=/^([^.]+)(\.(?:[^.]+))?$/,$oe={qualifierCompare:mt(function(e,t){return e===t},"qualifierCompare"),eventMatches:mt(function(){return!0},"eventMatches"),addEventFields:mt(function(){},"addEventFields"),callbackContext:mt(function(e){return e},"callbackContext"),beforeEmit:mt(function(){},"beforeEmit"),afterEmit:mt(function(){},"afterEmit"),bubble:mt(function(){return!1},"bubble"),parent:mt(function(){return null},"parent"),context:null},Foe=Object.keys($oe),zoe={},mt(OQ,"Emitter"),Mce=OQ.prototype,Goe=mt(function(e,t,r,n,i,a,s){Tee(n)&&(i=n,n=null),s&&(a=null==a?s:Xee({},a,s));for(var o=Eee(r)?r:r.split(/\s+/),l=0;l<o.length;l++){var c=o[l];if(!Oee(c)){var h=c.match(Boe);if(h&&!1===t(e,c,h[1],h[2]||null,n,i,a))break}}},"forEachEvent"),Uoe=mt(function(e,t){return e.addEventFields(e.context,t),new Poe(t.type,t)},"makeEventObj"),qoe=mt(function(e,t,r){if(Dee(r))t(e,r);else if(Cee(r))t(e,Uoe(e,r));else for(var n=Eee(r)?r:r.split(/\s+/),i=0;i<n.length;i++){var a,s=n[i];Oee(s)||(s=s.match(Boe))&&(a=s[1],s=s[2]||null,t(e,Uoe(e,{type:a,namespace:s,target:e.context})))}},"forEachEventObj"),Mce.on=Mce.addListener=function(e,t,r,n,i){return Goe(this,function(e,t,r,n,i,a,s){Tee(a)&&e.listeners.push({event:t,callback:a,type:r,namespace:n,qualifier:i,conf:s})},e,t,r,n,i),this},Mce.one=function(e,t,r,n){return this.on(e,t,r,n,{one:!0})},Mce.removeListener=Mce.off=function(l,e,t,r){var n=this;0!==this.emitting&&(this.listeners=cre(this.listeners));for(var c=this.listeners,i=mt(function(s){var o=c[s];Goe(n,function(e,t,r,n,i,a){if((o.type===r||"*"===l)&&(!n&&".*"!==o.namespace||o.namespace===n)&&(!i||e.qualifierCompare(o.qualifier,i))&&(!a||o.callback===a))return c.splice(s,1),!1},l,e,t,r)},"_loop"),a=c.length-1;0<=a;a--)i(a);return this},Mce.removeAllListeners=function(){return this.removeListener("*")},Mce.emit=Mce.trigger=function(e,s,t){var o=this.listeners,r=o.length;return this.emitting++,Eee(s)||(s=[s]),qoe(this,function(n,i){null!=t&&(o=[{event:i.event,type:i.type,namespace:i.namespace,callback:t}],r=o.length);for(var e=mt(function(){var e,t,r=o[a];r.type!==i.type||r.namespace&&r.namespace!==i.namespace&&".*"!==r.namespace||!n.eventMatches(n.context,r,i)||(e=[i],null!=s&&fre(e,s),n.beforeEmit(n.context,r,i),r.conf&&r.conf.one&&(n.listeners=n.listeners.filter(function(e){return e!==r})),t=n.callbackContext(n.context,r,i),t=r.callback.apply(t,e),n.afterEmit(n.context,r,i),!1===t&&(i.stopPropagation(),i.preventDefault()))},"_loop2"),a=0;a<r;a++)e();n.bubble(n.context)&&!i.isPropagationStopped()&&n.parent(n.context).emit(i,s)},e),this.emitting--,this},joe={qualifierCompare:mt(function(e,t){return null==e||null==t?null==e&&null==t:e.sameText(t)},"qualifierCompare"),eventMatches:mt(function(e,t,r){return null==(t=t.qualifier)||e!==r.target&&Nee(r.target)&&t.matches(r.target)},"eventMatches"),addEventFields:mt(function(e,t){t.cy=e.cy(),t.target=e},"addEventFields"),callbackContext:mt(function(e,t,r){return null!=t.qualifier?r.target:e},"callbackContext"),beforeEmit:mt(function(e,t){t.conf&&t.conf.once&&t.conf.onceCollection.removeListener(t.event,t.qualifier,t.callback)},"beforeEmit"),bubble:mt(function(){return!0},"bubble"),parent:mt(function(e){return e.isChild()?e.parent():e.cy()},"parent")},Yoe=mt(function(e){return kee(e)?new uoe(e):e},"argSelector"),Bce={createEmitter:mt(function(){for(var e=0;e<this.length;e++){var t=this[e],r=t._private;r.emitter||(r.emitter=new OQ(joe,t))}return this},"createEmitter"),emitter:mt(function(){return this._private.emitter},"emitter"),on:mt(function(e,t,r){for(var n=Yoe(t),i=0;i<this.length;i++)this[i].emitter().on(e,n,r);return this},"on"),removeListener:mt(function(e,t,r){for(var n=Yoe(t),i=0;i<this.length;i++)this[i].emitter().removeListener(e,n,r);return this},"removeListener"),removeAllListeners:mt(function(){for(var e=0;e<this.length;e++)this[e].emitter().removeAllListeners();return this},"removeAllListeners"),one:mt(function(e,t,r){for(var n=Yoe(t),i=0;i<this.length;i++)this[i].emitter().one(e,n,r);return this},"one"),once:mt(function(e,t,r){for(var n=Yoe(t),i=0;i<this.length;i++)this[i].emitter().on(e,n,r,{once:!0,onceCollection:this})},"once"),emit:mt(function(e,t){for(var r=0;r<this.length;r++)this[r].emitter().emit(e,t);return this},"emit"),emitAndNotify:mt(function(e,t){if(0!==this.length)return this.cy().notify(e,this),this.emit(e,t),this},"emitAndNotify")},Wse.eventAliasesOn(Bce),Ece={nodes:mt(function(e){return this.filter(function(e){return e.isNode()}).filter(e)},"nodes"),edges:mt(function(e){return this.filter(function(e){return e.isEdge()}).filter(e)},"edges"),byGroup:mt(function(){for(var e=this.spawn(),t=this.spawn(),r=0;r<this.length;r++){var n=this[r];(n.isNode()?e:t).push(n)}return{nodes:e,edges:t}},"byGroup"),filter:mt(function(e,t){if(void 0===e)return this;if(kee(e)||Lee(e))return new uoe(e).filter(this);if(Tee(e)){for(var r=this.spawn(),n=0;n<this.length;n++){var i=this[n];(t?e.apply(t,[i,n,this]):e(i,n,this))&&r.push(i)}return r}return this.spawn()},"filter"),not:mt(function(e){if(e){kee(e)&&(e=this.filter(e));for(var t=this.spawn(),r=0;r<this.length;r++){var n=this[r];e.has(n)||t.push(n)}return t}return this},"not"),absoluteComplement:mt(function(){return this.cy().mutableElements().not(this)},"absoluteComplement"),intersect:mt(function(e){if(kee(e))return this.filter(e);for(var t=this.spawn(),r=this.length<e.length,n=r?this:e,i=r?e:this,a=0;a<n.length;a++){var s=n[a];i.has(s)&&t.push(s)}return t},"intersect"),xor:mt(function(e){var t=this._private.cy,a=(kee(e)&&(e=t.$(e)),this.spawn()),t=e;return(e=mt(function(e,t){for(var r=0;r<e.length;r++){var n=e[r],i=n._private.data.id;t.hasElementWithId(i)||a.push(n)}},"add"))(this,t),e(t,this),a},"xor"),diff:mt(function(e){var t=this._private.cy,t=(kee(e)&&(e=t.$(e)),this.spawn()),r=this.spawn(),s=this.spawn(),n=mt(function(e,t,r){for(var n=0;n<e.length;n++){var i=e[n],a=i._private.data.id;t.hasElementWithId(a)?s.merge(i):r.push(i)}},"add");return n(this,e,t),n(e,this,r),{left:t,right:r,both:s}},"diff"),add:mt(function(e){var t,r=this._private.cy;if(!e)return this;kee(e)&&(t=e,e=r.mutableElements().filter(t));for(var n=this.spawnSelf(),i=0;i<e.length;i++){var a=e[i];this.has(a)||n.push(a)}return n},"add"),merge:mt(function(e){var t,r=this._private,n=r.cy;if(e){kee(e)&&(t=e,e=n.mutableElements().filter(t));for(var i=r.map,a=0;a<e.length;a++){var s,o=e[a],l=o._private.data.id;i.has(l)||(s=this.length++,this[s]=o,i.set(l,{ele:o,index:s}))}}return this},"merge"),unmergeAt:mt(function(e){var t,r,n=this[e].id(),i=this._private.map,n=(this[e]=void 0,i.delete(n),e===this.length-1);return 1<this.length&&!n&&(r=(t=this[n=this.length-1])._private.data.id,this[n]=void 0,this[e]=t,i.set(r,{ele:t,index:e})),this.length--,this},"unmergeAt"),unmergeOne:mt(function(e){e=e[0];var t=this._private,e=e._private.data.id;return(t=t.map.get(e))&&(e=t.index,this.unmergeAt(e)),this},"unmergeOne"),unmerge:mt(function(e){var t,r=this._private.cy;if(e){kee(e)&&(t=e,e=r.mutableElements().filter(t));for(var n=0;n<e.length;n++)this.unmergeOne(e[n])}return this},"unmerge"),unmergeBy:mt(function(e){for(var t=this.length-1;0<=t;t--)e(this[t])&&this.unmergeAt(t);return this},"unmergeBy"),map:mt(function(e,t){for(var r=[],n=0;n<this.length;n++){var i=this[n],i=t?e.apply(t,[i,n,this]):e(i,n,this);r.push(i)}return r},"map"),reduce:mt(function(e,t){for(var r=t,n=0;n<this.length;n++)r=e(r,this[n],n,this);return r},"reduce"),max:mt(function(e,t){for(var r,n=-1/0,i=0;i<this.length;i++){var a=this[i],s=t?e.apply(t,[a,i,this]):e(a,i,this);n<s&&(n=s,r=a)}return{value:n,ele:r}},"max"),min:mt(function(e,t){for(var r,n=1/0,i=0;i<this.length;i++){var a=this[i],s=t?e.apply(t,[a,i,this]):e(a,i,this);s<n&&(n=s,r=a)}return{value:n,ele:r}},"min")},(J=Ece).u=J["|"]=J["+"]=J.union=J.or=J.add,J["\\"]=J["!"]=J["-"]=J.difference=J.relativeComplement=J.subtract=J.not,J.n=J["&"]=J["."]=J.and=J.intersection=J.intersect,J["^"]=J["(+)"]=J["(-)"]=J.symmetricDifference=J.symdiff=J.xor,J.fnFilter=J.filterFn=J.stdFilter=J.filter,J.complement=J.abscomp=J.absoluteComplement,Ice={isNode:mt(function(){return"nodes"===this.group()},"isNode"),isEdge:mt(function(){return"edges"===this.group()},"isEdge"),isLoop:mt(function(){return this.isEdge()&&this.source()[0]===this.target()[0]},"isLoop"),isSimple:mt(function(){return this.isEdge()&&this.source()[0]!==this.target()[0]},"isSimple"),group:mt(function(){var e=this[0];if(e)return e._private.group},"group")},Woe=mt(function(e,t){var r=e.cy().hasCompoundNodes();function n(e){var t=e.pstyle("z-compound-depth");return"auto"===t.value?r?e.zDepth():0:"bottom"===t.value?-1:"top"===t.value?Jte:0}mt(n,"getDepth");var i=n(e)-n(t);return 0!=i||(mt(a,"getEleDepth"),0!=(i=a(e)-a(t)))||0!=(i=e.pstyle("z-index").value-t.pstyle("z-index").value)?i:e.poolIndex()-t.poolIndex();function a(e){return"auto"===e.pstyle("z-index-compare").value&&e.isNode()?1:0}},"zIndexSort"),(Hoe={forEach:mt(function(e,t){if(Tee(e))for(var r=this.length,n=0;n<r;n++){var i=this[n];if(!1===(t?e.apply(t,[i,n,this]):e(i,n,this)))break}return this},"forEach"),toArray:mt(function(){for(var e=[],t=0;t<this.length;t++)e.push(this[t]);return e},"toArray"),slice:mt(function(e,t){var r=[],n=this.length;(t=null==t?n:t)<0&&(t=n+t);for(var i=e=(e=null==e?0:e)<0?n+e:e;0<=i&&i<t&&i<n;i++)r.push(this[i]);return this.spawn(r)},"slice"),size:mt(function(){return this.length},"size"),eq:mt(function(e){return this[e]||this.spawn()},"eq"),first:mt(function(){return this[0]||this.spawn()},"first"),last:mt(function(){return this[this.length-1]||this.spawn()},"last"),empty:mt(function(){return 0===this.length},"empty"),nonempty:mt(function(){return!this.empty()},"nonempty"),sort:mt(function(e){return Tee(e)?(e=this.toArray().sort(e),this.spawn(e)):this},"sort"),sortByZIndex:mt(function(){return this.sort(Woe)},"sortByZIndex"),zDepth:mt(function(){var e,t,r=this[0];if(r)return"nodes"===(t=r._private).group?(e=t.data.parent?r.parents().size():0,r.isParent()?e:Jte-1):(r=t.source,e=t.target,t=r.zDepth(),r=e.zDepth(),Math.max(t,r,0))},"zDepth")}).each=Hoe.forEach,mt(function(){"undefined"!=("u"<typeof Symbol?"undefined":aZ(Symbol))&&"undefined"!=aZ(Symbol.iterator)&&(Hoe[Symbol.iterator]=function(){var e=this,t={value:void 0,done:!1},r=0,n=this.length;return KK({next:mt(function(){return r<n?t.value=e[r++]:(t.value=void 0,t.done=!0),t},"next")},Symbol.iterator,function(){return this})})},"defineSymbolIterator")(),Voe=ahe({nodeDimensionsIncludeLabels:!1}),(Rce={layoutDimensions:mt(function(e){return e=Voe(e),0!==(e=this.takesUpSpace()?e.nodeDimensionsIncludeLabels?{w:(e=this.boundingBox()).w,h:e.h}:{w:this.outerWidth(),h:this.outerHeight()}:{w:0,h:0}).w&&0!==e.h||(e.w=e.h=1),e},"layoutDimensions"),layoutPositions:mt(function(e,n,t){var i=this.nodes().filter(function(e){return!e.isParent()}),r=this.cy(),a=n.eles,s=mt(function(e){return e.id()},"getMemoizeKey"),o=zee(t,s),l=(e.emit({type:"layoutstart",layout:e}),e.animations=[],mt(function(e,t,r){var n=t.x1+t.w/2,t=t.y1+t.h/2;return{x:n+(r.x-n)*e,y:t+(r.y-t)*e}},"calculateSpacing")),c=n.spacingFactor&&1!==n.spacingFactor,h=mt(function(){if(!c)return null;for(var e=Jre(),t=0;t<i.length;t++){var r=i[t],r=o(r,t);nne(e,r.x,r.y)}return e},"spacingBb")(),u=zee(function(e,t){var r,t=o(e,t);return c&&(r=Math.abs(n.spacingFactor),t=l(r,h,t)),null!=n.transform?n.transform(e,t):t},s);if(n.animate){for(var d=0;d<i.length;d++){var p,g=i[d],f=u(g,d);null==n.animateFilter||n.animateFilter(g,d)?(p=g.animation({position:f,duration:n.animationDuration,easing:n.animationEasing}),e.animations.push(p)):g.position(f)}n.fit?(t=r.animation({fit:{boundingBox:a.boundingBoxAt(u),padding:n.padding},duration:n.animationDuration,easing:n.animationEasing}),e.animations.push(t)):void 0!==n.zoom&&void 0!==n.pan&&(s=r.animation({zoom:n.zoom,pan:n.pan,duration:n.animationDuration,easing:n.animationEasing}),e.animations.push(s)),e.animations.forEach(function(e){return e.play()}),e.one("layoutready",n.ready),e.emit({type:"layoutready",layout:e}),Hie.all(e.animations.map(function(e){return e.promise()})).then(function(){e.one("layoutstop",n.stop),e.emit({type:"layoutstop",layout:e})})}else i.positions(u),n.fit&&r.fit(n.eles,n.padding),null!=n.zoom&&r.zoom(n.zoom),n.pan&&r.pan(n.pan),e.one("layoutready",n.ready),e.emit({type:"layoutready",layout:e}),e.one("layoutstop",n.stop),e.emit({type:"layoutstop",layout:e});return this},"layoutPositions"),layout:mt(function(e){return this.cy().makeLayout(Xee({},e,{eles:this}))},"layout")}).createLayout=Rce.makeLayout=Rce.layout,mt(PQ,"styleCache"),mt(BQ,"cacheStyleFunction"),mt($Q,"cachePrototypeStyleFunction"),pce={recalculateRenderedStyle:mt(function(e){var t=(r=this.cy()).renderer(),r=r.styleEnabled();return t&&r&&t.recalculateRenderedStyle(this,e),this},"recalculateRenderedStyle"),dirtyStyleCache:mt(function(){var e=this.cy(),t=mt(function(e){return e._private.styleCache=null},"dirty");return e.hasCompoundNodes()?((e=this.spawnSelf().merge(this.descendants()).merge(this.parents())).merge(e.connectedEdges()),e.forEach(t)):this.forEach(function(e){t(e),e.connectedEdges().forEach(t)}),this},"dirtyStyleCache"),updateStyle:mt(function(e){var t,r=this._private.cy;return r.styleEnabled()&&(r.batching()?r._private.batchStyleEles.merge(this):(t=this,e=!(!e&&void 0!==e),r=t=r.hasCompoundNodes()?this.spawnSelf().merge(this.descendants()).merge(this.parents()):t,e?r.emitAndNotify("style"):r.emit("style"),t.forEach(function(e){return e._private.styleDirty=!0}))),this},"updateStyle"),cleanStyle:mt(function(){var e=this.cy();if(e.styleEnabled())for(var t=0;t<this.length;t++){var r=this[t];r._private.styleDirty&&(r._private.styleDirty=!1,e.style().apply(r))}},"cleanStyle"),parsedStyle:mt(function(e){var t=!(1<arguments.length&&void 0!==arguments[1])||arguments[1],r=this[0],n=r.cy();if(n.styleEnabled()&&r)return r._private.styleDirty&&(r._private.styleDirty=!1,n.style().apply(r)),r._private.style[e]??(t?n.style().getDefaultProperty(e):null)},"parsedStyle"),numericStyle:mt(function(e){var t=this[0];if(t.cy().styleEnabled()&&t)return void 0!==(t=t.pstyle(e)).pfValue?t.pfValue:t.value},"numericStyle"),numericStyleUnits:mt(function(e){var t=this[0];if(t.cy().styleEnabled()&&t)return t.pstyle(e).units},"numericStyleUnits"),renderedStyle:mt(function(e){var t,r=this.cy();return r.styleEnabled()?(t=this[0])?r.style().getRenderedStyle(t,e):void 0:this},"renderedStyle"),style:mt(function(e,t){if((n=this.cy()).styleEnabled()){var r,n=n.style();if(Cee(e))n.applyBypass(this,e,!1),this.emitAndNotify("style");else if(kee(e)){if(void 0===t)return(r=this[0])?n.getStylePropertyValue(r,e):void 0;n.applyBypass(this,e,t,!1),this.emitAndNotify("style")}else if(void 0===e)return(r=this[0])?n.getRawStyle(r):void 0}return this},"style"),removeStyle:mt(function(e){var t=this.cy();if(t.styleEnabled()){var r=t.style();if(void 0===e)for(var n=0;n<this.length;n++){var i=this[n];r.removeAllBypasses(i,!1)}else{e=e.split(/\s+/);for(var a=0;a<this.length;a++){var s=this[a];r.removeBypasses(s,e,!1)}}this.emitAndNotify("style")}return this},"removeStyle"),show:mt(function(){return this.css("display","element"),this},"show"),hide:mt(function(){return this.css("display","none"),this},"hide"),effectiveOpacity:mt(function(){if(!(e=this.cy()).styleEnabled())return 1;var e=e.hasCompoundNodes(),t=this[0];if(t){var r=t._private,n=t.pstyle("opacity").value;if(e){var i=r.data.parent?t.parents():null;if(i)for(var a=0;a<i.length;a++)n*=i[a].pstyle("opacity").value}return n}},"effectiveOpacity"),transparent:mt(function(){var e,t;return!!this.cy().styleEnabled()&&(t=(e=this[0]).cy().hasCompoundNodes(),e?t?0===e.effectiveOpacity():0===e.pstyle("opacity").value:void 0)},"transparent"),backgrounding:mt(function(){return!!this.cy().styleEnabled()&&!!this[0]._private.backgrounding},"backgrounding")},mt(FQ,"checkCompound"),mt(zQ,"defineDerivedStateFunction"),Xoe=BQ("eleTakesUpSpace",function(e){return"element"===e.pstyle("display").value&&0!==e.width()&&(!e.isNode()||0!==e.height())}),pce.takesUpSpace=$Q("takesUpSpace",zQ({ok:Xoe})),lhe=BQ("eleInteractive",function(e){return"yes"===e.pstyle("events").value&&"visible"===e.pstyle("visibility").value&&Xoe(e)}),Dce=BQ("parentInteractive",function(e){return"visible"===e.pstyle("visibility").value&&Xoe(e)}),pce.interactive=$Q("interactive",zQ({ok:lhe,parentOk:Dce,edgeOkViaNode:Xoe})),pce.noninteractive=function(){var e=this[0];if(e)return!e.interactive()},Oce=BQ("eleVisible",function(e){return"visible"===e.pstyle("visibility").value&&0!==e.pstyle("opacity").pfValue&&Xoe(e)}),Mce=Xoe,pce.visible=$Q("visible",zQ({ok:Oce,edgeOkViaNode:Mce})),pce.hidden=function(){var e=this[0];if(e)return!e.visible()},pce.isBundledBezier=$Q("isBundledBezier",function(){return!!this.cy().styleEnabled()&&!this.removed()&&"bezier"===this.pstyle("curve-style").value&&this.takesUpSpace()}),pce.bypass=pce.css=pce.style,pce.renderedCss=pce.renderedStyle,pce.removeBypass=pce.removeCss=pce.removeStyle,pce.pstyle=pce.parsedStyle,Koe={},mt(GQ,"defineSwitchFunction"),mt(UQ,"defineSwitchSet"),UQ({field:"locked",overrideField:mt(function(e){return!!e.cy().autolock()||void 0},"overrideField"),on:"lock",off:"unlock"}),UQ({field:"grabbable",overrideField:mt(function(e){return!e.cy().autoungrabify()&&!e.pannable()&&void 0},"overrideField"),on:"grabify",off:"ungrabify"}),UQ({field:"selected",ableField:"selectable",overrideAble:mt(function(e){return!e.cy().autounselectify()&&void 0},"overrideAble"),on:"select",off:"unselect"}),UQ({field:"selectable",overrideField:mt(function(e){return!e.cy().autounselectify()&&void 0},"overrideField"),on:"selectify",off:"unselectify"}),Koe.deselect=Koe.unselect,Koe.grabbed=function(){var e=this[0];if(e)return e._private.grabbed},UQ({field:"active",on:"activate",off:"unactivate"}),UQ({field:"pannable",on:"panify",off:"unpanify"}),Koe.inactive=function(){var e=this[0];if(e)return!e._private.active},J={},lhe=mt(function(c){return mt(function(e){for(var t=[],r=0;r<this.length;r++){var n=this[r];if(n.isNode()){for(var i=!1,a=n.connectedEdges(),s=0;s<a.length;s++){var o=(l=a[s]).source(),l=l.target();if(c.noIncomingEdges&&l===n&&o!==n||c.noOutgoingEdges&&o===n&&l!==n){i=!0;break}}i||t.push(n)}}return this.spawn(t,!0).filter(e)},"dagExtremityImpl")},"defineDagExtremity"),Dce=mt(function(c){return function(e){for(var t=[],r=0;r<this.length;r++){var n=this[r];if(n.isNode())for(var i=n.connectedEdges(),a=0;a<i.length;a++){var s=i[a],o=s.source(),l=s.target();c.outgoing&&o===n?(t.push(s),t.push(l)):c.incoming&&l===n&&(t.push(s),t.push(o))}}return this.spawn(t,!0).filter(e)}},"defineDagOneHop"),Oce=mt(function(c){return function(e){for(var t=this,r=[],n={};;){var i=c.outgoing?t.outgoers():t.incomers();if(0===i.length)break;for(var a=!1,s=0;s<i.length;s++){var o=i[s],l=o.id();n[l]||(n[l]=!0,r.push(o),a=!0)}if(!a)break;t=i}return this.spawn(r,!0).filter(e)}},"defineDagAllHops"),J.clearTraversalCache=function(){for(var e=0;e<this.length;e++)this[e]._private.traversalCache=null},Xee(J,{roots:lhe({noIncomingEdges:!0}),leaves:lhe({noOutgoingEdges:!0}),outgoers:Hce(Dce({outgoing:!0}),"outgoers"),successors:Oce({outgoing:!0}),incomers:Hce(Dce({incoming:!0}),"incomers"),predecessors:Oce({})}),Xee(J,{neighborhood:Hce(function(e){for(var t=[],r=this.nodes(),n=0;n<r.length;n++)for(var i=r[n],a=i.connectedEdges(),s=0;s<a.length;s++){var o=a[s],l=o.source(),c=o.target();0<(c=i===l?c:l).length&&t.push(c[0]),t.push(o[0])}return this.spawn(t,!0).filter(e)},"neighborhood"),closedNeighborhood:mt(function(e){return this.neighborhood().add(this).filter(e)},"closedNeighborhood"),openNeighborhood:mt(function(e){return this.neighborhood(e)},"openNeighborhood")}),J.neighbourhood=J.neighborhood,J.closedNeighbourhood=J.closedNeighborhood,J.openNeighbourhood=J.openNeighborhood,Xee(J,{source:Hce(mt(function(e){var t,r=this[0];return(t=r?r._private.source||r.cy().collection():t)&&e?t.filter(e):t},"sourceImpl"),"source"),target:Hce(mt(function(e){var t,r=this[0];return(t=r?r._private.target||r.cy().collection():t)&&e?t.filter(e):t},"targetImpl"),"target"),sources:qQ({attr:"source"}),targets:qQ({attr:"target"})}),mt(qQ,"defineSourceFunction"),Xee(J,{edgesWith:Hce(jQ(),"edgesWith"),edgesTo:Hce(jQ({thisIsSrc:!0}),"edgesTo")}),mt(jQ,"defineEdgesWithFunction"),Xee(J,{connectedEdges:Hce(function(e){for(var t=[],r=0;r<this.length;r++){var n=this[r];if(n.isNode())for(var i=n._private.edges,a=0;a<i.length;a++){var s=i[a];t.push(s)}}return this.spawn(t,!0).filter(e)},"connectedEdges"),connectedNodes:Hce(function(e){for(var t=[],r=0;r<this.length;r++){var n=this[r];n.isEdge()&&(t.push(n.source()[0]),t.push(n.target()[0]))}return this.spawn(t,!0).filter(e)},"connectedNodes"),parallelEdges:Hce(YQ(),"parallelEdges"),codirectedEdges:Hce(YQ({codirected:!0}),"codirectedEdges")}),mt(YQ,"defineParallelEdgesFunction"),Xee(J,{components:mt(function(e){var r=this,n=r.cy(),i=n.collection(),a=(null==e?r:e).nodes(),s=[],o=(null!=e&&a.empty()&&(a=e.sources()),mt(function(e,t){i.merge(e),a.unmerge(e),t.merge(e)},"visitInComponent"));if(a.empty())return r.spawn();for(var t=mt(function(){var t=n.collection(),e=(s.push(t),a[0]);o(e,t),r.bfs({directed:!1,roots:e,visit:mt(function(e){return o(e,t)},"visit")}),t.forEach(function(e){e.connectedEdges().forEach(function(e){r.has(e)&&t.has(e.source())&&t.has(e.target())&&t.merge(e)})})},"_loop");t(),0<a.length;);return s},"components"),component:mt(function(){var e=this[0];return e.cy().mutableElements().components(e)[0]},"component")}),J.componentsOf=J.components,Zoe=mt(function(e,t){var r=2<arguments.length&&void 0!==arguments[2]&&arguments[2],n=3<arguments.length&&void 0!==arguments[3]&&arguments[3];if(void 0===e)ire("A collection must have a reference to the core");else{var i=new vre,a=!1;if(t){if(0<t.length&&Cee(t[0])&&!Nee(t[0])){for(var a=!0,s=[],o=new xre,l=0,c=t.length;l<c;l++){var h=t[l],u=(null==h.data&&(h.data={}),h.data);if(null==u.id)u.id=hre();else if(e.hasElementWithId(u.id)||o.has(u.id))continue;h=new bre(e,h,!1),s.push(h),o.add(u.id)}t=s}}else t=[];for(var d=this.length=0,p=t.length;d<p;d++){var g,f=t[d][0];null!=f&&(g=f._private.data.id,r&&i.has(g)||(r&&i.set(g,{index:this.length,ele:f}),this[this.length]=f,this.length++))}this._private={eles:this,cy:e,get map(){return null==this.lazyMap&&this.rebuildMap(),this.lazyMap},set map(e){this.lazyMap=e},rebuildMap:mt(function(){for(var e=this.lazyMap=new vre,t=this.eles,r=0;r<t.length;r++){var n=t[r];e.set(n.id(),{index:r,ele:n})}},"rebuildMap")},r&&(this._private.map=i),a&&!n&&this.restore()}},"Collection"),(Qoe=bre.prototype=Zoe.prototype=Object.create(Array.prototype)).instanceString=function(){return"collection"},Qoe.spawn=function(e,t){return new Zoe(this.cy(),e,t)},Qoe.spawnSelf=function(){return this.spawn(this)},Qoe.cy=function(){return this._private.cy},Qoe.renderer=function(){return this._private.cy.renderer()},Qoe.element=function(){return this[0]},Qoe.collection=function(){return Iee(this)?this:new Zoe(this._private.cy,[this])},Qoe.unique=function(){return new Zoe(this._private.cy,this,!0)},Qoe.hasElementWithId=function(e){return this._private.map.has(e=""+e)},Qoe.getElementById=function(e){var t=this._private.cy;return(e=this._private.map.get(e=""+e))?e.ele:new Zoe(t)},Qoe.$id=Qoe.getElementById,Qoe.poolIndex=function(){var e=this._private.cy._private.elements,t=this[0]._private.data.id;return e._private.map.get(t).index},Qoe.indexOf=function(e){return e=e[0]._private.data.id,this._private.map.get(e).index},Qoe.indexOfId=function(e){return this._private.map.get(e=""+e).index},Qoe.json=function(i){var a,e,t,r,n,s,o,l,c=this.element(),h=this.cy();return null==c&&i?this:null!=c?(a=c._private,Cee(i)?(h.startBatch(),i.data&&(c.data(i.data),e=a.data,c.isEdge()?(s=!1,t={},r=i.data.source,n=i.data.target,null!=r&&r!=e.source&&(t.source=""+r,s=!0),null!=n&&n!=e.target&&(t.target=""+n,s=!0),s&&(c=c.move(t))):(r="parent"in i.data,n=i.data.parent,!r||null==n&&null==e.parent||n==e.parent||(c=c.move({parent:n=null!=(n=void 0===n?null:n)?""+n:n})))),i.position&&c.position(i.position),(s=mt(function(e,t,r){var n=i[e];null!=n&&n!==a[e]&&(n?c[t]():c[r]())},"checkSwitch"))("removed","remove","restore"),s("selected","select","unselect"),s("selectable","selectify","unselectify"),s("locked","lock","unlock"),s("grabbable","grabify","ungrabify"),s("pannable","panify","unpanify"),null!=i.classes&&c.classes(i.classes),h.endBatch(),this):void 0===i?((o={data:lre(a.data),position:lre(a.position),group:a.group,removed:a.removed,selected:a.selected,selectable:a.selectable,locked:a.locked,grabbable:a.grabbable,pannable:a.pannable,classes:null}).classes="",l=0,a.classes.forEach(function(e){return o.classes+=0==l++?e:" "+e}),o):void 0):void 0},Qoe.jsons=function(){for(var e=[],t=0;t<this.length;t++){var r=this[t].json();e.push(r)}return e},Qoe.clone=function(){for(var e=this.cy(),t=[],r=0;r<this.length;r++){var n=this[r].json(),n=new bre(e,n,!1);t.push(n)}return new Zoe(e,t)},Qoe.copy=Qoe.clone,Qoe.restore=function(){for(var e=!(0<arguments.length&&void 0!==arguments[0])||arguments[0],t=!(1<arguments.length&&void 0!==arguments[1])||arguments[1],r=this.cy(),n=r._private,i=[],a=[],s=0,o=this.length;s<o;s++){var l=this[s];t&&!l.removed()||(l.isNode()?i:a).push(l)}for(var c=i.concat(a),h=mt(function(){c.splice(u,1),u--},"removeFromElements"),u=0;u<c.length;u++){var d=c[u],p=d._private,g=p.data;if(d.clearTraversalCache(),t||p.removed)if(void 0===g.id)g.id=hre();else if(he(g.id))g.id=""+g.id;else{if(Oee(g.id)||!kee(g.id)){ire("Can not create element with invalid string ID `"+g.id+"`"),h();continue}if(r.hasElementWithId(g.id)){ire("Can not create second element with ID `"+g.id+"`"),h();continue}}var f=g.id;if(d.isNode()&&(null==(m=p.position).x&&(m.x=0),null==m.y)&&(m.y=0),d.isEdge()){for(var m=d,y=["source","target"],v=y.length,x=!1,b=0;b<v;b++){var w=y[b],k=g[w];null==(k=he(k)?g[w]=""+g[w]:k)||""===k?(ire("Can not create edge `"+f+"` with unspecified "+w),x=!0):r.hasElementWithId(k)||(ire("Can not create edge `"+f+"` with nonexistant "+w+" `"+k+"`"),x=!0)}if(x){h();continue}var T=r.getElementById(g.source),E=r.getElementById(g.target);(T.same(E)?T:(T._private.edges.push(m),E))._private.edges.push(m),m._private.source=T,m._private.target=E}p.map=new vre,p.map.set(f,{ele:d,index:0}),p.removed=!1,t&&r.addToPool(d)}for(var C=0;C<i.length;C++){var _=i[C],S=_._private.data,A=(he(S.parent)&&(S.parent=""+S.parent),S.parent);if(null!=A||_._private.parent)if((A=_._private.parent?r.collection().merge(_._private.parent):r.getElementById(A)).empty())S.parent=void 0;else if(A[0].removed())sre("Node added with missing parent, reference to parent removed"),S.parent=void 0,_._private.parent=null;else{for(var L=!1,N=A;!N.empty();){if(_.same(N)){L=!0,S.parent=void 0;break}N=N.parent()}L||(A[0]._private.children.push(_),_._private.parent=A[0],n.hasCompoundNodes=!0)}}if(0<c.length){for(var I=c.length===this.length?this:new Zoe(r,c),R=0;R<I.length;R++){var M=I[R];M.isNode()||(M.parallelEdges().clearTraversalCache(),M.source().clearTraversalCache(),M.target().clearTraversalCache())}(n.hasCompoundNodes?r.collection().merge(I).merge(I.connectedNodes()).merge(I.parent()):I).dirtyCompoundBoundsCache().dirtyBoundingBoxCache().updateStyle(e),e?I.emitAndNotify("add"):t&&I.emit("add")}return this},Qoe.removed=function(){var e=this[0];return e&&e._private.removed},Qoe.inside=function(){var e=this[0];return e&&!e._private.removed},Qoe.remove=function(){var e=!(0<arguments.length&&void 0!==arguments[0])||arguments[0],r=!(1<arguments.length&&void 0!==arguments[1])||arguments[1],n=[],i={},t=this._private.cy;function a(e){for(var t=e._private.edges,r=0;r<t.length;r++)o(t[r])}function s(e){for(var t=e._private.children,r=0;r<t.length;r++)o(t[r])}function o(e){var t=i[e.id()];r&&e.removed()||t||(i[e.id()]=!0,e.isNode()?(n.push(e),a(e),s(e)):n.unshift(e))}mt(a,"addConnectedEdges"),mt(s,"addChildren"),mt(o,"add");for(var l=0,c=this.length;l<c;l++)o(this[l]);function h(e,t){var r=e._private.edges;pre(r,t),e.clearTraversalCache()}function u(e){e.clearTraversalCache()}mt(h,"removeEdgeRef"),mt(u,"removeParallelRef");var d=[];function p(e,t){t=t[0];var r=(e=e[0])._private.children,n=e.id();pre(r,t),t._private.parent=null,d.ids[n]||(d.ids[n]=!0,d.push(e))}d.ids={},mt(p,"removeChildRef"),this.dirtyCompoundBoundsCache(),r&&t.removeFromPool(n);for(var g=0;g<n.length;g++){var f=n[g];if(f.isEdge()){var m=f.source()[0],y=f.target()[0];h(m,f),h(y,f);for(var v=f.parallelEdges(),x=0;x<v.length;x++){var b=v[x];u(b),b.isBundledBezier()&&b.dirtyBoundingBoxCache()}}else 0!==(m=f.parent()).length&&p(m,f);r&&(f._private.removed=!0)}var w=t._private.elements;t._private.hasCompoundNodes=!1;for(var k=0;k<w.length;k++)if(w[k].isParent()){t._private.hasCompoundNodes=!0;break}var T=new Zoe(this.cy(),n);0<T.size()&&(e?T.emitAndNotify("remove"):r&&T.emit("remove"));for(var E=0;E<d.length;E++){var C=d[E];r&&C.removed()||C.updateStyle()}return T},Qoe.move=function(e){var n,i,a,s,o,t=this._private.cy,l=this,r=mt(function(e){return null==e?e:""+e},"toString");return void 0!==e.source||void 0!==e.target?(n=r(e.source),i=r(e.target),a=null!=n&&t.hasElementWithId(n),s=null!=i&&t.hasElementWithId(i),(a||s)&&(t.batch(function(){l.remove(!1,!1),l.emitAndNotify("moveout");for(var e=0;e<l.length;e++){var t=l[e],r=t._private.data;t.isEdge()&&(a&&(r.source=n),s)&&(r.target=i)}l.restore(!1,!1)}),l.emitAndNotify("move"))):void 0===e.parent||null!==(r=r(e.parent))&&!t.hasElementWithId(r)||(o=null===r?void 0:r,t.batch(function(){var e=l.remove(!1,!1);e.emitAndNotify("moveout");for(var t=0;t<l.length;t++){var r=l[t],n=r._private.data;r.isNode()&&(n.parent=o)}e.restore(!1,!1)}),l.emitAndNotify("move")),this},[zie,Kce,nhe,ihe,Pce,zle,phe,kce,Bce,Ece,Ice,Hoe,Rce,pce,Koe,J].forEach(function(e){Xee(Qoe,e)}),Mce={add:mt(function(e){if(Lee(e)){var t=e;if(t._private.cy===this)a=t.restore();else{for(var r=[],n=0;n<t.length;n++){var i=t[n];r.push(i.json())}a=new Zoe(this,r)}}else if(Eee(e))var a=new Zoe(this,e);else if(Cee(e)&&(Eee(e.nodes)||Eee(e.edges))){for(var s=e,o=[],l=["nodes","edges"],c=0,h=l.length;c<h;c++){var u=l[c],d=s[u];if(Eee(d))for(var p=0,g=d.length;p<g;p++){var f=Xee({group:u},d[p]);o.push(f)}}a=new Zoe(this,o)}else a=new bre(this,e).collection();return a},"add"),remove:mt(function(e){var t;return Lee(e)||kee(e)&&(t=e,e=this.$(t)),e.remove()},"remove")},mt(WQ,"generateCubicBezier"),mt(o,"springAccelerationForState"),mt(l,"springEvaluateStateWithDerivative"),mt(h,"springIntegrateState"),Joe=mt(function e(t,r,n){var i,a,s,o={x:-1,v:0,tension:null,friction:null},l=[0],c=0;for(t=parseFloat(t)||500,r=parseFloat(r)||20,n=n||null,o.tension=t,o.friction=r,a=(i=null!==n)?(c=e(t,r))/n*.016:.016;s=h(s||o,a),l.push(1+s.x),c+=16,1e-4<Math.abs(s.x)&&1e-4<Math.abs(s.v););return i?function(e){return l[e*(l.length-1)|0]}:c},"springRK4Factory"),lhe=mt(function(e,t,r,n){var i=WQ(e,t,r,n);return function(e,t,r){return e+(t-e)*i(r)}},"cubicBezier"),ele={linear:mt(function(e,t,r){return e+(t-e)*r},"linear"),ease:lhe(.25,.1,.25,1),"ease-in":lhe(.42,0,1,1),"ease-out":lhe(0,0,.58,1),"ease-in-out":lhe(.42,0,.58,1),"ease-in-sine":lhe(.47,0,.745,.715),"ease-out-sine":lhe(.39,.575,.565,1),"ease-in-out-sine":lhe(.445,.05,.55,.95),"ease-in-quad":lhe(.55,.085,.68,.53),"ease-out-quad":lhe(.25,.46,.45,.94),"ease-in-out-quad":lhe(.455,.03,.515,.955),"ease-in-cubic":lhe(.55,.055,.675,.19),"ease-out-cubic":lhe(.215,.61,.355,1),"ease-in-out-cubic":lhe(.645,.045,.355,1),"ease-in-quart":lhe(.895,.03,.685,.22),"ease-out-quart":lhe(.165,.84,.44,1),"ease-in-out-quart":lhe(.77,0,.175,1),"ease-in-quint":lhe(.755,.05,.855,.06),"ease-out-quint":lhe(.23,1,.32,1),"ease-in-out-quint":lhe(.86,0,.07,1),"ease-in-expo":lhe(.95,.05,.795,.035),"ease-out-expo":lhe(.19,1,.22,1),"ease-in-out-expo":lhe(1,0,0,1),"ease-in-circ":lhe(.6,.04,.98,.335),"ease-out-circ":lhe(.075,.82,.165,1),"ease-in-out-circ":lhe(.785,.135,.15,.86),spring:mt(function(e,t,r){var n;return 0===r?ele.linear:(n=Joe(e,t,r),function(e,t,r){return e+(t-e)*n(r)})},"spring"),"cubic-bezier":lhe},mt(HQ,"getEasedValue"),mt(VQ,"getValue"),mt(XQ,"ease"),mt(KQ,"step$1"),mt(ZQ,"valid"),mt(QQ,"startAnimation"),mt(JQ,"stepAll"),Dce={animate:Wse.animate(),animation:Wse.animation(),animated:Wse.animated(),clearQueue:Wse.clearQueue(),delay:Wse.delay(),delayAnimation:Wse.delayAnimation(),stop:Wse.stop(),addToAnimationPool:mt(function(e){this.styleEnabled()&&this._private.aniEles.merge(e)},"addToAnimationPool"),stopAnimationLoop:mt(function(){this._private.animationsRunning=!1},"stopAnimationLoop"),startAnimationLoop:mt(function(){var e,r=this;function t(){r._private.animationsRunning&&Bte(mt(function(e){JQ(e,r),t()},"animationStep"))}r._private.animationsRunning=!0,r.styleEnabled()&&(mt(t,"headlessStep"),(e=r.renderer())&&e.beforeRender?e.beforeRender(mt(function(e,t){JQ(t,r)},"rendererAnimationStep"),e.beforeRenderPriorities.animations):t())},"startAnimationLoop")},tle={qualifierCompare:mt(function(e,t){return null==e||null==t?null==e&&null==t:e.sameText(t)},"qualifierCompare"),eventMatches:mt(function(e,t,r){return null==(t=t.qualifier)||e!==r.target&&Nee(r.target)&&t.matches(r.target)},"eventMatches"),addEventFields:mt(function(e,t){t.cy=e,t.target=e},"addEventFields"),callbackContext:mt(function(e,t,r){return null!=t.qualifier?r.target:e},"callbackContext")},rle=mt(function(e){return kee(e)?new uoe(e):e},"argSelector"),Oce={createEmitter:mt(function(){var e=this._private;return e.emitter||(e.emitter=new OQ(tle,this)),this},"createEmitter"),emitter:mt(function(){return this._private.emitter},"emitter"),on:mt(function(e,t,r){return this.emitter().on(e,rle(t),r),this},"on"),removeListener:mt(function(e,t,r){return this.emitter().removeListener(e,rle(t),r),this},"removeListener"),removeAllListeners:mt(function(){return this.emitter().removeAllListeners(),this},"removeAllListeners"),one:mt(function(e,t,r){return this.emitter().one(e,rle(t),r),this},"one"),once:mt(function(e,t,r){return this.emitter().one(e,rle(t),r),this},"once"),emit:mt(function(e,t){return this.emitter().emit(e,t),this},"emit"),emitAndNotify:mt(function(e,t){return this.emit(e),this.notify(e,t),this},"emitAndNotify")},Wse.eventAliasesOn(Oce),(Hce={png:mt(function(e){return this._private.renderer.png(e=e||{})},"png"),jpg:mt(function(e){var t=this._private.renderer;return(e=e||{}).bg=e.bg||"#fff",t.jpg(e)},"jpg")}).jpeg=Hce.jpg,(Kce={layout:mt(function(e){if(null==e)ire("Layout options must be specified to make a layout");else if(null==e.name)ire("A `name` must be specified to make a layout");else{var t,r=e.name,n=this.extension("layout",r);if(null!=n)return t=kee(e.eles)?this.$(e.eles):null!=e.eles?e.eles:this.$(),new n(Xee({},e,{cy:this,eles:t}));ire("No such layout `"+r+"` found. Did you forget to import it and `cytoscape.use()` it?")}},"layout")}).createLayout=Kce.makeLayout=Kce.layout,nhe={notify:mt(function(e,t){var r,n=this._private;this.batching()?(n.batchNotifications=n.batchNotifications||{},r=n.batchNotifications[e]=n.batchNotifications[e]||this.collection(),null!=t&&r.merge(t)):n.notificationsEnabled&&(r=this.renderer(),!this.destroyed())&&r&&r.notify(e,t)},"notify"),notifications:mt(function(e){var t=this._private;return void 0===e?t.notificationsEnabled:(t.notificationsEnabled=!!e,this)},"notifications"),noNotifications:mt(function(e){this.notifications(!1),e(),this.notifications(!0)},"noNotifications"),batching:mt(function(){return 0<this._private.batchCount},"batching"),startBatch:mt(function(){var e=this._private;return null==e.batchCount&&(e.batchCount=0),0===e.batchCount&&(e.batchStyleEles=this.collection(),e.batchNotifications={}),e.batchCount++,this},"startBatch"),endBatch:mt(function(){var r,n=this._private;return 0!==n.batchCount&&(n.batchCount--,0===n.batchCount)&&(n.batchStyleEles.updateStyle(),r=this.renderer(),Object.keys(n.batchNotifications).forEach(function(e){var t=n.batchNotifications[e];t.empty()?r.notify(e):r.notify(e,t)})),this},"endBatch"),batch:mt(function(e){return this.startBatch(),e(),this.endBatch(),this},"batch"),batchData:mt(function(i){var a=this;return this.batch(function(){for(var e=Object.keys(i),t=0;t<e.length;t++){var r=e[t],n=i[r];a.getElementById(r).data(n)}})},"batchData")},nle=ahe({hideEdgesOnViewport:!1,textureOnViewport:!1,motionBlur:!1,motionBlurOpacity:.05,pixelRatio:void 0,desktopTapThreshold:4,touchTapThreshold:8,wheelSensitivity:1,debug:!1,showFps:!1,webgl:!1,webglDebug:!1,webglDebugShowAtlases:!1,webglTexSize:2048,webglTexRows:36,webglTexRowsNodes:18,webglBatchSize:2048,webglTexPerBatch:14,webglBgColor:[255,255,255]}),(ihe={renderTo:mt(function(e,t,r,n){return this._private.renderer.renderTo(e,t,r,n),this},"renderTo"),renderer:mt(function(){return this._private.renderer},"renderer"),forceRender:mt(function(){return this.notify("draw"),this},"forceRender"),resize:mt(function(){return this.invalidateSize(),this.emitAndNotify("resize"),this},"resize"),initRenderer:mt(function(e){var t=this.extension("renderer",e.name);null==t?ire("Can not initialise: No such renderer `".concat(e.name,"` found. Did you forget to import it and `cytoscape.use()` it?")):(void 0!==e.wheelSensitivity&&sre("You have set a custom wheel sensitivity. This will make your app zoom unnaturally when using mainstream mice. You should change this value from the default only if you can guarantee that all your users will use the same hardware and OS configuration as your current machine."),((e=nle(e)).cy=this)._private.renderer=new t(e),this.notify("init"))},"initRenderer"),destroyRenderer:mt(function(){this.notify("destroy");var e=this.container();if(e)for(e._cyreg=null;0<e.childNodes.length;)e.removeChild(e.childNodes[0]);this._private.renderer=null,this.mutableElements().forEach(function(e){(e=e._private).rscratch={},e.rstyle={},e.animation.current=[],e.animation.queue=[]})},"destroyRenderer"),onRender:mt(function(e){return this.on("render",e)},"onRender"),offRender:mt(function(e){return this.off("render",e)},"offRender")}).invalidateDimensions=ihe.resize,(Pce={collection:mt(function(e,t){return kee(e)?this.$(e):Lee(e)?e.collection():Eee(e)?new Zoe(this,e,(t=t||{}).unique,t.removed):new Zoe(this)},"collection"),nodes:mt(function(e){var t=this.$(function(e){return e.isNode()});return e?t.filter(e):t},"nodes"),edges:mt(function(e){var t=this.$(function(e){return e.isEdge()});return e?t.filter(e):t},"edges"),$:mt(function(e){var t=this._private.elements;return e?t.filter(e):t.spawnSelf()},"$"),mutableElements:mt(function(){return this._private.elements},"mutableElements")}).elements=Pce.filter=Pce.$,zle={apply:function(e){for(var t=this._private.cy.collection(),r=0;r<e.length;r++){var n,i=e[r],a=this.getContextMeta(i);a.empty||(n=this.getContextStyle(a),a=this.applyContextStyle(a,n,i),i._private.appliedInitStyle?this.updateTransitions(i,a.diffProps):i._private.appliedInitStyle=!0,this.updateStyleHints(i)&&t.push(i))}return t},getPropertiesDiff:function(e,t){var r=this._private.propDiffs=this._private.propDiffs||{},n=e+"-"+t,i=r[n];if(i)return i;for(var a=[],s={},o=0;o<this.length;o++){var l=this[o],c="t"===e[o],h="t"===t[o],u=0<l.mappedProperties.length;if((c=c!=h)||h&&u){var d=void 0;c&&u||c?d=l.properties:u&&(d=l.mappedProperties);for(var p=0;p<d.length;p++){for(var g=d[p],f=g.name,m=!1,y=o+1;y<this.length;y++){var v=this[y];if("t"===t[y]&&(m=null!=v.properties[g.name]))break}s[f]||m||(s[f]=!0,a.push(f))}}}return r[n]=a},getContextMeta:function(e){for(var t="",r=e._private.styleCxtKey||"",n=0;n<this.length;n++){var i=this[n];t+=i.selector&&i.selector.matches(e)?"t":"f"}return r=this.getPropertiesDiff(r,t),{key:e._private.styleCxtKey=t,diffPropNames:r,empty:0===r.length}},getContextStyle:function(e){var t=e.key;if((e=this._private.contextStyles=this._private.contextStyles||{})[t])return e[t];for(var r={_private:{key:t}},n=0;n<this.length;n++){var i=this[n];if("t"===t[n])for(var a=0;a<i.properties.length;a++){var s=i.properties[a];r[s.name]=s}}return e[t]=r},applyContextStyle:function(e,t,r){for(var n=e.diffPropNames,i={},a=this.types,s=0;s<n.length;s++){var o=n[s],l=t[o],c=r.pstyle(o);if(!l){if(!c)continue;l=c.bypass?{name:o,deleteBypassed:!0}:{name:o,delete:!0}}if(c!==l){if(l.mapped===a.fn&&null!=c&&null!=c.mapping&&c.mapping.value===l.value){var h=c.mapping;if((h.fnValue=l.value(r))===h.prevFnValue)continue}h=i[o]={prev:c},this.applyParsedProperty(r,l),h.next=r.pstyle(o),h.next&&h.next.bypass&&(h.next=h.next.bypassed)}}return{diffProps:i}},updateStyleHints:function(e){var r=e._private,n=this,t=(n.propertyGroupNames,n.propertyGroupKeys),i=mt(function(e,t,r){return n.getPropertiesHash(e,t,r)},"propHash"),a=r.styleKey;if(e.removed())return!1;for(var s="nodes"===r.group,o=e._private.style,l=Object.keys(o),c=0;c<t.length;c++){var h=t[c];r.styleKeys[h]=[9261,5381]}for(var u=mt(function(e,t){return r.styleKeys[t][0]=zte(e,r.styleKeys[t][0])},"updateGrKey1"),d=mt(function(e,t){return r.styleKeys[t][1]=Gte(e,r.styleKeys[t][1])},"updateGrKey2"),p=mt(function(e,t){u(e,t),d(e,t)},"updateGrKey"),g=mt(function(e,t){for(var r=0;r<e.length;r++){var n=e.charCodeAt(r);u(n,t),d(n,t)}},"updateGrKeyWStr"),f=mt(function(e){return-128<e&&e<128&&Math.floor(e)!==e?2e9-(1024*e|0):e},"cleanNum"),m=0;m<l.length;m++){var y,v,x,b,w,k=l[m],T=o[k];null!=T&&(y=(k=this.properties[k]).type,v=k.groupKey,x=void 0,null!=k.hashOverride?x=k.hashOverride(e,T):null!=T.pfValue&&(x=T.pfValue),k=null==k.enums?T.value:null,b=null!=x,w=T.units,!y.number||!b&&null==k||y.multiple?g(T.strValue,v):(p(f(b?x:k),v),b||null==w||g(w,v)))}for(var E=[9261,5381],C=0;C<t.length;C++){var _=t[C],_=r.styleKeys[_];E[0]=zte(_[0],E[0]),E[1]=Gte(_[1],E[1])}r.styleKey=Ute(E[0],E[1]);var S=r.styleKeys,A=(r.labelDimsKey=qte(S.labelDimensions),i(e,["label"],S.labelDimensions));return r.labelKey=qte(A),r.labelStyleKey=qte(jte(S.commonLabel,A)),s||(A=i(e,["source-label"],S.labelDimensions),r.sourceLabelKey=qte(A),r.sourceLabelStyleKey=qte(jte(S.commonLabel,A)),A=i(e,["target-label"],S.labelDimensions),r.targetLabelKey=qte(A),r.targetLabelStyleKey=qte(jte(S.commonLabel,A))),s&&(s=[(i=r.styleKeys).nodeBody,i.nodeBorder,i.nodeOutline,i.backgroundImage,i.compound,S=i.pie,A=i.stripe].filter(function(e){return null!=e}).reduce(jte,[9261,5381]),r.nodeKey=qte(s),r.hasPie=null!=S&&9261!==S[0]&&5381!==S[1],r.hasStripe=null!=A&&9261!==A[0]&&5381!==A[1]),a!==r.styleKey},clearStyleHints:function(e){(e=e._private).styleCxtKey="",e.styleKeys={},e.styleKey=null,e.labelKey=null,e.labelStyleKey=null,e.sourceLabelKey=null,e.sourceLabelStyleKey=null,e.targetLabelKey=null,e.targetLabelStyleKey=null,e.nodeKey=null,e.hasPie=null,e.hasStripe=null},applyParsedProperty:function(r,e){var n=this,i=e,t=r._private.style,a=n.types,s=n.properties[i.name].type,o=i.bypass,l=t[i.name],c=l&&l.bypass,h=r._private,u="mapping",d=mt(function(e){return null==e?null:null!=e.pfValue?e.pfValue:e.value},"getVal"),p=mt(function(){var e=d(l),t=d(i);n.checkTriggers(r,i.name,e,t)},"checkTriggers");if((i="curve-style"===e.name&&r.isEdge()&&("bezier"!==e.value&&r.isLoop()||"haystack"===e.value&&(r.source().isParent()||r.target().isParent()))?e=this.parse(e.name,"bezier",o):i).delete)t[i.name]=void 0;else{if(i.deleteBypassed)return l?!!l.bypass&&(l.bypassed=void 0,p(),!0):(p(),!0);if(i.deleteBypass)return l?!!l.bypass&&(t[i.name]=l.bypassed,p(),!0):(p(),!0);var g=mt(function(){sre("Do not assign mappings to elements without corresponding data (i.e. ele `"+r.id()+"` has no mapping for property `"+i.name+"` with data field `"+i.field+"`); try a `["+i.field+"]` selector to limit scope to elements with `"+i.field+"` defined")},"printMappingErr");switch(i.mapped){case a.mapData:for(var f=i.field.split("."),m=h.data,y=0;y<f.length&&m;y++)m=m[f[y]];if(null==m)return g(),!1;if(!he(m))return sre("Do not use continuous mappers without specifying numeric data (i.e. `"+i.field+": "+m+"` for `"+r.id()+"` is non-numeric)"),!1;var v=i.fieldMax-i.fieldMin;if((v=0==v?0:(m-i.fieldMin)/v)<0?v=0:1<v&&(v=1),s.color)var x=i.valueMin[0],b=i.valueMax[0],w=i.valueMin[1],k=i.valueMax[1],T=i.valueMin[2],E=i.valueMax[2],C=null==i.valueMin[3]?1:i.valueMin[3],_=null==i.valueMax[3]?1:i.valueMax[3],b=[Math.round(x+(b-x)*v),Math.round(w+(k-w)*v),Math.round(T+(E-T)*v),Math.round(C+(_-C)*v)],x={bypass:i.bypass,name:i.name,value:b,strValue:"rgb("+b[0]+", "+b[1]+", "+b[2]+")"};else{if(!s.number)return!1;k=i.valueMin+(i.valueMax-i.valueMin)*v,x=this.parse(i.name,k,i.bypass,u)}if(!x)return g(),!1;x.mapping=i,i=x;break;case a.data:for(var S=i.field.split("."),A=h.data,L=0;L<S.length&&A;L++)A=A[S[L]];if(!(x=null!=A?this.parse(i.name,A,i.bypass,u):x))return g(),!1;x.mapping=i,i=x;break;case a.fn:if(w=i.value,E=null!=i.fnValue?i.fnValue:w(r),null==(i.prevFnValue=E))return sre("Custom function mappers may not return null (i.e. `"+i.name+"` for ele `"+r.id()+"` is null)"),!1;if(!(x=this.parse(i.name,E,i.bypass,u)))return sre("Custom function mappers may not return invalid values for the property type (i.e. `"+i.name+"` for ele `"+r.id()+"` is invalid)"),!1;x.mapping=lre(i),i=x;break;case void 0:break;default:return!1}o?(i.bypassed=c?l.bypassed:l,t[i.name]=i):c?l.bypassed=i:t[i.name]=i}return p(),!0},cleanElements:function(e,t){for(var r=0;r<e.length;r++){var n=e[r];if(this.clearStyleHints(n),n.dirtyCompoundBoundsCache(),n.dirtyBoundingBoxCache(),t)for(var i=n._private.style,a=Object.keys(i),s=0;s<a.length;s++){var o=a[s],l=i[o];null!=l&&(l.bypass?l.bypassed=null:i[o]=null)}else n._private.style={}}},update:function(){this._private.cy.mutableElements().updateStyle()},updateTransitions:function(t,e){var r=this,n=t._private,i=t.pstyle("transition-property").value,a=t.pstyle("transition-duration").pfValue,s=t.pstyle("transition-delay").pfValue;if(0<i.length&&0<a){for(var o={},l=!1,c=0;c<i.length;c++){var h,u,d=i[c],p=t.pstyle(d),g=e[d];g&&(h=g.prev,g=null!=g.next?g.next:p,p=!1,u=void 0,h)&&(he(h.pfValue)&&he(g.pfValue)?(p=g.pfValue-h.pfValue,u=h.pfValue+1e-6*p):he(h.value)&&he(g.value)?(p=g.value-h.value,u=h.value+1e-6*p):Eee(h.value)&&Eee(g.value)&&(p=h.value[0]!==g.value[0]||h.value[1]!==g.value[1]||h.value[2]!==g.value[2],u=h.strValue),p)&&(o[d]=g.strValue,this.applyBypass(t,d,u),l=!0)}l&&(n.transitioning=!0,new Hie(function(e){0<s?t.delayAnimation(s).play().promise().then(e):e()}).then(function(){return t.animation({style:o,duration:a,easing:t.pstyle("transition-timing-function").value,queue:!1}).play().promise()}).then(function(){r.removeBypasses(t,i),t.emitAndNotify("style"),n.transitioning=!1}))}else n.transitioning&&(this.removeBypasses(t,i),t.emitAndNotify("style"),n.transitioning=!1)},checkTrigger:function(e,t,r,n,i,a){i=i(t=this.properties[t]),e.removed()||null!=i&&i(r,n,e)&&a(t)},checkZOrderTrigger:function(e,t,r,n){var i=this;this.checkTrigger(e,t,r,n,function(e){return e.triggersZOrder},function(){i._private.cy.notify("zorder",e)})},checkBoundsTrigger:function(t,e,r,n){this.checkTrigger(t,e,r,n,function(e){return e.triggersBounds},function(e){t.dirtyCompoundBoundsCache(),t.dirtyBoundingBoxCache()})},checkConnectedEdgesBoundsTrigger:function(t,e,r,n){this.checkTrigger(t,e,r,n,function(e){return e.triggersBoundsOfConnectedEdges},function(e){t.connectedEdges().forEach(function(e){e.dirtyBoundingBoxCache()})})},checkParallelEdgesBoundsTrigger:function(t,e,r,n){this.checkTrigger(t,e,r,n,function(e){return e.triggersBoundsOfParallelEdges},function(e){t.parallelEdges().forEach(function(e){e.dirtyBoundingBoxCache()})})},checkTriggers:function(e,t,r,n){e.dirtyStyleCache(),this.checkZOrderTrigger(e,t,r,n),this.checkBoundsTrigger(e,t,r,n),this.checkConnectedEdgesBoundsTrigger(e,t,r,n),this.checkParallelEdgesBoundsTrigger(e,t,r,n)}},phe={applyBypass:function(e,t,r,n){var i=[];if("*"===t||"**"===t){if(void 0!==r)for(var a=0;a<this.properties.length;a++){var s=this.properties[a].name;(s=this.parse(s,r,!0))&&i.push(s)}}else if(kee(t)){var o=this.parse(t,r,!0);o&&i.push(o)}else{if(!Cee(t))return!1;var l=t;n=r;for(var c=Object.keys(l),h=0;h<c.length;h++){var u=c[h],d=l[u];void 0!==(d=void 0===d?l[Uee(u)]:d)&&(u=this.parse(u,d,!0))&&i.push(u)}}if(0===i.length)return!1;for(var p=!1,g=0;g<e.length;g++){for(var f=e[g],m={},y=void 0,v=0;v<i.length;v++){var x,b=i[v];n&&(x=f.pstyle(b.name),y=m[b.name]={prev:x}),p=this.applyParsedProperty(f,lre(b))||p,n&&(y.next=f.pstyle(b.name))}p&&this.updateStyleHints(f),n&&this.updateTransitions(f,m,!0)}return p},overrideBypass:function(e,t,r){t=Gee(t);for(var n=0;n<e.length;n++){var i=e[n],a=i._private.style[t],s=(o=this.properties[t].type).color,o=o.mutiple,l=a?null!=a.pfValue?a.pfValue:a.value:null;a&&a.bypass?(a.value=r,null!=a.pfValue&&(a.pfValue=r),a.strValue=s?"rgb("+r.join(",")+")":o?r.join(" "):""+r,this.updateStyleHints(i)):this.applyBypass(i,t,r),this.checkTriggers(i,t,l,r)}},removeAllBypasses:function(e,t){return this.removeBypasses(e,this.propertyNames,t)},removeBypasses:function(e,t,r){for(var n=0;n<e.length;n++){for(var i=e[n],a={},s=0;s<t.length;s++){var o=t[s],l=this.properties[o],c=i.pstyle(l.name);c&&c.bypass&&(o=this.parse(o,"",!0),c=a[l.name]={prev:c},this.applyParsedProperty(i,o),c.next=i.pstyle(l.name))}this.updateStyleHints(i),r&&this.updateTransitions(i,a,!0)}}},kce={getEmSizeInPixels:function(){var e=this.containerCss("font-size");return null!=e?parseFloat(e):1},containerCss:function(e){var t=this._private.cy,r=t.container();if((t=t.window())&&r&&t.getComputedStyle)return t.getComputedStyle(r).getPropertyValue(e)}},(Bce={getRenderedStyle:function(e,t){return t?this.getStylePropertyValue(e,t,!0):this.getRawStyle(e,!0)},getRawStyle:function(e,t){if(e=e[0]){for(var r={},n=0;n<this.properties.length;n++){var i=this.properties[n],a=this.getStylePropertyValue(e,i.name,t);null!=a&&(r[i.name]=a,r[Uee(i.name)]=a)}return r}},getIndexedStyle:function(e,t,r,n){return e.pstyle(t)[r][n]??e.cy().style().getDefaultProperty(t)[r][0]},getStylePropertyValue:function(e,t,r){if(e=e[0]){var n=(t=(t=this.properties[t]).alias?t.pointsTo:t).type;if(t=e.pstyle(t.name)){var i,a,s,o=t.value,l=t.units,t=t.strValue;if(r&&n.number&&null!=o&&he(o))return i=e.cy().zoom(),a=mt(function(e){return e*i},"getRenderedValue"),s=mt(function(e,t){return a(e)+t},"getValueStringWithUnits"),((r=Eee(o))?l.every(function(e){return null!=e}):null!=l)?r?o.map(function(e,t){return s(e,l[t])}).join(" "):s(o,l):r?o.map(function(e){return kee(e)?e:""+a(e)}).join(" "):""+a(o);if(null!=t)return t}return null}},getAnimationStartStyle:function(e,t){for(var r={},n=0;n<t.length;n++){var i=t[n].name,a=e.pstyle(i);(a=void 0!==a?Cee(a)?this.parse(i,a.strValue):this.parse(i,a):a)&&(r[i]=a)}return r},getPropsList:function(e){var t=[],r=e,n=this.properties;if(r)for(var i=Object.keys(r),a=0;a<i.length;a++){var s=r[o=i[a]],o=n[o]||n[Gee(o)];(o=this.parse(o.name,s))&&t.push(o)}return t},getNonDefaultPropertiesHash:function(e,t,r){for(var n,i,a,s,o=r.slice(),l=0;l<t.length;l++)if(null!=(n=e.pstyle(t[l],!1)))if(null!=n.pfValue)o[0]=zte(a,o[0]),o[1]=Gte(a,o[1]);else for(i=n.strValue,s=0;s<i.length;s++)a=i.charCodeAt(s),o[0]=zte(a,o[0]),o[1]=Gte(a,o[1]);return o}}).getPropertiesHash=Bce.getNonDefaultPropertiesHash,Ece={appendFromJson:function(e){for(var t=0;t<e.length;t++){var r=e[t],n=r.selector,i=r.style||r.css,a=Object.keys(i);this.selector(n);for(var s=0;s<a.length;s++){var o=a[s],l=i[o];this.css(o,l)}}return this},fromJson:function(e){return this.resetToDefault(),this.appendFromJson(e),this},json:function(){for(var e=[],t=this.defaultLength;t<this.length;t++){for(var r=this[t],n=r.selector,i=r.properties,a={},s=0;s<i.length;s++){var o=i[s];a[o.name]=o.strValue}e.push({selector:n?n.toString():"core",style:a})}return e}},Ice={appendFromString:function(e){var t=""+e;function r(){t=t.length>a.length?t.substr(a.length):""}function n(){c=c.length>u.length?c.substr(u.length):""}for(t=t.replace(/[/][*](\s|.)+?[*][/]/g,""),mt(r,"removeSelAndBlockFromRemaining"),mt(n,"removePropAndValFromRem");!t.match(/^\s*$/);){var i=t.match(/^\s*((?:.|\s)+?)\s*\{((?:.|\s)+?)\}/);if(!i){sre("Halting stylesheet parsing: String stylesheet contains more to parse but no selector and block found in: "+t);break}var a=i[0],s=i[1];if("core"!==s&&new uoe(s).invalid)sre("Skipping parsing of block: Invalid selector found in string stylesheet: "+s);else{for(var o=i[2],l=!1,c=o,h=[];!c.match(/^\s*$/);){if(!(p=c.match(/^\s*(.+?)\s*:\s*(.+?)(?:\s*;|\s*$)/))){sre("Skipping parsing of block: Invalid formatting of style property and value definitions found in:"+o),l=!0;break}var u=p[0],d=p[1],p=p[2];this.properties[d]?this.parse(d,p)?h.push({name:d,val:p}):sre("Skipping property: Invalid property definition in: "+u):sre("Skipping property: Invalid property name in: "+u),n()}if(l){r();break}this.selector(s);for(var g=0;g<h.length;g++){var f=h[g];this.css(f.name,f.val)}}r()}return this},fromString:function(e){return this.resetToDefault(),this.appendFromString(e),this}},ile={};var a=Wee,s=mt(function(e){return"^"+e+"\\s*\\(\\s*([\\w\\.]+)\\s*\\)$"},"data"),c=mt(function(e){var t=a+"|\\w+|rgb[a]?\\((?:(?:[-+]?(?:(?:\\d+|\\d*\\.\\d+)(?:[Ee][+-]?\\d+)?))[%]?)\\s*,\\s*(?:(?:[-+]?(?:(?:\\d+|\\d*\\.\\d+)(?:[Ee][+-]?\\d+)?))[%]?)\\s*,\\s*(?:(?:[-+]?(?:(?:\\d+|\\d*\\.\\d+)(?:[Ee][+-]?\\d+)?))[%]?)(?:\\s*,\\s*(?:(?:[-+]?(?:(?:\\d+|\\d*\\.\\d+)(?:[Ee][+-]?\\d+)?))))?\\)|hsl[a]?\\((?:(?:[-+]?(?:(?:\\d+|\\d*\\.\\d+)(?:[Ee][+-]?\\d+)?)))\\s*,\\s*(?:(?:[-+]?(?:(?:\\d+|\\d*\\.\\d+)(?:[Ee][+-]?\\d+)?))[%])\\s*,\\s*(?:(?:[-+]?(?:(?:\\d+|\\d*\\.\\d+)(?:[Ee][+-]?\\d+)?))[%])(?:\\s*,\\s*(?:(?:[-+]?(?:(?:\\d+|\\d*\\.\\d+)(?:[Ee][+-]?\\d+)?))))?\\)|\\#[0-9a-fA-F]{3}|\\#[0-9a-fA-F]{6}";return"^"+e+"\\s*\\(([\\w\\.]+)\\s*\\,\\s*("+a+")\\s*\\,\\s*("+a+")\\s*,\\s*("+t+")\\s*\\,\\s*("+t+")\\)$"},"mapData"),u=[`^url\\s*\\(\\s*['"]?(.+?)['"]?\\s*\\)$`,"^(none)$","^(.+)$"],s=(ile.types={time:{number:!0,min:0,units:"s|ms",implicitUnits:"ms"},percent:{number:!0,min:0,max:100,units:"%",implicitUnits:"%"},percentages:{number:!0,min:0,max:100,units:"%",implicitUnits:"%",multiple:!0},zeroOneNumber:{number:!0,min:0,max:1,unitless:!0},zeroOneNumbers:{number:!0,min:0,max:1,unitless:!0,multiple:!0},nOneOneNumber:{number:!0,min:-1,max:1,unitless:!0},nonNegativeInt:{number:!0,min:0,integer:!0,unitless:!0},nonNegativeNumber:{number:!0,min:0,unitless:!0},position:{enums:["parent","origin"]},nodeSize:{number:!0,min:0,enums:["label"]},number:{number:!0,unitless:!0},numbers:{number:!0,unitless:!0,multiple:!0},positiveNumber:{number:!0,unitless:!0,min:0,strictMin:!0},size:{number:!0,min:0},bidirectionalSize:{number:!0},bidirectionalSizeMaybePercent:{number:!0,allowPercent:!0},bidirectionalSizes:{number:!0,multiple:!0},sizeMaybePercent:{number:!0,min:0,allowPercent:!0},axisDirection:{enums:["horizontal","leftward","rightward","vertical","upward","downward","auto"]},axisDirectionExplicit:{enums:["leftward","rightward","upward","downward"]},axisDirectionPrimary:{enums:["horizontal","vertical"]},paddingRelativeTo:{enums:["width","height","average","min","max"]},bgWH:{number:!0,min:0,allowPercent:!0,enums:["auto"],multiple:!0},bgPos:{number:!0,allowPercent:!0,multiple:!0},bgRelativeTo:{enums:["inner","include-padding"],multiple:!0},bgRepeat:{enums:["repeat","repeat-x","repeat-y","no-repeat"],multiple:!0},bgFit:{enums:["none","contain","cover"],multiple:!0},bgCrossOrigin:{enums:["anonymous","use-credentials","null"],multiple:!0},bgClip:{enums:["none","node"],multiple:!0},bgContainment:{enums:["inside","over"],multiple:!0},boxSelection:{enums:["contain","overlap","none"]},color:{color:!0},colors:{color:!0,multiple:!0},fill:{enums:["solid","linear-gradient","radial-gradient"]},bool:{enums:["yes","no"]},bools:{enums:["yes","no"],multiple:!0},lineStyle:{enums:["solid","dotted","dashed"]},lineCap:{enums:["butt","round","square"]},linePosition:{enums:["center","inside","outside"]},lineJoin:{enums:["round","bevel","miter"]},borderStyle:{enums:["solid","dotted","dashed","double"]},curveStyle:{enums:["bezier","unbundled-bezier","haystack","segments","straight","straight-triangle","taxi","round-segments","round-taxi"]},radiusType:{enums:["arc-radius","influence-radius"],multiple:!0},fontFamily:{regex:'^([\\w- \\"]+(?:\\s*,\\s*[\\w- \\"]+)*)$'},fontStyle:{enums:["italic","normal","oblique"]},fontWeight:{enums:["normal","bold","bolder","lighter","100","200","300","400","500","600","800","900",100,200,300,400,500,600,700,800,900]},textDecoration:{enums:["none","underline","overline","line-through"]},textTransform:{enums:["none","uppercase","lowercase"]},textWrap:{enums:["none","wrap","ellipsis"]},textOverflowWrap:{enums:["whitespace","anywhere"]},textBackgroundShape:{enums:["rectangle","roundrectangle","round-rectangle","circle"]},nodeShape:{enums:["rectangle","roundrectangle","round-rectangle","cutrectangle","cut-rectangle","bottomroundrectangle","bottom-round-rectangle","barrel","ellipse","triangle","round-triangle","square","pentagon","round-pentagon","hexagon","round-hexagon","concavehexagon","concave-hexagon","heptagon","round-heptagon","octagon","round-octagon","tag","round-tag","star","diamond","round-diamond","vee","rhomboid","right-rhomboid","polygon"]},overlayShape:{enums:["roundrectangle","round-rectangle","ellipse"]},cornerRadius:{number:!0,min:0,units:"px|em",implicitUnits:"px",enums:["auto"]},compoundIncludeLabels:{enums:["include","exclude"]},arrowShape:{enums:["tee","triangle","triangle-tee","circle-triangle","triangle-cross","triangle-backcurve","vee","square","circle","diamond","chevron","none"]},arrowFill:{enums:["filled","hollow"]},arrowWidth:{number:!0,units:"%|px|em",implicitUnits:"px",enums:["match-line"]},display:{enums:["element","none"]},visibility:{enums:["hidden","visible"]},zCompoundDepth:{enums:["bottom","orphan","auto","top"]},zIndexCompare:{enums:["auto","manual"]},valign:{enums:["top","center","bottom"]},halign:{enums:["left","center","right"]},justification:{enums:["left","center","right","auto"]},text:{string:!0},data:{mapping:!0,regex:s("data")},layoutData:{mapping:!0,regex:s("layoutData")},scratch:{mapping:!0,regex:s("scratch")},mapData:{mapping:!0,regex:c("mapData")},mapLayoutData:{mapping:!0,regex:c("mapLayoutData")},mapScratch:{mapping:!0,regex:c("mapScratch")},fn:{mapping:!0,fn:!0},url:{regexes:u,singleRegexMatchValue:!0},urls:{regexes:u,singleRegexMatchValue:!0,multiple:!0},propList:{propList:!0},angle:{number:!0,units:"deg|rad",implicitUnits:"rad"},textRotation:{number:!0,units:"deg|rad",implicitUnits:"rad",enums:["none","autorotate"]},polygonPointList:{number:!0,multiple:!0,evenMultiple:!0,min:-1,max:1,unitless:!0},edgeDistances:{enums:["intersection","node-position","endpoints"]},edgeEndpoint:{number:!0,multiple:!0,units:"%|px|em|deg|rad",implicitUnits:"px",enums:["inside-to-node","outside-to-node","outside-to-node-or-label","outside-to-line","outside-to-line-or-label"],singleEnum:!0,validate:mt(function(e,t){switch(e.length){case 2:return"deg"!==t[0]&&"rad"!==t[0]&&"deg"!==t[1]&&"rad"!==t[1];case 1:return kee(e[0])||"deg"===t[0]||"rad"===t[0];default:return!1}},"validate")},easing:{regexes:["^(spring)\\s*\\(\\s*("+a+")\\s*,\\s*("+a+")\\s*\\)$","^(cubic-bezier)\\s*\\(\\s*("+a+")\\s*,\\s*("+a+")\\s*,\\s*("+a+")\\s*,\\s*("+a+")\\s*\\)$"],enums:["linear","ease","ease-in","ease-out","ease-in-out","ease-in-sine","ease-out-sine","ease-in-out-sine","ease-in-quad","ease-out-quad","ease-in-out-quad","ease-in-cubic","ease-out-cubic","ease-in-out-cubic","ease-in-quart","ease-out-quart","ease-in-out-quart","ease-in-quint","ease-out-quint","ease-in-out-quint","ease-in-expo","ease-out-expo","ease-in-out-expo","ease-in-circ","ease-out-circ","ease-in-out-circ"]},gradientDirection:{enums:["to-bottom","to-top","to-left","to-right","to-bottom-right","to-bottom-left","to-top-right","to-top-left","to-right-bottom","to-left-bottom","to-right-top","to-left-top"]},boundsExpansion:{number:!0,multiple:!0,min:0,validate:mt(function(e){return 1===(e=e.length)||2===e||4===e},"validate")}},{zeroNonZero:mt(function(e,t){return(null==e||null==t)&&e!==t||0==e&&0!=t||0!=e&&0==t},"zeroNonZero"),any:mt(function(e,t){return e!=t},"any"),emptyNonEmpty:mt(function(e,t){return e=Oee(e),t=Oee(t),e&&!t||!e&&t},"emptyNonEmpty")}),d=ile.types,c=[{name:"label",type:d.text,triggersBounds:s.any,triggersZOrder:s.emptyNonEmpty},{name:"text-rotation",type:d.textRotation,triggersBounds:s.any},{name:"text-margin-x",type:d.bidirectionalSize,triggersBounds:s.any},{name:"text-margin-y",type:d.bidirectionalSize,triggersBounds:s.any}],u=[{name:"source-label",type:d.text,triggersBounds:s.any},{name:"source-text-rotation",type:d.textRotation,triggersBounds:s.any},{name:"source-text-margin-x",type:d.bidirectionalSize,triggersBounds:s.any},{name:"source-text-margin-y",type:d.bidirectionalSize,triggersBounds:s.any},{name:"source-text-offset",type:d.size,triggersBounds:s.any}],p=[{name:"target-label",type:d.text,triggersBounds:s.any},{name:"target-text-rotation",type:d.textRotation,triggersBounds:s.any},{name:"target-text-margin-x",type:d.bidirectionalSize,triggersBounds:s.any},{name:"target-text-margin-y",type:d.bidirectionalSize,triggersBounds:s.any},{name:"target-text-offset",type:d.size,triggersBounds:s.any}],g=[{name:"font-family",type:d.fontFamily,triggersBounds:s.any},{name:"font-style",type:d.fontStyle,triggersBounds:s.any},{name:"font-weight",type:d.fontWeight,triggersBounds:s.any},{name:"font-size",type:d.size,triggersBounds:s.any},{name:"text-transform",type:d.textTransform,triggersBounds:s.any},{name:"text-wrap",type:d.textWrap,triggersBounds:s.any},{name:"text-overflow-wrap",type:d.textOverflowWrap,triggersBounds:s.any},{name:"text-max-width",type:d.size,triggersBounds:s.any},{name:"text-outline-width",type:d.size,triggersBounds:s.any},{name:"line-height",type:d.positiveNumber,triggersBounds:s.any}],f=[{name:"text-valign",type:d.valign,triggersBounds:s.any},{name:"text-halign",type:d.halign,triggersBounds:s.any},{name:"color",type:d.color},{name:"text-outline-color",type:d.color},{name:"text-outline-opacity",type:d.zeroOneNumber},{name:"text-background-color",type:d.color},{name:"text-background-opacity",type:d.zeroOneNumber},{name:"text-background-padding",type:d.size,triggersBounds:s.any},{name:"text-border-opacity",type:d.zeroOneNumber},{name:"text-border-color",type:d.color},{name:"text-border-width",type:d.size,triggersBounds:s.any},{name:"text-border-style",type:d.borderStyle,triggersBounds:s.any},{name:"text-background-shape",type:d.textBackgroundShape,triggersBounds:s.any},{name:"text-justification",type:d.justification},{name:"box-select-labels",type:d.bool,triggersBounds:s.any}],m=[{name:"events",type:d.bool,triggersZOrder:s.any},{name:"text-events",type:d.bool,triggersZOrder:s.any},{name:"box-selection",type:d.boxSelection,triggersZOrder:s.any}],y=[{name:"display",type:d.display,triggersZOrder:s.any,triggersBounds:s.any,triggersBoundsOfConnectedEdges:s.any,triggersBoundsOfParallelEdges:mt(function(e,t,r){return e!==t&&"bezier"===r.pstyle("curve-style").value},"triggersBoundsOfParallelEdges")},{name:"visibility",type:d.visibility,triggersZOrder:s.any},{name:"opacity",type:d.zeroOneNumber,triggersZOrder:s.zeroNonZero},{name:"text-opacity",type:d.zeroOneNumber},{name:"min-zoomed-font-size",type:d.size},{name:"z-compound-depth",type:d.zCompoundDepth,triggersZOrder:s.any},{name:"z-index-compare",type:d.zIndexCompare,triggersZOrder:s.any},{name:"z-index",type:d.number,triggersZOrder:s.any}],P=[{name:"overlay-padding",type:d.size,triggersBounds:s.any},{name:"overlay-color",type:d.color},{name:"overlay-opacity",type:d.zeroOneNumber,triggersBounds:s.zeroNonZero},{name:"overlay-shape",type:d.overlayShape,triggersBounds:s.any},{name:"overlay-corner-radius",type:d.cornerRadius}],B=[{name:"underlay-padding",type:d.size,triggersBounds:s.any},{name:"underlay-color",type:d.color},{name:"underlay-opacity",type:d.zeroOneNumber,triggersBounds:s.zeroNonZero},{name:"underlay-shape",type:d.overlayShape,triggersBounds:s.any},{name:"underlay-corner-radius",type:d.cornerRadius}],$=[{name:"transition-property",type:d.propList},{name:"transition-duration",type:d.time},{name:"transition-delay",type:d.time},{name:"transition-timing-function",type:d.easing}],v=mt(function(e,t){return"label"===t.value?-e.poolIndex():t.pfValue},"nodeSizeHashOverride"),v=[{name:"height",type:d.nodeSize,triggersBounds:s.any,hashOverride:v},{name:"width",type:d.nodeSize,triggersBounds:s.any,hashOverride:v},{name:"shape",type:d.nodeShape,triggersBounds:s.any},{name:"shape-polygon-points",type:d.polygonPointList,triggersBounds:s.any},{name:"corner-radius",type:d.cornerRadius},{name:"background-color",type:d.color},{name:"background-fill",type:d.fill},{name:"background-opacity",type:d.zeroOneNumber},{name:"background-blacken",type:d.nOneOneNumber},{name:"background-gradient-stop-colors",type:d.colors},{name:"background-gradient-stop-positions",type:d.percentages},{name:"background-gradient-direction",type:d.gradientDirection},{name:"padding",type:d.sizeMaybePercent,triggersBounds:s.any},{name:"padding-relative-to",type:d.paddingRelativeTo,triggersBounds:s.any},{name:"bounds-expansion",type:d.boundsExpansion,triggersBounds:s.any}],F=[{name:"border-color",type:d.color},{name:"border-opacity",type:d.zeroOneNumber},{name:"border-width",type:d.size,triggersBounds:s.any},{name:"border-style",type:d.borderStyle},{name:"border-cap",type:d.lineCap},{name:"border-join",type:d.lineJoin},{name:"border-dash-pattern",type:d.numbers},{name:"border-dash-offset",type:d.number},{name:"border-position",type:d.linePosition}],z=[{name:"outline-color",type:d.color},{name:"outline-opacity",type:d.zeroOneNumber},{name:"outline-width",type:d.size,triggersBounds:s.any},{name:"outline-style",type:d.borderStyle},{name:"outline-offset",type:d.size,triggersBounds:s.any}],G=[{name:"background-image",type:d.urls},{name:"background-image-crossorigin",type:d.bgCrossOrigin},{name:"background-image-opacity",type:d.zeroOneNumbers},{name:"background-image-containment",type:d.bgContainment},{name:"background-image-smoothing",type:d.bools},{name:"background-position-x",type:d.bgPos},{name:"background-position-y",type:d.bgPos},{name:"background-width-relative-to",type:d.bgRelativeTo},{name:"background-height-relative-to",type:d.bgRelativeTo},{name:"background-repeat",type:d.bgRepeat},{name:"background-fit",type:d.bgFit},{name:"background-clip",type:d.bgClip},{name:"background-width",type:d.bgWH},{name:"background-height",type:d.bgWH},{name:"background-offset-x",type:d.bgPos},{name:"background-offset-y",type:d.bgPos}],U=[{name:"position",type:d.position,triggersBounds:s.any},{name:"compound-sizing-wrt-labels",type:d.compoundIncludeLabels,triggersBounds:s.any},{name:"min-width",type:d.size,triggersBounds:s.any},{name:"min-width-bias-left",type:d.sizeMaybePercent,triggersBounds:s.any},{name:"min-width-bias-right",type:d.sizeMaybePercent,triggersBounds:s.any},{name:"min-height",type:d.size,triggersBounds:s.any},{name:"min-height-bias-top",type:d.sizeMaybePercent,triggersBounds:s.any},{name:"min-height-bias-bottom",type:d.sizeMaybePercent,triggersBounds:s.any}],q=[{name:"line-style",type:d.lineStyle},{name:"line-color",type:d.color},{name:"line-fill",type:d.fill},{name:"line-cap",type:d.lineCap},{name:"line-opacity",type:d.zeroOneNumber},{name:"line-dash-pattern",type:d.numbers},{name:"line-dash-offset",type:d.number},{name:"line-outline-width",type:d.size},{name:"line-outline-color",type:d.color},{name:"line-gradient-stop-colors",type:d.colors},{name:"line-gradient-stop-positions",type:d.percentages},{name:"curve-style",type:d.curveStyle,triggersBounds:s.any,triggersBoundsOfParallelEdges:mt(function(e,t){return e!==t&&("bezier"===e||"bezier"===t)},"triggersBoundsOfParallelEdges")},{name:"haystack-radius",type:d.zeroOneNumber,triggersBounds:s.any},{name:"source-endpoint",type:d.edgeEndpoint,triggersBounds:s.any},{name:"target-endpoint",type:d.edgeEndpoint,triggersBounds:s.any},{name:"control-point-step-size",type:d.size,triggersBounds:s.any},{name:"control-point-distances",type:d.bidirectionalSizes,triggersBounds:s.any},{name:"control-point-weights",type:d.numbers,triggersBounds:s.any},{name:"segment-distances",type:d.bidirectionalSizes,triggersBounds:s.any},{name:"segment-weights",type:d.numbers,triggersBounds:s.any},{name:"segment-radii",type:d.numbers,triggersBounds:s.any},{name:"radius-type",type:d.radiusType,triggersBounds:s.any},{name:"taxi-turn",type:d.bidirectionalSizeMaybePercent,triggersBounds:s.any},{name:"taxi-turn-min-distance",type:d.size,triggersBounds:s.any},{name:"taxi-direction",type:d.axisDirection,triggersBounds:s.any},{name:"taxi-radius",type:d.number,triggersBounds:s.any},{name:"edge-distances",type:d.edgeDistances,triggersBounds:s.any},{name:"arrow-scale",type:d.positiveNumber,triggersBounds:s.any},{name:"loop-direction",type:d.angle,triggersBounds:s.any},{name:"loop-sweep",type:d.angle,triggersBounds:s.any},{name:"source-distance-from-node",type:d.size,triggersBounds:s.any},{name:"target-distance-from-node",type:d.size,triggersBounds:s.any}],j=[{name:"ghost",type:d.bool,triggersBounds:s.any},{name:"ghost-offset-x",type:d.bidirectionalSize,triggersBounds:s.any},{name:"ghost-offset-y",type:d.bidirectionalSize,triggersBounds:s.any},{name:"ghost-opacity",type:d.zeroOneNumber}],Y=[{name:"selection-box-color",type:d.color},{name:"selection-box-opacity",type:d.zeroOneNumber},{name:"selection-box-border-color",type:d.color},{name:"selection-box-border-width",type:d.size},{name:"active-bg-color",type:d.color},{name:"active-bg-opacity",type:d.zeroOneNumber},{name:"active-bg-size",type:d.size},{name:"outside-texture-bg-color",type:d.color},{name:"outside-texture-bg-opacity",type:d.zeroOneNumber}],x=[];ile.pieBackgroundN=16,x.push({name:"pie-size",type:d.sizeMaybePercent}),x.push({name:"pie-hole",type:d.sizeMaybePercent}),x.push({name:"pie-start-angle",type:d.angle});for(var b=1;b<=ile.pieBackgroundN;b++)x.push({name:"pie-"+b+"-background-color",type:d.color}),x.push({name:"pie-"+b+"-background-size",type:d.percent}),x.push({name:"pie-"+b+"-background-opacity",type:d.zeroOneNumber});var w=[];ile.stripeBackgroundN=16,w.push({name:"stripe-size",type:d.sizeMaybePercent}),w.push({name:"stripe-direction",type:d.axisDirectionPrimary});for(var k=1;k<=ile.stripeBackgroundN;k++)w.push({name:"stripe-"+k+"-background-color",type:d.color}),w.push({name:"stripe-"+k+"-background-size",type:d.percent}),w.push({name:"stripe-"+k+"-background-opacity",type:d.zeroOneNumber});var T=[],W=ile.arrowPrefixes=["source","mid-source","target","mid-target"],E=([{name:"arrow-shape",type:d.arrowShape,triggersBounds:s.any},{name:"arrow-color",type:d.color},{name:"arrow-fill",type:d.arrowFill},{name:"arrow-width",type:d.arrowWidth}].forEach(function(t){W.forEach(function(e){e=e+"-"+t.name,T.push({name:e,type:t.type,triggersBounds:t.triggersBounds})})},{}),ile.properties=[].concat(m,$,y,P,B,j,f,g,c,u,p,v,F,z,G,x,w,U,q,T,Y)),C=ile.propertyGroups={behavior:m,transition:$,visibility:y,overlay:P,underlay:B,ghost:j,commonLabel:f,labelDimensions:g,mainLabel:c,sourceLabel:u,targetLabel:p,nodeBody:v,nodeBorder:F,nodeOutline:z,backgroundImage:G,pie:x,stripe:w,compound:U,edgeLine:q,edgeArrow:T,core:Y},H=ile.propertyGroupNames={},V=((ile.propertyGroupKeys=Object.keys(C)).forEach(function(t){H[t]=C[t].map(function(e){return e.name}),C[t].forEach(function(e){return e.groupKey=t})}),ile.aliases=[{name:"content",pointsTo:"label"},{name:"control-point-distance",pointsTo:"control-point-distances"},{name:"control-point-weight",pointsTo:"control-point-weights"},{name:"segment-distance",pointsTo:"segment-distances"},{name:"segment-weight",pointsTo:"segment-weights"},{name:"segment-radius",pointsTo:"segment-radii"},{name:"edge-text-rotation",pointsTo:"text-rotation"},{name:"padding-left",pointsTo:"padding"},{name:"padding-right",pointsTo:"padding"},{name:"padding-top",pointsTo:"padding"},{name:"padding-bottom",pointsTo:"padding"}]);ile.propertyNames=E.map(function(e){return e.name});for(var _=0;_<E.length;_++){var X=E[_];E[X.name]=X}for(var S=0;S<V.length;S++){var A=V[S],L=E[A.pointsTo];E.push(L={name:A.name,alias:!0,pointsTo:L}),E[A.name]=L}function N(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:tre;WK(this,N),this.idsByKey=new vre,this.keyForId=new vre,this.cachesByLvl=new vre,this.lvls=[],this.getKey=e,this.doesEleInvalidateKey=t}function I(e,t,r,n){WK(this,I),this.r=e,this.texSize=t,this.texRows=r,this.createTextureCanvas=n,this.atlases=[],this.styleKeyToAtlas=new Map,this.markedKeys=new Set}function R(e,t,r,n){WK(this,R),this.debugID=Math.floor(1e4*Math.random()),this.r=e,this.texSize=t,this.texRows=r,this.texHeight=Math.floor(t/r),this.enableWrapping=!0,this.locked=!1,this.texture=null,this.needsBuffer=!0,this.freePointer={x:0,row:0},this.keyToLocation=new Map,this.canvas=n(e,t,t),this.scratch=n(e,t,this.texHeight,"scratch")}function M(e,t,r){WK(this,M),this.r=e,this.gl=t,this.maxInstances=r.webglBatchSize,this.atlasSize=r.webglTexSize,this.bgColor=r.bgColor,this.debug=r.webglDebug,this.batchDebugInfo=[],r.enableWrapping=!0,r.createTextureCanvas=kJ,this.atlasManager=new Uce(e,r),this.batchManager=new qce(r),this.simpleShapeOptions=new Map,this.program=this._createShaderProgram(jce.SCREEN),this.pickingProgram=this._createShaderProgram(jce.PICKING),this.vao=this._createVAO()}function D(e){WK(this,D),this.globalOptions=e,this.atlasSize=e.webglTexSize,this.maxAtlasesPerBatch=e.webglTexPerBatch,this.batchAtlases=[]}function O(e,t){WK(this,O),this.r=e,this.globalOptions=t,this.atlasSize=t.webglTexSize,this.maxAtlasesPerBatch=t.webglTexPerBatch,this.renderTypes=new Map,this.collections=new Map,this.typeAndIdToKey=new Map}for(ile.getDefaultProperty=function(e){return this.getDefaultProperties()[e]},ile.getDefaultProperties=function(){var e=this._private;if(null==e.defaultProperties){for(var t=Xee({"selection-box-color":"#ddd","selection-box-opacity":.65,"selection-box-border-color":"#aaa","selection-box-border-width":1,"active-bg-color":"black","active-bg-opacity":.15,"active-bg-size":30,"outside-texture-bg-color":"#000","outside-texture-bg-opacity":.125,events:"yes","text-events":"no","text-valign":"top","text-halign":"center","text-justification":"auto","line-height":1,color:"#000","box-selection":"contain","text-outline-color":"#000","text-outline-width":0,"text-outline-opacity":1,"text-opacity":1,"text-decoration":"none","text-transform":"none","text-wrap":"none","text-overflow-wrap":"whitespace","text-max-width":9999,"text-background-color":"#000","text-background-opacity":0,"text-background-shape":"rectangle","text-background-padding":0,"text-border-opacity":0,"text-border-width":0,"text-border-style":"solid","text-border-color":"#000","font-family":"Helvetica Neue, Helvetica, sans-serif","font-style":"normal","font-weight":"normal","font-size":16,"min-zoomed-font-size":0,"text-rotation":"none","source-text-rotation":"none","target-text-rotation":"none",visibility:"visible",display:"element",opacity:1,"z-compound-depth":"auto","z-index-compare":"auto","z-index":0,label:"","text-margin-x":0,"text-margin-y":0,"source-label":"","source-text-offset":0,"source-text-margin-x":0,"source-text-margin-y":0,"target-label":"","target-text-offset":0,"target-text-margin-x":0,"target-text-margin-y":0,"overlay-opacity":0,"overlay-color":"#000","overlay-padding":10,"overlay-shape":"round-rectangle","overlay-corner-radius":"auto","underlay-opacity":0,"underlay-color":"#000","underlay-padding":10,"underlay-shape":"round-rectangle","underlay-corner-radius":"auto","transition-property":"none","transition-duration":0,"transition-delay":0,"transition-timing-function":"linear","box-select-labels":"no","background-blacken":0,"background-color":"#999","background-fill":"solid","background-opacity":1,"background-image":"none","background-image-crossorigin":"anonymous","background-image-opacity":1,"background-image-containment":"inside","background-image-smoothing":"yes","background-position-x":"50%","background-position-y":"50%","background-offset-x":0,"background-offset-y":0,"background-width-relative-to":"include-padding","background-height-relative-to":"include-padding","background-repeat":"no-repeat","background-fit":"none","background-clip":"node","background-width":"auto","background-height":"auto","border-color":"#000","border-opacity":1,"border-width":0,"border-style":"solid","border-dash-pattern":[4,2],"border-dash-offset":0,"border-cap":"butt","border-join":"miter","border-position":"center","outline-color":"#999","outline-opacity":1,"outline-width":0,"outline-offset":0,"outline-style":"solid",height:30,width:30,shape:"ellipse","shape-polygon-points":"-1, -1, 1, -1, 1, 1, -1, 1","corner-radius":"auto","bounds-expansion":0,"background-gradient-direction":"to-bottom","background-gradient-stop-colors":"#999","background-gradient-stop-positions":"0%",ghost:"no","ghost-offset-y":0,"ghost-offset-x":0,"ghost-opacity":0,padding:0,"padding-relative-to":"width",position:"origin","compound-sizing-wrt-labels":"include","min-width":0,"min-width-bias-left":0,"min-width-bias-right":0,"min-height":0,"min-height-bias-top":0,"min-height-bias-bottom":0},{"pie-size":"100%","pie-hole":0,"pie-start-angle":"0deg"},[{name:"pie-{{i}}-background-color",value:"black"},{name:"pie-{{i}}-background-size",value:"0%"},{name:"pie-{{i}}-background-opacity",value:1}].reduce(function(e,t){for(var r=1;r<=ile.pieBackgroundN;r++){var n=t.name.replace("{{i}}",r),i=t.value;e[n]=i}return e},{}),{"stripe-size":"100%","stripe-direction":"horizontal"},[{name:"stripe-{{i}}-background-color",value:"black"},{name:"stripe-{{i}}-background-size",value:"0%"},{name:"stripe-{{i}}-background-opacity",value:1}].reduce(function(e,t){for(var r=1;r<=ile.stripeBackgroundN;r++){var n=t.name.replace("{{i}}",r),i=t.value;e[n]=i}return e},{}),{"line-style":"solid","line-color":"#999","line-fill":"solid","line-cap":"butt","line-opacity":1,"line-outline-width":0,"line-outline-color":"#000","line-gradient-stop-colors":"#999","line-gradient-stop-positions":"0%","control-point-step-size":40,"control-point-weights":.5,"segment-weights":.5,"segment-distances":20,"segment-radii":15,"radius-type":"arc-radius","taxi-turn":"50%","taxi-radius":15,"taxi-turn-min-distance":10,"taxi-direction":"auto","edge-distances":"intersection","curve-style":"haystack","haystack-radius":0,"arrow-scale":1,"loop-direction":"-45deg","loop-sweep":"-90deg","source-distance-from-node":0,"target-distance-from-node":0,"source-endpoint":"outside-to-node","target-endpoint":"outside-to-node","line-dash-pattern":[6,3],"line-dash-offset":0},[{name:"arrow-shape",value:"none"},{name:"arrow-color",value:"#999"},{name:"arrow-fill",value:"filled"},{name:"arrow-width",value:1}].reduce(function(t,r){return ile.arrowPrefixes.forEach(function(e){e=e+"-"+r.name,t[e]=r.value}),t},{})),r={},n=0;n<this.properties.length;n++){var i,a=this.properties[n];a.pointsTo||(i=t[a=a.name],i=this.parse(a,i),r[a]=i)}e.defaultProperties=r}return e.defaultProperties},ile.addDefaultStylesheet=function(){this.selector(":parent").css({shape:"rectangle",padding:10,"background-color":"#eee","border-color":"#ccc","border-width":1}).selector("edge").css({width:3}).selector(":loop").css({"curve-style":"bezier"}).selector("edge:compound").css({"curve-style":"bezier","source-endpoint":"outside-to-line","target-endpoint":"outside-to-line"}).selector(":selected").css({"background-color":"#0169D9","line-color":"#0169D9","source-arrow-color":"#0169D9","target-arrow-color":"#0169D9","mid-source-arrow-color":"#0169D9","mid-target-arrow-color":"#0169D9"}).selector(":parent:selected").css({"background-color":"#CCE1F9","border-color":"#aec8e5"}).selector(":active").css({"overlay-color":"black","overlay-padding":10,"overlay-opacity":.25}),this.defaultLength=this.length},Rce={parse:function(e,t,r,n){var i,a,s;return Tee(t)?this.parseImplWarn(e,t,r,n):(i=Hte(e,""+t,r?"t":"f","mapping"===n||!0===n||!1===n||null==n?"dontcare":n),s=(s=(a=this.propCache=this.propCache||[])[i])||(a[i]=this.parseImplWarn(e,t,r,n)),(r||"mapping"===n)&&(s=lre(s))&&(s.value=lre(s.value)),s)},parseImplWarn:function(e,t,r,n){return(r=this.parseImpl(e,t,r,n))||null==t||sre("The style property `".concat(e,": ").concat(t,"` is invalid")),!r||"width"!==r.name&&"height"!==r.name||"label"!==t||sre("The style value of `label` is deprecated for `"+r.name+"`"),r},parseImpl:function(t,r,n,e){t=Gee(t);var i=this.properties[t],a=r,s=this.types;if(!i||void 0===r)return null;i.alias&&(i=i.pointsTo,t=i.name);var o=kee(r),l=(o&&(r=r.trim()),i.type);if(!l)return null;if(n&&(""===r||null===r))return{name:t,value:r,bypass:!0,deleteBypass:!0};if(Tee(r))return{name:t,value:r,strValue:"fn",mapped:s.fn,bypass:n};if(!(!o||e||r.length<7||"a"!==r[1])){if(7<=r.length&&"d"===r[0]&&(i=new RegExp(s.data.regex).exec(r)))return!n&&(b=s.data,{name:t,value:i,strValue:""+r,mapped:b,field:i[1],bypass:n});if(10<=r.length&&"m"===r[0]&&(b=new RegExp(s.mapData.regex).exec(r))){if(n||l.multiple)return!1;if(i=s.mapData,!l.color&&!l.number)return!1;if(!(s=this.parse(t,b[4]))||s.mapped)return!1;if(!(w=this.parse(t,b[5]))||w.mapped)return!1;if(s.pfValue===w.pfValue||s.strValue===w.strValue)return sre("`"+t+": "+r+"` is not a valid mapper because the output range is zero; converting to `"+t+": "+s.strValue+"`"),this.parse(t,s.strValue);if(l.color){var c=s.value,h=w.value;if(!(c[0]!==h[0]||c[1]!==h[1]||c[2]!==h[2]||c[3]!==h[3]&&(null!=c[3]&&1!==c[3]||null!=h[3]&&1!==h[3])))return!1}return{name:t,value:b,strValue:""+r,mapped:i,field:b[1],fieldMin:parseFloat(b[2]),fieldMax:parseFloat(b[3]),valueMin:s.value,valueMax:w.value,bypass:n}}}if(l.multiple&&"multiple"!==e){var u=o?r.split(/\s+/):Eee(r)?r:[r];if(l.evenMultiple&&u.length%2!=0)return null;for(var d=[],p=[],g=[],f="",m=!1,y=0;y<u.length;y++){var v=this.parse(t,u[y],n,"multiple"),m=m||kee(v.value);d.push(v.value),g.push(null!=v.pfValue?v.pfValue:v.value),p.push(v.units),f+=(0<y?" ":"")+v.strValue}return l.validate&&!l.validate(d,p)?null:l.singleEnum&&m?1===d.length&&kee(d[0])?{name:t,value:d[0],strValue:d[0],bypass:n}:null:{name:t,value:d,pfValue:g,strValue:f,bypass:n,units:p}}var x,b,c=mt(function(){for(var e=0;e<l.enums.length;e++)if(l.enums[e]===r)return{name:t,value:r,strValue:""+r,bypass:n};return null},"checkEnums");if(l.number)return h="px",l.units&&(x=l.units),l.implicitUnits&&(h=l.implicitUnits),l.unitless||(o?(i="px|em"+(l.allowPercent?"|\\%":""),x&&(i=x),(b=r.match("^("+Wee+")("+i+")?$"))&&(r=b[1],x=b[2]||h)):x&&!l.implicitUnits||(x=h)),r=parseFloat(r),isNaN(r)&&void 0===l.enums?null:isNaN(r)&&void 0!==l.enums?(r=a,c()):l.integer&&!See(r)||void 0!==l.min&&(r<l.min||l.strictMin&&r===l.min)||void 0!==l.max&&(r>l.max||l.strictMax&&r===l.max)?null:(s={name:t,value:r,strValue:""+r+(x||""),units:x,bypass:n},l.unitless||"px"!==x&&"em"!==x?s.pfValue=r:s.pfValue="px"!==x&&x?this.getEmSizeInPixels()*r:r,"ms"!==x&&"s"!==x||(s.pfValue="ms"===x?r:1e3*r),"deg"!==x&&"rad"!==x||(s.pfValue="rad"===x?r:Ure(r)),"%"===x&&(s.pfValue=r/100),s);if(l.propList){var w,k=[];if("none"!=(w=""+r)){for(var T=w.split(/\s*,\s*|\s+/),E=0;E<T.length;E++){var C=T[E].trim();this.properties[C]?k.push(C):sre("`"+C+"` is not a valid property name")}if(0===k.length)return null}return{name:t,value:k,strValue:0===k.length?"none":k.join(" "),bypass:n}}if(l.color)return(e=ete(r))?{name:t,value:e,pfValue:e,strValue:"rgb("+e[0]+","+e[1]+","+e[2]+")",bypass:n}:null;if(l.regex||l.regexes){if(l.enums&&(o=c()))return o;for(var _=l.regexes||[l.regex],S=0;S<_.length;S++){var A=new RegExp(_[S]).exec(r);if(A)return{name:t,value:l.singleRegexMatchValue?A[1]:A,strValue:""+r,bypass:n}}return null}return l.string?{name:t,value:""+r,strValue:""+r,bypass:n}:l.enums?c():null}},ale=mt(function(e){if(!(this instanceof ale))return new ale(e);Ree(e)?(this._private={cy:e,coreStyle:{}},this.length=0,this.resetToDefault()):ire("A style must have a core reference")},"Style"),(sle=ale.prototype).instanceString=function(){return"style"},sle.clear=function(){for(var e=this._private,t=e.cy.elements(),r=0;r<this.length;r++)this[r]=void 0;return this.length=0,e.contextStyles={},e.propDiffs={},this.cleanElements(t,!0),t.forEach(function(e){(e=e[0]._private).styleDirty=!0,e.appliedInitStyle=!1}),this},sle.resetToDefault=function(){return this.clear(),this.addDefaultStylesheet(),this},sle.core=function(e){return this._private.coreStyle[e]||this.getDefaultProperty(e)},sle.selector=function(e){var e="core"===e?null:new uoe(e),t=this.length++;return this[t]={selector:e,properties:[],mappedProperties:[],index:t},this},sle.css=function(){var e=arguments;if(1===e.length)for(var t=e[0],r=0;r<this.properties.length;r++){var n=this.properties[r],i=t[n.name];void 0!==(i=void 0===i?t[Uee(n.name)]:i)&&this.cssRule(n.name,i)}else 2===e.length&&this.cssRule(e[0],e[1]);return this},sle.style=sle.css,sle.cssRule=function(e,t){return(e=this.parse(e,t))&&(this[t=this.length-1].properties.push(e),(this[t].properties[e.name]=e).name.match(/pie-(\d+)-background-size/)&&e.value&&(this._private.hasPie=!0),e.name.match(/stripe-(\d+)-background-size/)&&e.value&&(this._private.hasStripe=!0),e.mapped&&this[t].mappedProperties.push(e),!this[t].selector)&&(this._private.coreStyle[e.name]=e),this},sle.append=function(e){return Mee(e)?e.appendToStyle(this):Eee(e)?this.appendFromJson(e):kee(e)&&this.appendFromString(e),this},ale.fromJson=function(e,t){return(e=new ale(e)).fromJson(t),e},ale.fromString=function(e,t){return new ale(e).fromString(t)},[zle,phe,kce,Bce,Ece,Ice,ile,Rce].forEach(function(e){Xee(sle,e)}),ale.types=sle.types,ale.properties=sle.properties,ale.propertyGroups=sle.propertyGroups,ale.propertyGroupNames=sle.propertyGroupNames,ale.propertyGroupKeys=sle.propertyGroupKeys,pce={style:mt(function(e){return e&&this.setStyle(e).update(),this._private.style},"style"),setStyle:mt(function(e){var t=this._private;return Mee(e)?t.style=e.generateStyle(this):Eee(e)?t.style=ale.fromJson(this,e):kee(e)?t.style=ale.fromString(this,e):t.style=ale(this),t.style},"setStyle"),updateStyle:mt(function(){this.mutableElements().updateStyle()},"updateStyle")},(J={autolock:mt(function(e){return void 0===e?this._private.autolock:(this._private.autolock=!!e,this)},"autolock"),autoungrabify:mt(function(e){return void 0===e?this._private.autoungrabify:(this._private.autoungrabify=!!e,this)},"autoungrabify"),autounselectify:mt(function(e){return void 0===e?this._private.autounselectify:(this._private.autounselectify=!!e,this)},"autounselectify"),selectionType:mt(function(e){var t=this._private;return null==t.selectionType&&(t.selectionType="single"),void 0===e?t.selectionType:("additive"!==e&&"single"!==e||(t.selectionType=e),this)},"selectionType"),panningEnabled:mt(function(e){return void 0===e?this._private.panningEnabled:(this._private.panningEnabled=!!e,this)},"panningEnabled"),userPanningEnabled:mt(function(e){return void 0===e?this._private.userPanningEnabled:(this._private.userPanningEnabled=!!e,this)},"userPanningEnabled"),zoomingEnabled:mt(function(e){return void 0===e?this._private.zoomingEnabled:(this._private.zoomingEnabled=!!e,this)},"zoomingEnabled"),userZoomingEnabled:mt(function(e){return void 0===e?this._private.userZoomingEnabled:(this._private.userZoomingEnabled=!!e,this)},"userZoomingEnabled"),boxSelectionEnabled:mt(function(e){return void 0===e?this._private.boxSelectionEnabled:(this._private.boxSelectionEnabled=!!e,this)},"boxSelectionEnabled"),pan:mt(function(){var e,t,r,n=arguments,i=this._private.pan;switch(n.length){case 0:return i;case 1:if(kee(n[0]))return i[e=n[0]];if(Cee(n[0])){if(!this._private.panningEnabled)return this;t=(r=n[0]).x,r=r.y,he(t)&&(i.x=t),he(r)&&(i.y=r),this.emit("pan viewport")}break;case 2:if(!this._private.panningEnabled)return this;t=n[1],"x"!==(e=n[0])&&"y"!==e||!he(t)||(i[e]=t),this.emit("pan viewport")}return this.notify("viewport"),this},"pan"),panBy:mt(function(e,t){var r,n,i=arguments,a=this._private.pan;if(this._private.panningEnabled){switch(i.length){case 1:Cee(e)&&(r=(n=i[0]).x,n=n.y,he(r)&&(a.x+=r),he(n)&&(a.y+=n),this.emit("pan viewport"));break;case 2:r=t,"x"!==(n=e)&&"y"!==n||!he(r)||(a[n]+=r),this.emit("pan viewport")}this.notify("viewport")}return this},"panBy"),gc:mt(function(){this.notify("gc")},"gc"),fit:mt(function(e,t){return(e=this.getFitViewport(e,t))&&((t=this._private).zoom=e.zoom,t.pan=e.pan,this.emit("pan zoom viewport"),this.notify("viewport")),this},"fit"),getFitViewport:mt(function(e,t){if(he(e)&&void 0===t&&(t=e,e=void 0),this._private.panningEnabled&&this._private.zoomingEnabled&&(kee(e)?(n=e,e=this.$(n)):Bee(e)?((r={x1:(n=e).x1,y1:n.y1,x2:n.x2,y2:n.y2}).w=r.x2-r.x1,r.h=r.y2-r.y1):Lee(e)||(e=this.mutableElements()),!Lee(e)||!e.empty())){var r=r||e.boundingBox(),n=this.width(),e=this.height();if(t=he(t)?t:0,!isNaN(n)&&!isNaN(e)&&0<n&&0<e&&!isNaN(r.w)&&!isNaN(r.h)&&0<r.w&&0<r.h)return{zoom:t=(t=(t=Math.min((n-2*t)/r.w,(e-2*t)/r.h))>this._private.maxZoom?this._private.maxZoom:t)<this._private.minZoom?this._private.minZoom:t,pan:{x:(n-t*(r.x1+r.x2))/2,y:(e-t*(r.y1+r.y2))/2}}}},"getFitViewport"),zoomRange:mt(function(e,t){var r,n=this._private;return null==t&&(e=(r=e).min,t=r.max),he(e)&&he(t)&&e<=t?(n.minZoom=e,n.maxZoom=t):he(e)&&void 0===t&&e<=n.maxZoom?n.minZoom=e:he(t)&&void 0===e&&t>=n.minZoom&&(n.maxZoom=t),this},"zoomRange"),minZoom:mt(function(e){return void 0===e?this._private.minZoom:this.zoomRange({min:e})},"minZoom"),maxZoom:mt(function(e){return void 0===e?this._private.maxZoom:this.zoomRange({max:e})},"maxZoom"),getZoomedViewport:mt(function(e){var t,r,n=this._private,i=n.pan,a=n.zoom,s=!n.zoomingEnabled;return he(e)?r=e:Cee(e)&&(r=e.level,null!=e.position?t=Ore(e.position,a,i):null!=e.renderedPosition&&(t=e.renderedPosition),null!=t)&&!n.panningEnabled&&(s=!0),r=(r=r>n.maxZoom?n.maxZoom:r)<n.minZoom?n.minZoom:r,!s&&he(r)&&r!==a&&(null==t||he(t.x)&&he(t.y))?null!=t?{zoomed:!0,panned:!0,zoom:e=r,pan:{x:-e/a*(t.x-i.x)+t.x,y:-e/a*(t.y-i.y)+t.y}}:{zoomed:!0,panned:!1,zoom:r,pan:i}:null},"getZoomedViewport"),zoom:mt(function(e){var t;return void 0===e?this._private.zoom:(e=this.getZoomedViewport(e),t=this._private,null!=e&&e.zoomed&&(t.zoom=e.zoom,e.panned&&(t.pan.x=e.pan.x,t.pan.y=e.pan.y),this.emit("zoom"+(e.panned?" pan":"")+" viewport"),this.notify("viewport")),this)},"zoom"),viewport:mt(function(e){var t=this._private,r=!0,n=!0,i=[],a=!1,s=!1;return e&&(he(e.zoom)||(r=!1),Cee(e.pan)||(n=!1),r||n)&&(r&&((r=e.zoom)<t.minZoom||r>t.maxZoom||!t.zoomingEnabled?a=!0:(t.zoom=r,i.push("zoom"))),!n||a&&e.cancelOnFailedZoom||!t.panningEnabled||(r=e.pan,he(r.x)&&(t.pan.x=r.x,s=!1),he(r.y)&&(t.pan.y=r.y,s=!1),s)||i.push("pan"),0<i.length)&&(i.push("viewport"),this.emit(i.join(" ")),this.notify("viewport")),this},"viewport"),center:mt(function(e){return(e=this.getCenterPan(e))&&(this._private.pan=e,this.emit("pan viewport"),this.notify("viewport")),this},"center"),getCenterPan:mt(function(e,t){var r,n;if(this._private.panningEnabled&&(kee(e)?(r=e,e=this.mutableElements().filter(r)):Lee(e)||(e=this.mutableElements()),0!==e.length))return r=e.boundingBox(),e=this.width(),n=this.height(),{x:(e-(t=void 0===t?this._private.zoom:t)*(r.x1+r.x2))/2,y:(n-t*(r.y1+r.y2))/2}},"getCenterPan"),reset:mt(function(){return this._private.panningEnabled&&this._private.zoomingEnabled&&this.viewport({pan:{x:0,y:0},zoom:1}),this},"reset"),invalidateSize:mt(function(){this._private.sizeCache=null},"invalidateSize"),size:mt(function(){var t,e=this._private,r=e.container;return e.sizeCache=e.sizeCache||(r?(t=this.window().getComputedStyle(r),e=mt(function(e){return parseFloat(t.getPropertyValue(e))},"val"),{width:r.clientWidth-e("padding-left")-e("padding-right"),height:r.clientHeight-e("padding-top")-e("padding-bottom")}):{width:1,height:1})},"size"),width:mt(function(){return this.size().width},"width"),height:mt(function(){return this.size().height},"height"),extent:mt(function(){var e=this._private.pan,t=this._private.zoom,r=this.renderedExtent();return(r={x1:(r.x1-e.x)/t,x2:(r.x2-e.x)/t,y1:(r.y1-e.y)/t,y2:(r.y2-e.y)/t}).w=r.x2-r.x1,r.h=r.y2-r.y1,r},"extent"),renderedExtent:mt(function(){var e=this.width(),t=this.height();return{x1:0,y1:0,x2:e,y2:t,w:e,h:t}},"renderedExtent"),multiClickDebounceTime:mt(function(e){return e?(this._private.multiClickDebounceTime=e,this):this._private.multiClickDebounceTime},"multiClickDebounceTime")}).centre=J.center,J.autolockNodes=J.autolock,J.autoungrabifyNodes=J.autoungrabify,(lhe={data:Wse.data({field:"data",bindingEvent:"data",allowBinding:!0,allowSetting:!0,settingEvent:"data",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeData:Wse.removeData({field:"data",event:"data",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0}),scratch:Wse.data({field:"scratch",bindingEvent:"scratch",allowBinding:!0,allowSetting:!0,settingEvent:"scratch",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeScratch:Wse.removeData({field:"scratch",event:"scratch",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0})}).attr=lhe.data,lhe.removeAttr=lhe.removeData,ole=mt(function(e){var i=this,r=(o=(o=(e=Xee({},e)).container)&&!Aee(o)&&Aee(o[0])?o[0]:o)?o._cyreg:null,n=((r=r||{})&&r.cy&&(r.cy.destroy(),r={}),r.readies=r.readies||[]),t=(o&&(o._cyreg=r),r.cy=i,void 0!==fee&&void 0!==o&&!e.headless),a=e,e=(a.layout=Xee({name:t?"grid":"null"},a.layout),a.renderer=Xee({name:t?"canvas":"null"},a.renderer),mt(function(e,t,r){return void 0!==t?t:void 0!==r?r:e},"defVal")),s=this._private={container:o,ready:!1,options:a,elements:new Zoe(this),listeners:[],aniEles:new Zoe(this),data:a.data||{},scratch:{},layout:null,renderer:null,destroyed:!1,notificationsEnabled:!0,minZoom:1e-50,maxZoom:1e50,zoomingEnabled:e(!0,a.zoomingEnabled),userZoomingEnabled:e(!0,a.userZoomingEnabled),panningEnabled:e(!0,a.panningEnabled),userPanningEnabled:e(!0,a.userPanningEnabled),boxSelectionEnabled:e(!0,a.boxSelectionEnabled),autolock:e(!1,a.autolock,a.autolockNodes),autoungrabify:e(!1,a.autoungrabify,a.autoungrabifyNodes),autounselectify:e(!1,a.autounselectify),styleEnabled:void 0===a.styleEnabled?t:a.styleEnabled,zoom:he(a.zoom)?a.zoom:1,pan:{x:Cee(a.pan)&&he(a.pan.x)?a.pan.x:0,y:Cee(a.pan)&&he(a.pan.y)?a.pan.y:0},animation:{current:[],queue:[]},hasCompoundNodes:!1,multiClickDebounceTime:e(250,a.multiClickDebounceTime)},o=(this.createEmitter(),this.selectionType(a.selectionType),this.zoomRange({min:a.minZoom,max:a.maxZoom}),mt(function(e,t){if(e.some($ee))return Hie.all(e).then(t);t(e)},"loadExtData")),t=(s.styleEnabled&&i.setStyle([]),Xee({},a,a.renderer)),l=(i.initRenderer(t),mt(function(e,t,r){i.notifications(!1);var n=i.mutableElements();0<n.length&&n.remove(),null!=e&&(Cee(e)||Eee(e))&&i.add(e),i.one("layoutready",function(e){i.notifications(!0),i.emit(e),i.one("load",t),i.emitAndNotify("load")}).one("layoutstop",function(){i.one("done",r),i.emit("done")}),(n=Xee({},i._private.options.layout)).eles=i.elements(),i.layout(n).run()},"setElesAndLayout"));o([a.style,a.elements],function(e){var t=e[0],e=e[1];s.styleEnabled&&i.style().append(t),l(e,function(){i.startAnimationLoop(),s.ready=!0,Tee(a.ready)&&i.on("ready",a.ready);for(var e=0;e<n.length;e++){var t=n[e];i.on("ready",t)}r&&(r.readies=[]),i.emit("ready")},a.done)})},"Core"),lle=ole.prototype,Xee(lle,{instanceString:mt(function(){return"core"},"instanceString"),isReady:mt(function(){return this._private.ready},"isReady"),destroyed:mt(function(){return this._private.destroyed},"destroyed"),ready:mt(function(e){return this.isReady()?this.emitter().emit("ready",[],e):this.on("ready",e),this},"ready"),destroy:mt(function(){if(!this.destroyed())return this.stopAnimationLoop(),this.destroyRenderer(),this.emit("destroy"),this._private.destroyed=!0,this},"destroy"),hasElementWithId:mt(function(e){return this._private.elements.hasElementWithId(e)},"hasElementWithId"),getElementById:mt(function(e){return this._private.elements.getElementById(e)},"getElementById"),hasCompoundNodes:mt(function(){return this._private.hasCompoundNodes},"hasCompoundNodes"),headless:mt(function(){return this._private.renderer.isHeadless()},"headless"),styleEnabled:mt(function(){return this._private.styleEnabled},"styleEnabled"),addToPool:mt(function(e){return this._private.elements.merge(e),this},"addToPool"),removeFromPool:mt(function(e){return this._private.elements.unmerge(e),this},"removeFromPool"),container:mt(function(){return this._private.container||null},"container"),window:mt(function(){var e;return null!=this._private.container&&void 0!==(e=this._private.container.ownerDocument)&&null!=e&&e.defaultView||fee},"window"),mount:mt(function(e){var t,r;if(null!=e)return r=(t=this._private).options,!Aee(e)&&Aee(e[0])&&(e=e[0]),this.stopAnimationLoop(),this.destroyRenderer(),t.container=e,t.styleEnabled=!0,this.invalidateSize(),this.initRenderer(Xee({},r,r.renderer,{name:"null"===r.renderer.name?"canvas":r.renderer.name})),this.startAnimationLoop(),this.style(r.style),this.emit("mount"),this},"mount"),unmount:mt(function(){return this.stopAnimationLoop(),this.destroyRenderer(),this.initRenderer({name:"null"}),this.emit("unmount"),this},"unmount"),options:mt(function(){return lre(this._private.options)},"options"),json:mt(function(e){var r,h=this,t=h._private,n=h.mutableElements(),i=mt(function(e){return h.getElementById(e.id())},"getFreshRef");if(Cee(e)){if(h.startBatch(),e.elements){var u={},a=mt(function(e,t){for(var r=[],n=[],i=0;i<e.length;i++){var a,s,o=e[i];o.data.id?(a=""+o.data.id,s=h.getElementById(a),u[a]=!0,0!==s.length?n.push({ele:s,json:o}):(t&&(o.group=t),r.push(o))):sre("cy.json() cannot handle elements without an ID attribute")}h.add(r);for(var l=0;l<n.length;l++){var c=n[l];c.ele.json(c.json)}},"updateEles");if(Eee(e.elements))a(e.elements);else for(var s=["nodes","edges"],o=0;o<s.length;o++){var l=s[o],c=e.elements[l];Eee(c)&&a(c,l)}var d=h.collection();n.filter(function(e){return!u[e.id()]}).forEach(function(e){e.isParent()?d.merge(e):e.remove()}),d.forEach(function(e){return e.children().move({parent:null})}),d.forEach(function(e){return i(e).remove()})}e.style&&h.style(e.style),null!=e.zoom&&e.zoom!==t.zoom&&h.zoom(e.zoom),!e.pan||e.pan.x===t.pan.x&&e.pan.y===t.pan.y||h.pan(e.pan),e.data&&h.data(e.data);for(var p=["minZoom","maxZoom","zoomingEnabled","userZoomingEnabled","panningEnabled","userPanningEnabled","boxSelectionEnabled","autolock","autoungrabify","autounselectify","multiClickDebounceTime"],g=0;g<p.length;g++){var f=p[g];null!=e[f]&&h[f](e[f])}return h.endBatch(),this}return r={},e?r.elements=this.elements().map(function(e){return e.json()}):(r.elements={},n.forEach(function(e){var t=e.group();r.elements[t]||(r.elements[t]=[]),r.elements[t].push(e.json())})),this._private.styleEnabled&&(r.style=h.style().json()),r.data=lre(h.data()),n=t.options,r.zoomingEnabled=t.zoomingEnabled,r.userZoomingEnabled=t.userZoomingEnabled,r.zoom=t.zoom,r.minZoom=t.minZoom,r.maxZoom=t.maxZoom,r.panningEnabled=t.panningEnabled,r.userPanningEnabled=t.userPanningEnabled,r.pan=lre(t.pan),r.boxSelectionEnabled=t.boxSelectionEnabled,r.renderer=lre(n.renderer),r.hideEdgesOnViewport=n.hideEdgesOnViewport,r.textureOnViewport=n.textureOnViewport,r.wheelSensitivity=n.wheelSensitivity,r.motionBlur=n.motionBlur,r.multiClickDebounceTime=n.multiClickDebounceTime,r},"json")}),lle.$id=lle.getElementById,[Mce,Dce,Oce,Hce,Kce,nhe,ihe,Pce,pce,J,lhe].forEach(function(e){Xee(lle,e)}),cle={fit:!0,directed:!1,direction:"downward",padding:30,circle:!1,grid:!1,spacingFactor:1.75,boundingBox:void 0,avoidOverlap:!0,nodeDimensionsIncludeLabels:!1,roots:void 0,depthSort:void 0,animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:mt(function(e,t){return!0},"animateFilter"),ready:void 0,stop:void 0,transform:mt(function(e,t){return t},"transform")},hle={maximal:!1,acyclic:!1},ule=mt(function(e){return e.scratch("breadthfirst")},"getInfo"),dle=mt(function(e,t){return e.scratch("breadthfirst",t)},"setInfo"),mt(eJ,"BreadthFirstLayout"),ple={fit:!0,padding:30,boundingBox:void 0,avoidOverlap:!0,nodeDimensionsIncludeLabels:!(eJ.prototype.run=function(){var l=this.options,e=l.cy,c=l.eles,h=c.nodes().filter(function(e){return e.isChildless()}),t=c,r=l.directed,P=l.acyclic||l.maximal||0<l.maximalAdjustments,i=!!l.boundingBox,a=Jre(i?l.boundingBox:structuredClone(e.extent()));if(Lee(l.roots))d=l.roots;else if(Eee(l.roots)){for(var n=[],s=0;s<l.roots.length;s++){var o=l.roots[s],o=e.getElementById(o);n.push(o)}d=e.collection(n)}else if(kee(l.roots))d=e.$(l.roots);else if(r)d=h.roots();else for(var u=c.components(),d=e.collection(),B=mt(function(){var t=(e=u[p]).maxDegree(!1),e=e.filter(function(e){return e.degree(!1)===t});d=d.add(e)},"_loop"),p=0;p<u.length;p++)B();var g=[],f={},m=mt(function(e,t){null==g[t]&&(g[t]=[]);var r=g[t].length;g[t].push(e),dle(e,{index:r,depth:t})},"addToDepth"),$=mt(function(e,t){var r=ule(e),n=r.depth;g[n][r.index]=null,e.isChildless()&&m(e,t)},"changeDepth");t.bfs({roots:d,directed:l.directed,visit:mt(function(e,t,r,n,i){var a=(e=e[0]).id();e.isChildless()&&m(e,i),f[a]=!0},"visit")});for(var y=[],v=0;v<h.length;v++){var x=h[v];f[x.id()]||y.push(x)}var b=mt(function(e){for(var t=g[e],r=0;r<t.length;r++){var n=t[r];null==n?(t.splice(r,1),r--):dle(n,{depth:e,index:r})}},"assignDepthsAt"),F=mt(function(e,t){for(var r=ule(e),n=e.incomers().filter(function(e){return e.isNode()&&c.has(e)}),i=-1,a=e.id(),s=0;s<n.length;s++)var o=n[s],o=ule(o),i=Math.max(i,o.depth);return r.depth<=i&&(!l.acyclic&&t[a]?null:($(e,r=i+1),t[a]=r,!0))},"adjustMaximally");if(r&&P){var w=[],z={},G=mt(function(e){return w.push(e)},"enqueue"),U=mt(function(){return w.shift()},"dequeue");for(h.forEach(function(e){return w.push(e)});0<w.length;){var k=U(),T=F(k,z);if(T)k.outgoers().filter(function(e){return e.isNode()&&c.has(e)}).forEach(G);else if(null===T){sre("Detected double maximal shift for node `"+k.id()+"`. Bailing maximal adjustment due to cycle. Use `options.maximal: true` only on DAGs.");break}}}var E=0;if(l.avoidOverlap)for(var C=0;C<h.length;C++)var _=h[C].layoutDimensions(l),q=_.w,E=Math.max(E,q,_.h);var S={},A=mt(function(e){if(S[e.id()])return S[e.id()];for(var t=ule(e).depth,r=e.neighborhood(),n=0,i=0,a=0;a<r.length;a++){var s,o,l=r[a];l.isEdge()||l.isParent()||!h.has(l)||null!=(l=ule(l))&&(s=l.index,l=l.depth,null!=s)&&null!=l&&(o=g[l].length,l<t)&&(n+=s/o,i++)}return n/=i=Math.max(1,i),0===i&&(n=0),S[e.id()]=n},"getWeightedPercent"),j=mt(function(e,t){var r=A(e)-A(t);return 0==r?Hee(e.id(),t.id()):r},"sortFn");void 0!==l.depthSort&&(j=l.depthSort);for(var L=g.length,N=0;N<L;N++)g[N].sort(j),b(N);for(var I=[],R=0;R<y.length;R++)I.push(y[R]);t=mt(function(){for(var e=0;e<L;e++)b(e)},"assignDepths"),I.length&&(g.unshift(I),L=g.length,t());for(var Y=0,M=0;M<L;M++)Y=Math.max(g[M].length,Y);var W=a.x1+a.w/2,H=a.y1+a.h/2,D=h.reduce(function(e,t){return t=t.boundingBox({includeLabels:l.nodeDimensionsIncludeLabels}),{w:-1===e.w?t.w:(e.w+t.w)/2,h:-1===e.h?t.h:(e.h+t.h)/2}},{w:-1,h:-1}),V=Math.max(1===L?0:i?(a.h-2*l.padding-D.h)/(L-1):(a.h-2*l.padding-D.h)/(L+1),E),X=g.reduce(function(e,t){return Math.max(e,t.length)},0),K=mt(function(e){var t,r,n=(e=ule(e)).depth,e=e.index;return l.circle?(t=Math.min(a.w/2/L,a.h/2/L),t=(t=Math.max(t,E))*n+t-(0<L&&g[0].length<=3?t/2:0),r=2*Math.PI/g[n].length*e,0===n&&1===g[0].length&&(t=1),{x:W+t*Math.cos(r),y:H+t*Math.sin(r)}):(t=g[n].length,r=Math.max(1===t?0:i?(a.w-2*l.padding-D.w)/((l.grid?X:t)-1):(a.w-2*l.padding-D.w)/((l.grid?X:t)+1),E),{x:W+(e+1-(t+1)/2)*r,y:H+(n+1-(L+1)/2)*V})},"getPositionTopBottom"),O={downward:0,leftward:90,upward:180,rightward:-90},r=(-1===Object.keys(O).indexOf(l.direction)&&ire("Invalid direction '".concat(l.direction,"' specified for breadthfirst layout. Valid values are: ").concat(Object.keys(O).join(", "))),mt(function(e){return TZ(K(e),a,O[l.direction])},"getPosition"));return c.nodes().layoutPositions(this,l,r),this}),spacingFactor:void 0,radius:void 0,startAngle:1.5*Math.PI,sweep:void 0,clockwise:!0,sort:void 0,animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:mt(function(e,t){return!0},"animateFilter"),ready:void 0,stop:void 0,transform:mt(function(e,t){return t},"transform")},mt(tJ,"CircleLayout"),gle={fit:!0,padding:30,startAngle:1.5*Math.PI,sweep:void 0,clockwise:!0,equidistant:!(tJ.prototype.run=function(){var n=e=this.options,e=e.cy,t=n.eles,i=void 0!==n.counterclockwise?!n.counterclockwise:n.clockwise,r=t.nodes().not(":parent");n.sort&&(r=r.sort(n.sort));for(var a,s=(e=Jre(n.boundingBox||{x1:0,y1:0,w:e.width(),h:e.height()})).x1+e.w/2,o=e.y1+e.h/2,l=(void 0===n.sweep?2*Math.PI-2*Math.PI/r.length:n.sweep)/Math.max(1,r.length-1),c=0,h=0;h<r.length;h++)var u=r[h].layoutDimensions(n),d=u.w,c=Math.max(c,d,u.h);a=he(n.radius)?n.radius:r.length<=1?0:Math.min(e.h,e.w)/2-c,1<r.length&&n.avoidOverlap&&(c*=1.75,e=Math.cos(l)-Math.cos(0),p=Math.sin(l)-Math.sin(0),e=Math.sqrt(c*c/(e*e+p*p)),a=Math.max(e,a));var p=mt(function(e,t){var t=n.startAngle+t*l*(i?1:-1),r=a*Math.cos(t),t=a*Math.sin(t);return{x:s+r,y:o+t}},"getPos");return t.nodes().layoutPositions(this,n,p),this}),minNodeSpacing:10,boundingBox:void 0,avoidOverlap:!0,nodeDimensionsIncludeLabels:!1,height:void 0,width:void 0,spacingFactor:void 0,concentric:mt(function(e){return e.degree()},"concentric"),levelWidth:mt(function(e){return e.maxDegree()/4},"levelWidth"),animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:mt(function(e,t){return!0},"animateFilter"),ready:void 0,stop:void 0,transform:mt(function(e,t){return t},"transform")},mt(rJ,"ConcentricLayout"),rJ.prototype.run=function(){for(var e=r=this.options,t=void 0!==e.counterclockwise?!e.counterclockwise:e.clockwise,r=r.cy,n=e.eles,i=n.nodes().not(":parent"),a=(r=Jre(e.boundingBox||{x1:0,y1:0,w:r.width(),h:r.height()})).x1+r.w/2,s=r.y1+r.h/2,o=[],l=0,c=0;c<i.length;c++){var h=i[c],u=e.concentric(h);o.push({value:u,node:h}),h._private.scratch.concentric=u}i.updateStyle();for(var d=0;d<i.length;d++)var p=i[d].layoutDimensions(e),l=Math.max(l,p.w,p.h);o.sort(function(e,t){return t.value-e.value});for(var P=e.levelWidth(i),g=[[]],f=g[0],m=0;m<o.length;m++){var y=o[m];0<f.length&&P<=Math.abs(f[0].value-y.value)&&g.push(f=[]),f.push(y)}var v,x=l+e.minNodeSpacing;e.avoidOverlap||(v=0<g.length&&1<g[0].length,r=Math.min(r.w,r.h)/2-x,x=Math.min(x,r/(g.length+v?1:0)));for(var b=0,w=0;w<g.length;w++){var k,T=g[w],E=void 0===e.sweep?2*Math.PI-2*Math.PI/T.length:e.sweep,E=T.dTheta=E/Math.max(1,T.length-1);1<T.length&&e.avoidOverlap&&(k=Math.cos(E)-Math.cos(0),E=Math.sin(E)-Math.sin(0),k=Math.sqrt(x*x/(k*k+E*E)),b=Math.max(k,b)),T.r=b,b+=x}if(e.equidistant){for(var C=0,_=0,S=0;S<g.length;S++)var B=g[S].r-_,C=Math.max(C,B);for(var _=0,A=0;A<g.length;A++){var L=g[A];0===A&&(_=L.r),L.r=_,_+=C}}for(var N={},I=0;I<g.length;I++)for(var R=g[I],$=R.dTheta,M=R.r,D=0;D<R.length;D++){var F=R[D],O=e.startAngle+(t?1:-1)*$*D,O={x:a+M*Math.cos(O),y:s+M*Math.sin(O)};N[F.node.id()]=O}return n.nodes().layoutPositions(this,e,function(e){return e=e.id(),N[e]}),this},mle={ready:mt(function(){},"ready"),stop:mt(function(){},"stop"),animate:!0,animationEasing:void 0,animationDuration:void 0,animateFilter:mt(function(e,t){return!0},"animateFilter"),animationThreshold:250,refresh:20,fit:!0,padding:30,boundingBox:void 0,nodeDimensionsIncludeLabels:!1,randomize:!1,componentSpacing:40,nodeRepulsion:mt(function(e){return 2048},"nodeRepulsion"),nodeOverlap:4,idealEdgeLength:mt(function(e){return 32},"idealEdgeLength"),edgeElasticity:mt(function(e){return 32},"edgeElasticity"),nestingFactor:1.2,gravity:1,numIter:1e3,initialTemp:1e3,coolingFactor:.99,minTemp:1},mt(nJ,"CoseLayout"),nJ.prototype.run=function(){var r=this.options,e=r.cy,n=this,i=(!(n.stopped=!1)!==r.animate&&!1!==r.animate||n.emit({type:"layoutstart",layout:n}),fle=!0===r.debug,yle(e,n,r)),t=(fle&&(void 0)(i),r.randomize&&ble(i),$te()),a=mt(function(){kle(i,e,r),!0===r.fit&&e.fit(r.padding)},"refresh"),s=mt(function(e){return!(n.stopped||e>=r.numIter||(Tle(i,r),i.temperature=i.temperature*r.coolingFactor,i.temperature<r.minTemp))},"mainLoop"),o=mt(function(){var e,t;!0===r.animate||!1===r.animate?(a(),n.one("layoutstop",r.stop),n.emit({type:"layoutstop",layout:n})):(e=r.eles.nodes(),t=wle(i,r,e),e.layoutPositions(n,r,t))},"done"),l=0,c=!0;if(!0===r.animate){var h=mt(function(){for(var e=0;c&&e<r.refresh;)c=s(l),l++,e++;c?($te()-t>=r.animationThreshold&&a(),Bte(h)):(Ole(i,r),o())},"frame");h()}else{for(;c;)c=s(l),l++;Ole(i,r),o()}return this},nJ.prototype.stop=function(){return this.stopped=!0,this.thread&&this.thread.stop(),this.emit("layoutstop"),this},nJ.prototype.destroy=function(){return this.thread&&this.thread.stop(),this},yle=mt(function(e,t,r){for(var n=r.eles.edges(),i=r.eles.nodes(),a=Jre(r.boundingBox||{x1:0,y1:0,w:e.width(),h:e.height()}),s={isCompound:e.hasCompoundNodes(),layoutNodes:[],idToIndex:{},nodeSize:i.size(),graphSet:[],indexToGraph:[],layoutEdges:[],edgeSize:n.size(),temperature:r.initialTemp,clientWidth:a.w,clientHeight:a.h,boundingBox:a},o=r.eles.components(),l={},c=0;c<o.length;c++)for(var h=o[c],u=0;u<h.length;u++)l[h[u].id()]=c;for(c=0;c<s.nodeSize;c++){var d=(y=i[c]).layoutDimensions(r);(I={}).isLocked=y.locked(),I.id=y.data("id"),I.parentId=y.data("parent"),I.cmptId=l[y.id()],I.children=[],I.positionX=y.position("x"),I.positionY=y.position("y"),I.offsetX=0,I.offsetY=0,I.height=d.w,I.width=d.h,I.maxX=I.positionX+I.width/2,I.minX=I.positionX-I.width/2,I.maxY=I.positionY+I.height/2,I.minY=I.positionY-I.height/2,I.padLeft=parseFloat(y.style("padding")),I.padRight=parseFloat(y.style("padding")),I.padTop=parseFloat(y.style("padding")),I.padBottom=parseFloat(y.style("padding")),I.nodeRepulsion=Tee(r.nodeRepulsion)?r.nodeRepulsion(y):r.nodeRepulsion,s.layoutNodes.push(I),s.idToIndex[I.id]=c}for(var p=[],g=0,f=-1,m=[],c=0;c<s.nodeSize;c++){var y,v=(y=s.layoutNodes[c]).parentId;(null!=v?s.layoutNodes[s.idToIndex[v]].children:(p[++f]=y.id,m)).push(y.id)}for(s.graphSet.push(m);g<=f;){var x=p[g++],x=s.idToIndex[x],b=s.layoutNodes[x].children;if(0<b.length)for(s.graphSet.push(b),c=0;c<b.length;c++)p[++f]=b[c]}for(c=0;c<s.graphSet.length;c++)for(var w=s.graphSet[c],u=0;u<w.length;u++){var k=s.idToIndex[w[u]];s.indexToGraph[k]=c}for(c=0;c<s.edgeSize;c++){var T=n[c],E={},C=(E.id=T.data("id"),E.sourceId=T.data("source"),E.targetId=T.data("target"),Tee(r.idealEdgeLength)?r.idealEdgeLength(T):r.idealEdgeLength),T=Tee(r.edgeElasticity)?r.edgeElasticity(T):r.edgeElasticity,_=s.idToIndex[E.sourceId],S=s.idToIndex[E.targetId];if(s.indexToGraph[_]!=s.indexToGraph[S]){for(var A=vle(E.sourceId,E.targetId,s),L=s.graphSet[A],N=0,I=s.layoutNodes[_];-1===L.indexOf(I.id);)I=s.layoutNodes[s.idToIndex[I.parentId]],N++;for(I=s.layoutNodes[S];-1===L.indexOf(I.id);)I=s.layoutNodes[s.idToIndex[I.parentId]],N++;C*=N*r.nestingFactor}E.idealLength=C,E.elasticity=T,s.layoutEdges.push(E)}return s},"createLayoutInfo"),vle=mt(function(e,t,r){return(e=xle(e,t,0,r)).count<2?0:e.graph},"findLCA"),xle=mt(function(e,t,r,n){var i=n.graphSet[r];if(-1<i.indexOf(e)&&-1<i.indexOf(t))return{count:2,graph:r};for(var a=0,s=0;s<i.length;s++){var o=i[s],o=n.idToIndex[o];if(0!==(o=n.layoutNodes[o].children).length&&(o=n.indexToGraph[n.idToIndex[o[0]]],0!==(o=xle(e,t,o,n)).count)){if(1!==o.count)return o;if(2==++a)break}}return{count:a,graph:r}},"findLCA_aux"),ble=mt(function(e,t){for(var r=e.clientWidth,n=e.clientHeight,i=0;i<e.nodeSize;i++){var a=e.layoutNodes[i];0!==a.children.length||a.isLocked||(a.positionX=Math.random()*r,a.positionY=Math.random()*n)}},"randomizePositions"),wle=mt(function(i,a,e){var s=i.boundingBox,o={x1:1/0,x2:-1/0,y1:1/0,y2:-1/0};return a.boundingBox&&(e.forEach(function(e){e=i.layoutNodes[i.idToIndex[e.data("id")]],o.x1=Math.min(o.x1,e.positionX),o.x2=Math.max(o.x2,e.positionX),o.y1=Math.min(o.y1,e.positionY),o.y2=Math.max(o.y2,e.positionY)}),o.w=o.x2-o.x1,o.h=o.y2-o.y1),function(e,t){var r,n,e=i.layoutNodes[i.idToIndex[e.data("id")]];return a.boundingBox?(r=0===o.w?.5:(e.positionX-o.x1)/o.w,n=0===o.h?.5:(e.positionY-o.y1)/o.h,{x:s.x1+r*s.w,y:s.y1+n*s.h}):{x:e.positionX,y:e.positionY}}},"getScaleInBoundsFn"),kle=mt(function(e,t,r){var n=r.layout,i=r.eles.nodes(),a=wle(e,r,i);i.positions(a),!0!==e.ready&&(e.ready=!0,n.one("layoutready",r.ready),n.emit({type:"layoutready",layout:this}))},"refreshPositions"),Tle=mt(function(e,t,r){Ele(e,t),Lle(e),Nle(e,t),Ile(e),Rle(e)},"step"),Ele=mt(function(e,t){for(var r=0;r<e.graphSet.length;r++)for(var n=e.graphSet[r],i=n.length,a=0;a<i;a++)for(var s=e.layoutNodes[e.idToIndex[n[a]]],o=a+1;o<i;o++){var l=e.layoutNodes[e.idToIndex[n[o]]];_le(s,l,e,t)}},"calculateNodeForces"),Cle=mt(function(e){return 2*e*Math.random()-1},"randomDistance"),_le=mt(function(e,t,r,n){var i,a,s,o;e.cmptId!==t.cmptId&&!r.isCompound||(r=t.positionX-e.positionX,i=t.positionY-e.positionY,0===r&&0===i&&(r=Cle(1),i=Cle(1)),o=0<(o=Sle(e,t,r,i))?(s=n.nodeOverlap*o)*r/(a=Math.sqrt(r*r+i*i)):(n=Ale(e,r,i),o=(r=(o=Ale(t,-1*r,-1*i)).x-n.x)*r+(i=o.y-n.y)*i,a=Math.sqrt(o),(s=(e.nodeRepulsion+t.nodeRepulsion)/o)*r/a),n=s*i/a,e.isLocked||(e.offsetX-=o,e.offsetY-=n),t.isLocked)||(t.offsetX+=o,t.offsetY+=n)},"nodeRepulsion"),Sle=mt(function(e,t,r,n){return r=0<r?e.maxX-t.minX:t.maxX-e.minX,n=0<n?e.maxY-t.minY:t.maxY-e.minY,0<=r&&0<=n?Math.sqrt(r*r+n*n):0},"nodesOverlap"),Ale=mt(function(e,t,r){var n=e.positionX,i=e.positionY,a=e.height||1,s=r/t,o=a/(e=e.width||1),l={};return 0===t&&0<r||0===t&&r<0?(l.x=n,l.y=i+a/2):0<t&&-1*o<=s&&s<=o?(l.x=n+e/2,l.y=i+e*r/2/t):t<0&&-1*o<=s&&s<=o?(l.x=n-e/2,l.y=i-e*r/2/t):0<r&&(s<=-1*o||o<=s)?(l.x=n+a*t/2/r,l.y=i+a/2):r<0&&(s<=-1*o||o<=s)&&(l.x=n-a*t/2/r,l.y=i-a/2),l},"findClippingPoint"),Lle=mt(function(e,t){for(var r=0;r<e.edgeSize;r++){var n,i,a=e.layoutEdges[r],s=e.idToIndex[a.sourceId],s=e.layoutNodes[s],o=e.idToIndex[a.targetId],l=(o=e.layoutNodes[o]).positionX-s.positionX,c=o.positionY-s.positionY;0==l&&0==c||(n=Ale(s,l,c),c=(l=Ale(o,-1*l,-1*c)).x-n.x,l=l.y-n.y,n=Math.sqrt(c*c+l*l),a=Math.pow(a.idealLength-n,2)/a.elasticity,c=0!==n?(i=a*c/n,a*l/n):i=0,s.isLocked||(s.offsetX+=i,s.offsetY+=c),o.isLocked)||(o.offsetX-=i,o.offsetY-=c)}},"calculateEdgeForces"),Nle=mt(function(e,t){if(0!==t.gravity)for(var r=0;r<e.graphSet.length;r++)for(var n,i,a=e.graphSet[r],s=a.length,o=0===r?(i=e.clientHeight/2,e.clientWidth/2):(n=e.layoutNodes[e.idToIndex[a[0]]],i=(n=e.layoutNodes[e.idToIndex[n.parentId]]).positionX,n.positionY),l=0;l<s;l++){var c,h,u,d=e.layoutNodes[e.idToIndex[a[l]]];d.isLocked||(h=i-d.positionX,u=o-d.positionY,1<(c=Math.sqrt(h*h+u*u))&&(h=t.gravity*h/c,u=t.gravity*u/c,d.offsetX+=h,d.offsetY+=u))}},"calculateGravityForces"),Ile=mt(function(e,t){var r=[],n=0,i=-1;for(r.push.apply(r,e.graphSet[0]),i+=e.graphSet[0].length;n<=i;){var a=r[n++],a=e.idToIndex[a],s=(a=e.layoutNodes[a]).children;if(0<s.length&&!a.isLocked){for(var o=a.offsetX,l=a.offsetY,c=0;c<s.length;c++){var h=e.layoutNodes[e.idToIndex[s[c]]];h.offsetX+=o,h.offsetY+=l,r[++i]=s[c]}a.offsetX=0,a.offsetY=0}}},"propagateForces"),Rle=mt(function(e,t){for(var r=0;r<e.nodeSize;r++)0<(i=e.layoutNodes[r]).children.length&&(i.maxX=void 0,i.minX=void 0,i.maxY=void 0,i.minY=void 0);for(var n,r=0;r<e.nodeSize;r++)0<(i=e.layoutNodes[r]).children.length||i.isLocked||(n=Mle(i.offsetX,i.offsetY,e.temperature),i.positionX+=n.x,i.positionY+=n.y,i.offsetX=0,i.offsetY=0,i.minX=i.positionX-i.width,i.maxX=i.positionX+i.width,i.minY=i.positionY-i.height,i.maxY=i.positionY+i.height,Dle(i,e));for(var i,r=0;r<e.nodeSize;r++)0<(i=e.layoutNodes[r]).children.length&&!i.isLocked&&(i.positionX=(i.maxX+i.minX)/2,i.positionY=(i.maxY+i.minY)/2,i.width=i.maxX-i.minX,i.height=i.maxY-i.minY)},"updatePositions"),Mle=mt(function(e,t,r){var n=Math.sqrt(e*e+t*t);return r<n?{x:r*e/n,y:r*t/n}:{x:e,y:t}},"limitForce"),Dle=mt(function(e,t){if(null!=(r=e.parentId)){var r,n=!1;if((null==(r=t.layoutNodes[t.idToIndex[r]]).maxX||e.maxX+r.padRight>r.maxX)&&(r.maxX=e.maxX+r.padRight,n=!0),(null==r.minX||e.minX-r.padLeft<r.minX)&&(r.minX=e.minX-r.padLeft,n=!0),(null==r.maxY||e.maxY+r.padBottom>r.maxY)&&(r.maxY=e.maxY+r.padBottom,n=!0),(null==r.minY||e.minY-r.padTop<r.minY)&&(r.minY=e.minY-r.padTop,n=!0),n)return Dle(r,t)}},"updateAncestryBoundaries"),Ole=mt(function(e,t){for(var r=e.layoutNodes,n=[],i=0;i<r.length;i++){var a=r[i],s=a.cmptId;(n[s]=n[s]||[]).push(a)}for(var o=0,i=0;i<n.length;i++)if(h=n[i]){h.x1=1/0,h.x2=-1/0,h.y1=1/0,h.y2=-1/0;for(var l=0;l<h.length;l++){var c=h[l];h.x1=Math.min(h.x1,c.positionX-c.width/2),h.x2=Math.max(h.x2,c.positionX+c.width/2),h.y1=Math.min(h.y1,c.positionY-c.height/2),h.y2=Math.max(h.y2,c.positionY+c.height/2)}h.w=h.x2-h.x1,h.h=h.y2-h.y1,o+=h.w*h.h}n.sort(function(e,t){return t.w*t.h-e.w*e.h});for(var h,u=0,d=0,p=0,g=0,f=Math.sqrt(o)*e.clientWidth/e.clientHeight,i=0;i<n.length;i++)if(h=n[i]){for(l=0;l<h.length;l++)(c=h[l]).isLocked||(c.positionX+=u-h.x1,c.positionY+=d-h.y1);u+=h.w+t.componentSpacing,p+=h.w+t.componentSpacing,g=Math.max(g,h.h),f<p&&(d+=g+t.componentSpacing,g=p=u=0)}},"separateComponents"),Ple={fit:!0,padding:30,boundingBox:void 0,avoidOverlap:!0,avoidOverlapPadding:10,nodeDimensionsIncludeLabels:!1,spacingFactor:void 0,condense:!1,rows:void 0,cols:void 0,position:mt(function(e){},"position"),sort:void 0,animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:mt(function(e,t){return!0},"animateFilter"),ready:void 0,stop:void 0,transform:mt(function(e,t){return t},"transform")},mt(iJ,"GridLayout"),iJ.prototype.run=function(){var e=t=this.options,t=t.cy,r=(c=e.eles).nodes().not(":parent"),i=(e.sort&&(r=r.sort(e.sort)),Jre(e.boundingBox||{x1:0,y1:0,w:t.width(),h:t.height()}));if(0===i.h||0===i.w)c.nodes().layoutPositions(this,e,function(e){return{x:i.x1,y:i.y1}});else{var n=r.size(),t=Math.sqrt(n*i.h/i.w),a=Math.round(t),s=Math.round(i.w/i.h*t),o=mt(function(e){if(null==e)return Math.min(a,s);Math.min(a,s)==a?a=e:s=e},"small"),l=mt(function(e){if(null==e)return Math.max(a,s);Math.max(a,s)==a?a=e:s=e},"large"),c=e.rows,t=null!=e.cols?e.cols:e.columns;if(null!=c&&null!=t)a=c,s=t;else if(null!=c&&null==t)a=c,s=Math.ceil(n/a);else if(null==c&&null!=t)s=t,a=Math.ceil(n/s);else if(n<s*a)n<=((c=o())-1)*(t=l())?o(c-1):n<=(t-1)*c&&l(t-1);else for(;s*a<n;){var h=o(),u=l();n<=(u+1)*h?l(u+1):o(h+1)}var d=i.w/s,p=i.h/a;if(e.condense&&(p=d=0),e.avoidOverlap)for(var g=0;g<r.length;g++){null!=(f=(m=r[g])._private.position).x&&null!=f.y||(f.x=0,f.y=0);var f=m.layoutDimensions(e),m=e.avoidOverlapPadding,y=f.w+m,f=f.h+m,d=Math.max(d,y),p=Math.max(p,f)}for(var v={},x=mt(function(e,t){return!!v["c-"+e+"-"+t]},"used"),b=mt(function(e,t){v["c-"+e+"-"+t]=!0},"use"),w=0,k=0,T=mt(function(){s<=++k&&(k=0,w++)},"moveToNextCell"),E={},C=0;C<r.length;C++){var _=r[C],S=e.position(_);if(S&&(void 0!==S.row||void 0!==S.col)){var A={row:S.row,col:S.col};if(void 0===A.col)for(A.col=0;x(A.row,A.col);)A.col++;else if(void 0===A.row)for(A.row=0;x(A.row,A.col);)A.row++;E[_.id()]=A,b(A.row,A.col)}}c=mt(function(e,t){var r,n;if(e.locked()||e.isParent())return!1;if(e=E[e.id()])r=e.col*d+d/2+i.x1,n=e.row*p+p/2+i.y1;else{for(;x(w,k);)T();r=k*d+d/2+i.x1,n=w*p+p/2+i.y1,b(w,k),T()}return{x:r,y:n}},"getPos"),r.layoutPositions(this,e,c)}return this},Ble={ready:mt(function(){},"ready"),stop:mt(function(){},"stop")},mt(aJ,"NullLayout"),aJ.prototype.run=function(){var e=this.options,t=e.eles;return this.emit("layoutstart"),t.nodes().positions(function(){return{x:0,y:0}}),this.one("layoutready",e.ready),this.emit("layoutready"),this.one("layoutstop",e.stop),this.emit("layoutstop"),this},$le={positions:void 0,zoom:void 0,pan:void 0,fit:!0,padding:30,spacingFactor:void 0,animate:!(aJ.prototype.stop=function(){return this}),animationDuration:500,animationEasing:void 0,animateFilter:mt(function(e,t){return!0},"animateFilter"),ready:void 0,stop:void 0,transform:mt(function(e,t){return t},"transform")},mt(sJ,"PresetLayout"),Fle={fit:!0,padding:30,boundingBox:void 0,animate:!(sJ.prototype.run=function(){var t=this.options,e=t.eles.nodes(),r=Tee(t.positions);function n(e){return null==t.positions?Dre(e.position()):r?t.positions(e):t.positions[e._private.data.id]??null}return mt(n,"getPosition"),e.layoutPositions(this,t,function(e,t){var r=n(e);return!e.locked()&&null!=r&&r}),this}),animationDuration:500,animationEasing:void 0,animateFilter:mt(function(e,t){return!0},"animateFilter"),ready:void 0,stop:void 0,transform:mt(function(e,t){return t},"transform")},mt(oJ,"RandomLayout"),oJ.prototype.run=function(){var e=this.options,t=e.cy,r=e.eles,n=Jre(e.boundingBox||{x1:0,y1:0,w:t.width(),h:t.height()}),t=mt(function(e,t){return{x:n.x1+Math.round(Math.random()*n.w),y:n.y1+Math.round(Math.random()*n.h)}},"getPos");return r.nodes().layoutPositions(this,e,t),this},zle=[{name:"breadthfirst",impl:eJ},{name:"circle",impl:tJ},{name:"concentric",impl:rJ},{name:"cose",impl:nJ},{name:"grid",impl:iJ},{name:"null",impl:aJ},{name:"preset",impl:sJ},{name:"random",impl:oJ}],mt(lJ,"NullRenderer"),phe=mt(function(){},"noop"),kce=mt(function(){throw new Error("A headless instance can not render images")},"throwImgErr"),lJ.prototype={recalculateRenderedStyle:phe,notify:mt(function(){this.notifications++},"notify"),init:phe,isHeadless:mt(function(){return!0},"isHeadless"),png:kce,jpg:kce},Bce={arrowShapeWidth:.3,registerArrowShapes:function(){var r=this.arrowShapes={},o=this,n=mt(function(e,t,r,n,i,a,s){return i.x-r/2-s<=e&&e<=i.x+r/2+s&&i.y-r/2-s<=t&&t<=i.y+r/2+s},"bbCollide"),l=mt(function(e,t,r,n,i){var a=e*Math.cos(n)-t*Math.sin(n),e=e*Math.sin(n)+t*Math.cos(n);return{x:a*r+i.x,y:e*r+i.y}},"transform"),c=mt(function(e,t,r,n){for(var i=[],a=0;a<e.length;a+=2)i.push(l(e[a],e[a+1],t,r,n));return i},"transformPoints"),h=mt(function(e){for(var t=[],r=0;r<e.length;r++){var n=e[r];t.push(n.x,n.y)}return t},"pointsToArr"),i=mt(function(e){return e.pstyle("width").pfValue*e.pstyle("arrow-scale").pfValue*2},"standardGap"),e=mt(function(e,t){kee(t)&&(t=r[t]),r[e]=Xee({name:e,points:[-.15,-.3,.15,-.3,.15,.3,-.15,.3],collide:mt(function(e,t,r,n,i,a){return r=h(c(this.points,r+2*a,n,i)),xne(e,t,r)},"collide"),roughCollide:n,draw:mt(function(e,t,r,n){t=c(this.points,t,r,n),o.arrowShapeImpl("polygon")(e,t)},"draw"),spacing:mt(function(e){return 0},"spacing"),gap:i},t)},"defineArrowShape");e("none",{collide:tre,roughCollide:tre,draw:nre,spacing:rre,gap:rre}),e("triangle",{points:[-.15,-.3,0,0,.15,-.3]}),e("arrow","triangle"),e("triangle-backcurve",{points:r.triangle.points,controlPoint:[0,-.15],roughCollide:n,draw:mt(function(e,t,r,n,i){var a=c(this.points,t,r,n),s=this.controlPoint,s=l(s[0],s[1],t,r,n);o.arrowShapeImpl(this.name)(e,a,s)},"draw"),gap:mt(function(e){return.8*i(e)},"gap")}),e("triangle-tee",{points:[0,0,.15,-.3,-.15,-.3,0,0],pointsTee:[-.15,-.4,-.15,-.5,.15,-.5,.15,-.4],collide:mt(function(e,t,r,n,i,a,s){var o=h(c(this.points,r+2*s,n,i)),r=h(c(this.pointsTee,r+2*s,n,i));return xne(e,t,o)||xne(e,t,r)},"collide"),draw:mt(function(e,t,r,n,i){var a=c(this.points,t,r,n),t=c(this.pointsTee,t,r,n);o.arrowShapeImpl(this.name)(e,a,t)},"draw")}),e("circle-triangle",{radius:.15,pointsTr:[0,-.15,.15,-.45,-.15,-.45,0,-.15],collide:mt(function(e,t,r,n,i,a,s){var o=i,o=Math.pow(o.x-e,2)+Math.pow(o.y-t,2)<=Math.pow((r+2*s)*this.radius,2),r=h(c(this.points,r+2*s,n,i));return xne(e,t,r)||o},"collide"),draw:mt(function(e,t,r,n,i){r=c(this.pointsTr,t,r,n),o.arrowShapeImpl(this.name)(e,r,n.x,n.y,this.radius*t)},"draw"),spacing:mt(function(e){return o.getArrowWidth(e.pstyle("width").pfValue,e.pstyle("arrow-scale").value)*this.radius},"spacing")}),e("triangle-cross",{points:[0,0,.15,-.3,-.15,-.3,0,0],baseCrossLinePts:[-.15,-.4,-.15,-.4,.15,-.4,.15,-.4],crossLinePts:mt(function(e,t){var r=this.baseCrossLinePts.slice(),t=t/e;return r[3]=r[3]-t,r[5]=r[5]-t,r},"crossLinePts"),collide:mt(function(e,t,r,n,i,a,s){var o=h(c(this.points,r+2*s,n,i)),a=h(c(this.crossLinePts(r,a),r+2*s,n,i));return xne(e,t,o)||xne(e,t,a)},"collide"),draw:mt(function(e,t,r,n,i){var a=c(this.points,t,r,n),i=c(this.crossLinePts(t,i),t,r,n);o.arrowShapeImpl(this.name)(e,a,i)},"draw")}),e("vee",{points:[-.15,-.3,0,0,.15,-.3,0,-.15],gap:mt(function(e){return.525*i(e)},"gap")}),e("circle",{radius:.15,collide:mt(function(e,t,r,n,i,a,s){return Math.pow(i.x-e,2)+Math.pow(i.y-t,2)<=Math.pow((r+2*s)*this.radius,2)},"collide"),draw:mt(function(e,t,r,n,i){o.arrowShapeImpl(this.name)(e,n.x,n.y,this.radius*t)},"draw"),spacing:mt(function(e){return o.getArrowWidth(e.pstyle("width").pfValue,e.pstyle("arrow-scale").value)*this.radius},"spacing")}),e("tee",{points:[-.15,0,-.15,-.1,.15,-.1,.15,0],spacing:mt(function(e){return 1},"spacing"),gap:mt(function(e){return 1},"gap")}),e("square",{points:[-.15,0,.15,0,.15,-.3,-.15,-.3]}),e("diamond",{points:[-.15,-.15,0,-.3,.15,-.15,0,0],gap:mt(function(e){return e.pstyle("width").pfValue*e.pstyle("arrow-scale").value},"gap")}),e("chevron",{points:[0,0,-.15,-.15,-.1,-.2,0,-.1,.1,-.2,.15,-.15],gap:mt(function(e){return.95*e.pstyle("width").pfValue*e.pstyle("arrow-scale").value},"gap")})}},Ece={projectIntoViewport:function(e,t){var r=this.cy,n=(a=this.findContainerClientCoords())[0],i=a[1],a=a[4],s=r.pan(),r=r.zoom();return[((e-n)/a-s.x)/r,((t-i)/a-s.y)/r]},findContainerClientCoords:function(){var t,e,r,n,i,a,s,o,l,c,h;return this.containerBB||(h=(o=this.container).getBoundingClientRect(),t=this.cy.window().getComputedStyle(o),e=(s=mt(function(e){return parseFloat(t.getPropertyValue(e))},"styleValue"))("padding-left"),r=s("padding-right"),n=s("padding-top"),i=s("padding-bottom"),c=s("border-left-width"),l=s("border-right-width"),a=s("border-top-width"),s("border-bottom-width"),s=o.clientWidth,o=o.clientHeight,l=h.width/(s+(c+l)),c=h.left+e+c,h=h.top+n+a,this.containerBB=[c,h,s-(e+r),o-(n+i),l])},invalidateContainerClientCoordsCache:function(){this.containerBB=null},findNearestElement:function(e,t,r,n){return this.findNearestElements(e,t,r,n)[0]},findNearestElements:function(y,v,e,t){var n,i,x=this,b=this,r=b.getCachedZSortedEles(),w=[],a=b.cy.zoom(),k=b.cy.hasCompoundNodes(),T=(t?24:8)/a,l=(t?8:2)/a,g=(t?8:2)/a,s=1/0;function E(e,t){if(e.isNode()){if(i)return;i=e,w.push(e)}if(e.isEdge()&&(null==t||t<s))if(n){if(n.pstyle("z-compound-depth").value===e.pstyle("z-compound-depth").value&&n.pstyle("z-compound-depth").value===e.pstyle("z-compound-depth").value)for(var r=0;r<w.length;r++)if(w[r].isEdge()){w[r]=e,n=e,s=t??s;break}}else w.push(e),n=e,s=t??s}function C(e){var t=e.outerWidth()+2*l,r=e.outerHeight()+2*l,n=t/2,i=r/2,a=e.position(),s="auto"===e.pstyle("corner-radius").value?"auto":e.pstyle("corner-radius").pfValue,o=e._private.rscratch;if(a.x-n<=y&&y<=a.x+n&&a.y-i<=v&&v<=a.y+i&&b.nodeShapes[x.getNodeShape(e)].checkPoint(y,v,0,t,r,a.x,a.y,s,o))return E(e,0),!0}function o(e){var t,r=e._private,n=r.rscratch,i=e.pstyle("width").pfValue,a=e.pstyle("arrow-scale").value,s=(l=i/2+T)*l,o=2*l,l=r.source,c=r.target;if("segments"===n.edgeType||"straight"===n.edgeType||"haystack"===n.edgeType){for(var h=n.allpts,u=0;u+3<h.length;u+=2)if(pne(y,v,h[u],h[u+1],h[u+2],h[u+3],o)&&s>(t=vne(y,v,h[u],h[u+1],h[u+2],h[u+3])))return E(e,t),!0}else if("bezier"===n.edgeType||"multibezier"===n.edgeType||"self"===n.edgeType||"compound"===n.edgeType)for(h=n.allpts,u=0;u+5<n.allpts.length;u+=4)if(gne(y,v,h[u],h[u+1],h[u+2],h[u+3],h[u+4],h[u+5],o)&&s>(t=yne(y,v,h[u],h[u+1],h[u+2],h[u+3],h[u+4],h[u+5])))return E(e,t),!0;for(var l=l||r.source,c=c||r.target,d=x.getArrowWidth(i,a),p=[{name:"source",x:n.arrowStartX,y:n.arrowStartY,angle:n.srcArrowAngle},{name:"target",x:n.arrowEndX,y:n.arrowEndY,angle:n.tgtArrowAngle},{name:"mid-source",x:n.midX,y:n.midY,angle:n.midsrcArrowAngle},{name:"mid-target",x:n.midX,y:n.midY,angle:n.midtgtArrowAngle}],u=0;u<p.length;u++){var g=p[u],f=b.arrowShapes[e.pstyle(g.name+"-arrow-shape").value],m=e.pstyle("width").pfValue;if(f.roughCollide(y,v,d,g.angle,{x:g.x,y:g.y},m,T)&&f.collide(y,v,d,g.angle,{x:g.x,y:g.y},m,T))return E(e),!0}k&&0<w.length&&(C(l),C(c))}function f(e,t,r){return mre(e,t,r)}function c(e,t){var r=e._private,n=g,i=t?t+"-":"",a=(e.boundingBox(),r.labelBounds[t||"main"]),s=e.pstyle(i+"label").value;if("yes"===e.pstyle("text-events").strValue&&s){var o=f(r.rscratch,"labelX",t),l=f(r.rscratch,"labelY",t),s=f(r.rscratch,"labelAngle",t),r=e.pstyle(i+"text-margin-x").pfValue,t=e.pstyle(i+"text-margin-y").pfValue,i=a.x1-n-r,c=a.x2+n-r,h=a.y1-n-t,n=a.y2+n-t;if(s){var u=Math.cos(s),d=Math.sin(s),p=(s=mt(function(e,t){return{x:(e-=o)*u-(t-=l)*d+o,y:e*d+t*u+l}},"rotate"))(i,h),i=s(i,n),h=s(c,h),s=s(c,n),c=[p.x+r,p.y+t,h.x+r,h.y+t,s.x+r,s.y+t,i.x+r,i.y+t];if(xne(y,v,c))return E(e),!0}else if(lne(a,y,v))return E(e),!0}}e&&(r=r.interactive),mt(E,"addEle"),mt(C,"checkNode"),mt(o,"checkEdge"),mt(f,"preprop"),mt(c,"checkLabel");for(var h=r.length-1;0<=h;h--){var u=r[h];u.isNode()?C(u)||c(u):o(u)||c(u)||c(u,"source")||c(u,"target")}return w},getAllInBox:function(e,t,r,n){var i=this.getCachedZSortedEles().interactive,u=2/this.cy.zoom(),a=[],s=Math.min(e,r),o=Math.max(e,r),l=Math.min(t,n),c=Math.max(t,n),h=Jre({x1:e=s,y1:t=l,x2:r=o,y2:n=c}),d=[{x:h.x1,y:h.y1},{x:h.x2,y:h.y1},{x:h.x2,y:h.y2},{x:h.x1,y:h.y2}],p=[[d[0],d[1]],[d[1],d[2]],[d[2],d[3]],[d[3],d[0]]];function g(e,t,r){return mre(e,t,r)}function f(e,t){var r,n,i,a,s,o,l=e._private,c=u,h=(e.boundingBox(),l.labelBounds.main);return h?(r=g(l.rscratch,"labelX",t),n=g(l.rscratch,"labelY",t),l=g(l.rscratch,"labelAngle",t),t=e.pstyle("text-margin-x").pfValue,e=e.pstyle("text-margin-y").pfValue,i=h.x1-c-t,t=h.x2+c-t,a=h.y1-c-e,h=h.y2+c-e,l?(s=Math.cos(l),o=Math.sin(l),[(c=mt(function(e,t){return{x:(e-=r)*s-(t-=n)*o+r,y:e*o+t*s+n}},"rotate"))(i,a),c(t,a),c(t,h),c(i,h)]):[{x:i,y:a},{x:t,y:a},{x:t,y:h},{x:i,y:h}]):null}function m(e,t,r,n){function i(e,t,r){return(r.y-e.y)*(t.x-e.x)>(t.y-e.y)*(r.x-e.x)}return mt(i,"ccw"),i(e,r,n)!==i(t,r,n)&&i(e,t,r)!==i(e,t,n)}mt(g,"preprop"),mt(f,"getRotatedLabelBox"),mt(m,"doLinesIntersect");for(var y=0;y<i.length;y++){var v=i[y];if(v.isNode()){var x=v,b="yes"===x.pstyle("text-events").strValue,w=x.pstyle("box-selection").strValue,k="yes"===x.pstyle("box-select-labels").strValue;"none"!==w&&(C=x.boundingBox({includeNodes:!0,includeEdges:!1,includeLabels:("overlap"===w||k)&&b}),"contain"===w?(E=!1,k&&b&&(k=f(x))&&AZ(k,d)&&(a.push(x),E=!0),!E&&hne(h,C)&&a.push(x)):"overlap"===w&&one(h,C)&&(AZ([{x:(b=x.boundingBox({includeNodes:!0,includeEdges:!0,includeLabels:!1,includeMainLabels:!1,includeSourceLabels:!1,includeTargetLabels:!1})).x1,y:b.y1},{x:b.x2,y:b.y1},{x:b.x2,y:b.y2},{x:b.x1,y:b.y2}],d)||(k=f(x))&&AZ(k,d))&&a.push(x))}else{var T=v,E=T._private,w=E.rscratch,C=T.pstyle("box-selection").strValue;if("none"!==C)if("contain"===C){if((null==w.startX||null==w.startY||lne(h,w.startX,w.startY))&&(null==w.endX||null==w.endY||lne(h,w.endX,w.endY)))if("bezier"===w.edgeType||"multibezier"===w.edgeType||"self"===w.edgeType||"compound"===w.edgeType||"segments"===w.edgeType||"haystack"===w.edgeType){for(var _=E.rstyle.bezierPts||E.rstyle.linePts||E.rstyle.haystackPts,S=!0,A=0;A<_.length;A++)if(!cne(h,_[A])){S=!1;break}S&&a.push(T)}else"straight"===w.edgeType&&a.push(T)}else if("overlap"===C){var L=!1;if(null!=w.startX&&null!=w.startY&&null!=w.endX&&null!=w.endY&&(lne(h,w.startX,w.startY)||lne(h,w.endX,w.endY)))a.push(T),L=!0;else if(!L&&"haystack"===w.edgeType)for(var N=E.rstyle.haystackPts,I=0;I<N.length;I++)if(cne(h,N[I])){a.push(T),L=!0;break}if(!L){var R=E.rstyle.bezierPts||E.rstyle.linePts||E.rstyle.haystackPts;if((R=(!R||R.length<2)&&"straight"===w.edgeType&&null!=w.startX&&null!=w.startY&&null!=w.endX&&null!=w.endY?[{x:w.startX,y:w.startY},{x:w.endX,y:w.endY}]:R)&&!(R.length<2))for(var M=0;M<R.length-1;M++){for(var P=R[M],B=R[M+1],D=0;D<p.length;D++){var O=tZ(p[D],2);if(m(P,B,O[0],O[1])){a.push(T),L=!0;break}}if(L)break}}}}}return a}},(Ice={calculateArrowAngles:function(e){var t,r,n,i,a,s,o,l,c,h,u,d,p,g,f="haystack"===(e=e._private.rscratch).edgeType,m="bezier"===e.edgeType,y="multibezier"===e.edgeType,v="segments"===e.edgeType,x="compound"===e.edgeType,b="self"===e.edgeType,w=f?(d=e.haystackPts[0],g=e.haystackPts[1],t=e.haystackPts[2],e.haystackPts[3]):(d=e.arrowStartX,g=e.arrowStartY,t=e.arrowEndX,e.arrowEndY),k=(k=e.midX,T=e.midY,n=v?(r=d-e.segpts[0],g-e.segpts[1]):y||x||b||m?(p=e.allpts,r=d-Xre(p[0],p[2],p[4],.1),g-Xre(p[1],p[3],p[5],.1)):(r=d-k,g-T),e.srcArrowAngle=qre(r,n),e.midX),T=e.midY;f&&(k=(d+t)/2,T=(g+w)/2),r=t-d,n=w-g,v?n=(p=e.allpts).length/2%2==0?(i=(u=p.length/2)-2,r=p[u]-p[i],p[u+1]-p[i+1]):e.isRound?(r=e.midVector[1],-e.midVector[0]):(i=(u=p.length/2-1)-2,r=p[u]-p[i],p[u+1]-p[i+1]):(y||x||b)&&(p=e.allpts,f=e.ctrlpts.length/2%2==0?(h=2+(l=2+(c=p.length/2-1)),a=Xre(p[c],p[l],p[h],0),s=Xre(p[c+1],p[l+1],p[h+1],0),o=Xre(p[c],p[l],p[h],1e-4),Xre(p[c+1],p[l+1],p[h+1],1e-4)):(h=2+(l=p.length/2-1),a=Xre(p[c=l-2],p[l],p[h],.4999),s=Xre(p[c+1],p[l+1],p[h+1],.4999),o=Xre(p[c],p[l],p[h],.5),Xre(p[c+1],p[l+1],p[h+1],.5)),r=o-a,n=f-s),e.midtgtArrowAngle=qre(r,n),e.midDispX=r,e.midDispY=n,r*=-1,n*=-1,v&&(p=e.allpts).length/2%2!=0&&!e.isRound&&(r=-(p[d=2+(u=p.length/2-1)]-p[u]),n=-(p[d+1]-p[u+1])),e.midsrcArrowAngle=qre(r,n),n=v?(r=t-e.segpts[e.segpts.length-2],w-e.segpts[e.segpts.length-1]):y||x||b||m?(g=(p=e.allpts).length,r=t-Xre(p[g-6],p[g-4],p[g-2],.9),w-Xre(p[g-5],p[g-3],p[g-1],.9)):(r=t-k,w-T),e.tgtArrowAngle=qre(r,n)}}).getArrowWidth=Ice.getArrowHeight=function(e,t){var r,n=this.arrowWidthCache=this.arrowWidthCache||{};return n[e+", "+t]||(r=Math.max(Math.pow(13.37*e,.9),29)*t,n[e+", "+t]=r)},qle={},jle={},nce=mt(function(e,t,r){r.x=t.x-e.x,r.y=t.y-e.y,r.len=Math.sqrt(r.x*r.x+r.y*r.y),r.nx=r.x/r.len,r.ny=r.y/r.len,r.ang=Math.atan2(r.ny,r.nx)},"asVec"),ice=mt(function(e,t){t.x=-1*e.x,t.y=-1*e.y,t.nx=-1*e.nx,t.ny=-1*e.ny,t.ang=0<e.ang?-(Math.PI-e.ang):Math.PI+e.ang},"invertVec"),ace=mt(function(e,t,r,n,i){e!==rce?nce(t,e,qle):ice(jle,qle),nce(t,r,jle),Zle=qle.nx*jle.ny-qle.ny*jle.nx,Hle=qle.nx*jle.nx-qle.ny*-jle.ny,Zle=Math.asin(Math.max(-1,Math.min(1,Zle))),Math.abs(Zle)<1e-6?(Gle=t.x,Ule=t.y,Vle=Kle=0):(Wle=!(Yle=1),Hle<0?Zle<0?Zle=Math.PI+Zle:(Zle=Math.PI-Zle,Yle=-1,Wle=!0):0<Zle&&(Yle=-1,Wle=!0),Kle=void 0!==t.radius?t.radius:n,Hle=Zle/2,Zle=Math.min(qle.len/2,jle.len/2),Vle=i?(Xle=Math.abs(Math.cos(Hle)*Kle/Math.sin(Hle)),Zle<Xle?(Xle=Zle,Math.abs(Xle*Math.sin(Hle)/Math.cos(Hle))):Kle):(Xle=Math.min(Zle,Kle),Math.abs(Xle*Math.sin(Hle)/Math.cos(Hle))),ece=t.x+jle.nx*Xle,tce=t.y+jle.ny*Xle,Gle=ece-jle.ny*Vle*Yle,Ule=tce+jle.nx*Vle*Yle,Qle=t.x+qle.nx*Xle,Jle=t.y+qle.ny*Xle,rce=t)},"calcCornerArc"),mt(cJ,"drawPreparedRoundCorner"),mt(hJ,"getRoundCorner"),sce=Math.sqrt(.02),Rce={findMidptPtsEtc:function(e,t){var r,n,i,a,s,o,l=t.posPts,c=t.intersectionPts,h=t.vectorNormInverse,u=e.pstyle("source-endpoint"),d=e.pstyle("target-endpoint"),p=null!=u.units&&null!=d.units,g=mt(function(e,t,r,n){return n-=t,t=r-e,{x:-n/(r=Math.sqrt(t*t+n*n)),y:t/r}},"recalcVectorNormInverse");switch(e.pstyle("edge-distances").value){case"node-position":o=l;break;case"intersection":o=c;break;case"endpoints":o=p?(s={x1:r=(n=tZ(this.manualEndptToPx(e.source()[0],u),2))[0],y1:n=n[1],x2:i=(a=tZ(this.manualEndptToPx(e.target()[0],d),2))[0],y2:a=a[1]},h=g(r,n,i,a),s):(sre("Edge ".concat(e.id()," has edge-distances:endpoints specified without manual endpoints specified via source-endpoint and target-endpoint. Falling back on edge-distances:intersection (default).")),c)}return{midptPts:o,vectorNormInverse:h}},findHaystackPoints:function(e){for(var t=0;t<e.length;t++){var r=e[t],n=(a=r._private).rscratch,i=(n.haystack||(i=2*Math.random()*Math.PI,n.source={x:Math.cos(i),y:Math.sin(i)},i=2*Math.random()*Math.PI,n.target={x:Math.cos(i),y:Math.sin(i)}),a.source),a=a.target,s=i.position(),o=a.position(),l=i.width(),c=a.width(),h=i.height(),a=a.height(),u=r.pstyle("haystack-radius").value/2;n.haystackPts=n.allpts=[n.source.x*l*u+s.x,n.source.y*h*u+s.y,n.target.x*c*u+o.x,n.target.y*a*u+o.y],n.midX=(n.allpts[0]+n.allpts[2])/2,n.midY=(n.allpts[1]+n.allpts[3])/2,n.edgeType="haystack",n.haystack=!0,this.storeEdgeProjections(r),this.calculateArrowAngles(r),this.recalculateEdgeLabelProjections(r),this.calculateLabelAngles(r)}},findSegmentsPoints:function(e,t){var r=e._private.rscratch,n=e.pstyle("segment-weights"),i=e.pstyle("segment-distances"),a=e.pstyle("segment-radii"),s=e.pstyle("radius-type"),o=Math.min(n.pfValue.length,i.pfValue.length),l=a.pfValue[a.pfValue.length-1],c=s.pfValue[s.pfValue.length-1];r.edgeType="segments",r.segpts=[],r.radii=[],r.isArcRadius=[];for(var h=0;h<o;h++){var u=n.pfValue[h],d=i.pfValue[h],p=1-u,g=this.findMidptPtsEtc(e,t),f=g.midptPts,m=f.x1*p+f.x2*u;r.segpts.push(m+(g=g.vectorNormInverse).x*d,f.y1*p+f.y2*u+g.y*d),r.radii.push(void 0!==a.pfValue[h]?a.pfValue[h]:l),r.isArcRadius.push("arc-radius"===(void 0!==s.pfValue[h]?s.pfValue[h]:c))}},findLoopPoints:function(e,t,r,n){var i=e._private.rscratch,a=t.dirCounts,t=t.srcPos,s=(s=e.pstyle("control-point-distances"))?s.pfValue[0]:void 0,o=e.pstyle("loop-direction").pfValue,l=e.pstyle("loop-sweep").pfValue,e=e.pstyle("control-point-step-size").pfValue;i.edgeType="self",n&&(r=0,e=s),s=(n=o-Math.PI/2)-l/2,n+=l/2,r=void 0===a[o=o+"_"+l]?a[o]=0:++a[o],i.ctrlpts=[t.x+1.4*Math.cos(s)*e*(r/3+1),t.y+1.4*Math.sin(s)*e*(r/3+1),t.x+1.4*Math.cos(n)*e*(r/3+1),t.y+1.4*Math.sin(n)*e*(r/3+1)]},findCompoundLoopPoints:function(e,t,r,n){var i=e._private.rscratch,a=(i.edgeType="compound",t.srcPos),s=t.tgtPos,o=t.srcW,l=t.srcH,c=t.tgtW,t=t.tgtH,h=e.pstyle("control-point-step-size").pfValue,e=(e=e.pstyle("control-point-distances"))?e.pfValue[0]:void 0,n=(n&&(r=0,h=e),{x:a.x-o/2,y:a.y-l/2}),e={x:s.x-c/2,y:s.y-t/2},a={x:Math.min(n.x,e.x),y:Math.min(n.y,e.y)},l=Math.max(.5,Math.log(.01*o)),s=Math.max(.5,Math.log(.01*c));i.ctrlpts=[a.x,a.y-(1+Math.pow(50,1.12)/100)*h*(r/3+1)*l,a.x-(1+Math.pow(50,1.12)/100)*h*(r/3+1)*s,a.y]},findStraightEdgePoints:function(e){e._private.rscratch.edgeType="straight"},findBezierPoints:function(e,t,r,n,i){var a=e._private.rscratch,s=e.pstyle("control-point-step-size").pfValue,o=e.pstyle("control-point-distances"),l=e.pstyle("control-point-weights"),c=o&&l?Math.min(o.value.length,l.value.length):1,h=o?o.pfValue[0]:void 0,u=l.value[0],d=n;a.edgeType=d?"multibezier":"bezier",a.ctrlpts=[];for(var p=0;p<c;p++){var g=(.5-t.eles.length/2+r)*s*(i?-1:1),f=Yre(g),f=(d&&(h=o?o.pfValue[p]:s,u=l.value[p]),void 0!==(m=n?h:void 0!==h?f*h:void 0)?m:g),m=1-u,g=u,y=this.findMidptPtsEtc(e,t),v=y.midptPts,x=v.x1*m+v.x2*g;a.ctrlpts.push(x+(y=y.vectorNormInverse).x*f,v.y1*m+v.y2*g+y.y*f)}},findTaxiPoints:function(e,t){var r=e._private.rscratch,n=(r.edgeType="segments","vertical"),i="horizontal",a=t.posPts,s=t.srcW,o=t.srcH,l=t.tgtW,t=t.tgtH,c="node-position"!==e.pstyle("edge-distances").value,h=e.pstyle("taxi-direction").value,u=h,d=e.pstyle("taxi-turn"),p="%"===d.units,g=(d=d.pfValue)<0,f=e.pstyle("taxi-turn-min-distance").pfValue,m=c?(s+l)/2:0,y=c?(o+t)/2:0,v=a.x2-a.x1,x=a.y2-a.y1,m=(b=mt(function(e,t){return 0<e?Math.max(e-t,0):Math.min(e+t,0)},"subDWH"))(v,m),b=b(x,y),y=!1,w=("auto"===u?h=Math.abs(m)>Math.abs(b)?i:n:"upward"===u||"downward"===u?(h=n,y=!0):"leftward"!==u&&"rightward"!==u||(h=i,y=!0),(i=h===n)?b:m),n=Yre(h=i?x:v),b=!1;y&&(p||g)||!("downward"===u&&h<0||"upward"===u&&0<h||"leftward"===u&&0<h||"rightward"===u&&h<0)||(w=(n*=-1)*Math.abs(w),b=!0),m=p?(d<0?1+d:d)*w:(d<0?w:0)+d*n,g=(y=mt(function(e){return Math.abs(e)<f||Math.abs(e)>=Math.abs(w)},"getIsTooClose"))(m),u=y(Math.abs(w)-Math.abs(m)),!g&&!u||b?i?(h=a.y1+m+(c?o/2*n:0),x=a.x1,t=a.x2,r.segpts=[x,h,t,h]):(p=a.x1+m+(c?s/2*n:0),u=a.y1,d=a.y2,r.segpts=[p,u,p,d]):i?(p=Math.abs(h)<=o/2,d=Math.abs(v)<=l/2,p?(y=(a.x1+a.x2)/2,g=a.y1,u=a.y2,r.segpts=[y,g,y,u]):d?(b=(a.y1+a.y2)/2,v=a.x1,l=a.x2,r.segpts=[v,b,l,b]):r.segpts=[a.x1,a.y2]):(p=Math.abs(h)<=s/2,g=Math.abs(x)<=t/2,p?(y=(a.y1+a.y2)/2,u=a.x1,d=a.x2,r.segpts=[u,y,d,y]):g?(v=(a.x1+a.x2)/2,l=a.y1,b=a.y2,r.segpts=[v,l,v,b]):r.segpts=[a.x2,a.y1]),r.isRound&&(y=e.pstyle("taxi-radius").value,g="arc-radius"===e.pstyle("radius-type").value[0],r.radii=new Array(r.segpts.length/2).fill(y),r.isArcRadius=new Array(r.segpts.length/2).fill(g))},tryToCorrectInvalidPoints:function(e,t){var r,n,i,a,s,o,l,c,h,u,d,p,g,f,m,y,v,x,b,w,k,T,E=e._private.rscratch;"bezier"===E.edgeType&&(m=t.srcPos,r=t.tgtPos,n=t.srcW,i=t.srcH,a=t.tgtW,s=t.tgtH,T=t.srcShape,o=t.tgtShape,v=t.srcCornerRadius,l=t.tgtCornerRadius,x=t.srcRs,t=t.tgtRs,y=!he(E.startX)||!he(E.startY),f=!he(E.arrowStartX)||!he(E.arrowStartY),c=!he(E.endX)||!he(E.endY),h=!he(E.arrowEndX)||!he(E.arrowEndY),u=this.getArrowWidth(e.pstyle("width").pfValue,e.pstyle("arrow-scale").value)*this.arrowShapeWidth*3,b=(w=Wre({x:E.ctrlpts[0],y:E.ctrlpts[1]},{x:E.startX,y:E.startY}))<u,p=(d=Wre({x:E.ctrlpts[0],y:E.ctrlpts[1]},{x:E.endX,y:E.endY}))<u,g=!1,(y||f||b)&&(g=!0,y=E.ctrlpts[0]-m.x,f=E.ctrlpts[1]-m.y,k=y/(y=Math.sqrt(y*y+f*f)),f/=y,y=Math.max(n,i),y={x:E.ctrlpts[0]+2*k*y,y:E.ctrlpts[1]+2*f*y},T=T.intersectLine(m.x,m.y,n,i,y.x,y.y,0,v,x),b?(E.ctrlpts[0]=E.ctrlpts[0]+k*(u-w),E.ctrlpts[1]=E.ctrlpts[1]+f*(u-w)):(E.ctrlpts[0]=T[0]+k*u,E.ctrlpts[1]=T[1]+f*u)),(c||h||p)&&(g=!0,m=E.ctrlpts[0]-r.x,y=E.ctrlpts[1]-r.y,x=m/(v=Math.sqrt(m*m+y*y)),b=y/v,w=Math.max(n,i),k={x:E.ctrlpts[0]+2*x*w,y:E.ctrlpts[1]+2*b*w},T=o.intersectLine(r.x,r.y,a,s,k.x,k.y,0,l,t),p?(E.ctrlpts[0]=E.ctrlpts[0]+x*(u-d),E.ctrlpts[1]=E.ctrlpts[1]+b*(u-d)):(E.ctrlpts[0]=T[0]+x*u,E.ctrlpts[1]=T[1]+b*u)),g)&&this.findEndpoints(e)},storeAllpts:function(e){var t,r,n,i,a=e._private.rscratch;if("multibezier"===a.edgeType||"bezier"===a.edgeType||"self"===a.edgeType||"compound"===a.edgeType){a.allpts=[],a.allpts.push(a.startX,a.startY);for(var s,o=0;o+1<a.ctrlpts.length;o+=2)a.allpts.push(a.ctrlpts[o],a.ctrlpts[o+1]),o+3<a.ctrlpts.length&&a.allpts.push((a.ctrlpts[o]+a.ctrlpts[o+2])/2,(a.ctrlpts[o+1]+a.ctrlpts[o+3])/2);a.allpts.push(a.endX,a.endY),a.ctrlpts.length/2%2==0?(s=a.allpts.length/2-1,a.midX=a.allpts[s],a.midY=a.allpts[s+1]):(s=a.allpts.length/2-3,a.midX=Xre(a.allpts[s],a.allpts[s+2],a.allpts[s+4],.5),a.midY=Xre(a.allpts[s+1],a.allpts[s+3],a.allpts[s+5],.5))}else if("straight"===a.edgeType)a.allpts=[a.startX,a.startY,a.endX,a.endY],a.midX=(a.startX+a.endX+a.arrowStartX+a.arrowEndX)/4,a.midY=(a.startY+a.endY+a.arrowStartY+a.arrowEndY)/4;else if("segments"===a.edgeType){if(a.allpts=[],a.allpts.push(a.startX,a.startY),a.allpts.push.apply(a.allpts,a.segpts),a.allpts.push(a.endX,a.endY),a.isRound){a.roundCorners=[];for(var l=2;l+3<a.allpts.length;l+=2){var c=a.radii[l/2-1],h=a.isArcRadius[l/2-1];a.roundCorners.push(hJ({x:a.allpts[l-2],y:a.allpts[l-1]},{x:a.allpts[l],y:a.allpts[l+1],radius:c},{x:a.allpts[l+2],y:a.allpts[l+3]},c,h))}}a.segpts.length%4==0?(e=a.segpts.length/2,a.midX=(a.segpts[s=e-2]+a.segpts[e])/2,a.midY=(a.segpts[1+s]+a.segpts[1+e])/2):(s=a.segpts.length/2-1,a.isRound?(e={x:a.segpts[s],y:a.segpts[1+s]},0===(t=a.roundCorners[s/2]).radius?(r=a.segpts[2+s],i=a.segpts[3+s],a.midX=e.x,a.midY=e.y,a.midVector=[e.y-i,r-e.x]):(i=[e.x-t.cx,e.y-t.cy],n=t.radius/Math.sqrt(Math.pow(i[0],2)+Math.pow(i[1],2)),i=i.map(function(e){return e*n}),a.midX=t.cx+i[0],a.midY=t.cy+i[1],a.midVector=i)):(a.midX=a.segpts[s],a.midY=a.segpts[1+s]))}},checkForInvalidEdgeWarning:function(e){var t=e[0]._private.rscratch;t.nodesOverlap||he(t.startX)&&he(t.startY)&&he(t.endX)&&he(t.endY)?t.loggedErr=!1:t.loggedErr||(t.loggedErr=!0,sre("Edge `"+e.id()+"` has invalid endpoints and so it is impossible to draw. Adjust your edge style (e.g. control points) accordingly or use an alternative edge type. This is expected behaviour when the source node and the target node overlap."))},findEdgeControlPoints:function(e){var M=this;if(e&&0!==e.length){for(var D=this,O=D.cy.hasCompoundNodes(),P=new vre,B=mt(function(e,t){return[].concat(rZ(e),[t?1:0]).join("-")},"getKey"),$=[],t=[],r=0;r<e.length;r++){var n,i,a,s=e[r],o=s._private,l=s.pstyle("curve-style").value;!s.removed()&&s.takesUpSpace()&&("haystack"===l?t.push(s):(n="unbundled-bezier"===l||Yee(l,"segments")||"straight"===l||"straight-triangle"===l||Yee(l,"taxi"),l="unbundled-bezier"===l||"bezier"===l,i=o.source,o=o.target,i=[i.poolIndex(),o.poolIndex()].sort(),o=B(i,n),null==(a=P.get(o))&&(a={eles:[]},$.push({pairId:i,edgeIsUnbundled:n}),P.set(o,a)),a.eles.push(s),n&&(a.hasUnbundled=!0),l&&(a.hasBezier=!0)))}for(var c=mt(function(){var e=$[F],t=e.pairId,t=B(t,e.edgeIsUnbundled),r=P.get(t),n=(r.hasUnbundled||(e=r.eles[0].parallelEdges().filter(function(e){return e.isBundledBezier()}),gre(r.eles),e.forEach(function(e){return r.eles.push(e)}),r.eles.sort(function(e,t){return e.poolIndex()-t.poolIndex()})),(t=r.eles[0]).source()),i=t.target(),a=(n.poolIndex()>i.poolIndex()&&(e=n,n=i,i=e),r.srcPos=n.position()),s=r.tgtPos=i.position(),o=r.srcW=n.outerWidth(),l=r.srcH=n.outerHeight(),c=r.tgtW=i.outerWidth(),h=r.tgtH=i.outerHeight(),u=r.srcShape=D.nodeShapes[M.getNodeShape(n)],d=r.tgtShape=D.nodeShapes[M.getNodeShape(i)],p=r.srcCornerRadius="auto"===n.pstyle("corner-radius").value?"auto":n.pstyle("corner-radius").pfValue,g=r.tgtCornerRadius="auto"===i.pstyle("corner-radius").value?"auto":i.pstyle("corner-radius").pfValue,f=r.tgtRs=i._private.rscratch,m=r.srcRs=n._private.rscratch;r.dirCounts={north:0,west:0,south:0,east:0,northwest:0,southwest:0,northeast:0,southeast:0};for(var y=0;y<r.eles.length;y++){var v,x,b,w,k,T,E,C,_,S=r.eles[y],A=S[0]._private.rscratch,L=S.pstyle("curve-style").value,N="unbundled-bezier"===L||Yee(L,"segments")||Yee(L,"taxi"),I=!n.same(S.source()),R=(r.calculatedIntersection||n===i||!r.hasBezier&&!r.hasUnbundled||(r.calculatedIntersection=!0,R=u.intersectLine(a.x,a.y,o,l,s.x,s.y,0,p,m),v=r.srcIntn=R,x=d.intersectLine(s.x,s.y,c,h,a.x,a.y,0,g,f),b=r.tgtIntn=x,w=r.intersectionPts={x1:R[0],x2:x[0],y1:R[1],y2:x[1]},k=r.posPts={x1:a.x,x2:s.x,y1:a.y,y2:s.y},C=x[1]-R[1],E=x[0]-R[0],T=Math.sqrt(E*E+C*C),he(T)&&sce<=T||(T=Math.sqrt(Math.max(E*E,.01)+Math.max(C*C,.01))),E=r.vector={x:E,y:C},_={x:-(C=r.vectorNorm={x:E.x/T,y:E.y/T}).y,y:C.x},r.nodesOverlap=!he(T)||d.checkPoint(R[0],R[1],0,c,h,s.x,s.y,g,f)||u.checkPoint(x[0],x[1],0,o,l,a.x,a.y,p,m),r.vectorNormInverse=_,T={nodesOverlap:r.nodesOverlap,dirCounts:r.dirCounts,calculatedIntersection:!0,hasBezier:r.hasBezier,hasUnbundled:r.hasUnbundled,eles:r.eles,srcPos:s,srcRs:f,tgtPos:a,tgtRs:m,srcW:c,srcH:h,tgtW:o,tgtH:l,srcIntn:b,tgtIntn:v,srcShape:d,tgtShape:u,posPts:{x1:k.x2,y1:k.y2,x2:k.x1,y2:k.y1},intersectionPts:{x1:w.x2,y1:w.y2,x2:w.x1,y2:w.y1},vector:{x:-E.x,y:-E.y},vectorNorm:{x:-C.x,y:-C.y},vectorNormInverse:{x:-_.x,y:-_.y}}),I?T:r);A.nodesOverlap=R.nodesOverlap,A.srcIntn=R.srcIntn,A.tgtIntn=R.tgtIntn,A.isRound=L.startsWith("round"),O&&(n.isParent()||n.isChild()||i.isParent()||i.isChild())&&(n.parents().anySame(i)||i.parents().anySame(n)||n.same(i)&&n.isParent())?M.findCompoundLoopPoints(S,R,y,N):n===i?M.findLoopPoints(S,R,y,N):L.endsWith("segments")?M.findSegmentsPoints(S,R):L.endsWith("taxi")?M.findTaxiPoints(S,R):"straight"===L||!N&&r.eles.length%2==1&&y===Math.floor(r.eles.length/2)?M.findStraightEdgePoints(S):M.findBezierPoints(S,R,y,N,I),M.findEndpoints(S),M.tryToCorrectInvalidPoints(S,R),M.checkForInvalidEdgeWarning(S),M.storeAllpts(S),M.storeEdgeProjections(S),M.calculateArrowAngles(S),M.recalculateEdgeLabelProjections(S),M.calculateLabelAngles(S)}},"_loop"),F=0;F<$.length;F++)c();this.findHaystackPoints(t)}}},mt(uJ,"getPts"),Rce.getSegmentPoints=function(e){var t=e[0]._private.rscratch;if(this.recalculateRenderedStyle(e),"segments"===t.edgeType)return uJ(t.segpts)},Rce.getControlPoints=function(e){var t=e[0]._private.rscratch;if(this.recalculateRenderedStyle(e),"bezier"===(e=t.edgeType)||"multibezier"===e||"self"===e||"compound"===e)return uJ(t.ctrlpts)},Rce.getEdgeMidpoint=function(e){var t=e[0]._private.rscratch;return this.recalculateRenderedStyle(e),{x:t.midX,y:t.midY}},Mce={manualEndptToPx:function(e,t){var r,n=e.position(),i=e.outerWidth(),a=e.outerHeight(),s=e._private.rscratch;return 2===t.value.length?(r=[t.pfValue[0],t.pfValue[1]],"%"===t.units[0]&&(r[0]=r[0]*i),"%"===t.units[1]&&(r[1]=r[1]*a),r[0]+=n.x,r[1]+=n.y,r):(r=t.pfValue[0],r=-Math.PI/2+r,t=2*Math.max(i,a),r=[n.x+Math.cos(r)*t,n.y+Math.sin(r)*t],this.nodeShapes[this.getNodeShape(e)].intersectLine(n.x,n.y,i,a,r[0],r[1],0,"auto"===e.pstyle("corner-radius").value?"auto":e.pstyle("corner-radius").pfValue,s))},findEndpoints:function(e){var t,r=e.source()[0],n=e.target()[0],i=r.position(),a=n.position(),s=e.pstyle("target-arrow-shape").value,o=e.pstyle("source-arrow-shape").value,l=e.pstyle("target-distance-from-node").pfValue,c=e.pstyle("source-distance-from-node").pfValue,h=r._private.rscratch,u=n._private.rscratch,d=e.pstyle("curve-style").value,p=e._private.rscratch,g=p.edgeType,d=Yee(d,"taxi"),f="self"===g||"compound"===g,m="bezier"===g||"multibezier"===g||f,y="bezier"!==g,v="straight"===g||"segments"===g,g="segments"===g,x=m||y||v,f=f||d,d=e.pstyle("source-endpoint"),b=f?"outside-to-node":d.value,w="auto"===r.pstyle("corner-radius").value?"auto":r.pstyle("corner-radius").pfValue,k=e.pstyle("target-endpoint"),f=f?"outside-to-node":k.value,T="auto"===n.pstyle("corner-radius").value?"auto":n.pstyle("corner-radius").pfValue;p.srcManEndpt=d;var E,C,_,S,A=null!=(A=2===(null==(p.tgtManEndpt=k)||null==(A=k.pfValue)?void 0:A.length)?k.pfValue:null)?A:[0,0],L=null!=(L=2===(null==d||null==(L=d.pfValue)?void 0:L.length)?d.pfValue:null)?L:[0,0],n=(m?(m=[p.ctrlpts[0],p.ctrlpts[1]],S=y?[p.ctrlpts[p.ctrlpts.length-2],p.ctrlpts[p.ctrlpts.length-1]]:m,C=m):v&&(y=g?p.segpts.slice(0,2):[a.x+A[0],a.y+A[1]],S=g?p.segpts.slice(p.segpts.length-2):[i.x+L[0],i.y+L[1]],C=y),"inside-to-node"===f?t=[a.x,a.y]:k.units?t=this.manualEndptToPx(n,k):"outside-to-line"===f?t=p.tgtIntn:("outside-to-node"===f||"outside-to-node-or-label"===f?_=S:"outside-to-line"!==f&&"outside-to-line-or-label"!==f||(_=[i.x,i.y]),t=this.nodeShapes[this.getNodeShape(n)].intersectLine(a.x,a.y,n.outerWidth(),n.outerHeight(),_[0],_[1],0,T,u),"outside-to-node-or-label"!==f&&"outside-to-line-or-label"!==f||(v=(m=n._private.rscratch).labelWidth,A=m.labelX,g=m.labelY,L=v/2,y=m.labelHeight/2,"top"===(k=n.pstyle("text-valign").value)?g-=y:"bottom"===k&&(g+=y),"left"===(T=n.pstyle("text-halign").value)?A-=L:"right"===T&&(A+=L),0<(u=Nne(_[0],_[1],[A-L,g-y,A+L,g-y,A+L,g+y,A-L,g+y],a.x,a.y)).length&&(v=Hre(f=i,Bre(t)),(m=Hre(f,Bre(u)))<(k=v)&&(t=u,k=m),2<u.length)&&Hre(f,{x:u[2],y:u[3]})<k&&(t=[u[2],u[3]]))),Rne(t,S,this.arrowShapes[s].spacing(e)+l)),T=Rne(t,S,this.arrowShapes[s].gap(e)+l),T=(p.endX=T[0],p.endY=T[1],p.arrowEndX=n[0],p.arrowEndY=n[1],"inside-to-node"===b?t=[i.x,i.y]:d.units?t=this.manualEndptToPx(r,d):"outside-to-line"===b?t=p.srcIntn:("outside-to-node"===b||"outside-to-node-or-label"===b?E=C:"outside-to-line"!==b&&"outside-to-line-or-label"!==b||(E=[a.x,a.y]),t=this.nodeShapes[this.getNodeShape(r)].intersectLine(i.x,i.y,r.outerWidth(),r.outerHeight(),E[0],E[1],0,w,h),"outside-to-node-or-label"!==b&&"outside-to-line-or-label"!==b||(A=(_=r._private.rscratch).labelWidth,L=_.labelX,g=_.labelY,y=A/2,v=_.labelHeight/2,"top"===(m=r.pstyle("text-valign").value)?g-=v:"bottom"===m&&(g+=v),"left"===(f=r.pstyle("text-halign").value)?L-=y:"right"===f&&(L+=y),0<(k=Nne(E[0],E[1],[L-y,g-v,L+y,g-v,L+y,g+v,L-y,g+v],i.x,i.y)).length&&(S=Hre(u=a,Bre(t)),(s=Hre(u,Bre(k)))<(l=S)&&(t=[k[0],k[1]],l=s),2<k.length)&&Hre(u,{x:k[2],y:k[3]})<l&&(t=[k[2],k[3]]))),Rne(t,C,this.arrowShapes[o].spacing(e)+c)),n=Rne(t,C,this.arrowShapes[o].gap(e)+c);p.startX=n[0],p.startY=n[1],p.arrowStartX=T[0],p.arrowStartY=T[1],x&&(he(p.startX)&&he(p.startY)&&he(p.endX)&&he(p.endY)?p.badLine=!1:p.badLine=!0)},getSourceEndpoint:function(e){var t=e[0]._private.rscratch;return"haystack"!==(this.recalculateRenderedStyle(e),t.edgeType)?{x:t.arrowStartX,y:t.arrowStartY}:{x:t.haystackPts[0],y:t.haystackPts[1]}},getTargetEndpoint:function(e){var t=e[0]._private.rscratch;return"haystack"!==(this.recalculateRenderedStyle(e),t.edgeType)?{x:t.arrowEndX,y:t.arrowEndY}:{x:t.haystackPts[2],y:t.haystackPts[3]}}},Dce={},mt(dJ,"pushBezierPts"),Dce.storeEdgeProjections=function(e){var t=e._private,r=t.rscratch,n=r.edgeType;if(t.rstyle.bezierPts=null,t.rstyle.linePts=null,t.rstyle.haystackPts=null,"multibezier"===n||"bezier"===n||"self"===n||"compound"===n){t.rstyle.bezierPts=[];for(var i=0;i+5<r.allpts.length;i+=4)dJ(this,e,r.allpts.slice(i,i+6))}else if("segments"===n)for(var a=t.rstyle.linePts=[],i=0;i+1<r.allpts.length;i+=2)a.push({x:r.allpts[i],y:r.allpts[i+1]});else"haystack"===n&&(n=r.haystackPts,t.rstyle.haystackPts=[{x:n[0],y:n[1]},{x:n[2],y:n[3]}]);t.rstyle.arrowWidth=this.getArrowWidth(e.pstyle("width").pfValue,e.pstyle("arrow-scale").value)*this.arrowShapeWidth},Dce.recalculateEdgeProjections=function(e){this.findEdgeControlPoints(e)},Oce={recalculateNodeLabelProjection:function(e){var t=e.pstyle("label").strValue;if(!Oee(t)){var r,n,t=e._private,i=e.width(),a=e.height(),s=e.padding(),o=e.position(),l=e.pstyle("text-halign").strValue,c=e.pstyle("text-valign").strValue,h=t.rscratch,t=t.rstyle;switch(l){case"left":r=o.x-i/2-s;break;case"right":r=o.x+i/2+s;break;default:r=o.x}switch(c){case"top":n=o.y-a/2-s;break;case"bottom":n=o.y+a/2+s;break;default:n=o.y}h.labelX=r,h.labelY=n,t.labelX=r,t.labelY=n,this.calculateLabelAngles(e),this.applyLabelDimensions(e)}}},oce=mt(function(e,t){return t=Math.atan(t/e),0===e&&t<0&&(t*=-1),t},"lineAngleFromDelta"),lce=mt(function(e,t){var r=t.x-e.x;return oce(r,t.y-e.y)},"lineAngle"),cce=mt(function(e,t,r,n){var i=Qre(0,n-.001,1),n=Qre(0,n+.001,1),i=Kre(e,t,r,i),e=Kre(e,t,r,n);return lce(i,e)},"bezierAngle"),Oce.recalculateEdgeLabelProjections=function(E){var C,_,S,e,d=E._private,A=d.rscratch,p=this,L={mid:E.pstyle("label").strValue,source:E.pstyle("source-label").strValue,target:E.pstyle("target-label").strValue};(L.mid||L.source||L.target)&&(C={x:A.midX,y:A.midY},(_=mt(function(e,t,r){yre(d.rscratch,e,t,r),yre(d.rstyle,e,t,r)},"setRs"))("labelX",null,C.x),_("labelY",null,C.y),e=oce(A.midDispX,A.midDispY),_("labelAutoAngle",null,e),S=mt(function(){if(S.cache)return S.cache;for(var e=[],t=0;t+5<A.allpts.length;t+=4){var r={x:A.allpts[t],y:A.allpts[t+1]},n={x:A.allpts[t+2],y:A.allpts[t+3]},i={x:A.allpts[t+4],y:A.allpts[t+5]};e.push({p0:r,p1:n,p2:i,startDist:0,length:0,segments:[]})}var a=d.rstyle.bezierPts,s=p.bezierProjPcts.length;function o(e,t,r,n,i){var a=Wre(t,r),s=e.segments[e.segments.length-1],t={p0:t,p1:r,t0:n,t1:i,startDist:s?s.startDist+s.length:0,length:a};e.segments.push(t),e.length+=a}mt(o,"addSegment");for(var l=0;l<e.length;l++){var c=e[l],h=e[l-1];h&&(c.startDist=h.startDist+h.length),o(c,c.p0,a[l*s],0,p.bezierProjPcts[0]);for(var u=0;u<s-1;u++)o(c,a[l*s+u],a[l*s+u+1],p.bezierProjPcts[u],p.bezierProjPcts[u+1]);o(c,a[l*s+s-1],c.p2,p.bezierProjPcts[s-1],1)}return S.cache=e},"createControlPointInfo"),(e=mt(function(e){var t,r="source"===e;if(L[e]){var n=E.pstyle(e+"-text-offset").pfValue;switch(A.edgeType){case"self":case"compound":case"bezier":case"multibezier":for(var i,a=S(),s=0,o=0,l=0;l<a.length;l++){for(var c=a[r?l:a.length-1-l],h=0;h<c.segments.length;h++){var u=c.segments[r?h:c.segments.length-1-h],d=l===a.length-1&&h===c.segments.length-1,s=o;if(n<=(o+=u.length)||d){i={cp:c,segment:u};break}}if(i)break}var p=i.cp,g=(n-s)/(m=i.segment).length,f=m.t1-m.t0,m=r?m.t0+f*g:m.t1-f*g,m=Qre(0,m,1);C=Kre(p.p0,p.p1,p.p2,m),t=cce(p.p0,p.p1,p.p2,m);break;case"straight":case"segments":case"haystack":for(var y,v,x,b,w=0,k=A.allpts.length,T=0;T+3<k&&(b=r?(x={x:A.allpts[T],y:A.allpts[T+1]},{x:A.allpts[T+2],y:A.allpts[T+3]}):(x={x:A.allpts[k-2-T],y:A.allpts[k-1-T]},{x:A.allpts[k-4-T],y:A.allpts[k-3-T]}),v=w,!(n<=(w+=y=Wre(x,b))));T+=2);f=Qre(0,(n-v)/y,1),C=Zre(x,b,f),t=lce(x,b)}_("labelX",e,C.x),_("labelY",e,C.y),_("labelAutoAngle",e,t)}},"calculateEndProjection"))("source"),e("target"),this.applyLabelDimensions(E))},Oce.applyLabelDimensions=function(e){this.applyPrefixedLabelDimensions(e),e.isEdge()&&(this.applyPrefixedLabelDimensions(e,"source"),this.applyPrefixedLabelDimensions(e,"target"))},Oce.applyPrefixedLabelDimensions=function(e,t){var r,n,i,a=e._private,s=this.getLabelText(e,t),o=Wte(s,e._private.labelDimsKey);mre(a.rscratch,"prefixedLabelDimsKey",t)!==o&&(yre(a.rscratch,"prefixedLabelDimsKey",t,o),o=this.calculateLabelDimensions(e,s),s=e.pstyle("line-height").pfValue,e=e.pstyle("text-wrap").strValue,r=mre(a.rscratch,"labelWrapCachedLines",t)||[],e="wrap"!==e?1:Math.max(r.length,1),n=(r=o.height/e)*s,i=o.width,o=o.height+(e-1)*(s-1)*r,yre(a.rstyle,"labelWidth",t,i),yre(a.rscratch,"labelWidth",t,i),yre(a.rstyle,"labelHeight",t,o),yre(a.rscratch,"labelHeight",t,o),yre(a.rscratch,"labelLineHeight",t,n))},Oce.getLabelText=function(e,r){var n=e._private,t=e.pstyle((r?r+"-":"")+"label").strValue,i=e.pstyle("text-transform").value,a=mt(function(e,t){return t?(yre(n.rscratch,e,r,t),t):mre(n.rscratch,e,r)},"rscratch");if(!t)return"";if("none"!=i&&("uppercase"==i?t=t.toUpperCase():"lowercase"==i&&(t=t.toLowerCase())),"wrap"===(i=e.pstyle("text-wrap").value)){var s=a("labelKey");if(null!=s&&a("labelWrapKey")===s)return a("labelWrapCachedText");for(var o=t.split(` +`),l=e.pstyle("text-max-width").pfValue,c="anywhere"===e.pstyle("text-overflow-wrap").value,h=[],u=/[\s\u200b]+|$/g,d=0;d<o.length;d++){var p=o[d],g=this.calculateLabelDimensions(e,p).width;if(c&&(p=p.split("").join("​")),l<g){var f,m="",y=0,v=XK(p.matchAll(u));try{for(v.s();!(f=v.n()).done;){var x=f.value,b=x[0],w=p.substring(y,x.index),y=x.index+b.length,k=0===m.length?w:m+w+b;this.calculateLabelDimensions(e,k).width<=l?m+=w+b:(m&&h.push(m),m=w+b)}}catch(e){v.e(e)}finally{v.f()}m.match(/^[\s\u200b]+$/)||h.push(m)}else h.push(p)}a("labelWrapCachedLines",h),t=a("labelWrapCachedText",h.join(` +`)),a("labelWrapKey",s)}else if("ellipsis"===i){var T=e.pstyle("text-max-width").pfValue,E="",C=!1;if(this.calculateLabelDimensions(e,t).width<T)return t;for(var _=0;_<t.length&&!(T<this.calculateLabelDimensions(e,E+t[_]+"…").width);_++)E+=t[_],_===t.length-1&&(C=!0);return C||(E+="…"),E}return t},Oce.getLabelJustification=function(e){var t=e.pstyle("text-justification").strValue,r=e.pstyle("text-halign").strValue;if("auto"!==t)return t;if(!e.isNode())return"center";switch(r){case"left":return"right";case"right":return"left";default:return"center"}},Oce.calculateLabelDimensions=function(e,t){var r=this.cy.window().document,n=e.pstyle("font-style").strValue,i=e.pstyle("font-size").pfValue,a=e.pstyle("font-family").strValue,e=e.pstyle("font-weight").strValue,s=this.labelCalcCanvas,o=this.labelCalcCanvasContext;s||(s=this.labelCalcCanvas=r.createElement("canvas"),o=this.labelCalcCanvasContext=s.getContext("2d"),(r=s.style).position="absolute",r.left="-9999px",r.top="-9999px",r.zIndex="-1",r.visibility="hidden",r.pointerEvents="none"),o.font="".concat(n," ").concat(e," ").concat(i,"px ").concat(a);for(var l=0,c=0,h=t.split(` +`),u=0;u<h.length;u++){var d=h[u],d=o.measureText(d),d=Math.ceil(d.width),p=i,l=Math.max(d,l);c+=p}return{width:l+=0,height:c+=0}},Oce.calculateLabelAngle=function(e,t){var r=e._private.rscratch,n=e.isEdge();return"none"===(t=(e=e.pstyle((t?t+"-":"")+"text-rotation")).strValue)?0:n&&"autorotate"===t?r.labelAutoAngle:"autorotate"===t?0:e.pfValue},hce=!(Oce.calculateLabelAngles=function(e){var t=e.isEdge(),r=e._private.rscratch;r.labelAngle=this.calculateLabelAngle(e),t&&(r.sourceLabelAngle=this.calculateLabelAngle(e,"source"),r.targetLabelAngle=this.calculateLabelAngle(e,"target"))}),uce={},[Ece,Ice,Rce,Mce,Dce,Oce,{getNodeShape:function(e){var t=e.pstyle("shape").value;return"cutrectangle"===t&&(e.width()<28||e.height()<28)?(hce||(sre("The `cutrectangle` node shape can not be used at small sizes so `rectangle` is used instead"),hce=!0),"rectangle"):e.isParent()?"rectangle"===t||"roundrectangle"===t||"round-rectangle"===t||"cutrectangle"===t||"cut-rectangle"===t||"barrel"===t?t:"rectangle":"polygon"===t?(e=e.pstyle("shape-polygon-points").value,this.nodeShapes.makePolygon(e).name):t}},{registerCalculationListeners:function(){var s=this.cy,o=s.collection(),l=this,c=mt(function(e){var t=!(1<arguments.length&&void 0!==arguments[1])||arguments[1];if(o.merge(e),t)for(var r=0;r<e.length;r++){var n=e[r]._private.rstyle;n.clean=!1,n.cleanConnected=!1}},"enqueue"),e=(l.binder(s).on("bounds.* dirty.*",mt(function(e){e=e.target,c(e)},"onDirtyBounds")).on("style.* background.*",mt(function(e){e=e.target,c(e,!1)},"onDirtyStyle")),mt(function(e){if(e){var t=l.onUpdateEleCalcsFns;o.cleanStyle();for(var r=0;r<o.length;r++){var n=o[r],i=n._private.rstyle;n.isNode()&&!i.cleanConnected&&(c(n.connectedEdges()),i.cleanConnected=!0)}if(t)for(var a=0;a<t.length;a++)(0,t[a])(e,o);l.recalculateRenderedStyle(o),o=s.collection()}},"updateEleCalcs"));l.flushRenderedStyleQueue=function(){e(!0)},l.beforeRender(e,l.beforeRenderPriorities.eleCalcs)},onUpdateEleCalcs:function(e){(this.onUpdateEleCalcsFns=this.onUpdateEleCalcsFns||[]).push(e)},recalculateRenderedStyle:function(e,t){var r=mt(function(e){return e._private.rstyle.cleanConnected},"isCleanConnected");if(0!==e.length){var n=[],i=[];if(!this.destroyed){void 0===t&&(t=!0);for(var a=0;a<e.length;a++){var s=e[a],o=s._private,l=o.rstyle;!s.isEdge()||r(s.source())&&r(s.target())||(l.clean=!1),s.isEdge()&&s.isBundledBezier()&&s.parallelEdges().some(function(e){return!e._private.rstyle.clean&&e.isBundledBezier()})&&(l.clean=!1),t&&l.clean||s.removed()||"none"===s.pstyle("display").value||(("nodes"===o.group?i:n).push(s),l.clean=!0)}for(var c=0;c<i.length;c++){var h=i[c],u=h._private.rstyle,d=h.position();this.recalculateNodeLabelProjection(h),u.nodeX=d.x,u.nodeY=d.y,u.nodeW=h.pstyle("width").pfValue,u.nodeH=h.pstyle("height").pfValue}this.recalculateEdgeProjections(n);for(var p=0;p<n.length;p++){var g=n[p]._private,f=g.rstyle;f.srcX=(g=g.rscratch).arrowStartX,f.srcY=g.arrowStartY,f.tgtX=g.arrowEndX,f.tgtY=g.arrowEndY,f.midX=g.midX,f.midY=g.midY,f.labelAngle=g.labelAngle,f.sourceLabelAngle=g.sourceLabelAngle,f.targetLabelAngle=g.targetLabelAngle}}}}},{updateCachedGrabbedEles:function(){var e=this.cachedZSortedEles;if(e){e.drag=[],e.nondrag=[];for(var t=[],r=0;r<e.length;r++){var n=(i=e[r])._private.rscratch;(i.grabbed()&&!i.isParent()?t:n.inDragLayer?e.drag:e.nondrag).push(i)}for(r=0;r<t.length;r++){var i=t[r];e.drag.push(i)}}},invalidateCachedZSortedEles:function(){this.cachedZSortedEles=null},getCachedZSortedEles:function(e){var t;return e||!this.cachedZSortedEles?((t=this.cy.mutableElements().toArray()).sort(Woe),t.interactive=t.filter(function(e){return e.interactive()}),this.cachedZSortedEles=t,this.updateCachedGrabbedEles()):t=this.cachedZSortedEles,t}}].forEach(function(e){Xee(uce,e)}),Hce={getCachedImage:function(e,t,r){var n,i=this.imageCache=this.imageCache||{},a=i[e];return a?(a.image.complete||a.image.addEventListener("load",r),a.image):((n=(a=i[e]=i[e]||{}).image=new Image).addEventListener("load",r),n.addEventListener("error",function(){n.error=!0}),"data:"!==e.substring(0,"data:".length).toLowerCase()&&(n.crossOrigin=t="null"===t?null:t),n.src=e,n)}},Kce={registerBinding:function(e,t,r,n){var i=Array.prototype.slice.apply(arguments,[1]);if(Array.isArray(e)){for(var a=[],s=0;s<e.length;s++){var o,l=e[s];void 0!==l&&(o=this.binder(l),a.push(o.on.apply(o,i)))}return a}return(o=this.binder(e)).on.apply(o,i)},binder:function(i){var a=this,e=a.cy.window(),s=i===e||i===e.document||i===e.document.body||Pee(i);if(null==a.supportsPassiveEvents){var t=!1;try{var r=Object.defineProperty({},"passive",{get:mt(function(){return t=!0},"get")});e.addEventListener("test",null,r)}catch{}a.supportsPassiveEvents=t}return{on:e=mt(function(e,t,r){var n=Array.prototype.slice.call(arguments);return s&&a.supportsPassiveEvents&&(n[2]={capture:r??!1,passive:!1,once:!1}),a.bindings.push({target:i,args:n}),(i.addEventListener||i.on).apply(i,n),this},"on"),addEventListener:e,addListener:e,bind:e}},nodeIsDraggable:function(e){return e&&e.isNode()&&!e.locked()&&e.grabbable()},nodeIsGrabbable:function(e){return this.nodeIsDraggable(e)&&e.interactive()},load:function(){var h,u,d,c,I=this,e=I.cy.window(),p=mt(function(e){return e.selected()},"isSelected"),k=mt(function(e){if((e=e.getRootNode())&&11===e.nodeType&&void 0!==e.host)return e},"getShadowRoot"),R=mt(function(e,t,r,n){null==e&&(e=I.cy);for(var i=0;i<t.length;i++)e.emit({originalEvent:r,type:t[i],position:n})},"triggerEvents"),x=mt(function(e){return e.shiftKey||e.metaKey||e.ctrlKey},"isMultSelKeyDown"),Y=mt(function(e,t){var r=!0;if(I.cy.hasCompoundNodes()&&e&&e.pannable()){for(var n=0;t&&n<t.length;n++)if((e=t[n]).isNode()&&e.isParent()&&!e.pannable()){r=!1;break}}else r=!0;return r},"allowPanningPassthrough"),T=mt(function(e){e[0]._private.grabbed=!0},"setGrabbed"),E=mt(function(e){e[0]._private.grabbed=!1},"setFreed"),n=mt(function(e){e[0]._private.rscratch.inDragLayer=!0},"setInDragLayer"),C=mt(function(e){e[0]._private.rscratch.inDragLayer=!1},"setOutDragLayer"),_=mt(function(e){e[0]._private.rscratch.isGrabTarget=!0},"setGrabTarget"),S=mt(function(e){e[0]._private.rscratch.isGrabTarget=!1},"removeGrabTarget"),i=mt(function(e,t){(t=t.addToList).has(e)||!e.grabbable()||e.locked()||(t.merge(e),T(e))},"addToDragList"),A=mt(function(e,t){!e.cy().hasCompoundNodes()||null==t.inDragLayer&&null==t.addToList||(e=e.descendants(),t.inDragLayer&&(e.forEach(n),e.connectedEdges().forEach(n)),t.addToList&&i(e,t))},"addDescendantsToDrag"),M=mt(function(e,t){t=t||{};var r=e.cy().hasCompoundNodes();t.inDragLayer&&(e.forEach(n),e.neighborhood().stdFilter(function(e){return!r||e.isEdge()}).forEach(n)),t.addToList&&e.forEach(function(e){i(e,t)}),A(e,t),N(e,{inDragLayer:t.inDragLayer}),I.updateCachedGrabbedEles()},"addNodesToDrag"),L=M,D=mt(function(e){e&&(I.getCachedZSortedEles().forEach(function(e){E(e),C(e),S(e)}),I.updateCachedGrabbedEles())},"freeDraggedElements"),N=mt(function(e,t){var r;null==t.inDragLayer&&null==t.addToList||!e.cy().hasCompoundNodes()||(r=e.ancestors().orphans()).same(e)||(e=(r=r.descendants().spawnSelf().merge(r).unmerge(e).unmerge(e.descendants())).connectedEdges(),t.inDragLayer&&(e.forEach(n),r.forEach(n)),t.addToList&&r.forEach(function(e){i(e,t)}))},"updateAncestorsInDragLayer"),W=mt(function(){null!=document.activeElement&&null!=document.activeElement.blur&&document.activeElement.blur()},"blurActiveDomElement"),t=typeof MutationObserver<"u",H=typeof ResizeObserver<"u",r=(t?(I.removeObserver=new MutationObserver(function(e){for(var t=0;t<e.length;t++){var r=e[t].removedNodes;if(r)for(var n=0;n<r.length;n++)if(r[n]===I.container){I.destroy();break}}}),I.container.parentNode&&I.removeObserver.observe(I.container.parentNode,{childList:!0})):I.registerBinding(I.container,"DOMNodeRemoved",function(e){I.destroy()}),Mte(function(){I.cy.resize()},100)),t=(t&&(I.styleObserver=new MutationObserver(r),I.styleObserver.observe(I.container,{attributes:!0})),I.registerBinding(e,"resize",r),H&&(I.resizeObserver=new ResizeObserver(r),I.resizeObserver.observe(I.container)),mt(function(e,t){for(;null!=e;)t(e),e=e.parentNode},"forEachUp")),a=mt(function(){I.invalidateContainerClientCoordsCache()},"invalidateCoords"),V=(t(I.container,function(e){I.registerBinding(e,"transitionend",a),I.registerBinding(e,"animationend",a),I.registerBinding(e,"scroll",a)}),I.registerBinding(I.container,"contextmenu",function(e){e.preventDefault()}),mt(function(){return 0!==I.selection[4]},"inBoxSelection")),O=mt(function(e){for(var t=I.findContainerClientCoords(),r=t[0],n=t[1],i=t[2],a=t[3],s=e.touches||[e],o=!1,l=0;l<s.length;l++){var c=s[l];if(r<=c.clientX&&c.clientX<=r+i&&n<=c.clientY&&c.clientY<=n+a){o=!0;break}}if(!o)return!1;for(var h=I.container,u=e.target.parentNode,d=!1;u;){if(u===h){d=!0;break}u=u.parentNode}return!!d},"eventInContainer"),H=(I.registerBinding(I.container,"mousedown",mt(function(t){var e,r,n,i,a,s,o,l,c,h;!O(t)||1===I.hoverData.which&&1!==t.which||(t.preventDefault(),W(),I.hoverData.capture=!0,I.hoverData.which=t.which,e=I.cy,r=I.projectIntoViewport((o=[t.clientX,t.clientY])[0],o[1]),n=I.selection,a=(i=I.findNearestElements(r[0],r[1],!0,!1))[0],c=I.dragData.possibleDragElements,I.hoverData.mdownPos=r,I.hoverData.mdownGPos=o,s=mt(function(e){return{originalEvent:t,type:e,position:{x:r[0],y:r[1]}}},"makeEvent"),o=mt(function(){I.hoverData.tapholdCancelled=!1,clearTimeout(I.hoverData.tapholdTimeout),I.hoverData.tapholdTimeout=setTimeout(function(){I.hoverData.tapholdCancelled||(I.hoverData.down||e).emit(s("taphold"))},I.tapholdDuration)},"checkForTaphold"),3==t.which?(I.hoverData.cxtStarted=!0,l={originalEvent:t,type:"cxttapstart",position:{x:r[0],y:r[1]}},a?(a.activate(),a.emit(l),I.hoverData.down=a):e.emit(l),I.hoverData.downTime=(new Date).getTime(),I.hoverData.cxtDragged=!1):1==t.which&&(a&&a.activate(),null!=a&&I.nodeIsGrabbable(a)&&(l=mt(function(e){e.emit(s("grab"))},"triggerGrab"),_(a),a.selected()?(c=I.dragData.possibleDragElements=e.collection(),h=e.$(function(e){return e.isNode()&&e.selected()&&I.nodeIsGrabbable(e)}),M(h,{addToList:c}),a.emit(s("grabon")),h.forEach(l)):(c=I.dragData.possibleDragElements=e.collection(),L(a,{addToList:c}),a.emit(s("grabon")).emit(s("grab"))),I.redrawHint("eles",!0),I.redrawHint("drag",!0)),I.hoverData.down=a,I.hoverData.downs=i,I.hoverData.downTime=(new Date).getTime(),R(a,["mousedown","tapstart","vmousedown"],t,{x:r[0],y:r[1]}),null==a?(n[4]=1,I.data.bgActivePosistion={x:r[0],y:r[1]},I.redrawHint("select",!0),I.redraw()):a.pannable()&&(n[4]=1),o()),n[0]=n[2]=r[0],n[1]=n[3]=r[1])},"mousedownHandler"),!1),k(I.container)),g=(I.registerBinding([e,H],"mousemove",mt(function(t){if(I.hoverData.capture||O(t)){var e,r,n,i=!1,a=I.cy,s=a.zoom(),o=[t.clientX,t.clientY],l=I.projectIntoViewport(o[0],o[1]),c=I.hoverData.mdownPos,h=I.hoverData.mdownGPos,u=I.selection,d=null,p=(I.hoverData.draggingEles||I.hoverData.dragging||I.hoverData.selecting||(d=I.findNearestElement(l[0],l[1],!0,!1)),I.hoverData.last),g=I.hoverData.down,f=[l[0]-u[2],l[1]-u[3]],m=I.dragData.possibleDragElements,h=(h&&(e=o[0]-h[0],o=o[1]-h[1],I.hoverData.isOverThresholdDrag=e=e*e+o*o>=I.desktopTapThreshold2),x(t)),o=(e&&(I.hoverData.tapholdCancelled=!0),mt(function(){var e=I.hoverData.dragDelta=I.hoverData.dragDelta||[];0===e.length?(e.push(f[0]),e.push(f[1])):(e[0]+=f[0],e[1]+=f[1])},"updateDragDelta")),y=(i=!0,R(d,["mousemove","vmousemove","tapdrag"],t,{x:l[0],y:l[1]}),mt(function(e){return{originalEvent:t,type:e,position:{x:l[0],y:l[1]}}},"makeEvent")),v=mt(function(){I.data.bgActivePosistion=void 0,I.hoverData.selecting||a.emit(y("boxstart")),u[4]=1,I.hoverData.selecting=!0,I.redrawHint("select",!0),I.redraw()},"goIntoBoxMode");if(3===I.hoverData.which?e&&(r=y("cxtdrag"),(g||a).emit(r),I.hoverData.cxtDragged=!0,!I.hoverData.cxtOver||d!==I.hoverData.cxtOver)&&(I.hoverData.cxtOver&&I.hoverData.cxtOver.emit(y("cxtdragout")),I.hoverData.cxtOver=d)&&d.emit(y("cxtdragover")):I.hoverData.dragging?(i=!0,a.panningEnabled()&&a.userPanningEnabled()&&(I.hoverData.justStartedPan?(r=I.hoverData.mdownPos,n={x:(l[0]-r[0])*s,y:(l[1]-r[1])*s},I.hoverData.justStartedPan=!1):n={x:f[0]*s,y:f[1]*s},a.panBy(n),a.emit(y("dragpan")),I.hoverData.dragged=!0),l=I.projectIntoViewport(t.clientX,t.clientY)):1!=u[4]||null!=g&&!g.pannable()?(g&&g.pannable()&&g.active()&&g.unactivate(),g&&g.grabbed()||d==p||(p&&R(p,["mouseout","tapdragout"],t,{x:l[0],y:l[1]}),d&&R(d,["mouseover","tapdragover"],t,{x:l[0],y:l[1]}),I.hoverData.last=d),g&&(e?a.boxSelectionEnabled()&&h?(g&&g.grabbed()&&(D(m),g.emit(y("freeon")),m.emit(y("free")),I.dragData.didDrag)&&(g.emit(y("dragfreeon")),m.emit(y("dragfree"))),v()):g&&g.grabbed()&&I.nodeIsDraggable(g)&&((r=!I.dragData.didDrag)&&I.redrawHint("eles",!0),I.dragData.didDrag=!0,I.hoverData.draggingEles||M(m,{inDragLayer:!0}),s={x:0,y:0},he(f[0])&&he(f[1])&&(s.x+=f[0],s.y+=f[1],r)&&((n=I.hoverData.dragDelta)&&he(n[0])&&he(n[1])&&(s.x+=n[0],s.y+=n[1])),I.hoverData.draggingEles=!0,m.silentShift(s).emit(y("position")).emit(y("drag")),I.redrawHint("drag",!0),I.redraw()):o()),i=!0):e&&(I.hoverData.dragging||!a.boxSelectionEnabled()||!h&&a.panningEnabled()&&a.userPanningEnabled()?!I.hoverData.selecting&&a.panningEnabled()&&a.userPanningEnabled()&&Y(g,I.hoverData.downs)&&(I.hoverData.dragging=!0,I.hoverData.justStartedPan=!0,u[4]=0,I.data.bgActivePosistion=Bre(c),I.redrawHint("select",!0),I.redraw()):v(),g)&&g.pannable()&&g.active()&&g.unactivate(),u[2]=l[0],u[3]=l[1],i)return t.stopPropagation&&t.stopPropagation(),t.preventDefault&&t.preventDefault(),!1}},"mousemoveHandler"),!1),I.registerBinding(e,"mouseup",mt(function(t){var e,r,n,i,a,s,o,l,c;1===I.hoverData.which&&1!==t.which&&I.hoverData.capture||I.hoverData.capture&&(I.hoverData.capture=!1,e=I.cy,r=I.projectIntoViewport(t.clientX,t.clientY),n=I.selection,l=I.findNearestElement(r[0],r[1],!0,!1),i=I.dragData.possibleDragElements,a=I.hoverData.down,c=x(t),I.data.bgActivePosistion&&(I.redrawHint("select",!0),I.redraw()),I.hoverData.tapholdCancelled=!0,I.data.bgActivePosistion=void 0,a&&a.unactivate(),s=mt(function(e){return{originalEvent:t,type:e,position:{x:r[0],y:r[1]}}},"makeEvent"),3===I.hoverData.which?(o=s("cxttapend"),(a||e).emit(o),I.hoverData.cxtDragged||(o=s("cxttap"),(a||e).emit(o)),I.hoverData.cxtDragged=!1,I.hoverData.which=null):1===I.hoverData.which&&(R(l,["mouseup","tapend","vmouseup"],t,{x:r[0],y:r[1]}),I.dragData.didDrag||I.hoverData.dragged||I.hoverData.selecting||I.hoverData.isOverThresholdDrag||(R(a,["click","tap","vclick"],t,{x:r[0],y:r[1]}),u=!1,t.timeStamp-d<=e.multiClickDebounceTime()?(h&&clearTimeout(h),u=!0,d=null,R(a,["dblclick","dbltap","vdblclick"],t,{x:r[0],y:r[1]})):(h=setTimeout(function(){u||R(a,["oneclick","onetap","voneclick"],t,{x:r[0],y:r[1]})},e.multiClickDebounceTime()),d=t.timeStamp)),null!=a||I.dragData.didDrag||I.hoverData.selecting||I.hoverData.dragged||x(t)||(e.$(p).unselect(["tapunselect"]),0<i.length&&I.redrawHint("eles",!0),I.dragData.possibleDragElements=i=e.collection()),l!=a||I.dragData.didDrag||I.hoverData.selecting||null==l||!l._private.selectable||(I.hoverData.dragging||("additive"===e.selectionType()||c?l.selected()?l.unselect(["tapunselect"]):l.select(["tapselect"]):c||(e.$(p).unmerge(l).unselect(["tapunselect"]),l.select(["tapselect"]))),I.redrawHint("eles",!0)),I.hoverData.selecting&&(o=e.collection(I.getAllInBox(n[0],n[1],n[2],n[3])),I.redrawHint("select",!0),0<o.length&&I.redrawHint("eles",!0),e.emit(s("boxend")),l=mt(function(e){return e.selectable()&&!e.selected()},"eleWouldBeSelected"),"additive"===e.selectionType()||c||e.$(p).unmerge(o).unselect(),o.emit(s("box")).stdFilter(l).select().emit(s("boxselect")),I.redraw()),I.hoverData.dragging&&(I.hoverData.dragging=!1,I.redrawHint("select",!0),I.redrawHint("eles",!0),I.redraw()),n[4]||(I.redrawHint("drag",!0),I.redrawHint("eles",!0),c=a&&a.grabbed(),D(i),c&&(a.emit(s("freeon")),i.emit(s("free")),I.dragData.didDrag)&&(a.emit(s("dragfreeon")),i.emit(s("dragfree"))))),n[4]=0,I.hoverData.down=null,I.hoverData.cxtStarted=!1,I.hoverData.draggingEles=!1,I.hoverData.selecting=!1,I.hoverData.isOverThresholdDrag=!1,I.dragData.didDrag=!1,I.hoverData.dragged=!1,I.hoverData.dragDelta=[],I.hoverData.mdownPos=null,I.hoverData.mdownGPos=null,I.hoverData.which=null)},"mouseupHandler"),!1),[]),f=1e5,X=mt(function(e,t){for(var r=0;r<e.length;r++)if(e[r]%t!=0)return!1;return!0},"allAreDivisibleBy"),K=mt(function(e){for(var t=Math.abs(e[0]),r=1;r<e.length;r++)if(Math.abs(e[r])!==t)return!1;return!0},"allAreSameMagnitude"),Z=mt(function(e){var t,r,n,i=!1,a=e.deltaY;if(null==a&&(null!=e.wheelDeltaY?a=e.wheelDeltaY/4:null!=e.wheelDelta&&(a=e.wheelDelta/4)),0!==a){if(null==c)if(4<=g.length){var s,o=g;if((c=X(o,5))||(s=Math.abs(o[0]),c=K(o)&&5<s),c)for(var l=0;l<o.length;l++)f=Math.min(Math.abs(o[l]),f)}else g.push(a),i=!0;else c&&(f=Math.min(Math.abs(a),f));I.scrollingPage||(r=(s=I.cy).zoom(),n=s.pan(),r=[(t=I.projectIntoViewport(e.clientX,e.clientY))[0]*r+n.x,t[1]*r+n.y],I.hoverData.draggingEles||I.hoverData.dragging||I.hoverData.cxtStarted||V()?e.preventDefault():s.panningEnabled()&&s.userPanningEnabled()&&s.zoomingEnabled()&&s.userZoomingEnabled()&&(e.preventDefault(),I.data.wheelZooming=!0,clearTimeout(I.data.wheelTimeout),I.data.wheelTimeout=setTimeout(function(){I.data.wheelZooming=!1,I.redrawHint("eles",!0),I.redraw()},150),n=(a=i&&5<Math.abs(a)?5*Yre(a):a)/-250,c&&(n=n/f*3),n*=I.wheelSensitivity,1===e.deltaMode&&(n*=33),i=s.zoom()*Math.pow(10,n),"gesturechange"===e.type&&(i=I.gestureStartZoom*e.scale),s.zoom({level:i,renderedPosition:{x:r[0],y:r[1]}}),s.emit({type:"gesturechange"===e.type?"pinchzoom":"scrollzoom",originalEvent:e,position:{x:t[0],y:t[1]}})))}},"wheelHandler");I.registerBinding(I.container,"wheel",Z,!0),I.registerBinding(e,"scroll",mt(function(e){I.scrollingPage=!0,clearTimeout(I.scrollingPageTimeout),I.scrollingPageTimeout=setTimeout(function(){I.scrollingPage=!1},250)},"scrollHandler"),!0),I.registerBinding(I.container,"gesturestart",mt(function(e){I.gestureStartZoom=I.cy.zoom(),I.hasTouchStarted||e.preventDefault()},"gestureStartHandler"),!0),I.registerBinding(I.container,"gesturechange",function(e){I.hasTouchStarted||Z(e)},!0),I.registerBinding(I.container,"mouseout",mt(function(e){var t=I.projectIntoViewport(e.clientX,e.clientY);I.cy.emit({originalEvent:e,type:"mouseout",position:{x:t[0],y:t[1]}})},"mouseOutHandler"),!1),I.registerBinding(I.container,"mouseover",mt(function(e){var t=I.projectIntoViewport(e.clientX,e.clientY);I.cy.emit({originalEvent:e,type:"mouseover",position:{x:t[0],y:t[1]}})},"mouseOverHandler"),!1);var P,B,$,F,z,G,U,q,j,m,y,Q,J,ee,te,re,v,b,w,s,ne,ie,ae,se,oe,o,l,le=mt(function(e,t,r,n){return Math.sqrt((r-e)*(r-e)+(n-t)*(n-t))},"distance"),ce=mt(function(e,t,r,n){return(r-e)*(r-e)+(n-t)*(n-t)},"distanceSq");I.registerBinding(I.container,"touchstart",J=mt(function(t){if(I.hasTouchStarted=!0,O(t)){W(),I.touchData.capture=!0,I.data.bgActivePosistion=void 0;var e,r,n=I.cy,i=I.touchData.now,a=I.touchData.earlier,s=(t.touches[0]&&(e=I.projectIntoViewport(t.touches[0].clientX,t.touches[0].clientY),i[0]=e[0],i[1]=e[1]),t.touches[1]&&(e=I.projectIntoViewport(t.touches[1].clientX,t.touches[1].clientY),i[2]=e[0],i[3]=e[1]),t.touches[2]&&(e=I.projectIntoViewport(t.touches[2].clientX,t.touches[2].clientY),i[4]=e[0],i[5]=e[1]),mt(function(e){return{originalEvent:t,type:e,position:{x:i[0],y:i[1]}}},"makeEvent"));if(t.touches[1]){I.touchData.singleTouchMoved=!0,D(I.dragData.touchDragEles);var o=I.findContainerClientCoords(),o=(q=o[0],j=o[1],m=o[2],y=o[3],P=t.touches[0].clientX-q,B=t.touches[0].clientY-j,$=t.touches[1].clientX-q,F=t.touches[1].clientY-j,Q=0<=P&&P<=m&&0<=$&&$<=m&&0<=B&&B<=y&&0<=F&&F<=y,n.pan()),l=n.zoom();if(z=le(P,B,$,F),G=ce(P,B,$,F),U=[((m=[(P+$)/2,(B+F)/2])[0]-o.x)/l,(m[1]-o.y)/l],G<4e4&&!t.touches[2])return o=I.findNearestElement(i[0],i[1],!0,!0),l=I.findNearestElement(i[2],i[3],!0,!0),o&&o.isNode()?(o.activate().emit(s("cxttapstart")),I.touchData.start=o):l&&l.isNode()?(l.activate().emit(s("cxttapstart")),I.touchData.start=l):n.emit(s("cxttapstart")),I.touchData.start&&(I.touchData.start._private.grabbed=!1),I.touchData.cxt=!0,I.touchData.cxtDragged=!1,I.data.bgActivePosistion=void 0,void I.redraw()}if(t.touches[2]?n.boxSelectionEnabled()&&t.preventDefault():t.touches[1]||t.touches[0]&&(null!=(l=(o=I.findNearestElements(i[0],i[1],!0,!0))[0])&&(l.activate(),I.touchData.start=l,I.touchData.starts=o,I.nodeIsGrabbable(l))&&(o=I.dragData.touchDragEles=n.collection(),I.redrawHint("eles",!(r=null)),I.redrawHint("drag",!0),l.selected()?(r=n.$(function(e){return e.selected()&&I.nodeIsGrabbable(e)}),M(r,{addToList:o})):L(l,{addToList:o}),_(l),l.emit(s("grabon")),r?r.forEach(function(e){e.emit(s("grab"))}):l.emit(s("grab"))),R(l,["touchstart","tapstart","vmousedown"],t,{x:i[0],y:i[1]}),null==l&&(I.data.bgActivePosistion={x:e[0],y:e[1]},I.redrawHint("select",!0),I.redraw()),I.touchData.singleTouchMoved=!1,I.touchData.singleTouchStartTime=+new Date,clearTimeout(I.touchData.tapholdTimeout),I.touchData.tapholdTimeout=setTimeout(function(){!1!==I.touchData.singleTouchMoved||I.pinching||I.touchData.selecting||R(I.touchData.start,["taphold"],t,{x:i[0],y:i[1]})},I.tapholdDuration)),1<=t.touches.length){for(var c=I.touchData.startPosition=[null,null,null,null,null,null],h=0;h<i.length;h++)c[h]=a[h]=i[h];n=t.touches[0],I.touchData.startGPosition=[n.clientX,n.clientY]}}},"touchstartHandler"),!1),I.registerBinding(e,"touchmove",ee=mt(function(t){var e=I.touchData.capture;if(e||O(t)){var r=I.selection,n=I.cy,i=I.touchData.now,a=I.touchData.earlier,s=n.zoom(),o=(t.touches[0]&&(A=I.projectIntoViewport(t.touches[0].clientX,t.touches[0].clientY),i[0]=A[0],i[1]=A[1]),t.touches[1]&&(A=I.projectIntoViewport(t.touches[1].clientX,t.touches[1].clientY),i[2]=A[0],i[3]=A[1]),t.touches[2]&&(A=I.projectIntoViewport(t.touches[2].clientX,t.touches[2].clientY),i[4]=A[0],i[5]=A[1]),mt(function(e){return{originalEvent:t,type:e,position:{x:i[0],y:i[1]}}},"makeEvent")),l=I.touchData.startGPosition;if(e&&t.touches[0]&&l){for(var c=[],h=0;h<i.length;h++)c[h]=i[h]-a[h];var u=t.touches[0].clientX-l[0],d=t.touches[0].clientY-l[1],p=u*u+d*d>=I.touchTapThreshold2}if(e&&I.touchData.cxt&&(t.preventDefault(),b=t.touches[0].clientX-q,w=t.touches[0].clientY-j,k=t.touches[1].clientX-q,T=t.touches[1].clientY-j,2.25<=(l=ce(b,w,k,T))/G||22500<=l)&&(I.touchData.cxt=!1,I.data.bgActivePosistion=void 0,I.redrawHint("select",!0),g=o("cxttapend"),I.touchData.start?(I.touchData.start.unactivate().emit(g),I.touchData.start=null):n.emit(g)),e&&I.touchData.cxt){var g=o("cxtdrag"),f=(I.data.bgActivePosistion=void 0,I.redrawHint("select",!0),(I.touchData.start||n).emit(g),I.touchData.start&&(I.touchData.start._private.grabbed=!1),I.touchData.cxtDragged=!0,I.findNearestElement(i[0],i[1],!0,!0));(!I.touchData.cxtOver||f!==I.touchData.cxtOver)&&(I.touchData.cxtOver&&I.touchData.cxtOver.emit(o("cxtdragout")),I.touchData.cxtOver=f)&&f.emit(o("cxtdragover"))}else if(e&&t.touches[2]&&n.boxSelectionEnabled())t.preventDefault(),I.data.bgActivePosistion=void 0,this.lastThreeTouch=+new Date,I.touchData.selecting||n.emit(o("boxstart")),I.touchData.selecting=!0,I.touchData.didSelect=!0,r[4]=1,r&&0!==r.length&&void 0!==r[0]?(r[2]=(i[0]+i[2]+i[4])/3,r[3]=(i[1]+i[3]+i[5])/3):(r[0]=(i[0]+i[2]+i[4])/3,r[1]=(i[1]+i[3]+i[5])/3,r[2]=(i[0]+i[2]+i[4])/3+1,r[3]=(i[1]+i[3]+i[5])/3+1),I.redrawHint("select",!0),I.redraw();else if(e&&t.touches[1]&&!I.touchData.didSelect&&n.zoomingEnabled()&&n.panningEnabled()&&n.userZoomingEnabled()&&n.userPanningEnabled()){if(t.preventDefault(),I.data.bgActivePosistion=void 0,I.redrawHint("select",!0),E=I.dragData.touchDragEles){I.redrawHint("drag",!0);for(var m=0;m<E.length;m++){var y=E[m]._private;y.grabbed=!1,y.rscratch.inDragLayer=!1}}var v,x,l=I.touchData.start,b=t.touches[0].clientX-q,w=t.touches[0].clientY-j,k=t.touches[1].clientX-q,T=t.touches[1].clientY-j,r=(g=le(b,w,k,T))/z;Q&&(x=(b-P+(k-$))/2,_=(w-B+(T-F))/2,r=(N=n.zoom())*r,C=n.pan(),L=U[0]*N+C.x,v=U[1]*N+C.y,x={x:-r/N*(L-C.x-x)+L,y:-r/N*(v-C.y-_)+v},l&&l.active()&&(E=I.dragData.touchDragEles,D(E),I.redrawHint("drag",!0),I.redrawHint("eles",!0),l.unactivate().emit(o("freeon")),E.emit(o("free")),I.dragData.didDrag)&&(l.emit(o("dragfreeon")),E.emit(o("dragfree"))),n.viewport({zoom:r,pan:x,cancelOnFailedZoom:!0}),n.emit(o("pinchzoom")),z=g,P=b,B=w,$=k,F=T,I.pinching=!0),t.touches[0]&&(A=I.projectIntoViewport(t.touches[0].clientX,t.touches[0].clientY),i[0]=A[0],i[1]=A[1]),t.touches[1]&&(A=I.projectIntoViewport(t.touches[1].clientX,t.touches[1].clientY),i[2]=A[0],i[3]=A[1]),t.touches[2]&&(A=I.projectIntoViewport(t.touches[2].clientX,t.touches[2].clientY),i[4]=A[0],i[5]=A[1])}else if(t.touches[0]&&!I.touchData.didSelect){var E,C,_,S,A,L=I.touchData.start,N=I.touchData.last;if(I.hoverData.draggingEles||I.swipePanning||(f=I.findNearestElement(i[0],i[1],!0,!0)),e&&null!=L&&t.preventDefault(),e&&null!=L&&I.nodeIsDraggable(L)&&(p?(E=I.dragData.touchDragEles,(C=!I.dragData.didDrag)&&M(E,{inDragLayer:!0}),I.dragData.didDrag=!0,_={x:0,y:0},he(c[0])&&he(c[1])&&(_.x+=c[0],_.y+=c[1],C)&&(I.redrawHint("eles",!0),(S=I.touchData.dragDelta)&&he(S[0])&&he(S[1])&&(_.x+=S[0],_.y+=S[1])),I.hoverData.draggingEles=!0,E.silentShift(_).emit(o("position")).emit(o("drag")),I.redrawHint("drag",!0),I.touchData.startPosition[0]==a[0]&&I.touchData.startPosition[1]==a[1]&&I.redrawHint("eles",!0),I.redraw()):0===(S=I.touchData.dragDelta=I.touchData.dragDelta||[]).length?(S.push(c[0]),S.push(c[1])):(S[0]+=c[0],S[1]+=c[1])),R(L||f,["touchmove","tapdrag","vmousemove"],t,{x:i[0],y:i[1]}),L&&L.grabbed()||f==N||(N&&N.emit(o("tapdragout")),!f)||f.emit(o("tapdragover")),I.touchData.last=f,e)for(m=0;m<i.length;m++)i[m]&&I.touchData.startPosition[m]&&p&&(I.touchData.singleTouchMoved=!0);e&&(null==L||L.pannable())&&n.panningEnabled()&&n.userPanningEnabled()&&(Y(L,I.touchData.starts)&&(t.preventDefault(),I.data.bgActivePosistion||(I.data.bgActivePosistion=Bre(I.touchData.startPosition)),I.swipePanning?(n.panBy({x:c[0]*s,y:c[1]*s}),n.emit(o("dragpan"))):p&&(I.swipePanning=!0,n.panBy({x:u*s,y:d*s}),n.emit(o("dragpan")),L)&&(L.unactivate(),I.redrawHint("select",!0),I.touchData.start=null)),A=I.projectIntoViewport(t.touches[0].clientX,t.touches[0].clientY),i[0]=A[0],i[1]=A[1])}for(h=0;h<i.length;h++)a[h]=i[h];e&&0<t.touches.length&&!I.hoverData.draggingEles&&!I.swipePanning&&null!=I.data.bgActivePosistion&&(I.data.bgActivePosistion=void 0,I.redrawHint("select",!0),I.redraw())}},"touchmoveHandler"),!1),I.registerBinding(e,"touchcancel",te=mt(function(e){var t=I.touchData.start;I.touchData.capture=!1,t&&t.unactivate()},"touchcancelHandler")),I.registerBinding(e,"touchend",re=mt(function(t){var e=I.touchData.start;if(I.touchData.capture){0===t.touches.length&&(I.touchData.capture=!1),t.preventDefault();var r,n=I.selection,i=(I.swipePanning=!1,I.hoverData.draggingEles=!1,I.cy),a=i.zoom(),s=I.touchData.now,o=I.touchData.earlier,l=(t.touches[0]&&(l=I.projectIntoViewport(t.touches[0].clientX,t.touches[0].clientY),s[0]=l[0],s[1]=l[1]),t.touches[1]&&(l=I.projectIntoViewport(t.touches[1].clientX,t.touches[1].clientY),s[2]=l[0],s[3]=l[1]),t.touches[2]&&(l=I.projectIntoViewport(t.touches[2].clientX,t.touches[2].clientY),s[4]=l[0],s[5]=l[1]),mt(function(e){return{originalEvent:t,type:e,position:{x:s[0],y:s[1]}}},"makeEvent"));if(e&&e.unactivate(),I.touchData.cxt)r=l("cxttapend"),(e||i).emit(r),I.touchData.cxtDragged||(r=l("cxttap"),(e||i).emit(r)),I.touchData.start&&(I.touchData.start._private.grabbed=!1),I.touchData.cxt=!1,I.touchData.start=null,I.redraw();else{!t.touches[2]&&i.boxSelectionEnabled()&&I.touchData.selecting&&(I.touchData.selecting=!1,r=i.collection(I.getAllInBox(n[0],n[1],n[2],n[3])),n[0]=void 0,n[1]=void 0,n[2]=void 0,n[3]=void 0,n[4]=0,I.redrawHint("select",!0),i.emit(l("boxend")),n=mt(function(e){return e.selectable()&&!e.selected()},"eleWouldBeSelected"),r.emit(l("box")).stdFilter(n).select().emit(l("boxselect")),r.nonempty()&&I.redrawHint("eles",!0),I.redraw()),e?.unactivate(),t.touches[2]?(I.data.bgActivePosistion=void 0,I.redrawHint("select",!0)):t.touches[1]||t.touches[0]||(t.touches[0],I.data.bgActivePosistion=void 0,I.redrawHint("select",!0),n=I.dragData.touchDragEles,null!=e?(r=e._private.grabbed,D(n),I.redrawHint("drag",!0),I.redrawHint("eles",!0),r&&(e.emit(l("freeon")),n.emit(l("free")),I.dragData.didDrag)&&(e.emit(l("dragfreeon")),n.emit(l("dragfree"))),R(e,["touchend","tapend","vmouseup","tapdragout"],t,{x:s[0],y:s[1]}),e.unactivate(),I.touchData.start=null):(r=I.findNearestElement(s[0],s[1],!0,!0),R(r,["touchend","tapend","vmouseup","tapdragout"],t,{x:s[0],y:s[1]})),r=((n=I.touchData.startPosition[0]-s[0])*n+(l=I.touchData.startPosition[1]-s[1])*l)*a*a,I.touchData.singleTouchMoved||(e||i.$(":selected").unselect(["tapunselect"]),R(e,["tap","vclick"],t,{x:s[0],y:s[1]}),v=!1,t.timeStamp-w<=i.multiClickDebounceTime()?(b&&clearTimeout(b),v=!0,w=null,R(e,["dbltap","vdblclick"],t,{x:s[0],y:s[1]})):(b=setTimeout(function(){v||R(e,["onetap","voneclick"],t,{x:s[0],y:s[1]})},i.multiClickDebounceTime()),w=t.timeStamp)),null!=e&&!I.dragData.didDrag&&e._private.selectable&&r<I.touchTapThreshold2&&!I.pinching&&("single"===i.selectionType()?(i.$(p).unmerge(e).unselect(["tapunselect"]),e.select(["tapselect"])):e.selected()?e.unselect(["tapunselect"]):e.select(["tapselect"]),I.redrawHint("eles",!0)),I.touchData.singleTouchMoved=!0);for(var c=0;c<s.length;c++)o[c]=s[c];I.dragData.didDrag=!1,0===t.touches.length&&(I.touchData.dragDelta=[],I.touchData.startPosition=[null,null,null,null,null,null],I.touchData.startGPosition=null,I.touchData.didSelect=!1),t.touches.length<2&&(1===t.touches.length&&(I.touchData.startGPosition=[t.touches[0].clientX,t.touches[0].clientY]),I.pinching=!1,I.redrawHint("eles",!0),I.redraw())}}},"touchendHandler"),!1),"u"<typeof TouchEvent&&(s=[],ne=mt(function(e){return{clientX:e.clientX,clientY:e.clientY,force:1,identifier:e.pointerId,pageX:e.pageX,pageY:e.pageY,radiusX:e.width/2,radiusY:e.height/2,screenX:e.screenX,screenY:e.screenY,target:e.target}},"makeTouch"),ie=mt(function(e){return{event:e,touch:ne(e)}},"makePointer"),ae=mt(function(e){s.push(ie(e))},"addPointer"),se=mt(function(e){for(var t=0;t<s.length;t++)if(s[t].event.pointerId===e.pointerId)return void s.splice(t,1)},"removePointer"),oe=mt(function(t){var e=s.filter(function(e){return e.event.pointerId===t.pointerId})[0];e.event=t,e.touch=ne(t)},"updatePointer"),o=mt(function(e){e.touches=s.map(function(e){return e.touch})},"addTouchesToEvent"),l=mt(function(e){return"mouse"===e.pointerType||4===e.pointerType},"pointerIsMouse"),I.registerBinding(I.container,"pointerdown",function(e){l(e)||(e.preventDefault(),ae(e),o(e),J(e))}),I.registerBinding(I.container,"pointerup",function(e){l(e)||(se(e),o(e),re(e))}),I.registerBinding(I.container,"pointercancel",function(e){l(e)||(se(e),o(e),te(e))}),I.registerBinding(I.container,"pointermove",function(e){l(e)||(e.preventDefault(),oe(e),o(e),ee(e))}))}},nhe={generatePolygon:function(e,t){return this.nodeShapes[e]={renderer:this,name:e,points:t,draw:mt(function(e,t,r,n,i,a){this.renderer.nodeShapeImpl("polygon",e,t,r,n,i,this.points)},"draw"),intersectLine:mt(function(e,t,r,n,i,a,s,o){return Nne(i,a,this.points,e,t,r/2,n/2,s)},"intersectLine"),checkPoint:mt(function(e,t,r,n,i,a,s,o){return bne(e,t,this.points,a,s,n,i,[0,-1],r)},"checkPoint"),hasMiterBounds:"rectangle"!==e,miterBounds:mt(function(e,t,r,n,i,a){return SZ(this.points,e,t,r,n,i)},"miterBounds")}},generateEllipse:function(){return this.nodeShapes.ellipse={renderer:this,name:"ellipse",draw:mt(function(e,t,r,n,i,a){this.renderer.nodeShapeImpl(this.name,e,t,r,n,i)},"draw"),intersectLine:mt(function(e,t,r,n,i,a,s,o){return Ene(i,a,e,t,r/2+s,n/2+s)},"intersectLine"),checkPoint:mt(function(e,t,r,n,i,a,s,o){return Cne(e,t,n,i,a,s,r)},"checkPoint")}},generateRoundPolygon:function(e,m){return this.nodeShapes[e]={renderer:this,name:e,points:m,getOrCreateCorners:mt(function(e,t,r,n,i,a,s){if(void 0===a[s]||a[s+"-cx"]!==e||a[s+"-cy"]!==t){a[s]=new Array(m.length/2),a[s+"-cx"]=e,a[s+"-cy"]=t;var o=r/2,l=n/2;i="auto"===i?Bne(r,n):i;for(var c=new Array(m.length/2),h=0;h<m.length/2;h++)c[h]={x:e+o*m[2*h],y:t+l*m[2*h+1]};for(var u,d,p=c.length,g=c[p-1],f=0;f<p;f++)u=c[f%p],d=c[(f+1)%p],a[s][f]=hJ(g,u,d,i),g=u}return a[s]},"getOrCreateCorners"),draw:mt(function(e,t,r,n,i,a,s){this.renderer.nodeShapeImpl("round-polygon",e,t,r,n,i,this.points,this.getOrCreateCorners(t,r,n,i,a,s,"drawCorners"))},"draw"),intersectLine:mt(function(e,t,r,n,i,a,s,o,l){return Ine(i,a,this.points,e,t,r,n,s,this.getOrCreateCorners(e,t,r,n,o,l,"corners"))},"intersectLine"),checkPoint:mt(function(e,t,r,n,i,a,s,o,l){return wne(e,t,this.points,a,s,n,i,this.getOrCreateCorners(a,s,n,i,o,l,"corners"))},"checkPoint")}},generateRoundRectangle:function(){return this.nodeShapes["round-rectangle"]=this.nodeShapes.roundrectangle={renderer:this,name:"round-rectangle",points:Mne(4,0),draw:mt(function(e,t,r,n,i,a){this.renderer.nodeShapeImpl(this.name,e,t,r,n,i,this.points,a)},"draw"),intersectLine:mt(function(e,t,r,n,i,a,s,o){return dne(i,a,e,t,r,n,s,o)},"intersectLine"),checkPoint:mt(function(e,t,r,n,i,a,s,o){var l=n/2,c=i/2,h=(o="auto"===o?Pne(n,i):o,2*(o=Math.min(l,c,o)));return!!(bne(e,t,this.points,a,s,n,i-h,[0,-1],r)||bne(e,t,this.points,a,s,n-h,i,[0,-1],r)||Cne(e,t,h,h,a-l+o,s-c+o,r)||Cne(e,t,h,h,a+l-o,s-c+o,r)||Cne(e,t,h,h,a+l-o,s+c-o,r)||Cne(e,t,h,h,a-l+o,s+c-o,r))},"checkPoint")}},generateCutRectangle:function(){return this.nodeShapes["cut-rectangle"]=this.nodeShapes.cutrectangle={renderer:this,name:"cut-rectangle",cornerLength:$ne(),points:Mne(4,0),draw:mt(function(e,t,r,n,i,a){this.renderer.nodeShapeImpl(this.name,e,t,r,n,i,null,a)},"draw"),generateCutTrianglePts:mt(function(e,t,r,n,i){var a=r-(e/=2),r=r+e;return{topLeft:[a,(e=n-(t/=2))+(i="auto"===i?this.cornerLength:i),a+i,e,a+i,e+i],topRight:[r-i,e,r,e+i,r-i,e+i],bottomRight:[r,(n+=t)-i,r-i,n,r-i,n-i],bottomLeft:[a+i,n,a,n-i,a+i,n-i]}},"generateCutTrianglePts"),intersectLine:mt(function(e,t,r,n,i,a,s,o){return r=this.generateCutTrianglePts(r+2*s,n+2*s,e,t,o),n=[].concat.apply([],[r.topLeft.splice(0,4),r.topRight.splice(0,4),r.bottomRight.splice(0,4),r.bottomLeft.splice(0,4)]),Nne(i,a,n,e,t)},"intersectLine"),checkPoint:mt(function(e,t,r,n,i,a,s,o){return o="auto"===o?this.cornerLength:o,!(!bne(e,t,this.points,a,s,n,i-2*o,[0,-1],r)&&!bne(e,t,this.points,a,s,n-2*o,i,[0,-1],r))||(o=this.generateCutTrianglePts(n,i,a,s),xne(e,t,o.topLeft))||xne(e,t,o.topRight)||xne(e,t,o.bottomRight)||xne(e,t,o.bottomLeft)},"checkPoint")}},generateBarrel:function(){return this.nodeShapes.barrel={renderer:this,name:"barrel",points:Mne(4,0),draw:mt(function(e,t,r,n,i,a){this.renderer.nodeShapeImpl(this.name,e,t,r,n,i)},"draw"),intersectLine:mt(function(e,t,r,n,i,a,s,o){return r=this.generateBarrelBezierPts(r+2*s,n+2*s,e,t),n=mt(function(e){var t=Kre({x:e[0],y:e[1]},{x:e[2],y:e[3]},{x:e[4],y:e[5]},.15),r=Kre({x:e[0],y:e[1]},{x:e[2],y:e[3]},{x:e[4],y:e[5]},.5),n=Kre({x:e[0],y:e[1]},{x:e[2],y:e[3]},{x:e[4],y:e[5]},.85);return[e[0],e[1],t.x,t.y,r.x,r.y,n.x,n.y,e[4],e[5]]},"approximateBarrelCurvePts"),s=[].concat(n(r.topLeft),n(r.topRight),n(r.bottomRight),n(r.bottomLeft)),Nne(i,a,s,e,t)},"intersectLine"),generateBarrelBezierPts:mt(function(e,t,r,n){var i=t/2,a=r-(s=e/2),r=r+s,s=n-i,n=n+i,t=(i=zne(e,t)).heightOffset,o=i.widthOffset;return(e={topLeft:[a,s+t,a+(i=i.ctrlPtOffsetPct*e),s,a+o,s],topRight:[r-o,s,r-i,s,r,s+t],bottomRight:[r,n-t,r-i,n,r-o,n],bottomLeft:[a+o,n,a+i,n,a,n-t]}).topLeft.isTop=!0,e.topRight.isTop=!0,e.bottomLeft.isBottom=!0,e.bottomRight.isBottom=!0,e},"generateBarrelBezierPts"),checkPoint:mt(function(e,t,r,n,i,a,s,o){var l=(c=zne(n,i)).heightOffset,c=c.widthOffset;if(bne(e,t,this.points,a,s,n,i-2*l,[0,-1],r)||bne(e,t,this.points,a,s,n-2*c,i,[0,-1],r))return!0;for(var h=this.generateBarrelBezierPts(n,i,a,s),u=mt(function(e,t,r){var n=r[4],i=r[2],a=r[0],s=r[5],r=r[1],o=Math.min(n,a),l=Math.max(n,a),c=Math.min(s,r),s=Math.max(s,r);return o<=e&&e<=l&&c<=t&&t<=s&&(r=Fne(n,i,a),0<(o=fne(r[0],r[1],r[2],e).filter(function(e){return 0<=e&&e<=1})).length)?o[0]:null},"getCurveT"),d=Object.keys(h),p=0;p<d.length;p++){var g=h[d[p]],f=u(e,t,g);if(null!=f){var m=g[5],y=g[3],v=g[1],m=Xre(m,y,v,f);if(g.isTop&&m<=t||g.isBottom&&t<=m)return!0}}return!1},"checkPoint")}},generateBottomRoundrectangle:function(){return this.nodeShapes["bottom-round-rectangle"]=this.nodeShapes.bottomroundrectangle={renderer:this,name:"bottom-round-rectangle",points:Mne(4,0),draw:mt(function(e,t,r,n,i,a){this.renderer.nodeShapeImpl(this.name,e,t,r,n,i,this.points,a)},"draw"),intersectLine:mt(function(e,t,r,n,i,a,s,o){var l=t-(n/2+s);return 0<(l=Ane(i,a,e,t,e-(r/2+s),l,e+(r/2+s),l,!1)).length?l:dne(i,a,e,t,r,n,s,o)},"intersectLine"),checkPoint:mt(function(e,t,r,n,i,a,s,o){var l,c,h=2*(o="auto"===o?Pne(n,i):o);return!(!bne(e,t,this.points,a,s,n,i-h,[0,-1],r)&&!bne(e,t,this.points,a,s,n-h,i,[0,-1],r)&&!(xne(e,t,[a-(l=n/2+2*r),s-(c=i/2+2*r),a-l,s,a+l,s,a+l,s-c])||Cne(e,t,h,h,a+n/2-o,s+i/2-o,r)||Cne(e,t,h,h,a-n/2+o,s+i/2-o,r)))},"checkPoint")}},registerNodeShapes:function(){var e=this.nodeShapes={},r=this,t=(this.generateEllipse(),this.generatePolygon("triangle",Mne(3,0)),this.generateRoundPolygon("round-triangle",Mne(3,0)),this.generatePolygon("rectangle",Mne(4,0)),e.square=e.rectangle,this.generateRoundRectangle(),this.generateCutRectangle(),this.generateBarrel(),this.generateBottomRoundrectangle(),[0,1,1,0,0,-1,-1,0]),n=(this.generatePolygon("diamond",t),this.generateRoundPolygon("round-diamond",t),this.generatePolygon("pentagon",Mne(5,0)),this.generateRoundPolygon("round-pentagon",Mne(5,0)),this.generatePolygon("hexagon",Mne(6,0)),this.generateRoundPolygon("round-hexagon",Mne(6,0)),this.generatePolygon("heptagon",Mne(7,0)),this.generateRoundPolygon("round-heptagon",Mne(7,0)),this.generatePolygon("octagon",Mne(8,0)),this.generateRoundPolygon("round-octagon",Mne(8,0)),new Array(20)),i=One(5,0),a=One(5,Math.PI/5),s=.5*(3-Math.sqrt(5));s*=1.57;for(var o=0;o<a.length/2;o++)a[2*o]*=s,a[2*o+1]*=s;for(o=0;o<5;o++)n[4*o]=i[2*o],n[4*o+1]=i[2*o+1],n[4*o+2]=a[2*o],n[4*o+3]=a[2*o+1];n=Dne(n),this.generatePolygon("star",n),this.generatePolygon("vee",[-1,-1,0,-.333,1,-1,0,1]),this.generatePolygon("rhomboid",[-1,-1,.333,-1,1,1,-.333,1]),this.generatePolygon("right-rhomboid",[-.333,-1,1,-1,.333,1,-1,1]),this.nodeShapes.concavehexagon=this.generatePolygon("concave-hexagon",[-1,-.95,-.75,0,-1,.95,1,.95,.75,0,1,-.95]),this.generatePolygon("tag",t=[-1,-1,.25,-1,1,0,.25,1,-1,1]),this.generateRoundPolygon("round-tag",t),e.makePolygon=function(e){var t="polygon-"+e.join("$");return this[t]||r.generatePolygon(t,e)}}},ihe={timeToRender:function(){return this.redrawTotalTime/this.redrawCount},redraw:function(e){e=e||dre(),void 0===this.averageRedrawTime&&(this.averageRedrawTime=0),void 0===this.lastRedrawTime&&(this.lastRedrawTime=0),void 0===this.lastDrawTime&&(this.lastDrawTime=0),this.requestedFrame=!0,this.renderOptions=e},beforeRender:function(e,t){var r;this.destroyed||(null==t&&ire("Priority is not optional for beforeRender"),(r=this.beforeRenderCallbacks).push({fn:e,priority:t}),r.sort(function(e,t){return t.priority-e.priority}))}},dce=mt(function(e,t,r){for(var n=e.beforeRenderCallbacks,i=0;i<n.length;i++)n[i].fn(t,r)},"beforeRenderCallbacks"),ihe.startRenderLoop=function(){var n,i=this,a=i.cy;i.renderLoopStarted||(i.renderLoopStarted=!0,n=mt(function(e){var t,r;i.destroyed||(a.batching()||(i.requestedFrame&&!i.skipFrame?(dce(i,!0,e),t=$te(),i.render(i.renderOptions),r=i.lastDrawTime=$te(),void 0===i.averageRedrawTime&&(i.averageRedrawTime=r-t),void 0===i.redrawCount&&(i.redrawCount=0),i.redrawCount++,void 0===i.redrawTotalTime&&(i.redrawTotalTime=0),i.redrawTotalTime+=r-=t,i.lastRedrawTime=r,i.averageRedrawTime=i.averageRedrawTime/2+r/2,i.requestedFrame=!1):dce(i,!1,e)),i.skipFrame=!1,Bte(n))},"renderFn"),Bte(n))},Pce=mt(function(e){this.init(e)},"BaseRenderer"),(gce=(pce=Pce).prototype).clientFunctions=["redrawHint","render","renderTo","matchCanvasSize","nodeShapeImpl","arrowShapeImpl"],gce.init=function(e){var t,r,n,i,a=this,s=(a.options=e,a.cy=e.cy,a.container=e.cy.container()),o=a.cy.window();o&&(r=(t=o.document).head,n="__________cytoscape_container",i=null!=t.getElementById("__________cytoscape_stylesheet"),s.className.indexOf(n)<0&&(s.className=(s.className||"")+" "+n),i||((i=t.createElement("style")).id="__________cytoscape_stylesheet",i.textContent="."+n+" { position: relative; }",r.insertBefore(i,r.children[0])),"static"===o.getComputedStyle(s).getPropertyValue("position"))&&sre("A Cytoscape container has style position:static and so can not use UI extensions properly"),a.selection=[void 0,void 0,void 0,void 0,0],a.bezierProjPcts=[.05,.225,.4,.5,.6,.775,.95],a.hoverData={down:null,last:null,downTime:null,triggerMode:null,dragging:!1,initialPan:[null,null],capture:!1},a.dragData={possibleDragElements:[]},a.touchData={start:null,capture:!1,startPosition:[null,null,null,null,null,null],singleTouchStartTime:null,singleTouchMoved:!0,now:[null,null,null,null,null,null],earlier:[null,null,null,null,null,null]},a.redraws=0,a.showFps=e.showFps,a.debug=e.debug,a.webgl=e.webgl,a.hideEdgesOnViewport=e.hideEdgesOnViewport,a.textureOnViewport=e.textureOnViewport,a.wheelSensitivity=e.wheelSensitivity,a.motionBlurEnabled=e.motionBlur,a.forcedPixelRatio=he(e.pixelRatio)?e.pixelRatio:null,a.motionBlur=e.motionBlur,a.motionBlurOpacity=e.motionBlurOpacity,a.motionBlurTransparency=1-a.motionBlurOpacity,a.motionBlurPxRatio=1,a.mbPxRBlurry=1,a.minMbLowQualFrames=4,a.fullQualityMb=!1,a.clearedForMotionBlur=[],a.desktopTapThreshold=e.desktopTapThreshold,a.desktopTapThreshold2=e.desktopTapThreshold*e.desktopTapThreshold,a.touchTapThreshold=e.touchTapThreshold,a.touchTapThreshold2=e.touchTapThreshold*e.touchTapThreshold,a.tapholdDuration=500,a.bindings=[],a.beforeRenderCallbacks=[],a.beforeRenderPriorities={animations:400,eleCalcs:300,eleTxrDeq:200,lyrTxrDeq:150,lyrTxrSkip:100},a.registerNodeShapes(),a.registerArrowShapes(),a.registerCalculationListeners()},gce.notify=function(e,t){var r=this,n=r.cy;this.destroyed||("init"===e?r.load():"destroy"===e?r.destroy():(("add"===e||"remove"===e||"move"===e&&n.hasCompoundNodes()||"load"===e||"zorder"===e||"mount"===e)&&r.invalidateCachedZSortedEles(),"viewport"===e&&r.redrawHint("select",!0),"gc"===e&&r.redrawHint("gc",!0),"load"!==e&&"resize"!==e&&"mount"!==e||(r.invalidateContainerClientCoordsCache(),r.matchCanvasSize(r.container)),r.redrawHint("eles",!0),r.redrawHint("drag",!0),this.startRenderLoop(),this.redraw()))},gce.destroy=function(){var e=this;e.destroyed=!0,e.cy.stopAnimationLoop();for(var t=0;t<e.bindings.length;t++){var r=e.bindings[t],n=r.target;(n.off||n.removeEventListener).apply(n,r.args)}if(e.bindings=[],e.beforeRenderCallbacks=[],e.onUpdateEleCalcsFns=[],e.removeObserver&&e.removeObserver.disconnect(),e.styleObserver&&e.styleObserver.disconnect(),e.resizeObserver&&e.resizeObserver.disconnect(),e.labelCalcDiv)try{document.body.removeChild(e.labelCalcDiv)}catch{}},gce.isHeadless=function(){return!1},[Bce,uce,Hce,Kce,nhe,ihe].forEach(function(e){Xee(gce,e)}),J={setupDequeueing:mt(function(f){return mt(function(){var d,e,t,p=this,g=this.renderer;p.dequeueingSetup||(p.dequeueingSetup=!0,d=Mte(function(){g.redrawHint("eles",!0),g.redrawHint("drag",!0),g.redraw()},f.deqRedrawThreshold),e=mt(function(e,t){var r=$te(),n=g.averageRedrawTime,i=g.lastRedrawTime,a=[],s=g.cy.extent(),o=g.getPixelRatio();for(e||g.flushRenderedStyleQueue();;){var l=(c=$te())-r,c=c-t;if(i<1e3/60){if(c>=f.deqFastCost*(1e3/60-(e?n:0)))break}else if(e){if(l>=f.deqCost*i||l>=f.deqAvgCost*n)break}else if(c>=f.deqNoDrawCost*(1e3/60))break;var h=f.deq(p,o,s);if(!(0<h.length))break;for(var u=0;u<h.length;u++)a.push(h[u])}0<a.length&&(f.onDeqd(p,a),!e)&&f.shouldRedraw(p,a,o,s)&&d()},"dequeue"),t=f.priority||nre,g.beforeRender(e,t(p)))},"setupDequeueingImpl")},"setupDequeueing")},mt(N,"ElementTextureCacheLookup"),fce=VK(N,[{key:"getIdsFor",value:mt(function(e){null==e&&ire("Can not get id list for null key");var t=this.idsByKey,r=this.idsByKey.get(e);return r||(r=new xre,t.set(e,r)),r},"getIdsFor")},{key:"addIdForKey",value:mt(function(e,t){null!=e&&this.getIdsFor(e).add(t)},"addIdForKey")},{key:"deleteIdForKey",value:mt(function(e,t){null!=e&&this.getIdsFor(e).delete(t)},"deleteIdForKey")},{key:"getNumberOfIdsForKey",value:mt(function(e){return null==e?0:this.getIdsFor(e).size},"getNumberOfIdsForKey")},{key:"updateKeyMappingFor",value:mt(function(e){var t=e.id(),r=this.keyForId.get(t),e=this.getKey(e);this.deleteIdForKey(r,t),this.addIdForKey(e,t),this.keyForId.set(t,e)},"updateKeyMappingFor")},{key:"deleteKeyMappingFor",value:mt(function(e){var e=e.id(),t=this.keyForId.get(e);this.deleteIdForKey(t,e),this.keyForId.delete(e)},"deleteKeyMappingFor")},{key:"keyHasChangedFor",value:mt(function(e){var t=e.id();return this.keyForId.get(t)!==this.getKey(e)},"keyHasChangedFor")},{key:"isInvalid",value:mt(function(e){return this.keyHasChangedFor(e)||this.doesEleInvalidateKey(e)},"isInvalid")},{key:"getCachesAt",value:mt(function(e){var t=this.cachesByLvl,r=this.lvls,n=t.get(e);return n||(n=new vre,t.set(e,n),r.push(e)),n},"getCachesAt")},{key:"getCache",value:mt(function(e,t){return this.getCachesAt(t).get(e)},"getCache")},{key:"get",value:mt(function(e,t){var r=this.getKey(e);return null!=(r=this.getCache(r,t))&&this.updateKeyMappingFor(e),r},"get")},{key:"getForCachedKey",value:mt(function(e,t){return e=this.keyForId.get(e.id()),this.getCache(e,t)},"getForCachedKey")},{key:"hasCache",value:mt(function(e,t){return this.getCachesAt(t).has(e)},"hasCache")},{key:"has",value:mt(function(e,t){return e=this.getKey(e),this.hasCache(e,t)},"has")},{key:"setCache",value:mt(function(e,t,r){r.key=e,this.getCachesAt(t).set(e,r)},"setCache")},{key:"set",value:mt(function(e,t,r){var n=this.getKey(e);this.setCache(n,t,r),this.updateKeyMappingFor(e)},"set")},{key:"deleteCache",value:mt(function(e,t){this.getCachesAt(t).delete(e)},"deleteCache")},{key:"delete",value:mt(function(e,t){e=this.getKey(e),this.deleteCache(e,t)},"_delete")},{key:"invalidateKey",value:mt(function(t){var r=this;this.lvls.forEach(function(e){return r.deleteCache(t,e)})},"invalidateKey")},{key:"invalidate",value:mt(function(e){var t=e.id(),t=this.keyForId.get(t);return this.deleteKeyMappingFor(e),(e=this.doesEleInvalidateKey(e))&&this.invalidateKey(t),e||0===this.getNumberOfIdsForKey(t)},"invalidate")}]),mce={dequeue:"dequeue",downscale:"downscale",highQuality:"highQuality"},yce=ahe({getKey:null,doesEleInvalidateKey:tre,drawElement:null,getBoundingBox:null,getRotationPoint:null,getRotationOffset:null,isVisible:ere,allowEdgeTxrCaching:!0,allowParentTxrCaching:!0}),vce=mt(function(e,t){this.renderer=e,this.onDequeues=[],e=yce(t),Xee(this,e),this.lookup=new fce(e.getKey,e.doesEleInvalidateKey),this.setupDequeueing()},"ElementTextureCache"),(lhe=vce.prototype).reasons=mce,lhe.getTextureQueue=function(e){return this.eleImgCaches=this.eleImgCaches||{},this.eleImgCaches[e]=this.eleImgCaches[e]||[]},lhe.getRetiredTextureQueue=function(e){var t=this.eleImgCaches.retired=this.eleImgCaches.retired||{};return t[e]=t[e]||[]},lhe.getElementQueue=function(){return this.eleCacheQueue=this.eleCacheQueue||new _re(function(e,t){return t.reqs-e.reqs})},lhe.getElementKeyToQueue=function(){return this.eleKeyToCacheQueue=this.eleKeyToCacheQueue||{}},lhe.getElement=function(e,t,r,n,i){var a=this,s=this.renderer,o=s.cy.zoom(),l=this.lookup;if(!t||0===t.w||0===t.h||isNaN(t.w)||isNaN(t.h)||!e.visible()||e.removed()||!a.allowEdgeTxrCaching&&e.isEdge()||!a.allowParentTxrCaching&&e.isParent())return null;if((n=null==n?Math.ceil(jre(o*r)):n)<-4)n=-4;else if(7.99<=o||3<n)return null;var o=Math.pow(2,n),c=t.h*o,h=t.w*o,u=s.eleTextBiggerThanMin(e,o);if(!this.isVisible(e,u))return null;if((s=l.get(e,n))&&s.invalidated&&(s.invalidated=!1,s.texture.invalidatedWidth-=s.width),!s){var d=c<=25?25:c<=50?50:50*Math.ceil(c/50);if(1024<c||1024<h)return null;var p=(m=a.getTextureQueue(d))[m.length-2],g=mt(function(){return a.recycleTexture(d,h)||a.addTexture(d,h)},"addNewTxr");(p=(p=p||m[m.length-1])||g()).width-p.usedWidth<h&&(p=g());for(var f,m=mt(function(e){return e&&e.scaledLabelShown===u},"scalableFrom"),g=i&&i===mce.dequeue,y=i&&i===mce.highQuality,i=i&&i===mce.downscale,v=n+1;v<=3;v++){var x=l.get(e,v);if(x){f=x;break}}var b,w=f&&f.level===n+1?f:null,k=mt(function(){p.context.drawImage(w.texture.canvas,w.x,0,w.width,w.height,p.usedWidth,0,h,c)},"downscale");if(p.context.setTransform(1,0,0,1,0,0),p.context.clearRect(p.usedWidth,0,h,d),m(w))k();else if(m(f)){if(!y)return a.queueElement(e,f.level-1),f;for(var T=f.level;n<T;T--)w=a.getElement(e,t,r,T,mce.downscale);k()}else{if(!g&&!y&&!i)for(var E=n-1;-4<=E;E--){var C=l.get(e,E);if(C){b=C;break}}if(m(b))return a.queueElement(e,n),b;p.context.translate(p.usedWidth,0),p.context.scale(o,o),this.drawElement(p.context,e,t,u,!1),p.context.scale(1/o,1/o),p.context.translate(-p.usedWidth,0)}s={x:p.usedWidth,texture:p,level:n,scale:o,width:h,height:c,scaledLabelShown:u},p.usedWidth+=Math.ceil(8+h),p.eleCaches.push(s),l.set(e,n,s),a.checkTextureFullness(p)}return s},lhe.invalidateElements=function(e){for(var t=0;t<e.length;t++)this.invalidateElement(e[t])},lhe.invalidateElement=function(e){var t=this.lookup,r=[];if(t.isInvalid(e)){for(var n=-4;n<=3;n++){var i=t.getForCachedKey(e,n);i&&r.push(i)}if(t.invalidate(e))for(var a=0;a<r.length;a++){var s=r[a],o=s.texture;o.invalidatedWidth+=s.width,s.invalidated=!0,this.checkTextureUtility(o)}this.removeFromQueue(e)}},lhe.checkTextureUtility=function(e){e.invalidatedWidth>=.2*e.width&&this.retireTexture(e)},lhe.checkTextureFullness=function(e){var t=this.getTextureQueue(e.height);.8<e.usedWidth/e.width&&10<=e.fullnessChecks?pre(t,e):e.fullnessChecks++},lhe.retireTexture=function(e){var t=e.height,r=this.getTextureQueue(t),n=this.lookup;pre(r,e),e.retired=!0;for(var i=e.eleCaches,a=0;a<i.length;a++){var s=i[a];n.deleteCache(s.key,s.level)}gre(i),this.getRetiredTextureQueue(t).push(e)},lhe.addTexture=function(e,t){var r={};return this.getTextureQueue(e).push(r),r.eleCaches=[],r.height=e,r.width=Math.max(1024,t),r.usedWidth=0,r.invalidatedWidth=0,r.fullnessChecks=0,r.canvas=this.renderer.makeOffscreenCanvas(r.width,r.height),r.context=r.canvas.getContext("2d"),r},lhe.recycleTexture=function(e,t){for(var r=this.getTextureQueue(e),n=this.getRetiredTextureQueue(e),i=0;i<n.length;i++){var a=n[i];if(a.width>=t)return a.retired=!1,a.usedWidth=0,a.invalidatedWidth=0,a.fullnessChecks=0,gre(a.eleCaches),a.context.setTransform(1,0,0,1,0,0),a.context.clearRect(0,0,a.width,a.height),pre(n,a),r.push(a),a}},lhe.queueElement=function(e,t){var r=this.getElementQueue(),n=this.getElementKeyToQueue(),i=this.getKey(e),a=n[i];a?(a.level=Math.max(a.level,t),a.eles.merge(e),a.reqs++,r.updateItem(a)):(a={eles:e.spawn().merge(e),level:t,reqs:1,key:i},r.push(a),n[i]=a)},lhe.dequeue=function(e){for(var t=this.getElementQueue(),r=this.getElementKeyToQueue(),n=[],i=this.lookup,a=0;a<1&&0<t.size();a++){var s=t.pop(),o=s.key,l=s.eles[0],c=i.hasCache(l,s.level);r[o]=null,c||(n.push(s),o=this.getBoundingBox(l),this.getElement(l,o,e,s.level,mce.dequeue))}return n},lhe.removeFromQueue=function(e){var t=this.getElementQueue(),r=this.getElementKeyToQueue(),n=this.getKey(e),i=r[n];null!=i&&(1===i.eles.length?(i.reqs=Jte,t.updateItem(i),t.pop(),r[n]=null):i.eles.unmerge(e))},lhe.onDequeue=function(e){this.onDequeues.push(e)},lhe.offDequeue=function(e){pre(this.onDequeues,e)},lhe.setupDequeueing=J.setupDequeueing({deqRedrawThreshold:100,deqCost:.15,deqAvgCost:.1,deqNoDrawCost:.9,deqFastCost:.9,deq:mt(function(e,t,r){return e.dequeue(t,r)},"deq"),onDeqd:mt(function(e,t){for(var r=0;r<e.onDequeues.length;r++)(0,e.onDequeues[r])(t)},"onDeqd"),shouldRedraw:mt(function(e,t,r,n){for(var i=0;i<t.length;i++)for(var a=t[i].eles,s=0;s<a.length;s++){var o=a[s].boundingBox();if(one(o,n))return!0}return!1},"shouldRedraw"),priority:mt(function(e){return e.renderer.beforeRenderPriorities.eleTxrDeq},"priority")}),xce=mt(function(e){var r=this,t=(e=r.renderer=e).cy,t=(r.layersByLevel={},r.firstGet=!0,r.lastInvalidationTime=$te()-500,r.skipping=!1,r.eleTxrDeqs=t.collection(),r.scheduleElementRefinement=Mte(function(){r.refineElementTextures(r.eleTxrDeqs),r.eleTxrDeqs.unmerge(r.eleTxrDeqs)},50),e.beforeRender(function(e,t){t-r.lastInvalidationTime<=250?r.skipping=!0:r.skipping=!1},e.beforeRenderPriorities.lyrTxrSkip),mt(function(e,t){return t.reqs-e.reqs},"qSort"));r.layersQueue=new _re(t),r.setupDequeueing()},"LayeredTextureCache"),phe=xce.prototype,bce=0,wce=Math.pow(2,53)-1,phe.makeLayer=function(e,t){var r=Math.pow(2,t),n=Math.ceil(e.w*r),i=Math.ceil(e.h*r),a=this.renderer.makeOffscreenCanvas(n,i),t=(e={id:bce=++bce%wce,bb:e,level:t,width:n,height:i,canvas:a,context:a.getContext("2d"),eles:[],elesQueue:[],reqs:0}).context,n=-e.bb.x1,i=-e.bb.y1;return t.scale(r,r),t.translate(n,i),e},phe.getLayers=function(i,e,a){var s=this,t=s.renderer.cy.zoom(),r=s.firstGet;if(s.firstGet=!1,null==a)if((a=Math.ceil(jre(t*e)))<-4)a=-4;else if(3.99<=t||2<a)return null;s.validateLayersElesOrdering(a,i);var o,l,c=s.layersByLevel,h=Math.pow(2,a),u=c[a]=c[a]||[],t=s.levelIsComplete(a,i),n=mt(function(){var r=mt(function(e){if(s.validateLayersElesOrdering(e,i),s.levelIsComplete(e,i))return l=c[e],!0},"canUseAsTmpLvl"),e=mt(function(e){if(!l)for(var t=a+e;-4<=t&&t<=2&&!r(t);t+=e);},"checkLvls");e(1),e(-1);for(var t=u.length-1;0<=t;t--){var n=u[t];n.invalid&&pre(u,n)}},"checkTempLevels");if(t)return u;n();var d=mt(function(){if(!o){o=Jre();for(var e=0;e<i.length;e++)rne(o,i[e].boundingBox())}return o},"getBb"),p=mt(function(e){var t=(e=e||{}).after,r=(d(),Math.ceil(o.w*h)),n=Math.ceil(o.h*h);return 32767<r||32767<n||16e6<r*n?null:(r=s.makeLayer(o,a),null!=t?(n=u.indexOf(t)+1,u.splice(n,0,r)):void 0!==e.insert&&!e.insert||u.unshift(r),r)},"makeLayer");if(s.skipping&&!r)return null;for(var g=null,f=+i.length,m=!r,y=0;y<i.length;y++){var v=i[y],x=v._private.rscratch,b=(x=x.imgLayerCaches=x.imgLayerCaches||{})[a];if(b)g=b;else{if((!g||g.eles.length>=f||!hne(g.bb,v.boundingBox()))&&!(g=p({insert:!0,after:g})))return null;l||m?s.queueLayer(g,v):s.drawEleInLayer(g,v,a,e),g.eles.push(v),x[a]=g}}return l||(m?null:u)},phe.getEleLevelForLayerLevel=function(e,t){return e},phe.drawEleInLayer=function(e,t,r,n){var i=this.renderer,e=e.context,a=t.boundingBox();0!==a.w&&0!==a.h&&t.visible()&&(r=this.getEleLevelForLayerLevel(r,n),i.setImgSmoothing(e,!1),i.drawCachedElement(e,t,null,null,r,!0),i.setImgSmoothing(e,!0))},phe.levelIsComplete=function(e,t){var r=this.layersByLevel[e];if(!r||0===r.length)return!1;for(var n=0,i=0;i<r.length;i++){var a=r[i];if(0<a.reqs||a.invalid)return!1;n+=a.eles.length}return n===t.length},phe.validateLayersElesOrdering=function(e,t){var r=this.layersByLevel[e];if(r)for(var n=0;n<r.length;n++){for(var i=r[n],a=-1,s=0;s<t.length;s++)if(i.eles[0]===t[s]){a=s;break}if(a<0)this.invalidateLayer(i);else for(var o=a,s=0;s<i.eles.length;s++)if(i.eles[s]!==t[o+s]){this.invalidateLayer(i);break}}},phe.updateElementsInLayers=function(e,t){for(var r=Nee(e[0]),n=0;n<e.length;n++)for(var i=r?null:e[n],a=r?e[n]:e[n].ele,s=a._private.rscratch,o=s.imgLayerCaches=s.imgLayerCaches||{},l=-4;l<=2;l++){var c=o[l];!c||i&&this.getEleLevelForLayerLevel(c.level)!==i.level||t(c,a,i)}},phe.haveLayers=function(){for(var e=!1,t=-4;t<=2;t++){var r=this.layersByLevel[t];if(r&&0<r.length){e=!0;break}}return e},phe.invalidateElements=function(e){var n=this;0!==e.length&&(n.lastInvalidationTime=$te(),0!==e.length)&&n.haveLayers()&&n.updateElementsInLayers(e,mt(function(e,t,r){n.invalidateLayer(e)},"invalAssocLayers"))},phe.invalidateLayer=function(e){if(this.lastInvalidationTime=$te(),!e.invalid){var t=e.level,r=e.eles,n=this.layersByLevel[t];pre(n,e),e.elesQueue=[],e.invalid=!0,e.replacement&&(e.replacement.invalid=!0);for(var i=0;i<r.length;i++){var a=r[i]._private.rscratch.imgLayerCaches;a&&(a[t]=null)}}},phe.refineElementTextures=function(e){var a=this;a.updateElementsInLayers(e,mt(function(e,t,r){var n=e.replacement;if(n||((n=e.replacement=a.makeLayer(e.bb,e.level)).replaces=e,n.eles=e.eles),!n.reqs)for(var i=0;i<n.eles.length;i++)a.queueLayer(n,n.eles[i])},"refineEachEle"))},phe.enqueueElementRefinement=function(e){this.eleTxrDeqs.merge(e),this.scheduleElementRefinement()},phe.queueLayer=function(e,t){var r=this.layersQueue,n=e.elesQueue,i=n.hasId=n.hasId||{};if(!e.replacement){if(t){if(i[t.id()])return;n.push(t),i[t.id()]=!0}e.reqs?(e.reqs++,r.updateItem(e)):(e.reqs=1,r.push(e))}},phe.dequeue=function(e){for(var t=this.layersQueue,r=[],n=0;n<1&&0!==t.size();){var i,a=t.peek();a.replacement||a.replaces&&a!==a.replaces.replacement||a.invalid?t.pop():((i=a.elesQueue.shift())&&(this.drawEleInLayer(a,i,a.level,e),n++),0===r.length&&r.push(!0),0===a.elesQueue.length&&(t.pop(),a.reqs=0,a.replaces&&this.applyLayerReplacement(a),this.requestRedraw()))}return r},phe.applyLayerReplacement=function(e){var t=this.layersByLevel[e.level],r=e.replaces,n=t.indexOf(r);if(!(n<0||r.invalid)){t[n]=e;for(var i=0;i<e.eles.length;i++){var a=e.eles[i]._private;(a=a.imgLayerCaches=a.imgLayerCaches||{})&&(a[e.level]=e)}this.requestRedraw()}},phe.requestRedraw=Mte(function(){var e=this.renderer;e.redrawHint("eles",!0),e.redrawHint("drag",!0),e.redraw()},100),phe.setupDequeueing=J.setupDequeueing({deqRedrawThreshold:50,deqCost:.15,deqAvgCost:.1,deqNoDrawCost:.9,deqFastCost:.9,deq:mt(function(e,t){return e.dequeue(t)},"deq"),onDeqd:nre,shouldRedraw:ere,priority:mt(function(e){return e.renderer.beforeRenderPriorities.lyrTxrDeq},"priority")}),kce={},mt(pJ,"polygon"),mt(gJ,"triangleBackcurve"),mt(fJ,"triangleTee"),mt(mJ,"circleTriangle"),mt(yJ,"circle$1"),kce.arrowShapeImpl=function(e){return(Tce=Tce||{polygon:pJ,"triangle-backcurve":gJ,"triangle-tee":fJ,"circle-triangle":mJ,"triangle-cross":fJ,circle:yJ})[e]},Ece={drawElement:function(e,t,r,n,i,a){t.isNode()?this.drawNode(e,t,r,n,i,a):this.drawEdge(e,t,r,n,i,a)},drawElementOverlay:function(e,t){t.isNode()?this.drawNodeOverlay(e,t):this.drawEdgeOverlay(e,t)},drawElementUnderlay:function(e,t){t.isNode()?this.drawNodeUnderlay(e,t):this.drawEdgeUnderlay(e,t)},drawCachedElementPortion:function(e,t,r,n,i,a,s,o){var l,c,h,u,d,p,g,f=r.getBoundingBox(t);0!==f.w&&0!==f.h&&(null!=(n=r.getElement(t,f,n,i,a))?0!==(i=o(this,t))&&(a=s(this,t),o=f.x1,s=f.y1,l=f.w,f=f.h,p=0!==a?(h=(u=r.getRotationPoint(t)).x,e.translate(h,u=u.y),e.rotate(a),(c=this.getImgSmoothing(e))||this.setImgSmoothing(e,!0),d=(p=r.getRotationOffset(t)).x,p.y):(d=o,s),1!==i&&(g=e.globalAlpha,e.globalAlpha=g*i),e.drawImage(n.texture.canvas,n.x,0,n.width,n.height,d,p,l,f),1!==i&&(e.globalAlpha=g),0!==a)&&(e.rotate(-a),e.translate(-h,-u),c||this.setImgSmoothing(e,!1)):r.drawElement(e,t))}},Cce=mt(function(){return 0},"getZeroRotation"),_ce=mt(function(e,t){return e.getTextAngle(t,null)},"getLabelRotation"),Sce=mt(function(e,t){return e.getTextAngle(t,"source")},"getSourceLabelRotation"),Ace=mt(function(e,t){return e.getTextAngle(t,"target")},"getTargetLabelRotation"),Lce=mt(function(e,t){return t.effectiveOpacity()},"getOpacity"),Nce=mt(function(e,t){return t.pstyle("text-opacity").pfValue*t.effectiveOpacity()},"getTextOpacity"),Ece.drawCachedElement=function(e,t,r,n,i,a){var s=(c=this.data).eleTxrCache,o=c.lblTxrCache,l=c.slbTxrCache,c=c.tlbTxrCache,h=t.boundingBox(),a=!0===a?s.reasons.highQuality:null;0===h.w||0===h.h||!t.visible()||n&&!one(h,n)||(h=t.isEdge(),n=t.element()._private.rscratch.badLine,this.drawElementUnderlay(e,t),this.drawCachedElementPortion(e,t,s,r,i,a,Cce,Lce),h&&n||this.drawCachedElementPortion(e,t,o,r,i,a,_ce,Nce),h&&!n&&(this.drawCachedElementPortion(e,t,l,r,i,a,Sce,Nce),this.drawCachedElementPortion(e,t,c,r,i,a,Ace,Nce)),this.drawElementOverlay(e,t))},Ece.drawElements=function(e,t){for(var r=0;r<t.length;r++)this.drawElement(e,t[r])},Ece.drawCachedElements=function(e,t,r,n){for(var i=0;i<t.length;i++)this.drawCachedElement(e,t[i],r,n)},Ece.drawCachedNodes=function(e,t,r,n){for(var i=0;i<t.length;i++){var a=t[i];a.isNode()&&this.drawCachedElement(e,a,r,n)}},Ece.drawLayeredElements=function(e,t,r,n){var i=this.data.lyrTxrCache.getLayers(t,r);if(i)for(var a=0;a<i.length;a++){var s=i[a],o=s.bb;0!==o.w&&0!==o.h&&e.drawImage(s.canvas,o.x1,o.y1,o.w,o.h)}else this.drawCachedElements(e,t,r,n)},Ice={drawEdge:function(t,r,e){var n,i,a,s,o,l,c,h,u,d,p,g,f,m,y,v,x,b=!(3<arguments.length&&void 0!==arguments[3])||arguments[3],w=!(4<arguments.length&&void 0!==arguments[4])||arguments[4],k=!(5<arguments.length&&void 0!==arguments[5])||arguments[5],T=this,E=r._private.rscratch;k&&!r.visible()||E.badLine||null==E.allpts||isNaN(E.allpts[0])||(e&&t.translate(-(n=e).x1,-n.y1),d=k?r.pstyle("opacity").value:1,k=k?r.pstyle("line-opacity").value:1,i=r.pstyle("curve-style").value,a=r.pstyle("line-style").value,s=r.pstyle("width").pfValue,o=r.pstyle("line-cap").value,l=r.pstyle("line-outline-width").value,c=r.pstyle("line-outline-color").value,u=h=d*k,d=mt(function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:h;"straight-triangle"===i?(T.eleStrokeStyle(t,r,e),T.drawEdgeTrianglePath(r,t,E.allpts)):(t.lineWidth=s,t.lineCap=o,T.eleStrokeStyle(t,r,e),T.drawEdgePath(r,t,E.allpts,a),t.lineCap="butt")},"drawLine"),k=mt(function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:h;t.lineWidth=s+l,t.lineCap=o,0<l?(T.colorStrokeStyle(t,c[0],c[1],c[2],e),"straight-triangle"===i?T.drawEdgeTrianglePath(r,t,E.allpts):(T.drawEdgePath(r,t,E.allpts,a),t.lineCap="butt")):t.lineCap="butt"},"drawLineOutline"),p=mt(function(){w&&T.drawEdgeOverlay(t,r)},"drawOverlay"),g=mt(function(){w&&T.drawEdgeUnderlay(t,r)},"drawUnderlay"),f=mt(function(){T.drawArrowheads(t,r,0<arguments.length&&void 0!==arguments[0]?arguments[0]:u)},"drawArrows"),m=mt(function(){T.drawElementText(t,r,null,b)},"drawText"),t.lineJoin="round","yes"===r.pstyle("ghost").value?(y=r.pstyle("ghost-offset-x").pfValue,v=r.pstyle("ghost-offset-y").pfValue,x=r.pstyle("ghost-opacity").value,x*=h,t.translate(y,v),d(x),f(x),t.translate(-y,-v)):k(),g(),d(),f(),p(),m(),e&&t.translate(n.x1,n.y1))}},Rce=mt(function(o){if(["overlay","underlay"].includes(o))return function(e,t){var r,n,i,a,s;t.visible()&&0!==(r=t.pstyle("".concat(o,"-opacity")).value)&&(n=this.usePaths(),i=t._private.rscratch,a=2*t.pstyle("".concat(o,"-padding")).pfValue,s=t.pstyle("".concat(o,"-color")).value,e.lineWidth=a,"self"!==i.edgeType||n?e.lineCap="round":e.lineCap="butt",this.colorStrokeStyle(e,s[0],s[1],s[2],r),this.drawEdgePath(t,e,i.allpts,"solid"))};throw new Error("Invalid state")},"drawEdgeOverlayUnderlay"),Ice.drawEdgeOverlay=Rce("overlay"),Ice.drawEdgeUnderlay=Rce("underlay"),Ice.drawEdgePath=function(e,t,r,n){var i,a=e._private.rscratch,s=t,o=!1,l=this.usePaths(),c=e.pstyle("line-dash-pattern").pfValue,h=e.pstyle("line-dash-offset").pfValue;if(l&&(e=r.join("$"),a.pathCacheKey&&a.pathCacheKey===e?(i=t=a.pathCache,o=!0):(i=t=new Path2D,a.pathCacheKey=e,a.pathCache=i)),s.setLineDash)switch(n){case"dotted":s.setLineDash([1,1]);break;case"dashed":s.setLineDash(c),s.lineDashOffset=h;break;case"solid":s.setLineDash([])}if(!o&&!a.badLine)switch(t.beginPath&&t.beginPath(),t.moveTo(r[0],r[1]),a.edgeType){case"bezier":case"self":case"compound":case"multibezier":for(var u=2;u+3<r.length;u+=4)t.quadraticCurveTo(r[u],r[u+1],r[u+2],r[u+3]);break;case"straight":case"haystack":for(var d=2;d+1<r.length;d+=2)t.lineTo(r[d],r[d+1]);break;case"segments":if(a.isRound){var p,g=XK(a.roundCorners);try{for(g.s();!(p=g.n()).done;)cJ(t,p.value)}catch(e){g.e(e)}finally{g.f()}t.lineTo(r[r.length-2],r[r.length-1])}else for(var f=2;f+1<r.length;f+=2)t.lineTo(r[f],r[f+1])}t=s,l?t.stroke(i):t.stroke(),t.setLineDash&&t.setLineDash([])},Ice.drawEdgeTrianglePath=function(e,t,r){t.fillStyle=t.strokeStyle;for(var n=e.pstyle("width").pfValue,i=0;i+1<r.length;i+=2){var a=[r[i+2]-r[i],r[i+3]-r[i+1]],s=Math.sqrt(a[0]*a[0]+a[1]*a[1]),s=[(a=[a[1]/s,-a[0]/s])[0]*n/2,a[1]*n/2];t.beginPath(),t.moveTo(r[i]-s[0],r[i+1]-s[1]),t.lineTo(r[i]+s[0],r[i+1]+s[1]),t.lineTo(r[i+2],r[i+3]),t.closePath(),t.fill()}},Ice.drawArrowheads=function(e,t,r){var n=t._private.rscratch,i="haystack"===n.edgeType;i||this.drawArrowhead(e,t,"source",n.arrowStartX,n.arrowStartY,n.srcArrowAngle,r),this.drawArrowhead(e,t,"mid-target",n.midX,n.midY,n.midtgtArrowAngle,r),this.drawArrowhead(e,t,"mid-source",n.midX,n.midY,n.midsrcArrowAngle,r),i||this.drawArrowhead(e,t,"target",n.arrowEndX,n.arrowEndY,n.tgtArrowAngle,r)},Ice.drawArrowhead=function(e,t,r,n,i,a,s){var o,l,c,h,u,d,p;isNaN(n)||null==n||isNaN(i)||null==i||isNaN(a)||null==a||"none"!==(o=t.pstyle(r+"-arrow-shape").value)&&(l="hollow"===t.pstyle(r+"-arrow-fill").value?"both":"filled",c=t.pstyle(r+"-arrow-fill").value,h=t.pstyle("width").pfValue,u="match-line"===(p=t.pstyle(r+"-arrow-width")).value?h:p.pfValue,"%"===p.units&&(u*=h),p=t.pstyle("opacity").value,d=e.globalCompositeOperation,1===(s=void 0===s?p:s)&&"hollow"!==c||(e.globalCompositeOperation="destination-out",this.colorFillStyle(e,255,255,255,1),this.colorStrokeStyle(e,255,255,255,1),this.drawArrowShape(t,e,l,h,o,u,n,i,a),e.globalCompositeOperation=d),p=t.pstyle(r+"-arrow-color").value,this.colorFillStyle(e,p[0],p[1],p[2],s),this.colorStrokeStyle(e,p[0],p[1],p[2],s),this.drawArrowShape(t,e,c,h,o,u,n,i,a))},Ice.drawArrowShape=function(e,t,r,n,i,a,s,o,l){var c,h,u,d=this.usePaths()&&"triangle-cross"!==i,p=!1,g=t,f={x:s,y:o},e=e.pstyle("arrow-scale").value,e=this.getArrowWidth(n,e),m=this.arrowShapes[i];d&&(null!=(u=(h=this.arrowPathCache=this.arrowPathCache||[])[i=Wte(i)])?(c=t=u,p=!0):(c=t=new Path2D,h[i]=c)),p||(t.beginPath&&t.beginPath(),d?m.draw(t,1,0,{x:0,y:0},1):m.draw(t,e,l,f,n),t.closePath&&t.closePath()),t=g,d&&(t.translate(s,o),t.rotate(l),t.scale(e,e)),"filled"!==r&&"both"!==r||(d?t.fill(c):t.fill()),"hollow"!==r&&"both"!==r||(t.lineWidth=a/(d?e:1),t.lineJoin="miter",d?t.stroke(c):t.stroke()),d&&(t.scale(1/e,1/e),t.rotate(-l),t.translate(-s,-o))},Mce={safeDrawImage:function(e,t,r,n,i,a,s,o,l,c){if(!(i<=0||a<=0||l<=0||c<=0))try{e.drawImage(t,r,n,i,a,s,o,l,c)}catch(e){sre(e)}},drawInscribedImage:function(e,t,r,n,i){var a,s,o,l=(c=r.position()).x,c=c.y,h=r.cy().style(),u=(h=h.getIndexedStyle.bind(h))(r,"background-fit","value",n),d=h(r,"background-repeat","value",n),p=r.width(),g=r.height(),f=2*r.padding(),p=p+("inner"===h(r,"background-width-relative-to","value",n)?0:f),g=g+("inner"===h(r,"background-height-relative-to","value",n)?0:f),f=r._private.rscratch,m="node"===h(r,"background-clip","value",n),i=h(r,"background-image-opacity","value",n)*i,y=h(r,"background-image-smoothing","value",n),v=r.pstyle("corner-radius").value,x=("auto"!==v&&(v=r.pstyle("corner-radius").pfValue),t.width||t.cachedW),b=t.height||t.cachedH,w=(null!=x&&null!=b||(document.body.appendChild(t),x=t.cachedW=t.width||t.offsetWidth,b=t.cachedH=t.height||t.offsetHeight,document.body.removeChild(t)),x),k=b;"auto"!==h(r,"background-width","value",n)&&(w="%"===h(r,"background-width","units",n)?h(r,"background-width","pfValue",n)*p:h(r,"background-width","pfValue",n)),"auto"!==h(r,"background-height","value",n)&&(k="%"===h(r,"background-height","units",n)?h(r,"background-height","pfValue",n)*g:h(r,"background-height","pfValue",n)),0!==w&&0!==k&&("contain"===u?(w*=a=Math.min(p/w,g/k),k*=a):"cover"===u&&(w*=a=Math.max(p/w,g/k),k*=a),u=l-p/2,a=h(r,"background-position-x","units",n),s=h(r,"background-position-x","pfValue",n),u+="%"===a?(p-w)*s:s,a=h(r,"background-offset-x","units",n),s=h(r,"background-offset-x","pfValue",n),u+="%"===a?(p-w)*s:s,a=c-g/2,s=h(r,"background-position-y","units",n),o=h(r,"background-position-y","pfValue",n),a+="%"===s?(g-k)*o:o,s=h(r,"background-offset-y","units",n),o=h(r,"background-offset-y","pfValue",n),a+="%"===s?(g-k)*o:o,f.pathCache&&(u-=l,a-=c,c=l=0),h=e.globalAlpha,e.globalAlpha=i,n=this.getImgSmoothing(e),s=!1,"no"===y&&n?(this.setImgSmoothing(e,!1),s=!0):"yes"!==y||n||(this.setImgSmoothing(e,!0),s=!0),"no-repeat"===d?(m&&(e.save(),f.pathCache?e.clip(f.pathCache):(this.nodeShapes[this.getNodeShape(r)].draw(e,l,c,p,g,v,f),e.clip())),this.safeDrawImage(e,t,0,0,x,b,u,a,w,k),m&&e.restore()):(o=e.createPattern(t,d),e.fillStyle=o,this.nodeShapes[this.getNodeShape(r)].draw(e,l,c,p,g,v,f),e.translate(u,a),e.fill(),e.translate(-u,-a)),e.globalAlpha=h,s)&&this.setImgSmoothing(e,n)}},Dce={eleTextBiggerThanMin:function(e,t){var r,n;return t||(n=e.cy().zoom(),r=this.getPixelRatio(),n=Math.ceil(jre(n*r)),t=Math.pow(2,n)),!(e.pstyle("font-size").pfValue*t<e.pstyle("min-zoomed-font-size").pfValue)},drawElementText:function(e,t,r,n,i){var a=!(5<arguments.length&&void 0!==arguments[5])||arguments[5];if(null==n){if(a&&!this.eleTextBiggerThanMin(t))return}else if(!1===n)return;if(t.isNode()){if(!(n=t.pstyle("label"))||!n.value)return;n=this.getLabelJustification(t),e.textAlign=n}else{var n=t.element()._private.rscratch.badLine,s=t.pstyle("label"),o=t.pstyle("source-label"),l=t.pstyle("target-label");if(n||(!s||!s.value)&&(!o||!o.value)&&(!l||!l.value))return;e.textAlign="center"}e.textBaseline="bottom";var c,n=!r;r&&e.translate(-(c=r).x1,-c.y1),null==i?(this.drawText(e,t,null,n,a),t.isEdge()&&(this.drawText(e,t,"source",n,a),this.drawText(e,t,"target",n,a))):this.drawText(e,t,i,n,a),r&&e.translate(c.x1,c.y1)},getFontCache:function(e){var t;this.fontCaches=this.fontCaches||[];for(var r=0;r<this.fontCaches.length;r++)if((t=this.fontCaches[r]).context===e)return t;return this.fontCaches.push(t={context:e}),t},setupTextStyle:function(e,t){var r=!(2<arguments.length&&void 0!==arguments[2])||arguments[2],n=t.pstyle("font-style").strValue,i=t.pstyle("font-size").pfValue+"px",a=t.pstyle("font-family").strValue,s=t.pstyle("font-weight").strValue,r=r?t.effectiveOpacity()*t.pstyle("text-opacity").value:1,o=t.pstyle("text-outline-opacity").value*r,l=t.pstyle("color").value,t=t.pstyle("text-outline-color").value;e.font=n+" "+s+" "+i+" "+a,e.lineJoin="round",this.colorFillStyle(e,l[0],l[1],l[2],r),this.colorStrokeStyle(e,t[0],t[1],t[2],o)}},mt(vJ,"circle"),mt(xJ,"roundRect"),Dce.getTextAngle=function(e,t){var r=e._private.rscratch,n=e.pstyle((t?t+"-":"")+"text-rotation");return"autorotate"===n.strValue?(r=mre(r,"labelAngle",t),e.isEdge()?r:0):"none"===n.strValue?0:n.pfValue},Dce.drawText=function(e,t,r){var n=!(3<arguments.length&&void 0!==arguments[3])||arguments[3],i=t._private.rscratch,a=(u=!(4<arguments.length&&void 0!==arguments[4])||arguments[4])?t.effectiveOpacity():1;if(!u||0!==a&&0!==t.pstyle("text-opacity").value){var s,o,l=mre(i,"labelX",r="main"===r?null:r),c=mre(i,"labelY",r),h=this.getLabelText(t,r);if(null!=h&&""!==h&&!isNaN(l)&&!isNaN(c)){this.setupTextStyle(e,t,u);var u=r?r+"-":"",d=mre(i,"labelWidth",r),p=mre(i,"labelHeight",r),g=t.pstyle(u+"text-margin-x").pfValue,u=t.pstyle(u+"text-margin-y").pfValue,f=t.isEdge(),m=t.pstyle("text-halign").value,y=t.pstyle("text-valign").value;switch(f&&(y=m="center"),l+=g,c+=u,0!==(f=n?this.getTextAngle(t,r):0)&&(s=l,o=c,e.translate(s,o),e.rotate(f),c=l=0),y){case"top":break;case"center":c+=p/2;break;case"bottom":c+=p}var g=t.pstyle("text-background-opacity").value,u=t.pstyle("text-border-opacity").value,v=t.pstyle("text-border-width").pfValue,n=t.pstyle("text-background-padding").pfValue,x="round-rectangle"===(b=t.pstyle("text-background-shape").strValue)||"roundrectangle"===b,b="circle"===b;if(0<g||0<v&&0<u){var w=e.fillStyle,k=e.strokeStyle,O=e.lineWidth,T=t.pstyle("text-background-color").value,E=t.pstyle("text-border-color").value,C=t.pstyle("text-border-style").value,_=0<g,S=0<v&&0<u,A=l-n;switch(m){case"left":A-=d;break;case"center":A-=d/2}var L=c-p-n,N=d+2*n,n=p+2*n;if(_&&(e.fillStyle="rgba(".concat(T[0],",").concat(T[1],",").concat(T[2],",").concat(g*a,")")),S&&(e.strokeStyle="rgba(".concat(E[0],",").concat(E[1],",").concat(E[2],",").concat(u*a,")"),e.lineWidth=v,e.setLineDash))switch(C){case"dotted":e.setLineDash([1,1]);break;case"dashed":e.setLineDash([4,2]);break;case"double":e.lineWidth=v/4,e.setLineDash([]);break;default:e.setLineDash([])}x?(e.beginPath(),xJ(e,A,L,N,n,2)):b?(e.beginPath(),vJ(e,A,L,N,n)):(e.beginPath(),e.rect(A,L,N,n)),_&&e.fill(),S&&e.stroke(),S&&"double"===C&&(T=v/2,e.beginPath(),x?xJ(e,A+T,L+T,N-2*T,n-2*T,2):e.rect(A+T,L+T,N-2*T,n-2*T),e.stroke()),e.fillStyle=w,e.strokeStyle=k,e.lineWidth=O,e.setLineDash&&e.setLineDash([])}var I=2*t.pstyle("text-outline-width").pfValue;if(0<I&&(e.lineWidth=I),"wrap"===t.pstyle("text-wrap").value){var R=mre(i,"labelWrapCachedLines",r),M=mre(i,"labelLineHeight",r),g=d/2;switch("auto"!==(E=this.getLabelJustification(t))&&("left"===m?"left"===E?l+=-d:"center"===E&&(l+=-g):"center"===m?"left"===E?l+=-g:"right"===E&&(l+=g):"right"===m&&("center"===E?l+=g:"right"===E&&(l+=d))),y){case"top":c-=(R.length-1)*M;break;case"center":case"bottom":c-=(R.length-1)*M}for(var D=0;D<R.length;D++)0<I&&e.strokeText(R[D],l,c),e.fillText(R[D],l,c),c+=M}else 0<I&&e.strokeText(h,l,c),e.fillText(h,l,c);0!==f&&(e.rotate(-f),e.translate(-s,-o))}}},Oce={drawNode:function(T,E,e){var O=!(3<arguments.length&&void 0!==arguments[3])||arguments[3],t=!(4<arguments.length&&void 0!==arguments[4])||arguments[4],r=!(5<arguments.length&&void 0!==arguments[5])||arguments[5],C=this,s=E._private,o=s.rscratch,_=E.position();if(he(_.x)&&he(_.y)&&(!r||E.visible())){var n,l=r?E.effectiveOpacity():1,S=C.usePaths(),i=!1,r=E.padding(),A=E.width()+2*r,L=E.height()+2*r;e&&T.translate(-(n=e).x1,-n.y1);for(var a=E.pstyle("background-image").value,c=new Array(a.length),h=new Array(a.length),P=0,u=0;u<a.length;u++){var B,d=a[u];(c[u]=null!=d&&"none"!==d)&&(B=E.cy().style().getIndexedStyle(E,"background-image-crossorigin","value",u),P++,h[u]=C.getCachedImage(d,B,function(){s.backgroundTimestamp=Date.now(),E.emitAndNotify("background")}))}var p,g,f,m,y,v=E.pstyle("background-blacken").value,N=E.pstyle("border-width").pfValue,$=E.pstyle("background-opacity").value*l,x=E.pstyle("border-color").value,F=E.pstyle("border-style").value,z=E.pstyle("border-join").value,G=E.pstyle("border-cap").value,I=E.pstyle("border-position").value,U=E.pstyle("border-dash-pattern").pfValue,q=E.pstyle("border-dash-offset").pfValue,j=E.pstyle("border-opacity").value*l,R=E.pstyle("outline-width").pfValue,b=E.pstyle("outline-color").value,Y=E.pstyle("outline-style").value,W=E.pstyle("outline-opacity").value*l,M=E.pstyle("outline-offset").value,D=E.pstyle("corner-radius").value,r=("auto"!==D&&(D=E.pstyle("corner-radius").pfValue),mt(function(){C.eleFillStyle(T,E,0<arguments.length&&void 0!==arguments[0]?arguments[0]:$)},"setupShapeColor")),H=mt(function(){C.colorStrokeStyle(T,x[0],x[1],x[2],0<arguments.length&&void 0!==arguments[0]?arguments[0]:j)},"setupBorderColor"),V=mt(function(){C.colorStrokeStyle(T,b[0],b[1],b[2],0<arguments.length&&void 0!==arguments[0]?arguments[0]:W)},"setupOutlineColor"),X=mt(function(e,t,r,n){var i,a=C.nodePathCache=C.nodePathCache||[],n=Hte("polygon"===r?r+","+n.join(","):r,""+t,""+e,""+D),t=!1;return null!=(r=a[n])?(t=!0,o.pathCache=i=r):(i=new Path2D,a[n]=o.pathCache=i),{path:i,cacheHit:t}},"getPath"),w=E.pstyle("shape").strValue,k=E.pstyle("shape-polygon-points").pfValue,k=(S&&(T.translate(_.x,_.y),w=X(A,L,w,k),p=w.path,i=w.cacheHit),mt(function(){var e;i||(e=S?{x:0,y:0}:_,C.nodeShapes[C.getNodeShape(E)].draw(p||T,e.x,e.y,A,L,D,o)),S?T.fill(p):T.fill()},"drawShape")),w=mt(function(){for(var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:l,t=!(1<arguments.length&&void 0!==arguments[1])||arguments[1],r=s.backgrounding,n=0,i=0;i<h.length;i++){var a=E.cy().style().getIndexedStyle(E,"background-image-containment","value",i);t&&"over"===a||!t&&"inside"===a?n++:c[i]&&h[i].complete&&!h[i].error&&(n++,C.drawInscribedImage(T,h[i],E,i,e))}s.backgrounding=n!==P,r!==s.backgrounding&&E.updateStyle(!1)},"drawImages"),K=mt(function(){var e=0<arguments.length&&void 0!==arguments[0]&&arguments[0],t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:l;C.hasPie(E)&&(C.drawPie(T,E,t),e)&&(S||C.nodeShapes[C.getNodeShape(E)].draw(T,_.x,_.y,A,L,D,o))},"drawPie"),Z=mt(function(){var e=0<arguments.length&&void 0!==arguments[0]&&arguments[0],t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:l;C.hasStripe(E)&&(T.save(),S?T.clip(o.pathCache):(C.nodeShapes[C.getNodeShape(E)].draw(T,_.x,_.y,A,L,D,o),T.clip()),C.drawStripe(T,E,t),T.restore(),e)&&(S||C.nodeShapes[C.getNodeShape(E)].draw(T,_.x,_.y,A,L,D,o))},"drawStripe"),Q=mt(function(){var e=0<v?0:255;0!==v&&(C.colorFillStyle(T,e,e,e,(0<v?v:-v)*(0<arguments.length&&void 0!==arguments[0]?arguments[0]:l)),S?T.fill(p):T.fill())},"darken"),J=mt(function(){if(0<N){if(T.lineWidth=N,T.lineCap=G,T.lineJoin=z,T.setLineDash)switch(F){case"dotted":T.setLineDash([1,1]);break;case"dashed":T.setLineDash(U),T.lineDashOffset=q;break;case"solid":case"double":T.setLineDash([])}var e;"center"!==I?(T.save(),T.lineWidth*=2,"inside"===I?S?T.clip(p):T.clip():((e=new Path2D).rect(-A/2-N,-L/2-N,A+2*N,L+2*N),e.addPath(p),T.clip(e,"evenodd")),S?T.stroke(p):T.stroke(),T.restore()):S?T.stroke(p):T.stroke(),"double"===F&&(T.lineWidth=N/3,e=T.globalCompositeOperation,T.globalCompositeOperation="destination-out",S?T.stroke(p):T.stroke(),T.globalCompositeOperation=e),T.setLineDash&&T.setLineDash([])}},"drawBorder"),ee=mt(function(){if(0<R){if(T.lineWidth=R,T.lineCap="butt",T.setLineDash)switch(Y){case"dotted":T.setLineDash([1,1]);break;case"dashed":T.setLineDash([4,2]);break;case"solid":case"double":T.setLineDash([])}var e,t=_,r=(S&&(t={x:0,y:0}),C.getNodeShape(E)),n="inside"===I?0:N,i=("outside"===I&&(n*=2),(A+n+(R+M))/A),a=(L+n+(R+M))/L,s=A*i,o=L*a,l=C.nodeShapes[r].points;if(S&&(e=X(s,o,r,l).path),"ellipse"===r)C.drawEllipsePath(e||T,t.x,t.y,s,o);else if(["round-diamond","round-heptagon","round-hexagon","round-octagon","round-pentagon","round-polygon","round-triangle","round-tag"].includes(r)){var c=0,h=0,u=0;"round-diamond"===r?c=1.4*(n+M+R):"round-heptagon"===r?(c=1.075*(n+M+R),u=-(n/2+M+R)/35):"round-hexagon"===r?c=1.12*(n+M+R):"round-pentagon"===r?(c=1.13*(n+M+R),u=-(n/2+M+R)/15):"round-tag"===r?(c=1.12*(n+M+R),h=.07*(n/2+R+M)):"round-triangle"===r&&(c=(n+M+R)*(Math.PI/2),u=-(n+M/2+R)/Math.PI),0!==c&&(s=A*(i=(A+c)/A),["round-hexagon","round-tag"].includes(r)||(o=L*(a=(L+c)/L)));for(var d=s/2,p=o/2,g=(D="auto"===D?Bne(s,o):D)+(n+R+M)/2,f=new Array(l.length/2),m=new Array(l.length/2),y=0;y<l.length/2;y++)f[y]={x:t.x+h+d*l[2*y],y:t.y+u+p*l[2*y+1]};for(var v,x,b=f.length,w=f[b-1],k=0;k<b;k++)v=f[k%b],x=f[(k+1)%b],m[k]=hJ(w,v,x,g),w=v;C.drawRoundPolygonPath(e||T,t.x+h,t.y+u,A*i,L*a,l,m)}else["roundrectangle","round-rectangle"].includes(r)?(D="auto"===D?Pne(s,o):D,C.drawRoundRectanglePath(e||T,t.x,t.y,s,o,D+(n+R+M)/2)):["cutrectangle","cut-rectangle"].includes(r)?(D="auto"===D?$ne():D,C.drawCutRectanglePath(e||T,t.x,t.y,s,o,null,D+(n+R+M)/4)):["bottomroundrectangle","bottom-round-rectangle"].includes(r)?(D="auto"===D?Pne(s,o):D,C.drawBottomRoundRectanglePath(e||T,t.x,t.y,s,o,D+(n+R+M)/2)):"barrel"===r?C.drawBarrelPath(e||T,t.x,t.y,s,o):(l=r.startsWith("polygon")||["rhomboid","right-rhomboid","round-tag","tag","vee"].includes(r)?kne(Tne(l,(n+R+M)/A)):kne(Tne(l,-(n+R+M)/A)),C.drawPolygonPath(e||T,t.x,t.y,A,L,l));S?T.stroke(e):T.stroke(),"double"===Y&&(T.lineWidth=n/3,c=T.globalCompositeOperation,T.globalCompositeOperation="destination-out",S?T.stroke(e):T.stroke(),T.globalCompositeOperation=c),T.setLineDash&&T.setLineDash([])}},"drawOutline"),te=mt(function(){t&&C.drawNodeOverlay(T,E,_,A,L)},"drawOverlay"),re=mt(function(){t&&C.drawNodeUnderlay(T,E,_,A,L)},"drawUnderlay"),ne=mt(function(){C.drawElementText(T,E,null,O)},"drawText");"yes"===E.pstyle("ghost").value&&(g=E.pstyle("ghost-offset-x").pfValue,f=E.pstyle("ghost-offset-y").pfValue,y=(m=E.pstyle("ghost-opacity").value)*l,T.translate(g,f),V(),ee(),r(m*$),k(),w(y,!0),H(m*j),J(),K(0!==v||0!==N),Z(0!==v||0!==N),w(y,!1),Q(y),T.translate(-g,-f)),S&&T.translate(-_.x,-_.y),re(),S&&T.translate(_.x,_.y),V(),ee(),r(),k(),w(l,!0),H(),J(),K(0!==v||0!==N),Z(0!==v||0!==N),w(l,!1),Q(),S&&T.translate(-_.x,-_.y),ne(),te(),e&&T.translate(n.x1,n.y1)}}},Pce=mt(function(u){if(["overlay","underlay"].includes(u))return function(e,t,r,n,i){var a,s,o,l,c,h;t.visible()&&(a=t.pstyle("".concat(u,"-padding")).pfValue,s=t.pstyle("".concat(u,"-opacity")).value,o=t.pstyle("".concat(u,"-color")).value,l=t.pstyle("".concat(u,"-shape")).value,c=t.pstyle("".concat(u,"-corner-radius")).value,0<s)&&(r=r||t.position(),null!=n&&null!=i||(h=t.padding(),n=t.width()+2*h,i=t.height()+2*h),this.colorFillStyle(e,o[0],o[1],o[2],s),this.nodeShapes[l].draw(e,r.x,r.y,n+2*a,i+2*a,c),e.fill())};throw new Error("Invalid state")},"drawNodeOverlayUnderlay"),Oce.drawNodeOverlay=Pce("overlay"),Oce.drawNodeUnderlay=Pce("underlay"),Oce.hasPie=function(e){return(e=e[0])._private.hasPie},Oce.hasStripe=function(e){return(e=e[0])._private.hasStripe},Oce.drawPie=function(e,t,r,n){t=t[0],n=n||t.position();var i,a=t.cy().style(),s=t.pstyle("pie-size"),o=t.pstyle("pie-hole"),l=t.pstyle("pie-start-angle").pfValue,c=n.x,h=n.y,n=t.width(),u=t.height(),d=Math.min(n,u)/2,p=0;if(this.usePaths()&&(h=c=0),"%"===s.units?d*=s.pfValue:void 0!==s.pfValue&&(d=s.pfValue/2),"%"===o.units?i=d*o.pfValue:void 0!==o.pfValue&&(i=o.pfValue/2),!(d<=i))for(var g=1;g<=a.pieBackgroundN;g++){var f=t.pstyle("pie-"+g+"-background-size").value,m=t.pstyle("pie-"+g+"-background-color").value,y=t.pstyle("pie-"+g+"-background-opacity").value*r,v=f/100,x=(1<v+p&&(v=1-p),1.5*Math.PI+2*Math.PI*p),b=(x+=l)+2*Math.PI*v;0===f||1<=p||1<p+v||(0===i?(e.beginPath(),e.moveTo(c,h),e.arc(c,h,d,x,b)):(e.beginPath(),e.arc(c,h,d,x,b),e.arc(c,h,i,b,x,!0)),e.closePath(),this.colorFillStyle(e,m[0],m[1],m[2],y),e.fill(),p+=v)}},Oce.drawStripe=function(e,t,r,n){t=t[0],n=n||t.position();var i=t.cy().style(),a=n.x,s=n.y,n=t.width(),o=t.height(),l=0,c=this.usePaths(),h=(e.save(),t.pstyle("stripe-direction").value),u=t.pstyle("stripe-size");switch(h){case"vertical":break;case"righward":e.rotate(-Math.PI/2)}var d=n,p=o;"%"===u.units?(d*=u.pfValue,p*=u.pfValue):void 0!==u.pfValue&&(d=u.pfValue,p=u.pfValue),c&&(s=a=0),s-=d/2,a-=p/2;for(var g=1;g<=i.stripeBackgroundN;g++){var f=t.pstyle("stripe-"+g+"-background-size").value,m=t.pstyle("stripe-"+g+"-background-color").value,y=t.pstyle("stripe-"+g+"-background-opacity").value*r,v=f/100;1<v+l&&(v=1-l),0===f||1<=l||1<l+v||(e.beginPath(),e.rect(a,s+p*l,d,p*v),e.closePath(),this.colorFillStyle(e,m[0],m[1],m[2],y),e.fill(),l+=v)}e.restore()},Bce={getPixelRatio:function(){var e,t=this.data.contexts[0];return null!=this.forcedPixelRatio?this.forcedPixelRatio:(e=this.cy.window(),t=t.backingStorePixelRatio||t.webkitBackingStorePixelRatio||t.mozBackingStorePixelRatio||t.msBackingStorePixelRatio||t.oBackingStorePixelRatio||t.backingStorePixelRatio||1,(e.devicePixelRatio||1)/t)},paintCache:function(e){for(var t,r=this.paintCaches=this.paintCaches||[],n=!0,i=0;i<r.length;i++)if((t=r[i]).context===e){n=!1;break}return n&&r.push(t={context:e}),t},createGradientStyleFor:function(e,t,r,n,i){var a=this.usePaths(),s=r.pstyle(t+"-gradient-stop-colors").value,o=r.pstyle(t+"-gradient-stop-positions").pfValue;if("radial-gradient"===n)n=r.isEdge()?(t=r.sourceEndpoint(),n=r.targetEndpoint(),l=r.midpoint(),t=Wre(t,l),Wre(n,l)):(l=a?{x:0,y:0}:r.position(),t=r.paddedWidth(),r.paddedHeight()),c=e.createRadialGradient(l.x,l.y,0,l.x,l.y,Math.max(t,n));else if(r.isEdge())var l=r.sourceEndpoint(),t=r.targetEndpoint(),c=e.createLinearGradient(l.x,l.y,t.x,t.y);else{var h=a?{x:0,y:0}:r.position(),u=r.paddedWidth()/2,d=r.paddedHeight()/2;switch(r.pstyle("background-gradient-direction").value){case"to-bottom":c=e.createLinearGradient(h.x,h.y-d,h.x,h.y+d);break;case"to-top":c=e.createLinearGradient(h.x,h.y+d,h.x,h.y-d);break;case"to-left":c=e.createLinearGradient(h.x+u,h.y,h.x-u,h.y);break;case"to-right":c=e.createLinearGradient(h.x-u,h.y,h.x+u,h.y);break;case"to-bottom-right":case"to-right-bottom":c=e.createLinearGradient(h.x-u,h.y-d,h.x+u,h.y+d);break;case"to-top-right":case"to-right-top":c=e.createLinearGradient(h.x-u,h.y+d,h.x+u,h.y-d);break;case"to-bottom-left":case"to-left-bottom":c=e.createLinearGradient(h.x+u,h.y-d,h.x-u,h.y+d);break;case"to-top-left":case"to-left-top":c=e.createLinearGradient(h.x+u,h.y+d,h.x-u,h.y-d)}}if(!c)return null;for(var p=o.length===s.length,g=s.length,f=0;f<g;f++)c.addColorStop(p?o[f]:f/(g-1),"rgba("+s[f][0]+","+s[f][1]+","+s[f][2]+","+i+")");return c},gradientFillStyle:function(e,t,r,n){if(!(t=this.createGradientStyleFor(e,"background",t,r,n)))return null;e.fillStyle=t},colorFillStyle:function(e,t,r,n,i){e.fillStyle="rgba("+t+","+r+","+n+","+i+")"},eleFillStyle:function(e,t,r){var n=t.pstyle("background-fill").value;"linear-gradient"===n||"radial-gradient"===n?this.gradientFillStyle(e,t,n,r):(n=t.pstyle("background-color").value,this.colorFillStyle(e,n[0],n[1],n[2],r))},gradientStrokeStyle:function(e,t,r,n){if(!(t=this.createGradientStyleFor(e,"line",t,r,n)))return null;e.strokeStyle=t},colorStrokeStyle:function(e,t,r,n,i){e.strokeStyle="rgba("+t+","+r+","+n+","+i+")"},eleStrokeStyle:function(e,t,r){var n=t.pstyle("line-fill").value;"linear-gradient"===n||"radial-gradient"===n?this.gradientStrokeStyle(e,t,n,r):(n=t.pstyle("line-color").value,this.colorStrokeStyle(e,n[0],n[1],n[2],r))},matchCanvasSize:function(e){var t,r=this,n=r.data,i=(s=r.findContainerClientCoords())[2],a=s[3],s=r.getPixelRatio(),o=r.motionBlurPxRatio,l=i*(s=e!==r.data.bufferCanvases[r.MOTIONBLUR_BUFFER_NODE]&&e!==r.data.bufferCanvases[r.MOTIONBLUR_BUFFER_DRAG]?s:o),c=a*s;if(l!==r.canvasWidth||c!==r.canvasHeight){r.fontCaches=null,(e=n.canvasContainer).style.width=i+"px",e.style.height=a+"px";for(var h=0;h<r.CANVAS_LAYERS;h++)(t=n.canvases[h]).width=l,t.height=c,t.style.width=i+"px",t.style.height=a+"px";for(h=0;h<r.BUFFER_COUNT;h++)(t=n.bufferCanvases[h]).width=l,t.height=c,t.style.width=i+"px",t.style.height=a+"px";s<=(r.textureMult=1)&&(t=n.bufferCanvases[r.TEXTURE_BUFFER],r.textureMult=2,t.width=l*r.textureMult,t.height=c*r.textureMult),r.canvasWidth=l,r.canvasHeight=c,r.pixelRatio=s}},renderTo:function(e,t,r,n){this.render({forcedContext:e,forcedZoom:t,forcedPan:r,drawAllLayers:!0,forcedPxRatio:n})},clearCanvas:function(){var t=this,e=t.data;function r(e){e.clearRect(0,0,t.canvasWidth,t.canvasHeight)}mt(r,"clear"),r(e.contexts[t.NODE]),r(e.contexts[t.DRAG])},render:function(e){var s=this,t=(e=e||dre(),s.cy),o=e.forcedContext,l=e.drawAllLayers,r=e.drawOnlyNodeLayer,c=e.forcedZoom,h=e.forcedPan,n=void 0===e.forcedPxRatio?this.getPixelRatio():e.forcedPxRatio,u=s.data,i=u.canvasNeedsRedraw,a=s.textureOnViewport&&!o&&(s.pinching||s.hoverData.dragging||s.swipePanning||s.data.wheelZooming),d=(void 0!==e.motionBlur?e:s).motionBlur,p=s.motionBlurPxRatio,g=t.hasCompoundNodes(),f=s.hoverData.draggingEles,m=!(!s.hoverData.selecting&&!s.touchData.selecting),y=d=d&&!o&&s.motionBlurEnabled&&!m,m=(o||(s.prevPxRatio!==n&&(s.invalidateContainerClientCoordsCache(),s.matchCanvasSize(s.container),s.redrawHint("eles",!0),s.redrawHint("drag",!0)),s.prevPxRatio=n),!o&&s.motionBlurTimeout&&clearTimeout(s.motionBlurTimeout),d&&(null==s.mbFrames&&(s.mbFrames=0),s.mbFrames++,s.mbFrames<3&&(y=!1),s.mbFrames>s.minMbLowQualFrames)&&(s.motionBlurPxRatio=s.mbPxRBlurry),s.clearingMotionBlur&&(s.motionBlurPxRatio=1),s.textureDrawLastFrame&&!a&&(i[s.NODE]=!0,i[s.SELECT_BOX]=!0),t.style()),v=t.zoom(),x=void 0!==c?c:v,b=t.pan(),w={x:b.x,y:b.y},k={zoom:v,pan:{x:b.x,y:b.y}},T=(void 0===(T=s.prevViewport)||k.zoom!==T.zoom||k.pan.x!==T.pan.x||k.pan.y!==T.pan.y||f&&!g||(s.motionBlurPxRatio=1),x*=n,(w=h||w).x*=n,w.y*=n,s.getCachedZSortedEles());function E(e,t,r,n,i){var a=e.globalCompositeOperation;e.globalCompositeOperation="destination-out",s.colorFillStyle(e,255,255,255,s.motionBlurTransparency),e.fillRect(t,r,n,i),e.globalCompositeOperation=a}function C(e,t){var r,n,i,a=s.clearingMotionBlur||e!==u.bufferContexts[s.MOTIONBLUR_BUFFER_NODE]&&e!==u.bufferContexts[s.MOTIONBLUR_BUFFER_DRAG]?(r=w,n=x,i=s.canvasWidth,s.canvasHeight):(r={x:b.x*p,y:b.y*p},n=v*p,i=s.canvasWidth*p,s.canvasHeight*p);e.setTransform(1,0,0,1,0,0),"motionBlur"===t?E(e,0,0,i,a):o||void 0!==t&&!t||e.clearRect(0,0,i,a),l||(e.translate(r.x,r.y),e.scale(n,n)),h&&e.translate(h.x,h.y),c&&e.scale(c,c)}mt(E,"mbclear"),mt(C,"setContextTransform"),a||(s.textureDrawLastFrame=!1),a?(s.textureDrawLastFrame=!0,s.textureCache||(s.textureCache={},s.textureCache.bb=t.mutableElements().boundingBox(),s.textureCache.texture=s.data.bufferCanvases[s.TEXTURE_BUFFER],(f=s.data.bufferContexts[s.TEXTURE_BUFFER]).setTransform(1,0,0,1,0,0),f.clearRect(0,0,s.canvasWidth*s.textureMult,s.canvasHeight*s.textureMult),s.render({forcedContext:f,drawOnlyNodeLayer:!0,forcedPxRatio:n*s.textureMult}),(k=s.textureCache.viewport={zoom:t.zoom(),pan:t.pan(),width:s.canvasWidth,height:s.canvasHeight}).mpan={x:(0-k.pan.x)/k.zoom,y:(0-k.pan.y)/k.zoom}),i[s.DRAG]=!1,i[s.NODE]=!1,_=u.contexts[s.NODE],g=s.textureCache.texture,k=s.textureCache.viewport,_.setTransform(1,0,0,1,0,0),d?E(_,0,0,k.width,k.height):_.clearRect(0,0,k.width,k.height),f=m.core("outside-texture-bg-color").value,m=m.core("outside-texture-bg-opacity").value,s.colorFillStyle(_,f[0],f[1],f[2],m),_.fillRect(0,0,k.width,k.height),v=t.zoom(),C(_,!1),_.clearRect(k.mpan.x,k.mpan.y,k.width/k.zoom/n,k.height/k.zoom/n),_.drawImage(g,k.mpan.x,k.mpan.y,k.width/k.zoom/n,k.height/k.zoom/n)):s.textureOnViewport&&!o&&(s.textureCache=null);var _,S,f=t.extent(),m=s.pinching||s.hoverData.dragging||s.swipePanning||s.data.wheelZooming||s.hoverData.draggingEles||s.cy.animated(),g=s.hideEdgesOnViewport&&m;(m=[])[s.NODE]=!i[s.NODE]&&d&&!s.clearedForMotionBlur[s.NODE]||s.clearingMotionBlur,m[s.NODE]&&(s.clearedForMotionBlur[s.NODE]=!0),m[s.DRAG]=!i[s.DRAG]&&d&&!s.clearedForMotionBlur[s.DRAG]||s.clearingMotionBlur,m[s.DRAG]&&(s.clearedForMotionBlur[s.DRAG]=!0),(i[s.NODE]||l||r||m[s.NODE])&&(S=d&&!m[s.NODE]&&1!==p,C(_=o||(S?s.data.bufferContexts[s.MOTIONBLUR_BUFFER_NODE]:u.contexts[s.NODE]),d&&!S?"motionBlur":void 0),g?s.drawCachedNodes(_,T.nondrag,n,f):s.drawLayeredElements(_,T.nondrag,n,f),s.debug&&s.drawDebugPoints(_,T.nondrag),l||d||(i[s.NODE]=!1)),!r&&(i[s.DRAG]||l||m[s.DRAG])&&(S=d&&!m[s.DRAG]&&1!==p,C(_=o||(S?s.data.bufferContexts[s.MOTIONBLUR_BUFFER_DRAG]:u.contexts[s.DRAG]),d&&!S?"motionBlur":void 0),g?s.drawCachedNodes(_,T.drag,n,f):s.drawCachedElements(_,T.drag,n,f),s.debug&&s.drawDebugPoints(_,T.drag),l||d||(i[s.DRAG]=!1)),this.drawSelectionRectangle(e,C),d&&1!==p&&(r=u.contexts[s.NODE],S=s.data.bufferCanvases[s.MOTIONBLUR_BUFFER_NODE],g=u.contexts[s.DRAG],n=s.data.bufferCanvases[s.MOTIONBLUR_BUFFER_DRAG],f=mt(function(e,t,r){e.setTransform(1,0,0,1,0,0),r||!y?e.clearRect(0,0,s.canvasWidth,s.canvasHeight):E(e,0,0,s.canvasWidth,s.canvasHeight),r=p,e.drawImage(t,0,0,s.canvasWidth*r,s.canvasHeight*r,0,0,s.canvasWidth,s.canvasHeight)},"drawMotionBlur"),(i[s.NODE]||m[s.NODE])&&(f(r,S,m[s.NODE]),i[s.NODE]=!1),i[s.DRAG]||m[s.DRAG])&&(f(g,n,m[s.DRAG]),i[s.DRAG]=!1),s.prevViewport=k,s.clearingMotionBlur&&(s.clearingMotionBlur=!1,s.motionBlurCleared=!0,s.motionBlur=!0),d&&(s.motionBlurTimeout=setTimeout(function(){s.motionBlurTimeout=null,s.clearedForMotionBlur[s.NODE]=!1,s.clearedForMotionBlur[s.DRAG]=!1,s.motionBlur=!1,s.clearingMotionBlur=!a,s.mbFrames=0,i[s.NODE]=!0,i[s.DRAG]=!0,s.redraw()},100)),o||t.emit("render")},drawSelectionRectangle:function(e,t){var r,n=this,i=n.cy,a=n.data,i=i.style(),s=e.drawOnlyNodeLayer,o=e.drawAllLayers,l=a.canvasNeedsRedraw;(n.showFps||!s&&l[n.SELECT_BOX]&&!o)&&(t(s=e.forcedContext||a.contexts[n.SELECT_BOX]),1==n.selection[4]&&(n.hoverData.selecting||n.touchData.selecting)&&(r=n.cy.zoom(),t=i.core("selection-box-border-width").value/r,s.lineWidth=t,s.fillStyle="rgba("+i.core("selection-box-color").value[0]+","+i.core("selection-box-color").value[1]+","+i.core("selection-box-color").value[2]+","+i.core("selection-box-opacity").value+")",s.fillRect(n.selection[0],n.selection[1],n.selection[2]-n.selection[0],n.selection[3]-n.selection[1]),0<t)&&(s.strokeStyle="rgba("+i.core("selection-box-border-color").value[0]+","+i.core("selection-box-border-color").value[1]+","+i.core("selection-box-border-color").value[2]+","+i.core("selection-box-opacity").value+")",s.strokeRect(n.selection[0],n.selection[1],n.selection[2]-n.selection[0],n.selection[3]-n.selection[1])),a.bgActivePosistion&&!n.hoverData.selecting&&(r=n.cy.zoom(),e=a.bgActivePosistion,s.fillStyle="rgba("+i.core("active-bg-color").value[0]+","+i.core("active-bg-color").value[1]+","+i.core("active-bg-color").value[2]+","+i.core("active-bg-opacity").value+")",s.beginPath(),s.arc(e.x,e.y,i.core("active-bg-size").pfValue/r,0,2*Math.PI),s.fill()),t=n.lastRedrawTime,n.showFps&&t&&(e="1 frame = "+(t=Math.round(t))+" ms = "+(a=Math.round(1e3/t))+" fps",s.setTransform(1,0,0,1,0,0),s.fillStyle="rgba(255, 0, 0, 0.75)",s.strokeStyle="rgba(255, 0, 0, 0.75)",s.font="30px Arial",$ce||(i=s.measureText(e),$ce=i.actualBoundingBoxAscent),s.fillText(e,0,$ce),s.strokeRect(0,$ce+10,250,20),s.fillRect(0,$ce+10,250*Math.min(a/60,1),20)),o||(l[n.SELECT_BOX]=!1))}},mt(bJ,"compileShader"),mt(wJ,"createProgram"),mt(kJ,"createTextureCanvas"),mt(TJ,"getEffectivePanZoom"),mt(EJ,"getEffectiveZoom"),mt(CJ,"modelToRenderedPosition"),mt(_J,"isSimpleShape"),mt(SJ,"arrayEqual"),mt(AJ,"toWebGLColor"),mt(LJ,"indexToVec4"),mt(NJ,"vec4ToIndex"),mt(IJ,"createTexture"),mt(RJ,"getTypeInfo"),mt(MJ,"createTypedArray"),mt(DJ,"createTypedArrayView"),mt(OJ,"createBufferStaticDraw"),mt(PJ,"createBufferDynamicDraw"),mt(BJ,"create3x3MatrixBufferDynamicDraw"),mt($J,"createPickingFrameBuffer"),Fce=typeof Float32Array<"u"?Float32Array:Array,Math.hypot||(Math.hypot=function(){for(var e=0,t=arguments.length;t--;)e+=arguments[t]*arguments[t];return Math.sqrt(e)}),mt(FJ,"create"),mt(zJ,"identity"),mt(GJ,"multiply"),mt(UJ,"translate"),mt(qJ,"rotate"),mt(jJ,"scale"),mt(YJ,"projection"),mt(R,"Atlas"),zce=VK(R,[{key:"lock",value:mt(function(){this.locked=!0},"lock")},{key:"getKeys",value:mt(function(){return new Set(this.keyToLocation.keys())},"getKeys")},{key:"getScale",value:mt(function(e){var t=e.w,e=e.h,r=this.texHeight,n=this.texSize,i=t*(r/=e),a=e*r;return n<i&&(i=t*(r=n/t),a=e*r),{scale:r,texW:i,texH:a}},"getScale")},{key:"draw",value:mt(function(e,n,i){var l=this;if(this.locked)throw new Error("can't draw, atlas is locked");var c=this.texSize,t=this.texRows,h=this.texHeight,a=(r=this.getScale(n)).scale,u=r.texW,d=r.texH,p=mt(function(e,t){var r;i&&t&&(t=t.context,r=e.x,e=h*e.row,t.save(),t.translate(r,e),t.scale(a,a),i(t,n),t.restore())},"drawAt"),g=[null,null],r=mt(function(){p(l.freePointer,l.canvas),g[0]={x:l.freePointer.x,y:l.freePointer.row*h,w:u,h:d},g[1]={x:l.freePointer.x+u,y:l.freePointer.row*h,w:0,h:d},l.freePointer.x+=u,l.freePointer.x==c&&(l.freePointer.x=0,l.freePointer.row++)},"drawNormal"),s=mt(function(){var e=l.scratch,t=l.canvas,r=(e.clear(),p({x:0,row:0},e),c-l.freePointer.x),n=u-r,i=h,a=l.freePointer.x,s=l.freePointer.row*h,o=r;t.context.drawImage(e,0,0,o,i,a,s,o,i),g[0]={x:a,y:s,w:o,h:d},a=(l.freePointer.row+1)*h,s=n,t&&t.context.drawImage(e,r,0,s,i,0,a,s,i),g[1]={x:0,y:a,w:s,h:d},l.freePointer.x=n,l.freePointer.row++},"drawWrapped"),o=mt(function(){l.freePointer.x=0,l.freePointer.row++},"moveToStartOfNextRow");if(this.freePointer.x+u<=c)r();else{if(this.freePointer.row>=t-1)return!1;(this.freePointer.x!==c&&this.enableWrapping?s:(o(),r))()}return this.keyToLocation.set(e,g),this.needsBuffer=!0,g},"draw")},{key:"getOffsets",value:mt(function(e){return this.keyToLocation.get(e)},"getOffsets")},{key:"isEmpty",value:mt(function(){return 0===this.freePointer.x&&0===this.freePointer.row},"isEmpty")},{key:"canFit",value:mt(function(e){var t,r;return!this.locked&&(t=this.texSize,r=this.texRows,e=this.getScale(e).texW,!(this.freePointer.x+e>t)||this.freePointer.row<r-1)},"canFit")},{key:"bufferIfNeeded",value:mt(function(e){this.texture||(this.texture=IJ(e,this.debugID)),this.needsBuffer&&(this.texture.buffer(this.canvas),this.needsBuffer=!1,this.locked)&&(this.canvas=null,this.scratch=null)},"bufferIfNeeded")},{key:"dispose",value:mt(function(){this.texture&&(this.texture.deleteTexture(),this.texture=null),this.canvas=null,this.scratch=null,this.locked=!0},"dispose")}]),mt(I,"AtlasCollection"),Gce=VK(I,[{key:"getKeys",value:mt(function(){return new Set(this.styleKeyToAtlas.keys())},"getKeys")},{key:"_createAtlas",value:mt(function(){var e=this.r,t=this.texSize,r=this.texRows,n=this.createTextureCanvas;return new zce(e,t,r,n)},"_createAtlas")},{key:"_getScratchCanvas",value:mt(function(){var e,t,r,n;return this.scratch||(e=this.r,t=this.texSize,n=this.texRows,r=this.createTextureCanvas,n=Math.floor(t/n),this.scratch=r(e,t,n,"scratch")),this.scratch},"_getScratchCanvas")},{key:"draw",value:mt(function(e,t,r){var n=this.styleKeyToAtlas.get(e);return n||((n=this.atlases[this.atlases.length-1])&&n.canFit(t)||(n&&n.lock(),n=this._createAtlas(),this.atlases.push(n)),n.draw(e,t,r),this.styleKeyToAtlas.set(e,n)),n},"draw")},{key:"getAtlas",value:mt(function(e){return this.styleKeyToAtlas.get(e)},"getAtlas")},{key:"hasAtlas",value:mt(function(e){return this.styleKeyToAtlas.has(e)},"hasAtlas")},{key:"markKeyForGC",value:mt(function(e){this.markedKeys.add(e)},"markKeyForGC")},{key:"gc",value:mt(function(){var c=this,h=this.markedKeys;if(0===h.size)console.log("nothing to garbage collect");else{var u,d=[],p=new Map,g=null,e=XK(this.atlases);try{var t=mt(function(){var t=u.value,e=t.getKeys(),r=WJ(h,e);if(0===r.size)return d.push(t),e.forEach(function(e){return p.set(e,t)}),1;g||(g=c._createAtlas(),d.push(g));var n,i=XK(e);try{for(i.s();!(n=i.n()).done;){var a,s,o,l=n.value;r.has(l)||(s=(a=tZ(t.getOffsets(l),2))[0],o=a[1],g.canFit({w:s.w+o.w,h:s.h})||(g.lock(),g=c._createAtlas(),d.push(g)),t.canvas&&(c._copyTextureToNewAtlas(l,t,g),p.set(l,g)))}}catch(e){i.e(e)}finally{i.f()}t.dispose()},"_loop");for(e.s();!(u=e.n()).done;)t()}catch(t){e.e(t)}finally{e.f()}this.atlases=d,this.styleKeyToAtlas=p,this.markedKeys=new Set}},"gc")},{key:"_copyTextureToNewAtlas",value:mt(function(e,t,r){var n,i,a,s=tZ(t.getOffsets(e),2),o=s[0];0===(s=s[1]).w?r.draw(e,o,function(e){e.drawImage(t.canvas,o.x,o.y,o.w,o.h,0,0,o.w,o.h)}):((n=this._getScratchCanvas()).clear(),n.context.drawImage(t.canvas,o.x,o.y,o.w,o.h,0,0,o.w,o.h),n.context.drawImage(t.canvas,s.x,s.y,s.w,s.h,o.w,0,s.w,s.h),i=o.w+s.w,a=o.h,r.draw(e,{w:i,h:a},function(e){e.drawImage(n,0,0,i,a,0,0,i,a)}))},"_copyTextureToNewAtlas")},{key:"getCounts",value:mt(function(){return{keyCount:this.styleKeyToAtlas.size,atlasCount:new Set(this.styleKeyToAtlas.values()).size}},"getCounts")}]),mt(WJ,"intersection"),mt(O,"AtlasManager"),Uce=VK(O,[{key:"getAtlasSize",value:mt(function(){return this.atlasSize},"getAtlasSize")},{key:"addAtlasCollection",value:mt(function(e,t){var r=(n=this.globalOptions).webglTexSize,t=t.texRows,n=this._cacheScratchCanvas(n.createTextureCanvas),r=new Gce(this.r,r,t,n);this.collections.set(e,r)},"addAtlasCollection")},{key:"addRenderType",value:mt(function(e,t){var r=t.collection;if(!this.collections.has(r))throw new Error("invalid atlas collection name '".concat(r,"'"));r=this.collections.get(r),r=Xee({type:e,atlasCollection:r},t),this.renderTypes.set(e,r)},"addRenderType")},{key:"getRenderTypeOpts",value:mt(function(e){return this.renderTypes.get(e)},"getRenderTypeOpts")},{key:"getAtlasCollection",value:mt(function(e){return this.collections.get(e)},"getAtlasCollection")},{key:"_cacheScratchCanvas",value:mt(function(i){var a=-1,s=-1,o=null;return function(e,t,r,n){return n?o=o&&t==a&&r==s?o:i(e,a=t,s=r):i(e,t,r)}},"_cacheScratchCanvas")},{key:"_key",value:mt(function(e,t){return"".concat(e,"-").concat(t)},"_key")},{key:"invalidate",value:mt(function(e){var t,i=this,r=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},n=r.forceRedraw,a=void 0!==n&&n,s=void 0===(n=r.filterEle)?function(){return!0}:n,o=void 0===(n=r.filterType)?function(){return!0}:n,l=!1,c=!1,h=XK(e);try{for(h.s();!(t=h.n()).done;){var u=t.value;if(s(u)){var d,p=XK(this.renderTypes.values());try{var g=mt(function(){var t,e,r=d.value,n=r.type;o(n)&&(t=i.collections.get(r.collection),e=r.getKey(u),e=Array.isArray(e)?e:[e],a?(e.forEach(function(e){return t.markKeyForGC(e)}),c=!0):(r=r.getID?r.getID(u):u.id(),n=i._key(n,r),void 0===(r=i.typeAndIdToKey.get(n))||SJ(e,r)||(l=!0,i.typeAndIdToKey.delete(n),r.forEach(function(e){return t.markKeyForGC(e)}))))},"_loop2");for(p.s();!(d=p.n()).done;)g()}catch(e){p.e(e)}finally{p.f()}}}}catch(e){h.e(e)}finally{h.f()}return c&&(this.gc(),l=!1),l},"invalidate")},{key:"gc",value:mt(function(){var e,t=XK(this.collections.values());try{for(t.s();!(e=t.n()).done;)e.value.gc()}catch(e){t.e(e)}finally{t.f()}},"gc")},{key:"getOrCreateAtlas",value:mt(function(t,e,r,n){var i,a=this.renderTypes.get(e),s=this.collections.get(a.collection),o=!1,s=s.draw(n,r,function(e){a.drawClipped?(e.save(),e.beginPath(),e.rect(0,0,r.w,r.h),e.clip(),a.drawElement(e,t,r,!0,!0),e.restore()):a.drawElement(e,t,r,!0,!0),o=!0});return o&&(i=a.getID?a.getID(t):t.id(),e=this._key(e,i),this.typeAndIdToKey.has(e)?this.typeAndIdToKey.get(e).push(n):this.typeAndIdToKey.set(e,[n])),s},"getOrCreateAtlas")},{key:"getAtlasInfo",value:mt(function(i,a){var s=this,o=this.renderTypes.get(a),e=o.getKey(i);return(Array.isArray(e)?e:[e]).map(function(e){var t=o.getBoundingBox(i,e),r=s.getOrCreateAtlas(i,a,t,e),n=(e=tZ(r.getOffsets(e),2))[0];return{atlas:r,tex:n,tex1:n,tex2:e[1],bb:t}})},"getAtlasInfo")},{key:"getDebugInfo",value:mt(function(){var e,t=[],r=XK(this.collections);try{for(r.s();!(e=r.n()).done;){var n=tZ(e.value,2),i=n[0],a=n[1].getCounts(),s=a.keyCount;t.push({type:i,keyCount:s,atlasCount:a.atlasCount})}}catch(e){r.e(e)}finally{r.f()}return t},"getDebugInfo")}]),mt(D,"AtlasBatchManager"),qce=VK(D,[{key:"getMaxAtlasesPerBatch",value:mt(function(){return this.maxAtlasesPerBatch},"getMaxAtlasesPerBatch")},{key:"getAtlasSize",value:mt(function(){return this.atlasSize},"getAtlasSize")},{key:"getIndexArray",value:mt(function(){return Array.from({length:this.maxAtlasesPerBatch},function(e,t){return t})},"getIndexArray")},{key:"startBatch",value:mt(function(){this.batchAtlases=[]},"startBatch")},{key:"getAtlasCount",value:mt(function(){return this.batchAtlases.length},"getAtlasCount")},{key:"getAtlases",value:mt(function(){return this.batchAtlases},"getAtlases")},{key:"canAddToCurrentBatch",value:mt(function(e){return this.batchAtlases.length!==this.maxAtlasesPerBatch||this.batchAtlases.includes(e)},"canAddToCurrentBatch")},{key:"getAtlasIndexForBatch",value:mt(function(e){var t=this.batchAtlases.indexOf(e);if(t<0){if(this.batchAtlases.length===this.maxAtlasesPerBatch)throw new Error("cannot add more atlases to batch");this.batchAtlases.push(e),t=this.batchAtlases.length-1}return t},"getAtlasIndexForBatch")}]),jce={SCREEN:{name:"screen",screen:!0},PICKING:{name:"picking",picking:!0}},Yce={IGNORE:1,USE_BB:2},mt(M,"ElementDrawingWebGL"),Wce=VK(M,[{key:"addAtlasCollection",value:mt(function(e,t){this.atlasManager.addAtlasCollection(e,t)},"addAtlasCollection")},{key:"addTextureAtlasRenderType",value:mt(function(e,t){this.atlasManager.addRenderType(e,t)},"addTextureAtlasRenderType")},{key:"addSimpleShapeRenderType",value:mt(function(e,t){this.simpleShapeOptions.set(e,t)},"addSimpleShapeRenderType")},{key:"invalidate",value:mt(function(e){var t=(1<arguments.length&&void 0!==arguments[1]?arguments[1]:{}).type,r=this.atlasManager;return t?r.invalidate(e,{filterType:mt(function(e){return e===t},"filterType"),forceRedraw:!0}):r.invalidate(e)},"invalidate")},{key:"gc",value:mt(function(){this.atlasManager.gc()},"gc")},{key:"_createShaderProgram",value:mt(function(e){var t=this.gl,r=`#version 300 es + precision highp float; + + uniform mat3 uPanZoomMatrix; + uniform int uAtlasSize; + + // instanced + in vec2 aPosition; // a vertex from the unit square + + in mat3 aTransform; // used to transform verticies, eg into a bounding box + in int aVertType; // the type of thing we are rendering + + // the z-index that is output when using picking mode + in vec4 aIndex; + + // For textures + in int aAtlasId; // which shader unit/atlas to use + in vec4 aTex; // x/y/w/h of texture in atlas + + // for edges + in vec4 aPointAPointB; + in vec4 aPointCPointD; + in vec2 aLineWidth; // also used for node border width + + // simple shapes + in vec4 aCornerRadius; // for round-rectangle [top-right, bottom-right, top-left, bottom-left] + in vec4 aColor; // also used for edges + in vec4 aBorderColor; // aLineWidth is used for border width + + // output values passed to the fragment shader + out vec2 vTexCoord; + out vec4 vColor; + out vec2 vPosition; + // flat values are not interpolated + flat out int vAtlasId; + flat out int vVertType; + flat out vec2 vTopRight; + flat out vec2 vBotLeft; + flat out vec4 vCornerRadius; + flat out vec4 vBorderColor; + flat out vec2 vBorderWidth; + flat out vec4 vIndex; + + void main(void) { + int vid = gl_VertexID; + vec2 position = aPosition; // TODO make this a vec3, simplifies some code below + + if(aVertType == `.concat(0,`) { + float texX = aTex.x; // texture coordinates + float texY = aTex.y; + float texW = aTex.z; + float texH = aTex.w; + + if(vid == 1 || vid == 2 || vid == 4) { + texX += texW; + } + if(vid == 2 || vid == 4 || vid == 5) { + texY += texH; + } + + float d = float(uAtlasSize); + vTexCoord = vec2(texX / d, texY / d); // tex coords must be between 0 and 1 + + gl_Position = vec4(uPanZoomMatrix * aTransform * vec3(position, 1.0), 1.0); + } + else if(aVertType == `).concat(4," || aVertType == ").concat(7,` + || aVertType == `).concat(5," || aVertType == ").concat(6,`) { // simple shapes + + // the bounding box is needed by the fragment shader + vBotLeft = (aTransform * vec3(0, 0, 1)).xy; // flat + vTopRight = (aTransform * vec3(1, 1, 1)).xy; // flat + vPosition = (aTransform * vec3(position, 1)).xy; // will be interpolated + + // calculations are done in the fragment shader, just pass these along + vColor = aColor; + vCornerRadius = aCornerRadius; + vBorderColor = aBorderColor; + vBorderWidth = aLineWidth; + + gl_Position = vec4(uPanZoomMatrix * aTransform * vec3(position, 1.0), 1.0); + } + else if(aVertType == `).concat(1,`) { + vec2 source = aPointAPointB.xy; + vec2 target = aPointAPointB.zw; + + // adjust the geometry so that the line is centered on the edge + position.y = position.y - 0.5; + + // stretch the unit square into a long skinny rectangle + vec2 xBasis = target - source; + vec2 yBasis = normalize(vec2(-xBasis.y, xBasis.x)); + vec2 point = source + xBasis * position.x + yBasis * aLineWidth[0] * position.y; + + gl_Position = vec4(uPanZoomMatrix * vec3(point, 1.0), 1.0); + vColor = aColor; + } + else if(aVertType == `).concat(2,`) { + vec2 pointA = aPointAPointB.xy; + vec2 pointB = aPointAPointB.zw; + vec2 pointC = aPointCPointD.xy; + vec2 pointD = aPointCPointD.zw; + + // adjust the geometry so that the line is centered on the edge + position.y = position.y - 0.5; + + vec2 p0, p1, p2, pos; + if(position.x == 0.0) { // The left side of the unit square + p0 = pointA; + p1 = pointB; + p2 = pointC; + pos = position; + } else { // The right side of the unit square, use same approach but flip the geometry upside down + p0 = pointD; + p1 = pointC; + p2 = pointB; + pos = vec2(0.0, -position.y); + } + + vec2 p01 = p1 - p0; + vec2 p12 = p2 - p1; + vec2 p21 = p1 - p2; + + // Find the normal vector. + vec2 tangent = normalize(normalize(p12) + normalize(p01)); + vec2 normal = vec2(-tangent.y, tangent.x); + + // Find the vector perpendicular to p0 -> p1. + vec2 p01Norm = normalize(vec2(-p01.y, p01.x)); + + // Determine the bend direction. + float sigma = sign(dot(p01 + p21, normal)); + float width = aLineWidth[0]; + + if(sign(pos.y) == -sigma) { + // This is an intersecting vertex. Adjust the position so that there's no overlap. + vec2 point = 0.5 * width * normal * -sigma / dot(normal, p01Norm); + gl_Position = vec4(uPanZoomMatrix * vec3(p1 + point, 1.0), 1.0); + } else { + // This is a non-intersecting vertex. Treat it like a mitre join. + vec2 point = 0.5 * width * normal * sigma * dot(normal, p01Norm); + gl_Position = vec4(uPanZoomMatrix * vec3(p1 + point, 1.0), 1.0); + } + + vColor = aColor; + } + else if(aVertType == `).concat(3,` && vid < 3) { + // massage the first triangle into an edge arrow + if(vid == 0) + position = vec2(-0.15, -0.3); + if(vid == 1) + position = vec2( 0.0, 0.0); + if(vid == 2) + position = vec2( 0.15, -0.3); + + gl_Position = vec4(uPanZoomMatrix * aTransform * vec3(position, 1.0), 1.0); + vColor = aColor; + } + else { + gl_Position = vec4(2.0, 0.0, 0.0, 1.0); // discard vertex by putting it outside webgl clip space + } + + vAtlasId = aAtlasId; + vVertType = aVertType; + vIndex = aIndex; + } + `),n=this.batchManager.getIndexArray(),i=wJ(t,r,`#version 300 es + precision highp float; + + // declare texture unit for each texture atlas in the batch + `.concat(n.map(function(e){return"uniform sampler2D uTexture".concat(e,";")}).join(` + `),` + + uniform vec4 uBGColor; + uniform float uZoom; + + in vec2 vTexCoord; + in vec4 vColor; + in vec2 vPosition; // model coordinates + + flat in int vAtlasId; + flat in vec4 vIndex; + flat in int vVertType; + flat in vec2 vTopRight; + flat in vec2 vBotLeft; + flat in vec4 vCornerRadius; + flat in vec4 vBorderColor; + flat in vec2 vBorderWidth; + + out vec4 outColor; + + `).concat(` + float circleSD(vec2 p, float r) { + return distance(vec2(0), p) - r; // signed distance + } +`,` + `).concat(` + float rectangleSD(vec2 p, vec2 b) { + vec2 d = abs(p)-b; + return distance(vec2(0),max(d,0.0)) + min(max(d.x,d.y),0.0); + } +`,` + `).concat(` + float roundRectangleSD(vec2 p, vec2 b, vec4 cr) { + cr.xy = (p.x > 0.0) ? cr.xy : cr.zw; + cr.x = (p.y > 0.0) ? cr.x : cr.y; + vec2 q = abs(p) - b + cr.x; + return min(max(q.x, q.y), 0.0) + distance(vec2(0), max(q, 0.0)) - cr.x; + } +`,` + `).concat(` + float ellipseSD(vec2 p, vec2 ab) { + p = abs( p ); // symmetry + + // find root with Newton solver + vec2 q = ab*(p-ab); + float w = (q.x<q.y)? 1.570796327 : 0.0; + for( int i=0; i<5; i++ ) { + vec2 cs = vec2(cos(w),sin(w)); + vec2 u = ab*vec2( cs.x,cs.y); + vec2 v = ab*vec2(-cs.y,cs.x); + w = w + dot(p-u,v)/(dot(p-u,u)+dot(v,v)); + } + + // compute final point and distance + float d = length(p-ab*vec2(cos(w),sin(w))); + + // return signed distance + return (dot(p/ab,p/ab)>1.0) ? d : -d; + } +`,` + + vec4 blend(vec4 top, vec4 bot) { // blend colors with premultiplied alpha + return vec4( + top.rgb + (bot.rgb * (1.0 - top.a)), + top.a + (bot.a * (1.0 - top.a)) + ); + } + + vec4 distInterp(vec4 cA, vec4 cB, float d) { // interpolate color using Signed Distance + // scale to the zoom level so that borders don't look blurry when zoomed in + // note 1.5 is an aribitrary value chosen because it looks good + return mix(cA, cB, 1.0 - smoothstep(0.0, 1.5 / uZoom, abs(d))); + } + + void main(void) { + if(vVertType == `).concat(0,`) { + // look up the texel from the texture unit + `).concat(n.map(function(e){return"if(vAtlasId == ".concat(e,") outColor = texture(uTexture").concat(e,", vTexCoord);")}).join(` + else `),` + } + else if(vVertType == `).concat(3,`) { + // mimics how canvas renderer uses context.globalCompositeOperation = 'destination-out'; + outColor = blend(vColor, uBGColor); + outColor.a = 1.0; // make opaque, masks out line under arrow + } + else if(vVertType == `).concat(4,` && vBorderWidth == vec2(0.0)) { // simple rectangle with no border + outColor = vColor; // unit square is already transformed to the rectangle, nothing else needs to be done + } + else if(vVertType == `).concat(4," || vVertType == ").concat(7,` + || vVertType == `).concat(5," || vVertType == ").concat(6,`) { // use SDF + + float outerBorder = vBorderWidth[0]; + float innerBorder = vBorderWidth[1]; + float borderPadding = outerBorder * 2.0; + float w = vTopRight.x - vBotLeft.x - borderPadding; + float h = vTopRight.y - vBotLeft.y - borderPadding; + vec2 b = vec2(w/2.0, h/2.0); // half width, half height + vec2 p = vPosition - vec2(vTopRight.x - b[0] - outerBorder, vTopRight.y - b[1] - outerBorder); // translate to center + + float d; // signed distance + if(vVertType == `).concat(4,`) { + d = rectangleSD(p, b); + } else if(vVertType == `).concat(7,` && w == h) { + d = circleSD(p, b.x); // faster than ellipse + } else if(vVertType == `).concat(7,`) { + d = ellipseSD(p, b); + } else { + d = roundRectangleSD(p, b, vCornerRadius.wzyx); + } + + // use the distance to interpolate a color to smooth the edges of the shape, doesn't need multisampling + // we must smooth colors inwards, because we can't change pixels outside the shape's bounding box + if(d > 0.0) { + if(d > outerBorder) { + discard; + } else { + outColor = distInterp(vBorderColor, vec4(0), d - outerBorder); + } + } else { + if(d > innerBorder) { + vec4 outerColor = outerBorder == 0.0 ? vec4(0) : vBorderColor; + vec4 innerBorderColor = blend(vBorderColor, vColor); + outColor = distInterp(innerBorderColor, outerColor, d); + } + else { + vec4 outerColor; + if(innerBorder == 0.0 && outerBorder == 0.0) { + outerColor = vec4(0); + } else if(innerBorder == 0.0) { + outerColor = vBorderColor; + } else { + outerColor = blend(vBorderColor, vColor); + } + outColor = distInterp(vColor, outerColor, d - innerBorder); + } + } + } + else { + outColor = vColor; + } + + `).concat(e.picking?`if(outColor.a == 0.0) discard; + else outColor = vIndex;`:"",` + } + `));i.aPosition=t.getAttribLocation(i,"aPosition"),i.aIndex=t.getAttribLocation(i,"aIndex"),i.aVertType=t.getAttribLocation(i,"aVertType"),i.aTransform=t.getAttribLocation(i,"aTransform"),i.aAtlasId=t.getAttribLocation(i,"aAtlasId"),i.aTex=t.getAttribLocation(i,"aTex"),i.aPointAPointB=t.getAttribLocation(i,"aPointAPointB"),i.aPointCPointD=t.getAttribLocation(i,"aPointCPointD"),i.aLineWidth=t.getAttribLocation(i,"aLineWidth"),i.aColor=t.getAttribLocation(i,"aColor"),i.aCornerRadius=t.getAttribLocation(i,"aCornerRadius"),i.aBorderColor=t.getAttribLocation(i,"aBorderColor"),i.uPanZoomMatrix=t.getUniformLocation(i,"uPanZoomMatrix"),i.uAtlasSize=t.getUniformLocation(i,"uAtlasSize"),i.uBGColor=t.getUniformLocation(i,"uBGColor"),i.uZoom=t.getUniformLocation(i,"uZoom"),i.uTextures=[];for(var a=0;a<this.batchManager.getMaxAtlasesPerBatch();a++)i.uTextures.push(t.getUniformLocation(i,"uTexture".concat(a)));return i},"_createShaderProgram")},{key:"_createVAO",value:mt(function(){var e=[0,0,1,0,1,1,0,0,1,1,0,1],t=(this.vertexCount=e.length/2,this.maxInstances),r=this.gl,n=this.program,i=r.createVertexArray();return r.bindVertexArray(i),OJ(r,"vec2",n.aPosition,e),this.transformBuffer=BJ(r,t,n.aTransform),this.indexBuffer=PJ(r,t,"vec4",n.aIndex),this.vertTypeBuffer=PJ(r,t,"int",n.aVertType),this.atlasIdBuffer=PJ(r,t,"int",n.aAtlasId),this.texBuffer=PJ(r,t,"vec4",n.aTex),this.pointAPointBBuffer=PJ(r,t,"vec4",n.aPointAPointB),this.pointCPointDBuffer=PJ(r,t,"vec4",n.aPointCPointD),this.lineWidthBuffer=PJ(r,t,"vec2",n.aLineWidth),this.colorBuffer=PJ(r,t,"vec4",n.aColor),this.cornerRadiusBuffer=PJ(r,t,"vec4",n.aCornerRadius),this.borderColorBuffer=PJ(r,t,"vec4",n.aBorderColor),r.bindVertexArray(null),i},"_createVAO")},{key:"buffers",get:mt(function(){var t=this;return this._buffers||(this._buffers=Object.keys(this).filter(function(e){return Yee(e,"Buffer")}).map(function(e){return t[e]})),this._buffers},"get")},{key:"startFrame",value:mt(function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:jce.SCREEN;this.panZoomMatrix=e,this.renderTarget=t,this.batchDebugInfo=[],this.wrappedCount=0,this.simpleCount=0,this.startBatch()},"startFrame")},{key:"startBatch",value:mt(function(){this.instanceCount=0,this.batchManager.startBatch()},"startBatch")},{key:"endFrame",value:mt(function(){this.endBatch()},"endFrame")},{key:"_isVisible",value:mt(function(e,t){return!!e.visible()&&(!t||!t.isVisible||t.isVisible(e))},"_isVisible")},{key:"drawTexture",value:mt(function(e,t,r){var n=this.atlasManager,i=this.batchManager,a=n.getRenderTypeOpts(r);if(this._isVisible(e,a)&&(!e.isEdge()||this._isValidEdge(e))){if(this.renderTarget.picking&&a.getTexPickingMode){var s=a.getTexPickingMode(e);if(s===Yce.IGNORE)return;if(s==Yce.USE_BB)return void this.drawPickingRectangle(e,t,r)}var o,l=XK(n.getAtlasInfo(e,r));try{for(l.s();!(o=l.n()).done;){var c=o.value,h=c.atlas,u=c.tex1,d=c.tex2;i.canAddToCurrentBatch(h)||this.endBatch();for(var p=i.getAtlasIndexForBatch(h),g=0,f=[[u,!0],[d,!1]];g<f.length;g++){var m,y,v,x=tZ(f[g],2),b=x[0],w=x[1];0!=b.w&&(m=this.instanceCount,this.vertTypeBuffer.getView(m)[0]=0,LJ(t,this.indexBuffer.getView(m)),this.atlasIdBuffer.getView(m)[0]=p,(y=this.texBuffer.getView(m))[0]=b.x,y[1]=b.y,y[2]=b.w,y[3]=b.h,v=this.transformBuffer.getMatrixView(m),this.setTransformMatrix(e,v,a,c,w),this.instanceCount++,w||this.wrappedCount++,this.instanceCount>=this.maxInstances)&&this.endBatch()}}}catch(e){l.e(e)}finally{l.f()}}},"drawTexture")},{key:"setTransformMatrix",value:mt(function(e,t,r,n){var i,a,s=!(4<arguments.length&&void 0!==arguments[4])||arguments[4],o=0;r.shapeProps&&r.shapeProps.padding&&(o=e.pstyle(r.shapeProps.padding).pfValue),n?(a=n.bb,i=(i=n.tex1).w/(i.w+n.tex2.w),n=this._getAdjustedBB(a,o,s,s?i:1-i),this._applyTransformMatrix(t,n,r,e)):(a=r.getBoundingBox(e),s=this._getAdjustedBB(a,o,!0,1),this._applyTransformMatrix(t,s,r,e))},"setTransformMatrix")},{key:"_applyTransformMatrix",value:mt(function(e,t,r,n){zJ(e);var i,a,s=0!==(s=r.getRotation?r.getRotation(n):0)?(UJ(e,e,[(i=r.getRotationPoint(n)).x,i.y]),qJ(e,e,s),a=(i=r.getRotationOffset(n)).x+(t.xOffset||0),i.y+(t.yOffset||0)):(a=t.x1,t.y1);UJ(e,e,[a,s]),jJ(e,e,[t.w,t.h])},"_applyTransformMatrix")},{key:"_getAdjustedBB",value:mt(function(e,t,r,n){var i=e.x1,a=e.y1,s=e.w,o=e.h,t=(t&&(i-=t,a-=t,s+=2*t,o+=2*t),0),l=s*n;return r&&n<1?s=l:!r&&n<1&&(i+=t=s-l,s=l),{x1:i,y1:a,w:s,h:o,xOffset:t,yOffset:e.yOffset}},"_getAdjustedBB")},{key:"drawPickingRectangle",value:mt(function(e,t,r){var r=this.atlasManager.getRenderTypeOpts(r),n=this.instanceCount;this.vertTypeBuffer.getView(n)[0]=4,LJ(t,this.indexBuffer.getView(n)),AJ([0,0,0],1,this.colorBuffer.getView(n)),t=this.transformBuffer.getMatrixView(n),this.setTransformMatrix(e,t,r),this.simpleCount++,this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch()},"drawPickingRectangle")},{key:"drawNode",value:mt(function(e,t,r){var n,i,a,s,o=this.simpleShapeOptions.get(r);this._isVisible(e,o)&&(s=o.shapeProps,void 0===(i=this._getVertTypeForShape(e,s.shape))||o.isSimple&&!o.isSimple(e)?this.drawTexture(e,t,r):(r=this.instanceCount,5!==(this.vertTypeBuffer.getView(r)[0]=i)&&6!==i||(n=o.getBoundingBox(e),n=this._getCornerRadius(e,s.radius,n),(a=this.cornerRadiusBuffer.getView(r))[0]=n,a[1]=n,a[2]=n,a[3]=n,6===i&&(a[0]=0,a[2]=0)),LJ(t,this.indexBuffer.getView(r)),AJ(e.pstyle(s.color).value,e.pstyle(s.opacity).value,this.colorBuffer.getView(r)),(n=this.lineWidthBuffer.getView(r))[0]=0,n[1]=0,s.border&&0<(i=e.pstyle("border-width").value)&&(AJ(e.pstyle("border-color").value,e.pstyle("border-opacity").value,this.borderColorBuffer.getView(r)),"inside"===(a=e.pstyle("border-position").value)?(n[0]=0,n[1]=-i):"outside"===a?(n[0]=i,n[1]=0):(n[0]=t=i/2,n[1]=-t)),s=this.transformBuffer.getMatrixView(r),this.setTransformMatrix(e,s,o),this.simpleCount++,this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch()))},"drawNode")},{key:"_getVertTypeForShape",value:mt(function(e,t){switch(e.pstyle(t).value){case"rectangle":return 4;case"ellipse":return 7;case"roundrectangle":case"round-rectangle":return 5;case"bottom-round-rectangle":return 6;default:return}},"_getVertTypeForShape")},{key:"_getCornerRadius",value:mt(function(e,t,r){var n=r.w,r=r.h;return"auto"===e.pstyle(t).value?Pne(n,r):(e=e.pstyle(t).pfValue,Math.min(e,r/2,n/2))},"_getCornerRadius")},{key:"drawEdgeArrow",value:mt(function(e,t,r){var n,i,a,s,o,l;e.visible()&&(l=e._private.rscratch,l="source"===r?(n=l.arrowStartX,i=l.arrowStartY,l.srcArrowAngle):(n=l.arrowEndX,i=l.arrowEndY,l.tgtArrowAngle),isNaN(n)||null==n||isNaN(i)||null==i||isNaN(l)||null==l||"none"!==e.pstyle(r+"-arrow-shape").value&&(r=e.pstyle(r+"-arrow-color").value,a=e.pstyle("opacity").value*e.pstyle("line-opacity").value,s=e.pstyle("width").pfValue,e=e.pstyle("arrow-scale").value,s=this.r.getArrowWidth(s,e),e=this.instanceCount,zJ(o=this.transformBuffer.getMatrixView(e)),UJ(o,o,[n,i]),jJ(o,o,[s,s]),qJ(o,o,l),this.vertTypeBuffer.getView(e)[0]=3,LJ(t,this.indexBuffer.getView(e)),AJ(r,a,this.colorBuffer.getView(e)),this.instanceCount++,this.instanceCount>=this.maxInstances)&&this.endBatch())},"drawEdgeArrow")},{key:"drawEdgeLine",value:mt(function(e,t){if(e.visible()){var r=this._getEdgePoints(e);if(r){var n=e.pstyle("opacity").value,i=e.pstyle("line-opacity").value,a=e.pstyle("width").pfValue,s=e.pstyle("line-color").value,o=n*i;if(r.length/2+this.instanceCount>this.maxInstances&&this.endBatch(),4==r.length)e=this.instanceCount,this.vertTypeBuffer.getView(e)[0]=1,LJ(t,this.indexBuffer.getView(e)),AJ(s,o,this.colorBuffer.getView(e)),this.lineWidthBuffer.getView(e)[0]=a,(n=this.pointAPointBBuffer.getView(e))[0]=r[0],n[1]=r[1],n[2]=r[2],n[3]=r[3],this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch();else for(var l=0;l<r.length-2;l+=2){var c=this.instanceCount,h=(this.vertTypeBuffer.getView(c)[0]=2,LJ(t,this.indexBuffer.getView(c)),AJ(s,o,this.colorBuffer.getView(c)),this.lineWidthBuffer.getView(c)[0]=a,r[l-2]),u=r[l-1],d=r[l],p=r[l+1],g=r[l+2],f=r[l+3],m=r[l+4],y=r[l+5],v=(0==l&&(h=2*d-g+.001,u=2*p-f+.001),l==r.length-4&&(m=2*g-d+.001,y=2*f-p+.001),this.pointAPointBBuffer.getView(c));v[0]=h,v[1]=u,v[2]=d,v[3]=p,(h=this.pointCPointDBuffer.getView(c))[0]=g,h[1]=f,h[2]=m,h[3]=y,this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}}}},"drawEdgeLine")},{key:"_isValidEdge",value:mt(function(e){return!((e=e._private.rscratch).badLine||null==e.allpts||isNaN(e.allpts[0]))},"_isValidEdge")},{key:"_getEdgePoints",value:mt(function(e){var t=e._private.rscratch;if(this._isValidEdge(e))return 4==(t=t.allpts).length?t:(e=this._getNumSegments(e),this._getCurveSegmentPoints(t,e))},"_getEdgePoints")},{key:"_getNumSegments",value:mt(function(e){return Math.min(Math.max(15,5),this.maxInstances)},"_getNumSegments")},{key:"_getCurveSegmentPoints",value:mt(function(e,t){if(4==e.length)return e;for(var r=Array(2*(t+1)),n=0;n<=t;n++)0==n?(r[0]=e[0],r[1]=e[1]):n==t?(r[2*n]=e[e.length-2],r[2*n+1]=e[e.length-1]):this._setCurvePoint(e,n/t,r,2*n);return r},"_getCurveSegmentPoints")},{key:"_setCurvePoint",value:mt(function(e,t,r,n){if(!(e.length<=2)){for(var i=Array(e.length-2),a=0;a<i.length;a+=2){var s=(1-t)*e[a]+t*e[a+2],o=(1-t)*e[a+1]+t*e[a+3];i[a]=s,i[a+1]=o}return this._setCurvePoint(i,t,r,n)}r[n]=e[0],r[n+1]=e[1]},"_setCurvePoint")},{key:"endBatch",value:mt(function(){var e=this.gl,t=this.vao,r=this.vertexCount,n=this.instanceCount;if(0!==n){var i,a=this.renderTarget.picking?this.pickingProgram:this.program,s=(e.useProgram(a),e.bindVertexArray(t),XK(this.buffers));try{for(s.s();!(i=s.n()).done;)i.value.bufferSubData(n)}catch(e){s.e(e)}finally{s.f()}for(var o=this.batchManager.getAtlases(),l=0;l<o.length;l++)o[l].bufferIfNeeded(e);for(var c=0;c<o.length;c++)e.activeTexture(e.TEXTURE0+c),e.bindTexture(e.TEXTURE_2D,o[c].texture),e.uniform1i(a.uTextures[c],c);e.uniform1f(a.uZoom,EJ(this.r)),e.uniformMatrix3fv(a.uPanZoomMatrix,!1,this.panZoomMatrix),e.uniform1i(a.uAtlasSize,this.batchManager.getAtlasSize()),t=AJ(this.bgColor,1),e.uniform4fv(a.uBGColor,t),e.drawArraysInstanced(e.TRIANGLES,0,r,n),e.bindVertexArray(null),e.bindTexture(e.TEXTURE_2D,null),this.debug&&this.batchDebugInfo.push({count:n,atlasCount:o.length}),this.startBatch()}},"endBatch")},{key:"getDebugInfo",value:mt(function(){var e=this.atlasManager.getDebugInfo(),t=e.reduce(function(e,t){return e+t.atlasCount},0),r=this.batchDebugInfo,n=r.reduce(function(e,t){return e+t.count},0);return{atlasInfo:e,totalAtlases:t,wrappedCount:this.wrappedCount,simpleCount:this.simpleCount,batchCount:r.length,batchInfo:r,totalInstances:n}},"getDebugInfo")}]),Hce={initWebgl:function(e,t){var n=this,r=n.data.contexts[n.WEBGL],r=(e.bgColor=HJ(n),e.webglTexSize=Math.min(e.webglTexSize,r.getParameter(r.MAX_TEXTURE_SIZE)),e.webglTexRows=Math.min(e.webglTexRows,54),e.webglTexRowsNodes=Math.min(e.webglTexRowsNodes,54),e.webglBatchSize=Math.min(e.webglBatchSize,16384),e.webglTexPerBatch=Math.min(e.webglTexPerBatch,r.getParameter(r.MAX_TEXTURE_IMAGE_UNITS)),n.webglDebug=e.webglDebug,n.webglDebugShowAtlases=e.webglDebugShowAtlases,n.pickingFrameBuffer=$J(r),n.pickingFrameBuffer.needsDraw=!0,n.drawing=new Wce(n,r,e),mt(function(t){return function(e){return n.getTextAngle(e,t)}},"getLabelRotation")),i=mt(function(t){return function(e){return(e=e.pstyle(t))&&e.value}},"isLabelVisible"),a=mt(function(t){return function(e){return 0<e.pstyle("".concat(t,"-opacity")).value}},"isLayerVisible"),s=mt(function(e){return"yes"===e.pstyle("text-events").strValue?Yce.USE_BB:Yce.IGNORE},"getTexPickingMode"),o=mt(function(e){var t=(r=e.position()).x,r=r.y,n=e.outerWidth();return{w:n,h:e=e.outerHeight(),x1:t-n/2,y1:r-e/2}},"getBBForSimpleShape"),l=(n.drawing.addAtlasCollection("node",{texRows:e.webglTexRowsNodes}),n.drawing.addAtlasCollection("label",{texRows:e.webglTexRows}),n.drawing.addTextureAtlasRenderType("node-body",{collection:"node",getKey:t.getStyleKey,getBoundingBox:t.getElementBox,drawElement:t.drawElement}),n.drawing.addSimpleShapeRenderType("node-body",{getBoundingBox:o,isSimple:_J,shapeProps:{shape:"shape",color:"background-color",opacity:"background-opacity",radius:"corner-radius",border:!0}}),n.drawing.addSimpleShapeRenderType("node-overlay",{getBoundingBox:o,isVisible:a("overlay"),shapeProps:{shape:"overlay-shape",color:"overlay-color",opacity:"overlay-opacity",padding:"overlay-padding",radius:"overlay-corner-radius"}}),n.drawing.addSimpleShapeRenderType("node-underlay",{getBoundingBox:o,isVisible:a("underlay"),shapeProps:{shape:"underlay-shape",color:"underlay-color",opacity:"underlay-opacity",padding:"underlay-padding",radius:"underlay-corner-radius"}}),n.drawing.addTextureAtlasRenderType("label",{collection:"label",getTexPickingMode:s,getKey:Vce(t.getLabelKey,null),getBoundingBox:Xce(t.getLabelBox,null),drawClipped:!0,drawElement:t.drawLabel,getRotation:r(null),getRotationPoint:t.getLabelRotationPoint,getRotationOffset:t.getLabelRotationOffset,isVisible:i("label")}),n.drawing.addTextureAtlasRenderType("edge-source-label",{collection:"label",getTexPickingMode:s,getKey:Vce(t.getSourceLabelKey,"source"),getBoundingBox:Xce(t.getSourceLabelBox,"source"),drawClipped:!0,drawElement:t.drawSourceLabel,getRotation:r("source"),getRotationPoint:t.getSourceLabelRotationPoint,getRotationOffset:t.getSourceLabelRotationOffset,isVisible:i("source-label")}),n.drawing.addTextureAtlasRenderType("edge-target-label",{collection:"label",getTexPickingMode:s,getKey:Vce(t.getTargetLabelKey,"target"),getBoundingBox:Xce(t.getTargetLabelBox,"target"),drawClipped:!0,drawElement:t.drawTargetLabel,getRotation:r("target"),getRotationPoint:t.getTargetLabelRotationPoint,getRotationOffset:t.getTargetLabelRotationOffset,isVisible:i("target-label")}),Mte(function(){console.log("garbage collect flag set"),n.data.gc=!0},1e4));n.onUpdateEleCalcs(function(e,t){var r=!1;t&&0<t.length&&(r|=n.drawing.invalidate(t)),r&&l()}),XJ(n)}},mt(HJ,"getBGColor"),mt(VJ,"getLabelLines"),Vce=mt(function(t,n){return function(e){var r=t(e);return 1<(e=VJ(e,n)).length?e.map(function(e,t){return"".concat(r,"_").concat(t)}):r}},"getStyleKeysForLabel"),Xce=mt(function(i,a){return function(e,t){var r=i(e);if("string"==typeof t){var n=t.indexOf("_");if(0<n)return t=Number(t.substring(n+1)),n=VJ(e,a),e=r.h/n.length,t=r.y1+(n=e*t),{x1:r.x1,w:r.w,y1:t,h:e,yOffset:n}}return r}},"getBoundingBoxForLabel"),mt(XJ,"overrideCanvasRendererFunctions"),mt(KJ,"clearWebgl"),mt(ZJ,"clearCanvas"),mt(QJ,"createPanZoomMatrix"),mt(JJ,"setContextTransform"),mt(eee,"drawSelectionRectangle"),mt(tee,"drawAxes"),mt(ree,"drawAtlases"),mt(nee,"getPickingIndexes"),mt(iee,"findNearestElementsWebgl"),mt(aee,"drawEle"),mt(see,"renderWebgl"),Kce={drawPolygonPath:function(e,t,r,n,i,a){var s=n/2,o=i/2;e.beginPath&&e.beginPath(),e.moveTo(t+s*a[0],r+o*a[1]);for(var l=1;l<a.length/2;l++)e.lineTo(t+s*a[2*l],r+o*a[2*l+1]);e.closePath()},drawRoundPolygonPath:function(t,e,r,n,i,a,s){s.forEach(function(e){return cJ(t,e)}),t.closePath()},drawRoundRectanglePath:function(e,t,r,n,i,a){var s=n/2,o=i/2,n="auto"===a?Pne(n,i):Math.min(a,o,s);e.beginPath&&e.beginPath(),e.moveTo(t,r-o),e.arcTo(t+s,r-o,t+s,r,n),e.arcTo(t+s,r+o,t,r+o,n),e.arcTo(t-s,r+o,t-s,r,n),e.arcTo(t-s,r-o,t,r-o,n),e.lineTo(t,r-o),e.closePath()},drawBottomRoundRectanglePath:function(e,t,r,n,i,a){var s=n/2,o=i/2,n="auto"===a?Pne(n,i):a;e.beginPath&&e.beginPath(),e.moveTo(t,r-o),e.lineTo(t+s,r-o),e.lineTo(t+s,r),e.arcTo(t+s,r+o,t,r+o,n),e.arcTo(t-s,r+o,t-s,r,n),e.lineTo(t-s,r-o),e.lineTo(t,r-o),e.closePath()},drawCutRectanglePath:function(e,t,r,n,i,a,s){n/=2,i/=2,s="auto"===s?$ne():s,e.beginPath&&e.beginPath(),e.moveTo(t-n+s,r-i),e.lineTo(t+n-s,r-i),e.lineTo(t+n,r-i+s),e.lineTo(t+n,r+i-s),e.lineTo(t+n-s,r+i),e.lineTo(t-n+s,r+i),e.lineTo(t-n,r+i-s),e.lineTo(t-n,r-i+s),e.closePath()},drawBarrelPath:function(e,t,r,n,i){var a=t-(s=n/2),t=t+s,s=r-(o=i/2),r=r+o,n=(o=zne(n,i)).widthOffset,i=o.heightOffset,o=o.ctrlPtOffsetPct*n;e.beginPath&&e.beginPath(),e.moveTo(a,s+i),e.lineTo(a,r-i),e.quadraticCurveTo(a+o,r,a+n,r),e.lineTo(t-n,r),e.quadraticCurveTo(t-o,r,t,r-i),e.lineTo(t,s+i),e.quadraticCurveTo(t-o,s,t-n,s),e.lineTo(a+n,s),e.quadraticCurveTo(a+o,s,a,s+i),e.closePath()}},Zce=Math.sin(0),Qce=Math.cos(0),Jce={},ehe={},the=Math.PI/40,rhe=0*Math.PI;rhe<2*Math.PI;rhe+=the)Jce[rhe]=Math.sin(rhe),ehe[rhe]=Math.cos(rhe);Kce.drawEllipsePath=function(e,t,r,n,i){if(e.beginPath&&e.beginPath(),e.ellipse)e.ellipse(t,r,n/2,i/2,0,0,2*Math.PI);else for(var a,s,o=n/2,l=i/2,c=0*Math.PI;c<2*Math.PI;c+=the)a=t-o*Jce[c]*Zce+o*ehe[c]*Qce,s=r+l*ehe[c]*Zce+l*Jce[c]*Qce,0===c?e.moveTo(a,s):e.lineTo(a,s);e.closePath()},nhe={createBuffer:function(e,t){var r=document.createElement("canvas");return r.width=e,r.height=t,[r,r.getContext("2d")]},bufferCanvasImage:function(e){var t=this.cy,r=t.mutableElements().boundingBox(),n=this.findContainerClientCoords(),i=e.full?Math.ceil(r.w):n[2],n=e.full?Math.ceil(r.h):n[3],a=he(e.maxWidth)||he(e.maxHeight),s=this.getPixelRatio(),o=1,l=(void 0!==e.scale?(i*=e.scale,n*=e.scale,o=e.scale):a&&(c=l=1/0,he(e.maxWidth)&&(l=o*e.maxWidth/i),he(e.maxHeight)&&(c=o*e.maxHeight/n),i*=o=Math.min(l,c),n*=o),a||(i*=s,n*=s,o*=s),document.createElement("canvas")),c=(l.width=i,l.height=n,l.style.width=i+"px",l.style.height=n+"px",l.getContext("2d"));return 0<i&&0<n&&(c.clearRect(0,0,i,n),c.globalCompositeOperation="source-over",a=this.getCachedZSortedEles(),e.full?(c.translate(-r.x1*o,-r.y1*o),c.scale(o,o),this.drawElements(c,a),c.scale(1/o,1/o),c.translate(r.x1*o,r.y1*o)):(r={x:(s=t.pan()).x*o,y:s.y*o},o*=t.zoom(),c.translate(r.x,r.y),c.scale(o,o),this.drawElements(c,a),c.scale(1/o,1/o),c.translate(-r.x,-r.y)),e.bg)&&(c.globalCompositeOperation="destination-over",c.fillStyle=e.bg,c.rect(0,0,i,n),c.fill()),l}},mt(oee,"b64ToBlob"),mt(lee,"b64UriToB64"),mt(cee,"output"),nhe.png=function(e){return cee(e,this.bufferCanvasImage(e),"image/png")},nhe.jpg=function(e){return cee(e,this.bufferCanvasImage(e),"image/jpeg")},ihe={nodeShapeImpl:function(e,t,r,n,i,a,s,o){switch(e){case"ellipse":return this.drawEllipsePath(t,r,n,i,a);case"polygon":return this.drawPolygonPath(t,r,n,i,a,s);case"round-polygon":return this.drawRoundPolygonPath(t,r,n,i,a,s,o);case"roundrectangle":case"round-rectangle":return this.drawRoundRectanglePath(t,r,n,i,a,o);case"cutrectangle":case"cut-rectangle":return this.drawCutRectanglePath(t,r,n,i,a,s,o);case"bottomroundrectangle":case"bottom-round-rectangle":return this.drawBottomRoundRectanglePath(t,r,n,i,a,o);case"barrel":return this.drawBarrelPath(t,r,n,i,a)}}},(she=(ahe=hee).prototype).CANVAS_LAYERS=3,she.SELECT_BOX=0,she.DRAG=1,she.NODE=2,she.WEBGL=3,she.CANVAS_TYPES=["2d","2d","2d","webgl2"],she.BUFFER_COUNT=3,she.TEXTURE_BUFFER=0,she.MOTIONBLUR_BUFFER_NODE=1,she.MOTIONBLUR_BUFFER_DRAG=2,mt(hee,"CanvasRenderer"),she.redrawHint=function(e,t){switch(e){case"eles":this.data.canvasNeedsRedraw[she.NODE]=t;break;case"drag":this.data.canvasNeedsRedraw[she.DRAG]=t;break;case"select":this.data.canvasNeedsRedraw[she.SELECT_BOX]=t;break;case"gc":this.data.gc=!0}},ohe=typeof Path2D<"u",she.path2dEnabled=function(e){if(void 0===e)return this.pathsEnabled;this.pathsEnabled=!!e},she.usePaths=function(){return ohe&&this.pathsEnabled},she.setImgSmoothing=function(e,t){null!=e.imageSmoothingEnabled?e.imageSmoothingEnabled=t:(e.webkitImageSmoothingEnabled=t,e.mozImageSmoothingEnabled=t,e.msImageSmoothingEnabled=t)},she.getImgSmoothing=function(e){return null!=e.imageSmoothingEnabled?e.imageSmoothingEnabled:e.webkitImageSmoothingEnabled||e.mozImageSmoothingEnabled||e.msImageSmoothingEnabled},she.makeOffscreenCanvas=function(e,t){var r;return"undefined"!==("u"<typeof OffscreenCanvas?"undefined":aZ(OffscreenCanvas))?r=new OffscreenCanvas(e,t):((r=this.cy.window().document.createElement("canvas")).width=e,r.height=t),r},[kce,Ece,Ice,Mce,Dce,Oce,Bce,Hce,Kce,nhe,ihe].forEach(function(e){Xee(she,e)}),lhe=[{type:"layout",extensions:zle},{type:"renderer",extensions:[{name:"null",impl:lJ},{name:"base",impl:pce},{name:"canvas",impl:ahe}]}],che={},hhe={},mt(uee,"setExtension"),mt(dee,"getExtension"),mt(pee,"setModule"),mt(gee,"getModule"),uhe=mt(function(){return 2===arguments.length?dee.apply(null,arguments):3===arguments.length?uee.apply(null,arguments):4===arguments.length?gee.apply(null,arguments):5===arguments.length?pee.apply(null,arguments):void ire("Invalid extension access syntax")},"extension"),ole.prototype.extension=uhe,lhe.forEach(function(t){t.extensions.forEach(function(e){uee(t.type,e.name,e.impl)})}),dhe=mt(function(){if(!(this instanceof dhe))return new dhe;this.length=0},"Stylesheet"),(phe=dhe.prototype).instanceString=function(){return"stylesheet"},phe.selector=function(e){var t=this.length++;return this[t]={selector:e,properties:[]},this},phe.css=function(e,t){var r=this.length-1;if(kee(e))this[r].properties.push({name:e,value:t});else if(Cee(e))for(var n=e,i=Object.keys(n),a=0;a<i.length;a++){var s=i[a],o=n[s];null!=o&&null!=(s=ale.properties[s]||ale.properties[Uee(s)])&&(s=s.name,this[r].properties.push({name:s,value:o}))}return this},phe.style=phe.css,phe.generateStyle=function(e){return e=new ale(e),this.appendToStyle(e)},phe.appendToStyle=function(e){for(var t=0;t<this.length;t++){var r=this[t],n=r.selector,i=r.properties;e.selector(n);for(var a=0;a<i.length;a++){var s=i[a];e.css(s.name,s.value)}}return e},(ghe=mt(function(e){return Cee(e=void 0===e?{}:e)?new ole(e):kee(e)?uhe.apply(uhe,arguments):void 0},"cytoscape")).use=function(e){var t=Array.prototype.slice.call(arguments,1);return t.unshift(ghe),e.apply(null,t),this},ghe.warnings=function(e){return are(e)},ghe.version="3.33.1",ghe.stylesheet=ghe.Stylesheet=dhe}),mhe=NFe((r,n)=>{mt(function(e,t){"object"==typeof r&&"object"==typeof n?n.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof r?r.layoutBase=t():e.layoutBase=t()},"webpackUniversalModuleDefinition")(r,function(){return r=[function(e,t,r){function n(){}mt(n,"LayoutConstants"),n.QUALITY=1,n.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,n.DEFAULT_INCREMENTAL=!1,n.DEFAULT_ANIMATION_ON_LAYOUT=!0,n.DEFAULT_ANIMATION_DURING_LAYOUT=!1,n.DEFAULT_ANIMATION_PERIOD=50,n.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,n.DEFAULT_GRAPH_MARGIN=15,n.NODE_DIMENSIONS_INCLUDE_LABELS=!1,n.SIMPLE_NODE_HALF_SIZE=(n.SIMPLE_NODE_SIZE=40)/2,n.EMPTY_COMPOUND_NODE_SIZE=40,n.MIN_EDGE_LENGTH=1,n.INITIAL_WORLD_BOUNDARY=(n.WORLD_BOUNDARY=1e6)/1e3,n.WORLD_CENTER_X=1200,n.WORLD_CENTER_Y=900,e.exports=n},function(e,t,r){var n,i=r(2),a=r(8),s=r(9);function o(e,t,r){i.call(this,r),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=r,this.bendpoints=[],this.source=e,this.target=t}for(n in mt(o,"LEdge"),o.prototype=Object.create(i.prototype),i)o[n]=i[n];o.prototype.getSource=function(){return this.source},o.prototype.getTarget=function(){return this.target},o.prototype.isInterGraph=function(){return this.isInterGraph},o.prototype.getLength=function(){return this.length},o.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},o.prototype.getBendpoints=function(){return this.bendpoints},o.prototype.getLca=function(){return this.lca},o.prototype.getSourceInLca=function(){return this.sourceInLca},o.prototype.getTargetInLca=function(){return this.targetInLca},o.prototype.getOtherEnd=function(e){if(this.source===e)return this.target;if(this.target===e)return this.source;throw"Node is not incident with this edge"},o.prototype.getOtherEndInGraph=function(e,t){for(var r=this.getOtherEnd(e),n=t.getGraphManager().getRoot();;){if(r.getOwner()==t)return r;if(r.getOwner()==n)break;r=r.getOwner().getParent()}return null},o.prototype.updateLength=function(){var e=new Array(4);this.isOverlapingSourceAndTarget=a.getIntersection(this.target.getRect(),this.source.getRect(),e),this.isOverlapingSourceAndTarget||(this.lengthX=e[0]-e[2],this.lengthY=e[1]-e[3],Math.abs(this.lengthX)<1&&(this.lengthX=s.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=s.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},o.prototype.updateLengthSimple=function(){this.lengthX=this.target.getCenterX()-this.source.getCenterX(),this.lengthY=this.target.getCenterY()-this.source.getCenterY(),Math.abs(this.lengthX)<1&&(this.lengthX=s.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=s.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},e.exports=o},function(e,t,r){function n(e){this.vGraphObject=e}mt(n,"LGraphObject"),e.exports=n},function(e,t,r){var n,i=r(2),a=r(10),s=r(13),o=r(0),l=r(16),c=r(4);function h(e,t,r,n){i.call(this,n=null==r&&null==n?t:n),null!=e.graphManager&&(e=e.graphManager),this.estimatedSize=a.MIN_VALUE,this.inclusionTreeDepth=a.MAX_VALUE,this.vGraphObject=n,this.edges=[],this.graphManager=e,this.rect=null!=r&&null!=t?new s(t.x,t.y,r.width,r.height):new s}for(n in mt(h,"LNode"),h.prototype=Object.create(i.prototype),i)h[n]=i[n];h.prototype.getEdges=function(){return this.edges},h.prototype.getChild=function(){return this.child},h.prototype.getOwner=function(){return this.owner},h.prototype.getWidth=function(){return this.rect.width},h.prototype.setWidth=function(e){this.rect.width=e},h.prototype.getHeight=function(){return this.rect.height},h.prototype.setHeight=function(e){this.rect.height=e},h.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},h.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},h.prototype.getCenter=function(){return new c(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},h.prototype.getLocation=function(){return new c(this.rect.x,this.rect.y)},h.prototype.getRect=function(){return this.rect},h.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},h.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},h.prototype.setRect=function(e,t){this.rect.x=e.x,this.rect.y=e.y,this.rect.width=t.width,this.rect.height=t.height},h.prototype.setCenter=function(e,t){this.rect.x=e-this.rect.width/2,this.rect.y=t-this.rect.height/2},h.prototype.setLocation=function(e,t){this.rect.x=e,this.rect.y=t},h.prototype.moveBy=function(e,t){this.rect.x+=e,this.rect.y+=t},h.prototype.getEdgeListToNode=function(t){var r=[],n=this;return n.edges.forEach(function(e){if(e.target==t){if(e.source!=n)throw"Incorrect edge source!";r.push(e)}}),r},h.prototype.getEdgesBetween=function(t){var r=[],n=this;return n.edges.forEach(function(e){if(e.source!=n&&e.target!=n)throw"Incorrect edge source and/or target";e.target!=t&&e.source!=t||r.push(e)}),r},h.prototype.getNeighborsList=function(){var t=new Set,r=this;return r.edges.forEach(function(e){if(e.source==r)t.add(e.target);else{if(e.target!=r)throw"Incorrect incidency!";t.add(e.source)}}),t},h.prototype.withChildren=function(){var t=new Set;if(t.add(this),null!=this.child)for(var e=this.child.getNodes(),r=0;r<e.length;r++)e[r].withChildren().forEach(function(e){t.add(e)});return t},h.prototype.getNoOfChildren=function(){var e=0;if(null==this.child)e=1;else for(var t=this.child.getNodes(),r=0;r<t.length;r++)e+=t[r].getNoOfChildren();return 0==e?1:e},h.prototype.getEstimatedSize=function(){if(this.estimatedSize==a.MIN_VALUE)throw"assert failed";return this.estimatedSize},h.prototype.calcEstimatedSize=function(){return null==this.child?this.estimatedSize=(this.rect.width+this.rect.height)/2:(this.estimatedSize=this.child.calcEstimatedSize(),this.rect.width=this.estimatedSize,this.rect.height=this.estimatedSize,this.estimatedSize)},h.prototype.scatter=function(){var e=-o.INITIAL_WORLD_BOUNDARY,t=o.INITIAL_WORLD_BOUNDARY,t=o.WORLD_CENTER_X+l.nextDouble()*(t-e)+e,e=-o.INITIAL_WORLD_BOUNDARY,r=o.INITIAL_WORLD_BOUNDARY,r=o.WORLD_CENTER_Y+l.nextDouble()*(r-e)+e;this.rect.x=t,this.rect.y=r},h.prototype.updateBounds=function(){if(null==this.getChild())throw"assert failed";var e,t;0!=this.getChild().getNodes().length&&((t=this.getChild()).updateBounds(!0),this.rect.x=t.getLeft(),this.rect.y=t.getTop(),this.setWidth(t.getRight()-t.getLeft()),this.setHeight(t.getBottom()-t.getTop()),o.NODE_DIMENSIONS_INCLUDE_LABELS)&&(e=t.getRight()-t.getLeft(),t=t.getBottom()-t.getTop(),this.labelWidth>e&&(this.rect.x-=(this.labelWidth-e)/2,this.setWidth(this.labelWidth)),this.labelHeight>t)&&("center"==this.labelPos?this.rect.y-=(this.labelHeight-t)/2:"top"==this.labelPos&&(this.rect.y-=this.labelHeight-t),this.setHeight(this.labelHeight))},h.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==a.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},h.prototype.transform=function(e){(t=this.rect.x)>o.WORLD_BOUNDARY?t=o.WORLD_BOUNDARY:t<-o.WORLD_BOUNDARY&&(t=-o.WORLD_BOUNDARY),(r=this.rect.y)>o.WORLD_BOUNDARY?r=o.WORLD_BOUNDARY:r<-o.WORLD_BOUNDARY&&(r=-o.WORLD_BOUNDARY);var t=new c(t,r),r=e.inverseTransformPoint(t);this.setLocation(r.x,r.y)},h.prototype.getLeft=function(){return this.rect.x},h.prototype.getRight=function(){return this.rect.x+this.rect.width},h.prototype.getTop=function(){return this.rect.y},h.prototype.getBottom=function(){return this.rect.y+this.rect.height},h.prototype.getParent=function(){return null==this.owner?null:this.owner.getParent()},e.exports=h},function(e,t,r){function n(e,t){null==e&&null==t?(this.x=0,this.y=0):(this.x=e,this.y=t)}mt(n,"PointD"),n.prototype.getX=function(){return this.x},n.prototype.getY=function(){return this.y},n.prototype.setX=function(e){this.x=e},n.prototype.setY=function(e){this.y=e},n.prototype.getDifference=function(e){return new DimensionD(this.x-e.x,this.y-e.y)},n.prototype.getCopy=function(){return new n(this.x,this.y)},n.prototype.translate=function(e){return this.x+=e.width,this.y+=e.height,this},e.exports=n},function(e,t,r){var n,i=r(2),d=r(10),a=r(0),s=r(6),o=r(3),l=r(1),p=r(13),c=r(12),h=r(11);function u(e,t,r){i.call(this,r),this.estimatedSize=d.MIN_VALUE,this.margin=a.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=e,null!=t&&t instanceof s?this.graphManager=t:null!=t&&t instanceof Layout&&(this.graphManager=t.graphManager)}for(n in mt(u,"LGraph"),u.prototype=Object.create(i.prototype),i)u[n]=i[n];u.prototype.getNodes=function(){return this.nodes},u.prototype.getEdges=function(){return this.edges},u.prototype.getGraphManager=function(){return this.graphManager},u.prototype.getParent=function(){return this.parent},u.prototype.getLeft=function(){return this.left},u.prototype.getRight=function(){return this.right},u.prototype.getTop=function(){return this.top},u.prototype.getBottom=function(){return this.bottom},u.prototype.isConnected=function(){return this.isConnected},u.prototype.add=function(e,t,r){if(null==t&&null==r){var n=e;if(null==this.graphManager)throw"Graph has no graph mgr!";if(-1<this.getNodes().indexOf(n))throw"Node already in graph!";return(n.owner=this).getNodes().push(n),n}if(n=e,!(-1<this.getNodes().indexOf(t)&&-1<this.getNodes().indexOf(r)))throw"Source or target not in graph!";if(t.owner!=r.owner||t.owner!=this)throw"Both owners must be this graph!";return t.owner!=r.owner?null:(n.source=t,n.target=r,n.isInterGraph=!1,this.getEdges().push(n),t.edges.push(n),r!=t&&r.edges.push(n),n)},u.prototype.remove=function(e){var t=e;if(e instanceof o){if(null==t)throw"Node is null!";if(null==t.owner||t.owner!=this)throw"Owner graph is invalid!";if(null==this.graphManager)throw"Owner graph manager is invalid!";for(var r,n=t.edges.slice(),i=n.length,a=0;a<i;a++)((r=n[a]).isInterGraph?this.graphManager:r.source.owner).remove(r);if(-1==(s=this.nodes.indexOf(t)))throw"Node not in owner node list!";this.nodes.splice(s,1)}else if(e instanceof l){if(null==(r=e))throw"Edge is null!";if(null==r.source||null==r.target)throw"Source and/or target is null!";if(null==r.source.owner||null==r.target.owner||r.source.owner!=this||r.target.owner!=this)throw"Source and/or target owner is invalid!";var s,t=r.source.edges.indexOf(r),e=r.target.edges.indexOf(r);if(!(-1<t&&-1<e))throw"Source and/or target doesn't know this edge!";if(r.source.edges.splice(t,1),r.target!=r.source&&r.target.edges.splice(e,1),-1==(s=r.source.owner.getEdges().indexOf(r)))throw"Not in owner's edge list!";r.source.owner.getEdges().splice(s,1)}},u.prototype.updateLeftTop=function(){for(var e,t=d.MAX_VALUE,r=d.MAX_VALUE,n=this.getNodes(),i=n.length,a=0;a<i;a++){var s,o=n[a];(s=o.getTop())<t&&(t=s),(s=o.getLeft())<r&&(r=s)}return t==d.MAX_VALUE?null:(e=null!=n[0].getParent().paddingLeft?n[0].getParent().paddingLeft:this.margin,this.left=r-e,this.top=t-e,new c(this.left,this.top))},u.prototype.updateBounds=function(e){for(var t,r,n=d.MAX_VALUE,i=-d.MAX_VALUE,a=d.MAX_VALUE,s=-d.MAX_VALUE,o=this.nodes,l=o.length,c=0;c<l;c++){var h=o[c];e&&null!=h.child&&h.updateBounds(),(t=h.getLeft())<n&&(n=t),i<(t=h.getRight())&&(i=t),(t=h.getTop())<a&&(a=t),s<(t=h.getBottom())&&(s=t)}var u=new p(n,a,i-n,s-a);n==d.MAX_VALUE&&(this.left=this.parent.getLeft(),this.right=this.parent.getRight(),this.top=this.parent.getTop(),this.bottom=this.parent.getBottom()),r=null!=o[0].getParent().paddingLeft?o[0].getParent().paddingLeft:this.margin,this.left=u.x-r,this.right=u.x+u.width+r,this.top=u.y-r,this.bottom=u.y+u.height+r},u.calculateBounds=function(e){for(var t=d.MAX_VALUE,r=-d.MAX_VALUE,n=d.MAX_VALUE,i=-d.MAX_VALUE,a=e.length,s=0;s<a;s++){var o,l=e[s];(o=l.getLeft())<t&&(t=o),r<(o=l.getRight())&&(r=o),(o=l.getTop())<n&&(n=o),i<(o=l.getBottom())&&(i=o)}return new p(t,n,r-t,i-n)},u.prototype.getInclusionTreeDepth=function(){return this==this.graphManager.getRoot()?1:this.parent.getInclusionTreeDepth()},u.prototype.getEstimatedSize=function(){if(this.estimatedSize==d.MIN_VALUE)throw"assert failed";return this.estimatedSize},u.prototype.calcEstimatedSize=function(){for(var e=0,t=this.nodes,r=t.length,n=0;n<r;n++)e+=t[n].calcEstimatedSize();return this.estimatedSize=0==e?a.EMPTY_COMPOUND_NODE_SIZE:e/Math.sqrt(this.nodes.length),this.estimatedSize},u.prototype.updateConnected=function(){var t=this;if(0==this.nodes.length)this.isConnected=!0;else{var r,n=new h,i=new Set,e=this.nodes[0];for(e.withChildren().forEach(function(e){n.push(e),i.add(e)});0!==n.length;)for(var a,s,o=(a=(e=n.shift()).getEdges()).length,l=0;l<o;l++)null==(s=a[l].getOtherEndInGraph(e,this))||i.has(s)||s.withChildren().forEach(function(e){n.push(e),i.add(e)});this.isConnected=!1,i.size>=this.nodes.length&&(r=0,i.forEach(function(e){e.owner==t&&r++}),r==this.nodes.length)&&(this.isConnected=!0)}},e.exports=u},function(e,t,r){var c,h=r(1);function n(e){c=r(5),this.layout=e,this.graphs=[],this.edges=[]}mt(n,"LGraphManager"),n.prototype.addRoot=function(){var e=this.layout.newGraph(),t=this.layout.newNode(null),e=this.add(e,t);return this.setRootGraph(e),this.rootGraph},n.prototype.add=function(e,t,r,n,i){if(null==r&&null==n&&null==i){if(null==e)throw"Graph is null!";if(null==t)throw"Parent node is null!";if(-1<this.graphs.indexOf(e))throw"Graph already in this graph mgr!";if(this.graphs.push(e),null!=e.parent)throw"Already has a parent!";if(null!=t.child)throw"Already has a child!";return(e.parent=t).child=e}if(i=r,r=e,e=(n=t).getOwner(),t=i.getOwner(),null==e||e.getGraphManager()!=this)throw"Source not in this graph mgr!";if(null==t||t.getGraphManager()!=this)throw"Target not in this graph mgr!";if(e==t)return r.isInterGraph=!1,e.add(r,n,i);if(r.isInterGraph=!0,r.source=n,r.target=i,-1<this.edges.indexOf(r))throw"Edge already in inter-graph edge list!";if(this.edges.push(r),null==r.source||null==r.target)throw"Edge source and/or target is null!";if(-1!=r.source.edges.indexOf(r)||-1!=r.target.edges.indexOf(r))throw"Edge already in source and/or target incidency list!";return r.source.edges.push(r),r.target.edges.push(r),r},n.prototype.remove=function(e){if(e instanceof c){var t=e;if(t.getGraphManager()!=this)throw"Graph not in this graph mgr";if(t!=this.rootGraph&&(null==t.parent||t.parent.graphManager!=this))throw"Invalid parent node!";for(var r,n=[],i=(n=n.concat(t.getEdges())).length,a=0;a<i;a++)r=n[a],t.remove(r);for(var s,o=[],i=(o=o.concat(t.getNodes())).length,a=0;a<i;a++)s=o[a],t.remove(s);t==this.rootGraph&&this.setRootGraph(null);var l=this.graphs.indexOf(t);this.graphs.splice(l,1),t.parent=null}else if(e instanceof h){if(null==(r=e))throw"Edge is null!";if(!r.isInterGraph)throw"Not an inter-graph edge!";if(null==r.source||null==r.target)throw"Source and/or target is null!";if(-1==r.source.edges.indexOf(r)||-1==r.target.edges.indexOf(r))throw"Source and/or target doesn't know this edge!";if(l=r.source.edges.indexOf(r),r.source.edges.splice(l,1),l=r.target.edges.indexOf(r),r.target.edges.splice(l,1),null==r.source.owner||null==r.source.owner.getGraphManager())throw"Edge owner graph or owner graph manager is null!";if(-1==r.source.owner.getGraphManager().edges.indexOf(r))throw"Not in owner graph manager's edge list!";l=r.source.owner.getGraphManager().edges.indexOf(r),r.source.owner.getGraphManager().edges.splice(l,1)}},n.prototype.updateBounds=function(){this.rootGraph.updateBounds(!0)},n.prototype.getGraphs=function(){return this.graphs},n.prototype.getAllNodes=function(){if(null==this.allNodes){for(var e=[],t=this.getGraphs(),r=t.length,n=0;n<r;n++)e=e.concat(t[n].getNodes());this.allNodes=e}return this.allNodes},n.prototype.resetAllNodes=function(){this.allNodes=null},n.prototype.resetAllEdges=function(){this.allEdges=null},n.prototype.resetAllNodesToApplyGravitation=function(){this.allNodesToApplyGravitation=null},n.prototype.getAllEdges=function(){if(null==this.allEdges){for(var e=[],t=this.getGraphs(),r=(t.length,0);r<t.length;r++)e=e.concat(t[r].getEdges());e=e.concat(this.edges),this.allEdges=e}return this.allEdges},n.prototype.getAllNodesToApplyGravitation=function(){return this.allNodesToApplyGravitation},n.prototype.setAllNodesToApplyGravitation=function(e){if(null!=this.allNodesToApplyGravitation)throw"assert failed";this.allNodesToApplyGravitation=e},n.prototype.getRoot=function(){return this.rootGraph},n.prototype.setRootGraph=function(e){if(e.getGraphManager()!=this)throw"Root not in this graph mgr!";null==(this.rootGraph=e).parent&&(e.parent=this.layout.newNode("Root node"))},n.prototype.getLayout=function(){return this.layout},n.prototype.isOneAncestorOfOther=function(e,t){if(null==e||null==t)throw"assert failed";if(e==t)return!0;for(var r,n=e.getOwner();null!=(r=n.getParent());){if(r==t)return!0;if(null==(n=r.getOwner()))break}for(n=t.getOwner();null!=(r=n.getParent());){if(r==e)return!0;if(null==(n=r.getOwner()))break}return!1},n.prototype.calcLowestCommonAncestors=function(){for(var e,t,r,n,i,a=this.getAllEdges(),s=a.length,o=0;o<s;o++)if(t=(e=a[o]).source,r=e.target,e.lca=null,(e.sourceInLca=t)==(e.targetInLca=r))e.lca=t.getOwner();else{for(n=t.getOwner();null==e.lca;){for(i=(e.targetInLca=r).getOwner();null==e.lca;){if(i==n){e.lca=i;break}if(i==this.rootGraph)break;if(null!=e.lca)throw"assert failed";e.targetInLca=i.getParent(),i=e.targetInLca.getOwner()}if(n==this.rootGraph)break;null==e.lca&&(e.sourceInLca=n.getParent(),n=e.sourceInLca.getOwner())}if(null==e.lca)throw"assert failed"}},n.prototype.calcLowestCommonAncestor=function(e,t){if(e==t)return e.getOwner();for(var r=e.getOwner();null!=r;){for(var n=t.getOwner();null!=n;){if(n==r)return n;n=n.getParent().getOwner()}r=r.getParent().getOwner()}return r},n.prototype.calcInclusionTreeDepths=function(e,t){null==e&&null==t&&(e=this.rootGraph,t=1);for(var r,n=e.getNodes(),i=n.length,a=0;a<i;a++)(r=n[a]).inclusionTreeDepth=t,null!=r.child&&this.calcInclusionTreeDepths(r.child,t+1)},n.prototype.includesInvalidEdge=function(){for(var e,t=this.edges.length,r=0;r<t;r++)if(e=this.edges[r],this.isOneAncestorOfOther(e.source,e.target))return!0;return!1},e.exports=n},function(e,t,r){var n,i=r(0);function a(){}for(n in mt(a,"FDLayoutConstants"),i)a[n]=i[n];a.MAX_ITERATIONS=2500,a.DEFAULT_EDGE_LENGTH=50,a.DEFAULT_SPRING_STRENGTH=.45,a.DEFAULT_REPULSION_STRENGTH=4500,a.DEFAULT_GRAVITY_STRENGTH=.4,a.DEFAULT_COMPOUND_GRAVITY_STRENGTH=1,a.DEFAULT_GRAVITY_RANGE_FACTOR=3.8,a.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=1.5,a.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION=!0,a.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION=!0,a.DEFAULT_COOLING_FACTOR_INCREMENTAL=.3,a.COOLING_ADAPTATION_FACTOR=.33,a.ADAPTATION_LOWER_NODE_LIMIT=1e3,a.ADAPTATION_UPPER_NODE_LIMIT=5e3,a.MAX_NODE_DISPLACEMENT=3*(a.MAX_NODE_DISPLACEMENT_INCREMENTAL=100),a.MIN_REPULSION_DIST=a.DEFAULT_EDGE_LENGTH/10,a.CONVERGENCE_CHECK_PERIOD=100,a.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=.1,a.MIN_EDGE_LENGTH=1,a.GRID_CALCULATION_CHECK_PERIOD=10,e.exports=a},function(e,t,r){var h=r(12);function n(){}mt(n,"IGeometry"),n.calcSeparationAmount=function(e,t,r,n){if(!e.intersects(t))throw"assert failed";var i=new Array(2),a=(this.decideDirectionsForOverlappingNodes(e,t,i),r[0]=Math.min(e.getRight(),t.getRight())-Math.max(e.x,t.x),r[1]=Math.min(e.getBottom(),t.getBottom())-Math.max(e.y,t.y),e.getX()<=t.getX()&&e.getRight()>=t.getRight()?r[0]+=Math.min(t.getX()-e.getX(),e.getRight()-t.getRight()):t.getX()<=e.getX()&&t.getRight()>=e.getRight()&&(r[0]+=Math.min(e.getX()-t.getX(),t.getRight()-e.getRight())),e.getY()<=t.getY()&&e.getBottom()>=t.getBottom()?r[1]+=Math.min(t.getY()-e.getY(),e.getBottom()-t.getBottom()):t.getY()<=e.getY()&&t.getBottom()>=e.getBottom()&&(r[1]+=Math.min(e.getY()-t.getY(),t.getBottom()-e.getBottom())),Math.abs((t.getCenterY()-e.getCenterY())/(t.getCenterX()-e.getCenterX()))),t=(a=t.getCenterY()===e.getCenterY()&&t.getCenterX()===e.getCenterX()?1:a)*r[0],e=r[1]/a;r[0]<e?e=r[0]:t=r[1],r[0]=-1*i[0]*(e/2+n),r[1]=-1*i[1]*(t/2+n)},n.decideDirectionsForOverlappingNodes=function(e,t,r){e.getCenterX()<t.getCenterX()?r[0]=-1:r[0]=1,e.getCenterY()<t.getCenterY()?r[1]=-1:r[1]=1},n.getIntersection2=function(e,t,r){var n=e.getCenterX(),i=e.getCenterY(),a=t.getCenterX(),s=t.getCenterY();if(e.intersects(t))return r[0]=n,r[1]=i,r[2]=a,r[3]=s,!0;var o=e.getX(),l=e.getY(),c=e.getRight(),h=e.getX(),u=e.getBottom(),d=e.getRight(),p=e.getWidthHalf(),g=e.getHeightHalf(),f=t.getX(),m=t.getY(),y=t.getRight(),v=t.getX(),x=t.getBottom(),b=t.getRight(),w=t.getWidthHalf(),k=t.getHeightHalf(),T=!1,E=!1;if(n===a){if(s<i)return r[0]=n,r[1]=l,r[2]=a,r[3]=x,!1;i<s&&(r[0]=n,r[1]=u,r[2]=a,r[3]=m)}else if(i===s){if(a<n)return r[0]=o,r[1]=i,r[2]=y,r[3]=s,!1;n<a&&(r[0]=c,r[1]=i,r[2]=f,r[3]=s)}else{var e=e.height/e.width,t=t.height/t.width,C=(s-i)/(a-n),_=void 0,S=void 0,A=void 0;if(-e==C?(a<n?(r[0]=h,r[1]=u):(r[0]=c,r[1]=l),T=!0):e==C&&(a<n?(r[0]=o,r[1]=l):(r[0]=d,r[1]=u),T=!0),-t==C?(n<a?(r[2]=v,r[3]=x):(r[2]=y,r[3]=m),E=!0):t==C&&(n<a?(r[2]=f,r[3]=m):(r[2]=b,r[3]=x),E=!0),T&&E)return!1;if(c=a<n?s<i?(_=this.getCardinalDirection(e,C,4),this.getCardinalDirection(t,C,2)):(_=this.getCardinalDirection(-e,C,3),this.getCardinalDirection(-t,C,1)):s<i?(_=this.getCardinalDirection(-e,C,1),this.getCardinalDirection(-t,C,3)):(_=this.getCardinalDirection(e,C,2),this.getCardinalDirection(t,C,4)),!T)switch(_){case 1:S=l,r[0]=n+-g/C,r[1]=S;break;case 2:S=i+p*C,r[0]=d,r[1]=S;break;case 3:S=u,r[0]=n+g/C,r[1]=S;break;case 4:S=i+-p*C,r[0]=h,r[1]=S}if(!E)switch(c){case 1:A=m,r[2]=a+-k/C,r[3]=A;break;case 2:A=s+w*C,r[2]=b,r[3]=A;break;case 3:A=x,r[2]=a+k/C,r[3]=A;break;case 4:A=s+-w*C,r[2]=v,r[3]=A}}return!1},n.getCardinalDirection=function(e,t,r){return t<e?r:1+r%4},n.getIntersection=function(e,t,r,n){var i,a,s,o,l,c;return null==n?this.getIntersection2(e,t,r):(i=e.x,a=t.x,l=r.x,o=a*(e=e.y)-i*(t=t.y),c=(s=n.x)*(r=r.y)-l*(n=n.y),0==(n=(t-=e)*(e=l-s)-(l=n-r)*(s=i-a))?null:new h((s*c-e*o)/n,(l*o-t*c)/n))},n.angleOfVector=function(e,t,r,n){var i=void 0;return e!==r?(i=Math.atan((n-t)/(r-e)),r<e?i+=Math.PI:n<t&&(i+=this.TWO_PI)):i=n<t?this.ONE_AND_HALF_PI:this.HALF_PI,i},n.doIntersect=function(e,t,r,n){var i=e.x,e=e.y,a=t.x,t=t.y,s=r.x,r=r.y,o=n.x,l=(a-i)*((n=n.y)-r)-(o-s)*(t-e);return 0!=l&&(t=((e-t)*(o-i)+(a-i)*(n-e))/l,0<(a=((n-r)*(o-i)+(s-o)*(n-e))/l))&&a<1&&0<t&&t<1},n.HALF_PI=.5*Math.PI,n.ONE_AND_HALF_PI=1.5*Math.PI,n.TWO_PI=2*Math.PI,n.THREE_PI=3*Math.PI,e.exports=n},function(e,t,r){function n(){}mt(n,"IMath"),n.sign=function(e){return 0<e?1:e<0?-1:0},n.floor=function(e){return e<0?Math.ceil(e):Math.floor(e)},n.ceil=function(e){return e<0?Math.floor(e):Math.ceil(e)},e.exports=n},function(e,t,r){function n(){}mt(n,"Integer"),n.MAX_VALUE=2147483647,n.MIN_VALUE=-2147483648,e.exports=n},function(e,t,r){function n(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}mt(n,"defineProperties"),mt(i,"_classCallCheck");var a,s,o=mt(function(e){return{value:e,next:null,prev:null}},"nodeFrom"),l=mt(function(e,t,r,n){return null!==e?e.next=t:n.head=t,null!==r?r.prev=t:n.tail=t,t.prev=e,t.next=r,n.length++,t},"add"),c=mt(function(e,t){var r=e.prev,n=e.next;return null!==r?r.next=n:t.head=n,null!==n?n.prev=r:t.tail=r,e.prev=e.next=null,t.length--,e},"_remove");function h(e){var t=this;i(this,h),this.length=0,this.head=null,this.tail=null,e?.forEach(function(e){return t.push(e)})}mt(h,"LinkedList"),a=h,s=[{key:"size",value:mt(function(){return this.length},"size")},{key:"insertBefore",value:mt(function(e,t){return l(t.prev,o(e),t,this)},"insertBefore")},{key:"insertAfter",value:mt(function(e,t){return l(t,o(e),t.next,this)},"insertAfter")},{key:"insertNodeBefore",value:mt(function(e,t){return l(t.prev,e,t,this)},"insertNodeBefore")},{key:"insertNodeAfter",value:mt(function(e,t){return l(t,e,t.next,this)},"insertNodeAfter")},{key:"push",value:mt(function(e){return l(this.tail,o(e),null,this)},"push")},{key:"unshift",value:mt(function(e){return l(null,o(e),this.head,this)},"unshift")},{key:"remove",value:mt(function(e){return c(e,this)},"remove")},{key:"pop",value:mt(function(){return c(this.tail,this).value},"pop")},{key:"popNode",value:mt(function(){return c(this.tail,this)},"popNode")},{key:"shift",value:mt(function(){return c(this.head,this).value},"shift")},{key:"shiftNode",value:mt(function(){return c(this.head,this)},"shiftNode")},{key:"get_object_at",value:mt(function(e){if(e<=this.length()){for(var t=1,r=this.head;t<e;)r=r.next,t++;return r.value}},"get_object_at")},{key:"set_object_at",value:mt(function(e,t){if(e<=this.length()){for(var r=1,n=this.head;r<e;)n=n.next,r++;n.value=t}},"set_object_at")}],n(a.prototype,s),e.exports=h},function(e,t,r){function n(e,t,r){this.x=null,(this.y=null)==e&&null==t&&null==r?(this.x=0,this.y=0):"number"==typeof e&&"number"==typeof t&&null==r?(this.x=e,this.y=t):"Point"==e.constructor.name&&null==t&&null==r&&(this.x=(r=e).x,this.y=r.y)}mt(n,"Point"),n.prototype.getX=function(){return this.x},n.prototype.getY=function(){return this.y},n.prototype.getLocation=function(){return new n(this.x,this.y)},n.prototype.setLocation=function(e,t,r){"Point"==e.constructor.name&&null==t&&null==r?this.setLocation((r=e).x,r.y):"number"==typeof e&&"number"==typeof t&&null==r&&(parseInt(e)==e&&parseInt(t)==t?this.move(e,t):(this.x=Math.floor(e+.5),this.y=Math.floor(t+.5)))},n.prototype.move=function(e,t){this.x=e,this.y=t},n.prototype.translate=function(e,t){this.x+=e,this.y+=t},n.prototype.equals=function(e){return"Point"==e.constructor.name?this.x==e.x&&this.y==e.y:this==e},n.prototype.toString=function(){return(new n).constructor.name+"[x="+this.x+",y="+this.y+"]"},e.exports=n},function(e,t,r){function n(e,t,r,n){this.x=0,this.y=0,this.width=0,this.height=0,null!=e&&null!=t&&null!=r&&null!=n&&(this.x=e,this.y=t,this.width=r,this.height=n)}mt(n,"RectangleD"),n.prototype.getX=function(){return this.x},n.prototype.setX=function(e){this.x=e},n.prototype.getY=function(){return this.y},n.prototype.setY=function(e){this.y=e},n.prototype.getWidth=function(){return this.width},n.prototype.setWidth=function(e){this.width=e},n.prototype.getHeight=function(){return this.height},n.prototype.setHeight=function(e){this.height=e},n.prototype.getRight=function(){return this.x+this.width},n.prototype.getBottom=function(){return this.y+this.height},n.prototype.intersects=function(e){return!(this.getRight()<e.x||this.getBottom()<e.y||e.getRight()<this.x||e.getBottom()<this.y)},n.prototype.getCenterX=function(){return this.x+this.width/2},n.prototype.getMinX=function(){return this.getX()},n.prototype.getMaxX=function(){return this.getX()+this.width},n.prototype.getCenterY=function(){return this.y+this.height/2},n.prototype.getMinY=function(){return this.getY()},n.prototype.getMaxY=function(){return this.getY()+this.height},n.prototype.getWidthHalf=function(){return this.width/2},n.prototype.getHeightHalf=function(){return this.height/2},e.exports=n},function(e,t,r){var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};function i(){}mt(i,"UniqueIDGeneretor"),i.lastID=0,i.createID=function(e){return i.isPrimitive(e)?e:(null==e.uniqueID&&(e.uniqueID=i.getString(),i.lastID++),e.uniqueID)},i.getString=function(e){return"Object#"+(null==e?i.lastID:e)},i.isPrimitive=function(e){var t="u"<typeof e?"undefined":n(e);return null==e||"object"!=t&&"function"!=t},e.exports=i},function(e,t,r){function g(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];return r}return Array.from(e)}mt(g,"_toConsumableArray");var n=r(0),i=r(6),a=r(3),s=r(1),o=r(5),l=r(4),c=r(17),h=r(27);function u(e){h.call(this),this.layoutQuality=n.QUALITY,this.createBendsAsNeeded=n.DEFAULT_CREATE_BENDS_AS_NEEDED,this.incremental=n.DEFAULT_INCREMENTAL,this.animationOnLayout=n.DEFAULT_ANIMATION_ON_LAYOUT,this.animationDuringLayout=n.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=n.DEFAULT_ANIMATION_PERIOD,this.uniformLeafNodeSizes=n.DEFAULT_UNIFORM_LEAF_NODE_SIZES,this.edgeToDummyNodes=new Map,this.graphManager=new i(this),this.isLayoutFinished=!1,this.isSubLayout=!1,this.isRemoteUse=!1,null!=e&&(this.isRemoteUse=e)}mt(u,"Layout"),u.RANDOM_SEED=1,(u.prototype=Object.create(h.prototype)).getGraphManager=function(){return this.graphManager},u.prototype.getAllNodes=function(){return this.graphManager.getAllNodes()},u.prototype.getAllEdges=function(){return this.graphManager.getAllEdges()},u.prototype.getAllNodesToApplyGravitation=function(){return this.graphManager.getAllNodesToApplyGravitation()},u.prototype.newGraphManager=function(){var e=new i(this);return this.graphManager=e},u.prototype.newGraph=function(e){return new o(null,this.graphManager,e)},u.prototype.newNode=function(e){return new a(this.graphManager,e)},u.prototype.newEdge=function(e){return new s(null,null,e)},u.prototype.checkLayoutSuccess=function(){return null==this.graphManager.getRoot()||0==this.graphManager.getRoot().getNodes().length||this.graphManager.includesInvalidEdge()},u.prototype.runLayout=function(){var e;return this.isLayoutFinished=!1,this.tilingPreLayout&&this.tilingPreLayout(),this.initParameters(),e=!this.checkLayoutSuccess()&&this.layout(),"during"!==n.ANIMATE&&(e&&!this.isSubLayout&&this.doPostLayout(),this.tilingPostLayout&&this.tilingPostLayout(),this.isLayoutFinished=!0,e)},u.prototype.doPostLayout=function(){this.incremental||this.transform(),this.update()},u.prototype.update2=function(){if(this.createBendsAsNeeded&&(this.createBendpointsFromDummyNodes(),this.graphManager.resetAllEdges()),!this.isRemoteUse){for(var e=this.graphManager.getAllEdges(),t=0;t<e.length;t++)e[t];for(var r=this.graphManager.getRoot().getNodes(),t=0;t<r.length;t++)r[t];this.update(this.graphManager.getRoot())}},u.prototype.update=function(e){if(null==e)this.update2();else if(e instanceof a){var t=e;if(null!=t.getChild())for(var r=t.getChild().getNodes(),n=0;n<r.length;n++)update(r[n]);null!=t.vGraphObject&&t.vGraphObject.update(t)}else e instanceof s?null!=e.vGraphObject&&e.vGraphObject.update(e):e instanceof o&&null!=e.vGraphObject&&e.vGraphObject.update(e)},u.prototype.initParameters=function(){this.isSubLayout||(this.layoutQuality=n.QUALITY,this.animationDuringLayout=n.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=n.DEFAULT_ANIMATION_PERIOD,this.animationOnLayout=n.DEFAULT_ANIMATION_ON_LAYOUT,this.incremental=n.DEFAULT_INCREMENTAL,this.createBendsAsNeeded=n.DEFAULT_CREATE_BENDS_AS_NEEDED,this.uniformLeafNodeSizes=n.DEFAULT_UNIFORM_LEAF_NODE_SIZES),this.animationDuringLayout&&(this.animationOnLayout=!1)},u.prototype.transform=function(e){if(null==e)this.transform(new l(0,0));else{var t=new c,r=this.graphManager.getRoot().updateLeftTop();if(null!=r){t.setWorldOrgX(e.x),t.setWorldOrgY(e.y),t.setDeviceOrgX(r.x),t.setDeviceOrgY(r.y);for(var n=this.getAllNodes(),i=0;i<n.length;i++)n[i].transform(t)}}},u.prototype.positionNodesRandomly=function(e){if(null==e)this.positionNodesRandomly(this.getGraphManager().getRoot()),this.getGraphManager().getRoot().updateBounds(!0);else for(var t,r,n=e.getNodes(),i=0;i<n.length;i++)null==(r=(t=n[i]).getChild())||0==r.getNodes().length?t.scatter():(this.positionNodesRandomly(r),t.updateBounds())},u.prototype.getFlatForest=function(){for(var e=[],t=!0,r=this.graphManager.getRoot().getNodes(),n=!0,i=0;i<r.length;i++)null!=r[i].getChild()&&(n=!1);if(n)for(var a=new Set,s=[],o=new Map,l=(l=[]).concat(r);0<l.length&&t;){for(s.push(l[0]);0<s.length&&t;){var c=s[0];s.splice(0,1),a.add(c);for(var h=c.getEdges(),i=0;i<h.length;i++){var u=h[i].getOtherEnd(c);if(o.get(c)!=u){if(a.has(u)){t=!1;break}s.push(u),o.set(u,c)}}}if(t){var d=[].concat(g(a));for(e.push(d),i=0;i<d.length;i++){var p=d[i];-1<(p=l.indexOf(p))&&l.splice(p,1)}a=new Set,o=new Map}else e=[]}return e},u.prototype.createDummyNodesForBendpoints=function(e){for(var t=[],r=e.source,n=this.graphManager.calcLowestCommonAncestor(e.source,e.target),i=0;i<e.bendpoints.length;i++){var a=this.newNode(null),s=(a.setRect(new Point(0,0),new Dimension(1,1)),n.add(a),this.newEdge(null));this.graphManager.add(s,r,a),t.add(a),r=a}return s=this.newEdge(null),this.graphManager.add(s,r,e.target),this.edgeToDummyNodes.set(e,t),(e.isInterGraph()?this.graphManager:n).remove(e),t},u.prototype.createBendpointsFromDummyNodes=function(){for(var e=(e=[]).concat(this.graphManager.getAllEdges()),e=[].concat(g(this.edgeToDummyNodes.keys())).concat(e),t=0;t<e.length;t++){var r=e[t];if(0<r.bendpoints.length){for(var n=this.edgeToDummyNodes.get(r),i=0;i<n.length;i++){var a=n[i],s=new l(a.getCenterX(),a.getCenterY()),o=r.bendpoints.get(i);o.x=s.x,o.y=s.y,a.getOwner().remove(a)}this.graphManager.add(r,r.source,r.target)}}},u.transform=function(e,t,r,n){var i,a;return null!=r&&null!=n?(i=t,e<=50?i-=(t-t/r)/50*(50-e):i+=(t*n-t)/50*(e-50),i):(r=e<=50?(a=9*t/500,t/10):(a=9*t/50,-8*t),a*e+r)},u.findCenterOfTree=function(e){var t=(t=[]).concat(e),r=[],n=new Map,i=!1,a=null;1!=t.length&&2!=t.length||(i=!0,a=t[0]);for(var s=0;s<t.length;s++){var o=(c=t[s]).getNeighborsList().size;n.set(c,c.getNeighborsList().size),1==o&&r.push(c)}for(l=(l=[]).concat(r);!i;){[].concat(l);for(var l=[],s=0;s<t.length;s++){var c=t[s],h=t.indexOf(c);0<=h&&t.splice(h,1),c.getNeighborsList().forEach(function(e){var t;r.indexOf(e)<0&&(1==(t=n.get(e)-1)&&l.push(e),n.set(e,t))})}r=r.concat(l),1!=t.length&&2!=t.length||(i=!0,a=t[0])}return a},u.prototype.setGraphManager=function(e){this.graphManager=e},e.exports=u},function(e,t,r){function n(){}mt(n,"RandomSeed"),n.seed=1,n.x=0,n.nextDouble=function(){return(n.x=1e4*Math.sin(n.seed++))-Math.floor(n.x)},e.exports=n},function(e,t,r){var n=r(4);function i(e,t){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}mt(i,"Transform"),i.prototype.getWorldOrgX=function(){return this.lworldOrgX},i.prototype.setWorldOrgX=function(e){this.lworldOrgX=e},i.prototype.getWorldOrgY=function(){return this.lworldOrgY},i.prototype.setWorldOrgY=function(e){this.lworldOrgY=e},i.prototype.getWorldExtX=function(){return this.lworldExtX},i.prototype.setWorldExtX=function(e){this.lworldExtX=e},i.prototype.getWorldExtY=function(){return this.lworldExtY},i.prototype.setWorldExtY=function(e){this.lworldExtY=e},i.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},i.prototype.setDeviceOrgX=function(e){this.ldeviceOrgX=e},i.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},i.prototype.setDeviceOrgY=function(e){this.ldeviceOrgY=e},i.prototype.getDeviceExtX=function(){return this.ldeviceExtX},i.prototype.setDeviceExtX=function(e){this.ldeviceExtX=e},i.prototype.getDeviceExtY=function(){return this.ldeviceExtY},i.prototype.setDeviceExtY=function(e){this.ldeviceExtY=e},i.prototype.transformX=function(e){var t=this.lworldExtX;return 0!=t?this.ldeviceOrgX+(e-this.lworldOrgX)*this.ldeviceExtX/t:0},i.prototype.transformY=function(e){var t=this.lworldExtY;return 0!=t?this.ldeviceOrgY+(e-this.lworldOrgY)*this.ldeviceExtY/t:0},i.prototype.inverseTransformX=function(e){var t=this.ldeviceExtX;return 0!=t?this.lworldOrgX+(e-this.ldeviceOrgX)*this.lworldExtX/t:0},i.prototype.inverseTransformY=function(e){var t=this.ldeviceExtY;return 0!=t?this.lworldOrgY+(e-this.ldeviceOrgY)*this.lworldExtY/t:0},i.prototype.inverseTransformPoint=function(e){return new n(this.inverseTransformX(e.x),this.inverseTransformY(e.y))},e.exports=i},function(e,t,r){function d(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];return r}return Array.from(e)}mt(d,"_toConsumableArray");var n,i=r(15),p=r(7),o=r(0),c=r(8),h=r(9);function a(){i.call(this),this.useSmartIdealEdgeLengthCalculation=p.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.idealEdgeLength=p.DEFAULT_EDGE_LENGTH,this.springConstant=p.DEFAULT_SPRING_STRENGTH,this.repulsionConstant=p.DEFAULT_REPULSION_STRENGTH,this.gravityConstant=p.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=p.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=p.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=p.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.displacementThresholdPerNode=3*p.DEFAULT_EDGE_LENGTH/100,this.coolingFactor=p.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.initialCoolingFactor=p.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.totalDisplacement=0,this.oldTotalDisplacement=0,this.maxIterations=p.MAX_ITERATIONS}for(n in mt(a,"FDLayout"),a.prototype=Object.create(i.prototype),i)a[n]=i[n];a.prototype.initParameters=function(){i.prototype.initParameters.call(this,arguments),this.totalIterations=0,this.notAnimatedIterations=0,this.useFRGridVariant=p.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION,this.grid=[]},a.prototype.calcIdealEdgeLengths=function(){for(var e,t,r,n,i,a=this.getGraphManager().getAllEdges(),s=0;s<a.length;s++)(e=a[s]).idealLength=this.idealEdgeLength,e.isInterGraph&&(t=e.getSource(),r=e.getTarget(),n=e.getSourceInLca().getEstimatedSize(),i=e.getTargetInLca().getEstimatedSize(),this.useSmartIdealEdgeLengthCalculation&&(e.idealLength+=n+i-2*o.SIMPLE_NODE_SIZE),n=e.getLca().getInclusionTreeDepth(),e.idealLength+=p.DEFAULT_EDGE_LENGTH*p.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR*(t.getInclusionTreeDepth()+r.getInclusionTreeDepth()-2*n))},a.prototype.initSpringEmbedder=function(){var e=this.getAllNodes().length;this.incremental?(e>p.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*p.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(e-p.ADAPTATION_LOWER_NODE_LIMIT)/(p.ADAPTATION_UPPER_NODE_LIMIT-p.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-p.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=p.MAX_NODE_DISPLACEMENT_INCREMENTAL):(e>p.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(p.COOLING_ADAPTATION_FACTOR,1-(e-p.ADAPTATION_LOWER_NODE_LIMIT)/(p.ADAPTATION_UPPER_NODE_LIMIT-p.ADAPTATION_LOWER_NODE_LIMIT)*(1-p.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=p.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(5*this.getAllNodes().length,this.maxIterations),this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},a.prototype.calcSpringForces=function(){for(var e,t=this.getAllEdges(),r=0;r<t.length;r++)e=t[r],this.calcSpringForce(e,e.idealLength)},a.prototype.calcRepulsionForces=function(){var e,t,r,n,i,a=!(0<arguments.length&&void 0!==arguments[0])||arguments[0],s=1<arguments.length&&void 0!==arguments[1]&&arguments[1],o=this.getAllNodes();if(this.useFRGridVariant)for(this.totalIterations%p.GRID_CALCULATION_CHECK_PERIOD==1&&a&&this.updateGrid(),i=new Set,e=0;e<o.length;e++)r=o[e],this.calculateRepulsionForceOfANode(r,i,a,s),i.add(r);else for(e=0;e<o.length;e++)for(r=o[e],t=e+1;t<o.length;t++)n=o[t],r.getOwner()==n.getOwner()&&this.calcRepulsionForce(r,n)},a.prototype.calcGravitationalForces=function(){for(var e,t=this.getAllNodesToApplyGravitation(),r=0;r<t.length;r++)e=t[r],this.calcGravitationalForce(e)},a.prototype.moveNodes=function(){for(var e=this.getAllNodes(),t=0;t<e.length;t++)e[t].move()},a.prototype.calcSpringForce=function(e,t){var r,n,i=e.getSource(),a=e.getTarget();if(this.uniformLeafNodeSizes&&null==i.getChild()&&null==a.getChild())e.updateLengthSimple();else if(e.updateLength(),e.isOverlapingSourceAndTarget)return;0!=(r=e.getLength())&&(n=(t=this.springConstant*(r-t))*(e.lengthX/r),e=e.lengthY/r*t,i.springForceX+=n,i.springForceY+=e,a.springForceX-=n,a.springForceY-=e)},a.prototype.calcRepulsionForce=function(e,t){var r,n,i,a=e.getRect(),s=t.getRect(),o=new Array(2),l=new Array(4);a.intersects(s)?(c.calcSeparationAmount(a,s,o,p.DEFAULT_EDGE_LENGTH/2),n=2*o[0],i=2*o[1],o=e.noOfChildren*t.noOfChildren/(e.noOfChildren+t.noOfChildren),e.repulsionForceX-=o*n,e.repulsionForceY-=o*i,t.repulsionForceX+=o*n,t.repulsionForceY+=o*i):(o=this.uniformLeafNodeSizes&&null==e.getChild()&&null==t.getChild()?(r=s.getCenterX()-a.getCenterX(),s.getCenterY()-a.getCenterY()):(c.getIntersection(a,s,l),r=l[2]-l[0],l[3]-l[1]),a=(r=Math.abs(r)<p.MIN_REPULSION_DIST?h.sign(r)*p.MIN_REPULSION_DIST:r)*r+(o=Math.abs(o)<p.MIN_REPULSION_DIST?h.sign(o)*p.MIN_REPULSION_DIST:o)*o,s=Math.sqrt(a),i=(l=this.repulsionConstant*e.noOfChildren*t.noOfChildren/a)*o/s,e.repulsionForceX-=n=l*r/s,e.repulsionForceY-=i,t.repulsionForceX+=n,t.repulsionForceY+=i)},a.prototype.calcGravitationalForce=function(e){var t,r=e.getOwner(),n=(r.getRight()+r.getLeft())/2,i=(r.getTop()+r.getBottom())/2,n=e.getCenterX()-n,i=e.getCenterY()-i,a=Math.abs(n)+e.getWidth()/2,s=Math.abs(i)+e.getHeight()/2;e.getOwner()==this.graphManager.getRoot()?((t=r.getEstimatedSize()*this.gravityRangeFactor)<a||t<s)&&(e.gravitationForceX=-this.gravityConstant*n,e.gravitationForceY=-this.gravityConstant*i):((t=r.getEstimatedSize()*this.compoundGravityRangeFactor)<a||t<s)&&(e.gravitationForceX=-this.gravityConstant*n*this.compoundGravityConstant,e.gravitationForceY=-this.gravityConstant*i*this.compoundGravityConstant)},a.prototype.isConverged=function(){var e,t=!1;return this.totalIterations>this.maxIterations/3&&(t=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),e=this.totalDisplacement<this.totalDisplacementThreshold,this.oldTotalDisplacement=this.totalDisplacement,e||t},a.prototype.animate=function(){this.animationDuringLayout&&!this.isSubLayout&&(this.notAnimatedIterations==this.animationPeriod?(this.update(),this.notAnimatedIterations=0):this.notAnimatedIterations++)},a.prototype.calcNoOfChildrenForAllNodes=function(){for(var e,t=this.graphManager.getAllNodes(),r=0;r<t.length;r++)(e=t[r]).noOfChildren=e.getNoOfChildren()},a.prototype.calcGrid=function(e){for(var t=parseInt(Math.ceil((e.getRight()-e.getLeft())/this.repulsionRange)),r=parseInt(Math.ceil((e.getBottom()-e.getTop())/this.repulsionRange)),n=new Array(t),i=0;i<t;i++)n[i]=new Array(r);for(i=0;i<t;i++)for(var a=0;a<r;a++)n[i][a]=new Array;return n},a.prototype.addNodeToGrid=function(e,t,r){for(var n=parseInt(Math.floor((e.getRect().x-t)/this.repulsionRange)),i=parseInt(Math.floor((e.getRect().width+e.getRect().x-t)/this.repulsionRange)),a=parseInt(Math.floor((e.getRect().y-r)/this.repulsionRange)),s=parseInt(Math.floor((e.getRect().height+e.getRect().y-r)/this.repulsionRange)),o=n;o<=i;o++)for(var l=a;l<=s;l++)this.grid[o][l].push(e),e.setGridCoordinates(n,i,a,s)},a.prototype.updateGrid=function(){var e,t,r=this.getAllNodes();for(this.grid=this.calcGrid(this.graphManager.getRoot()),e=0;e<r.length;e++)t=r[e],this.addNodeToGrid(t,this.graphManager.getRoot().getLeft(),this.graphManager.getRoot().getTop())},a.prototype.calculateRepulsionForceOfANode=function(e,t,r,n){if(this.totalIterations%p.GRID_CALCULATION_CHECK_PERIOD==1&&r||n){var i=new Set;e.surrounding=new Array;for(var a=this.grid,s=e.startX-1;s<e.finishX+2;s++)for(var o=e.startY-1;o<e.finishY+2;o++)if(!(s<0||o<0||s>=a.length||o>=a[0].length))for(var l=0;l<a[s][o].length;l++){var c,h,u=a[s][o][l];e.getOwner()!=u.getOwner()||e==u||t.has(u)||i.has(u)||(c=Math.abs(e.getCenterX()-u.getCenterX())-(e.getWidth()/2+u.getWidth()/2),h=Math.abs(e.getCenterY()-u.getCenterY())-(e.getHeight()/2+u.getHeight()/2),c<=this.repulsionRange&&h<=this.repulsionRange&&i.add(u))}e.surrounding=[].concat(d(i))}for(s=0;s<e.surrounding.length;s++)this.calcRepulsionForce(e,e.surrounding[s])},a.prototype.calcRepulsionRange=function(){return 0},e.exports=a},function(e,t,r){var n,i=r(1),a=r(7);function s(e,t,r){i.call(this,e,t,r),this.idealLength=a.DEFAULT_EDGE_LENGTH}for(n in mt(s,"FDLayoutEdge"),s.prototype=Object.create(i.prototype),i)s[n]=i[n];e.exports=s},function(e,t,r){var n,i=r(3);function a(e,t,r,n){i.call(this,e,t,r,n),this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0,this.startX=0,this.finishX=0,this.startY=0,this.finishY=0,this.surrounding=[]}for(n in mt(a,"FDLayoutNode"),a.prototype=Object.create(i.prototype),i)a[n]=i[n];a.prototype.setGridCoordinates=function(e,t,r,n){this.startX=e,this.finishX=t,this.startY=r,this.finishY=n},e.exports=a},function(e,t,r){function n(e,t){this.width=0,this.height=0,null!==e&&null!==t&&(this.height=t,this.width=e)}mt(n,"DimensionD"),n.prototype.getWidth=function(){return this.width},n.prototype.setWidth=function(e){this.width=e},n.prototype.getHeight=function(){return this.height},n.prototype.setHeight=function(e){this.height=e},e.exports=n},function(e,t,r){var n=r(14);function i(){this.map={},this.keys=[]}mt(i,"HashMap"),i.prototype.put=function(e,t){var r=n.createID(e);this.contains(r)||(this.map[r]=t,this.keys.push(e))},i.prototype.contains=function(e){return n.createID(e),null!=this.map[e]},i.prototype.get=function(e){return e=n.createID(e),this.map[e]},i.prototype.keySet=function(){return this.keys},e.exports=i},function(e,t,r){var n=r(14);function i(){this.set={}}mt(i,"HashSet"),i.prototype.add=function(e){var t=n.createID(e);this.contains(t)||(this.set[t]=e)},i.prototype.remove=function(e){delete this.set[n.createID(e)]},i.prototype.clear=function(){this.set={}},i.prototype.contains=function(e){return this.set[n.createID(e)]==e},i.prototype.isEmpty=function(){return 0===this.size()},i.prototype.size=function(){return Object.keys(this.set).length},i.prototype.addAllTo=function(e){for(var t=Object.keys(this.set),r=t.length,n=0;n<r;n++)e.push(this.set[t[n]])},i.prototype.size=function(){return Object.keys(this.set).length},i.prototype.addAll=function(e){for(var t=e.length,r=0;r<t;r++){var n=e[r];this.add(n)}},e.exports=i},function(e,t,r){function n(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}mt(n,"defineProperties"),mt(i,"_classCallCheck");var a,s,o=r(11),r=(mt(l,"Quicksort"),a=l,s=[{key:"_quicksort",value:mt(function(e,t,r){var n;t<r&&(n=this._partition(e,t,r),this._quicksort(e,t,n),this._quicksort(e,n+1,r))},"_quicksort")},{key:"_partition",value:mt(function(e,t,r){for(var n=this._get(e,t),i=t,a=r;;){for(;this.compareFunction(n,this._get(e,a));)a--;for(;this.compareFunction(this._get(e,i),n);)i++;if(!(i<a))return a;this._swap(e,i,a),i++,a--}},"_partition")},{key:"_get",value:mt(function(e,t){return e instanceof o?e.get_object_at(t):e[t]},"_get")},{key:"_set",value:mt(function(e,t,r){e instanceof o?e.set_object_at(t,r):e[t]=r},"_set")},{key:"_swap",value:mt(function(e,t,r){var n=this._get(e,t);this._set(e,t,this._get(e,r)),this._set(e,r,n)},"_swap")},{key:"_defaultCompareFunction",value:mt(function(e,t){return e<t},"_defaultCompareFunction")}],n(a.prototype,s),l);function l(e,t){i(this,l),null===t&&void 0===t||(this.compareFunction=this._defaultCompareFunction),t=void 0,t=e instanceof o?e.size():e.length,this._quicksort(e,0,t-1)}e.exports=r},function(e,t,r){var n,i;function a(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function h(e,t){var r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:1,n=3<arguments.length&&void 0!==arguments[3]?arguments[3]:-1,i=4<arguments.length&&void 0!==arguments[4]?arguments[4]:-1;c(this,h),this.sequence1=e,this.sequence2=t,this.match_score=r,this.mismatch_penalty=n,this.gap_penalty=i,this.iMax=e.length+1,this.jMax=t.length+1,this.grid=new Array(this.iMax);for(var a=0;a<this.iMax;a++){this.grid[a]=new Array(this.jMax);for(var s=0;s<this.jMax;s++)this.grid[a][s]=0}this.tracebackGrid=new Array(this.iMax);for(var o=0;o<this.iMax;o++){this.tracebackGrid[o]=new Array(this.jMax);for(var l=0;l<this.jMax;l++)this.tracebackGrid[o][l]=[null,null,null]}this.alignments=[],this.score=-1,this.computeGrids()}mt(a,"defineProperties"),mt(c,"_classCallCheck"),mt(h,"NeedlemanWunsch"),n=h,i=[{key:"getScore",value:mt(function(){return this.score},"getScore")},{key:"getAlignments",value:mt(function(){return this.alignments},"getAlignments")},{key:"computeGrids",value:mt(function(){for(var e=1;e<this.jMax;e++)this.grid[0][e]=this.grid[0][e-1]+this.gap_penalty,this.tracebackGrid[0][e]=[!1,!1,!0];for(var t=1;t<this.iMax;t++)this.grid[t][0]=this.grid[t-1][0]+this.gap_penalty,this.tracebackGrid[t][0]=[!1,!0,!1];for(var r=1;r<this.iMax;r++)for(var n=1;n<this.jMax;n++){var i=[this.sequence1[r-1]===this.sequence2[n-1]?this.grid[r-1][n-1]+this.match_score:this.grid[r-1][n-1]+this.mismatch_penalty,this.grid[r-1][n]+this.gap_penalty,this.grid[r][n-1]+this.gap_penalty],a=this.arrayAllMaxIndexes(i);this.grid[r][n]=i[a[0]],this.tracebackGrid[r][n]=[a.includes(0),a.includes(1),a.includes(2)]}this.score=this.grid[this.iMax-1][this.jMax-1]},"computeGrids")},{key:"alignmentTraceback",value:mt(function(){var e=[];for(e.push({pos:[this.sequence1.length,this.sequence2.length],seq1:"",seq2:""});e[0];){var t=e[0],r=this.tracebackGrid[t.pos[0]][t.pos[1]];r[0]&&e.push({pos:[t.pos[0]-1,t.pos[1]-1],seq1:this.sequence1[t.pos[0]-1]+t.seq1,seq2:this.sequence2[t.pos[1]-1]+t.seq2}),r[1]&&e.push({pos:[t.pos[0]-1,t.pos[1]],seq1:this.sequence1[t.pos[0]-1]+t.seq1,seq2:"-"+t.seq2}),r[2]&&e.push({pos:[t.pos[0],t.pos[1]-1],seq1:"-"+t.seq1,seq2:this.sequence2[t.pos[1]-1]+t.seq2}),0===t.pos[0]&&0===t.pos[1]&&this.alignments.push({sequence1:t.seq1,sequence2:t.seq2}),e.shift()}return this.alignments},"alignmentTraceback")},{key:"getAllIndexes",value:mt(function(e,t){for(var r=[],n=-1;-1!==(n=e.indexOf(t,n+1));)r.push(n);return r},"getAllIndexes")},{key:"arrayAllMaxIndexes",value:mt(function(e){return this.getAllIndexes(e,Math.max.apply(null,e))},"arrayAllMaxIndexes")}],a(n.prototype,i),e.exports=h},function(e,t,r){var n=mt(function(){},"layoutBase");n.FDLayout=r(18),n.FDLayoutConstants=r(7),n.FDLayoutEdge=r(19),n.FDLayoutNode=r(20),n.DimensionD=r(21),n.HashMap=r(22),n.HashSet=r(23),n.IGeometry=r(8),n.IMath=r(9),n.Integer=r(10),n.Point=r(12),n.PointD=r(4),n.RandomSeed=r(16),n.RectangleD=r(13),n.Transform=r(17),n.UniqueIDGeneretor=r(14),n.Quicksort=r(24),n.LinkedList=r(11),n.LGraphObject=r(2),n.LGraph=r(5),n.LEdge=r(1),n.LGraphManager=r(6),n.LNode=r(3),n.Layout=r(15),n.LayoutConstants=r(0),n.NeedlemanWunsch=r(25),e.exports=n},function(e,t,r){function n(){this.listeners=[]}mt(n,"Emitter");var i=n.prototype;i.addListener=function(e,t){this.listeners.push({event:e,callback:t})},i.removeListener=function(e,t){for(var r=this.listeners.length;0<=r;r--){var n=this.listeners[r];n.event===e&&n.callback===t&&this.listeners.splice(r,1)}},i.emit=function(e,t){for(var r=0;r<this.listeners.length;r++){var n=this.listeners[r];e===n.event&&n.callback(t)}},e.exports=n}],i={},mt(n,"__webpack_require__"),n.m=r,n.c=i,n.i=function(e){return e},n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.n=function(e){var t=e&&e.__esModule?mt(function(){return e.default},"getDefault"):mt(function(){return e},"getModuleExports");return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=26);function n(e){var t;return(i[e]||(t=i[e]={i:e,l:!1,exports:{}},r[e].call(t.exports,t,t.exports,n),t.l=!0,t)).exports}var r,i})}),yhe=NFe((r,n)=>{mt(function(e,t){"object"==typeof r&&"object"==typeof n?n.exports=t(mhe()):"function"==typeof define&&define.amd?define(["layout-base"],t):"object"==typeof r?r.coseBase=t(mhe()):e.coseBase=t(e.layoutBase)},"webpackUniversalModuleDefinition")(r,function(r){return i=[function(e,t){e.exports=r},function(e,t,r){var n,i=r(0).FDLayoutConstants;function a(){}for(n in mt(a,"CoSEConstants"),i)a[n]=i[n];a.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,a.DEFAULT_RADIAL_SEPARATION=i.DEFAULT_EDGE_LENGTH,a.DEFAULT_COMPONENT_SEPERATION=60,a.TILE=!0,a.TILING_PADDING_VERTICAL=10,a.TILING_PADDING_HORIZONTAL=10,a.TREE_REDUCTION_ON_INCREMENTAL=!1,e.exports=a},function(e,t,r){var n,i=r(0).FDLayoutEdge;function a(e,t,r){i.call(this,e,t,r)}for(n in mt(a,"CoSEEdge"),a.prototype=Object.create(i.prototype),i)a[n]=i[n];e.exports=a},function(e,t,r){var n,i=r(0).LGraph;function a(e,t,r){i.call(this,e,t,r)}for(n in mt(a,"CoSEGraph"),a.prototype=Object.create(i.prototype),i)a[n]=i[n];e.exports=a},function(e,t,r){var n,i=r(0).LGraphManager;function a(e){i.call(this,e)}for(n in mt(a,"CoSEGraphManager"),a.prototype=Object.create(i.prototype),i)a[n]=i[n];e.exports=a},function(e,t,r){var n,i=r(0).FDLayoutNode,a=r(0).IMath;function s(e,t,r,n){i.call(this,e,t,r,n)}for(n in mt(s,"CoSENode"),s.prototype=Object.create(i.prototype),i)s[n]=i[n];s.prototype.move=function(){var e=this.graphManager.getLayout();this.displacementX=e.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY=e.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren,Math.abs(this.displacementX)>e.coolingFactor*e.maxNodeDisplacement&&(this.displacementX=e.coolingFactor*e.maxNodeDisplacement*a.sign(this.displacementX)),Math.abs(this.displacementY)>e.coolingFactor*e.maxNodeDisplacement&&(this.displacementY=e.coolingFactor*e.maxNodeDisplacement*a.sign(this.displacementY)),null==this.child||0==this.child.getNodes().length?this.moveBy(this.displacementX,this.displacementY):this.propogateDisplacementToChildren(this.displacementX,this.displacementY),e.totalDisplacement+=Math.abs(this.displacementX)+Math.abs(this.displacementY),this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0},s.prototype.propogateDisplacementToChildren=function(e,t){for(var r,n=this.getChild().getNodes(),i=0;i<n.length;i++)null==(r=n[i]).getChild()?(r.moveBy(e,t),r.displacementX+=e,r.displacementY+=t):r.propogateDisplacementToChildren(e,t)},s.prototype.setPred1=function(e){this.pred1=e},s.prototype.getPred1=function(){return pred1},s.prototype.getPred2=function(){return pred2},s.prototype.setNext=function(e){this.next=e},s.prototype.getNext=function(){return next},s.prototype.setProcessed=function(e){this.processed=e},s.prototype.isProcessed=function(){return processed},e.exports=s},function(e,t,r){var n,i=r(0).FDLayout,a=r(4),s=r(3),h=r(5),o=r(2),u=r(1),g=r(0).FDLayoutConstants,d=r(0).LayoutConstants,p=r(0).Point,f=r(0).PointD,m=r(0).Layout,y=r(0).Integer,v=r(0).IGeometry,l=r(0).LGraph,c=r(0).Transform;function x(){i.call(this),this.toBeTiled={}}for(n in mt(x,"CoSELayout"),x.prototype=Object.create(i.prototype),i)x[n]=i[n];x.prototype.newGraphManager=function(){var e=new a(this);return this.graphManager=e},x.prototype.newGraph=function(e){return new s(null,this.graphManager,e)},x.prototype.newNode=function(e){return new h(this.graphManager,e)},x.prototype.newEdge=function(e){return new o(null,null,e)},x.prototype.initParameters=function(){i.prototype.initParameters.call(this,arguments),this.isSubLayout||(u.DEFAULT_EDGE_LENGTH<10?this.idealEdgeLength=10:this.idealEdgeLength=u.DEFAULT_EDGE_LENGTH,this.useSmartIdealEdgeLengthCalculation=u.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.springConstant=g.DEFAULT_SPRING_STRENGTH,this.repulsionConstant=g.DEFAULT_REPULSION_STRENGTH,this.gravityConstant=g.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=g.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=g.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=g.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.prunedNodesAll=[],this.growTreeIterations=0,this.afterGrowthIterations=0,this.isTreeGrowing=!1,this.isGrowthFinished=!1,this.coolingCycle=0,this.maxCoolingCycle=this.maxIterations/g.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=g.CONVERGENCE_CHECK_PERIOD/this.maxIterations,this.coolingAdjuster=1)},x.prototype.layout=function(){return d.DEFAULT_CREATE_BENDS_AS_NEEDED&&(this.createBendpoints(),this.graphManager.resetAllEdges()),this.level=0,this.classicLayout()},x.prototype.classicLayout=function(){var e,t,r;return this.nodesWithGravity=this.calculateNodesToApplyGravitationTo(),this.graphManager.setAllNodesToApplyGravitation(this.nodesWithGravity),this.calcNoOfChildrenForAllNodes(),this.graphManager.calcLowestCommonAncestors(),this.graphManager.calcInclusionTreeDepths(),this.graphManager.getRoot().calcEstimatedSize(),this.calcIdealEdgeLengths(),this.incremental?u.TREE_REDUCTION_ON_INCREMENTAL&&(this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation(),t=new Set(this.getAllNodes()),r=this.nodesWithGravity.filter(function(e){return t.has(e)}),this.graphManager.setAllNodesToApplyGravitation(r)):0<(e=this.getFlatForest()).length?this.positionNodesRadially(e):(this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation(),t=new Set(this.getAllNodes()),r=this.nodesWithGravity.filter(function(e){return t.has(e)}),this.graphManager.setAllNodesToApplyGravitation(r),this.positionNodesRandomly()),this.initSpringEmbedder(),this.runSpringEmbedder(),!0},x.prototype.tick=function(){if(this.totalIterations++,this.totalIterations===this.maxIterations&&!this.isTreeGrowing&&!this.isGrowthFinished){if(!(0<this.prunedNodesAll.length))return!0;this.isTreeGrowing=!0}if(this.totalIterations%g.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged()){if(!(0<this.prunedNodesAll.length))return!0;this.isTreeGrowing=!0}this.coolingCycle++,0==this.layoutQuality?this.coolingAdjuster=this.coolingCycle:1==this.layoutQuality&&(this.coolingAdjuster=this.coolingCycle/3),this.coolingFactor=Math.max(this.initialCoolingFactor-Math.pow(this.coolingCycle,Math.log(100*(this.initialCoolingFactor-this.finalTemperature))/Math.log(this.maxCoolingCycle))/100*this.coolingAdjuster,this.finalTemperature),this.animationPeriod=Math.ceil(this.initialAnimationPeriod*Math.sqrt(this.coolingFactor))}var t;if(this.isTreeGrowing&&(this.growTreeIterations%10==0&&(0<this.prunedNodesAll.length?(this.graphManager.updateBounds(),this.updateGrid(),this.growTree(this.prunedNodesAll),this.graphManager.resetAllNodesToApplyGravitation(),t=new Set(this.getAllNodes()),e=this.nodesWithGravity.filter(function(e){return t.has(e)}),this.graphManager.setAllNodesToApplyGravitation(e),this.graphManager.updateBounds(),this.updateGrid(),this.coolingFactor=g.DEFAULT_COOLING_FACTOR_INCREMENTAL):(this.isTreeGrowing=!1,this.isGrowthFinished=!0)),this.growTreeIterations++),this.isGrowthFinished){if(this.isConverged())return!0;this.afterGrowthIterations%10==0&&(this.graphManager.updateBounds(),this.updateGrid()),this.coolingFactor=g.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var e=!this.isTreeGrowing&&!this.isGrowthFinished,r=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(e,r),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},x.prototype.getPositionsData=function(){for(var e=this.graphManager.getAllNodes(),t={},r=0;r<e.length;r++){var n=e[r].rect,i=e[r].id;t[i]={id:i,x:n.getCenterX(),y:n.getCenterY(),w:n.width,h:n.height}}return t},x.prototype.runSpringEmbedder=function(){this.initialAnimationPeriod=25,this.animationPeriod=this.initialAnimationPeriod;var e=!1;if("during"===g.ANIMATE)this.emit("layoutstarted");else{for(;!e;)e=this.tick();this.graphManager.updateBounds()}},x.prototype.calculateNodesToApplyGravitationTo=function(){for(var e,t=[],r=this.graphManager.getGraphs(),n=r.length,i=0;i<n;i++)(e=r[i]).updateConnected(),e.isConnected||(t=t.concat(e.getNodes()));return t},x.prototype.createBendpoints=function(){for(var e=(e=[]).concat(this.graphManager.getAllEdges()),t=new Set,r=0;r<e.length;r++){var n=e[r];if(!t.has(n)){var i=n.getSource(),a=n.getTarget();if(i==a)n.getBendpoints().push(new f),n.getBendpoints().push(new f),this.createDummyNodesForBendpoints(n),t.add(n);else{var s=(s=(s=[]).concat(i.getEdgeListToNode(a))).concat(a.getEdgeListToNode(i));if(!t.has(s[0])){if(1<s.length)for(var o=0;o<s.length;o++){var l=s[o];l.getBendpoints().push(new f),this.createDummyNodesForBendpoints(l)}s.forEach(function(e){t.add(e)})}}}if(t.size==e.length)break}},x.prototype.positionNodesRadially=function(e){for(var t=new p(0,0),r=Math.ceil(Math.sqrt(e.length)),n=0,i=0,a=0,s=new f(0,0),o=0;o<e.length;o++){o%r==0&&(i=n,(a=0)!=o&&(i+=u.DEFAULT_COMPONENT_SEPERATION),n=0);var l=e[o],c=m.findCenterOfTree(l);t.x=a,t.y=i,(s=x.radialLayout(l,c,t)).y>n&&(n=Math.floor(s.y)),a=Math.floor(s.x+u.DEFAULT_COMPONENT_SEPERATION)}this.transform(new f(d.WORLD_CENTER_X-s.x/2,d.WORLD_CENTER_Y-s.y/2))},x.radialLayout=function(e,t,r){var n=Math.max(this.maxDiagonalInTree(e),u.DEFAULT_RADIAL_SEPARATION),t=(x.branchRadialLayout(t,null,0,359,0,n),l.calculateBounds(e)),i=new c;i.setDeviceOrgX(t.getMinX()),i.setDeviceOrgY(t.getMinY()),i.setWorldOrgX(r.x),i.setWorldOrgY(r.y);for(var a=0;a<e.length;a++)e[a].transform(i);return n=new f(t.getMaxX(),t.getMaxY()),i.inverseTransformPoint(n)},x.branchRadialLayout=function(e,t,r,n,i,a){(s=(n-r+1)/2)<0&&(s+=180);var s=(s+r)%360*v.TWO_PI/360,o=(Math.cos(s),i*Math.cos(s)),s=i*Math.sin(s),l=(e.setCenter(o,s),[]),c=(l=l.concat(e.getEdges())).length;null!=t&&c--;for(var h=0,u=l.length,d=e.getEdgesBetween(t);1<d.length;){var p=d[0];d.splice(0,1),0<=(p=l.indexOf(p))&&l.splice(p,1),u--,c--}for(var o=null!=t?(l.indexOf(d[0])+1)%u:0,g=Math.abs(n-r)/c,f=o;h!=c;f=++f%u){var m=l[f].getOtherEnd(e);m!=t&&(x.branchRadialLayout(m,e,m=(r+h*g)%360,(m+g)%360,i+a,a),h++)}},x.maxDiagonalInTree=function(e){for(var t=y.MIN_VALUE,r=0;r<e.length;r++){var n=e[r].getDiagonal();t<n&&(t=n)}return t},x.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},x.prototype.groupZeroDegreeMembers=function(){var l=this,c={};this.memberGroups={},this.idToDummyNode={};for(var e=[],t=this.graphManager.getAllNodes(),r=0;r<t.length;r++){var n=(i=t[r]).getParent();0!==this.getNodeDegreeWithChildren(i)||null!=n.id&&this.getToBeTiled(n)||e.push(i)}for(r=0;r<e.length;r++){var i,a=(i=e[r]).getParent().id;"u"<typeof c[a]&&(c[a]=[]),c[a]=c[a].concat(i)}Object.keys(c).forEach(function(e){if(1<c[e].length){var t="DummyCompound_"+e,r=(l.memberGroups[t]=c[e],c[e][0].getParent()),n=new h(l.graphManager),i=(n.id=t,n.paddingLeft=r.paddingLeft||0,n.paddingRight=r.paddingRight||0,n.paddingBottom=r.paddingBottom||0,n.paddingTop=r.paddingTop||0,l.idToDummyNode[t]=n,l.getGraphManager().add(l.newGraph(),n)),a=r.getChild();a.add(n);for(var s=0;s<c[e].length;s++){var o=c[e][s];a.remove(o),i.add(o)}}})},x.prototype.clearCompounds=function(){var e={},t={};this.performDFSOnCompounds();for(var r=0;r<this.compoundOrder.length;r++)t[this.compoundOrder[r].id]=this.compoundOrder[r],e[this.compoundOrder[r].id]=[].concat(this.compoundOrder[r].getChild().getNodes()),this.graphManager.remove(this.compoundOrder[r].getChild()),this.compoundOrder[r].child=null;this.graphManager.resetAllNodes(),this.tileCompoundMembers(e,t)},x.prototype.clearZeroDegreeMembers=function(){var r=this,n=this.tiledZeroDegreePack=[];Object.keys(this.memberGroups).forEach(function(e){var t=r.idToDummyNode[e];n[e]=r.tileNodes(r.memberGroups[e],t.paddingLeft+t.paddingRight),t.rect.width=n[e].width,t.rect.height=n[e].height})},x.prototype.repopulateCompounds=function(){for(var e=this.compoundOrder.length-1;0<=e;e--){var t=this.compoundOrder[e],r=t.id;this.adjustLocations(this.tiledMemberPack[r],t.rect.x,t.rect.y,t.paddingLeft,t.paddingTop)}},x.prototype.repopulateZeroDegreeMembers=function(){var n=this,i=this.tiledZeroDegreePack;Object.keys(i).forEach(function(e){var t=n.idToDummyNode[e],r=t.paddingLeft;n.adjustLocations(i[e],t.rect.x,t.rect.y,r,t.paddingTop)})},x.prototype.getToBeTiled=function(e){var t=e.id;if(null!=this.toBeTiled[t])return this.toBeTiled[t];if(null==(e=e.getChild()))return this.toBeTiled[t]=!1;for(var r=e.getNodes(),n=0;n<r.length;n++){var i=r[n];if(0<this.getNodeDegree(i))return this.toBeTiled[t]=!1;if(null==i.getChild())this.toBeTiled[i.id]=!1;else if(!this.getToBeTiled(i))return this.toBeTiled[t]=!1}return this.toBeTiled[t]=!0},x.prototype.getNodeDegree=function(e){e.id;for(var t=e.getEdges(),r=0,n=0;n<t.length;n++){var i=t[n];i.getSource().id!==i.getTarget().id&&(r+=1)}return r},x.prototype.getNodeDegreeWithChildren=function(e){var t=this.getNodeDegree(e);if(null!=e.getChild())for(var r=e.getChild().getNodes(),n=0;n<r.length;n++){var i=r[n];t+=this.getNodeDegreeWithChildren(i)}return t},x.prototype.performDFSOnCompounds=function(){this.compoundOrder=[],this.fillCompexOrderByDFS(this.graphManager.getRoot().getNodes())},x.prototype.fillCompexOrderByDFS=function(e){for(var t=0;t<e.length;t++){var r=e[t];null!=r.getChild()&&this.fillCompexOrderByDFS(r.getChild().getNodes()),this.getToBeTiled(r)&&this.compoundOrder.push(r)}},x.prototype.adjustLocations=function(e,t,r,n,i){r+=i;for(var a=t+=n,s=0;s<e.rows.length;s++){var o=e.rows[s];t=a;for(var l=0,c=0;c<o.length;c++){var h=o[c];h.rect.x=t,h.rect.y=r,t+=h.rect.width+e.horizontalPadding,h.rect.height>l&&(l=h.rect.height)}r+=l+e.verticalPadding}},x.prototype.tileCompoundMembers=function(r,n){var i=this;this.tiledMemberPack=[],Object.keys(r).forEach(function(e){var t=n[e];i.tiledMemberPack[e]=i.tileNodes(r[e],t.paddingLeft+t.paddingRight),t.rect.width=i.tiledMemberPack[e].width,t.rect.height=i.tiledMemberPack[e].height})},x.prototype.tileNodes=function(e,t){var r={rows:[],rowWidth:[],rowHeight:[],width:0,height:t,verticalPadding:u.TILING_PADDING_VERTICAL,horizontalPadding:u.TILING_PADDING_HORIZONTAL};e.sort(function(e,t){return e.rect.width*e.rect.height>t.rect.width*t.rect.height?-1:e.rect.width*e.rect.height<t.rect.width*t.rect.height?1:0});for(var n=0;n<e.length;n++){var i=e[n];0==r.rows.length?this.insertNodeToRow(r,i,0,t):this.canAddHorizontal(r,i.rect.width,i.rect.height)?this.insertNodeToRow(r,i,this.getShortestRowIndex(r),t):this.insertNodeToRow(r,i,r.rows.length,t),this.shiftToLastRow(r)}return r},x.prototype.insertNodeToRow=function(e,t,r,n){r==e.rows.length&&(e.rows.push([]),e.rowWidth.push(n),e.rowHeight.push(0));var n=e.rowWidth[r]+t.rect.width,n=(0<e.rows[r].length&&(n+=e.horizontalPadding),e.rowWidth[r]=n,e.width<n&&(e.width=n),t.rect.height),i=(0<r&&(n+=e.verticalPadding),0);n>e.rowHeight[r]&&(i=e.rowHeight[r],e.rowHeight[r]=n,i=e.rowHeight[r]-i),e.height+=i,e.rows[r].push(t)},x.prototype.getShortestRowIndex=function(e){for(var t=-1,r=Number.MAX_VALUE,n=0;n<e.rows.length;n++)e.rowWidth[n]<r&&(t=n,r=e.rowWidth[n]);return t},x.prototype.getLongestRowIndex=function(e){for(var t=-1,r=Number.MIN_VALUE,n=0;n<e.rows.length;n++)e.rowWidth[n]>r&&(t=n,r=e.rowWidth[n]);return t},x.prototype.canAddHorizontal=function(e,t,r){var n,i,a=this.getShortestRowIndex(e);return a<0||(i=e.rowWidth[a])+e.horizontalPadding+t<=e.width||(n=0,e.rowHeight[a]<r&&0<a&&(n=r+e.verticalPadding-e.rowHeight[a]),a=t+e.horizontalPadding<=e.width-i?(e.height+n)/(i+t+e.horizontalPadding):(e.height+n)/e.width,n=r+e.verticalPadding,(a<1?1/a:a)<((i=e.width<t?(e.height+n)/t:(e.height+n)/e.width)<1?1/i:i))},x.prototype.shiftToLastRow=function(e){var t=this.getLongestRowIndex(e),r=e.rowWidth.length-1,n=e.rows[t],i=n[n.length-1],a=i.width+e.horizontalPadding;if(e.width-e.rowWidth[r]>a&&t!=r){n.splice(-1,1),e.rows[r].push(i),e.rowWidth[t]=e.rowWidth[t]-a,e.rowWidth[r]=e.rowWidth[r]+a,e.width=e.rowWidth[instance.getLongestRowIndex(e)];for(var s=Number.MIN_VALUE,o=0;o<n.length;o++)n[o].height>s&&(s=n[o].height);0<t&&(s+=e.verticalPadding),a=e.rowHeight[t]+e.rowHeight[r],e.rowHeight[t]=s,e.rowHeight[r]<i.height+e.verticalPadding&&(e.rowHeight[r]=i.height+e.verticalPadding),i=e.rowHeight[t]+e.rowHeight[r],e.height+=i-a,this.shiftToLastRow(e)}},x.prototype.tilingPreLayout=function(){u.TILE&&(this.groupZeroDegreeMembers(),this.clearCompounds(),this.clearZeroDegreeMembers())},x.prototype.tilingPostLayout=function(){u.TILE&&(this.repopulateZeroDegreeMembers(),this.repopulateCompounds())},x.prototype.reduceTrees=function(){for(var e,t=[],r=!0;r;){for(var n=this.graphManager.getAllNodes(),i=[],r=!1,a=0;a<n.length;a++)1!=(e=n[a]).getEdges().length||e.getEdges()[0].isInterGraph||null!=e.getChild()||(i.push([e,e.getEdges()[0],e.getOwner()]),r=!0);if(1==r){for(var s=[],o=0;o<i.length;o++)1==i[o][0].getEdges().length&&(s.push(i[o]),i[o][0].getOwner().remove(i[o][0]));t.push(s),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()}}this.prunedNodesAll=t},x.prototype.growTree=function(e){for(var t,r=e[e.length-1],n=0;n<r.length;n++)t=r[n],this.findPlaceforPrunedNode(t),t[2].add(t[0]),t[2].add(t[1],t[1].source,t[1].target);e.splice(e.length-1,1),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()},x.prototype.findPlaceforPrunedNode=function(e){var t=e[0],r=(e=t==e[1].source?e[1].target:e[1].source).startX,n=e.finishX,i=e.startY,a=e.finishY,s=[0,0,0,0];if(0<i)for(var o=r;o<=n;o++)s[0]+=this.grid[o][i-1].length+this.grid[o][i].length-1;if(n<this.grid.length-1)for(o=i;o<=a;o++)s[1]+=this.grid[n+1][o].length+this.grid[n][o].length-1;if(a<this.grid[0].length-1)for(o=r;o<=n;o++)s[2]+=this.grid[o][a+1].length+this.grid[o][a].length-1;if(0<r)for(o=i;o<=a;o++)s[3]+=this.grid[r-1][o].length+this.grid[r][o].length-1;for(var l,c,h,u,d=y.MAX_VALUE,p=0;p<s.length;p++)s[p]<d?(d=s[p],l=1,c=p):s[p]==d&&l++;3==l&&0==d?0==s[0]&&0==s[1]&&0==s[2]?h=1:0==s[0]&&0==s[1]&&0==s[3]?h=0:0==s[0]&&0==s[2]&&0==s[3]?h=3:0==s[1]&&0==s[2]&&0==s[3]&&(h=2):h=2==l&&0==d?(u=Math.floor(2*Math.random()),0==s[0]&&0==s[1]?0==u?0:1:0==s[0]&&0==s[2]?0==u?0:2:0==s[0]&&0==s[3]?0==u?0:3:0==s[1]&&0==s[2]?0==u?1:2:0==s[1]&&0==s[3]?0==u?1:3:0==u?2:3):4==l&&0==d?u=Math.floor(4*Math.random()):c,0==h?t.setCenter(e.getCenterX(),e.getCenterY()-e.getHeight()/2-g.DEFAULT_EDGE_LENGTH-t.getHeight()/2):1==h?t.setCenter(e.getCenterX()+e.getWidth()/2+g.DEFAULT_EDGE_LENGTH+t.getWidth()/2,e.getCenterY()):2==h?t.setCenter(e.getCenterX(),e.getCenterY()+e.getHeight()/2+g.DEFAULT_EDGE_LENGTH+t.getHeight()/2):t.setCenter(e.getCenterX()-e.getWidth()/2-g.DEFAULT_EDGE_LENGTH-t.getWidth()/2,e.getCenterY())},e.exports=x},function(e,t,r){var n={};n.layoutBase=r(0),n.CoSEConstants=r(1),n.CoSEEdge=r(2),n.CoSEGraph=r(3),n.CoSEGraphManager=r(4),n.CoSELayout=r(6),n.CoSENode=r(5),e.exports=n}],a={},mt(n,"__webpack_require__"),n.m=i,n.c=a,n.i=function(e){return e},n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.n=function(e){var t=e&&e.__esModule?mt(function(){return e.default},"getDefault"):mt(function(){return e},"getModuleExports");return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=7);function n(e){var t;return(a[e]||(t=a[e]={i:e,l:!1,exports:{}},i[e].call(t.exports,t,t.exports,n),t.l=!0,t)).exports}var i,a})}),vhe=NFe((r,n)=>{mt(function(e,t){"object"==typeof r&&"object"==typeof n?n.exports=t(yhe()):"function"==typeof define&&define.amd?define(["cose-base"],t):"object"==typeof r?r.cytoscapeCoseBilkent=t(yhe()):e.cytoscapeCoseBilkent=t(e.coseBase)},"webpackUniversalModuleDefinition")(r,function(r){return i=[function(e,t){e.exports=r},function(e,t,r){var n=r(0).layoutBase.LayoutConstants,i=r(0).layoutBase.FDLayoutConstants,a=r(0).CoSEConstants,g=r(0).CoSELayout,u=r(0).CoSENode,d=r(0).layoutBase.PointD,p=r(0).layoutBase.DimensionD,s={ready:mt(function(){},"ready"),stop:mt(function(){},"stop"),quality:"default",nodeDimensionsIncludeLabels:!1,refresh:30,fit:!0,padding:10,randomize:!0,nodeRepulsion:4500,idealEdgeLength:50,edgeElasticity:.45,nestingFactor:.1,gravity:.25,numIter:2500,tile:!0,animate:"end",animationDuration:500,tilingPaddingVertical:10,tilingPaddingHorizontal:10,gravityRangeCompound:1.5,gravityCompound:1,gravityRange:3.8,initialEnergyOnIncremental:.5};function o(e,t){var r,n={};for(r in e)n[r]=e[r];for(r in t)n[r]=t[r];return n}function l(e){this.options=o(s,e),c(this.options)}mt(o,"extend"),mt(l,"_CoSELayout");var c=mt(function(e){null!=e.nodeRepulsion&&(a.DEFAULT_REPULSION_STRENGTH=i.DEFAULT_REPULSION_STRENGTH=e.nodeRepulsion),null!=e.idealEdgeLength&&(a.DEFAULT_EDGE_LENGTH=i.DEFAULT_EDGE_LENGTH=e.idealEdgeLength),null!=e.edgeElasticity&&(a.DEFAULT_SPRING_STRENGTH=i.DEFAULT_SPRING_STRENGTH=e.edgeElasticity),null!=e.nestingFactor&&(a.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=i.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=e.nestingFactor),null!=e.gravity&&(a.DEFAULT_GRAVITY_STRENGTH=i.DEFAULT_GRAVITY_STRENGTH=e.gravity),null!=e.numIter&&(a.MAX_ITERATIONS=i.MAX_ITERATIONS=e.numIter),null!=e.gravityRange&&(a.DEFAULT_GRAVITY_RANGE_FACTOR=i.DEFAULT_GRAVITY_RANGE_FACTOR=e.gravityRange),null!=e.gravityCompound&&(a.DEFAULT_COMPOUND_GRAVITY_STRENGTH=i.DEFAULT_COMPOUND_GRAVITY_STRENGTH=e.gravityCompound),null!=e.gravityRangeCompound&&(a.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=i.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=e.gravityRangeCompound),null!=e.initialEnergyOnIncremental&&(a.DEFAULT_COOLING_FACTOR_INCREMENTAL=i.DEFAULT_COOLING_FACTOR_INCREMENTAL=e.initialEnergyOnIncremental),"draft"==e.quality?n.QUALITY=0:"proof"==e.quality?n.QUALITY=2:n.QUALITY=1,a.NODE_DIMENSIONS_INCLUDE_LABELS=i.NODE_DIMENSIONS_INCLUDE_LABELS=n.NODE_DIMENSIONS_INCLUDE_LABELS=e.nodeDimensionsIncludeLabels,a.DEFAULT_INCREMENTAL=i.DEFAULT_INCREMENTAL=n.DEFAULT_INCREMENTAL=!e.randomize,a.ANIMATE=i.ANIMATE=n.ANIMATE=e.animate,a.TILE=e.tile,a.TILING_PADDING_VERTICAL="function"==typeof e.tilingPaddingVertical?e.tilingPaddingVertical.call():e.tilingPaddingVertical,a.TILING_PADDING_HORIZONTAL="function"==typeof e.tilingPaddingHorizontal?e.tilingPaddingHorizontal.call():e.tilingPaddingHorizontal},"getUserOptions"),r=(l.prototype.run=function(){var s,o,l=this.options,c=(this.idToLNode={},this.layout=new g),h=this,e=(h.stopped=!1,this.cy=this.options.cy,this.cy.trigger({type:"layoutstart",layout:this}),c.newGraphManager()),t=(this.gm=e,this.options.eles.nodes()),r=this.options.eles.edges();this.root=e.addRoot(),this.processChildrenList(this.root,this.getTopMostNodes(t),c);for(var n=0;n<r.length;n++){var i=r[n],a=this.idToLNode[i.data("source")],u=this.idToLNode[i.data("target")];a!==u&&0==a.getEdgesBetween(u).length&&(e.add(c.newEdge(),a,u).id=i.id())}var d=mt(function(e,t){return t=(e="number"==typeof e?t:e).data("id"),{x:(e=h.idToLNode[t]).getRect().getCenterX(),y:e.getRect().getCenterY()}},"getPositions"),p=mt(function e(){for(var t,a,r=mt(function(){l.fit&&l.cy.fit(l.eles,l.padding),s||(s=!0,h.cy.one("layoutready",l.ready),h.cy.trigger({type:"layoutready",layout:h}))},"afterReposition"),n=h.options.refresh,i=0;i<n&&!t;i++)t=h.stopped||h.layout.tick();t?(c.checkLayoutSuccess()&&!c.isSubLayout&&c.doPostLayout(),c.tilingPostLayout&&c.tilingPostLayout(),c.isLayoutFinished=!0,h.options.eles.nodes().positions(d),r(),h.cy.one("layoutstop",h.options.stop),h.cy.trigger({type:"layoutstop",layout:h}),o&&cancelAnimationFrame(o),s=!1):(a=h.layout.getPositionsData(),l.eles.nodes().positions(function(e,t){if(!(e="number"==typeof e?t:e).isParent()){for(var r=e.id(),n=a[r],i=e;null==n&&(n=a[i.data("parent")]||a["DummyCompound_"+i.data("parent")],a[r]=n,null!=(i=i.parent()[0])););return null!=n?{x:n.x,y:n.y}:{x:e.position("x"),y:e.position("y")}}}),r(),o=requestAnimationFrame(e))},"iterateAnimated");return c.addListener("layoutstarted",function(){"during"===h.options.animate&&(o=requestAnimationFrame(p))}),c.runLayout(),"during"!==this.options.animate&&(h.options.eles.nodes().not(":parent").layoutPositions(h,h.options,d),s=!1),this},l.prototype.getTopMostNodes=function(e){for(var n={},t=0;t<e.length;t++)n[e[t].id()]=!0;return e.filter(function(e,t){for(var r=(e="number"==typeof e?t:e).parent()[0];null!=r;){if(n[r.id()])return!1;r=r.parent()[0]}return!0})},l.prototype.processChildrenList=function(e,t,r){for(var n=t.length,i=0;i<n;i++){var a,s,o,l=t[i],c=l.children(),h=l.layoutDimensions({nodeDimensionsIncludeLabels:this.options.nodeDimensionsIncludeLabels});(h=null!=l.outerWidth()&&null!=l.outerHeight()?e.add(new u(r.graphManager,new d(l.position("x")-h.w/2,l.position("y")-h.h/2),new p(parseFloat(h.w),parseFloat(h.h)))):e.add(new u(this.graphManager))).id=l.data("id"),h.paddingLeft=parseInt(l.css("padding")),h.paddingTop=parseInt(l.css("padding")),h.paddingRight=parseInt(l.css("padding")),h.paddingBottom=parseInt(l.css("padding")),this.options.nodeDimensionsIncludeLabels&&l.isParent()&&(o=l.boundingBox({includeLabels:!0,includeNodes:!1}).w,a=l.boundingBox({includeLabels:!0,includeNodes:!1}).h,s=l.css("text-halign"),h.labelWidth=o,h.labelHeight=a,h.labelPos=s),this.idToLNode[l.data("id")]=h,isNaN(h.rect.x)&&(h.rect.x=0),isNaN(h.rect.y)&&(h.rect.y=0),null!=c&&0<c.length&&(o=r.getGraphManager().add(r.newGraph(),h),this.processChildrenList(o,c,r))}},l.prototype.stop=function(){return this.stopped=!0,this},mt(function(e){e("layout","cose-bilkent",l)},"register"));typeof cytoscape<"u"&&r(cytoscape),e.exports=r}],a={},mt(n,"__webpack_require__"),n.m=i,n.c=a,n.i=function(e){return e},n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.n=function(e){var t=e&&e.__esModule?mt(function(){return e.default},"getDefault"):mt(function(){return e},"getModuleExports");return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=1);function n(e){var t;return(a[e]||(t=a[e]={i:e,l:!1,exports:{}},i[e].call(t.exports,t,t.exports,n),t.l=!0,t)).exports}var i,a})});function xhe(e,n){e.forEach(t=>{let r={id:t.id,labelText:t.label,height:t.height,width:t.width,padding:t.padding??0};Object.keys(t).forEach(e=>{["id","label","height","width","padding","x","y"].includes(e)||(r[e]=t[e])}),n.add({group:"nodes",data:r,position:{x:t.x??0,y:t.y??0}})})}function bhe(e,n){e.forEach(t=>{let r={id:t.id,source:t.start,target:t.end};Object.keys(t).forEach(e=>{["id","start","end"].includes(e)||(r[e]=t[e])}),n.add({group:"edges",data:r})})}function whe(n){return new Promise(t=>{let e=H("body").append("div").attr("id","cy").attr("style","display:none"),r=ghe({container:document.getElementById("cy"),style:[{selector:"edge",style:{"curve-style":"bezier"}}]});e.remove(),xhe(n.nodes,r),bhe(n.edges,r),r.nodes().forEach(function(t){t.layoutDimensions=()=>{var e=t.data();return{w:e.width,h:e.height}}}),r.layout({name:"cose-bilkent",quality:"proof",styleEnabled:!1,animate:!1}).run(),r.ready(e=>{D.info("Cytoscape ready",e),t(r)})})}function khe(e){return e.nodes().map(e=>{let t=e.data(),r=e.position(),n={id:t.id,x:r.x,y:r.y};return Object.keys(t).forEach(e=>{"id"!==e&&(n[e]=t[e])}),n})}function The(e){return e.edges().map(e=>{let t=e.data(),r=e._private.rscratch,n={id:t.id,source:t.source,target:t.target,startX:r.startX,startY:r.startY,midX:r.midX,midY:r.midY,endX:r.endX,endY:r.endY};return Object.keys(t).forEach(e=>{["id","source","target"].includes(e)||(n[e]=t[e])}),n})}var Ehe,Che=b(()=>{fhe(),Ehe=q(vhe(),1),i6(),e(),ghe.use(Ehe.default),mt(xhe,"addNodes"),mt(bhe,"addEdges"),mt(whe,"createCytoscapeInstance"),mt(khe,"extractPositionedNodes"),mt(The,"extractPositionedEdges")});async function _he(e,t){D.debug("Starting cose-bilkent layout algorithm");try{She(e);var r=await whe(e),n=khe(r),i=The(r);return D.debug(`Layout completed: ${n.length} nodes, ${i.length} edges`),{nodes:n,edges:i}}catch(e){throw D.error("Error in cose-bilkent layout algorithm:",e),e}}function She(e){if(!e)throw new Error("Layout data is required");if(!e.config)throw new Error("Configuration is required in layout data");if(!e.rootNode)throw new Error("Root node is required");if(!e.nodes||!Array.isArray(e.nodes))throw new Error("No nodes found in layout data");if(Array.isArray(e.edges))return!0;throw new Error("Edges array is required in layout data")}var Ahe,Lhe=b(()=>{e(),Che(),mt(_he,"executeCoseBilkentLayout"),mt(She,"validateLayoutData")}),Nhe=b(()=>{Lhe(),Ahe=mt(async(i,e,{insertCluster:a,insertEdge:s,insertEdgeLabel:o,insertMarkers:t,insertNode:l,log:c,positionEdgeLabel:h},{})=>{let u={},d={},r=e.select("g"),p=(t(r,i.markers,i.type,i.diagramId),r.insert("g").attr("class","subgraphs")),g=r.insert("g").attr("class","edgePaths"),f=r.insert("g").attr("class","edgeLabels"),m=r.insert("g").attr("class","nodes"),n=(c.debug("Inserting nodes into DOM for dimension calculation"),await Promise.all(i.nodes.map(async e=>{var t,r,n;e.isGroup?(t={...e},d[e.id]=t,u[e.id]=t,await a(p,e)):(t={...e},u[e.id]=t,n=(r=await l(m,e,{config:i.config,dir:i.direction||"TB"})).node().getBBox(),t.width=n.width,t.height=n.height,t.domId=r,c.debug(`Node ${e.id} dimensions: ${n.width}x`+n.height))})),c.debug("Running cose-bilkent layout algorithm"),{...i,nodes:i.nodes.map(e=>{var t=u[e.id];return{...e,width:t.width,height:t.height}})}),y=await _he(n,i.config);c.debug("Positioning nodes based on layout results"),y.nodes.forEach(e=>{var t=u[e.id];t?.domId&&(t.domId.attr("transform",`translate(${e.x}, ${e.y})`),t.x=e.x,t.y=e.y,c.debug(`Positioned node ${t.id} at center (${e.x}, ${e.y})`))}),y.edges.forEach(t=>{var e=i.edges.find(e=>e.id===t.id);e&&(e.points=[{x:t.startX,y:t.startY},{x:t.midX,y:t.midY},{x:t.endX,y:t.endY}])}),c.debug("Inserting and positioning edges"),await Promise.all(i.edges.map(async t=>{await o(f,t);var e,r=u[t.start??""],n=u[t.end??""];r&&n&&(e=(e=y.edges.find(e=>e.id===t.id))?(c.debug("APA01 positionedEdge",e),{...t}):{...t,points:[{x:r.x||0,y:r.y||0},{x:n.x||0,y:n.y||0}]},r=s(g,e,d,i.type,r,n,i.diagramId),h(e,r))})),c.debug("Cose-bilkent rendering completed")},"render")}),Ihe={};OFe(Ihe,{render:()=>Rhe});var Rhe,Mhe,Dhe,Ohe,Phe,Bhe,$he,Fhe,zhe,Ghe,Uhe,qhe,jhe,Yhe,Whe,Hhe,Vhe,Xhe,Khe,Zhe=b(()=>{Nhe(),Rhe=Ahe}),Qhe=b(()=>{lP(),e(),Mhe={},Dhe=mt(e=>{for(var t of e)Mhe[t.name]=t},"registerLayoutLoaders"),mt(()=>{Dhe([{name:"dagre",loader:mt(async()=>Promise.resolve().then(()=>(UK(),FK)),"loader")},{name:"cose-bilkent",loader:mt(async()=>Promise.resolve().then(()=>(Zhe(),Ihe)),"loader")}])},"registerDefaultLayoutLoaders")(),Ohe=mt(async(e,t)=>{var r;if(e.layoutAlgorithm in Mhe)return(await(r=Mhe[e.layoutAlgorithm]).loader()).render(e,t,sP,{algorithm:r.algorithm});throw new Error("Unknown layout algorithm: "+e.layoutAlgorithm)},"render"),Phe=mt((e="",{fallback:t="dagre"}={})=>{if(e in Mhe)return e;if(t in Mhe)return D.warn(`Layout algorithm ${e} is not registered. Using ${t} as fallback.`),t;throw new Error(`Both layout algorithms ${e} and ${t} are not registered.`)},"getRegisteredLayoutAlgorithm")}),Jhe=b(()=>{lh(),e(),Bhe=mt((e,t,r,n)=>{e.attr("class",r);var{width:r,height:i,x:a,y:s}=$he(e,t),n=(Zc(e,i,r,n),Fhe(a,s,r,i,t));e.attr("viewBox",n),D.debug(`viewBox configured: ${n} with padding: `+t)},"setupViewPortForSVG"),$he=mt((e,t)=>({width:(e=e.node()?.getBBox()||{width:0,height:0,x:0,y:0}).width+2*t,height:e.height+2*t,x:e.x,y:e.y}),"calculateDimensionsWithPadding"),Fhe=mt((e,t,r,n,i)=>e-i+` ${t-i} ${r} `+n,"createViewBox")}),eue=b(()=>{i6(),Tu(),e(),iO(),Qhe(),Jhe(),i_(),zhe=mt(function(e,t){return t.db.getClasses()},"getClasses"),Ghe=mt(async function(e,t,r,n){D.info("REF0:"),D.info("Drawing state diagram (v2)",t);let{securityLevel:i,flowchart:a,layout:s}=O(),o;"sandbox"===i&&(o=H("#i"+t));var l,c="sandbox"===i?o.nodes()[0].contentDocument:document,h=(D.debug("Before getData: "),n.db.getData()),u=(D.debug("Data: ",h),YD(t,i)),d=n.db.getDirection(),d=(h.type=n.type,h.layoutAlgorithm=Phe(s),"dagre"===h.layoutAlgorithm&&"elk"===s&&D.warn("flowchart-elk was moved to an external package in Mermaid v11. Please refer [release notes](https://github.com/mermaid-js/mermaid/releases/tag/v11.0.0) for more details. This diagram will be rendered using `dagre` layout as a fallback."),h.direction=d,h.nodeSpacing=a?.nodeSpacing||50,h.rankSpacing=a?.rankSpacing||50,h.markers=["point","circle","cross"],h.diagramId=t,D.debug("REF1:",h),await Ohe(h,u),h.config.flowchart?.diagramPadding??8);e_.insertTitle(u,"flowchartTitleText",a?.titleTopMargin||0,n.db.getDiagramTitle()),Bhe(u,d,"flowchart",a?.useMaxWidth||!1);for(l of h.nodes){var p=H(`#${t} [id="${l.id}"]`);if(p&&l.link){let e=c.createElementNS("http://www.w3.org/2000/svg","a"),t=(e.setAttributeNS("http://www.w3.org/2000/svg","class",l.cssClasses),e.setAttributeNS("http://www.w3.org/2000/svg","rel","noopener"),"sandbox"===i?e.setAttributeNS("http://www.w3.org/2000/svg","target","_top"):l.linkTarget&&e.setAttributeNS("http://www.w3.org/2000/svg","target",l.linkTarget),p.insert(function(){return e},":first-child")),r=p.select(".label-container"),n=(r&&t.append(function(){return r.node()}),p.select(".label"));n&&t.append(function(){return n.node()})}}},"draw"),Uhe={getClasses:zhe,draw:Ghe}}),tue=b(()=>{function P(){this.yy={}}var e=mt(function(e,t,r,n){for(r=r||{},n=e.length;n--;r[e[n]]=t);return r},"o"),B=[1,4],$=[1,3],F=[1,5],z=[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],G=[2,2],U=[1,13],q=[1,14],j=[1,15],Y=[1,16],W=[1,23],H=[1,25],V=[1,26],X=[1,27],t=[1,49],r=[1,48],K=[1,29],Z=[1,30],Q=[1,31],J=[1,32],ee=[1,33],n=[1,44],i=[1,46],a=[1,42],s=[1,47],o=[1,43],l=[1,50],c=[1,45],h=[1,51],u=[1,52],te=[1,34],re=[1,35],ne=[1,36],ie=[1,37],ae=[1,57],d=[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],p=[1,61],g=[1,60],f=[1,62],se=[8,9,11,75,77,78],oe=[1,78],le=[1,91],ce=[1,96],he=[1,95],ue=[1,92],de=[1,88],pe=[1,94],ge=[1,90],fe=[1,97],me=[1,93],ye=[1,98],ve=[1,89],xe=[8,9,10,11,40,75,77,78],m=[8,9,10,11,40,46,75,77,78],y=[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],be=[8,9,11,44,60,75,77,78,89,102,105,106,109,111,114,115,116],we=[44,60,89,102,105,106,109,111,114,115,116],ke=[1,121],Te=[1,122],Ee=[1,124],Ce=[1,123],_e=[44,60,62,74,89,102,105,106,109,111,114,115,116],Se=[1,133],Ae=[1,147],Le=[1,148],Ne=[1,149],Ie=[1,150],Re=[1,135],Me=[1,137],De=[1,141],Oe=[1,142],Pe=[1,143],Be=[1,144],$e=[1,145],Fe=[1,146],ze=[1,151],Ge=[1,152],Ue=[1,131],qe=[1,132],je=[1,139],Ye=[1,134],We=[1,138],He=[1,136],Ve=[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],Xe=[1,154],Ke=[1,156],v=[8,9,11],x=[8,9,10,11,14,44,60,89,105,106,109,111,114,115,116],b=[1,176],w=[1,172],k=[1,173],T=[1,177],E=[1,174],C=[1,175],Ze=[77,116,119],_=[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],Qe=[10,106],Je=[31,49,51,53,55,57,62,64,66,67,69,71,116,117,118],S=[1,247],A=[1,245],L=[1,249],N=[1,243],I=[1,244],R=[1,246],M=[1,248],D=[1,250],et=[1,268],tt=[8,9,11,106],O=[8,9,10,11,60,84,105,106,109,110,111,112],B={trace:mt(function(){},"trace"),yy:{},symbols_:{error:2,start:3,graphConfig:4,document:5,line:6,statement:7,SEMI:8,NEWLINE:9,SPACE:10,EOF:11,GRAPH:12,NODIR:13,DIR:14,FirstStmtSeparator:15,ending:16,endToken:17,spaceList:18,spaceListNewline:19,vertexStatement:20,separator:21,styleStatement:22,linkStyleStatement:23,classDefStatement:24,classStatement:25,clickStatement:26,subgraph:27,textNoTags:28,SQS:29,text:30,SQE:31,end:32,direction:33,acc_title:34,acc_title_value:35,acc_descr:36,acc_descr_value:37,acc_descr_multiline_value:38,shapeData:39,SHAPE_DATA:40,link:41,node:42,styledVertex:43,AMP:44,vertex:45,STYLE_SEPARATOR:46,idString:47,DOUBLECIRCLESTART:48,DOUBLECIRCLEEND:49,PS:50,PE:51,"(-":52,"-)":53,STADIUMSTART:54,STADIUMEND:55,SUBROUTINESTART:56,SUBROUTINEEND:57,VERTEX_WITH_PROPS_START:58,"NODE_STRING[field]":59,COLON:60,"NODE_STRING[value]":61,PIPE:62,CYLINDERSTART:63,CYLINDEREND:64,DIAMOND_START:65,DIAMOND_STOP:66,TAGEND:67,TRAPSTART:68,TRAPEND:69,INVTRAPSTART:70,INVTRAPEND:71,linkStatement:72,arrowText:73,TESTSTR:74,START_LINK:75,edgeText:76,LINK:77,LINK_ID:78,edgeTextToken:79,STR:80,MD_STR:81,textToken:82,keywords:83,STYLE:84,LINKSTYLE:85,CLASSDEF:86,CLASS:87,CLICK:88,DOWN:89,UP:90,textNoTagsToken:91,stylesOpt:92,"idString[vertex]":93,"idString[class]":94,CALLBACKNAME:95,CALLBACKARGS:96,HREF:97,LINK_TARGET:98,"STR[link]":99,"STR[tooltip]":100,alphaNum:101,DEFAULT:102,numList:103,INTERPOLATE:104,NUM:105,COMMA:106,style:107,styleComponent:108,NODE_STRING:109,UNIT:110,BRKT:111,PCT:112,idStringToken:113,MINUS:114,MULT:115,UNICODE_TEXT:116,TEXT:117,TAGSTART:118,EDGE_TEXT:119,alphaNumToken:120,direction_tb:121,direction_bt:122,direction_rl:123,direction_lr:124,$accept:0,$end:1},terminals_:{2:"error",8:"SEMI",9:"NEWLINE",10:"SPACE",11:"EOF",12:"GRAPH",13:"NODIR",14:"DIR",27:"subgraph",29:"SQS",31:"SQE",32:"end",34:"acc_title",35:"acc_title_value",36:"acc_descr",37:"acc_descr_value",38:"acc_descr_multiline_value",40:"SHAPE_DATA",44:"AMP",46:"STYLE_SEPARATOR",48:"DOUBLECIRCLESTART",49:"DOUBLECIRCLEEND",50:"PS",51:"PE",52:"(-",53:"-)",54:"STADIUMSTART",55:"STADIUMEND",56:"SUBROUTINESTART",57:"SUBROUTINEEND",58:"VERTEX_WITH_PROPS_START",59:"NODE_STRING[field]",60:"COLON",61:"NODE_STRING[value]",62:"PIPE",63:"CYLINDERSTART",64:"CYLINDEREND",65:"DIAMOND_START",66:"DIAMOND_STOP",67:"TAGEND",68:"TRAPSTART",69:"TRAPEND",70:"INVTRAPSTART",71:"INVTRAPEND",74:"TESTSTR",75:"START_LINK",77:"LINK",78:"LINK_ID",80:"STR",81:"MD_STR",84:"STYLE",85:"LINKSTYLE",86:"CLASSDEF",87:"CLASS",88:"CLICK",89:"DOWN",90:"UP",93:"idString[vertex]",94:"idString[class]",95:"CALLBACKNAME",96:"CALLBACKARGS",97:"HREF",98:"LINK_TARGET",99:"STR[link]",100:"STR[tooltip]",102:"DEFAULT",104:"INTERPOLATE",105:"NUM",106:"COMMA",109:"NODE_STRING",110:"UNIT",111:"BRKT",112:"PCT",114:"MINUS",115:"MULT",116:"UNICODE_TEXT",117:"TEXT",118:"TAGSTART",119:"EDGE_TEXT",121:"direction_tb",122:"direction_bt",123:"direction_rl",124:"direction_lr"},productions_:[0,[3,2],[5,0],[5,2],[6,1],[6,1],[6,1],[6,1],[6,1],[4,2],[4,2],[4,2],[4,3],[16,2],[16,1],[17,1],[17,1],[17,1],[15,1],[15,1],[15,2],[19,2],[19,2],[19,1],[19,1],[18,2],[18,1],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,9],[7,6],[7,4],[7,1],[7,2],[7,2],[7,1],[21,1],[21,1],[21,1],[39,2],[39,1],[20,4],[20,3],[20,4],[20,2],[20,2],[20,1],[42,1],[42,6],[42,5],[43,1],[43,3],[45,4],[45,4],[45,6],[45,4],[45,4],[45,4],[45,8],[45,4],[45,4],[45,4],[45,6],[45,4],[45,4],[45,4],[45,4],[45,4],[45,1],[41,2],[41,3],[41,3],[41,1],[41,3],[41,4],[76,1],[76,2],[76,1],[76,1],[72,1],[72,2],[73,3],[30,1],[30,2],[30,1],[30,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[28,1],[28,2],[28,1],[28,1],[24,5],[25,5],[26,2],[26,4],[26,3],[26,5],[26,3],[26,5],[26,5],[26,7],[26,2],[26,4],[26,2],[26,4],[26,4],[26,6],[22,5],[23,5],[23,5],[23,9],[23,9],[23,7],[23,7],[103,1],[103,3],[92,1],[92,3],[107,1],[107,2],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[82,1],[82,1],[82,1],[82,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[79,1],[79,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[47,1],[47,2],[101,1],[101,2],[33,1],[33,1],[33,1],[33,1]],performAction:mt(function(e,t,r,n,i,a,s){var o=a.length-1;switch(i){case 2:this.$=[];break;case 3:(!Array.isArray(a[o])||0<a[o].length)&&a[o-1].push(a[o]),this.$=a[o-1];break;case 4:case 183:this.$=a[o];break;case 11:n.setDirection("TB"),this.$="TB";break;case 12:n.setDirection(a[o-1]),this.$=a[o-1];break;case 27:this.$=a[o-1].nodes;break;case 28:case 29:case 30:case 31:case 32:this.$=[];break;case 33:this.$=n.addSubGraph(a[o-6],a[o-1],a[o-4]);break;case 34:this.$=n.addSubGraph(a[o-3],a[o-1],a[o-3]);break;case 35:this.$=n.addSubGraph(void 0,a[o-1],void 0);break;case 37:this.$=a[o].trim(),n.setAccTitle(this.$);break;case 38:case 39:this.$=a[o].trim(),n.setAccDescription(this.$);break;case 43:this.$=a[o-1]+a[o];break;case 44:this.$=a[o];break;case 45:n.addVertex(a[o-1][a[o-1].length-1],void 0,void 0,void 0,void 0,void 0,void 0,a[o]),n.addLink(a[o-3].stmt,a[o-1],a[o-2]),this.$={stmt:a[o-1],nodes:a[o-1].concat(a[o-3].nodes)};break;case 46:n.addLink(a[o-2].stmt,a[o],a[o-1]),this.$={stmt:a[o],nodes:a[o].concat(a[o-2].nodes)};break;case 47:n.addLink(a[o-3].stmt,a[o-1],a[o-2]),this.$={stmt:a[o-1],nodes:a[o-1].concat(a[o-3].nodes)};break;case 48:this.$={stmt:a[o-1],nodes:a[o-1]};break;case 49:n.addVertex(a[o-1][a[o-1].length-1],void 0,void 0,void 0,void 0,void 0,void 0,a[o]),this.$={stmt:a[o-1],nodes:a[o-1],shapeData:a[o]};break;case 50:this.$={stmt:a[o],nodes:a[o]};break;case 51:this.$=[a[o]];break;case 52:n.addVertex(a[o-5][a[o-5].length-1],void 0,void 0,void 0,void 0,void 0,void 0,a[o-4]),this.$=a[o-5].concat(a[o]);break;case 53:this.$=a[o-4].concat(a[o]);break;case 54:this.$=a[o];break;case 55:this.$=a[o-2],n.setClass(a[o-2],a[o]);break;case 56:this.$=a[o-3],n.addVertex(a[o-3],a[o-1],"square");break;case 57:this.$=a[o-3],n.addVertex(a[o-3],a[o-1],"doublecircle");break;case 58:this.$=a[o-5],n.addVertex(a[o-5],a[o-2],"circle");break;case 59:this.$=a[o-3],n.addVertex(a[o-3],a[o-1],"ellipse");break;case 60:this.$=a[o-3],n.addVertex(a[o-3],a[o-1],"stadium");break;case 61:this.$=a[o-3],n.addVertex(a[o-3],a[o-1],"subroutine");break;case 62:this.$=a[o-7],n.addVertex(a[o-7],a[o-1],"rect",void 0,void 0,void 0,Object.fromEntries([[a[o-5],a[o-3]]]));break;case 63:this.$=a[o-3],n.addVertex(a[o-3],a[o-1],"cylinder");break;case 64:this.$=a[o-3],n.addVertex(a[o-3],a[o-1],"round");break;case 65:this.$=a[o-3],n.addVertex(a[o-3],a[o-1],"diamond");break;case 66:this.$=a[o-5],n.addVertex(a[o-5],a[o-2],"hexagon");break;case 67:this.$=a[o-3],n.addVertex(a[o-3],a[o-1],"odd");break;case 68:this.$=a[o-3],n.addVertex(a[o-3],a[o-1],"trapezoid");break;case 69:this.$=a[o-3],n.addVertex(a[o-3],a[o-1],"inv_trapezoid");break;case 70:this.$=a[o-3],n.addVertex(a[o-3],a[o-1],"lean_right");break;case 71:this.$=a[o-3],n.addVertex(a[o-3],a[o-1],"lean_left");break;case 72:this.$=a[o],n.addVertex(a[o]);break;case 73:a[o-1].text=a[o],this.$=a[o-1];break;case 74:case 75:a[o-2].text=a[o-1],this.$=a[o-2];break;case 76:this.$=a[o];break;case 77:var l=n.destructLink(a[o],a[o-2]);this.$={type:l.type,stroke:l.stroke,length:l.length,text:a[o-1]};break;case 78:l=n.destructLink(a[o],a[o-2]),this.$={type:l.type,stroke:l.stroke,length:l.length,text:a[o-1],id:a[o-3]};break;case 79:this.$={text:a[o],type:"text"};break;case 80:this.$={text:a[o-1].text+""+a[o],type:a[o-1].type};break;case 81:this.$={text:a[o],type:"string"};break;case 82:this.$={text:a[o],type:"markdown"};break;case 83:l=n.destructLink(a[o]),this.$={type:l.type,stroke:l.stroke,length:l.length};break;case 84:l=n.destructLink(a[o]),this.$={type:l.type,stroke:l.stroke,length:l.length,id:a[o-1]};break;case 85:this.$=a[o-1];break;case 86:this.$={text:a[o],type:"text"};break;case 87:this.$={text:a[o-1].text+""+a[o],type:a[o-1].type};break;case 88:this.$={text:a[o],type:"string"};break;case 89:case 104:this.$={text:a[o],type:"markdown"};break;case 101:this.$={text:a[o],type:"text"};break;case 102:this.$={text:a[o-1].text+""+a[o],type:a[o-1].type};break;case 103:this.$={text:a[o],type:"text"};break;case 105:this.$=a[o-4],n.addClass(a[o-2],a[o]);break;case 106:this.$=a[o-4],n.setClass(a[o-2],a[o]);break;case 107:case 115:this.$=a[o-1],n.setClickEvent(a[o-1],a[o]);break;case 108:case 116:this.$=a[o-3],n.setClickEvent(a[o-3],a[o-2]),n.setTooltip(a[o-3],a[o]);break;case 109:this.$=a[o-2],n.setClickEvent(a[o-2],a[o-1],a[o]);break;case 110:this.$=a[o-4],n.setClickEvent(a[o-4],a[o-3],a[o-2]),n.setTooltip(a[o-4],a[o]);break;case 111:this.$=a[o-2],n.setLink(a[o-2],a[o]);break;case 112:this.$=a[o-4],n.setLink(a[o-4],a[o-2]),n.setTooltip(a[o-4],a[o]);break;case 113:this.$=a[o-4],n.setLink(a[o-4],a[o-2],a[o]);break;case 114:this.$=a[o-6],n.setLink(a[o-6],a[o-4],a[o]),n.setTooltip(a[o-6],a[o-2]);break;case 117:this.$=a[o-1],n.setLink(a[o-1],a[o]);break;case 118:this.$=a[o-3],n.setLink(a[o-3],a[o-2]),n.setTooltip(a[o-3],a[o]);break;case 119:this.$=a[o-3],n.setLink(a[o-3],a[o-2],a[o]);break;case 120:this.$=a[o-5],n.setLink(a[o-5],a[o-4],a[o]),n.setTooltip(a[o-5],a[o-2]);break;case 121:this.$=a[o-4],n.addVertex(a[o-2],void 0,void 0,a[o]);break;case 122:this.$=a[o-4],n.updateLink([a[o-2]],a[o]);break;case 123:this.$=a[o-4],n.updateLink(a[o-2],a[o]);break;case 124:this.$=a[o-8],n.updateLinkInterpolate([a[o-6]],a[o-2]),n.updateLink([a[o-6]],a[o]);break;case 125:this.$=a[o-8],n.updateLinkInterpolate(a[o-6],a[o-2]),n.updateLink(a[o-6],a[o]);break;case 126:this.$=a[o-6],n.updateLinkInterpolate([a[o-4]],a[o]);break;case 127:this.$=a[o-6],n.updateLinkInterpolate(a[o-4],a[o]);break;case 128:case 130:this.$=[a[o]];break;case 129:case 131:a[o-2].push(a[o]),this.$=a[o-2];break;case 133:this.$=a[o-1]+a[o];break;case 181:this.$=a[o];break;case 182:case 184:this.$=a[o-1]+""+a[o];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"}}},"anonymous"),table:[{3:1,4:2,9:B,10:$,12:F},{1:[3]},e(z,G,{5:6}),{4:7,9:B,10:$,12:F},{4:8,9:B,10:$,12:F},{13:[1,9],14:[1,10]},{1:[2,1],6:11,7:12,8:U,9:q,10:j,11:Y,20:17,22:18,23:19,24:20,25:21,26:22,27:W,33:24,34:H,36:V,38:X,42:28,43:38,44:t,45:39,47:40,60:r,84:K,85:Z,86:Q,87:J,88:ee,89:n,102:i,105:a,106:s,109:o,111:l,113:41,114:c,115:h,116:u,121:te,122:re,123:ne,124:ie},e(z,[2,9]),e(z,[2,10]),e(z,[2,11]),{8:[1,54],9:[1,55],10:ae,15:53,18:56},e(d,[2,3]),e(d,[2,4]),e(d,[2,5]),e(d,[2,6]),e(d,[2,7]),e(d,[2,8]),{8:p,9:g,11:f,21:58,41:59,72:63,75:[1,64],77:[1,66],78:[1,65]},{8:p,9:g,11:f,21:67},{8:p,9:g,11:f,21:68},{8:p,9:g,11:f,21:69},{8:p,9:g,11:f,21:70},{8:p,9:g,11:f,21:71},{8:p,9:g,10:[1,72],11:f,21:73},e(d,[2,36]),{35:[1,74]},{37:[1,75]},e(d,[2,39]),e(se,[2,50],{18:76,39:77,10:ae,40:oe}),{10:[1,79]},{10:[1,80]},{10:[1,81]},{10:[1,82]},{14:le,44:ce,60:he,80:[1,86],89:ue,95:[1,83],97:[1,84],101:85,105:de,106:pe,109:ge,111:fe,114:me,115:ye,116:ve,120:87},e(d,[2,185]),e(d,[2,186]),e(d,[2,187]),e(d,[2,188]),e(xe,[2,51]),e(xe,[2,54],{46:[1,99]}),e(m,[2,72],{113:112,29:[1,100],44:t,48:[1,101],50:[1,102],52:[1,103],54:[1,104],56:[1,105],58:[1,106],60:r,63:[1,107],65:[1,108],67:[1,109],68:[1,110],70:[1,111],89:n,102:i,105:a,106:s,109:o,111:l,114:c,115:h,116:u}),e(y,[2,181]),e(y,[2,142]),e(y,[2,143]),e(y,[2,144]),e(y,[2,145]),e(y,[2,146]),e(y,[2,147]),e(y,[2,148]),e(y,[2,149]),e(y,[2,150]),e(y,[2,151]),e(y,[2,152]),e(z,[2,12]),e(z,[2,18]),e(z,[2,19]),{9:[1,113]},e(be,[2,26],{18:114,10:ae}),e(d,[2,27]),{42:115,43:38,44:t,45:39,47:40,60:r,89:n,102:i,105:a,106:s,109:o,111:l,113:41,114:c,115:h,116:u},e(d,[2,40]),e(d,[2,41]),e(d,[2,42]),e(we,[2,76],{73:116,62:[1,118],74:[1,117]}),{76:119,79:120,80:ke,81:Te,116:Ee,119:Ce},{75:[1,125],77:[1,126]},e(_e,[2,83]),e(d,[2,28]),e(d,[2,29]),e(d,[2,30]),e(d,[2,31]),e(d,[2,32]),{10:Se,12:Ae,14:Le,27:Ne,28:127,32:Ie,44:Re,60:Me,75:De,80:[1,129],81:[1,130],83:140,84:Oe,85:Pe,86:Be,87:$e,88:Fe,89:ze,90:Ge,91:128,105:Ue,109:qe,111:je,114:Ye,115:We,116:He},e(Ve,G,{5:153}),e(d,[2,37]),e(d,[2,38]),e(se,[2,48],{44:Xe}),e(se,[2,49],{18:155,10:ae,40:Ke}),e(xe,[2,44]),{44:t,47:157,60:r,89:n,102:i,105:a,106:s,109:o,111:l,113:41,114:c,115:h,116:u},{102:[1,158],103:159,105:[1,160]},{44:t,47:161,60:r,89:n,102:i,105:a,106:s,109:o,111:l,113:41,114:c,115:h,116:u},{44:t,47:162,60:r,89:n,102:i,105:a,106:s,109:o,111:l,113:41,114:c,115:h,116:u},e(v,[2,107],{10:[1,163],96:[1,164]}),{80:[1,165]},e(v,[2,115],{120:167,10:[1,166],14:le,44:ce,60:he,89:ue,105:de,106:pe,109:ge,111:fe,114:me,115:ye,116:ve}),e(v,[2,117],{10:[1,168]}),e(x,[2,183]),e(x,[2,170]),e(x,[2,171]),e(x,[2,172]),e(x,[2,173]),e(x,[2,174]),e(x,[2,175]),e(x,[2,176]),e(x,[2,177]),e(x,[2,178]),e(x,[2,179]),e(x,[2,180]),{44:t,47:169,60:r,89:n,102:i,105:a,106:s,109:o,111:l,113:41,114:c,115:h,116:u},{30:170,67:b,80:w,81:k,82:171,116:T,117:E,118:C},{30:178,67:b,80:w,81:k,82:171,116:T,117:E,118:C},{30:180,50:[1,179],67:b,80:w,81:k,82:171,116:T,117:E,118:C},{30:181,67:b,80:w,81:k,82:171,116:T,117:E,118:C},{30:182,67:b,80:w,81:k,82:171,116:T,117:E,118:C},{30:183,67:b,80:w,81:k,82:171,116:T,117:E,118:C},{109:[1,184]},{30:185,67:b,80:w,81:k,82:171,116:T,117:E,118:C},{30:186,65:[1,187],67:b,80:w,81:k,82:171,116:T,117:E,118:C},{30:188,67:b,80:w,81:k,82:171,116:T,117:E,118:C},{30:189,67:b,80:w,81:k,82:171,116:T,117:E,118:C},{30:190,67:b,80:w,81:k,82:171,116:T,117:E,118:C},e(y,[2,182]),e(z,[2,20]),e(be,[2,25]),e(se,[2,46],{39:191,18:192,10:ae,40:oe}),e(we,[2,73],{10:[1,193]}),{10:[1,194]},{30:195,67:b,80:w,81:k,82:171,116:T,117:E,118:C},{77:[1,196],79:197,116:Ee,119:Ce},e(Ze,[2,79]),e(Ze,[2,81]),e(Ze,[2,82]),e(Ze,[2,168]),e(Ze,[2,169]),{76:198,79:120,80:ke,81:Te,116:Ee,119:Ce},e(_e,[2,84]),{8:p,9:g,10:Se,11:f,12:Ae,14:Le,21:200,27:Ne,29:[1,199],32:Ie,44:Re,60:Me,75:De,83:140,84:Oe,85:Pe,86:Be,87:$e,88:Fe,89:ze,90:Ge,91:201,105:Ue,109:qe,111:je,114:Ye,115:We,116:He},e(_,[2,101]),e(_,[2,103]),e(_,[2,104]),e(_,[2,157]),e(_,[2,158]),e(_,[2,159]),e(_,[2,160]),e(_,[2,161]),e(_,[2,162]),e(_,[2,163]),e(_,[2,164]),e(_,[2,165]),e(_,[2,166]),e(_,[2,167]),e(_,[2,90]),e(_,[2,91]),e(_,[2,92]),e(_,[2,93]),e(_,[2,94]),e(_,[2,95]),e(_,[2,96]),e(_,[2,97]),e(_,[2,98]),e(_,[2,99]),e(_,[2,100]),{6:11,7:12,8:U,9:q,10:j,11:Y,20:17,22:18,23:19,24:20,25:21,26:22,27:W,32:[1,202],33:24,34:H,36:V,38:X,42:28,43:38,44:t,45:39,47:40,60:r,84:K,85:Z,86:Q,87:J,88:ee,89:n,102:i,105:a,106:s,109:o,111:l,113:41,114:c,115:h,116:u,121:te,122:re,123:ne,124:ie},{10:ae,18:203},{44:[1,204]},e(xe,[2,43]),{10:[1,205],44:t,60:r,89:n,102:i,105:a,106:s,109:o,111:l,113:112,114:c,115:h,116:u},{10:[1,206]},{10:[1,207],106:[1,208]},e(Qe,[2,128]),{10:[1,209],44:t,60:r,89:n,102:i,105:a,106:s,109:o,111:l,113:112,114:c,115:h,116:u},{10:[1,210],44:t,60:r,89:n,102:i,105:a,106:s,109:o,111:l,113:112,114:c,115:h,116:u},{80:[1,211]},e(v,[2,109],{10:[1,212]}),e(v,[2,111],{10:[1,213]}),{80:[1,214]},e(x,[2,184]),{80:[1,215],98:[1,216]},e(xe,[2,55],{113:112,44:t,60:r,89:n,102:i,105:a,106:s,109:o,111:l,114:c,115:h,116:u}),{31:[1,217],67:b,82:218,116:T,117:E,118:C},e(Je,[2,86]),e(Je,[2,88]),e(Je,[2,89]),e(Je,[2,153]),e(Je,[2,154]),e(Je,[2,155]),e(Je,[2,156]),{49:[1,219],67:b,82:218,116:T,117:E,118:C},{30:220,67:b,80:w,81:k,82:171,116:T,117:E,118:C},{51:[1,221],67:b,82:218,116:T,117:E,118:C},{53:[1,222],67:b,82:218,116:T,117:E,118:C},{55:[1,223],67:b,82:218,116:T,117:E,118:C},{57:[1,224],67:b,82:218,116:T,117:E,118:C},{60:[1,225]},{64:[1,226],67:b,82:218,116:T,117:E,118:C},{66:[1,227],67:b,82:218,116:T,117:E,118:C},{30:228,67:b,80:w,81:k,82:171,116:T,117:E,118:C},{31:[1,229],67:b,82:218,116:T,117:E,118:C},{67:b,69:[1,230],71:[1,231],82:218,116:T,117:E,118:C},{67:b,69:[1,233],71:[1,232],82:218,116:T,117:E,118:C},e(se,[2,45],{18:155,10:ae,40:Ke}),e(se,[2,47],{44:Xe}),e(we,[2,75]),e(we,[2,74]),{62:[1,234],67:b,82:218,116:T,117:E,118:C},e(we,[2,77]),e(Ze,[2,80]),{77:[1,235],79:197,116:Ee,119:Ce},{30:236,67:b,80:w,81:k,82:171,116:T,117:E,118:C},e(Ve,G,{5:237}),e(_,[2,102]),e(d,[2,35]),{43:238,44:t,45:39,47:40,60:r,89:n,102:i,105:a,106:s,109:o,111:l,113:41,114:c,115:h,116:u},{10:ae,18:239},{10:S,60:A,84:L,92:240,105:N,107:241,108:242,109:I,110:R,111:M,112:D},{10:S,60:A,84:L,92:251,104:[1,252],105:N,107:241,108:242,109:I,110:R,111:M,112:D},{10:S,60:A,84:L,92:253,104:[1,254],105:N,107:241,108:242,109:I,110:R,111:M,112:D},{105:[1,255]},{10:S,60:A,84:L,92:256,105:N,107:241,108:242,109:I,110:R,111:M,112:D},{44:t,47:257,60:r,89:n,102:i,105:a,106:s,109:o,111:l,113:41,114:c,115:h,116:u},e(v,[2,108]),{80:[1,258]},{80:[1,259],98:[1,260]},e(v,[2,116]),e(v,[2,118],{10:[1,261]}),e(v,[2,119]),e(m,[2,56]),e(Je,[2,87]),e(m,[2,57]),{51:[1,262],67:b,82:218,116:T,117:E,118:C},e(m,[2,64]),e(m,[2,59]),e(m,[2,60]),e(m,[2,61]),{109:[1,263]},e(m,[2,63]),e(m,[2,65]),{66:[1,264],67:b,82:218,116:T,117:E,118:C},e(m,[2,67]),e(m,[2,68]),e(m,[2,70]),e(m,[2,69]),e(m,[2,71]),e([10,44,60,89,102,105,106,109,111,114,115,116],[2,85]),e(we,[2,78]),{31:[1,265],67:b,82:218,116:T,117:E,118:C},{6:11,7:12,8:U,9:q,10:j,11:Y,20:17,22:18,23:19,24:20,25:21,26:22,27:W,32:[1,266],33:24,34:H,36:V,38:X,42:28,43:38,44:t,45:39,47:40,60:r,84:K,85:Z,86:Q,87:J,88:ee,89:n,102:i,105:a,106:s,109:o,111:l,113:41,114:c,115:h,116:u,121:te,122:re,123:ne,124:ie},e(xe,[2,53]),{43:267,44:t,45:39,47:40,60:r,89:n,102:i,105:a,106:s,109:o,111:l,113:41,114:c,115:h,116:u},e(v,[2,121],{106:et}),e(tt,[2,130],{108:269,10:S,60:A,84:L,105:N,109:I,110:R,111:M,112:D}),e(O,[2,132]),e(O,[2,134]),e(O,[2,135]),e(O,[2,136]),e(O,[2,137]),e(O,[2,138]),e(O,[2,139]),e(O,[2,140]),e(O,[2,141]),e(v,[2,122],{106:et}),{10:[1,270]},e(v,[2,123],{106:et}),{10:[1,271]},e(Qe,[2,129]),e(v,[2,105],{106:et}),e(v,[2,106],{113:112,44:t,60:r,89:n,102:i,105:a,106:s,109:o,111:l,114:c,115:h,116:u}),e(v,[2,110]),e(v,[2,112],{10:[1,272]}),e(v,[2,113]),{98:[1,273]},{51:[1,274]},{62:[1,275]},{66:[1,276]},{8:p,9:g,11:f,21:277},e(d,[2,34]),e(xe,[2,52]),{10:S,60:A,84:L,105:N,107:278,108:242,109:I,110:R,111:M,112:D},e(O,[2,133]),{14:le,44:ce,60:he,89:ue,101:279,105:de,106:pe,109:ge,111:fe,114:me,115:ye,116:ve,120:87},{14:le,44:ce,60:he,89:ue,101:280,105:de,106:pe,109:ge,111:fe,114:me,115:ye,116:ve,120:87},{98:[1,281]},e(v,[2,120]),e(m,[2,58]),{30:282,67:b,80:w,81:k,82:171,116:T,117:E,118:C},e(m,[2,66]),e(Ve,G,{5:283}),e(tt,[2,131],{108:269,10:S,60:A,84:L,105:N,109:I,110:R,111:M,112:D}),e(v,[2,126],{120:167,10:[1,284],14:le,44:ce,60:he,89:ue,105:de,106:pe,109:ge,111:fe,114:me,115:ye,116:ve}),e(v,[2,127],{120:167,10:[1,285],14:le,44:ce,60:he,89:ue,105:de,106:pe,109:ge,111:fe,114:me,115:ye,116:ve}),e(v,[2,114]),{31:[1,286],67:b,82:218,116:T,117:E,118:C},{6:11,7:12,8:U,9:q,10:j,11:Y,20:17,22:18,23:19,24:20,25:21,26:22,27:W,32:[1,287],33:24,34:H,36:V,38:X,42:28,43:38,44:t,45:39,47:40,60:r,84:K,85:Z,86:Q,87:J,88:ee,89:n,102:i,105:a,106:s,109:o,111:l,113:41,114:c,115:h,116:u,121:te,122:re,123:ne,124:ie},{10:S,60:A,84:L,92:288,105:N,107:241,108:242,109:I,110:R,111:M,112:D},{10:S,60:A,84:L,92:289,105:N,107:241,108:242,109:I,110:R,111:M,112:D},e(m,[2,62]),e(d,[2,33]),e(v,[2,124],{106:et}),e(v,[2,125],{106:et})],defaultActions:{},parseError:mt(function(e,t){var r;if(!t.recoverable)throw(r=new Error(e)).hash=t,r;this.trace(e)},"parseError"),parse:mt(function(e){var t,r=this,n=[0],i=[],a=[null],s=[],o=this.table,l="",c=0,h=0,u=0,d=1,p=s.slice.call(arguments,1),g=Object.create(this.lexer),f={yy:{}};for(t in this.yy)Object.prototype.hasOwnProperty.call(this.yy,t)&&(f.yy[t]=this.yy[t]);g.setInput(e,f.yy),f.yy.lexer=g,f.yy.parser=this,"u"<typeof g.yylloc&&(g.yylloc={});var m=g.yylloc,y=(s.push(m),g.options&&g.options.ranges);function v(){var e=i.pop()||g.lex()||d;return"number"!=typeof e&&(e instanceof Array&&(e=(i=e).pop()),e=r.symbols_[e]||e),e}"function"==typeof f.yy.parseError?this.parseError=f.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,mt(function(e){n.length=n.length-2*e,a.length=a.length-e,s.length=s.length-e},"popStack"),mt(v,"lex");for(var x,b,w,k,T,E,C,_={};;){if(w=n[n.length-1],"u"<typeof(k=this.defaultActions[w]||((null===x||"u"<typeof x)&&(x=v()),o[w]&&o[w][x]))||!k.length||!k[0]){var S,A=[];for(T in o[w])this.terminals_[T]&&2<T&&A.push("'"+this.terminals_[T]+"'");S=g.showPosition?"Parse error on line "+(c+1)+`: +`+g.showPosition()+` +Expecting `+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(c+1)+": Unexpected "+(x==d?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(S,{text:g.match,token:this.terminals_[x]||x,line:g.yylineno,loc:m,expected:A})}if(k[0]instanceof Array&&1<k.length)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+x);switch(k[0]){case 1:n.push(x),a.push(g.yytext),s.push(g.yylloc),n.push(k[1]),x=null,b?(x=b,b=null):(h=g.yyleng,l=g.yytext,c=g.yylineno,m=g.yylloc,0<u&&u--);break;case 2:if(E=this.productions_[k[1]][1],_.$=a[a.length-E],_._$={first_line:s[s.length-(E||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(E||1)].first_column,last_column:s[s.length-1].last_column},y&&(_._$.range=[s[s.length-(E||1)].range[0],s[s.length-1].range[1]]),typeof(C=this.performAction.apply(_,[l,h,c,f.yy,k[1],a,s].concat(p)))<"u")return C;E&&(n=n.slice(0,-1*E*2),a=a.slice(0,-1*E),s=s.slice(0,-1*E)),n.push(this.productions_[k[1]][0]),a.push(_.$),s.push(_._$),C=o[n[n.length-2]][n[n.length-1]],n.push(C);break;case 3:return!0}}return!0},"parse")},$={EOF:1,parseError:mt(function(e,t){if(!this.yy.parser)throw new Error(e);this.yy.parser.parseError(e,t)},"parseError"),setInput:mt(function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:mt(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},"input"),unput:mt(function(e){var t=e.length,r=e.split(/(?:\r\n?|\n)/g),e=(this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t,this.match.split(/(?:\r\n?|\n)/g)),n=(this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),r.length-1&&(this.yylineno-=r.length-1),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:r?(r.length===e.length?this.yylloc.first_column:0)+e[e.length-r.length].length-r[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[n[0],n[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},"unput"),more:mt(function(){return this._more=!0,this},"more"),reject:mt(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):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})},"reject"),less:mt(function(e){this.unput(this.match.slice(e))},"less"),pastInput:mt(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(20<e.length?"...":"")+e.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:mt(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(20<e.length?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:mt(function(){var e=this.pastInput(),t=new Array(e.length+1).join("-");return e+this.upcomingInput()+` +`+t+"^"},"showPosition"),test_match:mt(function(e,t){var r,n;if(this.options.backtrack_lexer&&(n={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges)&&(n.yylloc.range=this.yylloc.range.slice(0)),(r=e[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],r=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack)for(var i in n)this[i]=n[i];return!1},"test_match"),next:mt(function(){if(this.done)return this.EOF;var e,t,r,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((r=this._input.match(this.rules[i[a]]))&&(!t||r[0].length>t[0].length)){if(t=r,n=a,this.options.backtrack_lexer){if(!1!==(e=this.test_match(r,i[a])))return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?!1!==(e=this.test_match(t,i[n]))&&e:""===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:mt(function(){return this.next()||this.lex()},"lex"),begin:mt(function(e){this.conditionStack.push(e)},"begin"),popState:mt(function(){return 0<this.conditionStack.length-1?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:mt(function(){return(this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]]:this.conditions.INITIAL).rules},"_currentRules"),topState:mt(function(e){return 0<=(e=this.conditionStack.length-1-Math.abs(e||0))?this.conditionStack[e]:"INITIAL"},"topState"),pushState:mt(function(e){this.begin(e)},"pushState"),stateStackSize:mt(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:mt(function(e,t,r,n){switch(r){case 0:return this.begin("acc_title"),34;case 1:return this.popState(),"acc_title_value";case 2:return this.begin("acc_descr"),36;case 3:return this.popState(),"acc_descr_value";case 4:this.begin("acc_descr_multiline");break;case 5:this.popState();break;case 6:return"acc_descr_multiline_value";case 7:return this.pushState("shapeData"),t.yytext="",40;case 8:return this.pushState("shapeDataStr"),40;case 9:return this.popState(),40;case 10:return t.yytext=t.yytext.replace(/\n\s*/g,"<br/>"),40;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:case 36:case 37:return e.lex.firstGraph()&&this.begin("dir"),12;case 38:return 27;case 39:return 32;case 40:case 41:case 42:case 43:return 98;case 44:return this.popState(),13;case 45:case 46:case 47:case 48:case 49:case 50:case 51:case 52:case 53:case 54:return this.popState(),14;case 55:return 121;case 56:return 122;case 57:return 123;case 58:return 124;case 59:return 78;case 60:return 105;case 61:return 111;case 62:return 46;case 63:return 60;case 64:return 44;case 65:return 8;case 66:return 106;case 67:return 115;case 68:return this.popState(),77;case 69:return this.pushState("edgeText"),75;case 70:return 119;case 71:return this.popState(),77;case 72:return this.pushState("thickEdgeText"),75;case 73:return 119;case 74:return this.popState(),77;case 75:return this.pushState("dottedEdgeText"),75;case 76:return 119;case 77:return 77;case 78:return this.popState(),53;case 79:return"TEXT";case 80:return this.pushState("ellipseText"),52;case 81:return this.popState(),55;case 82:return this.pushState("text"),54;case 83:return this.popState(),57;case 84:return this.pushState("text"),56;case 85:return 58;case 86:return this.pushState("text"),67;case 87:return this.popState(),64;case 88:return this.pushState("text"),63;case 89:return this.popState(),49;case 90:return this.pushState("text"),48;case 91:return this.popState(),69;case 92:return this.popState(),71;case 93:return 117;case 94:return this.pushState("trapText"),68;case 95:return this.pushState("trapText"),70;case 96:return 118;case 97:return 67;case 98:return 90;case 99:return"SEP";case 100:return 89;case 101:return 115;case 102:return 111;case 103:return 44;case 104:return 109;case 105:return 114;case 106:return 116;case 107:return this.popState(),62;case 108:return this.pushState("text"),62;case 109:return this.popState(),51;case 110:return this.pushState("text"),50;case 111:return this.popState(),31;case 112:return this.pushState("text"),29;case 113:return this.popState(),66;case 114:return this.pushState("text"),65;case 115:return"TEXT";case 116:return"QUOTE";case 117:return 9;case 118:return 10;case 119:return 11}},"anonymous"),rules:[/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:@\{)/,/^(?:["])/,/^(?:["])/,/^(?:[^\"]+)/,/^(?:[^}^"]+)/,/^(?:\})/,/^(?:call[\s]+)/,/^(?:\([\s]*\))/,/^(?:\()/,/^(?:[^(]*)/,/^(?:\))/,/^(?:[^)]*)/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["][`])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:["])/,/^(?:style\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:interpolate\b)/,/^(?:classDef\b)/,/^(?:class\b)/,/^(?:href[\s])/,/^(?:click[\s]+)/,/^(?:[\s\n])/,/^(?:[^\s\n]*)/,/^(?:flowchart-elk\b)/,/^(?:graph\b)/,/^(?:flowchart\b)/,/^(?:subgraph\b)/,/^(?:end\b\s*)/,/^(?:_self\b)/,/^(?:_blank\b)/,/^(?:_parent\b)/,/^(?:_top\b)/,/^(?:(\r?\n)*\s*\n)/,/^(?:\s*LR\b)/,/^(?:\s*RL\b)/,/^(?:\s*TB\b)/,/^(?:\s*BT\b)/,/^(?:\s*TD\b)/,/^(?:\s*BR\b)/,/^(?:\s*<)/,/^(?:\s*>)/,/^(?:\s*\^)/,/^(?:\s*v\b)/,/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:[^\s\"]+@(?=[^\{\"]))/,/^(?:[0-9]+)/,/^(?:#)/,/^(?::::)/,/^(?::)/,/^(?:&)/,/^(?:;)/,/^(?:,)/,/^(?:\*)/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?--\s*)/,/^(?:[^-]|-(?!-)+)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?==\s*)/,/^(?:[^=]|=(?!))/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?:\s*[xo<]?-\.\s*)/,/^(?:[^\.]|\.(?!))/,/^(?:\s*~~[\~]+\s*)/,/^(?:[-/\)][\)])/,/^(?:[^\(\)\[\]\{\}]|!\)+)/,/^(?:\(-)/,/^(?:\]\))/,/^(?:\(\[)/,/^(?:\]\])/,/^(?:\[\[)/,/^(?:\[\|)/,/^(?:>)/,/^(?:\)\])/,/^(?:\[\()/,/^(?:\)\)\))/,/^(?:\(\(\()/,/^(?:[\\(?=\])][\]])/,/^(?:\/(?=\])\])/,/^(?:\/(?!\])|\\(?!\])|[^\\\[\]\(\)\{\}\/]+)/,/^(?:\[\/)/,/^(?:\[\\)/,/^(?:<)/,/^(?:>)/,/^(?:\^)/,/^(?:\\\|)/,/^(?:v\b)/,/^(?:\*)/,/^(?:#)/,/^(?:&)/,/^(?:([A-Za-z0-9!"\#$%&'*+\.`?\\_\/]|-(?=[^\>\-\.])|(?!))+)/,/^(?:-)/,/^(?:[\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC])/,/^(?:\|)/,/^(?:\|)/,/^(?:\))/,/^(?:\()/,/^(?:\])/,/^(?:\[)/,/^(?:(\}))/,/^(?:\{)/,/^(?:[^\[\]\(\)\{\}\|\"]+)/,/^(?:")/,/^(?:(\r?\n)+)/,/^(?:\s)/,/^(?:$)/],conditions:{shapeDataEndBracket:{rules:[21,24,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},shapeDataStr:{rules:[9,10,21,24,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},shapeData:{rules:[8,11,12,21,24,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},callbackargs:{rules:[17,18,21,24,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},callbackname:{rules:[14,15,16,21,24,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},href:{rules:[21,24,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},click:{rules:[21,24,33,34,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},dottedEdgeText:{rules:[21,24,74,76,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},thickEdgeText:{rules:[21,24,71,73,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},edgeText:{rules:[21,24,68,70,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},trapText:{rules:[21,24,77,80,82,84,88,90,91,92,93,94,95,108,110,112,114],inclusive:!1},ellipseText:{rules:[21,24,77,78,79,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},text:{rules:[21,24,77,80,81,82,83,84,87,88,89,90,94,95,107,108,109,110,111,112,113,114,115],inclusive:!1},vertex:{rules:[21,24,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},dir:{rules:[21,24,44,45,46,47,48,49,50,51,52,53,54,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},acc_descr_multiline:{rules:[5,6,21,24,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},acc_descr:{rules:[3,21,24,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},acc_title:{rules:[1,21,24,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},md_string:{rules:[19,20,21,24,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},string:{rules:[21,22,23,24,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},INITIAL:{rules:[0,2,4,7,13,21,24,25,26,27,28,29,30,31,32,35,36,37,38,39,40,41,42,43,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,71,72,74,75,77,80,82,84,85,86,88,90,94,95,96,97,98,99,100,101,102,103,104,105,106,108,110,112,114,116,117,118,119],inclusive:!0}}};B.lexer=$,mt(P,"Parser"),(qhe=new((P.prototype=B).Parser=P)).parser=qhe,jhe=qhe}),rue=b(()=>{tue(),(Yhe=Object.assign({},jhe)).parse=e=>(e=e.replace(/}\s*\n/g,`} +`),jhe.parse(e)),Whe=Yhe}),nue=b(()=>{Hhe=mt(()=>` + /* 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")}),iue=b(()=>{jr(),nue(),Vhe=mt((e,t)=>{var r=(i=ct)(e,"r"),n=i(e,"g"),i=i(e,"b");return ot(r,n,i,t)},"fade"),Xhe=mt(e=>`.label { + font-family: ${e.fontFamily}; + color: ${e.nodeTextColor||e.textColor}; + } + .cluster-label text { + fill: ${e.titleColor}; + } + .cluster-label span { + color: ${e.titleColor}; + } + .cluster-label span p { + background-color: transparent; + } + + .label text,span { + fill: ${e.nodeTextColor||e.textColor}; + color: ${e.nodeTextColor||e.textColor}; + } + + .node rect, + .node circle, + .node ellipse, + .node polygon, + .node path { + fill: ${e.mainBkg}; + stroke: ${e.nodeBorder}; + stroke-width: 1px; + } + .rough-node .label text , .node .label text, .image-shape .label, .icon-shape .label { + text-anchor: middle; + } + // .flowchart-label .text-outer-tspan { + // text-anchor: middle; + // } + // .flowchart-label .text-inner-tspan { + // text-anchor: start; + // } + + .node .katex path { + fill: #000; + stroke: #000; + stroke-width: 1px; + } + + .rough-node .label,.node .label, .image-shape .label, .icon-shape .label { + text-align: center; + } + .node.clickable { + cursor: pointer; + } + + + .root .anchor path { + fill: ${e.lineColor} !important; + stroke-width: 0; + stroke: ${e.lineColor}; + } + + .arrowheadPath { + fill: ${e.arrowheadColor}; + } + + .edgePath .path { + stroke: ${e.lineColor}; + stroke-width: 2.0px; + } + + .flowchart-link { + stroke: ${e.lineColor}; + fill: none; + } + + .edgeLabel { + background-color: ${e.edgeLabelBackground}; + p { + background-color: ${e.edgeLabelBackground}; + } + rect { + opacity: 0.5; + background-color: ${e.edgeLabelBackground}; + fill: ${e.edgeLabelBackground}; + } + text-align: center; + } + + /* For html labels only */ + .labelBkg { + background-color: ${Vhe(e.edgeLabelBackground,.5)}; + // background-color: + } + + .cluster rect { + fill: ${e.clusterBkg}; + stroke: ${e.clusterBorder}; + stroke-width: 1px; + } + + .cluster text { + fill: ${e.titleColor}; + } + + .cluster span { + color: ${e.titleColor}; + } + /* .cluster div { + color: ${e.titleColor}; + } */ + + div.mermaidTooltip { + position: absolute; + text-align: center; + max-width: 200px; + padding: 2px; + font-family: ${e.fontFamily}; + font-size: 12px; + background: ${e.tertiaryColor}; + border: 1px solid ${e.border2}; + border-radius: 2px; + pointer-events: none; + z-index: 100; + } + + .flowchartTitleText { + text-anchor: middle; + font-size: 18px; + fill: ${e.textColor}; + } + + rect.text { + fill: none; + stroke-width: 0; + } + + .icon-shape, .image-shape { + background-color: ${e.edgeLabelBackground}; + p { + background-color: ${e.edgeLabelBackground}; + padding: 2px; + } + rect { + opacity: 0.5; + background-color: ${e.edgeLabelBackground}; + fill: ${e.edgeLabelBackground}; + } + text-align: center; + } + ${Hhe()} +`,"getStyles"),Khe=Xhe}),aue={};OFe(aue,{diagram:()=>sue});var sue,oue,lue,cue,hue=b(()=>{Tu(),nO(),eue(),rue(),iue(),sue={parser:Whe,get db(){return new jD},renderer:Uhe,styles:Khe,init:mt(e=>{e.flowchart||(e.flowchart={}),e.layout&&Eh({layout:e.layout}),e.flowchart.arrowMarkerAbsolute=e.arrowMarkerAbsolute,Eh({flowchart:{arrowMarkerAbsolute:e.arrowMarkerAbsolute}})},"init")}}),uue=b(()=>{function e(){this.yy={}}var t=mt(function(e,t,r,n){for(r=r||{},n=e.length;n--;r[e[n]]=t);return r},"o"),r=[6,8,10,22,24,26,28,33,34,35,36,37,40,43,44,50],n=[1,10],i=[1,11],a=[1,12],s=[1,13],o=[1,20],l=[1,21],c=[1,22],h=[1,23],u=[1,24],d=[1,19],p=[1,25],P=[1,26],g=[1,18],f=[1,33],m=[1,34],y=[1,35],v=[1,36],x=[1,37],B=[6,8,10,13,15,17,20,21,22,24,26,28,33,34,35,36,37,40,43,44,50,63,64,65,66,67],b=[1,42],w=[1,43],k=[1,52],T=[40,50,68,69],E=[1,63],C=[1,61],_=[1,58],S=[1,62],A=[1,64],L=[6,8,10,13,17,22,24,26,28,33,34,35,36,37,40,41,42,43,44,48,49,50,63,64,65,66,67],$=[63,64,65,66,67],F=[1,81],z=[1,80],G=[1,78],U=[1,79],q=[6,10,42,47],N=[6,10,13,41,42,47,48,49],I=[1,89],R=[1,88],M=[1,87],D=[19,56],j=[1,98],Y=[1,97],O=[19,56,58,60],n={trace:mt(function(){},"trace"),yy:{},symbols_:{error:2,start:3,ER_DIAGRAM:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,entityName:11,relSpec:12,COLON:13,role:14,STYLE_SEPARATOR:15,idList:16,BLOCK_START:17,attributes:18,BLOCK_STOP:19,SQS:20,SQE:21,title:22,title_value:23,acc_title:24,acc_title_value:25,acc_descr:26,acc_descr_value:27,acc_descr_multiline_value:28,direction:29,classDefStatement:30,classStatement:31,styleStatement:32,direction_tb:33,direction_bt:34,direction_rl:35,direction_lr:36,CLASSDEF:37,stylesOpt:38,separator:39,UNICODE_TEXT:40,STYLE_TEXT:41,COMMA:42,CLASS:43,STYLE:44,style:45,styleComponent:46,SEMI:47,NUM:48,BRKT:49,ENTITY_NAME:50,attribute:51,attributeType:52,attributeName:53,attributeKeyTypeList:54,attributeComment:55,ATTRIBUTE_WORD:56,attributeKeyType:57,",":58,ATTRIBUTE_KEY:59,COMMENT:60,cardinality:61,relType:62,ZERO_OR_ONE:63,ZERO_OR_MORE:64,ONE_OR_MORE:65,ONLY_ONE:66,MD_PARENT:67,NON_IDENTIFYING:68,IDENTIFYING:69,WORD:70,$accept:0,$end:1},terminals_:{2:"error",4:"ER_DIAGRAM",6:"EOF",8:"SPACE",10:"NEWLINE",13:"COLON",15:"STYLE_SEPARATOR",17:"BLOCK_START",19:"BLOCK_STOP",20:"SQS",21:"SQE",22:"title",23:"title_value",24:"acc_title",25:"acc_title_value",26:"acc_descr",27:"acc_descr_value",28:"acc_descr_multiline_value",33:"direction_tb",34:"direction_bt",35:"direction_rl",36:"direction_lr",37:"CLASSDEF",40:"UNICODE_TEXT",41:"STYLE_TEXT",42:"COMMA",43:"CLASS",44:"STYLE",47:"SEMI",48:"NUM",49:"BRKT",50:"ENTITY_NAME",56:"ATTRIBUTE_WORD",58:",",59:"ATTRIBUTE_KEY",60:"COMMENT",63:"ZERO_OR_ONE",64:"ZERO_OR_MORE",65:"ONE_OR_MORE",66:"ONLY_ONE",67:"MD_PARENT",68:"NON_IDENTIFYING",69:"IDENTIFYING",70:"WORD"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,5],[9,9],[9,7],[9,7],[9,4],[9,6],[9,3],[9,5],[9,1],[9,3],[9,7],[9,9],[9,6],[9,8],[9,4],[9,6],[9,2],[9,2],[9,2],[9,1],[9,1],[9,1],[9,1],[9,1],[29,1],[29,1],[29,1],[29,1],[30,4],[16,1],[16,1],[16,3],[16,3],[31,3],[32,4],[38,1],[38,3],[45,1],[45,2],[39,1],[39,1],[39,1],[46,1],[46,1],[46,1],[46,1],[11,1],[11,1],[18,1],[18,2],[51,2],[51,3],[51,3],[51,4],[52,1],[53,1],[54,1],[54,3],[57,1],[55,1],[12,3],[61,1],[61,1],[61,1],[61,1],[61,1],[62,1],[62,1],[14,1],[14,1],[14,1]],performAction:mt(function(e,t,r,n,i,a,s){var o=a.length-1;switch(i){case 1:break;case 2:this.$=[];break;case 3:a[o-1].push(a[o]),this.$=a[o-1];break;case 4:case 5:this.$=a[o];break;case 6:case 7:this.$=[];break;case 8:n.addEntity(a[o-4]),n.addEntity(a[o-2]),n.addRelationship(a[o-4],a[o],a[o-2],a[o-3]);break;case 9:n.addEntity(a[o-8]),n.addEntity(a[o-4]),n.addRelationship(a[o-8],a[o],a[o-4],a[o-5]),n.setClass([a[o-8]],a[o-6]),n.setClass([a[o-4]],a[o-2]);break;case 10:n.addEntity(a[o-6]),n.addEntity(a[o-2]),n.addRelationship(a[o-6],a[o],a[o-2],a[o-3]),n.setClass([a[o-6]],a[o-4]);break;case 11:n.addEntity(a[o-6]),n.addEntity(a[o-4]),n.addRelationship(a[o-6],a[o],a[o-4],a[o-5]),n.setClass([a[o-4]],a[o-2]);break;case 12:n.addEntity(a[o-3]),n.addAttributes(a[o-3],a[o-1]);break;case 13:n.addEntity(a[o-5]),n.addAttributes(a[o-5],a[o-1]),n.setClass([a[o-5]],a[o-3]);break;case 14:n.addEntity(a[o-2]);break;case 15:n.addEntity(a[o-4]),n.setClass([a[o-4]],a[o-2]);break;case 16:n.addEntity(a[o]);break;case 17:n.addEntity(a[o-2]),n.setClass([a[o-2]],a[o]);break;case 18:n.addEntity(a[o-6],a[o-4]),n.addAttributes(a[o-6],a[o-1]);break;case 19:n.addEntity(a[o-8],a[o-6]),n.addAttributes(a[o-8],a[o-1]),n.setClass([a[o-8]],a[o-3]);break;case 20:n.addEntity(a[o-5],a[o-3]);break;case 21:n.addEntity(a[o-7],a[o-5]),n.setClass([a[o-7]],a[o-2]);break;case 22:n.addEntity(a[o-3],a[o-1]);break;case 23:n.addEntity(a[o-5],a[o-3]),n.setClass([a[o-5]],a[o]);break;case 24:case 25:this.$=a[o].trim(),n.setAccTitle(this.$);break;case 26:case 27:this.$=a[o].trim(),n.setAccDescription(this.$);break;case 32:n.setDirection("TB");break;case 33:n.setDirection("BT");break;case 34:n.setDirection("RL");break;case 35:n.setDirection("LR");break;case 36:this.$=a[o-3],n.addClass(a[o-2],a[o-1]);break;case 37:case 38:case 56:case 64:this.$=[a[o]];break;case 39:case 40:this.$=a[o-2].concat([a[o]]);break;case 41:this.$=a[o-2],n.setClass(a[o-1],a[o]);break;case 42:this.$=a[o-3],n.addCssStyles(a[o-2],a[o-1]);break;case 43:this.$=[a[o]];break;case 44:a[o-2].push(a[o]),this.$=a[o-2];break;case 46:this.$=a[o-1]+a[o];break;case 54:case 76:case 77:this.$=a[o].replace(/"/g,"");break;case 55:case 78:this.$=a[o];break;case 57:a[o].push(a[o-1]),this.$=a[o];break;case 58:this.$={type:a[o-1],name:a[o]};break;case 59:this.$={type:a[o-2],name:a[o-1],keys:a[o]};break;case 60:this.$={type:a[o-2],name:a[o-1],comment:a[o]};break;case 61:this.$={type:a[o-3],name:a[o-2],keys:a[o-1],comment:a[o]};break;case 62:case 63:case 66:this.$=a[o];break;case 65:a[o-2].push(a[o]),this.$=a[o-2];break;case 67:this.$=a[o].replace(/"/g,"");break;case 68:this.$={cardA:a[o],relType:a[o-1],cardB:a[o-2]};break;case 69:this.$=n.Cardinality.ZERO_OR_ONE;break;case 70:this.$=n.Cardinality.ZERO_OR_MORE;break;case 71:this.$=n.Cardinality.ONE_OR_MORE;break;case 72:this.$=n.Cardinality.ONLY_ONE;break;case 73:this.$=n.Cardinality.MD_PARENT;break;case 74:this.$=n.Identification.NON_IDENTIFYING;break;case 75:this.$=n.Identification.IDENTIFYING}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(r,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:9,22:n,24:i,26:a,28:s,29:14,30:15,31:16,32:17,33:o,34:l,35:c,36:h,37:u,40:d,43:p,44:P,50:g},t(r,[2,7],{1:[2,1]}),t(r,[2,3]),{9:27,11:9,22:n,24:i,26:a,28:s,29:14,30:15,31:16,32:17,33:o,34:l,35:c,36:h,37:u,40:d,43:p,44:P,50:g},t(r,[2,5]),t(r,[2,6]),t(r,[2,16],{12:28,61:32,15:[1,29],17:[1,30],20:[1,31],63:f,64:m,65:y,66:v,67:x}),{23:[1,38]},{25:[1,39]},{27:[1,40]},t(r,[2,27]),t(r,[2,28]),t(r,[2,29]),t(r,[2,30]),t(r,[2,31]),t(B,[2,54]),t(B,[2,55]),t(r,[2,32]),t(r,[2,33]),t(r,[2,34]),t(r,[2,35]),{16:41,40:b,41:w},{16:44,40:b,41:w},{16:45,40:b,41:w},t(r,[2,4]),{11:46,40:d,50:g},{16:47,40:b,41:w},{18:48,19:[1,49],51:50,52:51,56:k},{11:53,40:d,50:g},{62:54,68:[1,55],69:[1,56]},t(T,[2,69]),t(T,[2,70]),t(T,[2,71]),t(T,[2,72]),t(T,[2,73]),t(r,[2,24]),t(r,[2,25]),t(r,[2,26]),{13:E,38:57,41:C,42:_,45:59,46:60,48:S,49:A},t(L,[2,37]),t(L,[2,38]),{16:65,40:b,41:w,42:_},{13:E,38:66,41:C,42:_,45:59,46:60,48:S,49:A},{13:[1,67],15:[1,68]},t(r,[2,17],{61:32,12:69,17:[1,70],42:_,63:f,64:m,65:y,66:v,67:x}),{19:[1,71]},t(r,[2,14]),{18:72,19:[2,56],51:50,52:51,56:k},{53:73,56:[1,74]},{56:[2,62]},{21:[1,75]},{61:76,63:f,64:m,65:y,66:v,67:x},t($,[2,74]),t($,[2,75]),{6:F,10:z,39:77,42:G,47:U},{40:[1,82],41:[1,83]},t(q,[2,43],{46:84,13:E,41:C,48:S,49:A}),t(N,[2,45]),t(N,[2,50]),t(N,[2,51]),t(N,[2,52]),t(N,[2,53]),t(r,[2,41],{42:_}),{6:F,10:z,39:85,42:G,47:U},{14:86,40:I,50:R,70:M},{16:90,40:b,41:w},{11:91,40:d,50:g},{18:92,19:[1,93],51:50,52:51,56:k},t(r,[2,12]),{19:[2,57]},t(D,[2,58],{54:94,55:95,57:96,59:j,60:Y}),t([19,56,59,60],[2,63]),t(r,[2,22],{15:[1,100],17:[1,99]}),t([40,50],[2,68]),t(r,[2,36]),{13:E,41:C,45:101,46:60,48:S,49:A},t(r,[2,47]),t(r,[2,48]),t(r,[2,49]),t(L,[2,39]),t(L,[2,40]),t(N,[2,46]),t(r,[2,42]),t(r,[2,8]),t(r,[2,76]),t(r,[2,77]),t(r,[2,78]),{13:[1,102],42:_},{13:[1,104],15:[1,103]},{19:[1,105]},t(r,[2,15]),t(D,[2,59],{55:106,58:[1,107],60:Y}),t(D,[2,60]),t(O,[2,64]),t(D,[2,67]),t(O,[2,66]),{18:108,19:[1,109],51:50,52:51,56:k},{16:110,40:b,41:w},t(q,[2,44],{46:84,13:E,41:C,48:S,49:A}),{14:111,40:I,50:R,70:M},{16:112,40:b,41:w},{14:113,40:I,50:R,70:M},t(r,[2,13]),t(D,[2,61]),{57:114,59:j},{19:[1,115]},t(r,[2,20]),t(r,[2,23],{17:[1,116],42:_}),t(r,[2,11]),{13:[1,117],42:_},t(r,[2,10]),t(O,[2,65]),t(r,[2,18]),{18:118,19:[1,119],51:50,52:51,56:k},{14:120,40:I,50:R,70:M},{19:[1,121]},t(r,[2,21]),t(r,[2,9]),t(r,[2,19])],defaultActions:{52:[2,62],72:[2,57]},parseError:mt(function(e,t){var r;if(!t.recoverable)throw(r=new Error(e)).hash=t,r;this.trace(e)},"parseError"),parse:mt(function(e){var t,r=this,n=[0],i=[],a=[null],s=[],o=this.table,l="",c=0,h=0,u=0,d=1,p=s.slice.call(arguments,1),g=Object.create(this.lexer),f={yy:{}};for(t in this.yy)Object.prototype.hasOwnProperty.call(this.yy,t)&&(f.yy[t]=this.yy[t]);g.setInput(e,f.yy),f.yy.lexer=g,f.yy.parser=this,"u"<typeof g.yylloc&&(g.yylloc={});var m=g.yylloc,y=(s.push(m),g.options&&g.options.ranges);function v(){var e=i.pop()||g.lex()||d;return"number"!=typeof e&&(e instanceof Array&&(e=(i=e).pop()),e=r.symbols_[e]||e),e}"function"==typeof f.yy.parseError?this.parseError=f.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,mt(function(e){n.length=n.length-2*e,a.length=a.length-e,s.length=s.length-e},"popStack"),mt(v,"lex");for(var x,b,w,k,T,E,C,_={};;){if(w=n[n.length-1],"u"<typeof(k=this.defaultActions[w]||((null===x||"u"<typeof x)&&(x=v()),o[w]&&o[w][x]))||!k.length||!k[0]){var S,A=[];for(T in o[w])this.terminals_[T]&&2<T&&A.push("'"+this.terminals_[T]+"'");S=g.showPosition?"Parse error on line "+(c+1)+`: +`+g.showPosition()+` +Expecting `+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(c+1)+": Unexpected "+(x==d?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(S,{text:g.match,token:this.terminals_[x]||x,line:g.yylineno,loc:m,expected:A})}if(k[0]instanceof Array&&1<k.length)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+x);switch(k[0]){case 1:n.push(x),a.push(g.yytext),s.push(g.yylloc),n.push(k[1]),x=null,b?(x=b,b=null):(h=g.yyleng,l=g.yytext,c=g.yylineno,m=g.yylloc,0<u&&u--);break;case 2:if(E=this.productions_[k[1]][1],_.$=a[a.length-E],_._$={first_line:s[s.length-(E||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(E||1)].first_column,last_column:s[s.length-1].last_column},y&&(_._$.range=[s[s.length-(E||1)].range[0],s[s.length-1].range[1]]),typeof(C=this.performAction.apply(_,[l,h,c,f.yy,k[1],a,s].concat(p)))<"u")return C;E&&(n=n.slice(0,-1*E*2),a=a.slice(0,-1*E),s=s.slice(0,-1*E)),n.push(this.productions_[k[1]][0]),a.push(_.$),s.push(_._$),C=o[n[n.length-2]][n[n.length-1]],n.push(C);break;case 3:return!0}}return!0},"parse")},i={EOF:1,parseError:mt(function(e,t){if(!this.yy.parser)throw new Error(e);this.yy.parser.parseError(e,t)},"parseError"),setInput:mt(function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:mt(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},"input"),unput:mt(function(e){var t=e.length,r=e.split(/(?:\r\n?|\n)/g),e=(this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t,this.match.split(/(?:\r\n?|\n)/g)),n=(this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),r.length-1&&(this.yylineno-=r.length-1),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:r?(r.length===e.length?this.yylloc.first_column:0)+e[e.length-r.length].length-r[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[n[0],n[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},"unput"),more:mt(function(){return this._more=!0,this},"more"),reject:mt(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):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})},"reject"),less:mt(function(e){this.unput(this.match.slice(e))},"less"),pastInput:mt(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(20<e.length?"...":"")+e.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:mt(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(20<e.length?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:mt(function(){var e=this.pastInput(),t=new Array(e.length+1).join("-");return e+this.upcomingInput()+` +`+t+"^"},"showPosition"),test_match:mt(function(e,t){var r,n;if(this.options.backtrack_lexer&&(n={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges)&&(n.yylloc.range=this.yylloc.range.slice(0)),(r=e[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],r=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack)for(var i in n)this[i]=n[i];return!1},"test_match"),next:mt(function(){if(this.done)return this.EOF;var e,t,r,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((r=this._input.match(this.rules[i[a]]))&&(!t||r[0].length>t[0].length)){if(t=r,n=a,this.options.backtrack_lexer){if(!1!==(e=this.test_match(r,i[a])))return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?!1!==(e=this.test_match(t,i[n]))&&e:""===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:mt(function(){return this.next()||this.lex()},"lex"),begin:mt(function(e){this.conditionStack.push(e)},"begin"),popState:mt(function(){return 0<this.conditionStack.length-1?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:mt(function(){return(this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]]:this.conditions.INITIAL).rules},"_currentRules"),topState:mt(function(e){return 0<=(e=this.conditionStack.length-1-Math.abs(e||0))?this.conditionStack[e]:"INITIAL"},"topState"),pushState:mt(function(e){this.begin(e)},"pushState"),stateStackSize:mt(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:mt(function(e,t,r,n){switch(r){case 0:return this.begin("acc_title"),24;case 1:return this.popState(),"acc_title_value";case 2:return this.begin("acc_descr"),26;case 3:return this.popState(),"acc_descr_value";case 4:this.begin("acc_descr_multiline");break;case 5:this.popState();break;case 6:return"acc_descr_multiline_value";case 7:return 33;case 8:return 34;case 9:return 35;case 10:return 36;case 11:return 10;case 12:break;case 13:return 8;case 14:return 50;case 15:return 70;case 16:return 4;case 17:return this.begin("block"),17;case 18:case 19:return 49;case 20:return 42;case 21:return 15;case 22:return 13;case 23:break;case 24:return 59;case 25:case 26:return 56;case 27:return 60;case 28:break;case 29:return this.popState(),19;case 30:return t.yytext[0];case 31:return 20;case 32:return 21;case 33:return this.begin("style"),44;case 34:return this.popState(),10;case 35:break;case 36:return 13;case 37:return 42;case 38:return 49;case 39:return this.begin("style"),37;case 40:return 43;case 41:return 63;case 42:case 43:case 44:return 65;case 45:case 46:return 63;case 47:case 48:case 49:case 50:case 51:return 64;case 52:return 65;case 53:return 64;case 54:return 65;case 55:case 56:case 57:case 58:return 66;case 59:return 63;case 60:return 64;case 61:return 65;case 62:return 67;case 63:return 68;case 64:case 65:return 69;case 66:case 67:case 68:return 68;case 69:return 41;case 70:return 47;case 71:return 40;case 72:return 48;case 73:return t.yytext[0];case 74:return 6}},"anonymous"),rules:[/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:[\s]+)/i,/^(?:"[^"%\r\n\v\b\\]+")/i,/^(?:"[^"]*")/i,/^(?:erDiagram\b)/i,/^(?:\{)/i,/^(?:#)/i,/^(?:#)/i,/^(?:,)/i,/^(?::::)/i,/^(?::)/i,/^(?:\s+)/i,/^(?:\b((?:PK)|(?:FK)|(?:UK))\b)/i,/^(?:([^\s]*)[~].*[~]([^\s]*))/i,/^(?:([\*A-Za-z_\u00C0-\uFFFF][A-Za-z0-9\-\_\[\]\(\)\u00C0-\uFFFF\*]*))/i,/^(?:"[^"]*")/i,/^(?:[\n]+)/i,/^(?:\})/i,/^(?:.)/i,/^(?:\[)/i,/^(?:\])/i,/^(?:style\b)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?::)/i,/^(?:,)/i,/^(?:#)/i,/^(?:classDef\b)/i,/^(?:class\b)/i,/^(?:one or zero\b)/i,/^(?:one or more\b)/i,/^(?:one or many\b)/i,/^(?:1\+)/i,/^(?:\|o\b)/i,/^(?:zero or one\b)/i,/^(?:zero or more\b)/i,/^(?:zero or many\b)/i,/^(?:0\+)/i,/^(?:\}o\b)/i,/^(?:many\(0\))/i,/^(?:many\(1\))/i,/^(?:many\b)/i,/^(?:\}\|)/i,/^(?:one\b)/i,/^(?:only one\b)/i,/^(?:1\b)/i,/^(?:\|\|)/i,/^(?:o\|)/i,/^(?:o\{)/i,/^(?:\|\{)/i,/^(?:\s*u\b)/i,/^(?:\.\.)/i,/^(?:--)/i,/^(?:to\b)/i,/^(?:optionally to\b)/i,/^(?:\.-)/i,/^(?:-\.)/i,/^(?:([^\x00-\x7F]|\w|-|\*)+)/i,/^(?:;)/i,/^(?:([^\x00-\x7F]|\w|-|\*)+)/i,/^(?:[0-9])/i,/^(?:.)/i,/^(?:$)/i],conditions:{style:{rules:[34,35,36,37,38,69,70],inclusive:!1},acc_descr_multiline:{rules:[5,6],inclusive:!1},acc_descr:{rules:[3],inclusive:!1},acc_title:{rules:[1],inclusive:!1},block:{rules:[23,24,25,26,27,28,29,30],inclusive:!1},INITIAL:{rules:[0,2,4,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,31,32,33,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,71,72,73,74],inclusive:!0}}};n.lexer=i,mt(e,"Parser"),(oue=new((e.prototype=n).Parser=e)).parser=oue,lue=oue}),due=b(()=>{e(),Tu(),ku(),i_(),cue=class{constructor(){this.entities=new Map,this.relationships=[],this.classes=new Map,this.direction="TB",this.Cardinality={ZERO_OR_ONE:"ZERO_OR_ONE",ZERO_OR_MORE:"ZERO_OR_MORE",ONE_OR_MORE:"ONE_OR_MORE",ONLY_ONE:"ONLY_ONE",MD_PARENT:"MD_PARENT"},this.Identification={NON_IDENTIFYING:"NON_IDENTIFYING",IDENTIFYING:"IDENTIFYING"},this.setAccTitle=mh,this.getAccTitle=yh,this.setAccDescription=vh,this.getAccDescription=xh,this.setDiagramTitle=bh,this.getDiagramTitle=wh,this.getConfig=mt(()=>O().er,"getConfig"),this.clear(),this.addEntity=this.addEntity.bind(this),this.addAttributes=this.addAttributes.bind(this),this.addRelationship=this.addRelationship.bind(this),this.setDirection=this.setDirection.bind(this),this.addCssStyles=this.addCssStyles.bind(this),this.addClass=this.addClass.bind(this),this.setClass=this.setClass.bind(this),this.setAccTitle=this.setAccTitle.bind(this),this.setAccDescription=this.setAccDescription.bind(this)}static{mt(this,"ErDB")}addEntity(e,t=""){return this.entities.has(e)?!this.entities.get(e)?.alias&&t&&(this.entities.get(e).alias=t,D.info(`Add alias '${t}' to entity '${e}'`)):(this.entities.set(e,{id:`entity-${e}-`+this.entities.size,label:e,attributes:[],alias:t,shape:"erBox",look:O().look??"default",cssClasses:"default",cssStyles:[]}),D.info("Added new entity :",e)),this.entities.get(e)}getEntity(e){return this.entities.get(e)}getEntities(){return this.entities}getClasses(){return this.classes}addAttributes(e,t){let r=this.addEntity(e),n;for(n=t.length-1;0<=n;n--)t[n].keys||(t[n].keys=[]),t[n].comment||(t[n].comment=""),r.attributes.push(t[n]),D.debug("Added attribute ",t[n].name)}addRelationship(e,t,r,n){e=this.entities.get(e),r=this.entities.get(r),e&&r&&(e={entityA:e.id,roleA:t,entityB:r.id,relSpec:n},this.relationships.push(e),D.debug("Added new relationship :",e))}getRelationships(){return this.relationships}getDirection(){return this.direction}setDirection(e){this.direction=e}getCompiledStyles(e){let t=[];for(var r of e)(r=this.classes.get(r))?.styles&&(t=[...t,...r.styles??[]].map(e=>e.trim())),r?.textStyles&&(t=[...t,...r.textStyles??[]].map(e=>e.trim()));return t}addCssStyles(e,t){for(var r of e){var n,i=this.entities.get(r);if(!t||!i)return;for(n of t)i.cssStyles.push(n)}}addClass(e,t){e.forEach(e=>{let r=this.classes.get(e);void 0===r&&(r={id:e,styles:[],textStyles:[]},this.classes.set(e,r)),t&&t.forEach(function(e){var t;/color/.exec(e)&&(t=e.replace("fill","bgFill"),r.textStyles.push(t)),r.styles.push(e)})})}setClass(e,t){for(var r of e){var n=this.entities.get(r);if(n)for(var i of t)n.cssClasses+=" "+i}}clear(){this.entities=new Map,this.classes=new Map,this.relationships=[],fh()}getData(){var e,t,r=[],n=[],i=O();for(e of this.entities.keys()){var a=this.entities.get(e);a&&(a.cssCompiledStyles=this.getCompiledStyles(a.cssClasses.split(" ")),r.push(a))}let s=0;for(t of this.relationships){var o={id:n_(t.entityA,t.entityB,{prefix:"id",counter:s++}),type:"normal",curve:"basis",start:t.entityA,end:t.entityB,label:t.roleA,labelpos:"c",thickness:"normal",classes:"relationshipLine",arrowTypeStart:t.relSpec.cardB.toLowerCase(),arrowTypeEnd:t.relSpec.cardA.toLowerCase(),pattern:"IDENTIFYING"==t.relSpec.relType?"solid":"dashed",look:i.look};n.push(o)}return{nodes:r,edges:n,other:{},config:i,direction:"TB"}}}}),pue={};OFe(pue,{draw:()=>gue});var gue,fue,mue,yue,vue=b(()=>{Tu(),e(),iO(),Qhe(),Jhe(),i_(),i6(),gue=mt(async function(e,t,r,n){D.info("REF0:"),D.info("Drawing er diagram (unified)",t);let{securityLevel:i,er:a,layout:s}=O(),o=n.db.getData(),l=YD(t,i);o.type=n.type,o.layoutAlgorithm=Phe(s),o.config.flowchart.nodeSpacing=a?.nodeSpacing||140,o.config.flowchart.rankSpacing=a?.rankSpacing||80,o.direction=n.db.getDirection(),o.markers=["only_one","zero_or_one","one_or_more","zero_or_more"],o.diagramId=t,await Ohe(o,l),"elk"===o.layoutAlgorithm&&l.select(".edges").lower(),t=l.selectAll('[id*="-background"]'),0<Array.from(t).length&&t.each(function(){var e=H(this),t=e.attr("id").replace("-background","");(t=l.select("#"+CSS.escape(t))).empty()||(t=t.attr("transform"),e.attr("transform",t))}),e_.insertTitle(l,"erDiagramTitleText",a?.titleTopMargin??25,n.db.getDiagramTitle()),Bhe(l,8,"erDiagram",a?.useMaxWidth??!0)},"draw")}),xue=b(()=>{jr(),fue=mt((e,t)=>{var r=(i=ct)(e,"r"),n=i(e,"g"),i=i(e,"b");return ot(r,n,i,t)},"fade"),mue=mt(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: ${fue(e.tertiaryColor,.5)}; + } + + .edgeLabel .label { + fill: ${e.nodeBorder}; + font-size: 14px; + } + + .label { + font-family: ${e.fontFamily}; + color: ${e.nodeTextColor||e.textColor}; + } + + .edge-pattern-dashed { + stroke-dasharray: 8,8; + } + + .node rect, + .node circle, + .node ellipse, + .node polygon + { + fill: ${e.mainBkg}; + stroke: ${e.nodeBorder}; + stroke-width: 1px; + } + + .relationshipLine { + stroke: ${e.lineColor}; + stroke-width: 1; + fill: none; + } + + .marker { + fill: none !important; + stroke: ${e.lineColor} !important; + stroke-width: 1; + } +`,"getStyles"),yue=mue}),bue={};OFe(bue,{diagram:()=>wue});var wue,kue=b(()=>{uue(),due(),vue(),xue(),wue={parser:lue,get db(){return new cue},renderer:pue,styles:yue}});function Tue(e){return"object"==typeof e&&null!==e&&"string"==typeof e.$type}function Eue(e){return"object"==typeof e&&null!==e&&"string"==typeof e.$refText}function Cue(e){return"object"==typeof e&&null!==e&&"string"==typeof e.name&&"string"==typeof e.type&&"string"==typeof e.path}function _ue(e){return"object"==typeof e&&null!==e&&Tue(e.container)&&Eue(e.reference)&&"string"==typeof e.message}function Sue(e){return"object"==typeof e&&null!==e&&Array.isArray(e.content)}function Aue(e){return"object"==typeof e&&null!==e&&"object"==typeof e.tokenType}function Lue(e){return Sue(e)&&"string"==typeof e.fullText}var Nue,Iue=b(()=>{mt(Tue,"isAstNode"),mt(Eue,"isReference"),mt(Cue,"isAstNodeDescription"),mt(_ue,"isLinkingError"),Nue=class{static{mt(this,"AbstractAstReflection")}constructor(){this.subtypes={},this.allSubtypes={}}isInstance(e,t){return Tue(e)&&this.isSubtype(e.$type,t)}isSubtype(e,t){var r,n;return e===t||(void 0!==(n=(r=(r=this.subtypes[e])||(this.subtypes[e]={}))[t])?n:(n=this.computeIsSubtype(e,t),r[t]=n))}getAllSubTypes(e){var t=this.allSubtypes[e];if(t)return t;var r,n=[];for(r of this.getAllTypes())this.isSubtype(r,e)&&n.push(r);return this.allSubtypes[e]=n}},mt(Sue,"isCompositeCstNode"),mt(Aue,"isLeafCstNode"),mt(Lue,"isRootCstNode")});function Rue(e){return"string"==typeof e?e:"u"<typeof e?"undefined":"function"==typeof e.toString?e.toString():Object.prototype.toString.call(e)}function Mue(e){return!!e&&"function"==typeof e[Symbol.iterator]}function Due(...r){if(1===r.length){let t=r[0];if(t instanceof Oue)return t;if(Mue(t))return new Oue(()=>t[Symbol.iterator](),e=>e.next());if("number"==typeof t.length)return new Oue(()=>({index:0}),e=>e.index<t.length?{done:!1,value:t[e.index++]}:Bue)}return 1<r.length?new Oue(()=>({collIndex:0,arrIndex:0}),e=>{do{if(e.iterator){var t=e.iterator.next();if(!t.done)return t;e.iterator=void 0}if(e.array){if(e.arrIndex<e.array.length)return{done:!1,value:e.array[e.arrIndex++]};e.array=void 0,e.arrIndex=0}}while(e.collIndex<r.length&&(Mue(t=r[e.collIndex++])?e.iterator=t[Symbol.iterator]():t&&"number"==typeof t.length&&(e.array=t)),e.iterator||e.array||e.collIndex<r.length);return Bue}):Pue}var Oue,Pue,Bue,$ue,Fue,zue=b(()=>{function e(e){return e.reduce((e,t)=>e+t,0)}function t(e){return e.reduce((e,t)=>e*t,0)}function r(e){return e.reduce((e,t)=>Math.min(e,t))}function n(e){return e.reduce((e,t)=>Math.max(e,t))}var i;Oue=class a{static{mt(this,"StreamImpl")}constructor(e,t){this.startFn=e,this.nextFn=t}iterator(){let e={state:this.startFn(),next:mt(()=>this.nextFn(e.state),"next"),[Symbol.iterator]:()=>e};return e}[Symbol.iterator](){return this.iterator()}isEmpty(){return!!this.iterator().next().done}count(){let e=this.iterator(),t=0,r=e.next();for(;!r.done;)t++,r=e.next();return t}toArray(){for(var e,t=[],r=this.iterator();void 0!==(e=r.next()).value&&t.push(e.value),!e.done;);return t}toSet(){return new Set(this)}toMap(t,r){var e=this.map(e=>[t?t(e):e,r?r(e):e]);return new Map(e)}toString(){return this.join()}concat(e){return new a(()=>({first:this.startFn(),firstDone:!1,iterator:e[Symbol.iterator]()}),e=>{let t;if(!e.firstDone){do{if(!(t=this.nextFn(e.first)).done)return t}while(!t.done);e.firstDone=!0}do{if(!(t=e.iterator.next()).done)return t}while(!t.done);return Bue})}join(e=","){let t=this.iterator(),r="",n,i=!1;for(;(n=t.next()).done||(i&&(r+=e),r+=Rue(n.value)),i=!0,!n.done;);return r}indexOf(e,t=0){let r=this.iterator(),n=0,i=r.next();for(;!i.done;){if(n>=t&&i.value===e)return n;i=r.next(),n++}return-1}every(e){let t=this.iterator(),r=t.next();for(;!r.done;){if(!e(r.value))return!1;r=t.next()}return!0}some(e){let t=this.iterator(),r=t.next();for(;!r.done;){if(e(r.value))return!0;r=t.next()}return!1}forEach(e){let t=this.iterator(),r=0,n=t.next();for(;!n.done;)e(n.value,r),n=t.next(),r++}map(r){return new a(this.startFn,e=>{var{done:e,value:t}=this.nextFn(e);return e?Bue:{done:!1,value:r(t)}})}filter(r){return new a(this.startFn,e=>{var t;do{if(!(t=this.nextFn(e)).done&&r(t.value))return t}while(!t.done);return Bue})}nonNullable(){return this.filter(e=>null!=e)}reduce(e,t){let r=this.iterator(),n=t,i=r.next();for(;!i.done;)n=void 0===n?i.value:e(n,i.value),i=r.next();return n}reduceRight(e,t){return this.recursiveReduce(this.iterator(),e,t)}recursiveReduce(e,t,r){var n=e.next();return n.done?r:void 0===(e=this.recursiveReduce(e,t,r))?n.value:t(e,n.value)}find(e){let t=this.iterator(),r=t.next();for(;!r.done;){if(e(r.value))return r.value;r=t.next()}}findIndex(e){let t=this.iterator(),r=0,n=t.next();for(;!n.done;){if(e(n.value))return r;n=t.next(),r++}return-1}includes(e){let t=this.iterator(),r=t.next();for(;!r.done;){if(r.value===e)return!0;r=t.next()}return!1}flatMap(n){return new a(()=>({this:this.startFn()}),e=>{do{if(e.iterator){if(!(t=e.iterator.next()).done)return t;e.iterator=void 0}var{done:t,value:r}=this.nextFn(e.this);if(!t){if(!Mue(r=n(r)))return{done:!1,value:r};e.iterator=r[Symbol.iterator]()}}while(e.iterator);return Bue})}flat(e){if((e=void 0===e?1:e)<=0)return this;let n=1<e?this.flat(e-1):this;return new a(()=>({this:n.startFn()}),e=>{do{if(e.iterator){if(!(t=e.iterator.next()).done)return t;e.iterator=void 0}var{done:t,value:r}=n.nextFn(e.this);if(!t){if(!Mue(r))return{done:!1,value:r};e.iterator=r[Symbol.iterator]()}}while(e.iterator);return Bue})}head(){var e=this.iterator().next();if(!e.done)return e.value}tail(r=1){return new a(()=>{var t=this.startFn();for(let e=0;e<r;e++)if(this.nextFn(t).done)return t;return t},this.nextFn)}limit(t){return new a(()=>({size:0,state:this.startFn()}),e=>(e.size++,t<e.size?Bue:this.nextFn(e.state)))}distinct(n){return new a(()=>({set:new Set,internalState:this.startFn()}),e=>{var t;do{if(!(t=this.nextFn(e.internalState)).done){var r=n?n(t.value):t.value;if(!e.set.has(r))return e.set.add(r),t}}while(!t.done);return Bue})}exclude(e,t){let r=new Set;for(var n of e)n=t?t(n):n,r.add(n);return this.filter(e=>(e=t?t(e):e,!r.has(e)))}},mt(Rue,"toString"),mt(Mue,"isIterable"),Pue=new Oue(()=>{},()=>Bue),Bue=Object.freeze({done:!0,value:void 0}),mt(Due,"stream"),$ue=class extends Oue{static{mt(this,"TreeStreamImpl")}constructor(e,r,t){super(()=>({iterators:t?.includeRoot?[[e][Symbol.iterator]()]:[r(e)[Symbol.iterator]()],pruned:!1}),e=>{for(e.pruned&&(e.iterators.pop(),e.pruned=!1);0<e.iterators.length;){var t=e.iterators[e.iterators.length-1].next();if(!t.done)return e.iterators.push(r(t.value)[Symbol.iterator]()),t;e.iterators.pop()}return Bue})}iterator(){let e={state:this.startFn(),next:mt(()=>this.nextFn(e.state),"next"),prune:mt(()=>{e.state.pruned=!0},"prune"),[Symbol.iterator]:()=>e};return e}},i=Fue=Fue||{},mt(e,"sum"),i.sum=e,mt(t,"product"),i.product=t,mt(r,"min"),i.min=r,mt(n,"max"),i.max=n}),Gue={};function Uue(e){return new $ue(e,e=>Sue(e)?e.content:[],{includeRoot:!0})}function que(e){return Uue(e).filter(Aue)}function jue(e,t){for(;e.container;)if((e=e.container)===t)return!0;return!1}function Yue(e){return{start:{character:e.startColumn-1,line:e.startLine-1},end:{character:e.endColumn,line:e.endLine-1}}}function Wue(e){var t,r;if(e)return{offset:e,end:t,range:r}=e,{range:r,offset:e,end:t,length:t-e}}function Hue(e,t){var r;return e.end.line<t.start.line||e.end.line===t.start.line&&e.end.character<=t.start.character?ode.Before:e.start.line>t.end.line||e.start.line===t.end.line&&e.start.character>=t.end.character?ode.After:(r=e.start.line>t.start.line||e.start.line===t.start.line&&e.start.character>=t.start.character,e=e.end.line<t.end.line||e.end.line===t.end.line&&e.end.character<=t.end.character,r&&e?ode.Inside:r?ode.OverlapBack:e?ode.OverlapFront:ode.Outside)}function Vue(e,t){return Hue(e,t)>ode.After}function Xue(e,t,r=lde){var n;if(e)return 0<t&&(n=t-e.offset,n=e.text.charAt(n),r.test(n)||t--),Que(e,t)}function Kue(t,r){if(t){var e=tde(t,!0);if(e&&Zue(e,r))return e;if(Lue(t))for(let e=t.content.findIndex(e=>!e.hidden)-1;0<=e;e--){var n=t.content[e];if(Zue(n,r))return n}}}function Zue(e,t){return Aue(e)&&t.includes(e.tokenType.name)}function Que(e,t){return Aue(e)?e:Sue(e)&&(e=ede(e,t,!1))?Que(e,t):void 0}function Jue(e,t){return Aue(e)?e:Sue(e)&&(e=ede(e,t,!0))?Jue(e,t):void 0}function ede(e,t,r){let n=0,i=e.content.length-1,a;for(;n<=i;){var s=Math.floor((n+i)/2),o=e.content[s];if(o.offset<=t&&o.end>t)return o;o.end<=t?(a=r?o:void 0,n=s+1):i=s-1}return a}function tde(r,n=!0){for(;r.container;){let e=r.container,t=e.content.indexOf(r);for(;0<t;){t--;var i=e.content[t];if(n||!i.hidden)return i}r=e}}function rde(n,i=!0){for(;n.container;){let e=n.container,t=e.content.indexOf(n),r=e.content.length-1;for(;t<r;){t++;var a=e.content[t];if(i||!a.hidden)return a}n=e}}function nde(e){if(0===e.range.start.character)return e;let t=e.range.start.line,r=e,n;for(;e.container;){var i=e.container,a=n??i.content.indexOf(e);if(0===a?(e=i,n=void 0):(n=a-1,e=i.content[n]),e.range.start.line!==t)break;r=e}return r}function ide(e,t){return(e=ade(e,t))?e.parent.content.slice(e.a+1,e.b):[]}function ade(e,t){let r=sde(e),n=sde(t),i;for(let e=0;e<r.length&&e<n.length;e++){var a=r[e],s=n[e];if(a.parent!==s.parent)break;i={parent:a.parent,a:a.index,b:s.index}}return i}function sde(e){for(var t=[];e.container;){var r=e.container,n=r.content.indexOf(e);t.push({parent:r,index:n}),e=r}return t.reverse()}OFe(Gue,{DefaultNameRegexp:()=>lde,RangeComparison:()=>ode,compareRange:()=>Hue,findCommentNode:()=>Kue,findDeclarationNodeAtOffset:()=>Xue,findLeafNodeAtOffset:()=>Que,findLeafNodeBeforeOffset:()=>Jue,flattenCst:()=>que,getInteriorNodes:()=>ide,getNextNode:()=>rde,getPreviousNode:()=>tde,getStartlineNode:()=>nde,inRange:()=>Vue,isChildNode:()=>jue,isCommentNode:()=>Zue,streamCst:()=>Uue,toDocumentSegment:()=>Wue,tokenToRange:()=>Yue});var ode,lde,cde=b(()=>{var e;Iue(),zue(),mt(Uue,"streamCst"),mt(que,"flattenCst"),mt(jue,"isChildNode"),mt(Yue,"tokenToRange"),mt(Wue,"toDocumentSegment"),(e=ode=ode||{})[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",mt(Hue,"compareRange"),mt(Vue,"inRange"),lde=/^[\w\p{L}]$/u,mt(Xue,"findDeclarationNodeAtOffset"),mt(Kue,"findCommentNode"),mt(Zue,"isCommentNode"),mt(Que,"findLeafNodeAtOffset"),mt(Jue,"findLeafNodeBeforeOffset"),mt(ede,"binarySearch"),mt(tde,"getPreviousNode"),mt(rde,"getNextNode"),mt(nde,"getStartlineNode"),mt(ide,"getInteriorNodes"),mt(ade,"getCommonParent"),mt(sde,"getParentChain")});function hde(e){throw new Error("Error! The input value was not handled.")}var ude,dde=b(()=>{ude=class extends Error{static{mt(this,"ErrorWithLocation")}constructor(e,t){super(e?`${t} at ${e.range.start.line}:`+e.range.start.character:t)}},mt(hde,"assertUnreachable")}),pde={};function gde(e){return r0e.isInstance(e,cpe)}function fde(e){return r0e.isInstance(e,hpe)}function mde(e){return r0e.isInstance(e,upe)}function yde(e){return vde(e)||"current"===e||"entry"===e||"extends"===e||"false"===e||"fragment"===e||"grammar"===e||"hidden"===e||"import"===e||"interface"===e||"returns"===e||"terminal"===e||"true"===e||"type"===e||"infer"===e||"infers"===e||"with"===e||"string"==typeof e&&/\^?[_a-zA-Z][\w_]*/.test(e)}function vde(e){return"string"===e||"number"===e||"boolean"===e||"Date"===e||"bigint"===e}function xde(e){return r0e.isInstance(e,dpe)}function bde(e){return r0e.isInstance(e,ppe)}function wde(e){return r0e.isInstance(e,gpe)}function kde(e){return r0e.isInstance(e,fpe)}function Tde(e){return r0e.isInstance(e,mpe)}function Ede(e){return r0e.isInstance(e,ype)}function Cde(e){return r0e.isInstance(e,vpe)}function _de(e){return r0e.isInstance(e,xpe)}function Sde(e){return r0e.isInstance(e,bpe)}function Ade(e){return r0e.isInstance(e,wpe)}function Lde(e){return r0e.isInstance(e,kpe)}function Nde(e){return r0e.isInstance(e,Tpe)}function Ide(e){return r0e.isInstance(e,Epe)}function Rde(e){return r0e.isInstance(e,Cpe)}function Mde(e){return r0e.isInstance(e,_pe)}function Dde(e){return r0e.isInstance(e,Spe)}function Ode(e){return r0e.isInstance(e,Ape)}function Pde(e){return r0e.isInstance(e,Lpe)}function Bde(e){return r0e.isInstance(e,Npe)}function $de(e){return r0e.isInstance(e,Ipe)}function Fde(e){return r0e.isInstance(e,Rpe)}function zde(e){return r0e.isInstance(e,Mpe)}function Gde(e){return r0e.isInstance(e,Dpe)}function Ude(e){return r0e.isInstance(e,Ope)}function qde(e){return r0e.isInstance(e,Ppe)}function jde(e){return r0e.isInstance(e,Bpe)}function Yde(e){return r0e.isInstance(e,$pe)}function Wde(e){return r0e.isInstance(e,Fpe)}function Hde(e){return r0e.isInstance(e,zpe)}function Vde(e){return r0e.isInstance(e,Gpe)}function Xde(e){return r0e.isInstance(e,Upe)}function Kde(e){return r0e.isInstance(e,qpe)}function Zde(e){return r0e.isInstance(e,jpe)}function Qde(e){return r0e.isInstance(e,Ype)}function Jde(e){return r0e.isInstance(e,Wpe)}function epe(e){return r0e.isInstance(e,Hpe)}function tpe(e){return r0e.isInstance(e,Vpe)}function rpe(e){return r0e.isInstance(e,Xpe)}function npe(e){return r0e.isInstance(e,Kpe)}function ipe(e){return r0e.isInstance(e,Zpe)}function ape(e){return r0e.isInstance(e,Qpe)}function spe(e){return r0e.isInstance(e,Jpe)}function ope(e){return r0e.isInstance(e,e0e)}OFe(pde,{AbstractElement:()=>gpe,AbstractRule:()=>cpe,AbstractType:()=>hpe,Action:()=>$pe,Alternatives:()=>Fpe,ArrayLiteral:()=>fpe,ArrayType:()=>mpe,Assignment:()=>zpe,BooleanLiteral:()=>ype,CharacterRange:()=>Gpe,Condition:()=>upe,Conjunction:()=>vpe,CrossReference:()=>Upe,Disjunction:()=>xpe,EndOfFile:()=>qpe,Grammar:()=>bpe,GrammarImport:()=>wpe,Group:()=>jpe,InferredType:()=>kpe,Interface:()=>Tpe,Keyword:()=>Ype,LangiumGrammarAstReflection:()=>t0e,LangiumGrammarTerminals:()=>lpe,NamedArgument:()=>Epe,NegatedToken:()=>Wpe,Negation:()=>Cpe,NumberLiteral:()=>_pe,Parameter:()=>Spe,ParameterReference:()=>Ape,ParserRule:()=>Lpe,ReferenceType:()=>Npe,RegexToken:()=>Hpe,ReturnType:()=>Ipe,RuleCall:()=>Vpe,SimpleType:()=>Rpe,StringLiteral:()=>Mpe,TerminalAlternatives:()=>Xpe,TerminalGroup:()=>Kpe,TerminalRule:()=>Dpe,TerminalRuleCall:()=>Zpe,Type:()=>Ope,TypeAttribute:()=>Ppe,TypeDefinition:()=>dpe,UnionType:()=>Bpe,UnorderedGroup:()=>Qpe,UntilToken:()=>Jpe,ValueLiteral:()=>ppe,Wildcard:()=>e0e,isAbstractElement:()=>wde,isAbstractRule:()=>gde,isAbstractType:()=>fde,isAction:()=>Yde,isAlternatives:()=>Wde,isArrayLiteral:()=>kde,isArrayType:()=>Tde,isAssignment:()=>Hde,isBooleanLiteral:()=>Ede,isCharacterRange:()=>Vde,isCondition:()=>mde,isConjunction:()=>Cde,isCrossReference:()=>Xde,isDisjunction:()=>_de,isEndOfFile:()=>Kde,isFeatureName:()=>yde,isGrammar:()=>Sde,isGrammarImport:()=>Ade,isGroup:()=>Zde,isInferredType:()=>Lde,isInterface:()=>Nde,isKeyword:()=>Qde,isNamedArgument:()=>Ide,isNegatedToken:()=>Jde,isNegation:()=>Rde,isNumberLiteral:()=>Mde,isParameter:()=>Dde,isParameterReference:()=>Ode,isParserRule:()=>Pde,isPrimitiveType:()=>vde,isReferenceType:()=>Bde,isRegexToken:()=>epe,isReturnType:()=>$de,isRuleCall:()=>tpe,isSimpleType:()=>Fde,isStringLiteral:()=>zde,isTerminalAlternatives:()=>rpe,isTerminalGroup:()=>npe,isTerminalRule:()=>Gde,isTerminalRuleCall:()=>ipe,isType:()=>Ude,isTypeAttribute:()=>qde,isTypeDefinition:()=>xde,isUnionType:()=>jde,isUnorderedGroup:()=>ape,isUntilToken:()=>spe,isValueLiteral:()=>bde,isWildcard:()=>ope,reflection:()=>r0e});var lpe,cpe,hpe,upe,dpe,ppe,gpe,fpe,mpe,ype,vpe,xpe,bpe,wpe,kpe,Tpe,Epe,Cpe,_pe,Spe,Ape,Lpe,Npe,Ipe,Rpe,Mpe,Dpe,Ope,Ppe,Bpe,$pe,Fpe,zpe,Gpe,Upe,qpe,jpe,Ype,Wpe,Hpe,Vpe,Xpe,Kpe,Zpe,Qpe,Jpe,e0e,t0e,r0e,n0e=b(()=>{Iue(),lpe={ID:/\^?[_a-zA-Z][\w_]*/,STRING:/"(\\.|[^"\\])*"|'(\\.|[^'\\])*'/,NUMBER:/NaN|-?((\d*\.\d+|\d+)([Ee][+-]?\d+)?|Infinity)/,RegexLiteral:/\/(?![*+?])(?:[^\r\n\[/\\]|\\.|\[(?:[^\r\n\]\\]|\\.)*\])+\/[a-z]*/,WS:/\s+/,ML_COMMENT:/\/\*[\s\S]*?\*\//,SL_COMMENT:/\/\/[^\n\r]*/},cpe="AbstractRule",mt(gde,"isAbstractRule"),hpe="AbstractType",mt(fde,"isAbstractType"),upe="Condition",mt(mde,"isCondition"),mt(yde,"isFeatureName"),mt(vde,"isPrimitiveType"),dpe="TypeDefinition",mt(xde,"isTypeDefinition"),ppe="ValueLiteral",mt(bde,"isValueLiteral"),gpe="AbstractElement",mt(wde,"isAbstractElement"),fpe="ArrayLiteral",mt(kde,"isArrayLiteral"),mpe="ArrayType",mt(Tde,"isArrayType"),ype="BooleanLiteral",mt(Ede,"isBooleanLiteral"),vpe="Conjunction",mt(Cde,"isConjunction"),xpe="Disjunction",mt(_de,"isDisjunction"),bpe="Grammar",mt(Sde,"isGrammar"),wpe="GrammarImport",mt(Ade,"isGrammarImport"),kpe="InferredType",mt(Lde,"isInferredType"),Tpe="Interface",mt(Nde,"isInterface"),Epe="NamedArgument",mt(Ide,"isNamedArgument"),Cpe="Negation",mt(Rde,"isNegation"),_pe="NumberLiteral",mt(Mde,"isNumberLiteral"),Spe="Parameter",mt(Dde,"isParameter"),Ape="ParameterReference",mt(Ode,"isParameterReference"),Lpe="ParserRule",mt(Pde,"isParserRule"),Npe="ReferenceType",mt(Bde,"isReferenceType"),Ipe="ReturnType",mt($de,"isReturnType"),Rpe="SimpleType",mt(Fde,"isSimpleType"),Mpe="StringLiteral",mt(zde,"isStringLiteral"),Dpe="TerminalRule",mt(Gde,"isTerminalRule"),Ope="Type",mt(Ude,"isType"),Ppe="TypeAttribute",mt(qde,"isTypeAttribute"),Bpe="UnionType",mt(jde,"isUnionType"),$pe="Action",mt(Yde,"isAction"),Fpe="Alternatives",mt(Wde,"isAlternatives"),zpe="Assignment",mt(Hde,"isAssignment"),Gpe="CharacterRange",mt(Vde,"isCharacterRange"),Upe="CrossReference",mt(Xde,"isCrossReference"),qpe="EndOfFile",mt(Kde,"isEndOfFile"),jpe="Group",mt(Zde,"isGroup"),Ype="Keyword",mt(Qde,"isKeyword"),Wpe="NegatedToken",mt(Jde,"isNegatedToken"),Hpe="RegexToken",mt(epe,"isRegexToken"),Vpe="RuleCall",mt(tpe,"isRuleCall"),Xpe="TerminalAlternatives",mt(rpe,"isTerminalAlternatives"),Kpe="TerminalGroup",mt(npe,"isTerminalGroup"),Zpe="TerminalRuleCall",mt(ipe,"isTerminalRuleCall"),Qpe="UnorderedGroup",mt(ape,"isUnorderedGroup"),Jpe="UntilToken",mt(spe,"isUntilToken"),e0e="Wildcard",mt(ope,"isWildcard"),t0e=class extends Nue{static{mt(this,"LangiumGrammarAstReflection")}getAllTypes(){return[gpe,cpe,hpe,$pe,Fpe,fpe,mpe,zpe,ype,Gpe,upe,vpe,Upe,xpe,qpe,bpe,wpe,jpe,kpe,Tpe,Ype,Epe,Wpe,Cpe,_pe,Spe,Ape,Lpe,Npe,Hpe,Ipe,Vpe,Rpe,Mpe,Xpe,Kpe,Dpe,Zpe,Ope,Ppe,dpe,Bpe,Qpe,Jpe,ppe,e0e]}computeIsSubtype(e,t){switch(e){case $pe:case Fpe:case zpe:case Gpe:case Upe:case qpe:case jpe:case Ype:case Wpe:case Hpe:case Vpe:case Xpe:case Kpe:case Zpe:case Qpe:case Jpe:case e0e:return this.isSubtype(gpe,t);case fpe:case _pe:case Mpe:return this.isSubtype(ppe,t);case mpe:case Npe:case Rpe:case Bpe:return this.isSubtype(dpe,t);case ype:return this.isSubtype(upe,t)||this.isSubtype(ppe,t);case vpe:case xpe:case Cpe:case Ape:return this.isSubtype(upe,t);case kpe:case Tpe:case Ope:return this.isSubtype(hpe,t);case Lpe:return this.isSubtype(cpe,t)||this.isSubtype(hpe,t);case Dpe:return this.isSubtype(cpe,t);default:return!1}}getReferenceType(e){var t=e.container.$type+":"+e.property;switch(t){case"Action:type":case"CrossReference:type":case"Interface:superTypes":case"ParserRule:returnType":case"SimpleType:typeRef":return hpe;case"Grammar:hiddenTokens":case"ParserRule:hiddenTokens":case"RuleCall:rule":return cpe;case"Grammar:usedGrammars":return bpe;case"NamedArgument:parameter":case"ParameterReference:parameter":return Spe;case"TerminalRuleCall:rule":return Dpe;default:throw new Error(t+" is not a valid reference id.")}}getTypeMetaData(e){switch(e){case gpe:return{name:gpe,properties:[{name:"cardinality"},{name:"lookahead"}]};case fpe:return{name:fpe,properties:[{name:"elements",defaultValue:[]}]};case mpe:return{name:mpe,properties:[{name:"elementType"}]};case ype:return{name:ype,properties:[{name:"true",defaultValue:!1}]};case vpe:return{name:vpe,properties:[{name:"left"},{name:"right"}]};case xpe:return{name:xpe,properties:[{name:"left"},{name:"right"}]};case bpe:return{name:bpe,properties:[{name:"definesHiddenTokens",defaultValue:!1},{name:"hiddenTokens",defaultValue:[]},{name:"imports",defaultValue:[]},{name:"interfaces",defaultValue:[]},{name:"isDeclared",defaultValue:!1},{name:"name"},{name:"rules",defaultValue:[]},{name:"types",defaultValue:[]},{name:"usedGrammars",defaultValue:[]}]};case wpe:return{name:wpe,properties:[{name:"path"}]};case kpe:return{name:kpe,properties:[{name:"name"}]};case Tpe:return{name:Tpe,properties:[{name:"attributes",defaultValue:[]},{name:"name"},{name:"superTypes",defaultValue:[]}]};case Epe:return{name:Epe,properties:[{name:"calledByName",defaultValue:!1},{name:"parameter"},{name:"value"}]};case Cpe:return{name:Cpe,properties:[{name:"value"}]};case _pe:return{name:_pe,properties:[{name:"value"}]};case Spe:return{name:Spe,properties:[{name:"name"}]};case Ape:return{name:Ape,properties:[{name:"parameter"}]};case Lpe:return{name:Lpe,properties:[{name:"dataType"},{name:"definesHiddenTokens",defaultValue:!1},{name:"definition"},{name:"entry",defaultValue:!1},{name:"fragment",defaultValue:!1},{name:"hiddenTokens",defaultValue:[]},{name:"inferredType"},{name:"name"},{name:"parameters",defaultValue:[]},{name:"returnType"},{name:"wildcard",defaultValue:!1}]};case Npe:return{name:Npe,properties:[{name:"referenceType"}]};case Ipe:return{name:Ipe,properties:[{name:"name"}]};case Rpe:return{name:Rpe,properties:[{name:"primitiveType"},{name:"stringType"},{name:"typeRef"}]};case Mpe:return{name:Mpe,properties:[{name:"value"}]};case Dpe:return{name:Dpe,properties:[{name:"definition"},{name:"fragment",defaultValue:!1},{name:"hidden",defaultValue:!1},{name:"name"},{name:"type"}]};case Ope:return{name:Ope,properties:[{name:"name"},{name:"type"}]};case Ppe:return{name:Ppe,properties:[{name:"defaultValue"},{name:"isOptional",defaultValue:!1},{name:"name"},{name:"type"}]};case Bpe:return{name:Bpe,properties:[{name:"types",defaultValue:[]}]};case $pe:return{name:$pe,properties:[{name:"cardinality"},{name:"feature"},{name:"inferredType"},{name:"lookahead"},{name:"operator"},{name:"type"}]};case Fpe:return{name:Fpe,properties:[{name:"cardinality"},{name:"elements",defaultValue:[]},{name:"lookahead"}]};case zpe:return{name:zpe,properties:[{name:"cardinality"},{name:"feature"},{name:"lookahead"},{name:"operator"},{name:"terminal"}]};case Gpe:return{name:Gpe,properties:[{name:"cardinality"},{name:"left"},{name:"lookahead"},{name:"right"}]};case Upe:return{name:Upe,properties:[{name:"cardinality"},{name:"deprecatedSyntax",defaultValue:!1},{name:"lookahead"},{name:"terminal"},{name:"type"}]};case qpe:return{name:qpe,properties:[{name:"cardinality"},{name:"lookahead"}]};case jpe:return{name:jpe,properties:[{name:"cardinality"},{name:"elements",defaultValue:[]},{name:"guardCondition"},{name:"lookahead"}]};case Ype:return{name:Ype,properties:[{name:"cardinality"},{name:"lookahead"},{name:"value"}]};case Wpe:return{name:Wpe,properties:[{name:"cardinality"},{name:"lookahead"},{name:"terminal"}]};case Hpe:return{name:Hpe,properties:[{name:"cardinality"},{name:"lookahead"},{name:"regex"}]};case Vpe:return{name:Vpe,properties:[{name:"arguments",defaultValue:[]},{name:"cardinality"},{name:"lookahead"},{name:"rule"}]};case Xpe:return{name:Xpe,properties:[{name:"cardinality"},{name:"elements",defaultValue:[]},{name:"lookahead"}]};case Kpe:return{name:Kpe,properties:[{name:"cardinality"},{name:"elements",defaultValue:[]},{name:"lookahead"}]};case Zpe:return{name:Zpe,properties:[{name:"cardinality"},{name:"lookahead"},{name:"rule"}]};case Qpe:return{name:Qpe,properties:[{name:"cardinality"},{name:"elements",defaultValue:[]},{name:"lookahead"}]};case Jpe:return{name:Jpe,properties:[{name:"cardinality"},{name:"lookahead"},{name:"terminal"}]};case e0e:return{name:e0e,properties:[{name:"cardinality"},{name:"lookahead"}]};default:return{name:e,properties:[]}}}},r0e=new t0e}),i0e={};function a0e(n){for(let[r,e]of Object.entries(n))r.startsWith("$")||(Array.isArray(e)?e.forEach((e,t)=>{Tue(e)&&(e.$container=n,e.$containerProperty=r,e.$containerIndex=t)}):Tue(e)&&(e.$container=n,e.$containerProperty=r))}function s0e(e,t){let r=e;for(;r;){if(t(r))return r;r=r.$container}}function o0e(e,t){let r=e;for(;r;){if(t(r))return!0;r=r.$container}return!1}function l0e(e){if(e=c0e(e).$document)return e;throw new Error("AST node has no document.")}function c0e(e){for(;e.$container;)e=e.$container;return e}function h0e(i,e){if(!i)throw new Error("Node must be an AstNode.");let a=e?.range;return new Oue(()=>({keys:Object.keys(i),keyIndex:0,arrayIndex:0}),e=>{for(;e.keyIndex<e.keys.length;){var t=e.keys[e.keyIndex];if(!t.startsWith("$")){var r=i[t];if(Tue(r)){if(e.keyIndex++,p0e(r,a))return{done:!1,value:r}}else if(Array.isArray(r)){for(;e.arrayIndex<r.length;){var n=r[e.arrayIndex++];if(Tue(n)&&p0e(n,a))return{done:!1,value:n}}e.arrayIndex=0}}e.keyIndex++}return Bue})}function u0e(e,t){if(e)return new $ue(e,e=>h0e(e,t));throw new Error("Root node must be an AstNode.")}function d0e(e,t){if(e)return t?.range&&!p0e(e,t.range)?new $ue(e,()=>[]):new $ue(e,e=>h0e(e,t),{includeRoot:!0});throw new Error("Root node must be an AstNode.")}function p0e(e,t){return!t||!!(e=null==(e=e.$cstNode)?void 0:e.range)&&Vue(e,t)}function g0e(a){return new Oue(()=>({keys:Object.keys(a),keyIndex:0,arrayIndex:0}),e=>{for(;e.keyIndex<e.keys.length;){var t=e.keys[e.keyIndex];if(!t.startsWith("$")){var r=a[t];if(Eue(r))return e.keyIndex++,{done:!1,value:{reference:r,container:a,property:t}};if(Array.isArray(r)){for(;e.arrayIndex<r.length;){var n=e.arrayIndex++,i=r[n];if(Eue(i))return{done:!1,value:{reference:i,container:a,property:t,index:n}}}e.arrayIndex=0}}e.keyIndex++}return Bue})}function f0e(t,e=l0e(t).parseResult.value){let r=[];return d0e(e).forEach(e=>{g0e(e).forEach(e=>{e.reference.ref===t&&r.push(e.reference)})}),Due(r)}function m0e(e,t){var r,n=t;for(r of e.getTypeMetaData(t.$type).properties)void 0!==r.defaultValue&&void 0===n[r.name]&&(n[r.name]=y0e(r.defaultValue))}function y0e(e){return Array.isArray(e)?[...e.map(y0e)]:e}function v0e(e,t){var r,n,i={$type:e.$type};for([r,n]of Object.entries(e))if(!r.startsWith("$"))if(Tue(n))i[r]=v0e(n,t);else if(Eue(n))i[r]=t(i,r,n.$refNode,n.$refText);else if(Array.isArray(n)){var a,s=[];for(a of n)Tue(a)?s.push(v0e(a,t)):Eue(a)?s.push(t(i,r,a.$refNode,a.$refText)):s.push(a);i[r]=s}else i[r]=n;return a0e(i),i}OFe(i0e,{assignMandatoryProperties:()=>m0e,copyAstNode:()=>v0e,findLocalReferences:()=>f0e,findRootNode:()=>c0e,getContainerOfType:()=>s0e,getDocument:()=>l0e,hasContainerOfType:()=>o0e,linkContentToContainer:()=>a0e,streamAllContents:()=>u0e,streamAst:()=>d0e,streamContents:()=>h0e,streamReferences:()=>g0e});var x0e=b(()=>{Iue(),zue(),cde(),mt(a0e,"linkContentToContainer"),mt(s0e,"getContainerOfType"),mt(o0e,"hasContainerOfType"),mt(l0e,"getDocument"),mt(c0e,"findRootNode"),mt(h0e,"streamContents"),mt(u0e,"streamAllContents"),mt(d0e,"streamAst"),mt(p0e,"isAstNodeInRange"),mt(g0e,"streamReferences"),mt(f0e,"findLocalReferences"),mt(m0e,"assignMandatoryProperties"),mt(y0e,"copyDefaultValue"),mt(v0e,"copyAstNode")});function b0e(e){return e.charCodeAt(0)}function w0e(e,t){Array.isArray(e)?e.forEach(function(e){t.push(e)}):t.push(e)}function k0e(e,t){if(!0===e[t])throw"duplicate flag "+t;e[t]=!0}function T0e(e){if(void 0===e)throw Error("Internal Error - Should never get here!");return!0}function E0e(){throw Error("Internal Error - Should never get here!")}function C0e(e){return"Character"===e.type}var _0e,S0e,A0e,L0e,N0e,I0e,R0e,M0e,D0e=b(()=>{mt(b0e,"cc"),mt(w0e,"insertToSet"),mt(k0e,"addFlag"),mt(T0e,"ASSERT_EXISTS"),mt(E0e,"ASSERT_NEVER_REACH_HERE"),mt(C0e,"isCharacter")}),O0e=b(()=>{D0e(),_0e=[];for(let e=b0e("0");e<=b0e("9");e++)_0e.push(e);S0e=[b0e("_")].concat(_0e);for(let e=b0e("a");e<=b0e("z");e++)S0e.push(e);for(let e=b0e("A");e<=b0e("Z");e++)S0e.push(e);A0e=[b0e(" "),b0e("\f"),b0e(` +`),b0e("\r"),b0e("\t"),b0e("\v"),b0e("\t"),b0e(" "),b0e(" "),b0e(" "),b0e(" "),b0e(" "),b0e(" "),b0e(" "),b0e(" "),b0e(" "),b0e(" "),b0e(" "),b0e(" "),b0e(" "),b0e("\u2028"),b0e("\u2029"),b0e(" "),b0e(" "),b0e(" "),b0e("\ufeff")]}),P0e=b(()=>{D0e(),O0e(),L0e=/[0-9a-fA-F]/,N0e=/[0-9]/,I0e=/[1-9]/,R0e=class{static{mt(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("/");for(var t=this.disjunction(),r=(this.consumeChar("/"),{type:"Flags",loc:{begin:this.idx,end:e.length},global:!1,ignoreCase:!1,multiLine:!1,unicode:!1,sticky:!1});this.isRegExpFlag();)switch(this.popChar()){case"g":k0e(r,"global");break;case"i":k0e(r,"ignoreCase");break;case"m":k0e(r,"multiLine");break;case"u":k0e(r,"unicode");break;case"y":k0e(r,"sticky")}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(){var 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(){for(var e=[],t=this.idx;this.isTerm();)e.push(this.term());return{type:"Alternative",value:e,loc:this.loc(t)}}term(){return this.isAssertion()?this.assertion():this.atom()}assertion(){var 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 e;switch(this.popChar()){case"=":e="Lookahead";break;case"!":e="NegativeLookahead"}T0e(e);var r=this.disjunction();return this.consumeChar(")"),{type:e,value:r,loc:this.loc(t)}}return E0e()}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"{":var n=this.integerIncludingZero();switch(this.popChar()){case"}":t={atLeast:n,atMost:n};break;case",":t=this.isDigit()?{atLeast:n,atMost:this.integerIncludingZero()}:{atLeast:n,atMost:1/0},this.consumeChar("}")}if(!0===e&&void 0===t)return;T0e(t)}if((!0!==e||void 0!==t)&&T0e(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()}return T0e(e=void 0===e&&this.isPatternCharacter()?this.patternCharacter():e)?(e.loc=this.loc(t),this.isQuantifier()&&(e.quantifier=this.quantifier()),e):E0e()}dotAll(){return this.consumeChar("."),{type:"Set",complement:!0,value:[b0e(` +`),b0e("\r"),b0e("\u2028"),b0e("\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=_0e;break;case"D":e=_0e,t=!0;break;case"s":e=A0e;break;case"S":e=A0e,t=!0;break;case"w":e=S0e;break;case"W":e=S0e,t=!0}return T0e(e)?{type:"Set",value:e,complement:t}:E0e()}controlEscapeAtom(){let e;switch(this.popChar()){case"f":e=b0e("\f");break;case"n":e=b0e(` +`);break;case"r":e=b0e("\r");break;case"t":e=b0e("\t");break;case"v":e=b0e("\v")}return T0e(e)?{type:"Character",value:e}:E0e()}controlLetterEscapeAtom(){this.consumeChar("c");var e=this.popChar();if(!1===/[a-zA-Z]/.test(e))throw Error("Invalid ");return{type:"Character",value:e.toUpperCase().charCodeAt(0)-64}}nulCharacterAtom(){return this.consumeChar("0"),{type:"Character",value:b0e("\0")}}hexEscapeSequenceAtom(){return this.consumeChar("x"),this.parseHexDigits(2)}regExpUnicodeEscapeSequenceAtom(){return this.consumeChar("u"),this.parseHexDigits(4)}identityEscapeAtom(){return{type:"Character",value:b0e(this.popChar())}}classPatternCharacterAtom(){switch(this.peekChar()){case` +`:case"\r":case"\u2028":case"\u2029":case"\\":case"]":throw Error("TBD");default:return{type:"Character",value:b0e(this.popChar())}}}characterClass(){let e=[],t=!1;for(this.consumeChar("["),"^"===this.peekChar(0)&&(this.consumeChar("^"),t=!0);this.isClassAtom();){var r=this.classAtom();if(r.type,C0e(r)&&this.isRangeDash()){this.consumeChar("-");var n=this.classAtom();if(n.type,C0e(n)){if(n.value<r.value)throw Error("Range out of order in character class");e.push({from:r.value,to:n.value})}else w0e(r.value,e),e.push(b0e("-")),w0e(n.value,e)}else w0e(r.value,e)}return this.consumeChar("]"),{type:"Set",complement:t,value:e}}classAtom(){switch(this.peekChar()){case"]":case` +`:case"\r":case"\u2028":case"\u2029":throw Error("TBD");case"\\":return this.classEscape();default:return this.classPatternCharacterAtom()}}classEscape(){switch(this.consumeChar("\\"),this.peekChar()){case"b":return this.consumeChar("b"),{type:"Character",value:b0e("\b")};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()}}group(){let e=!0;"?"===(this.consumeChar("("),this.peekChar(0))?(this.consumeChar("?"),this.consumeChar(":"),e=!1):this.groupIdx++;var t=this.disjunction(),t=(this.consumeChar(")"),{type:"Group",capturing:e,value:t});return e&&(t.idx=this.groupIdx),t}positiveInteger(){let e=this.popChar();if(!1===I0e.test(e))throw Error("Expecting a positive integer");for(;N0e.test(this.peekChar(0));)e+=this.popChar();return parseInt(e,10)}integerIncludingZero(){let e=this.popChar();if(!1===N0e.test(e))throw Error("Expecting an integer");for(;N0e.test(this.peekChar(0));)e+=this.popChar();return parseInt(e,10)}patternCharacter(){var e=this.popChar();switch(e){case` +`:case"\r":case"\u2028":case"\u2029":case"^":case"$":case"\\":case".":case"*":case"+":case"?":case"(":case")":case"[":case"|":throw Error("TBD");default:return{type:"Character",value:b0e(e)}}}isRegExpFlag(){switch(this.peekChar(0)){case"g":case"i":case"m":case"u":case"y":return!0;default:return!1}}isRangeDash(){return"-"===this.peekChar()&&this.isClassAtom(1)}isDigit(){return N0e.test(this.peekChar(0))}isClassAtom(e=0){switch(this.peekChar(e)){case"]":case` +`:case"\r":case"\u2028":case"\u2029":return!1;default:return!0}}isTerm(){return this.isAtom()||this.isAssertion()}isAtom(){if(this.isPatternCharacter())return!0;switch(this.peekChar(0)){case".":case"\\":case"[":case"(":return!0;default:return!1}}isAssertion(){switch(this.peekChar(0)){case"^":case"$":return!0;case"\\":switch(this.peekChar(1)){case"b":case"B":return!0;default:return!1}case"(":return"?"===this.peekChar(1)&&("="===this.peekChar(2)||"!"===this.peekChar(2));default:return!1}}isQuantifier(){var e=this.saveState();try{return void 0!==this.quantifier(!0)}catch{return!1}finally{this.restoreState(e)}}isPatternCharacter(){switch(this.peekChar()){case"^":case"$":case"\\":case".":case"*":case"+":case"?":case"(":case")":case"[":case"|":case"/":case` +`:case"\r":case"\u2028":case"\u2029":return!1;default:return!0}}parseHexDigits(t){let r="";for(let e=0;e<t;e++){var n=this.popChar();if(!1===L0e.test(n))throw Error("Expecting a HexDecimal digits");r+=n}return{type:"Character",value:parseInt(r,16)}}peekChar(e=0){return this.input[this.idx+e]}popChar(){var e=this.peekChar(0);return this.consumeChar(void 0),e}consumeChar(e){if(void 0!==e&&this.input[this.idx]!==e)throw Error("Expected: '"+e+"' but found: '"+this.input[this.idx]+"' at offset: "+this.idx);if(this.idx>=this.input.length)throw Error("Unexpected end of input");this.idx++}loc(e){return{begin:e,end:this.idx}}}}),B0e=b(()=>{M0e=class{static{mt(this,"BaseRegExpVisitor")}visitChildren(e){for(var t in e){var r=e[t];e.hasOwnProperty(t)&&(void 0!==r.type?this.visit(r):Array.isArray(r)&&r.forEach(e=>{this.visit(e)},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"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)}this.visitChildren(e)}visitPattern(e){}visitFlags(e){}visitDisjunction(e){}visitAlternative(e){}visitStartAnchor(e){}visitEndAnchor(e){}visitWordBoundary(e){}visitNonWordBoundary(e){}visitLookahead(e){}visitNegativeLookahead(e){}visitCharacter(e){}visitSet(e){}visitGroup(e){}visitGroupBackReference(e){}visitQuantifier(e){}}}),$0e=b(()=>{P0e(),B0e()}),F0e={};function z0e(e){try{e=`/${e="string"!=typeof e?e.source:e}/`;var t,r=V0e.pattern(e),n=[];for(t of r.value.value)K0e.reset(e),K0e.visit(t),n.push({start:K0e.startRegexp,end:K0e.endRegex});return n}catch{return[]}}function G0e(e){try{return e=(e="string"==typeof e?new RegExp(e):e).toString(),K0e.reset(e),K0e.visit(V0e.pattern(e)),K0e.multiline}catch{return!1}}function U0e(e){let t="string"==typeof e?new RegExp(e):e;return Z0e.some(e=>t.test(e))}function q0e(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function j0e(e){return Array.prototype.map.call(e,e=>/\w/.test(e)?`[${e.toLowerCase()}${e.toUpperCase()}]`:q0e(e)).join("")}function Y0e(e,t){return e=W0e(e),!!(t=t.match(e))&&0<t[0].length}function W0e(e){let i=e="string"==typeof e?new RegExp(e):e,a=e.source,s=0;function o(){let t="",e;function r(e){t+=a.substr(s,e),s+=e}function n(e){t+="(?:"+a.substr(s,e)+"|$)",s+=e}for(mt(r,"appendRaw"),mt(n,"appendOptional");s<a.length;)switch(a[s]){case"\\":switch(a[s+1]){case"c":n(3);break;case"x":n(4);break;case"u":i.unicode?"{"===a[s+2]?n(a.indexOf("}",s)-s+1):n(6):n(2);break;case"p":case"P":i.unicode?n(a.indexOf("}",s)-s+1):n(2);break;case"k":n(a.indexOf(">",s)-s+1);break;default:n(2)}break;case"[":(e=/\[(?:\\.|.)*?\]/g).lastIndex=s,n((e=e.exec(a)||[])[0].length);break;case"|":case"^":case"$":case"*":case"+":case"?":r(1);break;case"{":(e=/\{\d+,?\d*\}/g).lastIndex=s,(e=e.exec(a))?r(e[0].length):n(1);break;case"(":if("?"===a[s+1])switch(a[s+2]){case":":t+="(?:",s+=3,t+=o()+"|$)";break;case"=":t+="(?=",s+=3,t+=o()+")";break;case"!":e=s,s+=3,o(),t+=a.substr(e,s-e);break;case"<":switch(a[s+3]){case"=":case"!":e=s,s+=4,o(),t+=a.substr(e,s-e);break;default:r(a.indexOf(">",s)-s+1),t+=o()+"|$)"}}else r(1),t+=o()+"|$)";break;case")":return++s,t;default:n(1)}return t}return mt(o,"process"),new RegExp(o(),e.flags)}OFe(F0e,{NEWLINE_REGEXP:()=>H0e,escapeRegExp:()=>q0e,getCaseInsensitivePattern:()=>j0e,getTerminalParts:()=>z0e,isMultilineComment:()=>G0e,isWhitespace:()=>U0e,partialMatches:()=>Y0e,partialRegExp:()=>W0e,whitespaceCharacters:()=>Z0e});var H0e,V0e,X0e,K0e,Z0e,Q0e=b(()=>{$0e(),H0e=/\r?\n/gm,V0e=new R0e,X0e=class extends M0e{static{mt(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){var t=String.fromCharCode(e.value);this.multiline||t!==` +`||(this.multiline=!0),e.quantifier?(this.isStarting=!1,this.endRegexpStack=[]):(e=q0e(t),this.endRegexpStack.push(e),this.isStarting&&(this.startRegexp+=e))}visitSet(e){var t;this.multiline||(t=this.regex.substring(e.loc.begin,e.loc.end),t=new RegExp(t),this.multiline=!!` +`.match(t)),e.quantifier?(this.isStarting=!1,this.endRegexpStack=[]):(t=this.regex.substring(e.loc.begin,e.loc.end),this.endRegexpStack.push(t),this.isStarting&&(this.startRegexp+=t))}visitChildren(e){"Group"===e.type&&e.quantifier||super.visitChildren(e)}},K0e=new X0e,mt(z0e,"getTerminalParts"),mt(G0e,"isMultilineComment"),Z0e=` +\r              

   `.split(""),mt(U0e,"isWhitespace"),mt(q0e,"escapeRegExp"),mt(j0e,"getCaseInsensitivePattern"),mt(Y0e,"partialMatches"),mt(W0e,"partialRegExp")}),J0e={};function ege(e){return e.rules.find(e=>Pde(e)&&e.entry)}function tge(e){return e.rules.filter(e=>Gde(e)&&e.hidden)}function rge(e,t){var r,n=new Set,i=ege(e);if(!i)return new Set(e.rules);for(r of[i].concat(tge(e)))nge(r,n,t);var a,s=new Set;for(a of e.rules)(n.has(a.name)||Gde(a)&&a.hidden)&&s.add(a);return s}function nge(e,t,r){t.add(e.name),u0e(e).forEach(e=>{(tpe(e)||r&&ipe(e))&&(e=e.rule.ref)&&!t.has(e.name)&&nge(e,t,r)})}function ige(e){return e.terminal||(e.type.ref?pge(e.type.ref)?.terminal:void 0)}function age(e){return e.hidden&&!U0e(Age(e))}function sge(e,t){return e&&t?lge(e,t,e.astNode,!0):[]}function oge(e,t,r){return e&&t&&0!==(t=lge(e,t,e.astNode,!0)).length?t[r=void 0!==r?Math.max(0,Math.min(r,t.length-1)):0]:void 0}function lge(e,t,r,n){return!n&&(n=s0e(e.grammarSource,Hde))&&n.feature===t?[e]:Sue(e)&&e.astNode===r?e.content.flatMap(e=>lge(e,t,r,!1)):[]}function cge(e,t){return e?uge(e,t,e?.astNode):[]}function hge(e,t,r){return e&&0!==(t=uge(e,t,e?.astNode)).length?t[r=void 0!==r?Math.max(0,Math.min(r,t.length-1)):0]:void 0}function uge(e,t,r){if(e.astNode!==r)return[];if(Qde(e.grammarSource)&&e.grammarSource.value===t)return[e];for(var n,i,a=Uue(e).iterator(),s=[];(i=a.next()).done||((n=i.value).astNode===r?Qde(n.grammarSource)&&n.grammarSource.value===t&&s.push(n):a.prune()),!i.done;);return s}function dge(e){for(var t=e.astNode;t===(null==(r=e.container)?void 0:r.astNode);){var r=s0e(e.grammarSource,Hde);if(r)return r;e=e.container}}function pge(e){let t=e;return Lde(t)&&(Yde(t.$container)?t=t.$container.$container:Pde(t.$container)?t=t.$container:hde(t.$container)),gge(e,t,new Map)}function gge(n,e,i){var t,r;function a(e,t){let r;return s0e(e,Hde)||(r=gge(t,t,i)),i.set(n,r),r}if(mt(a,"go"),i.has(n))return i.get(n);i.set(n,void 0);for(r of u0e(e)){if(Hde(r)&&"name"===r.feature.toLowerCase())return i.set(n,r),r;if(tpe(r)&&Pde(r.rule.ref))return a(r,r.rule.ref);if(Fde(r)&&null!=(t=r.typeRef)&&t.ref)return a(r,r.typeRef.ref)}}function fge(t){var e=t.$container;if(Zde(e)){var r=e.elements;for(let e=r.indexOf(t)-1;0<=e;e--){var n=r[e];if(Yde(n))return n;if(n=u0e(r[e]).find(Yde))return n}}if(wde(e))return fge(e)}function mge(e,t){return"?"===e||"*"===e||Zde(t)&&!!t.guardCondition}function yge(e){return"*"===e||"+"===e}function vge(e){return"+="===e}function xge(e){return bge(e,new Set)}function bge(e,t){if(t.has(e))return!0;t.add(e);for(var r of u0e(e))if(tpe(r)){if(!r.rule.ref||Pde(r.rule.ref)&&!bge(r.rule.ref,t))return!1}else{if(Hde(r))return!1;if(Yde(r))return!1}return!!e.definition}function wge(e){return kge(e.type,new Set)}function kge(e,t){return!!t.has(e)||(t.add(e),!Tde(e)&&!Bde(e)&&(jde(e)?e.types.every(e=>kge(e,t)):!!Fde(e)&&(void 0!==e.primitiveType||void 0!==e.stringType||void 0!==e.typeRef&&!!Ude(e=e.typeRef.ref)&&kge(e.type,t))))}function Tge(e){return e.inferredType?e.inferredType.name:e.dataType||(e.returnType&&(e=e.returnType.ref)&&(Pde(e)||Nde(e)||Ude(e))?e.name:void 0)}function Ege(e){if(Pde(e))return xge(e)||null==(t=Tge(e))?e.name:t;if(Nde(e)||Ude(e)||$de(e))return e.name;if(Yde(e)){var t=Cge(e);if(t)return t}else if(Lde(e))return e.name;throw new Error("Cannot get name of Unknown Type")}function Cge(e){var t;return e.inferredType?e.inferredType.name:null!=(t=e.type)&&t.ref?Ege(e.type.ref):void 0}function _ge(e){var t;return Gde(e)?null!=(t=null==(t=e.type)?void 0:t.name)?t:"string":xge(e)||null==(t=Tge(e))?e.name:t}function Sge(e){var t;return Gde(e)?null!=(t=null==(t=e.type)?void 0:t.name)?t:"string":null!=(t=Tge(e))?t:e.name}function Age(e){var e=Lge(e.definition,t={s:!1,i:!1,u:!1}),t=Object.entries(t).filter(([,e])=>e).map(([e])=>e).join("");return new RegExp(e,t)}function Lge(e,t){if(rpe(e))return Nge(e);if(npe(e))return Ige(e);if(Vde(e))return Dge(e);if(ipe(e)){var r=e.rule.ref;if(r)return Pge(Lge(r.definition),{cardinality:e.cardinality,lookahead:e.lookahead});throw new Error("Missing rule reference.")}if(Jde(e))return Mge(e);if(spe(e))return Rge(e);var n;if(epe(e))return r=e.regex.lastIndexOf("/"),n=e.regex.substring(1,r),r=e.regex.substring(r+1),t&&(t.i=r.includes("i"),t.s=r.includes("s"),t.u=r.includes("u")),Pge(n,{cardinality:e.cardinality,lookahead:e.lookahead,wrap:!1});if(ope(e))return Pge(Bge,{cardinality:e.cardinality,lookahead:e.lookahead});throw new Error("Invalid terminal element: "+e?.$type)}function Nge(e){return Pge(e.elements.map(e=>Lge(e)).join("|"),{cardinality:e.cardinality,lookahead:e.lookahead})}function Ige(e){return Pge(e.elements.map(e=>Lge(e)).join(""),{cardinality:e.cardinality,lookahead:e.lookahead})}function Rge(e){return Pge(Bge+"*?"+Lge(e.terminal),{cardinality:e.cardinality,lookahead:e.lookahead})}function Mge(e){return Pge(`(?!${Lge(e.terminal)})${Bge}*?`,{cardinality:e.cardinality,lookahead:e.lookahead})}function Dge(e){return e.right?Pge(`[${Oge(e.left)}-${Oge(e.right)}]`,{cardinality:e.cardinality,lookahead:e.lookahead,wrap:!1}):Pge(Oge(e.left),{cardinality:e.cardinality,lookahead:e.lookahead,wrap:!1})}function Oge(e){return q0e(e.value)}function Pge(e,t){var r;return!1===t.wrap&&!t.lookahead||(e=`(${null!=(r=t.lookahead)?r:""}${e})`),t.cardinality?""+e+t.cardinality:e}OFe(J0e,{findAssignment:()=>dge,findNameAssignment:()=>pge,findNodeForKeyword:()=>hge,findNodeForProperty:()=>oge,findNodesForKeyword:()=>cge,findNodesForKeywordInternal:()=>uge,findNodesForProperty:()=>sge,getActionAtElement:()=>fge,getActionType:()=>Cge,getAllReachableRules:()=>rge,getCrossReferenceTerminal:()=>ige,getEntryRule:()=>ege,getExplicitRuleType:()=>Tge,getHiddenRules:()=>tge,getRuleType:()=>Sge,getRuleTypeName:()=>_ge,getTypeName:()=>Ege,isArrayCardinality:()=>yge,isArrayOperator:()=>vge,isCommentTerminal:()=>age,isDataType:()=>wge,isDataTypeRule:()=>xge,isOptionalCardinality:()=>mge,terminalRegex:()=>Age});var Bge,$ge=b(()=>{dde(),n0e(),Iue(),x0e(),cde(),Q0e(),mt(ege,"getEntryRule"),mt(tge,"getHiddenRules"),mt(rge,"getAllReachableRules"),mt(nge,"ruleDfs"),mt(ige,"getCrossReferenceTerminal"),mt(age,"isCommentTerminal"),mt(sge,"findNodesForProperty"),mt(oge,"findNodeForProperty"),mt(lge,"findNodesForPropertyInternal"),mt(cge,"findNodesForKeyword"),mt(hge,"findNodeForKeyword"),mt(uge,"findNodesForKeywordInternal"),mt(dge,"findAssignment"),mt(pge,"findNameAssignment"),mt(gge,"findNameAssignmentInternal"),mt(fge,"getActionAtElement"),mt(mge,"isOptionalCardinality"),mt(yge,"isArrayCardinality"),mt(vge,"isArrayOperator"),mt(xge,"isDataTypeRule"),mt(bge,"isDataTypeRuleInternal"),mt(wge,"isDataType"),mt(kge,"isDataTypeInternal"),mt(Tge,"getExplicitRuleType"),mt(Ege,"getTypeName"),mt(Cge,"getActionType"),mt(_ge,"getRuleTypeName"),mt(Sge,"getRuleType"),mt(Age,"terminalRegex"),Bge=/[\s\S]/.source,mt(Lge,"abstractElementToRegex"),mt(Nge,"terminalAlternativesToRegex"),mt(Ige,"terminalGroupToRegex"),mt(Rge,"untilTokenToRegex"),mt(Mge,"negateTokenToRegex"),mt(Dge,"characterRangeToRegex"),mt(Oge,"keywordToRegex"),mt(Pge,"withCardinality")});function Fge(e){var t,r=[];for(t of e.Grammar.rules)Gde(t)&&age(t)&&G0e(Age(t))&&r.push(t.name);return{multilineCommentRules:r,nameRegexp:lde}}var zge=b(()=>{cde(),$ge(),Q0e(),n0e(),mt(Fge,"createGrammarConfig")}),Gge=b(()=>{});function Uge(e){console&&console.error&&console.error("Error: "+e)}function qge(e){console&&console.warn&&console.warn("Warning: "+e)}var jge=b(()=>{mt(Uge,"PRINT_ERROR"),mt(qge,"PRINT_WARNING")});function Yge(e){var t=(new Date).getTime(),e=e();return{time:(new Date).getTime()-t,value:e}}var Wge=b(()=>{mt(Yge,"timer")});function Hge(e){function t(){}mt(t,"FakeConstructor"),t.prototype=e;let r=new t;function n(){return typeof r.bar}return mt(n,"fakeAccess"),n(),n(),e}var Vge=b(()=>{mt(Hge,"toFastProperties")}),Xge=b(()=>{jge(),Wge(),Vge()});function Kge(e){return Zge(e)?e.LABEL:e.name}function Zge(e){return sj(e.LABEL)&&""!==e.LABEL}function Qge(e){return x(e,Jge)}function Jge(e){function t(e){return x(e,Jge)}var r,n;if(mt(t,"convertDefinition"),e instanceof t1e)return r={type:"NonTerminal",name:e.nonTerminalName,idx:e.idx},sj(e.label)&&(r.label=e.label),r;if(e instanceof n1e)return{type:"Alternative",definition:t(e.definition)};if(e instanceof i1e)return{type:"Option",idx:e.idx,definition:t(e.definition)};if(e instanceof a1e)return{type:"RepetitionMandatory",idx:e.idx,definition:t(e.definition)};if(e instanceof s1e)return{type:"RepetitionMandatoryWithSeparator",idx:e.idx,separator:Jge(new h1e({terminalType:e.separator})),definition:t(e.definition)};if(e instanceof l1e)return{type:"RepetitionWithSeparator",idx:e.idx,separator:Jge(new h1e({terminalType:e.separator})),definition:t(e.definition)};if(e instanceof o1e)return{type:"Repetition",idx:e.idx,definition:t(e.definition)};if(e instanceof c1e)return{type:"Alternation",idx:e.idx,definition:t(e.definition)};if(e instanceof h1e)return r={type:"Terminal",name:e.terminalType.name,label:Kge(e.terminalType),idx:e.idx},sj(e.label)&&(r.terminalLabel=e.label),n=e.terminalType.PATTERN,e.terminalType.PATTERN&&(r.pattern=Nj(n)?n.source:n),r;if(e instanceof r1e)return{type:"Rule",name:e.name,orgText:e.orgText,definition:t(e.definition)};throw Error("non exhaustive match")}var e1e,t1e,r1e,n1e,i1e,a1e,s1e,o1e,l1e,c1e,h1e,u1e,d1e=b(()=>{KW(),mt(Kge,"tokenLabel"),mt(Zge,"hasTokenLabel"),e1e=class{static{mt(this,"AbstractProduction")}get definition(){return this._definition}set definition(e){this._definition=e}constructor(e){this._definition=e}accept(t){t.visit(this),v(this.definition,e=>{e.accept(t)})}},t1e=class extends e1e{static{mt(this,"NonTerminal")}constructor(e){super([]),this.idx=1,CB(this,hY(e,e=>void 0!==e))}set definition(e){}get definition(){return void 0!==this.referencedRule?this.referencedRule.definition:[]}accept(e){e.visit(this)}},r1e=class extends e1e{static{mt(this,"Rule")}constructor(e){super(e.definition),this.orgText="",CB(this,hY(e,e=>void 0!==e))}},n1e=class extends e1e{static{mt(this,"Alternative")}constructor(e){super(e.definition),this.ignoreAmbiguities=!1,CB(this,hY(e,e=>void 0!==e))}},i1e=class extends e1e{static{mt(this,"Option")}constructor(e){super(e.definition),this.idx=1,CB(this,hY(e,e=>void 0!==e))}},a1e=class extends e1e{static{mt(this,"RepetitionMandatory")}constructor(e){super(e.definition),this.idx=1,CB(this,hY(e,e=>void 0!==e))}},s1e=class extends e1e{static{mt(this,"RepetitionMandatoryWithSeparator")}constructor(e){super(e.definition),this.idx=1,CB(this,hY(e,e=>void 0!==e))}},o1e=class extends e1e{static{mt(this,"Repetition")}constructor(e){super(e.definition),this.idx=1,CB(this,hY(e,e=>void 0!==e))}},l1e=class extends e1e{static{mt(this,"RepetitionWithSeparator")}constructor(e){super(e.definition),this.idx=1,CB(this,hY(e,e=>void 0!==e))}},c1e=class extends e1e{static{mt(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,CB(this,hY(e,e=>void 0!==e))}},h1e=class{static{mt(this,"Terminal")}constructor(e){this.idx=1,CB(this,hY(e,e=>void 0!==e))}accept(e){e.visit(this)}},mt(Qge,"serializeGrammar"),mt(Jge,"serializeProduction")}),p1e=b(()=>{d1e(),u1e=class{static{mt(this,"GAstVisitor")}visit(e){var t=e;switch(t.constructor){case t1e:return this.visitNonTerminal(t);case n1e:return this.visitAlternative(t);case i1e:return this.visitOption(t);case a1e:return this.visitRepetitionMandatory(t);case s1e:return this.visitRepetitionMandatoryWithSeparator(t);case l1e:return this.visitRepetitionWithSeparator(t);case o1e:return this.visitRepetition(t);case c1e:return this.visitAlternation(t);case h1e:return this.visitTerminal(t);case r1e:return this.visitRule(t);default:throw Error("non exhaustive match")}}visitNonTerminal(e){}visitAlternative(e){}visitOption(e){}visitRepetition(e){}visitRepetitionMandatory(e){}visitRepetitionMandatoryWithSeparator(e){}visitRepetitionWithSeparator(e){}visitAlternation(e){}visitTerminal(e){}visitRule(e){}}});function g1e(e){return e instanceof n1e||e instanceof i1e||e instanceof o1e||e instanceof a1e||e instanceof s1e||e instanceof l1e||e instanceof h1e||e instanceof r1e}function f1e(e,t=[]){return e instanceof i1e||e instanceof o1e||e instanceof l1e||(e instanceof c1e?bW(e.definition,e=>f1e(e,t)):!(e instanceof t1e&&mj(t,e))&&e instanceof e1e&&(e instanceof t1e&&t.push(e),lq(e.definition,e=>f1e(e,t))))}function m1e(e){return e instanceof c1e}function y1e(e){if(e instanceof t1e)return"SUBRULE";if(e instanceof i1e)return"OPTION";if(e instanceof c1e)return"OR";if(e instanceof a1e)return"AT_LEAST_ONE";if(e instanceof s1e)return"AT_LEAST_ONE_SEP";if(e instanceof l1e)return"MANY_SEP";if(e instanceof o1e)return"MANY";if(e instanceof h1e)return"CONSUME";throw Error("non exhaustive match")}var v1e=b(()=>{KW(),d1e(),mt(g1e,"isSequenceProd"),mt(f1e,"isOptionalProd"),mt(m1e,"isBranchingProd"),mt(y1e,"getProductionDslName")}),x1e=b(()=>{d1e(),p1e(),v1e()});function b1e(e,t,r){return[new i1e({definition:[new h1e({terminalType:e.separator})].concat(e.definition)})].concat(t,r)}var w1e,k1e=b(()=>{KW(),x1e(),w1e=class{static{mt(this,"RestWalker")}walk(r,n=[]){v(r.definition,(e,t)=>{if(t=jU(r.definition,t+1),e instanceof t1e)this.walkProdRef(e,t,n);else if(e instanceof h1e)this.walkTerminal(e,t,n);else if(e instanceof n1e)this.walkFlat(e,t,n);else if(e instanceof i1e)this.walkOption(e,t,n);else if(e instanceof a1e)this.walkAtLeastOne(e,t,n);else if(e instanceof s1e)this.walkAtLeastOneSep(e,t,n);else if(e instanceof l1e)this.walkManySep(e,t,n);else if(e instanceof o1e)this.walkMany(e,t,n);else{if(!(e instanceof c1e))throw Error("non exhaustive match");this.walkOr(e,t,n)}})}walkTerminal(e,t,r){}walkProdRef(e,t,r){}walkFlat(e,t,r){t=t.concat(r),this.walk(e,t)}walkOption(e,t,r){t=t.concat(r),this.walk(e,t)}walkAtLeastOne(e,t,r){t=[new i1e({definition:e.definition})].concat(t,r),this.walk(e,t)}walkAtLeastOneSep(e,t,r){t=b1e(e,t,r),this.walk(e,t)}walkMany(e,t,r){t=[new i1e({definition:e.definition})].concat(t,r),this.walk(e,t)}walkManySep(e,t,r){t=b1e(e,t,r),this.walk(e,t)}walkOr(e,t,r){let n=t.concat(r);v(e.definition,e=>{e=new n1e({definition:[e]}),this.walk(e,n)})}},mt(b1e,"restForRepetitionWithSeparator")});function T1e(e){if(e instanceof t1e)return T1e(e.referencedRule);if(e instanceof h1e)return _1e(e);if(g1e(e))return E1e(e);if(m1e(e))return C1e(e);throw Error("non exhaustive match")}function E1e(e){let t=[],r=e.definition,n=0,i=r.length>n,a,s=!0;for(;i&&s;)a=r[n],s=f1e(a),t=t.concat(T1e(a)),n+=1,i=r.length>n;return OW(t)}function C1e(e){return e=x(e.definition,e=>T1e(e)),OW(p$(e))}function _1e(e){return[e.terminalType]}var S1e,A1e=b(()=>{KW(),x1e(),mt(T1e,"first"),mt(E1e,"firstForSequence"),mt(C1e,"firstForBranching"),mt(_1e,"firstForTerminal")}),L1e=b(()=>{S1e="_~IN~_"});function N1e(e){let t={};return v(e,e=>{e=new R1e(e).startWalking(),CB(t,e)}),t}function I1e(e,t){return e.name+t+S1e}var R1e,M1e=b(()=>{k1e(),A1e(),KW(),L1e(),x1e(),R1e=class extends w1e{static{mt(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){e=I1e(e.referencedRule,e.idx)+this.topProd.name,t=t.concat(r),r=T1e(new n1e({definition:t})),this.follows[e]=r}},mt(N1e,"computeAllProdsFollows"),mt(I1e,"buildBetweenProdsFollowPrefix")});function D1e(e){var t,e=e.toString();return P1e.hasOwnProperty(e)?P1e[e]:(t=B1e.pattern(e),P1e[e]=t)}function O1e(){P1e={}}var P1e,B1e,$1e=b(()=>{$0e(),P1e={},B1e=new R0e,mt(D1e,"getRegExpAst"),mt(O1e,"clearRegExpParserCache")});function F1e(e,t=!1){try{var r=D1e(e);return z1e(r.value,{},r.flags.ignoreCase)}catch(r){r.message===W1e?t&&qge(`${H1e} 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.`):(t=t?` + This will disable the lexer's first char optimizations. + See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#REGEXP_PARSING for details.`:"",Uge(`${H1e} + Failed parsing: < ${e.toString()} > + Using the @chevrotain/regexp-to-ast library + Please open an issue at: https://github.com/chevrotain/chevrotain/issues`+t))}return[]}function z1e(t,i,a){switch(t.type){case"Disjunction":for(let e=0;e<t.value.length;e++)z1e(t.value[e],i,a);break;case"Alternative":var r=t.value;for(let e=0;e<r.length;e++){var n=r[e];switch(n.type){case"EndAnchor":case"GroupBackReference":case"Lookahead":case"NegativeLookahead":case"StartAnchor":case"WordBoundary":case"NonWordBoundary":continue}var s=n;switch(s.type){case"Character":G1e(s.value,i,a);break;case"Set":if(!0===s.complement)throw Error(W1e);v(s.value,t=>{if("number"==typeof t)G1e(t,i,a);else{var r=t;if(!0===a)for(let e=r.from;e<=r.to;e++)G1e(e,i,a);else{for(let e=r.from;e<=r.to&&e<Ife;e++)G1e(e,i,a);if(r.to>=Ife){var t=r.from>=Ife?r.from:Ife,e=r.to,t=kfe(t),n=kfe(e);for(let e=t;e<=n;e++)i[e]=e}}}});break;case"Group":z1e(s.value,i,a);break;default:throw Error("Non Exhaustive Match")}if(n=void 0!==s.quantifier&&0===s.quantifier.atLeast,"Group"===s.type&&!1===j1e(s)||"Group"!==s.type&&0==n)break}break;default:throw Error("non exhaustive match!")}return dj(i)}function G1e(e,t,r){var n=kfe(e);t[n]=n,!0===r&&U1e(e,t)}function U1e(e,t){var r=(e=String.fromCharCode(e)).toUpperCase();r!==e?t[r=kfe(r.charCodeAt(0))]=r:(r=e.toLowerCase())!==e&&(t[e=kfe(r.charCodeAt(0))]=e)}function q1e(e,r){return Tq(e.value,e=>{if("number"==typeof e)return mj(r,e);{let t=e;return void 0!==Tq(r,e=>t.from<=e&&e<=t.to)}})}function j1e(e){var t=e.quantifier;return!(!t||0!==t.atLeast)||!!e.value&&(n8(e.value)?lq(e.value,j1e):j1e(e.value))}function Y1e(t,e){var r,n;return e instanceof RegExp?(r=D1e(e),(n=new V1e(t)).visit(r),n.found):void 0!==Tq(e,e=>mj(t,e.charCodeAt(0)))}var W1e,H1e,V1e,X1e=b(()=>{$0e(),KW(),Xge(),$1e(),Mfe(),W1e="Complement Sets are not supported for first char optimization",H1e=`Unable to use "first char" lexer optimizations: +`,mt(F1e,"getOptimizedStartCodesIndices"),mt(z1e,"firstCharOptimizedIndices"),mt(G1e,"addOptimizedIdxToResult"),mt(U1e,"handleIgnoreCase"),mt(q1e,"findCode"),mt(j1e,"isWholeOptional"),V1e=class extends M0e{static{mt(this,"CharCodeFinder")}constructor(e){super(),this.targetCharCodes=e,this.found=!1}visitChildren(e){if(!0!==this.found){switch(e.type){case"Lookahead":return void this.visitLookahead(e);case"NegativeLookahead":return void this.visitNegativeLookahead(e)}super.visitChildren(e)}}visitCharacter(e){mj(this.targetCharCodes,e.value)&&(this.found=!0)}visitSet(e){e.complement?void 0===q1e(e,this.targetCharCodes)&&(this.found=!0):void 0!==q1e(e,this.targetCharCodes)&&(this.found=!0)}},mt(Y1e,"canMatchCharCode")});function K1e(e,i){var t=(i=SU(i,{useSticky:Sfe,debug:!1,safeMode:!1,positionTracking:"full",lineTerminatorCharacters:["\r",` +`],tracer:mt((e,t)=>t(),"tracer")})).tracer;t("initCharCodeToOptimizedIndexMap",()=>{Tfe()});let r,n=(t("Reject Lexer.NA",()=>{r=uW(e,e=>e[Efe]===Qfe.NA)}),!1),a;t("Transform Patterns",()=>{n=!1,a=x(r,e=>{var t,e=e[Efe];if(Nj(e))return 1!==(t=e.source).length||"^"===t||"$"===t||"."===t||e.ignoreCase?2!==t.length||"\\"!==t[0]||mj(["d","D","s","S","t","r","n","t","0","c","b","B","f","v","w","W"],t[1])?(i.useSticky?dfe:ufe)(e):t[1]:t;if(R6(e))return n=!0,{exec:e};if("object"==typeof e)return n=!0,e;if("string"==typeof e)return 1===e.length?e:(t=e.replace(/[\\^$.*+?()[\]{}|]/g,"\\$&"),e=new RegExp(t),(i.useSticky?dfe:ufe)(e));throw Error("non exhaustive match")})});let s,o,l,c,h;t("misc mapping",()=>{s=x(r,e=>e.tokenTypeIdx),o=x(r,e=>{if((e=e.GROUP)!==Qfe.SKIPPED){if(sj(e))return e;if(Dj(e))return!1;throw Error("non exhaustive match")}}),l=x(r,e=>{if(e=e.LONGER_ALT)return n8(e)?x(e,e=>bj(r,e)):[bj(r,e)]}),c=x(r,e=>e.PUSH_MODE),h=x(r,e=>nj(e,"POP_MODE"))});let u;t("Line Terminator Handling",()=>{let t=bfe(i.lineTerminatorCharacters);u=x(r,e=>!1),"onlyOffset"!==i.positionTracking&&(u=x(r,e=>nj(e,"LINE_BREAKS")?!!e.LINE_BREAKS:!1===vfe(e,t)&&Y1e(t,e.PATTERN)))});let d,p,g,f,m=(t("Misc Mapping #2",()=>{d=x(r,mfe),p=x(a,yfe),g=lW(r,(e,t)=>(t=t.GROUP,sj(t)&&t!==Qfe.SKIPPED&&(e[t]=[]),e),{}),f=x(a,(e,t)=>({pattern:a[t],longerAlt:l[t],canLineTerminator:u[t],isCustom:d[t],short:p[t],group:o[t],push:c[t],pop:h[t],tokenTypeIdx:s[t],tokenType:r[t]}))}),!0),y=[];return i.safeMode||t("First Char Optimization",()=>{y=lW(r,(r,e,n)=>{if("string"==typeof e.PATTERN){var t=kfe(e.PATTERN.charCodeAt(0));wfe(r,t,f[n])}else if(n8(e.START_CHARS_HINT)){let t;v(e.START_CHARS_HINT,e=>{e=kfe("string"==typeof e?e.charCodeAt(0):e),t!==e&&(t=e,wfe(r,e,f[n]))})}else Nj(e.PATTERN)?e.PATTERN.unicode?(m=!1,i.ensureOptimizations&&Uge(`${H1e} Unable to analyze < ${e.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`)):(t=F1e(e.PATTERN,i.ensureOptimizations),Cj(t)&&(m=!1),v(t,e=>{wfe(r,e,f[n])})):(i.ensureOptimizations&&Uge(`${H1e} TokenType: <${e.name}> is using a custom token pattern without providing <start_chars_hint> parameter. + This will disable the lexer's first char optimizations. + For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_OPTIMIZE`),m=!1);return r},[])}),{emptyGroups:g,patternIdxToConfig:f,charCodeToPatternIdxToConfig:y,hasCustom:n,canBeOptimized:m}}function Z1e(e,t){let r=[],n=J1e(e);r=r.concat(n.errors);var i=(e=efe(n.valid)).valid;return r=(r=(r=(r=(r=r.concat(e.errors)).concat(Q1e(i))).concat(sfe(i))).concat(ofe(i,t))).concat(lfe(i))}function Q1e(e){let t=[],r=gq(e,e=>Nj(e[Efe]));return t=(t=(t=(t=(t=t.concat(tfe(r))).concat(nfe(r))).concat(ife(r))).concat(afe(r))).concat(rfe(r))}function J1e(e){var t=gq(e,e=>!nj(e,Efe));return{errors:x(t,e=>({message:"Token Type: ->"+e.name+"<- missing static 'PATTERN' property",type:Kfe.MISSING_PATTERN,tokenTypes:[e]})),valid:BU(e,t)}}function efe(e){var t=gq(e,e=>(e=e[Efe],!(Nj(e)||R6(e)||nj(e,"exec")||sj(e))));return{errors:x(t,e=>({message:"Token Type: ->"+e.name+"<- static 'PATTERN' can only be a RegExp, a Function matching the {CustomPatternMatcherFunc} type or an Object matching the {ICustomPattern} interface.",type:Kfe.INVALID_PATTERN,tokenTypes:[e]})),valid:BU(e,t)}}function tfe(e){class n extends M0e{static{mt(this,"EndAnchorFinder")}constructor(){super(...arguments),this.found=!1}visitEndAnchor(e){this.found=!0}}return e=gq(e,e=>{e=e.PATTERN;try{var t=D1e(e),r=new n;return r.visit(t),r.found}catch{return Afe.test(e.source)}}),x(e,e=>({message:`Unexpected RegExp Anchor Error: + Token Type: ->`+e.name+`<- static 'PATTERN' cannot contain end of input anchor '$' + See chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS for details.`,type:Kfe.EOI_ANCHOR_FOUND,tokenTypes:[e]}))}function rfe(e){return e=gq(e,e=>e.PATTERN.test("")),x(e,e=>({message:"Token Type: ->"+e.name+"<- static 'PATTERN' must not match an empty string",type:Kfe.EMPTY_MATCH_PATTERN,tokenTypes:[e]}))}function nfe(e){class n extends M0e{static{mt(this,"StartAnchorFinder")}constructor(){super(...arguments),this.found=!1}visitStartAnchor(e){this.found=!0}}return e=gq(e,e=>{e=e.PATTERN;try{var t=D1e(e),r=new n;return r.visit(t),r.found}catch{return Lfe.test(e.source)}}),x(e,e=>({message:`Unexpected RegExp Anchor Error: + Token Type: ->`+e.name+`<- static 'PATTERN' cannot contain start of input anchor '^' + See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS for details.`,type:Kfe.SOI_ANCHOR_FOUND,tokenTypes:[e]}))}function ife(e){return e=gq(e,e=>(e=e[Efe])instanceof RegExp&&(e.multiline||e.global)),x(e,e=>({message:"Token Type: ->"+e.name+"<- static 'PATTERN' may NOT contain global('g') or multiline('m')",type:Kfe.UNSUPPORTED_FLAGS_FOUND,tokenTypes:[e]}))}function afe(e){let n=[],t=x(e,r=>lW(e,(e,t)=>(r.PATTERN.source!==t.PATTERN.source||mj(n,t)||t.PATTERN===Qfe.NA||(n.push(t),e.push(t)),e),[]));t=Sz(t);var r=gq(t,e=>1<e.length);return x(r,e=>{var t=x(e,e=>e.name);return{message:`The same RegExp pattern ->${Sq(e).PATTERN}<-has been used in all of the following Token Types: ${t.join(", ")} <-`,type:Kfe.DUPLICATE_PATTERNS_FOUND,tokenTypes:e}})}function sfe(e){return e=gq(e,e=>!!nj(e,"GROUP")&&(e=e.GROUP)!==Qfe.SKIPPED&&e!==Qfe.NA&&!sj(e)),x(e,e=>({message:"Token Type: ->"+e.name+"<- static 'GROUP' can only be Lexer.SKIPPED/Lexer.NA/A String",type:Kfe.INVALID_GROUP_TYPE_FOUND,tokenTypes:[e]}))}function ofe(e,t){return e=gq(e,e=>void 0!==e.PUSH_MODE&&!mj(t,e.PUSH_MODE)),x(e,e=>({message:`Token Type: ->${e.name}<- static 'PUSH_MODE' value cannot refer to a Lexer Mode ->${e.PUSH_MODE}<-which does not exist`,type:Kfe.PUSH_MODE_DOES_NOT_EXIST,tokenTypes:[e]}))}function lfe(e){let a=[],t=lW(e,(e,t,r)=>{var n=t.PATTERN;return n!==Qfe.NA&&(sj(n)?e.push({str:n,idx:r,tokenType:t}):Nj(n)&&hfe(n)&&e.push({str:n.source,idx:r,tokenType:t})),e},[]);return v(e,(n,i)=>{v(t,({str:e,idx:t,tokenType:r})=>{i<t&&cfe(e,n.PATTERN)&&(t=`Token: ->${r.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`,a.push({message:t,type:Kfe.UNREACHABLE_PATTERN,tokenTypes:[n,r]}))})}),a}function cfe(e,t){var r;if(Nj(t))return null!==(r=t.exec(e))&&0===r.index;if(R6(t))return t(e,0,[],{});if(nj(t,"exec"))return t.exec(e,0,[],{});if("string"==typeof t)return t===e;throw Error("non exhaustive match")}function hfe(t){return void 0===Tq([".","\\","[","]","|","^","$","(",")","?","*","+","{"],e=>-1!==t.source.indexOf(e))}function ufe(e){var t=e.ignoreCase?"i":"";return new RegExp(`^(?:${e.source})`,t)}function dfe(e){var t=e.ignoreCase?"iy":"y";return new RegExp(""+e.source,t)}function pfe(e,t,r){let i=[];return nj(e,Cfe)||i.push({message:"A MultiMode Lexer cannot be initialized without a <"+Cfe+`> property in its definition +`,type:Kfe.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE}),nj(e,_fe)||i.push({message:"A MultiMode Lexer cannot be initialized without a <"+_fe+`> property in its definition +`,type:Kfe.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY}),nj(e,_fe)&&nj(e,Cfe)&&!nj(e.modes,e.defaultMode)&&i.push({message:`A MultiMode Lexer cannot be initialized with a ${Cfe}: <${e.defaultMode}>which does not exist +`,type:Kfe.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST}),nj(e,_fe)&&v(e.modes,(r,n)=>{v(r,(t,e)=>{Dj(t)?i.push({message:`A Lexer cannot be initialized using an undefined Token Type. Mode:<${n}> at index: <${e}> +`,type:Kfe.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED}):nj(t,"LONGER_ALT")&&(e=n8(t.LONGER_ALT)?t.LONGER_ALT:[t.LONGER_ALT],v(e,e=>{Dj(e)||mj(r,e)||i.push({message:`A MultiMode Lexer cannot be initialized with a longer_alt <${e.name}> on token <${t.name}> outside of mode <${n}> +`,type:Kfe.MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE})}))})}),i}function gfe(e,t,r){let n=[],i=!1,a=Sz(p$(dj(e.modes))),s=uW(a,e=>e[Efe]===Qfe.NA),o=bfe(r);return t&&v(s,e=>{var t=vfe(e,o);!1!==t?(t={message:xfe(e,t),type:t.issue,tokenType:e},n.push(t)):nj(e,"LINE_BREAKS")?!0===e.LINE_BREAKS&&(i=!0):Y1e(o,e.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:Kfe.NO_LINE_BREAKS_FLAGS}),n}function ffe(r){let n={},e=kB(r);return v(e,e=>{var t=r[e];if(!n8(t))throw Error("non exhaustive match");n[e]=[]}),n}function mfe(e){if(e=e.PATTERN,Nj(e))return!1;if(R6(e))return!0;if(nj(e,"exec"))return!0;if(sj(e))return!1;throw Error("non exhaustive match")}function yfe(e){return!(!sj(e)||1!==e.length)&&e.charCodeAt(0)}function vfe(e,t){if(nj(e,"LINE_BREAKS"))return!1;if(Nj(e.PATTERN)){try{Y1e(t,e.PATTERN)}catch(e){return{issue:Kfe.IDENTIFY_TERMINATOR,errMsg:e.message}}return!1}if(sj(e.PATTERN))return!1;if(mfe(e))return{issue:Kfe.CUSTOM_LINE_BREAK};throw Error("non exhaustive match")}function xfe(e,t){if(t.issue===Kfe.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===Kfe.CUSTOM_LINE_BREAK)return`Warning: A Custom Token Pattern should specify the <line_breaks> 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 bfe(e){return x(e,e=>sj(e)?e.charCodeAt(0):e)}function wfe(e,t,r){void 0===e[t]?e[t]=[r]:e[t].push(r)}function kfe(e){return e<Ife?e:Rfe[e]}function Tfe(){if(Cj(Rfe)){Rfe=new Array(65536);for(let e=0;e<65536;e++)Rfe[e]=255<e?255+~~(e/255):e}}var Efe,Cfe,_fe,Sfe,Afe,Lfe,Nfe,Ife,Rfe,Mfe=b(()=>{$0e(),tme(),KW(),Xge(),X1e(),$1e(),Efe="PATTERN",Cfe="defaultMode",_fe="modes",Sfe="boolean"==typeof new RegExp("(?:)").sticky,mt(K1e,"analyzeTokenTypes"),mt(Z1e,"validatePatterns"),mt(Q1e,"validateRegExpPattern"),mt(J1e,"findMissingPatterns"),mt(efe,"findInvalidPatterns"),Afe=/[^\\][$]/,mt(tfe,"findEndOfInputAnchor"),mt(rfe,"findEmptyMatchRegExps"),Lfe=/[^\\[][\^]|^\^/,mt(nfe,"findStartOfInputAnchor"),mt(ife,"findUnsupportedFlags"),mt(afe,"findDuplicatePatterns"),mt(sfe,"findInvalidGroupType"),mt(ofe,"findModesThatDoNotExist"),mt(lfe,"findUnreachablePatterns"),mt(cfe,"testTokenType"),mt(hfe,"noMetaChar"),mt(ufe,"addStartOfInput"),mt(dfe,"addStickyFlag"),mt(pfe,"performRuntimeChecks"),mt(gfe,"performWarningRuntimeChecks"),mt(ffe,"cloneEmptyGroups"),mt(mfe,"isCustomPattern"),mt(yfe,"isShortPattern"),Nfe={test:mt(function(t){var r=t.length;for(let e=this.lastIndex;e<r;e++){var n=t.charCodeAt(e);if(10===n)return this.lastIndex=e+1,!0;if(13===n)return 10===t.charCodeAt(e+1)?this.lastIndex=e+2:this.lastIndex=e+1,!0}return!1},"test"),lastIndex:0},mt(vfe,"checkLineBreaksIssues"),mt(xfe,"buildLineBreakIssueMessage"),mt(bfe,"getCharCodes"),mt(wfe,"addToMapOfArrays"),Ife=256,Rfe=[],mt(kfe,"charCodeToOptimizedIndex"),mt(Tfe,"initCharCodeToOptimizedIndexMap")});function Dfe(e,t){return(e=e.tokenTypeIdx)===t.tokenTypeIdx||!0===t.isParent&&!0===t.categoryMatchesMap[e]}function Ofe(e,t){return e.tokenTypeIdx===t.tokenTypeIdx}function Pfe(e){$fe(e=Bfe(e)),zfe(e),Ffe(e),v(e,e=>{e.isParent=0<e.categoryMatches.length})}function Bfe(e){let t=wz(e),r=e,n=!0;for(;n;){r=Sz(p$(x(r,e=>e.CATEGORIES)));var i=BU(r,t);t=t.concat(i),Cj(i)?n=!1:r=i}return t}function $fe(e){v(e,e=>{Ufe(e)||((Vfe[Hfe]=e).tokenTypeIdx=Hfe++),qfe(e)&&!n8(e.CATEGORIES)&&(e.CATEGORIES=[e.CATEGORIES]),qfe(e)||(e.CATEGORIES=[]),jfe(e)||(e.categoryMatches=[]),Yfe(e)||(e.categoryMatchesMap={})})}function Ffe(e){v(e,r=>{r.categoryMatches=[],v(r.categoryMatchesMap,(e,t)=>{r.categoryMatches.push(Vfe[t].tokenTypeIdx)})})}function zfe(e){v(e,e=>{Gfe([],e)})}function Gfe(r,n){v(r,e=>{n.categoryMatchesMap[e.tokenTypeIdx]=!0}),v(n.CATEGORIES,e=>{var t=r.concat(n);mj(t,e)||Gfe(t,e)})}function Ufe(e){return nj(e,"tokenTypeIdx")}function qfe(e){return nj(e,"CATEGORIES")}function jfe(e){return nj(e,"categoryMatches")}function Yfe(e){return nj(e,"categoryMatchesMap")}function Wfe(e){return nj(e,"tokenTypeIdx")}var Hfe,Vfe,Xfe,Kfe,Zfe,Qfe,Jfe=b(()=>{KW(),mt(Dfe,"tokenStructuredMatcher"),mt(Ofe,"tokenStructuredMatcherNoCategories"),Hfe=1,Vfe={},mt(Pfe,"augmentTokenTypes"),mt(Bfe,"expandCategories"),mt($fe,"assignTokenDefaultProps"),mt(Ffe,"assignCategoriesTokensProp"),mt(zfe,"assignCategoriesMapProp"),mt(Gfe,"singleAssignCategoriesToksMap"),mt(Ufe,"hasShortKeyProperty"),mt(qfe,"hasCategoriesProperty"),mt(jfe,"hasExtendingTokensTypesProperty"),mt(Yfe,"hasExtendingTokensTypesMapProperty"),mt(Wfe,"isTokenType")}),eme=b(()=>{Xfe={buildUnableToPopLexerModeMessage(e){return`Unable to pop Lexer Mode after encountering Token ->${e.image}<- The Mode Stack is empty`},buildUnexpectedCharactersMessage(e,t,r,n,i){return`unexpected character: ->${e.charAt(t)}<- at offset: ${t}, skipped ${r} characters.`}}}),tme=b(()=>{var e;Mfe(),KW(),Xge(),Jfe(),eme(),$1e(),(e=Kfe=Kfe||{})[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",Zfe={deferDefinitionErrorsHandling:!1,positionTracking:"full",lineTerminatorsPattern:/\n|\r\n?/g,lineTerminatorCharacters:[` +`,"\r"],ensureOptimizations:!1,safeMode:!1,errorMessageProvider:Xfe,traceInitPerf:!1,skipValidations:!1,recoveryEnabled:!0},Object.freeze(Zfe),(Qfe=class{static{mt(this,"Lexer")}constructor(i,a=Zfe){if(this.lexerDefinition=i,this.lexerDefinitionErrors=[],this.lexerDefinitionWarning=[],this.patternIdxToConfig={},this.charCodeToPatternIdxToConfig={},this.modes=[],this.emptyGroups={},this.trackStartLines=!0,this.trackEndLines=!0,this.hasCustom=!1,this.canModeBeOptimized={},this.TRACE_INIT=(e,t)=>{var r,n,i,a;return!0===this.traceInitPerf?(this.traceInitIndent++,r=new Array(this.traceInitIndent+1).join("\t"),{time:n,value:i}=(this.traceInitIndent<this.traceInitMaxIdent&&console.log(r+`--> <${e}>`),Yge(t)),a=10<n?console.warn:console.log,this.traceInitIndent<this.traceInitMaxIdent&&a(r+`<-- <${e}> time: ${n}ms`),this.traceInitIndent--,i):t()},"boolean"==typeof a)throw Error(`The second argument to the Lexer constructor is now an ILexerConfig Object. +a boolean 2nd argument is no longer supported`);this.config=CB({},Zfe,a);var e=this.config.traceInitPerf;!0===e?(this.traceInitMaxIdent=1/0,this.traceInitPerf=!0):"number"==typeof e&&(this.traceInitMaxIdent=e,this.traceInitPerf=!0),this.traceInitIndent=-1,this.TRACE_INIT("Lexer Constructor",()=>{let r,e=!0,n=(this.TRACE_INIT("Lexer Config handling",()=>{if(this.config.lineTerminatorsPattern===Zfe.lineTerminatorsPattern)this.config.lineTerminatorsPattern=Nfe;else if(this.config.lineTerminatorCharacters===Zfe.lineTerminatorCharacters)throw Error(`Error: Missing <lineTerminatorCharacters> property on the Lexer config. + For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#MISSING_LINE_TERM_CHARS`);if(a.safeMode&&a.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),r=n8(i)?{modes:{defaultMode:wz(i)},defaultMode:Cfe}:(e=!1,wz(i))}),!1===this.config.skipValidations&&(this.TRACE_INIT("performRuntimeChecks",()=>{this.lexerDefinitionErrors=this.lexerDefinitionErrors.concat(pfe(r,this.trackStartLines,this.config.lineTerminatorCharacters))}),this.TRACE_INIT("performWarningRuntimeChecks",()=>{this.lexerDefinitionWarning=this.lexerDefinitionWarning.concat(gfe(r,this.trackStartLines,this.config.lineTerminatorCharacters))})),r.modes=r.modes||{},v(r.modes,(e,t)=>{r.modes[t]=uW(e,e=>Dj(e))}),kB(r.modes)),t;if(v(r.modes,(t,r)=>{this.TRACE_INIT(`Mode: <${r}> processing`,()=>{if(this.modes.push(r),!1===this.config.skipValidations&&this.TRACE_INIT("validatePatterns",()=>{this.lexerDefinitionErrors=this.lexerDefinitionErrors.concat(Z1e(t,n))}),Cj(this.lexerDefinitionErrors)){Pfe(t);let e;this.TRACE_INIT("analyzeTokenTypes",()=>{e=K1e(t,{lineTerminatorCharacters:this.config.lineTerminatorCharacters,positionTracking:a.positionTracking,ensureOptimizations:a.ensureOptimizations,safeMode:a.safeMode,tracer:this.TRACE_INIT})}),this.patternIdxToConfig[r]=e.patternIdxToConfig,this.charCodeToPatternIdxToConfig[r]=e.charCodeToPatternIdxToConfig,this.emptyGroups=CB({},this.emptyGroups,e.emptyGroups),this.hasCustom=e.hasCustom||this.hasCustom,this.canModeBeOptimized[r]=e.canBeOptimized}})}),this.defaultMode=r.defaultMode,!Cj(this.lexerDefinitionErrors)&&!this.config.deferDefinitionErrorsHandling)throw t=x(this.lexerDefinitionErrors,e=>e.message).join(`----------------------- +`),new Error(`Errors detected in definition of Lexer: +`+t);v(this.lexerDefinitionWarning,e=>{qge(e.message)}),this.TRACE_INIT("Choosing sub-methods implementations",()=>{if(Sfe?(this.chopInput=PE,this.match=this.matchWithTest):(this.updateLastIndex=HP,this.match=this.matchWithExec),e&&(this.handleModes=HP),!1===this.trackStartLines&&(this.computeNewColumn=PE),!1===this.trackEndLines&&(this.updateTokenEndLineColumnLocation=HP),/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))throw Error(`Invalid <positionTracking> config option: "${this.config.positionTracking}"`);this.createTokenInstance=this.createOffsetOnlyToken}this.hasCustom?(this.addToken=this.addTokenUsingPush,this.handlePayload=this.handlePayloadWithCustom):(this.addToken=this.addTokenUsingMemberAccess,this.handlePayload=this.handlePayloadNoCustom)}),this.TRACE_INIT("Failed Optimization Warnings",()=>{var e=lW(this.canModeBeOptimized,(e,t,r)=>(!1===t&&e.push(r),e),[]);if(a.ensureOptimizations&&!Cj(e))throw Error(`Lexer Modes: < ${e.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",()=>{O1e()}),this.TRACE_INIT("toFastProperties",()=>{Hge(this)})})}tokenize(e,t=this.defaultMode){if(Cj(this.lexerDefinitionErrors))return this.tokenizeInternal(e,t);throw e=x(this.lexerDefinitionErrors,e=>e.message).join(`----------------------- +`),new Error(`Unable to Tokenize because Errors detected in definition of Lexer: +`+e)}tokenizeInternal(i,P){let e,a,t,r,n,s,o,l,c,h,B,u,d,$,p,g=i,F=g.length,f=0,m=0,z=this.hasCustom?0:Math.floor(i.length/10),y=new Array(z),v=[],x=this.trackStartLines?1:void 0,b=this.trackStartLines?1:void 0,w=ffe(this.emptyGroups),G=this.trackStartLines,k=this.config.lineTerminatorsPattern,T=0,E=[],C=[],_=[],U=[];Object.freeze(U);let S;function A(){return E}function L(e){return e=kfe(e),void 0===(e=C[e])?U:e}mt(A,"getPossiblePatternsSlow"),mt(L,"getPossiblePatternsOptimized");var q=mt(e=>{var t;1===_.length&&void 0===e.tokenType.PUSH_MODE?(t=this.config.errorMessageProvider.buildUnableToPopLexerModeMessage(e),v.push({offset:e.startOffset,line:e.startLine,column:e.startColumn,length:e.image.length,message:t})):(_.pop(),e=GU(_),E=this.patternIdxToConfig[e],C=this.charCodeToPatternIdxToConfig[e],T=E.length,t=this.canModeBeOptimized[e]&&!1===this.config.safeMode,S=C&&t?L:A)},"pop_mode");function N(e){_.push(e),C=this.charCodeToPatternIdxToConfig[e],E=this.patternIdxToConfig[e],T=E.length,T=E.length,e=this.canModeBeOptimized[e]&&!1===this.config.safeMode,S=C&&e?L:A}mt(N,"push_mode"),N.call(this,P);let I,j=this.config.recoveryEnabled;for(;f<F;){s=null;var Y=g.charCodeAt(f),W=S(Y),H=W.length;for(e=0;e<H;e++){var R=(I=W[e]).pattern,V=(o=null,I.short);if(!1!==V?Y===V&&(s=R):!0===I.isCustom?null!==(p=R.exec(g,f,y,w))?(s=p[0],void 0!==p.payload&&(o=p.payload)):s=null:(this.updateLastIndex(R,f),s=this.match(R,i,f)),null!==s){if(void 0!==(n=I.longerAlt)){var X=n.length;for(t=0;t<X;t++){var M=E[n[t]],D=M.pattern;if(!(l=null)===M.isCustom?null!==(p=D.exec(g,f,y,w))?(r=p[0],void 0!==p.payload&&(l=p.payload)):r=null:(this.updateLastIndex(D,f),r=this.match(D,i,f)),r&&r.length>s.length){s=r,o=l,I=M;break}}}break}}if(null!==s){if(c=s.length,void 0!==(h=I.group)&&(B=I.tokenTypeIdx,u=this.createTokenInstance(s,f,B,I.tokenType,x,b,c),this.handlePayload(u,o),!1===h?m=this.addToken(y,m,u):w[h].push(u)),i=this.chopInput(i,c),f+=c,b=this.computeNewColumn(b,c),!0===G&&!0===I.canLineTerminator){let e=0,t,r;for(k.lastIndex=0;!0===(t=k.test(s))&&(r=k.lastIndex-1,e++),!0===t;);0!==e&&(x+=e,b=c-r,this.updateTokenEndLineColumnLocation(u,h,r,e,x,b,c))}this.handleModes(I,q,N,u)}else{let e=f,t=x,r=b,n=!1===j;for(;!1===n&&f<F;)for(i=this.chopInput(i,1),f++,a=0;a<T;a++){var O=E[a],K=O.pattern,Z=O.short;if(!1!==Z?g.charCodeAt(f)===Z&&(n=!0):n=!0===O.isCustom?null!==K.exec(g,f,y,w):(this.updateLastIndex(K,f),null!==K.exec(i)),!0===n)break}if(d=f-e,b=this.computeNewColumn(b,d),$=this.config.errorMessageProvider.buildUnexpectedCharactersMessage(g,e,d,t,r),v.push({offset:e,line:t,column:r,length:d,message:$}),!1===j)break}}return this.hasCustom||(y.length=m),{tokens:y,groups:w,errors:v}}handleModes(e,t,r,n){var i;!0===e.pop?(i=e.push,t(n),void 0!==i&&r.call(this,i)):void 0!==e.push&&r.call(this,e.push)}chopInput(e,t){return e.substring(t)}updateLastIndex(e,t){e.lastIndex=t}updateTokenEndLineColumnLocation(e,t,r,n,i,a,s){void 0!==t&&(r=(t=r===s-1)?-1:0,1===n&&1==t||(e.endLine=i+r,e.endColumn=a-1-r))}computeNewColumn(e,t){return e+t}createOffsetOnlyToken(e,t,r,n){return{image:e,startOffset:t,tokenTypeIdx:r,tokenType:n}}createStartOnlyToken(e,t,r,n,i,a){return{image:e,startOffset:t,startLine:i,startColumn:a,tokenTypeIdx:r,tokenType:n}}createFullToken(e,t,r,n,i,a,s){return{image:e,startOffset:t,endOffset:t+s-1,startLine:i,endLine:i,startColumn:a,endColumn:a+s-1,tokenTypeIdx:r,tokenType:n}}addTokenUsingPush(e,t,r){return e.push(r),t}addTokenUsingMemberAccess(e,t,r){return e[t]=r,++t}handlePayloadNoCustom(e,t){}handlePayloadWithCustom(e,t){null!==t&&(e.payload=t)}matchWithTest(e,t,r){return!0===e.test(t)?t.substring(r,e.lastIndex):null}matchWithExec(e,t){return null!==(e=e.exec(t))?e[0]:null}}).SKIPPED="This marks a skipped Token pattern, this means each token identified by it willbe consumed and then thrown into oblivion, this can be used to for example to completely ignore whitespace.",Qfe.NA=/NOT_APPLICABLE/});function rme(e){return nme(e)?e.LABEL:e.name}function nme(e){return sj(e.LABEL)&&""!==e.LABEL}function ime(e){return ame(e)}function ame(e){var t=e.pattern,r={};if(r.name=e.name,Dj(t)||(r.PATTERN=t),nj(e,lme))throw`The parent property is no longer supported. +See: https://github.com/chevrotain/chevrotain/issues/564#issuecomment-349062346 for details.`;return nj(e,cme)&&(r.CATEGORIES=e[cme]),Pfe([r]),nj(e,hme)&&(r.LABEL=e[hme]),nj(e,ume)&&(r.GROUP=e[ume]),nj(e,pme)&&(r.POP_MODE=e[pme]),nj(e,dme)&&(r.PUSH_MODE=e[dme]),nj(e,gme)&&(r.LONGER_ALT=e[gme]),nj(e,fme)&&(r.LINE_BREAKS=e[fme]),nj(e,mme)&&(r.START_CHARS_HINT=e[mme]),r}function sme(e,t,r,n,i,a,s,o){return{image:t,startOffset:r,endOffset:n,startLine:i,endLine:a,startColumn:s,endColumn:o,tokenTypeIdx:e.tokenTypeIdx,tokenType:e}}function ome(e,t){return Dfe(e,t)}var lme,cme,hme,ume,dme,pme,gme,fme,mme,yme,vme,xme,bme,wme=b(()=>{KW(),tme(),Jfe(),mt(rme,"tokenLabel"),mt(nme,"hasTokenLabel"),lme="parent",cme="categories",hme="label",ume="group",dme="push_mode",pme="pop_mode",gme="longer_alt",fme="line_breaks",mme="start_chars_hint",mt(ime,"createToken"),mt(ame,"createTokenInternal"),Pfe([yme=ime({name:"EOF",pattern:Qfe.NA})]),mt(sme,"createTokenInstance"),mt(ome,"tokenMatcher")}),kme=b(()=>{wme(),KW(),x1e(),vme={buildMismatchTokenMessage({expected:e,actual:t}){return`Expecting ${nme(e)?`--> ${rme(e)} <--`:`token of type --> ${e.name} <--`} but found --> '${t.image}' <--`},buildNotAllInputParsedMessage({firstRedundant:e}){return"Redundant input, expecting EOF but found: "+e.image},buildNoViableAltMessage({expectedPathsPerAlt:e,actual:t,customUserDescription:r}){var n="Expecting: ",t=` +but found: '`+Sq(t).image+"'";return r?n+r+t:(r=lW(e,(e,t)=>e.concat(t),[]),e=x(r,e=>`[${x(e,e=>rme(e)).join(", ")}]`),n+`one of these possible Token sequences: +`+x(e,(e,t)=>` ${t+1}. `+e).join(` +`)+t)},buildEarlyExitMessage({expectedIterationPaths:e,actual:t,customUserDescription:r}){var n="Expecting: ",t=` +but found: '`+Sq(t).image+"'";return r?n+r+t:n+`expecting at least one iteration which starts with one of these possible Token sequences:: + <${x(e,e=>`[${x(e,e=>rme(e)).join(",")}]`).join(" ,")}>`+t}},Object.freeze(vme),xme={buildRuleNotFoundError(e,t){return"Invalid grammar, reference to a rule which is not defined: ->"+t.nonTerminalName+`<- +inside top level rule: ->`+e.name+"<-"}},bme={buildDuplicateFoundError(e,t){function r(e){return e instanceof h1e?e.terminalType.name:e instanceof t1e?e.nonTerminalName:""}mt(r,"getExtraProductionArgument");let n=e.name,i=Sq(t),a=i.idx,s=y1e(i),o=r(i),l=0<a,c=`->${s}${l?a:""}<- ${o?`with argument: ->${o}<-`:""} + 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 c=(c=c.replace(/[ \t]+/g," ")).replace(/\s\s+/g,` +`)},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){var t=x(e.prefixPath,e=>rme(e)).join(", "),r=0===e.alternation.idx?"":e.alternation.idx;return`Ambiguous alternatives: <${e.ambiguityIndices.join(" ,")}> due to common lookahead prefix +in <OR${r}> 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){var t=x(e.prefixPath,e=>rme(e)).join(", "),r=0===e.alternation.idx?"":e.alternation.idx;return`Ambiguous Alternatives Detected: <${e.ambiguityIndices.join(" ,")}> in <OR${r}> 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#AMBIGUOUS_ALTERNATIVES +For Further details.`},buildEmptyRepetitionError(e){let t=y1e(e.repetition);return 0!==e.repetition.idx&&(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 <OR${e.alternation.idx}> 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: +<OR${e.alternation.idx}> inside <${e.topLevelRule.name}> Rule. + has ${e.alternation.definition.length+1} alternatives.`},buildLeftRecursionError(e){var t=e.topLevelRule.name;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: + ${t+" --\x3e "+x(e.leftRecursionPath,e=>e.name).concat([t]).join(" --\x3e ")} + 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){return`Duplicate definition, rule: ->${e.topLevelRule instanceof r1e?e.topLevelRule.name:e.topLevelRule}<- is already defined in the grammar: ->${e.grammarName}<-`}}});function Tme(e,t){return(e=new Eme(e,t)).resolveRefs(),e.errors}var Eme,Cme=b(()=>{U2e(),KW(),x1e(),mt(Tme,"resolveGrammar"),Eme=class extends u1e{static{mt(this,"GastRefResolverVisitor")}constructor(e,t){super(),this.nameToTopRule=e,this.errMsgProvider=t,this.errors=[]}resolveRefs(){v(dj(this.nameToTopRule),e=>{(this.currTopLevel=e).accept(this)})}visitNonTerminal(e){var t=this.nameToTopRule[e.nonTerminalName];t?e.referencedRule=t:(t=this.errMsgProvider.buildRuleNotFoundError(this.currTopLevel,e),this.errors.push({message:t,type:F2e.UNRESOLVED_SUBRULE_REF,ruleName:this.currTopLevel.name,unresolvedRefName:e.nonTerminalName}))}}});function _me(t,r,n=[]){n=wz(n);let i=[],a=0;function s(e){return e.concat(jU(t,a+1))}function o(e){return e=_me(s(e),r,n),i.concat(e)}for(mt(s,"remainingPathWith"),mt(o,"getAlternativesForProd");n.length<r&&a<t.length;){var e=t[a];if(e instanceof n1e)return o(e.definition);if(e instanceof t1e)return o(e.definition);if(e instanceof i1e)i=o(e.definition);else{if(e instanceof a1e)return o(e.definition.concat([new o1e({definition:e.definition})]));if(e instanceof s1e)return o([new n1e({definition:e.definition}),new o1e({definition:[new h1e({terminalType:e.separator})].concat(e.definition)})]);if(e instanceof l1e){var l=e.definition.concat([new o1e({definition:[new h1e({terminalType:e.separator})].concat(e.definition)})]);i=o(l)}else if(e instanceof o1e)l=e.definition.concat([new o1e({definition:e.definition})]),i=o(l);else{if(e instanceof c1e)return v(e.definition,e=>{!1===Cj(e.definition)&&(i=o(e.definition))}),i;if(!(e instanceof h1e))throw Error("non exhaustive match");n.push(e.terminalType)}}a++}return i.push({partialPath:n,suffixDef:jU(t,a)}),i}function Sme(e,t,r,n){let i="EXIT_NONE_TERMINAL",a=[i],s="EXIT_ALTERNATIVE",o=!1,l=t.length,c=l-n-1,h=[],u=[];for(u.push({idx:-1,def:e,ruleStack:[],occurrenceStack:[]});!Cj(u);)if((v=u.pop())===s)o&&GU(u).idx<=c&&u.pop();else{var d=v.def,p=v.idx,g=v.ruleStack,f=v.occurrenceStack;if(!Cj(d)){var m=d[0];if(m===i)v={idx:p,def:jU(d),ruleStack:HU(g),occurrenceStack:HU(f)},u.push(v);else if(m instanceof h1e)if(p<l-1)r(t[v=p+1],m.terminalType)&&(v={idx:v,def:jU(d),ruleStack:g,occurrenceStack:f},u.push(v));else{if(p!==l-1)throw Error("non exhaustive match");h.push({nextTokenType:m.terminalType,nextTokenOccurrence:m.idx,ruleStack:g,occurrenceStack:f}),o=!0}else if(m instanceof t1e){(v=wz(g)).push(m.nonTerminalName);var y=wz(f),v=(y.push(m.idx),{idx:p,def:m.definition.concat(a,jU(d)),ruleStack:v,occurrenceStack:y});u.push(v)}else if(m instanceof i1e)y={idx:p,def:jU(d),ruleStack:g,occurrenceStack:f},u.push(y),u.push(s),v={idx:p,def:m.definition.concat(jU(d)),ruleStack:g,occurrenceStack:f},u.push(v);else if(m instanceof a1e)v=new o1e({definition:m.definition,idx:m.idx}),v=m.definition.concat([v],jU(d)),u.push({idx:p,def:v,ruleStack:g,occurrenceStack:f});else if(m instanceof s1e)v=new h1e({terminalType:m.separator}),v=new o1e({definition:[v].concat(m.definition),idx:m.idx}),v=m.definition.concat([v],jU(d)),u.push({idx:p,def:v,ruleStack:g,occurrenceStack:f});else if(m instanceof l1e)v={idx:p,def:jU(d),ruleStack:g,occurrenceStack:f},u.push(v),u.push(s),v=new h1e({terminalType:m.separator}),v=new o1e({definition:[v].concat(m.definition),idx:m.idx}),v=m.definition.concat([v],jU(d)),u.push({idx:p,def:v,ruleStack:g,occurrenceStack:f});else if(m instanceof o1e)v={idx:p,def:jU(d),ruleStack:g,occurrenceStack:f},u.push(v),u.push(s),v=new o1e({definition:m.definition,idx:m.idx}),v=m.definition.concat([v],jU(d)),u.push({idx:p,def:v,ruleStack:g,occurrenceStack:f});else if(m instanceof c1e)for(let e=m.definition.length-1;0<=e;e--){var x={idx:p,def:m.definition[e].definition.concat(jU(d)),ruleStack:g,occurrenceStack:f};u.push(x),u.push(s)}else if(m instanceof n1e)u.push({idx:p,def:m.definition.concat(jU(d)),ruleStack:g,occurrenceStack:f});else{if(!(m instanceof r1e))throw Error("non exhaustive match");u.push(Ame(m,p,g,f))}}}return h}function Ame(e,t,r,n){return(r=wz(r)).push(e.name),(n=wz(n)).push(1),{idx:t,def:e.definition,ruleStack:r,occurrenceStack:n}}var Lme,Nme,Ime,Rme,Mme,Dme,Ome=b(()=>{KW(),A1e(),k1e(),x1e(),Nme=class extends w1e{static{mt(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=wz(this.path.ruleStack).reverse(),this.occurrenceStack=wz(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){e.referencedRule.name===this.nextProductionName&&e.idx===this.nextProductionOccurrence&&(t=t.concat(r),this.updateExpectedNext(),this.walk(e.referencedRule,t))}updateExpectedNext(){Cj(this.ruleStack)?(this.nextProductionName="",this.nextProductionOccurrence=0,this.isAtEndOfPath=!0):(this.nextProductionName=this.ruleStack.pop(),this.nextProductionOccurrence=this.occurrenceStack.pop())}},Lme=class extends Nme{static{mt(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){this.isAtEndOfPath&&e.terminalType.name===this.nextTerminalName&&e.idx===this.nextTerminalOccurrence&&!this.found&&(e=t.concat(r),t=new n1e({definition:e}),this.possibleTokTypes=T1e(t),this.found=!0)}},Nme=class extends w1e{static{mt(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}},Ime=class extends Nme{static{mt(this,"NextTerminalAfterManyWalker")}walkMany(e,t,r){var n;e.idx===this.occurrence?(n=Sq(t.concat(r)),this.result.isEndOfRule=void 0===n,n instanceof h1e&&(this.result.token=n.terminalType,this.result.occurrence=n.idx)):super.walkMany(e,t,r)}},Rme=class extends Nme{static{mt(this,"NextTerminalAfterManySepWalker")}walkManySep(e,t,r){var n;e.idx===this.occurrence?(n=Sq(t.concat(r)),this.result.isEndOfRule=void 0===n,n instanceof h1e&&(this.result.token=n.terminalType,this.result.occurrence=n.idx)):super.walkManySep(e,t,r)}},Mme=class extends Nme{static{mt(this,"NextTerminalAfterAtLeastOneWalker")}walkAtLeastOne(e,t,r){var n;e.idx===this.occurrence?(n=Sq(t.concat(r)),this.result.isEndOfRule=void 0===n,n instanceof h1e&&(this.result.token=n.terminalType,this.result.occurrence=n.idx)):super.walkAtLeastOne(e,t,r)}},Dme=class extends Nme{static{mt(this,"NextTerminalAfterAtLeastOneSepWalker")}walkAtLeastOneSep(e,t,r){var n;e.idx===this.occurrence?(n=Sq(t.concat(r)),this.result.isEndOfRule=void 0===n,n instanceof h1e&&(this.result.token=n.terminalType,this.result.occurrence=n.idx)):super.walkAtLeastOneSep(e,t,r)}},mt(_me,"possiblePathsFrom"),mt(Sme,"nextPossibleTokensAfter"),mt(Ame,"expandTopLevelRule")});function Pme(e){if(e instanceof i1e||"Option"===e)return Zme.OPTION;if(e instanceof o1e||"Repetition"===e)return Zme.REPETITION;if(e instanceof a1e||"RepetitionMandatory"===e)return Zme.REPETITION_MANDATORY;if(e instanceof s1e||"RepetitionMandatoryWithSeparator"===e)return Zme.REPETITION_MANDATORY_WITH_SEPARATOR;if(e instanceof l1e||"RepetitionWithSeparator"===e)return Zme.REPETITION_WITH_SEPARATOR;if(e instanceof c1e||"Alternation"===e)return Zme.ALTERNATION;throw Error("non exhaustive match")}function Bme(e){var{occurrence:e,rule:t,prodType:r,maxLookahead:n}=e;return(r=Pme(r))===Zme.ALTERNATION?Wme(e,t,n):Hme(e,t,r,n)}function $me(e,t,r,n,i,a){return a(e=Wme(e,t,r),n,Kme(e)?Ofe:Dfe,i)}function Fme(e,t,r,n,i,a){return t=Kme(e=Hme(e,t,i,r))?Ofe:Dfe,a(e[0],t,n)}function zme(c,e,h,t){let u=c.length,r=lq(c,e=>lq(e,e=>1===e.length));if(e)return function(e){var r=x(e,e=>e.GATE);for(let t=0;t<u;t++){var n=c[t],i=n.length,a=r[t];if(void 0===a||!1!==a.call(this))e:for(let e=0;e<i;e++){var s=n[e],o=s.length;for(let e=0;e<o;e++){var l=this.LA(e+1);if(!1===h(l,s[e]))continue e}return t}}};if(!r||t)return function(){for(let t=0;t<u;t++){var r=c[t],n=r.length;e:for(let e=0;e<n;e++){var i=r[e],a=i.length;for(let e=0;e<a;e++){var s=this.LA(e+1);if(!1===h(s,i[e]))continue e}return t}}};{let e=x(c,e=>p$(e)),t=lW(e,(t,e,r)=>(v(e,e=>{nj(t,e.tokenTypeIdx)||(t[e.tokenTypeIdx]=r),v(e.categoryMatches,e=>{nj(t,e)||(t[e]=r)})}),t),{});return function(){var e=this.LA(1);return t[e.tokenTypeIdx]}}}function Gme(i,a,r){let e=lq(i,e=>1===e.length),s=i.length;if(!e||r)return function(){e:for(let e=0;e<s;e++){var t=i[e],r=t.length;for(let e=0;e<r;e++){var n=this.LA(e+1);if(!1===a(n,t[e]))continue e}return!0}return!1};if(1===(r=p$(i)).length&&Cj(r[0].categoryMatches)){let e=r[0].tokenTypeIdx;return function(){return this.LA(1).tokenTypeIdx===e}}{let t=lW(r,(t,e,r)=>(t[e.tokenTypeIdx]=!0,v(e.categoryMatches,e=>{t[e]=!0}),t),[]);return function(){var e=this.LA(1);return!0===t[e.tokenTypeIdx]}}}function Ume(t){var r=new Array(t);for(let e=0;e<t;e++)r[e]=[];return r}function qme(t){let r=[""];for(let e=0;e<t.length;e++){var n=t[e],i=[];for(let e=0;e<r.length;e++){var a=r[e];i.push(a+"_"+n.tokenTypeIdx);for(let e=0;e<n.categoryMatches.length;e++){var s="_"+n.categoryMatches[e];i.push(a+s)}}r=i}return r}function jme(t,r,n){for(let e=0;e<t.length;e++)if(e!==n){var i=t[e];for(let e=0;e<r.length;e++)if(!0===i[r[e]])return!1}return!0}function Yme(e,n){let t=x(e,e=>_me([e],1)),i=Ume(t.length),a=x(t,e=>{let t={};return v(e,e=>{e=qme(e.partialPath),v(e,e=>{t[e]=!0})}),t}),s=t;for(let r=1;r<=n;r++){var o=s;s=Ume(o.length);for(let t=0;t<o.length;t++){var l=o[t];for(let e=0;e<l.length;e++){var c=l[e].partialPath,h=l[e].suffixDef,u=qme(c);if(jme(a,u,t)||Cj(h)||c.length===n){var d=i[t];if(!1===Vme(d,c)){d.push(c);for(let e=0;e<u.length;e++){var p=u[e];a[t][p]=!0}}}else d=_me(h,r+1,c),s[t]=s[t].concat(d),v(d,e=>{e=qme(e.partialPath),v(e,e=>{a[t][e]=!0})})}}}return i}function Wme(e,t,r,n){return e=new Jme(e,Zme.ALTERNATION,n),t.accept(e),Yme(e.result,r)}function Hme(e,t,r,n){var i=new Jme(e,r),i=(t.accept(i),i.result),t=new Qme(t,e,r).startWalking();return Yme([new n1e({definition:i}),new n1e({definition:t})],n)}function Vme(t,r){e:for(let e=0;e<t.length;e++){var n=t[e];if(n.length===r.length){for(let e=0;e<n.length;e++){var i=r[e],a=n[e];if(0==(i===a||void 0!==a.categoryMatchesMap[i.tokenTypeIdx]))continue e}return!0}}return!1}function Xme(e,r){return e.length<r.length&&lq(e,(e,t)=>e===(t=r[t])||t.categoryMatchesMap[e.tokenTypeIdx])}function Kme(e){return lq(e,e=>lq(e,e=>lq(e,e=>Cj(e.categoryMatches))))}var Zme,Qme,Jme,eye=b(()=>{var e;KW(),Ome(),k1e(),Jfe(),x1e(),(e=Zme=Zme||{})[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",mt(Pme,"getProdType"),mt(Bme,"getLookaheadPaths"),mt($me,"buildLookaheadFuncForOr"),mt(Fme,"buildLookaheadFuncForOptionalProd"),mt(zme,"buildAlternativesLookAheadFunc"),mt(Gme,"buildSingleAlternativeLookaheadFunction"),Qme=class extends w1e{static{mt(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)}walkOption(e,t,r){this.checkIsTarget(e,Zme.OPTION,t,r)||super.walkOption(e,t,r)}walkAtLeastOne(e,t,r){this.checkIsTarget(e,Zme.REPETITION_MANDATORY,t,r)||super.walkOption(e,t,r)}walkAtLeastOneSep(e,t,r){this.checkIsTarget(e,Zme.REPETITION_MANDATORY_WITH_SEPARATOR,t,r)||super.walkOption(e,t,r)}walkMany(e,t,r){this.checkIsTarget(e,Zme.REPETITION,t,r)||super.walkOption(e,t,r)}walkManySep(e,t,r){this.checkIsTarget(e,Zme.REPETITION_WITH_SEPARATOR,t,r)||super.walkOption(e,t,r)}},Jme=class extends u1e{static{mt(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||void 0!==this.targetRef&&e!==this.targetRef||(this.result=e.definition)}visitOption(e){this.checkIsTarget(e,Zme.OPTION)}visitRepetition(e){this.checkIsTarget(e,Zme.REPETITION)}visitRepetitionMandatory(e){this.checkIsTarget(e,Zme.REPETITION_MANDATORY)}visitRepetitionMandatoryWithSeparator(e){this.checkIsTarget(e,Zme.REPETITION_MANDATORY_WITH_SEPARATOR)}visitRepetitionWithSeparator(e){this.checkIsTarget(e,Zme.REPETITION_WITH_SEPARATOR)}visitAlternation(e){this.checkIsTarget(e,Zme.ALTERNATION)}},mt(Ume,"initializeArrayOfArrays"),mt(qme,"pathToHashKeys"),mt(jme,"isUniquePrefixHash"),mt(Yme,"lookAheadSequenceFromAlternatives"),mt(Wme,"getLookaheadPathsForOr"),mt(Hme,"getLookaheadPathsForOptionalProd"),mt(Vme,"containsPath"),mt(Xme,"isStrictPrefixOfPath"),mt(Kme,"areTokenCategoriesNotUsed")});function tye(e){return e=e.lookaheadStrategy.validate({rules:e.rules,tokenTypes:e.tokenTypes,grammarName:e.grammarName}),x(e,e=>Object.assign({type:F2e.CUSTOM_LOOKAHEAD_VALIDATION},e))}function rye(t,e,r,n){var i=Pq(t,e=>nye(e,r)),e=mye(t,e,r),a=Pq(t,e=>dye(e,r)),s=Pq(t,e=>sye(e,t,n,r));return i.concat(e,a,s)}function nye(n,i){var e=new yye,e=(n.accept(e),e.allProductions),e=Yq(e,iye),e=hY(e,e=>1<e.length);return x(dj(e),e=>{var t=Sq(e),e=i.buildDuplicateFoundError(n,e),r=y1e(t),e={message:e,type:F2e.DUPLICATE_PRODUCTIONS,ruleName:n.name,dslName:r,occurrence:t.idx};return(r=aye(t))&&(e.parameter=r),e})}function iye(e){return`${y1e(e)}_#_${e.idx}_#_`+aye(e)}function aye(e){return e instanceof h1e?e.terminalType.name:e instanceof t1e?e.nonTerminalName:""}function sye(r,e,t,n){var i=[];return 1<lW(e,(e,t)=>t.name===r.name?e+1:e,0)&&(e=n.buildDuplicateRuleNameError({topLevelRule:r,grammarName:t}),i.push({message:e,type:F2e.DUPLICATE_RULE_NAME,ruleName:r.name})),i}function oye(e,t,r){var n=[];return mj(t,e)||n.push({message:`Invalid rule override, rule: ->${e}<- cannot be overridden in the grammar: ->${r}<-as it is not defined in any of the super grammars `,type:F2e.INVALID_RULE_OVERRIDE,ruleName:e}),n}function lye(r,e,n,i=[]){var t,a=[],e=cye(e.definition);return Cj(e)?[]:(t=r.name,mj(e,r)&&a.push({message:n.buildLeftRecursionError({topLevelRule:r,leftRecursionPath:i}),type:F2e.LEFT_RECURSION,ruleName:t}),t=BU(e,i.concat([r])),e=Pq(t,e=>{var t=wz(i);return t.push(e),lye(r,e,n,t)}),a.concat(e))}function cye(e){let t=[];if(Cj(e))return t;if((r=Sq(e))instanceof t1e)t.push(r.referencedRule);else if(r instanceof n1e||r instanceof i1e||r instanceof a1e||r instanceof s1e||r instanceof l1e||r instanceof o1e)t=t.concat(cye(r.definition));else if(r instanceof c1e)t=p$(x(r.definition,e=>cye(e.definition)));else if(!(r instanceof h1e))throw Error("non exhaustive match");var r=f1e(r),n=1<e.length;return r&&n?(r=jU(e),t.concat(cye(r))):t}function hye(n,i){var e=new vye,e=(n.accept(e),e.alternations);return Pq(e,r=>{var e=HU(r.definition);return Pq(e,(e,t)=>(e=Sme([e],[],Dfe,1),Cj(e)?[{message:i.buildEmptyAlternationError({topLevelRule:n,alternation:r,emptyChoiceIdx:t}),type:F2e.NONE_LAST_EMPTY_ALT,ruleName:n.name,occurrence:r.idx,alternative:t+1}]:[]))})}function uye(n,i,a){var e=new vye,e=(n.accept(e),e.alternations),e=uW(e,e=>!0===e.ignoreAmbiguities);return Pq(e,e=>{var t=gye(r=Wme(e.idx,n,e.maxLookahead||i,e),e,n,a),r=fye(r,e,n,a);return t.concat(r)})}function dye(t,r){var e=new vye,e=(t.accept(e),e.alternations);return Pq(e,e=>255<e.definition.length?[{message:r.buildTooManyAlternativesError({topLevelRule:t,alternation:e}),type:F2e.TOO_MANY_ALTS,ruleName:t.name,occurrence:e.idx}]:[])}function pye(e,i,a){let s=[];return v(e,n=>{var e=new xye,e=(n.accept(e),e.allProductions);v(e,e=>{var t=Pme(e),r=e.maxLookahead||i,t=Hme(e.idx,n,t,r)[0];Cj(p$(t))&&(r=a.buildEmptyRepetitionError({topLevelRule:n,repetition:e}),s.push({message:r,type:F2e.NO_NON_EMPTY_LOOKAHEAD,ruleName:n.name}))})}),s}function gye(a,s,r,n){let o=[],e=lW(a,(e,t,i)=>(!0!==s.definition[i].ignoreAmbiguities&&v(t,r=>{let n=[i];v(a,(e,t)=>{i!==t&&Vme(e,r)&&!0!==s.definition[t].ignoreAmbiguities&&n.push(t)}),1<n.length&&!Vme(o,r)&&(o.push(r),e.push({alts:n,path:r}))}),e),[]);return x(e,e=>{var t=x(e.alts,e=>e+1);return{message:n.buildAlternationAmbiguityError({topLevelRule:r,alternation:s,ambiguityIndices:t,prefixPath:e.path}),type:F2e.AMBIGUOUS_ALTS,ruleName:r.name,occurrence:s.idx,alternatives:e.alts}})}function fye(e,i,a,s){let o=lW(e,(e,t,r)=>(t=x(t,e=>({idx:r,path:e})),e.concat(t)),[]);return Sz(Pq(o,e=>{if(!0===i.definition[e.idx].ignoreAmbiguities)return[];let n=e.idx,t=e.path,r=gq(o,e=>!0!==i.definition[e.idx].ignoreAmbiguities&&e.idx<n&&Xme(e.path,t));return x(r,e=>{var t=[e.idx+1,n+1],r=0===i.idx?"":i.idx;return{message:s.buildAlternationPrefixAmbiguityError({topLevelRule:a,alternation:i,ambiguityIndices:t,prefixPath:e.path}),type:F2e.AMBIGUOUS_PREFIX_ALTS,ruleName:a.name,occurrence:r,alternatives:t}})}))}function mye(e,t,r){let n=[],i=x(t,e=>e.name);return v(e,e=>{var t=e.name;mj(i,t)&&(e=r.buildNamespaceConflictError(e),n.push({message:e,type:F2e.CONFLICT_TOKENS_RULES_NAMESPACE,ruleName:t}))}),n}var yye,vye,xye,bye=b(()=>{KW(),U2e(),x1e(),eye(),Ome(),Jfe(),mt(tye,"validateLookahead"),mt(rye,"validateGrammar"),mt(nye,"validateDuplicateProductions"),mt(iye,"identifyProductionForDuplicates"),mt(aye,"getExtraProductionArgument"),yye=class extends u1e{static{mt(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)}},mt(sye,"validateRuleDoesNotAlreadyExist"),mt(oye,"validateRuleIsOverridden"),mt(lye,"validateNoLeftRecursion"),mt(cye,"getFirstNoneTerminal"),vye=class extends u1e{static{mt(this,"OrCollector")}constructor(){super(...arguments),this.alternations=[]}visitAlternation(e){this.alternations.push(e)}},mt(hye,"validateEmptyOrAlternative"),mt(uye,"validateAmbiguousAlternationAlternatives"),xye=class extends u1e{static{mt(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)}},mt(dye,"validateTooManyAlts"),mt(pye,"validateSomeNonEmptyLookaheadPath"),mt(gye,"checkAlternativesAmbiguities"),mt(fye,"checkPrefixAlternativesAmbiguities"),mt(mye,"checkTerminalAndNoneTerminalsNameSpace")});function wye(e){let t=SU(e,{errMsgProvider:xme}),r={};return v(e.rules,e=>{r[e.name]=e}),Tme(r,t.errMsgProvider)}function kye(e){return rye((e=SU(e,{errMsgProvider:bme})).rules,e.tokenTypes,e.errMsgProvider,e.grammarName)}var Tye=b(()=>{KW(),Cme(),bye(),kme(),mt(wye,"resolveGrammar"),mt(kye,"validateGrammar")});function Eye(e){return mj(Cye,e.name)}var Cye,_ye,Sye,Aye,Lye,Nye,Iye=b(()=>{KW(),Cye=["MismatchedTokenException","NoViableAltException","EarlyExitException","NotAllInputParsedException"],Object.freeze(Cye),mt(Eye,"isRecognitionException"),_ye=class extends Error{static{mt(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)}},Sye=class extends _ye{static{mt(this,"MismatchedTokenException")}constructor(e,t,r){super(e,t),this.previousToken=r,this.name="MismatchedTokenException"}},Aye=class extends _ye{static{mt(this,"NoViableAltException")}constructor(e,t,r){super(e,t),this.previousToken=r,this.name="NoViableAltException"}},Lye=class extends _ye{static{mt(this,"NotAllInputParsedException")}constructor(e,t){super(e,t),this.name="NotAllInputParsedException"}},Nye=class extends _ye{static{mt(this,"EarlyExitException")}constructor(e,t,r){super(e,t),this.previousToken=r,this.name="EarlyExitException"}}});function Rye(e,t,r,n,i,a,s){let o=this.getKeyForAutomaticLookahead(n,i),l=this.firstAfterRepMap[o],c=(void 0===l&&(n=this.getCurrRuleFullName(),n=this.getGAstProductions()[n],l=new a(n,i).startWalking(),this.firstAfterRepMap[o]=l),l.token),h=l.occurrence,u=l.isEndOfRule;1===this.RULE_STACK.length&&u&&void 0===c&&(c=yme,h=1),void 0!==c&&void 0!==h&&this.shouldInRepetitionRecoveryBeTried(c,h,s)&&this.tryInRepetitionRecovery(e,t,r,c)}var Mye,Dye,Oye,Pye,Bye=b(()=>{wme(),KW(),Iye(),L1e(),U2e(),Mye={},Dye="InRuleRecoveryException",Oye=class extends Error{static{mt(this,"InRuleRecoveryException")}constructor(e){super(e),this.name=Dye}},Pye=class{static{mt(this,"Recoverable")}initRecoverable(e){this.firstAfterRepMap={},this.resyncFollows={},this.recoveryEnabled=(nj(e,"recoveryEnabled")?e:B2e).recoveryEnabled,this.recoveryEnabled&&(this.attemptInRepetitionRecovery=Rye)}getTokenToInsert(e){return(e=sme(e,"",NaN,NaN,NaN,NaN,NaN,NaN)).isInsertedInRecovery=!0,e}canTokenTypeBeInsertedInRecovery(e){return!0}canTokenTypeBeDeletedInRecovery(e){return!0}tryInRepetitionRecovery(e,t,r,n){let i=this.findReSyncTokenType(),a=this.exportLexerState(),s=[],o=!1,l=this.LA(1),c=this.LA(1),h=mt(()=>{var e=this.LA(0),e=this.errorMessageProvider.buildMismatchTokenMessage({expected:n,actual:l,previous:e,ruleName:this.getCurrRuleFullName()});(e=new Sye(e,l,this.LA(0))).resyncedTokens=HU(s),this.SAVE_ERROR(e)},"generateErrorMessage");for(;!o;){if(this.tokenMatcher(c,n))return void h();if(r.call(this))return h(),void e.apply(this,t);this.tokenMatcher(c,i)?o=!0:(c=this.SKIP_TOKEN(),this.addToResyncTokens(c,s))}this.importLexerState(a)}shouldInRepetitionRecoveryBeTried(e,t,r){return!(!1===r||this.tokenMatcher(this.LA(1),e)||this.isBackTracking()||this.canPerformInRuleRecovery(e,this.getFollowsForInRuleRecovery(e,t)))}getFollowsForInRuleRecovery(e,t){return e=this.getCurrentGrammarPath(e,t),this.getNextPossibleTokenTypes(e)}tryInRuleRecovery(e,t){if(this.canRecoverWithSingleTokenInsertion(e,t))return this.getTokenToInsert(e);if(this.canRecoverWithSingleTokenDeletion(e))return t=this.SKIP_TOKEN(),this.consumeToken(),t;throw new Oye("sad sad panda")}canPerformInRuleRecovery(e,t){return this.canRecoverWithSingleTokenInsertion(e,t)||this.canRecoverWithSingleTokenDeletion(e)}canRecoverWithSingleTokenInsertion(e,t){if(!this.canTokenTypeBeInsertedInRecovery(e)||Cj(t))return!1;let r=this.LA(1);return void 0!==Tq(t,e=>this.tokenMatcher(r,e))}canRecoverWithSingleTokenDeletion(e){return!!this.canTokenTypeBeDeletedInRecovery(e)&&this.tokenMatcher(this.LA(2),e)}isInCurrentRuleReSyncSet(e){var t=this.getCurrFollowKey(),t=this.getFollowSetFromFollowKey(t);return mj(t,e)}findReSyncTokenType(){let e=this.flattenFollowSet(),t=this.LA(1),r=2;for(;;){var n=Tq(e,e=>ome(t,e));if(void 0!==n)return n;t=this.LA(r),r++}}getCurrFollowKey(){var e,t,r;return 1===this.RULE_STACK.length?Mye:(e=this.getLastExplicitRuleShortName(),t=this.getLastExplicitRuleOccurrenceIndex(),r=this.getPreviousExplicitRuleShortName(),{ruleName:this.shortRuleNameToFullName(e),idxInCallingRule:t,inRule:this.shortRuleNameToFullName(r)})}buildFullFollowKeyStack(){let r=this.RULE_STACK,n=this.RULE_OCCURRENCE_STACK;return x(r,(e,t)=>0===t?Mye:{ruleName:this.shortRuleNameToFullName(e),idxInCallingRule:n[t],inRule:this.shortRuleNameToFullName(r[t-1])})}flattenFollowSet(){var e=x(this.buildFullFollowKeyStack(),e=>this.getFollowSetFromFollowKey(e));return p$(e)}getFollowSetFromFollowKey(e){return e===Mye?[yme]:(e=e.ruleName+e.idxInCallingRule+S1e+e.inRule,this.resyncFollows[e])}addToResyncTokens(e,t){return this.tokenMatcher(e,yme)||t.push(e),t}reSyncTo(e){let t=[],r=this.LA(1);for(;!1===this.tokenMatcher(r,e);)r=this.SKIP_TOKEN(),this.addToResyncTokens(r,t);return HU(t)}attemptInRepetitionRecovery(e,t,r,n,i,a,s){}getCurrentGrammarPath(e,t){return{ruleStack:this.getHumanReadableRuleStack(),occurrenceStack:wz(this.RULE_OCCURRENCE_STACK),lastTok:e,lastTokOccurrence:t}}getHumanReadableRuleStack(){return x(this.RULE_STACK,e=>this.shortRuleNameToFullName(e))}},mt(Rye,"attemptInRepetitionRecovery")});function $ye(e,t,r){return r|t|e}var Fye,zye=b(()=>{mt($ye,"getKeyForAutomaticLookahead")}),Gye=b(()=>{KW(),kme(),U2e(),bye(),eye(),Fye=class{static{mt(this,"LLkLookaheadStrategy")}constructor(e){this.maxLookahead=null!=(e=e?.maxLookahead)?e:B2e.maxLookahead}validate(e){var t,r,n=this.validateNoLeftRecursion(e.rules);return Cj(n)?(t=this.validateEmptyOrAlternatives(e.rules),r=this.validateAmbiguousAlternationAlternatives(e.rules,this.maxLookahead),e=this.validateSomeNonEmptyLookaheadPath(e.rules,this.maxLookahead),[...n,...t,...r,...e]):n}validateNoLeftRecursion(e){return Pq(e,e=>lye(e,e,bme))}validateEmptyOrAlternatives(e){return Pq(e,e=>hye(e,bme))}validateAmbiguousAlternationAlternatives(e,t){return Pq(e,e=>uye(e,t,bme))}validateSomeNonEmptyLookaheadPath(e,t){return pye(e,t,bme)}buildLookaheadForAlternation(e){return $me(e.prodOccurrence,e.rule,e.maxLookahead,e.hasPredicates,e.dynamicTokensEnabled,zme)}buildLookaheadForOptional(e){return Fme(e.prodOccurrence,e.rule,e.maxLookahead,e.dynamicTokensEnabled,Pme(e.prodType),Gme)}}});function Uye(e){return Yye.reset(),e.accept(Yye),e=Yye.dslMethods,Yye.reset(),e}var qye,jye,Yye,Wye=b(()=>{KW(),U2e(),zye(),x1e(),Gye(),qye=class{static{mt(this,"LooksAhead")}initLooksAhead(e){this.dynamicTokensEnabled=(nj(e,"dynamicTokensEnabled")?e:B2e).dynamicTokensEnabled,this.maxLookahead=(nj(e,"maxLookahead")?e:B2e).maxLookahead,this.lookaheadStrategy=nj(e,"lookaheadStrategy")?e.lookaheadStrategy:new Fye({maxLookahead:this.maxLookahead}),this.lookAheadFuncsCache=new Map}preComputeLookaheadFunctions(e){v(e,s=>{this.TRACE_INIT(s.name+" Rule Lookahead",()=>{var{alternation:e,repetition:t,option:r,repetitionMandatory:n,repetitionMandatoryWithSeparator:i,repetitionWithSeparator:a}=Uye(s);v(e,r=>{var e=0===r.idx?"":r.idx;this.TRACE_INIT(""+y1e(r)+e,()=>{var e=this.lookaheadStrategy.buildLookaheadForAlternation({prodOccurrence:r.idx,rule:s,maxLookahead:r.maxLookahead||this.maxLookahead,hasPredicates:r.hasPredicates,dynamicTokensEnabled:this.dynamicTokensEnabled}),t=$ye(this.fullRuleNameToShort[s.name],256,r.idx);this.setLaFuncCache(t,e)})}),v(t,e=>{this.computeLookaheadFunc(s,e.idx,768,"Repetition",e.maxLookahead,y1e(e))}),v(r,e=>{this.computeLookaheadFunc(s,e.idx,512,"Option",e.maxLookahead,y1e(e))}),v(n,e=>{this.computeLookaheadFunc(s,e.idx,1024,"RepetitionMandatory",e.maxLookahead,y1e(e))}),v(i,e=>{this.computeLookaheadFunc(s,e.idx,1536,"RepetitionMandatoryWithSeparator",e.maxLookahead,y1e(e))}),v(a,e=>{this.computeLookaheadFunc(s,e.idx,1280,"RepetitionWithSeparator",e.maxLookahead,y1e(e))})})})}computeLookaheadFunc(r,n,i,a,s,e){this.TRACE_INIT(""+e+(0===n?"":n),()=>{var e=this.lookaheadStrategy.buildLookaheadForOptional({prodOccurrence:n,rule:r,maxLookahead:s||this.maxLookahead,dynamicTokensEnabled:this.dynamicTokensEnabled,prodType:a}),t=$ye(this.fullRuleNameToShort[r.name],i,n);this.setLaFuncCache(t,e)})}getKeyForAutomaticLookahead(e,t){return t|e|this.getLastExplicitRuleShortName()}getLaFuncFromCache(e){return this.lookAheadFuncsCache.get(e)}setLaFuncCache(e,t){this.lookAheadFuncsCache.set(e,t)}},jye=class extends u1e{static{mt(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)}},Yye=new jye,mt(Uye,"collectMethods")});function Hye(e,t){!0===isNaN(e.startOffset)?(e.startOffset=t.startOffset,e.endOffset=t.endOffset):e.endOffset<t.endOffset&&(e.endOffset=t.endOffset)}function Vye(e,t){!0===isNaN(e.startOffset)?(e.startOffset=t.startOffset,e.startColumn=t.startColumn,e.startLine=t.startLine,e.endOffset=t.endOffset,e.endColumn=t.endColumn,e.endLine=t.endLine):e.endOffset<t.endOffset&&(e.endOffset=t.endOffset,e.endColumn=t.endColumn,e.endLine=t.endLine)}function Xye(e,t,r){void 0===e.children[r]?e.children[r]=[t]:e.children[r].push(t)}function Kye(e,t,r){void 0===e.children[t]?e.children[t]=[r]:e.children[t].push(r)}var Zye=b(()=>{mt(Hye,"setNodeLocationOnlyOffset"),mt(Vye,"setNodeLocationFull"),mt(Xye,"addTerminalToCst"),mt(Kye,"addNoneTerminalToCst")});function Qye(e,t){Object.defineProperty(e,Jye,{enumerable:!1,configurable:!0,writable:!1,value:t})}var Jye,e2e=b(()=>{Jye="name",mt(Qye,"defineNameProp")});function t2e(t,r){var n=kB(t),i=n.length;for(let e=0;e<i;e++){var a=t[n[e]],s=a.length;for(let e=0;e<s;e++){var o=a[e];void 0===o.tokenTypeIdx&&this[o.name](o.children,r)}}}function r2e(e,t){var r=mt(function(){},"derivedConstructor"),e=(Qye(r,e+"BaseSemantics"),{visit:mt(function(e,t){if(n8(e)&&(e=e[0]),!Dj(e))return this[e.name](e.children,t)},"visit"),validateVisitor:mt(function(){var e=i2e(this,t);if(!Cj(e))throw e=x(e,e=>e.msg),Error(`Errors Detected in CST Visitor <${this.constructor.name}>: + `+e.join(` + +`).replace(/\n/g,` + `))},"validateVisitor")});return r.prototype=e,(r.prototype.constructor=r)._RULE_NAMES=t,r}function n2e(e,t,r){var n=mt(function(){},"derivedConstructor");Qye(n,e+"BaseSemanticsWithDefaults");let i=Object.create(r.prototype);return v(t,e=>{i[e]=t2e}),n.prototype=i,n.prototype.constructor=n}function i2e(e,t){return a2e(e,t)}function a2e(t,e){return e=gq(e,e=>!1===R6(t[e])),e=x(e,e=>({msg:`Missing visitor method: <${e}> on ${t.constructor.name} CST Visitor.`,type:s2e.MISSING_METHOD,methodName:e})),Sz(e)}var s2e,o2e,l2e,c2e,h2e,u2e,d2e,p2e=b(()=>{var e;KW(),e2e(),mt(t2e,"defaultVisit"),mt(r2e,"createBaseSemanticVisitorConstructor"),mt(n2e,"createBaseVisitorConstructorWithDefaults"),(e=s2e=s2e||{})[e.REDUNDANT_METHOD=0]="REDUNDANT_METHOD",e[e.MISSING_METHOD=1]="MISSING_METHOD",mt(i2e,"validateVisitor"),mt(a2e,"validateMissingCstMethods")}),g2e=b(()=>{Zye(),KW(),p2e(),U2e(),o2e=class{static{mt(this,"TreeBuilder")}initTreeBuilder(e){if(this.CST_STACK=[],this.outputCst=e.outputCst,this.nodeLocationTracking=(nj(e,"nodeLocationTracking")?e:B2e).nodeLocationTracking,this.outputCst)if(/full/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=Vye,this.setNodeLocationFromNode=Vye,this.cstPostRule=HP,this.setInitialNodeLocation=this.setInitialNodeLocationFullRecovery):(this.setNodeLocationFromToken=HP,this.setNodeLocationFromNode=HP,this.cstPostRule=this.cstPostRuleFull,this.setInitialNodeLocation=this.setInitialNodeLocationFullRegular);else if(/onlyOffset/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=Hye,this.setNodeLocationFromNode=Hye,this.cstPostRule=HP,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRecovery):(this.setNodeLocationFromToken=HP,this.setNodeLocationFromNode=HP,this.cstPostRule=this.cstPostRuleOnlyOffset,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRegular);else{if(!/none/i.test(this.nodeLocationTracking))throw Error(`Invalid <nodeLocationTracking> config option: "${e.nodeLocationTracking}"`);this.setNodeLocationFromToken=HP,this.setNodeLocationFromNode=HP,this.cstPostRule=HP,this.setInitialNodeLocation=HP}else this.cstInvocationStateUpdate=HP,this.cstFinallyStateUpdate=HP,this.cstPostTerminal=HP,this.cstPostNonTerminal=HP,this.cstPostRule=HP}setInitialNodeLocationOnlyOffsetRecovery(e){e.location={startOffset:NaN,endOffset:NaN}}setInitialNodeLocationOnlyOffsetRegular(e){e.location={startOffset:this.LA(1).startOffset,endOffset:NaN}}setInitialNodeLocationFullRecovery(e){e.location={startOffset:NaN,startLine:NaN,startColumn:NaN,endOffset:NaN,endLine:NaN,endColumn:NaN}}setInitialNodeLocationFullRegular(e){var t=this.LA(1);e.location={startOffset:t.startOffset,startLine:t.startLine,startColumn:t.startColumn,endOffset:NaN,endLine:NaN,endColumn:NaN}}cstInvocationStateUpdate(e){e={name:e,children:Object.create(null)},this.setInitialNodeLocation(e),this.CST_STACK.push(e)}cstFinallyStateUpdate(){this.CST_STACK.pop()}cstPostRuleFull(e){var t=this.LA(0);(e=e.location).startOffset<=t.startOffset?(e.endOffset=t.endOffset,e.endLine=t.endLine,e.endColumn=t.endColumn):(e.startOffset=NaN,e.startLine=NaN,e.startColumn=NaN)}cstPostRuleOnlyOffset(e){var t=this.LA(0);(e=e.location).startOffset<=t.startOffset?e.endOffset=t.endOffset:e.startOffset=NaN}cstPostTerminal(e,t){var r=this.CST_STACK[this.CST_STACK.length-1];Xye(r,t,e),this.setNodeLocationFromToken(r.location,t)}cstPostNonTerminal(e,t){var r=this.CST_STACK[this.CST_STACK.length-1];Kye(r,t,e),this.setNodeLocationFromNode(r.location,e.location)}getBaseCstVisitorConstructor(){var e;return Dj(this.baseCstVisitorConstructor)?(e=r2e(this.className,kB(this.gastProductionsCache)),this.baseCstVisitorConstructor=e):this.baseCstVisitorConstructor}getBaseCstVisitorConstructorWithDefaults(){var e;return Dj(this.baseCstVisitorWithDefaultsConstructor)?(e=n2e(this.className,kB(this.gastProductionsCache),this.getBaseCstVisitorConstructor()),this.baseCstVisitorWithDefaultsConstructor=e):this.baseCstVisitorWithDefaultsConstructor}getLastExplicitRuleShortName(){var e=this.RULE_STACK;return e[e.length-1]}getPreviousExplicitRuleShortName(){var e=this.RULE_STACK;return e[e.length-2]}getLastExplicitRuleOccurrenceIndex(){var e=this.RULE_OCCURRENCE_STACK;return e[e.length-1]}}}),f2e=b(()=>{U2e(),l2e=class{static{mt(this,"LexerAdapter")}initLexerAdapter(){this.tokVector=[],this.tokVectorLength=0,this.currIdx=-1}set input(e){if(!0!==this.selfAnalysisDone)throw Error("Missing <performSelfAnalysis> invocation at the end of the Parser's constructor.");this.reset(),this.tokVector=e,this.tokVectorLength=e.length}get input(){return this.tokVector}SKIP_TOKEN(){return this.currIdx<=this.tokVector.length-2?(this.consumeToken(),this.LA(1)):P2e}LA(e){return(e=this.currIdx+e)<0||this.tokVectorLength<=e?P2e:this.tokVector[e]}consumeToken(){this.currIdx++}exportLexerState(){return this.currIdx}importLexerState(e){this.currIdx=e}resetLexerState(){this.currIdx=-1}moveToTerminatedState(){this.currIdx=this.tokVector.length-1}getLexerPosition(){return this.exportLexerState()}}}),m2e=b(()=>{KW(),Iye(),U2e(),kme(),bye(),x1e(),c2e=class{static{mt(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=$2e){mj(this.definedRulesNames,e)&&(n={message:bme.buildDuplicateRuleNameError({topLevelRule:e,grammarName:this.className}),type:F2e.DUPLICATE_RULE_NAME,ruleName:e},this.definitionErrors.push(n)),this.definedRulesNames.push(e);var n=this.defineRule(e,t,r);return this[e]=n}OVERRIDE_RULE(e,t,r=$2e){var n=oye(e,this.definedRulesNames,this.className),n=(this.definitionErrors=this.definitionErrors.concat(n),this.defineRule(e,t,r));return this[e]=n}BACKTRACK(t,r){return function(){this.isBackTrackingStack.push(1);var e=this.saveRecogState();try{return t.apply(this,r),!0}catch(e){if(Eye(e))return!1;throw e}finally{this.reloadRecogState(e),this.isBackTrackingStack.pop()}}}getGAstProductions(){return this.gastProductionsCache}getSerializedGastProductions(){return Qge(dj(this.gastProductionsCache))}}}),y2e=b(()=>{KW(),zye(),Iye(),eye(),Ome(),U2e(),Bye(),wme(),Jfe(),h2e=class{static{mt(this,"RecognizerEngine")}initRecognizerEngine(e,t){if(this.className=this.constructor.name,this.shortRuleNameToFull={},this.fullRuleNameToShort={},this.ruleShortNameIdx=256,this.tokenMatcher=Ofe,this.subruleIdx=0,this.definedRulesNames=[],this.tokensMap={},this.isBackTrackingStack=[],this.RULE_STACK=[],this.RULE_OCCURRENCE_STACK=[],this.gastProductionsCache={},nj(t,"serializedGrammar"))throw Error(`The Parser's configuration can no longer contain a <serializedGrammar> property. + See: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_6-0-0 + For Further details.`);if(n8(e)){if(Cj(e))throw Error(`A Token Vocabulary cannot be empty. + Note that the first argument for the parser constructor + is no longer a Token vector (since v4.0).`);if("number"==typeof e[0].startOffset)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(n8(e))this.tokensMap=lW(e,(e,t)=>(e[t.name]=t,e),{});else if(nj(e,"modes")&&lq(p$(dj(e.modes)),Wfe))t=p$(dj(e.modes)),t=OW(t),this.tokensMap=lW(t,(e,t)=>(e[t.name]=t,e),{});else{if(!L6(e))throw new Error("<tokensDictionary> argument must be An Array of Token constructors, A dictionary of Token constructors or an IMultiModeLexerDefinition");this.tokensMap=wz(e)}this.tokensMap.EOF=yme,t=nj(e,"modes")?p$(dj(e.modes)):dj(e),e=lq(t,e=>Cj(e.categoryMatches)),this.tokenMatcher=e?Ofe:Dfe,Pfe(dj(this.tokensMap))}defineRule(r,n,e){if(this.selfAnalysisDone)throw Error(`Grammar rule <${r}> 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=(nj(e,"resyncEnabled")?e:$2e).resyncEnabled,a=(nj(e,"recoveryValueFunc")?e:$2e).recoveryValueFunc,s=this.ruleShortNameIdx<<12;return this.ruleShortNameIdx++,this.shortRuleNameToFull[s]=r,this.fullRuleNameToShort[r]=s,e=!0===this.outputCst?mt(function(...e){try{this.ruleInvocationStateUpdate(s,r,this.subruleIdx),n.apply(this,e);var t=this.CST_STACK[this.CST_STACK.length-1];return this.cstPostRule(t),t}catch(e){return this.invokeRuleCatch(e,i,a)}finally{this.ruleFinallyStateUpdate()}},"invokeRuleWithTry"):mt(function(...e){try{return this.ruleInvocationStateUpdate(s,r,this.subruleIdx),n.apply(this,e)}catch(e){return this.invokeRuleCatch(e,i,a)}finally{this.ruleFinallyStateUpdate()}},"invokeRuleWithTryCst"),Object.assign(e,{ruleName:r,originalGrammarAction:n})}invokeRuleCatch(e,t,r){var n=1===this.RULE_STACK.length,t=t&&!this.isBackTracking()&&this.recoveryEnabled;if(Eye(e)){var i=e;if(t){if(t=this.findReSyncTokenType(),this.isInCurrentRuleReSyncSet(t))return i.resyncedTokens=this.reSyncTo(t),this.outputCst?((t=this.CST_STACK[this.CST_STACK.length-1]).recoveredNode=!0,t):r(e);this.outputCst&&((t=this.CST_STACK[this.CST_STACK.length-1]).recoveredNode=!0,i.partialCstResult=t)}else if(n)return this.moveToTerminatedState(),r(e);throw i}throw e}optionInternal(e,t){var r=this.getKeyForAutomaticLookahead(512,t);return this.optionInternalLogic(e,t,r)}optionInternalLogic(e,t,r){let n=this.getLaFuncFromCache(r),i;if("function"!=typeof e){i=e.DEF;let t=e.GATE;if(void 0!==t){let e=n;n=mt(()=>t.call(this)&&e.call(this),"lookAheadFunc")}}else i=e;if(!0===n.call(this))return i.call(this)}atLeastOneInternal(e,t){var r=this.getKeyForAutomaticLookahead(1024,e);return this.atLeastOneInternalLogic(e,t,r)}atLeastOneInternalLogic(e,r,t){let n=this.getLaFuncFromCache(t),i;if("function"!=typeof r){i=r.DEF;let t=r.GATE;if(void 0!==t){let e=n;n=mt(()=>t.call(this)&&e.call(this),"lookAheadFunc")}}else i=r;if(!0!==n.call(this))throw this.raiseEarlyExitException(e,Zme.REPETITION_MANDATORY,r.ERR_MSG);{let e=this.doSingleRepetition(i);for(;!0===n.call(this)&&!0===e;)e=this.doSingleRepetition(i)}this.attemptInRepetitionRecovery(this.atLeastOneInternal,[e,r],n,1024,e,Mme)}atLeastOneSepFirstInternal(e,t){var r=this.getKeyForAutomaticLookahead(1536,e);this.atLeastOneSepFirstInternalLogic(e,t,r)}atLeastOneSepFirstInternalLogic(e,t,r){let n=t.DEF,i=t.SEP;if(!0!==this.getLaFuncFromCache(r).call(this))throw this.raiseEarlyExitException(e,Zme.REPETITION_MANDATORY_WITH_SEPARATOR,t.ERR_MSG);for(n.call(this),r=mt(()=>this.tokenMatcher(this.LA(1),i),"separatorLookAheadFunc");!0===this.tokenMatcher(this.LA(1),i);)this.CONSUME(i),n.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,i,r,n,Dme],r,1536,e,Dme)}manyInternal(e,t){var r=this.getKeyForAutomaticLookahead(768,e);return this.manyInternalLogic(e,t,r)}manyInternalLogic(e,r,t){let n=this.getLaFuncFromCache(t),i;if("function"!=typeof r){i=r.DEF;let t=r.GATE;if(void 0!==t){let e=n;n=mt(()=>t.call(this)&&e.call(this),"lookaheadFunction")}}else i=r;let a=!0;for(;!0===n.call(this)&&!0===a;)a=this.doSingleRepetition(i);this.attemptInRepetitionRecovery(this.manyInternal,[e,r],n,768,e,Ime,a)}manySepFirstInternal(e,t){var r=this.getKeyForAutomaticLookahead(1280,e);this.manySepFirstInternalLogic(e,t,r)}manySepFirstInternalLogic(e,t,r){let n=t.DEF,i=t.SEP;if(!0===this.getLaFuncFromCache(r).call(this)){for(n.call(this),t=mt(()=>this.tokenMatcher(this.LA(1),i),"separatorLookAheadFunc");!0===this.tokenMatcher(this.LA(1),i);)this.CONSUME(i),n.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,i,t,n,Rme],t,1280,e,Rme)}}repetitionSepSecondInternal(e,t,r,n,i){for(;r();)this.CONSUME(t),n.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,t,r,n,i],r,1536,e,i)}doSingleRepetition(e){var t=this.getLexerPosition();return e.call(this),this.getLexerPosition()>t}orInternal(e,t){var r=this.getKeyForAutomaticLookahead(256,t),n=n8(e)?e:e.DEF;if(void 0!==(r=this.getLaFuncFromCache(r).call(this,n)))return n[r].ALT.call(this);this.raiseNoAltException(t,e.ERR_MSG)}ruleFinallyStateUpdate(){var e,t;this.RULE_STACK.pop(),this.RULE_OCCURRENCE_STACK.pop(),this.cstFinallyStateUpdate(),0===this.RULE_STACK.length&&!1===this.isAtEndOfInput()&&(e=this.LA(1),t=this.errorMessageProvider.buildNotAllInputParsedMessage({firstRedundant:e,ruleName:this.getCurrRuleFullName()}),this.SAVE_ERROR(new Lye(t,e)))}subruleInternal(e,t,r){var n;try{var i=void 0!==r?r.ARGS:void 0;return this.subruleIdx=t,n=e.apply(this,i),this.cstPostNonTerminal(n,void 0!==r&&void 0!==r.LABEL?r.LABEL:e.ruleName),n}catch(t){throw this.subruleInternalError(t,r,e.ruleName)}}subruleInternalError(e,t,r){throw Eye(e)&&void 0!==e.partialCstResult&&(this.cstPostNonTerminal(e.partialCstResult,void 0!==t&&void 0!==t.LABEL?t.LABEL:r),delete e.partialCstResult),e}consumeInternal(e,t,r){let n;try{var i=this.LA(1);!0===this.tokenMatcher(i,e)?(this.consumeToken(),n=i):this.consumeInternalError(e,i,r)}catch(r){n=this.consumeInternalRecovery(e,t,r)}return this.cstPostTerminal(void 0!==r&&void 0!==r.LABEL?r.LABEL:e.name,n),n}consumeInternalError(e,t,r){var n=this.LA(0),r=void 0!==r&&r.ERR_MSG?r.ERR_MSG:this.errorMessageProvider.buildMismatchTokenMessage({expected:e,actual:t,previous:n,ruleName:this.getCurrRuleFullName()});throw this.SAVE_ERROR(new Sye(r,t,n))}consumeInternalRecovery(e,t,r){if(!this.recoveryEnabled||"MismatchedTokenException"!==r.name||this.isBackTracking())throw r;t=this.getFollowsForInRuleRecovery(e,t);try{return this.tryInRuleRecovery(e,t)}catch(e){throw e.name===Dye?r:e}}saveRecogState(){var e=this.errors,t=wz(this.RULE_STACK);return{errors:e,lexerState:this.exportLexerState(),RULE_STACK:t,CST_STACK:this.CST_STACK}}reloadRecogState(e){this.errors=e.errors,this.importLexerState(e.lexerState),this.RULE_STACK=e.RULE_STACK}ruleInvocationStateUpdate(e,t,r){this.RULE_OCCURRENCE_STACK.push(r),this.RULE_STACK.push(e),this.cstInvocationStateUpdate(t)}isBackTracking(){return 0!==this.isBackTrackingStack.length}getCurrRuleFullName(){var e=this.getLastExplicitRuleShortName();return this.shortRuleNameToFull[e]}shortRuleNameToFullName(e){return this.shortRuleNameToFull[e]}isAtEndOfInput(){return this.tokenMatcher(this.LA(1),yme)}reset(){this.resetLexerState(),this.subruleIdx=0,this.isBackTrackingStack=[],this.errors=[],this.RULE_STACK=[],this.CST_STACK=[],this.RULE_OCCURRENCE_STACK=[]}}}),v2e=b(()=>{Iye(),KW(),eye(),U2e(),u2e=class{static{mt(this,"ErrorHandler")}initErrorHandler(e){this._errors=[],this.errorMessageProvider=(nj(e,"errorMessageProvider")?e:B2e).errorMessageProvider}SAVE_ERROR(e){if(Eye(e))return e.context={ruleStack:this.getHumanReadableRuleStack(),ruleOccurrenceStack:wz(this.RULE_OCCURRENCE_STACK)},this._errors.push(e),e;throw Error("Trying to save an Error which is not a RecognitionException")}get errors(){return wz(this._errors)}set errors(e){this._errors=e}raiseEarlyExitException(e,t,r){var n=this.getCurrRuleFullName(),e=Hme(e,this.getGAstProductions()[n],t,this.maxLookahead)[0],i=[];for(let e=1;e<=this.maxLookahead;e++)i.push(this.LA(e));throw t=this.errorMessageProvider.buildEarlyExitMessage({expectedIterationPaths:e,actual:i,previous:this.LA(0),customUserDescription:r,ruleName:n}),this.SAVE_ERROR(new Nye(t,this.LA(1),this.LA(0)))}raiseNoAltException(e,t){var r=this.getCurrRuleFullName(),e=Wme(e,this.getGAstProductions()[r],this.maxLookahead),n=[];for(let e=1;e<=this.maxLookahead;e++)n.push(this.LA(e));throw r=this.LA(0),e=this.errorMessageProvider.buildNoViableAltMessage({expectedPathsPerAlt:e,actual:n,previous:r,customUserDescription:t,ruleName:this.getCurrRuleFullName()}),this.SAVE_ERROR(new Aye(e,this.LA(1),r))}}}),x2e=b(()=>{Ome(),KW(),d2e=class{static{mt(this,"ContentAssist")}initContentAssist(){}computeContentAssist(e,t){var r=this.gastProductionsCache[e];if(Dj(r))throw Error(`Rule ->${e}<- does not exist in this grammar.`);return Sme([r],t,this.tokenMatcher,this.maxLookahead)}getNextPossibleTokenTypes(e){var t=Sq(e.ruleStack),t=this.getGAstProductions()[t];return new Lme(t,e).startWalking()}}});function b2e(e,t,r,n=!1){T2e(r);var i=GU(this.recordingProdStack),a=R6(t)?t:t.DEF,e=new e({definition:[],idx:r});return n&&(e.separator=t.SEP),nj(t,"MAX_LOOKAHEAD")&&(e.maxLookahead=t.MAX_LOOKAHEAD),this.recordingProdStack.push(e),a.call(this),i.definition.push(e),this.recordingProdStack.pop(),E2e}function w2e(e,t){T2e(t);let r=GU(this.recordingProdStack),n=!1===n8(e),i=0==n?e:e.DEF,a=new c1e({definition:[],idx:t,ignoreAmbiguities:n&&!0===e.IGNORE_AMBIGUITIES});return nj(e,"MAX_LOOKAHEAD")&&(a.maxLookahead=e.MAX_LOOKAHEAD),t=bW(i,e=>R6(e.GATE)),a.hasPredicates=t,r.definition.push(a),v(i,e=>{var t=new n1e({definition:[]});a.definition.push(t),nj(e,"IGNORE_AMBIGUITIES")?t.ignoreAmbiguities=e.IGNORE_AMBIGUITIES:nj(e,"GATE")&&(t.ignoreAmbiguities=!0),this.recordingProdStack.push(t),e.ALT.call(this),this.recordingProdStack.pop()}),E2e}function k2e(e){return 0===e?"":""+e}function T2e(e){if(e<0||C2e<e)throw(e=new Error(`Invalid DSL Method idx value: <${e}> + Idx value must be a none negative value smaller than `+(C2e+1))).KNOWN_RECORDER_ERROR=!0,e}var E2e,C2e,_2e,S2e,A2e,L2e,N2e,I2e=b(()=>{KW(),x1e(),tme(),Jfe(),wme(),U2e(),zye(),E2e={description:"This Object indicates the Parser is during Recording Phase"},Object.freeze(E2e),C2e=Math.pow(2,8)-1,Pfe([_2e=ime({name:"RECORDING_PHASE_TOKEN",pattern:Qfe.NA})]),S2e=sme(_2e,`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(S2e),A2e={name:`This CSTNode indicates the Parser is in Recording Phase + See: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details`,children:{}},L2e=class{static{mt(this,"GastRecorder")}initGastRecorder(e){this.recordingProdStack=[],this.RECORDING_PHASE=!1}enableRecording(){this.RECORDING_PHASE=!0,this.TRACE_INIT("Enable Recording",()=>{for(let r=0;r<10;r++){var e=0<r?r:"";this["CONSUME"+e]=function(e,t){return this.consumeInternalRecord(e,r,t)},this["SUBRULE"+e]=function(e,t){return this.subruleInternalRecord(e,r,t)},this["OPTION"+e]=function(e){return this.optionInternalRecord(e,r)},this["OR"+e]=function(e){return this.orInternalRecord(e,r)},this["MANY"+e]=function(e){this.manyInternalRecord(r,e)},this["MANY_SEP"+e]=function(e){this.manySepFirstInternalRecord(r,e)},this["AT_LEAST_ONE"+e]=function(e){this.atLeastOneInternalRecord(r,e)},this["AT_LEAST_ONE_SEP"+e]=function(e){this.atLeastOneSepFirstInternalRecord(r,e)}}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",()=>{var t=this;for(let e=0;e<10;e++){var r=0<e?e:"";delete t["CONSUME"+r],delete t["SUBRULE"+r],delete t["OPTION"+r],delete t["OR"+r],delete t["MANY"+r],delete t["MANY_SEP"+r],delete t["AT_LEAST_ONE"+r],delete t["AT_LEAST_ONE_SEP"+r]}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(e){}BACKTRACK_RECORD(e,t){return()=>!0}LA_RECORD(e){return P2e}topLevelRuleRecord(e,t){try{var r=new r1e({definition:[],name:e});return r.name=e,this.recordingProdStack.push(r),t.call(this),this.recordingProdStack.pop(),r}catch(e){if(!0!==e.KNOWN_RECORDER_ERROR)try{e.message=e.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 e}}optionInternalRecord(e,t){return b2e.call(this,i1e,e,t)}atLeastOneInternalRecord(e,t){b2e.call(this,a1e,t,e)}atLeastOneSepFirstInternalRecord(e,t){b2e.call(this,s1e,t,e,!0)}manyInternalRecord(e,t){b2e.call(this,o1e,t,e)}manySepFirstInternalRecord(e,t){b2e.call(this,l1e,t,e,!0)}orInternalRecord(e,t){return w2e.call(this,e,t)}subruleInternalRecord(e,t,r){var n,i;if(T2e(t),e&&!1!==nj(e,"ruleName"))return n=GU(this.recordingProdStack),i=e.ruleName,i=new t1e({idx:t,nonTerminalName:i,label:r?.LABEL,referencedRule:void 0}),n.definition.push(i),this.outputCst?A2e:E2e;throw(r=new Error(`<SUBRULE${k2e(t)}> argument is invalid expecting a Parser method reference but got: <${JSON.stringify(e)}> + inside top level rule: <${this.recordingProdStack[0].name}>`)).KNOWN_RECORDER_ERROR=!0,r}consumeInternalRecord(e,t,r){var n;if(T2e(t),Ufe(e))return n=GU(this.recordingProdStack),r=new h1e({idx:t,terminalType:e,label:r?.LABEL}),n.definition.push(r),S2e;throw(n=new Error(`<CONSUME${k2e(t)}> argument is invalid expecting a TokenType reference but got: <${JSON.stringify(e)}> + inside top level rule: <${this.recordingProdStack[0].name}>`)).KNOWN_RECORDER_ERROR=!0,n}},mt(b2e,"recordProd"),mt(w2e,"recordOrProd"),mt(k2e,"getIdxSuffix"),mt(T2e,"assertMethodIdxIsValid")}),R2e=b(()=>{KW(),Xge(),U2e(),N2e=class{static{mt(this,"PerformanceTracer")}initPerformanceTracer(e){var t;nj(e,"traceInitPerf")?(e=e.traceInitPerf,this.traceInitMaxIdent=(t="number"==typeof e)?e:1/0,this.traceInitPerf=t?0<e:e):(this.traceInitMaxIdent=0,this.traceInitPerf=B2e.traceInitPerf),this.traceInitIndent=-1}TRACE_INIT(e,t){var r,n,i,a;return!0===this.traceInitPerf?(this.traceInitIndent++,r=new Array(this.traceInitIndent+1).join("\t"),{time:n,value:i}=(this.traceInitIndent<this.traceInitMaxIdent&&console.log(r+`--> <${e}>`),Yge(t)),a=10<n?console.warn:console.log,this.traceInitIndent<this.traceInitMaxIdent&&a(r+`<-- <${e}> time: ${n}ms`),this.traceInitIndent--,i):t()}}});function M2e(i,e){e.forEach(r=>{let n=r.prototype;Object.getOwnPropertyNames(n).forEach(e=>{var t;"constructor"!==e&&((t=Object.getOwnPropertyDescriptor(n,e))&&(t.get||t.set)?Object.defineProperty(i.prototype,e,t):i.prototype[e]=r.prototype[e])})})}var D2e=b(()=>{mt(M2e,"applyMixins")});function O2e(e=void 0){return function(){return e}}var P2e,B2e,$2e,F2e,z2e,G2e,U2e=b(()=>{var e;KW(),Xge(),M1e(),wme(),kme(),Tye(),Bye(),Wye(),g2e(),f2e(),m2e(),y2e(),v2e(),x2e(),I2e(),R2e(),D2e(),bye(),P2e=sme(yme,"",NaN,NaN,NaN,NaN,NaN,NaN),Object.freeze(P2e),B2e=Object.freeze({recoveryEnabled:!1,maxLookahead:3,dynamicTokensEnabled:!1,outputCst:!0,errorMessageProvider:vme,nodeLocationTracking:"none",traceInitPerf:!1,skipValidations:!1}),$2e=Object.freeze({recoveryValueFunc:mt(()=>{},"recoveryValueFunc"),resyncEnabled:!0}),(e=F2e=F2e||{})[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",mt(O2e,"EMPTY_ALT"),(z2e=class t{static{mt(this,"Parser")}static performSelfAnalysis(e){throw Error("The **static** `performSelfAnalysis` method has been deprecated.\t\nUse the **instance** method with the same name instead.")}performSelfAnalysis(){this.TRACE_INIT("performSelfAnalysis",()=>{var e;this.selfAnalysisDone=!0;let r=this.className,n=(this.TRACE_INIT("toFastProps",()=>{Hge(this)}),this.TRACE_INIT("Grammar Recording",()=>{try{this.enableRecording(),v(this.definedRulesNames,e=>{let t=this[e].originalGrammarAction,r;this.TRACE_INIT(e+" Rule",()=>{r=this.topLevelRuleRecord(e,t)}),this.gastProductionsCache[e]=r})}finally{this.disableRecording()}}),[]);if(this.TRACE_INIT("Grammar Resolving",()=>{n=wye({rules:dj(this.gastProductionsCache)}),this.definitionErrors=this.definitionErrors.concat(n)}),this.TRACE_INIT("Grammar Validations",()=>{var e,t;Cj(n)&&!1===this.skipValidations&&(e=kye({rules:dj(this.gastProductionsCache),tokenTypes:dj(this.tokensMap),errMsgProvider:bme,grammarName:r}),t=tye({lookaheadStrategy:this.lookaheadStrategy,rules:dj(this.gastProductionsCache),tokenTypes:dj(this.tokensMap),grammarName:r}),this.definitionErrors=this.definitionErrors.concat(e,t))}),Cj(this.definitionErrors)&&(this.recoveryEnabled&&this.TRACE_INIT("computeAllProdsFollows",()=>{var e=N1e(dj(this.gastProductionsCache));this.resyncFollows=e}),this.TRACE_INIT("ComputeLookaheadFunctions",()=>{var e,t;null!=(t=(e=this.lookaheadStrategy).initialize)&&t.call(e,{rules:dj(this.gastProductionsCache)}),this.preComputeLookaheadFunctions(dj(this.gastProductionsCache))})),!t.DEFER_DEFINITION_ERRORS_HANDLING&&!Cj(this.definitionErrors))throw e=x(this.definitionErrors,e=>e.message),new Error(`Parser Definition Errors detected: + `+e.join(` +------------------------------- +`))})}constructor(e,t){if(this.definitionErrors=[],this.selfAnalysisDone=!1,this.initErrorHandler(t),this.initLexerAdapter(),this.initLooksAhead(t),this.initRecognizerEngine(e,t),this.initRecoverable(t),this.initTreeBuilder(t),this.initContentAssist(),this.initGastRecorder(t),this.initPerformanceTracer(t),nj(t,"ignoredIssues"))throw new Error(`The <ignoredIssues> IParserConfig property has been deprecated. + Please use the <IGNORE_AMBIGUITIES> flag on the relevant DSL method instead. + See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#IGNORING_AMBIGUITIES + For further details.`);this.skipValidations=(nj(t,"skipValidations")?t:B2e).skipValidations}}).DEFER_DEFINITION_ERRORS_HANDLING=!1,M2e(z2e,[Pye,qye,o2e,l2e,h2e,c2e,u2e,d2e,L2e,N2e]),G2e=class extends z2e{static{mt(this,"EmbeddedActionsParser")}constructor(e,t=B2e){(t=wz(t)).outputCst=!1,super(e,t)}}}),q2e=b(()=>{x1e()}),j2e=b(()=>{}),Y2e=b(()=>{q2e(),j2e()}),W2e=b(()=>{Gge()}),H2e=b(()=>{Gge(),U2e(),tme(),wme(),eye(),Gye(),kme(),Iye(),eme(),x1e(),x1e(),Y2e(),W2e()});function V2e(e,t,r){return e.name+`_${t}_`+r}function X2e(t){var r={decisionMap:{},decisionStates:[],ruleToStartState:new Map,ruleToStopState:new Map,states:[]},n=(K2e(r,t),t.length);for(let e=0;e<n;e++){var i=t[e],a=ive(r,i,i);void 0!==a&&gve(r,i,a)}return r}function K2e(t,r){var n=r.length;for(let e=0;e<n;e++){var i=r[e],a=mve(t,i,void 0,{type:bve}),s=mve(t,i,void 0,{type:Tve});a.stop=s,t.ruleToStartState.set(i,a),t.ruleToStopState.set(i,s)}}function Z2e(e,t,r){return r instanceof h1e?dve(e,t,r.terminalType,r):(r instanceof t1e?pve:r instanceof c1e?rve:r instanceof i1e?nve:r instanceof o1e?Q2e:r instanceof l1e?J2e:r instanceof a1e?eve:r instanceof s1e?tve:ive)(e,t,r)}function Q2e(e,t,r){var n=mve(e,t,r,{type:kve});return lve(e,n),sve(e,t,r,cve(e,t,n,r,ive(e,t,r)))}function J2e(e,t,r){var n=mve(e,t,r,{type:kve});return lve(e,n),sve(e,t,r,cve(e,t,n,r,ive(e,t,r)),dve(e,t,r.separator,r))}function eve(e,t,r){var n=mve(e,t,r,{type:wve});return lve(e,n),ave(e,t,r,cve(e,t,n,r,ive(e,t,r)))}function tve(e,t,r){var n=mve(e,t,r,{type:wve});return lve(e,n),ave(e,t,r,cve(e,t,n,r,ive(e,t,r)),dve(e,t,r.separator,r))}function rve(t,r,e){var n=mve(t,r,e,{type:xve}),i=(lve(t,n),x(e.definition,e=>Z2e(t,r,e)));return cve(t,r,n,e,...i)}function nve(e,t,r){var n=mve(e,t,r,{type:xve});return lve(e,n),ove(e,t,r,cve(e,t,n,r,ive(e,t,r)))}function ive(t,r,e){return 1===(e=gq(x(e.definition,e=>Z2e(t,r,e)),e=>void 0!==e)).length?e[0]:0===e.length?void 0:uve(t,e)}function ave(e,t,r,n,i){var a=n.left,n=n.right,s=mve(e,t,r,{type:Sve}),o=(lve(e,s),mve(e,t,r,{type:Ave}));return a.loopback=s,o.loopback=s,fve(n,e.decisionMap[V2e(t,i?"RepetitionMandatoryWithSeparator":"RepetitionMandatory",r.idx)]=s),void 0===i?(fve(s,a),fve(s,o)):(fve(s,o),fve(s,i.left),fve(i.right,a)),{left:a,right:o}}function sve(e,t,r,n,i){var a=n.left,n=n.right,s=mve(e,t,r,{type:_ve}),o=(lve(e,s),mve(e,t,r,{type:Ave})),l=mve(e,t,r,{type:Cve});return s.loopback=l,o.loopback=l,fve(s,a),fve(s,o),fve(n,l),void 0!==i?(fve(l,o),fve(l,i.left),fve(i.right,a)):fve(l,s),{left:e.decisionMap[V2e(t,i?"RepetitionWithSeparator":"Repetition",r.idx)]=s,right:o}}function ove(e,t,r,n){var i=n.left;return fve(i,n.right),e.decisionMap[V2e(t,"Option",r.idx)]=i,n}function lve(e,t){return e.decisionStates.push(t),t.decision=e.decisionStates.length-1,t.decision}function cve(e,t,r,n,...i){var a,s=mve(e,t,n,{type:Eve,start:r});r.end=s;for(a of i)void 0!==a?(fve(r,a.left),fve(a.right,s)):fve(r,s);return i={left:r,right:s},e.decisionMap[V2e(t,hve(n),n.idx)]=r,i}function hve(e){if(e instanceof c1e)return"Alternation";if(e instanceof i1e)return"Option";if(e instanceof o1e)return"Repetition";if(e instanceof l1e)return"RepetitionWithSeparator";if(e instanceof a1e)return"RepetitionMandatory";if(e instanceof s1e)return"RepetitionMandatoryWithSeparator";throw new Error("Invalid production type encountered")}function uve(t,r){var n=r.length;for(let e=0;e<n-1;e++){var i,a=r[e],s=(i=1===a.left.transitions.length?a.left.transitions[0]:void 0)instanceof Rve,o=i,l=r[e+1].left;a.left.type===xve&&a.right.type===xve&&void 0!==i&&(s&&o.followState===a.right||i.target===a.right)?(s?o.followState=l:i.target=l,vve(t,a.right)):fve(a.right,l)}return{left:r[0].left,right:r[n-1].right}}function dve(e,t,r,n){var i=mve(e,t,n,{type:xve}),e=mve(e,t,n,{type:xve});return yve(i,new Nve(e,r)),{left:i,right:e}}function pve(e,t,r){var n=r.referencedRule,i=e.ruleToStartState.get(n),a=mve(e,t,r,{type:xve}),e=mve(e,t,r,{type:xve});return yve(a,new Rve(i,n,e)),{left:a,right:e}}function gve(e,t,r){var n=e.ruleToStartState.get(t),e=(fve(n,r.left),e.ruleToStopState.get(t));return fve(r.right,e),{left:n,right:e}}function fve(e,t){yve(e,new Ive(t))}function mve(e,t,r,n){return r=Object.assign({atn:e,production:r,epsilonOnlyTransitions:!1,rule:t,transitions:[],nextTokenWithinRule:[],stateNumber:e.states.length},n),e.states.push(r),r}function yve(e,t){0===e.transitions.length&&(e.epsilonOnlyTransitions=t.isEpsilon()),e.transitions.push(t)}function vve(e,t){e.states.splice(e.states.indexOf(t),1)}var xve,bve,wve,kve,Tve,Eve,Cve,_ve,Sve,Ave,Lve,Nve,Ive,Rve,Mve=b(()=>{Dq(),fq(),H2e(),mt(V2e,"buildATNKey"),xve=1,bve=2,wve=4,kve=5,Tve=7,Eve=8,Cve=9,_ve=10,Sve=11,Ave=12,Lve=class{static{mt(this,"AbstractTransition")}constructor(e){this.target=e}isEpsilon(){return!1}},Nve=class extends Lve{static{mt(this,"AtomTransition")}constructor(e,t){super(e),this.tokenType=t}},Ive=class extends Lve{static{mt(this,"EpsilonTransition")}constructor(e){super(e)}isEpsilon(){return!0}},Rve=class extends Lve{static{mt(this,"RuleTransition")}constructor(e,t,r){super(e),this.rule=t,this.followState=r}isEpsilon(){return!0}},mt(X2e,"createATN"),mt(K2e,"createRuleStartAndStopATNStates"),mt(Z2e,"atom"),mt(Q2e,"repetition"),mt(J2e,"repetitionSep"),mt(eve,"repetitionMandatory"),mt(tve,"repetitionMandatorySep"),mt(rve,"alternation"),mt(nve,"option"),mt(ive,"block"),mt(ave,"plus"),mt(sve,"star"),mt(ove,"optional"),mt(lve,"defineDecisionState"),mt(cve,"makeAlts"),mt(hve,"getProdType"),mt(uve,"makeBlock"),mt(dve,"tokenRef"),mt(pve,"ruleRef"),mt(gve,"buildRuleHandle"),mt(fve,"epsilon"),mt(mve,"newState"),mt(yve,"addTransition"),mt(vve,"removeState")});function Dve(e,t=!0){return`${t?"a"+e.alt:""}s${e.state.stateNumber}:`+e.stack.map(e=>e.stateNumber.toString()).join("_")}var Ove,Pve,Bve=b(()=>{Dq(),Ove={},Pve=class{static{mt(this,"ATNConfigSet")}constructor(){this.map={},this.configs=[]}get size(){return this.configs.length}finalize(){this.map={}}add(e){var t=Dve(e);t in this.map||(this.map[t]=this.configs.length,this.configs.push(e))}get elements(){return this.configs}get alts(){return x(this.configs,e=>e.alt)}get key(){let e="";for(var t in this.map)e+=t+":";return e}},mt(Dve,"getATNConfigKey")});function $ve(n,i){let a={};return e=>{let t=e.toString(),r=a[t];return void 0===r&&(r={atnStartState:n,decision:i,states:{}},a[t]=r),r}}function Fve(e,t=!0){var r,n=new Set;for(r of e){var i,a,s=new Set;for(i of r){if(void 0===i){if(t)break;return!1}for(a of[i.tokenTypeIdx].concat(i.categoryMatches))if(n.has(a)){if(!s.has(a))return!1}else n.add(a),s.add(a)}}return!0}function zve(t){var r=t.decisionStates.length,n=Array(r);for(let e=0;e<r;e++)n[e]=$ve(t.decisionStates[e],e);return n}function Gve(e,t,r,n){let i=e[t](r),a=i.start;return void 0===a&&(e=txe(i.atnStartState),a=exe(i,Qve(e)),i.start=a),Uve.apply(this,[i,a,r,n])}function Uve(e,t,r,n){let i=t,a=1,s=[],o=this.LA(a++);for(;;){var l=Vve(i,o);if((l=void 0===l?qve.apply(this,[e,i,o,a,r,n]):l)===Ove)return Hve(s,i,o);if(!0===l.isAcceptState)return l.prediction;i=l,s.push(o),o=this.LA(a++)}}function qve(e,t,r,n,i,a){var s=Xve(t.configs,r,i);if(0===s.size)return Jve(e,t,r,Ove),Ove;let o=Qve(s),l=Zve(s,i);return void 0!==l?(o.isAcceptState=!0,o.prediction=l,o.configs.uniqueAlt=l):sxe(s)&&(i=Xj(s.alts),o.isAcceptState=!0,o.prediction=i,o.configs.uniqueAlt=i,jve.apply(this,[e,n,s.alts,a])),o=Jve(e,t,r,o)}function jve(e,t,r,n){var i=[];for(let e=1;e<=t;e++)i.push(this.LA(e).tokenType);n(Yve({topLevelRule:(e=e.atnStartState).rule,ambiguityIndices:r,production:e.production,prefixPath:i}))}function Yve(e){var t=x(e.prefixPath,e=>rme(e)).join(", "),r=0===e.production.idx?"":e.production.idx;return`Ambiguous Alternatives Detected: <${e.ambiguityIndices.join(", ")}> in <${Wve(e.production)}${r}> 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#AMBIGUOUS_ALTERNATIVES +For Further details.`}function Wve(e){if(e instanceof t1e)return"SUBRULE";if(e instanceof i1e)return"OPTION";if(e instanceof c1e)return"OR";if(e instanceof a1e)return"AT_LEAST_ONE";if(e instanceof s1e)return"AT_LEAST_ONE_SEP";if(e instanceof l1e)return"MANY_SEP";if(e instanceof o1e)return"MANY";if(e instanceof h1e)return"CONSUME";throw Error("non exhaustive match")}function Hve(e,t,r){return t=Pq(t.configs.elements,e=>e.state.transitions),{actualToken:r,possibleTokenTypes:$W(t.filter(e=>e instanceof Nve).map(e=>e.tokenType),e=>e.tokenTypeIdx),tokenPath:e}}function Vve(e,t){return e.edges[t.tokenTypeIdx]}function Xve(e,t,r){var n,i=new Pve,a=[];for(n of e.elements)if(!1!==r.is(n.alt))if(n.state.type===Tve)a.push(n);else{var s=n.state.transitions.length;for(let e=0;e<s;e++){var o=Kve(n.state.transitions[e],t);void 0!==o&&i.add({state:o,alt:n.alt,stack:n.stack})}}let l;if(void 0===(l=0===a.length&&1===i.size?i:l)){l=new Pve;for(var c of i.elements)rxe(c,l)}if(0<a.length&&!ixe(l))for(var h of a)l.add(h);return l}function Kve(e,t){if(e instanceof Nve&&ome(t,e.tokenType))return e.target}function Zve(e,t){let r;for(var n of e.elements)if(!0===t.is(n.alt))if(void 0===r)r=n.alt;else if(r!==n.alt)return;return r}function Qve(e){return{configs:e,edges:{},isAcceptState:!1,prediction:-1}}function Jve(e,t,r,n){return n=exe(e,n),t.edges[r.tokenTypeIdx]=n}function exe(e,t){var r,n;return t===Ove?t:(r=t.configs.key,void 0!==(n=e.states[r])?n:(t.configs.finalize(),e.states[r]=t))}function txe(t){var r=new Pve,n=t.transitions.length;for(let e=0;e<n;e++)rxe({state:t.transitions[e].target,alt:e,stack:[]},r);return r}function rxe(t,r){var e,n=t.state;if(n.type===Tve)0<t.stack.length?rxe({state:(e=[...t.stack]).pop(),alt:t.alt,stack:e},r):r.add(t);else{n.epsilonOnlyTransitions||r.add(t);var i=n.transitions.length;for(let e=0;e<i;e++){var a=nxe(t,n.transitions[e]);void 0!==a&&rxe(a,r)}}}function nxe(e,t){var r;return t instanceof Ive?{state:t.target,alt:e.alt,stack:e.stack}:t instanceof Rve?(r=[...e.stack,t.followState],{state:t.target,alt:e.alt,stack:r}):void 0}function ixe(e){for(var t of e.elements)if(t.state.type===Tve)return!0;return!1}function axe(e){for(var t of e.elements)if(t.state.type!==Tve)return!1;return!0}function sxe(e){return!!axe(e)||lxe(e=oxe(e.elements))&&!cxe(e)}function oxe(e){var r,n=new Map;for(r of e){let e=Dve(r,!1),t=n.get(e);void 0===t&&(t={},n.set(e,t)),t[r.alt]=!0}return n}function lxe(e){for(var t of Array.from(e.values()))if(1<Object.keys(t).length)return!0;return!1}function cxe(e){for(var t of Array.from(e.values()))if(1===Object.keys(t).length)return!0;return!1}var hxe,uxe,dxe,pxe,gxe,fxe,mxe,yxe,vxe,xxe,bxe,wxe,kxe,Txe,Exe,Cxe,_xe,Sxe,Axe,Lxe,Nxe,Ixe,Rxe,Mxe,Dxe,Oxe,Pxe,Bxe,$xe,Fxe,zxe,Gxe,Uxe,qxe,jxe,Yxe,Wxe,Hxe,Vxe,Xxe,Kxe,Zxe,Qxe,Jxe,ebe,tbe,rbe,nbe,ibe,abe,sbe,obe,lbe,cbe,hbe,ube,dbe,pbe,gbe,fbe,mbe,ybe,vbe,xbe,bbe,wbe,kbe,Tbe,Ebe,Cbe,_be,Sbe,Abe,Lbe,Nbe,Ibe,Rbe,Mbe,Dbe,Obe,Pbe,yt,Bbe,$be,Fbe,zbe,Gbe,Ube,qbe=b(()=>{H2e(),Mve(),Bve(),Kj(),Bq(),FW(),Dq(),g$(),JU(),_j(),cW(),mt($ve,"createDFACache"),hxe=class{static{mt(this,"PredicateSet")}constructor(){this.predicates=[]}is(e){return e>=this.predicates.length||this.predicates[e]}set(e,t){this.predicates[e]=t}toString(){let t="",r=this.predicates.length;for(let e=0;e<r;e++)t+=!0===this.predicates[e]?"1":"0";return t}},uxe=new hxe,dxe=class extends Fye{static{mt(this,"LLStarLookaheadStrategy")}constructor(e){super(),this.logging=null!=(e=e?.logging)?e:e=>console.log(e)}initialize(e){this.atn=X2e(e.rules),this.dfas=zve(this.atn)}validateAmbiguousAlternationAlternatives(){return[]}validateEmptyOrAlternatives(){return[]}buildLookaheadForAlternation(e){let{prodOccurrence:t,rule:r,hasPredicates:n,dynamicTokensEnabled:i}=e,a=this.dfas,s=this.logging,o=V2e(r,"Alternation",t),l=this.atn.decisionMap[o].decision,c=x(Bme({maxLookahead:1,occurrence:t,prodType:"Alternation",rule:r}),e=>x(e,e=>e[0]));if(!Fve(c,!1)||i)return n?function(t){var r=new hxe,n=void 0===t?0:t.length;for(let e=0;e<n;e++){var i=t?.[e].GATE;r.set(e,void 0===i||i.call(this))}var e=Gve.call(this,a,l,r,s);return"number"==typeof e?e:void 0}:function(){var e=Gve.call(this,a,l,uxe,s);return"number"==typeof e?e:void 0};{let r=lW(c,(t,e,r)=>(v(e,e=>{e&&(t[e.tokenTypeIdx]=r,v(e.categoryMatches,e=>{t[e]=r}))}),t),{});return n?function(e){var t=this.LA(1),t=r[t.tokenTypeIdx];if(void 0===e||void 0===t||void 0===(e=null==(e=e[t])?void 0:e.GATE)||!1!==e.call(this))return t}:function(){var e=this.LA(1);return r[e.tokenTypeIdx]}}}buildLookaheadForOptional(r){let{prodOccurrence:e,rule:t,prodType:n,dynamicTokensEnabled:i}=r,a=this.dfas,s=this.logging,o=V2e(t,n,e),l=this.atn.decisionMap[o].decision,c=x(Bme({maxLookahead:1,occurrence:e,prodType:n,rule:t}),e=>x(e,e=>e[0]));if(Fve(c)&&c[0][0]&&!i){if(r=c[0],1===(r=p$(r)).length&&Cj(r[0].categoryMatches)){let e=r[0].tokenTypeIdx;return function(){return this.LA(1).tokenTypeIdx===e}}{let t=lW(r,(t,e)=>(void 0!==e&&(t[e.tokenTypeIdx]=!0,v(e.categoryMatches,e=>{t[e]=!0})),t),{});return function(){var e=this.LA(1);return!0===t[e.tokenTypeIdx]}}}return function(){var e=Gve.call(this,a,l,uxe,s);return"object"!=typeof e&&0===e}}},mt(Fve,"isLL1Sequence"),mt(zve,"initATNSimulator"),mt(Gve,"adaptivePredict"),mt(Uve,"performLookahead"),mt(qve,"computeLookaheadTarget"),mt(jve,"reportLookaheadAmbiguity"),mt(Yve,"buildAmbiguityError"),mt(Wve,"getProductionDslName"),mt(Hve,"buildAdaptivePredictError"),mt(Vve,"getExistingTargetState"),mt(Xve,"computeReachSet"),mt(Kve,"getReachableTarget"),mt(Zve,"getUniqueAlt"),mt(Qve,"newDFAState"),mt(Jve,"addDFAEdge"),mt(exe,"addDFAState"),mt(txe,"computeStartState"),mt(rxe,"closure"),mt(nxe,"getEpsilonTarget"),mt(ixe,"hasConfigInRuleStopState"),mt(axe,"allConfigsInRuleStopStates"),mt(sxe,"hasConflictTerminatingPrediction"),mt(oxe,"getConflictingAltSets"),mt(lxe,"hasConflictingAltSet"),mt(cxe,"hasStateAssociatedWithOneAlt")}),jbe=b(()=>{qbe()}),Ybe=b(()=>{function e(e){return"string"==typeof e}var t,r,n,i;function a(e){return"string"==typeof e}function s(e){return"number"==typeof e&&t.MIN_VALUE<=e&&e<=t.MAX_VALUE}function o(e){return"number"==typeof e&&r.MIN_VALUE<=e&&e<=r.MAX_VALUE}function l(e,t){return{line:e=e===Number.MAX_VALUE?mxe.MAX_VALUE:e,character:t=t===Number.MAX_VALUE?mxe.MAX_VALUE:t}}function c(e){return yt.objectLiteral(e)&&yt.uinteger(e.line)&&yt.uinteger(e.character)}function h(e,t,r,n){if(yt.uinteger(e)&&yt.uinteger(t)&&yt.uinteger(r)&&yt.uinteger(n))return{start:yxe.create(e,t),end:yxe.create(r,n)};if(yxe.is(e)&&yxe.is(t))return{start:e,end:t};throw new Error(`Range#create called with invalid arguments[${e}, ${t}, ${r}, ${n}]`)}function u(e){return yt.objectLiteral(e)&&yxe.is(e.start)&&yxe.is(e.end)}function d(e,t){return{uri:e,range:t}}function p(e){return yt.objectLiteral(e)&&vxe.is(e.range)&&(yt.string(e.uri)||yt.undefined(e.uri))}function g(e,t,r,n){return{targetUri:e,targetRange:t,targetSelectionRange:r,originSelectionRange:n}}function f(e){return yt.objectLiteral(e)&&vxe.is(e.targetRange)&&yt.string(e.targetUri)&&vxe.is(e.targetSelectionRange)&&(vxe.is(e.originSelectionRange)||yt.undefined(e.originSelectionRange))}function m(e,t,r,n){return{red:e,green:t,blue:r,alpha:n}}function y(e){return yt.objectLiteral(e)&&yt.numberRange(e.red,0,1)&&yt.numberRange(e.green,0,1)&&yt.numberRange(e.blue,0,1)&&yt.numberRange(e.alpha,0,1)}function v(e,t){return{range:e,color:t}}function x(e){return yt.objectLiteral(e)&&vxe.is(e.range)&&wxe.is(e.color)}function b(e,t,r){return{label:e,textEdit:t,additionalTextEdits:r}}function w(e){return yt.objectLiteral(e)&&yt.string(e.label)&&(yt.undefined(e.textEdit)||Rxe.is(e))&&(yt.undefined(e.additionalTextEdits)||yt.typedArray(e.additionalTextEdits,Rxe.is))}function k(e,t,r,n,i,a){return e={startLine:e,endLine:t},yt.defined(r)&&(e.startCharacter=r),yt.defined(n)&&(e.endCharacter=n),yt.defined(i)&&(e.kind=i),yt.defined(a)&&(e.collapsedText=a),e}function T(e){return yt.objectLiteral(e)&&yt.uinteger(e.startLine)&&yt.uinteger(e.startLine)&&(yt.undefined(e.startCharacter)||yt.uinteger(e.startCharacter))&&(yt.undefined(e.endCharacter)||yt.uinteger(e.endCharacter))&&(yt.undefined(e.kind)||yt.string(e.kind))}function E(e,t){return{location:e,message:t}}function C(e){return yt.defined(e)&&xxe.is(e.location)&&yt.string(e.message)}function _(e){return yt.objectLiteral(e)&&yt.string(e.href)}function S(e,t,r,n,i,a){return e={range:e,message:t},yt.defined(r)&&(e.severity=r),yt.defined(n)&&(e.code=n),yt.defined(i)&&(e.source=i),yt.defined(a)&&(e.relatedInformation=a),e}function A(e){var t;return yt.defined(e)&&vxe.is(e.range)&&yt.string(e.message)&&(yt.number(e.severity)||yt.undefined(e.severity))&&(yt.integer(e.code)||yt.string(e.code)||yt.undefined(e.code))&&(yt.undefined(e.codeDescription)||yt.string(null==(t=e.codeDescription)?void 0:t.href))&&(yt.string(e.source)||yt.undefined(e.source))&&(yt.undefined(e.relatedInformation)||yt.typedArray(e.relatedInformation,_xe.is))}function L(e,t,...r){return e={title:e,command:t},yt.defined(r)&&0<r.length&&(e.arguments=r),e}function N(e){return yt.defined(e)&&yt.string(e.title)&&yt.string(e.command)}function I(e,t){return{range:e,newText:t}}function R(e,t){return{range:{start:e,end:e},newText:t}}function M(e){return{range:e,newText:""}}function P(e){return yt.objectLiteral(e)&&yt.string(e.newText)&&vxe.is(e.range)}function B(e,t,r){return e={label:e},void 0!==t&&(e.needsConfirmation=t),void 0!==r&&(e.description=r),e}function $(e){return yt.objectLiteral(e)&&yt.string(e.label)&&(yt.boolean(e.needsConfirmation)||void 0===e.needsConfirmation)&&(yt.string(e.description)||void 0===e.description)}function F(e){return yt.string(e)}function z(e,t,r){return{range:e,newText:t,annotationId:r}}function G(e,t,r){return{range:{start:e,end:e},newText:t,annotationId:r}}function U(e,t){return{range:e,newText:"",annotationId:t}}function q(e){return Rxe.is(e)&&(Mxe.is(e.annotationId)||Dxe.is(e.annotationId))}function j(e,t){return{textDocument:e,edits:t}}function Y(e){return yt.defined(e)&&qxe.is(e.textDocument)&&Array.isArray(e.edits)}function W(e,t,r){return e={kind:"create",uri:e},void 0===t||void 0===t.overwrite&&void 0===t.ignoreIfExists||(e.options=t),void 0!==r&&(e.annotationId=r),e}function H(e){return e&&"create"===e.kind&&yt.string(e.uri)&&(void 0===e.options||(void 0===e.options.overwrite||yt.boolean(e.options.overwrite))&&(void 0===e.options.ignoreIfExists||yt.boolean(e.options.ignoreIfExists)))&&(void 0===e.annotationId||Dxe.is(e.annotationId))}function V(e,t,r,n){return e={kind:"rename",oldUri:e,newUri:t},void 0===r||void 0===r.overwrite&&void 0===r.ignoreIfExists||(e.options=r),void 0!==n&&(e.annotationId=n),e}function X(e){return e&&"rename"===e.kind&&yt.string(e.oldUri)&&yt.string(e.newUri)&&(void 0===e.options||(void 0===e.options.overwrite||yt.boolean(e.options.overwrite))&&(void 0===e.options.ignoreIfExists||yt.boolean(e.options.ignoreIfExists)))&&(void 0===e.annotationId||Dxe.is(e.annotationId))}function K(e,t,r){return e={kind:"delete",uri:e},void 0===t||void 0===t.recursive&&void 0===t.ignoreIfNotExists||(e.options=t),void 0!==r&&(e.annotationId=r),e}function Z(e){return e&&"delete"===e.kind&&yt.string(e.uri)&&(void 0===e.options||(void 0===e.options.recursive||yt.boolean(e.options.recursive))&&(void 0===e.options.ignoreIfNotExists||yt.boolean(e.options.ignoreIfNotExists)))&&(void 0===e.annotationId||Dxe.is(e.annotationId))}function Q(e){return e&&(void 0!==e.changes||void 0!==e.documentChanges)&&(void 0===e.documentChanges||e.documentChanges.every(e=>yt.string(e.kind)?Bxe.is(e)||$xe.is(e)||Fxe.is(e):Pxe.is(e)))}function J(e){return{uri:e}}function ee(e){return yt.defined(e)&&yt.string(e.uri)}function te(e,t){return{uri:e,version:t}}function re(e){return yt.defined(e)&&yt.string(e.uri)&&yt.integer(e.version)}function ne(e,t){return{uri:e,version:t}}function ie(e){return yt.defined(e)&&yt.string(e.uri)&&(null===e.version||yt.integer(e.version))}function ae(e,t,r,n){return{uri:e,languageId:t,version:r,text:n}}function se(e){return yt.defined(e)&&yt.string(e.uri)&&yt.string(e.languageId)&&yt.integer(e.version)&&yt.string(e.text)}function oe(e){return e===n.PlainText||e===n.Markdown}function le(e){var t=e;return yt.objectLiteral(e)&&Yxe.is(t.kind)&&yt.string(t.value)}function ce(e,t,r){return{newText:e,insert:t,replace:r}}function he(e){return e&&yt.string(e.newText)&&vxe.is(e.insert)&&vxe.is(e.replace)}function ue(e){return e&&(yt.string(e.detail)||void 0===e.detail)&&(yt.string(e.description)||void 0===e.description)}function de(e){return{label:e}}function pe(e,t){return{items:e||[],isIncomplete:!!t}}function ge(e){return e.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}function fe(e){return yt.string(e)||yt.objectLiteral(e)&&yt.string(e.language)&&yt.string(e.value)}function me(e){var t=e;return!!t&&yt.objectLiteral(t)&&(Wxe.is(t.contents)||ebe.is(t.contents)||yt.typedArray(t.contents,ebe.is))&&(void 0===e.range||vxe.is(e.range))}function ye(e,t){return t?{label:e,documentation:t}:{label:e}}function ve(e,t,...r){return e={label:e},yt.defined(t)&&(e.documentation=t),yt.defined(r)?e.parameters=r:e.parameters=[],e}function xe(e,t){return e={range:e},yt.number(t)&&(e.kind=t),e}function be(e,t,r,n,i){return e={name:e,kind:t,location:{uri:n,range:r}},i&&(e.containerName=i),e}function we(e,t,r,n){return void 0!==n?{name:e,kind:t,location:{uri:r,range:n}}:{name:e,kind:t,location:{uri:r}}}function ke(e,t,r,n,i,a){return e={name:e,detail:t,kind:r,range:n,selectionRange:i},void 0!==a&&(e.children=a),e}function Te(e){return e&&yt.string(e.name)&&yt.number(e.kind)&&vxe.is(e.range)&&vxe.is(e.selectionRange)&&(void 0===e.detail||yt.string(e.detail))&&(void 0===e.deprecated||yt.boolean(e.deprecated))&&(void 0===e.children||Array.isArray(e.children))&&(void 0===e.tags||Array.isArray(e.tags))}function Ee(e,t,r){return e={diagnostics:e},null!=t&&(e.only=t),null!=r&&(e.triggerKind=r),e}function Ce(e){return yt.defined(e)&&yt.typedArray(e.diagnostics,Nxe.is)&&(void 0===e.only||yt.typedArray(e.only,yt.string))&&(void 0===e.triggerKind||e.triggerKind===ube.Invoked||e.triggerKind===ube.Automatic)}function _e(e,t,r){let n={title:e},i=!0;return"string"==typeof t?(i=!1,n.kind=t):Ixe.is(t)?n.command=t:n.edit=t,i&&void 0!==r&&(n.kind=r),n}function Se(e){return e&&yt.string(e.title)&&(void 0===e.diagnostics||yt.typedArray(e.diagnostics,Nxe.is))&&(void 0===e.kind||yt.string(e.kind))&&(void 0!==e.edit||void 0!==e.command)&&(void 0===e.command||Ixe.is(e.command))&&(void 0===e.isPreferred||yt.boolean(e.isPreferred))&&(void 0===e.edit||zxe.is(e.edit))}function Ae(e,t){return e={range:e},yt.defined(t)&&(e.data=t),e}function Le(e){return yt.defined(e)&&vxe.is(e.range)&&(yt.undefined(e.command)||Ixe.is(e.command))}function Ne(e,t){return{tabSize:e,insertSpaces:t}}function Ie(e){return yt.defined(e)&&yt.uinteger(e.tabSize)&&yt.boolean(e.insertSpaces)}function Re(e,t,r){return{range:e,target:t,data:r}}function Me(e){return yt.defined(e)&&vxe.is(e.range)&&(yt.undefined(e.target)||yt.string(e.target))}function De(e,t){return{range:e,parent:t}}function Oe(e){return yt.objectLiteral(e)&&vxe.is(e.range)&&(void 0===e.parent||i.is(e.parent))}function Pe(e){return yt.objectLiteral(e)&&(void 0===e.resultId||"string"==typeof e.resultId)&&Array.isArray(e.data)&&(0===e.data.length||"number"==typeof e.data[0])}function Be(e,t){return{range:e,text:t}}function $e(e){return null!=e&&vxe.is(e.range)&&yt.string(e.text)}function Fe(e,t,r){return{range:e,variableName:t,caseSensitiveLookup:r}}function ze(e){return null!=e&&vxe.is(e.range)&&yt.boolean(e.caseSensitiveLookup)&&(yt.string(e.variableName)||void 0===e.variableName)}function Ge(e,t){return{range:e,expression:t}}function Ue(e){return null!=e&&vxe.is(e.range)&&(yt.string(e.expression)||void 0===e.expression)}function qe(e,t){return{frameId:e,stoppedLocation:t}}function je(e){return yt.defined(e)&&vxe.is(e.stoppedLocation)}function Ye(e){return 1===e||2===e}function We(e){return{value:e}}function He(e){return yt.objectLiteral(e)&&(void 0===e.tooltip||yt.string(e.tooltip)||Wxe.is(e.tooltip))&&(void 0===e.location||xxe.is(e.location))&&(void 0===e.command||Ixe.is(e.command))}function Ve(e,t,r){return e={position:e,label:t},void 0!==r&&(e.kind=r),e}function Xe(e){return yt.objectLiteral(e)&&yxe.is(e.position)&&(yt.string(e.label)||yt.typedArray(e.label,_be.is))&&(void 0===e.kind||Cbe.is(e.kind))&&void 0===e.textEdits||yt.typedArray(e.textEdits,Rxe.is)&&(void 0===e.tooltip||yt.string(e.tooltip)||Wxe.is(e.tooltip))&&(void 0===e.paddingLeft||yt.boolean(e.paddingLeft))&&(void 0===e.paddingRight||yt.boolean(e.paddingRight))}function Ke(e){return{kind:"snippet",value:e}}function Ze(e,t,r,n){return{insertText:e,filterText:t,range:r,command:n}}function Qe(e){return{items:e}}function Je(e,t){return{range:e,text:t}}function et(e,t){return{triggerKind:e,selectedCompletionInfo:t}}function tt(e){return yt.objectLiteral(e)&&gxe.is(e.uri)&&yt.string(e.name)}function rt(e,t,r,n){return new Pbe(e,t,r,n)}function nt(e){return!!(yt.defined(e)&&yt.string(e.uri)&&(yt.undefined(e.languageId)||yt.string(e.languageId))&&yt.uinteger(e.lineCount)&&yt.func(e.getText)&&yt.func(e.positionAt)&&yt.func(e.offsetAt))}function it(t,e){let r=t.getText(),n=D(e,(e,t)=>{var r=e.range.start.line-t.range.start.line;return 0==r?e.range.start.character-t.range.start.character:r}),i=r.length;for(let e=n.length-1;0<=e;e--){var a=n[e],s=t.offsetAt(a.range.start),o=t.offsetAt(a.range.end);if(!(o<=i))throw new Error("Overlapping edit");r=r.substring(0,s)+a.newText+r.substring(o,r.length),i=s}return r}function D(n,i){if(!(n.length<=1)){var a=n.length/2|0,s=n.slice(0,a),o=n.slice(a);D(s,i),D(o,i);let e=0,t=0,r=0;for(;e<s.length&&t<o.length;)i(s[e],o[t])<=0?n[r++]=s[e++]:n[r++]=o[t++];for(;e<s.length;)n[r++]=s[e++];for(;t<o.length;)n[r++]=o[t++]}return n}O=pxe=pxe||{},mt(e,"is"),O.is=e,O=gxe=gxe||{},mt(a,"is"),O.is=a,(t=fxe=fxe||{}).MIN_VALUE=-2147483648,t.MAX_VALUE=2147483647,mt(s,"is"),t.is=s,(r=mxe=mxe||{}).MIN_VALUE=0,r.MAX_VALUE=2147483647,mt(o,"is"),r.is=o,O=yxe=yxe||{},mt(l,"create"),O.create=l,mt(c,"is"),O.is=c,O=vxe=vxe||{},mt(h,"create"),O.create=h,mt(u,"is"),O.is=u,O=xxe=xxe||{},mt(d,"create"),O.create=d,mt(p,"is"),O.is=p,O=bxe=bxe||{},mt(g,"create"),O.create=g,mt(f,"is"),O.is=f,O=wxe=wxe||{},mt(m,"create"),O.create=m,mt(y,"is"),O.is=y,O=kxe=kxe||{},mt(v,"create"),O.create=v,mt(x,"is"),O.is=x,O=Txe=Txe||{},mt(b,"create"),O.create=b,mt(w,"is"),O.is=w,(O=Exe=Exe||{}).Comment="comment",O.Imports="imports",O.Region="region",O=Cxe=Cxe||{},mt(k,"create"),O.create=k,mt(T,"is"),O.is=T,O=_xe=_xe||{},mt(E,"create"),O.create=E,mt(C,"is"),O.is=C,(O=Sxe=Sxe||{}).Error=1,O.Warning=2,O.Information=3,O.Hint=4,(O=Axe=Axe||{}).Unnecessary=1,O.Deprecated=2,O=Lxe=Lxe||{},mt(_,"is"),O.is=_,O=Nxe=Nxe||{},mt(S,"create"),O.create=S,mt(A,"is"),O.is=A,O=Ixe=Ixe||{},mt(L,"create"),O.create=L,mt(N,"is"),O.is=N,O=Rxe=Rxe||{},mt(I,"replace"),O.replace=I,mt(R,"insert"),O.insert=R,mt(M,"del"),O.del=M,mt(P,"is"),O.is=P,O=Mxe=Mxe||{},mt(B,"create"),O.create=B,mt($,"is"),O.is=$,O=Dxe=Dxe||{},mt(F,"is"),O.is=F,O=Oxe=Oxe||{},mt(z,"replace"),O.replace=z,mt(G,"insert"),O.insert=G,mt(U,"del"),O.del=U,mt(q,"is"),O.is=q,O=Pxe=Pxe||{},mt(j,"create"),O.create=j,mt(Y,"is"),O.is=Y,O=Bxe=Bxe||{},mt(W,"create"),O.create=W,mt(H,"is"),O.is=H,O=$xe=$xe||{},mt(V,"create"),O.create=V,mt(X,"is"),O.is=X,O=Fxe=Fxe||{},mt(K,"create"),O.create=K,mt(Z,"is"),O.is=Z,O=zxe=zxe||{},mt(Q,"is"),O.is=Q,O=Gxe=Gxe||{},mt(J,"create"),O.create=J,mt(ee,"is"),O.is=ee,O=Uxe=Uxe||{},mt(te,"create"),O.create=te,mt(re,"is"),O.is=re,O=qxe=qxe||{},mt(ne,"create"),O.create=ne,mt(ie,"is"),O.is=ie,O=jxe=jxe||{},mt(ae,"create"),O.create=ae,mt(se,"is"),O.is=se,(n=Yxe=Yxe||{}).PlainText="plaintext",n.Markdown="markdown",mt(oe,"is"),n.is=oe,O=Wxe=Wxe||{},mt(le,"is"),O.is=le,(O=Hxe=Hxe||{}).Text=1,O.Method=2,O.Function=3,O.Constructor=4,O.Field=5,O.Variable=6,O.Class=7,O.Interface=8,O.Module=9,O.Property=10,O.Unit=11,O.Value=12,O.Enum=13,O.Keyword=14,O.Snippet=15,O.Color=16,O.File=17,O.Reference=18,O.Folder=19,O.EnumMember=20,O.Constant=21,O.Struct=22,O.Event=23,O.Operator=24,O.TypeParameter=25,(O=Vxe=Vxe||{}).PlainText=1,O.Snippet=2,O=Xxe=Xxe||{},mt(ce,"create"),O.create=ce,mt(he,"is"),O.is=he,(O=Kxe=Kxe||{}).asIs=1,O.adjustIndentation=2,O=Zxe=Zxe||{},mt(ue,"is"),O.is=ue,O=Qxe=Qxe||{},mt(de,"create"),O.create=de,O=Jxe=Jxe||{},mt(pe,"create"),O.create=pe,O=ebe=ebe||{},mt(ge,"fromPlainText"),O.fromPlainText=ge,mt(fe,"is"),O.is=fe,O=tbe=tbe||{},mt(me,"is"),O.is=me,O=rbe=rbe||{},mt(ye,"create"),O.create=ye,O=nbe=nbe||{},mt(ve,"create"),O.create=ve,(O=ibe=ibe||{}).Text=1,O.Read=2,O.Write=3,O=abe=abe||{},mt(xe,"create"),O.create=xe,(O=sbe=sbe||{}).File=1,O.Module=2,O.Namespace=3,O.Package=4,O.Class=5,O.Method=6,O.Property=7,O.Field=8,O.Constructor=9,O.Enum=10,O.Interface=11,O.Function=12,O.Variable=13,O.Constant=14,O.String=15,O.Number=16,O.Boolean=17,O.Array=18,O.Object=19,O.Key=20,O.Null=21,O.EnumMember=22,O.Struct=23,O.Event=24,O.Operator=25,O.TypeParameter=26,O=obe=obe||{},mt(be,"create"),O.create=be,O=lbe=lbe||{},mt(we,"create"),O.create=we,O=cbe=cbe||{},mt(ke,"create"),O.create=ke,mt(Te,"is"),O.is=Te,(O=hbe=hbe||{}).Empty="",O.QuickFix="quickfix",O.Refactor="refactor",O.RefactorExtract="refactor.extract",O.RefactorInline="refactor.inline",O.RefactorRewrite="refactor.rewrite",O.Source="source",O.SourceOrganizeImports="source.organizeImports",O.SourceFixAll="source.fixAll",(O=ube=ube||{}).Invoked=1,O.Automatic=2,O=dbe=dbe||{},mt(Ee,"create"),O.create=Ee,mt(Ce,"is"),O.is=Ce,O=pbe=pbe||{},mt(_e,"create"),O.create=_e,mt(Se,"is"),O.is=Se,O=gbe=gbe||{},mt(Ae,"create"),O.create=Ae,mt(Le,"is"),O.is=Le,O=fbe=fbe||{},mt(Ne,"create"),O.create=Ne,mt(Ie,"is"),O.is=Ie,O=mbe=mbe||{},mt(Re,"create"),O.create=Re,mt(Me,"is"),O.is=Me,i=ybe=ybe||{},mt(De,"create"),i.create=De,mt(Oe,"is"),i.is=Oe,(O=vbe=vbe||{}).namespace="namespace",O.type="type",O.class="class",O.enum="enum",O.interface="interface",O.struct="struct",O.typeParameter="typeParameter",O.parameter="parameter",O.variable="variable",O.property="property",O.enumMember="enumMember",O.event="event",O.function="function",O.method="method",O.macro="macro",O.keyword="keyword",O.modifier="modifier",O.comment="comment",O.string="string",O.number="number",O.regexp="regexp",O.operator="operator",O.decorator="decorator",(O=xbe=xbe||{}).declaration="declaration",O.definition="definition",O.readonly="readonly",O.static="static",O.deprecated="deprecated",O.abstract="abstract",O.async="async",O.modification="modification",O.documentation="documentation",O.defaultLibrary="defaultLibrary",O=bbe=bbe||{},mt(Pe,"is"),O.is=Pe,O=wbe=wbe||{},mt(Be,"create"),O.create=Be,mt($e,"is"),O.is=$e,O=kbe=kbe||{},mt(Fe,"create"),O.create=Fe,mt(ze,"is"),O.is=ze,O=Tbe=Tbe||{},mt(Ge,"create"),O.create=Ge,mt(Ue,"is"),O.is=Ue,O=Ebe=Ebe||{},mt(qe,"create"),O.create=qe,mt(je,"is"),O.is=je,(O=Cbe=Cbe||{}).Type=1,O.Parameter=2,mt(Ye,"is"),O.is=Ye,O=_be=_be||{},mt(We,"create"),O.create=We,mt(He,"is"),O.is=He,O=Sbe=Sbe||{},mt(Ve,"create"),O.create=Ve,mt(Xe,"is"),O.is=Xe,O=Abe=Abe||{},mt(Ke,"createSnippet"),O.createSnippet=Ke,O=Lbe=Lbe||{},mt(Ze,"create"),O.create=Ze,O=Nbe=Nbe||{},mt(Qe,"create"),O.create=Qe,(O=Ibe=Ibe||{}).Invoked=0,O.Automatic=1,O=Rbe=Rbe||{},mt(Je,"create"),O.create=Je,O=Mbe=Mbe||{},mt(et,"create"),O.create=et,O=Dbe=Dbe||{},mt(tt,"is"),O.is=tt,O=Obe=Obe||{},mt(rt,"create"),O.create=rt,mt(nt,"is"),O.is=nt,mt(it,"applyEdits"),O.applyEdits=it,mt(D,"mergeSort"),Pbe=class{static{mt(this,"FullTextDocument")}constructor(e,t,r,n){this._uri=e,this._languageId=t,this._version=r,this._content=n,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(e){var t;return e?(t=this.offsetAt(e.start),e=this.offsetAt(e.end),this._content.substring(t,e)):this._content}update(e,t){this._content=e.text,this._version=t,this._lineOffsets=void 0}getLineOffsets(){if(void 0===this._lineOffsets){let t=[],r=this._content,n=!0;for(let e=0;e<r.length;e++){n&&(t.push(e),n=!1);var i=r.charAt(e);n="\r"===i||i===` +`,"\r"===i&&e+1<r.length&&r.charAt(e+1)===` +`&&e++}n&&0<r.length&&t.push(r.length),this._lineOffsets=t}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(0===n)return yxe.create(0,e);for(;r<n;){var i=Math.floor((r+n)/2);t[i]>e?n=i:r=i+1}var a=r-1;return yxe.create(a,e-t[a])}offsetAt(e){var t,r=this.getLineOffsets();return e.line>=r.length?this._content.length:e.line<0?0:(t=r[e.line],r=e.line+1<r.length?r[e.line+1]:this._content.length,Math.max(Math.min(t+e.character,r),t))}get lineCount(){return this.getLineOffsets().length}};{var O=yt=yt||{};let n=Object.prototype.toString;function at(e){return typeof e<"u"}function st(e){return"u"<typeof e}function ot(e){return!0===e||!1===e}function lt(e){return"[object String]"===n.call(e)}function ct(e){return"[object Number]"===n.call(e)}function ht(e,t,r){return"[object Number]"===n.call(e)&&t<=e&&e<=r}function ut(e){return"[object Number]"===n.call(e)&&-2147483648<=e&&e<=2147483647}function dt(e){return"[object Number]"===n.call(e)&&0<=e&&e<=2147483647}function pt(e){return"[object Function]"===n.call(e)}function gt(e){return null!==e&&"object"==typeof e}function ft(e,t){return Array.isArray(e)&&e.every(t)}mt(at,"defined"),O.defined=at,mt(st,"undefined"),O.undefined=st,mt(ot,"boolean"),O.boolean=ot,mt(lt,"string"),O.string=lt,mt(ct,"number"),O.number=ct,mt(ht,"numberRange"),O.numberRange=ht,mt(ut,"integer"),O.integer=ut,mt(dt,"uinteger"),O.uinteger=dt,mt(pt,"func"),O.func=pt,mt(gt,"objectLiteral"),O.objectLiteral=gt,mt(ft,"typedArray"),O.typedArray=ft}}),Wbe=b(()=>{Ybe(),cde(),Bbe=class{static{mt(this,"CstNodeBuilder")}constructor(){this.nodeStack=[]}get current(){var e;return null!=(e=this.nodeStack[this.nodeStack.length-1])?e:this.rootNode}buildRootNode(e){return this.rootNode=new Ube(e),this.rootNode.root=this.rootNode,this.nodeStack=[this.rootNode],this.rootNode}buildCompositeNode(e){var t=new zbe;return t.grammarSource=e,t.root=this.rootNode,this.current.content.push(t),this.nodeStack.push(t),t}buildLeafNode(e,t){return(e=new Fbe(e.startOffset,e.image.length,Yue(e),e.tokenType,!t)).grammarSource=t,e.root=this.rootNode,this.current.content.push(e),e}removeNode(e){var t=e.container;t&&0<=(e=t.content.indexOf(e))&&t.content.splice(e,1)}addHiddenNodes(e){var t,r=[];for(t of e){var n=new Fbe(t.startOffset,t.image.length,Yue(t),t.tokenType,!0);n.root=this.rootNode,r.push(n)}let i=this.current,a=!1;if(0<i.content.length)i.content.push(...r);else{for(;i.container;){var s=i.container.content.indexOf(i);if(0<s){i.container.content.splice(s,0,...r),a=!0;break}i=i.container}a||this.rootNode.content.unshift(...r)}}construct(e){var t=this.current;"string"==typeof e.$type&&(this.current.astNode=e),e.$cstNode=t,0===(e=this.nodeStack.pop())?.content.length&&this.removeNode(e)}},$be=class{static{mt(this,"AbstractCstNode")}get parent(){return this.container}get feature(){return this.grammarSource}get hidden(){return!1}get astNode(){var e="string"==typeof(null==(e=this._astNode)?void 0:e.$type)?this._astNode:null==(e=this.container)?void 0:e.astNode;if(e)return e;throw new Error("This node has no associated AST element")}set astNode(e){this._astNode=e}get element(){return this.astNode}get text(){return this.root.fullText.substring(this.offset,this.end)}},Fbe=class extends $be{static{mt(this,"LeafCstNodeImpl")}get offset(){return this._offset}get length(){return this._length}get end(){return this._offset+this._length}get hidden(){return this._hidden}get tokenType(){return this._tokenType}get range(){return this._range}constructor(e,t,r,n,i=!1){super(),this._hidden=i,this._offset=e,this._tokenType=n,this._length=t,this._range=r}},zbe=class extends $be{static{mt(this,"CompositeCstNodeImpl")}constructor(){super(...arguments),this.content=new Gbe(this)}get children(){return this.content}get offset(){var e;return null!=(e=null==(e=this.firstNonHiddenNode)?void 0:e.offset)?e:0}get length(){return this.end-this.offset}get end(){var e;return null!=(e=null==(e=this.lastNonHiddenNode)?void 0:e.end)?e:0}get range(){var e=this.firstNonHiddenNode,t=this.lastNonHiddenNode;return e&&t?(void 0===this._rangeCache&&(e=e.range,t=t.range,this._rangeCache={start:e.start,end:t.end.line<e.start.line?e.start:t.end}),this._rangeCache):{start:yxe.create(0,0),end:yxe.create(0,0)}}get firstNonHiddenNode(){for(var e of this.content)if(!e.hidden)return e;return this.content[0]}get lastNonHiddenNode(){for(let e=this.content.length-1;0<=e;e--){var t=this.content[e];if(!t.hidden)return t}return this.content[this.content.length-1]}},Gbe=class t extends Array{static{mt(this,"CstNodeContainer")}constructor(e){super(),this.parent=e,Object.setPrototypeOf(this,t.prototype)}push(...e){return this.addParents(e),super.push(...e)}unshift(...e){return this.addParents(e),super.unshift(...e)}splice(e,t,...r){return this.addParents(r),super.splice(e,t,...r)}addParents(e){for(var t of e)t.container=this.parent}},Ube=class extends zbe{static{mt(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??""}}});function Hbe(e){return e.$type===Vbe}var Vbe,Xbe,Kbe,Zbe,Qbe,Jbe,e4e,t4e,r4e,n4e=b(()=>{H2e(),jbe(),n0e(),$ge(),x0e(),Wbe(),Vbe=Symbol("Datatype"),mt(Hbe,"isDataTypeNode"),Xbe=mt(e=>e.endsWith("​")?e:e+"​","withRuleSuffix"),Kbe=class{static{mt(this,"AbstractLangiumParser")}constructor(e){this._unorderedGroups=new Map,this.allRules=new Map,this.lexer=e.parser.Lexer;var t=this.lexer.definition,r="production"===e.LanguageMetaData.mode;this.wrapper=new r4e(t,Object.assign(Object.assign({},e.parser.ParserConfig),{skipValidations:r,errorMessageProvider:e.parser.ParserErrorMessageProvider}))}alternatives(e,t){this.wrapper.wrapOr(e,t)}optional(e,t){this.wrapper.wrapOption(e,t)}many(e,t){this.wrapper.wrapMany(e,t)}atLeastOne(e,t){this.wrapper.wrapAtLeastOne(e,t)}getRule(e){return this.allRules.get(e)}isRecording(){return this.wrapper.IS_RECORDING}get unorderedGroups(){return this._unorderedGroups}getRuleStack(){return this.wrapper.RULE_STACK}finalize(){this.wrapper.wrapSelfAnalysis()}},Zbe=class extends Kbe{static{mt(this,"LangiumParser")}get current(){return this.stack[this.stack.length-1]}constructor(e){super(e),this.nodeBuilder=new Bbe,this.stack=[],this.assignmentMap=new Map,this.linker=e.references.Linker,this.converter=e.parser.ValueConverter,this.astReflection=e.shared.AstReflection}rule(e,t){var r=this.computeRuleType(e),r=this.wrapper.DEFINE_RULE(Xbe(e.name),this.startImplementation(r,t).bind(this));return this.allRules.set(e.name,r),e.entry&&(this.mainRule=r),r}computeRuleType(e){if(!e.fragment)return xge(e)?Vbe:Tge(e)??e.name}parse(e,t={}){this.nodeBuilder.buildRootNode(e);var e=this.lexerResult=this.lexer.tokenize(e),r=(this.wrapper.input=e.tokens,t.rule?this.allRules.get(t.rule):this.mainRule);if(r)return r=r.call(this.wrapper,{}),this.nodeBuilder.addHiddenNodes(e.hidden),this.unorderedGroups.clear(),this.lexerResult=void 0,{value:r,lexerErrors:e.errors,lexerReport:e.report,parserErrors:this.wrapper.errors};throw new Error(t.rule?`No rule found with name '${t.rule}'`:"No main rule available.")}startImplementation(i,a){return e=>{var t,r=!this.isRecording()&&void 0!==i;r&&(this.stack.push(t={$type:i}),i===Vbe)&&(t.value="");let n;try{n=a(e)}catch{n=void 0}return n=void 0===n&&r?this.construct():n}}extractHiddenTokens(e){var t=this.lexerResult.hidden;if(!t.length)return[];var r=e.startOffset;for(let e=0;e<t.length;e++)if(t[e].startOffset>r)return t.splice(0,e);return t.splice(0,t.length)}consume(t,r,n){if(t=this.wrapper.wrapConsume(t,r),!this.isRecording()&&this.isValidToken(t)){var r=this.extractHiddenTokens(t),r=(this.nodeBuilder.addHiddenNodes(r),this.nodeBuilder.buildLeafNode(t,n)),{assignment:e,isCrossRef:i}=this.getAssignment(n),a=this.current;if(e){var s=Qde(n)?t.image:this.converter.convert(t.image,r);this.assign(e.operator,e.feature,s,r,i)}else if(Hbe(a)){let e=t.image;Qde(n)||(e=this.converter.convert(e,r).toString()),a.value+=e}}}isValidToken(e){return!e.isInsertedInRecovery&&!isNaN(e.startOffset)&&"number"==typeof e.endOffset&&!isNaN(e.endOffset)}subrule(e,t,r,n,i){let a;this.isRecording()||r||(a=this.nodeBuilder.buildCompositeNode(n)),r=this.wrapper.wrapSubrule(e,t,i),!this.isRecording()&&a&&0<a.length&&this.performSubruleAssignment(r,n,a)}performSubruleAssignment(e,t,r){var{assignment:t,isCrossRef:n}=this.getAssignment(t);t?this.assign(t.operator,t.feature,e,r,n):Hbe(t=this.current)?t.value+=e.toString():"object"==typeof e&&e&&(r=this.assignWithoutOverride(e,t),this.stack.pop(),this.stack.push(r))}action(t,r){if(!this.isRecording()){let e=this.current;r.feature&&r.operator?(e=this.construct(),this.nodeBuilder.removeNode(e.$cstNode),this.nodeBuilder.buildCompositeNode(r).content.push(e.$cstNode),this.stack.push({$type:t}),this.assign(r.operator,r.feature,e,e.$cstNode,!1)):e.$type=t}}construct(){var e;if(!this.isRecording())return a0e(e=this.current),this.nodeBuilder.construct(e),this.stack.pop(),Hbe(e)?this.converter.convert(e.value,e.$cstNode):(m0e(this.astReflection,e),e)}getAssignment(e){var t;return this.assignmentMap.has(e)||(t=s0e(e,Hde),this.assignmentMap.set(e,{assignment:t,isCrossRef:!!t&&Xde(t.terminal)})),this.assignmentMap.get(e)}assign(e,t,r,n,i){var a=this.current,s=i&&"string"==typeof r?this.linker.buildReference(a,t,n,r):r;switch(e){case"=":a[t]=s;break;case"?=":a[t]=!0;break;case"+=":Array.isArray(a[t])||(a[t]=[]),a[t].push(s)}}assignWithoutOverride(e,t){for(var[r,n]of Object.entries(t)){var i=e[r];void 0===i?e[r]=n:Array.isArray(i)&&Array.isArray(n)&&(n.push(...i),e[r]=n)}return(t=e.$cstNode)&&(t.astNode=void 0,e.$cstNode=void 0),e}get definitionErrors(){return this.wrapper.definitionErrors}},Qbe=class{static{mt(this,"AbstractParserErrorMessageProvider")}buildMismatchTokenMessage(e){return vme.buildMismatchTokenMessage(e)}buildNotAllInputParsedMessage(e){return vme.buildNotAllInputParsedMessage(e)}buildNoViableAltMessage(e){return vme.buildNoViableAltMessage(e)}buildEarlyExitMessage(e){return vme.buildEarlyExitMessage(e)}},Jbe=class extends Qbe{static{mt(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}\`.`}},e4e=class extends Kbe{static{mt(this,"LangiumCompletionParser")}constructor(){super(...arguments),this.tokens=[],this.elementStack=[],this.lastElementStack=[],this.nextTokenIndex=0,this.stackSize=0}action(){}construct(){}parse(e){return this.resetState(),e=this.lexer.tokenize(e,{mode:"partial"}),this.tokens=e.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){return t=this.wrapper.DEFINE_RULE(Xbe(e.name),this.startImplementation(t).bind(this)),this.allRules.set(e.name,t),e.entry&&(this.mainRule=t),t}resetState(){this.elementStack=[],this.lastElementStack=[],this.nextTokenIndex=0,this.stackSize=0}startImplementation(r){return e=>{var t=this.keepStackSize();try{r(e)}finally{this.resetStackSize(t)}}}removeUnexpectedElements(){this.elementStack.splice(this.stackSize)}keepStackSize(){var e=this.elementStack.length;return this.stackSize=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){this.isRecording()||0<=(e=this.elementStack.lastIndexOf(e))&&this.elementStack.splice(e)}get currIdx(){return this.wrapper.currIdx}},t4e={recoveryEnabled:!0,nodeLocationTracking:"full",skipValidations:!0,errorMessageProvider:new Jbe},r4e=class extends G2e{static{mt(this,"ChevrotainWrapper")}constructor(e,t){var r=t&&"maxLookahead"in t;super(e,Object.assign(Object.assign(Object.assign({},t4e),{lookaheadStrategy:r?new Fye({maxLookahead:t.maxLookahead}):new dxe({logging:t.skipValidations?()=>{}:void 0})}),t))}get IS_RECORDING(){return this.RECORDING_PHASE}DEFINE_RULE(e,t){return this.RULE(e,t)}wrapSelfAnalysis(){this.performSelfAnalysis()}wrapConsume(e,t){return this.consume(e,t)}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)}}});function i4e(e,t,r){return a4e({parser:t,tokens:r,ruleNames:new Map},e),t}function a4e(e,t){let r=rge(t,!1),n=Due(t.rules).filter(Pde).filter(e=>r.has(e));for(var i of n){var a=Object.assign(Object.assign({},e),{consume:1,optional:1,subrule:1,many:1,or:1});e.parser.rule(i,s4e(a,i.definition))}}function s4e(t,r,e=!1){let n;if(Qde(r))n=m4e(t,r);else if(Yde(r))n=o4e(t,r);else if(Hde(r))n=s4e(t,r.terminal);else if(Xde(r))n=f4e(t,r);else if(tpe(r))n=l4e(t,r);else if(Wde(r))n=u4e(t,r);else if(ape(r))n=d4e(t,r);else if(Zde(r))n=p4e(t,r);else{if(!Kde(r))throw new ude(r.$cstNode,"Unexpected element type: "+r.$type);{let e=t.consume++;n=mt(()=>t.parser.consume(e,yme,r),"method")}}return y4e(t,e?void 0:g4e(r),n,r.cardinality)}function o4e(e,t){let r=Ege(t);return()=>e.parser.action(r,t)}function l4e(i,a){let s=a.rule.ref;if(Pde(s)){let t=i.subrule++,r=s.fragment,n=0<a.arguments.length?c4e(s,a.arguments):()=>({});return e=>i.parser.subrule(t,v4e(i,s),r,a,n(e))}if(Gde(s)){let e=i.consume++,t=b4e(i,s.name);return()=>i.parser.consume(e,t,a)}if(!s)throw new ude(a.$cstNode,"Undefined rule: "+a.rule.$refText);hde(s)}function c4e(a,e){let s=e.map(e=>h4e(e.value));return t=>{var r={};for(let e=0;e<s.length;e++){var n=a.parameters[e],i=s[e];r[n.name]=i(t)}return r}}function h4e(n){if(_de(n)){let t=h4e(n.left),r=h4e(n.right);return e=>t(e)||r(e)}if(Cde(n)){let t=h4e(n.left),r=h4e(n.right);return e=>t(e)&&r(e)}if(Rde(n)){let t=h4e(n.value);return e=>!t(e)}if(Ode(n)){let t=n.parameter.ref.name;return e=>void 0!==e&&!0===e[t]}if(Ede(n)){let e=!!n.true;return()=>e}hde()}function u4e(r,n){if(1===n.elements.length)return s4e(r,n.elements[0]);{let e=[];for(var i of n.elements){var a={ALT:s4e(r,i,!0)};(i=g4e(i))&&(a.GATE=h4e(i)),e.push(a)}let t=r.or++;return n=>r.parser.alternatives(t,e.map(e=>{let t={ALT:mt(()=>e.ALT(n),"ALT")},r=e.GATE;return r&&(t.GATE=()=>r(n)),t}))}}function d4e(s,e){if(1===e.elements.length)return s4e(s,e.elements[0]);let t=[];for(var r of e.elements){var n={ALT:s4e(s,r,!0)};(r=g4e(r))&&(n.GATE=h4e(r)),t.push(n)}let o=s.or++,l=mt((e,t)=>`uGroup_${e}_`+t.getRuleStack().join("-"),"idFunc"),i=mt(a=>s.parser.alternatives(o,t.map((t,r)=>{let e={ALT:mt(()=>!0,"ALT")},n=s.parser,i=(e.ALT=()=>{var e;t.ALT(a),n.isRecording()||(e=l(o,n),n.unorderedGroups.get(e)||n.unorderedGroups.set(e,[]),"u"<typeof(e=n.unorderedGroups.get(e))?.[r]&&(e[r]=!0))},t.GATE);return i?e.GATE=()=>i(a):e.GATE=()=>!n.unorderedGroups.get(l(o,n))?.[r],e})),"alternatives"),a=y4e(s,g4e(e),i,"*");return e=>{a(e),s.parser.isRecording()||s.parser.unorderedGroups.delete(l(o,s.parser))}}function p4e(t,e){let r=e.elements.map(e=>s4e(t,e));return t=>r.forEach(e=>e(t))}function g4e(e){if(Zde(e))return e.guardCondition}function f4e(n,i,a=i.terminal){if(a){if(tpe(a)&&Pde(a.rule.ref)){let t=a.rule.ref,r=n.subrule++;return e=>n.parser.subrule(r,v4e(n,t),!1,i,e)}if(tpe(a)&&Gde(a.rule.ref)){let e=n.consume++,t=b4e(n,a.rule.ref.name);return()=>n.parser.consume(e,t,i)}if(Qde(a)){let e=n.consume++,t=b4e(n,a.value);return()=>n.parser.consume(e,t,i)}throw new Error("Could not build cross reference parser")}if(!i.type.ref)throw new Error("Could not resolve reference to type: "+i.type.$refText);if(a=pge(i.type.ref)?.terminal)return f4e(n,i,a);throw new Error("Could not find name assignment for type: "+Ege(i.type.ref))}function m4e(e,t){let r=e.consume++,n=e.tokens[t.value];if(n)return()=>e.parser.consume(r,n,t);throw new Error("Could not find token for keyword: "+t.value)}function y4e(n,e,i,t){let a=e&&h4e(e);if(!t){if(a){let t=n.or++;return e=>n.parser.alternatives(t,[{ALT:mt(()=>i(e),"ALT"),GATE:mt(()=>a(e),"GATE")},{ALT:O2e(),GATE:mt(()=>!a(e),"GATE")}])}return i}if("*"===t){let t=n.many++;return e=>n.parser.many(t,{DEF:mt(()=>i(e),"DEF"),GATE:a?()=>a(e):void 0})}if("+"===t){let r=n.many++;if(a){let t=n.or++;return e=>n.parser.alternatives(t,[{ALT:mt(()=>n.parser.atLeastOne(r,{DEF:mt(()=>i(e),"DEF")}),"ALT"),GATE:mt(()=>a(e),"GATE")},{ALT:O2e(),GATE:mt(()=>!a(e),"GATE")}])}return e=>n.parser.atLeastOne(r,{DEF:mt(()=>i(e),"DEF")})}if("?"===t){let t=n.optional++;return e=>n.parser.optional(t,{DEF:mt(()=>i(e),"DEF"),GATE:a?()=>a(e):void 0})}hde()}function v4e(e,t){if(t=x4e(e,t),e=e.parser.getRule(t))return e;throw new Error(`Rule "${t}" not found."`)}function x4e(n,i){if(Pde(i))return i.name;if(n.ruleNames.has(i))return n.ruleNames.get(i);{let e=i,t=e.$container,r=i.$type;for(;!Pde(t);)(Zde(t)||Wde(t)||ape(t))&&(r=t.elements.indexOf(e).toString()+":"+r),t=(e=t).$container;return r=t.name+":"+r,n.ruleNames.set(i,r),r}}function b4e(e,t){if(e=e.tokens[t])return e;throw new Error(`Token "${t}" not found."`)}var w4e=b(()=>{H2e(),n0e(),dde(),zue(),$ge(),mt(i4e,"createParser"),mt(a4e,"buildRules"),mt(s4e,"buildElement"),mt(o4e,"buildAction"),mt(l4e,"buildRuleCall"),mt(c4e,"buildRuleCallPredicate"),mt(h4e,"buildPredicate"),mt(u4e,"buildAlternatives"),mt(d4e,"buildUnorderedGroup"),mt(p4e,"buildGroup"),mt(g4e,"getGuardCondition"),mt(f4e,"buildCrossReference"),mt(m4e,"buildKeyword"),mt(y4e,"wrap"),mt(v4e,"getRule"),mt(x4e,"getRuleName"),mt(b4e,"getToken")});function k4e(e){var t=e.Grammar,r=e.parser.Lexer;return i4e(t,e=new e4e(e),r.definition),e.finalize(),e}var T4e=b(()=>{n4e(),w4e(),mt(k4e,"createCompletionParser")});function E4e(e){return(e=C4e(e)).finalize(),e}function C4e(e){var t=e.Grammar,r=e.parser.Lexer;return i4e(t,new Zbe(e),r.definition)}var _4e,S4e,A4e,L4e=b(()=>{n4e(),w4e(),mt(E4e,"createLangiumParser"),mt(C4e,"prepareLangiumParser")}),N4e=b(()=>{H2e(),n0e(),x0e(),$ge(),Q0e(),zue(),_4e=class{static{mt(this,"DefaultTokenBuilder")}constructor(){this.diagnostics=[]}buildTokens(e,t){let r=Due(rge(e,!1)),n=this.buildTerminalTokens(r),i=this.buildKeywordTokens(r,n,t);return n.forEach(e=>{var t=e.PATTERN;"object"==typeof t&&t&&"test"in t&&U0e(t)?i.unshift(e):i.push(e)}),i}flushLexingReport(e){return{diagnostics:this.popDiagnostics()}}popDiagnostics(){var e=[...this.diagnostics];return this.diagnostics=[],e}buildTerminalTokens(e){return e.filter(Gde).filter(e=>!e.fragment).map(e=>this.buildTerminalToken(e)).toArray()}buildTerminalToken(e){var t=Age(e),r=this.requiresCustomPattern(t)?this.regexPatternFunction(t):t,n={name:e.name,PATTERN:r};return"function"==typeof r&&(n.LINE_BREAKS=!0),e.hidden&&(n.GROUP=U0e(t)?Qfe.SKIPPED:"hidden"),n}requiresCustomPattern(e){return!!(e.flags.includes("u")||e.flags.includes("s")||e.source.includes("?<=")||e.source.includes("?<!"))}regexPatternFunction(e){let r=new RegExp(e,e.flags+"y");return(e,t)=>(r.lastIndex=t,r.exec(e))}buildKeywordTokens(e,t,r){return e.filter(Pde).flatMap(e=>u0e(e).filter(Qde)).distinct(e=>e.value).toArray().sort((e,t)=>t.value.length-e.value.length).map(e=>this.buildKeywordToken(e,t,!!r?.caseInsensitive))}buildKeywordToken(e,t,r){return r=this.buildKeywordPattern(e,r),e={name:e.value,PATTERN:r,LONGER_ALT:this.findLongerAlt(e,t)},"function"==typeof r&&(e.LINE_BREAKS=!0),e}buildKeywordPattern(e,t){return t?new RegExp(j0e(e.value)):e.value}findLongerAlt(n,e){return e.reduce((e,t)=>{var r=t?.PATTERN;return r?.source&&Y0e("^"+r.source+"$",n.value)&&e.push(t),e},[])}}}),I4e=b(()=>{function e(t){let r="";for(let e=1;e<t.length-1;e++){var n,i=t.charAt(e);"\\"===i?(n=t.charAt(++e),r+=a(n)):r+=i}return r}function a(e){switch(e){case"b":return"\b";case"f":return"\f";case"n":return` +`;case"r":return"\r";case"t":return"\t";case"v":return"\v";case"0":return"\0";default:return e}}function t(e){return"^"===e.charAt(0)?e.substring(1):e}function r(e){return parseInt(e)}function n(e){return BigInt(e)}function i(e){return new Date(e)}function s(e){return Number(e)}function o(e){return"true"===e.toLowerCase()}var l;n0e(),$ge(),S4e=class{static{mt(this,"DefaultValueConverter")}convert(e,t){var r=t.grammarSource;if(tpe(r=Xde(r)?ige(r):r)){if(r=r.rule.ref)return this.runConverter(r,e,t);throw new Error("This cst node was not parsed by a rule.")}return e}runConverter(e,t,r){switch(e.name.toUpperCase()){case"INT":return A4e.convertInt(t);case"STRING":return A4e.convertString(t);case"ID":return A4e.convertID(t)}switch(null==(e=Sge(e))?void 0:e.toLowerCase()){case"number":return A4e.convertNumber(t);case"boolean":return A4e.convertBoolean(t);case"bigint":return A4e.convertBigint(t);case"date":return A4e.convertDate(t);default:return t}}},l=A4e=A4e||{},mt(e,"convertString"),l.convertString=e,mt(a,"convertEscapeCharacter"),mt(t,"convertID"),l.convertID=t,mt(r,"convertInt"),l.convertInt=r,mt(n,"convertBigint"),l.convertBigint=n,mt(i,"convertDate"),l.convertDate=i,mt(s,"convertNumber"),l.convertNumber=s,mt(o,"convertBoolean"),l.convertBoolean=o}),R4e=NFe(e=>{var t,r;function n(){if(void 0===t)throw new Error("No runtime abstraction layer installed");return t}function i(e){if(void 0===e)throw new Error("No runtime abstraction layer provided");t=e}Object.defineProperty(e,"__esModule",{value:!0}),mt(n,"RAL"),r=n,mt(i,"install"),r.install=i,e.default=n}),M4e=NFe(e=>{function t(e){return!0===e||!1===e}function r(e){return"string"==typeof e||e instanceof String}function n(e){return"number"==typeof e||e instanceof Number}function i(e){return e instanceof Error}function a(e){return"function"==typeof e}function s(e){return Array.isArray(e)}function o(e){return s(e)&&e.every(e=>r(e))}Object.defineProperty(e,"__esModule",{value:!0}),e.stringArray=e.array=e.func=e.error=e.number=e.string=e.boolean=void 0,mt(t,"boolean"),e.boolean=t,mt(r,"string"),e.string=r,mt(n,"number"),e.number=n,mt(i,"error"),e.error=i,mt(a,"func"),e.func=a,mt(s,"array"),e.array=s,mt(o,"stringArray"),e.stringArray=o}),D4e=NFe(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Emitter=t.Event=void 0;var s=R4e();{var r=t.Event={};let e={dispose(){}};r.None=function(){return e}}var i=class{static{mt(this,"CallbackList")}add(e,t=null,r){this._callbacks||(this._callbacks=[],this._contexts=[]),this._callbacks.push(e),this._contexts.push(t),Array.isArray(r)&&r.push({dispose:mt(()=>this.remove(e,t),"dispose")})}remove(n,i=null){if(this._callbacks){let r=!1;for(let e=0,t=this._callbacks.length;e<t;e++)if(this._callbacks[e]===n){if(this._contexts[e]===i)return this._callbacks.splice(e,1),void this._contexts.splice(e,1);r=!0}if(r)throw new Error("When adding a listener with a context, you should remove it with the same context")}}invoke(...r){if(!this._callbacks)return[];var n=[],i=this._callbacks.slice(0),a=this._contexts.slice(0);for(let e=0,t=i.length;e<t;e++)try{n.push(i[e].apply(a[e],r))}catch(e){(0,s.default)().console.error(e)}return n}isEmpty(){return!this._callbacks||0===this._callbacks.length}dispose(){this._callbacks=void 0,this._contexts=void 0}},r=class a{static{mt(this,"Emitter")}constructor(e){this._options=e}get event(){return this._event||(this._event=(e,t,r)=>{this._callbacks||(this._callbacks=new i),this._options&&this._options.onFirstListenerAdd&&this._callbacks.isEmpty()&&this._options.onFirstListenerAdd(this),this._callbacks.add(e,t);let n={dispose:mt(()=>{this._callbacks&&(this._callbacks.remove(e,t),n.dispose=a._noop,this._options)&&this._options.onLastListenerRemove&&this._callbacks.isEmpty()&&this._options.onLastListenerRemove(this)},"dispose")};return Array.isArray(r)&&r.push(n),n}),this._event}fire(e){this._callbacks&&this._callbacks.invoke.call(this._callbacks,e)}dispose(){this._callbacks&&(this._callbacks.dispose(),this._callbacks=void 0)}};(t.Emitter=r)._noop=function(){}}),O4e=NFe(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.CancellationTokenSource=e.CancellationToken=void 0;var t,r,n=R4e(),i=M4e(),a=D4e();function s(e){return e&&(e===r.None||e===r.Cancelled||i.boolean(e.isCancellationRequested)&&!!e.onCancellationRequested)}(r=t||(e.CancellationToken=t={})).None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:a.Event.None}),r.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:a.Event.None}),mt(s,"is"),r.is=s;var o=Object.freeze(function(e,t){let r=(0,n.default)().timer.setTimeout(e.bind(t),0);return{dispose(){r.dispose()}}}),l=class{static{mt(this,"MutableToken")}constructor(){this._isCancelled=!1}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?o:(this._emitter||(this._emitter=new a.Emitter),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=void 0)}},c=class{static{mt(this,"CancellationTokenSource")}get token(){return this._token||(this._token=new l),this._token}cancel(){this._token?this._token.cancel():this._token=t.Cancelled}dispose(){this._token?this._token instanceof l&&this._token.dispose():this._token=t.None}};e.CancellationTokenSource=c}),P4e={},B4e=b(()=>{U(P4e,q(O4e(),1))});function $4e(){return new Promise(e=>{"u"<typeof setImmediate?setTimeout(e,0):setImmediate(e)})}function F4e(){return q4e=performance.now(),new P4e.CancellationTokenSource}function z4e(e){j4e=e}function G4e(e){return e===Y4e}async function U4e(e){if(e!==P4e.CancellationToken.None){var t=performance.now();if(j4e<=t-q4e&&(q4e=t,await $4e(),q4e=performance.now()),e.isCancellationRequested)throw Y4e}}var q4e,j4e,Y4e,W4e,H4e=b(()=>{B4e(),mt($4e,"delayNextTick"),q4e=0,j4e=10,mt(F4e,"startCancelableOperation"),mt(z4e,"setInterruptionPeriod"),Y4e=Symbol("OperationCancelled"),mt(G4e,"isOperationCancelled"),mt(U4e,"interruptAndCheck"),W4e=class{static{mt(this,"Deferred")}constructor(){this.promise=new Promise((t,r)=>{this.resolve=e=>(t(e),this),this.reject=e=>(r(e),this)})}}});function V4e(n,i){if(!(n.length<=1)){var a=n.length/2|0,s=n.slice(0,a),o=n.slice(a);V4e(s,i),V4e(o,i);let e=0,t=0,r=0;for(;e<s.length&&t<o.length;)i(s[e],o[t])<=0?n[r++]=s[e++]:n[r++]=o[t++];for(;e<s.length;)n[r++]=s[e++];for(;t<o.length;)n[r++]=o[t++]}return n}function X4e(t,e,r=0){var n=e?[r]:[];for(let e=0;e<t.length;e++){var i=t.charCodeAt(e);K4e(i)&&(13===i&&e+1<t.length&&10===t.charCodeAt(e+1)&&e++,n.push(r+e+1))}return n}function K4e(e){return 13===e||10===e}function Z4e(e){var t=e.start,r=e.end;return t.line>r.line||t.line===r.line&&t.character>r.character?{start:r,end:t}:e}function Q4e(e){var t=Z4e(e.range);return t!==e.range?{newText:e.newText,range:t}:e}var J4e,e5e,t5e,r5e,n5e,i5e,a5e,s5e,o5e,l5e,c5e=b(()=>{function e(e,t,r,n){return new J4e(e,t,r,n)}function t(e,t,r){if(e instanceof J4e)return e.update(t,r),e;throw new Error("TextDocument.update: document must be created by TextDocument.create")}function r(e,t){let r=e.getText(),n=V4e(t.map(Q4e),(e,t)=>{var r=e.range.start.line-t.range.start.line;return 0==r?e.range.start.character-t.range.start.character:r}),i=0,a=[];for(var s of n){var o=e.offsetAt(s.range.start);if(o<i)throw new Error("Overlapping edit");o>i&&a.push(r.substring(i,o)),s.newText.length&&a.push(s.newText),i=e.offsetAt(s.range.end)}return a.push(r.substr(i)),a.join("")}var n;J4e=class i{static{mt(this,"FullTextDocument")}constructor(e,t,r,n){this._uri=e,this._languageId=t,this._version=r,this._content=n,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(e){var t;return e?(t=this.offsetAt(e.start),e=this.offsetAt(e.end),this._content.substring(t,e)):this._content}update(e,t){for(var a of e)if(i.isIncremental(a)){var s=Z4e(a.range),o=this.offsetAt(s.start),l=this.offsetAt(s.end);this._content=this._content.substring(0,o)+a.text+this._content.substring(l,this._content.length);let r=Math.max(s.start.line,0),e=Math.max(s.end.line,0),n=this._lineOffsets,i=X4e(a.text,!1,o);if(e-r===i.length)for(let e=0,t=i.length;e<t;e++)n[e+r+1]=i[e];else i.length<1e4?n.splice(r+1,e-r,...i):this._lineOffsets=n=n.slice(0,r+1).concat(i,n.slice(e+1));var c=a.text.length-(l-o);if(0!=c)for(let e=r+1+i.length,t=n.length;e<t;e++)n[e]=n[e]+c}else{if(!i.isFull(a))throw new Error("Unknown change event received");this._content=a.text,this._lineOffsets=void 0}this._version=t}getLineOffsets(){return void 0===this._lineOffsets&&(this._lineOffsets=X4e(this._content,!0)),this._lineOffsets}positionAt(e){e=Math.max(Math.min(e,this._content.length),0);let t=this.getLineOffsets(),r=0,n=t.length;if(0===n)return{line:0,character:e};for(;r<n;){var i=Math.floor((r+n)/2);t[i]>e?n=i:r=i+1}var a=r-1;return{line:a,character:(e=this.ensureBeforeEOL(e,t[a]))-t[a]}}offsetAt(e){var t,r=this.getLineOffsets();return e.line>=r.length?this._content.length:e.line<0?0:(t=r[e.line],e.character<=0?t:(r=e.line+1<r.length?r[e.line+1]:this._content.length,e=Math.min(t+e.character,r),this.ensureBeforeEOL(e,t)))}ensureBeforeEOL(e,t){for(;t<e&&K4e(this._content.charCodeAt(e-1));)e--;return e}get lineCount(){return this.getLineOffsets().length}static isIncremental(e){return null!=e&&"string"==typeof e.text&&void 0!==e.range&&(void 0===e.rangeLength||"number"==typeof e.rangeLength)}static isFull(e){return null!=e&&"string"==typeof e.text&&void 0===e.range&&void 0===e.rangeLength}},n=e5e=e5e||{},mt(e,"create"),n.create=e,mt(t,"update"),n.update=t,mt(r,"applyEdits"),n.applyEdits=r,mt(V4e,"mergeSort"),mt(X4e,"computeLineOffsets"),mt(K4e,"isEOL"),mt(Z4e,"getWellformedRange"),mt(Q4e,"getWellformedEdit")}),h5e=b(()=>{var r={470:e=>{function d(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}function a(e,t){for(var r,n="",i=0,a=-1,s=0,o=0;o<=e.length;++o){if(o<e.length)r=e.charCodeAt(o);else{if(47===r)break;r=47}if(47===r){if(a!==o-1&&1!==s)if(a!==o-1&&2===s){if(n.length<2||2!==i||46!==n.charCodeAt(n.length-1)||46!==n.charCodeAt(n.length-2))if(2<n.length){var l=n.lastIndexOf("/");if(l!==n.length-1){i=-1===l?(n="",0):(n=n.slice(0,l)).length-1-n.lastIndexOf("/"),a=o,s=0;continue}}else if(2===n.length||1===n.length){n="",a=o,s=i=0;continue}t&&(0<n.length?n+="/..":n="..",i=2)}else 0<n.length?n+="/"+e.slice(a+1,o):n=e.slice(a+1,o),i=o-a-1;a=o,s=0}else 46===r&&-1!==s?++s:s=-1}return n}mt(d,"e"),mt(a,"r");var p={resolve:mt(function(){for(var e,t="",r=!1,n=arguments.length-1;-1<=n&&!r;n--){var i=0<=n?arguments[n]:e=void 0===e?process.cwd():e;d(i),0!==i.length&&(t=i+"/"+t,r=47===i.charCodeAt(0))}return t=a(t,!r),r?0<t.length?"/"+t:"/":0<t.length?t:"."},"resolve"),normalize:mt(function(e){var t,r;return d(e),0===e.length?".":(t=47===e.charCodeAt(0),r=47===e.charCodeAt(e.length-1),0<(e=0!==(e=a(e,!t)).length||t?e:".").length&&r&&(e+="/"),t?"/"+e:e)},"normalize"),isAbsolute:mt(function(e){return d(e),0<e.length&&47===e.charCodeAt(0)},"isAbsolute"),join:mt(function(){if(0===arguments.length)return".";for(var e,t=0;t<arguments.length;++t){var r=arguments[t];d(r),0<r.length&&(void 0===e?e=r:e+="/"+r)}return void 0===e?".":p.normalize(e)},"join"),relative:mt(function(e,t){if(d(e),d(t),e===t||(e=p.resolve(e))===(t=p.resolve(t)))return"";for(var r=1;r<e.length&&47===e.charCodeAt(r);++r);for(var n=e.length,i=n-r,a=1;a<t.length&&47===t.charCodeAt(a);++a);for(var s=t.length-a,o=i<s?i:s,l=-1,c=0;c<=o;++c){if(c===o){if(o<s){if(47===t.charCodeAt(a+c))return t.slice(a+c+1);if(0===c)return t.slice(a+c)}else o<i&&(47===e.charCodeAt(r+c)?l=c:0===c&&(l=0));break}var h=e.charCodeAt(r+c);if(h!==t.charCodeAt(a+c))break;47===h&&(l=c)}for(var u="",c=r+l+1;c<=n;++c)c!==n&&47!==e.charCodeAt(c)||(0===u.length?u+="..":u+="/..");return 0<u.length?u+t.slice(a+l):(47===t.charCodeAt(a+=l)&&++a,t.slice(a))},"relative"),_makeLong:mt(function(e){return e},"_makeLong"),dirname:mt(function(e){if(d(e),0===e.length)return".";for(var t=47===e.charCodeAt(0),r=-1,n=!0,i=e.length-1;1<=i;--i)if(47===e.charCodeAt(i)){if(!n){r=i;break}}else n=!1;return-1===r?t?"/":".":t&&1===r?"//":e.slice(0,r)},"dirname"),basename:mt(function(e,t){if(void 0!==t&&"string"!=typeof t)throw new TypeError('"ext" argument must be a string');d(e);var r=0,n=-1,i=!0;if(void 0!==t&&0<t.length&&t.length<=e.length){if(t.length===e.length&&t===e)return"";for(var a=t.length-1,s=-1,o=e.length-1;0<=o;--o){var l=e.charCodeAt(o);if(47===l){if(!i){r=o+1;break}}else-1===s&&(i=!1,s=o+1),0<=a&&(l===t.charCodeAt(a)?-1==--a&&(n=o):(a=-1,n=s))}return r===n?n=s:-1===n&&(n=e.length),e.slice(r,n)}for(o=e.length-1;0<=o;--o)if(47===e.charCodeAt(o)){if(!i){r=o+1;break}}else-1===n&&(i=!1,n=o+1);return-1===n?"":e.slice(r,n)},"basename"),extname:mt(function(e){d(e);for(var t=-1,r=0,n=-1,i=!0,a=0,s=e.length-1;0<=s;--s){var o=e.charCodeAt(s);if(47!==o)-1===n&&(i=!1,n=s+1),46===o?-1===t?t=s:1!==a&&(a=1):-1!==t&&(a=-1);else if(!i){r=s+1;break}}return-1===t||-1===n||0===a||1===a&&t===n-1&&t===r+1?"":e.slice(t,n)},"extname"),format:mt(function(e){if(null===e||"object"!=typeof e)throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof e);return t=e.dir||e.root,r=e.base||(e.name||"")+(e.ext||""),t?t===e.root?t+r:t+"/"+r:r;var t,r},"format"),parse:mt(function(e){d(e);var t={root:"",dir:"",base:"",ext:"",name:""};if(0!==e.length){for(var r,n=47===e.charCodeAt(0),i=n?(t.root="/",1):0,a=-1,s=0,o=-1,l=!0,c=e.length-1,h=0;i<=c;--c)if(47!==(r=e.charCodeAt(c)))-1===o&&(l=!1,o=c+1),46===r?-1===a?a=c:1!==h&&(h=1):-1!==a&&(h=-1);else if(!l){s=c+1;break}-1===a||-1===o||0===h||1===h&&a===o-1&&a===s+1?-1!==o&&(t.base=t.name=0===s&&n?e.slice(1,o):e.slice(s,o)):(0===s&&n?(t.name=e.slice(1,a),t.base=e.slice(1,o)):(t.name=e.slice(s,a),t.base=e.slice(s,o)),t.ext=e.slice(a,o)),0<s?t.dir=e.slice(0,s-1):n&&(t.dir="/")}return t},"parse"),sep:"/",delimiter:":",win32:null,posix:null};p.posix=p,e.exports=p}},n={};function h(e){var t=n[e];return void 0===t&&(t=n[e]={exports:{}},r[e](t,t.exports,h)),t.exports}mt(h,"r"),h.d=(e,t)=>{for(var r in t)h.o(t,r)&&!h.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},h.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var u,d,p={};{let n,r=((h.r=e=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})})(p),h.d(p,{URI:mt(()=>w,"URI"),Utils:mt(()=>u,"Utils")}),"object"==typeof process?n="win32"===process.platform:"object"==typeof navigator&&(n=0<=navigator.userAgent.indexOf("Windows")),/^\w[\w\d+.-]*$/),i=/^\//,a=/^\/\//;function g(e,t){if(!e.scheme&&t)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${e.authority}", path: "${e.path}", query: "${e.query}", fragment: "${e.fragment}"}`);if(e.scheme&&!r.test(e.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(e.path)if(e.authority){if(!i.test(e.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(a.test(e.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}mt(g,"s");let s=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class w{static{mt(this,"f")}static isUri(e){return e instanceof w||!!e&&"string"==typeof e.authority&&"string"==typeof e.fragment&&"string"==typeof e.path&&"string"==typeof e.query&&"string"==typeof e.scheme&&"string"==typeof e.fsPath&&"function"==typeof e.with&&"function"==typeof e.toString}scheme;authority;path;query;fragment;constructor(e,t,r,n,i,a=!1){"object"==typeof e?(this.scheme=e.scheme||"",this.authority=e.authority||"",this.path=e.path||"",this.query=e.query||"",this.fragment=e.fragment||""):(this.scheme=e||a?e:"file",this.authority=t||"",this.path=((e,t)=>{switch(e){case"https":case"http":case"file":t?"/"!==t[0]&&(t="/"+t):t="/"}return t})(this.scheme,r||""),this.query=n||"",this.fragment=i||"",g(this,a))}get fsPath(){return y(this,!1)}with(e){if(!e)return this;let{scheme:t,authority:r,path:n,query:i,fragment:a}=e;return void 0===t?t=this.scheme:null===t&&(t=""),void 0===r?r=this.authority:null===r&&(r=""),void 0===n?n=this.path:null===n&&(n=""),void 0===i?i=this.query:null===i&&(i=""),void 0===a?a=this.fragment:null===a&&(a=""),t===this.scheme&&r===this.authority&&n===this.path&&i===this.query&&a===this.fragment?this:new k(t,r,n,i,a)}static parse(e,t=!1){return(e=s.exec(e))?new k(e[2]||"",b(e[4]||""),b(e[5]||""),b(e[7]||""),b(e[9]||""),t):new k("","","","","")}static file(e){let t="",r;return"/"===(e=n?e.replace(/\\/g,"/"):e)[0]&&"/"===e[1]&&(e=-1===(r=e.indexOf("/",2))?(t=e.substring(2),"/"):(t=e.substring(2,r),e.substring(r)||"/")),new k("file",t,e,"","")}static from(e){return g(e=new k(e.scheme,e.authority,e.path,e.query,e.fragment),!0),e}toString(e=!1){return v(this,e)}toJSON(){return this}static revive(e){var t;return e&&(e instanceof w?e:((t=new k(e))._formatted=e.external,t._fsPath=e._sep===o?e.fsPath:null,t))}}let o=n?1:void 0;class k extends w{static{mt(this,"l")}_formatted=null;_fsPath=null;get fsPath(){return this._fsPath||(this._fsPath=y(this,!1)),this._fsPath}toString(e=!1){return e?v(this,!0):(this._formatted||(this._formatted=v(this,!1)),this._formatted)}toJSON(){var e={$mid:1};return this._fsPath&&(e.fsPath=this._fsPath,e._sep=o),this._formatted&&(e.external=this._formatted),this.path&&(e.path=this.path),this.scheme&&(e.scheme=this.scheme),this.authority&&(e.authority=this.authority),this.query&&(e.query=this.query),this.fragment&&(e.fragment=this.fragment),e}}let l={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 f(t,r,n){let i,a=-1;for(let e=0;e<t.length;e++){var s=t.charCodeAt(e);97<=s&&s<=122||65<=s&&s<=90||48<=s&&s<=57||45===s||46===s||95===s||126===s||r&&47===s||n&&91===s||n&&93===s||n&&58===s?(-1!==a&&(i+=encodeURIComponent(t.substring(a,e)),a=-1),void 0!==i&&(i+=t.charAt(e))):(void 0===i&&(i=t.substr(0,e)),void 0!==(s=l[s])?(-1!==a&&(i+=encodeURIComponent(t.substring(a,e)),a=-1),i+=s):-1===a&&(a=e))}return-1!==a&&(i+=encodeURIComponent(t.substring(a))),void 0!==i?i:t}function m(t){let r;for(let e=0;e<t.length;e++){var n=t.charCodeAt(e);35===n||63===n?(void 0===r&&(r=t.substr(0,e)),r+=l[n]):void 0!==r&&(r+=t[e])}return void 0!==r?r:t}function y(e,t){let r;return r=e.authority&&1<e.path.length&&"file"===e.scheme?"//"+e.authority+e.path:47===e.path.charCodeAt(0)&&(65<=e.path.charCodeAt(1)&&e.path.charCodeAt(1)<=90||97<=e.path.charCodeAt(1)&&e.path.charCodeAt(1)<=122)&&58===e.path.charCodeAt(2)?t?e.path.substr(1):e.path[1].toLowerCase()+e.path.substr(2):e.path,r=n?r.replace(/\//g,"\\"):r}function v(t,e){let r=e?m:f,n="",{scheme:i,authority:a,path:s,query:o,fragment:l}=t;if(i&&(n=n+i+":"),!a&&"file"!==i||(n+="//"),a){let e=a.indexOf("@");-1!==e&&(t=a.substr(0,e),a=a.substr(e+1),-1===(e=t.lastIndexOf(":"))?n+=r(t,!1,!1):n=(n=n+r(t.substr(0,e),!1,!1)+":")+r(t.substr(e+1),!1,!0),n+="@"),a=a.toLowerCase(),-1===(e=a.lastIndexOf(":"))?n+=r(a,!1,!0):n=(n+=r(a.substr(0,e),!1,!0))+a.substr(e)}return s&&(3<=s.length&&47===s.charCodeAt(0)&&58===s.charCodeAt(2)?65<=(t=s.charCodeAt(1))&&t<=90&&(s=`/${String.fromCharCode(t+32)}:`+s.substr(3)):2<=s.length&&58===s.charCodeAt(1)&&65<=(t=s.charCodeAt(0))&&t<=90&&(s=String.fromCharCode(t+32)+":"+s.substr(2)),n+=r(s,!0,!1)),o&&(n=(n+="?")+r(o,!1,!1)),n=l?(n+="#")+(e?l:f(l,!1,!1)):n}function x(e){try{return decodeURIComponent(e)}catch{return 3<e.length?e.substr(0,3)+x(e.substr(3)):e}}mt(f,"d"),mt(m,"p"),mt(y,"m"),mt(v,"y"),mt(x,"v");let t=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function b(e){return e.match(t)?e.replace(t,e=>x(e)):e}mt(b,"C");let e=h(470),c=e.posix||e;(d=u=u||{}).joinPath=function(e,...t){return e.with({path:c.join(e.path,...t)})},d.resolvePath=function(e,...t){let r=e.path,n=!1,i=("/"!==r[0]&&(r="/"+r,n=!0),c.resolve(r,...t));return n&&"/"===i[0]&&!e.authority&&(i=i.substring(1)),e.with({path:i})},d.dirname=function(e){if(0===e.path.length||"/"===e.path)return e;let t=c.dirname(e.path);return 1===t.length&&46===t.charCodeAt(0)&&(t=""),e.with({path:t})},d.basename=function(e){return c.basename(e.path)},d.extname=function(e){return c.extname(e.path)}}({URI:t5e,Utils:r5e}=p)}),u5e=b(()=>{function e(e,t){return e?.toString()===t?.toString()}function t(e,t){let r="string"==typeof e?e:e.path,n="string"==typeof t?t:t.path,i=r.split("/").filter(e=>0<e.length),a=n.split("/").filter(e=>0<e.length),s=0;for(;s<i.length&&i[s]===a[s];s++);return"../".repeat(i.length-s)+a.slice(s).join("/")}function r(e){return t5e.parse(e.toString()).toString()}var n;h5e(),(n=n5e=n5e||{}).basename=r5e.basename,n.dirname=r5e.dirname,n.extname=r5e.extname,n.joinPath=r5e.joinPath,n.resolvePath=r5e.resolvePath,mt(e,"equals"),n.equals=e,mt(t,"relative"),n.relative=t,mt(r,"normalize"),n.normalize=r}),d5e=b(()=>{var e;c5e(),d5e(),B4e(),zue(),u5e(),(e=i5e=i5e||{})[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",a5e=class{static{mt(this,"DefaultLangiumDocumentFactory")}constructor(e){this.serviceRegistry=e.ServiceRegistry,this.textDocuments=e.workspace.TextDocuments,this.fileSystemProvider=e.workspace.FileSystemProvider}async fromUri(e,t=P4e.CancellationToken.None){var r=await this.fileSystemProvider.readFile(e);return this.createAsync(e,r,t)}fromTextDocument(e,t,r){return t=t??t5e.parse(e.uri),P4e.CancellationToken.is(r)?this.createAsync(t,e,r):this.create(t,e,r)}fromString(e,t,r){return P4e.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){var n;return"string"==typeof t?(n=this.parse(e,t,r),this.createLangiumDocument(n,e,void 0,t)):"$model"in t?(n={value:t.$model,parserErrors:[],lexerErrors:[]},this.createLangiumDocument(n,e)):(n=this.parse(e,t.getText(),r),this.createLangiumDocument(n,e,t))}async createAsync(e,t,r){var n;return"string"==typeof t?(n=await this.parseAsync(e,t,r),this.createLangiumDocument(n,e,void 0,t)):(n=await this.parseAsync(e,t.getText(),r),this.createLangiumDocument(n,e,t))}createLangiumDocument(t,r,e,n){let i;if(e)i={parseResult:t,uri:r,state:i5e.Parsed,references:[],textDocument:e};else{let e=this.createTextDocumentGetter(r,n);i={parseResult:t,uri:r,state:i5e.Parsed,references:[],get textDocument(){return e()}}}return t.value.$document=i}async update(e,t){var r=null==(r=e.parseResult.value.$cstNode)?void 0:r.root.fullText,n=null==(n=this.textDocuments)?void 0:n.get(e.uri.toString()),i=n?n.getText():await this.fileSystemProvider.readFile(e.uri);return n?Object.defineProperty(e,"textDocument",{value:n}):(n=this.createTextDocumentGetter(e.uri,i),Object.defineProperty(e,"textDocument",{get:n})),r!==i&&(e.parseResult=await this.parseAsync(e.uri,i,t),e.parseResult.value.$document=e),e.state=i5e.Parsed,e}parse(e,t,r){return this.serviceRegistry.getServices(e).parser.LangiumParser.parse(t,r)}parseAsync(e,t,r){return this.serviceRegistry.getServices(e).parser.AsyncParser.parse(t,r)}createTextDocumentGetter(e,t){let r=this.serviceRegistry,n;return()=>n=n??e5e.create(e.toString(),r.getServices(e).LanguageMetaData.languageId,0,t??"")}},s5e=class{static{mt(this,"DefaultLangiumDocuments")}constructor(e){this.documentMap=new Map,this.langiumDocumentFactory=e.workspace.LangiumDocumentFactory,this.serviceRegistry=e.ServiceRegistry}get all(){return Due(this.documentMap.values())}addDocument(e){var t=e.uri.toString();if(this.documentMap.has(t))throw new Error(`A document with the URI '${t}' is already present.`);this.documentMap.set(t,e)}getDocument(e){return e=e.toString(),this.documentMap.get(e)}async getOrCreateDocument(e,t){return this.getDocument(e)||(e=await this.langiumDocumentFactory.fromUri(e,t),this.addDocument(e),e)}createDocument(e,t,r){return r?this.langiumDocumentFactory.fromString(t,e,r).then(e=>(this.addDocument(e),e)):(r=this.langiumDocumentFactory.fromString(t,e),this.addDocument(r),r)}hasDocument(e){return this.documentMap.has(e.toString())}invalidateDocument(e){var t=e.toString();return(t=this.documentMap.get(t))&&(this.serviceRegistry.getServices(e).references.Linker.unlink(t),t.state=i5e.Changed,t.precomputedScopes=void 0,t.diagnostics=void 0),t}deleteDocument(e){var e=e.toString(),t=this.documentMap.get(e);return t&&(t.state=i5e.Changed,this.documentMap.delete(e)),t}}}),p5e=b(()=>{B4e(),Iue(),x0e(),H4e(),d5e(),o5e=Symbol("ref_resolving"),l5e=class{static{mt(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}async link(t,e=P4e.CancellationToken.None){for(var r of d0e(t.parseResult.value))await U4e(e),g0e(r).forEach(e=>this.doLink(e,t))}doLink(e,t){var r=e.reference;if(void 0===r._ref){r._ref=o5e;try{var n,i=this.getCandidate(e);_ue(i)?r._ref=i:(r._nodeDescription=i,this.langiumDocuments().hasDocument(i.documentUri)?(n=this.loadAstNode(i),r._ref=n??this.createLinkingError(e,i)):r._ref=void 0)}catch(t){console.error(`An error occurred while resolving reference to '${r.$refText}':`,t),i=null!=(n=t.message)?n:String(t),r._ref=Object.assign(Object.assign({},e),{message:`An error occurred while resolving reference to '${r.$refText}': `+i})}t.references.push(r)}}unlink(e){for(var t of e.references)delete t._ref,delete t._nodeDescription;e.references=[]}getCandidate(e){return this.scopeProvider.getScope(e).getElement(e.reference.$refText)??this.createLinkingError(e)}buildReference(n,i,e,a){let s=this,o={$refNode:e,$refText:a,get ref(){var e;if(Tue(this._ref))return this._ref;if(Cue(this._nodeDescription)){var t=s.loadAstNode(this._nodeDescription);this._ref=t??s.createLinkingError({reference:o,container:n,property:i},this._nodeDescription)}else if(void 0===this._ref){this._ref=o5e;var t=c0e(n).$document,r=s.getLinkedNode({reference:o,container:n,property:i});if(r.error&&t&&t.state<i5e.ComputedScopes)return this._ref=void 0;this._ref=null!=(e=r.node)?e:r.error,this._nodeDescription=r.descr,t?.references.push(this)}else if(this._ref===o5e)throw new Error(`Cyclic reference resolution detected: ${s.astNodeLocator.getAstNodePath(n)}/${i} (symbol '${a}')`);return Tue(this._ref)?this._ref:void 0},get $nodeDescription(){return this._nodeDescription},get error(){return _ue(this._ref)?this._ref:void 0}};return o}getLinkedNode(t){try{var r,n=this.getCandidate(t);return _ue(n)?{error:n}:(r=this.loadAstNode(n))?{node:r,descr:n}:{descr:n,error:this.createLinkingError(t,n)}}catch(e){return console.error(`An error occurred while resolving reference to '${t.reference.$refText}':`,e),n=null!=(r=e.message)?r:String(e),{error:Object.assign(Object.assign({},t),{message:`An error occurred while resolving reference to '${t.reference.$refText}': `+n})}}}loadAstNode(e){var t;return e.node||((t=this.langiumDocuments().getDocument(e.documentUri))?this.astNodeLocator.getAstNode(t.parseResult.value,e.path):void 0)}createLinkingError(e,t){(r=c0e(e.container).$document)&&r.state<i5e.ComputedScopes&&console.warn(`Attempted reference resolution before document reached ComputedScopes state (${r.uri}).`);var r=this.reflection.getReferenceType(e);return Object.assign(Object.assign({},e),{message:`Could not resolve reference to ${r} named '${e.reference.$refText}'.`,targetDescription:t})}}});function g5e(e){return"string"==typeof e.name}var f5e,m5e,y5e,v5e,x5e,b5e,w5e,k5e,T5e,E5e,C5e,_5e,S5e,A5e,L5e=b(()=>{$ge(),mt(g5e,"isNamed"),f5e=class{static{mt(this,"DefaultNameProvider")}getName(e){if(g5e(e))return e.name}getNameNode(e){return oge(e.$cstNode,"name")}}}),N5e=b(()=>{$ge(),Iue(),x0e(),cde(),zue(),u5e(),m5e=class{static{mt(this,"DefaultReferences")}constructor(e){this.nameProvider=e.references.NameProvider,this.index=e.shared.workspace.IndexManager,this.nodeLocator=e.workspace.AstNodeLocator}findDeclaration(e){if(e){var t=dge(e),r=e.astNode;if(t&&r){if(Eue(t=r[t.feature]))return t.ref;if(Array.isArray(t))for(var n of t)if(Eue(n)&&n.$refNode&&n.$refNode.offset<=e.offset&&n.$refNode.end>=e.end)return n.ref}if(r&&(t=this.nameProvider.getNameNode(r))&&(t===e||jue(e,t)))return r}}findDeclarationNode(e){if((e=this.findDeclaration(e))?.$cstNode)return this.nameProvider.getNameNode(e)??e.$cstNode}findReferences(e,t){var r,n=[];t.includeDeclaration&&(r=this.getReferenceToSelf(e))&&n.push(r);let i=this.index.findAllReferences(e,this.nodeLocator.getAstNodePath(e));return t.documentUri&&(i=i.filter(e=>n5e.equals(e.sourceUri,t.documentUri))),n.push(...i),Due(n)}getReferenceToSelf(e){var t,r=this.nameProvider.getNameNode(e);if(r)return t=l0e(e),e=this.nodeLocator.getAstNodePath(e),{sourceUri:t.uri,sourcePath:e,targetUri:t.uri,targetPath:e,segment:Wue(r),local:!0}}}}),I5e=b(()=>{zue(),y5e=class{static{mt(this,"MultiMap")}constructor(e){if(this.map=new Map,e)for(var[t,r]of e)this.add(t,r)}get size(){return Fue.sum(Due(this.map.values()).map(e=>e.length))}clear(){this.map.clear()}delete(e,t){var r;return void 0===t?this.map.delete(e):!!((r=this.map.get(e))&&0<=(t=r.indexOf(t)))&&(1===r.length?this.map.delete(e):r.splice(t,1),!0)}get(e){return null!=(e=this.map.get(e))?e:[]}has(e,t){return void 0===t?this.map.has(e):!!(e=this.map.get(e))&&0<=e.indexOf(t)}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(r){this.map.forEach((e,t)=>e.forEach(e=>r(e,t,this)))}[Symbol.iterator](){return this.entries().iterator()}entries(){return Due(this.map.entries()).flatMap(([t,e])=>e.map(e=>[t,e]))}keys(){return Due(this.map.keys())}values(){return Due(this.map.values()).flat()}entriesGroupedByKey(){return Due(this.map.entries())}},v5e=class{static{mt(this,"BiMap")}get size(){return this.map.size}constructor(e){if(this.map=new Map,this.inverse=new Map,e)for(var[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){var t=this.map.get(e);return void 0!==t&&(this.map.delete(e),this.inverse.delete(t),!0)}}}),R5e=b(()=>{B4e(),x0e(),I5e(),H4e(),x5e=class{static{mt(this,"DefaultScopeComputation")}constructor(e){this.nameProvider=e.references.NameProvider,this.descriptions=e.workspace.AstNodeDescriptionProvider}async computeExports(e,t=P4e.CancellationToken.None){return this.computeExportsForNode(e.parseResult.value,e,void 0,t)}async computeExportsForNode(e,t,r=h0e,n=P4e.CancellationToken.None){var i,a=[];this.exportNode(e,a,t);for(i of r(e))await U4e(n),this.exportNode(i,a,t);return a}exportNode(e,t,r){var n=this.nameProvider.getName(e);n&&t.push(this.descriptions.createDescription(e,n,r))}async computeLocalScopes(e,t=P4e.CancellationToken.None){var r,n=e.parseResult.value,i=new y5e;for(r of u0e(n))await U4e(t),this.processNode(r,e,i);return i}processNode(e,t,r){var n,i=e.$container;i&&(n=this.nameProvider.getName(e))&&r.add(i,this.descriptions.createDescription(e,n,t))}}}),M5e=b(()=>{zue(),b5e=class{static{mt(this,"StreamScope")}constructor(e,t,r){this.elements=e,this.outerScope=t,this.caseInsensitive=null!=(e=r?.caseInsensitive)&&e}getAllElements(){return this.outerScope?this.elements.concat(this.outerScope.getAllElements()):this.elements}getElement(t){return(this.caseInsensitive?this.elements.find(e=>e.name.toLowerCase()===t.toLowerCase()):this.elements.find(e=>e.name===t))||(this.outerScope?this.outerScope.getElement(t):void 0)}},w5e=class{static{mt(this,"MapScope")}constructor(e,t,r){var n;this.elements=new Map,this.caseInsensitive=null!=(r=r?.caseInsensitive)&&r;for(n of e){var i=this.caseInsensitive?n.name.toLowerCase():n.name;this.elements.set(i,n)}this.outerScope=t}getElement(e){var t=this.caseInsensitive?e.toLowerCase():e;return this.elements.get(t)||(this.outerScope?this.outerScope.getElement(e):void 0)}getAllElements(){let e=Due(this.elements.values());return e=this.outerScope?e.concat(this.outerScope.getAllElements()):e}},k5e={getElement(){},getAllElements(){return Pue}}}),D5e=b(()=>{T5e=class{static{mt(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")}},E5e=class extends T5e{static{mt(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){return this.throwIfDisposed(),this.cache.has(e)?this.cache.get(e):t?(t=t(),this.cache.set(e,t),t):void 0}delete(e){return this.throwIfDisposed(),this.cache.delete(e)}clear(){this.throwIfDisposed(),this.cache.clear()}},C5e=class extends T5e{static{mt(this,"ContextCache")}constructor(e){super(),this.cache=new Map,this.converter=e??(e=>e)}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){return this.throwIfDisposed(),(e=this.cacheForContext(e)).has(t)?e.get(t):r?(r=r(),e.set(t,r),r):void 0}delete(e,t){return this.throwIfDisposed(),this.cacheForContext(e).delete(t)}clear(e){this.throwIfDisposed(),e?(e=this.converter(e),this.cache.delete(e)):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}},_5e=class extends C5e{static{mt(this,"DocumentCache")}constructor(e,t){super(e=>e.toString()),t?(this.toDispose.push(e.workspace.DocumentBuilder.onDocumentPhase(t,e=>{this.clear(e.uri.toString())})),this.toDispose.push(e.workspace.DocumentBuilder.onUpdate((e,t)=>{for(var r of t)this.clear(r)}))):this.toDispose.push(e.workspace.DocumentBuilder.onUpdate((e,t)=>{var r;for(r of e.concat(t))this.clear(r)}))}},S5e=class extends E5e{static{mt(this,"WorkspaceCache")}constructor(e,t){super(),t?(this.toDispose.push(e.workspace.DocumentBuilder.onBuildPhase(t,()=>{this.clear()})),this.toDispose.push(e.workspace.DocumentBuilder.onUpdate((e,t)=>{0<t.length&&this.clear()}))):this.toDispose.push(e.workspace.DocumentBuilder.onUpdate(()=>{this.clear()}))}}}),O5e=b(()=>{M5e(),x0e(),zue(),D5e(),A5e=class{static{mt(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 S5e(e.shared)}getScope(t){let r=[],n=this.reflection.getReferenceType(t),i=l0e(t.container).precomputedScopes;if(i){let e=t.container;do{var a=i.get(e);0<a.length&&r.push(Due(a).filter(e=>this.reflection.isSubtype(e.type,n))),e=e.$container}while(e)}let s=this.getGlobalScope(n,t);for(let e=r.length-1;0<=e;e--)s=this.createScope(r[e],s);return s}createScope(e,t,r){return new b5e(Due(e),t,r)}createScopeForNodes(e,t,r){return e=Due(e).map(e=>{var t=this.nameProvider.getName(e);if(t)return this.descriptions.createDescription(e,t)}).nonNullable(),new b5e(e,t,r)}getGlobalScope(e,t){return this.globalScopeCache.get(e,()=>new w5e(this.indexManager.allElements(e)))}}});function P5e(e){return"string"==typeof e.$comment}function B5e(e){return"object"==typeof e&&!!e&&("$ref"in e||"$error"in e)}var $5e,F5e,z5e=b(()=>{h5e(),Iue(),x0e(),$ge(),mt(P5e,"isAstNodeWithComment"),mt(B5e,"isIntermediateReference"),$5e=class{static{mt(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=mt((e,t)=>this.replacer(e,t,r),"defaultReplacer"),a=n?(e,t)=>n(e,t,i):i;try{return this.currentDocument=l0e(e),JSON.stringify(e,a,t?.space)}finally{this.currentDocument=void 0}}deserialize(e,t){return t=t??{},e=JSON.parse(e),this.linkNode(e,e,t),e}replacer(t,r,{refText:n,sourceText:i,textRegions:a,comments:s,uriConverter:o}){if(!this.ignoreProperties.has(t)){if(Eue(r)){var l=r.ref,n=n?r.$refText:void 0;if(l){let e=l0e(l),t="";return this.currentDocument&&this.currentDocument!==e&&(t=o?o(e.uri,r):e.uri.toString()),o=this.astNodeLocator.getAstNodePath(l),{$ref:t+"#"+o,$refText:n}}return{$error:null!=(o=null==(l=r.error)?void 0:l.message)?o:"Could not resolve reference",$refText:n}}if(Tue(r)){let e;return a&&(e=this.addAstNodeRegionWithAssignmentsTo(Object.assign({},r)),!t||r.$document)&&e?.$textRegion&&(e.$textRegion.documentURI=null==(l=this.currentDocument)?void 0:l.uri.toString()),i&&!t&&((e=e??Object.assign({},r)).$sourceText=null==(o=r.$cstNode)?void 0:o.text),s&&(e=e??Object.assign({},r),n=this.commentProvider.getComment(r))&&(e.$comment=n.replace(/\r/g,"")),e??r}return r}}addAstNodeRegionWithAssignmentsTo(n){let i=mt(e=>({offset:e.offset,end:e.end,length:e.length,range:e.range}),"createDocumentSegment");if(n.$cstNode){let e=n.$textRegion=i(n.$cstNode),r=e.assignments={};return Object.keys(n).filter(e=>!e.startsWith("$")).forEach(e=>{var t=sge(n.$cstNode,e).map(i);0!==t.length&&(r[e]=t)}),n}}linkNode(t,r,n,e,i,a){for(var[s,o]of Object.entries(t))if(Array.isArray(o))for(let e=0;e<o.length;e++){var l=o[e];B5e(l)?o[e]=this.reviveReference(t,s,r,l,n):Tue(l)&&this.linkNode(l,r,n,t,s,e)}else B5e(o)?t[s]=this.reviveReference(t,s,r,o,n):Tue(o)&&this.linkNode(o,r,n,t,s);var c=t;c.$container=e,c.$containerProperty=i,c.$containerIndex=a}reviveReference(e,t,r,n,i){let a=n.$refText,s=n.$error;if(n.$ref){if(Tue(r=this.getRefNode(r,n.$ref,i.uriConverter)))return{$refText:(a=a||this.nameProvider.getName(r))??"",ref:r};s=r}return s?((n={$refText:a??""}).error={container:e,property:t,message:s,reference:n},n):void 0}getRefNode(e,t,r){try{var n,i,a,s,o=t.indexOf("#");return 0===o?this.astNodeLocator.getAstNode(e,t.substring(1))||"Could not resolve path: "+t:o<0?(n=r?r(t):t5e.parse(t),(i=this.langiumDocuments.getDocument(n))?i.parseResult.value:"Could not find document for URI: "+t):(a=r?r(t.substring(0,o)):t5e.parse(t.substring(0,o)),(s=this.langiumDocuments.getDocument(a))?o===t.length-1?s.parseResult.value:this.astNodeLocator.getAstNode(s.parseResult.value,t.substring(o+1))||"Could not resolve URI: "+t:"Could not find document for URI: "+t)}catch(e){return String(e)}}}}),G5e=b(()=>{u5e(),F5e=class{static{mt(this,"DefaultServiceRegistry")}get map(){return this.fileExtensionMap}constructor(e){this.languageIdMap=new Map,this.fileExtensionMap=new Map,this.textDocuments=e?.workspace.TextDocuments}register(e){var t,r=e.LanguageMetaData;for(t of r.fileExtensions)this.fileExtensionMap.has(t)&&console.warn(`The file extension ${t} is used by multiple languages. It is now assigned to '${r.languageId}'.`),this.fileExtensionMap.set(t,e);this.languageIdMap.set(r.languageId,e),1===this.languageIdMap.size?this.singleton=e:this.singleton=void 0}getServices(e){if(void 0!==this.singleton)return this.singleton;if(0===this.languageIdMap.size)throw new Error("The service registry is empty. Use `register` to register the services of a language.");var t=null==(t=null==(t=this.textDocuments)?void 0:t.get(e))?void 0:t.languageId;if(void 0!==t){var r=this.languageIdMap.get(t);if(r)return r}if(r=n5e.extname(e),e=this.fileExtensionMap.get(r))return e;throw t?new Error(`The service registry contains no services for the extension '${r}' for language '${t}'.`):new Error(`The service registry contains no services for the extension '${r}'.`)}hasServices(e){try{return this.getServices(e),!0}catch{return!1}}get all(){return Array.from(this.languageIdMap.values())}}});function U5e(e){return{code:e}}var q5e,j5e,Y5e=b(()=>{Wwe(),I5e(),H4e(),zue(),mt(U5e,"diagnosticData"),(q5e=q5e||{}).all=["fast","slow","built-in"],j5e=class{static{mt(this,"ValidationRegistry")}constructor(e){this.entries=new y5e,this.entriesBefore=[],this.entriesAfter=[],this.reflection=e.shared.AstReflection}register(e,t=this,r="fast"){if("built-in"===r)throw new Error("The 'built-in' category is reserved for lexer, parser, and linker errors.");for(var[n,i]of Object.entries(e))if(Array.isArray(i))for(var a of i)a={check:this.wrapValidationException(a,t),category:r},this.addEntry(n,a);else"function"==typeof i?(i={check:this.wrapValidationException(i,t),category:r},this.addEntry(n,i)):hde()}wrapValidationException(n,i){return async(e,t,r)=>{await this.handleException(()=>n.call(i,e,t,r),"An error occurred during validation",t,e)}}async handleException(e,t,r,n){try{await e()}catch(e){if(G4e(e))throw e;console.error(t+":",e),e instanceof Error&&e.stack&&console.error(e.stack),r("error",t+": "+(e instanceof Error?e.message:String(e)),{node:n})}}addEntry(e,t){if("AstNode"===e)this.entries.add("AstNode",t);else for(var r of this.reflection.getAllSubTypes(e))this.entries.add(r,t)}getChecks(e,t){let r=Due(this.entries.get(e)).concat(this.entries.get("AstNode"));return(r=t?r.filter(e=>t.includes(e.category)):r).map(e=>e.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(i,a,s){return async(e,t,r,n)=>{await this.handleException(()=>i.call(s,e,t,r,n),a,t,e)}}get checksBefore(){return this.entriesBefore}get checksAfter(){return this.entriesAfter}}});function W5e(e){if(e.range)return e.range;let t;return"string"==typeof e.property?t=oge(e.node.$cstNode,e.property,e.index):"string"==typeof e.keyword&&(t=hge(e.node.$cstNode,e.keyword,e.index)),(t=t??e.node.$cstNode)?t.range:{start:{line:0,character:0},end:{line:0,character:0}}}function H5e(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 V5e(e){switch(e){case"error":return U5e(K5e.LexingError);case"warning":return U5e(K5e.LexingWarning);case"info":return U5e(K5e.LexingInfo);case"hint":return U5e(K5e.LexingHint);default:throw new Error("Invalid diagnostic severity: "+e)}}var X5e,K5e,Z5e,Q5e,J5e,e3e,t3e,r3e,n3e,i3e,a3e=b(()=>{var e;B4e(),$ge(),x0e(),cde(),H4e(),Y5e(),X5e=class{static{mt(this,"DefaultDocumentValidator")}constructor(e){this.validationRegistry=e.validation.ValidationRegistry,this.metadata=e.LanguageMetaData}async validateDocument(e,t={},r=P4e.CancellationToken.None){var n=e.parseResult,i=[];if(await U4e(r),t.categories&&!t.categories.includes("built-in")||(this.processLexingErrors(n,i,t),!(t.stopAfterLexingErrors&&i.some(e=>(null==(e=e.data)?void 0:e.code)===K5e.LexingError)||(this.processParsingErrors(n,i,t),t.stopAfterParsingErrors&&i.some(e=>(null==(e=e.data)?void 0:e.code)===K5e.ParsingError))||(this.processLinkingErrors(e,i,t),t.stopAfterLinkingErrors&&i.some(e=>(null==(e=e.data)?void 0:e.code)===K5e.LinkingError))))){try{i.push(...await this.validateAst(n.value,t,r))}catch(e){if(G4e(e))throw e;console.error("An error occurred during validation:",e)}await U4e(r)}return i}processLexingErrors(e,t,r){var n;for(n of[...e.lexerErrors,...null!=(e=null==(e=e.lexerReport)?void 0:e.diagnostics)?e:[]]){var i={severity:H5e(i=null!=(i=n.severity)?i:"error"),range:{start:{line:n.line-1,character:n.column-1},end:{line:n.line-1,character:n.column+n.length-1}},message:n.message,data:V5e(i),source:this.getSource()};t.push(i)}}processParsingErrors(e,t,r){for(var n of e.parserErrors){let e;var i,a;isNaN(n.token.startOffset)?"previousToken"in n&&(a=n.previousToken,e=isNaN(a.startOffset)?{start:i={line:0,character:0},end:i}:{start:i={line:a.endLine-1,character:a.endColumn},end:i}):e=Yue(n.token),e&&(a={severity:H5e("error"),range:e,message:n.message,data:U5e(K5e.ParsingError),source:this.getSource()},t.push(a))}}processLinkingErrors(e,t,r){for(var n of e.references){var i;(n=n.error)&&(i={node:n.container,property:n.property,index:n.index,data:{code:K5e.LinkingError,containerType:n.container.$type,property:n.property,refText:n.reference.$refText}},t.push(this.toDiagnostic("error",n.message,i)))}}async validateAst(e,t,r=P4e.CancellationToken.None){let n=[],i=mt((e,t,r)=>{n.push(this.toDiagnostic(e,t,r))},"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=P4e.CancellationToken.None){var i,a;for(a of this.validationRegistry.checksBefore)await U4e(n),await a(e,r,null!=(i=t.categories)?i:[],n)}async validateAstNodes(e,r,n,i=P4e.CancellationToken.None){await Promise.all(d0e(e).map(async e=>{var t;await U4e(i);for(t of this.validationRegistry.getChecks(e.$type,r.categories))await t(e,n,i)}))}async validateAstAfter(e,t,r,n=P4e.CancellationToken.None){var i,a;for(a of this.validationRegistry.checksAfter)await U4e(n),await a(e,r,null!=(i=t.categories)?i:[],n)}toDiagnostic(e,t,r){return{message:t,range:W5e(r),severity:H5e(e),code:r.code,codeDescription:r.codeDescription,tags:r.tags,relatedInformation:r.relatedInformation,data:r.data,source:this.getSource()}}getSource(){return this.metadata.languageId}},mt(W5e,"getDiagnosticRange"),mt(H5e,"toDiagnosticSeverity"),mt(V5e,"toDiagnosticData"),(e=K5e=K5e||{}).LexingError="lexing-error",e.LexingWarning="lexing-warning",e.LexingInfo="lexing-info",e.LexingHint="lexing-hint",e.ParsingError="parsing-error",e.LinkingError="linking-error"}),s3e=b(()=>{B4e(),Iue(),x0e(),cde(),H4e(),u5e(),Z5e=class{static{mt(this,"DefaultAstNodeDescriptionProvider")}constructor(e){this.astNodeLocator=e.workspace.AstNodeLocator,this.nameProvider=e.references.NameProvider}createDescription(t,e,r){var r=r??l0e(t),n=(e=e??this.nameProvider.getName(t),this.astNodeLocator.getAstNodePath(t));if(!e)throw new Error(`Node at path ${n} has no name.`);let i,a=mt(()=>{var e;return i=i??Wue(null!=(e=this.nameProvider.getNameNode(t))?e:t.$cstNode)},"nameSegmentGetter");return{node:t,name:e,get nameSegment(){return a()},selectionSegment:Wue(t.$cstNode),type:t.$type,documentUri:r.uri,path:n}}},Q5e=class{static{mt(this,"DefaultReferenceDescriptionProvider")}constructor(e){this.nodeLocator=e.workspace.AstNodeLocator}async createDescriptions(e,t=P4e.CancellationToken.None){let r=[],n=e.parseResult.value;for(var i of d0e(n))await U4e(t),g0e(i).filter(e=>!_ue(e)).forEach(e=>{(e=this.createDescription(e))&&r.push(e)});return r}createDescription(e){var t,r=e.reference.$nodeDescription,n=e.reference.$refNode;if(r&&n)return{sourceUri:t=l0e(e.container).uri,sourcePath:this.nodeLocator.getAstNodePath(e.container),targetUri:r.documentUri,targetPath:r.path,segment:Wue(n),local:n5e.equals(r.documentUri,t)}}}}),o3e=b(()=>{J5e=class{static{mt(this,"DefaultAstNodeLocator")}constructor(){this.segmentSeparator="/",this.indexSeparator="@"}getAstNodePath(e){var t;return e.$container?(t=this.getAstNodePath(e.$container),e=this.getPathSegment(e),t+this.segmentSeparator+e):""}getPathSegment({$containerProperty:e,$containerIndex:t}){if(e)return void 0!==t?e+this.indexSeparator+t:e;throw new Error("Missing '$containerProperty' in AST node.")}getAstNode(e,t){return t.split(this.segmentSeparator).reduce((e,t)=>{var r,n;return e&&0!==t.length?0<(n=t.indexOf(this.indexSeparator))?(r=t.substring(0,n),n=parseInt(t.substring(n+1)),e[r]?.[n]):e[t]:e},e)}}}),l3e={},c3e=b(()=>{U(l3e,q(D4e(),1))}),h3e=b(()=>{c3e(),H4e(),e3e=class{static{mt(this,"DefaultConfigurationProvider")}constructor(e){this._ready=new W4e,this.settings={},this.workspaceConfig=!1,this.onConfigurationSectionUpdateEmitter=new l3e.Emitter,this.serviceRegistry=e.ServiceRegistry}get ready(){return this._ready.promise}initialize(e){this.workspaceConfig=null!=(e=null==(e=e.capabilities.workspace)?void 0:e.configuration)&&e}async initialized(t){var e;if(this.workspaceConfig&&(t.register&&(e=this.serviceRegistry.all,t.register({section:e.map(e=>this.toSectionName(e.LanguageMetaData.languageId))})),t.fetchConfiguration)){let e=this.serviceRegistry.all.map(e=>({section:this.toSectionName(e.LanguageMetaData.languageId)})),r=await t.fetchConfiguration(e);e.forEach((e,t)=>{this.updateSectionConfiguration(e.section,r[t])})}this._ready.resolve()}updateConfiguration(r){r.settings&&Object.keys(r.settings).forEach(e=>{var t=r.settings[e];this.updateSectionConfiguration(e,t),this.onConfigurationSectionUpdateEmitter.fire({section:e,configuration:t})})}updateSectionConfiguration(e,t){this.settings[e]=t}async getConfiguration(e,t){if(await this.ready,e=this.toSectionName(e),this.settings[e])return this.settings[e][t]}toSectionName(e){return""+e}get onConfigurationSectionUpdate(){return this.onConfigurationSectionUpdateEmitter.event}}}),u3e=b(()=>{function e(e){return{dispose:mt(async()=>e(),"dispose")}}var t=t3e=t3e||{};mt(e,"create"),t.create=e}),d3e=b(()=>{B4e(),u3e(),I5e(),H4e(),zue(),Y5e(),d5e(),r3e=class{static{mt(this,"DefaultDocumentBuilder")}constructor(e){this.updateBuildOptions={validation:{categories:["built-in","fast"]}},this.updateListeners=[],this.buildPhaseListeners=new y5e,this.documentPhaseListeners=new y5e,this.buildState=new Map,this.documentBuildWaiters=new Map,this.currentState=i5e.Changed,this.langiumDocuments=e.workspace.LangiumDocuments,this.langiumDocumentFactory=e.workspace.LangiumDocumentFactory,this.textDocuments=e.workspace.TextDocuments,this.indexManager=e.workspace.IndexManager,this.serviceRegistry=e.ServiceRegistry}async build(e,r={},t=P4e.CancellationToken.None){var n;for(n of e){var i,a=n.uri.toString();if(n.state===i5e.Validated){if("boolean"==typeof r.validation&&r.validation)n.state=i5e.IndexedReferences,n.diagnostics=void 0,this.buildState.delete(a);else if("object"==typeof r.validation){let e=this.buildState.get(a),t=null==(i=e?.result)?void 0:i.validationChecks;t&&0<(i=(null!=(i=r.validation.categories)?i:q5e.all).filter(e=>!t.includes(e))).length&&(this.buildState.set(a,{completed:!1,options:{validation:Object.assign(Object.assign({},r.validation),{categories:i})},result:e.result}),n.state=i5e.IndexedReferences)}}else this.buildState.delete(a)}this.currentState=i5e.Changed,await this.emitUpdate(e.map(e=>e.uri),[]),await this.buildDocuments(e,r,t)}async update(e,t,r=P4e.CancellationToken.None){this.currentState=i5e.Changed;for(var n of t)this.langiumDocuments.deleteDocument(n),this.buildState.delete(n.toString()),this.indexManager.remove(n);for(var i of e){var a;this.langiumDocuments.invalidateDocument(i)||((a=this.langiumDocumentFactory.fromModel({$type:"INVALID"},i)).state=i5e.Changed,this.langiumDocuments.addDocument(a)),this.buildState.delete(i.toString())}let s=Due(e).concat(t).map(e=>e.toString()).toSet();this.langiumDocuments.all.filter(e=>!s.has(e.uri.toString())&&this.shouldRelink(e,s)).forEach(e=>{this.serviceRegistry.getServices(e.uri).references.Linker.unlink(e),e.state=Math.min(e.state,i5e.ComputedScopes),e.diagnostics=void 0}),await this.emitUpdate(e,t),await U4e(r),e=this.sortDocuments(this.langiumDocuments.all.filter(e=>e.state<i5e.Linked||!(null!=(e=this.buildState.get(e.uri.toString()))&&e.completed)).toArray()),await this.buildDocuments(e,this.updateBuildOptions,r)}async emitUpdate(t,r){await Promise.all(this.updateListeners.map(e=>e(t,r)))}sortDocuments(e){let t=0,r=e.length-1;for(;t<r;){for(;t<e.length&&this.hasTextDocument(e[t]);)t++;for(;0<=r&&!this.hasTextDocument(e[r]);)r--;t<r&&([e[t],e[r]]=[e[r],e[t]])}return e}hasTextDocument(e){var t;return!(null==(t=this.textDocuments)||!t.get(e.uri))}shouldRelink(e,t){return!!e.references.some(e=>void 0!==e.error)||this.indexManager.isAffected(e,t)}onUpdate(t){return this.updateListeners.push(t),t3e.create(()=>{var e=this.updateListeners.indexOf(t);0<=e&&this.updateListeners.splice(e,1)})}async buildDocuments(e,t,r){this.prepareBuild(e,t),await this.runCancelable(e,i5e.Parsed,r,e=>this.langiumDocumentFactory.update(e,r)),await this.runCancelable(e,i5e.IndexedContent,r,e=>this.indexManager.updateContent(e,r)),await this.runCancelable(e,i5e.ComputedScopes,r,async e=>{var t=this.serviceRegistry.getServices(e.uri).references.ScopeComputation;e.precomputedScopes=await t.computeLocalScopes(e,r)}),await this.runCancelable(e,i5e.Linked,r,e=>this.serviceRegistry.getServices(e.uri).references.Linker.link(e,r)),await this.runCancelable(e,i5e.IndexedReferences,r,e=>this.indexManager.updateReferences(e,r));var n,t=e.filter(e=>this.shouldValidate(e));await this.runCancelable(t,i5e.Validated,r,e=>this.validate(e,r));for(n of e){var i=this.buildState.get(n.uri.toString());i&&(i.completed=!0)}}prepareBuild(e,t){for(var r of e){var r=r.uri.toString(),n=this.buildState.get(r);n&&!n.completed||this.buildState.set(r,{completed:!1,options:t,result:n?.result})}}async runCancelable(e,t,r,n){var i;for(i of e.filter(e=>e.state<t))await U4e(r),await n(i),i.state=t,await this.notifyDocumentPhase(i,t,r);e=e.filter(e=>e.state===t),await this.notifyBuildPhase(e,t,r),this.currentState=t}onBuildPhase(e,t){return this.buildPhaseListeners.add(e,t),t3e.create(()=>{this.buildPhaseListeners.delete(e,t)})}onDocumentPhase(e,t){return this.documentPhaseListeners.add(e,t),t3e.create(()=>{this.documentPhaseListeners.delete(e,t)})}waitUntil(i,e,a){let s;return e&&"path"in e?s=e:a=e,a=a??P4e.CancellationToken.None,s&&(e=this.langiumDocuments.getDocument(s))&&e.state>i?Promise.resolve(s):this.currentState>=i?Promise.resolve(void 0):a.isCancellationRequested?Promise.reject(Y4e):new Promise((t,e)=>{let r=this.onBuildPhase(i,()=>{var e;r.dispose(),n.dispose(),s?(e=this.langiumDocuments.getDocument(s),t(e?.uri)):t(void 0)}),n=a.onCancellationRequested(()=>{r.dispose(),n.dispose(),e(Y4e)})})}async notifyDocumentPhase(e,t,r){var n;for(n of this.documentPhaseListeners.get(t).slice())try{await n(e,r)}catch(e){if(!G4e(e))throw e}}async notifyBuildPhase(e,t,r){var n;if(0!==e.length)for(n of this.buildPhaseListeners.get(t).slice())await U4e(r),await n(e,r)}shouldValidate(e){return!!this.getBuildOptions(e).validation}async validate(e,t){var r=this.serviceRegistry.getServices(e.uri).validation.DocumentValidator,n=this.getBuildOptions(e).validation,r=await r.validateDocument(e,n="object"==typeof n?n:void 0,t);e.diagnostics?e.diagnostics.push(...r):e.diagnostics=r,(t=this.buildState.get(e.uri.toString()))&&(null==t.result&&(t.result={}),e=null!=(r=n?.categories)?r:q5e.all,t.result.validationChecks?t.result.validationChecks.push(...e):t.result.validationChecks=[...e])}getBuildOptions(e){return null!=(e=null==(e=this.buildState.get(e.uri.toString()))?void 0:e.options)?e:{}}}}),p3e=b(()=>{x0e(),D5e(),B4e(),zue(),u5e(),n3e=class{static{mt(this,"DefaultIndexManager")}constructor(e){this.symbolIndex=new Map,this.symbolByTypeIndex=new C5e,this.referenceIndex=new Map,this.documents=e.workspace.LangiumDocuments,this.serviceRegistry=e.ServiceRegistry,this.astReflection=e.AstReflection}findAllReferences(e,t){let r=l0e(e).uri,n=[];return this.referenceIndex.forEach(e=>{e.forEach(e=>{n5e.equals(e.targetUri,r)&&e.targetPath===t&&n.push(e)})}),Due(n)}allElements(t,r){let e=Due(this.symbolIndex.keys());return(e=r?e.filter(e=>!r||r.has(e)):e).map(e=>this.getFileDescriptions(e,t)).flat()}getFileDescriptions(t,r){var e;return r?this.symbolByTypeIndex.get(t,r,()=>{var e;return(null!=(e=this.symbolIndex.get(t))?e:[]).filter(e=>this.astReflection.isSubtype(e.type,r))}):null!=(e=this.symbolIndex.get(t))?e:[]}remove(e){e=e.toString(),this.symbolIndex.delete(e),this.symbolByTypeIndex.clear(e),this.referenceIndex.delete(e)}async updateContent(e,t=P4e.CancellationToken.None){t=await this.serviceRegistry.getServices(e.uri).references.ScopeComputation.computeExports(e,t),e=e.uri.toString(),this.symbolIndex.set(e,t),this.symbolByTypeIndex.clear(e)}async updateReferences(e,t=P4e.CancellationToken.None){t=await this.serviceRegistry.getServices(e.uri).workspace.ReferenceDescriptionProvider.createDescriptions(e,t),this.referenceIndex.set(e.uri.toString(),t)}isAffected(e,t){return!!(e=this.referenceIndex.get(e.uri.toString()))&&e.some(e=>!e.local&&t.has(e.targetUri.toString()))}}}),g3e=b(()=>{B4e(),H4e(),u5e(),i3e=class{static{mt(this,"DefaultWorkspaceManager")}constructor(e){this.initialBuildOptions={},this._ready=new W4e,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=null!=(e=e.workspaceFolders)?e:void 0}initialized(e){return this.mutex.write(e=>{var t;return this.initializeWorkspace(null!=(t=this.folders)?t:[],e)})}async initializeWorkspace(e,t=P4e.CancellationToken.None){e=await this.performStartup(e),await U4e(t),await this.documentBuilder.build(e,this.initialBuildOptions,t)}async performStartup(e){let t=this.serviceRegistry.all.flatMap(e=>e.LanguageMetaData.fileExtensions),r=[],n=mt(e=>{r.push(e),this.langiumDocuments.hasDocument(e.uri)||this.langiumDocuments.addDocument(e)},"collector");return await this.loadAdditionalDocuments(e,n),await Promise.all(e.map(e=>[e,this.getRootFolder(e)]).map(async e=>this.traverseFolder(...e,t,n))),this._ready.resolve(),r}loadAdditionalDocuments(e,t){return Promise.resolve()}getRootFolder(e){return t5e.parse(e.uri)}async traverseFolder(t,e,r,n){e=await this.fileSystemProvider.readDirectory(e),await Promise.all(e.map(async e=>{this.includeEntry(t,e,r)&&(e.isDirectory?await this.traverseFolder(t,e.uri,r,n):e.isFile&&(e=await this.langiumDocuments.getOrCreateDocument(e.uri),n(e)))}))}includeEntry(e,t,r){var n=n5e.basename(t.uri);return!n.startsWith(".")&&(t.isDirectory?"node_modules"!==n&&"out"!==n:!!t.isFile&&(n=n5e.extname(t.uri),r.includes(n)))}}});function f3e(e){return Array.isArray(e)&&(0===e.length||"name"in e[0])}function m3e(e){return e&&"modes"in e&&"defaultMode"in e}function y3e(e){return!f3e(e)&&!m3e(e)}var v3e,x3e,b3e,w3e=b(()=>{H2e(),v3e=class{static{mt(this,"DefaultLexerErrorMessageProvider")}buildUnexpectedCharactersMessage(e,t,r,n,i){return Xfe.buildUnexpectedCharactersMessage(e,t,r,n,i)}buildUnableToPopLexerModeMessage(e){return Xfe.buildUnableToPopLexerModeMessage(e)}},x3e={mode:"full"},b3e=class{static{mt(this,"DefaultLexer")}constructor(e){this.errorMessageProvider=e.parser.LexerErrorMessageProvider,this.tokenBuilder=e.parser.TokenBuilder;var t=this.tokenBuilder.buildTokens(e.Grammar,{caseInsensitive:e.LanguageMetaData.caseInsensitive}),t=(this.tokenTypes=this.toTokenTypeDictionary(t),y3e(t)?Object.values(t):t),e="production"===e.LanguageMetaData.mode;this.chevrotainLexer=new Qfe(t,{positionTracking:"full",skipValidations:e,errorMessageProvider:this.errorMessageProvider})}get definition(){return this.tokenTypes}tokenize(e,t=0){var r,n=this.chevrotainLexer.tokenize(e);return{tokens:n.tokens,errors:n.errors,hidden:null!=(n=n.groups.hidden)?n:[],report:null==(r=(n=this.tokenBuilder).flushLexingReport)?void 0:r.call(n,e)}}toTokenTypeDictionary(e){if(y3e(e))return e;let t=m3e(e)?Object.values(e.modes).flat():e,r={};return t.forEach(e=>r[e.name]=e),r}},mt(f3e,"isTokenTypeArray"),mt(m3e,"isIMultiModeLexerDefinition"),mt(y3e,"isTokenTypeDictionary")});function k3e(e,t,r){let n,i;return n="string"==typeof e?(i=t,r):(i=e.range.start,t),i=i||yxe.create(0,0),r=E3e(e),t=P3e(n),L3e({index:0,tokens:C3e({lines:r,position:i,options:t}),position:i})}function T3e(e,t){var r,n,t=P3e(t);return 0!==(e=E3e(e)).length&&(r=e[e.length-1],n=t.start,t=t.end,!!n?.exec(e[0]))&&!!t?.exec(r)}function E3e(e){return("string"==typeof e?e:e.text).split(H0e)}function C3e(a){let s,o,l,c=[],h=a.position.line,u=a.position.character;for(let i=0;i<a.lines.length;i++){let e=0===i,t=i===a.lines.length-1,r=a.lines[i],n=0;var d,p,g,f,m,y;e&&a.options.start?(d=null==(s=a.options.start)?void 0:s.exec(r))&&(n=d.index+d[0].length):(d=null==(o=a.options.line)?void 0:o.exec(r))&&(n=d.index+d[0].length),S3e(r=(r=t&&(p=null==(l=a.options.end)?void 0:l.exec(r))?r.substring(0,p.index):r).substring(0,A3e(r)),n)>=r.length?0<c.length&&(p=yxe.create(h,u),c.push({type:"break",content:"",range:vxe.create(p,p)})):(G3e.lastIndex=n,(m=G3e.exec(r))&&(g=m[0],m=m[1],y=yxe.create(h,u+n),f=yxe.create(h,u+n+g.length),c.push({type:"tag",content:m,range:vxe.create(y,f)}),n+=g.length,n=S3e(r,n)),n<r.length&&(m=r.substring(n),y=Array.from(m.matchAll(U3e)),c.push(..._3e(y,m,h,u+n)))),h++,u=0}return 0<c.length&&"break"===c[c.length-1].type?c.slice(0,-1):c}function _3e(e,n,i,a){var s=[];if(0===e.length){var t=yxe.create(i,a),r=yxe.create(i,a+n.length);s.push({type:"text",content:n,range:vxe.create(t,r)})}else{let r=0;for(var o of e){var l=o.index,c=n.substring(r,l);0<c.length&&s.push({type:"text",content:n.substring(r,l),range:vxe.create(yxe.create(i,r+a),yxe.create(i,l+a))});let e=c.length+1,t=o[1];s.push({type:"inline-tag",content:t,range:vxe.create(yxe.create(i,r+e+a),yxe.create(i,r+e+t.length+a))}),e+=t.length,4===o.length?(e+=o[2].length,s.push({type:"text",content:c=o[3],range:vxe.create(yxe.create(i,r+e+a),yxe.create(i,r+e+c.length+a))})):s.push({type:"text",content:"",range:vxe.create(yxe.create(i,r+e+a),yxe.create(i,r+e+a))}),r=l+o[0].length}0<(t=n.substring(r)).length&&s.push({type:"text",content:t,range:vxe.create(yxe.create(i,r+a),yxe.create(i,r+a+t.length))})}return s}function S3e(e,t){var r=e.substring(t).match(q3e);return r?t+r.index:e.length}function A3e(e){if((e=e.match(j3e))&&"number"==typeof e.index)return e.index}function L3e(e){var t=yxe.create(e.position.line,e.position.character);if(0===e.tokens.length)return new Y3e([],vxe.create(t,t));for(var r=[];e.index<e.tokens.length;){var n=N3e(e,r[r.length-1]);n&&r.push(n)}var i=null!=(i=null==(i=r[0])?void 0:i.range.start)?i:t,a=null!=(a=null==(a=r[r.length-1])?void 0:a.range.end)?a:t;return new Y3e(r,vxe.create(i,a))}function N3e(e,t){var r=e.tokens[e.index];return"tag"===r.type?D3e(e,!1):"text"===r.type||"inline-tag"===r.type?R3e(e):(I3e(r,t),void e.index++)}function I3e(e,t){t&&(e=new V3e("",e.range),("inlines"in t?t:t.content).inlines.push(e))}function R3e(e){let t=e.tokens[e.index],r=t,n=t,i=[];for(;t&&"break"!==t.type&&"tag"!==t.type;)i.push(M3e(e)),n=t,t=e.tokens[e.index];return new H3e(i,vxe.create(r.range.start,n.range.end))}function M3e(e){return"inline-tag"===e.tokens[e.index].type?D3e(e,!0):O3e(e)}function D3e(e,t){var r,n=e.tokens[e.index++],i=n.content.substring(1);return"text"===e.tokens[e.index]?.type?t?(r=O3e(e),new W3e(i,new H3e([r],r.range),t,vxe.create(n.range.start,r.range.end))):(r=R3e(e),new W3e(i,r,t,vxe.create(n.range.start,r.range.end))):(e=n.range,new W3e(i,new H3e([],e),t,e))}function O3e(e){return e=e.tokens[e.index++],new V3e(e.content,e.range)}function P3e(e){var t,r;return e?({start:e,end:t,line:r}=e,{start:B3e(e,!0),end:B3e(t,!1),line:B3e(r,!0)}):P3e({start:"/**",end:"*/",line:"*"})}function B3e(e,t){var r;return"string"==typeof e||"object"==typeof e?(r="string"==typeof e?q0e(e):e.source,t?new RegExp("^\\s*"+r):new RegExp(`\\s*${r}\\s*$`)):e}function $3e(r,n,i){var a;if("linkplain"===r||"linkcode"===r||"link"===r){let e=n.indexOf(" "),t=n;return 0<e&&(a=S3e(n,e),t=n.substring(a),n=n.substring(0,e)),("linkcode"===r||"link"===r&&"code"===i.link)&&(t=`\`${t}\``),null!=(r=null==(a=i.renderLink)?void 0:a.call(i,n,t))?r:F3e(n,t)}}function F3e(e,t){try{return t5e.parse(e,!0),`[${t}](${e})`}catch{return e}}function z3e(e){return e.endsWith(` +`)?` +`:` + +`}var G3e,U3e,q3e,j3e,Y3e,W3e,H3e,V3e,X3e,K3e,Z3e,Q3e,J3e,ewe,twe,rwe=b(()=>{Ybe(),Q0e(),u5e(),mt(k3e,"parseJSDoc"),mt(T3e,"isJSDoc"),mt(E3e,"getLines"),G3e=/\s*(@([\p{L}][\p{L}\p{N}]*)?)/uy,U3e=/\{(@[\p{L}][\p{L}\p{N}]*)(\s*)([^\r\n}]+)?\}/gu,mt(C3e,"tokenize"),mt(_3e,"buildInlineTokens"),q3e=/\S/,j3e=/\s*$/,mt(S3e,"skipWhitespace"),mt(A3e,"lastCharacter"),mt(L3e,"parseJSDocComment"),mt(N3e,"parseJSDocElement"),mt(I3e,"appendEmptyLine"),mt(R3e,"parseJSDocText"),mt(M3e,"parseJSDocInline"),mt(D3e,"parseJSDocTag"),mt(O3e,"parseJSDocLine"),mt(P3e,"normalizeOptions"),mt(B3e,"normalizeOption"),Y3e=class{static{mt(this,"JSDocCommentImpl")}constructor(e,t){this.elements=e,this.range=t}getTag(t){return this.getAllTags().find(e=>e.name===t)}getTags(t){return this.getAllTags().filter(e=>e.name===t)}getAllTags(){return this.elements.filter(e=>"name"in e)}toString(){let e="";for(var t of this.elements)0===e.length?e=t.toString():(t=t.toString(),e+=z3e(e)+t);return e.trim()}toMarkdown(e){let t="";for(var r of this.elements)0===t.length?t=r.toMarkdown(e):(r=r.toMarkdown(e),t+=z3e(t)+r);return t.trim()}},W3e=class{static{mt(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 1===this.content.inlines.length?e=e+" "+t:1<this.content.inlines.length&&(e=e+` +`+t),this.inline?`{${e}}`:e}toMarkdown(e){var t;return null!=(t=null==(t=e?.renderTag)?void 0:t.call(e,this))?t:this.toMarkdownDefault(e)}toMarkdownDefault(e){var t=this.content.toMarkdown(e);if(this.inline){var r=$3e(this.name,t,e??{});if("string"==typeof r)return r}let n="",i=("italic"===e?.tag||void 0===e?.tag?n="*":"bold"===e?.tag?n="**":"bold-italic"===e?.tag&&(n="***"),n+"@"+this.name+n);return 1===this.content.inlines.length?i=i+" — "+t:1<this.content.inlines.length&&(i=i+` +`+t),this.inline?`{${i}}`:i}},mt($3e,"renderInlineTag"),mt(F3e,"renderLinkDefault"),H3e=class{static{mt(this,"JSDocTextImpl")}constructor(e,t){this.inlines=e,this.range=t}toString(){let t="";for(let e=0;e<this.inlines.length;e++){var r=this.inlines[e],n=this.inlines[e+1];t+=r.toString(),n&&n.range.start.line>r.range.start.line&&(t+=` +`)}return t}toMarkdown(t){let r="";for(let e=0;e<this.inlines.length;e++){var n=this.inlines[e],i=this.inlines[e+1];r+=n.toMarkdown(t),i&&i.range.start.line>n.range.start.line&&(r+=` +`)}return r}},V3e=class{static{mt(this,"JSDocLineImpl")}constructor(e,t){this.text=e,this.range=t}toString(){return this.text}toMarkdown(){return this.text}},mt(z3e,"fillNewlines")}),nwe=b(()=>{x0e(),rwe(),X3e=class{static{mt(this,"JSDocDocumentationProvider")}constructor(e){this.indexManager=e.shared.workspace.IndexManager,this.commentProvider=e.documentation.CommentProvider}getDocumentation(r){var e=this.commentProvider.getComment(r);if(e&&T3e(e))return k3e(e).toMarkdown({renderLink:mt((e,t)=>this.documentationLinkRenderer(r,e,t),"renderLink"),renderTag:mt(e=>this.documentationTagRenderer(r,e),"renderTag")})}documentationLinkRenderer(e,t,r){var n=null!=(n=this.findNameInPrecomputedScopes(e,t))?n:this.findNameInGlobalScope(e,t);return n&&n.nameSegment?(e=n.nameSegment.range.start.line+1,t=n.nameSegment.range.start.character+1,`[${r}](${n.documentUri.with({fragment:`L${e},`+t}).toString()})`):void 0}documentationTagRenderer(e,t){}findNameInPrecomputedScopes(t,r){var n=l0e(t).precomputedScopes;if(n){let e=t;do{var i=n.get(e).find(e=>e.name===r);if(i)return i}while(e=e.$container)}}findNameInGlobalScope(e,t){return this.indexManager.allElements().find(e=>e.name===t)}}}),iwe=b(()=>{z5e(),cde(),K3e=class{static{mt(this,"DefaultCommentProvider")}constructor(e){this.grammarConfig=()=>e.parser.GrammarConfig}getComment(e){return P5e(e)?e.$comment:null==(e=Kue(e.$cstNode,this.grammarConfig().multilineCommentRules))?void 0:e.text}}}),awe=b(()=>{H4e(),c3e(),Z3e=class{static{mt(this,"DefaultAsyncParser")}constructor(e){this.syncParser=e.parser.LangiumParser}parse(e,t){return Promise.resolve(this.syncParser.parse(e))}},Q3e=class{static{mt(this,"AbstractThreadedAsyncParser")}constructor(e){this.threadCount=8,this.terminationDelay=200,this.workerPool=[],this.queue=[],this.hydrator=e.serializer.Hydrator}initializeWorkers(){for(;this.workerPool.length<this.threadCount;){let t=this.createWorker();t.onReady(()=>{var e;0<this.queue.length&&(e=this.queue.shift())&&(t.lock(),e.resolve(t))}),this.workerPool.push(t)}}async parse(e,t){let r=await this.acquireParserWorker(t),n=new W4e,i,a=t.onCancellationRequested(()=>{i=setTimeout(()=>{this.terminateWorker(r)},this.terminationDelay)});return r.parse(e).then(e=>{e=this.hydrator.hydrate(e),n.resolve(e)}).catch(e=>{n.reject(e)}).finally(()=>{a.dispose(),clearTimeout(i)}),n.promise}terminateWorker(e){e.terminate(),0<=(e=this.workerPool.indexOf(e))&&this.workerPool.splice(e,1)}async acquireParserWorker(e){this.initializeWorkers();for(var t of this.workerPool)if(t.ready)return t.lock(),t;let r=new W4e;return e.onCancellationRequested(()=>{var e=this.queue.indexOf(r);0<=e&&this.queue.splice(e,1),r.reject(Y4e)}),this.queue.push(r),r.promise}},J3e=class{static{mt(this,"ParserWorker")}get ready(){return this._ready}get onReady(){return this.onReadyEmitter.event}constructor(e,t,r,n){this.onReadyEmitter=new l3e.Emitter,this.deferred=new W4e,this._ready=!0,this._parsing=!1,this.sendMessage=e,this._terminate=n,t(e=>{this.deferred.resolve(e),this.unlock()}),r(e=>{this.deferred.reject(e),this.unlock()})}terminate(){this.deferred.reject(Y4e),this._terminate()}lock(){this._ready=!1}unlock(){this._parsing=!1,this._ready=!0,this.onReadyEmitter.fire()}parse(e){if(this._parsing)throw new Error("Parser worker is busy");return this._parsing=!0,this.deferred=new W4e,this.sendMessage(e),this.deferred.promise}}}),swe=b(()=>{B4e(),H4e(),ewe=class{static{mt(this,"DefaultWorkspaceLock")}constructor(){this.previousTokenSource=new P4e.CancellationTokenSource,this.writeQueue=[],this.readQueue=[],this.done=!0}write(e){this.cancelWrite();var t=F4e();return this.previousTokenSource=t,this.enqueue(this.writeQueue,e,t.token)}read(e){return this.enqueue(this.readQueue,e)}enqueue(e,t,r=P4e.CancellationToken.None){var n=new W4e;return e.push({action:t,deferred:n,cancellationToken:r}),this.performNextOperation(),n.promise}async performNextOperation(){if(this.done){var e=[];if(0<this.writeQueue.length)e.push(this.writeQueue.shift());else{if(!(0<this.readQueue.length))return;e.push(...this.readQueue.splice(0,this.readQueue.length))}this.done=!1,await Promise.all(e.map(async({action:e,deferred:t,cancellationToken:r})=>{try{var n=await Promise.resolve().then(()=>e(r));t.resolve(n)}catch(e){G4e(e)?t.resolve(void 0):t.reject(e)}})),this.done=!0,this.performNextOperation()}}cancelWrite(){this.previousTokenSource.cancel()}}}),owe=b(()=>{Wbe(),n0e(),Iue(),x0e(),I5e(),cde(),twe=class{static{mt(this,"DefaultHydrator")}constructor(e){this.grammarElementIdMap=new v5e,this.tokenTypeIdMap=new v5e,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(e=>Object.assign(Object.assign({},e),{message:e.message})),value:this.dehydrateAstNode(e.value,this.createDehyrationContext(e.value))}}dehydrateLexerReport(e){return e}createDehyrationContext(e){var t,r=new Map,n=new Map;for(t of d0e(e))r.set(t,{});if(e.$cstNode)for(var i of Uue(e.$cstNode))n.set(i,{});return{astNodes:r,cstNodes:n}}dehydrateAstNode(e,t){var r,n,i=t.astNodes.get(e);i.$type=e.$type,i.$containerIndex=e.$containerIndex,i.$containerProperty=e.$containerProperty,void 0!==e.$cstNode&&(i.$cstNode=this.dehydrateCstNode(e.$cstNode,t));for([r,n]of Object.entries(e))if(!r.startsWith("$"))if(Array.isArray(n)){var a,s=[];i[r]=s;for(a of n)Tue(a)?s.push(this.dehydrateAstNode(a,t)):Eue(a)?s.push(this.dehydrateReference(a,t)):s.push(a)}else Tue(n)?i[r]=this.dehydrateAstNode(n,t):Eue(n)?i[r]=this.dehydrateReference(n,t):void 0!==n&&(i[r]=n);return i}dehydrateReference(e,t){var r={};return r.$refText=e.$refText,e.$refNode&&(r.$refNode=t.cstNodes.get(e.$refNode)),r}dehydrateCstNode(e,t){var r=t.cstNodes.get(e);return Lue(e)?r.fullText=e.fullText:r.grammarSource=this.getGrammarElementId(e.grammarSource),r.hidden=e.hidden,r.astNode=t.astNodes.get(e.astNode),Sue(e)?r.content=e.content.map(e=>this.dehydrateCstNode(e,t)):Aue(e)&&(r.tokenType=e.tokenType.name,r.offset=e.offset,r.length=e.length,r.startLine=e.range.start.line,r.startColumn=e.range.start.character,r.endLine=e.range.end.line,r.endColumn=e.range.end.character),r}hydrate(e){var 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){var t,r=new Map,n=new Map;for(t of d0e(e))r.set(t,{});let i;if(e.$cstNode)for(var a of Uue(e.$cstNode)){let e;"fullText"in a?(e=new Ube(a.fullText),i=e):"content"in a?e=new zbe:"tokenType"in a&&(e=this.hydrateCstLeafNode(a)),e&&(n.set(a,e),e.root=i)}return{astNodes:r,cstNodes:n}}hydrateAstNode(e,t){var r,n,i=t.astNodes.get(e);i.$type=e.$type,i.$containerIndex=e.$containerIndex,i.$containerProperty=e.$containerProperty,e.$cstNode&&(i.$cstNode=t.cstNodes.get(e.$cstNode));for([r,n]of Object.entries(e))if(!r.startsWith("$"))if(Array.isArray(n)){var a,s=[];i[r]=s;for(a of n)Tue(a)?s.push(this.setParent(this.hydrateAstNode(a,t),i)):Eue(a)?s.push(this.hydrateReference(a,i,r,t)):s.push(a)}else Tue(n)?i[r]=this.setParent(this.hydrateAstNode(n,t),i):Eue(n)?i[r]=this.hydrateReference(n,i,r,t):void 0!==n&&(i[r]=n);return i}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){var n=t.cstNodes.get(e);if("number"==typeof e.grammarSource&&(n.grammarSource=this.getGrammarElement(e.grammarSource)),n.astNode=t.astNodes.get(e.astNode),Sue(n))for(var i of e.content)i=this.hydrateCstNode(i,t,r++),n.content.push(i);return n}hydrateCstLeafNode(e){var t=this.getTokenType(e.tokenType),r=e.offset;return new Fbe(r,e.length,{start:{line:e.startLine,character:e.startColumn},end:{line:e.endLine,character:e.endColumn}},t,e.hidden)}getTokenType(e){return this.lexer.definition[e]}getGrammarElementId(e){if(e)return 0===this.grammarElementIdMap.size&&this.createGrammarElementIdMap(),this.grammarElementIdMap.get(e)}getGrammarElement(e){return 0===this.grammarElementIdMap.size&&this.createGrammarElementIdMap(),this.grammarElementIdMap.getKey(e)}createGrammarElementIdMap(){let e=0;for(var t of d0e(this.grammar))wde(t)&&this.grammarElementIdMap.set(t,e++)}}});function lwe(e){return{documentation:{CommentProvider:mt(e=>new K3e(e),"CommentProvider"),DocumentationProvider:mt(e=>new X3e(e),"DocumentationProvider")},parser:{AsyncParser:mt(e=>new Z3e(e),"AsyncParser"),GrammarConfig:mt(e=>Fge(e),"GrammarConfig"),LangiumParser:mt(e=>E4e(e),"LangiumParser"),CompletionParser:mt(e=>k4e(e),"CompletionParser"),ValueConverter:mt(()=>new S4e,"ValueConverter"),TokenBuilder:mt(()=>new _4e,"TokenBuilder"),Lexer:mt(e=>new b3e(e),"Lexer"),ParserErrorMessageProvider:mt(()=>new Jbe,"ParserErrorMessageProvider"),LexerErrorMessageProvider:mt(()=>new v3e,"LexerErrorMessageProvider")},workspace:{AstNodeLocator:mt(()=>new J5e,"AstNodeLocator"),AstNodeDescriptionProvider:mt(e=>new Z5e(e),"AstNodeDescriptionProvider"),ReferenceDescriptionProvider:mt(e=>new Q5e(e),"ReferenceDescriptionProvider")},references:{Linker:mt(e=>new l5e(e),"Linker"),NameProvider:mt(()=>new f5e,"NameProvider"),ScopeProvider:mt(e=>new A5e(e),"ScopeProvider"),ScopeComputation:mt(e=>new x5e(e),"ScopeComputation"),References:mt(e=>new m5e(e),"References")},serializer:{Hydrator:mt(e=>new twe(e),"Hydrator"),JsonSerializer:mt(e=>new $5e(e),"JsonSerializer")},validation:{DocumentValidator:mt(e=>new X5e(e),"DocumentValidator"),ValidationRegistry:mt(e=>new j5e(e),"ValidationRegistry")},shared:mt(()=>e.shared,"shared")}}function cwe(t){return{ServiceRegistry:mt(e=>new F5e(e),"ServiceRegistry"),workspace:{LangiumDocuments:mt(e=>new s5e(e),"LangiumDocuments"),LangiumDocumentFactory:mt(e=>new a5e(e),"LangiumDocumentFactory"),DocumentBuilder:mt(e=>new r3e(e),"DocumentBuilder"),IndexManager:mt(e=>new n3e(e),"IndexManager"),WorkspaceManager:mt(e=>new i3e(e),"WorkspaceManager"),FileSystemProvider:mt(e=>t.fileSystemProvider(e),"FileSystemProvider"),WorkspaceLock:mt(()=>new ewe,"WorkspaceLock"),ConfigurationProvider:mt(e=>new e3e(e),"ConfigurationProvider")}}}var hwe=b(()=>{zge(),T4e(),L4e(),N4e(),I4e(),p5e(),L5e(),N5e(),R5e(),O5e(),z5e(),G5e(),a3e(),Y5e(),s3e(),o3e(),h3e(),d3e(),d5e(),p3e(),g3e(),w3e(),nwe(),iwe(),n4e(),awe(),swe(),owe(),mt(lwe,"createDefaultCoreModule"),mt(cwe,"createDefaultSharedCoreModule")});function uwe(e,t,r,n,i,a,s,o,l){return pwe([e,t,r,n,i,a,s,o,l].reduce(fwe,{}))}function dwe(e){if(e&&e[ywe])for(var t of Object.values(e))dwe(t);return e}function pwe(r,n){let i=new Proxy({},{deleteProperty:mt(()=>!1,"deleteProperty"),set:mt(()=>{throw new Error("Cannot set property on injected service container")},"set"),get:mt((e,t)=>t===ywe||gwe(e,t,r,n||i),"get"),getOwnPropertyDescriptor:mt((e,t)=>(gwe(e,t,r,n||i),Object.getOwnPropertyDescriptor(e,t)),"getOwnPropertyDescriptor"),has:mt((e,t)=>t in r,"has"),ownKeys:mt(()=>[...Object.getOwnPropertyNames(r)],"ownKeys")});return i}function gwe(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]===vwe)throw new Error('Cycle detected. Please make "'+String(t)+'" lazy. Visit https://langium.org/docs/reference/configuration-services/#resolving-cyclic-dependencies');return e[t]}if(t in r){r=r[t],e[t]=vwe;try{e[t]="function"==typeof r?r(n):pwe(r,n)}catch(r){throw e[t]=r instanceof Error?r:void 0,r}return e[t]}}function fwe(e,t){if(t)for(var[r,n]of Object.entries(t)){var i;void 0!==n&&(null!==(i=e[r])&&null!==n&&"object"==typeof i&&"object"==typeof n?e[r]=fwe(i,n):e[r]=n)}return e}var mwe,ywe,vwe,xwe,bwe,wwe,kwe,Twe,Ewe,Cwe=b(()=>{(mwe=mwe||{}).merge=(e,t)=>fwe(fwe({},e),t),mt(uwe,"inject"),ywe=Symbol("isProxy"),mt(dwe,"eagerLoad"),mt(pwe,"_inject"),vwe=Symbol(),mt(gwe,"_resolve"),mt(fwe,"_merge")}),_we=b(()=>{}),Swe=b(()=>{iwe(),nwe(),rwe()}),Awe=b(()=>{}),Lwe=b(()=>{zge(),Awe()}),Nwe=b(()=>{H2e(),N4e(),w3e(),xwe={indentTokenName:"INDENT",dedentTokenName:"DEDENT",whitespaceTokenName:"WS",ignoreIndentationDelimiters:[]},(bwe=bwe||{}).REGULAR="indentation-sensitive",bwe.IGNORE_INDENTATION="ignore-indentation",wwe=class extends _4e{static{mt(this,"IndentationAwareTokenBuilder")}constructor(e=xwe){super(),this.indentationStack=[0],this.whitespaceRegExp=/[ \t]+/y,this.options=Object.assign(Object.assign({},xwe),e),this.indentTokenType=ime({name:this.options.indentTokenName,pattern:this.indentMatcher.bind(this),line_breaks:!1}),this.dedentTokenType=ime({name:this.options.dedentTokenName,pattern:this.dedentMatcher.bind(this),line_breaks:!1})}buildTokens(e,t){var r;if(!f3e(e=super.buildTokens(e,t)))throw new Error("Invalid tokens built by default builder");let{indentTokenName:n,dedentTokenName:i,whitespaceTokenName:a,ignoreIndentationDelimiters:s}=this.options,o,l,c,h=[];for(r of e){for(var[u,d]of s)r.name===u?r.PUSH_MODE=bwe.IGNORE_INDENTATION:r.name===d&&(r.POP_MODE=!0);r.name===i?o=r:r.name===n?l=r:r.name===a?c=r:h.push(r)}if(o&&l&&c)return 0<s.length?{modes:{[bwe.REGULAR]:[o,l,...h,c],[bwe.IGNORE_INDENTATION]:[...h,c]},defaultMode:bwe.REGULAR}:[o,l,c,...h];throw new Error("Some indentation/whitespace tokens not found!")}flushLexingReport(e){var t=super.flushLexingReport(e);return Object.assign(Object.assign({},t),{remainingDedents:this.flushRemainingDedents(e)})}isStartOfLine(e,t){return 0===t||`\r +`.includes(e[t-1])}matchWhitespace(e,t,r,n){return this.whitespaceRegExp.lastIndex=t,{currIndentLevel:null!=(e=(t=this.whitespaceRegExp.exec(e))?.[0].length)?e:0,prevIndentLevel:this.indentationStack.at(-1),match:t}}createIndentationTokenInstance(e,t,r,n){return t=this.getLineNumber(t,n),sme(e,r,n,n+r.length,t,t,1,r.length)}getLineNumber(e,t){return e.substring(0,t).split(/\r\n|\r|\n/).length}indentMatcher(e,t,r,n){return!this.isStartOfLine(e,t)||({currIndentLevel:e,prevIndentLevel:t,match:r}=this.matchWhitespace(e,t,r,n),e<=t)?null:(this.indentationStack.push(e),r)}dedentMatcher(t,r,n,e){if(this.isStartOfLine(t,r)){var{currIndentLevel:e,prevIndentLevel:i,match:a}=this.matchWhitespace(t,r,n,e);if(!(i<=e))if(-1===(i=this.indentationStack.lastIndexOf(e)))this.diagnostics.push({severity:"error",message:`Invalid dedent level ${e} at offset: ${r}. Current indentation stack: `+this.indentationStack,offset:r,length:null!=(a=null==(e=a?.[0])?void 0:e.length)?a:0,line:this.getLineNumber(t,r),column:1});else{var s=this.indentationStack.length-i-1,o=null!=(a=null==(e=t.substring(0,r).match(/[\r\n]+$/))?void 0:e[0].length)?a:1;for(let e=0;e<s;e++){var l=this.createIndentationTokenInstance(this.dedentTokenType,t,"",r-(o-1));n.push(l),this.indentationStack.pop()}}}return null}buildTerminalToken(e){var e=super.buildTerminalToken(e),{indentTokenName:t,dedentTokenName:r,whitespaceTokenName:n}=this.options;return e.name===t?this.indentTokenType:e.name===r?this.dedentTokenType:e.name===n?ime({name:n,pattern:this.whitespaceRegExp,group:Qfe.SKIPPED}):e}flushRemainingDedents(e){for(var t=[];1<this.indentationStack.length;)t.push(this.createIndentationTokenInstance(this.dedentTokenType,e,"",e.length)),this.indentationStack.pop();return this.indentationStack=[0],t}},kwe=class extends b3e{static{mt(this,"IndentationAwareLexer")}constructor(e){if(super(e),!(e.parser.TokenBuilder instanceof wwe))throw new Error("IndentationAwareLexer requires an accompanying IndentationAwareTokenBuilder");this.indentationTokenBuilder=e.parser.TokenBuilder}tokenize(e,t=x3e){var r=super.tokenize(e),e=r.report,{indentTokenType:t,dedentTokenType:e}=("full"===t?.mode&&r.tokens.push(...e.remainingDedents),e.remainingDedents=[],this.indentationTokenBuilder),n=t.tokenTypeIdx,i=e.tokenTypeIdx,a=[],s=r.tokens.length-1;for(let e=0;e<s;e++){var o=r.tokens[e],l=r.tokens[e+1];o.tokenTypeIdx===n&&l.tokenTypeIdx===i?e++:a.push(o)}return 0<=s&&a.push(r.tokens[s]),r.tokens=a,r}}}),Iwe=b(()=>{}),Rwe=b(()=>{awe(),T4e(),Wbe(),Nwe(),L4e(),n4e(),w3e(),w4e(),Iwe(),N4e(),I4e()}),Mwe=b(()=>{p5e(),L5e(),N5e(),M5e(),R5e(),O5e()}),Dwe=b(()=>{owe(),z5e()}),Owe=b(()=>{Twe=class{static{mt(this,"EmptyFileSystemProvider")}readFile(){throw new Error("No file system is available.")}async readDirectory(){return[]}},Ewe={fileSystemProvider:mt(()=>new Twe,"fileSystemProvider")}});function Pwe(){var e=uwe(cwe(Ewe),Fwe),t=uwe(lwe({shared:e}),$we);return e.ServiceRegistry.register(t),t}function Bwe(e){var t=Pwe(),e=t.serializer.JsonSerializer.deserialize(e);return t.shared.workspace.LangiumDocumentFactory.fromModel(e,t5e.parse(`memory://${null!=(t=e.name)?t:"grammar"}.langium`)),e}var $we,Fwe,zwe=b(()=>{hwe(),Cwe(),n0e(),Owe(),u5e(),$we={Grammar:mt(()=>{},"Grammar"),LanguageMetaData:mt(()=>({caseInsensitive:!1,fileExtensions:[".langium"],languageId:"langium"}),"LanguageMetaData")},Fwe={AstReflection:mt(()=>new t0e,"AstReflection")},mt(Pwe,"createMinimalGrammarServices"),mt(Bwe,"loadGrammarFromJson")}),Gwe={},Uwe=(OFe(Gwe,{AstUtils:()=>i0e,BiMap:()=>v5e,Cancellation:()=>P4e,ContextCache:()=>C5e,CstUtils:()=>Gue,DONE_RESULT:()=>Bue,Deferred:()=>W4e,Disposable:()=>t3e,DisposableCache:()=>T5e,DocumentCache:()=>_5e,EMPTY_STREAM:()=>Pue,ErrorWithLocation:()=>ude,GrammarUtils:()=>J0e,MultiMap:()=>y5e,OperationCancelled:()=>Y4e,Reduction:()=>Fue,RegExpUtils:()=>F0e,SimpleCache:()=>E5e,StreamImpl:()=>Oue,TreeStreamImpl:()=>$ue,URI:()=>t5e,UriUtils:()=>n5e,WorkspaceCache:()=>S5e,assertUnreachable:()=>hde,delayNextTick:()=>$4e,interruptAndCheck:()=>U4e,isOperationCancelled:()=>G4e,loadGrammarFromJson:()=>Bwe,setInterruptionPeriod:()=>z4e,startCancelableOperation:()=>F4e,stream:()=>Due}),b(()=>{D5e(),c3e(),U(Gwe,l3e),I5e(),u3e(),dde(),zwe(),H4e(),zue(),u5e(),x0e(),B4e(),cde(),$ge(),Q0e()})),qwe=b(()=>{a3e(),Y5e()}),jwe=b(()=>{s3e(),o3e(),h3e(),d3e(),d5e(),Owe(),p3e(),swe(),g3e()}),Ywe={},Wwe=(OFe(Ywe,{AbstractAstReflection:()=>Nue,AbstractCstNode:()=>$be,AbstractLangiumParser:()=>Kbe,AbstractParserErrorMessageProvider:()=>Qbe,AbstractThreadedAsyncParser:()=>Q3e,AstUtils:()=>i0e,BiMap:()=>v5e,Cancellation:()=>P4e,CompositeCstNodeImpl:()=>zbe,ContextCache:()=>C5e,CstNodeBuilder:()=>Bbe,CstUtils:()=>Gue,DEFAULT_TOKENIZE_OPTIONS:()=>x3e,DONE_RESULT:()=>Bue,DatatypeSymbol:()=>Vbe,DefaultAstNodeDescriptionProvider:()=>Z5e,DefaultAstNodeLocator:()=>J5e,DefaultAsyncParser:()=>Z3e,DefaultCommentProvider:()=>K3e,DefaultConfigurationProvider:()=>e3e,DefaultDocumentBuilder:()=>r3e,DefaultDocumentValidator:()=>X5e,DefaultHydrator:()=>twe,DefaultIndexManager:()=>n3e,DefaultJsonSerializer:()=>$5e,DefaultLangiumDocumentFactory:()=>a5e,DefaultLangiumDocuments:()=>s5e,DefaultLexer:()=>b3e,DefaultLexerErrorMessageProvider:()=>v3e,DefaultLinker:()=>l5e,DefaultNameProvider:()=>f5e,DefaultReferenceDescriptionProvider:()=>Q5e,DefaultReferences:()=>m5e,DefaultScopeComputation:()=>x5e,DefaultScopeProvider:()=>A5e,DefaultServiceRegistry:()=>F5e,DefaultTokenBuilder:()=>_4e,DefaultValueConverter:()=>S4e,DefaultWorkspaceLock:()=>ewe,DefaultWorkspaceManager:()=>i3e,Deferred:()=>W4e,Disposable:()=>t3e,DisposableCache:()=>T5e,DocumentCache:()=>_5e,DocumentState:()=>i5e,DocumentValidator:()=>K5e,EMPTY_SCOPE:()=>k5e,EMPTY_STREAM:()=>Pue,EmptyFileSystem:()=>Ewe,EmptyFileSystemProvider:()=>Twe,ErrorWithLocation:()=>ude,GrammarAST:()=>pde,GrammarUtils:()=>J0e,IndentationAwareLexer:()=>kwe,IndentationAwareTokenBuilder:()=>wwe,JSDocDocumentationProvider:()=>X3e,LangiumCompletionParser:()=>e4e,LangiumParser:()=>Zbe,LangiumParserErrorMessageProvider:()=>Jbe,LeafCstNodeImpl:()=>Fbe,LexingMode:()=>bwe,MapScope:()=>w5e,Module:()=>mwe,MultiMap:()=>y5e,OperationCancelled:()=>Y4e,ParserWorker:()=>J3e,Reduction:()=>Fue,RegExpUtils:()=>F0e,RootCstNodeImpl:()=>Ube,SimpleCache:()=>E5e,StreamImpl:()=>Oue,StreamScope:()=>b5e,TextDocument:()=>e5e,TreeStreamImpl:()=>$ue,URI:()=>t5e,UriUtils:()=>n5e,ValidationCategory:()=>q5e,ValidationRegistry:()=>j5e,ValueConverter:()=>A4e,WorkspaceCache:()=>S5e,assertUnreachable:()=>hde,createCompletionParser:()=>k4e,createDefaultCoreModule:()=>lwe,createDefaultSharedCoreModule:()=>cwe,createGrammarConfig:()=>Fge,createLangiumParser:()=>E4e,createParser:()=>i4e,delayNextTick:()=>$4e,diagnosticData:()=>U5e,eagerLoad:()=>dwe,getDiagnosticRange:()=>W5e,indentationBuilderDefaultOptions:()=>xwe,inject:()=>uwe,interruptAndCheck:()=>U4e,isAstNode:()=>Tue,isAstNodeDescription:()=>Cue,isAstNodeWithComment:()=>P5e,isCompositeCstNode:()=>Sue,isIMultiModeLexerDefinition:()=>m3e,isJSDoc:()=>T3e,isLeafCstNode:()=>Aue,isLinkingError:()=>_ue,isNamed:()=>g5e,isOperationCancelled:()=>G4e,isReference:()=>Eue,isRootCstNode:()=>Lue,isTokenTypeArray:()=>f3e,isTokenTypeDictionary:()=>y3e,loadGrammarFromJson:()=>Bwe,parseJSDoc:()=>k3e,prepareLangiumParser:()=>C4e,setInterruptionPeriod:()=>z4e,startCancelableOperation:()=>F4e,stream:()=>Due,toDiagnosticData:()=>V5e,toDiagnosticSeverity:()=>H5e}),b(()=>{hwe(),Cwe(),G5e(),_we(),Iue(),Swe(),Lwe(),Rwe(),Mwe(),Dwe(),Uwe(),U(Ywe,Gwe),qwe(),jwe(),n0e()}));function Hwe(e){return A6e.isInstance(e,a6e)}function Vwe(e){return A6e.isInstance(e,o6e)}function Xwe(e){return A6e.isInstance(e,u6e)}function Kwe(e){return A6e.isInstance(e,d6e)}function Zwe(e){return A6e.isInstance(e,p6e)}function Qwe(e){return A6e.isInstance(e,m6e)}function Jwe(e){return A6e.isInstance(e,v6e)}function e6e(e){return A6e.isInstance(e,x6e)}function t6e(e){return A6e.isInstance(e,"Pie")}function r6e(e){return A6e.isInstance(e,b6e)}function n6e(e){return A6e.isInstance(e,k6e)}var i6e,s,a6e,s6e,o6e,l6e,c6e,h6e,u6e,d6e,p6e,g6e,f6e,m6e,y6e,v6e,x6e,b6e,w6e,k6e,T6e,E6e,C6e,_6e,S6e,A6e,L6e,N6e,I6e,R6e,M6e,D6e,O6e,P6e,B6e,$6e,F6e,z6e,G6e,U6e,q6e,j6e,Y6e,W6e,H6e,V6e,X6e,K6e,Z6e,Q6e,J6e,eke,tke,rke,nke,ike,ake,ske,oke,lke=b(()=>{Wwe(),Wwe(),Wwe(),Wwe(),i6e=Object.defineProperty,s=mt((e,t)=>i6e(e,"name",{value:t,configurable:!0}),"__name"),a6e="Architecture",mt(Hwe,"isArchitecture"),s(Hwe,"isArchitecture"),s6e="Axis",o6e="Branch",mt(Vwe,"isBranch"),s(Vwe,"isBranch"),l6e="Checkout",c6e="CherryPicking",h6e="ClassDefStatement",u6e="Commit",mt(Xwe,"isCommit"),s(Xwe,"isCommit"),d6e="GitGraph",mt(Kwe,"isGitGraph"),s(Kwe,"isGitGraph"),p6e="Info",mt(Zwe,"isInfo"),s(Zwe,"isInfo"),g6e="Item",f6e="Junction",m6e="Merge",mt(Qwe,"isMerge"),s(Qwe,"isMerge"),y6e="Option",v6e="Packet",mt(Jwe,"isPacket"),s(Jwe,"isPacket"),x6e="PacketBlock",mt(e6e,"isPacketBlock"),s(e6e,"isPacketBlock"),mt(t6e,"isPie"),s(t6e,"isPie"),b6e="PieSection",mt(r6e,"isPieSection"),s(r6e,"isPieSection"),w6e="Service",k6e="Treemap",mt(n6e,"isTreemap"),s(n6e,"isTreemap"),T6e="TreemapRow",E6e="Direction",C6e="Leaf",_6e="Section",S6e=class extends Nue{static{mt(this,"MermaidAstReflection")}static{s(this,"MermaidAstReflection")}getAllTypes(){return[a6e,s6e,o6e,l6e,c6e,h6e,u6e,"Curve",E6e,"Edge","Entry",d6e,"Group",p6e,g6e,f6e,C6e,m6e,y6e,v6e,x6e,"Pie",b6e,"Radar",_6e,w6e,"Statement",k6e,T6e]}computeIsSubtype(e,t){switch(e){case o6e:case l6e:case c6e:case u6e:case m6e:return this.isSubtype("Statement",t);case E6e:return this.isSubtype(d6e,t);case C6e:case _6e:return this.isSubtype(g6e,t);default:return!1}}getReferenceType(e){if("Entry:axis"!=(e=e.container.$type+":"+e.property))throw new Error(e+" is not a valid reference id.");return s6e}getTypeMetaData(e){switch(e){case a6e:return{name:a6e,properties:[{name:"accDescr"},{name:"accTitle"},{name:"edges",defaultValue:[]},{name:"groups",defaultValue:[]},{name:"junctions",defaultValue:[]},{name:"services",defaultValue:[]},{name:"title"}]};case s6e:return{name:s6e,properties:[{name:"label"},{name:"name"}]};case o6e:return{name:o6e,properties:[{name:"name"},{name:"order"}]};case l6e:return{name:l6e,properties:[{name:"branch"}]};case c6e:return{name:c6e,properties:[{name:"id"},{name:"parent"},{name:"tags",defaultValue:[]}]};case h6e:return{name:h6e,properties:[{name:"className"},{name:"styleText"}]};case u6e:return{name:u6e,properties:[{name:"id"},{name:"message"},{name:"tags",defaultValue:[]},{name:"type"}]};case"Curve":return{name:"Curve",properties:[{name:"entries",defaultValue:[]},{name:"label"},{name:"name"}]};case"Edge":return{name:"Edge",properties:[{name:"lhsDir"},{name:"lhsGroup",defaultValue:!1},{name:"lhsId"},{name:"lhsInto",defaultValue:!1},{name:"rhsDir"},{name:"rhsGroup",defaultValue:!1},{name:"rhsId"},{name:"rhsInto",defaultValue:!1},{name:"title"}]};case"Entry":return{name:"Entry",properties:[{name:"axis"},{name:"value"}]};case d6e:return{name:d6e,properties:[{name:"accDescr"},{name:"accTitle"},{name:"statements",defaultValue:[]},{name:"title"}]};case"Group":return{name:"Group",properties:[{name:"icon"},{name:"id"},{name:"in"},{name:"title"}]};case p6e:return{name:p6e,properties:[{name:"accDescr"},{name:"accTitle"},{name:"title"}]};case g6e:return{name:g6e,properties:[{name:"classSelector"},{name:"name"}]};case f6e:return{name:f6e,properties:[{name:"id"},{name:"in"}]};case m6e:return{name:m6e,properties:[{name:"branch"},{name:"id"},{name:"tags",defaultValue:[]},{name:"type"}]};case y6e:return{name:y6e,properties:[{name:"name"},{name:"value",defaultValue:!1}]};case v6e:return{name:v6e,properties:[{name:"accDescr"},{name:"accTitle"},{name:"blocks",defaultValue:[]},{name:"title"}]};case x6e:return{name:x6e,properties:[{name:"bits"},{name:"end"},{name:"label"},{name:"start"}]};case"Pie":return{name:"Pie",properties:[{name:"accDescr"},{name:"accTitle"},{name:"sections",defaultValue:[]},{name:"showData",defaultValue:!1},{name:"title"}]};case b6e:return{name:b6e,properties:[{name:"label"},{name:"value"}]};case"Radar":return{name:"Radar",properties:[{name:"accDescr"},{name:"accTitle"},{name:"axes",defaultValue:[]},{name:"curves",defaultValue:[]},{name:"options",defaultValue:[]},{name:"title"}]};case w6e:return{name:w6e,properties:[{name:"icon"},{name:"iconText"},{name:"id"},{name:"in"},{name:"title"}]};case k6e:return{name:k6e,properties:[{name:"accDescr"},{name:"accTitle"},{name:"title"},{name:"TreemapRows",defaultValue:[]}]};case T6e:return{name:T6e,properties:[{name:"indent"},{name:"item"}]};case E6e:return{name:E6e,properties:[{name:"accDescr"},{name:"accTitle"},{name:"dir"},{name:"statements",defaultValue:[]},{name:"title"}]};case C6e:return{name:C6e,properties:[{name:"classSelector"},{name:"name"},{name:"value"}]};case _6e:return{name:_6e,properties:[{name:"classSelector"},{name:"name"}]};default:return{name:e,properties:[]}}}},A6e=new S6e,N6e=s(()=>L6e=L6e??Bwe(`{"$type":"Grammar","isDeclared":true,"name":"Info","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Info","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[],"cardinality":"*"},{"$type":"Keyword","value":"info"},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[],"cardinality":"*"},{"$type":"Group","elements":[{"$type":"Keyword","value":"showInfo"},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[],"cardinality":"*"}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[],"cardinality":"?"}]},"definesHiddenTokens":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","fragment":true,"name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}],"cardinality":"+"},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"}},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"}}]},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@7"}},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@8"}}]},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/"},"fragment":false}],"definesHiddenTokens":false,"hiddenTokens":[],"interfaces":[],"types":[],"usedGrammars":[]}`),"InfoGrammar"),R6e=s(()=>I6e=I6e??Bwe(`{"$type":"Grammar","isDeclared":true,"name":"Packet","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Packet","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[],"cardinality":"*"},{"$type":"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":"*"}]},"definesHiddenTokens":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$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":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","fragment":true,"name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}],"cardinality":"+"},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"}},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"}}]},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@8"}},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@9"}}]},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/"},"fragment":false}],"definesHiddenTokens":false,"hiddenTokens":[],"interfaces":[],"types":[],"usedGrammars":[]}`),"PacketGrammar"),D6e=s(()=>M6e=M6e??Bwe(`{"$type":"Grammar","isDeclared":true,"name":"Pie","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":"*"}]},"definesHiddenTokens":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"PieSection","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@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":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"FLOAT_PIE","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/-?[0-9]+\\\\.[0-9]+(?!\\\\.)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT_PIE","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/-?(0|[1-9][0-9]*)(?!\\\\.)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER_PIE","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@2"}},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@3"}}]},"fragment":false,"hidden":false},{"$type":"ParserRule","fragment":true,"name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@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":"+"},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"}},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"}}]},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@11"}},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@12"}}]},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/"},"fragment":false}],"definesHiddenTokens":false,"hiddenTokens":[],"interfaces":[],"types":[],"usedGrammars":[]}`),"PieGrammar"),P6e=s(()=>O6e=O6e??Bwe(`{"$type":"Grammar","isDeclared":true,"name":"Architecture","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Architecture","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[],"cardinality":"*"},{"$type":"Keyword","value":"architecture-beta"},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}],"cardinality":"*"}]},"definesHiddenTokens":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","fragment":true,"name":"Statement","definition":{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"groups","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Assignment","feature":"services","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}},{"$type":"Assignment","feature":"junctions","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}},{"$type":"Assignment","feature":"edges","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","fragment":true,"name":"LeftPort","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":":"},{"$type":"Assignment","feature":"lhsDir","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","fragment":true,"name":"RightPort","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"rhsDir","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}},{"$type":"Keyword","value":":"}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","fragment":true,"name":"Arrow","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]},{"$type":"Assignment","feature":"lhsInto","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]},"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"--"},{"$type":"Group","elements":[{"$type":"Keyword","value":"-"},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@29"},"arguments":[]}},{"$type":"Keyword","value":"-"}]}]},{"$type":"Assignment","feature":"rhsInto","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Group","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"group"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}},{"$type":"Assignment","feature":"icon","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@28"},"arguments":[]},"cardinality":"?"},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@29"},"arguments":[]},"cardinality":"?"},{"$type":"Group","elements":[{"$type":"Keyword","value":"in"},{"$type":"Assignment","feature":"in","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Service","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"service"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"iconText","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@21"},"arguments":[]}},{"$type":"Assignment","feature":"icon","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@28"},"arguments":[]}}],"cardinality":"?"},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@29"},"arguments":[]},"cardinality":"?"},{"$type":"Group","elements":[{"$type":"Keyword","value":"in"},{"$type":"Assignment","feature":"in","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Junction","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"junction"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"in"},{"$type":"Assignment","feature":"in","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Edge","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"lhsId","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}},{"$type":"Assignment","feature":"lhsGroup","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]},{"$type":"Assignment","feature":"rhsId","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}},{"$type":"Assignment","feature":"rhsGroup","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"ARROW_DIRECTION","definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"L"}},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"R"}}]},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"T"}}]},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"B"}}]},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARROW_GROUP","definition":{"$type":"RegexToken","regex":"/\\\\{group\\\\}/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARROW_INTO","definition":{"$type":"RegexToken","regex":"/<|>/"},"fragment":false,"hidden":false},{"$type":"ParserRule","fragment":true,"name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}],"cardinality":"+"},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"}},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"}}]},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@18"}},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@19"}}]},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/"},"fragment":false},{"$type":"TerminalRule","name":"ARCH_ICON","definition":{"$type":"RegexToken","regex":"/\\\\([\\\\w-:]+\\\\)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARCH_TITLE","definition":{"$type":"RegexToken","regex":"/\\\\[[\\\\w ]+\\\\]/"},"fragment":false,"hidden":false}],"definesHiddenTokens":false,"hiddenTokens":[],"interfaces":[],"types":[],"usedGrammars":[]}`),"ArchitectureGrammar"),$6e=s(()=>B6e=B6e??Bwe(`{"$type":"Grammar","isDeclared":true,"name":"GitGraph","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"GitGraph","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"gitGraph"},{"$type":"Group","elements":[{"$type":"Keyword","value":"gitGraph"},{"$type":"Keyword","value":":"}]},{"$type":"Keyword","value":"gitGraph:"},{"$type":"Group","elements":[{"$type":"Keyword","value":"gitGraph"},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]},{"$type":"Keyword","value":":"}]}]},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]},{"$type":"Assignment","feature":"statements","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}}],"cardinality":"*"}]},"definesHiddenTokens":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Statement","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Direction","definition":{"$type":"Assignment","feature":"dir","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"LR"},{"$type":"Keyword","value":"TB"},{"$type":"Keyword","value":"BT"}]}},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Commit","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"commit"},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"id:"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"msg:","cardinality":"?"},{"$type":"Assignment","feature":"message","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"tag:"},{"$type":"Assignment","feature":"tags","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"type:"},{"$type":"Assignment","feature":"type","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"NORMAL"},{"$type":"Keyword","value":"REVERSE"},{"$type":"Keyword","value":"HIGHLIGHT"}]}}]}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Branch","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"branch"},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@24"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"order:"},{"$type":"Assignment","feature":"order","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Merge","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"merge"},{"$type":"Assignment","feature":"branch","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@24"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}]}},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"id:"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"tag:"},{"$type":"Assignment","feature":"tags","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"type:"},{"$type":"Assignment","feature":"type","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"NORMAL"},{"$type":"Keyword","value":"REVERSE"},{"$type":"Keyword","value":"HIGHLIGHT"}]}}]}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Checkout","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"checkout"},{"$type":"Keyword","value":"switch"}]},{"$type":"Assignment","feature":"branch","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@24"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"CherryPicking","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"cherry-pick"},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"id:"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"tag:"},{"$type":"Assignment","feature":"tags","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"parent:"},{"$type":"Assignment","feature":"parent","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","fragment":true,"name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}],"cardinality":"+"},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"}},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"}}]},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@14"}},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@15"}}]},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/"},"fragment":false},{"$type":"TerminalRule","name":"REFERENCE","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\\\w([-\\\\./\\\\w]*[-\\\\w])?/"},"fragment":false,"hidden":false}],"definesHiddenTokens":false,"hiddenTokens":[],"interfaces":[],"types":[],"usedGrammars":[]}`),"GitGraphGrammar"),z6e=s(()=>F6e=F6e??Bwe(`{"$type":"Grammar","isDeclared":true,"name":"Radar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Radar","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"radar-beta"},{"$type":"Keyword","value":"radar-beta:"},{"$type":"Group","elements":[{"$type":"Keyword","value":"radar-beta"},{"$type":"Keyword","value":":"}]}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]},{"$type":"Group","elements":[{"$type":"Keyword","value":"axis"},{"$type":"Assignment","feature":"axes","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"axes","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}}],"cardinality":"*"}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"curve"},{"$type":"Assignment","feature":"curves","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"curves","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}}],"cardinality":"*"}]},{"$type":"Group","elements":[{"$type":"Assignment","feature":"options","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"options","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}}],"cardinality":"*"}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}],"cardinality":"*"}]},"definesHiddenTokens":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","fragment":true,"name":"Label","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]}},{"$type":"Keyword","value":"]"}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Axis","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[],"cardinality":"?"}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Curve","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[],"cardinality":"?"},{"$type":"Keyword","value":"{"},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]},{"$type":"Keyword","value":"}"}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","fragment":true,"name":"Entries","definition":{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"},{"$type":"Assignment","feature":"entries","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"},{"$type":"Assignment","feature":"entries","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"}]},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"},{"$type":"Assignment","feature":"entries","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"},{"$type":"Assignment","feature":"entries","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"}]}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"DetailedEntry","returnType":{"$ref":"#/interfaces@0"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"axis","operator":"=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@2"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},"deprecatedSyntax":false}},{"$type":"Keyword","value":":","cardinality":"?"},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"NumberEntry","returnType":{"$ref":"#/interfaces@0"},"definition":{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Option","definition":{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Keyword","value":"showLegend"}},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Keyword","value":"ticks"}},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Keyword","value":"max"}},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Keyword","value":"min"}},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Keyword","value":"graticule"}},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}}]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"GRATICULE","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"circle"}},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"polygon"}}]},"fragment":false,"hidden":false},{"$type":"ParserRule","fragment":true,"name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}],"cardinality":"+"},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"}},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"}}]},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@15"}},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@16"}}]},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/"},"fragment":false}],"interfaces":[{"$type":"Interface","name":"Entry","attributes":[{"$type":"TypeAttribute","name":"axis","isOptional":true,"type":{"$type":"ReferenceType","referenceType":{"$type":"SimpleType","typeRef":{"$ref":"#/rules@2"}}}},{"$type":"TypeAttribute","name":"value","type":{"$type":"SimpleType","primitiveType":"number"},"isOptional":false}],"superTypes":[]}],"definesHiddenTokens":false,"hiddenTokens":[],"types":[],"usedGrammars":[]}`),"RadarGrammar"),U6e=s(()=>G6e=G6e??Bwe(`{"$type":"Grammar","isDeclared":true,"name":"Treemap","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":"+"},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"}},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"}}]},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/"},"fragment":false,"hidden":false},{"$type":"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@14"},"arguments":[]}}],"cardinality":"*"}]},"definesHiddenTokens":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"TREEMAP_KEYWORD","definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"treemap-beta"}},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"treemap"}}]},"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]*))?(?:;)?/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STYLE_SEPARATOR","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":":::"}},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"SEPARATOR","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":":"}},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"COMMA","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":","}},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WS","definition":{"$type":"RegexToken","regex":"/[ \\\\t]+/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"ML_COMMENT","definition":{"$type":"RegexToken","regex":"/\\\\%\\\\%[^\\\\n]*/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"NL","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/"},"fragment":false},{"$type":"ParserRule","name":"TreemapRow","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"indent","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"item","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"ClassDef","dataType":"string","definition":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Item","returnType":{"$ref":"#/interfaces@0"},"definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$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":"?"}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$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@19"},"arguments":[],"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"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":"?"}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"INDENTATION","definition":{"$type":"RegexToken","regex":"/[ \\\\t]{1,}/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID2","definition":{"$type":"RegexToken","regex":"/[a-zA-Z_][a-zA-Z0-9_]*/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER2","definition":{"$type":"RegexToken","regex":"/[0-9_\\\\.\\\\,]+/"},"fragment":false,"hidden":false},{"$type":"ParserRule","name":"MyNumber","dataType":"number","definition":{"$type":"RuleCall","rule":{"$ref":"#/rules@21"},"arguments":[]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"STRING2","definition":{"$type":"RegexToken","regex":"/\\"[^\\"]*\\"|'[^']*'/"},"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@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":[]}],"definesHiddenTokens":false,"hiddenTokens":[],"imports":[],"types":[],"usedGrammars":[],"$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 */"}`),"TreemapGrammar"),X6e={languageId:"treemap",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!(V6e={languageId:"radar",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!(H6e={languageId:"gitGraph",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!(W6e={languageId:"architecture",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!(Y6e={languageId:"pie",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!(j6e={languageId:"packet",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!(q6e={languageId:"info",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"}),mode:"production"}),mode:"production"}),mode:"production"}),mode:"production"}),mode:"production"}),mode:"production"},K6e={AstReflection:s(()=>new S6e,"AstReflection")},Z6e={Grammar:s(()=>N6e(),"Grammar"),LanguageMetaData:s(()=>q6e,"LanguageMetaData"),parser:{}},Q6e={Grammar:s(()=>R6e(),"Grammar"),LanguageMetaData:s(()=>j6e,"LanguageMetaData"),parser:{}},J6e={Grammar:s(()=>D6e(),"Grammar"),LanguageMetaData:s(()=>Y6e,"LanguageMetaData"),parser:{}},eke={Grammar:s(()=>P6e(),"Grammar"),LanguageMetaData:s(()=>W6e,"LanguageMetaData"),parser:{}},tke={Grammar:s(()=>$6e(),"Grammar"),LanguageMetaData:s(()=>H6e,"LanguageMetaData"),parser:{}},rke={Grammar:s(()=>z6e(),"Grammar"),LanguageMetaData:s(()=>V6e,"LanguageMetaData"),parser:{}},nke={Grammar:s(()=>U6e(),"Grammar"),LanguageMetaData:s(()=>X6e,"LanguageMetaData"),parser:{}},ike={ACC_DESCR:/accDescr(?:[\t ]*:([^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/accTitle[\t ]*:([^\n\r]*)/,TITLE:/title([\t ][^\n\r]*|)/},ake=class extends S4e{static{mt(this,"AbstractMermaidValueConverter")}static{s(this,"AbstractMermaidValueConverter")}runConverter(e,t,r){var n=this.runCommonConverter(e,t,r);return void 0===(n=void 0===n?this.runCustomConverter(e,t,r):n)?super.runConverter(e,t,r):n}runCommonConverter(e,t,r){return void 0!==(e=ike[e.name])&&null!==(e=e.exec(t))?void 0!==e[1]?e[1].trim().replace(/[\t ]{2,}/gm," "):void 0!==e[2]?e[2].replace(/^\s*/gm,"").replace(/\s+$/gm,"").replace(/[\t ]{2,}/gm," ").replace(/[\n\r]{2,}/gm,` +`):void 0:void 0}},ske=class extends ake{static{mt(this,"CommonValueConverter")}static{s(this,"CommonValueConverter")}runCustomConverter(e,t,r){}},oke=class extends _4e{static{mt(this,"AbstractMermaidTokenBuilder")}static{s(this,"AbstractMermaidTokenBuilder")}constructor(e){super(),this.keywords=new Set(e)}buildKeywordTokens(e,t,r){return(e=super.buildKeywordTokens(e,t,r)).forEach(e=>{this.keywords.has(e.name)&&void 0!==e.PATTERN&&(e.PATTERN=new RegExp(e.PATTERN.toString()+"(?:(?=%%)|(?!\\S))"))}),e}},class extends oke{static{mt(this,"CommonTokenBuilder")}static{s(this,"CommonTokenBuilder")}}});function cke(e=Ewe){var e=uwe(cwe(e),K6e),t=uwe(lwe({shared:e}),tke,uke);return e.ServiceRegistry.register(t),{shared:e,GitGraph:t}}var hke,uke,dke=b(()=>{lke(),Wwe(),hke=class extends oke{static{mt(this,"GitGraphTokenBuilder")}static{s(this,"GitGraphTokenBuilder")}constructor(){super(["gitGraph"])}},uke={parser:{TokenBuilder:s(()=>new hke,"TokenBuilder"),ValueConverter:s(()=>new ske,"ValueConverter")}},mt(cke,"createGitGraphServices"),s(cke,"createGitGraphServices")});function pke(e=Ewe){var e=uwe(cwe(e),K6e),t=uwe(lwe({shared:e}),Z6e,fke);return e.ServiceRegistry.register(t),{shared:e,Info:t}}var gke,fke,mke=b(()=>{lke(),Wwe(),gke=class extends oke{static{mt(this,"InfoTokenBuilder")}static{s(this,"InfoTokenBuilder")}constructor(){super(["info","showInfo"])}},fke={parser:{TokenBuilder:s(()=>new gke,"TokenBuilder"),ValueConverter:s(()=>new ske,"ValueConverter")}},mt(pke,"createInfoServices"),s(pke,"createInfoServices")});function yke(e=Ewe){var e=uwe(cwe(e),K6e),t=uwe(lwe({shared:e}),Q6e,xke);return e.ServiceRegistry.register(t),{shared:e,Packet:t}}var vke,xke,bke=b(()=>{lke(),Wwe(),vke=class extends oke{static{mt(this,"PacketTokenBuilder")}static{s(this,"PacketTokenBuilder")}constructor(){super(["packet"])}},xke={parser:{TokenBuilder:s(()=>new vke,"TokenBuilder"),ValueConverter:s(()=>new ske,"ValueConverter")}},mt(yke,"createPacketServices"),s(yke,"createPacketServices")});function wke(e=Ewe){var e=uwe(cwe(e),K6e),t=uwe(lwe({shared:e}),J6e,Eke);return e.ServiceRegistry.register(t),{shared:e,Pie:t}}var kke,Tke,Eke,Cke=b(()=>{lke(),Wwe(),kke=class extends oke{static{mt(this,"PieTokenBuilder")}static{s(this,"PieTokenBuilder")}constructor(){super(["pie","showData"])}},Tke=class extends ake{static{mt(this,"PieValueConverter")}static{s(this,"PieValueConverter")}runCustomConverter(e,t,r){if("PIE_SECTION_LABEL"===e.name)return t.replace(/"/g,"").trim()}},Eke={parser:{TokenBuilder:s(()=>new kke,"TokenBuilder"),ValueConverter:s(()=>new Tke,"ValueConverter")}},mt(wke,"createPieServices"),s(wke,"createPieServices")});function _ke(e=Ewe){var e=uwe(cwe(e),K6e),t=uwe(lwe({shared:e}),eke,Lke);return e.ServiceRegistry.register(t),{shared:e,Architecture:t}}var Ske,Ake,Lke,Nke=b(()=>{lke(),Wwe(),Ske=class extends oke{static{mt(this,"ArchitectureTokenBuilder")}static{s(this,"ArchitectureTokenBuilder")}constructor(){super(["architecture"])}},Ake=class extends ake{static{mt(this,"ArchitectureValueConverter")}static{s(this,"ArchitectureValueConverter")}runCustomConverter(e,t,r){return"ARCH_ICON"===e.name?t.replace(/[()]/g,"").trim():"ARCH_TEXT_ICON"===e.name?t.replace(/["()]/g,""):"ARCH_TITLE"===e.name?t.replace(/[[\]]/g,"").trim():void 0}},Lke={parser:{TokenBuilder:s(()=>new Ske,"TokenBuilder"),ValueConverter:s(()=>new Ake,"ValueConverter")}},mt(_ke,"createArchitectureServices"),s(_ke,"createArchitectureServices")});function Ike(e=Ewe){var e=uwe(cwe(e),K6e),t=uwe(lwe({shared:e}),rke,Mke);return e.ServiceRegistry.register(t),{shared:e,Radar:t}}var Rke,Mke,Dke=b(()=>{lke(),Wwe(),Rke=class extends oke{static{mt(this,"RadarTokenBuilder")}static{s(this,"RadarTokenBuilder")}constructor(){super(["radar-beta"])}},Mke={parser:{TokenBuilder:s(()=>new Rke,"TokenBuilder"),ValueConverter:s(()=>new ske,"ValueConverter")}},mt(Ike,"createRadarServices"),s(Ike,"createRadarServices")});function Oke(e){var t,r=e.validation.TreemapValidator;(e=e.validation.ValidationRegistry)&&(t={Treemap:r.checkSingleRoot.bind(r)},e.register(t,r))}function Pke(e=Ewe){var e=uwe(cwe(e),K6e),t=uwe(lwe({shared:e}),nke,Gke);return e.ServiceRegistry.register(t),Oke(t),{shared:e,Treemap:t}}var Bke,$ke,Fke,zke,Gke,Uke=b(()=>{lke(),Wwe(),Bke=class extends oke{static{mt(this,"TreemapTokenBuilder")}static{s(this,"TreemapTokenBuilder")}constructor(){super(["treemap"])}},$ke=/classDef\s+([A-Z_a-z]\w+)(?:\s+([^\n\r;]*))?;?/,Fke=class extends ake{static{mt(this,"TreemapValueConverter")}static{s(this,"TreemapValueConverter")}runCustomConverter(e,t,r){return"NUMBER2"===e.name?parseFloat(t.replace(/,/g,"")):"SEPARATOR"===e.name||"STRING2"===e.name?t.substring(1,t.length-1):"INDENTATION"===e.name?t.length:"ClassDef"===e.name?"string"!=typeof t?t:(e=$ke.exec(t))?{$type:"ClassDefStatement",className:e[1],styleText:e[2]||void 0}:void 0:void 0}},mt(Oke,"registerValidationChecks"),s(Oke,"registerValidationChecks"),zke=class{static{mt(this,"TreemapValidator")}static{s(this,"TreemapValidator")}checkSingleRoot(e,t){let r;for(var n of e.TreemapRows)n.item&&(void 0===r&&void 0===n.indent?r=0:(void 0===n.indent||void 0!==r&&r>=parseInt(n.indent,10))&&t("error","Multiple root nodes are not allowed in a treemap.",{node:n,property:"item"}))}},Gke={parser:{TokenBuilder:s(()=>new Bke,"TokenBuilder"),ValueConverter:s(()=>new Fke,"ValueConverter")},validation:{TreemapValidator:s(()=>new zke,"TreemapValidator")}},mt(Pke,"createTreemapServices"),s(Pke,"createTreemapServices")}),qke={},jke=(OFe(qke,{InfoModule:()=>fke,createInfoServices:()=>pke}),b(()=>{mke(),lke()})),Yke={},Wke=(OFe(Yke,{PacketModule:()=>xke,createPacketServices:()=>yke}),b(()=>{bke(),lke()})),Hke={},Vke=(OFe(Hke,{PieModule:()=>Eke,createPieServices:()=>wke}),b(()=>{Cke(),lke()})),Xke={},Kke=(OFe(Xke,{ArchitectureModule:()=>Lke,createArchitectureServices:()=>_ke}),b(()=>{Nke(),lke()})),Zke={},Qke=(OFe(Zke,{GitGraphModule:()=>uke,createGitGraphServices:()=>cke}),b(()=>{dke(),lke()})),Jke={},eTe=(OFe(Jke,{RadarModule:()=>Mke,createRadarServices:()=>Ike}),b(()=>{Dke(),lke()})),tTe={},rTe=(OFe(tTe,{TreemapModule:()=>Gke,createTreemapServices:()=>Pke}),b(()=>{Uke(),lke()}));async function nTe(e,t){var r=aTe[e];if(!r)throw new Error("Unknown diagram type: "+e);if(iTe[e]||await r(),0<(r=iTe[e].parse(t)).lexerErrors.length||0<r.parserErrors.length)throw new sTe(r);return r.value}var iTe,aTe,sTe,oTe=b(()=>{dke(),mke(),bke(),Cke(),Nke(),Dke(),Uke(),lke(),iTe={},aTe={info:s(async()=>{var e=(e=(await Promise.resolve().then(()=>(jke(),qke))).createInfoServices)().Info.parser.LangiumParser;iTe.info=e},"info"),packet:s(async()=>{var e=(e=(await Promise.resolve().then(()=>(Wke(),Yke))).createPacketServices)().Packet.parser.LangiumParser;iTe.packet=e},"packet"),pie:s(async()=>{var e=(e=(await Promise.resolve().then(()=>(Vke(),Hke))).createPieServices)().Pie.parser.LangiumParser;iTe.pie=e},"pie"),architecture:s(async()=>{var e=(e=(await Promise.resolve().then(()=>(Kke(),Xke))).createArchitectureServices)().Architecture.parser.LangiumParser;iTe.architecture=e},"architecture"),gitGraph:s(async()=>{var e=(e=(await Promise.resolve().then(()=>(Qke(),Zke))).createGitGraphServices)().GitGraph.parser.LangiumParser;iTe.gitGraph=e},"gitGraph"),radar:s(async()=>{var e=(e=(await Promise.resolve().then(()=>(eTe(),Jke))).createRadarServices)().Radar.parser.LangiumParser;iTe.radar=e},"radar"),treemap:s(async()=>{var e=(e=(await Promise.resolve().then(()=>(rTe(),tTe))).createTreemapServices)().Treemap.parser.LangiumParser;iTe.treemap=e},"treemap")},mt(nTe,"parse"),s(nTe,"parse"),sTe=class extends Error{static{mt(this,"MermaidParseError")}constructor(e){super(`Parsing failed: ${e.lexerErrors.map(e=>e.message).join(` +`)} `+e.parserErrors.map(e=>e.message).join(` +`)),this.result=e}static{s(this,"MermaidParseError")}}});function lTe(e,t){e.accDescr&&t.setAccDescription?.(e.accDescr),e.accTitle&&t.setAccTitle?.(e.accTitle),e.title&&t.setDiagramTitle?.(e.title)}var cTe,hTe,uTe=b(()=>{mt(lTe,"populateCommonDb")}),dTe=b(()=>{cTe={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4}}),pTe=b(()=>{hTe=class{constructor(e){this.init=e,this.records=this.init()}static{mt(this,"ImperativeState")}reset(){this.records=this.init()}}});function gTe(){return qC({length:7})}function fTe(e,n){let i=Object.create(null);return e.reduce((e,t)=>{var r=n(t);return i[r]||(i[r]=!0,e.push(t)),e},[])}function mTe(e,t,r){-1===(t=e.indexOf(t))?e.push(r):e.splice(t,1,r)}function yTe(e){let t=e.reduce((e,t)=>e.seq>t.seq?e:t,e[0]),r="";e.forEach(function(e){e===t?r+="\t*":r+="\t|"});var n,i=[r,t.id,t.seq];for(n in y.records.branches)y.records.branches.get(n)===t.id&&i.push(n);if(D.debug(i.join(" ")),t.parents&&2==t.parents.length&&t.parents[0]&&t.parents[1]){var a=y.records.commits.get(t.parents[0]);mTe(e,t,a),t.parents[1]&&e.push(y.records.commits.get(t.parents[1]))}else{if(0==t.parents.length)return;t.parents[0]&&(a=y.records.commits.get(t.parents[0]),mTe(e,t,a))}yTe(e=fTe(e,e=>e.id))}var vTe,xTe,y,bTe,wTe,kTe,TTe,ETe,CTe,_Te,STe,ATe,LTe,NTe,ITe,RTe,MTe,DTe,OTe,PTe,BTe,$Te,FTe,zTe,GTe,UTe,qTe,jTe,YTe,WTe,HTe,VTe,XTe,KTe,ZTe,QTe,JTe,e7e,t7e,r7e,n7e,i7e,a7e,s7e,o7e,l7e,c7e,h7e,u7e,d7e,p7e,g7e,f7e,m7e,y7e,v7e,x7e,b7e,w7e,k7e,T7e,E7e,C7e=b(()=>{e(),i_(),rn(),Oc(),ku(),dTe(),pTe(),en(),vTe=Yt.gitGraph,xTe=mt(()=>_C({...vTe,...ar().gitGraph}),"getConfig"),y=new hTe(()=>{var e=(t=xTe()).mainBranchName,t=t.mainBranchOrder;return{mainBranchName:e,commits:new Map,head:null,branchConfig:new Map([[e,{name:e,order:t}]]),branches:new Map([[e,null]]),currBranch:e,direction:"LR",seq:0,options:{}}}),mt(gTe,"getID"),mt(fTe,"uniqBy"),bTe=mt(function(e){y.records.direction=e},"setDirection"),wTe=mt(function(e){D.debug("options str",e),e=e?.trim()||"{}";try{y.records.options=JSON.parse(e)}catch(e){D.error("error while parsing gitGraph options",e.message)}},"setOptions"),kTe=mt(function(){return y.records.options},"getOptions"),TTe=mt(function(e){let t=e.msg,r=e.id,n=e.type,i=e.tags,a=(D.info("commit",t,r,n,i),D.debug("Entering commit:",t,r,n,i),xTe());r=L.sanitizeText(r,a),t=L.sanitizeText(t,a),i=i?.map(e=>L.sanitizeText(e,a)),e={id:r||y.records.seq+"-"+gTe(),message:t,seq:y.records.seq++,type:n??cTe.NORMAL,tags:i??[],parents:null==y.records.head?[]:[y.records.head.id],branch:y.records.currBranch},y.records.head=e,D.info("main branch",a.mainBranchName),y.records.commits.has(e.id)&&D.warn(`Commit ID ${e.id} already exists`),y.records.commits.set(e.id,e),y.records.branches.set(y.records.currBranch,e.id),D.debug("in pushCommit "+e.id)},"commit"),ETe=mt(function(e){var t=e.name,e=e.order,t=L.sanitizeText(t,xTe());if(y.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}")`);y.records.branches.set(t,null!=y.records.head?y.records.head.id:null),y.records.branchConfig.set(t,{name:t,order:e}),STe(t),D.debug("in createBranch")},"branch"),CTe=mt(e=>{var t=e.branch,r=e.id,n=e.type,i=e.tags,a=xTe(),t=L.sanitizeText(t,a),r=r&&L.sanitizeText(r,a),e=y.records.branches.get(y.records.currBranch),a=y.records.branches.get(t),e=e?y.records.commits.get(e):void 0,s=a?y.records.commits.get(a):void 0;if(e&&s&&e.branch===t)throw new Error(`Cannot merge branch '${t}' into itself.`);if(y.records.currBranch===t)throw(o=new Error('Incorrect usage of "merge". Cannot merge a branch to itself')).hash={text:"merge "+t,token:"merge "+t,expected:["branch abc"]},o;if(void 0===e||!e)throw(o=new Error(`Incorrect usage of "merge". Current branch (${y.records.currBranch})has no commits`)).hash={text:"merge "+t,token:"merge "+t,expected:["commit"]},o;if(!y.records.branches.has(t))throw(o=new Error('Incorrect usage of "merge". Branch to be merged ('+t+") does not exist")).hash={text:"merge "+t,token:"merge "+t,expected:["branch "+t]},o;if(void 0===s||!s)throw(o=new Error('Incorrect usage of "merge". Branch to be merged ('+t+") has no commits")).hash={text:"merge "+t,token:"merge "+t,expected:['"commit"']},o;if(e===s)throw(o=new Error('Incorrect usage of "merge". Both branches have same head')).hash={text:"merge "+t,token:"merge "+t,expected:["branch abc"]},o;if(r&&y.records.commits.has(r))throw(e=new Error('Incorrect usage of "merge". Commit with id:'+r+" already exists, use different custom id")).hash={text:`merge ${t} ${r} ${n} `+i?.join(" "),token:`merge ${t} ${r} ${n} `+i?.join(" "),expected:[`merge ${t} ${r}_UNIQUE ${n} `+i?.join(" ")]},e;var s=a||"",o={id:r||y.records.seq+"-"+gTe(),message:`merged branch ${t} into `+y.records.currBranch,seq:y.records.seq++,parents:null==y.records.head?[]:[y.records.head.id,s],branch:y.records.currBranch,type:cTe.MERGE,customType:n,customId:!!r,tags:i??[]};y.records.head=o,y.records.commits.set(o.id,o),y.records.branches.set(y.records.currBranch,o.id),D.debug(y.records.branches),D.debug("in mergeBranch")},"merge"),_Te=mt(function(e){let t=e.id,r=e.targetId,n=e.tags,i=e.parent,a=(D.debug("Entering cherryPick:",t,r,n),xTe());if(t=L.sanitizeText(t,a),r=L.sanitizeText(r,a),n=n?.map(e=>L.sanitizeText(e,a)),i=L.sanitizeText(i,a),!t||!y.records.commits.has(t))throw(e=new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided')).hash={text:`cherryPick ${t} `+r,token:`cherryPick ${t} `+r,expected:["cherry-pick abc"]},e;if(void 0===(e=y.records.commits.get(t))||!e)throw new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');if(i&&(!Array.isArray(e.parents)||!e.parents.includes(i)))throw new Error("Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.");var s=e.branch;if(e.type===cTe.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||!y.records.commits.has(r)){if(s===y.records.currBranch)throw(s=new Error('Incorrect usage of "cherryPick". Source commit is already on current branch')).hash={text:`cherryPick ${t} `+r,token:`cherryPick ${t} `+r,expected:["cherry-pick abc"]},s;if(void 0===(s=y.records.branches.get(y.records.currBranch))||!s)throw(o=new Error(`Incorrect usage of "cherry-pick". Current branch (${y.records.currBranch})has no commits`)).hash={text:`cherryPick ${t} `+r,token:`cherryPick ${t} `+r,expected:["cherry-pick abc"]},o;var o=y.records.commits.get(s);if(void 0===o||!o)throw(s=new Error(`Incorrect usage of "cherry-pick". Current branch (${y.records.currBranch})has no commits`)).hash={text:`cherryPick ${t} `+r,token:`cherryPick ${t} `+r,expected:["cherry-pick abc"]},s;o={id:y.records.seq+"-"+gTe(),message:`cherry-picked ${e?.message} into `+y.records.currBranch,seq:y.records.seq++,parents:null==y.records.head?[]:[y.records.head.id,e.id],branch:y.records.currBranch,type:cTe.CHERRY_PICK,tags:n?n.filter(Boolean):["cherry-pick:"+e.id+(e.type===cTe.MERGE?"|parent:"+i:"")]},y.records.head=o,y.records.commits.set(o.id,o),y.records.branches.set(y.records.currBranch,o.id),D.debug(y.records.branches),D.debug("in cherryPick")}},"cherryPick"),STe=mt(function(e){var t;if(e=L.sanitizeText(e,xTe()),!y.records.branches.has(e))throw(t=new Error(`Trying to checkout branch which is not yet created. (Help try using "branch ${e}")`)).hash={text:"checkout "+e,token:"checkout "+e,expected:["branch "+e]},t;y.records.currBranch=e,t=y.records.branches.get(y.records.currBranch),y.records.head=void 0!==t&&t?y.records.commits.get(t)??null:null},"checkout"),mt(mTe,"upsert"),mt(yTe,"prettyPrintCommitHistory"),ATe=mt(function(){D.debug(y.records.commits),yTe([MTe()[0]])},"prettyPrint"),LTe=mt(function(){y.reset(),fh()},"clear"),NTe=mt(function(){return[...y.records.branchConfig.values()].map((e,t)=>null!=e.order?e:{...e,order:parseFloat("0."+t)}).sort((e,t)=>(e.order??0)-(t.order??0)).map(({name:e})=>({name:e}))},"getBranchesAsObjArray"),ITe=mt(function(){return y.records.branches},"getBranches"),RTe=mt(function(){return y.records.commits},"getCommits"),MTe=mt(function(){var e=[...y.records.commits.values()];return e.forEach(function(e){D.debug(e.id)}),e.sort((e,t)=>e.seq-t.seq),e},"getCommitsArray"),DTe=mt(function(){return y.records.currBranch},"getCurrentBranch"),OTe=mt(function(){return y.records.direction},"getDirection"),PTe=mt(function(){return y.records.head},"getHead"),BTe={commitType:cTe,getConfig:xTe,setDirection:bTe,setOptions:wTe,getOptions:kTe,commit:TTe,branch:ETe,merge:CTe,cherryPick:_Te,checkout:STe,prettyPrint:ATe,clear:LTe,getBranchesAsObjArray:NTe,getBranches:ITe,getCommits:RTe,getCommitsArray:MTe,getCurrentBranch:DTe,getDirection:OTe,getHead:PTe,setAccTitle:mh,getAccTitle:yh,getAccDescription:xh,setAccDescription:vh,setDiagramTitle:bh,getDiagramTitle:wh}}),_7e=b(()=>{oTe(),e(),uTe(),C7e(),dTe(),$Te=mt((e,t)=>{lTe(e,t),e.dir&&t.setDirection(e.dir);for(var r of e.statements)FTe(r,t)},"populate"),FTe=mt((e,t)=>{var r={Commit:mt(e=>t.commit(zTe(e)),"Commit"),Branch:mt(e=>t.branch(GTe(e)),"Branch"),Merge:mt(e=>t.merge(UTe(e)),"Merge"),Checkout:mt(e=>t.checkout(qTe(e)),"Checkout"),CherryPicking:mt(e=>t.cherryPick(jTe(e)),"CherryPicking")}[e.$type];r?r(e):D.error("Unknown statement type: "+e.$type)},"parseStatement"),zTe=mt(e=>({id:e.id,msg:e.message??"",type:void 0!==e.type?cTe[e.type]:cTe.NORMAL,tags:e.tags??void 0}),"parseCommit"),GTe=mt(e=>({name:e.name,order:e.order??0}),"parseBranch"),UTe=mt(e=>({branch:e.branch,id:e.id??"",type:void 0!==e.type?cTe[e.type]:void 0,tags:e.tags??void 0}),"parseMerge"),qTe=mt(e=>e.branch,"parseCheckout"),jTe=mt(e=>({id:e.id,targetId:"",tags:0===e.tags?.length?void 0:e.tags,parent:e.parent}),"parseCherryPicking"),YTe={parse:mt(async e=>{e=await nTe("gitGraph",e),D.debug(e),$Te(e,BTe)},"parse")}}),S7e=b(()=>{i6(),Tu(),e(),i_(),dTe(),w7e=O(),WTe=w7e?.gitGraph,HTe=new Map,VTe=new Map,XTe=new Map,KTe=[],ZTe=0,QTe="LR",JTe=mt(()=>{HTe.clear(),VTe.clear(),XTe.clear(),ZTe=0,KTe=[],QTe="LR"},"clear"),e7e=mt(e=>{let r=document.createElementNS("http://www.w3.org/2000/svg","text");return("string"==typeof e?e.split(/\\n|\n|<br\s*\/?>/gi):e).forEach(e=>{var t=document.createElementNS("http://www.w3.org/2000/svg","tspan");t.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),t.setAttribute("dy","1em"),t.setAttribute("x","0"),t.setAttribute("class","row"),t.textContent=e.trim(),r.appendChild(t)}),r},"drawText"),t7e=mt(e=>{let r,n,i;return i="BT"===QTe?(n=mt((e,t)=>e<=t,"comparisonFunc"),1/0):(n=mt((e,t)=>t<=e,"comparisonFunc"),0),e.forEach(e=>{var t="TB"===QTe||"BT"==QTe?VTe.get(e)?.y:VTe.get(e)?.x;void 0!==t&&n(t,i)&&(r=e,i=t)}),r},"findClosestParent"),r7e=mt(e=>{let r="",n=1/0;return e.forEach(e=>{var t=VTe.get(e).y;t<=n&&(r=e,n=t)}),r||void 0},"findClosestParentBT"),n7e=mt((e,n,t)=>{let i=t,a=t,r=[];e.forEach(e=>{var t=n.get(e);if(!t)throw new Error("Commit not found for key "+e);t.parents.length?(i=a7e(t),a=Math.max(i,a)):r.push(t),s7e(t,i)}),i=a,r.forEach(e=>{o7e(e,i,t)}),e.forEach(e=>{var t,r;(e=n.get(e))?.parents.length&&(t=r7e(e.parents),(i=VTe.get(t).y-40)<=a&&(a=i),t=HTe.get(e.branch).pos,r=i-10,VTe.set(e.id,{x:t,y:r}))})},"setParallelBTPos"),i7e=mt(e=>{var t=t7e(e.parents.filter(e=>null!==e));if(!t)throw new Error("Closest parent not found for commit "+e.id);if(void 0===(t=VTe.get(t)?.y))throw new Error("Closest parent position not found for commit "+e.id);return t},"findClosestParentPos"),a7e=mt(e=>i7e(e)+40,"calculateCommitPosition"),s7e=mt((e,t)=>{var r=HTe.get(e.branch);if(r)return r=r.pos,VTe.set(e.id,{x:r,y:t+=10}),{x:r,y:t};throw new Error("Branch not found for commit "+e.id)},"setCommitPosition"),o7e=mt((e,t,r)=>{var n=HTe.get(e.branch);if(!n)throw new Error("Branch not found for commit "+e.id);n=n.pos,VTe.set(e.id,{x:n,y:t+r})},"setRootPosition"),l7e=mt((e,t,r,n,i,a)=>{var s;a===cTe.HIGHLIGHT?(e.append("rect").attr("x",r.x-10).attr("y",r.y-10).attr("width",20).attr("height",20).attr("class",`commit ${t.id} commit-highlight${i%8} ${n}-outer`),e.append("rect").attr("x",r.x-6).attr("y",r.y-6).attr("width",12).attr("height",12).attr("class",`commit ${t.id} commit${i%8} ${n}-inner`)):a===cTe.CHERRY_PICK?(e.append("circle").attr("cx",r.x).attr("cy",r.y).attr("r",10).attr("class",`commit ${t.id} `+n),e.append("circle").attr("cx",r.x-3).attr("cy",r.y+2).attr("r",2.75).attr("fill","#fff").attr("class",`commit ${t.id} `+n),e.append("circle").attr("cx",r.x+3).attr("cy",r.y+2).attr("r",2.75).attr("fill","#fff").attr("class",`commit ${t.id} `+n),e.append("line").attr("x1",r.x+3).attr("y1",r.y+1).attr("x2",r.x).attr("y2",r.y-5).attr("stroke","#fff").attr("class",`commit ${t.id} `+n),e.append("line").attr("x1",r.x-3).attr("y1",r.y+1).attr("x2",r.x).attr("y2",r.y-5).attr("stroke","#fff").attr("class",`commit ${t.id} `+n)):((s=e.append("circle")).attr("cx",r.x),s.attr("cy",r.y),s.attr("r",t.type===cTe.MERGE?9:10),s.attr("class",`commit ${t.id} commit`+i%8),a===cTe.MERGE&&((s=e.append("circle")).attr("cx",r.x),s.attr("cy",r.y),s.attr("r",6),s.attr("class",`commit ${n} ${t.id} commit`+i%8)),a===cTe.REVERSE&&e.append("path").attr("d",`M ${r.x-5},${r.y-5}L${r.x+5},${r.y+5}M${r.x-5},${r.y+5}L${r.x+5},`+(r.y-5)).attr("class",`commit ${n} ${t.id} commit`+i%8))},"drawCommitBullet"),c7e=mt((e,t,r,n)=>{var i,a;t.type!==cTe.CHERRY_PICK&&(t.customId&&t.type===cTe.MERGE||t.type!==cTe.MERGE)&&WTe?.showCommitLabel&&(a=(e=e.append("g")).insert("rect").attr("class","commit-label-bkg"),i=(t=e.append("text").attr("x",n).attr("y",r.y+25).attr("class","commit-label").text(t.id)).node()?.getBBox())&&(a.attr("x",r.posWithOffset-i.width/2-2).attr("y",r.y+13.5).attr("width",i.width+4).attr("height",i.height+4),"TB"===QTe||"BT"===QTe?(a.attr("x",r.x-(i.width+16+5)).attr("y",r.y-12),t.attr("x",r.x-(i.width+16)).attr("y",r.y+i.height-12)):t.attr("x",r.posWithOffset-i.width/2),WTe.rotateCommitLabel)&&("TB"===QTe||"BT"===QTe?(t.attr("transform","rotate(-45, "+r.x+", "+r.y+")"),a.attr("transform","rotate(-45, "+r.x+", "+r.y+")")):(t=-7.5-(i.width+10)/25*9.5,a=10+i.width/25*8.5,e.attr("transform","translate("+t+", "+a+") rotate(-45, "+n+", "+r.y+")")))},"drawCommitLabel"),h7e=mt((i,a,s,o)=>{if(0<a.tags.length){let e=0,t=0,r=0,n=[];for(var l of a.tags.reverse()){var c=i.insert("polygon"),h=i.append("circle"),u=(l=i.append("text").attr("y",s.y-16-e).attr("class","tag-label").text(l)).node()?.getBBox();if(!u)throw new Error("Tag bbox not found");t=Math.max(t,u.width),r=Math.max(r,u.height),l.attr("x",s.posWithOffset-u.width/2),n.push({tag:l,hole:h,rect:c,yOffset:e}),e+=20}for(var{tag:d,hole:p,rect:g,yOffset:f}of n){var m=r/2,y=s.y-19.2-f;g.attr("class","tag-label-bkg").attr("points",` + ${o-t/2-2},${2+y} + ${o-t/2-2},${y-2} + ${s.posWithOffset-t/2-4},${y-m-2} + ${s.posWithOffset+t/2+4},${y-m-2} + ${s.posWithOffset+t/2+4},${y+m+2} + ${s.posWithOffset-t/2-4},`+(y+m+2)),p.attr("cy",y).attr("cx",o-t/2+2).attr("r",1.5).attr("class","tag-hole"),"TB"!==QTe&&"BT"!==QTe||(y=o+f,g.attr("class","tag-label-bkg").attr("points",` + ${s.x},${y+2} + ${s.x},${y-2} + ${s.x+10},${y-m-2} + ${s.x+10+t+4},${y-m-2} + ${s.x+10+t+4},${y+m+2} + ${s.x+10},`+(y+m+2)).attr("transform","translate(12,12) rotate(45, "+s.x+","+o+")"),p.attr("cx",s.x+2).attr("cy",y).attr("transform","translate(12,12) rotate(45, "+s.x+","+o+")"),d.attr("x",s.x+5).attr("y",y+3).attr("transform","translate(14,14) rotate(45, "+s.x+","+o+")"))}}},"drawCommitTags"),u7e=mt(e=>{switch(e.customType??e.type){case cTe.NORMAL:return"commit-normal";case cTe.REVERSE:return"commit-reverse";case cTe.HIGHLIGHT:return"commit-highlight";case cTe.MERGE:return"commit-merge";case cTe.CHERRY_PICK:return"commit-cherry-pick";default:return"commit-normal"}},"getCommitClassType"),d7e=mt((e,t,r,n)=>{var i,a={x:0,y:0};return 0<e.parents.length?(i=t7e(e.parents))?(i=n.get(i)??a,"TB"===t?i.y+40:"BT"===t?(n.get(e.id)??a).y-40:i.x+40):0:"TB"===t?30:"BT"===t?(n.get(e.id)??a).y-40:0},"calculatePosition"),p7e=mt((e,t,r)=>{var r="BT"===QTe&&r?t:t+10,t="TB"===QTe||"BT"===QTe?r:HTe.get(e.branch)?.pos,n="TB"===QTe||"BT"===QTe?HTe.get(e.branch)?.pos:r;if(void 0===n||void 0===t)throw new Error("Position were undefined for commit "+e.id);return{x:n,y:t,posWithOffset:r}},"getCommitPosition"),g7e=mt((e,a,s)=>{if(!WTe)throw new Error("GitGraph config not found");let o=e.append("g").attr("class","commit-bullets"),l=e.append("g").attr("class","commit-labels"),c="TB"===QTe||"BT"===QTe?30:0,t=[...a.keys()],h=WTe?.parallelCommits??!1,r=mt((e,t)=>(e=a.get(e)?.seq,t=a.get(t)?.seq,void 0!==e&&void 0!==t?e-t:0),"sortKeys"),n=t.sort(r);"BT"===QTe&&(h&&n7e(n,a,c),n=n.reverse()),n.forEach(e=>{var t=a.get(e);if(!t)throw new Error("Commit not found for key "+e);h&&(c=d7e(t,QTe,c,VTe));var r,n,i,e=p7e(t,c,h);s&&(r=u7e(t),n=t.customType??t.type,i=HTe.get(t.branch)?.index??0,l7e(o,t,e,r,i,n),c7e(l,t,e,c),h7e(l,t,e,c)),"TB"===QTe||"BT"===QTe?VTe.set(t.id,{x:e.x,y:e.posWithOffset}):VTe.set(t.id,{x:e.posWithOffset,y:e.y}),(c="BT"===QTe&&h?c+40:c+40+10)>ZTe&&(ZTe=c)})},"drawCommits"),f7e=mt((t,r,e,n,i)=>{let a=(("TB"===QTe||"BT"===QTe?e.x<n.x:e.y<n.y)?r:t).branch,s=mt(e=>e.branch===a,"isOnBranchToGetCurve"),o=mt(e=>e.seq>t.seq&&e.seq<r.seq,"isBetweenCommits");return[...i.values()].some(e=>o(e)&&s(e))},"shouldRerouteArrow"),m7e=mt((e,t,r=0)=>{let n=e+Math.abs(e-t)/2,i;return 5<r?n:KTe.every(e=>10<=Math.abs(e-n))?(KTe.push(n),n):(i=Math.abs(e-t),m7e(e,t-i/5,r+1))},"findLane"),y7e=mt((e,t,r,n)=>{var i,a=VTe.get(t.id),s=VTe.get(r.id);if(void 0===a||void 0===s)throw new Error(`Commit positions not found for commits ${t.id} and `+r.id);let o=f7e(t,r,a,s,n),l="",c="",h=0,u=0,d=HTe.get(r.branch)?.index;r.type===cTe.MERGE&&t.id!==r.parents[0]&&(d=HTe.get(t.branch)?.index);let p;if(o?(l="A 10 10, 0, 0, 0,",c="A 10 10, 0, 0, 1,",h=10,u=10,n=a.y<s.y?m7e(a.y,s.y):m7e(s.y,a.y),i=a.x<s.x?m7e(a.x,s.x):m7e(s.x,a.x),p="TB"===QTe?a.x<s.x?`M ${a.x} ${a.y} L ${i-h} ${a.y} ${c} ${i} ${a.y+u} L ${i} ${s.y-h} ${l} ${i+u} ${s.y} L ${s.x} `+s.y:(d=HTe.get(t.branch)?.index,`M ${a.x} ${a.y} L ${i+h} ${a.y} ${l} ${i} ${a.y+u} L ${i} ${s.y-h} ${c} ${i-u} ${s.y} L ${s.x} `+s.y):"BT"===QTe?a.x<s.x?`M ${a.x} ${a.y} L ${i-h} ${a.y} ${l} ${i} ${a.y-u} L ${i} ${s.y+h} ${c} ${i+u} ${s.y} L ${s.x} `+s.y:(d=HTe.get(t.branch)?.index,`M ${a.x} ${a.y} L ${i+h} ${a.y} ${c} ${i} ${a.y-u} L ${i} ${s.y+h} ${l} ${i-u} ${s.y} L ${s.x} `+s.y):a.y<s.y?`M ${a.x} ${a.y} L ${a.x} ${n-h} ${l} ${a.x+u} ${n} L ${s.x-h} ${n} ${c} ${s.x} ${n+u} L ${s.x} `+s.y:(d=HTe.get(t.branch)?.index,`M ${a.x} ${a.y} L ${a.x} ${n+h} ${c} ${a.x+u} ${n} L ${s.x-h} ${n} ${l} ${s.x} ${n-u} L ${s.x} `+s.y)):(l="A 20 20, 0, 0, 0,",c="A 20 20, 0, 0, 1,",h=20,u=20,"TB"===QTe?(a.x<s.x&&(p=r.type===cTe.MERGE&&t.id!==r.parents[0]?`M ${a.x} ${a.y} L ${a.x} ${s.y-h} ${l} ${a.x+u} ${s.y} L ${s.x} `+s.y:`M ${a.x} ${a.y} L ${s.x-h} ${a.y} ${c} ${s.x} ${a.y+u} L ${s.x} `+s.y),a.x>s.x&&(l="A 20 20, 0, 0, 0,",c="A 20 20, 0, 0, 1,",h=20,u=20,p=r.type===cTe.MERGE&&t.id!==r.parents[0]?`M ${a.x} ${a.y} L ${a.x} ${s.y-h} ${c} ${a.x-u} ${s.y} L ${s.x} `+s.y:`M ${a.x} ${a.y} L ${s.x+h} ${a.y} ${l} ${s.x} ${a.y+u} L ${s.x} `+s.y),a.x===s.x&&(p=`M ${a.x} ${a.y} L ${s.x} `+s.y)):"BT"===QTe?(a.x<s.x&&(p=r.type===cTe.MERGE&&t.id!==r.parents[0]?`M ${a.x} ${a.y} L ${a.x} ${s.y+h} ${c} ${a.x+u} ${s.y} L ${s.x} `+s.y:`M ${a.x} ${a.y} L ${s.x-h} ${a.y} ${l} ${s.x} ${a.y-u} L ${s.x} `+s.y),a.x>s.x&&(l="A 20 20, 0, 0, 0,",c="A 20 20, 0, 0, 1,",h=20,u=20,p=r.type===cTe.MERGE&&t.id!==r.parents[0]?`M ${a.x} ${a.y} L ${a.x} ${s.y+h} ${l} ${a.x-u} ${s.y} L ${s.x} `+s.y:`M ${a.x} ${a.y} L ${s.x-h} ${a.y} ${l} ${s.x} ${a.y-u} L ${s.x} `+s.y),a.x===s.x&&(p=`M ${a.x} ${a.y} L ${s.x} `+s.y)):(a.y<s.y&&(p=r.type===cTe.MERGE&&t.id!==r.parents[0]?`M ${a.x} ${a.y} L ${s.x-h} ${a.y} ${c} ${s.x} ${a.y+u} L ${s.x} `+s.y:`M ${a.x} ${a.y} L ${a.x} ${s.y-h} ${l} ${a.x+u} ${s.y} L ${s.x} `+s.y),a.y>s.y&&(p=r.type===cTe.MERGE&&t.id!==r.parents[0]?`M ${a.x} ${a.y} L ${s.x-h} ${a.y} ${l} ${s.x} ${a.y-u} L ${s.x} `+s.y:`M ${a.x} ${a.y} L ${a.x} ${s.y+h} ${c} ${a.x+u} ${s.y} L ${s.x} `+s.y),a.y===s.y&&(p=`M ${a.x} ${a.y} L ${s.x} `+s.y))),void 0===p)throw new Error("Line definition not found");e.append("path").attr("d",p).attr("class","arrow arrow"+d%8)},"drawArrow"),v7e=mt((e,r)=>{let n=e.append("g").attr("class","commit-arrows");[...r.keys()].forEach(e=>{let t=r.get(e);t.parents&&0<t.parents.length&&t.parents.forEach(e=>{y7e(n,r.get(e),t,r)})})},"drawArrows"),x7e=mt((e,t)=>{let a=e.append("g");t.forEach((e,t)=>{var t=t%8,r=HTe.get(e.name)?.pos;if(void 0===r)throw new Error("Position not found for branch "+e.name);(n=a.append("line")).attr("x1",0),n.attr("y1",r),n.attr("x2",ZTe),n.attr("y2",r),n.attr("class","branch branch"+t),"TB"===QTe?(n.attr("y1",30),n.attr("x1",r),n.attr("y2",ZTe),n.attr("x2",r)):"BT"===QTe&&(n.attr("y1",ZTe),n.attr("x1",r),n.attr("y2",30),n.attr("x2",r)),KTe.push(r);var n=e.name,e=e7e(n),n=a.insert("rect"),i=a.insert("g").attr("class","branchLabel").insert("g").attr("class","label branch-label"+t),e=(i.node().appendChild(e),e.getBBox());n.attr("class","branchLabelBkg label"+t).attr("rx",4).attr("ry",4).attr("x",-e.width-4-(!0===WTe?.rotateCommitLabel?30:0)).attr("y",-e.height/2+8).attr("width",e.width+18).attr("height",e.height+4),i.attr("transform","translate("+(-e.width-14-(!0===WTe?.rotateCommitLabel?30:0))+", "+(r-e.height/2-1)+")"),"TB"===QTe?(n.attr("x",r-e.width/2-10).attr("y",0),i.attr("transform","translate("+(r-e.width/2-5)+", 0)")):"BT"===QTe?(n.attr("x",r-e.width/2-10).attr("y",ZTe),i.attr("transform","translate("+(r-e.width/2-5)+", "+ZTe+")")):n.attr("transform","translate(-19, "+(r-e.height/2)+")")})},"drawBranches"),b7e=mt(function(e,t,r,n,i){return HTe.set(e,{pos:t,index:r}),t+(50+(i?40:0)+("TB"===QTe||"BT"===QTe?n.width/2:0))},"setBranchPosition"),w7e=mt(function(e,t,r,n){if(JTe(),D.debug("in gitgraph renderer",e+` +`,"id:",t,r),!WTe)throw new Error("GitGraph config not found");let s=WTe.rotateCommitLabel??!1,i=n.db,o=(XTe=i.getCommits(),e=i.getBranchesAsObjArray(),QTe=i.getDirection(),H(`[id="${t}"]`)),l=0;e.forEach((e,t)=>{var r=e7e(e.name),n=o.append("g"),i=n.insert("g").attr("class","branchLabel"),a=i.insert("g").attr("class","label branch-label"),r=(a.node()?.appendChild(r),r.getBBox());l=b7e(e.name,l,t,r,s),a.remove(),i.remove(),n.remove()}),g7e(o,XTe,!1),WTe.showBranches&&x7e(o,e),v7e(o,XTe),g7e(o,XTe,!0),e_.insertTitle(o,"gitTitleText",WTe.titleTopMargin??0,i.getDiagramTitle()),Sh(void 0,o,WTe.diagramPadding,WTe.useMaxWidth)},"draw"),k7e={draw:w7e}}),A7e=b(()=>{T7e=mt(t=>` + .commit-id, + .commit-msg, + .branch-label { + fill: lightgrey; + color: lightgrey; + font-family: 'trebuchet ms', verdana, arial, sans-serif; + font-family: var(--mermaid-font-family); + } + ${[0,1,2,3,4,5,6,7].map(e=>` + .branch-label${e} { fill: ${t["gitBranchLabel"+e]}; } + .commit${e} { stroke: ${t["git"+e]}; fill: ${t["git"+e]}; } + .commit-highlight${e} { stroke: ${t["gitInv"+e]}; fill: ${t["gitInv"+e]}; } + .label${e} { fill: ${t["git"+e]}; } + .arrow${e} { stroke: ${t["git"+e]}; } + `).join(` +`)} + + .branch { + stroke-width: 1; + stroke: ${t.lineColor}; + stroke-dasharray: 2; + } + .commit-label { font-size: ${t.commitLabelFontSize}; fill: ${t.commitLabelColor};} + .commit-label-bkg { font-size: ${t.commitLabelFontSize}; fill: ${t.commitLabelBackground}; opacity: 0.5; } + .tag-label { font-size: ${t.tagLabelFontSize}; fill: ${t.tagLabelColor};} + .tag-label-bkg { fill: ${t.tagLabelBackground}; stroke: ${t.tagLabelBorder}; } + .tag-hole { fill: ${t.textColor}; } + + .commit-merge { + stroke: ${t.primaryColor}; + fill: ${t.primaryColor}; + } + .commit-reverse { + stroke: ${t.primaryColor}; + fill: ${t.primaryColor}; + stroke-width: 3; + } + .commit-highlight-outer { + } + .commit-highlight-inner { + stroke: ${t.primaryColor}; + fill: ${t.primaryColor}; + } + + .arrow { stroke-width: 8; stroke-linecap: round; fill: none} + .gitTitleText { + text-anchor: middle; + font-size: 18px; + fill: ${t.textColor}; + } +`,"getStyles"),E7e=T7e}),L7e={};OFe(L7e,{diagram:()=>N7e});var N7e,I7e,R7e,M7e=b(()=>{_7e(),C7e(),S7e(),A7e(),N7e={parser:YTe,db:BTe,renderer:k7e,styles:E7e}}),D7e=b(()=>{function e(){this.yy={}}var t=mt(function(e,t,r,n){for(r=r||{},n=e.length;n--;r[e[n]]=t);return r},"o"),r=[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],n=[1,26],i=[1,27],a=[1,28],s=[1,29],o=[1,30],l=[1,31],c=[1,32],h=[1,33],u=[1,34],d=[1,9],p=[1,10],g=[1,11],f=[1,12],m=[1,13],y=[1,14],v=[1,15],x=[1,16],b=[1,19],w=[1,20],k=[1,21],T=[1,22],E=[1,23],C=[1,25],_=[1,35],n={trace:mt(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:mt(function(e,t,r,n,i,a,s){var o=a.length-1;switch(i){case 1:return a[o-1];case 2:this.$=[];break;case 3:a[o-1].push(a[o]),this.$=a[o-1];break;case 4:case 5:this.$=a[o];break;case 6:case 7:this.$=[];break;case 8:n.setWeekday("monday");break;case 9:n.setWeekday("tuesday");break;case 10:n.setWeekday("wednesday");break;case 11:n.setWeekday("thursday");break;case 12:n.setWeekday("friday");break;case 13:n.setWeekday("saturday");break;case 14:n.setWeekday("sunday");break;case 15:n.setWeekend("friday");break;case 16:n.setWeekend("saturday");break;case 17:n.setDateFormat(a[o].substr(11)),this.$=a[o].substr(11);break;case 18:n.enableInclusiveEndDates(),this.$=a[o].substr(18);break;case 19:n.TopAxis(),this.$=a[o].substr(8);break;case 20:n.setAxisFormat(a[o].substr(11)),this.$=a[o].substr(11);break;case 21:n.setTickInterval(a[o].substr(13)),this.$=a[o].substr(13);break;case 22:n.setExcludes(a[o].substr(9)),this.$=a[o].substr(9);break;case 23:n.setIncludes(a[o].substr(9)),this.$=a[o].substr(9);break;case 24:n.setTodayMarker(a[o].substr(12)),this.$=a[o].substr(12);break;case 27:n.setDiagramTitle(a[o].substr(6)),this.$=a[o].substr(6);break;case 28:this.$=a[o].trim(),n.setAccTitle(this.$);break;case 29:case 30:this.$=a[o].trim(),n.setAccDescription(this.$);break;case 31:n.addSection(a[o].substr(8)),this.$=a[o].substr(8);break;case 33:n.addTask(a[o-1],a[o]),this.$="task";break;case 34:this.$=a[o-1],n.setClickEvent(a[o-1],a[o],null);break;case 35:this.$=a[o-2],n.setClickEvent(a[o-2],a[o-1],a[o]);break;case 36:this.$=a[o-2],n.setClickEvent(a[o-2],a[o-1],null),n.setLink(a[o-2],a[o]);break;case 37:this.$=a[o-3],n.setClickEvent(a[o-3],a[o-2],a[o-1]),n.setLink(a[o-3],a[o]);break;case 38:this.$=a[o-2],n.setClickEvent(a[o-2],a[o],null),n.setLink(a[o-2],a[o-1]);break;case 39:this.$=a[o-3],n.setClickEvent(a[o-3],a[o-1],a[o]),n.setLink(a[o-3],a[o-2]);break;case 40:this.$=a[o-1],n.setLink(a[o-1],a[o]);break;case 41:case 47:this.$=a[o-1]+" "+a[o];break;case 42:case 43:case 45:this.$=a[o-2]+" "+a[o-1]+" "+a[o];break;case 44:case 46:this.$=a[o-3]+" "+a[o-2]+" "+a[o-1]+" "+a[o]}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(r,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:17,12:n,13:i,14:a,15:s,16:o,17:l,18:c,19:18,20:h,21:u,22:d,23:p,24:g,25:f,26:m,27:y,28:v,29:x,30:b,31:w,33:k,35:T,36:E,37:24,38:C,40:_},t(r,[2,7],{1:[2,1]}),t(r,[2,3]),{9:36,11:17,12:n,13:i,14:a,15:s,16:o,17:l,18:c,19:18,20:h,21:u,22:d,23:p,24:g,25:f,26:m,27:y,28:v,29:x,30:b,31:w,33:k,35:T,36:E,37:24,38:C,40:_},t(r,[2,5]),t(r,[2,6]),t(r,[2,17]),t(r,[2,18]),t(r,[2,19]),t(r,[2,20]),t(r,[2,21]),t(r,[2,22]),t(r,[2,23]),t(r,[2,24]),t(r,[2,25]),t(r,[2,26]),t(r,[2,27]),{32:[1,37]},{34:[1,38]},t(r,[2,30]),t(r,[2,31]),t(r,[2,32]),{39:[1,39]},t(r,[2,8]),t(r,[2,9]),t(r,[2,10]),t(r,[2,11]),t(r,[2,12]),t(r,[2,13]),t(r,[2,14]),t(r,[2,15]),t(r,[2,16]),{41:[1,40],43:[1,41]},t(r,[2,4]),t(r,[2,28]),t(r,[2,29]),t(r,[2,33]),t(r,[2,34],{42:[1,42],43:[1,43]}),t(r,[2,40],{41:[1,44]}),t(r,[2,35],{43:[1,45]}),t(r,[2,36]),t(r,[2,38],{42:[1,46]}),t(r,[2,37]),t(r,[2,39])],defaultActions:{},parseError:mt(function(e,t){var r;if(!t.recoverable)throw(r=new Error(e)).hash=t,r;this.trace(e)},"parseError"),parse:mt(function(e){var t,r=this,n=[0],i=[],a=[null],s=[],o=this.table,l="",c=0,h=0,u=0,d=1,p=s.slice.call(arguments,1),g=Object.create(this.lexer),f={yy:{}};for(t in this.yy)Object.prototype.hasOwnProperty.call(this.yy,t)&&(f.yy[t]=this.yy[t]);g.setInput(e,f.yy),f.yy.lexer=g,f.yy.parser=this,"u"<typeof g.yylloc&&(g.yylloc={});var m=g.yylloc,y=(s.push(m),g.options&&g.options.ranges);function v(){var e=i.pop()||g.lex()||d;return"number"!=typeof e&&(e instanceof Array&&(e=(i=e).pop()),e=r.symbols_[e]||e),e}"function"==typeof f.yy.parseError?this.parseError=f.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,mt(function(e){n.length=n.length-2*e,a.length=a.length-e,s.length=s.length-e},"popStack"),mt(v,"lex");for(var x,b,w,k,T,E,C,_={};;){if(w=n[n.length-1],"u"<typeof(k=this.defaultActions[w]||((null===x||"u"<typeof x)&&(x=v()),o[w]&&o[w][x]))||!k.length||!k[0]){var S,A=[];for(T in o[w])this.terminals_[T]&&2<T&&A.push("'"+this.terminals_[T]+"'");S=g.showPosition?"Parse error on line "+(c+1)+`: +`+g.showPosition()+` +Expecting `+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(c+1)+": Unexpected "+(x==d?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(S,{text:g.match,token:this.terminals_[x]||x,line:g.yylineno,loc:m,expected:A})}if(k[0]instanceof Array&&1<k.length)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+x);switch(k[0]){case 1:n.push(x),a.push(g.yytext),s.push(g.yylloc),n.push(k[1]),x=null,b?(x=b,b=null):(h=g.yyleng,l=g.yytext,c=g.yylineno,m=g.yylloc,0<u&&u--);break;case 2:if(E=this.productions_[k[1]][1],_.$=a[a.length-E],_._$={first_line:s[s.length-(E||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(E||1)].first_column,last_column:s[s.length-1].last_column},y&&(_._$.range=[s[s.length-(E||1)].range[0],s[s.length-1].range[1]]),typeof(C=this.performAction.apply(_,[l,h,c,f.yy,k[1],a,s].concat(p)))<"u")return C;E&&(n=n.slice(0,-1*E*2),a=a.slice(0,-1*E),s=s.slice(0,-1*E)),n.push(this.productions_[k[1]][0]),a.push(_.$),s.push(_._$),C=o[n[n.length-2]][n[n.length-1]],n.push(C);break;case 3:return!0}}return!0},"parse")},i={EOF:1,parseError:mt(function(e,t){if(!this.yy.parser)throw new Error(e);this.yy.parser.parseError(e,t)},"parseError"),setInput:mt(function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:mt(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},"input"),unput:mt(function(e){var t=e.length,r=e.split(/(?:\r\n?|\n)/g),e=(this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t,this.match.split(/(?:\r\n?|\n)/g)),n=(this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),r.length-1&&(this.yylineno-=r.length-1),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:r?(r.length===e.length?this.yylloc.first_column:0)+e[e.length-r.length].length-r[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[n[0],n[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},"unput"),more:mt(function(){return this._more=!0,this},"more"),reject:mt(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):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})},"reject"),less:mt(function(e){this.unput(this.match.slice(e))},"less"),pastInput:mt(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(20<e.length?"...":"")+e.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:mt(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(20<e.length?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:mt(function(){var e=this.pastInput(),t=new Array(e.length+1).join("-");return e+this.upcomingInput()+` +`+t+"^"},"showPosition"),test_match:mt(function(e,t){var r,n;if(this.options.backtrack_lexer&&(n={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges)&&(n.yylloc.range=this.yylloc.range.slice(0)),(r=e[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],r=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack)for(var i in n)this[i]=n[i];return!1},"test_match"),next:mt(function(){if(this.done)return this.EOF;var e,t,r,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((r=this._input.match(this.rules[i[a]]))&&(!t||r[0].length>t[0].length)){if(t=r,n=a,this.options.backtrack_lexer){if(!1!==(e=this.test_match(r,i[a])))return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?!1!==(e=this.test_match(t,i[n]))&&e:""===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:mt(function(){return this.next()||this.lex()},"lex"),begin:mt(function(e){this.conditionStack.push(e)},"begin"),popState:mt(function(){return 0<this.conditionStack.length-1?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:mt(function(){return(this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]]:this.conditions.INITIAL).rules},"_currentRules"),topState:mt(function(e){return 0<=(e=this.conditionStack.length-1-Math.abs(e||0))?this.conditionStack[e]:"INITIAL"},"topState"),pushState:mt(function(e){this.begin(e)},"pushState"),stateStackSize:mt(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:mt(function(e,t,r,n){switch(r){case 0:return this.begin("open_directive"),"open_directive";case 1:return this.begin("acc_title"),31;case 2:return this.popState(),"acc_title_value";case 3:return this.begin("acc_descr"),33;case 4:return this.popState(),"acc_descr_value";case 5:this.begin("acc_descr_multiline");break;case 6:this.popState();break;case 7:return"acc_descr_multiline_value";case 8:case 9:case 10:break;case 11:return 10;case 12: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}}};n.lexer=i,mt(e,"Parser"),(I7e=new((e.prototype=n).Parser=e)).parser=I7e,R7e=I7e}),O7e=NFe((e,t)=>{function r(){return function(e,t,i){var a=mt(function(e){return e.add(4-e.isoWeekday(),"day")},"a"),s=((t=t.prototype).isoWeekYear=function(){return a(this).year()},t.isoWeek=function(e){var t,r,n;return this.$utils().u(e)?(r=a(this),n=this.isoWeekYear(),t=4-(n=(this.$u?i.utc:i)().year(n).startOf("year")).isoWeekday(),4<n.isoWeekday()&&(t+=7),n=n.add(t,"day"),r.diff(n,"week")+1):this.add(7*(e-this.isoWeek()),"day")},t.isoWeekday=function(e){return this.$utils().u(e)?this.day()||7:this.day(this.day()%7?e:e-7)},t.startOf);t.startOf=function(e,t){var r=this.$utils(),n=!!r.u(t)||t;return"isoweek"===r.p(e)?n?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):s.bind(this)(e,t)}}}"object"==typeof e&&typeof t<"u"?t.exports=r():"function"==typeof define&&define.amd?define(r):(e=typeof globalThis<"u"?globalThis:e||self).dayjs_plugin_isoWeek=r()}),P7e=NFe((e,t)=>{function r(){var o={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"},l=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,e=/\d/,t=/\d\d/,r=/\d\d?/,n=/\d*[^-_:/,()\s\d]+/,g={},i=mt(function(e){return(e=+e)+(68<e?1900:2e3)},"a"),a=mt(function(t){return function(e){this[t]=+e}},"f"),s=[/[+-]\d\d:?(\d\d)?|Z/,function(e){var t;(this.zone||(this.zone={})).offset=e&&"Z"!==e&&0!==(t=60*(e=e.match(/([+-]|\d\d)/g))[1]+(+e[2]||0))?"+"===e[0]?-t:t:0}],c=mt(function(e){return(e=g[e])&&(e.indexOf?e:e.s.concat(e.f))},"u"),h=mt(function(e,t){var r,n=g.meridiem;if(n){for(var i=1;i<=24;i+=1)if(-1<e.indexOf(n(i,0,t))){r=12<i;break}}else r=e===(t?"pm":"PM");return r},"d"),d={A:[n,function(e){this.afternoon=h(e,!1)}],a:[n,function(e){this.afternoon=h(e,!0)}],Q:[e,function(e){this.month=3*(e-1)+1}],S:[e,function(e){this.milliseconds=100*+e}],SS:[t,function(e){this.milliseconds=10*+e}],SSS:[/\d{3}/,function(e){this.milliseconds=+e}],s:[r,a("seconds")],ss:[r,a("seconds")],m:[r,a("minutes")],mm:[r,a("minutes")],H:[r,a("hours")],h:[r,a("hours")],HH:[r,a("hours")],hh:[r,a("hours")],D:[r,a("day")],DD:[t,a("day")],Do:[n,function(e){var t=g.ordinal,r=e.match(/\d+/);if(this.day=r[0],t)for(var n=1;n<=31;n+=1)t(n).replace(/\[|\]/g,"")===e&&(this.day=n)}],w:[r,a("week")],ww:[t,a("week")],M:[r,a("month")],MM:[t,a("month")],MMM:[n,function(e){var t=c("months");if((t=(c("monthsShort")||t.map(function(e){return e.slice(0,3)})).indexOf(e)+1)<1)throw new Error;this.month=t%12||t}],MMMM:[n,function(e){if((e=c("months").indexOf(e)+1)<1)throw new Error;this.month=e%12||e}],Y:[/[+-]?\d+/,a("year")],YY:[t,function(e){this.year=i(e)}],YYYY:[/\d{4}/,a("year")],Z:s,ZZ:s};function T(e){for(var t=e,i=g&&g.formats,h=(e=t.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(e,t,r){var n=r&&r.toUpperCase();return t||i[r]||o[r]||i[n].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(e,t,r){return t||r.slice(1)})})).match(l),u=h.length,r=0;r<u;r+=1){var n=h[r],a=(s=d[n])&&s[0],s=s&&s[1];h[r]=s?{regex:a,parser:s}:n.replace(/^\[|\]$/g,"")}return function(e){for(var t,r,n,i={},a=0,s=0;a<u;a+=1){var o,l,c=h[a];"string"==typeof c?s+=c.length:(l=c.regex,c=c.parser,o=e.slice(s),l=l.exec(o)[0],c.call(i,l),e=e.replace(l,""))}return void 0!==(n=(t=i).afternoon)&&(r=t.hours,n?r<12&&(t.hours+=12):12===r&&(t.hours=0),delete t.afternoon),i}}return mt(T,"l"),function(e,t,d){d.p.customParseFormat=!0,e&&e.parseTwoDigitYear&&(i=e.parseTwoDigitYear);var p=(e=t.prototype).parse;e.parse=function(e){var t=e.date,r=e.utc,n=e.args,i=(this.$u=r,n[1]);if("string"==typeof i){var a=!0===n[2],s=!0===n[3],o=a||s,l=n[2];s&&(l=n[2]),g=this.$locale(),!a&&l&&(g=d.Ls[l]),this.$d=((e,t,r,n)=>{try{if(-1<["x","X"].indexOf(t))return new Date(("X"===t?1e3:1)*e);var i=T(t)(e),a=i.year,s=i.month,o=i.day,l=i.hours,c=i.minutes,h=i.seconds,u=i.milliseconds,d=i.zone,p=i.week,g=new Date,f=o||(a||s?1:g.getDate()),m=a||g.getFullYear(),y=0;a&&!s||(y=0<s?s-1:g.getMonth());var v,x=l||0,b=c||0,w=h||0,k=u||0;return d?new Date(Date.UTC(m,y,f,x,b,w,k+60*d.offset*1e3)):r?new Date(Date.UTC(m,y,f,x,b,w,k)):(v=new Date(m,y,f,x,b,w,k),p?n(v).week(p).toDate():v)}catch{return new Date("")}})(t,i,r,d),this.init(),l&&!0!==l&&(this.$L=this.locale(l).$L),o&&t!=this.format(i)&&(this.$d=new Date("")),g={}}else if(i instanceof Array)for(var c=i.length,h=1;h<=c;h+=1){n[1]=i[h-1];var u=d.apply(this,n);if(u.isValid()){this.$d=u.$d,this.$L=u.$L,this.init();break}h===c&&(this.$d=new Date(""))}else p.call(this,e)}}}"object"==typeof e&&typeof t<"u"?t.exports=r():"function"==typeof define&&define.amd?define(r):(e=typeof globalThis<"u"?globalThis:e||self).dayjs_plugin_customParseFormat=r()}),B7e=NFe((e,t)=>{function r(){return function(e,t){var a=(t=t.prototype).format;t.format=function(e){var t,r,n=this,i=this.$locale();return this.isValid()?(t=this.$utils(),r=(e||"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(e){switch(e){case"Q":return Math.ceil((n.$M+1)/3);case"Do":return i.ordinal(n.$D);case"gggg":return n.weekYear();case"GGGG":return n.isoWeekYear();case"wo":return i.ordinal(n.week(),"W");case"w":case"ww":return t.s(n.week(),"w"===e?1:2,"0");case"W":case"WW":return t.s(n.isoWeek(),"W"===e?1:2,"0");case"k":case"kk":return t.s(String(0===n.$H?24:n.$H),"k"===e?1:2,"0");case"X":return Math.floor(n.$d.getTime()/1e3);case"x":return n.$d.getTime();case"z":return"["+n.offsetName()+"]";case"zzz":return"["+n.offsetName("long")+"]";default:return e}}),a.bind(this)(r)):a.bind(this)(e)}}}"object"==typeof e&&typeof t<"u"?t.exports=r():"function"==typeof define&&define.amd?define(r):(e=typeof globalThis<"u"?globalThis:e||self).dayjs_plugin_advancedFormat=r()});function $7e(r,n,e){let i=!0;for(;i;)i=!1,e.forEach(function(e){var t=new RegExp("^\\s*"+e+"\\s*$");r[0].match(t)&&(n[e]=!0,r.shift(1),i=!0)})}var F7e,z7e,G7e,U7e,q7e,j7e,Y7e,W7e,H7e,V7e,X7e,K7e,Z7e,Q7e,J7e,e8e,t8e,r8e,n8e,i8e,a8e,s8e,o8e,l8e,c8e,h8e,u8e,d8e,p8e,g8e,f8e,m8e,y8e,v8e,x8e,b8e,w8e,k8e,T8e,E8e,C8e,_8e,S8e,A8e,L8e,N8e,I8e,R8e,M8e,D8e,O8e,P8e,B8e,$8e,F8e,z8e,G8e,U8e,q8e,j8e,Y8e,W8e,H8e,V8e,X8e,K8e,Z8e,Q8e,J8e,eEe,tEe,rEe,nEe,iEe,aEe,sEe,oEe,lEe,cEe,hEe,uEe,dEe=b(()=>{F7e=q(s6(),1),z7e=q(yr(),1),s8e=q(O7e(),1),o8e=q(P7e(),1),l8e=q(B7e(),1),e(),Tu(),i_(),ku(),z7e.default.extend(s8e.default),z7e.default.extend(o8e.default),z7e.default.extend(l8e.default),G7e={friday:5,saturday:6},Y7e=q7e=U7e="",W7e=[],H7e=[],V7e=new Map,X7e=[],K7e=[],Q7e=Z7e="",J7e=["active","done","crit","milestone","vert"],r8e=t8e=!(e8e=[]),n8e="sunday",i8e="saturday",a8e=0,s8e=mt(function(){X7e=[],K7e=[],e8e=[],j8e=[],j7e=q8e=U8e=void($8e=0),Y7e=Q7e=q7e=U7e=Z7e="",W7e=[],r8e=t8e=!(H7e=[]),a8e=0,V7e=new Map,fh(),n8e="sunday",i8e="saturday"},"clear"),o8e=mt(function(e){q7e=e},"setAxisFormat"),l8e=mt(function(){return q7e},"getAxisFormat"),c8e=mt(function(e){j7e=e},"setTickInterval"),h8e=mt(function(){return j7e},"getTickInterval"),u8e=mt(function(e){Y7e=e},"setTodayMarker"),d8e=mt(function(){return Y7e},"getTodayMarker"),p8e=mt(function(e){U7e=e},"setDateFormat"),g8e=mt(function(){t8e=!0},"enableInclusiveEndDates"),f8e=mt(function(){return t8e},"endDatesAreInclusive"),m8e=mt(function(){r8e=!0},"enableTopAxis"),y8e=mt(function(){return r8e},"topAxisEnabled"),v8e=mt(function(e){Q7e=e},"setDisplayMode"),x8e=mt(function(){return Q7e},"getDisplayMode"),b8e=mt(function(){return U7e},"getDateFormat"),w8e=mt(function(e){W7e=e.toLowerCase().split(/[\s,]+/)},"setIncludes"),k8e=mt(function(){return W7e},"getIncludes"),T8e=mt(function(e){H7e=e.toLowerCase().split(/[\s,]+/)},"setExcludes"),E8e=mt(function(){return H7e},"getExcludes"),C8e=mt(function(){return V7e},"getLinks"),_8e=mt(function(e){Z7e=e,X7e.push(e)},"addSection"),S8e=mt(function(){return X7e},"getSections"),A8e=mt(function(){let e=X8e(),t=0;for(;!e&&t<10;)e=X8e(),t++;return K7e=j8e},"getTasks"),L8e=mt(function(e,t,r,n){var t=e.format(t.trim()),i=e.format("YYYY-MM-DD");return!n.includes(t)&&!n.includes(i)&&(!((!r.includes("weekends")||e.isoWeekday()!==G7e[i8e]&&e.isoWeekday()!==G7e[i8e]+1)&&!r.includes(e.format("dddd").toLowerCase()))||r.includes(t)||r.includes(i))},"isInvalidDate"),N8e=mt(function(e){n8e=e},"setWeekday"),I8e=mt(function(){return n8e},"getWeekday"),R8e=mt(function(e){i8e=e},"setWeekend"),M8e=mt(function(t,r,n,i){if(n.length&&!t.manualEndTime){let e;e=(e=t.startTime instanceof Date?(0,z7e.default)(t.startTime):(0,z7e.default)(t.startTime,r,!0)).add(1,"d");var a=t.endTime instanceof Date?(0,z7e.default)(t.endTime):(0,z7e.default)(t.endTime,r,!0),[r,n]=D8e(e,a,r,n,i);t.endTime=r.toDate(),t.renderEndTime=n}},"checkTaskDates"),D8e=mt(function(e,t,r,n,i){let a=!1,s=null;for(;e<=t;)a||(s=t.toDate()),(a=L8e(e,r,n,i))&&(t=t.add(1,"d")),e=e.add(1,"d");return[t,s]},"fixTaskDates"),O8e=mt(function(e,t,r){if(r=r.trim(),("x"===t.trim()||"X"===t.trim())&&/^\d+$/.test(r))return new Date(Number(r));var n=/^after\s+(?<ids>[\d\w- ]+)/.exec(r);if(null!==n){let e=null;for(var i of n.groups.ids.split(" "))void 0!==(i=H8e(i))&&(!e||i.endTime>e.endTime)&&(e=i);return e?e.endTime:((n=new Date).setHours(0,0,0,0),n)}if((n=(0,z7e.default)(r,t.trim(),!0)).isValid())return n.toDate();if(D.debug("Invalid date:"+r),D.debug("With date format:"+t.trim()),void 0===(n=new Date(r))||isNaN(n.getTime())||n.getFullYear()<-1e4||1e4<n.getFullYear())throw new Error("Invalid date:"+r);return n},"getStartDate"),P8e=mt(function(e){return null!==(e=/^(\d+(?:\.\d+)?)([Mdhmswy]|ms)$/.exec(e.trim()))?[Number.parseFloat(e[1]),e[2]]:[NaN,"ms"]},"parseDuration"),B8e=mt(function(e,t,r,n=!1){r=r.trim();var i=/^until\s+(?<ids>[\d\w- ]+)/.exec(r);if(null!==i){let e=null;for(var a of i.groups.ids.split(" "))void 0!==(a=H8e(a))&&(!e||a.startTime<e.startTime)&&(e=a);return e?e.startTime:((i=new Date).setHours(0,0,0,0),i)}let s=(0,z7e.default)(r,t.trim(),!0);if(s.isValid())return(s=n?s.add(1,"d"):s).toDate();let o=(0,z7e.default)(e),[l,c]=P8e(r);return Number.isNaN(l)||(i=o.add(l,c)).isValid()&&(o=i),o.toDate()},"getEndDate"),$8e=0,F8e=mt(function(e){return void 0===e?"task"+($8e+=1):e},"parseId"),z8e=mt(function(e,t){var r=(":"===t.substr(0,1)?t.substr(1,t.length):t).split(","),n={};$7e(r,n,J7e);for(let e=0;e<r.length;e++)r[e]=r[e].trim();let i="";switch(r.length){case 1:n.id=F8e(),n.startTime=e.endTime,i=r[0];break;case 2:n.id=F8e(),n.startTime=O8e(void 0,U7e,r[0]),i=r[1];break;case 3:n.id=F8e(r[0]),n.startTime=O8e(void 0,U7e,r[1]),i=r[2]}return i&&(n.endTime=B8e(n.startTime,U7e,i,t8e),n.manualEndTime=(0,z7e.default)(i,"YYYY-MM-DD",!0).isValid(),M8e(n,U7e,H7e,W7e)),n},"compileData"),G8e=mt(function(e,t){var r=(":"===t.substr(0,1)?t.substr(1,t.length):t).split(","),n={};$7e(r,n,J7e);for(let e=0;e<r.length;e++)r[e]=r[e].trim();switch(r.length){case 1:n.id=F8e(),n.startTime={type:"prevTaskEnd",id:e},n.endTime={data:r[0]};break;case 2:n.id=F8e(),n.startTime={type:"getStartDate",startData:r[0]},n.endTime={data:r[1]};break;case 3:n.id=F8e(r[0]),n.startTime={type:"getStartDate",startData:r[1]},n.endTime={data:r[2]}}return n},"parseData"),j8e=[],Y8e={},W8e=mt(function(e,t){e={section:Z7e,type:Z7e,processed:!1,manualEndTime:!1,renderEndTime:null,raw:{data:t},task:e,classes:[]},t=G8e(q8e,t),e.raw.startTime=t.startTime,e.raw.endTime=t.endTime,e.id=t.id,e.prevTaskId=q8e,e.active=t.active,e.done=t.done,e.crit=t.crit,e.milestone=t.milestone,e.vert=t.vert,e.order=a8e,a8e++,t=j8e.push(e),Y8e[q8e=e.id]=t-1},"addTask"),H8e=mt(function(e){return j8e[Y8e[e]]},"findTaskById"),V8e=mt(function(e,t){e={section:Z7e,type:Z7e,description:e,task:e,classes:[]},t=z8e(U8e,t),e.startTime=t.startTime,e.endTime=t.endTime,e.id=t.id,e.active=t.active,e.done=t.done,e.crit=t.crit,e.milestone=t.milestone,e.vert=t.vert,U8e=e,K7e.push(e)},"addTaskOrg"),X8e=mt(function(){let e=mt(function(e){var t=j8e[e];switch(j8e[e].raw.startTime.type){case"prevTaskEnd":var r=H8e(t.prevTaskId);t.startTime=r.endTime;break;case"getStartDate":(r=O8e(void 0,U7e,j8e[e].raw.startTime.startData))&&(j8e[e].startTime=r)}return j8e[e].startTime&&(j8e[e].endTime=B8e(j8e[e].startTime,U7e,j8e[e].raw.endTime.data,t8e),j8e[e].endTime)&&(j8e[e].processed=!0,j8e[e].manualEndTime=(0,z7e.default)(j8e[e].raw.endTime.data,"YYYY-MM-DD",!0).isValid(),M8e(j8e[e],U7e,H7e,W7e)),j8e[e].processed},"compileTask"),t=!0;for(var[r,n]of j8e.entries())e(r),t=t&&n.processed;return t},"compileTasks"),K8e=mt(function(e,t){let r=t;"loose"!==O().securityLevel&&(r=(0,F7e.sanitizeUrl)(t)),e.split(",").forEach(function(e){void 0!==H8e(e)&&(J8e(e,()=>{window.open(r,"_self")}),V7e.set(e,r))}),Z8e(e,"clickable")},"setLink"),Z8e=mt(function(e,t){e.split(",").forEach(function(e){void 0!==(e=H8e(e))&&e.classes.push(t)})},"setClass"),Q8e=mt(function(e,t,n){if("loose"===O().securityLevel&&void 0!==t){let r=[];if("string"==typeof n){r=n.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let t=0;t<r.length;t++){let e=r[t].trim();e.startsWith('"')&&e.endsWith('"')&&(e=e.substr(1,e.length-2)),r[t]=e}}0===r.length&&r.push(e),void 0!==H8e(e)&&J8e(e,()=>{e_.runFunc(t,...r)})}},"setClickFun"),J8e=mt(function(t,r){e8e.push(function(){var e=document.querySelector(`[id="${t}"]`);null!==e&&e.addEventListener("click",function(){r()})},function(){var e=document.querySelector(`[id="${t}-text"]`);null!==e&&e.addEventListener("click",function(){r()})})},"pushFun"),eEe=mt(function(e,t,r){e.split(",").forEach(function(e){Q8e(e,t,r)}),Z8e(e,"clickable")},"setClickEvent"),tEe=mt(function(t){e8e.forEach(function(e){e(t)})},"bindFunctions"),rEe={getConfig:mt(()=>O().gantt,"getConfig"),clear:s8e,setDateFormat:p8e,getDateFormat:b8e,enableInclusiveEndDates:g8e,endDatesAreInclusive:f8e,enableTopAxis:m8e,topAxisEnabled:y8e,setAxisFormat:o8e,getAxisFormat:l8e,setTickInterval:c8e,getTickInterval:h8e,setTodayMarker:u8e,getTodayMarker:d8e,setAccTitle:mh,getAccTitle:yh,setDiagramTitle:bh,getDiagramTitle:wh,setDisplayMode:v8e,getDisplayMode:x8e,setAccDescription:vh,getAccDescription:xh,addSection:_8e,getSections:S8e,getTasks:A8e,addTask:W8e,findTaskById:H8e,addTaskOrg:V8e,setIncludes:w8e,getIncludes:k8e,setExcludes:T8e,getExcludes:E8e,setClickEvent:eEe,setLink:K8e,getLinks:C8e,bindFunctions:tEe,parseDuration:P8e,isInvalidDate:L8e,setWeekday:N8e,getWeekday:I8e,setWeekend:R8e},mt($7e,"getTaskTags")}),pEe=b(()=>{nEe=q(yr(),1),e(),i6(),Oc(),Tu(),lh(),iEe=mt(function(){D.debug("Something is calling, setConf, remove the call")},"setConf"),aEe={monday:hb,tuesday:ub,wednesday:db,thursday:pb,friday:gb,saturday:fb,sunday:cb},sEe=mt((e,t)=>{let r=[...e].map(()=>-1/0),n=[...e].sort((e,t)=>e.startTime-t.startTime||e.order-t.order),i=0;for(var a of n)for(let e=0;e<r.length;e++)if(a.startTime>=r[e]){r[e]=a.endTime,a.order=e+t,e>i&&(i=e);break}return i},"getMaxIntersections"),lEe=mt(function(e,l,t,p){let g=O().gantt,r=O().securityLevel,n,i=("sandbox"===r&&(n=H("#i"+l)),H("sandbox"===r?n.nodes()[0].contentDocument.body:"body")),s="sandbox"===r?n.nodes()[0].contentDocument:document,a=s.getElementById(l),u=(void 0===(oEe=a.parentElement.offsetWidth)&&(oEe=1200),void 0!==g.useWidth&&(oEe=g.useWidth),p.db.getTasks()),d=[];for(var o of u)d.push(o.type);d=A(d);let c={},h=2*g.topPadding;if("compact"===p.db.getDisplayMode()||"compact"===g.displayMode){var f,m,y={};for(f of u)void 0===y[f.section]?y[f.section]=[f]:y[f.section].push(f);let e=0;for(m of Object.keys(y)){var v=sEe(y[m],e)+1;e+=v,h+=v*(g.barHeight+g.barGap),c[m]=v}}else{h+=u.length*(g.barHeight+g.barGap);for(let t of d)c[t]=u.filter(e=>e.type===t).length}a.setAttribute("viewBox","0 0 "+oEe+" "+h);let x=i.select(`[id="${l}"]`),b=p5().domain([Ju(u,function(e){return e.startTime}),Zu(u,function(e){return e.endTime})]).rangeRound([0,oEe-g.leftPadding-g.rightPadding]);function w(e,t){let r=e.startTime,n=t.startTime,i=0;return n<r?i=1:r<n&&(i=-1),i}function k(e,t,r){var n=g.barHeight,i=n+g.barGap,a=g.topPadding,s=g.leftPadding;Fx().domain([0,d.length]).range(["#00B9FA","#F95002"]).interpolate(Tf),E(i,a,s,0,r,e,p.db.getExcludes(),p.db.getIncludes()),C(s,a,0,r),T(e,i,a,s,n,0,t),_(i,a),S(s,0,0,r)}function T(e,r,n,i,c,t,h){e.sort((e,t)=>e.vert===t.vert?0:e.vert?1:-1);var a=[...new Set(e.map(e=>e.order))].map(t=>e.find(e=>e.order===t));x.append("g").selectAll("rect").data(a).enter().append("rect").attr("x",0).attr("y",function(e,t){return e.order*r+n-2}).attr("width",function(){return h-g.rightPadding/2}).attr("height",r).attr("class",function(e){for(var[t,r]of d.entries())if(e.type===r)return"section section"+t%g.numberSectionStyles;return"section section0"}).enter();let s=x.append("g").selectAll("rect").data(e).enter(),o=p.db.getLinks();if(s.append("rect").attr("id",function(e){return e.id}).attr("rx",3).attr("ry",3).attr("x",function(e){return e.milestone?b(e.startTime)+i+.5*(b(e.endTime)-b(e.startTime))-.5*c:b(e.startTime)+i}).attr("y",function(e,t){return t=e.order,e.vert?g.gridLineStartPadding:t*r+n}).attr("width",function(e){return e.milestone?c:e.vert?.08*c:b(e.renderEndTime||e.endTime)-b(e.startTime)}).attr("height",function(e){return e.vert?u.length*(g.barHeight+g.barGap)+2*g.barHeight:c}).attr("transform-origin",function(e,t){return t=e.order,(b(e.startTime)+i+.5*(b(e.endTime)-b(e.startTime))).toString()+"px "+(t*r+n+.5*c).toString()+"px"}).attr("class",function(e){let t="",r=(0<e.classes.length&&(t=e.classes.join(" ")),0);for(var[n,i]of d.entries())e.type===i&&(r=n%g.numberSectionStyles);let a="";return e.active?e.crit?a+=" activeCrit":a=" active":e.done?a=e.crit?" doneCrit":" done":e.crit&&(a+=" crit"),0===a.length&&(a=" task"),e.milestone&&(a=" milestone "+a),e.vert&&(a=" vert "+a),"task"+(a=(a+=r)+(" "+t))}),s.append("text").attr("id",function(e){return e.id+"-text"}).text(function(e){return e.task}).attr("font-size",g.fontSize).attr("x",function(e){let t=b(e.startTime),r=b(e.renderEndTime||e.endTime);return e.milestone&&(t+=.5*(b(e.endTime)-b(e.startTime))-.5*c,r=t+c),e.vert?b(e.startTime)+i:(e=this.getBBox().width)>r-t?r+e+1.5*g.leftPadding>h?t+i-5:r+i+5:(r-t)/2+t+i}).attr("y",function(e,t){return e.vert?g.gridLineStartPadding+u.length*(g.barHeight+g.barGap)+60:e.order*r+g.barHeight/2+(g.fontSize/2-2)+n}).attr("text-height",c).attr("class",function(e){let t=b(e.startTime),r=b(e.endTime),n=(e.milestone&&(r=t+c),this.getBBox().width),i="",a=(0<e.classes.length&&(i=e.classes.join(" ")),0);for(var[s,o]of d.entries())e.type===o&&(a=s%g.numberSectionStyles);let l="";return e.active&&(l=e.crit?"activeCritText"+a:"activeText"+a),e.done?l=e.crit?l+" doneCritText"+a:l+" doneText"+a:e.crit&&(l=l+" critText"+a),e.milestone&&(l+=" milestoneText"),e.vert&&(l+=" vertText"),n>r-t?r+n+1.5*g.leftPadding>h?i+" taskTextOutsideLeft taskTextOutside"+a+" "+l:i+" taskTextOutsideRight taskTextOutside"+a+" "+l+" width-"+n:i+" taskText taskText"+a+" "+l+" width-"+n}),"sandbox"===O().securityLevel){let a=H("#i"+l).nodes()[0].contentDocument;s.filter(function(e){return o.has(e.id)}).each(function(e){var t=a.querySelector("#"+e.id),r=a.querySelector("#"+e.id+"-text"),n=t.parentNode,i=a.createElement("a");i.setAttribute("xlink:href",o.get(e.id)),i.setAttribute("target","_top"),n.appendChild(i),i.appendChild(t),i.appendChild(r)})}}function E(s,o,l,e,c,t,h,u){if(0!==h.length||0!==u.length){let i,a;for(var{startTime:r,endTime:n}of t)(void 0===i||r<i)&&(i=r),(void 0===a||n>a)&&(a=n);if(i&&a)if(5<(0,nEe.default)(a).diff((0,nEe.default)(i),"year"))D.warn("The difference between the min and max time is more than 5 years. This will cause performance issues. Skipping drawing exclude days.");else{let e=p.db.getDateFormat(),t=[],r=null,n=(0,nEe.default)(i);for(;n.valueOf()<=a;)p.db.isInvalidDate(n,e,h,u)?r?r.end=n:r={start:n,end:n}:r&&(t.push(r),r=null),n=n.add(1,"d");x.append("g").selectAll("rect").data(t).enter().append("rect").attr("id",e=>"exclude-"+e.start.format("YYYY-MM-DD")).attr("x",e=>b(e.start.startOf("day"))+l).attr("y",g.gridLineStartPadding).attr("width",e=>b(e.end.endOf("day"))-b(e.start.startOf("day"))).attr("height",c-o-g.gridLineStartPadding).attr("transform-origin",function(e,t){return(b(e.start)+l+.5*(b(e.end)-b(e.start))).toString()+"px "+(t*s+.5*c).toString()+"px"}).attr("class","exclude-range")}}}function C(e,t,r,n){var i=p.db.getDateFormat(),i=p.db.getAxisFormat()||("D"===i?"%d":g.axisFormat??"%Y-%m-%d"),a=pd(b).tickSize(-n+t+g.gridLineStartPadding).tickFormat(o5(i)),s=/^([1-9]\d*)(millisecond|second|minute|hour|day|week|month)$/.exec(p.db.getTickInterval()||g.tickInterval);if(null!==s){var o=s[1],l=s[2],c=p.db.getWeekday()||g.weekday;switch(l){case"millisecond":a.ticks(Wx.every(o));break;case"second":a.ticks(Hx.every(o));break;case"minute":a.ticks(Vx.every(o));break;case"hour":a.ticks(Kx.every(o));break;case"day":a.ticks(Qx.every(o));break;case"week":a.ticks(aEe[c].every(o));break;case"month":a.ticks(Tb.every(o))}}if(x.append("g").attr("class","grid").attr("transform","translate("+e+", "+(n-50)+")").call(a).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10).attr("dy","1em"),p.db.topAxisEnabled()||g.topAxis){var h=dd(b).tickSize(-n+t+g.gridLineStartPadding).tickFormat(o5(i));if(null!==s){var u=s[1],l=s[2],d=p.db.getWeekday()||g.weekday;switch(l){case"millisecond":h.ticks(Wx.every(u));break;case"second":h.ticks(Hx.every(u));break;case"minute":h.ticks(Vx.every(u));break;case"hour":h.ticks(Kx.every(u));break;case"day":h.ticks(Qx.every(u));break;case"week":h.ticks(aEe[d].every(u));break;case"month":h.ticks(Tb.every(u))}}x.append("g").attr("class","grid").attr("transform","translate("+e+", "+t+")").call(h).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10)}}function _(r,n){let i=0,a=Object.keys(c).map(e=>[e,c[e]]);x.append("g").selectAll("text").data(a).enter().append(function(e){var t,r,n=-((e=e[0].split(L.lineBreakRegex)).length-1)/2,i=s.createElementNS("http://www.w3.org/2000/svg","text");i.setAttribute("dy",n+"em");for([t,r]of e.entries()){var a=s.createElementNS("http://www.w3.org/2000/svg","tspan");a.setAttribute("alignment-baseline","central"),a.setAttribute("x","10"),0<t&&a.setAttribute("dy","1em"),a.textContent=r,i.appendChild(a)}return i}).attr("x",10).attr("y",function(e,t){return 0<t?(i+=a[t-1][1],e[1]*r/2+i*r+n):e[1]*r/2+n}).attr("font-size",g.sectionFontSize).attr("class",function(e){for(var[t,r]of d.entries())if(e[0]===r)return"sectionTitle sectionTitle"+t%g.numberSectionStyles;return"sectionTitle"})}function S(e,t,r,n){var i,a,s=p.db.getTodayMarker();"off"!==s&&(a=x.append("g").attr("class","today"),i=new Date,(a=a.append("line")).attr("x1",b(i)+e).attr("x2",b(i)+e).attr("y1",g.titleTopMargin).attr("y2",n-g.titleTopMargin).attr("class","today"),""!==s)&&a.attr("style",s.replace(/,/g,";"))}function A(r){var n={},i=[];for(let e=0,t=r.length;e<t;++e)Object.prototype.hasOwnProperty.call(n,r[e])||(n[r[e]]=!0,i.push(r[e]));return i}mt(w,"taskCompare"),u.sort(w),k(u,oEe,h),Zc(x,h,oEe,g.useMaxWidth),x.append("text").text(p.db.getDiagramTitle()).attr("x",oEe/2).attr("y",g.titleTopMargin).attr("class","titleText"),mt(k,"makeGantt"),mt(T,"drawRects"),mt(E,"drawExcludeDays"),mt(C,"makeGrid"),mt(_,"vertLabels"),mt(S,"drawToday"),mt(A,"checkUnique")},"draw"),cEe={setConf:iEe,draw:lEe}}),gEe=b(()=>{hEe=mt(e=>` + .mermaid-main-font { + font-family: ${e.fontFamily}; + } + + .exclude-range { + fill: ${e.excludeBkgColor}; + } + + .section { + stroke: none; + opacity: 0.2; + } + + .section0 { + fill: ${e.sectionBkgColor}; + } + + .section2 { + fill: ${e.sectionBkgColor2}; + } + + .section1, + .section3 { + fill: ${e.altSectionBkgColor}; + opacity: 0.2; + } + + .sectionTitle0 { + fill: ${e.titleColor}; + } + + .sectionTitle1 { + fill: ${e.titleColor}; + } + + .sectionTitle2 { + fill: ${e.titleColor}; + } + + .sectionTitle3 { + fill: ${e.titleColor}; + } + + .sectionTitle { + text-anchor: start; + font-family: ${e.fontFamily}; + } + + + /* Grid and axis */ + + .grid .tick { + stroke: ${e.gridColor}; + opacity: 0.8; + shape-rendering: crispEdges; + } + + .grid .tick text { + font-family: ${e.fontFamily}; + fill: ${e.textColor}; + } + + .grid path { + stroke-width: 0; + } + + + /* Today line */ + + .today { + fill: none; + stroke: ${e.todayLineColor}; + stroke-width: 2px; + } + + + /* Task styling */ + + /* Default task */ + + .task { + stroke-width: 2; + } + + .taskText { + text-anchor: middle; + font-family: ${e.fontFamily}; + } + + .taskTextOutsideRight { + fill: ${e.taskTextDarkColor}; + text-anchor: start; + font-family: ${e.fontFamily}; + } + + .taskTextOutsideLeft { + fill: ${e.taskTextDarkColor}; + text-anchor: end; + } + + + /* Special case clickable */ + + .task.clickable { + cursor: pointer; + } + + .taskText.clickable { + cursor: pointer; + fill: ${e.taskTextClickableColor} !important; + font-weight: bold; + } + + .taskTextOutsideLeft.clickable { + cursor: pointer; + fill: ${e.taskTextClickableColor} !important; + font-weight: bold; + } + + .taskTextOutsideRight.clickable { + cursor: pointer; + fill: ${e.taskTextClickableColor} !important; + font-weight: bold; + } + + + /* Specific task settings for the sections*/ + + .taskText0, + .taskText1, + .taskText2, + .taskText3 { + fill: ${e.taskTextColor}; + } + + .task0, + .task1, + .task2, + .task3 { + fill: ${e.taskBkgColor}; + stroke: ${e.taskBorderColor}; + } + + .taskTextOutside0, + .taskTextOutside2 + { + fill: ${e.taskTextOutsideColor}; + } + + .taskTextOutside1, + .taskTextOutside3 { + fill: ${e.taskTextOutsideColor}; + } + + + /* Active task */ + + .active0, + .active1, + .active2, + .active3 { + fill: ${e.activeTaskBkgColor}; + stroke: ${e.activeTaskBorderColor}; + } + + .activeText0, + .activeText1, + .activeText2, + .activeText3 { + fill: ${e.taskTextDarkColor} !important; + } + + + /* Completed task */ + + .done0, + .done1, + .done2, + .done3 { + stroke: ${e.doneTaskBorderColor}; + fill: ${e.doneTaskBkgColor}; + stroke-width: 2; + } + + .doneText0, + .doneText1, + .doneText2, + .doneText3 { + fill: ${e.taskTextDarkColor} !important; + } + + + /* Tasks on the critical line */ + + .crit0, + .crit1, + .crit2, + .crit3 { + stroke: ${e.critBorderColor}; + fill: ${e.critBkgColor}; + stroke-width: 2; + } + + .activeCrit0, + .activeCrit1, + .activeCrit2, + .activeCrit3 { + stroke: ${e.critBorderColor}; + fill: ${e.activeTaskBkgColor}; + stroke-width: 2; + } + + .doneCrit0, + .doneCrit1, + .doneCrit2, + .doneCrit3 { + stroke: ${e.critBorderColor}; + fill: ${e.doneTaskBkgColor}; + stroke-width: 2; + cursor: pointer; + shape-rendering: crispEdges; + } + + .milestone { + transform: rotate(45deg) scale(0.8,0.8); + } + + .milestoneText { + font-style: italic; + } + .doneCritText0, + .doneCritText1, + .doneCritText2, + .doneCritText3 { + fill: ${e.taskTextDarkColor} !important; + } + + .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"),uEe=hEe}),fEe={};OFe(fEe,{diagram:()=>mEe});var mEe,yEe,vEe,xEe,bEe,wEe,kEe,TEe,EEe,CEe=b(()=>{D7e(),dEe(),pEe(),gEe(),mEe={parser:R7e,db:rEe,renderer:cEe,styles:uEe}}),_Ee=b(()=>{oTe(),e(),yEe={parse:mt(async e=>{e=await nTe("info",e),D.debug(e)},"parse")}}),SEe=b(()=>{vEe={name:"mermaid",version:"11.12.0",description:"Markdown-ish syntax for generating flowcharts, mindmaps, sequence diagrams, class diagrams, gantt charts, git graphs and more.",type:"module",module:"./dist/mermaid.core.mjs",types:"./dist/mermaid.d.ts",exports:{".":{types:"./dist/mermaid.d.ts",import:"./dist/mermaid.core.mjs",default:"./dist/mermaid.core.mjs"},"./*":"./*"},keywords:["diagram","markdown","flowchart","sequence diagram","gantt","class diagram","git graph","mindmap","packet diagram","c4 diagram","er diagram","pie chart","pie diagram","quadrant chart","requirement diagram","graph"],scripts:{clean:"rimraf dist",dev:"pnpm -w dev","docs:code":"typedoc src/defaultConfig.ts src/config.ts src/mermaid.ts && prettier --write ./src/docs/config/setup","docs:build":"rimraf ../../docs && pnpm docs:code && pnpm docs:spellcheck && tsx scripts/docs.cli.mts","docs:verify":"pnpm docs:code && pnpm docs:spellcheck && tsx scripts/docs.cli.mts --verify","docs:pre:vitepress":"pnpm --filter ./src/docs prefetch && rimraf src/vitepress && pnpm docs:code && tsx scripts/docs.cli.mts --vitepress && pnpm --filter ./src/vitepress install --no-frozen-lockfile --ignore-scripts","docs:build:vitepress":"pnpm docs:pre:vitepress && (cd src/vitepress && pnpm run build) && cpy --flat src/docs/landing/ ./src/vitepress/.vitepress/dist/landing","docs:dev":'pnpm docs:pre:vitepress && concurrently "pnpm --filter ./src/vitepress dev" "tsx scripts/docs.cli.mts --watch --vitepress"',"docs:dev:docker":'pnpm docs:pre:vitepress && concurrently "pnpm --filter ./src/vitepress dev:docker" "tsx scripts/docs.cli.mts --watch --vitepress"',"docs:serve":"pnpm docs:build:vitepress && vitepress serve src/vitepress","docs:spellcheck":'cspell "src/docs/**/*.md"',"docs:release-version":"tsx scripts/update-release-version.mts","docs:verify-version":"tsx scripts/update-release-version.mts --verify","types:build-config":"tsx scripts/create-types-from-json-schema.mts","types:verify-config":"tsx scripts/create-types-from-json-schema.mts --verify",checkCircle:"npx madge --circular ./src",prepublishOnly:"pnpm docs:verify-version"},repository:{type:"git",url:"https://github.com/mermaid-js/mermaid"},author:"Knut Sveidqvist",license:"MIT",standard:{ignore:["**/parser/*.js","dist/**/*.js","cypress/**/*.js"],globals:["page"]},dependencies:{"@braintree/sanitize-url":"^7.1.1","@iconify/utils":"^3.0.1","@mermaid-js/parser":"workspace:^","@types/d3":"^7.4.3",cytoscape:"^3.29.3","cytoscape-cose-bilkent":"^4.1.0","cytoscape-fcose":"^2.2.0",d3:"^7.9.0","d3-sankey":"^0.12.3","dagre-d3-es":"7.0.11",dayjs:"^1.11.18",dompurify:"^3.2.5",katex:"^0.16.22",khroma:"^2.1.0","lodash-es":"^4.17.21",marked:"^16.2.1",roughjs:"^4.6.6",stylis:"^4.3.6","ts-dedent":"^2.2.0",uuid:"^11.1.0"},devDependencies:{"@adobe/jsonschema2md":"^8.0.5","@iconify/types":"^2.0.0","@types/cytoscape":"^3.21.9","@types/cytoscape-fcose":"^2.2.4","@types/d3-sankey":"^0.12.4","@types/d3-scale":"^4.0.9","@types/d3-scale-chromatic":"^3.1.0","@types/d3-selection":"^3.0.11","@types/d3-shape":"^3.1.7","@types/jsdom":"^21.1.7","@types/katex":"^0.16.7","@types/lodash-es":"^4.17.12","@types/micromatch":"^4.0.9","@types/stylis":"^4.2.7","@types/uuid":"^10.0.0",ajv:"^8.17.1",canvas:"^3.1.2",chokidar:"3.6.0",concurrently:"^9.1.2","csstree-validator":"^4.0.1",globby:"^14.1.0",jison:"^0.4.18","js-base64":"^3.7.8",jsdom:"^26.1.0","json-schema-to-typescript":"^15.0.4",micromatch:"^4.0.8","path-browserify":"^1.0.1",prettier:"^3.5.3",remark:"^15.0.1","remark-frontmatter":"^5.0.0","remark-gfm":"^4.0.1",rimraf:"^6.0.1","start-server-and-test":"^2.0.13","type-fest":"^4.35.0",typedoc:"^0.28.12","typedoc-plugin-markdown":"^4.8.1",typescript:"~5.7.3","unist-util-flatmap":"^1.0.0","unist-util-visit":"^5.0.0",vitepress:"^1.6.4","vitepress-plugin-search":"1.0.4-alpha.22"},files:["dist/","README.md"],publishConfig:{access:"public"}}}),AEe=b(()=>{SEe(),xEe={version:vEe.version+""},bEe=mt(()=>xEe.version,"getVersion"),wEe={getVersion:bEe}}),LEe=b(()=>{i6(),Tu(),kEe=mt(e=>{let t=O().securityLevel,r=H("body"),n;return"sandbox"===t&&(n=H("#i"+e).node()?.contentDocument??document,r=H(n.body)),r.select("#"+e)},"selectSvgElement")}),NEe=b(()=>{e(),LEe(),lh(),TEe=mt((e,t,r)=>{D.debug(`rendering info diagram +`+e),e=kEe(t),Zc(e,100,400,!0),e.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"),EEe={draw:TEe}}),IEe={};OFe(IEe,{diagram:()=>REe});var REe,MEe,DEe,OEe,PEe,BEe,$Ee,FEe,zEe,GEe,UEe,qEe,jEe,YEe,WEe,HEe,VEe,XEe,KEe,ZEe=b(()=>{_Ee(),AEe(),NEe(),REe={parser:yEe,db:wEe,renderer:EEe}}),QEe=b(()=>{e(),ku(),en(),BEe=Yt.pie,MEe={sections:new Map,showData:!1,config:BEe},DEe=MEe.sections,OEe=MEe.showData,PEe=structuredClone(BEe),BEe=mt(()=>structuredClone(PEe),"getConfig"),$Ee=mt(()=>{DEe=new Map,OEe=MEe.showData,fh()},"clear"),FEe=mt(({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.`);DEe.has(e)||(DEe.set(e,t),D.debug(`added new section: ${e}, with value: `+t))},"addSection"),zEe=mt(()=>DEe,"getSections"),GEe=mt(e=>{OEe=e},"setShowData"),UEe=mt(()=>OEe,"getShowData"),qEe={getConfig:BEe,clear:$Ee,setDiagramTitle:bh,getDiagramTitle:wh,setAccTitle:mh,getAccTitle:yh,setAccDescription:vh,getAccDescription:xh,addSection:FEe,getSections:zEe,setShowData:GEe,getShowData:UEe}}),JEe=b(()=>{oTe(),e(),uTe(),QEe(),jEe=mt((e,t)=>{lTe(e,t),t.setShowData(e.showData),e.sections.map(t.addSection)},"populateDb"),YEe={parse:mt(async e=>{e=await nTe("pie",e),D.debug(e),jEe(e,qEe)},"parse")}}),eCe=b(()=>{WEe=mt(e=>` + .pieCircle{ + stroke: ${e.pieStrokeColor}; + stroke-width : ${e.pieStrokeWidth}; + opacity : ${e.pieOpacity}; + } + .pieOuterCircle{ + stroke: ${e.pieOuterStrokeColor}; + stroke-width: ${e.pieOuterStrokeWidth}; + fill: none; + } + .pieTitleText { + text-anchor: middle; + font-size: ${e.pieTitleTextSize}; + fill: ${e.pieTitleTextColor}; + font-family: ${e.fontFamily}; + } + .slice { + font-family: ${e.fontFamily}; + fill: ${e.pieSectionTextColor}; + font-size:${e.pieSectionTextSize}; + // fill: white; + } + .legend text { + fill: ${e.pieLegendTextColor}; + font-family: ${e.fontFamily}; + font-size: ${e.pieLegendTextSize}; + } +`,"getStyles"),HEe=WEe}),tCe=b(()=>{i6(),Tu(),e(),LEe(),lh(),i_(),VEe=mt(e=>{let t=[...e.values()].reduce((e,t)=>e+t,0),r=[...e.entries()].map(([e,t])=>({label:e,value:t})).filter(e=>1<=e.value/t*100).sort((e,t)=>t.value-e.value);return l3().value(e=>e.value)(r)},"createPieArcs"),XEe=mt((e,t,r,n)=>{D.debug(`rendering pie chart +`+e);let i=n.db,a=O(),s=_C(i.getConfig(),a.pie),o=kEe(t),l=o.append("g");l.attr("transform","translate(225,225)");var e=a.themeVariables,[n]=JC(e.pieOuterStrokeWidth);n??=2;let c=s.textPosition,h=Math.min(450,450)/2-40,u=W5().innerRadius(0).outerRadius(h),d=W5().innerRadius(h*c).outerRadius(h*c),p=(l.append("circle").attr("cx",0).attr("cy",0).attr("r",h+n/2).attr("class","pieOuterCircle"),i.getSections()),g=VEe(p),f=[e.pie1,e.pie2,e.pie3,e.pie4,e.pie5,e.pie6,e.pie7,e.pie8,e.pie9,e.pie10,e.pie11,e.pie12],m=0,y=(p.forEach(e=>{m+=e}),g.filter(e=>"0"!==(e.data.value/m*100).toFixed(0))),v=yx(f),x=(l.selectAll("mySlices").data(y).enter().append("path").attr("d",u).attr("fill",e=>v(e.data.label)).attr("class","pieCircle"),l.selectAll("mySlices").data(y).enter().append("text").text(e=>(e.data.value/m*100).toFixed(0)+"%").attr("transform",e=>"translate("+d.centroid(e)+")").style("text-anchor","middle").attr("class","slice"),l.append("text").text(i.getDiagramTitle()).attr("x",0).attr("y",-200).attr("class","pieTitleText"),[...p.entries()].map(([e,t])=>({label:e,value:t}))),b=l.selectAll(".legend").data(x).enter().append("g").attr("class","legend").attr("transform",(e,t)=>"translate(216,"+(22*t-22*x.length/2)+")");b.append("rect").attr("width",18).attr("height",18).style("fill",e=>v(e.label)).style("stroke",e=>v(e.label)),b.append("text").attr("x",22).attr("y",14).text(e=>i.getShowData()?e.label+` [${e.value}]`:e.label),t=512+Math.max(...b.selectAll("text").nodes().map(e=>e?.getBoundingClientRect().width??0)),o.attr("viewBox",`0 0 ${t} 450`),Zc(o,450,t,s.useMaxWidth)},"draw"),KEe={draw:XEe}}),rCe={};OFe(rCe,{diagram:()=>nCe});var nCe,iCe,aCe,sCe,oCe,lCe=b(()=>{JEe(),QEe(),eCe(),tCe(),nCe={parser:YEe,db:qEe,renderer:KEe,styles:HEe}}),cCe=b(()=>{function e(){this.yy={}}var t=mt(function(e,t,r,n){for(r=r||{},n=e.length;n--;r[e[n]]=t);return r},"o"),r=[1,3],n=[1,4],i=[1,5],a=[1,6],s=[1,7],P=[1,4,5,10,12,13,14,18,25,35,37,39,41,42,48,50,51,52,53,54,55,56,57,60,61,63,64,65,66,67],B=[1,4,5,10,12,13,14,18,25,28,35,37,39,41,42,48,50,51,52,53,54,55,56,57,60,61,63,64,65,66,67],o=[55,56,57],$=[2,36],l=[1,37],c=[1,36],h=[1,38],u=[1,35],d=[1,43],p=[1,41],F=[1,14],z=[1,23],G=[1,18],U=[1,19],q=[1,20],j=[1,21],Y=[1,22],W=[1,24],H=[1,25],V=[1,26],X=[1,27],K=[1,28],Z=[1,29],g=[1,32],f=[1,33],m=[1,34],y=[1,39],v=[1,40],x=[1,42],b=[1,44],w=[1,62],k=[1,61],T=[4,5,8,10,12,13,14,18,44,47,49,55,56,57,63,64,65,66,67],Q=[1,65],J=[1,66],ee=[1,67],te=[1,68],re=[1,69],ne=[1,70],ie=[1,71],ae=[1,72],se=[1,73],oe=[1,74],le=[1,75],ce=[1,76],E=[4,5,6,7,8,9,10,11,12,13,14,15,18],C=[1,90],_=[1,91],S=[1,92],A=[1,99],L=[1,93],N=[1,96],I=[1,94],R=[1,95],M=[1,97],D=[1,98],he=[1,102],ue=[10,55,56,57],O=[4,5,6,8,10,11,13,17,18,19,20,55,56,57],r={trace:mt(function(){},"trace"),yy:{},symbols_:{error:2,idStringToken:3,ALPHA:4,NUM:5,NODE_STRING:6,DOWN:7,MINUS:8,DEFAULT:9,COMMA:10,COLON:11,AMP:12,BRKT:13,MULT:14,UNICODE_TEXT:15,styleComponent:16,UNIT:17,SPACE:18,STYLE:19,PCT:20,idString:21,style:22,stylesOpt:23,classDefStatement:24,CLASSDEF:25,start:26,eol:27,QUADRANT:28,document:29,line:30,statement:31,axisDetails:32,quadrantDetails:33,points:34,title:35,title_value:36,acc_title:37,acc_title_value:38,acc_descr:39,acc_descr_value:40,acc_descr_multiline_value:41,section:42,text:43,point_start:44,point_x:45,point_y:46,class_name:47,"X-AXIS":48,"AXIS-TEXT-DELIMITER":49,"Y-AXIS":50,QUADRANT_1:51,QUADRANT_2:52,QUADRANT_3:53,QUADRANT_4:54,NEWLINE:55,SEMI:56,EOF:57,alphaNumToken:58,textNoTagsToken:59,STR:60,MD_STR:61,alphaNum:62,PUNCTUATION:63,PLUS:64,EQUALS:65,DOT:66,UNDERSCORE:67,$accept:0,$end:1},terminals_:{2:"error",4:"ALPHA",5:"NUM",6:"NODE_STRING",7:"DOWN",8:"MINUS",9:"DEFAULT",10:"COMMA",11:"COLON",12:"AMP",13:"BRKT",14:"MULT",15:"UNICODE_TEXT",17:"UNIT",18:"SPACE",19:"STYLE",20:"PCT",25:"CLASSDEF",28:"QUADRANT",35:"title",36:"title_value",37:"acc_title",38:"acc_title_value",39:"acc_descr",40:"acc_descr_value",41:"acc_descr_multiline_value",42:"section",44:"point_start",45:"point_x",46:"point_y",47:"class_name",48:"X-AXIS",49:"AXIS-TEXT-DELIMITER",50:"Y-AXIS",51:"QUADRANT_1",52:"QUADRANT_2",53:"QUADRANT_3",54:"QUADRANT_4",55:"NEWLINE",56:"SEMI",57:"EOF",60:"STR",61:"MD_STR",63:"PUNCTUATION",64:"PLUS",65:"EQUALS",66:"DOT",67:"UNDERSCORE"},productions_:[0,[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[21,1],[21,2],[22,1],[22,2],[23,1],[23,3],[24,5],[26,2],[26,2],[26,2],[29,0],[29,2],[30,2],[31,0],[31,1],[31,2],[31,1],[31,1],[31,1],[31,2],[31,2],[31,2],[31,1],[31,1],[34,4],[34,5],[34,5],[34,6],[32,4],[32,3],[32,2],[32,4],[32,3],[32,2],[33,2],[33,2],[33,2],[33,2],[27,1],[27,1],[27,1],[43,1],[43,2],[43,1],[43,1],[62,1],[62,2],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[59,1],[59,1],[59,1]],performAction:mt(function(e,t,r,n,i,a,s){var o=a.length-1;switch(i){case 23:this.$=a[o];break;case 24:this.$=a[o-1]+""+a[o];break;case 26:this.$=a[o-1]+a[o];break;case 27:this.$=[a[o].trim()];break;case 28:a[o-2].push(a[o].trim()),this.$=a[o-2];break;case 29:this.$=a[o-4],n.addClass(a[o-2],a[o]);break;case 37:this.$=[];break;case 42:this.$=a[o].trim(),n.setDiagramTitle(this.$);break;case 43:this.$=a[o].trim(),n.setAccTitle(this.$);break;case 44:case 45:this.$=a[o].trim(),n.setAccDescription(this.$);break;case 46:n.addSection(a[o].substr(8)),this.$=a[o].substr(8);break;case 47:n.addPoint(a[o-3],"",a[o-1],a[o],[]);break;case 48:n.addPoint(a[o-4],a[o-3],a[o-1],a[o],[]);break;case 49:n.addPoint(a[o-4],"",a[o-2],a[o-1],a[o]);break;case 50:n.addPoint(a[o-5],a[o-4],a[o-2],a[o-1],a[o]);break;case 51:n.setXAxisLeftText(a[o-2]),n.setXAxisRightText(a[o]);break;case 52:a[o-1].text+=" ⟶ ",n.setXAxisLeftText(a[o-1]);break;case 53:n.setXAxisLeftText(a[o]);break;case 54:n.setYAxisBottomText(a[o-2]),n.setYAxisTopText(a[o]);break;case 55:a[o-1].text+=" ⟶ ",n.setYAxisBottomText(a[o-1]);break;case 56:n.setYAxisBottomText(a[o]);break;case 57:n.setQuadrant1Text(a[o]);break;case 58:n.setQuadrant2Text(a[o]);break;case 59:n.setQuadrant3Text(a[o]);break;case 60:n.setQuadrant4Text(a[o]);break;case 64:this.$={text:a[o],type:"text"};break;case 65:this.$={text:a[o-1].text+""+a[o],type:a[o-1].type};break;case 66:this.$={text:a[o],type:"text"};break;case 67:this.$={text:a[o],type:"markdown"};break;case 68:this.$=a[o];break;case 69:this.$=a[o-1]+""+a[o]}},"anonymous"),table:[{18:r,26:1,27:2,28:n,55:i,56:a,57:s},{1:[3]},{18:r,26:8,27:2,28:n,55:i,56:a,57:s},{18:r,26:9,27:2,28:n,55:i,56:a,57:s},t(P,[2,33],{29:10}),t(B,[2,61]),t(B,[2,62]),t(B,[2,63]),{1:[2,30]},{1:[2,31]},t(o,$,{30:11,31:12,24:13,32:15,33:16,34:17,43:30,58:31,1:[2,32],4:l,5:c,10:h,12:u,13:d,14:p,18:F,25:z,35:G,37:U,39:q,41:j,42:Y,48:W,50:H,51:V,52:X,53:K,54:Z,60:g,61:f,63:m,64:y,65:v,66:x,67:b}),t(P,[2,34]),{27:45,55:i,56:a,57:s},t(o,[2,37]),t(o,$,{24:13,32:15,33:16,34:17,43:30,58:31,31:46,4:l,5:c,10:h,12:u,13:d,14:p,18:F,25:z,35:G,37:U,39:q,41:j,42:Y,48:W,50:H,51:V,52:X,53:K,54:Z,60:g,61:f,63:m,64:y,65:v,66:x,67:b}),t(o,[2,39]),t(o,[2,40]),t(o,[2,41]),{36:[1,47]},{38:[1,48]},{40:[1,49]},t(o,[2,45]),t(o,[2,46]),{18:[1,50]},{4:l,5:c,10:h,12:u,13:d,14:p,43:51,58:31,60:g,61:f,63:m,64:y,65:v,66:x,67:b},{4:l,5:c,10:h,12:u,13:d,14:p,43:52,58:31,60:g,61:f,63:m,64:y,65:v,66:x,67:b},{4:l,5:c,10:h,12:u,13:d,14:p,43:53,58:31,60:g,61:f,63:m,64:y,65:v,66:x,67:b},{4:l,5:c,10:h,12:u,13:d,14:p,43:54,58:31,60:g,61:f,63:m,64:y,65:v,66:x,67:b},{4:l,5:c,10:h,12:u,13:d,14:p,43:55,58:31,60:g,61:f,63:m,64:y,65:v,66:x,67:b},{4:l,5:c,10:h,12:u,13:d,14:p,43:56,58:31,60:g,61:f,63:m,64:y,65:v,66:x,67:b},{4:l,5:c,8:w,10:h,12:u,13:d,14:p,18:k,44:[1,57],47:[1,58],58:60,59:59,63:m,64:y,65:v,66:x,67:b},t(T,[2,64]),t(T,[2,66]),t(T,[2,67]),t(T,[2,70]),t(T,[2,71]),t(T,[2,72]),t(T,[2,73]),t(T,[2,74]),t(T,[2,75]),t(T,[2,76]),t(T,[2,77]),t(T,[2,78]),t(T,[2,79]),t(T,[2,80]),t(P,[2,35]),t(o,[2,38]),t(o,[2,42]),t(o,[2,43]),t(o,[2,44]),{3:64,4:Q,5:J,6:ee,7:te,8:re,9:ne,10:ie,11:ae,12:se,13:oe,14:le,15:ce,21:63},t(o,[2,53],{59:59,58:60,4:l,5:c,8:w,10:h,12:u,13:d,14:p,18:k,49:[1,77],63:m,64:y,65:v,66:x,67:b}),t(o,[2,56],{59:59,58:60,4:l,5:c,8:w,10:h,12:u,13:d,14:p,18:k,49:[1,78],63:m,64:y,65:v,66:x,67:b}),t(o,[2,57],{59:59,58:60,4:l,5:c,8:w,10:h,12:u,13:d,14:p,18:k,63:m,64:y,65:v,66:x,67:b}),t(o,[2,58],{59:59,58:60,4:l,5:c,8:w,10:h,12:u,13:d,14:p,18:k,63:m,64:y,65:v,66:x,67:b}),t(o,[2,59],{59:59,58:60,4:l,5:c,8:w,10:h,12:u,13:d,14:p,18:k,63:m,64:y,65:v,66:x,67:b}),t(o,[2,60],{59:59,58:60,4:l,5:c,8:w,10:h,12:u,13:d,14:p,18:k,63:m,64:y,65:v,66:x,67:b}),{45:[1,79]},{44:[1,80]},t(T,[2,65]),t(T,[2,81]),t(T,[2,82]),t(T,[2,83]),{3:82,4:Q,5:J,6:ee,7:te,8:re,9:ne,10:ie,11:ae,12:se,13:oe,14:le,15:ce,18:[1,81]},t(E,[2,23]),t(E,[2,1]),t(E,[2,2]),t(E,[2,3]),t(E,[2,4]),t(E,[2,5]),t(E,[2,6]),t(E,[2,7]),t(E,[2,8]),t(E,[2,9]),t(E,[2,10]),t(E,[2,11]),t(E,[2,12]),t(o,[2,52],{58:31,43:83,4:l,5:c,10:h,12:u,13:d,14:p,60:g,61:f,63:m,64:y,65:v,66:x,67:b}),t(o,[2,55],{58:31,43:84,4:l,5:c,10:h,12:u,13:d,14:p,60:g,61:f,63:m,64:y,65:v,66:x,67:b}),{46:[1,85]},{45:[1,86]},{4:C,5:_,6:S,8:A,11:L,13:N,16:89,17:I,18:R,19:M,20:D,22:88,23:87},t(E,[2,24]),t(o,[2,51],{59:59,58:60,4:l,5:c,8:w,10:h,12:u,13:d,14:p,18:k,63:m,64:y,65:v,66:x,67:b}),t(o,[2,54],{59:59,58:60,4:l,5:c,8:w,10:h,12:u,13:d,14:p,18:k,63:m,64:y,65:v,66:x,67:b}),t(o,[2,47],{22:88,16:89,23:100,4:C,5:_,6:S,8:A,11:L,13:N,17:I,18:R,19:M,20:D}),{46:[1,101]},t(o,[2,29],{10:he}),t(ue,[2,27],{16:103,4:C,5:_,6:S,8:A,11:L,13:N,17:I,18:R,19:M,20:D}),t(O,[2,25]),t(O,[2,13]),t(O,[2,14]),t(O,[2,15]),t(O,[2,16]),t(O,[2,17]),t(O,[2,18]),t(O,[2,19]),t(O,[2,20]),t(O,[2,21]),t(O,[2,22]),t(o,[2,49],{10:he}),t(o,[2,48],{22:88,16:89,23:104,4:C,5:_,6:S,8:A,11:L,13:N,17:I,18:R,19:M,20:D}),{4:C,5:_,6:S,8:A,11:L,13:N,16:89,17:I,18:R,19:M,20:D,22:105},t(O,[2,26]),t(o,[2,50],{10:he}),t(ue,[2,28],{16:103,4:C,5:_,6:S,8:A,11:L,13:N,17:I,18:R,19:M,20:D})],defaultActions:{8:[2,30],9:[2,31]},parseError:mt(function(e,t){var r;if(!t.recoverable)throw(r=new Error(e)).hash=t,r;this.trace(e)},"parseError"),parse:mt(function(e){var t,r=this,n=[0],i=[],a=[null],s=[],o=this.table,l="",c=0,h=0,u=0,d=1,p=s.slice.call(arguments,1),g=Object.create(this.lexer),f={yy:{}};for(t in this.yy)Object.prototype.hasOwnProperty.call(this.yy,t)&&(f.yy[t]=this.yy[t]);g.setInput(e,f.yy),f.yy.lexer=g,f.yy.parser=this,"u"<typeof g.yylloc&&(g.yylloc={});var m=g.yylloc,y=(s.push(m),g.options&&g.options.ranges);function v(){var e=i.pop()||g.lex()||d;return"number"!=typeof e&&(e instanceof Array&&(e=(i=e).pop()),e=r.symbols_[e]||e),e}"function"==typeof f.yy.parseError?this.parseError=f.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,mt(function(e){n.length=n.length-2*e,a.length=a.length-e,s.length=s.length-e},"popStack"),mt(v,"lex");for(var x,b,w,k,T,E,C,_={};;){if(w=n[n.length-1],"u"<typeof(k=this.defaultActions[w]||((null===x||"u"<typeof x)&&(x=v()),o[w]&&o[w][x]))||!k.length||!k[0]){var S,A=[];for(T in o[w])this.terminals_[T]&&2<T&&A.push("'"+this.terminals_[T]+"'");S=g.showPosition?"Parse error on line "+(c+1)+`: +`+g.showPosition()+` +Expecting `+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(c+1)+": Unexpected "+(x==d?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(S,{text:g.match,token:this.terminals_[x]||x,line:g.yylineno,loc:m,expected:A})}if(k[0]instanceof Array&&1<k.length)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+x);switch(k[0]){case 1:n.push(x),a.push(g.yytext),s.push(g.yylloc),n.push(k[1]),x=null,b?(x=b,b=null):(h=g.yyleng,l=g.yytext,c=g.yylineno,m=g.yylloc,0<u&&u--);break;case 2:if(E=this.productions_[k[1]][1],_.$=a[a.length-E],_._$={first_line:s[s.length-(E||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(E||1)].first_column,last_column:s[s.length-1].last_column},y&&(_._$.range=[s[s.length-(E||1)].range[0],s[s.length-1].range[1]]),typeof(C=this.performAction.apply(_,[l,h,c,f.yy,k[1],a,s].concat(p)))<"u")return C;E&&(n=n.slice(0,-1*E*2),a=a.slice(0,-1*E),s=s.slice(0,-1*E)),n.push(this.productions_[k[1]][0]),a.push(_.$),s.push(_._$),C=o[n[n.length-2]][n[n.length-1]],n.push(C);break;case 3:return!0}}return!0},"parse")},n={EOF:1,parseError:mt(function(e,t){if(!this.yy.parser)throw new Error(e);this.yy.parser.parseError(e,t)},"parseError"),setInput:mt(function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:mt(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},"input"),unput:mt(function(e){var t=e.length,r=e.split(/(?:\r\n?|\n)/g),e=(this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t,this.match.split(/(?:\r\n?|\n)/g)),n=(this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),r.length-1&&(this.yylineno-=r.length-1),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:r?(r.length===e.length?this.yylloc.first_column:0)+e[e.length-r.length].length-r[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[n[0],n[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},"unput"),more:mt(function(){return this._more=!0,this},"more"),reject:mt(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):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})},"reject"),less:mt(function(e){this.unput(this.match.slice(e))},"less"),pastInput:mt(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(20<e.length?"...":"")+e.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:mt(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(20<e.length?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:mt(function(){var e=this.pastInput(),t=new Array(e.length+1).join("-");return e+this.upcomingInput()+` +`+t+"^"},"showPosition"),test_match:mt(function(e,t){var r,n;if(this.options.backtrack_lexer&&(n={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges)&&(n.yylloc.range=this.yylloc.range.slice(0)),(r=e[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],r=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack)for(var i in n)this[i]=n[i];return!1},"test_match"),next:mt(function(){if(this.done)return this.EOF;var e,t,r,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((r=this._input.match(this.rules[i[a]]))&&(!t||r[0].length>t[0].length)){if(t=r,n=a,this.options.backtrack_lexer){if(!1!==(e=this.test_match(r,i[a])))return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?!1!==(e=this.test_match(t,i[n]))&&e:""===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:mt(function(){return this.next()||this.lex()},"lex"),begin:mt(function(e){this.conditionStack.push(e)},"begin"),popState:mt(function(){return 0<this.conditionStack.length-1?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:mt(function(){return(this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]]:this.conditions.INITIAL).rules},"_currentRules"),topState:mt(function(e){return 0<=(e=this.conditionStack.length-1-Math.abs(e||0))?this.conditionStack[e]:"INITIAL"},"topState"),pushState:mt(function(e){this.begin(e)},"pushState"),stateStackSize:mt(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:mt(function(e,t,r,n){switch(r){case 0:case 1:break;case 2:return 55;case 3:break;case 4:return this.begin("title"),35;case 5:return this.popState(),"title_value";case 6:return this.begin("acc_title"),37;case 7:return this.popState(),"acc_title_value";case 8:return this.begin("acc_descr"),39;case 9:return this.popState(),"acc_descr_value";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;case 29:return this.begin("point_start"),44;case 30:return this.begin("point_x"),45;case 31:this.popState();break;case 32:this.popState(),this.begin("point_y");break;case 33:return this.popState(),46;case 34:return 28;case 35:return 4;case 36:return 11;case 37:return 64;case 38:return 10;case 39:case 40:return 65;case 41:return 14;case 42:return 13;case 43:return 67;case 44:return 66;case 45:return 12;case 46:return 8;case 47:return 5;case 48:return 18;case 49:return 56;case 50:return 63;case 51:return 57}},"anonymous"),rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:title\b)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?: *x-axis *)/i,/^(?: *y-axis *)/i,/^(?: *--+> *)/i,/^(?: *quadrant-1 *)/i,/^(?: *quadrant-2 *)/i,/^(?: *quadrant-3 *)/i,/^(?: *quadrant-4 *)/i,/^(?:classDef\b)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?::::)/i,/^(?:^\w+)/i,/^(?:\s*:\s*\[\s*)/i,/^(?:(1)|(0(.\d+)?))/i,/^(?:\s*\] *)/i,/^(?:\s*,\s*)/i,/^(?:(1)|(0(.\d+)?))/i,/^(?: *quadrantChart *)/i,/^(?:[A-Za-z]+)/i,/^(?::)/i,/^(?:\+)/i,/^(?:,)/i,/^(?:=)/i,/^(?:=)/i,/^(?:\*)/i,/^(?:#)/i,/^(?:[\_])/i,/^(?:\.)/i,/^(?:&)/i,/^(?:-)/i,/^(?:[0-9]+)/i,/^(?:\s)/i,/^(?:;)/i,/^(?:[!"#$%&'*+,-.`?\\_/])/i,/^(?:$)/i],conditions:{class_name:{rules:[28],inclusive:!1},point_y:{rules:[33],inclusive:!1},point_x:{rules:[32],inclusive:!1},point_start:{rules:[30,31],inclusive:!1},acc_descr_multiline:{rules:[11,12],inclusive:!1},acc_descr:{rules:[9],inclusive:!1},acc_title:{rules:[7],inclusive:!1},title:{rules:[5],inclusive:!1},md_string:{rules:[22,23],inclusive:!1},string:{rules:[25,26],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,6,8,10,13,14,15,16,17,18,19,20,21,24,27,29,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51],inclusive:!0}}};r.lexer=n,mt(e,"Parser"),(iCe=new((e.prototype=r).Parser=e)).parser=iCe,aCe=iCe}),hCe=b(()=>{i6(),en(),e(),Xr(),sCe=Ot(),oCe=class{constructor(){this.classes=new Map,this.config=this.getDefaultConfig(),this.themeConfig=this.getDefaultThemeConfig(),this.data=this.getDefaultData()}static{mt(this,"QuadrantBuilder")}getDefaultData(){return{titleText:"",quadrant1Text:"",quadrant2Text:"",quadrant3Text:"",quadrant4Text:"",xAxisLeftText:"",xAxisRightText:"",yAxisBottomText:"",yAxisTopText:"",points:[]}}getDefaultConfig(){return{showXAxis:!0,showYAxis:!0,showTitle:!0,chartHeight:Yt.quadrantChart?.chartWidth||500,chartWidth:Yt.quadrantChart?.chartHeight||500,titlePadding:Yt.quadrantChart?.titlePadding||10,titleFontSize:Yt.quadrantChart?.titleFontSize||20,quadrantPadding:Yt.quadrantChart?.quadrantPadding||5,xAxisLabelPadding:Yt.quadrantChart?.xAxisLabelPadding||5,yAxisLabelPadding:Yt.quadrantChart?.yAxisLabelPadding||5,xAxisLabelFontSize:Yt.quadrantChart?.xAxisLabelFontSize||16,yAxisLabelFontSize:Yt.quadrantChart?.yAxisLabelFontSize||16,quadrantLabelFontSize:Yt.quadrantChart?.quadrantLabelFontSize||16,quadrantTextTopPadding:Yt.quadrantChart?.quadrantTextTopPadding||5,pointTextPadding:Yt.quadrantChart?.pointTextPadding||5,pointLabelFontSize:Yt.quadrantChart?.pointLabelFontSize||12,pointRadius:Yt.quadrantChart?.pointRadius||5,xAxisPosition:Yt.quadrantChart?.xAxisPosition||"top",yAxisPosition:Yt.quadrantChart?.yAxisPosition||"left",quadrantInternalBorderStrokeWidth:Yt.quadrantChart?.quadrantInternalBorderStrokeWidth||1,quadrantExternalBorderStrokeWidth:Yt.quadrantChart?.quadrantExternalBorderStrokeWidth||2}}getDefaultThemeConfig(){return{quadrant1Fill:sCe.quadrant1Fill,quadrant2Fill:sCe.quadrant2Fill,quadrant3Fill:sCe.quadrant3Fill,quadrant4Fill:sCe.quadrant4Fill,quadrant1TextFill:sCe.quadrant1TextFill,quadrant2TextFill:sCe.quadrant2TextFill,quadrant3TextFill:sCe.quadrant3TextFill,quadrant4TextFill:sCe.quadrant4TextFill,quadrantPointFill:sCe.quadrantPointFill,quadrantPointTextFill:sCe.quadrantPointTextFill,quadrantXAxisTextFill:sCe.quadrantXAxisTextFill,quadrantYAxisTextFill:sCe.quadrantYAxisTextFill,quadrantTitleFill:sCe.quadrantTitleFill,quadrantInternalBorderStrokeFill:sCe.quadrantInternalBorderStrokeFill,quadrantExternalBorderStrokeFill:sCe.quadrantExternalBorderStrokeFill}}clear(){this.config=this.getDefaultConfig(),this.themeConfig=this.getDefaultThemeConfig(),this.data=this.getDefaultData(),this.classes=new Map,D.info("clear called")}setData(e){this.data={...this.data,...e}}addPoints(e){this.data.points=[...e,...this.data.points]}addClass(e,t){this.classes.set(e,t)}setConfig(e){D.trace("setConfig called with: ",e),this.config={...this.config,...e}}setThemeConfig(e){D.trace("setThemeConfig called with: ",e),this.themeConfig={...this.themeConfig,...e}}calculateSpace(e,t,r,n){var i=2*this.config.xAxisLabelPadding+this.config.xAxisLabelFontSize,e={top:"top"===e&&t?i:0,bottom:"bottom"===e&&t?i:0},t=2*this.config.yAxisLabelPadding+this.config.yAxisLabelFontSize,i={left:"left"===this.config.yAxisPosition&&r?t:0,right:"right"===this.config.yAxisPosition&&r?t:0},r=this.config.titleFontSize+2*this.config.titlePadding,t={top:n?r:0},n=this.config.quadrantPadding+i.left,r=this.config.quadrantPadding+e.top+t.top,a=this.config.chartWidth-2*this.config.quadrantPadding-i.left-i.right,s=this.config.chartHeight-2*this.config.quadrantPadding-e.top-e.bottom-t.top;return{xAxisSpace:e,yAxisSpace:i,titleSpace:t,quadrantSpace:{quadrantLeft:n,quadrantTop:r,quadrantWidth:a,quadrantHalfWidth:a/2,quadrantHeight:s,quadrantHalfHeight:s/2}}}getAxisLabels(e,t,r,n){var{quadrantSpace:n,titleSpace:i}=n,{quadrantHalfHeight:n,quadrantHeight:a,quadrantLeft:s,quadrantHalfWidth:o,quadrantTop:l,quadrantWidth:c}=n,h=!!this.data.xAxisRightText,u=!!this.data.yAxisTopText,d=[];return this.data.xAxisLeftText&&t&&d.push({text:this.data.xAxisLeftText,fill:this.themeConfig.quadrantXAxisTextFill,x:s+(h?o/2:0),y:"top"===e?this.config.xAxisLabelPadding+i.top:this.config.xAxisLabelPadding+l+a+this.config.quadrantPadding,fontSize:this.config.xAxisLabelFontSize,verticalPos:h?"center":"left",horizontalPos:"top",rotation:0}),this.data.xAxisRightText&&t&&d.push({text:this.data.xAxisRightText,fill:this.themeConfig.quadrantXAxisTextFill,x:s+o+(h?o/2:0),y:"top"===e?this.config.xAxisLabelPadding+i.top:this.config.xAxisLabelPadding+l+a+this.config.quadrantPadding,fontSize:this.config.xAxisLabelFontSize,verticalPos:h?"center":"left",horizontalPos:"top",rotation:0}),this.data.yAxisBottomText&&r&&d.push({text:this.data.yAxisBottomText,fill:this.themeConfig.quadrantYAxisTextFill,x:"left"===this.config.yAxisPosition?this.config.yAxisLabelPadding:this.config.yAxisLabelPadding+s+c+this.config.quadrantPadding,y:l+a-(u?n/2:0),fontSize:this.config.yAxisLabelFontSize,verticalPos:u?"center":"left",horizontalPos:"top",rotation:-90}),this.data.yAxisTopText&&r&&d.push({text:this.data.yAxisTopText,fill:this.themeConfig.quadrantYAxisTextFill,x:"left"===this.config.yAxisPosition?this.config.yAxisLabelPadding:this.config.yAxisLabelPadding+s+c+this.config.quadrantPadding,y:l+n-(u?n/2:0),fontSize:this.config.yAxisLabelFontSize,verticalPos:u?"center":"left",horizontalPos:"top",rotation:-90}),d}getQuadrants(e){var t,{quadrantHalfHeight:e,quadrantLeft:r,quadrantHalfWidth:n,quadrantTop:i}=e=e.quadrantSpace;for(t of r=[{text:{text:this.data.quadrant1Text,fill:this.themeConfig.quadrant1TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:r+n,y:i,width:n,height:e,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:r,y:i,width:n,height:e,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:r,y:i+e,width:n,height:e,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:r+n,y:i+e,width:n,height:e,fill:this.themeConfig.quadrant4Fill}])t.text.x=t.x+t.width/2,0===this.data.points.length?(t.text.y=t.y+t.height/2,t.text.horizontalPos="middle"):(t.text.y=t.y+this.config.quadrantTextTopPadding,t.text.horizontalPos="top");return r}getQuadrantPoints(e){let t=e.quadrantSpace,{quadrantHeight:r,quadrantLeft:n,quadrantTop:i,quadrantWidth:a}=t,s=Fx().domain([0,1]).range([n,a+n]),o=Fx().domain([0,1]).range([r+i,i]);return this.data.points.map(e=>{var t=this.classes.get(e.className);return t&&(e={...t,...e}),{x:s(e.x),y:o(e.y),fill:e.color??this.themeConfig.quadrantPointFill,radius:e.radius??this.config.pointRadius,text:{text:e.text,fill:this.themeConfig.quadrantPointTextFill,x:s(e.x),y:o(e.y)+this.config.pointTextPadding,verticalPos:"center",horizontalPos:"top",fontSize:this.config.pointLabelFontSize,rotation:0},strokeColor:e.strokeColor??this.themeConfig.quadrantPointFill,strokeWidth:e.strokeWidth??"0px"}})}getBorders(e){var t=this.config.quadrantExternalBorderStrokeWidth/2,{quadrantHalfHeight:e,quadrantHeight:r,quadrantLeft:n,quadrantHalfWidth:i,quadrantTop:a,quadrantWidth:s}=e=e.quadrantSpace;return[{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:n-t,y1:a,x2:n+s+t,y2:a},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:n+s,y1:a+t,x2:n+s,y2:a+r-t},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:n-t,y1:a+r,x2:n+s+t,y2:a+r},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:n,y1:a+t,x2:n,y2:a+r-t},{strokeFill:this.themeConfig.quadrantInternalBorderStrokeFill,strokeWidth:this.config.quadrantInternalBorderStrokeWidth,x1:n+i,y1:a+t,x2:n+i,y2:a+r-t},{strokeFill:this.themeConfig.quadrantInternalBorderStrokeFill,strokeWidth:this.config.quadrantInternalBorderStrokeWidth,x1:n+t,y1:a+e,x2:n+s-t,y2:a+e}]}getTitle(e){if(e)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(){var e=this.config.showXAxis&&!(!this.data.xAxisLeftText&&!this.data.xAxisRightText),t=this.config.showYAxis&&!(!this.data.yAxisTopText&&!this.data.yAxisBottomText),r=this.config.showTitle&&!!this.data.titleText,n=0<this.data.points.length?"bottom":this.config.xAxisPosition,i=this.calculateSpace(n,e,t,r);return{points:this.getQuadrantPoints(i),quadrants:this.getQuadrants(i),axisLabels:this.getAxisLabels(n,e,t,i),borderLines:this.getBorders(i),title:this.getTitle(r)}}}});function uCe(e){return!/^#?([\dA-Fa-f]{6}|[\dA-Fa-f]{3})$/.test(e)}function dCe(e){return!/^\d+$/.test(e)}function pCe(e){return!/^\d+px$/.test(e)}var gCe,fCe=b(()=>{gCe=class extends Error{static{mt(this,"InvalidStyleError")}constructor(e,t,r){super(`value for ${e} ${t} is invalid, please use a valid `+r),this.name="InvalidStyleError"}},mt(uCe,"validateHexCode"),mt(dCe,"validateNumber"),mt(pCe,"validateSizeInPixels")});function mCe(e){return lc(e.trim(),ICe)}function yCe(e){RCe.setData({quadrant1Text:mCe(e.text)})}function vCe(e){RCe.setData({quadrant2Text:mCe(e.text)})}function xCe(e){RCe.setData({quadrant3Text:mCe(e.text)})}function bCe(e){RCe.setData({quadrant4Text:mCe(e.text)})}function wCe(e){RCe.setData({xAxisLeftText:mCe(e.text)})}function kCe(e){RCe.setData({xAxisRightText:mCe(e.text)})}function TCe(e){RCe.setData({yAxisTopText:mCe(e.text)})}function ECe(e){RCe.setData({yAxisBottomText:mCe(e.text)})}function CCe(e){var t,r={};for(t of e){var[n,i]=t.trim().split(/\s*:\s*/);if("radius"===n){if(dCe(i))throw new gCe(n,i,"number");r.radius=parseInt(i)}else if("color"===n){if(uCe(i))throw new gCe(n,i,"hex code");r.color=i}else if("stroke-color"===n){if(uCe(i))throw new gCe(n,i,"hex code");r.strokeColor=i}else{if("stroke-width"!==n)throw new Error(`style named ${n} is not supported.`);if(pCe(i))throw new gCe(n,i,"number of pixels (eg. 10px)");r.strokeWidth=i}}return r}function _Ce(e,t,r,n,i){i=CCe(i),RCe.addPoints([{x:r,y:n,text:mCe(e.text),className:t,...i}])}function SCe(e,t){RCe.addClass(e,CCe(t))}function ACe(e){RCe.setConfig({chartWidth:e})}function LCe(e){RCe.setConfig({chartHeight:e})}function NCe(){var{themeVariables:e,quadrantChart:t}=O();return t&&RCe.setConfig(t),RCe.setThemeConfig({quadrant1Fill:e.quadrant1Fill,quadrant2Fill:e.quadrant2Fill,quadrant3Fill:e.quadrant3Fill,quadrant4Fill:e.quadrant4Fill,quadrant1TextFill:e.quadrant1TextFill,quadrant2TextFill:e.quadrant2TextFill,quadrant3TextFill:e.quadrant3TextFill,quadrant4TextFill:e.quadrant4TextFill,quadrantPointFill:e.quadrantPointFill,quadrantPointTextFill:e.quadrantPointTextFill,quadrantXAxisTextFill:e.quadrantXAxisTextFill,quadrantYAxisTextFill:e.quadrantYAxisTextFill,quadrantExternalBorderStrokeFill:e.quadrantExternalBorderStrokeFill,quadrantInternalBorderStrokeFill:e.quadrantInternalBorderStrokeFill,quadrantTitleFill:e.quadrantTitleFill}),RCe.setData({titleText:wh()}),RCe.build()}var ICe,RCe,MCe,DCe,OCe,PCe,BCe=b(()=>{Tu(),Oc(),ku(),hCe(),fCe(),ICe=O(),mt(mCe,"textSanitizer"),RCe=new oCe,mt(yCe,"setQuadrant1Text"),mt(vCe,"setQuadrant2Text"),mt(xCe,"setQuadrant3Text"),mt(bCe,"setQuadrant4Text"),mt(wCe,"setXAxisLeftText"),mt(kCe,"setXAxisRightText"),mt(TCe,"setYAxisTopText"),mt(ECe,"setYAxisBottomText"),mt(CCe,"parseStyles"),mt(_Ce,"addPoint"),mt(SCe,"addClass"),mt(ACe,"setWidth"),mt(LCe,"setHeight"),mt(NCe,"getQuadrantData"),MCe=mt(function(){RCe.clear(),fh()},"clear"),DCe={setWidth:ACe,setHeight:LCe,setQuadrant1Text:yCe,setQuadrant2Text:vCe,setQuadrant3Text:xCe,setQuadrant4Text:bCe,setXAxisLeftText:wCe,setXAxisRightText:kCe,setYAxisTopText:TCe,setYAxisBottomText:ECe,parseStyles:CCe,addPoint:_Ce,addClass:SCe,getQuadrantData:NCe,clear:MCe,setAccTitle:mh,getAccTitle:yh,setDiagramTitle:bh,getDiagramTitle:wh,getAccDescription:xh,setAccDescription:vh}}),$Ce=b(()=>{i6(),Tu(),e(),lh(),OCe=mt((e,t,r,n)=>{function i(e){return"top"===e?"hanging":"middle"}function a(e){return"left"===e?"start":"middle"}function s(e){return`translate(${e.x}, ${e.y}) rotate(${e.rotation||0})`}mt(i,"getDominantBaseLine"),mt(a,"getTextAnchor"),mt(s,"getTransformation");var o=O();D.debug(`Rendering quadrant chart +`+e);let l=o.securityLevel,c;"sandbox"===l&&(c=H("#i"+t));var t=(e=H("sandbox"===l?c.nodes()[0].contentDocument.body:"body").select(`[id="${t}"]`)).append("g").attr("class","main"),h=o.quadrantChart?.chartWidth??500,u=o.quadrantChart?.chartHeight??500,o=(Zc(e,u,h,o.quadrantChart?.useMaxWidth??!0),e.attr("viewBox","0 0 "+h+" "+u),n.db.setHeight(u),n.db.setWidth(h),n.db.getQuadrantData()),e=t.append("g").attr("class","quadrants"),u=t.append("g").attr("class","border"),h=t.append("g").attr("class","data-points"),n=t.append("g").attr("class","labels"),t=t.append("g").attr("class","title");o.title&&t.append("text").attr("x",0).attr("y",0).attr("fill",o.title.fill).attr("font-size",o.title.fontSize).attr("dominant-baseline",i(o.title.horizontalPos)).attr("text-anchor",a(o.title.verticalPos)).attr("transform",s(o.title)).text(o.title.text),o.borderLines&&u.selectAll("line").data(o.borderLines).enter().append("line").attr("x1",e=>e.x1).attr("y1",e=>e.y1).attr("x2",e=>e.x2).attr("y2",e=>e.y2).style("stroke",e=>e.strokeFill).style("stroke-width",e=>e.strokeWidth),(t=e.selectAll("g.quadrant").data(o.quadrants).enter().append("g").attr("class","quadrant")).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),t.append("text").attr("x",0).attr("y",0).attr("fill",e=>e.text.fill).attr("font-size",e=>e.text.fontSize).attr("dominant-baseline",e=>i(e.text.horizontalPos)).attr("text-anchor",e=>a(e.text.verticalPos)).attr("transform",e=>s(e.text)).text(e=>e.text.text),n.selectAll("g.label").data(o.axisLabels).enter().append("g").attr("class","label").append("text").attr("x",0).attr("y",0).text(e=>e.text).attr("fill",e=>e.fill).attr("font-size",e=>e.fontSize).attr("dominant-baseline",e=>i(e.horizontalPos)).attr("text-anchor",e=>a(e.verticalPos)).attr("transform",e=>s(e)),(u=h.selectAll("g.data-point").data(o.points).enter().append("g").attr("class","data-point")).append("circle").attr("cx",e=>e.x).attr("cy",e=>e.y).attr("r",e=>e.radius).attr("fill",e=>e.fill).attr("stroke",e=>e.strokeColor).attr("stroke-width",e=>e.strokeWidth),u.append("text").attr("x",0).attr("y",0).text(e=>e.text.text).attr("fill",e=>e.text.fill).attr("font-size",e=>e.text.fontSize).attr("dominant-baseline",e=>i(e.text.horizontalPos)).attr("text-anchor",e=>a(e.text.verticalPos)).attr("transform",e=>s(e.text))},"draw"),PCe={draw:OCe}}),FCe={};OFe(FCe,{diagram:()=>zCe});var zCe,GCe,UCe,qCe=b(()=>{cCe(),BCe(),$Ce(),zCe={parser:aCe,db:DCe,renderer:PCe,styles:mt(()=>"","styles")}}),jCe=b(()=>{function e(){this.yy={}}var t=mt(function(e,t,r,n){for(r=r||{},n=e.length;n--;r[e[n]]=t);return r},"o"),r=[1,10,12,14,16,18,19,21,23],n=[2,6],i=[1,3],a=[1,5],s=[1,6],o=[1,7],l=[1,5,10,12,14,16,18,19,21,23,34,35,36],c=[1,25],h=[1,26],u=[1,28],d=[1,29],p=[1,30],g=[1,31],f=[1,32],m=[1,33],y=[1,34],v=[1,35],x=[1,36],b=[1,37],w=[1,43],k=[1,42],T=[1,47],E=[1,50],C=[1,10,12,14,16,18,19,21,23,34,35,36],_=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36],S=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36,41,42,43,44,45,46,47,48,49,50],A=[1,64],n={trace:mt(function(){},"trace"),yy:{},symbols_:{error:2,start:3,eol:4,XYCHART:5,chartConfig:6,document:7,CHART_ORIENTATION:8,statement:9,title:10,text:11,X_AXIS:12,parseXAxis:13,Y_AXIS:14,parseYAxis:15,LINE:16,plotData:17,BAR:18,acc_title:19,acc_title_value:20,acc_descr:21,acc_descr_value:22,acc_descr_multiline_value:23,SQUARE_BRACES_START:24,commaSeparatedNumbers:25,SQUARE_BRACES_END:26,NUMBER_WITH_DECIMAL:27,COMMA:28,xAxisData:29,bandData:30,ARROW_DELIMITER:31,commaSeparatedTexts:32,yAxisData:33,NEWLINE:34,SEMI:35,EOF:36,alphaNum:37,STR:38,MD_STR:39,alphaNumToken:40,AMP:41,NUM:42,ALPHA:43,PLUS:44,EQUALS:45,MULT:46,DOT:47,BRKT:48,MINUS:49,UNDERSCORE:50,$accept:0,$end:1},terminals_:{2:"error",5:"XYCHART",8:"CHART_ORIENTATION",10:"title",12:"X_AXIS",14:"Y_AXIS",16:"LINE",18:"BAR",19:"acc_title",20:"acc_title_value",21:"acc_descr",22:"acc_descr_value",23:"acc_descr_multiline_value",24:"SQUARE_BRACES_START",26:"SQUARE_BRACES_END",27:"NUMBER_WITH_DECIMAL",28:"COMMA",31:"ARROW_DELIMITER",34:"NEWLINE",35:"SEMI",36:"EOF",38:"STR",39:"MD_STR",41:"AMP",42:"NUM",43:"ALPHA",44:"PLUS",45:"EQUALS",46:"MULT",47:"DOT",48:"BRKT",49:"MINUS",50:"UNDERSCORE"},productions_:[0,[3,2],[3,3],[3,2],[3,1],[6,1],[7,0],[7,2],[9,2],[9,2],[9,2],[9,2],[9,2],[9,3],[9,2],[9,3],[9,2],[9,2],[9,1],[17,3],[25,3],[25,1],[13,1],[13,2],[13,1],[29,1],[29,3],[30,3],[32,3],[32,1],[15,1],[15,2],[15,1],[33,3],[4,1],[4,1],[4,1],[11,1],[11,1],[11,1],[37,1],[37,2],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1]],performAction:mt(function(e,t,r,n,i,a,s){var o=a.length-1;switch(i){case 5:n.setOrientation(a[o]);break;case 9:n.setDiagramTitle(a[o].text.trim());break;case 12:n.setLineData({text:"",type:"text"},a[o]);break;case 13:n.setLineData(a[o-1],a[o]);break;case 14:n.setBarData({text:"",type:"text"},a[o]);break;case 15:n.setBarData(a[o-1],a[o]);break;case 16:this.$=a[o].trim(),n.setAccTitle(this.$);break;case 17:case 18:this.$=a[o].trim(),n.setAccDescription(this.$);break;case 19:this.$=a[o-1];break;case 20:this.$=[Number(a[o-2]),...a[o]];break;case 21:this.$=[Number(a[o])];break;case 22:n.setXAxisTitle(a[o]);break;case 23:n.setXAxisTitle(a[o-1]);break;case 24:n.setXAxisTitle({type:"text",text:""});break;case 25:n.setXAxisBand(a[o]);break;case 26:n.setXAxisRangeData(Number(a[o-2]),Number(a[o]));break;case 27:this.$=a[o-1];break;case 28:this.$=[a[o-2],...a[o]];break;case 29:this.$=[a[o]];break;case 30:n.setYAxisTitle(a[o]);break;case 31:n.setYAxisTitle(a[o-1]);break;case 32:n.setYAxisTitle({type:"text",text:""});break;case 33:n.setYAxisRangeData(Number(a[o-2]),Number(a[o]));break;case 37:case 38:this.$={text:a[o],type:"text"};break;case 39:this.$={text:a[o],type:"markdown"};break;case 40:this.$=a[o];break;case 41:this.$=a[o-1]+""+a[o]}},"anonymous"),table:[t(r,n,{3:1,4:2,7:4,5:i,34:a,35:s,36:o}),{1:[3]},t(r,n,{4:2,7:4,3:8,5:i,34:a,35:s,36:o}),t(r,n,{4:2,7:4,6:9,3:10,5:i,8:[1,11],34:a,35:s,36:o}),{1:[2,4],9:12,10:[1,13],12:[1,14],14:[1,15],16:[1,16],18:[1,17],19:[1,18],21:[1,19],23:[1,20]},t(l,[2,34]),t(l,[2,35]),t(l,[2,36]),{1:[2,1]},t(r,n,{4:2,7:4,3:21,5:i,34:a,35:s,36:o}),{1:[2,3]},t(l,[2,5]),t(r,[2,7],{4:22,34:a,35:s,36:o}),{11:23,37:24,38:c,39:h,40:27,41:u,42:d,43:p,44:g,45:f,46:m,47:y,48:v,49:x,50:b},{11:39,13:38,24:w,27:k,29:40,30:41,37:24,38:c,39:h,40:27,41:u,42:d,43:p,44:g,45:f,46:m,47:y,48:v,49:x,50:b},{11:45,15:44,27:T,33:46,37:24,38:c,39:h,40:27,41:u,42:d,43:p,44:g,45:f,46:m,47:y,48:v,49:x,50:b},{11:49,17:48,24:E,37:24,38:c,39:h,40:27,41:u,42:d,43:p,44:g,45:f,46:m,47:y,48:v,49:x,50:b},{11:52,17:51,24:E,37:24,38:c,39:h,40:27,41:u,42:d,43:p,44:g,45:f,46:m,47:y,48:v,49:x,50:b},{20:[1,53]},{22:[1,54]},t(C,[2,18]),{1:[2,2]},t(C,[2,8]),t(C,[2,9]),t(_,[2,37],{40:55,41:u,42:d,43:p,44:g,45:f,46:m,47:y,48:v,49:x,50:b}),t(_,[2,38]),t(_,[2,39]),t(S,[2,40]),t(S,[2,42]),t(S,[2,43]),t(S,[2,44]),t(S,[2,45]),t(S,[2,46]),t(S,[2,47]),t(S,[2,48]),t(S,[2,49]),t(S,[2,50]),t(S,[2,51]),t(C,[2,10]),t(C,[2,22],{30:41,29:56,24:w,27:k}),t(C,[2,24]),t(C,[2,25]),{31:[1,57]},{11:59,32:58,37:24,38:c,39:h,40:27,41:u,42:d,43:p,44:g,45:f,46:m,47:y,48:v,49:x,50:b},t(C,[2,11]),t(C,[2,30],{33:60,27:T}),t(C,[2,32]),{31:[1,61]},t(C,[2,12]),{17:62,24:E},{25:63,27:A},t(C,[2,14]),{17:65,24:E},t(C,[2,16]),t(C,[2,17]),t(S,[2,41]),t(C,[2,23]),{27:[1,66]},{26:[1,67]},{26:[2,29],28:[1,68]},t(C,[2,31]),{27:[1,69]},t(C,[2,13]),{26:[1,70]},{26:[2,21],28:[1,71]},t(C,[2,15]),t(C,[2,26]),t(C,[2,27]),{11:59,32:72,37:24,38:c,39:h,40:27,41:u,42:d,43:p,44:g,45:f,46:m,47:y,48:v,49:x,50:b},t(C,[2,33]),t(C,[2,19]),{25:73,27:A},{26:[2,28]},{26:[2,20]}],defaultActions:{8:[2,1],10:[2,3],21:[2,2],72:[2,28],73:[2,20]},parseError:mt(function(e,t){var r;if(!t.recoverable)throw(r=new Error(e)).hash=t,r;this.trace(e)},"parseError"),parse:mt(function(e){var t,r=this,n=[0],i=[],a=[null],s=[],o=this.table,l="",c=0,h=0,u=0,d=1,p=s.slice.call(arguments,1),g=Object.create(this.lexer),f={yy:{}};for(t in this.yy)Object.prototype.hasOwnProperty.call(this.yy,t)&&(f.yy[t]=this.yy[t]);g.setInput(e,f.yy),f.yy.lexer=g,f.yy.parser=this,"u"<typeof g.yylloc&&(g.yylloc={});var m=g.yylloc,y=(s.push(m),g.options&&g.options.ranges);function v(){var e=i.pop()||g.lex()||d;return"number"!=typeof e&&(e instanceof Array&&(e=(i=e).pop()),e=r.symbols_[e]||e),e}"function"==typeof f.yy.parseError?this.parseError=f.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,mt(function(e){n.length=n.length-2*e,a.length=a.length-e,s.length=s.length-e},"popStack"),mt(v,"lex");for(var x,b,w,k,T,E,C,_={};;){if(w=n[n.length-1],"u"<typeof(k=this.defaultActions[w]||((null===x||"u"<typeof x)&&(x=v()),o[w]&&o[w][x]))||!k.length||!k[0]){var S,A=[];for(T in o[w])this.terminals_[T]&&2<T&&A.push("'"+this.terminals_[T]+"'");S=g.showPosition?"Parse error on line "+(c+1)+`: +`+g.showPosition()+` +Expecting `+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(c+1)+": Unexpected "+(x==d?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(S,{text:g.match,token:this.terminals_[x]||x,line:g.yylineno,loc:m,expected:A})}if(k[0]instanceof Array&&1<k.length)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+x);switch(k[0]){case 1:n.push(x),a.push(g.yytext),s.push(g.yylloc),n.push(k[1]),x=null,b?(x=b,b=null):(h=g.yyleng,l=g.yytext,c=g.yylineno,m=g.yylloc,0<u&&u--);break;case 2:if(E=this.productions_[k[1]][1],_.$=a[a.length-E],_._$={first_line:s[s.length-(E||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(E||1)].first_column,last_column:s[s.length-1].last_column},y&&(_._$.range=[s[s.length-(E||1)].range[0],s[s.length-1].range[1]]),typeof(C=this.performAction.apply(_,[l,h,c,f.yy,k[1],a,s].concat(p)))<"u")return C;E&&(n=n.slice(0,-1*E*2),a=a.slice(0,-1*E),s=s.slice(0,-1*E)),n.push(this.productions_[k[1]][0]),a.push(_.$),s.push(_._$),C=o[n[n.length-2]][n[n.length-1]],n.push(C);break;case 3:return!0}}return!0},"parse")},i={EOF:1,parseError:mt(function(e,t){if(!this.yy.parser)throw new Error(e);this.yy.parser.parseError(e,t)},"parseError"),setInput:mt(function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:mt(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},"input"),unput:mt(function(e){var t=e.length,r=e.split(/(?:\r\n?|\n)/g),e=(this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t,this.match.split(/(?:\r\n?|\n)/g)),n=(this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),r.length-1&&(this.yylineno-=r.length-1),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:r?(r.length===e.length?this.yylloc.first_column:0)+e[e.length-r.length].length-r[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[n[0],n[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},"unput"),more:mt(function(){return this._more=!0,this},"more"),reject:mt(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):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})},"reject"),less:mt(function(e){this.unput(this.match.slice(e))},"less"),pastInput:mt(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(20<e.length?"...":"")+e.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:mt(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(20<e.length?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:mt(function(){var e=this.pastInput(),t=new Array(e.length+1).join("-");return e+this.upcomingInput()+` +`+t+"^"},"showPosition"),test_match:mt(function(e,t){var r,n;if(this.options.backtrack_lexer&&(n={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges)&&(n.yylloc.range=this.yylloc.range.slice(0)),(r=e[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],r=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack)for(var i in n)this[i]=n[i];return!1},"test_match"),next:mt(function(){if(this.done)return this.EOF;var e,t,r,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((r=this._input.match(this.rules[i[a]]))&&(!t||r[0].length>t[0].length)){if(t=r,n=a,this.options.backtrack_lexer){if(!1!==(e=this.test_match(r,i[a])))return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?!1!==(e=this.test_match(t,i[n]))&&e:""===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:mt(function(){return this.next()||this.lex()},"lex"),begin:mt(function(e){this.conditionStack.push(e)},"begin"),popState:mt(function(){return 0<this.conditionStack.length-1?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:mt(function(){return(this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]]:this.conditions.INITIAL).rules},"_currentRules"),topState:mt(function(e){return 0<=(e=this.conditionStack.length-1-Math.abs(e||0))?this.conditionStack[e]:"INITIAL"},"topState"),pushState:mt(function(e){this.begin(e)},"pushState"),stateStackSize:mt(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:mt(function(e,t,r,n){switch(r){case 0:case 1:break;case 2:case 3:return this.popState(),34;case 4:return 34;case 5:break;case 6:return 10;case 7:return this.pushState("acc_title"),19;case 8:return this.popState(),"acc_title_value";case 9:return this.pushState("acc_descr"),21;case 10:return this.popState(),"acc_descr_value";case 11:this.pushState("acc_descr_multiline");break;case 12:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:case 15:return 5;case 16:return 8;case 17:return this.pushState("axis_data"),"X_AXIS";case 18:return this.pushState("axis_data"),"Y_AXIS";case 19:return this.pushState("axis_band_data"),24;case 20:return 31;case 21:return this.pushState("data"),16;case 22:return this.pushState("data"),18;case 23:return this.pushState("data_inner"),24;case 24:return 27;case 25:return this.popState(),26;case 26:this.popState();break;case 27:this.pushState("string");break;case 28:this.popState();break;case 29:return"STR";case 30:return 24;case 31:return 26;case 32:return 43;case 33:return"COLON";case 34:return 44;case 35:return 28;case 36:return 45;case 37:return 46;case 38:return 48;case 39:return 50;case 40:return 47;case 41:return 41;case 42:return 49;case 43:return 42;case 44:break;case 45:return 35;case 46:return 36}},"anonymous"),rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:(\r?\n))/i,/^(?:(\r?\n))/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:title\b)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:\{)/i,/^(?:[^\}]*)/i,/^(?:xychart-beta\b)/i,/^(?:xychart\b)/i,/^(?:(?:vertical|horizontal))/i,/^(?:x-axis\b)/i,/^(?:y-axis\b)/i,/^(?:\[)/i,/^(?:-->)/i,/^(?:line\b)/i,/^(?:bar\b)/i,/^(?:\[)/i,/^(?:[+-]?(?:\d+(?:\.\d+)?|\.\d+))/i,/^(?:\])/i,/^(?:(?:`\) \{ this\.pushState\(md_string\); \}\n<md_string>\(\?:\(\?!`"\)\.\)\+ \{ return MD_STR; \}\n<md_string>\(\?:`))/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}}};n.lexer=i,mt(e,"Parser"),(GCe=new((e.prototype=n).Parser=e)).parser=GCe,UCe=GCe});function YCe(e){return"bar"===e.type}function WCe(e){return"band"===e.type}function HCe(e){return"linear"===e.type}var VCe,XCe,KCe,ZCe,QCe=b(()=>{mt(YCe,"isBarPlot"),mt(WCe,"isBandAxisData"),mt(HCe,"isLinearAxisData")}),JCe=b(()=>{JL(),VCe=class{constructor(e){this.parentGroup=e}static{mt(this,"TextDimensionCalculatorWithFont")}getMaxDimension(e,t){if(!this.parentGroup)return{width:e.reduce((e,t)=>Math.max(t.length,e),0)*t,height:t};var r,n={width:0,height:0},i=this.parentGroup.append("g").attr("visibility","hidden").attr("font-size",t);for(r of e){var a=(s=VL(i,1,r))?s.width:r.length*t,s=s?s.height:t;n.width=Math.max(n.width,a),n.height=Math.max(n.height,s)}return i.remove(),n}}}),e_e=b(()=>{XCe=class{constructor(e,t,r,n){this.axisConfig=e,this.title=t,this.textDimensionCalculator=r,this.axisThemeConfig=n,this.boundingRect={x:0,y:0,width:0,height:0},this.axisPosition="left",this.showTitle=!1,this.showLabel=!1,this.showTick=!1,this.showAxisLine=!1,this.outerPadding=0,this.titleTextHeight=0,this.labelTextHeight=0,this.range=[0,10],this.boundingRect={x:0,y:0,width:0,height:0},this.axisPosition="left"}static{mt(this,"BaseAxis")}setRange(e){this.range=e,"left"===this.axisPosition||"right"===this.axisPosition?this.boundingRect.height=e[1]-e[0]:this.boundingRect.width=e[1]-e[0],this.recalculateScale()}getRange(){return[this.range[0]+this.outerPadding,this.range[1]-this.outerPadding]}setAxisPosition(e){this.axisPosition=e,this.setRange(this.range)}getTickDistance(){var e=this.getRange();return Math.abs(e[0]-e[1])/this.getTickValues().length}getAxisOuterPadding(){return this.outerPadding}getLabelDimension(){return this.textDimensionCalculator.getMaxDimension(this.getTickValues().map(e=>e.toString()),this.axisConfig.labelFontSize)}recalculateOuterPaddingToDrawBar(){.7*this.getTickDistance()>2*this.outerPadding&&(this.outerPadding=Math.floor(.7*this.getTickDistance()/2)),this.recalculateScale()}calculateSpaceIfDrawnHorizontally(e){let t=e.height;var r,n;this.axisConfig.showAxisLine&&t>this.axisConfig.axisLineWidth&&(t-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel&&(r=this.getLabelDimension(),n=.2*e.width,this.outerPadding=Math.min(r.width/2,n),n=r.height+2*this.axisConfig.labelPadding,this.labelTextHeight=r.height,n<=t)&&(t-=n,this.showLabel=!0),this.axisConfig.showTick&&t>=this.axisConfig.tickLength&&(this.showTick=!0,t-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title&&(n=(r=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize)).height+2*this.axisConfig.titlePadding,this.titleTextHeight=r.height,n<=t)&&(t-=n,this.showTitle=!0),this.boundingRect.width=e.width,this.boundingRect.height=e.height-t}calculateSpaceIfDrawnVertical(e){let t=e.width;var r,n;this.axisConfig.showAxisLine&&t>this.axisConfig.axisLineWidth&&(t-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel&&(r=this.getLabelDimension(),n=.2*e.height,this.outerPadding=Math.min(r.height/2,n),(n=r.width+2*this.axisConfig.labelPadding)<=t)&&(t-=n,this.showLabel=!0),this.axisConfig.showTick&&t>=this.axisConfig.tickLength&&(this.showTick=!0,t-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title&&(n=(r=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize)).height+2*this.axisConfig.titlePadding,this.titleTextHeight=r.height,n<=t)&&(t-=n,this.showTitle=!0),this.boundingRect.width=e.width-t,this.boundingRect.height=e.height}calculateSpace(e){return"left"===this.axisPosition||"right"===this.axisPosition?this.calculateSpaceIfDrawnVertical(e):this.calculateSpaceIfDrawnHorizontally(e),this.recalculateScale(),{width:this.boundingRect.width,height:this.boundingRect.height}}setBoundingBoxXY(e){this.boundingRect.x=e.x,this.boundingRect.y=e.y}getDrawableElementsForLeftAxis(){var e,r=[];if(this.showAxisLine&&(e=this.boundingRect.x+this.boundingRect.width-this.axisConfig.axisLineWidth/2,r.push({type:"path",groupTexts:["left-axis","axisl-line"],data:[{path:`M ${e},${this.boundingRect.y} L ${e},${this.boundingRect.y+this.boundingRect.height} `,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})),this.showLabel&&r.push({type:"text",groupTexts:["left-axis","label"],data:this.getTickValues().map(e=>({text:e.toString(),x:this.boundingRect.x+this.boundingRect.width-(this.showLabel?this.axisConfig.labelPadding:0)-(this.showTick?this.axisConfig.tickLength:0)-(this.showAxisLine?this.axisConfig.axisLineWidth:0),y:this.getScaleValue(e),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"middle",horizontalPos:"right"}))}),this.showTick){let t=this.boundingRect.x+this.boundingRect.width-(this.showAxisLine?this.axisConfig.axisLineWidth:0);r.push({type:"path",groupTexts:["left-axis","ticks"],data:this.getTickValues().map(e=>({path:`M ${t},${this.getScaleValue(e)} L ${t-this.axisConfig.tickLength},`+this.getScaleValue(e),strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&r.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"}]}),r}getDrawableElementsForBottomAxis(){var e,r=[];if(this.showAxisLine&&(e=this.boundingRect.y+this.axisConfig.axisLineWidth/2,r.push({type:"path",groupTexts:["bottom-axis","axis-line"],data:[{path:`M ${this.boundingRect.x},${e} L ${this.boundingRect.x+this.boundingRect.width},`+e,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})),this.showLabel&&r.push({type:"text",groupTexts:["bottom-axis","label"],data:this.getTickValues().map(e=>({text:e.toString(),x:this.getScaleValue(e),y:this.boundingRect.y+this.axisConfig.labelPadding+(this.showTick?this.axisConfig.tickLength:0)+(this.showAxisLine?this.axisConfig.axisLineWidth:0),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}))}),this.showTick){let t=this.boundingRect.y+(this.showAxisLine?this.axisConfig.axisLineWidth:0);r.push({type:"path",groupTexts:["bottom-axis","ticks"],data:this.getTickValues().map(e=>({path:`M ${this.getScaleValue(e)},${t} L ${this.getScaleValue(e)},`+(t+this.axisConfig.tickLength),strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&r.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"}]}),r}getDrawableElementsForTopAxis(){var e,r=[];if(this.showAxisLine&&(e=this.boundingRect.y+this.boundingRect.height-this.axisConfig.axisLineWidth/2,r.push({type:"path",groupTexts:["top-axis","axis-line"],data:[{path:`M ${this.boundingRect.x},${e} L ${this.boundingRect.x+this.boundingRect.width},`+e,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})),this.showLabel&&r.push({type:"text",groupTexts:["top-axis","label"],data:this.getTickValues().map(e=>({text:e.toString(),x:this.getScaleValue(e),y:this.boundingRect.y+(this.showTitle?this.titleTextHeight+2*this.axisConfig.titlePadding:0)+this.axisConfig.labelPadding,fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}))}),this.showTick){let t=this.boundingRect.y;r.push({type:"path",groupTexts:["top-axis","ticks"],data:this.getTickValues().map(e=>({path:`M ${this.getScaleValue(e)},${t+this.boundingRect.height-(this.showAxisLine?this.axisConfig.axisLineWidth:0)} L ${this.getScaleValue(e)},`+(t+this.boundingRect.height-this.axisConfig.tickLength-(this.showAxisLine?this.axisConfig.axisLineWidth:0)),strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&r.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"}]}),r}getDrawableElements(){if("left"===this.axisPosition)return this.getDrawableElementsForLeftAxis();if("right"===this.axisPosition)throw Error("Drawing of right axis is not implemented");return"bottom"===this.axisPosition?this.getDrawableElementsForBottomAxis():"top"===this.axisPosition?this.getDrawableElementsForTopAxis():[]}}}),t_e=b(()=>{i6(),e(),e_e(),KCe=class extends XCe{static{mt(this,"BandAxis")}constructor(e,t,r,n,i){super(e,n,i,t),this.categories=r,this.scale=bx().domain(this.categories).range(this.getRange())}setRange(e){super.setRange(e)}recalculateScale(){this.scale=bx().domain(this.categories).range(this.getRange()).paddingInner(1).paddingOuter(0).align(.5),D.trace("BandAxis axis final categories, range: ",this.categories,this.getRange())}getTickValues(){return this.categories}getScaleValue(e){return this.scale(e)??this.getRange()[0]}}}),r_e=b(()=>{i6(),e_e(),ZCe=class extends XCe{static{mt(this,"LinearAxis")}constructor(e,t,r,n,i){super(e,n,i,t),this.domain=r,this.scale=Fx().domain(this.domain).range(this.getRange())}getTickValues(){return this.scale.ticks()}recalculateScale(){var e=[...this.domain];"left"===this.axisPosition&&e.reverse(),this.scale=Fx().domain(e).range(this.getRange())}getScaleValue(e){return this.scale(e)}}});function n_e(e,t,r,n){return n=new VCe(n),WCe(e)?new KCe(t,r,e.categories,e.title,n):new ZCe(t,r,[e.min,e.max],e.title,n)}var i_e=b(()=>{QCe(),JCe(),t_e(),r_e(),mt(n_e,"getAxis")});function a_e(e,t,r,n){return n=new VCe(n),new s_e(n,e,t,r)}var s_e,o_e,l_e,c_e=b(()=>{JCe(),s_e=class{constructor(e,t,r,n){this.textDimensionCalculator=e,this.chartConfig=t,this.chartData=r,this.chartThemeConfig=n,this.boundingRect={x:0,y:0,width:0,height:0},this.showChartTitle=!1}static{mt(this,"ChartTitle")}setBoundingBoxXY(e){this.boundingRect.x=e.x,this.boundingRect.y=e.y}calculateSpace(e){var t=this.textDimensionCalculator.getMaxDimension([this.chartData.title],this.chartConfig.titleFontSize),e=Math.max(t.width,e.width),r=t.height+2*this.chartConfig.titlePadding;return t.width<=e&&t.height<=r&&this.chartConfig.showTitle&&this.chartData.title&&(this.boundingRect.width=e,this.boundingRect.height=r,this.showChartTitle=!0),{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){var e=[];return this.showChartTitle&&e.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}]}),e}},mt(a_e,"getChartTitleComponent")}),h_e=b(()=>{i6(),o_e=class{constructor(e,t,r,n,i){this.plotData=e,this.xAxis=t,this.yAxis=r,this.orientation=n,this.plotIndex=i}static{mt(this,"LinePlot")}getDrawableElement(){var e=this.plotData.data.map(e=>[this.xAxis.getScaleValue(e[0]),this.yAxis.getScaleValue(e[1])]);return(e=("horizontal"===this.orientation?r3().y(e=>e[0]).x(e=>e[1]):r3().x(e=>e[0]).y(e=>e[1]))(e))?[{groupTexts:["plot","line-plot-"+this.plotIndex],type:"path",data:[{path:e,strokeFill:this.plotData.strokeFill,strokeWidth:this.plotData.strokeWidth}]}]:[]}}}),u_e=b(()=>{l_e=class{constructor(e,t,r,n,i,a){this.barData=e,this.boundingRect=t,this.xAxis=r,this.yAxis=n,this.orientation=i,this.plotIndex=a}static{mt(this,"BarPlot")}getDrawableElement(){let e=this.barData.data.map(e=>[this.xAxis.getScaleValue(e[0]),this.yAxis.getScaleValue(e[1])]),t=.95*Math.min(2*this.xAxis.getAxisOuterPadding(),this.xAxis.getTickDistance()),r=t/2;return"horizontal"===this.orientation?[{groupTexts:["plot","bar-plot-"+this.plotIndex],type:"rect",data:e.map(e=>({x:this.boundingRect.x,y:e[0]-r,height:t,width:e[1]-this.boundingRect.x,fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}]:[{groupTexts:["plot","bar-plot-"+this.plotIndex],type:"rect",data:e.map(e=>({x:e[0]-r,y:e[1],width:t,height:this.boundingRect.y+this.boundingRect.height-e[1],fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}]}}});function d_e(e,t,r){return new p_e(e,t,r)}var p_e,g_e,f_e,m_e=b(()=>{h_e(),u_e(),p_e=class{constructor(e,t,r){this.chartConfig=e,this.chartData=t,this.chartThemeConfig=r,this.boundingRect={x:0,y:0,width:0,height:0}}static{mt(this,"BasePlot")}setAxes(e,t){this.xAxis=e,this.yAxis=t}setBoundingBoxXY(e){this.boundingRect.x=e.x,this.boundingRect.y=e.y}calculateSpace(e){return this.boundingRect.width=e.width,this.boundingRect.height=e.height,{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){if(!this.xAxis||!this.yAxis)throw Error("Axes must be passed to render Plots");var e,t,r=[];for([e,t]of this.chartData.plots.entries())switch(t.type){case"line":var n=new o_e(t,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,e);r.push(...n.getDrawableElement());break;case"bar":n=new l_e(t,this.boundingRect,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,e),r.push(...n.getDrawableElement())}return r}},mt(d_e,"getPlotComponent")}),y_e=b(()=>{i_e(),c_e(),m_e(),QCe(),g_e=class{constructor(e,t,r,n){this.chartConfig=e,this.chartData=t,this.componentStore={title:a_e(e,t,r,n),plot:d_e(e,t,r),xAxis:n_e(t.xAxis,e.xAxis,{titleColor:r.xAxisTitleColor,labelColor:r.xAxisLabelColor,tickColor:r.xAxisTickColor,axisLineColor:r.xAxisLineColor},n),yAxis:n_e(t.yAxis,e.yAxis,{titleColor:r.yAxisTitleColor,labelColor:r.yAxisLabelColor,tickColor:r.yAxisTickColor,axisLineColor:r.yAxisLineColor},n)}}static{mt(this,"Orchestrator")}calculateVerticalSpace(){let e=this.chartConfig.width,t=this.chartConfig.height,r,n,i=Math.floor(e*this.chartConfig.plotReservedSpacePercent/100),a=Math.floor(t*this.chartConfig.plotReservedSpacePercent/100),s=this.componentStore.plot.calculateSpace({width:i,height:a});e-=s.width,n=(s=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:t-=s.height})).height,t-=s.height,this.componentStore.xAxis.setAxisPosition("bottom"),t-=this.componentStore.xAxis.calculateSpace({width:e,height:t}).height,this.componentStore.yAxis.setAxisPosition("left"),r=(s=this.componentStore.yAxis.calculateSpace({width:e,height:t})).width,0<(e-=s.width)&&(i+=e),0<t&&(a+=t),this.componentStore.plot.calculateSpace({width:i,height:a}),this.componentStore.plot.setBoundingBoxXY({x:r,y:n}),this.componentStore.xAxis.setRange([r,r+i]),this.componentStore.xAxis.setBoundingBoxXY({x:r,y:n+a}),this.componentStore.yAxis.setRange([n,n+a]),this.componentStore.yAxis.setBoundingBoxXY({x:0,y:n}),this.chartData.plots.some(e=>YCe(e))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateHorizontalSpace(){let e=this.chartConfig.width,t=this.chartConfig.height,r,n,i,a=Math.floor(e*this.chartConfig.plotReservedSpacePercent/100),s=Math.floor(t*this.chartConfig.plotReservedSpacePercent/100),o=this.componentStore.plot.calculateSpace({width:a,height:s});e-=o.width,r=(o=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:t-=o.height})).height,t-=o.height,this.componentStore.xAxis.setAxisPosition("left"),e-=(o=this.componentStore.xAxis.calculateSpace({width:e,height:t})).width,n=o.width,this.componentStore.yAxis.setAxisPosition("top"),t-=(o=this.componentStore.yAxis.calculateSpace({width:e,height:t})).height,i=r+o.height,0<e&&(a+=e),0<t&&(s+=t),this.componentStore.plot.calculateSpace({width:a,height:s}),this.componentStore.plot.setBoundingBoxXY({x:n,y:i}),this.componentStore.yAxis.setRange([n,n+a]),this.componentStore.yAxis.setBoundingBoxXY({x:n,y:r}),this.componentStore.xAxis.setRange([i,i+s]),this.componentStore.xAxis.setBoundingBoxXY({x:0,y:i}),this.chartData.plots.some(e=>YCe(e))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateSpace(){"horizontal"===this.chartConfig.chartOrientation?this.calculateHorizontalSpace():this.calculateVerticalSpace()}getDrawableElement(){this.calculateSpace();var e,t=[];this.componentStore.plot.setAxes(this.componentStore.xAxis,this.componentStore.yAxis);for(e of Object.values(this.componentStore))t.push(...e.getDrawableElements());return t}}}),v_e=b(()=>{y_e(),f_e=class{static{mt(this,"XYChartBuilder")}static build(e,t,r,n){return new g_e(e,t,r,n).getDrawableElement()}}});function x_e(){var e=Ot(),t=ar();return _C(e.xyChart,t.themeVariables.xyChart)}function b_e(){var e=ar();return _C(Yt.xyChart,e.xyChart)}function w_e(){return{yAxis:{type:"linear",title:"",min:1/0,max:-1/0},xAxis:{type:"band",title:"",categories:[]},title:"",plots:[]}}function k_e(e){var t=ar();return lc(e.trim(),t)}function T_e(e){z_e=e}function E_e(e){G_e.chartOrientation="horizontal"===e?"horizontal":"vertical"}function C_e(e){q_e.xAxis.title=k_e(e.text)}function __e(e,t){q_e.xAxis={type:"linear",title:q_e.xAxis.title,min:e,max:t},Y_e=!0}function S_e(e){q_e.xAxis={type:"band",title:q_e.xAxis.title,categories:e.map(e=>k_e(e.text))},Y_e=!0}function A_e(e){q_e.yAxis.title=k_e(e.text)}function L_e(e,t){q_e.yAxis={type:"linear",title:q_e.yAxis.title,min:e,max:t},W_e=!0}function N_e(e){var t=Math.min(...e),e=Math.max(...e),r=HCe(q_e.yAxis)?q_e.yAxis.min:1/0,n=HCe(q_e.yAxis)?q_e.yAxis.max:-1/0;q_e.yAxis={type:"linear",title:q_e.yAxis.title,min:Math.min(r,t),max:Math.max(n,e)}}function I_e(r){let e=[],t;if(0!==r.length&&(Y_e||(n=HCe(q_e.xAxis)?q_e.xAxis.min:1/0,t=HCe(q_e.xAxis)?q_e.xAxis.max:-1/0,__e(Math.min(n,1),Math.max(t,r.length))),W_e||N_e(r),WCe(q_e.xAxis)&&(e=q_e.xAxis.categories.map((e,t)=>[e,r[t]])),HCe(q_e.xAxis))){var n=q_e.xAxis.min,i=q_e.xAxis.max,a=(i-n)/(r.length-1),s=[];for(let e=n;e<=i;e+=a)s.push(""+e);e=s.map((e,t)=>[e,r[t]])}return e}function R_e(e){return j_e[0===e?0:e%j_e.length]}function M_e(e,t){t=I_e(t),q_e.plots.push({type:"line",strokeFill:R_e(F_e),strokeWidth:2,data:t}),F_e++}function D_e(e,t){t=I_e(t),q_e.plots.push({type:"bar",fill:R_e(F_e),data:t}),F_e++}function O_e(){if(0===q_e.plots.length)throw Error("No Plot to render, please provide a plot with some data");return q_e.title=wh(),f_e.build(G_e,q_e,U_e,z_e)}function P_e(){return U_e}function B_e(){return G_e}function $_e(){return q_e}var F_e,z_e,G_e,U_e,q_e,j_e,Y_e,W_e,H_e,V_e,X_e,K_e,Z_e=b(()=>{rn(),en(),Xr(),i_(),Oc(),ku(),v_e(),QCe(),F_e=0,G_e=b_e(),U_e=x_e(),q_e=w_e(),j_e=U_e.plotColorPalette.split(",").map(e=>e.trim()),W_e=Y_e=!1,mt(x_e,"getChartDefaultThemeConfig"),mt(b_e,"getChartDefaultConfig"),mt(w_e,"getChartDefaultData"),mt(k_e,"textSanitizer"),mt(T_e,"setTmpSVGG"),mt(E_e,"setOrientation"),mt(C_e,"setXAxisTitle"),mt(__e,"setXAxisRangeData"),mt(S_e,"setXAxisBand"),mt(A_e,"setYAxisTitle"),mt(L_e,"setYAxisRangeData"),mt(N_e,"setYAxisRangeFromPlotData"),mt(I_e,"transformDataWithoutCategory"),mt(R_e,"getPlotColorFromPalette"),mt(M_e,"setLineData"),mt(D_e,"setBarData"),mt(O_e,"getDrawableElem"),mt(P_e,"getChartThemeConfig"),mt(B_e,"getChartConfig"),mt($_e,"getXYChartData"),H_e=mt(function(){fh(),F_e=0,G_e=b_e(),q_e=w_e(),U_e=x_e(),j_e=U_e.plotColorPalette.split(",").map(e=>e.trim()),W_e=Y_e=!1},"clear"),V_e={getDrawableElem:O_e,clear:H_e,setAccTitle:mh,getAccTitle:yh,setDiagramTitle:bh,getDiagramTitle:wh,getAccDescription:xh,setAccDescription:vh,setOrientation:E_e,setXAxisTitle:C_e,setXAxisRangeData:__e,setXAxisBand:S_e,setYAxisTitle:A_e,setYAxisRangeData:L_e,setLineData:M_e,setBarData:D_e,setTmpSVGG:T_e,getChartThemeConfig:P_e,getChartConfig:B_e,getXYChartData:$_e}}),Q_e=b(()=>{e(),LEe(),lh(),X_e=mt((e,t,r,n)=>{let i=n.db,a=i.getChartThemeConfig(),s=i.getChartConfig(),o=i.getXYChartData().plots[0].data.map(e=>e[1]);function l(e){return"top"===e?"text-before-edge":"middle"}function c(e){return"left"===e?"start":"right"===e?"end":"middle"}function h(e){return`translate(${e.x}, ${e.y}) rotate(${e.rotation||0})`}mt(l,"getDominantBaseLine"),mt(c,"getTextAnchor"),mt(h,"getTextTransformation"),D.debug(`Rendering xychart chart +`+e);let u=kEe(t),d=u.append("g").attr("class","main"),p=d.append("rect").attr("width",s.width).attr("height",s.height).attr("class","background"),g=(Zc(u,s.height,s.width,!0),u.attr("viewBox",`0 0 ${s.width} `+s.height),p.attr("fill",a.backgroundColor),i.setTmpSVGG(u.append("g").attr("class","mermaid-tmp-group")),i.getDrawableElem()),f={};function m(t){let r=d,n="";for(var[i]of t.entries()){let e=d;0<i&&f[n]&&(e=f[n]),n+=t[i],r=(r=f[n])||(f[n]=e.append("g").attr("class",t[i]))}return r}mt(m,"getGroup");for(var y of g)if(0!==y.data.length){var v=m(y.groupTexts);switch(y.type){case"rect":if(v.selectAll("rect").data(y.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),s.showDataLabel)if("horizontal"===s.chartOrientation){let n=function(e,t){var{data:e,label:r}=e;return t*r.length*.7<=e.width-10};n,mt(n,"fitsHorizontally");var x=(b=y.data.map((e,t)=>({data:e,label:o[t].toString()})).filter(e=>0<e.data.width&&0<e.data.height)).map(e=>{let t=e.data,r=.7*t.height;for(;!n(e,r)&&0<r;)--r;return r}),x=Math.floor(Math.min(...x));v.selectAll("text").data(b).enter().append("text").attr("x",e=>e.data.x+e.data.width-10).attr("y",e=>e.data.y+e.data.height/2).attr("text-anchor","end").attr("dominant-baseline","middle").attr("fill","black").attr("font-size",x+"px").text(e=>e.label)}else{let i=function(e,t,r){var{data:e,label:n}=e,n=t*n.length*.7,i=e.x+e.width/2;return e.x<=i-n/2&&i+n/2<=e.x+e.width&&e.y+r+t<=e.y+e.height};i,mt(i,"fitsInBar");var b,x=(b=y.data.map((e,t)=>({data:e,label:o[t].toString()})).filter(e=>0<e.data.width&&0<e.data.height)).map(e=>{let{data:t,label:r}=e,n=t.width/(.7*r.length);for(;!i(e,n,10)&&0<n;)--n;return n}),w=Math.floor(Math.min(...x));v.selectAll("text").data(b).enter().append("text").attr("x",e=>e.data.x+e.data.width/2).attr("y",e=>e.data.y+10).attr("text-anchor","middle").attr("dominant-baseline","hanging").attr("fill","black").attr("font-size",w+"px").text(e=>e.label)}break;case"text":v.selectAll("text").data(y.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=>l(e.verticalPos)).attr("text-anchor",e=>c(e.horizontalPos)).attr("transform",e=>h(e)).text(e=>e.text);break;case"path":v.selectAll("path").data(y.data).enter().append("path").attr("d",e=>e.path).attr("fill",e=>e.fill||"none").attr("stroke",e=>e.strokeFill).attr("stroke-width",e=>e.strokeWidth)}}},"draw"),K_e={draw:X_e}}),J_e={};OFe(J_e,{diagram:()=>eSe});var eSe,tSe,rSe,nSe,iSe,aSe,sSe=b(()=>{jCe(),Z_e(),Q_e(),eSe={parser:UCe,db:V_e,renderer:K_e}}),oSe=b(()=>{function P(){this.yy={}}var e=mt(function(e,t,r,n){for(r=r||{},n=e.length;n--;r[e[n]]=t);return r},"o"),t=[1,3],r=[1,4],n=[1,5],i=[1,6],B=[5,6,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],a=[1,22],s=[2,7],o=[1,26],l=[1,27],c=[1,28],h=[1,29],u=[1,33],d=[1,34],p=[1,35],g=[1,36],f=[1,37],m=[1,38],y=[1,24],v=[1,31],x=[1,32],b=[1,30],w=[1,39],k=[1,40],T=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],E=[1,61],C=[89,90],$=[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],F=[27,29],z=[1,70],G=[1,71],U=[1,72],q=[1,73],j=[1,74],Y=[1,75],W=[1,76],_=[1,83],S=[1,80],H=[1,84],V=[1,85],X=[1,86],K=[1,87],Z=[1,88],Q=[1,89],J=[1,90],ee=[1,91],te=[1,92],re=[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],A=[63,64],ne=[1,101],ie=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,76,77,89,90],L=[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],N=[1,110],I=[1,106],R=[1,107],M=[1,108],D=[1,109],O=[1,111],ae=[1,116],se=[1,117],oe=[1,114],le=[1,115],t={trace:mt(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:mt(function(e,t,r,n,i,a,s){var o=a.length-1;switch(i){case 4:this.$=a[o].trim(),n.setAccTitle(this.$);break;case 5:case 6:this.$=a[o].trim(),n.setAccDescription(this.$);break;case 7:this.$=[];break;case 17:n.setDirection("TB");break;case 18:n.setDirection("BT");break;case 19:n.setDirection("RL");break;case 20:n.setDirection("LR");break;case 21:n.addRequirement(a[o-3],a[o-4]);break;case 22:n.addRequirement(a[o-5],a[o-6]),n.setClass([a[o-5]],a[o-3]);break;case 23:n.setNewReqId(a[o-2]);break;case 24:n.setNewReqText(a[o-2]);break;case 25:n.setNewReqRisk(a[o-2]);break;case 26:n.setNewReqVerifyMethod(a[o-2]);break;case 29:this.$=n.RequirementType.REQUIREMENT;break;case 30:this.$=n.RequirementType.FUNCTIONAL_REQUIREMENT;break;case 31:this.$=n.RequirementType.INTERFACE_REQUIREMENT;break;case 32:this.$=n.RequirementType.PERFORMANCE_REQUIREMENT;break;case 33:this.$=n.RequirementType.PHYSICAL_REQUIREMENT;break;case 34:this.$=n.RequirementType.DESIGN_CONSTRAINT;break;case 35:this.$=n.RiskLevel.LOW_RISK;break;case 36:this.$=n.RiskLevel.MED_RISK;break;case 37:this.$=n.RiskLevel.HIGH_RISK;break;case 38:this.$=n.VerifyType.VERIFY_ANALYSIS;break;case 39:this.$=n.VerifyType.VERIFY_DEMONSTRATION;break;case 40:this.$=n.VerifyType.VERIFY_INSPECTION;break;case 41:this.$=n.VerifyType.VERIFY_TEST;break;case 42:n.addElement(a[o-3]);break;case 43:n.addElement(a[o-5]),n.setClass([a[o-5]],a[o-3]);break;case 44:n.setNewElementType(a[o-2]);break;case 45:n.setNewElementDocRef(a[o-2]);break;case 48:n.addRelationship(a[o-2],a[o],a[o-4]);break;case 49:n.addRelationship(a[o-2],a[o-4],a[o]);break;case 50:this.$=n.Relationships.CONTAINS;break;case 51:this.$=n.Relationships.COPIES;break;case 52:this.$=n.Relationships.DERIVES;break;case 53:this.$=n.Relationships.SATISFIES;break;case 54:this.$=n.Relationships.VERIFIES;break;case 55:this.$=n.Relationships.REFINES;break;case 56:this.$=n.Relationships.TRACES;break;case 57:this.$=a[o-2],n.defineClass(a[o-1],a[o]);break;case 58:n.setClass(a[o-1],a[o]);break;case 59:n.setClass([a[o-2]],a[o]);break;case 60:case 62:this.$=[a[o]];break;case 61:case 63:this.$=a[o-2].concat([a[o]]);break;case 64:this.$=a[o-2],n.setCssStyle(a[o-1],a[o]);break;case 65:this.$=[a[o]];break;case 66:a[o-2].push(a[o]),this.$=a[o-2];break;case 68:this.$=a[o-1]+a[o]}},"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(B,[2,6]),{3:12,4:2,6:t,9:r,11:n,13:i},{1:[2,2]},{4:17,5:a,7:13,8:s,9:r,11:n,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:l,23:c,24:h,25:23,33:25,41:u,42:d,43:p,44:g,45:f,46:m,54:y,72:v,74:x,77:b,89:w,90:k},e(B,[2,4]),e(B,[2,5]),{1:[2,1]},{8:[1,41]},{4:17,5:a,7:42,8:s,9:r,11:n,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:l,23:c,24:h,25:23,33:25,41:u,42:d,43:p,44:g,45:f,46:m,54:y,72:v,74:x,77:b,89:w,90:k},{4:17,5:a,7:43,8:s,9:r,11:n,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:l,23:c,24:h,25:23,33:25,41:u,42:d,43:p,44:g,45:f,46:m,54:y,72:v,74:x,77:b,89:w,90:k},{4:17,5:a,7:44,8:s,9:r,11:n,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:l,23:c,24:h,25:23,33:25,41:u,42:d,43:p,44:g,45:f,46:m,54:y,72:v,74:x,77:b,89:w,90:k},{4:17,5:a,7:45,8:s,9:r,11:n,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:l,23:c,24:h,25:23,33:25,41:u,42:d,43:p,44:g,45:f,46:m,54:y,72:v,74:x,77:b,89:w,90:k},{4:17,5:a,7:46,8:s,9:r,11:n,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:l,23:c,24:h,25:23,33:25,41:u,42:d,43:p,44:g,45:f,46:m,54:y,72:v,74:x,77:b,89:w,90:k},{4:17,5:a,7:47,8:s,9:r,11:n,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:l,23:c,24:h,25:23,33:25,41:u,42:d,43:p,44:g,45:f,46:m,54:y,72:v,74:x,77:b,89:w,90:k},{4:17,5:a,7:48,8:s,9:r,11:n,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:l,23:c,24:h,25:23,33:25,41:u,42:d,43:p,44:g,45:f,46:m,54:y,72:v,74:x,77:b,89:w,90:k},{4:17,5:a,7:49,8:s,9:r,11:n,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:l,23:c,24:h,25:23,33:25,41:u,42:d,43:p,44:g,45:f,46:m,54:y,72:v,74:x,77:b,89:w,90:k},{4:17,5:a,7:50,8:s,9:r,11:n,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:l,23:c,24:h,25:23,33:25,41:u,42:d,43:p,44:g,45:f,46:m,54:y,72:v,74:x,77:b,89:w,90:k},{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(T,[2,17]),e(T,[2,18]),e(T,[2,19]),e(T,[2,20]),{30:60,33:62,75:E,89:w,90:k},{30:63,33:62,75:E,89:w,90:k},{30:64,33:62,75:E,89:w,90:k},e(C,[2,29]),e(C,[2,30]),e(C,[2,31]),e(C,[2,32]),e(C,[2,33]),e(C,[2,34]),e($,[2,81]),e($,[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(F,[2,79]),e(F,[2,80]),{27:[1,67],29:[1,68]},e(F,[2,85]),e(F,[2,86]),{62:69,65:z,66:G,67:U,68:q,69:j,70:Y,71:W},{62:77,65:z,66:G,67:U,68:q,69:j,70:Y,71:W},{30:78,33:62,75:E,89:w,90:k},{73:79,75:_,76:S,78:81,79:82,80:H,81:V,82:X,83:K,84:Z,85:Q,86:J,87:ee,88:te},e(re,[2,60]),e(re,[2,62]),{73:93,75:_,76:S,78:81,79:82,80:H,81:V,82:X,83:K,84:Z,85:Q,86:J,87:ee,88:te},{30:94,33:62,75:E,76:S,89:w,90:k},{5:[1,95]},{30:96,33:62,75:E,89:w,90:k},{5:[1,97]},{30:98,33:62,75:E,89:w,90:k},{63:[1,99]},e(A,[2,50]),e(A,[2,51]),e(A,[2,52]),e(A,[2,53]),e(A,[2,54]),e(A,[2,55]),e(A,[2,56]),{64:[1,100]},e(T,[2,59],{76:S}),e(T,[2,64],{76:ne}),{33:103,75:[1,102],89:w,90:k},e(ie,[2,65],{79:104,75:_,80:H,81:V,82:X,83:K,84:Z,85:Q,86:J,87:ee,88:te}),e(L,[2,67]),e(L,[2,69]),e(L,[2,70]),e(L,[2,71]),e(L,[2,72]),e(L,[2,73]),e(L,[2,74]),e(L,[2,75]),e(L,[2,76]),e(L,[2,77]),e(L,[2,78]),e(T,[2,57],{76:ne}),e(T,[2,58],{76:S}),{5:N,28:105,31:I,34:R,36:M,38:D,40:O},{27:[1,112],76:S},{5:ae,40:se,56:113,57:oe,59:le},{27:[1,118],76:S},{33:119,89:w,90:k},{33:120,89:w,90:k},{75:_,78:121,79:82,80:H,81:V,82:X,83:K,84:Z,85:Q,86:J,87:ee,88:te},e(re,[2,61]),e(re,[2,63]),e(L,[2,68]),e(T,[2,21]),{32:[1,122]},{32:[1,123]},{32:[1,124]},{32:[1,125]},{5:N,28:126,31:I,34:R,36:M,38:D,40:O},e(T,[2,28]),{5:[1,127]},e(T,[2,42]),{32:[1,128]},{32:[1,129]},{5:ae,40:se,56:130,57:oe,59:le},e(T,[2,47]),{5:[1,131]},e(T,[2,48]),e(T,[2,49]),e(ie,[2,66],{79:104,75:_,80:H,81:V,82:X,83:K,84:Z,85:Q,86:J,87:ee,88:te}),{33:132,89:w,90:k},{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(T,[2,27]),{5:N,28:145,31:I,34:R,36:M,38:D,40:O},{58:146,89:[1,147],90:[1,148]},{60:149,89:[1,150],90:[1,151]},e(T,[2,46]),{5:ae,40:se,56:152,57:oe,59:le},{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(T,[2,22]),{5:[1,157]},{5:[2,87]},{5:[2,88]},{5:[1,158]},{5:[2,89]},{5:[2,90]},e(T,[2,43]),{5:N,28:159,31:I,34:R,36:M,38:D,40:O},{5:N,28:160,31:I,34:R,36:M,38:D,40:O},{5:N,28:161,31:I,34:R,36:M,38:D,40:O},{5:N,28:162,31:I,34:R,36:M,38:D,40:O},{5:ae,40:se,56:163,57:oe,59:le},{5:ae,40:se,56:164,57:oe,59:le},e(T,[2,23]),e(T,[2,24]),e(T,[2,25]),e(T,[2,26]),e(T,[2,44]),e(T,[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:mt(function(e,t){var r;if(!t.recoverable)throw(r=new Error(e)).hash=t,r;this.trace(e)},"parseError"),parse:mt(function(e){var t,r=this,n=[0],i=[],a=[null],s=[],o=this.table,l="",c=0,h=0,u=0,d=1,p=s.slice.call(arguments,1),g=Object.create(this.lexer),f={yy:{}};for(t in this.yy)Object.prototype.hasOwnProperty.call(this.yy,t)&&(f.yy[t]=this.yy[t]);g.setInput(e,f.yy),f.yy.lexer=g,f.yy.parser=this,"u"<typeof g.yylloc&&(g.yylloc={});var m=g.yylloc,y=(s.push(m),g.options&&g.options.ranges);function v(){var e=i.pop()||g.lex()||d;return"number"!=typeof e&&(e instanceof Array&&(e=(i=e).pop()),e=r.symbols_[e]||e),e}"function"==typeof f.yy.parseError?this.parseError=f.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,mt(function(e){n.length=n.length-2*e,a.length=a.length-e,s.length=s.length-e},"popStack"),mt(v,"lex");for(var x,b,w,k,T,E,C,_={};;){if(w=n[n.length-1],"u"<typeof(k=this.defaultActions[w]||((null===x||"u"<typeof x)&&(x=v()),o[w]&&o[w][x]))||!k.length||!k[0]){var S,A=[];for(T in o[w])this.terminals_[T]&&2<T&&A.push("'"+this.terminals_[T]+"'");S=g.showPosition?"Parse error on line "+(c+1)+`: +`+g.showPosition()+` +Expecting `+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(c+1)+": Unexpected "+(x==d?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(S,{text:g.match,token:this.terminals_[x]||x,line:g.yylineno,loc:m,expected:A})}if(k[0]instanceof Array&&1<k.length)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+x);switch(k[0]){case 1:n.push(x),a.push(g.yytext),s.push(g.yylloc),n.push(k[1]),x=null,b?(x=b,b=null):(h=g.yyleng,l=g.yytext,c=g.yylineno,m=g.yylloc,0<u&&u--);break;case 2:if(E=this.productions_[k[1]][1],_.$=a[a.length-E],_._$={first_line:s[s.length-(E||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(E||1)].first_column,last_column:s[s.length-1].last_column},y&&(_._$.range=[s[s.length-(E||1)].range[0],s[s.length-1].range[1]]),typeof(C=this.performAction.apply(_,[l,h,c,f.yy,k[1],a,s].concat(p)))<"u")return C;E&&(n=n.slice(0,-1*E*2),a=a.slice(0,-1*E),s=s.slice(0,-1*E)),n.push(this.productions_[k[1]][0]),a.push(_.$),s.push(_._$),C=o[n[n.length-2]][n[n.length-1]],n.push(C);break;case 3:return!0}}return!0},"parse")},B={EOF:1,parseError:mt(function(e,t){if(!this.yy.parser)throw new Error(e);this.yy.parser.parseError(e,t)},"parseError"),setInput:mt(function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:mt(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},"input"),unput:mt(function(e){var t=e.length,r=e.split(/(?:\r\n?|\n)/g),e=(this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t,this.match.split(/(?:\r\n?|\n)/g)),n=(this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),r.length-1&&(this.yylineno-=r.length-1),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:r?(r.length===e.length?this.yylloc.first_column:0)+e[e.length-r.length].length-r[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[n[0],n[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},"unput"),more:mt(function(){return this._more=!0,this},"more"),reject:mt(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):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})},"reject"),less:mt(function(e){this.unput(this.match.slice(e))},"less"),pastInput:mt(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(20<e.length?"...":"")+e.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:mt(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(20<e.length?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:mt(function(){var e=this.pastInput(),t=new Array(e.length+1).join("-");return e+this.upcomingInput()+` +`+t+"^"},"showPosition"),test_match:mt(function(e,t){var r,n;if(this.options.backtrack_lexer&&(n={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges)&&(n.yylloc.range=this.yylloc.range.slice(0)),(r=e[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],r=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack)for(var i in n)this[i]=n[i];return!1},"test_match"),next:mt(function(){if(this.done)return this.EOF;var e,t,r,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((r=this._input.match(this.rules[i[a]]))&&(!t||r[0].length>t[0].length)){if(t=r,n=a,this.options.backtrack_lexer){if(!1!==(e=this.test_match(r,i[a])))return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?!1!==(e=this.test_match(t,i[n]))&&e:""===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:mt(function(){return this.next()||this.lex()},"lex"),begin:mt(function(e){this.conditionStack.push(e)},"begin"),popState:mt(function(){return 0<this.conditionStack.length-1?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:mt(function(){return(this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]]:this.conditions.INITIAL).rules},"_currentRules"),topState:mt(function(e){return 0<=(e=this.conditionStack.length-1-Math.abs(e||0))?this.conditionStack[e]:"INITIAL"},"topState"),pushState:mt(function(e){this.begin(e)},"pushState"),stateStackSize:mt(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:mt(function(e,t,r,n){switch(r){case 0:return"title";case 1:return this.begin("acc_title"),9;case 2:return this.popState(),"acc_title_value";case 3:return this.begin("acc_descr"),11;case 4:return this.popState(),"acc_descr_value";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:case 14: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;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;case 60:return this.begin("style"),74;case 61:return 61;case 62:return 64;case 63:return 63;case 64:this.begin("string");break;case 65:this.popState();break;case 66:return"qString";case 67:return t.yytext=t.yytext.trim(),89;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}}};t.lexer=B,mt(P,"Parser"),(tSe=new((P.prototype=t).Parser=P)).parser=tSe,rSe=tSe}),lSe=b(()=>{Tu(),e(),ku(),nSe=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=mh,this.getAccTitle=yh,this.setAccDescription=vh,this.getAccDescription=xh,this.setDiagramTitle=bh,this.getDiagramTitle=wh,this.getConfig=mt(()=>O().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{mt(this,"RequirementDB")}getDirection(){return this.direction}setDirection(e){this.direction=e}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(e,t){return this.requirements.has(e)||this.requirements.set(e,{name:e,type:t,requirementId:this.latestRequirement.requirementId,text:this.latestRequirement.text,risk:this.latestRequirement.risk,verifyMethod:this.latestRequirement.verifyMethod,cssStyles:[],classes:["default"]}),this.resetLatestRequirement(),this.requirements.get(e)}getRequirements(){return this.requirements}setNewReqId(e){void 0!==this.latestRequirement&&(this.latestRequirement.requirementId=e)}setNewReqText(e){void 0!==this.latestRequirement&&(this.latestRequirement.text=e)}setNewReqRisk(e){void 0!==this.latestRequirement&&(this.latestRequirement.risk=e)}setNewReqVerifyMethod(e){void 0!==this.latestRequirement&&(this.latestRequirement.verifyMethod=e)}addElement(e){return this.elements.has(e)||(this.elements.set(e,{name:e,type:this.latestElement.type,docRef:this.latestElement.docRef,cssStyles:[],classes:["default"]}),D.info("Added new element: ",e)),this.resetLatestElement(),this.elements.get(e)}getElements(){return this.elements}setNewElementType(e){void 0!==this.latestElement&&(this.latestElement.type=e)}setNewElementDocRef(e){void 0!==this.latestElement&&(this.latestElement.docRef=e)}addRelationship(e,t,r){this.relations.push({type:e,src:t,dst:r})}getRelationships(){return this.relations}clear(){this.relations=[],this.resetLatestRequirement(),this.requirements=new Map,this.resetLatestElement(),this.elements=new Map,this.classes=new Map,fh()}setCssStyle(e,t){for(var r of e){var n,i=this.requirements.get(r)??this.elements.get(r);if(!t||!i)return;for(n of t)n.includes(",")?i.cssStyles.push(...n.split(",")):i.cssStyles.push(n)}}setClass(e,t){for(var r of e){var n=this.requirements.get(r)??this.elements.get(r);if(n)for(var i of t)n.classes.push(i),(i=this.classes.get(i)?.styles)&&n.cssStyles.push(...i)}}defineClass(e,n){for(let t of e){let r=this.classes.get(t);void 0===r&&(r={id:t,styles:[],textStyles:[]},this.classes.set(t,r)),n&&n.forEach(function(e){var t;/color/.exec(e)&&(t=e.replace("fill","bgFill"),r.textStyles.push(t)),r.styles.push(e)}),this.requirements.forEach(e=>{e.classes.includes(t)&&e.cssStyles.push(...n.flatMap(e=>e.split(",")))}),this.elements.forEach(e=>{e.classes.includes(t)&&e.cssStyles.push(...n.flatMap(e=>e.split(",")))})}}getClasses(){return this.classes}getData(){var e,t,r,n=O(),i=[],a=[];for(e of this.requirements.values()){var s=e;s.id=e.name,s.cssStyles=e.cssStyles,s.cssClasses=e.classes.join(" "),s.shape="requirementBox",s.look=n.look,i.push(s)}for(t of this.elements.values()){var o=t;o.shape="requirementBox",o.look=n.look,o.id=t.name,o.cssStyles=t.cssStyles,o.cssClasses=t.classes.join(" "),i.push(o)}for(r of this.relations){var l=r.type===this.Relationships.CONTAINS,l={id:r.src+`-${r.dst}-0`,start:this.requirements.get(r.src)?.name??this.elements.get(r.src)?.name,end:this.requirements.get(r.dst)?.name??this.elements.get(r.dst)?.name,label:`<<${r.type}>>`,classes:"relationshipLine",style:["fill:none",l?"":"stroke-dasharray: 10,7"],labelpos:"c",thickness:"normal",type:"normal",pattern:l?"normal":"dashed",arrowTypeStart:l?"requirement_contains":"",arrowTypeEnd:l?"":"requirement_arrow",look:n.look};a.push(l)}return{nodes:i,edges:a,other:{},config:n,direction:this.getDirection()}}}}),cSe=b(()=>{iSe=mt(e=>` + + marker { + fill: ${e.relationColor}; + stroke: ${e.relationColor}; + } + + marker.cross { + stroke: ${e.lineColor}; + } + + svg { + font-family: ${e.fontFamily}; + font-size: ${e.fontSize}; + } + + .reqBox { + fill: ${e.requirementBackground}; + fill-opacity: 1.0; + stroke: ${e.requirementBorderColor}; + stroke-width: ${e.requirementBorderSize}; + } + + .reqTitle, .reqLabel{ + fill: ${e.requirementTextColor}; + } + .reqLabelBox { + fill: ${e.relationLabelBackground}; + fill-opacity: 1.0; + } + + .req-title-line { + stroke: ${e.requirementBorderColor}; + stroke-width: ${e.requirementBorderSize}; + } + .relationshipLine { + stroke: ${e.relationColor}; + stroke-width: 1; + } + .relationshipLabel { + fill: ${e.relationLabelColor}; + } + .divider { + stroke: ${e.nodeBorder}; + stroke-width: 1; + } + .label { + font-family: ${e.fontFamily}; + color: ${e.nodeTextColor||e.textColor}; + } + .label text,span { + fill: ${e.nodeTextColor||e.textColor}; + color: ${e.nodeTextColor||e.textColor}; + } + .labelBkg { + background-color: ${e.edgeLabelBackground}; + } + +`,"getStyles"),aSe=iSe}),hSe={};OFe(hSe,{draw:()=>uSe});var uSe,dSe=b(()=>{Tu(),e(),iO(),Qhe(),Jhe(),i_(),uSe=mt(async function(e,t,r,n){D.info("REF0:"),D.info("Drawing requirement diagram (unified)",t);var{securityLevel:i,state:a,layout:s}=O(),o=n.db.getData(),i=YD(t,i);o.type=n.type,o.layoutAlgorithm=Phe(s),o.nodeSpacing=a?.nodeSpacing??50,o.rankSpacing=a?.rankSpacing??50,o.markers=["requirement_contains","requirement_arrow"],o.diagramId=t,await Ohe(o,i),e_.insertTitle(i,"requirementDiagramTitleText",a?.titleTopMargin??25,n.db.getDiagramTitle()),Bhe(i,8,"requirementDiagram",a?.useMaxWidth??!0)},"draw")}),pSe={};OFe(pSe,{diagram:()=>gSe});var gSe,fSe,mSe,ySe,vSe,xSe,bSe,wSe,kSe,TSe,ESe,CSe,_Se,SSe,ASe,LSe,NSe,ISe,RSe,MSe,DSe,OSe,PSe,BSe,$Se,FSe,zSe,GSe,USe,qSe,jSe,YSe,WSe,HSe,VSe,XSe,KSe,ZSe,QSe,JSe,eAe,tAe,rAe,nAe,iAe,aAe,sAe,oAe,lAe,cAe,hAe=b(()=>{oSe(),lSe(),cSe(),dSe(),gSe={parser:rSe,get db(){return new nSe},renderer:hSe,styles:aSe}}),uAe=b(()=>{function P(){this.yy={}}var e=mt(function(e,t,r,n){for(r=r||{},n=e.length;n--;r[e[n]]=t);return r},"o"),t=[1,2],B=[1,3],$=[1,4],r=[2,4],n=[1,9],i=[1,11],a=[1,13],s=[1,14],o=[1,16],l=[1,17],c=[1,18],h=[1,24],u=[1,25],d=[1,26],p=[1,27],g=[1,28],f=[1,29],m=[1,30],y=[1,31],v=[1,32],x=[1,33],b=[1,34],w=[1,35],k=[1,36],T=[1,37],E=[1,38],C=[1,39],_=[1,41],S=[1,42],A=[1,43],L=[1,44],N=[1,45],I=[1,46],R=[1,4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,47,48,49,50,52,53,55,60,61,62,63,71],F=[2,71],M=[4,5,16,50,52,53],z=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,50,52,53,55,60,61,62,63,71],G=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,49,50,52,53,55,60,61,62,63,71],U=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,48,50,52,53,55,60,61,62,63,71],q=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,47,50,52,53,55,60,61,62,63,71],D=[69,70,71],O=[1,127],t={trace:mt(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SPACE:4,NEWLINE:5,SD:6,document:7,line:8,statement:9,box_section:10,box_line:11,participant_statement:12,create:13,box:14,restOfLine:15,end:16,signal:17,autonumber:18,NUM:19,off:20,activate:21,actor:22,deactivate:23,note_statement:24,links_statement:25,link_statement:26,properties_statement:27,details_statement:28,title:29,legacy_title:30,acc_title:31,acc_title_value:32,acc_descr:33,acc_descr_value:34,acc_descr_multiline_value:35,loop:36,rect:37,opt:38,alt:39,else_sections:40,par:41,par_sections:42,par_over:43,critical:44,option_sections:45,break:46,option:47,and:48,else:49,participant:50,AS:51,participant_actor:52,destroy:53,actor_with_config:54,note:55,placement:56,text2:57,over:58,actor_pair:59,links:60,link:61,properties:62,details:63,spaceList:64,",":65,left_of:66,right_of:67,signaltype:68,"+":69,"-":70,ACTOR:71,config_object:72,CONFIG_START:73,CONFIG_CONTENT:74,CONFIG_END:75,SOLID_OPEN_ARROW:76,DOTTED_OPEN_ARROW:77,SOLID_ARROW:78,BIDIRECTIONAL_SOLID_ARROW:79,DOTTED_ARROW:80,BIDIRECTIONAL_DOTTED_ARROW:81,SOLID_CROSS:82,DOTTED_CROSS:83,SOLID_POINT:84,DOTTED_POINT:85,TXT:86,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NEWLINE",6:"SD",13:"create",14:"box",15:"restOfLine",16:"end",18:"autonumber",19:"NUM",20:"off",21:"activate",23:"deactivate",29:"title",30:"legacy_title",31:"acc_title",32:"acc_title_value",33:"acc_descr",34:"acc_descr_value",35:"acc_descr_multiline_value",36:"loop",37:"rect",38:"opt",39:"alt",41:"par",43:"par_over",44:"critical",46:"break",47:"option",48:"and",49:"else",50:"participant",51:"AS",52:"participant_actor",53:"destroy",55:"note",58:"over",60:"links",61:"link",62:"properties",63:"details",65:",",66:"left_of",67:"right_of",69:"+",70:"-",71:"ACTOR",73:"CONFIG_START",74:"CONFIG_CONTENT",75:"CONFIG_END",76:"SOLID_OPEN_ARROW",77:"DOTTED_OPEN_ARROW",78:"SOLID_ARROW",79:"BIDIRECTIONAL_SOLID_ARROW",80:"DOTTED_ARROW",81:"BIDIRECTIONAL_DOTTED_ARROW",82:"SOLID_CROSS",83:"DOTTED_CROSS",84:"SOLID_POINT",85:"DOTTED_POINT",86:"TXT"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[10,0],[10,2],[11,2],[11,1],[11,1],[9,1],[9,2],[9,4],[9,2],[9,4],[9,3],[9,3],[9,2],[9,3],[9,3],[9,2],[9,2],[9,2],[9,2],[9,2],[9,1],[9,1],[9,2],[9,2],[9,1],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[45,1],[45,4],[42,1],[42,4],[40,1],[40,4],[12,5],[12,3],[12,5],[12,3],[12,3],[12,3],[24,4],[24,4],[25,3],[26,3],[27,3],[28,3],[64,2],[64,1],[59,3],[59,1],[56,1],[56,1],[17,5],[17,5],[17,4],[54,2],[72,3],[22,1],[68,1],[68,1],[68,1],[68,1],[68,1],[68,1],[68,1],[68,1],[68,1],[68,1],[57,1]],performAction:mt(function(e,t,r,n,i,a,s){var o=a.length-1;switch(i){case 3:return n.apply(a[o]),a[o];case 4:case 9:this.$=[];break;case 5:case 10:a[o-1].push(a[o]),this.$=a[o-1];break;case 6:case 7:case 11:case 12:this.$=a[o];break;case 8:case 13:this.$=[];break;case 15:a[o].type="createParticipant",this.$=a[o];break;case 16:a[o-1].unshift({type:"boxStart",boxData:n.parseBoxData(a[o-2])}),a[o-1].push({type:"boxEnd",boxText:a[o-2]}),this.$=a[o-1];break;case 18:this.$={type:"sequenceIndex",sequenceIndex:Number(a[o-2]),sequenceIndexStep:Number(a[o-1]),sequenceVisible:!0,signalType:n.LINETYPE.AUTONUMBER};break;case 19:this.$={type:"sequenceIndex",sequenceIndex:Number(a[o-1]),sequenceIndexStep:1,sequenceVisible:!0,signalType:n.LINETYPE.AUTONUMBER};break;case 20:this.$={type:"sequenceIndex",sequenceVisible:!1,signalType:n.LINETYPE.AUTONUMBER};break;case 21:this.$={type:"sequenceIndex",sequenceVisible:!0,signalType:n.LINETYPE.AUTONUMBER};break;case 22:this.$={type:"activeStart",signalType:n.LINETYPE.ACTIVE_START,actor:a[o-1].actor};break;case 23:this.$={type:"activeEnd",signalType:n.LINETYPE.ACTIVE_END,actor:a[o-1].actor};break;case 29:n.setDiagramTitle(a[o].substring(6)),this.$=a[o].substring(6);break;case 30:n.setDiagramTitle(a[o].substring(7)),this.$=a[o].substring(7);break;case 31:this.$=a[o].trim(),n.setAccTitle(this.$);break;case 32:case 33:this.$=a[o].trim(),n.setAccDescription(this.$);break;case 34:a[o-1].unshift({type:"loopStart",loopText:n.parseMessage(a[o-2]),signalType:n.LINETYPE.LOOP_START}),a[o-1].push({type:"loopEnd",loopText:a[o-2],signalType:n.LINETYPE.LOOP_END}),this.$=a[o-1];break;case 35:a[o-1].unshift({type:"rectStart",color:n.parseMessage(a[o-2]),signalType:n.LINETYPE.RECT_START}),a[o-1].push({type:"rectEnd",color:n.parseMessage(a[o-2]),signalType:n.LINETYPE.RECT_END}),this.$=a[o-1];break;case 36:a[o-1].unshift({type:"optStart",optText:n.parseMessage(a[o-2]),signalType:n.LINETYPE.OPT_START}),a[o-1].push({type:"optEnd",optText:n.parseMessage(a[o-2]),signalType:n.LINETYPE.OPT_END}),this.$=a[o-1];break;case 37:a[o-1].unshift({type:"altStart",altText:n.parseMessage(a[o-2]),signalType:n.LINETYPE.ALT_START}),a[o-1].push({type:"altEnd",signalType:n.LINETYPE.ALT_END}),this.$=a[o-1];break;case 38:a[o-1].unshift({type:"parStart",parText:n.parseMessage(a[o-2]),signalType:n.LINETYPE.PAR_START}),a[o-1].push({type:"parEnd",signalType:n.LINETYPE.PAR_END}),this.$=a[o-1];break;case 39:a[o-1].unshift({type:"parStart",parText:n.parseMessage(a[o-2]),signalType:n.LINETYPE.PAR_OVER_START}),a[o-1].push({type:"parEnd",signalType:n.LINETYPE.PAR_END}),this.$=a[o-1];break;case 40:a[o-1].unshift({type:"criticalStart",criticalText:n.parseMessage(a[o-2]),signalType:n.LINETYPE.CRITICAL_START}),a[o-1].push({type:"criticalEnd",signalType:n.LINETYPE.CRITICAL_END}),this.$=a[o-1];break;case 41:a[o-1].unshift({type:"breakStart",breakText:n.parseMessage(a[o-2]),signalType:n.LINETYPE.BREAK_START}),a[o-1].push({type:"breakEnd",optText:n.parseMessage(a[o-2]),signalType:n.LINETYPE.BREAK_END}),this.$=a[o-1];break;case 43:this.$=a[o-3].concat([{type:"option",optionText:n.parseMessage(a[o-1]),signalType:n.LINETYPE.CRITICAL_OPTION},a[o]]);break;case 45:this.$=a[o-3].concat([{type:"and",parText:n.parseMessage(a[o-1]),signalType:n.LINETYPE.PAR_AND},a[o]]);break;case 47:this.$=a[o-3].concat([{type:"else",altText:n.parseMessage(a[o-1]),signalType:n.LINETYPE.ALT_ELSE},a[o]]);break;case 48:a[o-3].draw="participant",a[o-3].type="addParticipant",a[o-3].description=n.parseMessage(a[o-1]),this.$=a[o-3];break;case 49:a[o-1].draw="participant",a[o-1].type="addParticipant",this.$=a[o-1];break;case 50:a[o-3].draw="actor",a[o-3].type="addParticipant",a[o-3].description=n.parseMessage(a[o-1]),this.$=a[o-3];break;case 51:a[o-1].draw="actor",a[o-1].type="addParticipant",this.$=a[o-1];break;case 52:a[o-1].type="destroyParticipant",this.$=a[o-1];break;case 53:a[o-1].draw="participant",a[o-1].type="addParticipant",this.$=a[o-1];break;case 54:this.$=[a[o-1],{type:"addNote",placement:a[o-2],actor:a[o-1].actor,text:a[o]}];break;case 55:a[o-2]=[].concat(a[o-1],a[o-1]).slice(0,2),a[o-2][0]=a[o-2][0].actor,a[o-2][1]=a[o-2][1].actor,this.$=[a[o-1],{type:"addNote",placement:n.PLACEMENT.OVER,actor:a[o-2].slice(0,2),text:a[o]}];break;case 56:this.$=[a[o-1],{type:"addLinks",actor:a[o-1].actor,text:a[o]}];break;case 57:this.$=[a[o-1],{type:"addALink",actor:a[o-1].actor,text:a[o]}];break;case 58:this.$=[a[o-1],{type:"addProperties",actor:a[o-1].actor,text:a[o]}];break;case 59:this.$=[a[o-1],{type:"addDetails",actor:a[o-1].actor,text:a[o]}];break;case 62:this.$=[a[o-2],a[o]];break;case 63:this.$=a[o];break;case 64:this.$=n.PLACEMENT.LEFTOF;break;case 65:this.$=n.PLACEMENT.RIGHTOF;break;case 66:this.$=[a[o-4],a[o-1],{type:"addMessage",from:a[o-4].actor,to:a[o-1].actor,signalType:a[o-3],msg:a[o],activate:!0},{type:"activeStart",signalType:n.LINETYPE.ACTIVE_START,actor:a[o-1].actor}];break;case 67:this.$=[a[o-4],a[o-1],{type:"addMessage",from:a[o-4].actor,to:a[o-1].actor,signalType:a[o-3],msg:a[o]},{type:"activeEnd",signalType:n.LINETYPE.ACTIVE_END,actor:a[o-4].actor}];break;case 68:this.$=[a[o-3],a[o-1],{type:"addMessage",from:a[o-3].actor,to:a[o-1].actor,signalType:a[o-2],msg:a[o]}];break;case 69:this.$={type:"addParticipant",actor:a[o-1],config:a[o]};break;case 70:this.$=a[o-1].trim();break;case 71:this.$={type:"addParticipant",actor:a[o]};break;case 72:this.$=n.LINETYPE.SOLID_OPEN;break;case 73:this.$=n.LINETYPE.DOTTED_OPEN;break;case 74:this.$=n.LINETYPE.SOLID;break;case 75:this.$=n.LINETYPE.BIDIRECTIONAL_SOLID;break;case 76:this.$=n.LINETYPE.DOTTED;break;case 77:this.$=n.LINETYPE.BIDIRECTIONAL_DOTTED;break;case 78:this.$=n.LINETYPE.SOLID_CROSS;break;case 79:this.$=n.LINETYPE.DOTTED_CROSS;break;case 80:this.$=n.LINETYPE.SOLID_POINT;break;case 81:this.$=n.LINETYPE.DOTTED_POINT;break;case 82:this.$=n.parseMessage(a[o].trim().substring(1))}},"anonymous"),table:[{3:1,4:t,5:B,6:$},{1:[3]},{3:5,4:t,5:B,6:$},{3:6,4:t,5:B,6:$},e([1,4,5,13,14,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,50,52,53,55,60,61,62,63,71],r,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:n,5:i,8:8,9:10,12:12,13:a,14:s,17:15,18:o,21:l,22:40,23:c,24:19,25:20,26:21,27:22,28:23,29:h,30:u,31:d,33:p,35:g,36:f,37:m,38:y,39:v,41:x,43:b,44:w,46:k,50:T,52:E,53:C,55:_,60:S,61:A,62:L,63:N,71:I},e(R,[2,5]),{9:47,12:12,13:a,14:s,17:15,18:o,21:l,22:40,23:c,24:19,25:20,26:21,27:22,28:23,29:h,30:u,31:d,33:p,35:g,36:f,37:m,38:y,39:v,41:x,43:b,44:w,46:k,50:T,52:E,53:C,55:_,60:S,61:A,62:L,63:N,71:I},e(R,[2,7]),e(R,[2,8]),e(R,[2,14]),{12:48,50:T,52:E,53:C},{15:[1,49]},{5:[1,50]},{5:[1,53],19:[1,51],20:[1,52]},{22:54,71:I},{22:55,71:I},{5:[1,56]},{5:[1,57]},{5:[1,58]},{5:[1,59]},{5:[1,60]},e(R,[2,29]),e(R,[2,30]),{32:[1,61]},{34:[1,62]},e(R,[2,33]),{15:[1,63]},{15:[1,64]},{15:[1,65]},{15:[1,66]},{15:[1,67]},{15:[1,68]},{15:[1,69]},{15:[1,70]},{22:71,54:72,71:[1,73]},{22:74,71:I},{22:75,71:I},{68:76,76:[1,77],77:[1,78],78:[1,79],79:[1,80],80:[1,81],81:[1,82],82:[1,83],83:[1,84],84:[1,85],85:[1,86]},{56:87,58:[1,88],66:[1,89],67:[1,90]},{22:91,71:I},{22:92,71:I},{22:93,71:I},{22:94,71:I},e([5,51,65,76,77,78,79,80,81,82,83,84,85,86],F),e(R,[2,6]),e(R,[2,15]),e(M,[2,9],{10:95}),e(R,[2,17]),{5:[1,97],19:[1,96]},{5:[1,98]},e(R,[2,21]),{5:[1,99]},{5:[1,100]},e(R,[2,24]),e(R,[2,25]),e(R,[2,26]),e(R,[2,27]),e(R,[2,28]),e(R,[2,31]),e(R,[2,32]),e(z,r,{7:101}),e(z,r,{7:102}),e(z,r,{7:103}),e(G,r,{40:104,7:105}),e(U,r,{42:106,7:107}),e(U,r,{7:107,42:108}),e(q,r,{45:109,7:110}),e(z,r,{7:111}),{5:[1,113],51:[1,112]},{5:[1,114]},e([5,51],F,{72:115,73:[1,116]}),{5:[1,118],51:[1,117]},{5:[1,119]},{22:122,69:[1,120],70:[1,121],71:I},e(D,[2,72]),e(D,[2,73]),e(D,[2,74]),e(D,[2,75]),e(D,[2,76]),e(D,[2,77]),e(D,[2,78]),e(D,[2,79]),e(D,[2,80]),e(D,[2,81]),{22:123,71:I},{22:125,59:124,71:I},{71:[2,64]},{71:[2,65]},{57:126,86:O},{57:128,86:O},{57:129,86:O},{57:130,86:O},{4:[1,133],5:[1,135],11:132,12:134,16:[1,131],50:T,52:E,53:C},{5:[1,136]},e(R,[2,19]),e(R,[2,20]),e(R,[2,22]),e(R,[2,23]),{4:n,5:i,8:8,9:10,12:12,13:a,14:s,16:[1,137],17:15,18:o,21:l,22:40,23:c,24:19,25:20,26:21,27:22,28:23,29:h,30:u,31:d,33:p,35:g,36:f,37:m,38:y,39:v,41:x,43:b,44:w,46:k,50:T,52:E,53:C,55:_,60:S,61:A,62:L,63:N,71:I},{4:n,5:i,8:8,9:10,12:12,13:a,14:s,16:[1,138],17:15,18:o,21:l,22:40,23:c,24:19,25:20,26:21,27:22,28:23,29:h,30:u,31:d,33:p,35:g,36:f,37:m,38:y,39:v,41:x,43:b,44:w,46:k,50:T,52:E,53:C,55:_,60:S,61:A,62:L,63:N,71:I},{4:n,5:i,8:8,9:10,12:12,13:a,14:s,16:[1,139],17:15,18:o,21:l,22:40,23:c,24:19,25:20,26:21,27:22,28:23,29:h,30:u,31:d,33:p,35:g,36:f,37:m,38:y,39:v,41:x,43:b,44:w,46:k,50:T,52:E,53:C,55:_,60:S,61:A,62:L,63:N,71:I},{16:[1,140]},{4:n,5:i,8:8,9:10,12:12,13:a,14:s,16:[2,46],17:15,18:o,21:l,22:40,23:c,24:19,25:20,26:21,27:22,28:23,29:h,30:u,31:d,33:p,35:g,36:f,37:m,38:y,39:v,41:x,43:b,44:w,46:k,49:[1,141],50:T,52:E,53:C,55:_,60:S,61:A,62:L,63:N,71:I},{16:[1,142]},{4:n,5:i,8:8,9:10,12:12,13:a,14:s,16:[2,44],17:15,18:o,21:l,22:40,23:c,24:19,25:20,26:21,27:22,28:23,29:h,30:u,31:d,33:p,35:g,36:f,37:m,38:y,39:v,41:x,43:b,44:w,46:k,48:[1,143],50:T,52:E,53:C,55:_,60:S,61:A,62:L,63:N,71:I},{16:[1,144]},{16:[1,145]},{4:n,5:i,8:8,9:10,12:12,13:a,14:s,16:[2,42],17:15,18:o,21:l,22:40,23:c,24:19,25:20,26:21,27:22,28:23,29:h,30:u,31:d,33:p,35:g,36:f,37:m,38:y,39:v,41:x,43:b,44:w,46:k,47:[1,146],50:T,52:E,53:C,55:_,60:S,61:A,62:L,63:N,71:I},{4:n,5:i,8:8,9:10,12:12,13:a,14:s,16:[1,147],17:15,18:o,21:l,22:40,23:c,24:19,25:20,26:21,27:22,28:23,29:h,30:u,31:d,33:p,35:g,36:f,37:m,38:y,39:v,41:x,43:b,44:w,46:k,50:T,52:E,53:C,55:_,60:S,61:A,62:L,63:N,71:I},{15:[1,148]},e(R,[2,49]),e(R,[2,53]),{5:[2,69]},{74:[1,149]},{15:[1,150]},e(R,[2,51]),e(R,[2,52]),{22:151,71:I},{22:152,71:I},{57:153,86:O},{57:154,86:O},{57:155,86:O},{65:[1,156],86:[2,63]},{5:[2,56]},{5:[2,82]},{5:[2,57]},{5:[2,58]},{5:[2,59]},e(R,[2,16]),e(M,[2,10]),{12:157,50:T,52:E,53:C},e(M,[2,12]),e(M,[2,13]),e(R,[2,18]),e(R,[2,34]),e(R,[2,35]),e(R,[2,36]),e(R,[2,37]),{15:[1,158]},e(R,[2,38]),{15:[1,159]},e(R,[2,39]),e(R,[2,40]),{15:[1,160]},e(R,[2,41]),{5:[1,161]},{75:[1,162]},{5:[1,163]},{57:164,86:O},{57:165,86:O},{5:[2,68]},{5:[2,54]},{5:[2,55]},{22:166,71:I},e(M,[2,11]),e(G,r,{7:105,40:167}),e(U,r,{7:107,42:168}),e(q,r,{7:110,45:169}),e(R,[2,48]),{5:[2,70]},e(R,[2,50]),{5:[2,66]},{5:[2,67]},{86:[2,62]},{16:[2,47]},{16:[2,45]},{16:[2,43]}],defaultActions:{5:[2,1],6:[2,2],89:[2,64],90:[2,65],115:[2,69],126:[2,56],127:[2,82],128:[2,57],129:[2,58],130:[2,59],153:[2,68],154:[2,54],155:[2,55],162:[2,70],164:[2,66],165:[2,67],166:[2,62],167:[2,47],168:[2,45],169:[2,43]},parseError:mt(function(e,t){var r;if(!t.recoverable)throw(r=new Error(e)).hash=t,r;this.trace(e)},"parseError"),parse:mt(function(e){var t,r=this,n=[0],i=[],a=[null],s=[],o=this.table,l="",c=0,h=0,u=0,d=1,p=s.slice.call(arguments,1),g=Object.create(this.lexer),f={yy:{}};for(t in this.yy)Object.prototype.hasOwnProperty.call(this.yy,t)&&(f.yy[t]=this.yy[t]);g.setInput(e,f.yy),f.yy.lexer=g,f.yy.parser=this,"u"<typeof g.yylloc&&(g.yylloc={});var m=g.yylloc,y=(s.push(m),g.options&&g.options.ranges);function v(){var e=i.pop()||g.lex()||d;return"number"!=typeof e&&(e instanceof Array&&(e=(i=e).pop()),e=r.symbols_[e]||e),e}"function"==typeof f.yy.parseError?this.parseError=f.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,mt(function(e){n.length=n.length-2*e,a.length=a.length-e,s.length=s.length-e},"popStack"),mt(v,"lex");for(var x,b,w,k,T,E,C,_={};;){if(w=n[n.length-1],"u"<typeof(k=this.defaultActions[w]||((null===x||"u"<typeof x)&&(x=v()),o[w]&&o[w][x]))||!k.length||!k[0]){var S,A=[];for(T in o[w])this.terminals_[T]&&2<T&&A.push("'"+this.terminals_[T]+"'");S=g.showPosition?"Parse error on line "+(c+1)+`: +`+g.showPosition()+` +Expecting `+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(c+1)+": Unexpected "+(x==d?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(S,{text:g.match,token:this.terminals_[x]||x,line:g.yylineno,loc:m,expected:A})}if(k[0]instanceof Array&&1<k.length)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+x);switch(k[0]){case 1:n.push(x),a.push(g.yytext),s.push(g.yylloc),n.push(k[1]),x=null,b?(x=b,b=null):(h=g.yyleng,l=g.yytext,c=g.yylineno,m=g.yylloc,0<u&&u--);break;case 2:if(E=this.productions_[k[1]][1],_.$=a[a.length-E],_._$={first_line:s[s.length-(E||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(E||1)].first_column,last_column:s[s.length-1].last_column},y&&(_._$.range=[s[s.length-(E||1)].range[0],s[s.length-1].range[1]]),typeof(C=this.performAction.apply(_,[l,h,c,f.yy,k[1],a,s].concat(p)))<"u")return C;E&&(n=n.slice(0,-1*E*2),a=a.slice(0,-1*E),s=s.slice(0,-1*E)),n.push(this.productions_[k[1]][0]),a.push(_.$),s.push(_._$),C=o[n[n.length-2]][n[n.length-1]],n.push(C);break;case 3:return!0}}return!0},"parse")},B={EOF:1,parseError:mt(function(e,t){if(!this.yy.parser)throw new Error(e);this.yy.parser.parseError(e,t)},"parseError"),setInput:mt(function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:mt(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},"input"),unput:mt(function(e){var t=e.length,r=e.split(/(?:\r\n?|\n)/g),e=(this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t,this.match.split(/(?:\r\n?|\n)/g)),n=(this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),r.length-1&&(this.yylineno-=r.length-1),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:r?(r.length===e.length?this.yylloc.first_column:0)+e[e.length-r.length].length-r[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[n[0],n[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},"unput"),more:mt(function(){return this._more=!0,this},"more"),reject:mt(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):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})},"reject"),less:mt(function(e){this.unput(this.match.slice(e))},"less"),pastInput:mt(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(20<e.length?"...":"")+e.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:mt(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(20<e.length?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:mt(function(){var e=this.pastInput(),t=new Array(e.length+1).join("-");return e+this.upcomingInput()+` +`+t+"^"},"showPosition"),test_match:mt(function(e,t){var r,n;if(this.options.backtrack_lexer&&(n={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges)&&(n.yylloc.range=this.yylloc.range.slice(0)),(r=e[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],r=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack)for(var i in n)this[i]=n[i];return!1},"test_match"),next:mt(function(){if(this.done)return this.EOF;var e,t,r,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((r=this._input.match(this.rules[i[a]]))&&(!t||r[0].length>t[0].length)){if(t=r,n=a,this.options.backtrack_lexer){if(!1!==(e=this.test_match(r,i[a])))return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?!1!==(e=this.test_match(t,i[n]))&&e:""===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:mt(function(){return this.next()||this.lex()},"lex"),begin:mt(function(e){this.conditionStack.push(e)},"begin"),popState:mt(function(){return 0<this.conditionStack.length-1?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:mt(function(){return(this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]]:this.conditions.INITIAL).rules},"_currentRules"),topState:mt(function(e){return 0<=(e=this.conditionStack.length-1-Math.abs(e||0))?this.conditionStack[e]:"INITIAL"},"topState"),pushState:mt(function(e){this.begin(e)},"pushState"),stateStackSize:mt(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:mt(function(e,t,r,n){switch(r){case 0:return 5;case 1:case 2:case 3:case 4:case 5:break;case 6:return 19;case 7:return this.begin("CONFIG"),73;case 8:return 74;case 9:return this.popState(),this.popState(),75;case 10:return t.yytext=t.yytext.trim(),71;case 11:return t.yytext=t.yytext.trim(),this.begin("ALIAS"),71;case 12:return this.begin("LINE"),14;case 13:return this.begin("ID"),50;case 14:return this.begin("ID"),52;case 15:return 13;case 16:return this.begin("ID"),53;case 17:return t.yytext=t.yytext.trim(),this.begin("ALIAS"),71;case 18:return this.popState(),this.popState(),this.begin("LINE"),51;case 19:return this.popState(),this.popState(),5;case 20:return this.begin("LINE"),36;case 21:return this.begin("LINE"),37;case 22:return this.begin("LINE"),38;case 23:return this.begin("LINE"),39;case 24:return this.begin("LINE"),49;case 25:return this.begin("LINE"),41;case 26:return this.begin("LINE"),43;case 27:return this.begin("LINE"),48;case 28:return this.begin("LINE"),44;case 29:return this.begin("LINE"),47;case 30:return this.begin("LINE"),46;case 31:return this.popState(),15;case 32:return 16;case 33:return 66;case 34:return 67;case 35:return 60;case 36:return 61;case 37:return 62;case 38:return 63;case 39:return 58;case 40:return 55;case 41:return this.begin("ID"),21;case 42:return this.begin("ID"),23;case 43:return 29;case 44:return 30;case 45:return this.begin("acc_title"),31;case 46:return this.popState(),"acc_title_value";case 47:return this.begin("acc_descr"),33;case 48:return this.popState(),"acc_descr_value";case 49:this.begin("acc_descr_multiline");break;case 50:this.popState();break;case 51:return"acc_descr_multiline_value";case 52:return 6;case 53:return 18;case 54:return 20;case 55:return 65;case 56:return 5;case 57:return t.yytext=t.yytext.trim(),71;case 58:return 78;case 59:return 79;case 60:return 80;case 61:return 81;case 62:return 76;case 63:return 77;case 64:return 82;case 65:return 83;case 66:return 84;case 67:return 85;case 68:case 69:return 86;case 70:return 69;case 71:return 70;case 72:return 5;case 73:return"INVALID"}},"anonymous"),rules:[/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[0-9]+(?=[ \n]+))/i,/^(?:@\{)/i,/^(?:[^\}]+)/i,/^(?:\})/i,/^(?:[^\<->\->:\n,;@\s]+(?=@\{))/i,/^(?:[^\<->\->:\n,;@]+?([\-]*[^\<->\->:\n,;@]+?)*?(?=((?!\n)\s)+as(?!\n)\s|[#\n;]|$))/i,/^(?:box\b)/i,/^(?:participant\b)/i,/^(?:actor\b)/i,/^(?:create\b)/i,/^(?:destroy\b)/i,/^(?:[^<\->\->:\n,;]+?([\-]*[^<\->\->:\n,;]+?)*?(?=((?!\n)\s)+as(?!\n)\s|[#\n;]|$))/i,/^(?:as\b)/i,/^(?:(?:))/i,/^(?:loop\b)/i,/^(?:rect\b)/i,/^(?:opt\b)/i,/^(?:alt\b)/i,/^(?:else\b)/i,/^(?:par\b)/i,/^(?:par_over\b)/i,/^(?:and\b)/i,/^(?:critical\b)/i,/^(?:option\b)/i,/^(?:break\b)/i,/^(?:(?:[:]?(?:no)?wrap)?[^#\n;]*)/i,/^(?:end\b)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:links\b)/i,/^(?:link\b)/i,/^(?:properties\b)/i,/^(?:details\b)/i,/^(?:over\b)/i,/^(?:note\b)/i,/^(?:activate\b)/i,/^(?:deactivate\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:title:\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:sequenceDiagram\b)/i,/^(?:autonumber\b)/i,/^(?:off\b)/i,/^(?:,)/i,/^(?:;)/i,/^(?:[^+<\->\->:\n,;]+((?!(-x|--x|-\)|--\)))[\-]*[^\+<\->\->:\n,;]+)*)/i,/^(?:->>)/i,/^(?:<<->>)/i,/^(?:-->>)/i,/^(?:<<-->>)/i,/^(?:->)/i,/^(?:-->)/i,/^(?:-[x])/i,/^(?:--[x])/i,/^(?:-[\)])/i,/^(?:--[\)])/i,/^(?::(?:(?:no)?wrap)?[^#\n;]*)/i,/^(?::)/i,/^(?:\+)/i,/^(?:-)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[50,51],inclusive:!1},acc_descr:{rules:[48],inclusive:!1},acc_title:{rules:[46],inclusive:!1},ID:{rules:[2,3,7,10,11,17],inclusive:!1},ALIAS:{rules:[2,3,18,19],inclusive:!1},LINE:{rules:[2,3,31],inclusive:!1},CONFIG:{rules:[8,9],inclusive:!1},CONFIG_DATA:{rules:[],inclusive:!1},INITIAL:{rules:[0,1,3,4,5,6,12,13,14,15,16,20,21,22,23,24,25,26,27,28,29,30,32,33,34,35,36,37,38,39,40,41,42,43,44,45,47,49,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73],inclusive:!0}}};t.lexer=B,mt(P,"Parser"),(fSe=new((P.prototype=t).Parser=P)).parser=fSe,mSe=fSe}),dAe=b(()=>{Tu(),F9(),e(),pTe(),Oc(),ku(),ySe={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},vSe={FILLED:0,OPEN:1},xSe={LEFTOF:0,RIGHTOF:1,OVER:2},bSe={ACTOR:"actor",BOUNDARY:"boundary",COLLECTIONS:"collections",CONTROL:"control",DATABASE:"database",ENTITY:"entity",PARTICIPANT:"participant",QUEUE:"queue"},wSe=class{constructor(){this.state=new hTe(()=>({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=mh,this.setAccDescription=vh,this.setDiagramTitle=bh,this.getAccTitle=yh,this.getAccDescription=xh,this.getDiagramTitle=wh,this.apply=this.apply.bind(this),this.parseBoxData=this.parseBoxData.bind(this),this.parseMessage=this.parseMessage.bind(this),this.clear(),this.setWrap(O().wrap),this.LINETYPE=ySe,this.ARROWTYPE=vSe,this.PLACEMENT=xSe}static{mt(this,"SequenceDB")}addBox(e){this.state.records.boxes.push({name:e.text,wrap:e.wrap??this.autoWrap(),fill:e.color,actorKeys:[]}),this.state.records.currentBox=this.state.records.boxes.slice(-1)[0]}addActor(e,t,r,n,i){let a=this.state.records.currentBox,s,o;if(void 0!==i&&(o=i.includes(` +`)?i+` +`:`{ +`+i+` +}`,s=$9(o,{schema:B9})),n=s?.type??n,i=this.state.records.actors.get(e)){if(this.state.records.currentBox&&i.box&&this.state.records.currentBox!==i.box)throw new Error(`A same participant should only be defined in one Box: ${i.name} can't be in '${i.box.name}' and in '${this.state.records.currentBox.name}' at the same time.`);if(a=i.box||this.state.records.currentBox,i.box=a,i&&t===i.name&&null==r)return}null==r?.text&&(r={text:t,type:n}),null!=n&&null!=r.text||(r={text:t,type:n}),this.state.records.actors.set(e,{box:a,name:t,description:r.text,wrap:r.wrap??this.autoWrap(),prevActor:this.state.records.prevActor,links:{},properties:{},actorCnt:null,rectData:null,type:n??"participant"}),this.state.records.prevActor&&(i=this.state.records.actors.get(this.state.records.prevActor))&&(i.nextActor=e),this.state.records.currentBox&&this.state.records.currentBox.actorKeys.push(e),this.state.records.prevActor=e}activationCount(e){let t,r=0;if(!e)return 0;for(t=0;t<this.state.records.messages.length;t++)this.state.records.messages[t].type===this.LINETYPE.ACTIVE_START&&this.state.records.messages[t].from===e&&r++,this.state.records.messages[t].type===this.LINETYPE.ACTIVE_END&&this.state.records.messages[t].from===e&&r--;return r}addMessage(e,t,r,n){this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:e,to:t,message:r.text,wrap:r.wrap??this.autoWrap(),answer:n})}addSignal(e,t,r,n,i=!1){var a;if(n===this.LINETYPE.ACTIVE_END&&this.activationCount(e??"")<1)throw(a=new Error("Trying to inactivate an inactive participant ("+e+")")).hash={text:"->>-",token:"->>-",line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["'ACTIVE_PARTICIPANT'"]},a;return this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:e,to:t,message:r?.text??"",wrap:r?.wrap??this.autoWrap(),type:n,activate:i}),!0}hasAtLeastOneBox(){return 0<this.state.records.boxes.length}hasAtLeastOneBoxWithTitle(){return this.state.records.boxes.some(e=>e.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(e){return this.state.records.actors.get(e)}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(e){this.state.records.wrapEnabled=e}extractWrap(e){if(void 0===e)return{};e=e.trim();var t=null!==/^:?wrap:/.exec(e)||null===/^:?nowrap:/.exec(e)&&void 0;return{cleanedText:(void 0===t?e:e.replace(/^:?(?:no)?wrap:/,"")).trim(),wrap:t}}autoWrap(){return void 0!==this.state.records.wrapEnabled?this.state.records.wrapEnabled:O().sequence?.wrap??!1}clear(){this.state.reset(),fh()}parseMessage(e){var e=e.trim(),{wrap:e,cleanedText:t}=this.extractWrap(e),t={text:t,wrap:e};return D.debug("parseMessage: "+JSON.stringify(t)),t}parseBoxData(e){let t=/^((?:rgba?|hsla?)\s*\(.*\)|\w*)(.*)$/.exec(e),r=t?.[1]?t[1].trim():"transparent",n=t?.[2]?t[2].trim():void 0;window?.CSS?window.CSS.supports("color",r)||(r="transparent",n=e.trim()):((i=(new Option).style).color=r,i.color!==r&&(r="transparent",n=e.trim()));var{wrap:i,cleanedText:e}=this.extractWrap(n);return{text:e?lc(e,O()):void 0,color:r,wrap:i}}addNote(e,t,r){var n={actor:e,placement:t,message:r.text,wrap:r.wrap??this.autoWrap()},e=[].concat(e,e);this.state.records.notes.push(n),this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:e[0],to:e[1],message:r.text,wrap:r.wrap??this.autoWrap(),type:this.LINETYPE.NOTE,placement:t})}addLinks(t,r){t=this.getActor(t);try{let e=lc(r.text,O());e=(e=e.replace(/=/g,"=")).replace(/&/g,"&");var n=JSON.parse(e);this.insertLinks(t,n)}catch(e){D.error("error while parsing actor link text",e)}}addALink(a,s){a=this.getActor(a);try{let e={},t=lc(s.text,O()),r=t.indexOf("@"),n=(t=(t=t.replace(/=/g,"=")).replace(/&/g,"&")).slice(0,r-1).trim(),i=t.slice(r+1).trim();e[n]=i,this.insertLinks(a,e)}catch(e){D.error("error while parsing actor link text",e)}}insertLinks(e,t){if(null==e.links)e.links=t;else for(var r in t)e.links[r]=t[r]}addProperties(e,t){e=this.getActor(e);try{var r=lc(t.text,O()),n=JSON.parse(r);this.insertProperties(e,n)}catch(e){D.error("error while parsing actor properties text",e)}}insertProperties(e,t){if(null==e.properties)e.properties=t;else for(var r in t)e.properties[r]=t[r]}boxEnd(){this.state.records.currentBox=void 0}addDetails(e,t){e=this.getActor(e),t=document.getElementById(t.text);try{var r=t.innerHTML,n=JSON.parse(r);n.properties&&this.insertProperties(e,n.properties),n.links&&this.insertLinks(e,n.links)}catch(e){D.error("error while parsing actor details text",e)}}getActorProperty(e,t){if(void 0!==e?.properties)return e.properties[t]}apply(e){if(Array.isArray(e))e.forEach(e=>{this.apply(e)});else switch(e.type){case"sequenceIndex":this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:void 0,to:void 0,message:{start:e.sequenceIndex,step:e.sequenceIndexStep,visible:e.sequenceVisible},wrap:!1,type:e.signalType});break;case"addParticipant":this.addActor(e.actor,e.actor,e.description,e.draw,e.config);break;case"createParticipant":if(this.state.records.actors.has(e.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=e.actor,this.addActor(e.actor,e.actor,e.description,e.draw,e.config),this.state.records.createdActors.set(e.actor,this.state.records.messages.length);break;case"destroyParticipant":this.state.records.lastDestroyed=e.actor,this.state.records.destroyedActors.set(e.actor,this.state.records.messages.length);break;case"activeStart":case"activeEnd":this.addSignal(e.actor,void 0,void 0,e.signalType);break;case"addNote":this.addNote(e.actor,e.placement,e.text);break;case"addLinks":this.addLinks(e.actor,e.text);break;case"addALink":this.addALink(e.actor,e.text);break;case"addProperties":this.addProperties(e.actor,e.text);break;case"addDetails":this.addDetails(e.actor,e.text);break;case"addMessage":if(this.state.records.lastCreated){if(e.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(e.to!==this.state.records.lastDestroyed&&e.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(e.from,e.to,e.msg,e.signalType,e.activate);break;case"boxStart":this.addBox(e.boxData);break;case"boxEnd":this.boxEnd();break;case"loopStart":this.addSignal(void 0,void 0,e.loopText,e.signalType);break;case"loopEnd":this.addSignal(void 0,void 0,void 0,e.signalType);break;case"rectStart":this.addSignal(void 0,void 0,e.color,e.signalType);break;case"rectEnd":this.addSignal(void 0,void 0,void 0,e.signalType);break;case"optStart":this.addSignal(void 0,void 0,e.optText,e.signalType);break;case"optEnd":this.addSignal(void 0,void 0,void 0,e.signalType);break;case"altStart":case"else":this.addSignal(void 0,void 0,e.altText,e.signalType);break;case"altEnd":this.addSignal(void 0,void 0,void 0,e.signalType);break;case"setAccTitle":mh(e.text);break;case"parStart":case"and":this.addSignal(void 0,void 0,e.parText,e.signalType);break;case"parEnd":this.addSignal(void 0,void 0,void 0,e.signalType);break;case"criticalStart":this.addSignal(void 0,void 0,e.criticalText,e.signalType);break;case"option":this.addSignal(void 0,void 0,e.optionText,e.signalType);break;case"criticalEnd":this.addSignal(void 0,void 0,void 0,e.signalType);break;case"breakStart":this.addSignal(void 0,void 0,e.breakText,e.signalType);break;case"breakEnd":this.addSignal(void 0,void 0,void 0,e.signalType)}}getConfig(){return O().sequence}}}),pAe=b(()=>{kSe=mt(e=>`.actor { + stroke: ${e.actorBorder}; + fill: ${e.actorBkg}; + } + + 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}; + } + + #arrowhead path { + fill: ${e.signalColor}; + stroke: ${e.signalColor}; + } + + .sequenceNumber { + fill: ${e.sequenceNumberColor}; + } + + #sequencenumber { + fill: ${e.signalColor}; + } + + #crosshead path { + fill: ${e.signalColor}; + stroke: ${e.signalColor}; + } + + .messageText { + fill: ${e.signalTextColor}; + stroke: none; + } + + .labelBox { + stroke: ${e.labelBoxBorderColor}; + fill: ${e.labelBoxBkgColor}; + } + + .labelText, .labelText > tspan { + fill: ${e.labelTextColor}; + stroke: none; + } + + .loopText, .loopText > tspan { + fill: ${e.loopTextColor}; + stroke: none; + } + + .loopLine { + stroke-width: 2px; + stroke-dasharray: 2, 2; + stroke: ${e.labelBoxBorderColor}; + fill: ${e.labelBoxBorderColor}; + } + + .note { + //stroke: #decc93; + stroke: ${e.noteBorderColor}; + fill: ${e.noteBkgColor}; + } + + .noteText, .noteText > tspan { + fill: ${e.noteTextColor}; + stroke: none; + } + + .activation0 { + fill: ${e.activationBkgColor}; + stroke: ${e.activationBorderColor}; + } + + .activation1 { + fill: ${e.activationBkgColor}; + stroke: ${e.activationBorderColor}; + } + + .activation2 { + fill: ${e.activationBkgColor}; + stroke: ${e.activationBorderColor}; + } + + .actorPopupMenu { + position: absolute; + } + + .actorPopupMenuPanel { + position: absolute; + fill: ${e.actorBkg}; + box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2); + filter: drop-shadow(3px 5px 2px rgb(0 0 0 / 0.4)); +} + .actor-man line { + stroke: ${e.actorBorder}; + fill: ${e.actorBkg}; + } + .actor-man circle, line { + stroke: ${e.actorBorder}; + fill: ${e.actorBkg}; + stroke-width: 2px; + } + +`,"getStyles"),TSe=kSe}),gAe=b(()=>{function t(e,t,r,n,i,a,s){g(t.append("text").attr("x",r).attr("y",n).style("text-anchor","start").text(e),s)}function l(e,t,r,n,i,a,s,o){var{actorFontSize:l,actorFontFamily:c,actorFontWeight:h}=o,u=e.split(L.lineBreakRegex);for(let e=0;e<u.length;e++){var d=e*l-l*(u.length-1)/2,p=t.append("text").attr("x",r).attr("y",n).style("text-anchor","start").style("font-size",l).style("font-weight",h).style("font-family",c);p.append("tspan").attr("x",r).attr("dy",d).text(u[e]),p.attr("y",n+a/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),g(p,s)}}function r(e,t,r,n,i,a,s,o){(i=(t=t.append("switch")).append("foreignObject").attr("x",r).attr("y",n).attr("width",i).attr("height",a).append("xhtml:div").style("display","table").style("height","100%").style("width","100%")).append("div").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(e),l(e,t,r,n,0,a,s,o),g(i,s)}function g(e,t){for(var r in t)t.hasOwnProperty(r)&&e.attr(r,t[r])}function n(e,t,r,n,i,a,s){f(t.append("text").attr("x",r+i/2).attr("y",n+a/2+5).style("text-anchor","middle").text(e),s)}function c(e,t,r,n,i,a,s,o){var{actorFontSize:o,actorFontFamily:l,actorFontWeight:c}=o,[h,u]=JC(o),d=e.split(L.lineBreakRegex);for(let e=0;e<d.length;e++){var p=e*h-h*(d.length-1)/2,g=t.append("text").attr("x",r+i/2).attr("y",n).style("text-anchor","middle").style("font-size",u).style("font-weight",c).style("font-family",l);g.append("tspan").attr("x",r+i/2).attr("dy",p).text(d[e]),g.attr("y",n+a/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),f(g,s)}}function i(e,t,r,n,i,a,s,o){var l=(t=t.append("switch")).append("foreignObject").attr("x",r).attr("y",n).attr("width",i).attr("height",a).append("xhtml:div").style("display","table").style("height","100%").style("width","100%");l.append("div").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(e),c(e,t,r,n,i,a,s,o),f(l,s)}async function a(e,t,r,n,i,a,s,o){var l=await Cc(e,ar());(l=(t=t.append("switch")).append("foreignObject").attr("x",r+i/2-l.width/2).attr("y",n+a/2-l.height/2).attr("width",l.width).attr("height",l.height).append("xhtml:div").style("height","100%").style("width","100%")).append("div").style("text-align","center").style("vertical-align","middle").html(await Sc(e,ar())),c(e,t,r,n,i,a,s,o),f(l,s)}function f(e,t){for(var r in t)t.hasOwnProperty(r)&&e.attr(r,t[r])}ESe=q(s6(),1),rn(),i_(),Oc(),o6(),CSe=36,_Se="actor-top",SSe="actor-bottom",ASe="actor-box",LSe="actor-man",NSe=mt(function(e,t){return Ew(e,t)},"drawRect"),ISe=mt(function(e,t,r,n,i){if(null==t.links||0===Object.keys(t.links).length)return{height:0,width:0};var a=t.links,s=t.actorCnt,o=t.rectData,t="none",l=(i&&(t="block !important"),e.append("g")),i=(l.attr("id","actor"+s+"_popup"),l.attr("class","actorPopupMenu"),l.attr("display",t),""),c=(void 0!==o.class&&(i=" "+o.class),o.width>r?o.width:r);if((e=l.append("rect")).attr("class","actorPopupMenuPanel"+i),e.attr("x",o.x),e.attr("y",o.height),e.attr("fill",o.fill),e.attr("stroke",o.stroke),e.attr("width",c),e.attr("height",o.height),e.attr("rx",o.rx),e.attr("ry",o.ry),null!=a){var h,u=20;for(h in a){var d=l.append("a"),p=(0,ESe.sanitizeUrl)(a[h]);d.attr("xlink:href",p),d.attr("target","_blank"),lAe(n)(h,d,o.x+10,o.height+u,c,20,{class:"actor"},n),u+=30}}return e.attr("height",u),{height:o.height+u,width:c}},"drawPopup"),RSe=mt(function(e){return"var pu = document.getElementById('"+e+"'); if (pu != null) { pu.style.display = pu.style.display == 'block' ? 'none' : 'block'; }"},"popupMenuToggle"),MSe=mt(async function(n,i,a=null){var s=n.append("foreignObject"),o=await Sc(i.text,ar()),o=s.append("xhtml:div").attr("style","width: fit-content;").attr("xmlns","http://www.w3.org/1999/xhtml").html(o).node().getBoundingClientRect();if(s.attr("height",Math.round(o.height)).attr("width",Math.round(o.width)),"noteText"===i.class)(n=n.node().firstChild).setAttribute("height",o.height+2*i.textMargin),n=n.getBBox(),s.attr("x",Math.round(n.x+n.width/2-o.width/2)).attr("y",Math.round(n.y+n.height/2-o.height/2));else if(a){let{startx:e,stopx:t,starty:r}=a;e>t&&(n=e,e=t,t=n),s.attr("x",Math.round(e+Math.abs(e-t)/2-o.width/2)),"loopText"===i.class?s.attr("y",Math.round(r)):s.attr("y",Math.round(r-o.height))}return[s]},"drawKatex"),DSe=mt(function(e,t){let r=0,n=0,i=t.text.split(L.lineBreakRegex),[a,s]=JC(t.fontSize),o=[],l=0,c=mt(()=>t.y,"yfunc");if(void 0!==t.valign&&void 0!==t.textMargin&&0<t.textMargin)switch(t.valign){case"top":case"start":c=mt(()=>Math.round(t.y+t.textMargin),"yfunc");break;case"middle":case"center":c=mt(()=>Math.round(t.y+(r+n+t.textMargin)/2),"yfunc");break;case"bottom":case"end":c=mt(()=>Math.round(t.y+(r+n+2*t.textMargin)-t.textMargin),"yfunc")}if(void 0!==t.anchor&&void 0!==t.textMargin&&void 0!==t.width)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"}for(var[h,u]of i.entries()){void 0!==t.textMargin&&0===t.textMargin&&void 0!==a&&(l=h*a),(h=e.append("text")).attr("x",t.x),h.attr("y",c()),void 0!==t.anchor&&h.attr("text-anchor",t.anchor).attr("dominant-baseline",t.dominantBaseline).attr("alignment-baseline",t.alignmentBaseline),void 0!==t.fontFamily&&h.style("font-family",t.fontFamily),void 0!==s&&h.style("font-size",s),void 0!==t.fontWeight&&h.style("font-weight",t.fontWeight),void 0!==t.fill&&h.attr("fill",t.fill),void 0!==t.class&&h.attr("class",t.class),void 0!==t.dy?h.attr("dy",t.dy):0!==l&&h.attr("dy",l);var d,u=u||NC;(t.tspan?((d=h.append("tspan")).attr("x",t.x),void 0!==t.fill&&d.attr("fill",t.fill),d):h).text(u),void 0!==t.valign&&void 0!==t.textMargin&&0<t.textMargin&&(n+=(h._groups||h)[0][0].getBBox().height,r=n),o.push(h)}return o},"drawText"),OSe=mt(function(e,t){function r(e,t,r,n,i){return e+","+t+" "+(e+r)+","+t+" "+(e+r)+","+(t+n-i)+" "+(e+r-1.2*i)+","+(t+n)+" "+e+","+(t+n)}mt(r,"genPoints");var 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,DSe(e,t),n},"drawLabel"),PSe=-1,BSe=mt((r,n,e,i)=>{r.select&&e.forEach(e=>{var e=n.get(e),t=r.select("#actor"+e.actorCnt);!i.mirrorActors&&e.stopy?t.attr("y2",e.stopy+e.height/2):i.mirrorActors&&t.attr("y2",e.stopy)})},"fixLifeLineHeights"),$Se=mt(function(e,t,r,n){var i=n?t.stopy:t.starty,a=t.x+t.width/2,s=i+t.height,o=e=e.append("g").lower(),s=(n||(PSe++,Object.keys(t.links||{}).length&&!r.forceMenus&&o.attr("onclick",RSe(`actor${PSe}_popup`)).attr("cursor","pointer"),o.append("line").attr("id","actor"+PSe).attr("x1",a).attr("y1",s).attr("x2",a).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",t.name),o=e.append("g"),t.actorCnt=PSe,null!=t.links&&o.attr("id","root-"+PSe)),Lw()),a="actor",e=(t.properties?.class?a=t.properties.class:s.fill="#eaeaea",a+=n?" "+SSe:" "+_Se,s.x=t.x,s.y=i,s.width=t.width,s.height=t.height,s.class=a,s.rx=3,s.ry=3,s.name=t.name,NSe(o,s));t.rectData=s,t.properties?.icon&&("@"===(n=t.properties.icon.trim()).charAt(0)?Aw(o,s.x+s.width-20,s.y+10,n.substr(1)):Sw(o,s.x+s.width-20,s.y+10,n)),oAe(r,Ec(t.description))(t.description,o,s.x,s.y,s.width,s.height,{class:"actor "+ASe},r);let l=t.height;return e.node&&(i=e.node().getBBox(),t.height=i.height,l=i.height),l},"drawActorTypeParticipant"),FSe=mt(function(e,t,r,n){var i=n?t.stopy:t.starty,a=t.x+t.width/2,s=i+t.height,o=e=e.append("g").lower(),s=(n||(PSe++,Object.keys(t.links||{}).length&&!r.forceMenus&&o.attr("onclick",RSe(`actor${PSe}_popup`)).attr("cursor","pointer"),o.append("line").attr("id","actor"+PSe).attr("x1",a).attr("y1",s).attr("x2",a).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",t.name),o=e.append("g"),t.actorCnt=PSe,null!=t.links&&o.attr("id","root-"+PSe)),Lw()),a="actor",e=(t.properties?.class?a=t.properties.class:s.fill="#eaeaea",a+=n?" "+SSe:" "+_Se,s.x=t.x,s.y=i,s.width=t.width,s.height=t.height,s.class=a,s.name=t.name,{...s,x:s.x+-6,y:s.y+6,class:"actor"}),n=NSe(o,s);NSe(o,e),t.rectData=s,t.properties?.icon&&("@"===(i=t.properties.icon.trim()).charAt(0)?Aw(o,s.x+s.width-20,s.y+10,i.substr(1)):Sw(o,s.x+s.width-20,s.y+10,i)),oAe(r,Ec(t.description))(t.description,o,s.x-6,s.y+6,s.width,s.height,{class:"actor "+ASe},r);let l=t.height;return n.node&&(a=n.node().getBBox(),t.height=a.height,l=a.height),l},"drawActorTypeCollections"),zSe=mt(function(e,t,r,n){let i=n?t.stopy:t.starty,a=t.x+t.width/2,s=i+t.height,o=e.append("g").lower(),l=o,c=(n||(PSe++,Object.keys(t.links||{}).length&&!r.forceMenus&&l.attr("onclick",RSe(`actor${PSe}_popup`)).attr("cursor","pointer"),l.append("line").attr("id","actor"+PSe).attr("x1",a).attr("y1",s).attr("x2",a).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",t.name),l=o.append("g"),t.actorCnt=PSe,null!=t.links&&l.attr("id","root-"+PSe)),Lw()),h="actor";t.properties?.class?h=t.properties.class:c.fill="#eaeaea",h+=n?" "+SSe:" "+_Se,c.x=t.x,c.y=i,c.width=t.width,c.height=t.height,c.class=h,c.name=t.name;var n=(e=c.height/2)/(2.5+c.height/50),u=l.append("g"),d=l.append("g");u.append("path").attr("d",`M ${c.x},${c.y+e} + a ${n},${e} 0 0 0 0,${c.height} + h ${c.width-2*n} + a ${n},${e} 0 0 0 0,-${c.height} + Z + `).attr("class",h),d.append("path").attr("d",`M ${c.x},${c.y+e} + a ${n},${e} 0 0 0 0,`+c.height).attr("stroke","#666").attr("stroke-width","1px").attr("class",h),u.attr("transform",`translate(${n}, ${-c.height/2})`),d.attr("transform",`translate(${c.width-n}, ${-c.height/2})`),t.rectData=c,t.properties?.icon&&(e=t.properties.icon.trim(),d=c.x+c.width-20,n=c.y+10,"@"===e.charAt(0)?Aw(l,d,n,e.substr(1)):Sw(l,d,n,e)),oAe(r,Ec(t.description))(t.description,l,c.x,c.y,c.width,c.height,{class:"actor "+ASe},r);let p=t.height,g=u.select("path:last-child");return g.node()&&(d=g.node().getBBox(),t.height=d.height,p=d.height),p},"drawActorTypeQueue"),GSe=mt(function(e,t,r,n){var i=n?t.stopy:t.starty,a=t.x+t.width/2,s=i+75,o=e.append("g").lower(),l=(n||(PSe++,o.append("line").attr("id","actor"+PSe).attr("x1",a).attr("y1",s).attr("x2",a).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",t.name),t.actorCnt=PSe),e.append("g")),c=LSe;return l.attr("class",c+=n?" "+SSe:" "+_Se),l.attr("name",t.name),(o=Lw()).x=t.x,o.y=i,o.fill="#eaeaea",o.width=t.width,o.height=t.height,o.class="actor",s=t.x+t.width/2,a=i+30,l.append("defs").append("marker").attr("id","filled-head-control").attr("refX",11).attr("refY",5.8).attr("markerWidth",20).attr("markerHeight",28).attr("orient","172.5").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"),l.append("circle").attr("cx",s).attr("cy",a).attr("r",18).attr("fill","#eaeaf7").attr("stroke","#666").attr("stroke-width",1.2),l.append("line").attr("marker-end","url(#filled-head-control)").attr("transform",`translate(${s}, ${a-18})`),e=l.node().getBBox(),t.height=e.height+2*(r?.sequence?.labelBoxHeight??0),oAe(r,Ec(t.description))(t.description,l,o.x,o.y+18+(n?5:10),o.width,o.height,{class:"actor "+LSe},r),t.height},"drawActorTypeControl"),USe=mt(function(e,t,r,n){var i=n?t.stopy:t.starty,a=t.x+t.width/2,s=i+75,o=e.append("g").lower(),l=e.append("g"),c=LSe,c=(l.attr("class",c+=n?" "+SSe:" "+_Se),l.attr("name",t.name),(e=Lw()).x=t.x,e.y=i,e.fill="#eaeaea",e.width=t.width,e.height=t.height,e.class="actor",t.x+t.width/2),h=i+(n?10:25),c=(l.append("circle").attr("cx",c).attr("cy",h).attr("r",18).attr("width",t.width).attr("height",t.height),l.append("line").attr("x1",c-18).attr("x2",c+18).attr("y1",h+18).attr("y2",h+18).attr("stroke","#333").attr("stroke-width",2),l.node().getBBox());return t.height=c.height+(r?.sequence?.labelBoxHeight??0),n||(PSe++,o.append("line").attr("id","actor"+PSe).attr("x1",a).attr("y1",s).attr("x2",a).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",t.name),t.actorCnt=PSe),oAe(r,Ec(t.description))(t.description,l,e.x,e.y+(n?(h-i+18-5)/2:(h+18-i)/2),e.width,e.height,{class:"actor "+LSe},r),l.attr("transform","translate(0, 9)"),t.height},"drawActorTypeEntity"),qSe=mt(function(e,t,r,n){let i=n?t.stopy:t.starty,a=t.x+t.width/2,s=i+t.height+2*r.boxTextMargin,o=e.append("g").lower(),l=o,c=(n||(PSe++,Object.keys(t.links||{}).length&&!r.forceMenus&&l.attr("onclick",RSe(`actor${PSe}_popup`)).attr("cursor","pointer"),l.append("line").attr("id","actor"+PSe).attr("x1",a).attr("y1",s).attr("x2",a).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",t.name),l=o.append("g"),t.actorCnt=PSe,null!=t.links&&l.attr("id","root-"+PSe)),Lw()),h="actor";t.properties?.class?h=t.properties.class:c.fill="#eaeaea",h+=n?" "+SSe:" "+_Se,c.x=t.x,c.y=i,c.width=t.width,c.height=t.height,c.class=h,c.name=t.name,c.x=t.x,c.y=i;var e=c.width/4,u=c.width/4,d=(g=e/2)/(2.5+e/50),p=l.append("g"),g=` + M ${c.x},${c.y+d} + a ${g},${d} 0 0 0 ${e},0 + a ${g},${d} 0 0 0 -${e},0 + l 0,${u-2*d} + a ${g},${d} 0 0 0 ${e},0 + l 0,-${u-2*d} +`;return p.append("path").attr("d",g).attr("fill","#eaeaea").attr("stroke","#000").attr("stroke-width",1).attr("class",h),n?p.attr("transform",`translate(${1.5*e}, ${c.height/4-2*d})`):p.attr("transform",`translate(${1.5*e}, ${(c.height+d)/4})`),t.rectData=c,oAe(r,Ec(t.description))(t.description,l,c.x,c.y+(n?(c.height+u)/4:(c.height+d)/2),c.width,c.height,{class:"actor "+ASe},r),(g=p.select("path:last-child")).node()&&(e=g.node().getBBox(),t.height=e.height+(r.sequence.labelBoxHeight??0)),t.height},"drawActorTypeDatabase"),jSe=mt(function(e,t,r,n){var i=n?t.stopy:t.starty,a=t.x+t.width/2,s=i+80,o=e.append("g").lower(),a=(n||(PSe++,o.append("line").attr("id","actor"+PSe).attr("x1",a).attr("y1",s).attr("x2",a).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",t.name),t.actorCnt=PSe),e.append("g")),e=LSe;return a.attr("class",e+=n?" "+SSe:" "+_Se),a.attr("name",t.name),(o=Lw()).x=t.x,o.y=i,o.fill="#eaeaea",o.width=t.width,o.height=t.height,o.class="actor",a.append("line").attr("id","actor-man-torso"+PSe).attr("x1",t.x+t.width/2-75).attr("y1",i+10).attr("x2",t.x+t.width/2-15).attr("y2",i+10),a.append("line").attr("id","actor-man-arms"+PSe).attr("x1",t.x+t.width/2-75).attr("y1",i+0).attr("x2",t.x+t.width/2-75).attr("y2",i+20),a.append("circle").attr("cx",t.x+t.width/2).attr("cy",i+10).attr("r",30),s=a.node().getBBox(),t.height=s.height+(r.sequence.labelBoxHeight??0),oAe(r,Ec(t.description))(t.description,a,o.x,o.y+(n?11:18),o.width,o.height,{class:"actor "+LSe},r),a.attr("transform","translate(0,22)"),t.height},"drawActorTypeBoundary"),YSe=mt(function(e,t,r,n){var i=n?t.stopy:t.starty,a=t.x+t.width/2,s=i+80,o=e.append("g").lower(),l=(n||(PSe++,o.append("line").attr("id","actor"+PSe).attr("x1",a).attr("y1",s).attr("x2",a).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",t.name),t.actorCnt=PSe),e.append("g")),c=LSe;return l.attr("class",c+=n?" "+SSe:" "+_Se),l.attr("name",t.name),(o=Lw()).x=t.x,o.y=i,o.fill="#eaeaea",o.width=t.width,o.height=t.height,o.class="actor",o.rx=3,o.ry=3,l.append("line").attr("id","actor-man-torso"+PSe).attr("x1",a).attr("y1",i+25).attr("x2",a).attr("y2",i+45),l.append("line").attr("id","actor-man-arms"+PSe).attr("x1",a-CSe/2).attr("y1",i+33).attr("x2",a+CSe/2).attr("y2",i+33),l.append("line").attr("x1",a-CSe/2).attr("y1",i+60).attr("x2",a).attr("y2",i+45),l.append("line").attr("x1",a).attr("y1",i+45).attr("x2",a+CSe/2-2).attr("y2",i+60),(s=l.append("circle")).attr("cx",t.x+t.width/2),s.attr("cy",i+10),s.attr("r",15),s.attr("width",t.width),s.attr("height",t.height),e=l.node().getBBox(),t.height=e.height,oAe(r,Ec(t.description))(t.description,l,o.x,o.y+35,o.width,o.height,{class:"actor "+LSe},r),t.height},"drawActorTypeActor"),WSe=mt(async function(e,t,r,n){switch(t.type){case"actor":return YSe(e,t,r,n);case"participant":return $Se(e,t,r,n);case"boundary":return jSe(e,t,r,n);case"control":return GSe(e,t,r,n);case"entity":return USe(e,t,r,n);case"database":return qSe(e,t,r,n);case"collections":return FSe(e,t,r,n);case"queue":return zSe(e,t,r,n)}},"drawActor"),HSe=mt(function(e,t,r){e=e.append("g"),ZSe(e,t),t.name&&oAe(r)(t.name,e,t.x,t.y+r.boxTextMargin+(t.textMaxHeight||0)/2,t.width,0,{class:"text"},r),e.lower()},"drawBox"),VSe=mt(function(e){return e.append("g")},"anchorElement"),XSe=mt(function(e,t,r,n,i){var a=Lw(),s=t.anchored;a.x=t.startx,a.y=t.starty,a.class="activation"+i%3,a.width=t.stopx-t.startx,a.height=r-t.starty,NSe(s,a)},"drawActivation"),KSe=mt(async function(e,t,r,n){let{boxMargin:i,boxTextMargin:a,labelBoxHeight:s,labelBoxWidth:o,messageFontFamily:l,messageFontSize:c,messageFontWeight:h}=n,u=e.append("g"),d=mt(function(e,t,r,n){return u.append("line").attr("x1",e).attr("y1",t).attr("x2",r).attr("y2",n).attr("class","loopLine")},"drawLoopLine"),p=(d(t.startx,t.starty,t.stopx,t.starty),d(t.stopx,t.starty,t.stopx,t.stopy),d(t.startx,t.stopy,t.stopx,t.stopy),d(t.startx,t.starty,t.startx,t.stopy),void 0!==t.sections&&t.sections.forEach(function(e){d(t.startx,e.y,t.stopx,e.y).style("stroke-dasharray","3, 3")}),Nw());p.text=r,p.x=t.startx,p.y=t.starty,p.fontFamily=l,p.fontSize=c,p.fontWeight=h,p.anchor="middle",p.valign="middle",p.tspan=!1,p.width=o||50,p.height=s||20,p.textMargin=a,p.class="labelText",OSe(u,p),(p=aAe()).text=t.title,p.x=t.startx+o/2+(t.stopx-t.startx)/2,p.y=t.starty+i+a,p.anchor="middle",p.valign="middle",p.textMargin=a,p.class="loopText",p.fontFamily=l,p.fontSize=c,p.fontWeight=h,p.wrap=!0;var g=Ec(p.text)?await MSe(u,p,t):DSe(u,p);if(void 0!==t.sectionTitles)for(var[f,m]of Object.entries(t.sectionTitles))m.message&&(p.text=m.message,p.x=t.startx+(t.stopx-t.startx)/2,p.y=t.sections[f].y+i+a,p.class="loopText",p.anchor="middle",p.valign="middle",p.tspan=!1,p.fontFamily=l,p.fontSize=c,p.fontWeight=h,p.wrap=t.wrap,Ec(p.text)?(t.starty=t.sections[f].y,await MSe(u,p,t)):DSe(u,p),m=Math.round(g.map(e=>(e._groups||e)[0][0].getBBox().height).reduce((e,t)=>e+t)),t.sections[f].height+=m-(i+a));return t.height=Math.round(t.stopy-t.starty),u},"drawLoop"),ZSe=mt(function(e,t){Cw(e,t)},"drawBackgroundRect"),QSe=mt(function(e){e.append("defs").append("symbol").attr("id","database").attr("fill-rule","evenodd").attr("clip-rule","evenodd").append("path").attr("transform","scale(.5)").attr("d","M12.258.001l.256.004.255.005.253.008.251.01.249.012.247.015.246.016.242.019.241.02.239.023.236.024.233.027.231.028.229.031.225.032.223.034.22.036.217.038.214.04.211.041.208.043.205.045.201.046.198.048.194.05.191.051.187.053.183.054.18.056.175.057.172.059.168.06.163.061.16.063.155.064.15.066.074.033.073.033.071.034.07.034.069.035.068.035.067.035.066.035.064.036.064.036.062.036.06.036.06.037.058.037.058.037.055.038.055.038.053.038.052.038.051.039.05.039.048.039.047.039.045.04.044.04.043.04.041.04.04.041.039.041.037.041.036.041.034.041.033.042.032.042.03.042.029.042.027.042.026.043.024.043.023.043.021.043.02.043.018.044.017.043.015.044.013.044.012.044.011.045.009.044.007.045.006.045.004.045.002.045.001.045v17l-.001.045-.002.045-.004.045-.006.045-.007.045-.009.044-.011.045-.012.044-.013.044-.015.044-.017.043-.018.044-.02.043-.021.043-.023.043-.024.043-.026.043-.027.042-.029.042-.03.042-.032.042-.033.042-.034.041-.036.041-.037.041-.039.041-.04.041-.041.04-.043.04-.044.04-.045.04-.047.039-.048.039-.05.039-.051.039-.052.038-.053.038-.055.038-.055.038-.058.037-.058.037-.06.037-.06.036-.062.036-.064.036-.064.036-.066.035-.067.035-.068.035-.069.035-.07.034-.071.034-.073.033-.074.033-.15.066-.155.064-.16.063-.163.061-.168.06-.172.059-.175.057-.18.056-.183.054-.187.053-.191.051-.194.05-.198.048-.201.046-.205.045-.208.043-.211.041-.214.04-.217.038-.22.036-.223.034-.225.032-.229.031-.231.028-.233.027-.236.024-.239.023-.241.02-.242.019-.246.016-.247.015-.249.012-.251.01-.253.008-.255.005-.256.004-.258.001-.258-.001-.256-.004-.255-.005-.253-.008-.251-.01-.249-.012-.247-.015-.245-.016-.243-.019-.241-.02-.238-.023-.236-.024-.234-.027-.231-.028-.228-.031-.226-.032-.223-.034-.22-.036-.217-.038-.214-.04-.211-.041-.208-.043-.204-.045-.201-.046-.198-.048-.195-.05-.19-.051-.187-.053-.184-.054-.179-.056-.176-.057-.172-.059-.167-.06-.164-.061-.159-.063-.155-.064-.151-.066-.074-.033-.072-.033-.072-.034-.07-.034-.069-.035-.068-.035-.067-.035-.066-.035-.064-.036-.063-.036-.062-.036-.061-.036-.06-.037-.058-.037-.057-.037-.056-.038-.055-.038-.053-.038-.052-.038-.051-.039-.049-.039-.049-.039-.046-.039-.046-.04-.044-.04-.043-.04-.041-.04-.04-.041-.039-.041-.037-.041-.036-.041-.034-.041-.033-.042-.032-.042-.03-.042-.029-.042-.027-.042-.026-.043-.024-.043-.023-.043-.021-.043-.02-.043-.018-.044-.017-.043-.015-.044-.013-.044-.012-.044-.011-.045-.009-.044-.007-.045-.006-.045-.004-.045-.002-.045-.001-.045v-17l.001-.045.002-.045.004-.045.006-.045.007-.045.009-.044.011-.045.012-.044.013-.044.015-.044.017-.043.018-.044.02-.043.021-.043.023-.043.024-.043.026-.043.027-.042.029-.042.03-.042.032-.042.033-.042.034-.041.036-.041.037-.041.039-.041.04-.041.041-.04.043-.04.044-.04.046-.04.046-.039.049-.039.049-.039.051-.039.052-.038.053-.038.055-.038.056-.038.057-.037.058-.037.06-.037.061-.036.062-.036.063-.036.064-.036.066-.035.067-.035.068-.035.069-.035.07-.034.072-.034.072-.033.074-.033.151-.066.155-.064.159-.063.164-.061.167-.06.172-.059.176-.057.179-.056.184-.054.187-.053.19-.051.195-.05.198-.048.201-.046.204-.045.208-.043.211-.041.214-.04.217-.038.22-.036.223-.034.226-.032.228-.031.231-.028.234-.027.236-.024.238-.023.241-.02.243-.019.245-.016.247-.015.249-.012.251-.01.253-.008.255-.005.256-.004.258-.001.258.001zm-9.258 20.499v.01l.001.021.003.021.004.022.005.021.006.022.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.023.018.024.019.024.021.024.022.025.023.024.024.025.052.049.056.05.061.051.066.051.07.051.075.051.079.052.084.052.088.052.092.052.097.052.102.051.105.052.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.048.144.049.147.047.152.047.155.047.16.045.163.045.167.043.171.043.176.041.178.041.183.039.187.039.19.037.194.035.197.035.202.033.204.031.209.03.212.029.216.027.219.025.222.024.226.021.23.02.233.018.236.016.24.015.243.012.246.01.249.008.253.005.256.004.259.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.021.224-.024.22-.026.216-.027.212-.028.21-.031.205-.031.202-.034.198-.034.194-.036.191-.037.187-.039.183-.04.179-.04.175-.042.172-.043.168-.044.163-.045.16-.046.155-.046.152-.047.148-.048.143-.049.139-.049.136-.05.131-.05.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.053.083-.051.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.05.023-.024.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.023.01-.022.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.127l-.077.055-.08.053-.083.054-.085.053-.087.052-.09.052-.093.051-.095.05-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.045-.118.044-.12.043-.122.042-.124.042-.126.041-.128.04-.13.04-.132.038-.134.038-.135.037-.138.037-.139.035-.142.035-.143.034-.144.033-.147.032-.148.031-.15.03-.151.03-.153.029-.154.027-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.01-.179.008-.179.008-.181.006-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.006-.179-.008-.179-.008-.178-.01-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.027-.153-.029-.151-.03-.15-.03-.148-.031-.146-.032-.145-.033-.143-.034-.141-.035-.14-.035-.137-.037-.136-.037-.134-.038-.132-.038-.13-.04-.128-.04-.126-.041-.124-.042-.122-.042-.12-.044-.117-.043-.116-.045-.113-.045-.112-.046-.109-.047-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.05-.093-.052-.09-.051-.087-.052-.085-.053-.083-.054-.08-.054-.077-.054v4.127zm0-5.654v.011l.001.021.003.021.004.021.005.022.006.022.007.022.009.022.01.022.011.023.012.023.013.023.015.024.016.023.017.024.018.024.019.024.021.024.022.024.023.025.024.024.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.052.11.051.114.051.119.052.123.05.127.051.131.05.135.049.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.044.171.042.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.022.23.02.233.018.236.016.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.012.241-.015.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.048.139-.05.136-.049.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.051.051-.049.023-.025.023-.024.021-.025.02-.024.019-.024.018-.024.017-.024.015-.023.014-.023.013-.024.012-.022.01-.023.01-.023.008-.022.006-.022.006-.022.004-.021.004-.022.001-.021.001-.021v-4.139l-.077.054-.08.054-.083.054-.085.052-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.044-.118.044-.12.044-.122.042-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.035-.143.033-.144.033-.147.033-.148.031-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.009-.179.009-.179.007-.181.007-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.007-.179-.007-.179-.009-.178-.009-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.031-.146-.033-.145-.033-.143-.033-.141-.035-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.04-.126-.041-.124-.042-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.051-.093-.051-.09-.051-.087-.053-.085-.052-.083-.054-.08-.054-.077-.054v4.139zm0-5.666v.011l.001.02.003.022.004.021.005.022.006.021.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.024.018.023.019.024.021.025.022.024.023.024.024.025.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.051.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.043.171.043.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.021.23.02.233.018.236.017.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.013.241-.014.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.049.139-.049.136-.049.131-.051.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.049.023-.025.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.022.01-.023.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.153l-.077.054-.08.054-.083.053-.085.053-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.048-.105.048-.106.048-.109.046-.111.046-.114.046-.115.044-.118.044-.12.043-.122.043-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.034-.143.034-.144.033-.147.032-.148.032-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.024-.161.024-.162.023-.163.023-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.01-.178.01-.179.009-.179.007-.181.006-.182.006-.182.004-.184.003-.184.001-.185.001-.185-.001-.184-.001-.184-.003-.182-.004-.182-.006-.181-.006-.179-.007-.179-.009-.178-.01-.176-.01-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.023-.162-.023-.161-.024-.159-.024-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.032-.146-.032-.145-.033-.143-.034-.141-.034-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.041-.126-.041-.124-.041-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.048-.105-.048-.102-.048-.1-.05-.097-.049-.095-.051-.093-.051-.09-.052-.087-.052-.085-.053-.083-.053-.08-.054-.077-.054v4.153zm8.74-8.179l-.257.004-.254.005-.25.008-.247.011-.244.012-.241.014-.237.016-.233.018-.231.021-.226.022-.224.023-.22.026-.216.027-.212.028-.21.031-.205.032-.202.033-.198.034-.194.036-.191.038-.187.038-.183.04-.179.041-.175.042-.172.043-.168.043-.163.045-.16.046-.155.046-.152.048-.148.048-.143.048-.139.049-.136.05-.131.05-.126.051-.123.051-.118.051-.114.052-.11.052-.106.052-.101.052-.096.052-.092.052-.088.052-.083.052-.079.052-.074.051-.07.052-.065.051-.06.05-.056.05-.051.05-.023.025-.023.024-.021.024-.02.025-.019.024-.018.024-.017.023-.015.024-.014.023-.013.023-.012.023-.01.023-.01.022-.008.022-.006.023-.006.021-.004.022-.004.021-.001.021-.001.021.001.021.001.021.004.021.004.022.006.021.006.023.008.022.01.022.01.023.012.023.013.023.014.023.015.024.017.023.018.024.019.024.02.025.021.024.023.024.023.025.051.05.056.05.06.05.065.051.07.052.074.051.079.052.083.052.088.052.092.052.096.052.101.052.106.052.11.052.114.052.118.051.123.051.126.051.131.05.136.05.139.049.143.048.148.048.152.048.155.046.16.046.163.045.168.043.172.043.175.042.179.041.183.04.187.038.191.038.194.036.198.034.202.033.205.032.21.031.212.028.216.027.22.026.224.023.226.022.231.021.233.018.237.016.241.014.244.012.247.011.25.008.254.005.257.004.26.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.022.224-.023.22-.026.216-.027.212-.028.21-.031.205-.032.202-.033.198-.034.194-.036.191-.038.187-.038.183-.04.179-.041.175-.042.172-.043.168-.043.163-.045.16-.046.155-.046.152-.048.148-.048.143-.048.139-.049.136-.05.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.05.051-.05.023-.025.023-.024.021-.024.02-.025.019-.024.018-.024.017-.023.015-.024.014-.023.013-.023.012-.023.01-.023.01-.022.008-.022.006-.023.006-.021.004-.022.004-.021.001-.021.001-.021-.001-.021-.001-.021-.004-.021-.004-.022-.006-.021-.006-.023-.008-.022-.01-.022-.01-.023-.012-.023-.013-.023-.014-.023-.015-.024-.017-.023-.018-.024-.019-.024-.02-.025-.021-.024-.023-.024-.023-.025-.051-.05-.056-.05-.06-.05-.065-.051-.07-.052-.074-.051-.079-.052-.083-.052-.088-.052-.092-.052-.096-.052-.101-.052-.106-.052-.11-.052-.114-.052-.118-.051-.123-.051-.126-.051-.131-.05-.136-.05-.139-.049-.143-.048-.148-.048-.152-.048-.155-.046-.16-.046-.163-.045-.168-.043-.172-.043-.175-.042-.179-.041-.183-.04-.187-.038-.191-.038-.194-.036-.198-.034-.202-.033-.205-.032-.21-.031-.212-.028-.216-.027-.22-.026-.224-.023-.226-.022-.231-.021-.233-.018-.237-.016-.241-.014-.244-.012-.247-.011-.25-.008-.254-.005-.257-.004-.26-.001-.26.001z")},"insertDatabaseIcon"),JSe=mt(function(e){e.append("defs").append("symbol").attr("id","computer").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M2 2v13h20v-13h-20zm18 11h-16v-9h16v9zm-10.228 6l.466-1h3.524l.467 1h-4.457zm14.228 3h-24l2-6h2.104l-1.33 4h18.45l-1.297-4h2.073l2 6zm-5-10h-14v-7h14v7z")},"insertComputerIcon"),eAe=mt(function(e){e.append("defs").append("symbol").attr("id","clock").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm5.848 12.459c.202.038.202.333.001.372-1.907.361-6.045 1.111-6.547 1.111-.719 0-1.301-.582-1.301-1.301 0-.512.77-5.447 1.125-7.445.034-.192.312-.181.343.014l.985 6.238 5.394 1.011z")},"insertClockIcon"),tAe=mt(function(e){e.append("defs").append("marker").attr("id","arrowhead").attr("refX",7.9).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto-start-reverse").append("path").attr("d","M -1 0 L 10 5 L 0 10 z")},"insertArrowHead"),rAe=mt(function(e){e.append("defs").append("marker").attr("id","filled-head").attr("refX",15.5).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"insertArrowFilledHead"),nAe=mt(function(e){e.append("defs").append("marker").attr("id","sequencenumber").attr("refX",15).attr("refY",15).attr("markerWidth",60).attr("markerHeight",40).attr("orient","auto").append("circle").attr("cx",15).attr("cy",15).attr("r",6)},"insertSequenceNumber"),iAe=mt(function(e){e.append("defs").append("marker").attr("id","crosshead").attr("markerWidth",15).attr("markerHeight",8).attr("orient","auto").attr("refX",4).attr("refY",4.5).append("path").attr("fill","none").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1pt").attr("d","M 1,2 L 6,7 M 6,2 L 1,7")},"insertArrowCrossHead"),aAe=mt(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"),sAe=mt(function(){return{x:0,y:0,fill:"#EDF2AE",stroke:"#666",width:100,anchor:"start",height:100,rx:0,ry:0}},"getNoteRect"),mt(n,"byText"),mt(c,"byTspan"),mt(i,"byFo"),mt(a,"byKatex"),mt(f,"_setTextAttrs"),oAe=function(e,t=!1){return t?a:"fo"===e.textPlacement?i:"old"===e.textPlacement?n:c},mt(t,"byText"),mt(l,"byTspan"),mt(r,"byFo"),mt(g,"_setTextAttrs"),lAe=function(e){return"fo"===e.textPlacement?r:"old"===e.textPlacement?t:l},cAe={drawRect:NSe,drawText:DSe,drawLabel:OSe,drawActor:WSe,drawBox:HSe,drawPopup:ISe,anchorElement:VSe,drawActivation:XSe,drawLoop:KSe,drawBackgroundRect:ZSe,insertArrowHead:tAe,insertArrowFilledHead:rAe,insertSequenceNumber:nAe,insertArrowCrossHead:iAe,insertDatabaseIcon:QSe,insertComputerIcon:JSe,insertClockIcon:eAe,getTextObj:aAe,getNoteRect:sAe,fixLifeLineHeights:BSe,sanitizeUrl:ESe.sanitizeUrl}});async function fAe(e,t){B.bumpVerticalPos(10);var{startx:r,stopx:n,message:i}=t,a=L.splitBreaks(i).length,s=Ec(i),i=s?await Cc(i,O()):e_.calculateTextDimensions(i,wAe(P));s||(s=i.height/a,t.height+=s,B.bumpVerticalPos(s));let o,l=i.height-10,c=i.width;return r===n?(o=B.getVerticalPos()+l,P.rightAngles||(l+=P.boxMargin,o=B.getVerticalPos()+l),l+=30,a=L.getMax(c/2,P.width/2),B.insert(r-a,B.getVerticalPos()-10+l,n+a,B.getVerticalPos()+30+l)):(l+=P.boxMargin,o=B.getVerticalPos()+l,B.insert(r,o-10,n,o)),B.bumpVerticalPos(l),t.height+=l,t.stopy=t.starty+t.height,B.insert(t.fromBounds,t.starty,t.toBounds,t.stopy),o}function mAe(e,t,r,n,i){B.bumpVerticalPos(r);let a=n;t.id&&t.message&&e[t.id]&&(r=e[t.id].width,e=wAe(P),t.message=e_.wrapLabel(`[${t.message}]`,r-2*P.wrapPadding,e),t.width=r,t.wrap=!0,r=e_.calculateTextDimensions(t.message,e),e=L.getMax(r.height,P.labelBoxHeight),a=n+e,D.debug(e+" - "+t.message)),i(t),B.bumpVerticalPos(a)}function yAe(r,n,e,t,i,a,s){function o(e,t){e.x<i.get(r.from).x?(B.insert(n.stopx-t,n.starty,n.startx,n.stopy+e.height/2+P.noteMargin),n.stopx=n.stopx+t):(B.insert(n.startx,n.starty,n.stopx+t,n.stopy+e.height/2+P.noteMargin),n.stopx=n.stopx-t)}function l(e,t){e.x<i.get(r.to).x?(B.insert(n.startx-t,n.starty,n.stopx,n.stopy+e.height/2+P.noteMargin),n.startx=n.startx+t):(B.insert(n.stopx,n.starty,n.startx+t,n.stopy+e.height/2+P.noteMargin),n.startx=n.startx-t)}mt(o,"receiverAdjustment"),mt(l,"senderAdjustment");var c=[bSe.ACTOR,bSe.CONTROL,bSe.ENTITY,bSe.DATABASE];a.get(r.to)==t?(o(a=i.get(r.to),c.includes(a.type)?CSe/2+3:a.width/2+3),a.starty=e-a.height/2,B.bumpVerticalPos(a.height/2)):s.get(r.from)==t?(a=i.get(r.from),P.mirrorActors&&l(a,c.includes(a.type)?CSe/2:a.width/2),a.stopy=e-a.height/2,B.bumpVerticalPos(a.height/2)):s.get(r.to)==t&&(a=i.get(r.to),P.mirrorActors&&o(a,c.includes(a.type)?CSe/2+3:a.width/2+3),a.stopy=e-a.height/2,B.bumpVerticalPos(a.height/2))}async function vAe(e,t,r){var n,i={};for(n of t)if(e.get(n.to)&&e.get(n.from)){var a=e.get(n.to);if(n.placement===r.db.PLACEMENT.LEFTOF&&!a.prevActor||n.placement===r.db.PLACEMENT.RIGHTOF&&!a.nextActor)continue;var s=!(o=void 0!==n.placement),o=(o?kAe:wAe)(P),l=n.wrap?e_.wrapLabel(n.message,P.width-2*P.wrapPadding,o):n.message,l=(Ec(l)?await Cc(n.message,O()):e_.calculateTextDimensions(l,o)).width+2*P.wrapPadding;s&&n.from===a.nextActor?i[n.to]=L.getMax(i[n.to]||0,l):s&&n.from===a.prevActor?i[n.from]=L.getMax(i[n.from]||0,l):s&&n.from===n.to?(i[n.from]=L.getMax(i[n.from]||0,l/2),i[n.to]=L.getMax(i[n.to]||0,l/2)):n.placement===r.db.PLACEMENT.RIGHTOF?i[n.from]=L.getMax(i[n.from]||0,l):n.placement===r.db.PLACEMENT.LEFTOF?i[a.prevActor]=L.getMax(i[a.prevActor]||0,l):n.placement===r.db.PLACEMENT.OVER&&(a.prevActor&&(i[a.prevActor]=L.getMax(i[a.prevActor]||0,l/2)),a.nextActor)&&(i[n.from]=L.getMax(i[n.from]||0,l/2))}return D.debug("maxMessageWidthPerActor:",i),i}async function xAe(n,e,t){let r=0;for(var i of n.keys()){(i=n.get(i)).wrap&&(i.description=e_.wrapLabel(i.description,P.width-2*P.wrapPadding,TAe(P)));var a=Ec(i.description)?await Cc(i.description,O()):e_.calculateTextDimensions(i.description,TAe(P));i.width=i.wrap?P.width:L.getMax(P.width,a.width+2*P.wrapPadding),i.height=i.wrap?L.getMax(a.height,P.height):P.height,r=L.getMax(r,i.height)}for(var s in e){var o,l=n.get(s);l&&(o=(o=n.get(l.nextActor))?e[s]+P.actorMargin-l.width/2-o.width/2:e[s]+P.actorMargin-l.width/2,l.margin=L.getMax(o,P.actorMargin))}let c=0;return t.forEach(e=>{var t,r=wAe(P),r=(t=e.actorKeys.reduce((e,t)=>e+(n.get(t).width+(n.get(t).margin||0)),0)+8*P.boxMargin-2*P.boxTextMargin,e.wrap&&(e.name=e_.wrapLabel(e.name,t-2*P.wrapPadding,r)),e_.calculateTextDimensions(e.name,r)),r=(c=L.getMax(r.height,c),L.getMax(t,r.width+2*P.wrapPadding));e.margin=P.boxTextMargin,t<r&&(e.margin+=(r-t)/2)}),t.forEach(e=>e.textMaxHeight=c),L.getMax(r,P.height)}var P,B,bAe,wAe,kAe,TAe,EAe,CAe,_Ae,SAe,AAe,LAe,NAe,IAe,RAe,MAe,DAe,OAe,PAe,BAe=b(()=>{i6(),gAe(),e(),Oc(),Oc(),o6(),Tu(),mr(),i_(),lh(),dAe(),P={},B={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],activations:[],models:{getHeight:mt(function(){return Math.max.apply(null,0===this.actors.length?[0]:this.actors.map(e=>e.height||0))+(0===this.loops.length?0:this.loops.map(e=>e.height||0).reduce((e,t)=>e+t))+(0===this.messages.length?0:this.messages.map(e=>e.height||0).reduce((e,t)=>e+t))+(0===this.notes.length?0:this.notes.map(e=>e.height||0).reduce((e,t)=>e+t))},"getHeight"),clear:mt(function(){this.actors=[],this.boxes=[],this.loops=[],this.messages=[],this.notes=[]},"clear"),addBox:mt(function(e){this.boxes.push(e)},"addBox"),addActor:mt(function(e){this.actors.push(e)},"addActor"),addLoop:mt(function(e){this.loops.push(e)},"addLoop"),addMessage:mt(function(e){this.messages.push(e)},"addMessage"),addNote:mt(function(e){this.notes.push(e)},"addNote"),lastActor:mt(function(){return this.actors[this.actors.length-1]},"lastActor"),lastLoop:mt(function(){return this.loops[this.loops.length-1]},"lastLoop"),lastMessage:mt(function(){return this.messages[this.messages.length-1]},"lastMessage"),lastNote:mt(function(){return this.notes[this.notes.length-1]},"lastNote"),actors:[],boxes:[],loops:[],messages:[],notes:[]},init:mt(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,AAe(O())},"init"),updateVal:mt(function(e,t,r,n){void 0===e[t]?e[t]=r:e[t]=n(r,e[t])},"updateVal"),updateBounds:mt(function(n,i,a,s){let o=this,l=0;function e(r){return mt(function(e){l++;var t=o.sequenceItems.length-l+1;o.updateVal(e,"starty",i-t*P.boxMargin,Math.min),o.updateVal(e,"stopy",s+t*P.boxMargin,Math.max),o.updateVal(B.data,"startx",n-t*P.boxMargin,Math.min),o.updateVal(B.data,"stopx",a+t*P.boxMargin,Math.max),"activation"!==r&&(o.updateVal(e,"startx",n-t*P.boxMargin,Math.min),o.updateVal(e,"stopx",a+t*P.boxMargin,Math.max),o.updateVal(B.data,"starty",i-t*P.boxMargin,Math.min),o.updateVal(B.data,"stopy",s+t*P.boxMargin,Math.max))},"updateItemBounds")}mt(e,"updateFn"),this.sequenceItems.forEach(e()),this.activations.forEach(e("activation"))},"updateBounds"),insert:mt(function(e,t,r,n){var i=L.getMin(e,r),e=L.getMax(e,r),r=L.getMin(t,n),t=L.getMax(t,n);this.updateVal(B.data,"startx",i,Math.min),this.updateVal(B.data,"starty",r,Math.min),this.updateVal(B.data,"stopx",e,Math.max),this.updateVal(B.data,"stopy",t,Math.max),this.updateBounds(i,r,e,t)},"insert"),newActivation:mt(function(e,t,r){var r=r.get(e.from),n=LAe(e.from).length||0,r=r.x+r.width/2+(n-1)*P.activationWidth/2;this.activations.push({startx:r,starty:this.verticalPos+2,stopx:r+P.activationWidth,stopy:void 0,actor:e.from,anchored:cAe.anchorElement(t)})},"newActivation"),endActivation:mt(function(e){return e=this.activations.map(function(e){return e.actor}).lastIndexOf(e.from),this.activations.splice(e,1)[0]},"endActivation"),createLoop:mt(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:mt(function(e={message:void 0,wrap:!1,width:void 0},t){this.sequenceItems.push(this.createLoop(e,t))},"newLoop"),endLoop:mt(function(){return this.sequenceItems.pop()},"endLoop"),isLoopOverlap:mt(function(){return!!this.sequenceItems.length&&this.sequenceItems[this.sequenceItems.length-1].overlap},"isLoopOverlap"),addSectionToLoop:mt(function(e){var t=this.sequenceItems.pop();t.sections=t.sections||[],t.sectionTitles=t.sectionTitles||[],t.sections.push({y:B.getVerticalPos(),height:0}),t.sectionTitles.push(e),this.sequenceItems.push(t)},"addSectionToLoop"),saveVerticalPos:mt(function(){this.isLoopOverlap()&&(this.savedVerticalPos=this.verticalPos)},"saveVerticalPos"),resetVerticalPos:mt(function(){this.isLoopOverlap()&&(this.verticalPos=this.savedVerticalPos)},"resetVerticalPos"),bumpVerticalPos:mt(function(e){this.verticalPos=this.verticalPos+e,this.data.stopy=L.getMax(this.data.stopy,this.verticalPos)},"bumpVerticalPos"),getVerticalPos:mt(function(){return this.verticalPos},"getVerticalPos"),getBounds:mt(function(){return{bounds:this.data,models:this.models}},"getBounds")},bAe=mt(async function(e,t){B.bumpVerticalPos(P.boxMargin),t.height=P.boxMargin,t.starty=B.getVerticalPos();var r=Lw(),e=(r.x=t.startx,r.y=t.starty,r.width=t.width||P.width,r.class="note",e.append("g")),n=cAe.drawRect(e,r),e=((i=Nw()).x=t.startx,i.y=t.starty,i.width=r.width,i.dy="1em",i.text=t.message,i.class="noteText",i.fontFamily=P.noteFontFamily,i.fontSize=P.noteFontSize,i.fontWeight=P.noteFontWeight,i.anchor=P.noteAlign,i.textMargin=P.noteMargin,i.valign="center",Ec(i.text)?await MSe(e,i):DSe(e,i)),i=Math.round(e.map(e=>(e._groups||e)[0][0].getBBox().height).reduce((e,t)=>e+t));n.attr("height",i+2*P.noteMargin),t.height+=i+2*P.noteMargin,B.bumpVerticalPos(i+2*P.noteMargin),t.stopy=t.starty+i+2*P.noteMargin,t.stopx=t.startx+r.width,B.insert(t.startx,t.starty,t.stopx,t.stopy),B.models.addNote(t)},"drawNote"),wAe=mt(e=>({fontFamily:e.messageFontFamily,fontSize:e.messageFontSize,fontWeight:e.messageFontWeight}),"messageFont"),kAe=mt(e=>({fontFamily:e.noteFontFamily,fontSize:e.noteFontSize,fontWeight:e.noteFontWeight}),"noteFont"),TAe=mt(e=>({fontFamily:e.actorFontFamily,fontSize:e.actorFontSize,fontWeight:e.actorFontWeight}),"actorFont"),mt(fAe,"boundMessage"),EAe=mt(async function(e,t,r,n){var{startx:t,stopx:i,starty:a,message:s,type:o,sequenceIndex:l,sequenceVisible:c}=t,h=e_.calculateTextDimensions(s,wAe(P)),u=Nw();u.x=t,u.y=a+10,u.width=i-t,u.class="messageText",u.dy="1em",u.text=s,u.fontFamily=P.messageFontFamily,u.fontSize=P.messageFontSize,u.fontWeight=P.messageFontWeight,u.anchor=P.messageAlign,u.valign="center",u.textMargin=P.wrapPadding,u.tspan=!1,Ec(u.text)?await MSe(e,u,{startx:t,stopx:i,starty:r}):DSe(e,u);let d=h.width,p,g=(t===i?p=P.rightAngles?e.append("path").attr("d",`M ${t},${r} H ${t+L.getMax(P.width/2,d/2)} V ${r+25} H `+t):e.append("path").attr("d","M "+t+","+r+" C "+(t+60)+","+(r-10)+" "+(t+60)+","+(r+30)+" "+t+","+(r+20)):((p=e.append("line")).attr("x1",t),p.attr("y1",r),p.attr("x2",i),p.attr("y2",r)),o===n.db.LINETYPE.DOTTED||o===n.db.LINETYPE.DOTTED_CROSS||o===n.db.LINETYPE.DOTTED_POINT||o===n.db.LINETYPE.DOTTED_OPEN||o===n.db.LINETYPE.BIDIRECTIONAL_DOTTED?(p.style("stroke-dasharray","3, 3"),p.attr("class","messageLine1")):p.attr("class","messageLine0"),"");P.arrowMarkerAbsolute&&(g=gc(!0)),p.attr("stroke-width",2),p.attr("stroke","none"),p.style("fill","none"),o!==n.db.LINETYPE.SOLID&&o!==n.db.LINETYPE.DOTTED||p.attr("marker-end","url("+g+"#arrowhead)"),o!==n.db.LINETYPE.BIDIRECTIONAL_SOLID&&o!==n.db.LINETYPE.BIDIRECTIONAL_DOTTED||(p.attr("marker-start","url("+g+"#arrowhead)"),p.attr("marker-end","url("+g+"#arrowhead)")),o!==n.db.LINETYPE.SOLID_POINT&&o!==n.db.LINETYPE.DOTTED_POINT||p.attr("marker-end","url("+g+"#filled-head)"),o!==n.db.LINETYPE.SOLID_CROSS&&o!==n.db.LINETYPE.DOTTED_CROSS||p.attr("marker-end","url("+g+"#crosshead)"),(c||P.showSequenceNumbers)&&(o!==n.db.LINETYPE.BIDIRECTIONAL_SOLID&&o!==n.db.LINETYPE.BIDIRECTIONAL_DOTTED||(t<i?p.attr("x1",t+12):p.attr("x1",t+6)),e.append("line").attr("x1",t).attr("y1",r).attr("x2",t).attr("y2",r).attr("stroke-width",0).attr("marker-start","url("+g+"#sequencenumber)"),e.append("text").attr("x",t).attr("y",r+4).attr("font-family","sans-serif").attr("font-size","12px").attr("text-anchor","middle").attr("class","sequenceNumber").text(l))},"drawMessage"),CAe=mt(function(e,t,r,n,i,a,s){let o=0,l=0,c,h=0;for(var u of n){var d=(u=t.get(u)).box;c&&c!=d&&(s||B.models.addBox(c),l+=P.boxMargin+c.margin),d&&d!=c&&(s||(d.x=o+l,d.y=i),l+=d.margin),u.width=u.width||P.width,u.height=L.getMax(u.height||P.height,P.height),u.margin=u.margin||P.actorMargin,h=L.getMax(h,u.height),r.get(u.name)&&(l+=u.width/2),u.x=o+l,u.starty=B.getVerticalPos(),B.insert(u.x,i,u.x+u.width,u.height),o+=u.width+l,u.box&&(u.box.width=o+d.margin-u.box.x),l=u.margin,c=u.box,B.models.addActor(u)}c&&!s&&B.models.addBox(c),B.bumpVerticalPos(h)},"addActorRenderingData"),_Ae=mt(async function(t,r,n,e){if(e){let e=0;B.bumpVerticalPos(2*P.boxMargin);for(var i of n)(i=r.get(i)).stopy||(i.stopy=B.getVerticalPos()),i=await cAe.drawActor(t,i,P,!0),e=L.getMax(e,i);B.bumpVerticalPos(e+P.boxMargin)}else for(var a of n)a=r.get(a),await cAe.drawActor(t,a,P,!1)},"drawActors"),SAe=mt(function(e,t,r,n){let i=0,a=0;for(var s of r){var s=t.get(s),o=RAe(s);(o=cAe.drawPopup(e,s,o,P,P.forceMenus,n)).height>i&&(i=o.height),o.width+s.x>a&&(a=o.width+s.x)}return{maxHeight:i,maxWidth:a}},"drawActorsPopup"),AAe=mt(function(e){Ae(P,e),e.fontFamily&&(P.actorFontFamily=P.noteFontFamily=P.messageFontFamily=e.fontFamily),e.fontSize&&(P.actorFontSize=P.noteFontSize=P.messageFontSize=e.fontSize),e.fontWeight&&(P.actorFontWeight=P.noteFontWeight=P.messageFontWeight=e.fontWeight)},"setConf"),LAe=mt(function(t){return B.activations.filter(function(e){return e.actor===t})},"actorActivations"),NAe=mt(function(e,t){return t=t.get(e),[(e=LAe(e)).reduce(function(e,t){return L.getMin(e,t.startx)},t.x+t.width/2-1),e.reduce(function(e,t){return L.getMax(e,t.stopx)},t.x+t.width/2+1)]},"activationBounds"),mt(mAe,"adjustLoopHeightForWrap"),mt(yAe,"adjustCreatedDestroyedData"),IAe=mt(async function(n,e,t,i){var{securityLevel:r,sequence:a}=O();P=a;let s;"sandbox"===r&&(s=H("#i"+e));var a=H("sandbox"===r?s.nodes()[0].contentDocument.body:"body"),o="sandbox"===r?s.nodes()[0].contentDocument:document;B.init(),D.debug(i.db);let l="sandbox"===r?a.select(`[id="${e}"]`):H(`[id="${e}"]`),c=i.db.getActors(),h=i.db.getCreatedActors(),u=i.db.getDestroyedActors(),d=i.db.getBoxes(),p=i.db.getActorKeys(),g=i.db.getMessages(),f=i.db.getDiagramTitle(),m=i.db.hasAtLeastOneBox(),y=i.db.hasAtLeastOneBoxWithTitle(),v=await vAe(c,g,i);if(P.height=await xAe(c,v,d),cAe.insertComputerIcon(l),cAe.insertDatabaseIcon(l),cAe.insertClockIcon(l),m&&(B.bumpVerticalPos(P.boxMargin),y)&&B.bumpVerticalPos(d[0].textMaxHeight),!0===P.hideUnusedParticipants){let t=new Set;g.forEach(e=>{t.add(e.from),t.add(e.to)}),p=p.filter(e=>t.has(e))}CAe(l,c,h,p,0,g,!1);var x,b,w,k=await OAe(g,c,v,i);function T(e,t){var r=B.endActivation(e);r.starty+18>t&&(r.starty=t-6,t+=12),cAe.drawActivation(l,r,t,P,LAe(e.from).length),B.insert(r.startx,t-10,r.stopx,t)}cAe.insertArrowHead(l),cAe.insertArrowCrossHead(l),cAe.insertArrowFilledHead(l),cAe.insertSequenceNumber(l),mt(T,"activeEnd");let E=1,C=1,_=[],S=[],A=0;for(x of g){let e,t,r;switch(x.type){case i.db.LINETYPE.NOTE:B.resetVerticalPos(),t=x.noteModel,await bAe(l,t);break;case i.db.LINETYPE.ACTIVE_START:B.newActivation(x,l,c);break;case i.db.LINETYPE.ACTIVE_END:T(x,B.getVerticalPos());break;case i.db.LINETYPE.LOOP_START:mAe(k,x,P.boxMargin,P.boxMargin+P.boxTextMargin,e=>B.newLoop(e));break;case i.db.LINETYPE.LOOP_END:e=B.endLoop(),await cAe.drawLoop(l,e,"loop",P),B.bumpVerticalPos(e.stopy-B.getVerticalPos()),B.models.addLoop(e);break;case i.db.LINETYPE.RECT_START:mAe(k,x,P.boxMargin,P.boxMargin,e=>B.newLoop(void 0,e.message));break;case i.db.LINETYPE.RECT_END:e=B.endLoop(),S.push(e),B.models.addLoop(e),B.bumpVerticalPos(e.stopy-B.getVerticalPos());break;case i.db.LINETYPE.OPT_START:mAe(k,x,P.boxMargin,P.boxMargin+P.boxTextMargin,e=>B.newLoop(e));break;case i.db.LINETYPE.OPT_END:e=B.endLoop(),await cAe.drawLoop(l,e,"opt",P),B.bumpVerticalPos(e.stopy-B.getVerticalPos()),B.models.addLoop(e);break;case i.db.LINETYPE.ALT_START:mAe(k,x,P.boxMargin,P.boxMargin+P.boxTextMargin,e=>B.newLoop(e));break;case i.db.LINETYPE.ALT_ELSE:mAe(k,x,P.boxMargin+P.boxTextMargin,P.boxMargin,e=>B.addSectionToLoop(e));break;case i.db.LINETYPE.ALT_END:e=B.endLoop(),await cAe.drawLoop(l,e,"alt",P),B.bumpVerticalPos(e.stopy-B.getVerticalPos()),B.models.addLoop(e);break;case i.db.LINETYPE.PAR_START:case i.db.LINETYPE.PAR_OVER_START:mAe(k,x,P.boxMargin,P.boxMargin+P.boxTextMargin,e=>B.newLoop(e)),B.saveVerticalPos();break;case i.db.LINETYPE.PAR_AND:mAe(k,x,P.boxMargin+P.boxTextMargin,P.boxMargin,e=>B.addSectionToLoop(e));break;case i.db.LINETYPE.PAR_END:e=B.endLoop(),await cAe.drawLoop(l,e,"par",P),B.bumpVerticalPos(e.stopy-B.getVerticalPos()),B.models.addLoop(e);break;case i.db.LINETYPE.AUTONUMBER:E=x.message.start||E,C=x.message.step||C,x.message.visible?i.db.enableSequenceNumbers():i.db.disableSequenceNumbers();break;case i.db.LINETYPE.CRITICAL_START:mAe(k,x,P.boxMargin,P.boxMargin+P.boxTextMargin,e=>B.newLoop(e));break;case i.db.LINETYPE.CRITICAL_OPTION:mAe(k,x,P.boxMargin+P.boxTextMargin,P.boxMargin,e=>B.addSectionToLoop(e));break;case i.db.LINETYPE.CRITICAL_END:e=B.endLoop(),await cAe.drawLoop(l,e,"critical",P),B.bumpVerticalPos(e.stopy-B.getVerticalPos()),B.models.addLoop(e);break;case i.db.LINETYPE.BREAK_START:mAe(k,x,P.boxMargin,P.boxMargin+P.boxTextMargin,e=>B.newLoop(e));break;case i.db.LINETYPE.BREAK_END:e=B.endLoop(),await cAe.drawLoop(l,e,"break",P),B.bumpVerticalPos(e.stopy-B.getVerticalPos()),B.models.addLoop(e);break;default:try{(r=x.msgModel).starty=B.getVerticalPos(),r.sequenceIndex=E,r.sequenceVisible=i.db.showSequenceNumbers();var L=await fAe(l,r);yAe(x,r,L,A,c,h,u),_.push({messageModel:r,lineStartY:L}),B.models.addMessage(r)}catch(n){D.error("error while drawing message",n)}}[i.db.LINETYPE.SOLID_OPEN,i.db.LINETYPE.DOTTED_OPEN,i.db.LINETYPE.SOLID,i.db.LINETYPE.DOTTED,i.db.LINETYPE.SOLID_CROSS,i.db.LINETYPE.DOTTED_CROSS,i.db.LINETYPE.SOLID_POINT,i.db.LINETYPE.DOTTED_POINT,i.db.LINETYPE.BIDIRECTIONAL_SOLID,i.db.LINETYPE.BIDIRECTIONAL_DOTTED].includes(x.type)&&(E+=C),A++}D.debug("createdActors",h),D.debug("destroyedActors",u),await _Ae(l,c,p,!1);for(b of _)await EAe(l,b.messageModel,b.lineStartY,i);P.mirrorActors&&await _Ae(l,c,p,!0),S.forEach(e=>cAe.drawBackgroundRect(l,e)),BSe(l,c,p,P);for(w of B.models.boxes){w.height=B.getVerticalPos()-w.y,B.insert(w.x,w.y,w.x+w.width,w.height);var N=2*P.boxMargin;w.startx=w.x-N,w.starty=w.y-.25*N,w.stopx=w.startx+w.width+2*N,w.stopy=w.starty+w.height+.75*N,w.stroke="rgb(0,0,0, 0.5)",cAe.drawBox(l,w,P)}m&&B.bumpVerticalPos(P.boxMargin),r=SAe(l,c,p,o),void 0===(a=B.getBounds().bounds).startx&&(a.startx=0),void 0===a.starty&&(a.starty=0),void 0===a.stopx&&(a.stopx=0),void 0===a.stopy&&(a.stopy=0);let I=a.stopy-a.starty,R=(I<r.maxHeight?r.maxHeight:I)+2*P.diagramMarginY,M=(P.mirrorActors&&(R=R-P.boxMargin+P.bottomMarginAdj),a.stopx-a.startx);e=(M<r.maxWidth?r.maxWidth:M)+2*P.diagramMarginX,f&&l.append("text").text(f).attr("x",(a.stopx-a.startx)/2-2*P.diagramMarginX).attr("y",-25),Zc(l,R,e,P.useMaxWidth),o=f?40:0,l.attr("viewBox",a.startx-P.diagramMarginX+" -"+(P.diagramMarginY+o)+" "+e+" "+(R+o)),D.debug("models:",B.models)},"draw"),mt(vAe,"getMaxMessageWidthPerActor"),RAe=mt(function(e){let t=0,r=TAe(P);for(var n in e.links)n=e_.calculateTextDimensions(n,r).width+2*P.wrapPadding+2*P.boxMargin,t<n&&(t=n);return t},"getRequiredPopupWidth"),mt(xAe,"calculateActorMargins"),MAe=mt(async function(e,t,r){var n=t.get(e.from),t=t.get(e.to),i=n.x,a=t.x,s=e.wrap&&e.message,o=Ec(e.message)?await Cc(e.message,O()):e_.calculateTextDimensions(s?e_.wrapLabel(e.message,P.width,kAe(P)):e.message,kAe(P)),l={width:s?P.width:L.getMax(P.width,o.width+2*P.noteMargin),height:0,startx:n.x,stopx:0,starty:0,stopy:0,message:e.message};return e.placement===r.db.PLACEMENT.RIGHTOF?(l.width=s?L.getMax(P.width,o.width):L.getMax(n.width/2+t.width/2,o.width+2*P.noteMargin),l.startx=i+(n.width+P.actorMargin)/2):e.placement===r.db.PLACEMENT.LEFTOF?(l.width=s?L.getMax(P.width,o.width+2*P.noteMargin):L.getMax(n.width/2+t.width/2,o.width+2*P.noteMargin),l.startx=i-l.width+(n.width-P.actorMargin)/2):e.to===e.from?(o=e_.calculateTextDimensions(s?e_.wrapLabel(e.message,L.getMax(P.width,n.width),kAe(P)):e.message,kAe(P)),l.width=s?L.getMax(P.width,n.width):L.getMax(n.width,P.width,o.width+2*P.noteMargin),l.startx=i+(n.width-l.width)/2):(l.width=Math.abs(i+n.width/2-(a+t.width/2))+P.actorMargin,l.startx=i<a?i+n.width/2-P.actorMargin/2:a+t.width/2-P.actorMargin/2),s&&(l.message=e_.wrapLabel(e.message,l.width-2*P.wrapPadding,kAe(P))),D.debug(`NM:[${l.startx},${l.stopx},${l.starty},${l.stopy}:${l.width},${l.height}=${e.message}]`),l},"buildNoteModel"),DAe=mt(function(e,t,r){if(![r.db.LINETYPE.SOLID_OPEN,r.db.LINETYPE.DOTTED_OPEN,r.db.LINETYPE.SOLID,r.db.LINETYPE.DOTTED,r.db.LINETYPE.SOLID_CROSS,r.db.LINETYPE.DOTTED_CROSS,r.db.LINETYPE.SOLID_POINT,r.db.LINETYPE.DOTTED_POINT,r.db.LINETYPE.BIDIRECTIONAL_SOLID,r.db.LINETYPE.BIDIRECTIONAL_DOTTED].includes(e.type))return{};let[n,i]=NAe(e.from,t),[a,s]=NAe(e.to,t),o=n<=a,l=o?i:n,c=o?a:s,h=2<Math.abs(a-s),u=mt(e=>o?-e:e,"adjustValue");e.from===e.to?c=l:(e.activate&&!h&&(c+=u(P.activationWidth/2-1)),[r.db.LINETYPE.SOLID_OPEN,r.db.LINETYPE.DOTTED_OPEN].includes(e.type)||(c+=u(3)),[r.db.LINETYPE.BIDIRECTIONAL_SOLID,r.db.LINETYPE.BIDIRECTIONAL_DOTTED].includes(e.type)&&(l-=u(3)));var t=[n,i,a,s],r=Math.abs(l-c),d=(e.wrap&&e.message&&(e.message=e_.wrapLabel(e.message,L.getMax(r+2*P.wrapPadding,P.width),wAe(P))),e_.calculateTextDimensions(e.message,wAe(P)));return{width:L.getMax(e.wrap?0:d.width+2*P.wrapPadding,r+2*P.wrapPadding,P.width),height:0,startx:l,stopx:c,starty:0,stopy:0,message:e.message,type:e.type,wrap:e.wrap,fromBounds:Math.min.apply(null,t),toBounds:Math.max.apply(null,t)}},"buildMessageModel"),OAe=mt(async function(e,n,t,i){let a={},s=[],o,l,c;for(let r of e){switch(r.type){case i.db.LINETYPE.LOOP_START:case i.db.LINETYPE.ALT_START:case i.db.LINETYPE.OPT_START:case i.db.LINETYPE.PAR_START:case i.db.LINETYPE.PAR_OVER_START:case i.db.LINETYPE.CRITICAL_START:case i.db.LINETYPE.BREAK_START:s.push({id:r.id,msg:r.message,from:Number.MAX_SAFE_INTEGER,to:Number.MIN_SAFE_INTEGER,width:0});break;case i.db.LINETYPE.ALT_ELSE:case i.db.LINETYPE.PAR_AND:case i.db.LINETYPE.CRITICAL_OPTION:r.message&&(o=s.pop(),a[o.id]=o,a[r.id]=o,s.push(o));break;case i.db.LINETYPE.LOOP_END:case i.db.LINETYPE.ALT_END:case i.db.LINETYPE.OPT_END:case i.db.LINETYPE.PAR_END:case i.db.LINETYPE.CRITICAL_END:case i.db.LINETYPE.BREAK_END:o=s.pop(),a[o.id]=o;break;case i.db.LINETYPE.ACTIVE_START:var h=n.get(r.from||r.to.actor),u=LAe(r.from||r.to.actor).length,u={startx:h=h.x+h.width/2+(u-1)*P.activationWidth/2,stopx:h+P.activationWidth,actor:r.from,enabled:!0};B.activations.push(u);break;case i.db.LINETYPE.ACTIVE_END:h=B.activations.map(e=>e.actor).lastIndexOf(r.from),B.activations.splice(h,1).splice(0,1)}void 0!==r.placement?(l=await MAe(r,n,i),r.noteModel=l,s.forEach(e=>{(o=e).from=L.getMin(o.from,l.startx),o.to=L.getMax(o.to,l.startx+l.width),o.width=L.getMax(o.width,Math.abs(o.from-o.to))-P.labelBoxWidth})):(c=DAe(r,n,i),(r.msgModel=c).startx&&c.stopx&&0<s.length&&s.forEach(e=>{var t;o=e,c.startx===c.stopx?(e=n.get(r.from),t=n.get(r.to),o.from=L.getMin(e.x-c.width/2,e.x-e.width/2,o.from),o.to=L.getMax(t.x+c.width/2,t.x+e.width/2,o.to),o.width=L.getMax(o.width,Math.abs(o.to-o.from))-P.labelBoxWidth):(o.from=L.getMin(c.startx,o.from),o.to=L.getMax(c.stopx,o.to),o.width=L.getMax(o.width,c.width)-P.labelBoxWidth)}))}return B.activations=[],D.debug("Loop type widths:",a),a},"calculateLoopBounds"),PAe={bounds:B,drawActors:_Ae,drawActorsPopup:SAe,setConf:AAe,draw:IAe}}),$Ae={};OFe($Ae,{diagram:()=>FAe});var FAe,zAe,GAe,UAe,qAe,jAe,YAe,WAe,HAe,VAe,XAe,KAe,ZAe,QAe,JAe,e9e=b(()=>{uAe(),dAe(),pAe(),Tu(),BAe(),FAe={parser:mSe,get db(){return new wSe},renderer:PAe,styles:TSe,init:mt(e=>{e.sequence||(e.sequence={}),e.wrap&&(e.sequence.wrap=e.wrap,Eh({sequence:{wrap:e.wrap}}))},"init")}}),t9e=b(()=>{function e(){this.yy={}}var t=mt(function(e,t,r,n){for(r=r||{},n=e.length;n--;r[e[n]]=t);return r},"o"),r=[1,18],n=[1,19],i=[1,20],a=[1,41],s=[1,42],o=[1,26],l=[1,24],P=[1,25],B=[1,32],$=[1,33],F=[1,34],c=[1,45],z=[1,35],G=[1,36],U=[1,37],q=[1,38],j=[1,27],Y=[1,28],W=[1,29],H=[1,30],V=[1,31],h=[1,44],u=[1,46],d=[1,43],p=[1,47],X=[1,9],g=[1,8,9],f=[1,58],m=[1,59],y=[1,60],v=[1,61],x=[1,62],K=[1,63],Z=[1,64],b=[1,8,9,41],Q=[1,76],w=[1,8,9,12,13,22,39,41,44,68,69,70,71,72,73,74,79,81],k=[1,8,9,12,13,18,20,22,39,41,44,50,60,68,69,70,71,72,73,74,79,81,86,100,102,103],T=[13,60,86,100,102,103],E=[13,60,73,74,86,100,102,103],J=[13,60,68,69,70,71,72,86,100,102,103],ee=[1,100],C=[1,117],_=[1,113],S=[1,109],A=[1,115],L=[1,110],N=[1,111],I=[1,112],R=[1,114],M=[1,116],te=[22,48,60,61,82,86,87,88,89,90],re=[1,8,9,39,41,44],D=[1,8,9,22],ne=[1,145],ie=[1,8,9,61],O=[1,8,9,22,48,60,61,82,86,87,88,89,90],k={trace:mt(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,CLASS:46,emptyBody:47,SPACE:48,ANNOTATION_START:49,ANNOTATION_END: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:"CLASS",48:"SPACE",49:"ANNOTATION_START",50:"ANNOTATION_END",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],[40,1],[40,2],[40,3],[24,1],[24,3],[24,4],[24,3],[24,6],[43,2],[43,3],[47,0],[47,2],[47,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:mt(function(e,t,r,n,i,a,s){var o=a.length-1;switch(i){case 8:this.$=a[o-1];break;case 9:case 10:case 13:case 15:this.$=a[o];break;case 11:case 14:this.$=a[o-2]+"."+a[o];break;case 12:case 16:this.$=a[o-1]+a[o];break;case 17:case 18:this.$=a[o-1]+"~"+a[o]+"~";break;case 19:n.addRelation(a[o]);break;case 20:a[o-1].title=n.cleanupLabel(a[o]),n.addRelation(a[o-1]);break;case 31:this.$=a[o].trim(),n.setAccTitle(this.$);break;case 32:case 33:this.$=a[o].trim(),n.setAccDescription(this.$);break;case 34:n.addClassesToNamespace(a[o-3],a[o-1]);break;case 35:n.addClassesToNamespace(a[o-4],a[o-1]);break;case 36:this.$=a[o],n.addNamespace(a[o]);break;case 37:this.$=[a[o]];break;case 38:this.$=[a[o-1]];break;case 39:a[o].unshift(a[o-2]),this.$=a[o];break;case 41:n.setCssClass(a[o-2],a[o]);break;case 42:n.addMembers(a[o-3],a[o-1]);break;case 44:n.setCssClass(a[o-5],a[o-3]),n.addMembers(a[o-5],a[o-1]);break;case 45:this.$=a[o],n.addClass(a[o]);break;case 46:this.$=a[o-1],n.addClass(a[o-1]),n.setClassLabel(a[o-1],a[o]);break;case 50:n.addAnnotation(a[o],a[o-2]);break;case 51:case 64:this.$=[a[o]];break;case 52:a[o].push(a[o-1]),this.$=a[o];break;case 53:break;case 54:n.addMember(a[o-1],n.cleanupLabel(a[o]));break;case 55:case 56:break;case 57:this.$={id1:a[o-2],id2:a[o],relation:a[o-1],relationTitle1:"none",relationTitle2:"none"};break;case 58:this.$={id1:a[o-3],id2:a[o],relation:a[o-1],relationTitle1:a[o-2],relationTitle2:"none"};break;case 59:this.$={id1:a[o-3],id2:a[o],relation:a[o-2],relationTitle1:"none",relationTitle2:a[o-1]};break;case 60:this.$={id1:a[o-4],id2:a[o],relation:a[o-2],relationTitle1:a[o-3],relationTitle2:a[o-1]};break;case 61:n.addNote(a[o],a[o-1]);break;case 62:n.addNote(a[o]);break;case 63:this.$=a[o-2],n.defineClass(a[o-1],a[o]);break;case 65:this.$=a[o-2].concat([a[o]]);break;case 66:n.setDirection("TB");break;case 67:n.setDirection("BT");break;case 68:n.setDirection("RL");break;case 69:n.setDirection("LR");break;case 70:this.$={type1:a[o-2],type2:a[o],lineType:a[o-1]};break;case 71:this.$={type1:"none",type2:a[o],lineType:a[o-1]};break;case 72:this.$={type1:a[o-1],type2:"none",lineType:a[o]};break;case 73:this.$={type1:"none",type2:"none",lineType:a[o]};break;case 74:this.$=n.relationType.AGGREGATION;break;case 75:this.$=n.relationType.EXTENSION;break;case 76:this.$=n.relationType.COMPOSITION;break;case 77:this.$=n.relationType.DEPENDENCY;break;case 78:this.$=n.relationType.LOLLIPOP;break;case 79:this.$=n.lineType.LINE;break;case 80:this.$=n.lineType.DOTTED_LINE;break;case 81:case 87:this.$=a[o-2],n.setClickEvent(a[o-1],a[o]);break;case 82:case 88:this.$=a[o-3],n.setClickEvent(a[o-2],a[o-1]),n.setTooltip(a[o-2],a[o]);break;case 83:this.$=a[o-2],n.setLink(a[o-1],a[o]);break;case 84:this.$=a[o-3],n.setLink(a[o-2],a[o-1],a[o]);break;case 85:this.$=a[o-3],n.setLink(a[o-2],a[o-1]),n.setTooltip(a[o-2],a[o]);break;case 86:this.$=a[o-4],n.setLink(a[o-3],a[o-2],a[o]),n.setTooltip(a[o-3],a[o-1]);break;case 89:this.$=a[o-3],n.setClickEvent(a[o-2],a[o-1],a[o]);break;case 90:this.$=a[o-4],n.setClickEvent(a[o-3],a[o-2],a[o-1]),n.setTooltip(a[o-3],a[o]);break;case 91:this.$=a[o-3],n.setLink(a[o-2],a[o]);break;case 92:this.$=a[o-4],n.setLink(a[o-3],a[o-1],a[o]);break;case 93:this.$=a[o-4],n.setLink(a[o-3],a[o-1]),n.setTooltip(a[o-3],a[o]);break;case 94:this.$=a[o-5],n.setLink(a[o-4],a[o-2],a[o]),n.setTooltip(a[o-4],a[o-1]);break;case 95:this.$=a[o-2],n.setCssStyle(a[o-1],a[o]);break;case 96:n.setCssClass(a[o-1],a[o]);break;case 97:this.$=[a[o]];break;case 98:a[o-2].push(a[o]),this.$=a[o-2];break;case 100:this.$=a[o-1]+a[o]}},"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:r,35:n,37:i,38:22,42:a,43:23,46:s,49:o,51:l,52:P,54:B,56:$,57:F,60:c,62:z,63:G,64:U,65:q,75:j,76:Y,78:W,82:H,83:V,86:h,100:u,102:d,103:p},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,3]},t(X,[2,5],{8:[1,48]}),{8:[1,49]},t(g,[2,19],{22:[1,50]}),t(g,[2,21]),t(g,[2,22]),t(g,[2,23]),t(g,[2,24]),t(g,[2,25]),t(g,[2,26]),t(g,[2,27]),t(g,[2,28]),t(g,[2,29]),t(g,[2,30]),{34:[1,51]},{36:[1,52]},t(g,[2,33]),t(g,[2,53],{53:53,66:56,67:57,13:[1,54],22:[1,55],68:f,69:m,70:y,71:v,72:x,73:K,74:Z}),{39:[1,65]},t(b,[2,40],{39:[1,67],44:[1,66]}),t(g,[2,55]),t(g,[2,56]),{16:68,60:c,86:h,100:u,102:d},{16:39,17:40,19:69,60:c,86:h,100:u,102:d,103:p},{16:39,17:40,19:70,60:c,86:h,100:u,102:d,103:p},{16:39,17:40,19:71,60:c,86:h,100:u,102:d,103:p},{60:[1,72]},{13:[1,73]},{16:39,17:40,19:74,60:c,86:h,100:u,102:d,103:p},{13:Q,55:75},{58:77,60:[1,78]},t(g,[2,66]),t(g,[2,67]),t(g,[2,68]),t(g,[2,69]),t(w,[2,13],{16:39,17:40,19:80,18:[1,79],20:[1,81],60:c,86:h,100:u,102:d,103:p}),t(w,[2,15],{20:[1,82]}),{15:83,16:84,17:85,60:c,86:h,100:u,102:d,103:p},{16:39,17:40,19:86,60:c,86:h,100:u,102:d,103:p},t(k,[2,123]),t(k,[2,124]),t(k,[2,125]),t(k,[2,126]),t([1,8,9,12,13,20,22,39,41,44,68,69,70,71,72,73,74,79,81],[2,127]),t(X,[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:87,33:r,35:n,37:i,42:a,46:s,49:o,51:l,52:P,54:B,56:$,57:F,60:c,62:z,63:G,64:U,65:q,75:j,76:Y,78:W,82:H,83:V,86:h,100:u,102:d,103:p}),{5:88,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:r,35:n,37:i,38:22,42:a,43:23,46:s,49:o,51:l,52:P,54:B,56:$,57:F,60:c,62:z,63:G,64:U,65:q,75:j,76:Y,78:W,82:H,83:V,86:h,100:u,102:d,103:p},t(g,[2,20]),t(g,[2,31]),t(g,[2,32]),{13:[1,90],16:39,17:40,19:89,60:c,86:h,100:u,102:d,103:p},{53:91,66:56,67:57,68:f,69:m,70:y,71:v,72:x,73:K,74:Z},t(g,[2,54]),{67:92,73:K,74:Z},t(T,[2,73],{66:93,68:f,69:m,70:y,71:v,72:x}),t(E,[2,74]),t(E,[2,75]),t(E,[2,76]),t(E,[2,77]),t(E,[2,78]),t(J,[2,79]),t(J,[2,80]),{8:[1,95],24:96,40:94,43:23,46:s},{16:97,60:c,86:h,100:u,102:d},{41:[1,99],45:98,51:ee},{50:[1,101]},{13:[1,102]},{13:[1,103]},{79:[1,104],81:[1,105]},{22:C,48:_,59:106,60:S,82:A,84:107,85:108,86:L,87:N,88:I,89:R,90:M},{60:[1,118]},{13:Q,55:119},t(g,[2,62]),t(g,[2,128]),{22:C,48:_,59:120,60:S,61:[1,121],82:A,84:107,85:108,86:L,87:N,88:I,89:R,90:M},t(te,[2,64]),{16:39,17:40,19:122,60:c,86:h,100:u,102:d,103:p},t(w,[2,16]),t(w,[2,17]),t(w,[2,18]),{39:[2,36]},{15:124,16:84,17:85,18:[1,123],39:[2,9],60:c,86:h,100:u,102:d,103:p},{39:[2,10]},t(re,[2,45],{11:125,12:[1,126]}),t(X,[2,7]),{9:[1,127]},t(D,[2,57]),{16:39,17:40,19:128,60:c,86:h,100:u,102:d,103:p},{13:[1,130],16:39,17:40,19:129,60:c,86:h,100:u,102:d,103:p},t(T,[2,72],{66:131,68:f,69:m,70:y,71:v,72:x}),t(T,[2,71]),{41:[1,132]},{24:96,40:133,43:23,46:s},{8:[1,134],41:[2,37]},t(b,[2,41],{39:[1,135]}),{41:[1,136]},t(b,[2,43]),{41:[2,51],45:137,51:ee},{16:39,17:40,19:138,60:c,86:h,100:u,102:d,103:p},t(g,[2,81],{13:[1,139]}),t(g,[2,83],{13:[1,141],77:[1,140]}),t(g,[2,87],{13:[1,142],80:[1,143]}),{13:[1,144]},t(g,[2,95],{61:ne}),t(ie,[2,97],{85:146,22:C,48:_,60:S,82:A,86:L,87:N,88:I,89:R,90:M}),t(O,[2,99]),t(O,[2,101]),t(O,[2,102]),t(O,[2,103]),t(O,[2,104]),t(O,[2,105]),t(O,[2,106]),t(O,[2,107]),t(O,[2,108]),t(O,[2,109]),t(g,[2,96]),t(g,[2,61]),t(g,[2,63],{61:ne}),{60:[1,147]},t(w,[2,14]),{15:148,16:84,17:85,60:c,86:h,100:u,102:d,103:p},{39:[2,12]},t(re,[2,46]),{13:[1,149]},{1:[2,4]},t(D,[2,59]),t(D,[2,58]),{16:39,17:40,19:150,60:c,86:h,100:u,102:d,103:p},t(T,[2,70]),t(g,[2,34]),{41:[1,151]},{24:96,40:152,41:[2,38],43:23,46:s},{45:153,51:ee},t(b,[2,42]),{41:[2,52]},t(g,[2,50]),t(g,[2,82]),t(g,[2,84]),t(g,[2,85],{77:[1,154]}),t(g,[2,88]),t(g,[2,89],{13:[1,155]}),t(g,[2,91],{13:[1,157],77:[1,156]}),{22:C,48:_,60:S,82:A,84:158,85:108,86:L,87:N,88:I,89:R,90:M},t(O,[2,100]),t(te,[2,65]),{39:[2,11]},{14:[1,159]},t(D,[2,60]),t(g,[2,35]),{41:[2,39]},{41:[1,160]},t(g,[2,86]),t(g,[2,90]),t(g,[2,92]),t(g,[2,93],{77:[1,161]}),t(ie,[2,98],{85:146,22:C,48:_,60:S,82:A,86:L,87:N,88:I,89:R,90:M}),t(re,[2,8]),t(b,[2,44]),t(g,[2,94])],defaultActions:{2:[2,1],3:[2,2],4:[2,3],83:[2,36],85:[2,10],124:[2,12],127:[2,4],137:[2,52],148:[2,11],152:[2,39]},parseError:mt(function(e,t){var r;if(!t.recoverable)throw(r=new Error(e)).hash=t,r;this.trace(e)},"parseError"),parse:mt(function(e){var t,r=this,n=[0],i=[],a=[null],s=[],o=this.table,l="",c=0,h=0,u=0,d=1,p=s.slice.call(arguments,1),g=Object.create(this.lexer),f={yy:{}};for(t in this.yy)Object.prototype.hasOwnProperty.call(this.yy,t)&&(f.yy[t]=this.yy[t]);g.setInput(e,f.yy),f.yy.lexer=g,f.yy.parser=this,"u"<typeof g.yylloc&&(g.yylloc={});var m=g.yylloc,y=(s.push(m),g.options&&g.options.ranges);function v(){var e=i.pop()||g.lex()||d;return"number"!=typeof e&&(e instanceof Array&&(e=(i=e).pop()),e=r.symbols_[e]||e),e}"function"==typeof f.yy.parseError?this.parseError=f.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,mt(function(e){n.length=n.length-2*e,a.length=a.length-e,s.length=s.length-e},"popStack"),mt(v,"lex");for(var x,b,w,k,T,E,C,_={};;){if(w=n[n.length-1],"u"<typeof(k=this.defaultActions[w]||((null===x||"u"<typeof x)&&(x=v()),o[w]&&o[w][x]))||!k.length||!k[0]){var S,A=[];for(T in o[w])this.terminals_[T]&&2<T&&A.push("'"+this.terminals_[T]+"'");S=g.showPosition?"Parse error on line "+(c+1)+`: +`+g.showPosition()+` +Expecting `+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(c+1)+": Unexpected "+(x==d?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(S,{text:g.match,token:this.terminals_[x]||x,line:g.yylineno,loc:m,expected:A})}if(k[0]instanceof Array&&1<k.length)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+x);switch(k[0]){case 1:n.push(x),a.push(g.yytext),s.push(g.yylloc),n.push(k[1]),x=null,b?(x=b,b=null):(h=g.yyleng,l=g.yytext,c=g.yylineno,m=g.yylloc,0<u&&u--);break;case 2:if(E=this.productions_[k[1]][1],_.$=a[a.length-E],_._$={first_line:s[s.length-(E||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(E||1)].first_column,last_column:s[s.length-1].last_column},y&&(_._$.range=[s[s.length-(E||1)].range[0],s[s.length-1].range[1]]),typeof(C=this.performAction.apply(_,[l,h,c,f.yy,k[1],a,s].concat(p)))<"u")return C;E&&(n=n.slice(0,-1*E*2),a=a.slice(0,-1*E),s=s.slice(0,-1*E)),n.push(this.productions_[k[1]][0]),a.push(_.$),s.push(_._$),C=o[n[n.length-2]][n[n.length-1]],n.push(C);break;case 3:return!0}}return!0},"parse")},r={EOF:1,parseError:mt(function(e,t){if(!this.yy.parser)throw new Error(e);this.yy.parser.parseError(e,t)},"parseError"),setInput:mt(function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:mt(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},"input"),unput:mt(function(e){var t=e.length,r=e.split(/(?:\r\n?|\n)/g),e=(this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t,this.match.split(/(?:\r\n?|\n)/g)),n=(this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),r.length-1&&(this.yylineno-=r.length-1),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:r?(r.length===e.length?this.yylloc.first_column:0)+e[e.length-r.length].length-r[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[n[0],n[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},"unput"),more:mt(function(){return this._more=!0,this},"more"),reject:mt(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):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})},"reject"),less:mt(function(e){this.unput(this.match.slice(e))},"less"),pastInput:mt(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(20<e.length?"...":"")+e.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:mt(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(20<e.length?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:mt(function(){var e=this.pastInput(),t=new Array(e.length+1).join("-");return e+this.upcomingInput()+` +`+t+"^"},"showPosition"),test_match:mt(function(e,t){var r,n;if(this.options.backtrack_lexer&&(n={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges)&&(n.yylloc.range=this.yylloc.range.slice(0)),(r=e[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],r=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack)for(var i in n)this[i]=n[i];return!1},"test_match"),next:mt(function(){if(this.done)return this.EOF;var e,t,r,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((r=this._input.match(this.rules[i[a]]))&&(!t||r[0].length>t[0].length)){if(t=r,n=a,this.options.backtrack_lexer){if(!1!==(e=this.test_match(r,i[a])))return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?!1!==(e=this.test_match(t,i[n]))&&e:""===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:mt(function(){return this.next()||this.lex()},"lex"),begin:mt(function(e){this.conditionStack.push(e)},"begin"),popState:mt(function(){return 0<this.conditionStack.length-1?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:mt(function(){return(this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]]:this.conditions.INITIAL).rules},"_currentRules"),topState:mt(function(e){return 0<=(e=this.conditionStack.length-1-Math.abs(e||0))?this.conditionStack[e]:"INITIAL"},"topState"),pushState:mt(function(e){this.begin(e)},"pushState"),stateStackSize:mt(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:mt(function(e,t,r,n){switch(r){case 0:return 62;case 1:return 63;case 2:return 64;case 3:return 65;case 4:case 5:break;case 6:return this.begin("acc_title"),33;case 7:return this.popState(),"acc_title_value";case 8:return this.begin("acc_descr"),35;case 9:return this.popState(),"acc_descr_value";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: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;case 30:return this.popState(),8;case 31:break;case 32:return this.begin("namespace-body"),39;case 33:return this.popState(),41;case 34:return"EOF_IN_STRUCT";case 35:return 8;case 36:break;case 37:return"EDGE_STATE";case 38:return this.begin("class"),46;case 39:return this.popState(),8;case 40:break;case 41:return this.popState(),this.popState(),41;case 42:return this.begin("class-body"),39;case 43:return this.popState(),41;case 44:return"EOF_IN_STRUCT";case 45:return"EDGE_STATE";case 46:return"OPEN_IN_STRUCT";case 47:break;case 48:return"MEMBER";case 49:return 83;case 50:return 75;case 51:return 76;case 52:return 78;case 53:return 54;case 54:return 56;case 55:return 49;case 56:return 50;case 57:return 81;case 58:this.popState();break;case 59:return"GENERICTYPE";case 60:this.begin("generic");break;case 61:this.popState();break;case 62:return"BQUOTE_STR";case 63:this.begin("bqstring");break;case 64:case 65:case 66:case 67:return 77;case 68:case 69:return 69;case 70:case 71:return 71;case 72:return 70;case 73:return 68;case 74:return 72;case 75:return 73;case 76:return 74;case 77:return 22;case 78:return 44;case 79:return 100;case 80:return 18;case 81:return"PLUS";case 82:return 87;case 83:return 61;case 84:case 85:return 89;case 86:return 90;case 87:case 88:return"EQUALS";case 89:return 60;case 90:return 12;case 91:return 14;case 92:return"PUNCTUATION";case 93:return 86;case 94:return 102;case 95:case 96:return 48;case 97:return 9}},"anonymous"),rules:[/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:%%(?!\{)*[^\n]*(\r?\n?)+)/,/^(?:%%[^\n]*(\r?\n)*)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:classDiagram-v2\b)/,/^(?:classDiagram\b)/,/^(?:\[\*\])/,/^(?:call[\s]+)/,/^(?:\([\s]*\))/,/^(?:\()/,/^(?:[^(]*)/,/^(?:\))/,/^(?:[^)]*)/,/^(?:["])/,/^(?:[^"]*)/,/^(?:["])/,/^(?:style\b)/,/^(?:classDef\b)/,/^(?:namespace\b)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:[{])/,/^(?:[}])/,/^(?:$)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:\[\*\])/,/^(?:class\b)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:[}])/,/^(?:[{])/,/^(?:[}])/,/^(?:$)/,/^(?:\[\*\])/,/^(?:[{])/,/^(?:[\n])/,/^(?:[^{}\n]*)/,/^(?:cssClass\b)/,/^(?:callback\b)/,/^(?:link\b)/,/^(?:click\b)/,/^(?:note for\b)/,/^(?:note\b)/,/^(?:<<)/,/^(?:>>)/,/^(?:href\b)/,/^(?:[~])/,/^(?:[^~]*)/,/^(?:~)/,/^(?:[`])/,/^(?:[^`]+)/,/^(?:[`])/,/^(?:_self\b)/,/^(?:_blank\b)/,/^(?:_parent\b)/,/^(?:_top\b)/,/^(?:\s*<\|)/,/^(?:\s*\|>)/,/^(?:\s*>)/,/^(?:\s*<)/,/^(?:\s*\*)/,/^(?:\s*o\b)/,/^(?:\s*\(\))/,/^(?:--)/,/^(?:\.\.)/,/^(?::{1}[^:\n;]+)/,/^(?::{3})/,/^(?:-)/,/^(?:\.)/,/^(?:\+)/,/^(?::)/,/^(?:,)/,/^(?:#)/,/^(?:#)/,/^(?:%)/,/^(?:=)/,/^(?:=)/,/^(?:\w+)/,/^(?:\[)/,/^(?:\])/,/^(?:[!"#$%&'*+,-.`?\\/])/,/^(?:[0-9]+)/,/^(?:[\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC])/,/^(?:\s)/,/^(?:\s)/,/^(?:$)/],conditions:{"namespace-body":{rules:[26,33,34,35,36,37,38,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},namespace:{rules:[26,29,30,31,32,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},"class-body":{rules:[26,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},class:{rules:[26,39,40,41,42,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},acc_descr_multiline:{rules:[11,12,26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},acc_descr:{rules:[9,26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},acc_title:{rules:[7,26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},callback_args:{rules:[22,23,26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},callback_name:{rules:[19,20,21,26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},href:{rules:[26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},struct:{rules:[26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},generic:{rules:[26,49,50,51,52,53,54,55,56,57,58,59,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},bqstring:{rules:[26,49,50,51,52,53,54,55,56,57,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},string:{rules:[24,25,26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,8,10,13,14,15,16,17,18,26,27,28,29,38,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97],inclusive:!0}}};k.lexer=r,mt(e,"Parser"),(zAe=new((e.prototype=k).Parser=e)).parser=zAe,GAe=zAe}),r9e=b(()=>{Tu(),Oc(),UAe=["#","+","~","-",""],qAe=class{static{mt(this,"ClassMember")}constructor(e,t){this.memberType=t,this.visibility="",this.classifier="",this.text="",t=lc(e,O()),this.parseMember(t)}getDisplayDetails(){let e=this.visibility+vc(this.id);"method"===this.memberType&&(e+=`(${vc(this.parameters.trim())})`,this.returnType)&&(e+=" : "+vc(this.returnType)),e=e.trim();var t=this.parseClassifier();return{displayText:e,cssStyle:t}}parseMember(e){let t="";"method"===this.memberType?(r=/([#+~-])?(.+)\((.*)\)([\s$*])?(.*)([$*])?/.exec(e))&&(i=r[1]?r[1].trim():"",UAe.includes(i)&&(this.visibility=i),this.id=r[2],this.parameters=r[3]?r[3].trim():"",t=r[4]?r[4].trim():"",this.returnType=r[5]?r[5].trim():"",""===t)&&(i=this.returnType.substring(this.returnType.length-1),/[$*]/.exec(i))&&(t=i,this.returnType=this.returnType.substring(0,this.returnType.length-1)):(r=e.length,i=e.substring(0,1),n=e.substring(r-1),UAe.includes(i)&&(this.visibility=i),/[$*]/.exec(n)&&(t=n),this.id=e.substring(""===this.visibility?0:1,""===t?r:r-1)),this.classifier=t,this.id=this.id.startsWith(" ")?" "+this.id.trim():this.id.trim();var r,n,i=(this.visibility?"\\"+this.visibility:"")+vc(this.id)+("method"===this.memberType?`(${vc(this.parameters)})`+(this.returnType?" : "+vc(this.returnType):""):"");this.text=i.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""}}}}),n9e=b(()=>{i6(),e(),Tu(),Oc(),i_(),ku(),r9e(),jAe="classId-",YAe=0,WAe=mt(e=>L.sanitizeText(e,O()),"sanitizeText"),HAe=class{constructor(){this.relations=[],this.classes=new Map,this.styleClasses=new Map,this.notes=[],this.interfaces=[],this.namespaces=new Map,this.namespaceCounter=0,this.functions=[],this.lineType={LINE:0,DOTTED_LINE:1},this.relationType={AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3,LOLLIPOP:4},this.setupToolTips=mt(e=>{let r=H(".mermaidTooltip");null===(r._groups||r)[0][0]&&(r=H("body").append("div").attr("class","mermaidTooltip").style("opacity",0)),H(e).select("svg").selectAll("g.node").on("mouseover",e=>{var t;null!==(e=H(e.currentTarget)).attr("title")&&(t=this.getBoundingClientRect(),r.transition().duration(200).style("opacity",".9"),r.text(e.attr("title")).style("left",window.scrollX+t.left+(t.right-t.left)/2+"px").style("top",window.scrollY+t.top-14+document.body.scrollTop+"px"),r.html(r.html().replace(/<br\/>/g,"<br/>")),e.classed("hover",!0))}).on("mouseout",e=>{r.transition().duration(500).style("opacity",0),H(e.currentTarget).classed("hover",!1)})},"setupToolTips"),this.direction="TB",this.setAccTitle=mh,this.getAccTitle=yh,this.setAccDescription=vh,this.getAccDescription=xh,this.setDiagramTitle=bh,this.getDiagramTitle=wh,this.getConfig=mt(()=>O().class,"getConfig"),this.functions.push(this.setupToolTips.bind(this)),this.clear(),this.addRelation=this.addRelation.bind(this),this.addClassesToNamespace=this.addClassesToNamespace.bind(this),this.addNamespace=this.addNamespace.bind(this),this.setCssClass=this.setCssClass.bind(this),this.addMembers=this.addMembers.bind(this),this.addClass=this.addClass.bind(this),this.setClassLabel=this.setClassLabel.bind(this),this.addAnnotation=this.addAnnotation.bind(this),this.addMember=this.addMember.bind(this),this.cleanupLabel=this.cleanupLabel.bind(this),this.addNote=this.addNote.bind(this),this.defineClass=this.defineClass.bind(this),this.setDirection=this.setDirection.bind(this),this.setLink=this.setLink.bind(this),this.bindFunctions=this.bindFunctions.bind(this),this.clear=this.clear.bind(this),this.setTooltip=this.setTooltip.bind(this),this.setClickEvent=this.setClickEvent.bind(this),this.setCssStyle=this.setCssStyle.bind(this)}static{mt(this,"ClassDB")}splitClassNameAndType(e){let t=L.sanitizeText(e,O()),r="",n=t;return 0<t.indexOf("~")&&(e=t.split("~"),n=WAe(e[0]),r=WAe(e[1])),{className:n,type:r}}setClassLabel(e,t){e=L.sanitizeText(e,O()),t=t&&WAe(t),e=this.splitClassNameAndType(e).className,this.classes.get(e).label=t,this.classes.get(e).text=""+t+(this.classes.get(e).type?`<${this.classes.get(e).type}>`:"")}addClass(e){var e=L.sanitizeText(e,O()),{className:e,type:t}=this.splitClassNameAndType(e);this.classes.has(e)||(e=L.sanitizeText(e,O()),this.classes.set(e,{id:e,type:t,label:e,text:e+(t?`<${t}>`:""),shape:"classBox",cssClasses:"default",methods:[],members:[],annotations:[],styles:[],domId:jAe+e+"-"+YAe}),YAe++)}addInterface(e,t){e={id:"interface"+this.interfaces.length,label:e,classId:t},this.interfaces.push(e)}lookUpDomId(e){if(e=L.sanitizeText(e,O()),this.classes.has(e))return this.classes.get(e).domId;throw new Error("Class not found: "+e)}clear(){this.relations=[],this.classes=new Map,this.notes=[],this.interfaces=[],this.functions=[],this.functions.push(this.setupToolTips.bind(this)),this.namespaces=new Map,this.namespaceCounter=0,this.direction="TB",fh()}getClass(e){return this.classes.get(e)}getClasses(){return this.classes}getRelations(){return this.relations}getNotes(){return this.notes}addRelation(e){D.debug("Adding relation: "+JSON.stringify(e));var t=[this.relationType.LOLLIPOP,this.relationType.AGGREGATION,this.relationType.COMPOSITION,this.relationType.DEPENDENCY,this.relationType.EXTENSION];e.relation.type1!==this.relationType.LOLLIPOP||t.includes(e.relation.type2)?e.relation.type2!==this.relationType.LOLLIPOP||t.includes(e.relation.type1)?(this.addClass(e.id1),this.addClass(e.id2)):(this.addClass(e.id1),this.addInterface(e.id2,e.id1),e.id2="interface"+(this.interfaces.length-1)):(this.addClass(e.id2),this.addInterface(e.id1,e.id2),e.id1="interface"+(this.interfaces.length-1)),e.id1=this.splitClassNameAndType(e.id1).className,e.id2=this.splitClassNameAndType(e.id2).className,e.relationTitle1=L.sanitizeText(e.relationTitle1.trim(),O()),e.relationTitle2=L.sanitizeText(e.relationTitle2.trim(),O()),this.relations.push(e)}addAnnotation(e,t){e=this.splitClassNameAndType(e).className,this.classes.get(e).annotations.push(t)}addMember(e,t){this.addClass(e),e=this.splitClassNameAndType(e).className,e=this.classes.get(e),"string"==typeof t&&((t=t.trim()).startsWith("<<")&&t.endsWith(">>")?e.annotations.push(WAe(t.substring(2,t.length-2))):0<t.indexOf(")")?e.methods.push(new qAe(t,"method")):t&&e.members.push(new qAe(t,"attribute")))}addMembers(t,e){Array.isArray(e)&&(e.reverse(),e.forEach(e=>this.addMember(t,e)))}addNote(e,t){t={id:"note"+this.notes.length,class:t,text:e},this.notes.push(t)}cleanupLabel(e){return e.startsWith(":")&&(e=e.substring(1)),WAe(e.trim())}setCssClass(e,r){e.split(",").forEach(e=>{let t=e;/\d/.exec(e[0])&&(t=jAe+t),(e=this.classes.get(t))&&(e.cssClasses+=" "+r)})}defineClass(e,n){for(let t of e){let r=this.styleClasses.get(t);void 0===r&&(r={id:t,styles:[],textStyles:[]},this.styleClasses.set(t,r)),n&&n.forEach(e=>{var t;/color/.exec(e)&&(t=e.replace("fill","bgFill"),r.textStyles.push(t)),r.styles.push(e)}),this.classes.forEach(e=>{e.cssClasses.includes(t)&&e.styles.push(...n.flatMap(e=>e.split(",")))})}}setTooltip(e,t){e.split(",").forEach(e=>{void 0!==t&&(this.classes.get(e).tooltip=WAe(t))})}getTooltip(e,t){return(t&&this.namespaces.has(t)?this.namespaces.get(t):this).classes.get(e).tooltip}setLink(e,r,n){let i=O();e.split(",").forEach(e=>{let t=e;/\d/.exec(e[0])&&(t=jAe+t),(e=this.classes.get(t))&&(e.link=e_.formatUrl(r,i),"sandbox"===i.securityLevel?e.linkTarget="_top":e.linkTarget="string"==typeof n?WAe(n):"_blank")}),this.setCssClass(e,"clickable")}setClickEvent(e,t,r){e.split(",").forEach(e=>{this.setClickFunc(e,t,r),this.classes.get(e).haveCallback=!0}),this.setCssClass(e,"clickable")}setClickFunc(e,n,i){if(e=L.sanitizeText(e,O()),"loose"===O().securityLevel&&void 0!==n&&this.classes.has(e)){let t=this.lookUpDomId(e),r=[];if("string"==typeof i){r=i.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let t=0;t<r.length;t++){let e=r[t].trim();e.startsWith('"')&&e.endsWith('"')&&(e=e.substr(1,e.length-2)),r[t]=e}}0===r.length&&r.push(t),this.functions.push(()=>{var e=document.querySelector(`[id="${t}"]`);null!==e&&e.addEventListener("click",()=>{e_.runFunc(n,...r)},!1)})}}bindFunctions(t){this.functions.forEach(e=>{e(t)})}getDirection(){return this.direction}setDirection(e){this.direction=e}addNamespace(e){this.namespaces.has(e)||(this.namespaces.set(e,{id:e,classes:new Map,children:{},domId:jAe+e+"-"+this.namespaceCounter}),this.namespaceCounter++)}getNamespace(e){return this.namespaces.get(e)}getNamespaces(){return this.namespaces}addClassesToNamespace(e,t){if(this.namespaces.has(e))for(var r of t)r=this.splitClassNameAndType(r).className,this.classes.get(r).parent=e,this.namespaces.get(e).classes.set(r,this.classes.get(r))}setCssStyle(e,t){var r=this.classes.get(e);if(t&&r)for(var n of t)n.includes(",")?r.styles.push(...n.split(",")):r.styles.push(n)}getArrowMarker(e){let t;switch(e){case 0:t="aggregation";break;case 1:t="extension";break;case 2:t="composition";break;case 3:t="dependency";break;case 4:t="lollipop";break;default:t="none"}return t}getData(){var e,t,r,n,i,a=[],s=[],o=O();for(e of this.namespaces.keys()){var l=this.namespaces.get(e);l&&(l={id:l.id,label:l.id,isGroup:!0,padding:o.class.padding??16,shape:"rect",cssStyles:["fill: none","stroke: black"],look:o.look},a.push(l))}for(t of this.classes.keys()){var c,h=this.classes.get(t);h&&((c=h).parentId=h.parent,c.look=o.look,a.push(c))}let u=0;for(r of this.notes){u++;var d={id:r.id,label:r.text,isGroup:!1,shape:"note",padding:o.class.padding??6,cssStyles:["text-align: left","white-space: nowrap","fill: "+o.themeVariables.noteBkgColor,"stroke: "+o.themeVariables.noteBorderColor],look:o.look};a.push(d),(d=this.classes.get(r.class)?.id??"")&&(d={id:"edgeNote"+u,start:r.id,end:d,type:"normal",thickness:"normal",classes:"relation",arrowTypeStart:"none",arrowTypeEnd:"none",arrowheadStyle:"",labelStyle:[""],style:["fill: none"],pattern:"dotted",look:o.look},s.push(d))}for(n of this.interfaces){var p={id:n.id,label:n.label,isGroup:!1,shape:"rect",cssStyles:["opacity: 0;"],look:o.look};a.push(p)}u=0;for(i of this.relations){u++;var g={id:n_(i.id1,i.id2,{prefix:"id",counter:u}),start:i.id1,end:i.id2,type:"normal",label:i.title,labelpos:"c",thickness:"normal",classes:"relation",arrowTypeStart:this.getArrowMarker(i.relation.type1),arrowTypeEnd:this.getArrowMarker(i.relation.type2),startLabelRight:"none"===i.relationTitle1?"":i.relationTitle1,endLabelLeft:"none"===i.relationTitle2?"":i.relationTitle2,arrowheadStyle:"",labelStyle:["display: inline-block"],style:i.style||"",pattern:1==i.relation.lineType?"dashed":"solid",look:o.look};s.push(g)}return{nodes:a,edges:s,other:{},config:o,direction:this.getDirection()}}}}),i9e=b(()=>{nue(),VAe=mt(e=>`g.classGroup text { + fill: ${e.nodeBorder||e.classText}; + stroke: none; + font-family: ${e.fontFamily}; + font-size: 10px; + + .title { + font-weight: bolder; + } + +} + +.nodeLabel, .edgeLabel { + color: ${e.classText}; +} +.edgeLabel .label rect { + fill: ${e.mainBkg}; +} +.label text { + fill: ${e.classText}; +} + +.labelBkg { + background: ${e.mainBkg}; +} +.edgeLabel .label span { + background: ${e.mainBkg}; +} + +.classTitle { + font-weight: bolder; +} +.node rect, + .node circle, + .node ellipse, + .node polygon, + .node path { + fill: ${e.mainBkg}; + stroke: ${e.nodeBorder}; + stroke-width: 1px; + } + + +.divider { + stroke: ${e.nodeBorder}; + stroke-width: 1; +} + +g.clickable { + cursor: pointer; +} + +g.classGroup rect { + fill: ${e.mainBkg}; + stroke: ${e.nodeBorder}; +} + +g.classGroup line { + stroke: ${e.nodeBorder}; + stroke-width: 1; +} + +.classLabel .box { + stroke: none; + stroke-width: 0; + fill: ${e.mainBkg}; + opacity: 0.5; +} + +.classLabel .label { + fill: ${e.nodeBorder}; + font-size: 10px; +} + +.relation { + stroke: ${e.lineColor}; + stroke-width: 1; + fill: none; +} + +.dashed-line{ + stroke-dasharray: 3; +} + +.dotted-line{ + stroke-dasharray: 1 2; +} + +#compositionStart, .composition { + fill: ${e.lineColor} !important; + stroke: ${e.lineColor} !important; + stroke-width: 1; +} + +#compositionEnd, .composition { + fill: ${e.lineColor} !important; + stroke: ${e.lineColor} !important; + stroke-width: 1; +} + +#dependencyStart, .dependency { + fill: ${e.lineColor} !important; + stroke: ${e.lineColor} !important; + stroke-width: 1; +} + +#dependencyStart, .dependency { + fill: ${e.lineColor} !important; + stroke: ${e.lineColor} !important; + stroke-width: 1; +} + +#extensionStart, .extension { + fill: transparent !important; + stroke: ${e.lineColor} !important; + stroke-width: 1; +} + +#extensionEnd, .extension { + fill: transparent !important; + stroke: ${e.lineColor} !important; + stroke-width: 1; +} + +#aggregationStart, .aggregation { + fill: transparent !important; + stroke: ${e.lineColor} !important; + stroke-width: 1; +} + +#aggregationEnd, .aggregation { + fill: transparent !important; + stroke: ${e.lineColor} !important; + stroke-width: 1; +} + +#lollipopStart, .lollipop { + fill: ${e.mainBkg} !important; + stroke: ${e.lineColor} !important; + stroke-width: 1; +} + +#lollipopEnd, .lollipop { + fill: ${e.mainBkg} !important; + stroke: ${e.lineColor} !important; + stroke-width: 1; +} + +.edgeTerminals { + font-size: 11px; + line-height: initial; +} + +.classTitleText { + text-anchor: middle; + font-size: 18px; + fill: ${e.textColor}; +} + ${Hhe()} +`,"getStyles"),XAe=VAe}),a9e=b(()=>{Tu(),e(),iO(),Qhe(),Jhe(),i_(),KAe=mt((e,t="TB")=>{if(!e.doc)return t;let r=t;for(var n of e.doc)"dir"===n.stmt&&(r=n.value);return r},"getDir"),ZAe=mt(function(e,t){return t.db.getClasses()},"getClasses"),QAe=mt(async function(e,t,r,n){D.info("REF0:"),D.info("Drawing class diagram (v3)",t);var{securityLevel:i,state:a,layout:s}=O(),o=n.db.getData(),i=YD(t,i);o.type=n.type,o.layoutAlgorithm=Phe(s),o.nodeSpacing=a?.nodeSpacing||50,o.rankSpacing=a?.rankSpacing||50,o.markers=["aggregation","extension","composition","dependency","lollipop"],o.diagramId=t,await Ohe(o,i),e_.insertTitle(i,"classDiagramTitleText",a?.titleTopMargin??25,n.db.getDiagramTitle()),Bhe(i,8,"classDiagram",a?.useMaxWidth??!0)},"draw"),JAe={getClasses:ZAe,draw:QAe,getDir:KAe}}),s9e={};OFe(s9e,{diagram:()=>o9e});var o9e,l9e=b(()=>{t9e(),n9e(),i9e(),a9e(),o9e={parser:GAe,get db(){return new HAe},renderer:JAe,styles:XAe,init:mt(e=>{e.class||(e.class={}),e.class.arrowMarkerAbsolute=e.arrowMarkerAbsolute},"init")}}),c9e={};OFe(c9e,{diagram:()=>h9e});var h9e,u9e,d9e,p9e,g9e,f9e,m9e,y9e,v9e,x9e,b9e,w9e,k9e,T9e,E9e,C9e,_9e,S9e,A9e,L9e,N9e,I9e,R9e,M9e,D9e,O9e,P9e,B9e,$9e,F9e,z9e,G9e,U9e,q9e,j9e,Y9e,W9e=b(()=>{t9e(),n9e(),i9e(),a9e(),h9e={parser:GAe,get db(){return new HAe},renderer:JAe,styles:XAe,init:mt(e=>{e.class||(e.class={}),e.class.arrowMarkerAbsolute=e.arrowMarkerAbsolute},"init")}}),H9e=b(()=>{function e(){this.yy={}}var t=mt(function(e,t,r,n){for(r=r||{},n=e.length;n--;r[e[n]]=t);return r},"o"),r=[1,2],n=[1,3],i=[1,4],a=[2,4],s=[1,9],o=[1,11],l=[1,16],c=[1,17],h=[1,18],u=[1,19],d=[1,33],p=[1,20],g=[1,21],f=[1,22],m=[1,23],y=[1,24],v=[1,26],x=[1,27],b=[1,28],w=[1,29],k=[1,30],T=[1,31],E=[1,32],C=[1,35],_=[1,36],S=[1,37],A=[1,38],L=[1,34],N=[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],I=[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],R=[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],r={trace:mt(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,"--\x3e":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:"--\x3e",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:mt(function(e,t,r,n,i,a,s){var o=a.length-1;switch(i){case 3:return n.setRootDoc(a[o]),a[o];case 4:this.$=[];break;case 5:"nl"!=a[o]&&(a[o-1].push(a[o]),this.$=a[o-1]);break;case 6:case 7:this.$=a[o];break;case 8:this.$="nl";break;case 12:this.$=a[o];break;case 13:(c=a[o-1]).description=n.trimColon(a[o]),this.$=c;break;case 14:this.$={stmt:"relation",state1:a[o-2],state2:a[o]};break;case 15:c=n.trimColon(a[o]),this.$={stmt:"relation",state1:a[o-3],state2:a[o-1],description:c};break;case 19:this.$={stmt:"state",id:a[o-3],type:"default",description:"",doc:a[o-1]};break;case 20:var l,c=a[o],h=a[o-2].trim();a[o].match(":")&&(c=(l=a[o].split(":"))[0],h=[h,l[1]]),this.$={stmt:"state",id:c,type:"default",description:h};break;case 21:this.$={stmt:"state",id:a[o-3],type:"default",description:a[o-5],doc:a[o-1]};break;case 22:this.$={stmt:"state",id:a[o],type:"fork"};break;case 23:this.$={stmt:"state",id:a[o],type:"join"};break;case 24:this.$={stmt:"state",id:a[o],type:"choice"};break;case 25:this.$={stmt:"state",id:n.getDividerId(),type:"divider"};break;case 26:this.$={stmt:"state",id:a[o-1].trim(),note:{position:a[o-2].trim(),text:a[o].trim()}};break;case 29:this.$=a[o].trim(),n.setAccTitle(this.$);break;case 30:case 31:this.$=a[o].trim(),n.setAccDescription(this.$);break;case 32:this.$={stmt:"click",id:a[o-3],url:a[o-2],tooltip:a[o-1]};break;case 33:this.$={stmt:"click",id:a[o-3],url:a[o-1],tooltip:""};break;case 34:case 35:this.$={stmt:"classDef",id:a[o-1].trim(),classes:a[o].trim()};break;case 36:this.$={stmt:"style",id:a[o-1].trim(),styleClass:a[o].trim()};break;case 37:this.$={stmt:"applyClass",id:a[o-1].trim(),styleClass:a[o].trim()};break;case 38:n.setDirection("TB"),this.$={stmt:"dir",value:"TB"};break;case 39:n.setDirection("BT"),this.$={stmt:"dir",value:"BT"};break;case 40:n.setDirection("RL"),this.$={stmt:"dir",value:"RL"};break;case 41:n.setDirection("LR"),this.$={stmt:"dir",value:"LR"};break;case 44:case 45:this.$={stmt:"state",id:a[o].trim(),type:"default",description:""};break;case 46:case 47:this.$={stmt:"state",id:a[o-2].trim(),classes:[a[o].trim()],type:"default",description:""}}},"anonymous"),table:[{3:1,4:r,5:n,6:i},{1:[3]},{3:5,4:r,5:n,6:i},{3:6,4:r,5:n,6:i},t([1,4,5,16,17,19,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],a,{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:c,19:h,22:u,24:d,25:p,26:g,27:f,28:m,29:y,32:25,33:v,35:x,37:b,38:w,41:k,45:T,48:E,51:C,52:_,53:S,54:A,57:L},t(N,[2,5]),{9:39,10:12,11:13,12:14,13:15,16:l,17:c,19:h,22:u,24:d,25:p,26:g,27:f,28:m,29:y,32:25,33:v,35:x,37:b,38:w,41:k,45:T,48:E,51:C,52:_,53:S,54:A,57:L},t(N,[2,7]),t(N,[2,8]),t(N,[2,9]),t(N,[2,10]),t(N,[2,11]),t(N,[2,12],{14:[1,40],15:[1,41]}),t(N,[2,16]),{18:[1,42]},t(N,[2,18],{20:[1,43]}),{23:[1,44]},t(N,[2,22]),t(N,[2,23]),t(N,[2,24]),t(N,[2,25]),{30:45,31:[1,46],59:[1,47],60:[1,48]},t(N,[2,28]),{34:[1,49]},{36:[1,50]},t(N,[2,31]),{13:51,24:d,57:L},{42:[1,52],44:[1,53]},{46:[1,54]},{49:[1,55]},t(I,[2,44],{58:[1,56]}),t(I,[2,45],{58:[1,57]}),t(N,[2,38]),t(N,[2,39]),t(N,[2,40]),t(N,[2,41]),t(N,[2,6]),t(N,[2,13]),{13:58,24:d,57:L},t(N,[2,17]),t(R,a,{7:59}),{24:[1,60]},{24:[1,61]},{23:[1,62]},{24:[2,48]},{24:[2,49]},t(N,[2,29]),t(N,[2,30]),{39:[1,63],40:[1,64]},{43:[1,65]},{43:[1,66]},{47:[1,67]},{50:[1,68]},{24:[1,69]},{24:[1,70]},t(N,[2,14],{14:[1,71]}),{4:s,5:o,8:8,9:10,10:12,11:13,12:14,13:15,16:l,17:c,19:h,21:[1,72],22:u,24:d,25:p,26:g,27:f,28:m,29:y,32:25,33:v,35:x,37:b,38:w,41:k,45:T,48:E,51:C,52:_,53:S,54:A,57:L},t(N,[2,20],{20:[1,73]}),{31:[1,74]},{24:[1,75]},{39:[1,76]},{39:[1,77]},t(N,[2,34]),t(N,[2,35]),t(N,[2,36]),t(N,[2,37]),t(I,[2,46]),t(I,[2,47]),t(N,[2,15]),t(N,[2,19]),t(R,a,{7:78}),t(N,[2,26]),t(N,[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:c,19:h,21:[1,81],22:u,24:d,25:p,26:g,27:f,28:m,29:y,32:25,33:v,35:x,37:b,38:w,41:k,45:T,48:E,51:C,52:_,53:S,54:A,57:L},t(N,[2,32]),t(N,[2,33]),t(N,[2,21])],defaultActions:{5:[2,1],6:[2,2],47:[2,48],48:[2,49]},parseError:mt(function(e,t){var r;if(!t.recoverable)throw(r=new Error(e)).hash=t,r;this.trace(e)},"parseError"),parse:mt(function(e){var t,r=this,n=[0],i=[],a=[null],s=[],o=this.table,l="",c=0,h=0,u=0,d=1,p=s.slice.call(arguments,1),g=Object.create(this.lexer),f={yy:{}};for(t in this.yy)Object.prototype.hasOwnProperty.call(this.yy,t)&&(f.yy[t]=this.yy[t]);g.setInput(e,f.yy),f.yy.lexer=g,f.yy.parser=this,"u"<typeof g.yylloc&&(g.yylloc={});var m=g.yylloc,y=(s.push(m),g.options&&g.options.ranges);function v(){var e=i.pop()||g.lex()||d;return"number"!=typeof e&&(e instanceof Array&&(e=(i=e).pop()),e=r.symbols_[e]||e),e}"function"==typeof f.yy.parseError?this.parseError=f.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,mt(function(e){n.length=n.length-2*e,a.length=a.length-e,s.length=s.length-e},"popStack"),mt(v,"lex");for(var x,b,w,k,T,E,C,_={};;){if(w=n[n.length-1],"u"<typeof(k=this.defaultActions[w]||((null===x||"u"<typeof x)&&(x=v()),o[w]&&o[w][x]))||!k.length||!k[0]){var S,A=[];for(T in o[w])this.terminals_[T]&&2<T&&A.push("'"+this.terminals_[T]+"'");S=g.showPosition?"Parse error on line "+(c+1)+`: +`+g.showPosition()+` +Expecting `+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(c+1)+": Unexpected "+(x==d?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(S,{text:g.match,token:this.terminals_[x]||x,line:g.yylineno,loc:m,expected:A})}if(k[0]instanceof Array&&1<k.length)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+x);switch(k[0]){case 1:n.push(x),a.push(g.yytext),s.push(g.yylloc),n.push(k[1]),x=null,b?(x=b,b=null):(h=g.yyleng,l=g.yytext,c=g.yylineno,m=g.yylloc,0<u&&u--);break;case 2:if(E=this.productions_[k[1]][1],_.$=a[a.length-E],_._$={first_line:s[s.length-(E||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(E||1)].first_column,last_column:s[s.length-1].last_column},y&&(_._$.range=[s[s.length-(E||1)].range[0],s[s.length-1].range[1]]),typeof(C=this.performAction.apply(_,[l,h,c,f.yy,k[1],a,s].concat(p)))<"u")return C;E&&(n=n.slice(0,-1*E*2),a=a.slice(0,-1*E),s=s.slice(0,-1*E)),n.push(this.productions_[k[1]][0]),a.push(_.$),s.push(_._$),C=o[n[n.length-2]][n[n.length-1]],n.push(C);break;case 3:return!0}}return!0},"parse")},n={EOF:1,parseError:mt(function(e,t){if(!this.yy.parser)throw new Error(e);this.yy.parser.parseError(e,t)},"parseError"),setInput:mt(function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:mt(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},"input"),unput:mt(function(e){var t=e.length,r=e.split(/(?:\r\n?|\n)/g),e=(this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t,this.match.split(/(?:\r\n?|\n)/g)),n=(this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),r.length-1&&(this.yylineno-=r.length-1),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:r?(r.length===e.length?this.yylloc.first_column:0)+e[e.length-r.length].length-r[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[n[0],n[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},"unput"),more:mt(function(){return this._more=!0,this},"more"),reject:mt(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):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})},"reject"),less:mt(function(e){this.unput(this.match.slice(e))},"less"),pastInput:mt(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(20<e.length?"...":"")+e.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:mt(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(20<e.length?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:mt(function(){var e=this.pastInput(),t=new Array(e.length+1).join("-");return e+this.upcomingInput()+` +`+t+"^"},"showPosition"),test_match:mt(function(e,t){var r,n;if(this.options.backtrack_lexer&&(n={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges)&&(n.yylloc.range=this.yylloc.range.slice(0)),(r=e[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],r=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack)for(var i in n)this[i]=n[i];return!1},"test_match"),next:mt(function(){if(this.done)return this.EOF;var e,t,r,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((r=this._input.match(this.rules[i[a]]))&&(!t||r[0].length>t[0].length)){if(t=r,n=a,this.options.backtrack_lexer){if(!1!==(e=this.test_match(r,i[a])))return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?!1!==(e=this.test_match(t,i[n]))&&e:""===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:mt(function(){return this.next()||this.lex()},"lex"),begin:mt(function(e){this.conditionStack.push(e)},"begin"),popState:mt(function(){return 0<this.conditionStack.length-1?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:mt(function(){return(this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]]:this.conditions.INITIAL).rules},"_currentRules"),topState:mt(function(e){return 0<=(e=this.conditionStack.length-1-Math.abs(e||0))?this.conditionStack[e]:"INITIAL"},"topState"),pushState:mt(function(e){this.begin(e)},"pushState"),stateStackSize:mt(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:mt(function(e,t,r,n){switch(r){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:case 9:break;case 10:return 5;case 11:case 12:case 13:case 14:break;case 15:return this.pushState("SCALE"),17;case 16:return 18;case 17:this.popState();break;case 18:return this.begin("acc_title"),33;case 19:return this.popState(),"acc_title_value";case 20:return this.begin("acc_descr"),35;case 21:return this.popState(),"acc_descr_value";case 22:this.begin("acc_descr_multiline");break;case 23:this.popState();break;case 24:return"acc_descr_multiline_value";case 25:return this.pushState("CLASSDEF"),41;case 26:return this.popState(),this.pushState("CLASSDEFID"),"DEFAULT_CLASSDEF_ID";case 27:return this.popState(),this.pushState("CLASSDEFID"),42;case 28:return this.popState(),43;case 29:return this.pushState("CLASS"),48;case 30:return this.popState(),this.pushState("CLASS_STYLE"),49;case 31:return this.popState(),50;case 32:return this.pushState("STYLE"),45;case 33:return this.popState(),this.pushState("STYLEDEF_STYLES"),46;case 34:return this.popState(),47;case 35:return this.pushState("SCALE"),17;case 36:return 18;case 37:this.popState();break;case 38:this.pushState("STATE");break;case 39:return this.popState(),t.yytext=t.yytext.slice(0,-8).trim(),25;case 40:return this.popState(),t.yytext=t.yytext.slice(0,-8).trim(),26;case 41:return this.popState(),t.yytext=t.yytext.slice(0,-10).trim(),27;case 42:return this.popState(),t.yytext=t.yytext.slice(0,-8).trim(),25;case 43:return this.popState(),t.yytext=t.yytext.slice(0,-8).trim(),26;case 44:return this.popState(),t.yytext=t.yytext.slice(0,-10).trim(),27;case 45:return 51;case 46:return 52;case 47:return 53;case 48:return 54;case 49:this.pushState("STATE_STRING");break;case 50:return this.pushState("STATE_ID"),"AS";case 51:return this.popState(),"ID";case 52:this.popState();break;case 53:return"STATE_DESCR";case 54:return 19;case 55:this.popState();break;case 56:return this.popState(),this.pushState("struct"),20;case 57:break;case 58:return this.popState(),21;case 59:break;case 60:return this.begin("NOTE"),29;case 61:return this.popState(),this.pushState("NOTE_ID"),59;case 62:return this.popState(),this.pushState("NOTE_ID"),60;case 63:this.popState(),this.pushState("FLOATING_NOTE");break;case 64:return this.popState(),this.pushState("FLOATING_NOTE_ID"),"AS";case 65:break;case 66:return"NOTE_TEXT";case 67:return this.popState(),"ID";case 68:return this.popState(),this.pushState("NOTE_TEXT"),24;case 69:return this.popState(),t.yytext=t.yytext.substr(2).trim(),31;case 70:return this.popState(),t.yytext=t.yytext.slice(0,-8).trim(),31;case 71:case 72:return 6;case 73:return 16;case 74:return 57;case 75:return 24;case 76:return t.yytext=t.yytext.trim(),14;case 77:return 15;case 78:return 28;case 79:return 58;case 80:return 5;case 81: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,/^(?:[^\}]%%[^\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,/^(?:.*<<fork>>)/i,/^(?:.*<<join>>)/i,/^(?:.*<<choice>>)/i,/^(?:.*\[\[fork\]\])/i,/^(?:.*\[\[join\]\])/i,/^(?:.*\[\[choice\]\])/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:["])/i,/^(?:\s*as\s+)/i,/^(?:[^\n\{]*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[^\n\s\{]+)/i,/^(?:\n)/i,/^(?:\{)/i,/^(?:%%(?!\{)[^\n]*)/i,/^(?:\})/i,/^(?:[\n])/i,/^(?:note\s+)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:")/i,/^(?:\s*as\s*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[^\n]*)/i,/^(?:\s*[^:\n\s\-]+)/i,/^(?:\s*:[^:\n;]+)/i,/^(?:[\s\S]*?end note\b)/i,/^(?:stateDiagram\s+)/i,/^(?:stateDiagram-v2\s+)/i,/^(?:hide empty description\b)/i,/^(?:\[\*\])/i,/^(?:[^:\n\s\-\{]+)/i,/^(?:\s*:[^:\n;]+)/i,/^(?:-->)/i,/^(?:--)/i,/^(?::::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{LINE:{rules:[12,13],inclusive:!1},struct:{rules:[12,13,25,29,32,38,45,46,47,48,57,58,59,60,74,75,76,77,78],inclusive:!1},FLOATING_NOTE_ID:{rules:[67],inclusive:!1},FLOATING_NOTE:{rules:[64,65,66],inclusive:!1},NOTE_TEXT:{rules:[69,70],inclusive:!1},NOTE_ID:{rules:[68],inclusive:!1},NOTE:{rules:[61,62,63],inclusive:!1},STYLEDEF_STYLEOPTS:{rules:[],inclusive:!1},STYLEDEF_STYLES:{rules:[34],inclusive:!1},STYLE_IDS:{rules:[],inclusive:!1},STYLE:{rules:[33],inclusive:!1},CLASS_STYLE:{rules:[31],inclusive:!1},CLASS:{rules:[30],inclusive:!1},CLASSDEFID:{rules:[28],inclusive:!1},CLASSDEF:{rules:[26,27],inclusive:!1},acc_descr_multiline:{rules:[23,24],inclusive:!1},acc_descr:{rules:[21],inclusive:!1},acc_title:{rules:[19],inclusive:!1},SCALE:{rules:[16,17,36,37],inclusive:!1},ALIAS:{rules:[],inclusive:!1},STATE_ID:{rules:[51],inclusive:!1},STATE_STRING:{rules:[52,53],inclusive:!1},FORK_STATE:{rules:[],inclusive:!1},STATE:{rules:[12,13,39,40,41,42,43,44,49,50,54,55,56],inclusive:!1},ID:{rules:[12,13],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,13,14,15,18,20,22,25,29,32,35,38,56,60,71,72,73,74,75,76,77,79,80,81],inclusive:!0}}};r.lexer=n,mt(e,"Parser"),(u9e=new((e.prototype=r).Parser=e)).parser=u9e,d9e=u9e}),V9e=b(()=>{g9e="root",f9e="relation",m9e="classDef",y9e="style",v9e="applyClass",x9e="default",w9e="fill:none",k9e="fill: #333",T9e="text",E9e="normal",C9e="rect",_9e="rectWithTitle",S9e="stateStart",A9e="stateEnd",L9e=b9e="divider",N9e="roundedWithTitle",R9e="noteGroup",D9e=(M9e="statediagram")+"-state",P9e=(O9e="transition")+" note-edge",B9e=M9e+"-note",$9e=M9e+"-cluster",F9e=M9e+"-cluster-alt",U9e=p9e="state",j9e=(q9e="----")+(G9e=I9e="note"),Y9e=""+q9e+(z9e="parent")});function X9e(e="",t=0,r="",n=q9e){return n=null!==r&&0<r.length?""+n+r:"",U9e+`-${e}${n}-`+t}function K9e(e,t,r){var n;t.id&&"</join></fork>"!==t.id&&"</choice>"!==t.id&&(t.cssClasses&&(Array.isArray(t.cssCompiledStyles)||(t.cssCompiledStyles=[]),t.cssClasses.split(" ").forEach(e=>{(e=r.get(e))&&(t.cssCompiledStyles=[...t.cssCompiledStyles??[],...e.styles])})),(n=e.find(e=>e.id===t.id))?Object.assign(n,t):e.push(t))}function Z9e(e){return e?.classes?.join(" ")??""}function Q9e(e){return e?.styles??[]}var J9e,eLe,tLe,rLe,nLe,iLe,aLe,sLe,oLe,lLe,cLe,hLe,uLe,dLe,pLe,gLe,fLe,mLe,yLe,vLe,xLe,bLe,wLe,kLe,TLe,ELe,CLe,_Le,SLe,ALe,LLe,NLe,ILe,RLe,MLe,DLe,OLe,PLe=b(()=>{Tu(),e(),Oc(),V9e(),J9e=new Map,eLe=0,mt(X9e,"stateDomId"),tLe=mt((r,e,n,i,a,s,o,l)=>{D.trace("items",e),e.forEach(e=>{switch(e.stmt){case p9e:case x9e:nLe(r,e,n,i,a,s,o,l);break;case f9e:nLe(r,e.state1,n,i,a,s,o,l),nLe(r,e.state2,n,i,a,s,o,l);var t={id:"edge"+eLe,start:e.state1.id,end:e.state2.id,arrowhead:"normal",arrowTypeEnd:"arrow_barb",style:w9e,labelStyle:"",label:L.sanitizeText(e.description??"",O()),arrowheadStyle:k9e,labelpos:"c",labelType:T9e,thickness:E9e,classes:O9e,look:o};a.push(t),eLe++}})},"setupDoc"),rLe=mt((e,t="TB")=>{let r=t;if(e.doc)for(var n of e.doc)"dir"===n.stmt&&(r=n.value);return r},"getDir"),mt(K9e,"insertOrUpdateNode"),mt(Z9e,"getClassesFromDbInfo"),mt(Q9e,"getStylesFromDbInfo"),nLe=mt((r,n,e,i,a,t,s,o)=>{var l=n.id,c=e.get(l),h=Z9e(c),u=Q9e(c),d=O();if(D.info("dataFetcher parsedItem",n,c,u),"root"!==l){let e=C9e;if(!0===n.start?e=S9e:!1===n.start&&(e=A9e),n.type!==x9e&&(e=n.type),J9e.get(l)||J9e.set(l,{id:l,shape:e,description:L.sanitizeText(l,d),cssClasses:h+" "+D9e,cssStyles:u}),c=J9e.get(l),n.description&&(Array.isArray(c.description)?(c.shape=_9e,c.description.push(n.description)):c.description?.length&&0<c.description.length?(c.shape=_9e,c.description===l?c.description=[n.description]:c.description=[c.description,n.description]):(c.shape=C9e,c.description=n.description),c.description=L.sanitizeTextOrArray(c.description,d)),1===c.description?.length&&c.shape===_9e&&("group"===c.type?c.shape=N9e:c.shape=C9e),!c.type&&n.doc&&(D.info("Setting cluster for XCX",l,rLe(n)),c.type="group",c.isGroup=!0,c.dir=rLe(n),c.shape=n.type===b9e?L9e:N9e,c.cssClasses=c.cssClasses+` ${$9e} `+(t?F9e:"")),(h={labelStyle:"",shape:c.shape,label:c.description,cssClasses:c.cssClasses,cssCompiledStyles:[],cssStyles:c.cssStyles,id:l,dir:c.dir,domId:X9e(l,eLe),type:c.type,isGroup:"group"===c.type,padding:8,rx:10,ry:10,look:s}).shape===L9e&&(h.label=""),r&&"root"!==r.id&&(D.trace("Setting node ",l," to be child of its parent ",r.id),h.parentId=r.id),h.centerLabel=!0,n.note){u={labelStyle:"",shape:I9e,label:n.note.text,cssClasses:B9e,cssStyles:[],cssCompiledStyles:[],id:l+j9e+"-"+eLe,domId:X9e(l,eLe,G9e),type:c.type,isGroup:"group"===c.type,padding:d.flowchart?.padding,look:s,position:n.note.position},r=l+Y9e,d={labelStyle:"",shape:R9e,label:n.note.text,cssClasses:c.cssClasses,cssStyles:[],id:l+Y9e,domId:X9e(l,eLe,z9e),type:"group",isGroup:!0,padding:16,look:s,position:n.note.position},eLe++,u.parentId=d.id=r,K9e(i,d,o),K9e(i,u,o),K9e(i,h,o);let e=l,t=u.id;"left of"===n.note.position&&(e=u.id,t=l),a.push({id:e+"-"+t,start:e,end:t,arrowhead:"none",arrowTypeEnd:"",style:w9e,labelStyle:"",classes:P9e,arrowheadStyle:k9e,labelpos:"c",labelType:T9e,thickness:E9e,look:s})}else K9e(i,h,o)}n.doc&&(D.trace("Adding nodes children "),tLe(n,n.doc,e,i,a,!t,s,o))},"dataFetcher"),iLe=mt(()=>{J9e.clear(),eLe=0},"reset")}),BLe=b(()=>{Tu(),e(),iO(),Qhe(),Jhe(),i_(),V9e(),aLe=mt((e,t="TB")=>{if(!e.doc)return t;let r=t;for(var n of e.doc)"dir"===n.stmt&&(r=n.value);return r},"getDir"),sLe=mt(function(e,t){return t.db.getClasses()},"getClasses"),oLe=mt(async function(e,t,r,n){D.info("REF0:"),D.info("Drawing state diagram (v2)",t);var{securityLevel:i,state:a,layout:s}=O();n.db.extract(n.db.getRootDocV2());let o=n.db.getData(),l=YD(t,i);o.type=n.type,o.layoutAlgorithm=s,o.nodeSpacing=a?.nodeSpacing||50,o.rankSpacing=a?.rankSpacing||50,o.markers=["barb"],o.diagramId=t,await Ohe(o,l);try{("function"==typeof n.db.getLinks?n.db.getLinks():new Map).forEach((a,e)=>{let s="string"==typeof e?e:"string"==typeof e?.id?e.id:"";if(s){let e=l.node()?.querySelectorAll("g"),t,r,n,i;e?.forEach(e=>{e.textContent?.trim()===s&&(t=e)}),t?(r=t.parentNode)?(n=document.createElementNS("http://www.w3.org/2000/svg","a"),i=a.url.replace(/^"+|"+$/g,""),n.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",i),n.setAttribute("target","_blank"),a.tooltip&&(i=a.tooltip.replace(/^"+|"+$/g,""),n.setAttribute("title",i)),r.replaceChild(n,t),n.appendChild(t),D.info("🔗 Wrapped node in <a> tag for:",s,a.url)):D.warn("⚠️ Node has no parent, cannot wrap:",s):D.warn("⚠️ Could not find node matching text:",s)}else D.warn("⚠️ Invalid or missing stateId from key:",JSON.stringify(e))})}catch(e){D.error("❌ Error injecting clickable links:",e)}e_.insertTitle(l,"statediagramTitleText",a?.titleTopMargin??25,n.db.getDiagramTitle()),Bhe(l,8,M9e,a?.useMaxWidth??!0)},"draw"),lLe={getClasses:sLe,draw:oLe,getDir:aLe}}),$Le=b(()=>{Tu(),e(),i_(),Oc(),ku(),PLe(),BLe(),V9e(),cLe={START_NODE:"[*]",START_TYPE:"start",END_NODE:"[*]",END_TYPE:"end",COLOR_KEYWORD:"color",FILL_KEYWORD:"fill",BG_FILL:"bgFill",STYLECLASS_SEP:","},hLe=mt(()=>new Map,"newClassesList"),uLe=mt(()=>({relations:[],states:new Map,documents:{}}),"newDoc"),dLe=mt(e=>JSON.parse(JSON.stringify(e)),"clone"),pLe=class{constructor(e){this.version=e,this.nodes=[],this.edges=[],this.rootDoc=[],this.classes=hLe(),this.documents={root:uLe()},this.currentDocument=this.documents.root,this.startEndCount=0,this.dividerCnt=0,this.links=new Map,this.getAccTitle=yh,this.setAccTitle=mh,this.getAccDescription=xh,this.setAccDescription=vh,this.setDiagramTitle=bh,this.getDiagramTitle=wh,this.clear(),this.setRootDoc=this.setRootDoc.bind(this),this.getDividerId=this.getDividerId.bind(this),this.setDirection=this.setDirection.bind(this),this.trimColon=this.trimColon.bind(this)}static{mt(this,"StateDB")}static{this.relationType={AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3}}extract(e){this.clear(!0);for(var t of Array.isArray(e)?e:e.doc)switch(t.stmt){case p9e:this.addState(t.id.trim(),t.type,t.doc,t.description,t.note);break;case f9e:this.addRelation(t.state1,t.state2,t.description);break;case m9e:this.addStyleClass(t.id.trim(),t.classes);break;case y9e:this.handleStyleDef(t);break;case v9e:this.setCssClass(t.id.trim(),t.styleClass);break;case"click":this.addLink(t.id,t.url,t.tooltip)}var r,e=this.getStates(),n=O();iLe(),nLe(void 0,this.getRootDocV2(),e,this.nodes,this.edges,!0,n.look,this.classes);for(r of this.nodes)if(Array.isArray(r.label)){if(r.description=r.label.slice(1),r.isGroup&&0<r.description.length)throw new Error(`Group nodes can only have label. Remove the additional description for node [${r.id}]`);r.label=r.label[0]}}handleStyleDef(e){var t,r,n=e.id.trim().split(","),i=e.styleClass.split(",");for(t of n){let e=this.getState(t);e||(r=t.trim(),this.addState(r),e=this.getState(r)),e&&(e.styles=i.map(e=>e.replace(/;/g,"")?.trim()))}}setRootDoc(e){D.info("Setting root doc",e),this.rootDoc=e,1===this.version?this.extract(e):this.extract(this.getRootDocV2())}docTranslator(r,n,e){if(n.stmt===f9e)this.docTranslator(r,n.state1,!0),this.docTranslator(r,n.state2,!1);else if(n.stmt===p9e&&(n.id===cLe.START_NODE?(n.id=r.id+(e?"_start":"_end"),n.start=e):n.id=n.id.trim()),(n.stmt===g9e||n.stmt===p9e)&&n.doc){let e=[],t=[];for(var i of n.doc){var a;i.type===b9e?((a=dLe(i)).doc=dLe(t),e.push(a),t=[]):t.push(i)}0<e.length&&0<t.length&&(r={stmt:p9e,id:UC(),type:"divider",doc:dLe(t)},e.push(dLe(r)),n.doc=e),n.doc.forEach(e=>this.docTranslator(n,e,!0))}}getRootDocV2(){return this.docTranslator({id:g9e,stmt:g9e},{id:g9e,stmt:g9e,doc:this.rootDoc},!0),{id:g9e,doc:this.rootDoc}}addState(e,t=x9e,r=void 0,n=void 0,i=void 0,a=void 0,s=void 0,o=void 0){let l=e?.trim();if(this.currentDocument.states.has(l)){if(!(e=this.currentDocument.states.get(l)))throw new Error("State not found: "+l);e.doc||(e.doc=r),e.type||(e.type=t)}else D.info("Adding state ",l,n),this.currentDocument.states.set(l,{stmt:p9e,id:l,descriptions:[],type:t,doc:r,note:i,classes:[],styles:[],textStyles:[]});if(n&&(D.info("Setting state description",l,n),(Array.isArray(n)?n:[n]).forEach(e=>this.addDescription(l,e.trim()))),i){if(!(e=this.currentDocument.states.get(l)))throw new Error("State not found: "+l);e.note=i,e.note.text=L.sanitizeText(e.note.text,O())}a&&(D.info("Setting state classes",l,a),(Array.isArray(a)?a:[a]).forEach(e=>this.setCssClass(l,e.trim()))),s&&(D.info("Setting state styles",l,s),(Array.isArray(s)?s:[s]).forEach(e=>this.setStyle(l,e.trim()))),o&&(D.info("Setting state styles",l,s),(Array.isArray(o)?o:[o]).forEach(e=>this.setTextStyle(l,e.trim())))}clear(e){this.nodes=[],this.edges=[],this.documents={root:uLe()},this.currentDocument=this.documents.root,this.startEndCount=0,this.classes=hLe(),e||(this.links=new Map,fh())}getState(e){return this.currentDocument.states.get(e)}getStates(){return this.currentDocument.states}logDocuments(){D.info("Documents = ",this.documents)}getRelations(){return this.currentDocument.relations}addLink(e,t,r){this.links.set(e,{url:t,tooltip:r}),D.warn("Adding link",e,t,r)}getLinks(){return this.links}startIdIfNeeded(e=""){return e===cLe.START_NODE?(this.startEndCount++,""+cLe.START_TYPE+this.startEndCount):e}startTypeIfNeeded(e="",t=x9e){return e===cLe.START_NODE?cLe.START_TYPE:t}endIdIfNeeded(e=""){return e===cLe.END_NODE?(this.startEndCount++,""+cLe.END_TYPE+this.startEndCount):e}endTypeIfNeeded(e="",t=x9e){return e===cLe.END_NODE?cLe.END_TYPE:t}addRelationObjs(e,t,r=""){var n=this.startIdIfNeeded(e.id.trim()),i=this.startTypeIfNeeded(e.id.trim(),e.type),a=this.startIdIfNeeded(t.id.trim()),s=this.startTypeIfNeeded(t.id.trim(),t.type);this.addState(n,i,e.doc,e.description,e.note,e.classes,e.styles,e.textStyles),this.addState(a,s,t.doc,t.description,t.note,t.classes,t.styles,t.textStyles),this.currentDocument.relations.push({id1:n,id2:a,relationTitle:L.sanitizeText(r,O())})}addRelation(e,t,r){var n,i;"object"==typeof e&&"object"==typeof t?this.addRelationObjs(e,t,r):"string"==typeof e&&"string"==typeof t&&(n=this.startIdIfNeeded(e.trim()),e=this.startTypeIfNeeded(e),i=this.endIdIfNeeded(t.trim()),t=this.endTypeIfNeeded(t),this.addState(n,e),this.addState(i,t),this.currentDocument.relations.push({id1:n,id2:i,relationTitle:r?L.sanitizeText(r,O()):void 0}))}addDescription(e,t){e=this.currentDocument.states.get(e),t=t.startsWith(":")?t.replace(":","").trim():t,e?.descriptions?.push(L.sanitizeText(t,O()))}cleanupLabel(e){return(e.startsWith(":")?e.slice(2):e).trim()}getDividerId(){return this.dividerCnt++,"divider-id-"+this.dividerCnt}addStyleClass(e,t=""){this.classes.has(e)||this.classes.set(e,{id:e,styles:[],textStyles:[]});let r=this.classes.get(e);t&&r&&t.split(cLe.STYLECLASS_SEP).forEach(e=>{var t=e.replace(/([^;]*);/,"$1").trim();RegExp(cLe.COLOR_KEYWORD).exec(e)&&(e=t.replace(cLe.FILL_KEYWORD,cLe.BG_FILL).replace(cLe.COLOR_KEYWORD,cLe.FILL_KEYWORD),r.textStyles.push(e)),r.styles.push(t)})}getClasses(){return this.classes}setCssClass(e,r){e.split(",").forEach(e=>{let t=this.getState(e);t||(e=e.trim(),this.addState(e),t=this.getState(e)),t?.classes?.push(r)})}setStyle(e,t){this.getState(e)?.styles?.push(t)}setTextStyle(e,t){this.getState(e)?.textStyles?.push(t)}getDirectionStatement(){return this.rootDoc.find(e=>"dir"===e.stmt)}getDirection(){return this.getDirectionStatement()?.value??"TB"}setDirection(e){var t=this.getDirectionStatement();t?t.value=e:this.rootDoc.unshift({stmt:"dir",value:e})}trimColon(e){return(e.startsWith(":")?e.slice(1):e).trim()}getData(){var e=O();return{nodes:this.nodes,edges:this.edges,other:{},config:e,direction:aLe(this.getRootDocV2())}}getConfig(){return O().state}}}),FLe=b(()=>{gLe=mt(e=>` +defs #statediagram-barbEnd { + fill: ${e.transitionColor}; + stroke: ${e.transitionColor}; + } +g.stateGroup text { + fill: ${e.nodeBorder}; + stroke: none; + font-size: 10px; +} +g.stateGroup text { + fill: ${e.textColor}; + stroke: none; + font-size: 10px; + +} +g.stateGroup .state-title { + font-weight: bolder; + fill: ${e.stateLabelColor}; +} + +g.stateGroup rect { + fill: ${e.mainBkg}; + stroke: ${e.nodeBorder}; +} + +g.stateGroup line { + stroke: ${e.lineColor}; + stroke-width: 1; +} + +.transition { + stroke: ${e.transitionColor}; + stroke-width: 1; + fill: none; +} + +.stateGroup .composit { + fill: ${e.background}; + border-bottom: 1px +} + +.stateGroup .alt-composit { + fill: #e0e0e0; + border-bottom: 1px +} + +.state-note { + stroke: ${e.noteBorderColor}; + fill: ${e.noteBkgColor}; + + text { + fill: ${e.noteTextColor}; + stroke: none; + font-size: 10px; + } +} + +.stateLabel .box { + stroke: none; + stroke-width: 0; + fill: ${e.mainBkg}; + opacity: 0.5; +} + +.edgeLabel .label rect { + fill: ${e.labelBackgroundColor}; + opacity: 0.5; +} +.edgeLabel { + background-color: ${e.edgeLabelBackground}; + p { + background-color: ${e.edgeLabelBackground}; + } + rect { + opacity: 0.5; + background-color: ${e.edgeLabelBackground}; + fill: ${e.edgeLabelBackground}; + } + text-align: center; +} +.edgeLabel .label text { + fill: ${e.transitionLabelColor||e.tertiaryTextColor}; +} +.label div .edgeLabel { + color: ${e.transitionLabelColor||e.tertiaryTextColor}; +} + +.stateLabel text { + fill: ${e.stateLabelColor}; + font-size: 10px; + font-weight: bold; +} + +.node circle.state-start { + fill: ${e.specialStateColor}; + stroke: ${e.specialStateColor}; +} + +.node .fork-join { + fill: ${e.specialStateColor}; + stroke: ${e.specialStateColor}; +} + +.node circle.state-end { + fill: ${e.innerEndBackground}; + stroke: ${e.background}; + stroke-width: 1.5 +} +.end-state-inner { + fill: ${e.compositeBackground||e.background}; + // stroke: ${e.background}; + stroke-width: 1.5 +} + +.node rect { + fill: ${e.stateBkg||e.mainBkg}; + stroke: ${e.stateBorder||e.nodeBorder}; + stroke-width: 1px; +} +.node polygon { + fill: ${e.mainBkg}; + stroke: ${e.stateBorder||e.nodeBorder};; + stroke-width: 1px; +} +#statediagram-barbEnd { + fill: ${e.lineColor}; +} + +.statediagram-cluster rect { + fill: ${e.compositeTitleBackground}; + stroke: ${e.stateBorder||e.nodeBorder}; + stroke-width: 1px; +} + +.cluster-label, .nodeLabel { + color: ${e.stateLabelColor}; + // line-height: 1; +} + +.statediagram-cluster rect.outer { + rx: 5px; + ry: 5px; +} +.statediagram-state .divider { + stroke: ${e.stateBorder||e.nodeBorder}; +} + +.statediagram-state .title-state { + rx: 5px; + ry: 5px; +} +.statediagram-cluster.statediagram-cluster .inner { + fill: ${e.compositeBackground||e.background}; +} +.statediagram-cluster.statediagram-cluster-alt .inner { + fill: ${e.altBackground||"#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||"#efefef"}; +} + +.note-edge { + stroke-dasharray: 5; +} + +.statediagram-note rect { + fill: ${e.noteBkgColor}; + stroke: ${e.noteBorderColor}; + stroke-width: 1px; + rx: 0; + ry: 0; +} +.statediagram-note rect { + fill: ${e.noteBkgColor}; + stroke: ${e.noteBorderColor}; + stroke-width: 1px; + rx: 0; + ry: 0; +} + +.statediagram-note text { + fill: ${e.noteTextColor}; +} + +.statediagram-note .nodeLabel { + color: ${e.noteTextColor}; +} +.statediagram .edgeLabel { + color: red; // ${e.noteTextColor}; +} + +#dependencyStart, #dependencyEnd { + fill: ${e.lineColor}; + stroke: ${e.lineColor}; + stroke-width: 1; +} + +.statediagramTitleText { + text-anchor: middle; + font-size: 18px; + fill: ${e.textColor}; +} +`,"getStyles"),fLe=gLe}),zLe=b(()=>{i6(),$Le(),i_(),Oc(),Tu(),e(),mLe=mt(e=>e.append("circle").attr("class","start-state").attr("r",O().state.sizeUnit).attr("cx",O().state.padding+O().state.sizeUnit).attr("cy",O().state.padding+O().state.sizeUnit),"drawStartState"),yLe=mt(e=>e.append("line").style("stroke","grey").style("stroke-dasharray","3").attr("x1",O().state.textHeight).attr("class","divider").attr("x2",2*O().state.textHeight).attr("y1",0).attr("y2",0),"drawDivider"),vLe=mt((e,t)=>{var r=(t=e.append("text").attr("x",2*O().state.padding).attr("y",O().state.textHeight+2*O().state.padding).attr("font-size",O().state.fontSize).attr("class","state-title").text(t.id)).node().getBBox();return e.insert("rect",":first-child").attr("x",O().state.padding).attr("y",O().state.padding).attr("width",r.width+2*O().state.padding).attr("height",r.height+2*O().state.padding).attr("rx",O().state.radius),t},"drawSimpleState"),xLe=mt((e,t)=>{let r=mt(function(e,t,r){e=e.append("tspan").attr("x",2*O().state.padding).text(t),r||e.attr("dy",O().state.textHeight)},"addTspan"),n=e.append("text").attr("x",2*O().state.padding).attr("y",O().state.textHeight+1.3*O().state.padding).attr("font-size",O().state.fontSize).attr("class","state-title").text(t.descriptions[0]).node().getBBox(),i=n.height,a=e.append("text").attr("x",O().state.padding).attr("y",i+.4*O().state.padding+O().state.dividerMargin+O().state.textHeight).attr("class","state-description"),s=!0,o=!0;t.descriptions.forEach(function(e){s||(r(a,e,o),o=!1),s=!1});var t=e.append("line").attr("x1",O().state.padding).attr("y1",O().state.padding+i+O().state.dividerMargin/2).attr("y2",O().state.padding+i+O().state.dividerMargin/2).attr("class","descr-divider"),l=a.node().getBBox(),c=Math.max(l.width,n.width);return t.attr("x2",c+3*O().state.padding),e.insert("rect",":first-child").attr("x",O().state.padding).attr("y",O().state.padding).attr("width",c+2*O().state.padding).attr("height",l.height+i+2*O().state.padding).attr("rx",O().state.radius),e},"drawDescrState"),bLe=mt((e,t,r)=>{let n=O().state.padding,i=2*O().state.padding,a=e.node().getBBox(),s=a.width,o=a.x,l=e.append("text").attr("x",0).attr("y",O().state.titleShift).attr("font-size",O().state.fontSize).attr("class","state-title").text(t.id),c=l.node().getBBox().width+i,h=Math.max(c,s);h===s&&(h+=i);let u,d=e.node().getBBox();return t.doc,u=o-n,s<c&&(u=(s-h)/2+n),Math.abs(o-d.x)<n&&s<c&&(u=o-(c-s)/2),t=1-O().state.textHeight,e.insert("rect",":first-child").attr("x",u).attr("y",t).attr("class",r?"alt-composit":"composit").attr("width",h).attr("height",d.height+O().state.textHeight+O().state.titleShift+1).attr("rx","0"),l.attr("x",u+n),c<=s&&l.attr("x",o+(h-i)/2-c/2+n),e.insert("rect",":first-child").attr("x",u).attr("y",O().state.titleShift-O().state.textHeight-O().state.padding).attr("width",h).attr("height",3*O().state.textHeight).attr("rx",O().state.radius),e.insert("rect",":first-child").attr("x",u).attr("y",O().state.titleShift-O().state.textHeight-O().state.padding).attr("width",h).attr("height",d.height+3+2*O().state.textHeight).attr("rx",O().state.radius),e},"addTitleAndBox"),wLe=mt(e=>(e.append("circle").attr("class","end-state-outer").attr("r",O().state.sizeUnit+O().state.miniPadding).attr("cx",O().state.padding+O().state.sizeUnit+O().state.miniPadding).attr("cy",O().state.padding+O().state.sizeUnit+O().state.miniPadding),e.append("circle").attr("class","end-state-inner").attr("r",O().state.sizeUnit).attr("cx",O().state.padding+O().state.sizeUnit+2).attr("cy",O().state.padding+O().state.sizeUnit+2)),"drawEndState"),kLe=mt((e,t)=>{let r=O().state.forkWidth,n=O().state.forkHeight;return t.parentId&&(t=r,r=n,n=t),e.append("rect").style("stroke","black").style("fill","black").attr("width",r).attr("height",n).attr("x",O().state.padding).attr("y",O().state.padding)},"drawForkJoinState"),TLe=mt((e,t,r,n)=>{let i=0,a=n.append("text"),s=(a.style("text-anchor","start"),a.attr("class","noteText"),e.replace(/\r\n/g,"<br/>")),o=(s=s.replace(/\n/g,"<br/>")).split(L.lineBreakRegex),l=1.25*O().state.noteMargin;for(var c of o){var h;0<(c=c.trim()).length&&((h=a.append("tspan")).text(c),0===l&&(c=h.node().getBBox(),l+=c.height),i+=l,h.attr("x",t+O().state.noteMargin),h.attr("y",r+i+1.25*O().state.noteMargin))}return{textWidth:a.node().getBBox().width,textHeight:i}},"_drawLongText"),ELe=mt((e,t)=>{t.attr("class","state-note");var r=t.append("rect").attr("x",0).attr("y",O().state.padding),t=t.append("g"),{textWidth:e,textHeight:t}=TLe(e,0,0,t);return r.attr("height",t+2*O().state.noteMargin),r.attr("width",e+2*O().state.noteMargin),r},"drawNote"),CLe=mt(function(e,t){var r={id:n=t.id,label:t.id,width:0,height:0},e=e.append("g").attr("id",n).attr("class","stateGroup"),n=("start"===t.type&&mLe(e),"end"===t.type&&wLe(e),"fork"!==t.type&&"join"!==t.type||kLe(e,t),"note"===t.type&&ELe(t.note.text,e),"divider"===t.type&&yLe(e),"default"===t.type&&0===t.descriptions.length&&vLe(e,t),"default"===t.type&&0<t.descriptions.length&&xLe(e,t),e.node().getBBox());return r.width=n.width+2*O().state.padding,r.height=n.height+2*O().state.padding,r},"drawState"),_Le=0,SLe=mt(function(c,h,u){var d=mt(function(e){switch(e){case pLe.relationType.AGGREGATION:return"aggregation";case pLe.relationType.EXTENSION:return"extension";case pLe.relationType.COMPOSITION:return"composition";case pLe.relationType.DEPENDENCY:return"dependency"}},"getRelationType");h.points=h.points.filter(e=>!Number.isNaN(e.y));let e=h.points,t=r3().x(function(e){return e.x}).y(function(e){return e.y}).curve(v3),r=c.append("path").attr("d",t(e)).attr("id","edge"+_Le).attr("class","transition"),n="";if(O().state.arrowMarkerAbsolute&&(n=gc(!0)),r.attr("marker-end","url("+n+"#"+d(pLe.relationType.DEPENDENCY)+"End)"),void 0!==u.title){let t=c.append("g").attr("class","stateLabel"),{x:r,y:n}=e_.calcLabelPosition(h.points),i=L.getRows(u.title),a=0,s=[],o=0,l=0;for(let e=0;e<=i.length;e++){var p=t.append("text").attr("text-anchor","middle").text(i[e]).attr("x",r).attr("y",n+a),g=p.node().getBBox();o=Math.max(o,g.width),l=Math.min(l,g.x),D.info(g.x,r,n+a),0===a&&(a=p.node().getBBox().height,D.info("Title height",a,n)),s.push(p)}let e=a*i.length;if(1<i.length){let r=(i.length-1)*a*.5;s.forEach((e,t)=>e.attr("y",n+t*a-r)),e=a*i.length}d=t.node().getBBox(),t.insert("rect",":first-child").attr("class","box").attr("x",r-o/2-O().state.padding/2).attr("y",n-e/2-O().state.padding/2-3.5).attr("width",o+O().state.padding).attr("height",e+O().state.padding),D.info(d)}_Le++},"drawEdge")}),GLe=b(()=>{i6(),vK(),aH(),e(),Oc(),zLe(),Tu(),lh(),LLe={},NLe=mt(function(){},"setConf"),ILe=mt(function(e){e.append("defs").append("marker").attr("id","dependencyEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"insertMarkers"),RLe=mt(function(e,t,r,n){ALe=O().state;let i=O().securityLevel,a;"sandbox"===i&&(a=H("#i"+t));var s=H("sandbox"===i?a.nodes()[0].contentDocument.body:"body"),o="sandbox"===i?a.nodes()[0].contentDocument:document,e=(D.debug("Rendering diagram "+e),s.select(`[id='${t}']`)),t=(ILe(e),n.db.getRootDoc()),t=(DLe(t,e,void 0,!1,s,o,n),ALe.padding),o=(s=e.node().getBBox()).width+2*t;Zc(e,n=s.height+2*t,1.75*o,ALe.useMaxWidth),e.attr("viewBox",`${s.x-ALe.padding} ${s.y-ALe.padding} `+o+" "+n)},"draw"),MLe=mt(e=>e?e.length*ALe.fontSizeFactor:1,"getLabelWidth"),DLe=mt((e,t,r,n,i,a,s)=>{let o=new nH({compound:!0,multigraph:!0}),l,c=!0;for(l=0;l<e.length;l++)if("relation"===e[l].stmt){c=!1;break}r?o.setGraph({rankdir:"LR",multigraph:!0,compound:!0,ranker:"tight-tree",ranksep:c?1:ALe.edgeLengthFactor,nodeSep:c?1:50,isMultiGraph:!0}):o.setGraph({rankdir:"TB",multigraph:!0,compound:!0,ranksep:c?1:ALe.edgeLengthFactor,nodeSep:c?1:50,ranker:"tight-tree",isMultiGraph:!0}),o.setDefaultEdgeLabel(function(){return{}});var h,u=s.db.getStates(),d=s.db.getRelations();for(h of Object.keys(u)){var p,g,f=u[h];r&&(f.parentId=r);let e;f.doc?(g=t.append("g").attr("id",f.id).attr("class","stateGroup"),e=DLe(f.doc,g,f.id,!n,i,a,s),g=(g=bLe(g,f,n)).node().getBBox(),e.width=g.width,e.height=g.height+ALe.padding/2,LLe[f.id]={y:ALe.compositTitleSize}):e=CLe(t,f,o),f.note?(g={descriptions:[],id:f.id+"-note",note:f.note,type:"note"},p=CLe(t,g,o),"left of"===f.note.position?(o.setNode(e.id+"-note",p),o.setNode(e.id,e)):(o.setNode(e.id,e),o.setNode(e.id+"-note",p)),o.setParent(e.id,e.id+"-group"),o.setParent(e.id+"-note",e.id+"-group")):o.setNode(e.id,e)}D.debug("Count=",o.nodeCount(),o);let m=0,y=(d.forEach(function(e){m++,D.debug("Setting edge",e),o.setEdge(e.id1,e.id2,{relation:e,width:MLe(e.title),height:ALe.labelHeight*L.getRows(e.title).length,labelpos:"c"},"id"+m)}),YX(o),D.debug("Graph after layout",o.nodes()),t.node());o.nodes().forEach(function(e){void 0!==e&&void 0!==o.node(e)?(D.warn("Node "+e+": "+JSON.stringify(o.node(e))),i.select("#"+y.id+" #"+e).attr("transform","translate("+(o.node(e).x-o.node(e).width/2)+","+(o.node(e).y+(LLe[e]?LLe[e].y:0)-o.node(e).height/2)+" )"),i.select("#"+y.id+" #"+e).attr("data-x-shift",o.node(e).x-o.node(e).width/2),a.querySelectorAll("#"+y.id+" #"+e+" .divider").forEach(e=>{let t=e.parentElement,r=0,n=0;t&&(t.parentElement&&(r=t.parentElement.getBBox().width),n=parseInt(t.getAttribute("data-x-shift"),10),Number.isNaN(n))&&(n=0),e.setAttribute("x1",0-n+8),e.setAttribute("x2",r-n-8)})):D.debug("No Node "+e+": "+JSON.stringify(o.node(e)))}),y.getBBox(),o.edges().forEach(function(e){void 0!==e&&void 0!==o.edge(e)&&(D.debug("Edge "+e.v+" -> "+e.w+": "+JSON.stringify(o.edge(e))),SLe(t,o.edge(e),o.edge(e).relation))});var d=y.getBBox(),v={id:r||"root",label:r||"root",width:0,height:0};return v.width=d.width+2*ALe.padding,v.height=d.height+2*ALe.padding,D.debug("Doc rendered",v,o),v},"renderDoc"),OLe={setConf:NLe,draw:RLe}}),ULe={};OFe(ULe,{diagram:()=>qLe});var qLe,jLe=b(()=>{H9e(),$Le(),FLe(),GLe(),qLe={parser:d9e,get db(){return new pLe(1)},renderer:OLe,styles:fLe,init:mt(e=>{e.state||(e.state={}),e.state.arrowMarkerAbsolute=e.arrowMarkerAbsolute},"init")}}),YLe={};OFe(YLe,{diagram:()=>WLe});var WLe,HLe,VLe,XLe,KLe,ZLe,QLe,JLe,eNe,tNe,rNe,nNe,iNe,aNe,sNe,oNe,lNe,cNe,hNe,uNe,dNe,pNe,gNe,fNe,mNe,yNe,vNe,xNe,bNe,wNe,kNe,TNe=b(()=>{H9e(),$Le(),FLe(),BLe(),WLe={parser:d9e,get db(){return new pLe(2)},renderer:lLe,styles:fLe,init:mt(e=>{e.state||(e.state={}),e.state.arrowMarkerAbsolute=e.arrowMarkerAbsolute},"init")}}),ENe=b(()=>{function e(){this.yy={}}var t=mt(function(e,t,r,n){for(r=r||{},n=e.length;n--;r[e[n]]=t);return r},"o"),r=[6,8,10,11,12,14,16,17,18],n=[1,9],i=[1,10],a=[1,11],s=[1,12],o=[1,13],l=[1,14],n={trace:mt(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:mt(function(e,t,r,n,i,a,s){var o=a.length-1;switch(i){case 1:return a[o-1];case 2:this.$=[];break;case 3:a[o-1].push(a[o]),this.$=a[o-1];break;case 4:case 5:this.$=a[o];break;case 6:case 7:this.$=[];break;case 8:n.setDiagramTitle(a[o].substr(6)),this.$=a[o].substr(6);break;case 9:this.$=a[o].trim(),n.setAccTitle(this.$);break;case 10:case 11:this.$=a[o].trim(),n.setAccDescription(this.$);break;case 12:n.addSection(a[o].substr(8)),this.$=a[o].substr(8);break;case 13:n.addTask(a[o-1],a[o]),this.$="task"}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(r,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:n,12:i,14:a,16:s,17:o,18:l},t(r,[2,7],{1:[2,1]}),t(r,[2,3]),{9:15,11:n,12:i,14:a,16:s,17:o,18:l},t(r,[2,5]),t(r,[2,6]),t(r,[2,8]),{13:[1,16]},{15:[1,17]},t(r,[2,11]),t(r,[2,12]),{19:[1,18]},t(r,[2,4]),t(r,[2,9]),t(r,[2,10]),t(r,[2,13])],defaultActions:{},parseError:mt(function(e,t){var r;if(!t.recoverable)throw(r=new Error(e)).hash=t,r;this.trace(e)},"parseError"),parse:mt(function(e){var t,r=this,n=[0],i=[],a=[null],s=[],o=this.table,l="",c=0,h=0,u=0,d=1,p=s.slice.call(arguments,1),g=Object.create(this.lexer),f={yy:{}};for(t in this.yy)Object.prototype.hasOwnProperty.call(this.yy,t)&&(f.yy[t]=this.yy[t]);g.setInput(e,f.yy),f.yy.lexer=g,f.yy.parser=this,"u"<typeof g.yylloc&&(g.yylloc={});var m=g.yylloc,y=(s.push(m),g.options&&g.options.ranges);function v(){var e=i.pop()||g.lex()||d;return"number"!=typeof e&&(e instanceof Array&&(e=(i=e).pop()),e=r.symbols_[e]||e),e}"function"==typeof f.yy.parseError?this.parseError=f.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,mt(function(e){n.length=n.length-2*e,a.length=a.length-e,s.length=s.length-e},"popStack"),mt(v,"lex");for(var x,b,w,k,T,E,C,_={};;){if(w=n[n.length-1],"u"<typeof(k=this.defaultActions[w]||((null===x||"u"<typeof x)&&(x=v()),o[w]&&o[w][x]))||!k.length||!k[0]){var S,A=[];for(T in o[w])this.terminals_[T]&&2<T&&A.push("'"+this.terminals_[T]+"'");S=g.showPosition?"Parse error on line "+(c+1)+`: +`+g.showPosition()+` +Expecting `+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(c+1)+": Unexpected "+(x==d?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(S,{text:g.match,token:this.terminals_[x]||x,line:g.yylineno,loc:m,expected:A})}if(k[0]instanceof Array&&1<k.length)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+x);switch(k[0]){case 1:n.push(x),a.push(g.yytext),s.push(g.yylloc),n.push(k[1]),x=null,b?(x=b,b=null):(h=g.yyleng,l=g.yytext,c=g.yylineno,m=g.yylloc,0<u&&u--);break;case 2:if(E=this.productions_[k[1]][1],_.$=a[a.length-E],_._$={first_line:s[s.length-(E||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(E||1)].first_column,last_column:s[s.length-1].last_column},y&&(_._$.range=[s[s.length-(E||1)].range[0],s[s.length-1].range[1]]),typeof(C=this.performAction.apply(_,[l,h,c,f.yy,k[1],a,s].concat(p)))<"u")return C;E&&(n=n.slice(0,-1*E*2),a=a.slice(0,-1*E),s=s.slice(0,-1*E)),n.push(this.productions_[k[1]][0]),a.push(_.$),s.push(_._$),C=o[n[n.length-2]][n[n.length-1]],n.push(C);break;case 3:return!0}}return!0},"parse")},i={EOF:1,parseError:mt(function(e,t){if(!this.yy.parser)throw new Error(e);this.yy.parser.parseError(e,t)},"parseError"),setInput:mt(function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:mt(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},"input"),unput:mt(function(e){var t=e.length,r=e.split(/(?:\r\n?|\n)/g),e=(this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t,this.match.split(/(?:\r\n?|\n)/g)),n=(this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),r.length-1&&(this.yylineno-=r.length-1),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:r?(r.length===e.length?this.yylloc.first_column:0)+e[e.length-r.length].length-r[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[n[0],n[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},"unput"),more:mt(function(){return this._more=!0,this},"more"),reject:mt(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):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})},"reject"),less:mt(function(e){this.unput(this.match.slice(e))},"less"),pastInput:mt(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(20<e.length?"...":"")+e.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:mt(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(20<e.length?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:mt(function(){var e=this.pastInput(),t=new Array(e.length+1).join("-");return e+this.upcomingInput()+` +`+t+"^"},"showPosition"),test_match:mt(function(e,t){var r,n;if(this.options.backtrack_lexer&&(n={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges)&&(n.yylloc.range=this.yylloc.range.slice(0)),(r=e[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],r=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack)for(var i in n)this[i]=n[i];return!1},"test_match"),next:mt(function(){if(this.done)return this.EOF;var e,t,r,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((r=this._input.match(this.rules[i[a]]))&&(!t||r[0].length>t[0].length)){if(t=r,n=a,this.options.backtrack_lexer){if(!1!==(e=this.test_match(r,i[a])))return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?!1!==(e=this.test_match(t,i[n]))&&e:""===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:mt(function(){return this.next()||this.lex()},"lex"),begin:mt(function(e){this.conditionStack.push(e)},"begin"),popState:mt(function(){return 0<this.conditionStack.length-1?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:mt(function(){return(this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]]:this.conditions.INITIAL).rules},"_currentRules"),topState:mt(function(e){return 0<=(e=this.conditionStack.length-1-Math.abs(e||0))?this.conditionStack[e]:"INITIAL"},"topState"),pushState:mt(function(e){this.begin(e)},"pushState"),stateStackSize:mt(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:mt(function(e,t,r,n){switch(r){case 0:case 1:break;case 2:return 10;case 3:case 4:break;case 5:return 4;case 6:return 11;case 7:return this.begin("acc_title"),12;case 8:return this.popState(),"acc_title_value";case 9:return this.begin("acc_descr"),14;case 10:return this.popState(),"acc_descr_value";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}}};n.lexer=i,mt(e,"Parser"),(HLe=new((e.prototype=n).Parser=e)).parser=HLe,VLe=HLe}),CNe=b(()=>{Tu(),ku(),XLe="",KLe=[],ZLe=[],QLe=[],JLe=mt(function(){KLe.length=0,ZLe.length=0,XLe="",QLe.length=0,fh()},"clear"),eNe=mt(function(e){XLe=e,KLe.push(e)},"addSection"),tNe=mt(function(){return KLe},"getSections"),rNe=mt(function(){let e=sNe(),t=0;for(;!e&&t<100;)e=sNe(),t++;return ZLe.push(...QLe),ZLe},"getTasks"),nNe=mt(function(){let t=[];return ZLe.forEach(e=>{e.people&&t.push(...e.people)}),[...new Set(t)].sort()},"updateActors"),iNe=mt(function(e,t){let r=t.substr(1).split(":"),n=0;t=(1===r.length?(n=Number(r[0]),[]):(n=Number(r[0]),r[1].split(","))).map(e=>e.trim()),t={section:XLe,type:XLe,people:t,task:e,score:n},QLe.push(t)},"addTask"),aNe=mt(function(e){e={section:XLe,type:XLe,description:e,task:e,classes:[]},ZLe.push(e)},"addTaskOrg"),sNe=mt(function(){let e=mt(function(e){return QLe[e].processed},"compileTask"),t=!0;for(var[r,n]of QLe.entries())e(r),t=t&&n.processed;return t},"compileTasks"),oNe=mt(function(){return nNe()},"getActors"),lNe={getConfig:mt(()=>O().journey,"getConfig"),clear:JLe,setDiagramTitle:bh,getDiagramTitle:wh,setAccTitle:mh,getAccTitle:yh,setAccDescription:vh,getAccDescription:xh,addSection:eNe,getSections:tNe,getTasks:rNe,addTask:iNe,addTaskOrg:aNe,getActors:oNe}}),_Ne=b(()=>{nue(),cNe=mt(e=>`.label { + font-family: ${e.fontFamily}; + color: ${e.textColor}; + } + .mouth { + stroke: #666; + } + + line { + stroke: ${e.textColor} + } + + .legend { + fill: ${e.textColor}; + font-family: ${e.fontFamily}; + } + + .label text { + fill: #333; + } + .label { + color: ${e.textColor} + } + + .face { + ${e.faceColor?"fill: "+e.faceColor:"fill: #FFF8DC"}; + stroke: #999; + } + + .node rect, + .node circle, + .node ellipse, + .node polygon, + .node path { + fill: ${e.mainBkg}; + stroke: ${e.nodeBorder}; + stroke-width: 1px; + } + + .node .label { + text-align: center; + } + .node.clickable { + cursor: pointer; + } + + .arrowheadPath { + fill: ${e.arrowheadColor}; + } + + .edgePath .path { + stroke: ${e.lineColor}; + stroke-width: 1.5px; + } + + .flowchart-link { + stroke: ${e.lineColor}; + fill: none; + } + + .edgeLabel { + background-color: ${e.edgeLabelBackground}; + rect { + opacity: 0.5; + } + text-align: center; + } + + .cluster rect { + } + + .cluster text { + fill: ${e.titleColor}; + } + + div.mermaidTooltip { + position: absolute; + text-align: center; + max-width: 200px; + padding: 2px; + font-family: ${e.fontFamily}; + font-size: 12px; + background: ${e.tertiaryColor}; + border: 1px solid ${e.border2}; + border-radius: 2px; + pointer-events: none; + z-index: 100; + } + + .task-type-0, .section-type-0 { + ${e.fillType0?"fill: "+e.fillType0:""}; + } + .task-type-1, .section-type-1 { + ${e.fillType0?"fill: "+e.fillType1:""}; + } + .task-type-2, .section-type-2 { + ${e.fillType0?"fill: "+e.fillType2:""}; + } + .task-type-3, .section-type-3 { + ${e.fillType0?"fill: "+e.fillType3:""}; + } + .task-type-4, .section-type-4 { + ${e.fillType0?"fill: "+e.fillType4:""}; + } + .task-type-5, .section-type-5 { + ${e.fillType0?"fill: "+e.fillType5:""}; + } + .task-type-6, .section-type-6 { + ${e.fillType0?"fill: "+e.fillType6:""}; + } + .task-type-7, .section-type-7 { + ${e.fillType0?"fill: "+e.fillType7:""}; + } + + .actor-0 { + ${e.actor0?"fill: "+e.actor0:""}; + } + .actor-1 { + ${e.actor1?"fill: "+e.actor1:""}; + } + .actor-2 { + ${e.actor2?"fill: "+e.actor2:""}; + } + .actor-3 { + ${e.actor3?"fill: "+e.actor3:""}; + } + .actor-4 { + ${e.actor4?"fill: "+e.actor4:""}; + } + .actor-5 { + ${e.actor5?"fill: "+e.actor5:""}; + } + ${Hhe()} +`,"getStyles"),hNe=cNe}),SNe=b(()=>{function t(e,t,r,n,i,a,s,o){g(t.append("text").attr("x",r+i/2).attr("y",n+a/2+5).style("font-color",o).style("text-anchor","middle").text(e),s)}function c(e,t,r,n,i,a,s,o,l){var{taskFontSize:c,taskFontFamily:h}=o,u=e.split(/<br\s*\/?>/gi);for(let e=0;e<u.length;e++){var d=e*c-c*(u.length-1)/2,p=t.append("text").attr("x",r+i/2).attr("y",n).attr("fill",l).style("text-anchor","middle").style("font-size",c).style("font-family",h);p.append("tspan").attr("x",r+i/2).attr("dy",d).text(u[e]),p.attr("y",n+a/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),g(p,s)}}function r(e,t,r,n,i,a,s,o){var l=(t=t.append("switch")).append("foreignObject").attr("x",r).attr("y",n).attr("width",i).attr("height",a).attr("position","fixed").append("xhtml:div").style("display","table").style("height","100%").style("width","100%");l.append("div").attr("class","label").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(e),c(e,t,r,n,i,a,s,o),g(l,s)}function g(e,t){for(var r in t)r in t&&e.attr(r,t[r])}i6(),o6(),uNe=mt(function(e,t){return Ew(e,t)},"drawRect"),dNe=mt(function(e,r){var t=e.append("circle").attr("cx",r.cx).attr("cy",r.cy).attr("class","face").attr("r",15).attr("stroke-width",2).attr("overflow","visible");function n(e){var t=W5().startAngle(Math.PI/2).endAngle(Math.PI/2*3).innerRadius(7.5).outerRadius(6.8181818181818175);e.append("path").attr("class","mouth").attr("d",t).attr("transform","translate("+r.cx+","+(r.cy+2)+")")}function i(e){var t=W5().startAngle(3*Math.PI/2).endAngle(Math.PI/2*5).innerRadius(7.5).outerRadius(6.8181818181818175);e.append("path").attr("class","mouth").attr("d",t).attr("transform","translate("+r.cx+","+(r.cy+7)+")")}function a(e){e.append("line").attr("class","mouth").attr("stroke",2).attr("x1",r.cx-5).attr("y1",r.cy+7).attr("x2",r.cx+5).attr("y2",r.cy+7).attr("class","mouth").attr("stroke-width","1px").attr("stroke","#666")}return(e=e.append("g")).append("circle").attr("cx",r.cx-5).attr("cy",r.cy-5).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),e.append("circle").attr("cx",r.cx+5).attr("cy",r.cy-5).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),mt(n,"smile"),mt(i,"sad"),mt(a,"ambivalent"),(3<r.score?n:r.score<3?i:a)(e),t},"drawFace"),pNe=mt(function(e,t){return(e=e.append("circle")).attr("cx",t.cx),e.attr("cy",t.cy),e.attr("class","actor-"+t.pos),e.attr("fill",t.fill),e.attr("stroke",t.stroke),e.attr("r",t.r),void 0!==e.class&&e.attr("class",e.class),void 0!==t.title&&e.append("title").text(t.title),e},"drawCircle"),gNe=mt(function(e,t){return _w(e,t)},"drawText"),fNe=mt(function(e,t){function r(e,t,r,n,i){return e+","+t+" "+(e+r)+","+t+" "+(e+r)+","+(t+n-i)+" "+(e+r-1.2*i)+","+(t+n)+" "+e+","+(t+n)}mt(r,"genPoints");var 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,gNe(e,t)},"drawLabel"),mNe=mt(function(e,t,r){var e=e.append("g"),n=Lw();n.x=t.x,n.y=t.y,n.fill=t.fill,n.width=r.width*t.taskCount+r.diagramMarginX*(t.taskCount-1),n.height=r.height,n.class="journey-section section-type-"+t.num,n.rx=3,n.ry=3,uNe(e,n),bNe(r)(t.text,e,n.x,n.y,n.width,n.height,{class:"journey-section section-type-"+t.num},r,t.colour)},"drawSection"),yNe=-1,vNe=mt(function(e,r,t){let n=r.x+t.width/2,i=e.append("g"),a=(yNe++,i.append("line").attr("id","task"+yNe).attr("x1",n).attr("y1",r.y).attr("x2",n).attr("y2",450).attr("class","task-line").attr("stroke-width","1px").attr("stroke-dasharray","4 2").attr("stroke","#666"),dNe(i,{cx:n,cy:300+30*(5-r.score),score:r.score}),(e=Lw()).x=r.x,e.y=r.y,e.fill=r.fill,e.width=t.width,e.height=t.height,e.class="task task-type-"+r.num,e.rx=3,e.ry=3,uNe(i,e),r.x+14);r.people.forEach(e=>{var t=r.actors[e].color,t={cx:a,cy:r.y,r:7,fill:t,stroke:"#000",title:e,pos:r.actors[e].position};pNe(i,t),a+=10}),bNe(t)(r.task,i,e.x,e.y,e.width,e.height,{class:"task"},t,r.colour)},"drawTask"),xNe=mt(function(e,t){Cw(e,t)},"drawBackgroundRect"),mt(t,"byText"),mt(c,"byTspan"),mt(r,"byFo"),mt(g,"_setTextAttrs"),bNe=function(e){return"fo"===e.textPlacement?r:"old"===e.textPlacement?t:c},wNe=mt(function(e){e.append("defs").append("marker").attr("id","arrowhead").attr("refX",5).attr("refY",2).attr("markerWidth",6).attr("markerHeight",4).attr("orient","auto").append("path").attr("d","M 0,0 V 4 L6,2 Z")},"initGraphics"),kNe={drawRect:uNe,drawCircle:pNe,drawSection:mNe,drawText:gNe,drawLabel:fNe,drawTask:vNe,drawBackgroundRect:xNe,initGraphics:wNe}});function ANe(s){let n=O().journey,o=n.maxLabelWidth,l=(INe=0,60);Object.keys(NNe).forEach(t=>{var e=NNe[t].color,e={cx:20,cy:l,r:7,fill:e,stroke:"#000",pos:NNe[t].position};kNe.drawCircle(s,e);let i=s.append("text").attr("visibility","hidden").text(t),r=i.node().getBoundingClientRect().width,a=(i.remove(),[]);if(r<=o)a=[t];else{let e=t.split(" "),n="";i=s.append("text").attr("visibility","hidden"),e.forEach(t=>{var e=n?n+" "+t:t;if(i.text(e),i.node().getBoundingClientRect().width>o){if(n&&a.push(n),n=t,i.text(t),i.node().getBoundingClientRect().width>o){let e="";for(var r of t)e+=r,i.text(e+"-"),i.node().getBoundingClientRect().width>o&&(a.push(e.slice(0,-1)+"-"),e=r);n=e}}else n=e}),n&&a.push(n),i.remove()}a.forEach((e,t)=>{t={x:40,y:l+7+20*t,fill:"#666",text:e,textMargin:n.boxTextMargin??5},e=kNe.drawText(s,t).node().getBoundingClientRect().width,INe<e&&e>n.leftMargin-e&&(INe=e)}),l+=Math.max(20,20*a.length)})}var LNe,NNe,INe,RNe,MNe,DNe,ONe,PNe,BNe,$Ne,FNe,zNe=b(()=>{i6(),SNe(),Tu(),lh(),LNe=mt(function(t){Object.keys(t).forEach(function(e){RNe[e]=t[e]})},"setConf"),NNe={},INe=0,mt(ANe,"drawActorLegend"),RNe=O().journey,MNe=0,DNe=mt(function(e,t,r,n){let i=O(),a=i.journey.titleColor,s=i.journey.titleFontSize,o=i.journey.titleFontFamily,l=i.securityLevel,c;"sandbox"===l&&(c=H("#i"+t));var h,u=H("sandbox"===l?c.nodes()[0].contentDocument.body:"body"),u=(ONe.init(),u.select("#"+t)),t=(kNe.initGraphics(u),n.db.getTasks()),d=n.db.getDiagramTitle(),n=n.db.getActors();for(h in NNe)delete NNe[h];let p=0;n.forEach(e=>{NNe[e]={color:RNe.actorColours[p%RNe.actorColours.length],position:p},p++}),ANe(u),MNe=RNe.leftMargin+INe,ONe.insert(0,0,MNe,50*Object.keys(NNe).length),$Ne(u,t,0);var n=ONe.getBounds(),t=(d&&u.append("text").text(d).attr("x",MNe).attr("font-size",s).attr("font-weight","bold").attr("y",25).attr("fill",a).attr("font-family",o),n.stopy-n.starty+2*RNe.diagramMarginY),g=MNe+n.stopx+2*RNe.diagramMarginX,d=(Zc(u,t,g,RNe.useMaxWidth),u.append("line").attr("x1",MNe).attr("y1",4*RNe.height).attr("x2",g-MNe-4).attr("y2",4*RNe.height).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#arrowhead)"),d?70:0);u.attr("viewBox",n.startx+` -25 ${g} `+(t+d)),u.attr("preserveAspectRatio","xMinYMin meet"),u.attr("height",t+d+25)},"draw"),ONe={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],init:mt(function(){this.sequenceItems=[],this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0},"init"),updateVal:mt(function(e,t,r,n){void 0===e[t]?e[t]=r:e[t]=n(r,e[t])},"updateVal"),updateBounds:mt(function(n,i,a,s){let o=O().journey,l=this,c=0;function e(r){return mt(function(e){c++;var t=l.sequenceItems.length-c+1;l.updateVal(e,"starty",i-t*o.boxMargin,Math.min),l.updateVal(e,"stopy",s+t*o.boxMargin,Math.max),l.updateVal(ONe.data,"startx",n-t*o.boxMargin,Math.min),l.updateVal(ONe.data,"stopx",a+t*o.boxMargin,Math.max),"activation"!==r&&(l.updateVal(e,"startx",n-t*o.boxMargin,Math.min),l.updateVal(e,"stopx",a+t*o.boxMargin,Math.max),l.updateVal(ONe.data,"starty",i-t*o.boxMargin,Math.min),l.updateVal(ONe.data,"stopy",s+t*o.boxMargin,Math.max))},"updateItemBounds")}mt(e,"updateFn"),this.sequenceItems.forEach(e())},"updateBounds"),insert:mt(function(e,t,r,n){var i=Math.min(e,r),e=Math.max(e,r),r=Math.min(t,n),t=Math.max(t,n);this.updateVal(ONe.data,"startx",i,Math.min),this.updateVal(ONe.data,"starty",r,Math.min),this.updateVal(ONe.data,"stopx",e,Math.max),this.updateVal(ONe.data,"stopy",t,Math.max),this.updateBounds(i,r,e,t)},"insert"),bumpVerticalPos:mt(function(e){this.verticalPos=this.verticalPos+e,this.data.stopy=this.verticalPos},"bumpVerticalPos"),getVerticalPos:mt(function(){return this.verticalPos},"getVerticalPos"),getBounds:mt(function(){return this.data},"getBounds")},PNe=RNe.sectionFills,BNe=RNe.sectionColours,$Ne=mt(function(e,n,t){let i=O().journey,a="",r=2*i.height+i.diagramMarginY,s=t+r,o=0,l="#CCC",c="black",h=0;for(var[u,d]of n.entries()){if(a!==d.section){l=PNe[o%PNe.length],h=o%PNe.length,c=BNe[o%BNe.length];let t=0,r=d.section;for(let e=u;e<n.length&&n[e].section==r;e++)t+=1;var p={x:u*i.taskMargin+u*i.width+MNe,y:50,text:d.section,fill:l,num:h,colour:c,taskCount:t};kNe.drawSection(e,p,i),a=d.section,o++}p=d.people.reduce((e,t)=>(NNe[t]&&(e[t]=NNe[t]),e),{}),d.x=u*i.taskMargin+u*i.width+MNe,d.y=s,d.width=i.diagramMarginX,d.height=i.diagramMarginY,d.colour=c,d.fill=l,d.num=h,d.actors=p,kNe.drawTask(e,d,i),ONe.insert(d.x,d.y,d.x+d.width+i.taskMargin,450)}},"drawTasks"),FNe={setConf:LNe,draw:DNe}}),GNe={};OFe(GNe,{diagram:()=>UNe});var UNe,qNe,jNe,YNe=b(()=>{ENe(),CNe(),_Ne(),zNe(),UNe={parser:VLe,db:lNe,renderer:FNe,styles:hNe,init:mt(e=>{FNe.setConf(e.journey),lNe.clear()},"init")}}),WNe=b(()=>{function e(){this.yy={}}var t=mt(function(e,t,r,n){for(r=r||{},n=e.length;n--;r[e[n]]=t);return r},"o"),r=[6,8,10,11,12,14,16,17,20,21],n=[1,9],i=[1,10],a=[1,11],s=[1,12],o=[1,13],l=[1,16],c=[1,17],n={trace:mt(function(){},"trace"),yy:{},symbols_:{error:2,start:3,timeline:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,title:11,acc_title:12,acc_title_value:13,acc_descr:14,acc_descr_value:15,acc_descr_multiline_value:16,section:17,period_statement:18,event_statement:19,period:20,event:21,$accept:0,$end:1},terminals_:{2:"error",4:"timeline",6:"EOF",8:"SPACE",10:"NEWLINE",11:"title",12:"acc_title",13:"acc_title_value",14:"acc_descr",15:"acc_descr_value",16:"acc_descr_multiline_value",17:"section",20:"period",21:"event"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,1],[9,1],[18,1],[19,1]],performAction:mt(function(e,t,r,n,i,a,s){var o=a.length-1;switch(i){case 1:return a[o-1];case 2:this.$=[];break;case 3:a[o-1].push(a[o]),this.$=a[o-1];break;case 4:case 5:this.$=a[o];break;case 6:case 7:this.$=[];break;case 8:n.getCommonDb().setDiagramTitle(a[o].substr(6)),this.$=a[o].substr(6);break;case 9:this.$=a[o].trim(),n.getCommonDb().setAccTitle(this.$);break;case 10:case 11:this.$=a[o].trim(),n.getCommonDb().setAccDescription(this.$);break;case 12:n.addSection(a[o].substr(8)),this.$=a[o].substr(8);break;case 15:n.addTask(a[o],0,""),this.$=a[o];break;case 16:n.addEvent(a[o].substr(2)),this.$=a[o]}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(r,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:n,12:i,14:a,16:s,17:o,18:14,19:15,20:l,21:c},t(r,[2,7],{1:[2,1]}),t(r,[2,3]),{9:18,11:n,12:i,14:a,16:s,17:o,18:14,19:15,20:l,21:c},t(r,[2,5]),t(r,[2,6]),t(r,[2,8]),{13:[1,19]},{15:[1,20]},t(r,[2,11]),t(r,[2,12]),t(r,[2,13]),t(r,[2,14]),t(r,[2,15]),t(r,[2,16]),t(r,[2,4]),t(r,[2,9]),t(r,[2,10])],defaultActions:{},parseError:mt(function(e,t){var r;if(!t.recoverable)throw(r=new Error(e)).hash=t,r;this.trace(e)},"parseError"),parse:mt(function(e){var t,r=this,n=[0],i=[],a=[null],s=[],o=this.table,l="",c=0,h=0,u=0,d=1,p=s.slice.call(arguments,1),g=Object.create(this.lexer),f={yy:{}};for(t in this.yy)Object.prototype.hasOwnProperty.call(this.yy,t)&&(f.yy[t]=this.yy[t]);g.setInput(e,f.yy),f.yy.lexer=g,f.yy.parser=this,"u"<typeof g.yylloc&&(g.yylloc={});var m=g.yylloc,y=(s.push(m),g.options&&g.options.ranges);function v(){var e=i.pop()||g.lex()||d;return"number"!=typeof e&&(e instanceof Array&&(e=(i=e).pop()),e=r.symbols_[e]||e),e}"function"==typeof f.yy.parseError?this.parseError=f.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,mt(function(e){n.length=n.length-2*e,a.length=a.length-e,s.length=s.length-e},"popStack"),mt(v,"lex");for(var x,b,w,k,T,E,C,_={};;){if(w=n[n.length-1],"u"<typeof(k=this.defaultActions[w]||((null===x||"u"<typeof x)&&(x=v()),o[w]&&o[w][x]))||!k.length||!k[0]){var S,A=[];for(T in o[w])this.terminals_[T]&&2<T&&A.push("'"+this.terminals_[T]+"'");S=g.showPosition?"Parse error on line "+(c+1)+`: +`+g.showPosition()+` +Expecting `+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(c+1)+": Unexpected "+(x==d?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(S,{text:g.match,token:this.terminals_[x]||x,line:g.yylineno,loc:m,expected:A})}if(k[0]instanceof Array&&1<k.length)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+x);switch(k[0]){case 1:n.push(x),a.push(g.yytext),s.push(g.yylloc),n.push(k[1]),x=null,b?(x=b,b=null):(h=g.yyleng,l=g.yytext,c=g.yylineno,m=g.yylloc,0<u&&u--);break;case 2:if(E=this.productions_[k[1]][1],_.$=a[a.length-E],_._$={first_line:s[s.length-(E||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(E||1)].first_column,last_column:s[s.length-1].last_column},y&&(_._$.range=[s[s.length-(E||1)].range[0],s[s.length-1].range[1]]),typeof(C=this.performAction.apply(_,[l,h,c,f.yy,k[1],a,s].concat(p)))<"u")return C;E&&(n=n.slice(0,-1*E*2),a=a.slice(0,-1*E),s=s.slice(0,-1*E)),n.push(this.productions_[k[1]][0]),a.push(_.$),s.push(_._$),C=o[n[n.length-2]][n[n.length-1]],n.push(C);break;case 3:return!0}}return!0},"parse")},i={EOF:1,parseError:mt(function(e,t){if(!this.yy.parser)throw new Error(e);this.yy.parser.parseError(e,t)},"parseError"),setInput:mt(function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:mt(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},"input"),unput:mt(function(e){var t=e.length,r=e.split(/(?:\r\n?|\n)/g),e=(this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t,this.match.split(/(?:\r\n?|\n)/g)),n=(this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),r.length-1&&(this.yylineno-=r.length-1),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:r?(r.length===e.length?this.yylloc.first_column:0)+e[e.length-r.length].length-r[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[n[0],n[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},"unput"),more:mt(function(){return this._more=!0,this},"more"),reject:mt(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):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})},"reject"),less:mt(function(e){this.unput(this.match.slice(e))},"less"),pastInput:mt(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(20<e.length?"...":"")+e.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:mt(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(20<e.length?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:mt(function(){var e=this.pastInput(),t=new Array(e.length+1).join("-");return e+this.upcomingInput()+` +`+t+"^"},"showPosition"),test_match:mt(function(e,t){var r,n;if(this.options.backtrack_lexer&&(n={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges)&&(n.yylloc.range=this.yylloc.range.slice(0)),(r=e[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],r=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack)for(var i in n)this[i]=n[i];return!1},"test_match"),next:mt(function(){if(this.done)return this.EOF;var e,t,r,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((r=this._input.match(this.rules[i[a]]))&&(!t||r[0].length>t[0].length)){if(t=r,n=a,this.options.backtrack_lexer){if(!1!==(e=this.test_match(r,i[a])))return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?!1!==(e=this.test_match(t,i[n]))&&e:""===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:mt(function(){return this.next()||this.lex()},"lex"),begin:mt(function(e){this.conditionStack.push(e)},"begin"),popState:mt(function(){return 0<this.conditionStack.length-1?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:mt(function(){return(this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]]:this.conditions.INITIAL).rules},"_currentRules"),topState:mt(function(e){return 0<=(e=this.conditionStack.length-1-Math.abs(e||0))?this.conditionStack[e]:"INITIAL"},"topState"),pushState:mt(function(e){this.begin(e)},"pushState"),stateStackSize:mt(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:mt(function(e,t,r,n){switch(r){case 0:case 1:break;case 2:return 10;case 3:case 4:break;case 5:return 4;case 6:return 11;case 7:return this.begin("acc_title"),12;case 8:return this.popState(),"acc_title_value";case 9:return this.begin("acc_descr"),14;case 10:return this.popState(),"acc_descr_value";case 11:this.begin("acc_descr_multiline");break;case 12:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:return 17;case 15:return 21;case 16:return 20;case 17:return 6;case 18:return"INVALID"}},"anonymous"),rules:[/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:timeline\b)/i,/^(?:title\s[^\n]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:section\s[^:\n]+)/i,/^(?::\s(?:[^:\n]|:(?!\s))+)/i,/^(?:[^#:\n]+)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,9,11,14,15,16,17,18],inclusive:!0}}};n.lexer=i,mt(e,"Parser"),(qNe=new((e.prototype=n).Parser=e)).parser=qNe,jNe=qNe}),HNe={};OFe(HNe,{addEvent:()=>aIe,addSection:()=>tIe,addTask:()=>iIe,addTaskOrg:()=>sIe,clear:()=>eIe,default:()=>lIe,getCommonDb:()=>JNe,getSections:()=>rIe,getTasks:()=>nIe});var VNe,XNe,KNe,ZNe,QNe,JNe,eIe,tIe,rIe,nIe,iIe,aIe,sIe,oIe,lIe,cIe=b(()=>{ku(),VNe="",XNe=0,KNe=[],ZNe=[],QNe=[],JNe=mt(()=>hh,"getCommonDb"),eIe=mt(function(){KNe.length=0,ZNe.length=0,VNe="",QNe.length=0,fh()},"clear"),tIe=mt(function(e){VNe=e,KNe.push(e)},"addSection"),rIe=mt(function(){return KNe},"getSections"),nIe=mt(function(){let e=oIe(),t=0;for(;!e&&t<100;)e=oIe(),t++;return ZNe.push(...QNe),ZNe},"getTasks"),iIe=mt(function(e,t,r){e={id:XNe++,section:VNe,type:VNe,task:e,score:t||0,events:r?[r]:[]},QNe.push(e)},"addTask"),aIe=mt(function(e){QNe.find(e=>e.id===XNe-1).events.push(e)},"addEvent"),sIe=mt(function(e){e={section:VNe,type:VNe,description:e,task:e,classes:[]},ZNe.push(e)},"addTaskOrg"),oIe=mt(function(){let e=mt(function(e){return QNe[e].processed},"compileTask"),t=!0;for(var[r,n]of QNe.entries())e(r),t=t&&n.processed;return t},"compileTasks"),lIe={clear:eIe,getCommonDb:JNe,addSection:tIe,getSections:rIe,getTasks:nIe,addTask:iIe,addTaskOrg:sIe,addEvent:aIe}});function hIe(e,o){e.each(function(){var t,r=H(this),n=r.text().split(/(\s+|<br>)/).reverse(),i=[],a=r.attr("y"),e=parseFloat(r.attr("dy")),s=r.text(null).append("tspan").attr("x",0).attr("y",a).attr("dy",e+"em");for(let e=0;e<n.length;e++)t=n[n.length-1-e],i.push(t),s.text(i.join(" ").trim()),(s.node().getComputedTextLength()>o||"<br>"===t)&&(i.pop(),s.text(i.join(" ").trim()),i="<br>"===t?[""]:[t],s=r.append("tspan").attr("x",0).attr("y",a).attr("dy","1.1em").text(t))})}var uIe,dIe,pIe,gIe,fIe,mIe,yIe,vIe,xIe,bIe,wIe,kIe,TIe,EIe,CIe,_Ie,SIe,AIe,LIe,NIe,IIe,RIe,MIe,DIe,OIe=b(()=>{function t(e,t,r,n,i,a,s,o){g(t.append("text").attr("x",r+i/2).attr("y",n+a/2+5).style("font-color",o).style("text-anchor","middle").text(e),s)}function c(e,t,r,n,i,a,s,o,l){var{taskFontSize:c,taskFontFamily:h}=o,u=e.split(/<br\s*\/?>/gi);for(let e=0;e<u.length;e++){var d=e*c-c*(u.length-1)/2,p=t.append("text").attr("x",r+i/2).attr("y",n).attr("fill",l).style("text-anchor","middle").style("font-size",c).style("font-family",h);p.append("tspan").attr("x",r+i/2).attr("dy",d).text(u[e]),p.attr("y",n+a/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),g(p,s)}}function r(e,t,r,n,i,a,s,o){var l=(t=t.append("switch")).append("foreignObject").attr("x",r).attr("y",n).attr("width",i).attr("height",a).attr("position","fixed").append("xhtml:div").style("display","table").style("height","100%").style("width","100%");l.append("div").attr("class","label").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(e),c(e,t,r,n,i,a,s,o),g(l,s)}function g(e,t){for(var r in t)r in t&&e.attr(r,t[r])}i6(),uIe=mt(function(e,t){return(e=e.append("rect")).attr("x",t.x),e.attr("y",t.y),e.attr("fill",t.fill),e.attr("stroke",t.stroke),e.attr("width",t.width),e.attr("height",t.height),e.attr("rx",t.rx),e.attr("ry",t.ry),void 0!==t.class&&e.attr("class",t.class),e},"drawRect"),dIe=mt(function(e,r){var t=e.append("circle").attr("cx",r.cx).attr("cy",r.cy).attr("class","face").attr("r",15).attr("stroke-width",2).attr("overflow","visible");function n(e){var t=W5().startAngle(Math.PI/2).endAngle(Math.PI/2*3).innerRadius(7.5).outerRadius(6.8181818181818175);e.append("path").attr("class","mouth").attr("d",t).attr("transform","translate("+r.cx+","+(r.cy+2)+")")}function i(e){var t=W5().startAngle(3*Math.PI/2).endAngle(Math.PI/2*5).innerRadius(7.5).outerRadius(6.8181818181818175);e.append("path").attr("class","mouth").attr("d",t).attr("transform","translate("+r.cx+","+(r.cy+7)+")")}function a(e){e.append("line").attr("class","mouth").attr("stroke",2).attr("x1",r.cx-5).attr("y1",r.cy+7).attr("x2",r.cx+5).attr("y2",r.cy+7).attr("class","mouth").attr("stroke-width","1px").attr("stroke","#666")}return(e=e.append("g")).append("circle").attr("cx",r.cx-5).attr("cy",r.cy-5).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),e.append("circle").attr("cx",r.cx+5).attr("cy",r.cy-5).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),mt(n,"smile"),mt(i,"sad"),mt(a,"ambivalent"),(3<r.score?n:r.score<3?i:a)(e),t},"drawFace"),pIe=mt(function(e,t){return(e=e.append("circle")).attr("cx",t.cx),e.attr("cy",t.cy),e.attr("class","actor-"+t.pos),e.attr("fill",t.fill),e.attr("stroke",t.stroke),e.attr("r",t.r),void 0!==e.class&&e.attr("class",e.class),void 0!==t.title&&e.append("title").text(t.title),e},"drawCircle"),gIe=mt(function(e,t){var r=t.text.replace(/<br\s*\/?>/gi," "),n=((e=e.append("text")).attr("x",t.x),e.attr("y",t.y),e.attr("class","legend"),e.style("text-anchor",t.anchor),void 0!==t.class&&e.attr("class",t.class),e.append("tspan"));return n.attr("x",t.x+2*t.textMargin),n.text(r),e},"drawText"),fIe=mt(function(e,t){function r(e,t,r,n,i){return e+","+t+" "+(e+r)+","+t+" "+(e+r)+","+(t+n-i)+" "+(e+r-1.2*i)+","+(t+n)+" "+e+","+(t+n)}mt(r,"genPoints");var 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,gIe(e,t)},"drawLabel"),mIe=mt(function(e,t,r){var e=e.append("g"),n=wIe();n.x=t.x,n.y=t.y,n.fill=t.fill,n.width=r.width,n.height=r.height,n.class="journey-section section-type-"+t.num,n.rx=3,n.ry=3,uIe(e,n),kIe(r)(t.text,e,n.x,n.y,n.width,n.height,{class:"journey-section section-type-"+t.num},r,t.colour)},"drawSection"),yIe=-1,vIe=mt(function(e,t,r){var n=t.x+r.width/2,e=e.append("g");yIe++,e.append("line").attr("id","task"+yIe).attr("x1",n).attr("y1",t.y).attr("x2",n).attr("y2",450).attr("class","task-line").attr("stroke-width","1px").attr("stroke-dasharray","4 2").attr("stroke","#666"),dIe(e,{cx:n,cy:300+30*(5-t.score),score:t.score}),(n=wIe()).x=t.x,n.y=t.y,n.fill=t.fill,n.width=r.width,n.height=r.height,n.class="task task-type-"+t.num,n.rx=3,n.ry=3,uIe(e,n),kIe(r)(t.task,e,n.x,n.y,n.width,n.height,{class:"task"},r,t.colour)},"drawTask"),xIe=mt(function(e,t){uIe(e,{x:t.startx,y:t.starty,width:t.stopx-t.startx,height:t.stopy-t.starty,fill:t.fill,class:"rect"}).lower()},"drawBackgroundRect"),bIe=mt(function(){return{x:0,y:0,fill:void 0,"text-anchor":"start",width:100,height:100,textMargin:0,rx:0,ry:0}},"getTextObj"),wIe=mt(function(){return{x:0,y:0,width:100,anchor:"start",height:100,rx:0,ry:0}},"getNoteRect"),mt(t,"byText"),mt(c,"byTspan"),mt(r,"byFo"),mt(g,"_setTextAttrs"),kIe=function(e){return"fo"===e.textPlacement?r:"old"===e.textPlacement?t:c},TIe=mt(function(e){e.append("defs").append("marker").attr("id","arrowhead").attr("refX",5).attr("refY",2).attr("markerWidth",6).attr("markerHeight",4).attr("orient","auto").append("path").attr("d","M 0,0 V 4 L6,2 Z")},"initGraphics"),mt(hIe,"wrap"),EIe=mt(function(e,t,r,n){var r=r%12-1,e=e.append("g"),i=(t.section=r,e.attr("class",(t.class?t.class+" ":"")+"timeline-node section-"+r),e.append("g")),a=(e=e.append("g")).append("text").text(t.descr).attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle").call(hIe,t.width).node().getBBox(),s=n.fontSize?.replace?n.fontSize.replace("px",""):n.fontSize;return t.height=a.height+1.1*s*.5+t.padding,t.height=Math.max(t.height,t.maxHeight),t.width=t.width+2*t.padding,e.attr("transform","translate("+t.width/2+", "+t.padding/2+")"),_Ie(i,t,r,n),t},"drawNode"),CIe=mt(function(e,t,r){var n=(e=e.append("g")).append("text").text(t.descr).attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle").call(hIe,t.width).node().getBBox(),r=r.fontSize?.replace?r.fontSize.replace("px",""):r.fontSize;return e.remove(),n.height+1.1*r*.5+t.padding},"getVirtualNodeHeight"),_Ie=mt(function(e,t,r){e.append("path").attr("id","node-"+t.id).attr("class","node-bkg node-"+t.type).attr("d",`M0 ${t.height-5} v${10-t.height} q0,-5 5,-5 h${t.width-10} q5,0 5,5 v${t.height-5} H0 Z`),e.append("line").attr("class","node-line-"+r).attr("x1",0).attr("y1",t.height).attr("x2",t.width).attr("y2",t.height)},"defaultBkg"),SIe={drawRect:uIe,drawCircle:pIe,drawSection:mIe,drawText:gIe,drawLabel:fIe,drawTask:vIe,drawBackgroundRect:xIe,getTextObj:bIe,getNoteRect:wIe,initGraphics:TIe,drawNode:EIe,getVirtualNodeHeight:CIe}}),PIe=b(()=>{i6(),OIe(),e(),Tu(),lh(),AIe=mt(function(e,t,r,n){let i=O(),a=i.timeline?.leftMargin??50,s=(D.debug("timeline",n.db),i.securityLevel),o,l=("sandbox"===s&&(o=H("#i"+t)),H("sandbox"===s?o.nodes()[0].contentDocument.body:"body").select("#"+t)),c=(l.append("g"),n.db.getTasks()),h=n.db.getCommonDb().getDiagramTitle();D.debug("task",c),SIe.initGraphics(l);var u,d,t=n.db.getSections();D.debug("sections",t);let p=0,g=0,f,m=50+a,y=50,v=0,x=!0,b=(t.forEach(function(e){e={number:v,descr:e,section:v,width:150,padding:20,maxHeight:p},e=SIe.getVirtualNodeHeight(l,e,i),D.debug("sectionHeight before draw",e),p=Math.max(p,e+20)}),0),w=0;D.debug("tasks.length",c.length);for([u,d]of c.entries()){var k,T={number:u,descr:d,section:d.section,width:150,padding:20,maxHeight:g},T=SIe.getVirtualNodeHeight(l,T,i);D.debug("taskHeight before draw",T),g=Math.max(g,T+20),b=Math.max(b,d.events.length);let e=0;for(k of d.events){var E={descr:k,section:d.section,number:d.section,width:150,padding:20,maxHeight:50};e+=SIe.getVirtualNodeHeight(l,E,i)}0<d.events.length&&(e+=10*(d.events.length-1)),w=Math.max(w,e)}D.debug("maxSectionHeight before draw",p),D.debug("maxTaskHeight before draw",g),t&&0<t.length?t.forEach(t=>{var e=c.filter(e=>e.section===t),r={number:v,descr:t,section:v,width:200*Math.max(e.length,1)-50,padding:20,maxHeight:p},n=(D.debug("sectionNode",r),l.append("g")),r=SIe.drawNode(n,r,v,i);D.debug("sectionNode output",r),n.attr("transform",`translate(${m}, 50)`),y+=p+50,0<e.length&&LIe(l,e,v,m,y,g,i,b,w,p,!1),m+=200*Math.max(e.length,1),y=50,v++}):(x=!1,LIe(l,c,v,m,y,g,i,b,w,p,!0)),n=l.node().getBBox(),D.debug("bounds",n),h&&l.append("text").text(h).attr("x",n.width/2-a).attr("font-size","4ex").attr("font-weight","bold").attr("y",20),f=x?p+g+150:g+100,l.append("g").attr("class","lineWrapper").append("line").attr("x1",a).attr("y1",f).attr("x2",n.width+3*a).attr("y2",f).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#arrowhead)"),Qc(void 0,l,i.timeline?.padding??50,i.timeline?.useMaxWidth??!1)},"draw"),LIe=mt(function(e,t,r,n,i,a,s,o,l,c,h){for(var u of t){var d={descr:u.task,section:r,number:r,width:150,padding:20,maxHeight:a},p=(D.debug("taskNode",d),e.append("g").attr("class","taskWrapper")),d=SIe.drawNode(p,d,r,s).height;D.debug("taskHeight after draw",d),p.attr("transform",`translate(${n}, ${i})`),a=Math.max(a,d),u.events&&(p=e.append("g").attr("class","lineWrapper"),i+=100,NIe(e,u.events,r,n,i,s),i-=100,p.append("line").attr("x1",n+95).attr("y1",i+a).attr("x2",n+95).attr("y2",i+a+100+l+100).attr("stroke-width",2).attr("stroke","black").attr("marker-end","url(#arrowhead)").attr("stroke-dasharray","5,5")),n+=200,h&&!s.timeline?.disableMulticolor&&r++}},"drawTasks"),NIe=mt(function(e,t,r,n,i,a){let s=0,o=i;i+=100;for(var l of t){var l={descr:l,section:r,number:r,width:150,padding:20,maxHeight:50},c=(D.debug("eventNode",l),e.append("g").attr("class","eventWrapper")),l=SIe.drawNode(c,l,r,a).height;s+=l,c.attr("transform",`translate(${n}, ${i})`),i=i+10+l}return i=o,s},"drawEvents"),IIe={setConf:mt(()=>{},"setConf"),draw:AIe}}),BIe=b(()=>{jr(),RIe=mt(t=>{let r="";for(let e=0;e<t.THEME_COLOR_LIMIT;e++)t["lineColor"+e]=t["lineColor"+e]||t["cScaleInv"+e],ft(t["lineColor"+e])?t["lineColor"+e]=a(t["lineColor"+e],20):t["lineColor"+e]=kt(t["lineColor"+e],20);for(let e=0;e<t.THEME_COLOR_LIMIT;e++){var n=""+(17-3*e);r+=` + .section-${e-1} rect, .section-${e-1} path, .section-${e-1} circle, .section-${e-1} path { + fill: ${t["cScale"+e]}; + } + .section-${e-1} text { + fill: ${t["cScaleLabel"+e]}; + } + .node-icon-${e-1} { + font-size: 40px; + color: ${t["cScaleLabel"+e]}; + } + .section-edge-${e-1}{ + stroke: ${t["cScale"+e]}; + } + .edge-depth-${e-1}{ + stroke-width: ${n}; + } + .section-${e-1} line { + stroke: ${t["cScaleInv"+e]} ; + stroke-width: 3; + } + + .lineWrapper line{ + stroke: ${t["cScaleLabel"+e]} ; + } + + .disabled, .disabled circle, .disabled text { + fill: lightgray; + } + .disabled text { + fill: #efefef; + } + `}return r},"genSections"),MIe=mt(e=>` + .edge { + stroke-width: 3; + } + ${RIe(e)} + .section-root rect, .section-root path, .section-root circle { + fill: ${e.git0}; + } + .section-root text { + fill: ${e.gitBranchLabel0}; + } + .icon-container { + height:100%; + display: flex; + justify-content: center; + align-items: center; + } + .edge { + fill: none; + } + .eventWrapper { + filter: brightness(120%); + } +`,"getStyles"),DIe=MIe}),$Ie={};OFe($Ie,{diagram:()=>FIe});var FIe,zIe,GIe,UIe=b(()=>{WNe(),cIe(),PIe(),BIe(),FIe={db:HNe,renderer:IIe,parser:jNe,styles:DIe}}),qIe=b(()=>{function e(){this.yy={}}var t=mt(function(e,t,r,n){for(r=r||{},n=e.length;n--;r[e[n]]=t);return r},"o"),r=[1,4],n=[1,13],i=[1,12],a=[1,15],s=[1,16],o=[1,20],l=[1,19],c=[6,7,8],h=[1,26],u=[1,24],d=[1,25],p=[6,7,11],g=[1,6,13,15,16,19,22],f=[1,33],m=[1,34],y=[1,6,7,11,13,15,16,19,22],r={trace:mt(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,MINDMAP:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,ICON:15,CLASS:16,nodeWithId:17,nodeWithoutId:18,NODE_DSTART:19,NODE_DESCR:20,NODE_DEND:21,NODE_ID:22,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"MINDMAP",11:"EOF",13:"SPACELIST",15:"ICON",16:"CLASS",19:"NODE_DSTART",20:"NODE_DESCR",21:"NODE_DEND",22:"NODE_ID"},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,2],[12,2],[12,1],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[18,3],[17,1],[17,4]],performAction:mt(function(e,t,r,n,i,a,s){var o=a.length-1;switch(i){case 6:case 7:return n;case 8:n.getLogger().trace("Stop NL ");break;case 9:n.getLogger().trace("Stop EOF ");break;case 11:n.getLogger().trace("Stop NL2 ");break;case 12:n.getLogger().trace("Stop EOF2 ");break;case 15:n.getLogger().info("Node: ",a[o].id),n.addNode(a[o-1].length,a[o].id,a[o].descr,a[o].type);break;case 16:n.getLogger().trace("Icon: ",a[o]),n.decorateNode({icon:a[o]});break;case 17:case 21:n.decorateNode({class:a[o]});break;case 18:n.getLogger().trace("SPACELIST");break;case 19:n.getLogger().trace("Node: ",a[o].id),n.addNode(0,a[o].id,a[o].descr,a[o].type);break;case 20:n.decorateNode({icon:a[o]});break;case 25:n.getLogger().trace("node found ..",a[o-2]),this.$={id:a[o-1],descr:a[o-1],type:n.getType(a[o-2],a[o])};break;case 26:this.$={id:a[o],descr:a[o],type:n.nodeType.DEFAULT};break;case 27:n.getLogger().trace("node found ..",a[o-3]),this.$={id:a[o-3],descr:a[o-1],type:n.getType(a[o-2],a[o])}}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:r},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:r},{6:n,7:[1,10],9:9,12:11,13:i,14:14,15:a,16:s,17:17,18:18,19:o,22:l},t(c,[2,3]),{1:[2,2]},t(c,[2,4]),t(c,[2,5]),{1:[2,6],6:n,12:21,13:i,14:14,15:a,16:s,17:17,18:18,19:o,22:l},{6:n,9:22,12:11,13:i,14:14,15:a,16:s,17:17,18:18,19:o,22:l},{6:h,7:u,10:23,11:d},t(p,[2,22],{17:17,18:18,14:27,15:[1,28],16:[1,29],19:o,22:l}),t(p,[2,18]),t(p,[2,19]),t(p,[2,20]),t(p,[2,21]),t(p,[2,23]),t(p,[2,24]),t(p,[2,26],{19:[1,30]}),{20:[1,31]},{6:h,7:u,10:32,11:d},{1:[2,7],6:n,12:21,13:i,14:14,15:a,16:s,17:17,18:18,19:o,22:l},t(g,[2,14],{7:f,11:m}),t(y,[2,8]),t(y,[2,9]),t(y,[2,10]),t(p,[2,15]),t(p,[2,16]),t(p,[2,17]),{20:[1,35]},{21:[1,36]},t(g,[2,13],{7:f,11:m}),t(y,[2,11]),t(y,[2,12]),{21:[1,37]},t(p,[2,25]),t(p,[2,27])],defaultActions:{2:[2,1],6:[2,2]},parseError:mt(function(e,t){var r;if(!t.recoverable)throw(r=new Error(e)).hash=t,r;this.trace(e)},"parseError"),parse:mt(function(e){var t,r=this,n=[0],i=[],a=[null],s=[],o=this.table,l="",c=0,h=0,u=0,d=1,p=s.slice.call(arguments,1),g=Object.create(this.lexer),f={yy:{}};for(t in this.yy)Object.prototype.hasOwnProperty.call(this.yy,t)&&(f.yy[t]=this.yy[t]);g.setInput(e,f.yy),f.yy.lexer=g,f.yy.parser=this,"u"<typeof g.yylloc&&(g.yylloc={});var m=g.yylloc,y=(s.push(m),g.options&&g.options.ranges);function v(){var e=i.pop()||g.lex()||d;return"number"!=typeof e&&(e instanceof Array&&(e=(i=e).pop()),e=r.symbols_[e]||e),e}"function"==typeof f.yy.parseError?this.parseError=f.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,mt(function(e){n.length=n.length-2*e,a.length=a.length-e,s.length=s.length-e},"popStack"),mt(v,"lex");for(var x,b,w,k,T,E,C,_={};;){if(w=n[n.length-1],"u"<typeof(k=this.defaultActions[w]||((null===x||"u"<typeof x)&&(x=v()),o[w]&&o[w][x]))||!k.length||!k[0]){var S,A=[];for(T in o[w])this.terminals_[T]&&2<T&&A.push("'"+this.terminals_[T]+"'");S=g.showPosition?"Parse error on line "+(c+1)+`: +`+g.showPosition()+` +Expecting `+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(c+1)+": Unexpected "+(x==d?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(S,{text:g.match,token:this.terminals_[x]||x,line:g.yylineno,loc:m,expected:A})}if(k[0]instanceof Array&&1<k.length)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+x);switch(k[0]){case 1:n.push(x),a.push(g.yytext),s.push(g.yylloc),n.push(k[1]),x=null,b?(x=b,b=null):(h=g.yyleng,l=g.yytext,c=g.yylineno,m=g.yylloc,0<u&&u--);break;case 2:if(E=this.productions_[k[1]][1],_.$=a[a.length-E],_._$={first_line:s[s.length-(E||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(E||1)].first_column,last_column:s[s.length-1].last_column},y&&(_._$.range=[s[s.length-(E||1)].range[0],s[s.length-1].range[1]]),typeof(C=this.performAction.apply(_,[l,h,c,f.yy,k[1],a,s].concat(p)))<"u")return C;E&&(n=n.slice(0,-1*E*2),a=a.slice(0,-1*E),s=s.slice(0,-1*E)),n.push(this.productions_[k[1]][0]),a.push(_.$),s.push(_._$),C=o[n[n.length-2]][n[n.length-1]],n.push(C);break;case 3:return!0}}return!0},"parse")},c={EOF:1,parseError:mt(function(e,t){if(!this.yy.parser)throw new Error(e);this.yy.parser.parseError(e,t)},"parseError"),setInput:mt(function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:mt(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},"input"),unput:mt(function(e){var t=e.length,r=e.split(/(?:\r\n?|\n)/g),e=(this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t,this.match.split(/(?:\r\n?|\n)/g)),n=(this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),r.length-1&&(this.yylineno-=r.length-1),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:r?(r.length===e.length?this.yylloc.first_column:0)+e[e.length-r.length].length-r[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[n[0],n[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},"unput"),more:mt(function(){return this._more=!0,this},"more"),reject:mt(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):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})},"reject"),less:mt(function(e){this.unput(this.match.slice(e))},"less"),pastInput:mt(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(20<e.length?"...":"")+e.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:mt(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(20<e.length?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:mt(function(){var e=this.pastInput(),t=new Array(e.length+1).join("-");return e+this.upcomingInput()+` +`+t+"^"},"showPosition"),test_match:mt(function(e,t){var r,n;if(this.options.backtrack_lexer&&(n={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges)&&(n.yylloc.range=this.yylloc.range.slice(0)),(r=e[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],r=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack)for(var i in n)this[i]=n[i];return!1},"test_match"),next:mt(function(){if(this.done)return this.EOF;var e,t,r,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((r=this._input.match(this.rules[i[a]]))&&(!t||r[0].length>t[0].length)){if(t=r,n=a,this.options.backtrack_lexer){if(!1!==(e=this.test_match(r,i[a])))return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?!1!==(e=this.test_match(t,i[n]))&&e:""===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:mt(function(){return this.next()||this.lex()},"lex"),begin:mt(function(e){this.conditionStack.push(e)},"begin"),popState:mt(function(){return 0<this.conditionStack.length-1?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:mt(function(){return(this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]]:this.conditions.INITIAL).rules},"_currentRules"),topState:mt(function(e){return 0<=(e=this.conditionStack.length-1-Math.abs(e||0))?this.conditionStack[e]:"INITIAL"},"topState"),pushState:mt(function(e){this.begin(e)},"pushState"),stateStackSize:mt(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:mt(function(e,t,r,n){switch(r){case 0:return e.getLogger().trace("Found comment",t.yytext),6;case 1:return 8;case 2:this.begin("CLASS");break;case 3:return this.popState(),16;case 4:this.popState();break;case 5:e.getLogger().trace("Begin icon"),this.begin("ICON");break;case 6:return e.getLogger().trace("SPACELINE"),6;case 7:return 7;case 8:return 15;case 9:e.getLogger().trace("end icon"),this.popState();break;case 10:return e.getLogger().trace("Exploding node"),this.begin("NODE"),19;case 11:return e.getLogger().trace("Cloud"),this.begin("NODE"),19;case 12:return e.getLogger().trace("Explosion Bang"),this.begin("NODE"),19;case 13:return e.getLogger().trace("Cloud Bang"),this.begin("NODE"),19;case 14:case 15:case 16:case 17:return this.begin("NODE"),19;case 18:return 13;case 19:return 22;case 20:return 11;case 21:this.begin("NSTR2");break;case 22:return"NODE_DESCR";case 23:this.popState();break;case 24:e.getLogger().trace("Starting NSTR"),this.begin("NSTR");break;case 25:return e.getLogger().trace("description:",t.yytext),"NODE_DESCR";case 26:this.popState();break;case 27:return this.popState(),e.getLogger().trace("node end ))"),"NODE_DEND";case 28:return this.popState(),e.getLogger().trace("node end )"),"NODE_DEND";case 29:return this.popState(),e.getLogger().trace("node end ...",t.yytext),"NODE_DEND";case 30:return this.popState(),e.getLogger().trace("node end (("),"NODE_DEND";case 31:case 32:return this.popState(),e.getLogger().trace("node end (-"),"NODE_DEND";case 33:case 34:return this.popState(),e.getLogger().trace("node end (("),"NODE_DEND";case 35:case 36:return e.getLogger().trace("Long description:",t.yytext),20}},"anonymous"),rules:[/^(?:\s*%%.*)/i,/^(?:mindmap\b)/i,/^(?::::)/i,/^(?:.+)/i,/^(?:\n)/i,/^(?:::icon\()/i,/^(?:[\s]+[\n])/i,/^(?:[\n]+)/i,/^(?:[^\)]+)/i,/^(?:\))/i,/^(?:-\))/i,/^(?:\(-)/i,/^(?:\)\))/i,/^(?:\))/i,/^(?:\(\()/i,/^(?:\{\{)/i,/^(?:\()/i,/^(?:\[)/i,/^(?:[\s]+)/i,/^(?:[^\(\[\n\)\{\}]+)/i,/^(?:$)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:[^"]+)/i,/^(?:["])/i,/^(?:[\)]\))/i,/^(?:[\)])/i,/^(?:[\]])/i,/^(?:\}\})/i,/^(?:\(-)/i,/^(?:-\))/i,/^(?:\(\()/i,/^(?:\()/i,/^(?:[^\)\]\(\}]+)/i,/^(?:.+(?!\(\())/i],conditions:{CLASS:{rules:[3,4],inclusive:!1},ICON:{rules:[8,9],inclusive:!1},NSTR2:{rules:[22,23],inclusive:!1},NSTR:{rules:[25,26],inclusive:!1},NODE:{rules:[21,24,27,28,29,30,31,32,33,34,35,36],inclusive:!1},INITIAL:{rules:[0,1,2,5,6,7,10,11,12,13,14,15,16,17,18,19,20],inclusive:!0}}};r.lexer=c,mt(e,"Parser"),(zIe=new((e.prototype=r).Parser=e)).parser=zIe,GIe=zIe});function jIe(e,t=0){return(YIe[e[t+0]]+YIe[e[t+1]]+YIe[e[t+2]]+YIe[e[t+3]]+"-"+YIe[e[t+4]]+YIe[e[t+5]]+"-"+YIe[e[t+6]]+YIe[e[t+7]]+"-"+YIe[e[t+8]]+YIe[e[t+9]]+"-"+YIe[e[t+10]]+YIe[e[t+11]]+YIe[e[t+12]]+YIe[e[t+13]]+YIe[e[t+14]]+YIe[e[t+15]]).toLowerCase()}var YIe,WIe=b(()=>{YIe=[];for(let e=0;e<256;++e)YIe.push((e+256).toString(16).slice(1));mt(jIe,"unsafeStringify")});function HIe(){if(!VIe){if("u"<typeof crypto||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");VIe=crypto.getRandomValues.bind(crypto)}return VIe(XIe)}var VIe,XIe,KIe,ZIe,QIe=b(()=>{XIe=new Uint8Array(16),mt(HIe,"rng")}),JIe=b(()=>{KIe=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),ZIe={randomUUID:KIe}});function eRe(e,t,r){if(ZIe.randomUUID&&!t&&!e)return ZIe.randomUUID();var n=(e=e||{}).random??e.rng?.()??HIe();if(n.length<16)throw new Error("Random bytes length must be >= 16");if(n[6]=15&n[6]|64,n[8]=63&n[8]|128,t){if((r=r||0)<0||r+16>t.length)throw new RangeError(`UUID byte range ${r}:${r+15} is out of buffer bounds`);for(let e=0;e<16;++e)t[r+e]=n[e];return t}return jIe(n)}var tRe,rRe,nRe,iRe,aRe,sRe,oRe,lRe,cRe=b(()=>{JIe(),QIe(),WIe(),mt(eRe,"v4"),tRe=eRe}),hRe=b(()=>{cRe()}),uRe=b(()=>{Tu(),hRe(),Oc(),e(),en(),rn(),rRe={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},nRe=class{constructor(){this.nodes=[],this.count=0,this.elements={},this.getLogger=this.getLogger.bind(this),this.nodeType=rRe,this.clear(),this.getType=this.getType.bind(this),this.getElementById=this.getElementById.bind(this),this.getParent=this.getParent.bind(this),this.getMindmap=this.getMindmap.bind(this),this.addNode=this.addNode.bind(this),this.decorateNode=this.decorateNode.bind(this)}static{mt(this,"MindmapDB")}clear(){this.nodes=[],this.count=0,this.elements={},this.baseLevel=void 0}getParent(t){for(let e=this.nodes.length-1;0<=e;e--)if(this.nodes[e].level<t)return this.nodes[e];return null}getMindmap(){return 0<this.nodes.length?this.nodes[0]:null}addNode(e,t,r,n){D.info("addNode",e,t,r,n);let i=!1,a=(0===this.nodes.length?(this.baseLevel=e,e=0,i=!0):void 0!==this.baseLevel&&(e-=this.baseLevel,i=!1),O()),s=a.mindmap?.padding??Yt.mindmap.padding;switch(n){case this.nodeType.ROUNDED_RECT:case this.nodeType.RECT:case this.nodeType.HEXAGON:s*=2}if(t={id:this.count++,nodeId:lc(t,a),level:e,descr:lc(r,a),type:n,children:[],width:a.mindmap?.maxNodeWidth??Yt.mindmap.maxNodeWidth,padding:s,isRoot:i},r=this.getParent(e))r.children.push(t);else if(!i)throw new Error(`There can be only one root. No parent could be found for ("${t.descr}")`);this.nodes.push(t)}getType(e,t){switch(D.debug("In get type",e,t),e){case"[":return this.nodeType.RECT;case"(":return")"===t?this.nodeType.ROUNDED_RECT:this.nodeType.CLOUD;case"((":return this.nodeType.CIRCLE;case")":return this.nodeType.CLOUD;case"))":return this.nodeType.BANG;case"{{":return this.nodeType.HEXAGON;default:return this.nodeType.DEFAULT}}setElementForId(e,t){this.elements[e]=t}getElementById(e){return this.elements[e]}decorateNode(e){var t,r;e&&(t=O(),r=this.nodes[this.nodes.length-1],e.icon&&(r.icon=lc(e.icon,t)),e.class)&&(r.class=lc(e.class,t))}type2Str(e){switch(e){case this.nodeType.DEFAULT:return"no-border";case this.nodeType.RECT:return"rect";case this.nodeType.ROUNDED_RECT:return"rounded-rect";case this.nodeType.CIRCLE:return"circle";case this.nodeType.CLOUD:return"cloud";case this.nodeType.BANG:return"bang";case this.nodeType.HEXAGON:return"hexgon";default:return"no-border"}}assignSections(e,t){if(0===e.level?e.section=void 0:e.section=t,e.children)for(var[r,n]of e.children.entries())r=0===e.level?r:t,this.assignSections(n,r)}flattenNodes(e,t){var r=["mindmap-node"],r=(!0===e.isRoot?r.push("section-root","section--1"):void 0!==e.section&&r.push("section-"+e.section),e.class&&r.push(e.class),r.join(" ")),n=mt(e=>{switch(e){case rRe.CIRCLE:return"mindmapCircle";case rRe.RECT:return"rect";case rRe.ROUNDED_RECT:return"rounded";case rRe.CLOUD:return"cloud";case rRe.BANG:return"bang";case rRe.HEXAGON:return"hexagon";case rRe.DEFAULT:return"defaultMindmapNode";default:return"rect"}},"getShapeFromType"),n={id:e.id.toString(),domId:"node_"+e.id.toString(),label:e.descr,isGroup:!1,shape:n(e.type),width:e.width,height:e.height??0,padding:e.padding,cssClasses:r,cssStyles:[],look:"default",icon:e.icon,x:e.x,y:e.y,level:e.level,nodeId:e.nodeId,type:e.type,section:e.section};if(t.push(n),e.children)for(var i of e.children)this.flattenNodes(i,t)}generateEdges(t,r){if(t.children)for(var n of t.children){let e="edge";void 0!==n.section&&(e+=" section-edge-"+n.section);var i=t.level+1,i=(e+=" edge-depth-"+i,{id:`edge_${t.id}_`+n.id,start:t.id.toString(),end:n.id.toString(),type:"normal",curve:"basis",thickness:"normal",look:"default",classes:e,depth:t.level,section:n.section});r.push(i),this.generateEdges(n,r)}}getData(){var e=this.getMindmap(),t=O(),r=t;if(void 0===pr().layout&&(r.layout="cose-bilkent"),!e)return{nodes:[],edges:[],config:r};D.debug("getData: mindmapRoot",e,t),this.assignSections(e);var n,i=[],a=(this.flattenNodes(e,t=[]),this.generateEdges(e,i),D.debug(`getData: processed ${t.length} nodes and ${i.length} edges`),new Map);for(n of t)a.set(n.id,{shape:n.shape,width:n.width,height:n.height,padding:n.padding});return{nodes:t,edges:i,config:r,rootNode:e,markers:["point"],direction:"TB",nodeSpacing:50,rankSpacing:50,shapes:Object.fromEntries(a),type:"mindmap",diagramId:"mindmap-"+tRe()}}getLogger(){return D}}}),dRe=b(()=>{e(),iO(),Qhe(),Jhe(),en(),iRe=mt(async(e,t,r,n)=>{D.debug(`Rendering mindmap diagram +`+e);var i=(e=n.db).getData(),a=YD(t,i.config.securityLevel);i.type=n.type,i.layoutAlgorithm=Phe(i.config.layout,{fallback:"cose-bilkent"}),i.diagramId=t,e.getMindmap()&&(i.nodes.forEach(e=>{"rounded"===e.shape?(e.radius=15,e.taper=15,e.stroke="none",e.width=0,e.padding=15):"circle"===e.shape?e.padding=10:"rect"===e.shape&&(e.width=0,e.padding=10)}),await Ohe(i,a),Bhe(a,i.config.mindmap?.padding??Yt.mindmap.padding,"mindmapDiagram",i.config.mindmap?.useMaxWidth??Yt.mindmap.useMaxWidth))},"draw"),aRe={draw:iRe}}),pRe=b(()=>{jr(),sRe=mt(t=>{let r="";for(let e=0;e<t.THEME_COLOR_LIMIT;e++)t["lineColor"+e]=t["lineColor"+e]||t["cScaleInv"+e],ft(t["lineColor"+e])?t["lineColor"+e]=a(t["lineColor"+e],20):t["lineColor"+e]=kt(t["lineColor"+e],20);for(let e=0;e<t.THEME_COLOR_LIMIT;e++){var n=""+(17-3*e);r+=` + .section-${e-1} rect, .section-${e-1} path, .section-${e-1} circle, .section-${e-1} polygon, .section-${e-1} path { + fill: ${t["cScale"+e]}; + } + .section-${e-1} text { + fill: ${t["cScaleLabel"+e]}; + } + .node-icon-${e-1} { + font-size: 40px; + color: ${t["cScaleLabel"+e]}; + } + .section-edge-${e-1}{ + stroke: ${t["cScale"+e]}; + } + .edge-depth-${e-1}{ + stroke-width: ${n}; + } + .section-${e-1} line { + stroke: ${t["cScaleInv"+e]} ; + stroke-width: 3; + } + + .disabled, .disabled circle, .disabled text { + fill: lightgray; + } + .disabled text { + fill: #efefef; + } + `}return r},"genSections"),oRe=mt(e=>` + .edge { + stroke-width: 3; + } + ${sRe(e)} + .section-root rect, .section-root path, .section-root circle, .section-root polygon { + fill: ${e.git0}; + } + .section-root text { + fill: ${e.gitBranchLabel0}; + } + .section-root span { + color: ${e.gitBranchLabel0}; + } + .section-2 span { + color: ${e.gitBranchLabel0}; + } + .icon-container { + height:100%; + display: flex; + justify-content: center; + align-items: center; + } + .edge { + fill: none; + } + .mindmap-node-label { + dy: 1em; + alignment-baseline: middle; + text-anchor: middle; + dominant-baseline: middle; + text-align: center; + } +`,"getStyles"),lRe=oRe}),gRe={};OFe(gRe,{diagram:()=>fRe});var fRe,mRe,yRe,vRe,xRe,bRe,wRe,kRe,TRe,ERe,CRe,_Re,SRe,ARe,LRe,NRe,IRe,RRe,MRe,DRe,ORe,PRe,BRe,$Re,FRe,zRe=b(()=>{qIe(),uRe(),dRe(),pRe(),fRe={get db(){return new nRe},renderer:aRe,parser:GIe,styles:lRe}}),GRe=b(()=>{function e(){this.yy={}}var t=mt(function(e,t,r,n){for(r=r||{},n=e.length;n--;r[e[n]]=t);return r},"o"),r=[1,4],n=[1,13],i=[1,12],a=[1,15],s=[1,16],o=[1,20],l=[1,19],c=[6,7,8],h=[1,26],u=[1,24],d=[1,25],p=[6,7,11],g=[1,31],f=[6,7,11,24],m=[1,6,13,16,17,20,23],y=[1,35],v=[1,36],x=[1,6,7,11,13,16,17,20,23],b=[1,38],r={trace:mt(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:mt(function(e,t,r,n,i,a,s){var o=a.length-1;switch(i){case 6:case 7:return n;case 8:n.getLogger().trace("Stop NL ");break;case 9:n.getLogger().trace("Stop EOF ");break;case 11:n.getLogger().trace("Stop NL2 ");break;case 12:n.getLogger().trace("Stop EOF2 ");break;case 15:n.getLogger().info("Node: ",a[o-1].id),n.addNode(a[o-2].length,a[o-1].id,a[o-1].descr,a[o-1].type,a[o]);break;case 16:n.getLogger().info("Node: ",a[o].id),n.addNode(a[o-1].length,a[o].id,a[o].descr,a[o].type);break;case 17:n.getLogger().trace("Icon: ",a[o]),n.decorateNode({icon:a[o]});break;case 18:case 23:n.decorateNode({class:a[o]});break;case 19:n.getLogger().trace("SPACELIST");break;case 20:n.getLogger().trace("Node: ",a[o-1].id),n.addNode(0,a[o-1].id,a[o-1].descr,a[o-1].type,a[o]);break;case 21:n.getLogger().trace("Node: ",a[o].id),n.addNode(0,a[o].id,a[o].descr,a[o].type);break;case 22:n.decorateNode({icon:a[o]});break;case 27:n.getLogger().trace("node found ..",a[o-2]),this.$={id:a[o-1],descr:a[o-1],type:n.getType(a[o-2],a[o])};break;case 28:this.$={id:a[o],descr:a[o],type:0};break;case 29:n.getLogger().trace("node found ..",a[o-3]),this.$={id:a[o-3],descr:a[o-1],type:n.getType(a[o-2],a[o])};break;case 30:this.$=a[o-1]+a[o];break;case 31:this.$=a[o]}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:r},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:r},{6:n,7:[1,10],9:9,12:11,13:i,14:14,16:a,17:s,18:17,19:18,20:o,23:l},t(c,[2,3]),{1:[2,2]},t(c,[2,4]),t(c,[2,5]),{1:[2,6],6:n,12:21,13:i,14:14,16:a,17:s,18:17,19:18,20:o,23:l},{6:n,9:22,12:11,13:i,14:14,16:a,17:s,18:17,19:18,20:o,23:l},{6:h,7:u,10:23,11:d},t(p,[2,24],{18:17,19:18,14:27,16:[1,28],17:[1,29],20:o,23:l}),t(p,[2,19]),t(p,[2,21],{15:30,24:g}),t(p,[2,22]),t(p,[2,23]),t(f,[2,25]),t(f,[2,26]),t(f,[2,28],{20:[1,32]}),{21:[1,33]},{6:h,7:u,10:34,11:d},{1:[2,7],6:n,12:21,13:i,14:14,16:a,17:s,18:17,19:18,20:o,23:l},t(m,[2,14],{7:y,11:v}),t(x,[2,8]),t(x,[2,9]),t(x,[2,10]),t(p,[2,16],{15:37,24:g}),t(p,[2,17]),t(p,[2,18]),t(p,[2,20],{24:b}),t(f,[2,31]),{21:[1,39]},{22:[1,40]},t(m,[2,13],{7:y,11:v}),t(x,[2,11]),t(x,[2,12]),t(p,[2,15],{24:b}),t(f,[2,30]),{22:[1,41]},t(f,[2,27]),t(f,[2,29])],defaultActions:{2:[2,1],6:[2,2]},parseError:mt(function(e,t){var r;if(!t.recoverable)throw(r=new Error(e)).hash=t,r;this.trace(e)},"parseError"),parse:mt(function(e){var t,r=this,n=[0],i=[],a=[null],s=[],o=this.table,l="",c=0,h=0,u=0,d=1,p=s.slice.call(arguments,1),g=Object.create(this.lexer),f={yy:{}};for(t in this.yy)Object.prototype.hasOwnProperty.call(this.yy,t)&&(f.yy[t]=this.yy[t]);g.setInput(e,f.yy),f.yy.lexer=g,f.yy.parser=this,"u"<typeof g.yylloc&&(g.yylloc={});var m=g.yylloc,y=(s.push(m),g.options&&g.options.ranges);function v(){var e=i.pop()||g.lex()||d;return"number"!=typeof e&&(e instanceof Array&&(e=(i=e).pop()),e=r.symbols_[e]||e),e}"function"==typeof f.yy.parseError?this.parseError=f.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,mt(function(e){n.length=n.length-2*e,a.length=a.length-e,s.length=s.length-e},"popStack"),mt(v,"lex");for(var x,b,w,k,T,E,C,_={};;){if(w=n[n.length-1],"u"<typeof(k=this.defaultActions[w]||((null===x||"u"<typeof x)&&(x=v()),o[w]&&o[w][x]))||!k.length||!k[0]){var S,A=[];for(T in o[w])this.terminals_[T]&&2<T&&A.push("'"+this.terminals_[T]+"'");S=g.showPosition?"Parse error on line "+(c+1)+`: +`+g.showPosition()+` +Expecting `+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(c+1)+": Unexpected "+(x==d?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(S,{text:g.match,token:this.terminals_[x]||x,line:g.yylineno,loc:m,expected:A})}if(k[0]instanceof Array&&1<k.length)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+x);switch(k[0]){case 1:n.push(x),a.push(g.yytext),s.push(g.yylloc),n.push(k[1]),x=null,b?(x=b,b=null):(h=g.yyleng,l=g.yytext,c=g.yylineno,m=g.yylloc,0<u&&u--);break;case 2:if(E=this.productions_[k[1]][1],_.$=a[a.length-E],_._$={first_line:s[s.length-(E||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(E||1)].first_column,last_column:s[s.length-1].last_column},y&&(_._$.range=[s[s.length-(E||1)].range[0],s[s.length-1].range[1]]),typeof(C=this.performAction.apply(_,[l,h,c,f.yy,k[1],a,s].concat(p)))<"u")return C;E&&(n=n.slice(0,-1*E*2),a=a.slice(0,-1*E),s=s.slice(0,-1*E)),n.push(this.productions_[k[1]][0]),a.push(_.$),s.push(_._$),C=o[n[n.length-2]][n[n.length-1]],n.push(C);break;case 3:return!0}}return!0},"parse")},c={EOF:1,parseError:mt(function(e,t){if(!this.yy.parser)throw new Error(e);this.yy.parser.parseError(e,t)},"parseError"),setInput:mt(function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:mt(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},"input"),unput:mt(function(e){var t=e.length,r=e.split(/(?:\r\n?|\n)/g),e=(this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t,this.match.split(/(?:\r\n?|\n)/g)),n=(this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),r.length-1&&(this.yylineno-=r.length-1),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:r?(r.length===e.length?this.yylloc.first_column:0)+e[e.length-r.length].length-r[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[n[0],n[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},"unput"),more:mt(function(){return this._more=!0,this},"more"),reject:mt(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):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})},"reject"),less:mt(function(e){this.unput(this.match.slice(e))},"less"),pastInput:mt(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(20<e.length?"...":"")+e.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:mt(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(20<e.length?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:mt(function(){var e=this.pastInput(),t=new Array(e.length+1).join("-");return e+this.upcomingInput()+` +`+t+"^"},"showPosition"),test_match:mt(function(e,t){var r,n;if(this.options.backtrack_lexer&&(n={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges)&&(n.yylloc.range=this.yylloc.range.slice(0)),(r=e[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],r=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack)for(var i in n)this[i]=n[i];return!1},"test_match"),next:mt(function(){if(this.done)return this.EOF;var e,t,r,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((r=this._input.match(this.rules[i[a]]))&&(!t||r[0].length>t[0].length)){if(t=r,n=a,this.options.backtrack_lexer){if(!1!==(e=this.test_match(r,i[a])))return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?!1!==(e=this.test_match(t,i[n]))&&e:""===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:mt(function(){return this.next()||this.lex()},"lex"),begin:mt(function(e){this.conditionStack.push(e)},"begin"),popState:mt(function(){return 0<this.conditionStack.length-1?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:mt(function(){return(this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]]:this.conditions.INITIAL).rules},"_currentRules"),topState:mt(function(e){return 0<=(e=this.conditionStack.length-1-Math.abs(e||0))?this.conditionStack[e]:"INITIAL"},"topState"),pushState:mt(function(e){this.begin(e)},"pushState"),stateStackSize:mt(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:mt(function(e,t,r,n){switch(r){case 0:return this.pushState("shapeData"),t.yytext="",24;case 1:return this.pushState("shapeDataStr"),24;case 2:return this.popState(),24;case 3:return t.yytext=t.yytext.replace(/\n\s*/g,"<br/>"),24;case 4:return 24;case 5:this.popState();break;case 6:return e.getLogger().trace("Found comment",t.yytext),6;case 7:return 8;case 8:this.begin("CLASS");break;case 9:return this.popState(),17;case 10:this.popState();break;case 11:e.getLogger().trace("Begin icon"),this.begin("ICON");break;case 12:return e.getLogger().trace("SPACELINE"),6;case 13:return 7;case 14:return 16;case 15:e.getLogger().trace("end icon"),this.popState();break;case 16:return e.getLogger().trace("Exploding node"),this.begin("NODE"),20;case 17:return e.getLogger().trace("Cloud"),this.begin("NODE"),20;case 18:return e.getLogger().trace("Explosion Bang"),this.begin("NODE"),20;case 19:return e.getLogger().trace("Cloud Bang"),this.begin("NODE"),20;case 20:case 21:case 22:case 23:return this.begin("NODE"),20;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:e.getLogger().trace("Starting NSTR"),this.begin("NSTR");break;case 31:return e.getLogger().trace("description:",t.yytext),"NODE_DESCR";case 32:this.popState();break;case 33:return this.popState(),e.getLogger().trace("node end ))"),"NODE_DEND";case 34:return this.popState(),e.getLogger().trace("node end )"),"NODE_DEND";case 35:return this.popState(),e.getLogger().trace("node end ...",t.yytext),"NODE_DEND";case 36:return this.popState(),e.getLogger().trace("node end (("),"NODE_DEND";case 37:case 38:return this.popState(),e.getLogger().trace("node end (-"),"NODE_DEND";case 39:case 40:return this.popState(),e.getLogger().trace("node end (("),"NODE_DEND";case 41:case 42:return e.getLogger().trace("Long description:",t.yytext),21}},"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}}};r.lexer=c,mt(e,"Parser"),(mRe=new((e.prototype=r).Parser=e)).parser=mRe,yRe=mRe}),URe=b(()=>{Tu(),Oc(),e(),en(),F9(),vRe=[],xRe=[],bRe=0,wRe={},kRe=mt(()=>{vRe=[],xRe=[],bRe=0,wRe={}},"clear"),TRe=mt(e=>{if(0===vRe.length)return null;let t=vRe[0].level,r=null;for(let e=vRe.length-1;0<=e;e--)if(vRe[e].level===t&&(r=r||vRe[e]),vRe[e].level<t)throw new Error('Items without section detected, found section ("'+vRe[e].label+'")');return e===r?.level?null:r},"getSection"),ERe=mt(function(){return xRe},"getSections"),CRe=mt(function(){var e=[],r=ERe(),n=O();for(let t of r){var i,a={id:t.id,label:lc(t.label??"",n),isGroup:!0,ticket:t.ticket,shape:"kanbanSection",level:t.level,look:n.look};e.push(a);for(i of vRe.filter(e=>e.parentId===t.id)){var s={id:i.id,parentId:t.id,label:lc(i.label??"",n),isGroup:!1,ticket:i?.ticket,priority:i?.priority,assigned:i?.assigned,icon:i?.icon,shape:"kanbanItem",level:i.level,rx:5,ry:5,cssStyles:["text-align: left"]};e.push(s)}}return{nodes:e,edges:[],other:{},config:O()}},"getData"),_Re=mt((e,t,r,n,i)=>{let a=O(),s=a.mindmap?.padding??Yt.mindmap.padding;switch(n){case SRe.ROUNDED_RECT:case SRe.RECT:case SRe.HEXAGON:s*=2}if(n={id:lc(t,a)||"kbn"+bRe++,level:e,label:lc(r,a),width:a.mindmap?.maxNodeWidth??Yt.mindmap.maxNodeWidth,padding:s,isGroup:!1},void 0!==i){if(i=i.includes(` +`)?i+` +`:`{ +`+i+` +}`,(t=$9(i,{schema:B9})).shape&&(t.shape!==t.shape.toLowerCase()||t.shape.includes("_")))throw new Error(`No such shape: ${t.shape}. Shape names should be lowercase.`);t?.shape&&"kanbanItem"===t.shape&&(n.shape=t?.shape),t?.label&&(n.label=t?.label),t?.icon&&(n.icon=t?.icon.toString()),t?.assigned&&(n.assigned=t?.assigned.toString()),t?.ticket&&(n.ticket=t?.ticket.toString()),t?.priority&&(n.priority=t?.priority)}(r=TRe(e))?n.parentId=r.id||"kbn"+bRe++:xRe.push(n),vRe.push(n)},"addNode"),SRe={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},ARe=mt((e,t)=>{switch(D.debug("In get type",e,t),e){case"[":return SRe.RECT;case"(":return")"===t?SRe.ROUNDED_RECT:SRe.CLOUD;case"((":return SRe.CIRCLE;case")":return SRe.CLOUD;case"))":return SRe.BANG;case"{{":return SRe.HEXAGON;default:return SRe.DEFAULT}},"getType"),LRe=mt((e,t)=>{wRe[e]=t},"setElementForId"),NRe=mt(e=>{var t,r;e&&(t=O(),r=vRe[vRe.length-1],e.icon&&(r.icon=lc(e.icon,t)),e.class)&&(r.cssClasses=lc(e.class,t))},"decorateNode"),IRe=mt(e=>{switch(e){case SRe.DEFAULT:return"no-border";case SRe.RECT:return"rect";case SRe.ROUNDED_RECT:return"rounded-rect";case SRe.CIRCLE:return"circle";case SRe.CLOUD:return"cloud";case SRe.BANG:return"bang";case SRe.HEXAGON:return"hexgon";default:return"no-border"}},"type2Str"),RRe=mt(()=>D,"getLogger"),MRe=mt(e=>wRe[e],"getElementById"),DRe={clear:kRe,addNode:_Re,getSections:ERe,getData:CRe,nodeType:SRe,getType:ARe,setElementForId:LRe,decorateNode:NRe,type2Str:IRe,getLogger:RRe,getElementById:MRe}}),qRe=b(()=>{Tu(),e(),LEe(),lh(),en(),sO(),oP(),ORe=mt(async(e,t,r,n)=>{D.debug(`Rendering kanban diagram +`+e);var i,a=n.db.getData(),s=O(),o=(s.htmlLabels=!1,(e=kEe(t)).append("g")),l=(o.attr("class","sections"),e.append("g"));l.attr("class","items");let c=a.nodes.filter(e=>e.isGroup),h=0,u=[],d=25;for(i of c){var p=s?.kanban?.sectionWidth||200,p=(h+=1,i.x=p*h+10*(h-1)/2,i.width=p,i.y=0,i.height=3*p,i.rx=5,i.ry=5,i.cssClasses=i.cssClasses+" section-"+h,await eO(o,i));d=Math.max(d,p?.labelBBox?.height),u.push(p)}let g=0;for(let i of c){var f,m=u[g];g+=1;let e=s?.kanban?.sectionWidth||200,t=3*-e/2+d,r=t,n=a.nodes.filter(e=>e.parentId===i.id);for(f of n){if(f.isGroup)throw new Error("Groups within groups are not allowed in Kanban diagrams");f.x=i.x,f.width=e-15;var y=(await tP(l,f,{config:s})).node().getBBox();f.y=r+y.height/2,await aP(f),r=f.y+y.height/2+5}var m=m.cluster.select("rect"),v=Math.max(r-t+30,50)+(d-25);m.attr("height",v)}Qc(void 0,e,s.mindmap?.padding??Yt.kanban.padding,s.mindmap?.useMaxWidth??Yt.kanban.useMaxWidth)},"draw"),PRe={draw:ORe}}),jRe=b(()=>{jr(),nue(),BRe=mt(r=>{let t="";for(let e=0;e<r.THEME_COLOR_LIMIT;e++)r["lineColor"+e]=r["lineColor"+e]||r["cScaleInv"+e],ft(r["lineColor"+e])?r["lineColor"+e]=a(r["lineColor"+e],20):r["lineColor"+e]=kt(r["lineColor"+e],20);var n=mt((e,t)=>(r.darkMode?kt:a)(e,t),"adjuster");for(let e=0;e<r.THEME_COLOR_LIMIT;e++){var i=""+(17-3*e);t+=` + .section-${e-1} rect, .section-${e-1} path, .section-${e-1} circle, .section-${e-1} polygon, .section-${e-1} path { + fill: ${n(r["cScale"+e],10)}; + stroke: ${n(r["cScale"+e],10)}; + + } + .section-${e-1} text { + fill: ${r["cScaleLabel"+e]}; + } + .node-icon-${e-1} { + font-size: 40px; + color: ${r["cScaleLabel"+e]}; + } + .section-edge-${e-1}{ + stroke: ${r["cScale"+e]}; + } + .edge-depth-${e-1}{ + stroke-width: ${i}; + } + .section-${e-1} line { + stroke: ${r["cScaleInv"+e]} ; + stroke-width: 3; + } + + .disabled, .disabled circle, .disabled text { + fill: lightgray; + } + .disabled text { + fill: #efefef; + } + + .node rect, + .node circle, + .node ellipse, + .node polygon, + .node path { + fill: ${r.background}; + stroke: ${r.nodeBorder}; + stroke-width: 1px; + } + + .kanban-ticket-link { + fill: ${r.background}; + stroke: ${r.nodeBorder}; + text-decoration: underline; + } + `}return t},"genSections"),$Re=mt(e=>` + .edge { + stroke-width: 3; + } + ${BRe(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; + } + ${Hhe()} +`,"getStyles"),FRe=$Re}),YRe={};OFe(YRe,{diagram:()=>WRe});var WRe,HRe,VRe,XRe,KRe,ZRe,QRe,JRe,eMe,tMe,rMe,nMe,iMe,aMe,sMe,oMe=b(()=>{GRe(),URe(),qRe(),jRe(),WRe={db:DRe,renderer:PRe,parser:yRe,styles:FRe}}),lMe=b(()=>{function e(){this.yy={}}var t=mt(function(e,t,r,n){for(r=r||{},n=e.length;n--;r[e[n]]=t);return r},"o"),r=[1,9],n=[1,10],i=[1,5,10,12],i={trace:mt(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:mt(function(e,t,r,n,i,a,s){var o=a.length-1;switch(i){case 7:var l=n.findOrCreateNode(a[o-4].trim().replaceAll('""','"')),c=n.findOrCreateNode(a[o-2].trim().replaceAll('""','"')),h=parseFloat(a[o].trim());n.addLink(l,c,h);break;case 8:case 9:case 11:this.$=a[o];break;case 10:this.$=a[o-1]}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},{5:[1,3]},{6:4,8:5,15:6,16:7,17:8,18:r,20:n},{1:[2,6],7:11,10:[1,12]},t(n,[2,4],{9:13,5:[1,14]}),{12:[1,15]},t(i,[2,8]),t(i,[2,9]),{19:[1,16]},t(i,[2,11]),{1:[2,1]},{1:[2,5]},t(n,[2,2]),{6:17,8:5,15:6,16:7,17:8,18:r,20:n},{15:18,16:7,17:8,18:r,20:n},{18:[1,19]},t(n,[2,3]),{12:[1,20]},t(i,[2,10]),{15:21,16:7,17:8,18:r,20:n},t([1,5,10],[2,7])],defaultActions:{11:[2,1],12:[2,5]},parseError:mt(function(e,t){var r;if(!t.recoverable)throw(r=new Error(e)).hash=t,r;this.trace(e)},"parseError"),parse:mt(function(e){var t,r=this,n=[0],i=[],a=[null],s=[],o=this.table,l="",c=0,h=0,u=0,d=1,p=s.slice.call(arguments,1),g=Object.create(this.lexer),f={yy:{}};for(t in this.yy)Object.prototype.hasOwnProperty.call(this.yy,t)&&(f.yy[t]=this.yy[t]);g.setInput(e,f.yy),f.yy.lexer=g,f.yy.parser=this,"u"<typeof g.yylloc&&(g.yylloc={});var m=g.yylloc,y=(s.push(m),g.options&&g.options.ranges);function v(){var e=i.pop()||g.lex()||d;return"number"!=typeof e&&(e instanceof Array&&(e=(i=e).pop()),e=r.symbols_[e]||e),e}"function"==typeof f.yy.parseError?this.parseError=f.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,mt(function(e){n.length=n.length-2*e,a.length=a.length-e,s.length=s.length-e},"popStack"),mt(v,"lex");for(var x,b,w,k,T,E,C,_={};;){if(w=n[n.length-1],"u"<typeof(k=this.defaultActions[w]||((null===x||"u"<typeof x)&&(x=v()),o[w]&&o[w][x]))||!k.length||!k[0]){var S,A=[];for(T in o[w])this.terminals_[T]&&2<T&&A.push("'"+this.terminals_[T]+"'");S=g.showPosition?"Parse error on line "+(c+1)+`: +`+g.showPosition()+` +Expecting `+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(c+1)+": Unexpected "+(x==d?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(S,{text:g.match,token:this.terminals_[x]||x,line:g.yylineno,loc:m,expected:A})}if(k[0]instanceof Array&&1<k.length)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+x);switch(k[0]){case 1:n.push(x),a.push(g.yytext),s.push(g.yylloc),n.push(k[1]),x=null,b?(x=b,b=null):(h=g.yyleng,l=g.yytext,c=g.yylineno,m=g.yylloc,0<u&&u--);break;case 2:if(E=this.productions_[k[1]][1],_.$=a[a.length-E],_._$={first_line:s[s.length-(E||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(E||1)].first_column,last_column:s[s.length-1].last_column},y&&(_._$.range=[s[s.length-(E||1)].range[0],s[s.length-1].range[1]]),typeof(C=this.performAction.apply(_,[l,h,c,f.yy,k[1],a,s].concat(p)))<"u")return C;E&&(n=n.slice(0,-1*E*2),a=a.slice(0,-1*E),s=s.slice(0,-1*E)),n.push(this.productions_[k[1]][0]),a.push(_.$),s.push(_._$),C=o[n[n.length-2]][n[n.length-1]],n.push(C);break;case 3:return!0}}return!0},"parse")},r={EOF:1,parseError:mt(function(e,t){if(!this.yy.parser)throw new Error(e);this.yy.parser.parseError(e,t)},"parseError"),setInput:mt(function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:mt(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},"input"),unput:mt(function(e){var t=e.length,r=e.split(/(?:\r\n?|\n)/g),e=(this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t,this.match.split(/(?:\r\n?|\n)/g)),n=(this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),r.length-1&&(this.yylineno-=r.length-1),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:r?(r.length===e.length?this.yylloc.first_column:0)+e[e.length-r.length].length-r[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[n[0],n[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},"unput"),more:mt(function(){return this._more=!0,this},"more"),reject:mt(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):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})},"reject"),less:mt(function(e){this.unput(this.match.slice(e))},"less"),pastInput:mt(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(20<e.length?"...":"")+e.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:mt(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(20<e.length?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:mt(function(){var e=this.pastInput(),t=new Array(e.length+1).join("-");return e+this.upcomingInput()+` +`+t+"^"},"showPosition"),test_match:mt(function(e,t){var r,n;if(this.options.backtrack_lexer&&(n={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges)&&(n.yylloc.range=this.yylloc.range.slice(0)),(r=e[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],r=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack)for(var i in n)this[i]=n[i];return!1},"test_match"),next:mt(function(){if(this.done)return this.EOF;var e,t,r,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((r=this._input.match(this.rules[i[a]]))&&(!t||r[0].length>t[0].length)){if(t=r,n=a,this.options.backtrack_lexer){if(!1!==(e=this.test_match(r,i[a])))return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?!1!==(e=this.test_match(t,i[n]))&&e:""===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:mt(function(){return this.next()||this.lex()},"lex"),begin:mt(function(e){this.conditionStack.push(e)},"begin"),popState:mt(function(){return 0<this.conditionStack.length-1?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:mt(function(){return(this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]]:this.conditions.INITIAL).rules},"_currentRules"),topState:mt(function(e){return 0<=(e=this.conditionStack.length-1-Math.abs(e||0))?this.conditionStack[e]:"INITIAL"},"topState"),pushState:mt(function(e){this.begin(e)},"pushState"),stateStackSize:mt(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:mt(function(e,t,r,n){switch(r){case 0:case 1:return this.pushState("csv"),4;case 2:return 10;case 3:return 5;case 4:return 12;case 5:return this.pushState("escaped_text"),18;case 6:return 20;case 7:return this.popState("escaped_text"),18;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}}};i.lexer=r,mt(e,"Parser"),(HRe=new((e.prototype=i).Parser=e)).parser=HRe,VRe=HRe}),cMe=b(()=>{Tu(),Oc(),ku(),XRe=[],KRe=[],ZRe=new Map,QRe=mt(()=>{XRe=[],KRe=[],ZRe=new Map,fh()},"clear"),JRe=class{constructor(e,t,r=0){this.source=e,this.target=t,this.value=r}static{mt(this,"SankeyLink")}},eMe=mt((e,t,r)=>{XRe.push(new JRe(e,t,r))},"addLink"),tMe=class{constructor(e){this.ID=e}static{mt(this,"SankeyNode")}},rMe=mt(e=>{e=L.sanitizeText(e,O());let t=ZRe.get(e);return void 0===t&&(t=new tMe(e),ZRe.set(e,t),KRe.push(t)),t},"findOrCreateNode"),nMe=mt(()=>KRe,"getNodes"),iMe=mt(()=>XRe,"getLinks"),aMe=mt(()=>({nodes:KRe.map(e=>({id:e.ID})),links:XRe.map(e=>({source:e.source.ID,target:e.target.ID,value:e.value}))}),"getGraph"),sMe={nodesMap:ZRe,getConfig:mt(()=>O().sankey,"getConfig"),getNodes:nMe,getLinks:iMe,getGraph:aMe,addLink:eMe,findOrCreateNode:rMe,getAccTitle:yh,setAccTitle:mh,getAccDescription:xh,setAccDescription:vh,getDiagramTitle:wh,setDiagramTitle:bh,clear:QRe}});function hMe(t,r){let n;if(void 0===r)for(var e of t)null!=e&&(n<e||void 0===n&&e<=e)&&(n=e);else{let e=-1;for(var i of t)null!=(i=r(i,++e,t))&&(n<i||void 0===n&&i<=i)&&(n=i)}return n}var uMe=b(()=>{mt(hMe,"max")});function dMe(t,r){let n;if(void 0===r)for(var e of t)null!=e&&(n>e||void 0===n&&e<=e)&&(n=e);else{let e=-1;for(var i of t)null!=(i=r(i,++e,t))&&(n>i||void 0===n&&i<=i)&&(n=i)}return n}var pMe=b(()=>{mt(dMe,"min")});function gMe(t,r){let n=0;if(void 0===r)for(var e of t)(e=+e)&&(n+=e);else{let e=-1;for(var i of t)(i=+r(i,++e,t))&&(n+=i)}return n}var fMe=b(()=>{mt(gMe,"sum")}),mMe=b(()=>{uMe(),pMe(),fMe()});function yMe(e){return e.target.depth}function vMe(e){return e.depth}function xMe(e,t){return t-1-e.height}function bMe(e,t){return e.sourceLinks.length?e.depth:t-1}function wMe(e){return e.targetLinks.length?e.depth:e.sourceLinks.length?dMe(e.sourceLinks,yMe)-1:0}var kMe=b(()=>{mMe(),mt(yMe,"targetDepth"),mt(vMe,"left"),mt(xMe,"right"),mt(bMe,"justify"),mt(wMe,"center")});function TMe(e){return function(){return e}}var EMe=b(()=>{mt(TMe,"constant")});function CMe(e,t){return SMe(e.source,t.source)||e.index-t.index}function _Me(e,t){return SMe(e.target,t.target)||e.index-t.index}function SMe(e,t){return e.y0-t.y0}function AMe(e){return e.value}function LMe(e){return e.index}function NMe(e){return e.nodes}function IMe(e){return e.links}function RMe(e,t){if(e=e.get(t))return e;throw new Error("missing: "+t)}function MMe({nodes:e}){for(var r of e){let e=r.y0,t=e;for(var n of r.sourceLinks)n.y0=e+n.width/2,e+=n.width;for(var i of r.targetLinks)i.y1=t+i.width/2,t+=i.width}}function DMe(){let o=0,l=0,c=1,h=1,u=24,i=8,d,p=LMe,g=bMe,f,m,t=NMe,r=IMe,a=6;function n(){var e={nodes:t.apply(null,arguments),links:r.apply(null,arguments)};return s(e),y(e),v(e),x(e),k(e),MMe(e),e}function s({nodes:r,links:e}){for(var[t,n]of r.entries())n.index=t,n.sourceLinks=[],n.targetLinks=[];var i,a,s=new Map(r.map((e,t)=>[p(e,t,r),e]));for([i,a]of e.entries()){a.index=i;let{source:e,target:t}=a;"object"!=typeof e&&(e=a.source=RMe(s,e)),"object"!=typeof t&&(t=a.target=RMe(s,t)),e.sourceLinks.push(a),t.targetLinks.push(a)}if(null!=m)for(var{sourceLinks:o,targetLinks:l}of r)o.sort(m),l.sort(m)}function y({nodes:e}){for(var t of e)t.value=void 0===t.fixedValue?Math.max(gMe(t.sourceLinks,AMe),gMe(t.targetLinks,AMe)):t.fixedValue}function v({nodes:e}){let t=e.length,r=new Set(e),n=new Set,i=0;for(;r.size;){for(var a of r){a.depth=i;for(var{target:s}of a.sourceLinks)n.add(s)}if(++i>t)throw new Error("circular link");r=n,n=new Set}}function x({nodes:e}){let t=e.length,r=new Set(e),n=new Set,i=0;for(;r.size;){for(var a of r){a.height=i;for(var{source:s}of a.targetLinks)n.add(s)}if(++i>t)throw new Error("circular link");r=n,n=new Set}}function b({nodes:e}){var t,r=hMe(e,e=>e.depth)+1,n=(c-o-u)/(r-1),i=new Array(r);for(t of e){var a=Math.max(0,Math.min(r-1,Math.floor(g.call(null,t,r))));t.layer=a,t.x0=o+a*n,t.x1=t.x0+u,i[a]?i[a].push(t):i[a]=[t]}if(f)for(var s of i)s.sort(f);return i}function w(e){var r,n=dMe(e,e=>(h-l-(e.length-1)*d)/gMe(e,AMe));for(r of e){let t=l;for(var i of r){i.y0=t,i.y1=t+i.value*n,t=i.y1+d;for(var a of i.sourceLinks)a.width=a.value*n}t=(h-t+d)/(r.length+1);for(let e=0;e<r.length;++e){var s=r[e];s.y0+=t*(e+1),s.y1+=t*(e+1)}L(r)}}function k(e){var t=b(e);d=Math.min(i,(h-l)/(hMe(t,e=>e.length)-1)),w(t);for(let e=0;e<a;++e){var r=Math.pow(.99,e),n=Math.max(1-r,(e+1)/a);E(t,r,n),T(t,r,n)}}function T(r,n,i){for(let e=1,t=r.length;e<t;++e){var a,s,o=r[e];for(a of o){let e=0,t=0;for(var{source:l,value:c}of a.targetLinks)c*=a.layer-l.layer,e+=N(l,a)*c,t+=c;0<t&&(s=(e/t-a.y0)*n,a.y0+=s,a.y1+=s,A(a))}void 0===f&&o.sort(SMe),C(o,i)}}function E(r,n,i){for(let e=r.length,t=e-2;0<=t;--t){var a,s,o=r[t];for(a of o){let e=0,t=0;for(var{target:l,value:c}of a.sourceLinks)c*=l.layer-a.layer,e+=I(a,l)*c,t+=c;0<t&&(s=(e/t-a.y0)*n,a.y0+=s,a.y1+=s,A(a))}void 0===f&&o.sort(SMe),C(o,i)}}function C(e,t){var r=e.length>>1,n=e[r];S(e,n.y0-d,r-1,t),_(e,n.y1+d,1+r,t),S(e,h,e.length-1,t),_(e,l,0,t)}function _(e,t,r,n){for(;r<e.length;++r){var i=e[r],a=(t-i.y0)*n;1e-6<a&&(i.y0+=a,i.y1+=a),t=i.y1+d}}function S(e,t,r,n){for(;0<=r;--r){var i=e[r],a=(i.y1-t)*n;1e-6<a&&(i.y0-=a,i.y1-=a),t=i.y0-d}}function A({sourceLinks:e,targetLinks:t}){if(void 0===m){for(var{source:{sourceLinks:r}}of t)r.sort(_Me);for(var{target:{targetLinks:n}}of e)n.sort(CMe)}}function L(e){if(void 0===m)for(var{sourceLinks:t,targetLinks:r}of e)t.sort(_Me),r.sort(CMe)}function N(e,t){let r=e.y0-(e.sourceLinks.length-1)*d/2;for(var{target:n,width:i}of e.sourceLinks){if(n===t)break;r+=i+d}for(var{source:a,width:s}of t.targetLinks){if(a===e)break;r-=s}return r}function I(e,t){let r=t.y0-(t.targetLinks.length-1)*d/2;for(var{source:n,width:i}of t.targetLinks){if(n===e)break;r+=i+d}for(var{target:a,width:s}of e.sourceLinks){if(a===t)break;r-=s}return r}return mt(n,"sankey"),n.update=function(e){return MMe(e),e},n.nodeId=function(e){return arguments.length?(p="function"==typeof e?e:TMe(e),n):p},n.nodeAlign=function(e){return arguments.length?(g="function"==typeof e?e:TMe(e),n):g},n.nodeSort=function(e){return arguments.length?(f=e,n):f},n.nodeWidth=function(e){return arguments.length?(u=+e,n):u},n.nodePadding=function(e){return arguments.length?(i=d=+e,n):i},n.nodes=function(e){return arguments.length?(t="function"==typeof e?e:TMe(e),n):t},n.links=function(e){return arguments.length?(r="function"==typeof e?e:TMe(e),n):r},n.linkSort=function(e){return arguments.length?(m=e,n):m},n.size=function(e){return arguments.length?(o=l=0,c=+e[0],h=+e[1],n):[c-o,h-l]},n.extent=function(e){return arguments.length?(o=+e[0][0],c=+e[1][0],l=+e[0][1],h=+e[1][1],n):[[o,l],[c,h]]},n.iterations=function(e){return arguments.length?(a=+e,n):a},mt(s,"computeNodeLinks"),mt(y,"computeNodeValues"),mt(v,"computeNodeDepths"),mt(x,"computeNodeHeights"),mt(b,"computeNodeLayers"),mt(w,"initializeNodeBreadths"),mt(k,"computeNodeBreadths"),mt(T,"relaxLeftToRight"),mt(E,"relaxRightToLeft"),mt(C,"resolveCollisions"),mt(_,"resolveCollisionsTopToBottom"),mt(S,"resolveCollisionsBottomToTop"),mt(A,"reorderNodeLinks"),mt(L,"reorderLinks"),mt(N,"targetTop"),mt(I,"sourceTop"),n}var OMe=b(()=>{mMe(),kMe(),EMe(),mt(CMe,"ascendingSourceBreadth"),mt(_Me,"ascendingTargetBreadth"),mt(SMe,"ascendingBreadth"),mt(AMe,"value"),mt(LMe,"defaultId"),mt(NMe,"defaultNodes"),mt(IMe,"defaultLinks"),mt(RMe,"find"),mt(MMe,"computeLinkBreadths"),mt(DMe,"Sankey")});function PMe(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function BMe(){return new PMe}var $Me,FMe,zMe,GMe,UMe=b(()=>{$Me=Math.PI,zMe=(FMe=2*$Me)-1e-6,mt(PMe,"Path"),mt(BMe,"path"),PMe.prototype=BMe.prototype={constructor:PMe,moveTo:mt(function(e,t){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)},"moveTo"),closePath:mt(function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},"closePath"),lineTo:mt(function(e,t){this._+="L"+(this._x1=+e)+","+(this._y1=+t)},"lineTo"),quadraticCurveTo:mt(function(e,t,r,n){this._+="Q"+ +e+","+ +t+","+(this._x1=+r)+","+(this._y1=+n)},"quadraticCurveTo"),bezierCurveTo:mt(function(e,t,r,n,i,a){this._+="C"+ +e+","+ +t+","+ +r+","+ +n+","+(this._x1=+i)+","+(this._y1=+a)},"bezierCurveTo"),arcTo:mt(function(e,t,r,n,i){var a,s,o=this._x1,l=this._y1,c=(r=+r)-(e=+e),h=(n=+n)-(t=+t),u=o-e,d=l-t,p=u*u+d*d;if((i=+i)<0)throw new Error("negative radius: "+i);null===this._x1?this._+="M"+(this._x1=e)+","+(this._y1=t):1e-6<p&&(1e-6<Math.abs(d*c-h*u)&&i?(s=c*c+h*h,n=(r-=o)*r+(o=n-l)*o,l=Math.sqrt(s),a=Math.sqrt(p),p=(s=i*Math.tan(($Me-Math.acos((s+p-n)/(2*l*a)))/2))/a,n=s/l,1e-6<Math.abs(p-1)&&(this._+="L"+(e+p*u)+","+(t+p*d)),this._+="A"+i+","+i+",0,0,"+ +(u*o<d*r)+","+(this._x1=e+n*c)+","+(this._y1=t+n*h)):this._+="L"+(this._x1=e)+","+(this._y1=t))},"arcTo"),arc:mt(function(e,t,r,n,i,a){e=+e,t=+t,a=!!a;var s=(r=+r)*Math.cos(n),o=r*Math.sin(n),l=e+s,c=t+o,h=1^a,a=a?n-i:i-n;if(r<0)throw new Error("negative radius: "+r);null===this._x1?this._+="M"+l+","+c:(1e-6<Math.abs(this._x1-l)||1e-6<Math.abs(this._y1-c))&&(this._+="L"+l+","+c),r&&(zMe<(a=a<0?a%FMe+FMe:a)?this._+="A"+r+","+r+",0,1,"+h+","+(e-s)+","+(t-o)+"A"+r+","+r+",0,1,"+h+","+(this._x1=l)+","+(this._y1=c):1e-6<a&&(this._+="A"+r+","+r+",0,"+ +($Me<=a)+","+h+","+(this._x1=e+r*Math.cos(i))+","+(this._y1=t+r*Math.sin(i))))},"arc"),rect:mt(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:mt(function(){return this._},"toString")},GMe=BMe}),qMe=b(()=>{UMe()});function jMe(e){return mt(function(){return e},"constant")}var YMe=b(()=>{mt(jMe,"default")});function WMe(e){return e[0]}function HMe(e){return e[1]}var VMe,XMe=b(()=>{mt(WMe,"x"),mt(HMe,"y")}),KMe=b(()=>{VMe=Array.prototype.slice});function ZMe(e){return e.source}function QMe(e){return e.target}function JMe(i){var a=ZMe,s=QMe,o=WMe,l=HMe,c=null;function t(){var e,t=VMe.call(arguments),r=a.apply(this,t),n=s.apply(this,t);if(c=c||(e=GMe()),i(c,+o.apply(this,(t[0]=r,t)),+l.apply(this,t),+o.apply(this,(t[0]=n,t)),+l.apply(this,t)),e)return c=null,e+""||null}return mt(t,"link"),t.source=function(e){return arguments.length?(a=e,t):a},t.target=function(e){return arguments.length?(s=e,t):s},t.x=function(e){return arguments.length?(o="function"==typeof e?e:jMe(+e),t):o},t.y=function(e){return arguments.length?(l="function"==typeof e?e:jMe(+e),t):l},t.context=function(e){return arguments.length?(c=e??null,t):c},t}function eDe(e,t,r,n,i){e.moveTo(t,r),e.bezierCurveTo(t=(t+n)/2,r,t,i,n,i)}function tDe(){return JMe(eDe)}var rDe=b(()=>{qMe(),KMe(),YMe(),XMe(),mt(ZMe,"linkSource"),mt(QMe,"linkTarget"),mt(JMe,"link"),mt(eDe,"curveHorizontal"),mt(tDe,"linkHorizontal")}),nDe=b(()=>{rDe()});function iDe(e){return[e.source.x1,e.y0]}function aDe(e){return[e.target.x0,e.y1]}function sDe(){return tDe().source(iDe).target(aDe)}var oDe,lDe,cDe,hDe,uDe,dDe,pDe,gDe=b(()=>{nDe(),mt(iDe,"horizontalSource"),mt(aDe,"horizontalTarget"),mt(sDe,"default")}),fDe=b(()=>{OMe(),kMe(),gDe()}),mDe=b(()=>{oDe=class t{static{mt(this,"Uid")}static{this.count=0}static next(e){return new t(e+ ++t.count)}constructor(e){this.id=e,this.href="#"+e}toString(){return"url("+this.href+")"}}}),yDe=b(()=>{Tu(),i6(),fDe(),lh(),mDe(),lDe={left:vMe,right:xMe,center:wMe,justify:bMe},cDe=mt(function(e,t,r,n){let{securityLevel:i,sankey:a}=O(),s=Ch.sankey,o,l=("sandbox"===i&&(o=H("#i"+t)),H("sandbox"===i?o.nodes()[0].contentDocument.body:"body")),c="sandbox"===i?l.select(`[id="${t}"]`):H(`[id="${t}"]`),h=a?.width??s.width,u=a?.height??s.width,d=a?.useMaxWidth??s.useMaxWidth,p=a?.nodeAlignment??s.nodeAlignment,g=a?.prefix??s.prefix,f=a?.suffix??s.suffix,m=a?.showValues??s.showValues,y=n.db.getGraph(),v=lDe[p],x=(DMe().nodeId(e=>e.id).nodeWidth(10).nodePadding(10+(m?15:0)).nodeAlign(v).extent([[0,0],[h,u]])(y),yx(y5));c.append("g").attr("class","nodes").selectAll(".node").data(y.nodes).join("g").attr("class","node").attr("id",e=>(e.uid=oDe.next("node-")).id).attr("transform",function(e){return"translate("+e.x0+","+e.y0+")"}).attr("x",e=>e.x0).attr("y",e=>e.y0).append("rect").attr("height",e=>e.y1-e.y0).attr("width",e=>e.x1-e.x0).attr("fill",e=>x(e.id));var t=mt(({id:e,value:t})=>m?e+` +`+g+Math.round(100*t)/100+f:e,"getText"),n=(c.append("g").attr("class","node-labels").attr("font-size",14).selectAll("text").data(y.nodes).join("text").attr("x",e=>e.x0<h/2?e.x1+6:e.x0-6).attr("y",e=>(e.y1+e.y0)/2).attr("dy",`${m?"0":"0.35"}em`).attr("text-anchor",e=>e.x0<h/2?"start":"end").text(t),c.append("g").attr("class","links").attr("fill","none").attr("stroke-opacity",.5).selectAll(".link").data(y.links).join("g").attr("class","link").style("mix-blend-mode","multiply")),b=a?.linkColor??"gradient";"gradient"===b&&((t=n.append("linearGradient").attr("id",e=>(e.uid=oDe.next("linearGradient-")).id).attr("gradientUnits","userSpaceOnUse").attr("x1",e=>e.source.x1).attr("x2",e=>e.target.x0)).append("stop").attr("offset","0%").attr("stop-color",e=>x(e.source.id)),t.append("stop").attr("offset","100%").attr("stop-color",e=>x(e.target.id)));let w;switch(b){case"gradient":w=mt(e=>e.uid,"coloring");break;case"source":w=mt(e=>x(e.source.id),"coloring");break;case"target":w=mt(e=>x(e.target.id),"coloring");break;default:w=b}n.append("path").attr("d",sDe()).attr("stroke",w).attr("stroke-width",e=>Math.max(1,e.width)),Qc(void 0,c,0,d)},"draw"),hDe={draw:cDe}}),vDe=b(()=>{uDe=mt(e=>e.replaceAll(/^[^\S\n\r]+|[^\S\n\r]+$/g,"").replaceAll(/([\n\r])+/g,` +`).trim(),"prepareTextForParsing")}),xDe=b(()=>{dDe=mt(e=>`.label { + font-family: ${e.fontFamily}; + }`,"getStyles"),pDe=dDe}),bDe={};OFe(bDe,{diagram:()=>kDe});var wDe,kDe,TDe,EDe,CDe,_De,SDe,ADe,LDe,NDe,IDe,RDe,MDe=b(()=>{lMe(),cMe(),yDe(),vDe(),xDe(),wDe=VRe.parse.bind(VRe),VRe.parse=e=>wDe(uDe(e)),kDe={styles:pDe,parser:VRe,db:sMe,renderer:hDe}}),DDe=b(()=>{rn(),en(),i_(),ku(),TDe=Yt.packet,EDe=class{constructor(){this.packet=[],this.setAccTitle=mh,this.getAccTitle=yh,this.setDiagramTitle=bh,this.getDiagramTitle=wh,this.getAccDescription=xh,this.setAccDescription=vh}static{mt(this,"PacketDB")}getConfig(){var e=_C({...TDe,...ar().packet});return e.showBits&&(e.paddingY+=10),e}getPacket(){return this.packet}pushWord(e){0<e.length&&this.packet.push(e)}clear(){fh(),this.packet=[]}}}),ODe=b(()=>{oTe(),e(),uTe(),DDe(),CDe=mt((e,t)=>{lTe(e,t);let r=-1,n=[],i=1,a=t.getConfig().bitsPerRow;for(var{start:s,end:o,bits:l,label:c}of e.blocks){if(void 0!==s&&void 0!==o&&o<s)throw new Error(`Packet block ${s} - ${o} is invalid. End must be greater than start.`);if((s??=r+1)!==r+1)throw new Error(`Packet block ${s} - ${o??s} is not contiguous. It should start from ${r+1}.`);if(0===l)throw new Error(`Packet block ${s} is invalid. Cannot have a zero bit field.`);for(o??=s+(l??1)-1,l??=o-s+1,r=o,D.debug(`Packet block ${s} - ${r} with label `+c);n.length<=a+1&&t.getPacket().length<1e4;){var[h,u]=_De({start:s,end:o,bits:l,label:c},i,a);if(n.push(h),h.end+1===i*a&&(t.pushWord(n),n=[],i++),!u)break;({start:s,end:o,bits:l,label:c}=u)}}t.pushWord(n)},"populate"),_De=mt((e,t,r)=>{if(void 0===e.start)throw new Error("start should have been set during first phase");if(void 0===e.end)throw new Error("end should have been set during first phase");if(e.end<e.start)throw new Error(`Block start ${e.start} is greater than block end ${e.end}.`);var n;return e.end+1<=t*r?[e,void 0]:[{start:e.start,end:n=t*r-1,label:e.label,bits:n-e.start},{start:n=t*r,end:e.end,label:e.label,bits:e.end-n}]},"getNextFittingBlock"),SDe={parser:{yy:void 0},parse:mt(async e=>{var e=await nTe("packet",e),t=SDe.parser?.yy;if(!(t instanceof EDe))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.");D.debug(e),CDe(e,t)},"parse")}}),PDe=b(()=>{LEe(),lh(),ADe=mt((e,t,r,n)=>{var i,a,s=(n=n.db).getConfig(),{rowHeight:o,paddingY:l,bitWidth:c,bitsPerRow:h}=s,u=n.getPacket(),n=n.getDiagramTitle(),o=(l=o+l)*(u.length+1)-(n?0:o),c=c*h+2,d=kEe(t);d.attr("viewbox",`0 0 ${c} `+o),Zc(d,o,c,s.useMaxWidth);for([i,a]of u.entries())LDe(d,a,i,s);d.append("text").text(n).attr("x",c/2).attr("y",o-l/2).attr("dominant-baseline","middle").attr("text-anchor","middle").attr("class","packetTitle")},"draw"),LDe=mt((e,t,r,{rowHeight:n,paddingX:i,paddingY:a,bitWidth:s,bitsPerRow:o,showBits:l})=>{var c,h=e.append("g"),u=r*(n+a)+a;for(c of t){var d,p,g=c.start%o*s+1,f=(c.end-c.start+1)*s-i;h.append("rect").attr("x",g).attr("y",u).attr("width",f).attr("height",n).attr("class","packetBlock"),h.append("text").attr("x",g+f/2).attr("y",u+n/2).attr("class","packetLabel").attr("dominant-baseline","middle").attr("text-anchor","middle").text(c.label),l&&(d=c.end===c.start,p=u-2,h.append("text").attr("x",g+(d?f/2:0)).attr("y",p).attr("class","packetByte start").attr("dominant-baseline","auto").attr("text-anchor",d?"middle":"start").text(c.start),d||h.append("text").attr("x",g+f).attr("y",p).attr("class","packetByte end").attr("dominant-baseline","auto").attr("text-anchor","end").text(c.end))}},"drawWord"),NDe={draw:ADe}}),BDe=b(()=>{i_(),IDe={byteFontSize:"10px",startByteColor:"black",endByteColor:"black",labelColor:"black",labelFontSize:"12px",titleColor:"black",titleFontSize:"14px",blockStrokeColor:"black",blockStrokeWidth:"1",blockFillColor:"#efefef"},RDe=mt(({packet:e}={})=>` + .packetByte { + font-size: ${(e=_C(IDe,e)).byteFontSize}; + } + .packetByte.start { + fill: ${e.startByteColor}; + } + .packetByte.end { + fill: ${e.endByteColor}; + } + .packetLabel { + fill: ${e.labelColor}; + font-size: ${e.labelFontSize}; + } + .packetTitle { + fill: ${e.titleColor}; + font-size: ${e.titleFontSize}; + } + .packetBlock { + stroke: ${e.blockStrokeColor}; + stroke-width: ${e.blockStrokeWidth}; + fill: ${e.blockFillColor}; + } + `,"styles")}),$De={};OFe($De,{diagram:()=>FDe});var FDe,zDe,GDe,UDe,qDe,jDe,YDe,WDe,HDe,VDe,XDe,KDe,ZDe,QDe,JDe,eOe,tOe,rOe=b(()=>{DDe(),ODe(),PDe(),BDe(),FDe={parser:SDe,get db(){return new EDe},renderer:NDe,styles:RDe}}),nOe=b(()=>{rn(),en(),i_(),ku(),GDe={axes:[],curves:[],options:zDe={showLegend:!0,ticks:5,max:null,min:0,graticule:"circle"}},UDe=structuredClone(GDe),qDe=Yt.radar,jDe=mt(()=>_C({...qDe,...ar().radar}),"getConfig"),YDe=mt(()=>UDe.axes,"getAxes"),WDe=mt(()=>UDe.curves,"getCurves"),HDe=mt(()=>UDe.options,"getOptions"),VDe=mt(e=>{UDe.axes=e.map(e=>({name:e.name,label:e.label??e.name}))},"setAxes"),XDe=mt(e=>{UDe.curves=e.map(e=>({name:e.name,label:e.label??e.name,entries:KDe(e.entries)}))},"setCurves"),KDe=mt(r=>{if(null==r[0].axis)return r.map(e=>e.value);var e=YDe();if(0===e.length)throw new Error("Axes must be populated before curves for reference entries");return e.map(t=>{var e=r.find(e=>e.axis?.$refText===t.name);if(void 0===e)throw new Error("Missing entry for axis "+t.label);return e.value})},"computeCurveEntries"),ZDe=mt(e=>{e=e.reduce((e,t)=>(e[t.name]=t,e),{}),UDe.options={showLegend:e.showLegend?.value??zDe.showLegend,ticks:e.ticks?.value??zDe.ticks,max:e.max?.value??zDe.max,min:e.min?.value??zDe.min,graticule:e.graticule?.value??zDe.graticule}},"setOptions"),QDe=mt(()=>{fh(),UDe=structuredClone(GDe)},"clear"),JDe={getAxes:YDe,getCurves:WDe,getOptions:HDe,setAxes:VDe,setCurves:XDe,setOptions:ZDe,getConfig:jDe,clear:QDe,setAccTitle:mh,getAccTitle:yh,setDiagramTitle:bh,getDiagramTitle:wh,getAccDescription:xh,setAccDescription:vh}}),iOe=b(()=>{oTe(),e(),uTe(),nOe(),eOe=mt(e=>{lTe(e,JDe);var{axes:e,curves:t,options:r}=e;JDe.setAxes(e),JDe.setCurves(t),JDe.setOptions(r)},"populate"),tOe={parse:mt(async e=>{e=await nTe("radar",e),D.debug(e),eOe(e)},"parse")}});function aOe(r,e,t,n,i,a,s){let o=e.length,l=Math.min(s.width,s.height)/2;t.forEach((e,t)=>{e.entries.length===o&&(e=e.entries.map((e,t)=>(t=2*Math.PI*t/o-Math.PI/2,{x:(e=sOe(e,n,i,l))*Math.cos(t),y:e*Math.sin(t)})),"circle"===a?r.append("path").attr("d",oOe(e,s.curveTension)).attr("class","radarCurve-"+t):"polygon"===a&&r.append("polygon").attr("points",e.map(e=>e.x+","+e.y).join(" ")).attr("class","radarCurve-"+t))})}function sOe(e,t,r,n){return n*(Math.min(Math.max(e,t),r)-t)/(r-t)}function oOe(t,r){let n=t.length,i=`M${t[0].x},`+t[0].y;for(let e=0;e<n;e++){var a=t[(e-1+n)%n],s=t[e],o=t[(e+1)%n],l=t[(e+2)%n],c=s.x+(o.x-a.x)*r,a=s.y+(o.y-a.y)*r,h=o.x-(l.x-s.x)*r;i+=` C${c},${a} ${h},${o.y-(l.y-s.y)*r} ${o.x},`+o.y}return i+" Z"}function lOe(a,e,t,r){if(t){let n=3*(r.width/2+r.marginRight)/4,i=3*-(r.height/2+r.marginTop)/4;e.forEach((e,t)=>{var r=a.append("g").attr("transform",`translate(${n}, ${i+20*t})`);r.append("rect").attr("width",12).attr("height",12).attr("class","radarLegendBox-"+t),r.append("text").attr("x",16).attr("y",0).attr("class","radarLegendText").text(e.label)})}}var cOe,hOe,uOe,dOe,pOe,gOe,fOe,mOe,yOe=b(()=>{LEe(),cOe=mt((e,t,r,n)=>{var i=(n=n.db).getAxes(),a=n.getCurves(),s=n.getOptions(),o=n.getConfig(),n=n.getDiagramTitle(),t=kEe(t),t=hOe(t,o),l=s.max??Math.max(...a.map(e=>Math.max(...e.entries))),c=s.min,h=Math.min(o.width,o.height)/2;uOe(t,i,h,s.ticks,s.graticule),dOe(t,i,h,o),aOe(t,i,a,c,l,s.graticule,o),lOe(t,a,s.showLegend,o),t.append("text").attr("class","radarTitle").text(n).attr("x",0).attr("y",-o.height/2-o.marginTop)},"draw"),hOe=mt((e,t)=>{var r=t.width+t.marginLeft+t.marginRight,n=t.height+t.marginTop+t.marginBottom,i=t.marginLeft+t.width/2,t=t.marginTop+t.height/2;return e.attr("viewbox",`0 0 ${r} `+n).attr("width",r).attr("height",n),e.append("g").attr("transform",`translate(${i}, ${t})`)},"drawFrame"),uOe=mt((i,a,s,o,e)=>{if("circle"===e)for(let e=0;e<o;e++){var t=s*(e+1)/o;i.append("circle").attr("r",t).attr("class","radarGraticule")}else if("polygon"===e){let n=a.length;for(let t=0;t<o;t++){let r=s*(t+1)/o,e=a.map((e,t)=>(t=2*t*Math.PI/n-Math.PI/2,r*Math.cos(t)+","+r*Math.sin(t))).join(" ");i.append("polygon").attr("points",e).attr("class","radarGraticule")}}},"drawGraticule"),dOe=mt((t,r,n,i)=>{var a=r.length;for(let e=0;e<a;e++){var s=r[e].label,o=2*e*Math.PI/a-Math.PI/2;t.append("line").attr("x1",0).attr("y1",0).attr("x2",n*i.axisScaleFactor*Math.cos(o)).attr("y2",n*i.axisScaleFactor*Math.sin(o)).attr("class","radarAxisLine"),t.append("text").text(s).attr("x",n*i.axisLabelFactor*Math.cos(o)).attr("y",n*i.axisLabelFactor*Math.sin(o)).attr("class","radarAxisLabel")}},"drawAxes"),mt(aOe,"drawCurves"),mt(sOe,"relativeRadius"),mt(oOe,"closedRoundCurve"),mt(lOe,"drawLegend"),pOe={draw:cOe}}),vOe=b(()=>{i_(),Xr(),rn(),gOe=mt((t,r)=>{let n="";for(let e=0;e<t.THEME_COLOR_LIMIT;e++){var i=t["cScale"+e];n+=` + .radarCurve-${e} { + color: ${i}; + fill: ${i}; + fill-opacity: ${r.curveOpacity}; + stroke: ${i}; + stroke-width: ${r.curveStrokeWidth}; + } + .radarLegendBox-${e} { + fill: ${i}; + fill-opacity: ${r.curveOpacity}; + stroke: ${i}; + } + `}return n},"genIndexStyles"),fOe=mt(e=>{var t=_C(Ot(),ar().themeVariables);return{themeVariables:t,radarOptions:_C(t.radar,e)}},"buildRadarStyleOptions"),mOe=mt(({radar:e}={})=>{var{themeVariables:e,radarOptions:t}=fOe(e);return` + .radarTitle { + font-size: ${e.fontSize}; + color: ${e.titleColor}; + dominant-baseline: hanging; + text-anchor: middle; + } + .radarAxisLine { + stroke: ${t.axisColor}; + stroke-width: ${t.axisStrokeWidth}; + } + .radarAxisLabel { + dominant-baseline: middle; + text-anchor: middle; + font-size: ${t.axisLabelFontSize}px; + color: ${t.axisColor}; + } + .radarGraticule { + fill: ${t.graticuleColor}; + fill-opacity: ${t.graticuleOpacity}; + stroke: ${t.graticuleColor}; + stroke-width: ${t.graticuleStrokeWidth}; + } + .radarLegendText { + text-anchor: start; + font-size: ${t.legendFontSize}px; + dominant-baseline: hanging; + } + ${gOe(e,t)} + `},"styles")}),xOe={};OFe(xOe,{diagram:()=>bOe});var bOe,wOe,kOe,TOe=b(()=>{nOe(),iOe(),yOe(),vOe(),bOe={parser:tOe,db:JDe,renderer:pOe,styles:mOe}}),EOe=b(()=>{function e(){this.yy={}}var t=mt(function(e,t,r,n){for(r=r||{},n=e.length;n--;r[e[n]]=t);return r},"o"),r=[1,15],n=[1,7],i=[1,13],a=[1,14],s=[1,19],o=[1,16],l=[1,17],c=[1,18],h=[8,30],u=[8,10,21,28,29,30,31,39,43,46],d=[1,23],p=[1,24],g=[8,10,15,16,21,28,29,30,31,39,43,46],f=[8,10,15,16,21,27,28,29,30,31,39,43,46],m=[1,49],h={trace:mt(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:mt(function(e,t,r,n,i,a,s){var o=a.length-1;switch(i){case 4:n.getLogger().debug("Rule: separator (NL) ");break;case 5:n.getLogger().debug("Rule: separator (Space) ");break;case 6:n.getLogger().debug("Rule: separator (EOF) ");break;case 7:n.getLogger().debug("Rule: hierarchy: ",a[o-1]),n.setHierarchy(a[o-1]);break;case 8:n.getLogger().debug("Stop NL ");break;case 9:n.getLogger().debug("Stop EOF ");break;case 10:n.getLogger().debug("Stop NL2 ");break;case 11:n.getLogger().debug("Stop EOF2 ");break;case 12:n.getLogger().debug("Rule: statement: ",a[o]),"number"==typeof a[o].length?this.$=a[o]:this.$=[a[o]];break;case 13:n.getLogger().debug("Rule: statement #2: ",a[o-1]),this.$=[a[o-1]].concat(a[o]);break;case 14:n.getLogger().debug("Rule: link: ",a[o],e),this.$={edgeTypeStr:a[o],label:""};break;case 15:n.getLogger().debug("Rule: LABEL link: ",a[o-3],a[o-1],a[o]),this.$={edgeTypeStr:a[o],label:a[o-1]};break;case 18:var l=parseInt(a[o]),c=n.generateId();this.$={id:c,type:"space",label:"",width:l,children:[]};break;case 23:n.getLogger().debug("Rule: (nodeStatement link node) ",a[o-2],a[o-1],a[o]," typestr: ",a[o-1].edgeTypeStr),c=n.edgeStrToEdgeData(a[o-1].edgeTypeStr),this.$=[{id:a[o-2].id,label:a[o-2].label,type:a[o-2].type,directions:a[o-2].directions},{id:a[o-2].id+"-"+a[o].id,start:a[o-2].id,end:a[o].id,label:a[o-1].label,type:"edge",directions:a[o].directions,arrowTypeEnd:c,arrowTypeStart:"arrow_open"},{id:a[o].id,label:a[o].label,type:n.typeStr2Type(a[o].typeStr),directions:a[o].directions}];break;case 24:n.getLogger().debug("Rule: nodeStatement (abc88 node size) ",a[o-1],a[o]),this.$={id:a[o-1].id,label:a[o-1].label,type:n.typeStr2Type(a[o-1].typeStr),directions:a[o-1].directions,widthInColumns:parseInt(a[o],10)};break;case 25:n.getLogger().debug("Rule: nodeStatement (node) ",a[o]),this.$={id:a[o].id,label:a[o].label,type:n.typeStr2Type(a[o].typeStr),directions:a[o].directions,widthInColumns:1};break;case 26:n.getLogger().debug("APA123",this||"na"),n.getLogger().debug("COLUMNS: ",a[o]),this.$={type:"column-setting",columns:"auto"===a[o]?-1:parseInt(a[o])};break;case 27:n.getLogger().debug("Rule: id-block statement : ",a[o-2],a[o-1]),n.generateId(),this.$={...a[o-2],type:"composite",children:a[o-1]};break;case 28:n.getLogger().debug("Rule: blockStatement : ",a[o-2],a[o-1],a[o]),l=n.generateId(),this.$={id:l,type:"composite",label:"",children:a[o-1]};break;case 29:n.getLogger().debug("Rule: node (NODE_ID separator): ",a[o]),this.$={id:a[o]};break;case 30:n.getLogger().debug("Rule: node (NODE_ID nodeShapeNLabel separator): ",a[o-1],a[o]),this.$={id:a[o-1],label:a[o].label,typeStr:a[o].typeStr,directions:a[o].directions};break;case 31:n.getLogger().debug("Rule: dirList: ",a[o]),this.$=[a[o]];break;case 32:n.getLogger().debug("Rule: dirList: ",a[o-1],a[o]),this.$=[a[o-1]].concat(a[o]);break;case 33:n.getLogger().debug("Rule: nodeShapeNLabel: ",a[o-2],a[o-1],a[o]),this.$={typeStr:a[o-2]+a[o],label:a[o-1]};break;case 34:n.getLogger().debug("Rule: BLOCK_ARROW nodeShapeNLabel: ",a[o-3],a[o-2]," #3:",a[o-1],a[o]),this.$={typeStr:a[o-3]+a[o],label:a[o-2],directions:a[o-1]};break;case 35:case 36:this.$={type:"classDef",id:a[o-1].trim(),css:a[o].trim()};break;case 37:this.$={type:"applyClass",id:a[o-1].trim(),styleClass:a[o].trim()};break;case 38:this.$={type:"applyStyles",id:a[o-1].trim(),stylesStr:a[o].trim()}}},"anonymous"),table:[{9:1,10:[1,2]},{1:[3]},{10:r,11:3,13:4,19:5,20:6,21:n,22:8,23:9,24:10,25:11,26:12,28:i,29:a,31:s,39:o,43:l,46:c},{8:[1,20]},t(h,[2,12],{13:4,19:5,20:6,22:8,23:9,24:10,25:11,26:12,11:21,10:r,21:n,28:i,29:a,31:s,39:o,43:l,46:c}),t(u,[2,16],{14:22,15:d,16:p}),t(u,[2,17]),t(u,[2,18]),t(u,[2,19]),t(u,[2,20]),t(u,[2,21]),t(u,[2,22]),t(g,[2,25],{27:[1,25]}),t(u,[2,26]),{19:26,26:12,31:s},{10:r,11:27,13:4,19:5,20:6,21:n,22:8,23:9,24:10,25:11,26:12,28:i,29:a,31:s,39:o,43:l,46:c},{40:[1,28],42:[1,29]},{44:[1,30]},{47:[1,31]},t(f,[2,29],{32:32,35:[1,33],37:[1,34]}),{1:[2,7]},t(h,[2,13]),{26:35,31:s},{31:[2,14]},{17:[1,36]},t(g,[2,24]),{10:r,11:37,13:4,14:22,15:d,16:p,19:5,20:6,21:n,22:8,23:9,24:10,25:11,26:12,28:i,29:a,31:s,39:o,43:l,46:c},{30:[1,38]},{41:[1,39]},{41:[1,40]},{45:[1,41]},{48:[1,42]},t(f,[2,30]),{18:[1,43]},{18:[1,44]},t(g,[2,23]),{18:[1,45]},{30:[1,46]},t(u,[2,28]),t(u,[2,35]),t(u,[2,36]),t(u,[2,37]),t(u,[2,38]),{36:[1,47]},{33:48,34:m},{15:[1,50]},t(u,[2,27]),t(f,[2,33]),{38:[1,51]},{33:52,34:m,38:[2,31]},{31:[2,15]},t(f,[2,34]),{38:[2,32]}],defaultActions:{20:[2,7],23:[2,14],50:[2,15],52:[2,32]},parseError:mt(function(e,t){var r;if(!t.recoverable)throw(r=new Error(e)).hash=t,r;this.trace(e)},"parseError"),parse:mt(function(e){var t,r=this,n=[0],i=[],a=[null],s=[],o=this.table,l="",c=0,h=0,u=0,d=1,p=s.slice.call(arguments,1),g=Object.create(this.lexer),f={yy:{}};for(t in this.yy)Object.prototype.hasOwnProperty.call(this.yy,t)&&(f.yy[t]=this.yy[t]);g.setInput(e,f.yy),f.yy.lexer=g,f.yy.parser=this,"u"<typeof g.yylloc&&(g.yylloc={});var m=g.yylloc,y=(s.push(m),g.options&&g.options.ranges);function v(){var e=i.pop()||g.lex()||d;return"number"!=typeof e&&(e instanceof Array&&(e=(i=e).pop()),e=r.symbols_[e]||e),e}"function"==typeof f.yy.parseError?this.parseError=f.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,mt(function(e){n.length=n.length-2*e,a.length=a.length-e,s.length=s.length-e},"popStack"),mt(v,"lex");for(var x,b,w,k,T,E,C,_={};;){if(w=n[n.length-1],"u"<typeof(k=this.defaultActions[w]||((null===x||"u"<typeof x)&&(x=v()),o[w]&&o[w][x]))||!k.length||!k[0]){var S,A=[];for(T in o[w])this.terminals_[T]&&2<T&&A.push("'"+this.terminals_[T]+"'");S=g.showPosition?"Parse error on line "+(c+1)+`: +`+g.showPosition()+` +Expecting `+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(c+1)+": Unexpected "+(x==d?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(S,{text:g.match,token:this.terminals_[x]||x,line:g.yylineno,loc:m,expected:A})}if(k[0]instanceof Array&&1<k.length)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+x);switch(k[0]){case 1:n.push(x),a.push(g.yytext),s.push(g.yylloc),n.push(k[1]),x=null,b?(x=b,b=null):(h=g.yyleng,l=g.yytext,c=g.yylineno,m=g.yylloc,0<u&&u--);break;case 2:if(E=this.productions_[k[1]][1],_.$=a[a.length-E],_._$={first_line:s[s.length-(E||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(E||1)].first_column,last_column:s[s.length-1].last_column},y&&(_._$.range=[s[s.length-(E||1)].range[0],s[s.length-1].range[1]]),typeof(C=this.performAction.apply(_,[l,h,c,f.yy,k[1],a,s].concat(p)))<"u")return C;E&&(n=n.slice(0,-1*E*2),a=a.slice(0,-1*E),s=s.slice(0,-1*E)),n.push(this.productions_[k[1]][0]),a.push(_.$),s.push(_._$),C=o[n[n.length-2]][n[n.length-1]],n.push(C);break;case 3:return!0}}return!0},"parse")},r={EOF:1,parseError:mt(function(e,t){if(!this.yy.parser)throw new Error(e);this.yy.parser.parseError(e,t)},"parseError"),setInput:mt(function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:mt(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},"input"),unput:mt(function(e){var t=e.length,r=e.split(/(?:\r\n?|\n)/g),e=(this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t,this.match.split(/(?:\r\n?|\n)/g)),n=(this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),r.length-1&&(this.yylineno-=r.length-1),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:r?(r.length===e.length?this.yylloc.first_column:0)+e[e.length-r.length].length-r[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[n[0],n[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},"unput"),more:mt(function(){return this._more=!0,this},"more"),reject:mt(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):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})},"reject"),less:mt(function(e){this.unput(this.match.slice(e))},"less"),pastInput:mt(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(20<e.length?"...":"")+e.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:mt(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(20<e.length?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:mt(function(){var e=this.pastInput(),t=new Array(e.length+1).join("-");return e+this.upcomingInput()+` +`+t+"^"},"showPosition"),test_match:mt(function(e,t){var r,n;if(this.options.backtrack_lexer&&(n={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges)&&(n.yylloc.range=this.yylloc.range.slice(0)),(r=e[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],r=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack)for(var i in n)this[i]=n[i];return!1},"test_match"),next:mt(function(){if(this.done)return this.EOF;var e,t,r,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((r=this._input.match(this.rules[i[a]]))&&(!t||r[0].length>t[0].length)){if(t=r,n=a,this.options.backtrack_lexer){if(!1!==(e=this.test_match(r,i[a])))return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?!1!==(e=this.test_match(t,i[n]))&&e:""===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:mt(function(){return this.next()||this.lex()},"lex"),begin:mt(function(e){this.conditionStack.push(e)},"begin"),popState:mt(function(){return 0<this.conditionStack.length-1?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:mt(function(){return(this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]]:this.conditions.INITIAL).rules},"_currentRules"),topState:mt(function(e){return 0<=(e=this.conditionStack.length-1-Math.abs(e||0))?this.conditionStack[e]:"INITIAL"},"topState"),pushState:mt(function(e){this.begin(e)},"pushState"),stateStackSize:mt(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:mt(function(e,t,r,n){switch(r){case 0:return e.getLogger().debug("Found block-beta"),10;case 1:return e.getLogger().debug("Found id-block"),29;case 2:return e.getLogger().debug("Found block"),10;case 3:e.getLogger().debug(".",t.yytext);break;case 4:e.getLogger().debug("_",t.yytext);break;case 5:return 5;case 6:return t.yytext=-1,28;case 7:return t.yytext=t.yytext.replace(/columns\s+/,""),e.getLogger().debug("COLUMNS (LEX)",t.yytext),28;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:",t.yytext),this.popState();break;case 13:return e.getLogger().debug("LEX: STR end:",t.yytext),"STR";case 14:return t.yytext=t.yytext.replace(/space\:/,""),e.getLogger().debug("SPACE NUM (LEX)",t.yytext),21;case 15:return t.yytext="1",e.getLogger().debug("COLUMNS (LEX)",t.yytext),21;case 16:return 42;case 17:return"LINKSTYLE";case 18:return"INTERPOLATE";case 19:return this.pushState("CLASSDEF"),39;case 20:return this.popState(),this.pushState("CLASSDEFID"),"DEFAULT_CLASSDEF_ID";case 21:return this.popState(),this.pushState("CLASSDEFID"),40;case 22:return this.popState(),41;case 23:return this.pushState("CLASS"),43;case 24:return this.popState(),this.pushState("CLASS_STYLE"),44;case 25:return this.popState(),45;case 26:return this.pushState("STYLE_STMNT"),46;case 27:return this.popState(),this.pushState("STYLE_DEFINITION"),47;case 28:return this.popState(),48;case 29:return this.pushState("acc_title"),"acc_title";case 30:return this.popState(),"acc_title_value";case 31:return this.pushState("acc_descr"),"acc_descr";case 32:return this.popState(),"acc_descr_value";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:case 38:return this.popState(),e.getLogger().debug("Lex: (("),"NODE_DEND";case 39:return this.popState(),e.getLogger().debug("Lex: ))"),"NODE_DEND";case 40:case 41:return this.popState(),e.getLogger().debug("Lex: (("),"NODE_DEND";case 42:return this.popState(),e.getLogger().debug("Lex: (-"),"NODE_DEND";case 43:return this.popState(),e.getLogger().debug("Lex: -)"),"NODE_DEND";case 44:return this.popState(),e.getLogger().debug("Lex: (("),"NODE_DEND";case 45:return this.popState(),e.getLogger().debug("Lex: ]]"),"NODE_DEND";case 46:return this.popState(),e.getLogger().debug("Lex: ("),"NODE_DEND";case 47:return this.popState(),e.getLogger().debug("Lex: ])"),"NODE_DEND";case 48:case 49:return this.popState(),e.getLogger().debug("Lex: /]"),"NODE_DEND";case 50:return this.popState(),e.getLogger().debug("Lex: )]"),"NODE_DEND";case 51:return this.popState(),e.getLogger().debug("Lex: )"),"NODE_DEND";case 52:return this.popState(),e.getLogger().debug("Lex: ]>"),"NODE_DEND";case 53:return this.popState(),e.getLogger().debug("Lex: ]"),"NODE_DEND";case 54:return e.getLogger().debug("Lexa: -)"),this.pushState("NODE"),35;case 55:return e.getLogger().debug("Lexa: (-"),this.pushState("NODE"),35;case 56:return e.getLogger().debug("Lexa: ))"),this.pushState("NODE"),35;case 57:return e.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;case 58:return e.getLogger().debug("Lex: ((("),this.pushState("NODE"),35;case 59:case 60:case 61:return e.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;case 62:return e.getLogger().debug("Lexc: >"),this.pushState("NODE"),35;case 63:return e.getLogger().debug("Lexa: (["),this.pushState("NODE"),35;case 64:return e.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;case 65:case 66:case 67:case 68:case 69:case 70:case 71:return this.pushState("NODE"),35;case 72:return e.getLogger().debug("Lexa: ["),this.pushState("NODE"),35;case 73:return this.pushState("BLOCK_ARROW"),e.getLogger().debug("LEX ARR START"),37;case 74:return e.getLogger().debug("Lex: NODE_ID",t.yytext),31;case 75:return e.getLogger().debug("Lex: EOF",t.yytext),8;case 76: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:",t.yytext),"NODE_DESCR";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 t.yytext=t.yytext.replace(/^,\s*/,""),e.getLogger().debug("Lex (right): dir:",t.yytext),"DIR";case 86:return t.yytext=t.yytext.replace(/^,\s*/,""),e.getLogger().debug("Lex (left):",t.yytext),"DIR";case 87:return t.yytext=t.yytext.replace(/^,\s*/,""),e.getLogger().debug("Lex (x):",t.yytext),"DIR";case 88:return t.yytext=t.yytext.replace(/^,\s*/,""),e.getLogger().debug("Lex (y):",t.yytext),"DIR";case 89:return t.yytext=t.yytext.replace(/^,\s*/,""),e.getLogger().debug("Lex (up):",t.yytext),"DIR";case 90:return t.yytext=t.yytext.replace(/^,\s*/,""),e.getLogger().debug("Lex (down):",t.yytext),"DIR";case 91:return t.yytext="]>",e.getLogger().debug("Lex (ARROW_DIR end):",t.yytext),this.popState(),this.popState(),"BLOCK_ARROW_END";case 92:return e.getLogger().debug("Lex: LINK","#"+t.yytext+"#"),15;case 93:case 94:case 95:return e.getLogger().debug("Lex: LINK",t.yytext),15;case 96:case 97:case 98:return e.getLogger().debug("Lex: START_LINK",t.yytext),this.pushState("LLABEL"),16;case 99:this.pushState("md_string");break;case 100:return e.getLogger().debug("Lex: Starting string"),this.pushState("string"),"LINK_LABEL";case 101:return this.popState(),e.getLogger().debug("Lex: LINK","#"+t.yytext+"#"),15;case 102:case 103:return this.popState(),e.getLogger().debug("Lex: LINK",t.yytext),15;case 104:return e.getLogger().debug("Lex: COLON",t.yytext),t.yytext=t.yytext.slice(1),27}},"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}}};h.lexer=r,mt(e,"Parser"),(wOe=new((e.prototype=h).Parser=e)).parser=wOe,kOe=wOe});function COe(e){switch(D.debug("typeStr2Type",e),e){case"[]":return"square";case"()":return D.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 _Oe(e){return"=="!==(D.debug("typeStr2Type",e),e)?"normal":"thick"}function SOe(e){switch(e.replace(/^[\s-]+|[\s-]+$/g,"")){case"x":return"arrow_cross";case"o":return"arrow_circle";case">":return"arrow_point";default:return""}}var AOe,LOe,NOe,IOe,ROe,MOe,DOe,OOe,POe,BOe,$Oe,FOe,zOe,GOe,UOe,qOe,jOe,YOe,WOe,HOe,VOe,XOe,KOe,ZOe,QOe,JOe,ePe,tPe,rPe,nPe,iPe,aPe,sPe,oPe,lPe,cPe,hPe,uPe,dPe,pPe,gPe=b(()=>{kz(),rn(),Tu(),e(),Oc(),ku(),AOe=new Map,LOe=[],NOe=new Map,IOe=O(),ROe=new Map,MOe=mt(e=>L.sanitizeText(e,IOe),"sanitizeText"),DOe=mt(function(e,t=""){let r=ROe.get(e);r||(r={id:e,styles:[],textStyles:[]},ROe.set(e,r)),t?.split(",").forEach(e=>{var t=e.replace(/([^;]*);/,"$1").trim();RegExp("color").exec(e)&&(e=t.replace("fill","bgFill").replace("color","fill"),r.textStyles.push(e)),r.styles.push(t)})},"addStyleClass"),OOe=mt(function(e,t=""){e=AOe.get(e),null!=t&&(e.styles=t.split(","))},"addStyle2Node"),POe=mt(function(e,r){e.split(",").forEach(function(e){let t=AOe.get(e);void 0===t&&(e=e.trim(),t={id:e,type:"na",children:[]},AOe.set(e,t)),t.classes||(t.classes=[]),t.classes.push(r)})},"setCssClass"),BOe=mt((e,t)=>{var r,n=[],i=(e=e.flat()).find(e=>"column-setting"===e?.type)?.columns??-1;for(r of e)if("number"==typeof i&&0<i&&"column-setting"!==r.type&&"number"==typeof r.widthInColumns&&r.widthInColumns>i&&D.warn(`Block ${r.id} width ${r.widthInColumns} exceeds configured column width `+i),r.label&&(r.label=MOe(r.label)),"classDef"===r.type)DOe(r.id,r.css);else if("applyClass"===r.type)POe(r.id,r?.styleClass??"");else if("applyStyles"===r.type)r?.stylesStr&&OOe(r.id,r?.stylesStr);else if("column-setting"===r.type)t.columns=r.columns??-1;else if("edge"===r.type){var a=(NOe.get(r.id)??0)+1;NOe.set(r.id,a),r.id=a+"-"+r.id,LOe.push(r)}else if(r.label||("composite"===r.type?r.label="":r.label=r.id),void 0===(a=AOe.get(r.id))?AOe.set(r.id,r):("na"!==r.type&&(a.type=r.type),r.label!==r.id&&(a.label=r.label)),r.children&&BOe(r.children,r),"space"===r.type){var s=r.width??1;for(let e=0;e<s;e++){var o=wz(r);o.id=o.id+"-"+e,AOe.set(o.id,o),n.push(o)}}else void 0===a&&n.push(r);t.children=n},"populateBlockDatabase"),$Oe=[],FOe={id:"root",type:"composite",children:[],columns:-1},zOe=mt(()=>{D.debug("Clear called"),fh(),FOe={id:"root",type:"composite",children:[],columns:-1},AOe=new Map([["root",FOe]]),$Oe=[],ROe=new Map,LOe=[],NOe=new Map},"clear"),mt(COe,"typeStr2Type"),mt(_Oe,"edgeTypeStr2Type"),mt(SOe,"edgeStrToEdgeData"),GOe=0,UOe=mt(()=>(GOe++,"id-"+Math.random().toString(36).substr(2,12)+"-"+GOe),"generateId"),qOe=mt(e=>{FOe.children=e,BOe(e,FOe),$Oe=FOe.children},"setHierarchy"),jOe=mt(e=>(e=AOe.get(e))?e.columns||(e.children?e.children.length:-1):-1,"getColumns"),YOe=mt(()=>[...AOe.values()],"getBlocksFlat"),WOe=mt(()=>$Oe||[],"getBlocks"),HOe=mt(()=>LOe,"getEdges"),VOe=mt(e=>AOe.get(e),"getBlock"),XOe=mt(e=>{AOe.set(e.id,e)},"setBlock"),ZOe=mt(()=>D,"getLogger"),KOe=mt(function(){return ROe},"getClasses"),ZOe={getConfig:mt(()=>ar().block,"getConfig"),typeStr2Type:COe,edgeTypeStr2Type:_Oe,edgeStrToEdgeData:SOe,getLogger:ZOe,getBlocksFlat:YOe,getBlocks:WOe,getEdges:HOe,setHierarchy:qOe,getBlock:VOe,setBlock:XOe,getColumns:jOe,getClasses:KOe,clear:zOe,generateId:UOe},QOe=ZOe}),fPe=b(()=>{jr(),nue(),JOe=mt((e,t)=>{var r=(i=ct)(e,"r"),n=i(e,"g"),i=i(e,"b");return ot(r,n,i,t)},"fade"),ePe=mt(e=>`.label { + font-family: ${e.fontFamily}; + color: ${e.nodeTextColor||e.textColor}; + } + .cluster-label text { + fill: ${e.titleColor}; + } + .cluster-label span,p { + color: ${e.titleColor}; + } + + + + .label text,span,p { + fill: ${e.nodeTextColor||e.textColor}; + color: ${e.nodeTextColor||e.textColor}; + } + + .node rect, + .node circle, + .node ellipse, + .node polygon, + .node path { + fill: ${e.mainBkg}; + stroke: ${e.nodeBorder}; + stroke-width: 1px; + } + .flowchart-label text { + text-anchor: middle; + } + // .flowchart-label .text-outer-tspan { + // text-anchor: middle; + // } + // .flowchart-label .text-inner-tspan { + // text-anchor: start; + // } + + .node .label { + text-align: center; + } + .node.clickable { + cursor: pointer; + } + + .arrowheadPath { + fill: ${e.arrowheadColor}; + } + + .edgePath .path { + stroke: ${e.lineColor}; + stroke-width: 2.0px; + } + + .flowchart-link { + stroke: ${e.lineColor}; + fill: none; + } + + .edgeLabel { + background-color: ${e.edgeLabelBackground}; + rect { + opacity: 0.5; + background-color: ${e.edgeLabelBackground}; + fill: ${e.edgeLabelBackground}; + } + text-align: center; + } + + /* For html labels only */ + .labelBkg { + background-color: ${JOe(e.edgeLabelBackground,.5)}; + // background-color: + } + + .node .cluster { + // fill: ${JOe(e.mainBkg,.5)}; + fill: ${JOe(e.clusterBkg,.5)}; + stroke: ${JOe(e.clusterBorder,.2)}; + box-shadow: rgba(50, 50, 93, 0.25) 0px 13px 27px -5px, rgba(0, 0, 0, 0.3) 0px 8px 16px -8px; + stroke-width: 1px; + } + + .cluster text { + fill: ${e.titleColor}; + } + + .cluster span,p { + color: ${e.titleColor}; + } + /* .cluster div { + color: ${e.titleColor}; + } */ + + div.mermaidTooltip { + position: absolute; + text-align: center; + max-width: 200px; + padding: 2px; + font-family: ${e.fontFamily}; + font-size: 12px; + background: ${e.tertiaryColor}; + border: 1px solid ${e.border2}; + border-radius: 2px; + pointer-events: none; + z-index: 100; + } + + .flowchartTitleText { + text-anchor: middle; + font-size: 18px; + fill: ${e.textColor}; + } + ${Hhe()} +`,"getStyles"),tPe=ePe}),mPe=b(()=>{e(),rPe=mt((t,e,r,n)=>{e.forEach(e=>{dPe[e](t,r,n)})},"insertMarkers"),nPe=mt((e,t,r)=>{D.trace("Making markers for ",r),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionStart").attr("class","marker extension "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionEnd").attr("class","marker extension "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z")},"extension"),iPe=mt((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionStart").attr("class","marker composition "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionEnd").attr("class","marker composition "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"composition"),aPe=mt((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationStart").attr("class","marker aggregation "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationEnd").attr("class","marker aggregation "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"aggregation"),sPe=mt((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyStart").attr("class","marker dependency "+t).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyEnd").attr("class","marker dependency "+t).attr("refX",13).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"dependency"),oPe=mt((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopStart").attr("class","marker lollipop "+t).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopEnd").attr("class","marker lollipop "+t).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6)},"lollipop"),lPe=mt((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-pointEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",6).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-pointStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",4.5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"point"),cPe=mt((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-circleEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-circleStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"circle"),hPe=mt((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-crossEnd").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-crossStart").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0")},"cross"),uPe=mt((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","strokeWidth").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"barb"),dPe={extension:nPe,composition:iPe,aggregation:aPe,dependency:sPe,lollipop:oPe,point:lPe,circle:cPe,cross:hPe,barb:uPe},pPe=rPe});function yPe(e,t){if(0===e||!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);return e<0?{px:t,py:0}:1===e?{px:0,py:t}:{px:t%e,py:Math.floor(t/e)}}function vPe(s,o,l=0,c=0){if(D.debug("setBlockSizes abc95 (start)",s.id,s?.size?.x,"block width =",s?.size,"siblingWidth",l),s?.size?.width||(s.size={width:l,height:c,x:0,y:0}),0<s.children?.length){for(var h of s.children)vPe(h,o);var u,d,p,g,f=TPe(s),m=f.width;D.debug("setBlockSizes abc95 maxWidth of",s.id,":s children is ",m,u=f.height);for(d of s.children)d.size&&(D.debug(`abc95 Setting size of children of ${s.id} id=${d.id} ${m} ${u} `+JSON.stringify(d.size)),d.size.width=m*(d.widthInColumns??1)+kPe*((d.widthInColumns??1)-1),d.size.height=u,d.size.x=0,d.size.y=0,D.debug(`abc95 updating size of ${s.id} children child:${d.id} maxWidth:${m} maxHeight:`+u));for(p of s.children)vPe(p,o,m,u);let e=s.columns??-1,t=0;for(g of s.children)t+=g.widthInColumns??1;let r=s.children.length,n=(0<e&&e<t&&(r=e),Math.ceil(t/r)),i=r*(m+kPe)+kPe,a=n*(u+kPe)+kPe;if(i<l){D.debug(`Detected to small sibling: abc95 ${s.id} siblingWidth ${l} siblingHeight ${c} width `+i),i=l,a=c;var y,v=(l-r*kPe-kPe)/r,x=(c-n*kPe-kPe)/n;D.debug("Size indata abc88",s.id,"childWidth",v,"maxWidth",m),D.debug("Size indata abc88",s.id,"childHeight",x,"maxHeight",u),D.debug("Size indata abc88 xSize",r,"padding",kPe);for(y of s.children)y.size&&(y.size.width=v,y.size.height=x,y.size.x=0,y.size.y=0)}if(D.debug(`abc95 (finale calc) ${s.id} xSize ${r} ySize ${n} columns ${e}${s.children.length} width=`+Math.max(i,s.size?.width||0)),i<(s?.size?.width||0)&&(i=s?.size?.width||0,0<(f=0<e?Math.min(s.children.length,e):s.children.length))){var b,w=(i-f*kPe-kPe)/f;D.debug("abc95 (growing to fit) width",s.id,i,s.size?.width,w);for(b of s.children)b.size&&(b.size.width=w)}s.size={width:i,height:a,x:0,y:0}}D.debug("setBlockSizes abc94 (done)",s.id,s?.size?.x,s?.size?.width,s?.size?.y,s?.size?.height)}function xPe(i,a){D.debug(`abc85 layout blocks (=>layoutBlocks) ${i.id} x: ${i?.size?.x} y: ${i?.size?.y} width: `+i?.size?.width);var s=i.columns??-1;if(D.debug("layoutBlocks columns abc95",i.id,"=>",s,i),i.children&&0<i.children.length){var o,e=i?.children[0]?.size?.width??0,e=i.children.length*e+(i.children.length-1)*kPe;D.debug("widthOfChildren 88",e,"posX");let t=0,r=(D.debug("abc91 block?.size?.x",i.id,i?.size?.x),i?.size?.x?i?.size?.x+(-i?.size?.width/2||0):-kPe),n=0;for(o of i.children){var l=i;if(o.size){var{width:c,height:h}=o.size,{px:u,py:d}=yPe(s,t);d!=n&&(n=d,r=i?.size?.x?i?.size?.x+(-i?.size?.width/2||0):-kPe,D.debug("New row in layout for block",i.id," and child ",o.id,n)),D.debug(`abc89 layout blocks (child) id: ${o.id} Pos: ${t} (px, py) ${u},${d} (${l?.size?.x},${l?.size?.y}) parent: ${l.id} width: `+c+kPe),l.size&&(u=c/2,o.size.x=r+kPe+u,D.debug(`abc91 layout blocks (calc) px, pyid:${o.id} startingPos=X${r} new startingPosX${o.size.x} ${u} padding=${kPe} width=${c} halfWidth=${u} => x:${o.size.x} y:${o.size.y} ${o.widthInColumns} (width * (child?.w || 1)) / 2 `+c*(o?.widthInColumns??1)/2),r=o.size.x+u,o.size.y=l.size.y-l.size.height/2+d*(h+kPe)+h/2+kPe,D.debug(`abc88 layout blocks (calc) px, pyid:${o.id}startingPosX${r}${kPe}${u}=>x:${o.size.x}y:${o.size.y}${o.widthInColumns}(width * (child?.w || 1)) / 2`+c*(o?.widthInColumns??1)/2)),o.children&&xPe(o,a);let e=o?.widthInColumns??1;0<s&&(e=Math.min(e,s-t%s)),t+=e,D.debug("abc88 columnsPos",o,t)}}}D.debug(`layout blocks (<==layoutBlocks) ${i.id} x: ${i?.size?.x} y: ${i?.size?.y} width: `+i?.size?.width)}function bPe(e,{minX:t,minY:r,maxX:n,maxY:i}={minX:0,minY:0,maxX:0,maxY:0}){var a,s,o,l;if(e.size&&"root"!==e.id&&({x:a,y:s,width:o,height:l}=e.size,a-o/2<t&&(t=a-o/2),s-l/2<r&&(r=s-l/2),n<a+o/2&&(n=a+o/2),i<s+l/2)&&(i=s+l/2),e.children)for(var c of e.children)({minX:t,minY:r,maxX:n,maxY:i}=bPe(c,{minX:t,minY:r,maxX:n,maxY:i}));return{minX:t,minY:r,maxX:n,maxY:i}}function wPe(e){var t,r,n=e.getBlock("root");if(n)return vPe(n,e,0,0),xPe(n,e),D.debug("getBlocks",JSON.stringify(n,null,2)),{minX:e,minY:n,maxX:t,maxY:r}=bPe(n),{x:e,y:n,width:t-e,height:r-n}}var kPe,TPe,EPe=b(()=>{e(),Tu(),kPe=O()?.block?.padding??8,mt(yPe,"calculateBlockPosition"),TPe=mt(e=>{let t=0,r=0;for(var n of e.children){var{width:i,height:a,x:s,y:o}=n.size??{width:0,height:0,x:0,y:0};D.debug("getMaxChildSize abc95 child:",n.id,"width:",i,"height:",a,"x:",s,"y:",o,n.type),"space"!==n.type&&(i>t&&(t=i/(e.widthInColumns??1)),a>r)&&(r=a)}return{width:t,height:r}},"getMaxChildSize"),mt(vPe,"setBlockSizes"),mt(xPe,"layoutBlocks"),mt(bPe,"findBounds"),mt(wPe,"layout")});function CPe(e,t){t&&e.attr("style",t)}function _Pe(e,t){var r=H(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")),n=r.append("xhtml:div"),i=e.label,a=e.isNode?"nodeLabel":"edgeLabel",s=n.append("span");return s.html(lc(i,t)),CPe(s,e.labelStyle),s.attr("class",a),CPe(n,e.labelStyle),n.style("display","inline-block"),n.style("white-space","nowrap"),n.attr("xmlns","http://www.w3.org/1999/xhtml"),r.node()}var SPe,APe,LPe,NPe,IPe,RPe=b(()=>{i6(),Tu(),Oc(),e(),JL(),i_(),mt(CPe,"applyStyle"),mt(_Pe,"addHtmlLabel"),SPe=mt(async(e,t,r,n)=>{let i=e||"";if("object"==typeof i&&(i=i[0]),e=O(),fc(e.flowchart.htmlLabels))return i=i.replace(/\\n|\n/g,"<br />"),D.debug("vertexText"+i),_Pe({isNode:n,label:await ZL(r_(i)),labelStyle:t.replace("fill:","color:")},e);var a,s=document.createElementNS("http://www.w3.org/2000/svg","text");s.setAttribute("style",t.replace("color:","fill:"));for(a of"string"==typeof i?i.split(/\\n|\n|<br\s*\/?>/gi):Array.isArray(i)?i:[]){var o=document.createElementNS("http://www.w3.org/2000/svg","tspan");o.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),o.setAttribute("dy","1em"),o.setAttribute("x","0"),r?o.setAttribute("class","title-row"):o.setAttribute("class","row"),o.textContent=a.trim(),s.appendChild(o)}return s},"createLabel"),APe=SPe}),MPe=b(()=>{e(),LPe=mt((e,t,r,n,i)=>{t.arrowTypeStart&&IPe(e,"start",t.arrowTypeStart,r,n,i),t.arrowTypeEnd&&IPe(e,"end",t.arrowTypeEnd,r,n,i)},"addEdgeMarkers"),NPe={arrow_cross:"cross",arrow_point:"point",arrow_barb:"barb",arrow_circle:"circle",aggregation:"aggregation",extension:"extension",composition:"composition",dependency:"dependency",lollipop:"lollipop"},IPe=mt((e,t,r,n,i,a)=>{var s=NPe[r];s?e.attr("marker-"+t,`url(${n}#${i}_${a}-${s}${"start"===t?"Start":"End"})`):D.warn("Unknown arrow type: "+r)},"addEdgeMarker")});function DPe(e,t){O().flowchart.htmlLabels&&e&&(e.style.width=9*t.length+"px",e.style.height="12px")}var OPe,PPe,BPe,$Pe,FPe,zPe,GPe,UPe,qPe,jPe,YPe=b(()=>{e(),RPe(),JL(),i6(),Tu(),i_(),Oc(),fO(),aO(),MPe(),OPe={},PPe={},BPe=mt(async(e,t)=>{var r,n=O(),i=fc(n.flowchart.htmlLabels),n="markdown"===t.labelType?QL(e,t.label,{style:t.labelStyle,useHtmlLabels:i,addSvgBackground:!0},n):await APe(t.label,t.labelStyle),a=e.insert("g").attr("class","edgeLabel"),s=a.insert("g").attr("class","label");s.node().appendChild(n);let o=n.getBBox();i&&(i=n.children[0],r=H(n),o=i.getBoundingClientRect(),r.attr("width",o.width),r.attr("height",o.height)),s.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"),OPe[t.id]=a,t.width=o.width,t.height=o.height;let l;return t.startLabelLeft&&(i=await APe(t.startLabelLeft,t.labelStyle),s=(r=e.insert("g").attr("class","edgeTerminals")).insert("g").attr("class","inner"),l=s.node().appendChild(i),a=i.getBBox(),s.attr("transform","translate("+-a.width/2+", "+-a.height/2+")"),PPe[t.id]||(PPe[t.id]={}),PPe[t.id].startLeft=r,DPe(l,t.startLabelLeft)),t.startLabelRight&&(i=await APe(t.startLabelRight,t.labelStyle),a=(s=e.insert("g").attr("class","edgeTerminals")).insert("g").attr("class","inner"),l=s.node().appendChild(i),a.node().appendChild(i),r=i.getBBox(),a.attr("transform","translate("+-r.width/2+", "+-r.height/2+")"),PPe[t.id]||(PPe[t.id]={}),PPe[t.id].startRight=s,DPe(l,t.startLabelRight)),t.endLabelLeft&&(i=await APe(t.endLabelLeft,t.labelStyle),r=(a=e.insert("g").attr("class","edgeTerminals")).insert("g").attr("class","inner"),l=r.node().appendChild(i),s=i.getBBox(),r.attr("transform","translate("+-s.width/2+", "+-s.height/2+")"),a.node().appendChild(i),PPe[t.id]||(PPe[t.id]={}),PPe[t.id].endLeft=a,DPe(l,t.endLabelLeft)),t.endLabelRight&&(r=await APe(t.endLabelRight,t.labelStyle),i=(s=e.insert("g").attr("class","edgeTerminals")).insert("g").attr("class","inner"),l=i.node().appendChild(r),a=r.getBBox(),i.attr("transform","translate("+-a.width/2+", "+-a.height/2+")"),s.node().appendChild(r),PPe[t.id]||(PPe[t.id]={}),PPe[t.id].endRight=s,DPe(l,t.endLabelRight)),n},"insertEdgeLabel"),mt(DPe,"setTerminalWidth"),$Pe=mt((n,i)=>{D.debug("Moving label abc88 ",n.id,n.label,OPe[n.id],i);var a,s=i.updatedPath||i.originalPath,o=O(),o=WD(o).subGraphTitleTotalMargin;if(n.label){let e=OPe[n.id],t=n.x,r=n.y;s&&(a=e_.calcLabelPosition(s),D.debug("Moving label "+n.label+" from (",t,",",r,") to (",a.x,",",a.y,") abc88"),i.updatedPath)&&(t=a.x,r=a.y),e.attr("transform",`translate(${t}, ${r+o/2})`)}if(n.startLabelLeft){let e=PPe[n.id].startLeft,t=n.x,r=n.y;s&&(i=e_.calcTerminalLabelPosition(n.arrowTypeStart?10:0,"start_left",s),t=i.x,r=i.y),e.attr("transform",`translate(${t}, ${r})`)}if(n.startLabelRight){let e=PPe[n.id].startRight,t=n.x,r=n.y;s&&(a=e_.calcTerminalLabelPosition(n.arrowTypeStart?10:0,"start_right",s),t=a.x,r=a.y),e.attr("transform",`translate(${t}, ${r})`)}if(n.endLabelLeft){let e=PPe[n.id].endLeft,t=n.x,r=n.y;s&&(o=e_.calcTerminalLabelPosition(n.arrowTypeEnd?10:0,"end_left",s),t=o.x,r=o.y),e.attr("transform",`translate(${t}, ${r})`)}if(n.endLabelRight){let e=PPe[n.id].endRight,t=n.x,r=n.y;s&&(i=e_.calcTerminalLabelPosition(n.arrowTypeEnd?10:0,"end_right",s),t=i.x,r=i.y),e.attr("transform",`translate(${t}, ${r})`)}},"positionEdgeLabel"),FPe=mt((e,t)=>{var r=e.x,n=e.y,r=Math.abs(t.x-r),t=Math.abs(t.y-n);return e.width/2<=r||e.height/2<=t},"outsideNode"),zPe=mt((e,n,i)=>{D.debug(`intersection calc abc89: + outsidePoint: ${JSON.stringify(n)} + insidePoint : ${JSON.stringify(i)} + node : x:${e.x} y:${e.y} w:${e.width} h:`+e.height);let a=e.x,t=e.y,r=Math.abs(a-i.x),s=e.width/2,o=i.x<n.x?s-r:s+r,l=e.height/2,c=Math.abs(n.y-i.y),h=Math.abs(n.x-i.x),u;if(Math.abs(t-n.y)*s>Math.abs(a-n.x)*l)return e=i.y<n.y?n.y-l-t:t-l-n.y,o=h*e/c,u={x:i.x<n.x?i.x+o:i.x-h+o,y:i.y<n.y?i.y+c-e:i.y-c+e},0===o&&(u.x=n.x,u.y=n.y),0===h&&(u.x=n.x),0===c&&(u.y=n.y),D.debug(`abc89 topp/bott calc, Q ${c}, q ${e}, R ${h}, r `+o,u),u;{let e=c*(o=i.x<n.x?n.x-s-a:a-s-n.x)/h,t=i.x<n.x?i.x+h-o:i.x-h+o,r=i.y<n.y?i.y+e:i.y-e;return D.debug(`sides calc abc89, Q ${c}, q ${e}, R ${h}, r `+o,{_x:t,_y:r}),0===o&&(t=n.x,r=n.y),0===h&&(t=n.x),0===c&&(r=n.y),{x:t,y:r}}},"intersection"),GPe=mt((e,n)=>{D.debug("abc88 cutPathAtIntersect",e,n);let i=[],a=e[0],s=!1;return e.forEach(e=>{if(FPe(n,e)||s)a=e,s||i.push(e);else{let t=zPe(n,a,e),r=!1;i.forEach(e=>{r=r||e.x===t.x&&e.y===t.y}),i.some(e=>e.x===t.x&&e.y===t.y)||i.push(t),s=!0}}),i},"cutPathAtIntersect"),UPe=mt(function(e,t,r,n,i,a,s){let o=r.points,l=(D.debug("abc88 InsertEdge: edge=",r,"e=",t),!1),c=a.node(t.v),h=a.node(t.w),u=(h?.intersect&&c?.intersect&&((o=o.slice(1,r.points.length-1)).unshift(c.intersect(o[0])),o.push(h.intersect(o[o.length-1]))),r.toCluster&&(D.debug("to cluster abc88",n[r.toCluster]),o=GPe(r.points,n[r.toCluster].node),l=!0),r.fromCluster&&(D.debug("from cluster abc88",n[r.fromCluster]),o=GPe(o.reverse(),n[r.fromCluster].node).reverse(),l=!0),o.filter(e=>!Number.isNaN(e.y))),d=v3,{x:p,y:g}=(!r.curve||"graph"!==i&&"flowchart"!==i||(d=r.curve),uO(r)),f=r3().x(p).y(g).curve(d),m;switch(r.thickness){case"normal":m="edge-thickness-normal";break;case"thick":case"invisible":m="edge-thickness-thick";break;default:m=""}switch(r.pattern){case"solid":m+=" edge-pattern-solid";break;case"dotted":m+=" edge-pattern-dotted";break;case"dashed":m+=" edge-pattern-dashed"}let y=e.append("path").attr("d",f(u)).attr("id",r.id).attr("class"," "+m+(r.classes?" "+r.classes:"")).attr("style",r.style),v="";return(O().flowchart.arrowMarkerAbsolute||O().state.arrowMarkerAbsolute)&&(v=gc(!0)),LPe(y,r,v,s,i),a={},l&&(a.updatedPath=o),a.originalPath=r.points,a},"insertEdge")}),WPe=b(()=>{qPe=mt(e=>{var t,r=new Set;for(t of e)switch(t){case"x":r.add("right"),r.add("left");break;case"y":r.add("up"),r.add("down");break;default:r.add(t)}return r},"expandAndDeduplicateDirections"),jPe=mt((e,t,r)=>{var e=qPe(e),n=t.height+2*r.padding,i=n/2,t=t.width+2*i+r.padding,r=r.padding/2;return e.has("right")&&e.has("left")&&e.has("up")&&e.has("down")?[{x:0,y:0},{x:i,y:0},{x:t/2,y:2*r},{x:t-i,y:0},{x:t,y:0},{x:t,y:-n/3},{x:t+2*r,y:-n/2},{x:t,y:-2*n/3},{x:t,y:-n},{x:t-i,y:-n},{x:t/2,y:-n-2*r},{x:i,y:-n},{x:0,y:-n},{x:0,y:-2*n/3},{x:-2*r,y:-n/2},{x:0,y:-n/3}]:e.has("right")&&e.has("left")&&e.has("up")?[{x:i,y:0},{x:t-i,y:0},{x:t,y:-n/2},{x:t-i,y:-n},{x:i,y:-n},{x:0,y:-n/2}]:e.has("right")&&e.has("left")&&e.has("down")?[{x:0,y:0},{x:i,y:-n},{x:t-i,y:-n},{x:t,y:0}]:e.has("right")&&e.has("up")&&e.has("down")?[{x:0,y:0},{x:t,y:-i},{x:t,y:i-n},{x:0,y:-n}]:e.has("left")&&e.has("up")&&e.has("down")?[{x:t,y:0},{x:0,y:-i},{x:0,y:i-n},{x:t,y:-n}]:e.has("right")&&e.has("left")?[{x:i,y:0},{x:i,y:-r},{x:t-i,y:-r},{x:t-i,y:0},{x:t,y:-n/2},{x:t-i,y:-n},{x:t-i,y:r-n},{x:i,y:r-n},{x:i,y:-n},{x:0,y:-n/2}]:e.has("up")&&e.has("down")?[{x:t/2,y:0},{x:0,y:-r},{x:i,y:-r},{x:i,y:r-n},{x:0,y:r-n},{x:t/2,y:-n},{x:t,y:r-n},{x:t-i,y:r-n},{x:t-i,y:-r},{x:t,y:-r}]:e.has("right")&&e.has("up")?[{x:0,y:0},{x:t,y:-i},{x:0,y:-n}]:e.has("right")&&e.has("down")?[{x:0,y:0},{x:t,y:0},{x:0,y:-n}]:e.has("left")&&e.has("up")?[{x:t,y:0},{x:0,y:-i},{x:t,y:-n}]:e.has("left")&&e.has("down")?[{x:t,y:0},{x:0,y:0},{x:t,y:-n}]:e.has("right")?[{x:i,y:-r},{x:i,y:-r},{x:t-i,y:-r},{x:t-i,y:0},{x:t,y:-n/2},{x:t-i,y:-n},{x:t-i,y:r-n},{x:i,y:r-n},{x:i,y:r-n}]:e.has("left")?[{x:i,y:0},{x:i,y:-r},{x:t-i,y:-r},{x:t-i,y:r-n},{x:i,y:r-n},{x:i,y:-n},{x:0,y:-n/2}]:e.has("up")?[{x:i,y:-r},{x:i,y:r-n},{x:0,y:r-n},{x:t/2,y:-n},{x:t,y:r-n},{x:t-i,y:r-n},{x:t-i,y:-r}]:e.has("down")?[{x:t/2,y:0},{x:0,y:-r},{x:i,y:-r},{x:i,y:r-n},{x:t-i,y:r-n},{x:t-i,y:-r},{x:t,y:-r}]:[{x:0,y:0}]},"getArrowPoints")});function HPe(e,t){return e.intersect(t)}var VPe,XPe=b(()=>{mt(HPe,"intersectNode"),VPe=HPe});function KPe(e,t,r,n){var i=e.x,e=e.y,a=i-n.x,s=e-n.y,o=Math.sqrt(t*t*s*s+r*r*a*a),a=Math.abs(t*r*a/o),t=(n.x<i&&(a=-a),Math.abs(t*r*s/o));return{x:i+a,y:e+(t=n.y<e?-t:t)}}var ZPe,QPe=b(()=>{mt(KPe,"intersectEllipse"),ZPe=KPe});function JPe(e,t,r){return ZPe(e,t,t,r)}var eBe,tBe=b(()=>{QPe(),mt(JPe,"intersectCircle"),eBe=JPe});function rBe(e,t,r,n){var i,a,s,o,l=t.y-e.y,c=e.x-t.x,h=t.x*e.y-e.x*t.y,u=l*r.x+c*r.y+h,d=l*n.x+c*n.y+h;if(!(0!=u&&0!=d&&0<u*d||(u=(i=n.y-r.y)*e.x+(a=r.x-n.x)*e.y+(s=n.x*r.y-r.x*n.y),d=i*t.x+a*t.y+s,0!=u&&0!==d&&0<u*d)||0==(o=l*a-i*c)))return e=Math.abs(o/2),{x:(r=c*s-a*h)<0?(r-e)/o:(r+e)/o,y:(r=i*h-l*s)<0?(r-e)/o:(r+e)/o}}function nBe(e,t){return 0<e*t}var iBe,aBe=b(()=>{mt(rBe,"intersectLine"),mt(nBe,"sameSign"),iBe=rBe});function sBe(e,t,n){var r=e.x,i=e.y,a=[],s=Number.POSITIVE_INFINITY,o=Number.POSITIVE_INFINITY;"function"==typeof t.forEach?t.forEach(function(e){s=Math.min(s,e.x),o=Math.min(o,e.y)}):(s=Math.min(s,t.x),o=Math.min(o,t.y));for(var l=r-e.width/2-s,c=i-e.height/2-o,h=0;h<t.length;h++){var u=t[h],d=t[h<t.length-1?h+1:0];(u=iBe(e,n,{x:l+u.x,y:c+u.y},{x:l+d.x,y:c+d.y}))&&a.push(u)}return a.length?(1<a.length&&a.sort(function(e,t){var r=e.x-n.x,e=e.y-n.y,r=Math.sqrt(r*r+e*e),e=t.x-n.x,t=t.y-n.y;return r<(e=Math.sqrt(e*e+t*t))?-1:r===e?0:1}),a[0]):e}var oBe,lBe,cBe,hBe,uBe=b(()=>{aBe(),mt(oBe=sBe,"intersectPolygon")}),dBe=b(()=>{lBe=mt((e,t)=>{var r,n=e.x,i=e.y,a=t.x-n,t=t.y-i,s=e.width/2,e=e.height/2,e=Math.abs(t)*s>Math.abs(a)*e?(t<0&&(e=-e),r=0==t?0:e*a/t,e):(r=s=a<0?-s:s,0==a?0:s*t/a);return{x:n+r,y:i+e}},"intersectRect"),cBe=lBe}),pBe=b(()=>{XPe(),tBe(),QPe(),uBe(),dBe(),hBe={node:VPe,circle:eBe,ellipse:ZPe,polygon:oBe,rect:cBe}});function gBe(e,t,r,n){return e.insert("polygon",":first-child").attr("points",n.map(function(e){return e.x+","+e.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-t/2+","+r/2+")")}var fBe,mBe,yBe,vBe,xBe=b(()=>{RPe(),JL(),Tu(),i6(),Oc(),i_(),fBe=mt(async(e,t,r,i)=>{let a=O(),n,s=t.useHtmlLabels||fc(a.flowchart.htmlLabels),o=(n=r||"node default",e.insert("g").attr("class",n).attr("id",t.domId||t.id)),l=o.insert("g").attr("class","label").attr("style",t.labelStyle),c,h=(c=void 0===t.labelText?"":"string"==typeof t.labelText?t.labelText:t.labelText[0],l.node()),u,d=(u="markdown"===t.labelType?QL(l,lc(r_(c),a),{useHtmlLabels:s,width:t.width||a.flowchart.wrappingWidth,classes:"markdown-node-label"},a):h.appendChild(await APe(lc(r_(c),a),t.labelStyle,!1,i))).getBBox(),p=t.padding/2;if(fc(a.flowchart.htmlLabels)){if(r=u.children[0],e=H(u),i=r.getElementsByTagName("img")){let n=""===c.replace(/<img[^>]*>/g,"").trim();await Promise.all([...i].map(r=>new Promise(t=>{function e(){var e;r.style.display="flex",r.style.flexDirection="column",n?(e=a.fontSize||window.getComputedStyle(document.body).fontSize,e=5*parseInt(e,10)+"px",r.style.minWidth=e,r.style.maxWidth=e):r.style.width="100%",t(r)}mt(e,"setupImage"),setTimeout(()=>{r.complete&&e()}),r.addEventListener("error",e),r.addEventListener("load",e)})))}d=r.getBoundingClientRect(),e.attr("width",d.width),e.attr("height",d.height)}return s?l.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"):l.attr("transform","translate(0, "+-d.height/2+")"),t.centerLabel&&l.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"),l.insert("rect",":first-child"),{shapeSvg:o,bbox:d,halfPadding:p,label:l}},"labelHelper"),mBe=mt((e,t)=>{t=t.node().getBBox(),e.width=t.width,e.height=t.height},"updateNodeBounds"),mt(gBe,"insertPolygonShape")}),bBe=b(()=>{xBe(),e(),Tu(),pBe(),yBe=mt(async(e,t)=>{t.useHtmlLabels||O().flowchart.htmlLabels||(t.centerLabel=!0);var{shapeSvg:e,bbox:r,halfPadding:n}=await fBe(e,t,"node "+t.classes,!0),i=(D.info("Classes = ",t.classes),e.insert("rect",":first-child"));return i.attr("rx",t.rx).attr("ry",t.ry).attr("x",-r.width/2-n).attr("y",-r.height/2-n).attr("width",r.width+t.padding).attr("height",r.height+t.padding),mBe(t,i),t.intersect=function(e){return hBe.rect(t,e)},e},"note"),vBe=yBe});function wBe(e,t,r,n){let i=[],a=mt(e=>{i.push(e,0)},"addBorder"),s=mt(e=>{i.push(0,e)},"skipBorder");(t.includes("t")?(D.debug("add top border"),a):s)(r),(t.includes("r")?(D.debug("add right border"),a):s)(n),(t.includes("b")?(D.debug("add bottom border"),a):s)(r),(t.includes("l")?(D.debug("add left border"),a):s)(n),e.attr("stroke-dasharray",i.join(" "))}var kBe,TBe,EBe,CBe,_Be,SBe,ABe,LBe,NBe,IBe,RBe,MBe,DBe,OBe,PBe,BBe,$Be,FBe,zBe,GBe,UBe,qBe,jBe,YBe,WBe,HBe,VBe,XBe,KBe,ZBe=b(()=>{i6(),Tu(),Oc(),e(),WPe(),RPe(),pBe(),bBe(),xBe(),kBe=mt(e=>e?" "+e:"","formatClass"),TBe=mt((e,t)=>`${t||"node default"}${kBe(e.classes)} `+kBe(e.class),"getClassesFromNode"),EBe=mt(async(e,t)=>{let{shapeSvg:r,bbox:n}=await fBe(e,t,TBe(t,void 0),!0),i=n.width+t.padding,a=n.height+t.padding,s=i+a,o=[{x:s/2,y:0},{x:s,y:-s/2},{x:s/2,y:-s},{x:0,y:-s/2}];return D.info("Question main (Circle)"),(e=gBe(r,s,s,o)).attr("style",t.style),mBe(t,e),t.intersect=function(e){return D.warn("Intersect called"),hBe.polygon(t,o,e)},r},"question"),CBe=mt((e,t)=>((e=e.insert("g").attr("class","node default").attr("id",t.domId||t.id)).insert("polygon",":first-child").attr("points",[{x:0,y:14},{x:14,y:0},{x:0,y:-14},{x:-14,y:0}].map(function(e){return e.x+","+e.y}).join(" ")).attr("class","state-start").attr("r",7).attr("width",28).attr("height",28),t.width=28,t.height=28,t.intersect=function(e){return hBe.circle(t,14,e)},e),"choice"),_Be=mt(async(e,t)=>{let{shapeSvg:r,bbox:n}=await fBe(e,t,TBe(t,void 0),!0),i=n.height+t.padding,a=i/4,s=n.width+2*a+t.padding,o=[{x:a,y:0},{x:s-a,y:0},{x:s,y:-i/2},{x:s-a,y:-i},{x:a,y:-i},{x:0,y:-i/2}],l=gBe(r,s,i,o);return l.attr("style",t.style),mBe(t,l),t.intersect=function(e){return hBe.polygon(t,o,e)},r},"hexagon"),SBe=mt(async(e,t)=>{let{shapeSvg:r,bbox:n}=await fBe(e,t,void 0,!0),i=n.height+2*t.padding,a=i/2,s=n.width+2*a+t.padding,o=jPe(t.directions,n,t),l=gBe(r,s,i,o);return l.attr("style",t.style),mBe(t,l),t.intersect=function(e){return hBe.polygon(t,o,e)},r},"block_arrow"),ABe=mt(async(e,t)=>{let{shapeSvg:r,bbox:n}=await fBe(e,t,TBe(t,void 0),!0),i=n.width+t.padding,a=n.height+t.padding,s=[{x:-a/2,y:0},{x:i,y:0},{x:i,y:-a},{x:-a/2,y:-a},{x:0,y:-a/2}];return gBe(r,i,a,s).attr("style",t.style),t.width=i+a,t.height=a,t.intersect=function(e){return hBe.polygon(t,s,e)},r},"rect_left_inv_arrow"),LBe=mt(async(e,t)=>{let{shapeSvg:r,bbox:n}=await fBe(e,t,TBe(t),!0),i=n.width+t.padding,a=n.height+t.padding,s=[{x:-2*a/6,y:0},{x:i-a/6,y:0},{x:i+2*a/6,y:-a},{x:a/6,y:-a}],o=gBe(r,i,a,s);return o.attr("style",t.style),mBe(t,o),t.intersect=function(e){return hBe.polygon(t,s,e)},r},"lean_right"),NBe=mt(async(e,t)=>{let{shapeSvg:r,bbox:n}=await fBe(e,t,TBe(t,void 0),!0),i=n.width+t.padding,a=n.height+t.padding,s=[{x:2*a/6,y:0},{x:i+a/6,y:0},{x:i-2*a/6,y:-a},{x:-a/6,y:-a}],o=gBe(r,i,a,s);return o.attr("style",t.style),mBe(t,o),t.intersect=function(e){return hBe.polygon(t,s,e)},r},"lean_left"),IBe=mt(async(e,t)=>{let{shapeSvg:r,bbox:n}=await fBe(e,t,TBe(t,void 0),!0),i=n.width+t.padding,a=n.height+t.padding,s=[{x:-2*a/6,y:0},{x:i+2*a/6,y:0},{x:i-a/6,y:-a},{x:a/6,y:-a}],o=gBe(r,i,a,s);return o.attr("style",t.style),mBe(t,o),t.intersect=function(e){return hBe.polygon(t,s,e)},r},"trapezoid"),RBe=mt(async(e,t)=>{let{shapeSvg:r,bbox:n}=await fBe(e,t,TBe(t,void 0),!0),i=n.width+t.padding,a=n.height+t.padding,s=[{x:a/6,y:0},{x:i-a/6,y:0},{x:i+2*a/6,y:-a},{x:-2*a/6,y:-a}],o=gBe(r,i,a,s);return o.attr("style",t.style),mBe(t,o),t.intersect=function(e){return hBe.polygon(t,s,e)},r},"inv_trapezoid"),MBe=mt(async(e,t)=>{let{shapeSvg:r,bbox:n}=await fBe(e,t,TBe(t,void 0),!0),i=n.width+t.padding,a=n.height+t.padding,s=[{x:0,y:0},{x:i+a/2,y:0},{x:i,y:-a/2},{x:i+a/2,y:-a},{x:0,y:-a}],o=gBe(r,i,a,s);return o.attr("style",t.style),mBe(t,o),t.intersect=function(e){return hBe.polygon(t,s,e)},r},"rect_right_inv_arrow"),DBe=mt(async(e,i)=>{let{shapeSvg:t,bbox:r}=await fBe(e,i,TBe(i,void 0),!0),n=r.width+i.padding,a=n/2,s=a/(2.5+n/50),o=r.height+s+i.padding,l="M 0,"+s+" a "+a+","+s+" 0,0,0 "+n+" 0 a "+a+","+s+" 0,0,0 "+-n+" 0 l 0,"+o+" a "+a+","+s+" 0,0,0 "+n+" 0 l 0,"+-o,c=t.attr("label-offset-y",s).insert("path",":first-child").attr("style",i.style).attr("d",l).attr("transform","translate("+-n/2+","+-(o/2+s)+")");return mBe(i,c),i.intersect=function(t){var r=hBe.rect(i,t),n=r.x-i.x;if(0!=a&&(Math.abs(n)<i.width/2||Math.abs(n)==i.width/2&&Math.abs(r.y-i.y)>i.height/2-s)){let e=s*s*(1-n*n/(a*a));0!=e&&(e=Math.sqrt(e)),e=s-e,0<t.y-i.y&&(e=-e),r.y+=e}return r},t},"cylinder"),OBe=mt(async(e,t)=>{var{shapeSvg:e,bbox:r,halfPadding:n}=await fBe(e,t,"node "+t.classes+" "+t.class,!0),i=e.insert("rect",":first-child"),a=t.positioned?t.width:r.width+t.padding,s=t.positioned?t.height:r.height+t.padding,o=t.positioned?-a/2:-r.width/2-n,r=t.positioned?-s/2:-r.height/2-n;return i.attr("class","basic label-container").attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("x",o).attr("y",r).attr("width",a).attr("height",s),t.props&&(n=new Set(Object.keys(t.props)),t.props.borders&&(wBe(i,t.props.borders,a,s),n.delete("borders")),n.forEach(e=>{D.warn("Unknown node property "+e)})),mBe(t,i),t.intersect=function(e){return hBe.rect(t,e)},e},"rect"),PBe=mt(async(e,t)=>{var{shapeSvg:e,bbox:r,halfPadding:n}=await fBe(e,t,"node "+t.classes,!0),i=e.insert("rect",":first-child"),a=t.positioned?t.width:r.width+t.padding,s=t.positioned?t.height:r.height+t.padding,o=t.positioned?-a/2:-r.width/2-n,r=t.positioned?-s/2:-r.height/2-n;return i.attr("class","basic cluster composite label-container").attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("x",o).attr("y",r).attr("width",a).attr("height",s),t.props&&(n=new Set(Object.keys(t.props)),t.props.borders&&(wBe(i,t.props.borders,a,s),n.delete("borders")),n.forEach(e=>{D.warn("Unknown node property "+e)})),mBe(t,i),t.intersect=function(e){return hBe.rect(t,e)},e},"composite"),BBe=mt(async(e,t)=>{var r,e=(await fBe(e,t,"label",!0)).shapeSvg,n=(D.trace("Classes = ",t.class),e.insert("rect",":first-child"));return n.attr("width",0).attr("height",0),e.attr("class","label edgeLabel"),t.props&&(r=new Set(Object.keys(t.props)),t.props.borders&&(wBe(n,t.props.borders,0,0),r.delete("borders")),r.forEach(e=>{D.warn("Unknown node property "+e)})),mBe(t,n),t.intersect=function(e){return hBe.rect(t,e)},e},"labelRect"),mt(wBe,"applyNodePropertyBorders"),$Be=mt(async(e,t)=>{let r,n=(r=t.classes?"node "+t.classes:"node default",e.insert("g").attr("class",r).attr("id",t.domId||t.id)),i=n.insert("rect",":first-child"),a=n.insert("line"),s=n.insert("g").attr("class","label"),o=t.labelText.flat?t.labelText.flat():t.labelText,l,c=(l="object"==typeof o?o[0]:o,D.info("Label text abc79",l,o,"object"==typeof o),s.node().appendChild(await APe(l,t.labelStyle,!0,!0))),h={width:0,height:0};fc(O().flowchart.htmlLabels)&&(e=c.children[0],d=H(c),h=e.getBoundingClientRect(),d.attr("width",h.width),d.attr("height",h.height)),D.info("Text 2",o);var u,e=o.slice(1,o.length),d=c.getBBox(),e=s.node().appendChild(await APe(e.join?e.join("<br/>"):e,t.labelStyle,!0,!0)),p=(fc(O().flowchart.htmlLabels)&&(p=e.children[0],u=H(e),h=p.getBoundingClientRect(),u.attr("width",h.width),u.attr("height",h.height)),t.padding/2);return H(e).attr("transform","translate( "+(h.width>d.width?0:(d.width-h.width)/2)+", "+(d.height+p+5)+")"),H(c).attr("transform","translate( "+(h.width<d.width?0:-(d.width-h.width)/2)+", 0)"),h=s.node().getBBox(),s.attr("transform","translate("+-h.width/2+", "+(-h.height/2-p+3)+")"),i.attr("class","outer title-state").attr("x",-h.width/2-p).attr("y",-h.height/2-p).attr("width",h.width+t.padding).attr("height",h.height+t.padding),a.attr("class","divider").attr("x1",-h.width/2-p).attr("x2",h.width/2+p).attr("y1",-h.height/2-p+d.height+p).attr("y2",-h.height/2-p+d.height+p),mBe(t,i),t.intersect=function(e){return hBe.rect(t,e)},n},"rectWithTitle"),FBe=mt(async(e,t)=>{var{shapeSvg:e,bbox:r}=await fBe(e,t,TBe(t,void 0),!0),n=r.height+t.padding,r=r.width+n/4+t.padding,r=e.insert("rect",":first-child").attr("style",t.style).attr("rx",n/2).attr("ry",n/2).attr("x",-r/2).attr("y",-n/2).attr("width",r).attr("height",n);return mBe(t,r),t.intersect=function(e){return hBe.rect(t,e)},e},"stadium"),zBe=mt(async(e,t)=>{let{shapeSvg:r,bbox:n,halfPadding:i}=await fBe(e,t,TBe(t,void 0),!0),a=r.insert("circle",":first-child");return a.attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("r",n.width/2+i).attr("width",n.width+t.padding).attr("height",n.height+t.padding),D.info("Circle main"),mBe(t,a),t.intersect=function(e){return D.info("Circle intersect",t,n.width/2+i,e),hBe.circle(t,n.width/2+i,e)},r},"circle"),GBe=mt(async(e,t)=>{let{shapeSvg:r,bbox:n,halfPadding:i}=await fBe(e,t,TBe(t,void 0),!0),a=r.insert("g",":first-child"),s=a.insert("circle"),o=a.insert("circle");return a.attr("class",t.class),s.attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("r",n.width/2+i+5).attr("width",n.width+t.padding+10).attr("height",n.height+t.padding+10),o.attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("r",n.width/2+i).attr("width",n.width+t.padding).attr("height",n.height+t.padding),D.info("DoubleCircle main"),mBe(t,s),t.intersect=function(e){return D.info("DoubleCircle intersect",t,n.width/2+i+5,e),hBe.circle(t,n.width/2+i+5,e)},r},"doublecircle"),UBe=mt(async(e,t)=>{let{shapeSvg:r,bbox:n}=await fBe(e,t,TBe(t,void 0),!0),i=n.width+t.padding,a=n.height+t.padding,s=[{x:0,y:0},{x:i,y:0},{x:i,y:-a},{x:0,y:-a},{x:0,y:0},{x:-8,y:0},{x:i+8,y:0},{x:i+8,y:-a},{x:-8,y:-a},{x:-8,y:0}],o=gBe(r,i,a,s);return o.attr("style",t.style),mBe(t,o),t.intersect=function(e){return hBe.polygon(t,s,e)},r},"subroutine"),qBe=mt((e,t)=>{var r=(e=e.insert("g").attr("class","node default").attr("id",t.domId||t.id)).insert("circle",":first-child");return r.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),mBe(t,r),t.intersect=function(e){return hBe.circle(t,7,e)},e},"start"),jBe=mt((e,t,r)=>{let n=e.insert("g").attr("class","node default").attr("id",t.domId||t.id),i=70,a=10;return"LR"===r&&(i=10,a=70),e=n.append("rect").attr("x",-1*i/2).attr("y",-1*a/2).attr("width",i).attr("height",a).attr("class","fork-join"),mBe(t,e),t.height=t.height+t.padding/2,t.width=t.width+t.padding/2,t.intersect=function(e){return hBe.rect(t,e)},n},"forkJoin"),YBe=mt((e,t)=>{var r=(e=e.insert("g").attr("class","node default").attr("id",t.domId||t.id)).insert("circle",":first-child"),n=e.insert("circle",":first-child");return n.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),r.attr("class","state-end").attr("r",5).attr("width",10).attr("height",10),mBe(t,n),t.intersect=function(e){return hBe.circle(t,7,e)},e},"end"),WBe=mt(async(e,s)=>{let t=s.padding/2,r,n=(r=s.classes?"node "+s.classes:"node default",e.insert("g").attr("class",r).attr("id",s.domId||s.id)),i=n.insert("rect",":first-child"),a=n.insert("line"),o=n.insert("line"),l=0,c=4,h=n.insert("g").attr("class","label"),u=0,d=s.classData.annotations?.[0],p=s.classData.annotations[0]?"«"+s.classData.annotations[0]+"»":"",g=h.node().appendChild(await APe(p,s.labelStyle,!0,!0)),f=g.getBBox(),m=(fc(O().flowchart.htmlLabels)&&(e=g.children[0],y=H(g),f=e.getBoundingClientRect(),y.attr("width",f.width),y.attr("height",f.height)),s.classData.annotations[0]&&(c+=f.height+4,l+=f.width),s.classData.label);var y;void 0!==s.classData.type&&""!==s.classData.type&&(O().flowchart.htmlLabels?m+="<"+s.classData.type+">":m+="<"+s.classData.type+">"),H(e=h.node().appendChild(await APe(m,s.labelStyle,!0,!0))).attr("class","classTitle");let v=e.getBBox(),x=(fc(O().flowchart.htmlLabels)&&(y=e.children[0],w=H(e),v=y.getBoundingClientRect(),w.attr("width",v.width),w.attr("height",v.height)),c+=v.height+4,v.width>l&&(l=v.width),[]),b=(s.classData.members.forEach(async e=>{let t=e.getDisplayDetails(),r=t.displayText,n=(O().flowchart.htmlLabels&&(r=r.replace(/</g,"<").replace(/>/g,">")),h.node().appendChild(await APe(r,t.cssStyle||s.labelStyle,!0,!0))),i=n.getBBox(),a;fc(O().flowchart.htmlLabels)&&(e=n.children[0],a=H(n),i=e.getBoundingClientRect(),a.attr("width",i.width),a.attr("height",i.height)),i.width>l&&(l=i.width),c+=i.height+4,x.push(n)}),c+=8,[]);s.classData.methods.forEach(async e=>{let t=e.getDisplayDetails(),r=t.displayText,n=(O().flowchart.htmlLabels&&(r=r.replace(/</g,"<").replace(/>/g,">")),h.node().appendChild(await APe(r,t.cssStyle||s.labelStyle,!0,!0))),i=n.getBBox(),a;fc(O().flowchart.htmlLabels)&&(e=n.children[0],a=H(n),i=e.getBoundingClientRect(),a.attr("width",i.width),a.attr("height",i.height)),i.width>l&&(l=i.width),c+=i.height+4,b.push(n)}),c+=8,d&&(y=(l-f.width)/2,H(g).attr("transform","translate( "+(-1*l/2+y)+", "+-1*c/2+")"),u=f.height+4);var w=(l-v.width)/2;return H(e).attr("transform","translate( "+(-1*l/2+w)+", "+(-1*c/2+u)+")"),u+=v.height+4,a.attr("class","divider").attr("x1",-l/2-t).attr("x2",l/2+t).attr("y1",-c/2-t+8+u).attr("y2",-c/2-t+8+u),u+=8,x.forEach(e=>{H(e).attr("transform","translate( "+-l/2+", "+(-1*c/2+u+4)+")"),e=e?.getBBox(),u+=(e?.height??0)+4}),u+=8,o.attr("class","divider").attr("x1",-l/2-t).attr("x2",l/2+t).attr("y1",-c/2-t+8+u).attr("y2",-c/2-t+8+u),u+=8,b.forEach(e=>{H(e).attr("transform","translate( "+-l/2+", "+(-1*c/2+u)+")"),e=e?.getBBox(),u+=(e?.height??0)+4}),i.attr("style",s.style).attr("class","outer title-state").attr("x",-l/2-t).attr("y",-c/2-t).attr("width",l+s.padding).attr("height",c+s.padding),mBe(s,i),s.intersect=function(e){return hBe.rect(s,e)},n},"class_box"),HBe={rhombus:EBe,composite:PBe,question:EBe,rect:OBe,labelRect:BBe,rectWithTitle:$Be,choice:CBe,circle:zBe,doublecircle:GBe,stadium:FBe,hexagon:_Be,block_arrow:SBe,rect_left_inv_arrow:ABe,lean_right:LBe,lean_left:NBe,trapezoid:IBe,inv_trapezoid:RBe,rect_right_inv_arrow:MBe,cylinder:DBe,start:qBe,end:YBe,note:vBe,subroutine:UBe,fork:jBe,join:jBe,class_box:WBe},VBe={},XBe=mt(async(t,r,n)=>{let i,a;if(r.link){let e;"sandbox"===O().securityLevel?e="_top":r.linkTarget&&(e=r.linkTarget||"_blank"),i=t.insert("svg:a").attr("xlink:href",r.link).attr("target",e),a=await HBe[r.shape](i,r,n)}else a=await HBe[r.shape](t,r,n),i=a;return r.tooltip&&a.attr("title",r.tooltip),r.class&&a.attr("class","node default "+r.class),VBe[r.id]=i,r.haveCallback&&VBe[r.id].attr("class",VBe[r.id].attr("class")+" clickable"),i},"insertNode"),KBe=mt(e=>{var t=VBe[e.id],r=(D.trace("Transforming node",e.diff,e,"translate("+(e.x-e.width/2-5)+", "+e.width/2+")"),e.diff||0);return e.clusterNode?t.attr("transform","translate("+(e.x+r-e.width/2)+", "+(e.y-e.height/2-8)+")"):t.attr("transform","translate("+e.x+", "+e.y+")"),r},"positionNode")});function QBe(e,t,r=!1){let n=e,i="default",a=(0<(n?.classes?.length||0)&&(i=(n?.classes??[]).join(" ")),i+=" flowchart-label",0),s="",o;switch(n.type){case"round":a=5,s="rect";break;case"composite":a=0,s="composite",o=0;break;case"square":s="rect";break;case"diamond":s="question";break;case"hexagon":s="hexagon";break;case"block_arrow":s="block_arrow";break;case"odd":s="rect_left_inv_arrow";break;case"lean_right":s="lean_right";break;case"lean_left":s="lean_left";break;case"trapezoid":s="trapezoid";break;case"inv_trapezoid":s="inv_trapezoid";break;case"rect_left_inv_arrow":s="rect_left_inv_arrow";break;case"circle":s="circle";break;case"ellipse":s="ellipse";break;case"stadium":s="stadium";break;case"subroutine":s="subroutine";break;case"cylinder":s="cylinder";break;case"group":s="rect";break;case"doublecircle":s="doublecircle";break;default:s="rect"}var e=wC(n?.styles??[]),l=n.size??{width:0,height:0,x:0,y:0};return{labelStyle:e.labelStyle,shape:s,labelText:n.label,rx:a,ry:a,class:i,style:e.style,id:n.id,directions:n.directions,width:l.width,height:l.height,x:l.x,y:l.y,positioned:r,intersect:void 0,type:n.type,padding:o??ar()?.block?.padding??0}}async function JBe(e,t,r){var n;"group"!==(t=QBe(t,0,!1)).type&&(n=ar(),n=(e=await XBe(e,t,{config:n})).node().getBBox(),(t=r.getBlock(t.id)).size={width:n.width,height:n.height,x:0,y:0,node:e},r.setBlock(t),e.remove())}async function e$e(e,t,r){var n=QBe(t,0,!0);"space"!==r.getBlock(n.id).type&&(r=ar(),await XBe(e,n,{config:r}),t.intersect=n?.intersect,KBe(n))}async function t$e(e,t,r,n){for(var i of t)await n(e,i,r),i.children&&await t$e(e,i.children,r,n)}async function r$e(e,t,r){await t$e(e,t,r,JBe)}async function n$e(e,t,r){await t$e(e,t,r,e$e)}async function i$e(e,t,r,n,i){var a,s,o,l,c=new nH({multigraph:!0,compound:!0});c.setGraph({rankdir:"TB",nodesep:10,ranksep:10,marginx:8,marginy:8});for(a of r)a.size&&c.setNode(a.id,{width:a.size.width,height:a.size.height,intersect:a.intersect});for(s of t)s.start&&s.end&&(l=n.getBlock(s.start),o=n.getBlock(s.end),l?.size)&&o?.size&&(l=l.size,o=o.size,l=[{x:l.x,y:l.y},{x:l.x+(o.x-l.x)/2,y:l.y+(o.y-l.y)/2},{x:o.x,y:o.y}],UPe(e,{v:s.start,w:s.end,name:s.id},{...s,arrowTypeEnd:s.arrowTypeEnd,arrowTypeStart:s.arrowTypeStart,points:l,classes:"edge-thickness-normal edge-pattern-solid flowchart-link LS-a1 LE-b1"},void 0,"block",c,i),s.label)&&(await BPe(e,{...s,label:s.label,labelStyle:"stroke: #333; stroke-width: 1.5px;fill:none;",arrowTypeEnd:s.arrowTypeEnd,arrowTypeStart:s.arrowTypeStart,points:l,classes:"edge-thickness-normal edge-pattern-solid flowchart-link LS-a1 LE-b1"}),$Pe({...s,x:l[1].x,y:l[1].y},{originalPath:l}))}var a$e,s$e,o$e,l$e=b(()=>{aH(),rn(),YPe(),ZBe(),i_(),mt(QBe,"getNodeFromBlock"),mt(JBe,"calculateBlockSize"),mt(e$e,"insertBlockPositioned"),mt(t$e,"performOperations"),mt(r$e,"calculateBlockSizes"),mt(n$e,"insertBlocks"),mt(i$e,"insertEdges")}),c$e=b(()=>{i6(),rn(),mPe(),e(),lh(),EPe(),l$e(),a$e=mt(function(e,t){return t.db.getClasses()},"getClasses"),s$e=mt(async function(e,t,r,n){let{securityLevel:i,block:a}=ar(),s=n.db,o;"sandbox"===i&&(o=H("#i"+t));var l=H("sandbox"===i?o.nodes()[0].contentDocument.body:"body"),l="sandbox"===i?l.select(`[id="${t}"]`):H(`[id="${t}"]`),n=(pPe(l,["point","circle","cross"],n.type,t),s.getBlocks()),c=s.getBlocksFlat(),h=s.getEdges(),u=l.insert("g").attr("class","block"),d=(await r$e(u,n,s),wPe(s));await n$e(u,n,s),await i$e(u,h,c,s,t),d&&(n=d,u=Math.max(1,Math.round(n.width/n.height*.125)),h=n.height+u+10,c=n.width+10,t=a.useMaxWidth,Zc(l,h,c,!!t),D.debug("Here Bounds",d,n),l.attr("viewBox",`${n.x-5} ${n.y-5} ${n.width+10} `+(n.height+10)))},"draw"),o$e={draw:s$e,getClasses:a$e}}),h$e={};OFe(h$e,{diagram:()=>u$e});var u$e,d$e,p$e,g$e,f$e,m$e,y$e,v$e,x$e,b$e,w$e,k$e,T$e,E$e,C$e,_$e,S$e,A$e,L$e,N$e,I$e,R$e,M$e,D$e,O$e,P$e,B$e,$$e,F$e,z$e,G$e,U$e=b(()=>{EOe(),gPe(),fPe(),c$e(),u$e={parser:kOe,db:QOe,renderer:o$e,styles:tPe}}),q$e=b(()=>{d$e={L:"left",R:"right",T:"top",B:"bottom"},p$e={L:mt(e=>e+`,${e/2} 0,${e} 0,0`,"L"),R:mt(e=>`0,${e/2} ${e},0 ${e},`+e,"R"),T:mt(e=>`0,0 ${e},0 ${e/2},`+e,"T"),B:mt(e=>e/2+`,0 ${e},${e} 0,`+e,"B")},g$e={L:mt((e,t)=>e-t+2,"L"),R:mt((e,t)=>e-2,"R"),T:mt((e,t)=>e-t+2,"T"),B:mt((e,t)=>e-2,"B")},f$e=mt(function(e){return y$e(e)?"L"===e?"R":"L":"T"===e?"B":"T"},"getOppositeArchitectureDirection"),m$e=mt(function(e){return"L"===e||"R"===e||"T"===e||"B"===e},"isArchitectureDirection"),y$e=mt(function(e){return"L"===e||"R"===e},"isArchitectureDirectionX"),v$e=mt(function(e){return"T"===e||"B"===e},"isArchitectureDirectionY"),x$e=mt(function(e,t){var r=y$e(e)&&v$e(t),e=v$e(e)&&y$e(t);return r||e},"isArchitectureDirectionXY"),b$e=mt(function(e){var t=e[0],e=e[1],r=y$e(t)&&v$e(e),t=v$e(t)&&y$e(e);return r||t},"isArchitecturePairXY"),w$e=mt(function(e){return"LL"!==e&&"RR"!==e&&"TT"!==e&&"BB"!==e},"isValidArchitectureDirectionPair"),k$e=mt(function(e,t){return w$e(e=""+e+t)?e:void 0},"getArchitectureDirectionPair"),T$e=mt(function([e,t],r){var n=r[0],r=r[1];return y$e(n)?v$e(r)?[e+("L"===n?-1:1),t+("T"===r?1:-1)]:[e+("L"===n?-1:1),t]:y$e(r)?[e+("L"===r?1:-1),t+("T"===n?1:-1)]:[e,t+("T"===n?1:-1)]},"shiftPositionByArchitectureDirectionPair"),E$e=mt(function(e){return"LT"===e||"TL"===e?[1,1]:"BL"===e||"LB"===e?[1,-1]:"BR"===e||"RB"===e?[-1,-1]:[-1,1]},"getArchitectureDirectionXYFactors"),C$e=mt(function(e,t){return x$e(e,t)?"bend":y$e(e)?"horizontal":"vertical"},"getArchitectureDirectionAlignment"),_$e=mt(function(e){return"service"===e.type},"isArchitectureService"),S$e=mt(function(e){return"junction"===e.type},"isArchitectureJunction"),A$e=mt(e=>e.data(),"edgeData"),L$e=mt(e=>e.data(),"nodeData")}),j$e=b(()=>{rn(),en(),i_(),ku(),q$e(),N$e=Yt.architecture,I$e=class{constructor(){this.nodes={},this.groups={},this.edges=[],this.registeredIds={},this.elements={},this.setAccTitle=mh,this.getAccTitle=yh,this.setDiagramTitle=bh,this.getDiagramTitle=wh,this.getAccDescription=xh,this.setAccDescription=vh,this.clear()}static{mt(this,"ArchitectureDB")}clear(){this.nodes={},this.groups={},this.edges=[],this.registeredIds={},this.dataStructures=void 0,this.elements={},fh()}addService({id:e,icon:t,in:r,title:n,iconText:i}){if(void 0!==this.registeredIds[e])throw new Error(`The service id [${e}] is already in use by another `+this.registeredIds[e]);if(void 0!==r){if(e===r)throw new Error(`The service [${e}] cannot be placed within itself`);if(void 0===this.registeredIds[r])throw new Error(`The service [${e}]'s parent does not exist. Please make sure the parent is created before this service`);if("node"===this.registeredIds[r])throw new Error(`The service [${e}]'s parent is not a group`)}this.registeredIds[e]="node",this.nodes[e]={id:e,type:"service",icon:t,iconText:i,title:n,edges:[],in:r}}getServices(){return Object.values(this.nodes).filter(_$e)}addJunction({id:e,in:t}){this.registeredIds[e]="node",this.nodes[e]={id:e,type:"junction",edges:[],in:t}}getJunctions(){return Object.values(this.nodes).filter(S$e)}getNodes(){return Object.values(this.nodes)}getNode(e){return this.nodes[e]??null}addGroup({id:e,icon:t,in:r,title:n}){if(void 0!==this.registeredIds?.[e])throw new Error(`The group id [${e}] is already in use by another `+this.registeredIds[e]);if(void 0!==r){if(e===r)throw new Error(`The group [${e}] cannot be placed within itself`);if(void 0===this.registeredIds?.[r])throw new Error(`The group [${e}]'s parent does not exist. Please make sure the parent is created before this group`);if("node"===this.registeredIds?.[r])throw new Error(`The group [${e}]'s parent is not a group`)}this.registeredIds[e]="group",this.groups[e]={id:e,icon:t,title:n,in:r}}getGroups(){return Object.values(this.groups)}addEdge({lhsId:e,rhsId:t,lhsDir:r,rhsDir:n,lhsInto:i,rhsInto:a,lhsGroup:s,rhsGroup:o,title:l}){if(!m$e(r))throw new Error(`Invalid direction given for left hand side of edge ${e}--${t}. Expected (L,R,T,B) got `+String(r));if(!m$e(n))throw new Error(`Invalid direction given for right hand side of edge ${e}--${t}. Expected (L,R,T,B) got `+String(n));if(void 0===this.nodes[e]&&void 0===this.groups[e])throw new Error(`The left-hand id [${e}] does not yet exist. Please create the service/group before declaring an edge to it.`);if(void 0===this.nodes[t]&&void 0===this.groups[t])throw new Error(`The right-hand id [${t}] does not yet exist. Please create the service/group before declaring an edge to it.`);var c=this.nodes[e].in,h=this.nodes[t].in;if(s&&c&&h&&c==h)throw new Error(`The left-hand id [${e}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);if(o&&c&&h&&c==h)throw new Error(`The right-hand id [${t}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);this.edges.push({lhsId:e,lhsDir:r,lhsInto:i,lhsGroup:s,rhsId:t,rhsDir:n,rhsInto:a,rhsGroup:o,title:l}),this.nodes[e]&&this.nodes[t]&&(this.nodes[e].edges.push(this.edges[this.edges.length-1]),this.nodes[t].edges.push(this.edges[this.edges.length-1]))}getEdges(){return this.edges}getDataStructures(){if(void 0===this.dataStructures){let s={},o=Object.entries(this.nodes).reduce((e,[a,t])=>(e[a]=t.edges.reduce((e,t)=>{var r,n=this.getNode(t.lhsId)?.in,i=this.getNode(t.rhsId)?.in;return n&&i&&n!==i&&"bend"!==(r=C$e(t.lhsDir,t.rhsDir))&&(s[n]??={},s[n][i]=r,s[i]??={},s[i][n]=r),t.lhsId===a?(i=k$e(t.lhsDir,t.rhsDir))&&(e[i]=t.rhsId):(n=k$e(t.rhsDir,t.lhsDir))&&(e[n]=t.lhsId),e},{}),e),{}),r=Object.keys(o)[0],l={[r]:1},c=Object.keys(o).reduce((e,t)=>t===r?e:{...e,[t]:1},{}),e=mt(e=>{let i={[e]:[0,0]},a=[e];for(;0<a.length;){var t=a.shift();if(t){l[t]=1,delete c[t];let e=o[t],[r,n]=i[t];Object.entries(e).forEach(([e,t])=>{l[t]||(i[t]=T$e([r,n],e),a.push(t))})}}return i},"BFS"),t=[e(r)];for(;0<Object.keys(c).length;)t.push(e(Object.keys(c)[0]));this.dataStructures={adjList:o,spatialMaps:t,groupAlignments:s}}return this.dataStructures}setElementForId(e,t){this.elements[e]=t}getElementById(e){return this.elements[e]}getConfig(){return _C({...N$e,...ar().architecture})}getConfigField(e){return this.getConfig()[e]}}}),Y$e=b(()=>{oTe(),e(),uTe(),j$e(),R$e=mt((e,t)=>{lTe(e,t),e.groups.map(e=>t.addGroup(e)),e.services.map(e=>t.addService({...e,type:"service"})),e.junctions.map(e=>t.addJunction({...e,type:"junction"})),e.edges.map(e=>t.addEdge(e))},"populateDb"),M$e={parser:{yy:void 0},parse:mt(async e=>{var e=await nTe("architecture",e),t=(D.debug(e),M$e.parser?.yy);if(!(t instanceof I$e))throw new Error("parser.parser?.yy was not a ArchitectureDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");R$e(e,t)},"parse")}}),W$e=b(()=>{D$e=mt(e=>` + .edge { + stroke-width: ${e.archEdgeWidth}; + stroke: ${e.archEdgeColor}; + fill: none; + } + + .arrow { + fill: ${e.archEdgeArrowColor}; + } + + .node-bkg { + fill: none; + stroke: ${e.archGroupBorderColor}; + stroke-width: ${e.archGroupBorderWidth}; + stroke-dasharray: 8; + } + .node-icon-text { + display: flex; + align-items: center; + } + + .node-icon-text > div { + color: #fff; + margin: 1px; + height: fit-content; + text-align: center; + overflow: hidden; + display: -webkit-box; + -webkit-box-orient: vertical; + } +`,"getStyles"),O$e=D$e}),H$e=NFe((r,n)=>{mt(function(e,t){"object"==typeof r&&"object"==typeof n?n.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof r?r.layoutBase=t():e.layoutBase=t()},"webpackUniversalModuleDefinition")(r,function(){return r=[function(e,t,r){function n(){}mt(n,"LayoutConstants"),n.QUALITY=1,n.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,n.DEFAULT_INCREMENTAL=!1,n.DEFAULT_ANIMATION_ON_LAYOUT=!0,n.DEFAULT_ANIMATION_DURING_LAYOUT=!1,n.DEFAULT_ANIMATION_PERIOD=50,n.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,n.DEFAULT_GRAPH_MARGIN=15,n.NODE_DIMENSIONS_INCLUDE_LABELS=!1,n.SIMPLE_NODE_HALF_SIZE=(n.SIMPLE_NODE_SIZE=40)/2,n.EMPTY_COMPOUND_NODE_SIZE=40,n.MIN_EDGE_LENGTH=1,n.INITIAL_WORLD_BOUNDARY=(n.WORLD_BOUNDARY=1e6)/1e3,n.WORLD_CENTER_X=1200,n.WORLD_CENTER_Y=900,e.exports=n},function(e,t,r){var n,i=r(2),a=r(8),s=r(9);function o(e,t,r){i.call(this,r),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=r,this.bendpoints=[],this.source=e,this.target=t}for(n in mt(o,"LEdge"),o.prototype=Object.create(i.prototype),i)o[n]=i[n];o.prototype.getSource=function(){return this.source},o.prototype.getTarget=function(){return this.target},o.prototype.isInterGraph=function(){return this.isInterGraph},o.prototype.getLength=function(){return this.length},o.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},o.prototype.getBendpoints=function(){return this.bendpoints},o.prototype.getLca=function(){return this.lca},o.prototype.getSourceInLca=function(){return this.sourceInLca},o.prototype.getTargetInLca=function(){return this.targetInLca},o.prototype.getOtherEnd=function(e){if(this.source===e)return this.target;if(this.target===e)return this.source;throw"Node is not incident with this edge"},o.prototype.getOtherEndInGraph=function(e,t){for(var r=this.getOtherEnd(e),n=t.getGraphManager().getRoot();;){if(r.getOwner()==t)return r;if(r.getOwner()==n)break;r=r.getOwner().getParent()}return null},o.prototype.updateLength=function(){var e=new Array(4);this.isOverlapingSourceAndTarget=a.getIntersection(this.target.getRect(),this.source.getRect(),e),this.isOverlapingSourceAndTarget||(this.lengthX=e[0]-e[2],this.lengthY=e[1]-e[3],Math.abs(this.lengthX)<1&&(this.lengthX=s.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=s.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},o.prototype.updateLengthSimple=function(){this.lengthX=this.target.getCenterX()-this.source.getCenterX(),this.lengthY=this.target.getCenterY()-this.source.getCenterY(),Math.abs(this.lengthX)<1&&(this.lengthX=s.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=s.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},e.exports=o},function(e,t,r){function n(e){this.vGraphObject=e}mt(n,"LGraphObject"),e.exports=n},function(e,t,r){var n,i=r(2),a=r(10),s=r(13),o=r(0),l=r(16),c=r(5);function h(e,t,r,n){i.call(this,n=null==r&&null==n?t:n),null!=e.graphManager&&(e=e.graphManager),this.estimatedSize=a.MIN_VALUE,this.inclusionTreeDepth=a.MAX_VALUE,this.vGraphObject=n,this.edges=[],this.graphManager=e,this.rect=null!=r&&null!=t?new s(t.x,t.y,r.width,r.height):new s}for(n in mt(h,"LNode"),h.prototype=Object.create(i.prototype),i)h[n]=i[n];h.prototype.getEdges=function(){return this.edges},h.prototype.getChild=function(){return this.child},h.prototype.getOwner=function(){return this.owner},h.prototype.getWidth=function(){return this.rect.width},h.prototype.setWidth=function(e){this.rect.width=e},h.prototype.getHeight=function(){return this.rect.height},h.prototype.setHeight=function(e){this.rect.height=e},h.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},h.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},h.prototype.getCenter=function(){return new c(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},h.prototype.getLocation=function(){return new c(this.rect.x,this.rect.y)},h.prototype.getRect=function(){return this.rect},h.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},h.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},h.prototype.setRect=function(e,t){this.rect.x=e.x,this.rect.y=e.y,this.rect.width=t.width,this.rect.height=t.height},h.prototype.setCenter=function(e,t){this.rect.x=e-this.rect.width/2,this.rect.y=t-this.rect.height/2},h.prototype.setLocation=function(e,t){this.rect.x=e,this.rect.y=t},h.prototype.moveBy=function(e,t){this.rect.x+=e,this.rect.y+=t},h.prototype.getEdgeListToNode=function(t){var r=[],n=this;return n.edges.forEach(function(e){if(e.target==t){if(e.source!=n)throw"Incorrect edge source!";r.push(e)}}),r},h.prototype.getEdgesBetween=function(t){var r=[],n=this;return n.edges.forEach(function(e){if(e.source!=n&&e.target!=n)throw"Incorrect edge source and/or target";e.target!=t&&e.source!=t||r.push(e)}),r},h.prototype.getNeighborsList=function(){var t=new Set,r=this;return r.edges.forEach(function(e){if(e.source==r)t.add(e.target);else{if(e.target!=r)throw"Incorrect incidency!";t.add(e.source)}}),t},h.prototype.withChildren=function(){var t=new Set;if(t.add(this),null!=this.child)for(var e=this.child.getNodes(),r=0;r<e.length;r++)e[r].withChildren().forEach(function(e){t.add(e)});return t},h.prototype.getNoOfChildren=function(){var e=0;if(null==this.child)e=1;else for(var t=this.child.getNodes(),r=0;r<t.length;r++)e+=t[r].getNoOfChildren();return 0==e?1:e},h.prototype.getEstimatedSize=function(){if(this.estimatedSize==a.MIN_VALUE)throw"assert failed";return this.estimatedSize},h.prototype.calcEstimatedSize=function(){return null==this.child?this.estimatedSize=(this.rect.width+this.rect.height)/2:(this.estimatedSize=this.child.calcEstimatedSize(),this.rect.width=this.estimatedSize,this.rect.height=this.estimatedSize,this.estimatedSize)},h.prototype.scatter=function(){var e=-o.INITIAL_WORLD_BOUNDARY,t=o.INITIAL_WORLD_BOUNDARY,t=o.WORLD_CENTER_X+l.nextDouble()*(t-e)+e,e=-o.INITIAL_WORLD_BOUNDARY,r=o.INITIAL_WORLD_BOUNDARY,r=o.WORLD_CENTER_Y+l.nextDouble()*(r-e)+e;this.rect.x=t,this.rect.y=r},h.prototype.updateBounds=function(){if(null==this.getChild())throw"assert failed";var e,t;0!=this.getChild().getNodes().length&&((t=this.getChild()).updateBounds(!0),this.rect.x=t.getLeft(),this.rect.y=t.getTop(),this.setWidth(t.getRight()-t.getLeft()),this.setHeight(t.getBottom()-t.getTop()),o.NODE_DIMENSIONS_INCLUDE_LABELS)&&(e=t.getRight()-t.getLeft(),t=t.getBottom()-t.getTop(),this.labelWidth&&("left"==this.labelPosHorizontal?(this.rect.x-=this.labelWidth,this.setWidth(e+this.labelWidth)):"center"==this.labelPosHorizontal&&this.labelWidth>e?(this.rect.x-=(this.labelWidth-e)/2,this.setWidth(this.labelWidth)):"right"==this.labelPosHorizontal&&this.setWidth(e+this.labelWidth)),this.labelHeight)&&("top"==this.labelPosVertical?(this.rect.y-=this.labelHeight,this.setHeight(t+this.labelHeight)):"center"==this.labelPosVertical&&this.labelHeight>t?(this.rect.y-=(this.labelHeight-t)/2,this.setHeight(this.labelHeight)):"bottom"==this.labelPosVertical&&this.setHeight(t+this.labelHeight))},h.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==a.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},h.prototype.transform=function(e){(t=this.rect.x)>o.WORLD_BOUNDARY?t=o.WORLD_BOUNDARY:t<-o.WORLD_BOUNDARY&&(t=-o.WORLD_BOUNDARY),(r=this.rect.y)>o.WORLD_BOUNDARY?r=o.WORLD_BOUNDARY:r<-o.WORLD_BOUNDARY&&(r=-o.WORLD_BOUNDARY);var t=new c(t,r),r=e.inverseTransformPoint(t);this.setLocation(r.x,r.y)},h.prototype.getLeft=function(){return this.rect.x},h.prototype.getRight=function(){return this.rect.x+this.rect.width},h.prototype.getTop=function(){return this.rect.y},h.prototype.getBottom=function(){return this.rect.y+this.rect.height},h.prototype.getParent=function(){return null==this.owner?null:this.owner.getParent()},e.exports=h},function(e,t,r){var n,i=r(0);function a(){}for(n in mt(a,"FDLayoutConstants"),i)a[n]=i[n];a.MAX_ITERATIONS=2500,a.DEFAULT_EDGE_LENGTH=50,a.DEFAULT_SPRING_STRENGTH=.45,a.DEFAULT_REPULSION_STRENGTH=4500,a.DEFAULT_GRAVITY_STRENGTH=.4,a.DEFAULT_COMPOUND_GRAVITY_STRENGTH=1,a.DEFAULT_GRAVITY_RANGE_FACTOR=3.8,a.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=1.5,a.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION=!0,a.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION=!0,a.DEFAULT_COOLING_FACTOR_INCREMENTAL=.3,a.COOLING_ADAPTATION_FACTOR=.33,a.ADAPTATION_LOWER_NODE_LIMIT=1e3,a.ADAPTATION_UPPER_NODE_LIMIT=5e3,a.MAX_NODE_DISPLACEMENT=3*(a.MAX_NODE_DISPLACEMENT_INCREMENTAL=100),a.MIN_REPULSION_DIST=a.DEFAULT_EDGE_LENGTH/10,a.CONVERGENCE_CHECK_PERIOD=100,a.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=.1,a.MIN_EDGE_LENGTH=1,a.GRID_CALCULATION_CHECK_PERIOD=10,e.exports=a},function(e,t,r){function n(e,t){null==e&&null==t?(this.x=0,this.y=0):(this.x=e,this.y=t)}mt(n,"PointD"),n.prototype.getX=function(){return this.x},n.prototype.getY=function(){return this.y},n.prototype.setX=function(e){this.x=e},n.prototype.setY=function(e){this.y=e},n.prototype.getDifference=function(e){return new DimensionD(this.x-e.x,this.y-e.y)},n.prototype.getCopy=function(){return new n(this.x,this.y)},n.prototype.translate=function(e){return this.x+=e.width,this.y+=e.height,this},e.exports=n},function(e,t,r){var n,i=r(2),d=r(10),a=r(0),s=r(7),o=r(3),l=r(1),p=r(13),c=r(12),h=r(11);function u(e,t,r){i.call(this,r),this.estimatedSize=d.MIN_VALUE,this.margin=a.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=e,null!=t&&t instanceof s?this.graphManager=t:null!=t&&t instanceof Layout&&(this.graphManager=t.graphManager)}for(n in mt(u,"LGraph"),u.prototype=Object.create(i.prototype),i)u[n]=i[n];u.prototype.getNodes=function(){return this.nodes},u.prototype.getEdges=function(){return this.edges},u.prototype.getGraphManager=function(){return this.graphManager},u.prototype.getParent=function(){return this.parent},u.prototype.getLeft=function(){return this.left},u.prototype.getRight=function(){return this.right},u.prototype.getTop=function(){return this.top},u.prototype.getBottom=function(){return this.bottom},u.prototype.isConnected=function(){return this.isConnected},u.prototype.add=function(e,t,r){if(null==t&&null==r){var n=e;if(null==this.graphManager)throw"Graph has no graph mgr!";if(-1<this.getNodes().indexOf(n))throw"Node already in graph!";return(n.owner=this).getNodes().push(n),n}if(n=e,!(-1<this.getNodes().indexOf(t)&&-1<this.getNodes().indexOf(r)))throw"Source or target not in graph!";if(t.owner!=r.owner||t.owner!=this)throw"Both owners must be this graph!";return t.owner!=r.owner?null:(n.source=t,n.target=r,n.isInterGraph=!1,this.getEdges().push(n),t.edges.push(n),r!=t&&r.edges.push(n),n)},u.prototype.remove=function(e){var t=e;if(e instanceof o){if(null==t)throw"Node is null!";if(null==t.owner||t.owner!=this)throw"Owner graph is invalid!";if(null==this.graphManager)throw"Owner graph manager is invalid!";for(var r,n=t.edges.slice(),i=n.length,a=0;a<i;a++)((r=n[a]).isInterGraph?this.graphManager:r.source.owner).remove(r);if(-1==(s=this.nodes.indexOf(t)))throw"Node not in owner node list!";this.nodes.splice(s,1)}else if(e instanceof l){if(null==(r=e))throw"Edge is null!";if(null==r.source||null==r.target)throw"Source and/or target is null!";if(null==r.source.owner||null==r.target.owner||r.source.owner!=this||r.target.owner!=this)throw"Source and/or target owner is invalid!";var s,t=r.source.edges.indexOf(r),e=r.target.edges.indexOf(r);if(!(-1<t&&-1<e))throw"Source and/or target doesn't know this edge!";if(r.source.edges.splice(t,1),r.target!=r.source&&r.target.edges.splice(e,1),-1==(s=r.source.owner.getEdges().indexOf(r)))throw"Not in owner's edge list!";r.source.owner.getEdges().splice(s,1)}},u.prototype.updateLeftTop=function(){for(var e,t=d.MAX_VALUE,r=d.MAX_VALUE,n=this.getNodes(),i=n.length,a=0;a<i;a++){var s,o=n[a];(s=o.getTop())<t&&(t=s),(s=o.getLeft())<r&&(r=s)}return t==d.MAX_VALUE?null:(e=null!=n[0].getParent().paddingLeft?n[0].getParent().paddingLeft:this.margin,this.left=r-e,this.top=t-e,new c(this.left,this.top))},u.prototype.updateBounds=function(e){for(var t,r,n=d.MAX_VALUE,i=-d.MAX_VALUE,a=d.MAX_VALUE,s=-d.MAX_VALUE,o=this.nodes,l=o.length,c=0;c<l;c++){var h=o[c];e&&null!=h.child&&h.updateBounds(),(t=h.getLeft())<n&&(n=t),i<(t=h.getRight())&&(i=t),(t=h.getTop())<a&&(a=t),s<(t=h.getBottom())&&(s=t)}var u=new p(n,a,i-n,s-a);n==d.MAX_VALUE&&(this.left=this.parent.getLeft(),this.right=this.parent.getRight(),this.top=this.parent.getTop(),this.bottom=this.parent.getBottom()),r=null!=o[0].getParent().paddingLeft?o[0].getParent().paddingLeft:this.margin,this.left=u.x-r,this.right=u.x+u.width+r,this.top=u.y-r,this.bottom=u.y+u.height+r},u.calculateBounds=function(e){for(var t=d.MAX_VALUE,r=-d.MAX_VALUE,n=d.MAX_VALUE,i=-d.MAX_VALUE,a=e.length,s=0;s<a;s++){var o,l=e[s];(o=l.getLeft())<t&&(t=o),r<(o=l.getRight())&&(r=o),(o=l.getTop())<n&&(n=o),i<(o=l.getBottom())&&(i=o)}return new p(t,n,r-t,i-n)},u.prototype.getInclusionTreeDepth=function(){return this==this.graphManager.getRoot()?1:this.parent.getInclusionTreeDepth()},u.prototype.getEstimatedSize=function(){if(this.estimatedSize==d.MIN_VALUE)throw"assert failed";return this.estimatedSize},u.prototype.calcEstimatedSize=function(){for(var e=0,t=this.nodes,r=t.length,n=0;n<r;n++)e+=t[n].calcEstimatedSize();return this.estimatedSize=0==e?a.EMPTY_COMPOUND_NODE_SIZE:e/Math.sqrt(this.nodes.length),this.estimatedSize},u.prototype.updateConnected=function(){var t=this;if(0==this.nodes.length)this.isConnected=!0;else{var r,n=new h,i=new Set,e=this.nodes[0];for(e.withChildren().forEach(function(e){n.push(e),i.add(e)});0!==n.length;)for(var a,s,o=(a=(e=n.shift()).getEdges()).length,l=0;l<o;l++)null==(s=a[l].getOtherEndInGraph(e,this))||i.has(s)||s.withChildren().forEach(function(e){n.push(e),i.add(e)});this.isConnected=!1,i.size>=this.nodes.length&&(r=0,i.forEach(function(e){e.owner==t&&r++}),r==this.nodes.length)&&(this.isConnected=!0)}},e.exports=u},function(e,t,r){var c,h=r(1);function n(e){c=r(6),this.layout=e,this.graphs=[],this.edges=[]}mt(n,"LGraphManager"),n.prototype.addRoot=function(){var e=this.layout.newGraph(),t=this.layout.newNode(null),e=this.add(e,t);return this.setRootGraph(e),this.rootGraph},n.prototype.add=function(e,t,r,n,i){if(null==r&&null==n&&null==i){if(null==e)throw"Graph is null!";if(null==t)throw"Parent node is null!";if(-1<this.graphs.indexOf(e))throw"Graph already in this graph mgr!";if(this.graphs.push(e),null!=e.parent)throw"Already has a parent!";if(null!=t.child)throw"Already has a child!";return(e.parent=t).child=e}if(i=r,r=e,e=(n=t).getOwner(),t=i.getOwner(),null==e||e.getGraphManager()!=this)throw"Source not in this graph mgr!";if(null==t||t.getGraphManager()!=this)throw"Target not in this graph mgr!";if(e==t)return r.isInterGraph=!1,e.add(r,n,i);if(r.isInterGraph=!0,r.source=n,r.target=i,-1<this.edges.indexOf(r))throw"Edge already in inter-graph edge list!";if(this.edges.push(r),null==r.source||null==r.target)throw"Edge source and/or target is null!";if(-1!=r.source.edges.indexOf(r)||-1!=r.target.edges.indexOf(r))throw"Edge already in source and/or target incidency list!";return r.source.edges.push(r),r.target.edges.push(r),r},n.prototype.remove=function(e){if(e instanceof c){var t=e;if(t.getGraphManager()!=this)throw"Graph not in this graph mgr";if(t!=this.rootGraph&&(null==t.parent||t.parent.graphManager!=this))throw"Invalid parent node!";for(var r,n=[],i=(n=n.concat(t.getEdges())).length,a=0;a<i;a++)r=n[a],t.remove(r);for(var s,o=[],i=(o=o.concat(t.getNodes())).length,a=0;a<i;a++)s=o[a],t.remove(s);t==this.rootGraph&&this.setRootGraph(null);var l=this.graphs.indexOf(t);this.graphs.splice(l,1),t.parent=null}else if(e instanceof h){if(null==(r=e))throw"Edge is null!";if(!r.isInterGraph)throw"Not an inter-graph edge!";if(null==r.source||null==r.target)throw"Source and/or target is null!";if(-1==r.source.edges.indexOf(r)||-1==r.target.edges.indexOf(r))throw"Source and/or target doesn't know this edge!";if(l=r.source.edges.indexOf(r),r.source.edges.splice(l,1),l=r.target.edges.indexOf(r),r.target.edges.splice(l,1),null==r.source.owner||null==r.source.owner.getGraphManager())throw"Edge owner graph or owner graph manager is null!";if(-1==r.source.owner.getGraphManager().edges.indexOf(r))throw"Not in owner graph manager's edge list!";l=r.source.owner.getGraphManager().edges.indexOf(r),r.source.owner.getGraphManager().edges.splice(l,1)}},n.prototype.updateBounds=function(){this.rootGraph.updateBounds(!0)},n.prototype.getGraphs=function(){return this.graphs},n.prototype.getAllNodes=function(){if(null==this.allNodes){for(var e=[],t=this.getGraphs(),r=t.length,n=0;n<r;n++)e=e.concat(t[n].getNodes());this.allNodes=e}return this.allNodes},n.prototype.resetAllNodes=function(){this.allNodes=null},n.prototype.resetAllEdges=function(){this.allEdges=null},n.prototype.resetAllNodesToApplyGravitation=function(){this.allNodesToApplyGravitation=null},n.prototype.getAllEdges=function(){if(null==this.allEdges){for(var e=[],t=this.getGraphs(),r=(t.length,0);r<t.length;r++)e=e.concat(t[r].getEdges());e=e.concat(this.edges),this.allEdges=e}return this.allEdges},n.prototype.getAllNodesToApplyGravitation=function(){return this.allNodesToApplyGravitation},n.prototype.setAllNodesToApplyGravitation=function(e){if(null!=this.allNodesToApplyGravitation)throw"assert failed";this.allNodesToApplyGravitation=e},n.prototype.getRoot=function(){return this.rootGraph},n.prototype.setRootGraph=function(e){if(e.getGraphManager()!=this)throw"Root not in this graph mgr!";null==(this.rootGraph=e).parent&&(e.parent=this.layout.newNode("Root node"))},n.prototype.getLayout=function(){return this.layout},n.prototype.isOneAncestorOfOther=function(e,t){if(null==e||null==t)throw"assert failed";if(e==t)return!0;for(var r,n=e.getOwner();null!=(r=n.getParent());){if(r==t)return!0;if(null==(n=r.getOwner()))break}for(n=t.getOwner();null!=(r=n.getParent());){if(r==e)return!0;if(null==(n=r.getOwner()))break}return!1},n.prototype.calcLowestCommonAncestors=function(){for(var e,t,r,n,i,a=this.getAllEdges(),s=a.length,o=0;o<s;o++)if(t=(e=a[o]).source,r=e.target,e.lca=null,(e.sourceInLca=t)==(e.targetInLca=r))e.lca=t.getOwner();else{for(n=t.getOwner();null==e.lca;){for(i=(e.targetInLca=r).getOwner();null==e.lca;){if(i==n){e.lca=i;break}if(i==this.rootGraph)break;if(null!=e.lca)throw"assert failed";e.targetInLca=i.getParent(),i=e.targetInLca.getOwner()}if(n==this.rootGraph)break;null==e.lca&&(e.sourceInLca=n.getParent(),n=e.sourceInLca.getOwner())}if(null==e.lca)throw"assert failed"}},n.prototype.calcLowestCommonAncestor=function(e,t){if(e==t)return e.getOwner();for(var r=e.getOwner();null!=r;){for(var n=t.getOwner();null!=n;){if(n==r)return n;n=n.getParent().getOwner()}r=r.getParent().getOwner()}return r},n.prototype.calcInclusionTreeDepths=function(e,t){null==e&&null==t&&(e=this.rootGraph,t=1);for(var r,n=e.getNodes(),i=n.length,a=0;a<i;a++)(r=n[a]).inclusionTreeDepth=t,null!=r.child&&this.calcInclusionTreeDepths(r.child,t+1)},n.prototype.includesInvalidEdge=function(){for(var e,t=[],r=this.edges.length,n=0;n<r;n++)e=this.edges[n],this.isOneAncestorOfOther(e.source,e.target)&&t.push(e);for(n=0;n<t.length;n++)this.remove(t[n]);return!1},e.exports=n},function(e,t,r){var h=r(12);function n(){}mt(n,"IGeometry"),n.calcSeparationAmount=function(e,t,r,n){if(!e.intersects(t))throw"assert failed";var i=new Array(2),a=(this.decideDirectionsForOverlappingNodes(e,t,i),r[0]=Math.min(e.getRight(),t.getRight())-Math.max(e.x,t.x),r[1]=Math.min(e.getBottom(),t.getBottom())-Math.max(e.y,t.y),e.getX()<=t.getX()&&e.getRight()>=t.getRight()?r[0]+=Math.min(t.getX()-e.getX(),e.getRight()-t.getRight()):t.getX()<=e.getX()&&t.getRight()>=e.getRight()&&(r[0]+=Math.min(e.getX()-t.getX(),t.getRight()-e.getRight())),e.getY()<=t.getY()&&e.getBottom()>=t.getBottom()?r[1]+=Math.min(t.getY()-e.getY(),e.getBottom()-t.getBottom()):t.getY()<=e.getY()&&t.getBottom()>=e.getBottom()&&(r[1]+=Math.min(e.getY()-t.getY(),t.getBottom()-e.getBottom())),Math.abs((t.getCenterY()-e.getCenterY())/(t.getCenterX()-e.getCenterX()))),t=(a=t.getCenterY()===e.getCenterY()&&t.getCenterX()===e.getCenterX()?1:a)*r[0],e=r[1]/a;r[0]<e?e=r[0]:t=r[1],r[0]=-1*i[0]*(e/2+n),r[1]=-1*i[1]*(t/2+n)},n.decideDirectionsForOverlappingNodes=function(e,t,r){e.getCenterX()<t.getCenterX()?r[0]=-1:r[0]=1,e.getCenterY()<t.getCenterY()?r[1]=-1:r[1]=1},n.getIntersection2=function(e,t,r){var n=e.getCenterX(),i=e.getCenterY(),a=t.getCenterX(),s=t.getCenterY();if(e.intersects(t))return r[0]=n,r[1]=i,r[2]=a,r[3]=s,!0;var o=e.getX(),l=e.getY(),c=e.getRight(),h=e.getX(),u=e.getBottom(),d=e.getRight(),p=e.getWidthHalf(),g=e.getHeightHalf(),f=t.getX(),m=t.getY(),y=t.getRight(),v=t.getX(),x=t.getBottom(),b=t.getRight(),w=t.getWidthHalf(),k=t.getHeightHalf(),T=!1,E=!1;if(n===a){if(s<i)return r[0]=n,r[1]=l,r[2]=a,r[3]=x,!1;i<s&&(r[0]=n,r[1]=u,r[2]=a,r[3]=m)}else if(i===s){if(a<n)return r[0]=o,r[1]=i,r[2]=y,r[3]=s,!1;n<a&&(r[0]=c,r[1]=i,r[2]=f,r[3]=s)}else{var e=e.height/e.width,t=t.height/t.width,C=(s-i)/(a-n),_=void 0,S=void 0,A=void 0;if(-e==C?(a<n?(r[0]=h,r[1]=u):(r[0]=c,r[1]=l),T=!0):e==C&&(a<n?(r[0]=o,r[1]=l):(r[0]=d,r[1]=u),T=!0),-t==C?(n<a?(r[2]=v,r[3]=x):(r[2]=y,r[3]=m),E=!0):t==C&&(n<a?(r[2]=f,r[3]=m):(r[2]=b,r[3]=x),E=!0),T&&E)return!1;if(c=a<n?s<i?(_=this.getCardinalDirection(e,C,4),this.getCardinalDirection(t,C,2)):(_=this.getCardinalDirection(-e,C,3),this.getCardinalDirection(-t,C,1)):s<i?(_=this.getCardinalDirection(-e,C,1),this.getCardinalDirection(-t,C,3)):(_=this.getCardinalDirection(e,C,2),this.getCardinalDirection(t,C,4)),!T)switch(_){case 1:S=l,r[0]=n+-g/C,r[1]=S;break;case 2:S=i+p*C,r[0]=d,r[1]=S;break;case 3:S=u,r[0]=n+g/C,r[1]=S;break;case 4:S=i+-p*C,r[0]=h,r[1]=S}if(!E)switch(c){case 1:A=m,r[2]=a+-k/C,r[3]=A;break;case 2:A=s+w*C,r[2]=b,r[3]=A;break;case 3:A=x,r[2]=a+k/C,r[3]=A;break;case 4:A=s+-w*C,r[2]=v,r[3]=A}}return!1},n.getCardinalDirection=function(e,t,r){return t<e?r:1+r%4},n.getIntersection=function(e,t,r,n){var i,a,s,o,l,c;return null==n?this.getIntersection2(e,t,r):(i=e.x,a=t.x,l=r.x,o=a*(e=e.y)-i*(t=t.y),c=(s=n.x)*(r=r.y)-l*(n=n.y),0==(n=(t-=e)*(e=l-s)-(l=n-r)*(s=i-a))?null:new h((s*c-e*o)/n,(l*o-t*c)/n))},n.angleOfVector=function(e,t,r,n){var i=void 0;return e!==r?(i=Math.atan((n-t)/(r-e)),r<e?i+=Math.PI:n<t&&(i+=this.TWO_PI)):i=n<t?this.ONE_AND_HALF_PI:this.HALF_PI,i},n.doIntersect=function(e,t,r,n){var i=e.x,e=e.y,a=t.x,t=t.y,s=r.x,r=r.y,o=n.x,l=(a-i)*((n=n.y)-r)-(o-s)*(t-e);return 0!=l&&(t=((e-t)*(o-i)+(a-i)*(n-e))/l,0<(a=((n-r)*(o-i)+(s-o)*(n-e))/l))&&a<1&&0<t&&t<1},n.findCircleLineIntersections=function(e,t,r,n,i,a,s){var o=(r-e)*(r-e)+(n-t)*(n-t);return 0<=(r=2*((e-i)*(r-e)+(t-a)*(n-t)))*r-4*o*(n=(e-i)*(e-i)+(t-a)*(t-a)-s*s)?(e=(-r+Math.sqrt(r*r-4*o*n))/(2*o),i=(-r-Math.sqrt(r*r-4*o*n))/(2*o),0<=e&&e<=1?[e]:0<=i&&i<=1?[i]:null):null},n.HALF_PI=.5*Math.PI,n.ONE_AND_HALF_PI=1.5*Math.PI,n.TWO_PI=2*Math.PI,n.THREE_PI=3*Math.PI,e.exports=n},function(e,t,r){function n(){}mt(n,"IMath"),n.sign=function(e){return 0<e?1:e<0?-1:0},n.floor=function(e){return e<0?Math.ceil(e):Math.floor(e)},n.ceil=function(e){return e<0?Math.floor(e):Math.ceil(e)},e.exports=n},function(e,t,r){function n(){}mt(n,"Integer"),n.MAX_VALUE=2147483647,n.MIN_VALUE=-2147483648,e.exports=n},function(e,t,r){function n(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}mt(n,"defineProperties"),mt(i,"_classCallCheck");var a,s,o=mt(function(e){return{value:e,next:null,prev:null}},"nodeFrom"),l=mt(function(e,t,r,n){return null!==e?e.next=t:n.head=t,null!==r?r.prev=t:n.tail=t,t.prev=e,t.next=r,n.length++,t},"add"),c=mt(function(e,t){var r=e.prev,n=e.next;return null!==r?r.next=n:t.head=n,null!==n?n.prev=r:t.tail=r,e.prev=e.next=null,t.length--,e},"_remove");function h(e){var t=this;i(this,h),this.length=0,this.head=null,this.tail=null,e?.forEach(function(e){return t.push(e)})}mt(h,"LinkedList"),a=h,s=[{key:"size",value:mt(function(){return this.length},"size")},{key:"insertBefore",value:mt(function(e,t){return l(t.prev,o(e),t,this)},"insertBefore")},{key:"insertAfter",value:mt(function(e,t){return l(t,o(e),t.next,this)},"insertAfter")},{key:"insertNodeBefore",value:mt(function(e,t){return l(t.prev,e,t,this)},"insertNodeBefore")},{key:"insertNodeAfter",value:mt(function(e,t){return l(t,e,t.next,this)},"insertNodeAfter")},{key:"push",value:mt(function(e){return l(this.tail,o(e),null,this)},"push")},{key:"unshift",value:mt(function(e){return l(null,o(e),this.head,this)},"unshift")},{key:"remove",value:mt(function(e){return c(e,this)},"remove")},{key:"pop",value:mt(function(){return c(this.tail,this).value},"pop")},{key:"popNode",value:mt(function(){return c(this.tail,this)},"popNode")},{key:"shift",value:mt(function(){return c(this.head,this).value},"shift")},{key:"shiftNode",value:mt(function(){return c(this.head,this)},"shiftNode")},{key:"get_object_at",value:mt(function(e){if(e<=this.length()){for(var t=1,r=this.head;t<e;)r=r.next,t++;return r.value}},"get_object_at")},{key:"set_object_at",value:mt(function(e,t){if(e<=this.length()){for(var r=1,n=this.head;r<e;)n=n.next,r++;n.value=t}},"set_object_at")}],n(a.prototype,s),e.exports=h},function(e,t,r){function n(e,t,r){this.x=null,(this.y=null)==e&&null==t&&null==r?(this.x=0,this.y=0):"number"==typeof e&&"number"==typeof t&&null==r?(this.x=e,this.y=t):"Point"==e.constructor.name&&null==t&&null==r&&(this.x=(r=e).x,this.y=r.y)}mt(n,"Point"),n.prototype.getX=function(){return this.x},n.prototype.getY=function(){return this.y},n.prototype.getLocation=function(){return new n(this.x,this.y)},n.prototype.setLocation=function(e,t,r){"Point"==e.constructor.name&&null==t&&null==r?this.setLocation((r=e).x,r.y):"number"==typeof e&&"number"==typeof t&&null==r&&(parseInt(e)==e&&parseInt(t)==t?this.move(e,t):(this.x=Math.floor(e+.5),this.y=Math.floor(t+.5)))},n.prototype.move=function(e,t){this.x=e,this.y=t},n.prototype.translate=function(e,t){this.x+=e,this.y+=t},n.prototype.equals=function(e){return"Point"==e.constructor.name?this.x==e.x&&this.y==e.y:this==e},n.prototype.toString=function(){return(new n).constructor.name+"[x="+this.x+",y="+this.y+"]"},e.exports=n},function(e,t,r){function n(e,t,r,n){this.x=0,this.y=0,this.width=0,this.height=0,null!=e&&null!=t&&null!=r&&null!=n&&(this.x=e,this.y=t,this.width=r,this.height=n)}mt(n,"RectangleD"),n.prototype.getX=function(){return this.x},n.prototype.setX=function(e){this.x=e},n.prototype.getY=function(){return this.y},n.prototype.setY=function(e){this.y=e},n.prototype.getWidth=function(){return this.width},n.prototype.setWidth=function(e){this.width=e},n.prototype.getHeight=function(){return this.height},n.prototype.setHeight=function(e){this.height=e},n.prototype.getRight=function(){return this.x+this.width},n.prototype.getBottom=function(){return this.y+this.height},n.prototype.intersects=function(e){return!(this.getRight()<e.x||this.getBottom()<e.y||e.getRight()<this.x||e.getBottom()<this.y)},n.prototype.getCenterX=function(){return this.x+this.width/2},n.prototype.getMinX=function(){return this.getX()},n.prototype.getMaxX=function(){return this.getX()+this.width},n.prototype.getCenterY=function(){return this.y+this.height/2},n.prototype.getMinY=function(){return this.getY()},n.prototype.getMaxY=function(){return this.getY()+this.height},n.prototype.getWidthHalf=function(){return this.width/2},n.prototype.getHeightHalf=function(){return this.height/2},e.exports=n},function(e,t,r){var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};function i(){}mt(i,"UniqueIDGeneretor"),i.lastID=0,i.createID=function(e){return i.isPrimitive(e)?e:(null==e.uniqueID&&(e.uniqueID=i.getString(),i.lastID++),e.uniqueID)},i.getString=function(e){return"Object#"+(null==e?i.lastID:e)},i.isPrimitive=function(e){var t="u"<typeof e?"undefined":n(e);return null==e||"object"!=t&&"function"!=t},e.exports=i},function(e,t,r){function g(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];return r}return Array.from(e)}mt(g,"_toConsumableArray");var n=r(0),i=r(7),a=r(3),s=r(1),o=r(6),l=r(5),c=r(17),h=r(29);function u(e){h.call(this),this.layoutQuality=n.QUALITY,this.createBendsAsNeeded=n.DEFAULT_CREATE_BENDS_AS_NEEDED,this.incremental=n.DEFAULT_INCREMENTAL,this.animationOnLayout=n.DEFAULT_ANIMATION_ON_LAYOUT,this.animationDuringLayout=n.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=n.DEFAULT_ANIMATION_PERIOD,this.uniformLeafNodeSizes=n.DEFAULT_UNIFORM_LEAF_NODE_SIZES,this.edgeToDummyNodes=new Map,this.graphManager=new i(this),this.isLayoutFinished=!1,this.isSubLayout=!1,this.isRemoteUse=!1,null!=e&&(this.isRemoteUse=e)}mt(u,"Layout"),u.RANDOM_SEED=1,(u.prototype=Object.create(h.prototype)).getGraphManager=function(){return this.graphManager},u.prototype.getAllNodes=function(){return this.graphManager.getAllNodes()},u.prototype.getAllEdges=function(){return this.graphManager.getAllEdges()},u.prototype.getAllNodesToApplyGravitation=function(){return this.graphManager.getAllNodesToApplyGravitation()},u.prototype.newGraphManager=function(){var e=new i(this);return this.graphManager=e},u.prototype.newGraph=function(e){return new o(null,this.graphManager,e)},u.prototype.newNode=function(e){return new a(this.graphManager,e)},u.prototype.newEdge=function(e){return new s(null,null,e)},u.prototype.checkLayoutSuccess=function(){return null==this.graphManager.getRoot()||0==this.graphManager.getRoot().getNodes().length||this.graphManager.includesInvalidEdge()},u.prototype.runLayout=function(){var e;return this.isLayoutFinished=!1,this.tilingPreLayout&&this.tilingPreLayout(),this.initParameters(),e=!this.checkLayoutSuccess()&&this.layout(),"during"!==n.ANIMATE&&(e&&!this.isSubLayout&&this.doPostLayout(),this.tilingPostLayout&&this.tilingPostLayout(),this.isLayoutFinished=!0,e)},u.prototype.doPostLayout=function(){this.incremental||this.transform(),this.update()},u.prototype.update2=function(){if(this.createBendsAsNeeded&&(this.createBendpointsFromDummyNodes(),this.graphManager.resetAllEdges()),!this.isRemoteUse){for(var e=this.graphManager.getAllEdges(),t=0;t<e.length;t++)e[t];for(var r=this.graphManager.getRoot().getNodes(),t=0;t<r.length;t++)r[t];this.update(this.graphManager.getRoot())}},u.prototype.update=function(e){if(null==e)this.update2();else if(e instanceof a){var t=e;if(null!=t.getChild())for(var r=t.getChild().getNodes(),n=0;n<r.length;n++)update(r[n]);null!=t.vGraphObject&&t.vGraphObject.update(t)}else e instanceof s?null!=e.vGraphObject&&e.vGraphObject.update(e):e instanceof o&&null!=e.vGraphObject&&e.vGraphObject.update(e)},u.prototype.initParameters=function(){this.isSubLayout||(this.layoutQuality=n.QUALITY,this.animationDuringLayout=n.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=n.DEFAULT_ANIMATION_PERIOD,this.animationOnLayout=n.DEFAULT_ANIMATION_ON_LAYOUT,this.incremental=n.DEFAULT_INCREMENTAL,this.createBendsAsNeeded=n.DEFAULT_CREATE_BENDS_AS_NEEDED,this.uniformLeafNodeSizes=n.DEFAULT_UNIFORM_LEAF_NODE_SIZES),this.animationDuringLayout&&(this.animationOnLayout=!1)},u.prototype.transform=function(e){if(null==e)this.transform(new l(0,0));else{var t=new c,r=this.graphManager.getRoot().updateLeftTop();if(null!=r){t.setWorldOrgX(e.x),t.setWorldOrgY(e.y),t.setDeviceOrgX(r.x),t.setDeviceOrgY(r.y);for(var n=this.getAllNodes(),i=0;i<n.length;i++)n[i].transform(t)}}},u.prototype.positionNodesRandomly=function(e){if(null==e)this.positionNodesRandomly(this.getGraphManager().getRoot()),this.getGraphManager().getRoot().updateBounds(!0);else for(var t,r,n=e.getNodes(),i=0;i<n.length;i++)null==(r=(t=n[i]).getChild())||0==r.getNodes().length?t.scatter():(this.positionNodesRandomly(r),t.updateBounds())},u.prototype.getFlatForest=function(){for(var e=[],t=!0,r=this.graphManager.getRoot().getNodes(),n=!0,i=0;i<r.length;i++)null!=r[i].getChild()&&(n=!1);if(n)for(var a=new Set,s=[],o=new Map,l=(l=[]).concat(r);0<l.length&&t;){for(s.push(l[0]);0<s.length&&t;){var c=s[0];s.splice(0,1),a.add(c);for(var h=c.getEdges(),i=0;i<h.length;i++){var u=h[i].getOtherEnd(c);if(o.get(c)!=u){if(a.has(u)){t=!1;break}s.push(u),o.set(u,c)}}}if(t){var d=[].concat(g(a));for(e.push(d),i=0;i<d.length;i++){var p=d[i];-1<(p=l.indexOf(p))&&l.splice(p,1)}a=new Set,o=new Map}else e=[]}return e},u.prototype.createDummyNodesForBendpoints=function(e){for(var t=[],r=e.source,n=this.graphManager.calcLowestCommonAncestor(e.source,e.target),i=0;i<e.bendpoints.length;i++){var a=this.newNode(null),s=(a.setRect(new Point(0,0),new Dimension(1,1)),n.add(a),this.newEdge(null));this.graphManager.add(s,r,a),t.add(a),r=a}return s=this.newEdge(null),this.graphManager.add(s,r,e.target),this.edgeToDummyNodes.set(e,t),(e.isInterGraph()?this.graphManager:n).remove(e),t},u.prototype.createBendpointsFromDummyNodes=function(){for(var e=(e=[]).concat(this.graphManager.getAllEdges()),e=[].concat(g(this.edgeToDummyNodes.keys())).concat(e),t=0;t<e.length;t++){var r=e[t];if(0<r.bendpoints.length){for(var n=this.edgeToDummyNodes.get(r),i=0;i<n.length;i++){var a=n[i],s=new l(a.getCenterX(),a.getCenterY()),o=r.bendpoints.get(i);o.x=s.x,o.y=s.y,a.getOwner().remove(a)}this.graphManager.add(r,r.source,r.target)}}},u.transform=function(e,t,r,n){var i,a;return null!=r&&null!=n?(i=t,e<=50?i-=(t-t/r)/50*(50-e):i+=(t*n-t)/50*(e-50),i):(r=e<=50?(a=9*t/500,t/10):(a=9*t/50,-8*t),a*e+r)},u.findCenterOfTree=function(e){var t=(t=[]).concat(e),r=[],n=new Map,i=!1,a=null;1!=t.length&&2!=t.length||(i=!0,a=t[0]);for(var s=0;s<t.length;s++){var o=(c=t[s]).getNeighborsList().size;n.set(c,c.getNeighborsList().size),1==o&&r.push(c)}for(l=(l=[]).concat(r);!i;){[].concat(l);for(var l=[],s=0;s<t.length;s++){var c=t[s],h=t.indexOf(c);0<=h&&t.splice(h,1),c.getNeighborsList().forEach(function(e){var t;r.indexOf(e)<0&&(1==(t=n.get(e)-1)&&l.push(e),n.set(e,t))})}r=r.concat(l),1!=t.length&&2!=t.length||(i=!0,a=t[0])}return a},u.prototype.setGraphManager=function(e){this.graphManager=e},e.exports=u},function(e,t,r){function n(){}mt(n,"RandomSeed"),n.seed=1,n.x=0,n.nextDouble=function(){return(n.x=1e4*Math.sin(n.seed++))-Math.floor(n.x)},e.exports=n},function(e,t,r){var n=r(5);function i(e,t){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}mt(i,"Transform"),i.prototype.getWorldOrgX=function(){return this.lworldOrgX},i.prototype.setWorldOrgX=function(e){this.lworldOrgX=e},i.prototype.getWorldOrgY=function(){return this.lworldOrgY},i.prototype.setWorldOrgY=function(e){this.lworldOrgY=e},i.prototype.getWorldExtX=function(){return this.lworldExtX},i.prototype.setWorldExtX=function(e){this.lworldExtX=e},i.prototype.getWorldExtY=function(){return this.lworldExtY},i.prototype.setWorldExtY=function(e){this.lworldExtY=e},i.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},i.prototype.setDeviceOrgX=function(e){this.ldeviceOrgX=e},i.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},i.prototype.setDeviceOrgY=function(e){this.ldeviceOrgY=e},i.prototype.getDeviceExtX=function(){return this.ldeviceExtX},i.prototype.setDeviceExtX=function(e){this.ldeviceExtX=e},i.prototype.getDeviceExtY=function(){return this.ldeviceExtY},i.prototype.setDeviceExtY=function(e){this.ldeviceExtY=e},i.prototype.transformX=function(e){var t=this.lworldExtX;return 0!=t?this.ldeviceOrgX+(e-this.lworldOrgX)*this.ldeviceExtX/t:0},i.prototype.transformY=function(e){var t=this.lworldExtY;return 0!=t?this.ldeviceOrgY+(e-this.lworldOrgY)*this.ldeviceExtY/t:0},i.prototype.inverseTransformX=function(e){var t=this.ldeviceExtX;return 0!=t?this.lworldOrgX+(e-this.ldeviceOrgX)*this.lworldExtX/t:0},i.prototype.inverseTransformY=function(e){var t=this.ldeviceExtY;return 0!=t?this.lworldOrgY+(e-this.ldeviceOrgY)*this.lworldExtY/t:0},i.prototype.inverseTransformPoint=function(e){return new n(this.inverseTransformX(e.x),this.inverseTransformY(e.y))},e.exports=i},function(e,t,r){function d(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];return r}return Array.from(e)}mt(d,"_toConsumableArray");var n,i=r(15),p=r(4),l=r(0),c=r(8),h=r(9);function a(){i.call(this),this.useSmartIdealEdgeLengthCalculation=p.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.gravityConstant=p.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=p.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=p.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=p.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.displacementThresholdPerNode=3*p.DEFAULT_EDGE_LENGTH/100,this.coolingFactor=p.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.initialCoolingFactor=p.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.totalDisplacement=0,this.oldTotalDisplacement=0,this.maxIterations=p.MAX_ITERATIONS}for(n in mt(a,"FDLayout"),a.prototype=Object.create(i.prototype),i)a[n]=i[n];a.prototype.initParameters=function(){i.prototype.initParameters.call(this,arguments),this.totalIterations=0,this.notAnimatedIterations=0,this.useFRGridVariant=p.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION,this.grid=[]},a.prototype.calcIdealEdgeLengths=function(){for(var e,t,r,n,i,a,s=this.getGraphManager().getAllEdges(),o=0;o<s.length;o++)t=(e=s[o]).idealLength,e.isInterGraph&&(r=e.getSource(),n=e.getTarget(),i=e.getSourceInLca().getEstimatedSize(),a=e.getTargetInLca().getEstimatedSize(),this.useSmartIdealEdgeLengthCalculation&&(e.idealLength+=i+a-2*l.SIMPLE_NODE_SIZE),i=e.getLca().getInclusionTreeDepth(),e.idealLength+=t*p.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR*(r.getInclusionTreeDepth()+n.getInclusionTreeDepth()-2*i))},a.prototype.initSpringEmbedder=function(){var e=this.getAllNodes().length;this.incremental?(e>p.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*p.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(e-p.ADAPTATION_LOWER_NODE_LIMIT)/(p.ADAPTATION_UPPER_NODE_LIMIT-p.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-p.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=p.MAX_NODE_DISPLACEMENT_INCREMENTAL):(e>p.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(p.COOLING_ADAPTATION_FACTOR,1-(e-p.ADAPTATION_LOWER_NODE_LIMIT)/(p.ADAPTATION_UPPER_NODE_LIMIT-p.ADAPTATION_LOWER_NODE_LIMIT)*(1-p.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=p.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(5*this.getAllNodes().length,this.maxIterations),this.displacementThresholdPerNode=3*p.DEFAULT_EDGE_LENGTH/100,this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},a.prototype.calcSpringForces=function(){for(var e,t=this.getAllEdges(),r=0;r<t.length;r++)e=t[r],this.calcSpringForce(e,e.idealLength)},a.prototype.calcRepulsionForces=function(){var e,t,r,n,i,a=!(0<arguments.length&&void 0!==arguments[0])||arguments[0],s=1<arguments.length&&void 0!==arguments[1]&&arguments[1],o=this.getAllNodes();if(this.useFRGridVariant)for(this.totalIterations%p.GRID_CALCULATION_CHECK_PERIOD==1&&a&&this.updateGrid(),i=new Set,e=0;e<o.length;e++)r=o[e],this.calculateRepulsionForceOfANode(r,i,a,s),i.add(r);else for(e=0;e<o.length;e++)for(r=o[e],t=e+1;t<o.length;t++)n=o[t],r.getOwner()==n.getOwner()&&this.calcRepulsionForce(r,n)},a.prototype.calcGravitationalForces=function(){for(var e,t=this.getAllNodesToApplyGravitation(),r=0;r<t.length;r++)e=t[r],this.calcGravitationalForce(e)},a.prototype.moveNodes=function(){for(var e=this.getAllNodes(),t=0;t<e.length;t++)e[t].move()},a.prototype.calcSpringForce=function(e,t){var r,n,i=e.getSource(),a=e.getTarget();if(this.uniformLeafNodeSizes&&null==i.getChild()&&null==a.getChild())e.updateLengthSimple();else if(e.updateLength(),e.isOverlapingSourceAndTarget)return;0!=(r=e.getLength())&&(t=e.edgeElasticity*(r-t),n=e.lengthY/r*t,i.springForceX+=e=e.lengthX/r*t,i.springForceY+=n,a.springForceX-=e,a.springForceY-=n)},a.prototype.calcRepulsionForce=function(e,t){var r,n,i,a=e.getRect(),s=t.getRect(),o=new Array(2),l=new Array(4);a.intersects(s)?(c.calcSeparationAmount(a,s,o,p.DEFAULT_EDGE_LENGTH/2),n=2*o[0],i=2*o[1],o=e.noOfChildren*t.noOfChildren/(e.noOfChildren+t.noOfChildren),e.repulsionForceX-=o*n,e.repulsionForceY-=o*i,t.repulsionForceX+=o*n,t.repulsionForceY+=o*i):(o=this.uniformLeafNodeSizes&&null==e.getChild()&&null==t.getChild()?(r=s.getCenterX()-a.getCenterX(),s.getCenterY()-a.getCenterY()):(c.getIntersection(a,s,l),r=l[2]-l[0],l[3]-l[1]),a=(r=Math.abs(r)<p.MIN_REPULSION_DIST?h.sign(r)*p.MIN_REPULSION_DIST:r)*r+(o=Math.abs(o)<p.MIN_REPULSION_DIST?h.sign(o)*p.MIN_REPULSION_DIST:o)*o,s=Math.sqrt(a),i=(l=(e.nodeRepulsion/2+t.nodeRepulsion/2)*e.noOfChildren*t.noOfChildren/a)*o/s,e.repulsionForceX-=n=l*r/s,e.repulsionForceY-=i,t.repulsionForceX+=n,t.repulsionForceY+=i)},a.prototype.calcGravitationalForce=function(e){var t,r=e.getOwner(),n=(r.getRight()+r.getLeft())/2,i=(r.getTop()+r.getBottom())/2,n=e.getCenterX()-n,i=e.getCenterY()-i,a=Math.abs(n)+e.getWidth()/2,s=Math.abs(i)+e.getHeight()/2;e.getOwner()==this.graphManager.getRoot()?((t=r.getEstimatedSize()*this.gravityRangeFactor)<a||t<s)&&(e.gravitationForceX=-this.gravityConstant*n,e.gravitationForceY=-this.gravityConstant*i):((t=r.getEstimatedSize()*this.compoundGravityRangeFactor)<a||t<s)&&(e.gravitationForceX=-this.gravityConstant*n*this.compoundGravityConstant,e.gravitationForceY=-this.gravityConstant*i*this.compoundGravityConstant)},a.prototype.isConverged=function(){var e,t=!1;return this.totalIterations>this.maxIterations/3&&(t=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),e=this.totalDisplacement<this.totalDisplacementThreshold,this.oldTotalDisplacement=this.totalDisplacement,e||t},a.prototype.animate=function(){this.animationDuringLayout&&!this.isSubLayout&&(this.notAnimatedIterations==this.animationPeriod?(this.update(),this.notAnimatedIterations=0):this.notAnimatedIterations++)},a.prototype.calcNoOfChildrenForAllNodes=function(){for(var e,t=this.graphManager.getAllNodes(),r=0;r<t.length;r++)(e=t[r]).noOfChildren=e.getNoOfChildren()},a.prototype.calcGrid=function(e){for(var t=parseInt(Math.ceil((e.getRight()-e.getLeft())/this.repulsionRange)),r=parseInt(Math.ceil((e.getBottom()-e.getTop())/this.repulsionRange)),n=new Array(t),i=0;i<t;i++)n[i]=new Array(r);for(i=0;i<t;i++)for(var a=0;a<r;a++)n[i][a]=new Array;return n},a.prototype.addNodeToGrid=function(e,t,r){for(var n=parseInt(Math.floor((e.getRect().x-t)/this.repulsionRange)),i=parseInt(Math.floor((e.getRect().width+e.getRect().x-t)/this.repulsionRange)),a=parseInt(Math.floor((e.getRect().y-r)/this.repulsionRange)),s=parseInt(Math.floor((e.getRect().height+e.getRect().y-r)/this.repulsionRange)),o=n;o<=i;o++)for(var l=a;l<=s;l++)this.grid[o][l].push(e),e.setGridCoordinates(n,i,a,s)},a.prototype.updateGrid=function(){var e,t,r=this.getAllNodes();for(this.grid=this.calcGrid(this.graphManager.getRoot()),e=0;e<r.length;e++)t=r[e],this.addNodeToGrid(t,this.graphManager.getRoot().getLeft(),this.graphManager.getRoot().getTop())},a.prototype.calculateRepulsionForceOfANode=function(e,t,r,n){if(this.totalIterations%p.GRID_CALCULATION_CHECK_PERIOD==1&&r||n){var i=new Set;e.surrounding=new Array;for(var a=this.grid,s=e.startX-1;s<e.finishX+2;s++)for(var o=e.startY-1;o<e.finishY+2;o++)if(!(s<0||o<0||s>=a.length||o>=a[0].length))for(var l=0;l<a[s][o].length;l++){var c,h,u=a[s][o][l];e.getOwner()!=u.getOwner()||e==u||t.has(u)||i.has(u)||(c=Math.abs(e.getCenterX()-u.getCenterX())-(e.getWidth()/2+u.getWidth()/2),h=Math.abs(e.getCenterY()-u.getCenterY())-(e.getHeight()/2+u.getHeight()/2),c<=this.repulsionRange&&h<=this.repulsionRange&&i.add(u))}e.surrounding=[].concat(d(i))}for(s=0;s<e.surrounding.length;s++)this.calcRepulsionForce(e,e.surrounding[s])},a.prototype.calcRepulsionRange=function(){return 0},e.exports=a},function(e,t,r){var n,i=r(1),a=r(4);function s(e,t,r){i.call(this,e,t,r),this.idealLength=a.DEFAULT_EDGE_LENGTH,this.edgeElasticity=a.DEFAULT_SPRING_STRENGTH}for(n in mt(s,"FDLayoutEdge"),s.prototype=Object.create(i.prototype),i)s[n]=i[n];e.exports=s},function(e,t,r){var n,i=r(3),a=r(4);function s(e,t,r,n){i.call(this,e,t,r,n),this.nodeRepulsion=a.DEFAULT_REPULSION_STRENGTH,this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0,this.startX=0,this.finishX=0,this.startY=0,this.finishY=0,this.surrounding=[]}for(n in mt(s,"FDLayoutNode"),s.prototype=Object.create(i.prototype),i)s[n]=i[n];s.prototype.setGridCoordinates=function(e,t,r,n){this.startX=e,this.finishX=t,this.startY=r,this.finishY=n},e.exports=s},function(e,t,r){function n(e,t){this.width=0,this.height=0,null!==e&&null!==t&&(this.height=t,this.width=e)}mt(n,"DimensionD"),n.prototype.getWidth=function(){return this.width},n.prototype.setWidth=function(e){this.width=e},n.prototype.getHeight=function(){return this.height},n.prototype.setHeight=function(e){this.height=e},e.exports=n},function(e,t,r){var n=r(14);function i(){this.map={},this.keys=[]}mt(i,"HashMap"),i.prototype.put=function(e,t){var r=n.createID(e);this.contains(r)||(this.map[r]=t,this.keys.push(e))},i.prototype.contains=function(e){return n.createID(e),null!=this.map[e]},i.prototype.get=function(e){return e=n.createID(e),this.map[e]},i.prototype.keySet=function(){return this.keys},e.exports=i},function(e,t,r){var n=r(14);function i(){this.set={}}mt(i,"HashSet"),i.prototype.add=function(e){var t=n.createID(e);this.contains(t)||(this.set[t]=e)},i.prototype.remove=function(e){delete this.set[n.createID(e)]},i.prototype.clear=function(){this.set={}},i.prototype.contains=function(e){return this.set[n.createID(e)]==e},i.prototype.isEmpty=function(){return 0===this.size()},i.prototype.size=function(){return Object.keys(this.set).length},i.prototype.addAllTo=function(e){for(var t=Object.keys(this.set),r=t.length,n=0;n<r;n++)e.push(this.set[t[n]])},i.prototype.size=function(){return Object.keys(this.set).length},i.prototype.addAll=function(e){for(var t=e.length,r=0;r<t;r++){var n=e[r];this.add(n)}},e.exports=i},function(e,t,r){function n(){}mt(n,"Matrix"),n.multMat=function(e,t){for(var r=[],n=0;n<e.length;n++){r[n]=[];for(var i=0;i<t[0].length;i++)for(var a=r[n][i]=0;a<e[0].length;a++)r[n][i]+=e[n][a]*t[a][i]}return r},n.transpose=function(e){for(var t=[],r=0;r<e[0].length;r++){t[r]=[];for(var n=0;n<e.length;n++)t[r][n]=e[n][r]}return t},n.multCons=function(e,t){for(var r=[],n=0;n<e.length;n++)r[n]=e[n]*t;return r},n.minusOp=function(e,t){for(var r=[],n=0;n<e.length;n++)r[n]=e[n]-t[n];return r},n.dotProduct=function(e,t){for(var r=0,n=0;n<e.length;n++)r+=e[n]*t[n];return r},n.mag=function(e){return Math.sqrt(this.dotProduct(e,e))},n.normalize=function(e){for(var t=[],r=this.mag(e),n=0;n<e.length;n++)t[n]=e[n]/r;return t},n.multGamma=function(e){for(var t=[],r=0,n=0;n<e.length;n++)r+=e[n];r*=-1/e.length;for(var i=0;i<e.length;i++)t[i]=r+e[i];return t},n.multL=function(e,t,r){for(var n=[],i=[],a=[],s=0;s<t[0].length;s++){for(var o=0,l=0;l<t.length;l++)o+=-.5*t[l][s]*e[l];i[s]=o}for(var c=0;c<r.length;c++){for(var h=0,u=0;u<r.length;u++)h+=r[c][u]*i[u];a[c]=h}for(var d=0;d<t.length;d++){for(var p=0,g=0;g<t[0].length;g++)p+=t[d][g]*a[g];n[d]=p}return n},e.exports=n},function(e,t,r){function n(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}mt(n,"defineProperties"),mt(i,"_classCallCheck");var a,s,o=r(11),r=(mt(l,"Quicksort"),a=l,s=[{key:"_quicksort",value:mt(function(e,t,r){var n;t<r&&(n=this._partition(e,t,r),this._quicksort(e,t,n),this._quicksort(e,n+1,r))},"_quicksort")},{key:"_partition",value:mt(function(e,t,r){for(var n=this._get(e,t),i=t,a=r;;){for(;this.compareFunction(n,this._get(e,a));)a--;for(;this.compareFunction(this._get(e,i),n);)i++;if(!(i<a))return a;this._swap(e,i,a),i++,a--}},"_partition")},{key:"_get",value:mt(function(e,t){return e instanceof o?e.get_object_at(t):e[t]},"_get")},{key:"_set",value:mt(function(e,t,r){e instanceof o?e.set_object_at(t,r):e[t]=r},"_set")},{key:"_swap",value:mt(function(e,t,r){var n=this._get(e,t);this._set(e,t,this._get(e,r)),this._set(e,r,n)},"_swap")},{key:"_defaultCompareFunction",value:mt(function(e,t){return e<t},"_defaultCompareFunction")}],n(a.prototype,s),l);function l(e,t){i(this,l),null===t&&void 0===t||(this.compareFunction=this._defaultCompareFunction),t=void 0,t=e instanceof o?e.size():e.length,this._quicksort(e,0,t-1)}e.exports=r},function(e,t,r){function Ae(){}mt(Ae,"SVD"),Ae.svd=function(e){this.U=null,this.V=null,this.s=null,this.m=0,this.n=0,this.m=e.length,this.n=e[0].length;var t,P=Math.min(this.m,this.n);this.s=(e=>{for(var t=[];0<e--;)t.push(0);return t})(Math.min(this.m+1,this.n)),this.U=(t=[this.m,P],mt(function e(t){if(0==t.length)return 0;for(var r=[],n=0;n<t[0];n++)r.push(e(t.slice(1)));return r},"allocate")(t)),this.V=(t=[this.n,this.n],mt(function e(t){if(0==t.length)return 0;for(var r=[],n=0;n<t[0];n++)r.push(e(t.slice(1)));return r},"allocate")(t));for(var B,$,F,r=(e=>{for(var t=[];0<e--;)t.push(0);return t})(this.n),z=(e=>{for(var t=[];0<e--;)t.push(0);return t})(this.m),n=Math.min(this.m-1,this.n),i=Math.max(0,Math.min(this.n-2,this.m)),a=0;a<Math.max(n,i);a++){if(a<n){this.s[a]=0;for(var G=a;G<this.m;G++)this.s[a]=Ae.hypot(this.s[a],e[G][a]);if(0!==this.s[a]){e[a][a]<0&&(this.s[a]=-this.s[a]);for(var U=a;U<this.m;U++)e[U][a]/=this.s[a];e[a][a]+=1}this.s[a]=-this.s[a]}for(var s=a+1;s<this.n;s++){if(F=0!==this.s[a],a<n&&F){for(var q=0,j=a;j<this.m;j++)q+=e[j][a]*e[j][s];for(var q=-q/e[a][a],Y=a;Y<this.m;Y++)e[Y][s]+=q*e[Y][a]}r[s]=e[a][s]}if(a<n)for(var W=a;W<this.m;W++)this.U[W][a]=e[W][a];if(a<i){r[a]=0;for(var H=a+1;H<this.n;H++)r[a]=Ae.hypot(r[a],r[H]);if(0!==r[a]){r[a+1]<0&&(r[a]=-r[a]);for(var V=a+1;V<this.n;V++)r[V]/=r[a];r[a+1]+=1}if(r[a]=-r[a],B=a+1<this.m,$=0!==r[a],B&&$){for(var X=a+1;X<this.m;X++)z[X]=0;for(var K=a+1;K<this.n;K++)for(var Z=a+1;Z<this.m;Z++)z[Z]+=r[K]*e[Z][K];for(var Q=a+1;Q<this.n;Q++)for(var J=-r[Q]/r[a+1],ee=a+1;ee<this.m;ee++)e[ee][Q]+=J*z[ee]}for(var te=a+1;te<this.n;te++)this.V[te][a]=r[te]}}var o=Math.min(this.n,this.m+1);n<this.n&&(this.s[n]=e[n][n]),this.m<o&&(this.s[o-1]=0),i+1<o&&(r[i]=e[i][o-1]),r[o-1]=0;for(var l=n;l<P;l++){for(var re=0;re<this.m;re++)this.U[re][l]=0;this.U[l][l]=1}for(var c=n-1;0<=c;c--)if(0!==this.s[c]){for(var ne=c+1;ne<P;ne++){for(var ie=0,ae=c;ae<this.m;ae++)ie+=this.U[ae][c]*this.U[ae][ne];for(var ie=-ie/this.U[c][c],se=c;se<this.m;se++)this.U[se][ne]+=ie*this.U[se][c]}for(var oe=c;oe<this.m;oe++)this.U[oe][c]=-this.U[oe][c];this.U[c][c]=1+this.U[c][c];for(var le=0;le<c-1;le++)this.U[le][c]=0}else{for(var ce=0;ce<this.m;ce++)this.U[ce][c]=0;this.U[c][c]=1}for(var he,h=this.n-1;0<=h;h--){if(he=0!==r[h],h<i&&he)for(var ue=h+1;ue<P;ue++){for(var de=0,pe=h+1;pe<this.n;pe++)de+=this.V[pe][h]*this.V[pe][ue];for(var de=-de/this.V[h+1][h],ge=h+1;ge<this.n;ge++)this.V[ge][ue]+=de*this.V[ge][h]}for(var fe=0;fe<this.n;fe++)this.V[fe][h]=0;this.V[h][h]=1}for(var me=o-1,ye=Math.pow(2,-52),ve=Math.pow(2,-966);0<o;){for(var u=void 0,d=void 0,u=o-2;-1<=u&&-1!==u;u--)if(Math.abs(r[u])<=ve+ye*(Math.abs(this.s[u])+Math.abs(this.s[u+1]))){r[u]=0;break}if(u===o-2)d=4;else{for(var p=void 0,p=o-1;u<=p&&p!==u;p--){var xe=(p!==o?Math.abs(r[p]):0)+(p!==u+1?Math.abs(r[p-1]):0);if(Math.abs(this.s[p])<=ve+ye*xe){this.s[p]=0;break}}p===u?d=3:p===o-1?d=1:(d=2,u=p)}switch(u++,d){case 1:var be=r[o-2];r[o-2]=0;for(var g=o-2;u<=g;g--){var f=Ae.hypot(this.s[g],be),we=this.s[g]/f,ke=be/f;this.s[g]=f,g!==u&&(be=-ke*r[g-1],r[g-1]=we*r[g-1]);for(var m=0;m<this.n;m++)f=we*this.V[m][g]+ke*this.V[m][o-1],this.V[m][o-1]=-ke*this.V[m][g]+we*this.V[m][o-1],this.V[m][g]=f}break;case 2:var Te=r[u-1];r[u-1]=0;for(var y=u;y<o;y++){var v=Ae.hypot(this.s[y],Te),Ee=this.s[y]/v,Ce=Te/v;this.s[y]=v,Te=-Ce*r[y],r[y]=Ee*r[y];for(var x=0;x<this.m;x++)v=Ee*this.U[x][y]+Ce*this.U[x][u-1],this.U[x][u-1]=-Ce*this.U[x][y]+Ee*this.U[x][u-1],this.U[x][y]=v}break;case 3:var b=Math.max(Math.max(Math.max(Math.max(Math.abs(this.s[o-1]),Math.abs(this.s[o-2])),Math.abs(r[o-2])),Math.abs(this.s[u])),Math.abs(r[u])),w=this.s[o-1]/b,k=this.s[o-2]/b,T=r[o-2]/b,_e=this.s[u]/b,b=r[u]/b,k=((k+w)*(k-w)+T*T)/2,T=w*T*(w*T),E=0;0==k&&0==T||(E=Math.sqrt(k*k+T),E=T/(k+(k<0?-E:E)));for(var C=(_e+w)*(_e-w)+E,_=_e*b,S=u;S<o-1;S++){var A=Ae.hypot(C,_),L=C/A,N=_/A;S!==u&&(r[S-1]=A),C=L*this.s[S]+N*r[S],r[S]=L*r[S]-N*this.s[S],_=N*this.s[S+1],this.s[S+1]=L*this.s[S+1];for(var I=0;I<this.n;I++)A=L*this.V[I][S]+N*this.V[I][S+1],this.V[I][S+1]=-N*this.V[I][S]+L*this.V[I][S+1],this.V[I][S]=A;if(L=C/(A=Ae.hypot(C,_)),N=_/A,this.s[S]=A,C=L*r[S]+N*this.s[S+1],this.s[S+1]=-N*r[S]+L*this.s[S+1],_=N*r[S+1],r[S+1]=L*r[S+1],S<this.m-1)for(var R=0;R<this.m;R++)A=L*this.U[R][S]+N*this.U[R][S+1],this.U[R][S+1]=-N*this.U[R][S]+L*this.U[R][S+1],this.U[R][S]=A}r[o-2]=C;break;case 4:if(this.s[u]<=0&&(this.s[u]=this.s[u]<0?-this.s[u]:0,1))for(var Se=0;Se<=me;Se++)this.V[Se][u]=-this.V[Se][u];for(;u<me&&!(this.s[u]>=this.s[u+1]);){var M=this.s[u];if(this.s[u]=this.s[u+1],this.s[u+1]=M,u<this.n-1)for(var D=0;D<this.n;D++)M=this.V[D][u+1],this.V[D][u+1]=this.V[D][u],this.V[D][u]=M;if(u<this.m-1)for(var O=0;O<this.m;O++)M=this.U[O][u+1],this.U[O][u+1]=this.U[O][u],this.U[O][u]=M;u++}o--}}return{U:this.U,V:this.V,S:this.s}},Ae.hypot=function(e,t){var r=void 0;return Math.abs(e)>Math.abs(t)?(r=t/e,Math.abs(e)*Math.sqrt(1+r*r)):0!=t?(r=e/t,Math.abs(t)*Math.sqrt(1+r*r)):0},e.exports=Ae},function(e,t,r){var n,i;function a(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function h(e,t){var r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:1,n=3<arguments.length&&void 0!==arguments[3]?arguments[3]:-1,i=4<arguments.length&&void 0!==arguments[4]?arguments[4]:-1;c(this,h),this.sequence1=e,this.sequence2=t,this.match_score=r,this.mismatch_penalty=n,this.gap_penalty=i,this.iMax=e.length+1,this.jMax=t.length+1,this.grid=new Array(this.iMax);for(var a=0;a<this.iMax;a++){this.grid[a]=new Array(this.jMax);for(var s=0;s<this.jMax;s++)this.grid[a][s]=0}this.tracebackGrid=new Array(this.iMax);for(var o=0;o<this.iMax;o++){this.tracebackGrid[o]=new Array(this.jMax);for(var l=0;l<this.jMax;l++)this.tracebackGrid[o][l]=[null,null,null]}this.alignments=[],this.score=-1,this.computeGrids()}mt(a,"defineProperties"),mt(c,"_classCallCheck"),mt(h,"NeedlemanWunsch"),n=h,i=[{key:"getScore",value:mt(function(){return this.score},"getScore")},{key:"getAlignments",value:mt(function(){return this.alignments},"getAlignments")},{key:"computeGrids",value:mt(function(){for(var e=1;e<this.jMax;e++)this.grid[0][e]=this.grid[0][e-1]+this.gap_penalty,this.tracebackGrid[0][e]=[!1,!1,!0];for(var t=1;t<this.iMax;t++)this.grid[t][0]=this.grid[t-1][0]+this.gap_penalty,this.tracebackGrid[t][0]=[!1,!0,!1];for(var r=1;r<this.iMax;r++)for(var n=1;n<this.jMax;n++){var i=[this.sequence1[r-1]===this.sequence2[n-1]?this.grid[r-1][n-1]+this.match_score:this.grid[r-1][n-1]+this.mismatch_penalty,this.grid[r-1][n]+this.gap_penalty,this.grid[r][n-1]+this.gap_penalty],a=this.arrayAllMaxIndexes(i);this.grid[r][n]=i[a[0]],this.tracebackGrid[r][n]=[a.includes(0),a.includes(1),a.includes(2)]}this.score=this.grid[this.iMax-1][this.jMax-1]},"computeGrids")},{key:"alignmentTraceback",value:mt(function(){var e=[];for(e.push({pos:[this.sequence1.length,this.sequence2.length],seq1:"",seq2:""});e[0];){var t=e[0],r=this.tracebackGrid[t.pos[0]][t.pos[1]];r[0]&&e.push({pos:[t.pos[0]-1,t.pos[1]-1],seq1:this.sequence1[t.pos[0]-1]+t.seq1,seq2:this.sequence2[t.pos[1]-1]+t.seq2}),r[1]&&e.push({pos:[t.pos[0]-1,t.pos[1]],seq1:this.sequence1[t.pos[0]-1]+t.seq1,seq2:"-"+t.seq2}),r[2]&&e.push({pos:[t.pos[0],t.pos[1]-1],seq1:"-"+t.seq1,seq2:this.sequence2[t.pos[1]-1]+t.seq2}),0===t.pos[0]&&0===t.pos[1]&&this.alignments.push({sequence1:t.seq1,sequence2:t.seq2}),e.shift()}return this.alignments},"alignmentTraceback")},{key:"getAllIndexes",value:mt(function(e,t){for(var r=[],n=-1;-1!==(n=e.indexOf(t,n+1));)r.push(n);return r},"getAllIndexes")},{key:"arrayAllMaxIndexes",value:mt(function(e){return this.getAllIndexes(e,Math.max.apply(null,e))},"arrayAllMaxIndexes")}],a(n.prototype,i),e.exports=h},function(e,t,r){var n=mt(function(){},"layoutBase");n.FDLayout=r(18),n.FDLayoutConstants=r(4),n.FDLayoutEdge=r(19),n.FDLayoutNode=r(20),n.DimensionD=r(21),n.HashMap=r(22),n.HashSet=r(23),n.IGeometry=r(8),n.IMath=r(9),n.Integer=r(10),n.Point=r(12),n.PointD=r(5),n.RandomSeed=r(16),n.RectangleD=r(13),n.Transform=r(17),n.UniqueIDGeneretor=r(14),n.Quicksort=r(25),n.LinkedList=r(11),n.LGraphObject=r(2),n.LGraph=r(6),n.LEdge=r(1),n.LGraphManager=r(7),n.LNode=r(3),n.Layout=r(15),n.LayoutConstants=r(0),n.NeedlemanWunsch=r(27),n.Matrix=r(24),n.SVD=r(26),e.exports=n},function(e,t,r){function n(){this.listeners=[]}mt(n,"Emitter");var i=n.prototype;i.addListener=function(e,t){this.listeners.push({event:e,callback:t})},i.removeListener=function(e,t){for(var r=this.listeners.length;0<=r;r--){var n=this.listeners[r];n.event===e&&n.callback===t&&this.listeners.splice(r,1)}},i.emit=function(e,t){for(var r=0;r<this.listeners.length;r++){var n=this.listeners[r];e===n.event&&n.callback(t)}},e.exports=n}],i={},mt(n,"__webpack_require__"),n.m=r,n.c=i,n.i=function(e){return e},n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.n=function(e){var t=e&&e.__esModule?mt(function(){return e.default},"getDefault"):mt(function(){return e},"getModuleExports");return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=28);function n(e){var t;return(i[e]||(t=i[e]={i:e,l:!1,exports:{}},r[e].call(t.exports,t,t.exports,n),t.l=!0,t)).exports}var r,i})}),V$e=NFe((r,n)=>{mt(function(e,t){"object"==typeof r&&"object"==typeof n?n.exports=t(H$e()):"function"==typeof define&&define.amd?define(["layout-base"],t):"object"==typeof r?r.coseBase=t(H$e()):e.coseBase=t(e.layoutBase)},"webpackUniversalModuleDefinition")(r,function(t){return n={45:(e,t,r)=>{var n={};n.layoutBase=r(551),n.CoSEConstants=r(806),n.CoSEEdge=r(767),n.CoSEGraph=r(880),n.CoSEGraphManager=r(578),n.CoSELayout=r(765),n.CoSENode=r(991),n.ConstraintHandler=r(902),e.exports=n},806:(e,t,r)=>{var n,i=r(551).FDLayoutConstants;function a(){}for(n in mt(a,"CoSEConstants"),i)a[n]=i[n];a.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,a.DEFAULT_RADIAL_SEPARATION=i.DEFAULT_EDGE_LENGTH,a.DEFAULT_COMPONENT_SEPERATION=60,a.TILE=!0,a.TILING_PADDING_VERTICAL=10,a.TILING_PADDING_HORIZONTAL=10,a.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,a.ENFORCE_CONSTRAINTS=!0,a.APPLY_LAYOUT=!0,a.RELAX_MOVEMENT_ON_CONSTRAINTS=!0,a.TREE_REDUCTION_ON_INCREMENTAL=!0,a.PURE_INCREMENTAL=a.DEFAULT_INCREMENTAL,e.exports=a},767:(e,t,r)=>{var n,i=r(551).FDLayoutEdge;function a(e,t,r){i.call(this,e,t,r)}for(n in mt(a,"CoSEEdge"),a.prototype=Object.create(i.prototype),i)a[n]=i[n];e.exports=a},880:(e,t,r)=>{var n,i=r(551).LGraph;function a(e,t,r){i.call(this,e,t,r)}for(n in mt(a,"CoSEGraph"),a.prototype=Object.create(i.prototype),i)a[n]=i[n];e.exports=a},578:(e,t,r)=>{var n,i=r(551).LGraphManager;function a(e){i.call(this,e)}for(n in mt(a,"CoSEGraphManager"),a.prototype=Object.create(i.prototype),i)a[n]=i[n];e.exports=a},765:(e,t,r)=>{var n,i=r(551).FDLayout,a=r(578),s=r(880),h=r(991),o=r(767),f=r(806),l=r(902),m=r(551).FDLayoutConstants,u=r(551).LayoutConstants,d=r(551).Point,p=r(551).PointD,c=r(551).DimensionD,g=r(551).Layout,y=r(551).Integer,v=r(551).IGeometry,x=r(551).LGraph,b=r(551).Transform,w=r(551).LinkedList;function k(){i.call(this),this.toBeTiled={},this.constraints={}}for(n in mt(k,"CoSELayout"),k.prototype=Object.create(i.prototype),i)k[n]=i[n];k.prototype.newGraphManager=function(){var e=new a(this);return this.graphManager=e},k.prototype.newGraph=function(e){return new s(null,this.graphManager,e)},k.prototype.newNode=function(e){return new h(this.graphManager,e)},k.prototype.newEdge=function(e){return new o(null,null,e)},k.prototype.initParameters=function(){i.prototype.initParameters.call(this,arguments),this.isSubLayout||(f.DEFAULT_EDGE_LENGTH<10?this.idealEdgeLength=10:this.idealEdgeLength=f.DEFAULT_EDGE_LENGTH,this.useSmartIdealEdgeLengthCalculation=f.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.gravityConstant=m.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=m.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=m.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=m.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.prunedNodesAll=[],this.growTreeIterations=0,this.afterGrowthIterations=0,this.isTreeGrowing=!1,this.isGrowthFinished=!1)},k.prototype.initSpringEmbedder=function(){i.prototype.initSpringEmbedder.call(this),this.coolingCycle=0,this.maxCoolingCycle=this.maxIterations/m.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=.04,this.coolingAdjuster=1},k.prototype.layout=function(){return u.DEFAULT_CREATE_BENDS_AS_NEEDED&&(this.createBendpoints(),this.graphManager.resetAllEdges()),this.level=0,this.classicLayout()},k.prototype.classicLayout=function(){var e,t,r;return this.nodesWithGravity=this.calculateNodesToApplyGravitationTo(),this.graphManager.setAllNodesToApplyGravitation(this.nodesWithGravity),this.calcNoOfChildrenForAllNodes(),this.graphManager.calcLowestCommonAncestors(),this.graphManager.calcInclusionTreeDepths(),this.graphManager.getRoot().calcEstimatedSize(),this.calcIdealEdgeLengths(),this.incremental?f.TREE_REDUCTION_ON_INCREMENTAL&&(this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation(),t=new Set(this.getAllNodes()),r=this.nodesWithGravity.filter(function(e){return t.has(e)}),this.graphManager.setAllNodesToApplyGravitation(r)):0<(e=this.getFlatForest()).length?this.positionNodesRadially(e):(this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation(),t=new Set(this.getAllNodes()),r=this.nodesWithGravity.filter(function(e){return t.has(e)}),this.graphManager.setAllNodesToApplyGravitation(r),this.positionNodesRandomly()),0<Object.keys(this.constraints).length&&(l.handleConstraints(this),this.initConstraintVariables()),this.initSpringEmbedder(),f.APPLY_LAYOUT&&this.runSpringEmbedder(),!0},k.prototype.tick=function(){if(this.totalIterations++,this.totalIterations===this.maxIterations&&!this.isTreeGrowing&&!this.isGrowthFinished){if(!(0<this.prunedNodesAll.length))return!0;this.isTreeGrowing=!0}if(this.totalIterations%m.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged()){if(!(0<this.prunedNodesAll.length))return!0;this.isTreeGrowing=!0}this.coolingCycle++,0==this.layoutQuality?this.coolingAdjuster=this.coolingCycle:1==this.layoutQuality&&(this.coolingAdjuster=this.coolingCycle/3),this.coolingFactor=Math.max(this.initialCoolingFactor-Math.pow(this.coolingCycle,Math.log(100*(this.initialCoolingFactor-this.finalTemperature))/Math.log(this.maxCoolingCycle))/100*this.coolingAdjuster,this.finalTemperature),this.animationPeriod=Math.ceil(this.initialAnimationPeriod*Math.sqrt(this.coolingFactor))}var t;if(this.isTreeGrowing&&(this.growTreeIterations%10==0&&(0<this.prunedNodesAll.length?(this.graphManager.updateBounds(),this.updateGrid(),this.growTree(this.prunedNodesAll),this.graphManager.resetAllNodesToApplyGravitation(),t=new Set(this.getAllNodes()),e=this.nodesWithGravity.filter(function(e){return t.has(e)}),this.graphManager.setAllNodesToApplyGravitation(e),this.graphManager.updateBounds(),this.updateGrid(),f.PURE_INCREMENTAL?this.coolingFactor=m.DEFAULT_COOLING_FACTOR_INCREMENTAL/2:this.coolingFactor=m.DEFAULT_COOLING_FACTOR_INCREMENTAL):(this.isTreeGrowing=!1,this.isGrowthFinished=!0)),this.growTreeIterations++),this.isGrowthFinished){if(this.isConverged())return!0;this.afterGrowthIterations%10==0&&(this.graphManager.updateBounds(),this.updateGrid()),f.PURE_INCREMENTAL?this.coolingFactor=m.DEFAULT_COOLING_FACTOR_INCREMENTAL/2*((100-this.afterGrowthIterations)/100):this.coolingFactor=m.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var e=!this.isTreeGrowing&&!this.isGrowthFinished,r=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(e,r),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},k.prototype.getPositionsData=function(){for(var e=this.graphManager.getAllNodes(),t={},r=0;r<e.length;r++){var n=e[r].rect,i=e[r].id;t[i]={id:i,x:n.getCenterX(),y:n.getCenterY(),w:n.width,h:n.height}}return t},k.prototype.runSpringEmbedder=function(){this.initialAnimationPeriod=25,this.animationPeriod=this.initialAnimationPeriod;var e=!1;if("during"===m.ANIMATE)this.emit("layoutstarted");else{for(;!e;)e=this.tick();this.graphManager.updateBounds()}},k.prototype.moveNodes=function(){for(var e=this.getAllNodes(),t=0;t<e.length;t++)e[t].calculateDisplacement();for(0<Object.keys(this.constraints).length&&this.updateDisplacements(),t=0;t<e.length;t++)e[t].move()},k.prototype.initConstraintVariables=function(){var s=this;this.idToNodeMap=new Map,this.fixedNodeSet=new Set;for(var e=this.graphManager.getAllNodes(),t=0;t<e.length;t++){var r=e[t];this.idToNodeMap.set(r.id,r)}var n=mt(function e(t){for(var r,n=t.getChild().getNodes(),i=0,a=0;a<n.length;a++)null==(r=n[a]).getChild()?s.fixedNodeSet.has(r.id)&&(i+=100):i+=e(r);return i},"calculateCompoundWeight");if(this.constraints.fixedNodeConstraint){this.constraints.fixedNodeConstraint.forEach(function(e){s.fixedNodeSet.add(e.nodeId)});for(var i,e=this.graphManager.getAllNodes(),t=0;t<e.length;t++)null!=(r=e[t]).getChild()&&0<(i=n(r))&&(r.fixedNodeWeight=i)}if(this.constraints.relativePlacementConstraint){var a,o,l,c,h=new Map,u=new Map;if(this.dummyToNodeForVerticalAlignment=new Map,this.dummyToNodeForHorizontalAlignment=new Map,this.fixedNodesOnHorizontal=new Set,this.fixedNodesOnVertical=new Set,this.fixedNodeSet.forEach(function(e){s.fixedNodesOnHorizontal.add(e),s.fixedNodesOnVertical.add(e)}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var d=this.constraints.alignmentConstraint.vertical,t=0;t<d.length;t++)this.dummyToNodeForVerticalAlignment.set("dummy"+t,[]),d[t].forEach(function(e){h.set(e,"dummy"+t),s.dummyToNodeForVerticalAlignment.get("dummy"+t).push(e),s.fixedNodeSet.has(e)&&s.fixedNodesOnHorizontal.add("dummy"+t)});if(this.constraints.alignmentConstraint.horizontal)for(var p=this.constraints.alignmentConstraint.horizontal,t=0;t<p.length;t++)this.dummyToNodeForHorizontalAlignment.set("dummy"+t,[]),p[t].forEach(function(e){u.set(e,"dummy"+t),s.dummyToNodeForHorizontalAlignment.get("dummy"+t).push(e),s.fixedNodeSet.has(e)&&s.fixedNodesOnVertical.add("dummy"+t)})}f.RELAX_MOVEMENT_ON_CONSTRAINTS?(this.shuffle=function(e){for(var t,r,n=e.length-1;n>=2*e.length/3;n--)t=Math.floor(Math.random()*(n+1)),r=e[n],e[n]=e[t],e[t]=r;return e},this.nodesInRelativeHorizontal=[],this.nodesInRelativeVertical=[],this.nodeToRelativeConstraintMapHorizontal=new Map,this.nodeToRelativeConstraintMapVertical=new Map,this.nodeToTempPositionMapHorizontal=new Map,this.nodeToTempPositionMapVertical=new Map,this.constraints.relativePlacementConstraint.forEach(function(e){var t,r;e.left?(r=h.has(e.left)?h.get(e.left):e.left,t=h.has(e.right)?h.get(e.right):e.right,s.nodesInRelativeHorizontal.includes(r)||(s.nodesInRelativeHorizontal.push(r),s.nodeToRelativeConstraintMapHorizontal.set(r,[]),s.dummyToNodeForVerticalAlignment.has(r)?s.nodeToTempPositionMapHorizontal.set(r,s.idToNodeMap.get(s.dummyToNodeForVerticalAlignment.get(r)[0]).getCenterX()):s.nodeToTempPositionMapHorizontal.set(r,s.idToNodeMap.get(r).getCenterX())),s.nodesInRelativeHorizontal.includes(t)||(s.nodesInRelativeHorizontal.push(t),s.nodeToRelativeConstraintMapHorizontal.set(t,[]),s.dummyToNodeForVerticalAlignment.has(t)?s.nodeToTempPositionMapHorizontal.set(t,s.idToNodeMap.get(s.dummyToNodeForVerticalAlignment.get(t)[0]).getCenterX()):s.nodeToTempPositionMapHorizontal.set(t,s.idToNodeMap.get(t).getCenterX())),s.nodeToRelativeConstraintMapHorizontal.get(r).push({right:t,gap:e.gap}),s.nodeToRelativeConstraintMapHorizontal.get(t).push({left:r,gap:e.gap})):(t=u.has(e.top)?u.get(e.top):e.top,r=u.has(e.bottom)?u.get(e.bottom):e.bottom,s.nodesInRelativeVertical.includes(t)||(s.nodesInRelativeVertical.push(t),s.nodeToRelativeConstraintMapVertical.set(t,[]),s.dummyToNodeForHorizontalAlignment.has(t)?s.nodeToTempPositionMapVertical.set(t,s.idToNodeMap.get(s.dummyToNodeForHorizontalAlignment.get(t)[0]).getCenterY()):s.nodeToTempPositionMapVertical.set(t,s.idToNodeMap.get(t).getCenterY())),s.nodesInRelativeVertical.includes(r)||(s.nodesInRelativeVertical.push(r),s.nodeToRelativeConstraintMapVertical.set(r,[]),s.dummyToNodeForHorizontalAlignment.has(r)?s.nodeToTempPositionMapVertical.set(r,s.idToNodeMap.get(s.dummyToNodeForHorizontalAlignment.get(r)[0]).getCenterY()):s.nodeToTempPositionMapVertical.set(r,s.idToNodeMap.get(r).getCenterY())),s.nodeToRelativeConstraintMapVertical.get(t).push({bottom:r,gap:e.gap}),s.nodeToRelativeConstraintMapVertical.get(r).push({top:t,gap:e.gap}))})):(a=new Map,o=new Map,this.constraints.relativePlacementConstraint.forEach(function(e){var t,r;e.left?(r=h.has(e.left)?h.get(e.left):e.left,t=h.has(e.right)?h.get(e.right):e.right,a.has(r)?a.get(r).push(t):a.set(r,[t]),a.has(t)?a.get(t).push(r):a.set(t,[r])):(t=u.has(e.top)?u.get(e.top):e.top,r=u.has(e.bottom)?u.get(e.bottom):e.bottom,o.has(t)?o.get(t).push(r):o.set(t,[r]),o.has(r)?o.get(r).push(t):o.set(r,[t]))}),c=(l=mt(function(n,i){var a=[],s=[],o=new w,l=new Set,c=0;return n.forEach(function(e,t){if(!l.has(t)){for(a[c]=[],s[c]=!1,o.push(r=t),l.add(r),a[c].push(r);0!=o.length;){var r=o.shift();i.has(r)&&(s[c]=!0),n.get(r).forEach(function(e){l.has(e)||(o.push(e),l.add(e),a[c].push(e))})}c++}}),{components:a,isFixed:s}},"constructComponents"))(a,s.fixedNodesOnHorizontal),this.componentsOnHorizontal=c.components,this.fixedComponentsOnHorizontal=c.isFixed,c=l(o,s.fixedNodesOnVertical),this.componentsOnVertical=c.components,this.fixedComponentsOnVertical=c.isFixed)}},k.prototype.updateDisplacements=function(){var i=this;if(this.constraints.fixedNodeConstraint&&this.constraints.fixedNodeConstraint.forEach(function(e){(e=i.idToNodeMap.get(e.nodeId)).displacementX=0,e.displacementY=0}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var e=this.constraints.alignmentConstraint.vertical,t=0;t<e.length;t++){for(var r=0,n=0;n<e[t].length;n++){if(this.fixedNodeSet.has(e[t][n])){r=0;break}r+=this.idToNodeMap.get(e[t][n]).displacementX}for(var a=r/e[t].length,n=0;n<e[t].length;n++)this.idToNodeMap.get(e[t][n]).displacementX=a}if(this.constraints.alignmentConstraint.horizontal)for(var s=this.constraints.alignmentConstraint.horizontal,t=0;t<s.length;t++){for(var o=0,n=0;n<s[t].length;n++){if(this.fixedNodeSet.has(s[t][n])){o=0;break}o+=this.idToNodeMap.get(s[t][n]).displacementY}for(var l=o/s[t].length,n=0;n<s[t].length;n++)this.idToNodeMap.get(s[t][n]).displacementY=l}}if(this.constraints.relativePlacementConstraint)if(f.RELAX_MOVEMENT_ON_CONSTRAINTS)this.totalIterations%10==0&&(this.shuffle(this.nodesInRelativeHorizontal),this.shuffle(this.nodesInRelativeVertical)),this.nodesInRelativeHorizontal.forEach(function(r){var n;i.fixedNodesOnHorizontal.has(r)||(n=0,n=(i.dummyToNodeForVerticalAlignment.has(r)?i.idToNodeMap.get(i.dummyToNodeForVerticalAlignment.get(r)[0]):i.idToNodeMap.get(r)).displacementX,i.nodeToRelativeConstraintMapHorizontal.get(r).forEach(function(e){var t;e.right?(t=i.nodeToTempPositionMapHorizontal.get(e.right)-i.nodeToTempPositionMapHorizontal.get(r)-n)<e.gap&&(n-=e.gap-t):(t=i.nodeToTempPositionMapHorizontal.get(r)-i.nodeToTempPositionMapHorizontal.get(e.left)+n)<e.gap&&(n+=e.gap-t)}),i.nodeToTempPositionMapHorizontal.set(r,i.nodeToTempPositionMapHorizontal.get(r)+n),i.dummyToNodeForVerticalAlignment.has(r)?i.dummyToNodeForVerticalAlignment.get(r).forEach(function(e){i.idToNodeMap.get(e).displacementX=n}):i.idToNodeMap.get(r).displacementX=n)}),this.nodesInRelativeVertical.forEach(function(r){var n;i.fixedNodesOnHorizontal.has(r)||(n=0,n=(i.dummyToNodeForHorizontalAlignment.has(r)?i.idToNodeMap.get(i.dummyToNodeForHorizontalAlignment.get(r)[0]):i.idToNodeMap.get(r)).displacementY,i.nodeToRelativeConstraintMapVertical.get(r).forEach(function(e){var t;e.bottom?(t=i.nodeToTempPositionMapVertical.get(e.bottom)-i.nodeToTempPositionMapVertical.get(r)-n)<e.gap&&(n-=e.gap-t):(t=i.nodeToTempPositionMapVertical.get(r)-i.nodeToTempPositionMapVertical.get(e.top)+n)<e.gap&&(n+=e.gap-t)}),i.nodeToTempPositionMapVertical.set(r,i.nodeToTempPositionMapVertical.get(r)+n),i.dummyToNodeForHorizontalAlignment.has(r)?i.dummyToNodeForHorizontalAlignment.get(r).forEach(function(e){i.idToNodeMap.get(e).displacementY=n}):i.idToNodeMap.get(r).displacementY=n)});else{for(t=0;t<this.componentsOnHorizontal.length;t++){var c=this.componentsOnHorizontal[t];if(this.fixedComponentsOnHorizontal[t])for(n=0;n<c.length;n++)this.dummyToNodeForVerticalAlignment.has(c[n])?this.dummyToNodeForVerticalAlignment.get(c[n]).forEach(function(e){i.idToNodeMap.get(e).displacementX=0}):this.idToNodeMap.get(c[n]).displacementX=0;else{for(var h=0,u=0,n=0;n<c.length;n++)this.dummyToNodeForVerticalAlignment.has(c[n])?(h+=(p=this.dummyToNodeForVerticalAlignment.get(c[n])).length*this.idToNodeMap.get(p[0]).displacementX,u+=p.length):(h+=this.idToNodeMap.get(c[n]).displacementX,u++);for(var d=h/u,n=0;n<c.length;n++)this.dummyToNodeForVerticalAlignment.has(c[n])?this.dummyToNodeForVerticalAlignment.get(c[n]).forEach(function(e){i.idToNodeMap.get(e).displacementX=d}):this.idToNodeMap.get(c[n]).displacementX=d}}for(t=0;t<this.componentsOnVertical.length;t++)if(c=this.componentsOnVertical[t],this.fixedComponentsOnVertical[t])for(n=0;n<c.length;n++)this.dummyToNodeForHorizontalAlignment.has(c[n])?this.dummyToNodeForHorizontalAlignment.get(c[n]).forEach(function(e){i.idToNodeMap.get(e).displacementY=0}):this.idToNodeMap.get(c[n]).displacementY=0;else{for(var p,h=0,u=0,n=0;n<c.length;n++)this.dummyToNodeForHorizontalAlignment.has(c[n])?(h+=(p=this.dummyToNodeForHorizontalAlignment.get(c[n])).length*this.idToNodeMap.get(p[0]).displacementY,u+=p.length):(h+=this.idToNodeMap.get(c[n]).displacementY,u++);for(d=h/u,n=0;n<c.length;n++)this.dummyToNodeForHorizontalAlignment.has(c[n])?this.dummyToNodeForHorizontalAlignment.get(c[n]).forEach(function(e){i.idToNodeMap.get(e).displacementY=d}):this.idToNodeMap.get(c[n]).displacementY=d}}},k.prototype.calculateNodesToApplyGravitationTo=function(){for(var e,t=[],r=this.graphManager.getGraphs(),n=r.length,i=0;i<n;i++)(e=r[i]).updateConnected(),e.isConnected||(t=t.concat(e.getNodes()));return t},k.prototype.createBendpoints=function(){for(var e=(e=[]).concat(this.graphManager.getAllEdges()),t=new Set,r=0;r<e.length;r++){var n=e[r];if(!t.has(n)){var i=n.getSource(),a=n.getTarget();if(i==a)n.getBendpoints().push(new p),n.getBendpoints().push(new p),this.createDummyNodesForBendpoints(n),t.add(n);else{var s=(s=(s=[]).concat(i.getEdgeListToNode(a))).concat(a.getEdgeListToNode(i));if(!t.has(s[0])){if(1<s.length)for(var o=0;o<s.length;o++){var l=s[o];l.getBendpoints().push(new p),this.createDummyNodesForBendpoints(l)}s.forEach(function(e){t.add(e)})}}}if(t.size==e.length)break}},k.prototype.positionNodesRadially=function(e){for(var t=new d(0,0),r=Math.ceil(Math.sqrt(e.length)),n=0,i=0,a=0,s=new p(0,0),o=0;o<e.length;o++){o%r==0&&(i=n,(a=0)!=o&&(i+=f.DEFAULT_COMPONENT_SEPERATION),n=0);var l=e[o],c=g.findCenterOfTree(l);t.x=a,t.y=i,(s=k.radialLayout(l,c,t)).y>n&&(n=Math.floor(s.y)),a=Math.floor(s.x+f.DEFAULT_COMPONENT_SEPERATION)}this.transform(new p(u.WORLD_CENTER_X-s.x/2,u.WORLD_CENTER_Y-s.y/2))},k.radialLayout=function(e,t,r){var n=Math.max(this.maxDiagonalInTree(e),f.DEFAULT_RADIAL_SEPARATION),t=(k.branchRadialLayout(t,null,0,359,0,n),x.calculateBounds(e)),i=new b;i.setDeviceOrgX(t.getMinX()),i.setDeviceOrgY(t.getMinY()),i.setWorldOrgX(r.x),i.setWorldOrgY(r.y);for(var a=0;a<e.length;a++)e[a].transform(i);return n=new p(t.getMaxX(),t.getMaxY()),i.inverseTransformPoint(n)},k.branchRadialLayout=function(e,t,r,n,i,a){(s=(n-r+1)/2)<0&&(s+=180);var s=(s+r)%360*v.TWO_PI/360,o=(Math.cos(s),i*Math.cos(s)),s=i*Math.sin(s),l=(e.setCenter(o,s),[]),c=(l=l.concat(e.getEdges())).length;null!=t&&c--;for(var h=0,u=l.length,d=e.getEdgesBetween(t);1<d.length;){var p=d[0];d.splice(0,1),0<=(p=l.indexOf(p))&&l.splice(p,1),u--,c--}for(var o=null!=t?(l.indexOf(d[0])+1)%u:0,g=Math.abs(n-r)/c,f=o;h!=c;f=++f%u){var m=l[f].getOtherEnd(e);m!=t&&(k.branchRadialLayout(m,e,m=(r+h*g)%360,(m+g)%360,i+a,a),h++)}},k.maxDiagonalInTree=function(e){for(var t=y.MIN_VALUE,r=0;r<e.length;r++){var n=e[r].getDiagonal();t<n&&(t=n)}return t},k.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},k.prototype.groupZeroDegreeMembers=function(){var l=this,c={};this.memberGroups={},this.idToDummyNode={};for(var e=[],t=this.graphManager.getAllNodes(),r=0;r<t.length;r++){var n=(i=t[r]).getParent();0!==this.getNodeDegreeWithChildren(i)||null!=n.id&&this.getToBeTiled(n)||e.push(i)}for(r=0;r<e.length;r++){var i,a=(i=e[r]).getParent().id;"u"<typeof c[a]&&(c[a]=[]),c[a]=c[a].concat(i)}Object.keys(c).forEach(function(e){if(1<c[e].length){var t="DummyCompound_"+e,r=(l.memberGroups[t]=c[e],c[e][0].getParent()),n=new h(l.graphManager),i=(n.id=t,n.paddingLeft=r.paddingLeft||0,n.paddingRight=r.paddingRight||0,n.paddingBottom=r.paddingBottom||0,n.paddingTop=r.paddingTop||0,l.idToDummyNode[t]=n,l.getGraphManager().add(l.newGraph(),n)),a=r.getChild();a.add(n);for(var s=0;s<c[e].length;s++){var o=c[e][s];a.remove(o),i.add(o)}}})},k.prototype.clearCompounds=function(){var e={},t={};this.performDFSOnCompounds();for(var r=0;r<this.compoundOrder.length;r++)t[this.compoundOrder[r].id]=this.compoundOrder[r],e[this.compoundOrder[r].id]=[].concat(this.compoundOrder[r].getChild().getNodes()),this.graphManager.remove(this.compoundOrder[r].getChild()),this.compoundOrder[r].child=null;this.graphManager.resetAllNodes(),this.tileCompoundMembers(e,t)},k.prototype.clearZeroDegreeMembers=function(){var n=this,i=this.tiledZeroDegreePack=[];Object.keys(this.memberGroups).forEach(function(e){var t,r=n.idToDummyNode[e];i[e]=n.tileNodes(n.memberGroups[e],r.paddingLeft+r.paddingRight),r.rect.width=i[e].width,r.rect.height=i[e].height,r.setCenter(i[e].centerX,i[e].centerY),r.labelMarginLeft=0,r.labelMarginTop=0,f.NODE_DIMENSIONS_INCLUDE_LABELS&&(e=r.rect.width,t=r.rect.height,r.labelWidth&&("left"==r.labelPosHorizontal?(r.rect.x-=r.labelWidth,r.setWidth(e+r.labelWidth),r.labelMarginLeft=r.labelWidth):"center"==r.labelPosHorizontal&&r.labelWidth>e?(r.rect.x-=(r.labelWidth-e)/2,r.setWidth(r.labelWidth),r.labelMarginLeft=(r.labelWidth-e)/2):"right"==r.labelPosHorizontal&&r.setWidth(e+r.labelWidth)),r.labelHeight)&&("top"==r.labelPosVertical?(r.rect.y-=r.labelHeight,r.setHeight(t+r.labelHeight),r.labelMarginTop=r.labelHeight):"center"==r.labelPosVertical&&r.labelHeight>t?(r.rect.y-=(r.labelHeight-t)/2,r.setHeight(r.labelHeight),r.labelMarginTop=(r.labelHeight-t)/2):"bottom"==r.labelPosVertical&&r.setHeight(t+r.labelHeight))})},k.prototype.repopulateCompounds=function(){for(var e=this.compoundOrder.length-1;0<=e;e--){var t=this.compoundOrder[e],r=t.id;this.adjustLocations(this.tiledMemberPack[r],t.rect.x,t.rect.y,t.paddingLeft,t.paddingTop,t.labelMarginLeft,t.labelMarginTop)}},k.prototype.repopulateZeroDegreeMembers=function(){var n=this,i=this.tiledZeroDegreePack;Object.keys(i).forEach(function(e){var t=n.idToDummyNode[e],r=t.paddingLeft;n.adjustLocations(i[e],t.rect.x,t.rect.y,r,t.paddingTop,t.labelMarginLeft,t.labelMarginTop)})},k.prototype.getToBeTiled=function(e){var t=e.id;if(null!=this.toBeTiled[t])return this.toBeTiled[t];if(null==(e=e.getChild()))return this.toBeTiled[t]=!1;for(var r=e.getNodes(),n=0;n<r.length;n++){var i=r[n];if(0<this.getNodeDegree(i))return this.toBeTiled[t]=!1;if(null==i.getChild())this.toBeTiled[i.id]=!1;else if(!this.getToBeTiled(i))return this.toBeTiled[t]=!1}return this.toBeTiled[t]=!0},k.prototype.getNodeDegree=function(e){e.id;for(var t=e.getEdges(),r=0,n=0;n<t.length;n++){var i=t[n];i.getSource().id!==i.getTarget().id&&(r+=1)}return r},k.prototype.getNodeDegreeWithChildren=function(e){var t=this.getNodeDegree(e);if(null!=e.getChild())for(var r=e.getChild().getNodes(),n=0;n<r.length;n++){var i=r[n];t+=this.getNodeDegreeWithChildren(i)}return t},k.prototype.performDFSOnCompounds=function(){this.compoundOrder=[],this.fillCompexOrderByDFS(this.graphManager.getRoot().getNodes())},k.prototype.fillCompexOrderByDFS=function(e){for(var t=0;t<e.length;t++){var r=e[t];null!=r.getChild()&&this.fillCompexOrderByDFS(r.getChild().getNodes()),this.getToBeTiled(r)&&this.compoundOrder.push(r)}},k.prototype.adjustLocations=function(e,t,r,n,i,a,s){r+=i+s;for(var o=t+=n+a,l=0;l<e.rows.length;l++){var c=e.rows[l];t=o;for(var h=0,u=0;u<c.length;u++){var d=c[u];d.rect.x=t,d.rect.y=r,t+=d.rect.width+e.horizontalPadding,d.rect.height>h&&(h=d.rect.height)}r+=h+e.verticalPadding}},k.prototype.tileCompoundMembers=function(n,i){var a=this;this.tiledMemberPack=[],Object.keys(n).forEach(function(e){var t,r=i[e];a.tiledMemberPack[e]=a.tileNodes(n[e],r.paddingLeft+r.paddingRight),r.rect.width=a.tiledMemberPack[e].width,r.rect.height=a.tiledMemberPack[e].height,r.setCenter(a.tiledMemberPack[e].centerX,a.tiledMemberPack[e].centerY),r.labelMarginLeft=0,r.labelMarginTop=0,f.NODE_DIMENSIONS_INCLUDE_LABELS&&(e=r.rect.width,t=r.rect.height,r.labelWidth&&("left"==r.labelPosHorizontal?(r.rect.x-=r.labelWidth,r.setWidth(e+r.labelWidth),r.labelMarginLeft=r.labelWidth):"center"==r.labelPosHorizontal&&r.labelWidth>e?(r.rect.x-=(r.labelWidth-e)/2,r.setWidth(r.labelWidth),r.labelMarginLeft=(r.labelWidth-e)/2):"right"==r.labelPosHorizontal&&r.setWidth(e+r.labelWidth)),r.labelHeight)&&("top"==r.labelPosVertical?(r.rect.y-=r.labelHeight,r.setHeight(t+r.labelHeight),r.labelMarginTop=r.labelHeight):"center"==r.labelPosVertical&&r.labelHeight>t?(r.rect.y-=(r.labelHeight-t)/2,r.setHeight(r.labelHeight),r.labelMarginTop=(r.labelHeight-t)/2):"bottom"==r.labelPosVertical&&r.setHeight(t+r.labelHeight))})},k.prototype.tileNodes=function(e,t){var r=this.tileNodesByFavoringDim(e,t,!0),e=this.tileNodesByFavoringDim(e,t,!1),t=this.getOrgRatio(r);return this.getOrgRatio(e)<t?e:r},k.prototype.getOrgRatio=function(e){return(e=e.width/e.height)<1?1/e:e},k.prototype.calcIdealRowWidth=function(e,t){var r,n=f.TILING_PADDING_VERTICAL,i=f.TILING_PADDING_HORIZONTAL,a=e.length,s=0,o=0,l=0,e=(e.forEach(function(e){s+=e.getWidth(),o+=e.getHeight(),e.getWidth()>l&&(l=e.getWidth())}),s/a),c=o/a,c=Math.pow(n-i,2)+4*(e+i)*(c+n)*a,a=(i-n+Math.sqrt(c))/(2*(e+i));return t?(r=Math.ceil(a))==a&&r++:r=Math.floor(a),((n=r*(e+i)-i)<l?l:n)+2*i},k.prototype.tileNodesByFavoringDim=function(e,t,r){var n=f.TILING_PADDING_VERTICAL,i=f.TILING_PADDING_HORIZONTAL,a=f.TILING_COMPARE_BY,s={rows:[],rowWidth:[],rowHeight:[],width:0,height:t,verticalPadding:n,horizontalPadding:i,centerX:0,centerY:0},o=(a&&(s.idealRowWidth=this.calcIdealRowWidth(e,r)),mt(function(e){return e.rect.width*e.rect.height},"getNodeArea")),l=mt(function(e,t){return o(t)-o(e)},"areaCompareFcn");e.sort(function(e,t){var r=l;return s.idealRowWidth?(r=a)(e.id,t.id):r(e,t)});for(var c=0,h=0,u=0;u<e.length;u++)c+=(p=e[u]).getCenterX(),h+=p.getCenterY();for(s.centerX=c/e.length,s.centerY=h/e.length,u=0;u<e.length;u++){var d,p=e[u];0==s.rows.length?this.insertNodeToRow(s,p,0,t):this.canAddHorizontal(s,p.rect.width,p.rect.height)?(d=s.rows.length-1,s.idealRowWidth||(d=this.getShortestRowIndex(s)),this.insertNodeToRow(s,p,d,t)):this.insertNodeToRow(s,p,s.rows.length,t),this.shiftToLastRow(s)}return s},k.prototype.insertNodeToRow=function(e,t,r,n){r==e.rows.length&&(e.rows.push([]),e.rowWidth.push(n),e.rowHeight.push(0));var n=e.rowWidth[r]+t.rect.width,n=(0<e.rows[r].length&&(n+=e.horizontalPadding),e.rowWidth[r]=n,e.width<n&&(e.width=n),t.rect.height),i=(0<r&&(n+=e.verticalPadding),0);n>e.rowHeight[r]&&(i=e.rowHeight[r],e.rowHeight[r]=n,i=e.rowHeight[r]-i),e.height+=i,e.rows[r].push(t)},k.prototype.getShortestRowIndex=function(e){for(var t=-1,r=Number.MAX_VALUE,n=0;n<e.rows.length;n++)e.rowWidth[n]<r&&(t=n,r=e.rowWidth[n]);return t},k.prototype.getLongestRowIndex=function(e){for(var t=-1,r=Number.MIN_VALUE,n=0;n<e.rows.length;n++)e.rowWidth[n]>r&&(t=n,r=e.rowWidth[n]);return t},k.prototype.canAddHorizontal=function(e,t,r){var n,i,a;return e.idealRowWidth?(i=e.rows.length-1,e.rowWidth[i]+t+e.horizontalPadding<=e.idealRowWidth):(i=this.getShortestRowIndex(e))<0||(a=e.rowWidth[i])+e.horizontalPadding+t<=e.width||(n=0,e.rowHeight[i]<r&&0<i&&(n=r+e.verticalPadding-e.rowHeight[i]),i=t+e.horizontalPadding<=e.width-a?(e.height+n)/(a+t+e.horizontalPadding):(e.height+n)/e.width,n=r+e.verticalPadding,(i=i<1?1/i:i)<((a=e.width<t?(e.height+n)/t:(e.height+n)/e.width)<1?1/a:a))},k.prototype.shiftToLastRow=function(e){var t=this.getLongestRowIndex(e),r=e.rowWidth.length-1,n=e.rows[t],i=n[n.length-1],a=i.width+e.horizontalPadding;if(e.width-e.rowWidth[r]>a&&t!=r){n.splice(-1,1),e.rows[r].push(i),e.rowWidth[t]=e.rowWidth[t]-a,e.rowWidth[r]=e.rowWidth[r]+a,e.width=e.rowWidth[instance.getLongestRowIndex(e)];for(var s=Number.MIN_VALUE,o=0;o<n.length;o++)n[o].height>s&&(s=n[o].height);0<t&&(s+=e.verticalPadding),a=e.rowHeight[t]+e.rowHeight[r],e.rowHeight[t]=s,e.rowHeight[r]<i.height+e.verticalPadding&&(e.rowHeight[r]=i.height+e.verticalPadding),i=e.rowHeight[t]+e.rowHeight[r],e.height+=i-a,this.shiftToLastRow(e)}},k.prototype.tilingPreLayout=function(){f.TILE&&(this.groupZeroDegreeMembers(),this.clearCompounds(),this.clearZeroDegreeMembers())},k.prototype.tilingPostLayout=function(){f.TILE&&(this.repopulateZeroDegreeMembers(),this.repopulateCompounds())},k.prototype.reduceTrees=function(){for(var e=[],t=!0;t;){for(var r,n,i=this.graphManager.getAllNodes(),a=[],t=!1,s=0;s<i.length;s++)1!=(n=i[s]).getEdges().length||n.getEdges()[0].isInterGraph||null!=n.getChild()||(f.PURE_INCREMENTAL?(r=n.getEdges()[0].getOtherEnd(n),r=new c(n.getCenterX()-r.getCenterX(),n.getCenterY()-r.getCenterY()),a.push([n,n.getEdges()[0],n.getOwner(),r])):a.push([n,n.getEdges()[0],n.getOwner()]),t=!0);if(1==t){for(var o=[],l=0;l<a.length;l++)1==a[l][0].getEdges().length&&(o.push(a[l]),a[l][0].getOwner().remove(a[l][0]));e.push(o),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()}}this.prunedNodesAll=e},k.prototype.growTree=function(e){for(var t,r=e[e.length-1],n=0;n<r.length;n++)t=r[n],this.findPlaceforPrunedNode(t),t[2].add(t[0]),t[2].add(t[1],t[1].source,t[1].target);e.splice(e.length-1,1),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()},k.prototype.findPlaceforPrunedNode=function(e){var t=e[0],r=t==e[1].source?e[1].target:e[1].source;if(f.PURE_INCREMENTAL)t.setCenter(r.getCenterX()+e[3].getWidth(),r.getCenterY()+e[3].getHeight());else{var n=r.startX,i=r.finishX,a=r.startY,s=r.finishY,o=[0,0,0,0];if(0<a)for(var l=n;l<=i;l++)o[0]+=this.grid[l][a-1].length+this.grid[l][a].length-1;if(i<this.grid.length-1)for(l=a;l<=s;l++)o[1]+=this.grid[i+1][l].length+this.grid[i][l].length-1;if(s<this.grid[0].length-1)for(l=n;l<=i;l++)o[2]+=this.grid[l][s+1].length+this.grid[l][s].length-1;if(0<n)for(l=a;l<=s;l++)o[3]+=this.grid[n-1][l].length+this.grid[n][l].length-1;for(var c,h,u,d,p=y.MAX_VALUE,g=0;g<o.length;g++)o[g]<p?(p=o[g],c=1,h=g):o[g]==p&&c++;3==c&&0==p?0==o[0]&&0==o[1]&&0==o[2]?u=1:0==o[0]&&0==o[1]&&0==o[3]?u=0:0==o[0]&&0==o[2]&&0==o[3]?u=3:0==o[1]&&0==o[2]&&0==o[3]&&(u=2):u=2==c&&0==p?(d=Math.floor(2*Math.random()),0==o[0]&&0==o[1]?0==d?0:1:0==o[0]&&0==o[2]?0==d?0:2:0==o[0]&&0==o[3]?0==d?0:3:0==o[1]&&0==o[2]?0==d?1:2:0==o[1]&&0==o[3]?0==d?1:3:0==d?2:3):4==c&&0==p?d=Math.floor(4*Math.random()):h,0==u?t.setCenter(r.getCenterX(),r.getCenterY()-r.getHeight()/2-m.DEFAULT_EDGE_LENGTH-t.getHeight()/2):1==u?t.setCenter(r.getCenterX()+r.getWidth()/2+m.DEFAULT_EDGE_LENGTH+t.getWidth()/2,r.getCenterY()):2==u?t.setCenter(r.getCenterX(),r.getCenterY()+r.getHeight()/2+m.DEFAULT_EDGE_LENGTH+t.getHeight()/2):t.setCenter(r.getCenterX()-r.getWidth()/2-m.DEFAULT_EDGE_LENGTH-t.getWidth()/2,r.getCenterY())}},e.exports=k},991:(e,t,r)=>{var n,i=r(551).FDLayoutNode,a=r(551).IMath;function s(e,t,r,n){i.call(this,e,t,r,n)}for(n in mt(s,"CoSENode"),s.prototype=Object.create(i.prototype),i)s[n]=i[n];s.prototype.calculateDisplacement=function(){var e=this.graphManager.getLayout();null!=this.getChild()&&this.fixedNodeWeight?(this.displacementX+=e.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.fixedNodeWeight,this.displacementY+=e.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.fixedNodeWeight):(this.displacementX+=e.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY+=e.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren),Math.abs(this.displacementX)>e.coolingFactor*e.maxNodeDisplacement&&(this.displacementX=e.coolingFactor*e.maxNodeDisplacement*a.sign(this.displacementX)),Math.abs(this.displacementY)>e.coolingFactor*e.maxNodeDisplacement&&(this.displacementY=e.coolingFactor*e.maxNodeDisplacement*a.sign(this.displacementY)),this.child&&0<this.child.getNodes().length&&this.propogateDisplacementToChildren(this.displacementX,this.displacementY)},s.prototype.propogateDisplacementToChildren=function(e,t){for(var r,n=this.getChild().getNodes(),i=0;i<n.length;i++)null==(r=n[i]).getChild()?(r.displacementX+=e,r.displacementY+=t):r.propogateDisplacementToChildren(e,t)},s.prototype.move=function(){var e=this.graphManager.getLayout();null!=this.child&&0!=this.child.getNodes().length||(this.moveBy(this.displacementX,this.displacementY),e.totalDisplacement+=Math.abs(this.displacementX)+Math.abs(this.displacementY)),this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0},s.prototype.setPred1=function(e){this.pred1=e},s.prototype.getPred1=function(){return pred1},s.prototype.getPred2=function(){return pred2},s.prototype.setNext=function(e){this.next=e},s.prototype.getNext=function(){return next},s.prototype.setProcessed=function(e){this.processed=e},s.prototype.isProcessed=function(){return processed},e.exports=s},902:(e,t,r)=>{function Pe(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];return r}return Array.from(e)}mt(Pe,"_toConsumableArray");var Be=r(806),$e=r(551).LinkedList,Fe=r(551).Matrix,ze=r(551).SVD;function n(){}mt(n,"ConstraintHandler"),n.handleConstraints=function(e){var t={};t.fixedNodeConstraint=e.constraints.fixedNodeConstraint,t.alignmentConstraint=e.constraints.alignmentConstraint,t.relativePlacementConstraint=e.constraints.relativePlacementConstraint;for(var r=new Map,k=new Map,T=[],E=[],n=e.getAllNodes(),P=0,i=0;i<n.length;i++){var a=n[i];null==a.getChild()&&(k.set(a.id,P++),T.push(a.getCenterX()),E.push(a.getCenterY()),r.set(a.id,a))}t.relativePlacementConstraint&&t.relativePlacementConstraint.forEach(function(e){e.gap||0==e.gap||(e.left?e.gap=Be.DEFAULT_EDGE_LENGTH+r.get(e.left).getWidth()/2+r.get(e.right).getWidth()/2:e.gap=Be.DEFAULT_EDGE_LENGTH+r.get(e.top).getHeight()/2+r.get(e.bottom).getHeight()/2)});var s,B=mt(function(e,t){return{x:e.x-t.x,y:e.y-t.y}},"calculatePositionDiff"),o=mt(function(e){var t=0,r=0;return e.forEach(function(e){t+=T[k.get(e)],r+=E[k.get(e)]}),{x:t/e.size,y:r/e.size}},"calculateAvgPosition"),e=mt(function(e,x,h,b,t){function i(e,t){var r=new Set(e),n=!0,e=!1,i=void 0;try{for(var a,s=t[Symbol.iterator]();!(n=(a=s.next()).done);n=!0){var o=a.value;r.add(o)}}catch(t){e=!0,i=t}finally{try{!n&&s.return&&s.return()}finally{if(e)throw i}}return r}mt(i,"setUnion");var a=new Map,w=(e.forEach(function(e,t){a.set(t,0)}),e.forEach(function(e,t){e.forEach(function(e){a.set(e.id,a.get(e.id)+1)})}),new Map),s=new Map,o=new $e;a.forEach(function(e,t){0==e?(o.push(t),h||("horizontal"==x?w.set(t,k.has(t)?T[k.get(t)]:b.get(t)):w.set(t,k.has(t)?E[k.get(t)]:b.get(t)))):w.set(t,Number.NEGATIVE_INFINITY),h&&s.set(t,new Set([t]))}),h&&t.forEach(function(e){var t,r,n=[];e.forEach(function(e){h.has(e)&&n.push(e)}),0<n.length?(t=0,n.forEach(function(e){"horizontal"==x?w.set(e,k.has(e)?T[k.get(e)]:b.get(e)):w.set(e,k.has(e)?E[k.get(e)]:b.get(e)),t+=w.get(e)}),t/=n.length,e.forEach(function(e){h.has(e)||w.set(e,t)})):(r=0,e.forEach(function(e){r+="horizontal"==x?k.has(e)?T[k.get(e)]:b.get(e):k.has(e)?E[k.get(e)]:b.get(e)}),r/=e.length,e.forEach(function(e){w.set(e,r)}))});for(var u,d,r=mt(function(){var n=o.shift();e.get(n).forEach(function(e){var t,r;w.get(e.id)<w.get(n)+e.gap&&(h&&h.has(e.id)?(r="horizontal"==x?k.has(e.id)?T[k.get(e.id)]:b.get(e.id):k.has(e.id)?E[k.get(e.id)]:b.get(e.id),w.set(e.id,r),r<w.get(n)+e.gap&&(t=w.get(n)+e.gap-r,s.get(n).forEach(function(e){w.set(e,w.get(e)-t)}))):w.set(e.id,w.get(n)+e.gap)),a.set(e.id,a.get(e.id)-1),0==a.get(e.id)&&o.push(e.id),h&&s.set(e.id,i(s.get(n),s.get(e.id)))})},"_loop");0!=o.length;)r();return h&&(u=new Set,e.forEach(function(e,t){0==e.length&&u.add(t)}),d=[],s.forEach(function(r,e){if(u.has(e)){var n,i,t=!1,a=!0,e=!1,s=void 0;try{for(var o,l=r[Symbol.iterator]();!(a=(o=l.next()).done);a=!0){var c=o.value;h.has(c)&&(t=!0)}}catch(t){e=!0,s=t}finally{try{!a&&l.return&&l.return()}finally{if(e)throw s}}t||(n=!1,i=void 0,d.forEach(function(e,t){e.has([].concat(Pe(r))[0])&&(n=!0,i=t)}),n?r.forEach(function(e){d[i].add(e)}):d.push(new Set(r)))}}),d.forEach(function(e,t){var r=Number.POSITIVE_INFINITY,n=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY,a=Number.NEGATIVE_INFINITY,s=!0,o=!1,l=void 0;try{for(var c,h=e[Symbol.iterator]();!(s=(c=h.next()).done);s=!0){var u=c.value,d="horizontal"==x?k.has(u)?T[k.get(u)]:b.get(u):k.has(u)?E[k.get(u)]:b.get(u),p=w.get(u);d<r&&(r=d),i<d&&(i=d),p<n&&(n=p),a<p&&(a=p)}}catch(e){o=!0,l=e}finally{try{!s&&h.return&&h.return()}finally{if(o)throw l}}var g=(r+i)/2-(n+a)/2,f=!0,o=!1,l=void 0;try{for(var m,y=e[Symbol.iterator]();!(f=(m=y.next()).done);f=!0){var v=m.value;w.set(v,w.get(v)+g)}}catch(e){o=!0,l=e}finally{try{!f&&y.return&&y.return()}finally{if(o)throw l}}})),w},"findAppropriatePositionForRelativePlacement"),l=mt(function(e){var t=0,r=0,n=0,i=0;if(e.forEach(function(e){e.left?0<=T[k.get(e.left)]-T[k.get(e.right)]?t++:r++:0<=E[k.get(e.top)]-E[k.get(e.bottom)]?n++:i++}),r<t&&i<n)for(var a=0;a<k.size;a++)T[a]=-1*T[a],E[a]=-1*E[a];else if(r<t)for(var s=0;s<k.size;s++)T[s]=-1*T[s];else if(i<n)for(var o=0;o<k.size;o++)E[o]=-1*E[o]},"applyReflectionForRelativePlacement"),$=mt(function(n){var i=[],a=new $e,s=new Set,o=0;return n.forEach(function(e,t){if(!s.has(t)){for(i[o]=[],a.push(r=t),s.add(r),i[o].push(r);0!=a.length;){var r=a.shift();n.get(r).forEach(function(e){s.has(e.id)||(a.push(e.id),s.add(e.id),i[o].push(e.id))})}o++}}),i},"findComponents"),F=mt(function(e){var r=new Map;return e.forEach(function(e,t){r.set(t,[])}),e.forEach(function(e,t){e.forEach(function(e){r.get(t).push(e),r.get(e.id).push({id:t,gap:e.gap,direction:e.direction})})}),r},"dagToUndirected"),z=mt(function(e){var r=new Map;return e.forEach(function(e,t){r.set(t,[])}),e.forEach(function(e,t){e.forEach(function(e){r.get(e.id).push({id:t,gap:e.gap,direction:e.direction})})}),r},"dagToReversed"),c=[],h=[],u=!1,d=!1,p=new Set,g=new Map,f=new Map,m=[];if(t.fixedNodeConstraint&&t.fixedNodeConstraint.forEach(function(e){p.add(e.nodeId)}),t.relativePlacementConstraint&&(t.relativePlacementConstraint.forEach(function(e){e.left?(g.has(e.left)?g.get(e.left).push({id:e.right,gap:e.gap,direction:"horizontal"}):g.set(e.left,[{id:e.right,gap:e.gap,direction:"horizontal"}]),g.has(e.right)||g.set(e.right,[])):(g.has(e.top)?g.get(e.top).push({id:e.bottom,gap:e.gap,direction:"vertical"}):g.set(e.top,[{id:e.bottom,gap:e.gap,direction:"vertical"}]),g.has(e.bottom)||g.set(e.bottom,[]))}),m=$(f=F(g))),Be.TRANSFORM_ON_CONSTRAINT_HANDLING){if(t.fixedNodeConstraint&&1<t.fixedNodeConstraint.length)t.fixedNodeConstraint.forEach(function(e,t){c[t]=[e.position.x,e.position.y],h[t]=[T[k.get(e.nodeId)],E[k.get(e.nodeId)]]}),u=!0;else if(t.alignmentConstraint){var y=0;if(t.alignmentConstraint.vertical){for(var G=t.alignmentConstraint.vertical,U=mt(function(e){var t=new Set,r=(G[e].forEach(function(e){t.add(e)}),new Set([].concat(Pe(t)).filter(function(e){return p.has(e)}))),n=0<r.size?T[k.get(r.values().next().value)]:o(t).x;G[e].forEach(function(e){c[y]=[n,E[k.get(e)]],h[y]=[T[k.get(e)],E[k.get(e)]],y++})},"_loop2"),q=0;q<G.length;q++)U(q);u=!0}if(t.alignmentConstraint.horizontal){for(var j=t.alignmentConstraint.horizontal,Y=mt(function(e){var t=new Set,r=(j[e].forEach(function(e){t.add(e)}),new Set([].concat(Pe(t)).filter(function(e){return p.has(e)}))),n=0<r.size?T[k.get(r.values().next().value)]:o(t).y;j[e].forEach(function(e){c[y]=[T[k.get(e)],n],h[y]=[T[k.get(e)],E[k.get(e)]],y++})},"_loop3"),W=0;W<j.length;W++)Y(W);u=!0}t.relativePlacementConstraint&&(d=!0)}else if(t.relativePlacementConstraint){for(var v,x,b,H,V,X=0,K=0,w=0;w<m.length;w++)m[w].length>X&&(X=m[w].length,K=w);X<f.size/2?(l(t.relativePlacementConstraint),d=u=!1):(v=new Map,x=new Map,b=[],m[K].forEach(function(t){g.get(t).forEach(function(e){"horizontal"==e.direction?(v.has(t)?v.get(t).push(e):v.set(t,[e]),v.has(e.id)||v.set(e.id,[]),b.push({left:t,right:e.id})):(x.has(t)?x.get(t).push(e):x.set(t,[e]),x.has(e.id)||x.set(e.id,[]),b.push({top:t,bottom:e.id}))})}),l(b),d=!1,H=e(v,"horizontal"),V=e(x,"vertical"),m[K].forEach(function(e,t){h[t]=[T[k.get(e)],E[k.get(e)]],c[t]=[],H.has(e)?c[t][0]=H.get(e):c[t][0]=T[k.get(e)],V.has(e)?c[t][1]=V.get(e):c[t][1]=E[k.get(e)]}),u=!0)}if(u){for(var C=Fe.transpose(c),Z=Fe.transpose(h),_=0;_<C.length;_++)C[_]=Fe.multGamma(C[_]),Z[_]=Fe.multGamma(Z[_]);for(var f=Fe.multMat(C,Fe.transpose(Z)),u=ze.svd(f),S=Fe.multMat(u.V,Fe.transpose(u.U)),A=0;A<k.size;A++){var Q=[T[A],E[A]],J=[S[0][0],S[1][0]],ee=[S[0][1],S[1][1]];T[A]=Fe.dotProduct(Q,J),E[A]=Fe.dotProduct(Q,ee)}d&&l(t.relativePlacementConstraint)}}if(Be.ENFORCE_CONSTRAINTS){if(t.fixedNodeConstraint&&0<t.fixedNodeConstraint.length&&(s={x:0,y:0},t.fixedNodeConstraint.forEach(function(e,t){var r={x:T[k.get(e.nodeId)],y:E[k.get(e.nodeId)]},e=e.position,e=B(e,r);s.x+=e.x,s.y+=e.y}),s.x/=t.fixedNodeConstraint.length,s.y/=t.fixedNodeConstraint.length,T.forEach(function(e,t){T[t]+=s.x}),E.forEach(function(e,t){E[t]+=s.y}),t.fixedNodeConstraint.forEach(function(e){T[k.get(e.nodeId)]=e.position.x,E[k.get(e.nodeId)]=e.position.y})),t.alignmentConstraint){if(t.alignmentConstraint.vertical)for(var te=t.alignmentConstraint.vertical,re=mt(function(e){var t=new Set,r=(te[e].forEach(function(e){t.add(e)}),0<(e=new Set([].concat(Pe(t)).filter(function(e){return p.has(e)}))).size?T[k.get(e.values().next().value)]:o(t).x);t.forEach(function(e){p.has(e)||(T[k.get(e)]=r)})},"_loop4"),ne=0;ne<te.length;ne++)re(ne);if(t.alignmentConstraint.horizontal)for(var ie=t.alignmentConstraint.horizontal,ae=mt(function(e){var t=new Set,r=(ie[e].forEach(function(e){t.add(e)}),0<(e=new Set([].concat(Pe(t)).filter(function(e){return p.has(e)}))).size?E[k.get(e.values().next().value)]:o(t).y);t.forEach(function(e){p.has(e)||(E[k.get(e)]=r)})},"_loop5"),se=0;se<ie.length;se++)ae(se)}if(t.relativePlacementConstraint){var L=new Map,N=new Map,I=new Map,R=new Map,oe=new Map,le=new Map,ce=new Set,he=new Set;if(p.forEach(function(e){ce.add(e),he.add(e)}),t.alignmentConstraint){if(t.alignmentConstraint.vertical)for(var ue=t.alignmentConstraint.vertical,de=mt(function(t){I.set("dummy"+t,[]),ue[t].forEach(function(e){L.set(e,"dummy"+t),I.get("dummy"+t).push(e),p.has(e)&&ce.add("dummy"+t)}),oe.set("dummy"+t,T[k.get(ue[t][0])])},"_loop6"),pe=0;pe<ue.length;pe++)de(pe);if(t.alignmentConstraint.horizontal)for(var ge=t.alignmentConstraint.horizontal,fe=mt(function(t){R.set("dummy"+t,[]),ge[t].forEach(function(e){N.set(e,"dummy"+t),R.get("dummy"+t).push(e),p.has(e)&&he.add("dummy"+t)}),le.set("dummy"+t,E[k.get(ge[t][0])])},"_loop7"),me=0;me<ge.length;me++)fe(me)}var M=new Map,D=new Map,ye=mt(function(n){g.get(n).forEach(function(e){var t=void 0,r=void 0;"horizontal"==e.direction?(t=L.get(n)?L.get(n):n,r=L.get(e.id)?{id:L.get(e.id),gap:e.gap,direction:e.direction}:e,M.has(t)?M.get(t).push(r):M.set(t,[r]),M.has(r.id)||M.set(r.id,[])):(t=N.get(n)?N.get(n):n,r=N.get(e.id)?{id:N.get(e.id),gap:e.gap,direction:e.direction}:e,D.has(t)?D.get(t).push(r):D.set(t,[r]),D.has(r.id)||D.set(r.id,[]))})},"_loop8"),ve=!0,f=!1,u=void 0;try{for(var xe,be=g.keys()[Symbol.iterator]();!(ve=(xe=be.next()).done);ve=!0)ye(xe.value)}catch(e){f=!0,u=e}finally{try{!ve&&be.return&&be.return()}finally{if(f)throw u}}var f=F(M),u=F(D),f=$(f),u=$(u),we=z(M),ke=z(D),Te=[],Ee=[],Ce=(f.forEach(function(e,t){Te[t]=[],e.forEach(function(e){0==we.get(e).length&&Te[t].push(e)})}),u.forEach(function(e,t){Ee[t]=[],e.forEach(function(e){0==ke.get(e).length&&Ee[t].push(e)})}),e(M,"horizontal",ce,oe,Te)),_e=e(D,"vertical",he,le,Ee),Se=mt(function(t){I.get(t)?I.get(t).forEach(function(e){T[k.get(e)]=Ce.get(t)}):T[k.get(t)]=Ce.get(t)},"_loop9"),Ae=!0,f=!1,u=void 0;try{for(var Le,Ne=Ce.keys()[Symbol.iterator]();!(Ae=(Le=Ne.next()).done);Ae=!0)Se(Le.value)}catch(e){f=!0,u=e}finally{try{!Ae&&Ne.return&&Ne.return()}finally{if(f)throw u}}var Ie=mt(function(t){R.get(t)?R.get(t).forEach(function(e){E[k.get(e)]=_e.get(t)}):E[k.get(t)]=_e.get(t)},"_loop10"),Re=!0,f=!1,u=void 0;try{for(var Me,De=_e.keys()[Symbol.iterator]();!(Re=(Me=De.next()).done);Re=!0)Ie(Me.value)}catch(e){f=!0,u=e}finally{try{!Re&&De.return&&De.return()}finally{if(f)throw u}}}}for(var Oe=0;Oe<n.length;Oe++){var O=n[Oe];null==O.getChild()&&O.setCenter(T[k.get(O.id)],E[k.get(O.id)])}},e.exports=n},551:e=>{e.exports=t}},i={},mt(r,"__webpack_require__"),r(45);function r(e){var t=i[e];return void 0===t&&(t=i[e]={exports:{}},n[e](t,t.exports,r)),t.exports}var n,i})}),X$e=NFe((r,n)=>{mt(function(e,t){"object"==typeof r&&"object"==typeof n?n.exports=t(V$e()):"function"==typeof define&&define.amd?define(["cose-base"],t):"object"==typeof r?r.cytoscapeFcose=t(V$e()):e.cytoscapeFcose=t(e.coseBase)},"webpackUniversalModuleDefinition")(r,function(t){return n={658:e=>{e.exports=null!=Object.assign?Object.assign.bind(Object):function(r){for(var e=arguments.length,t=Array(1<e?e-1:0),n=1;n<e;n++)t[n-1]=arguments[n];return t.forEach(function(t){Object.keys(t).forEach(function(e){return r[e]=t[e]})}),r}},548:(e,t,r)=>{mt(C,"sliceIterator");var n=r(140).layoutBase.LinkedList;function C(e,t){var r=[],n=!0,i=!1,a=void 0;try{for(var s,o=e[Symbol.iterator]();!(n=(s=o.next()).done)&&(r.push(s.value),!t||r.length!==t);n=!0);}catch(e){i=!0,a=e}finally{try{!n&&o.return&&o.return()}finally{if(i)throw a}}return r}e.exports=r={getTopMostNodes:function(e){for(var n={},t=0;t<e.length;t++)n[e[t].id()]=!0;return e.filter(function(e,t){for(var r=(e="number"==typeof e?t:e).parent()[0];null!=r;){if(n[r.id()])return!1;r=r.parent()[0]}return!0})},connectComponents:function(a,s,o,e){for(var l=new n,c=new Set,h=[],u=void 0,d=void 0,p=void 0,g=!1,f=1,m=[],y=[],t=mt(function(){var n=a.collection(),i=(y.push(n),o[0]),e=a.collection();e.merge(i).merge(i.descendants().intersection(s)),h.push(i),e.forEach(function(e){l.push(e),c.add(e),n.merge(e)});for(var t,r=mt(function(){i=l.shift();var t=a.collection();i.neighborhood().nodes().forEach(function(e){0<s.intersection(i.edgesWith(e)).length&&t.merge(e)});for(var e=0;e<t.length;e++){var r=t[e];null==(u=o.intersection(r.union(r.ancestors())))||c.has(u[0])||u.union(u.descendants()).forEach(function(e){l.push(e),c.add(e),n.merge(e),o.has(e)&&h.push(e)})}},"_loop2");0!=l.length;)r();n.forEach(function(e){s.intersection(e.connectedEdges()).forEach(function(e){n.has(e.source())&&n.has(e.target())&&n.merge(e)})}),(!(g=h.length==o.length||g)||1<f)&&(d=h[0],p=d.connectedEdges().length,h.forEach(function(e){e.connectedEdges().length<p&&(p=e.connectedEdges().length,d=e)}),m.push(d.id()),(t=a.collection()).merge(h[0]),h.forEach(function(e){t.merge(e)}),h=[],o=o.difference(t),f++)},"_loop");t(),!g;);return e&&0<m.length&&e.set("dummy"+(e.size+1),m),y},relocateComponent:function(e,i,t){if(!t.fixedNodeConstraint){var a=Number.POSITIVE_INFINITY,s=Number.NEGATIVE_INFINITY,o=Number.POSITIVE_INFINITY,l=Number.NEGATIVE_INFINITY;if("draft"==t.quality){var r=!0,n=!1,c=void 0;try{for(var h,u=i.nodeIndexes[Symbol.iterator]();!(r=(h=u.next()).done);r=!0){var d,p,g,f,m,y=(e=>{if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return C(e,2);throw new TypeError("Invalid attempt to destructure non-iterable instance")})(h.value),v=y[0],x=y[1],b=t.cy.getElementById(v);b&&(d=b.boundingBox(),p=i.xCoords[x]-d.w/2,g=i.xCoords[x]+d.w/2,f=i.yCoords[x]-d.h/2,m=i.yCoords[x]+d.h/2,p<a&&(a=p),s<g&&(s=g),f<o&&(o=f),l<m)&&(l=m)}}catch(e){n=!0,c=e}finally{try{!r&&u.return&&u.return()}finally{if(n)throw c}}var w=e.x-(s+a)/2,k=e.y-(l+o)/2;i.xCoords=i.xCoords.map(function(e){return e+w}),i.yCoords=i.yCoords.map(function(e){return e+k})}else{Object.keys(i).forEach(function(e){var t=(e=i[e]).getRect().x,r=e.getRect().x+e.getRect().width,n=e.getRect().y,e=e.getRect().y+e.getRect().height;t<a&&(a=t),s<r&&(s=r),n<o&&(o=n),l<e&&(l=e)});var T=e.x-(s+a)/2,E=e.y-(l+o)/2;Object.keys(i).forEach(function(e){(e=i[e]).setCenter(e.getCenterX()+T,e.getCenterY()+E)})}}},calcBoundingBox:function(e,t,r,n){for(var i=Number.MAX_SAFE_INTEGER,a=Number.MIN_SAFE_INTEGER,s=Number.MAX_SAFE_INTEGER,o=Number.MIN_SAFE_INTEGER,l=e.descendants().not(":parent"),c=l.length,h=0;h<c;h++){var u,d=l[h];(u=t[n.get(d.id())]-d.width()/2)<i&&(i=u),a<(u=t[n.get(d.id())]+d.width()/2)&&(a=u),(u=r[n.get(d.id())]-d.height()/2)<s&&(s=u),o<(u=r[n.get(d.id())]+d.height()/2)&&(o=u)}return(e={}).topLeftX=i,e.topLeftY=s,e.width=a-i,e.height=o-s,e},calcParentsWithoutChildren:function(e,t){var r=e.collection();return t.nodes(":parent").forEach(function(e){var t=!1;e.children().forEach(function(e){"none"!=e.css("display")&&(t=!0)}),t||r.merge(e)}),r}}},816:(e,t,r)=>{var v=r(548),o=r(140).CoSELayout,x=r(140).CoSENode,b=r(140).layoutBase.PointD,w=r(140).layoutBase.DimensionD,l=r(140).layoutBase.LayoutConstants,u=r(140).layoutBase.FDLayoutConstants,k=r(140).CoSEConstants,r=mt(function(c,e){var t=c.cy,r=(i=c.eles).nodes(),n=i.edges(),d=void 0,p=void 0,g=void 0,f={},h=(c.randomize&&(d=e.nodeIndexes,p=e.xCoords,g=e.yCoords),mt(function(e){return"function"==typeof e},"isFn")),m=mt(function(e,t){return h(e)?e(t):e},"optFn"),y=v.calcParentsWithoutChildren(t,i),e=mt(function e(t,r,n,i){for(var a=r.length,s=0;s<a;s++){var o,l=r[s],c=null,h=void(0==l.intersection(y).length&&(c=l.children())),u=l.layoutDimensions({nodeDimensionsIncludeLabels:i.nodeDimensionsIncludeLabels});(h=null!=l.outerWidth()&&null!=l.outerHeight()?i.randomize?l.isParent()?(o=v.calcBoundingBox(l,p,g,d),0==l.intersection(y).length?t.add(new x(n.graphManager,new b(o.topLeftX,o.topLeftY),new w(o.width,o.height))):t.add(new x(n.graphManager,new b(o.topLeftX,o.topLeftY),new w(parseFloat(u.w),parseFloat(u.h))))):t.add(new x(n.graphManager,new b(p[d.get(l.id())]-u.w/2,g[d.get(l.id())]-u.h/2),new w(parseFloat(u.w),parseFloat(u.h)))):t.add(new x(n.graphManager,new b(l.position("x")-u.w/2,l.position("y")-u.h/2),new w(parseFloat(u.w),parseFloat(u.h)))):t.add(new x(this.graphManager))).id=l.data("id"),h.nodeRepulsion=m(i.nodeRepulsion,l),h.paddingLeft=parseInt(l.css("padding")),h.paddingTop=parseInt(l.css("padding")),h.paddingRight=parseInt(l.css("padding")),h.paddingBottom=parseInt(l.css("padding")),i.nodeDimensionsIncludeLabels&&(h.labelWidth=l.boundingBox({includeLabels:!0,includeNodes:!1,includeOverlays:!1}).w,h.labelHeight=l.boundingBox({includeLabels:!0,includeNodes:!1,includeOverlays:!1}).h,h.labelPosVertical=l.css("text-valign"),h.labelPosHorizontal=l.css("text-halign")),f[l.data("id")]=h,isNaN(h.rect.x)&&(h.rect.x=0),isNaN(h.rect.y)&&(h.rect.y=0),null!=c&&0<c.length&&e(n.getGraphManager().add(n.newGraph(),h),c,n,i)}},"processChildrenList"),t=mt(function(e,t,r){for(var n=0,i=0,a=0;a<r.length;a++){var s=r[a],o=f[s.data("source")],l=f[s.data("target")];o&&l&&o!==l&&0==o.getEdgesBetween(l).length&&((o=t.add(e.newEdge(),o,l)).id=s.id(),o.idealLength=m(c.idealEdgeLength,s),o.edgeElasticity=m(c.edgeElasticity,s),n+=o.idealLength,i++)}null!=c.idealEdgeLength&&(0<i?k.DEFAULT_EDGE_LENGTH=u.DEFAULT_EDGE_LENGTH=n/i:h(c.idealEdgeLength)?k.DEFAULT_EDGE_LENGTH=u.DEFAULT_EDGE_LENGTH=50:k.DEFAULT_EDGE_LENGTH=u.DEFAULT_EDGE_LENGTH=c.idealEdgeLength,k.MIN_REPULSION_DIST=u.MIN_REPULSION_DIST=u.DEFAULT_EDGE_LENGTH/10,k.DEFAULT_RADIAL_SEPARATION=u.DEFAULT_EDGE_LENGTH)},"processEdges"),i=mt(function(e,t){t.fixedNodeConstraint&&(e.constraints.fixedNodeConstraint=t.fixedNodeConstraint),t.alignmentConstraint&&(e.constraints.alignmentConstraint=t.alignmentConstraint),t.relativePlacementConstraint&&(e.constraints.relativePlacementConstraint=t.relativePlacementConstraint)},"processConstraints"),a=(null!=c.nestingFactor&&(k.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=u.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=c.nestingFactor),null!=c.gravity&&(k.DEFAULT_GRAVITY_STRENGTH=u.DEFAULT_GRAVITY_STRENGTH=c.gravity),null!=c.numIter&&(k.MAX_ITERATIONS=u.MAX_ITERATIONS=c.numIter),null!=c.gravityRange&&(k.DEFAULT_GRAVITY_RANGE_FACTOR=u.DEFAULT_GRAVITY_RANGE_FACTOR=c.gravityRange),null!=c.gravityCompound&&(k.DEFAULT_COMPOUND_GRAVITY_STRENGTH=u.DEFAULT_COMPOUND_GRAVITY_STRENGTH=c.gravityCompound),null!=c.gravityRangeCompound&&(k.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=u.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=c.gravityRangeCompound),null!=c.initialEnergyOnIncremental&&(k.DEFAULT_COOLING_FACTOR_INCREMENTAL=u.DEFAULT_COOLING_FACTOR_INCREMENTAL=c.initialEnergyOnIncremental),null!=c.tilingCompareBy&&(k.TILING_COMPARE_BY=c.tilingCompareBy),l.QUALITY="proof"==c.quality?2:0,k.NODE_DIMENSIONS_INCLUDE_LABELS=u.NODE_DIMENSIONS_INCLUDE_LABELS=l.NODE_DIMENSIONS_INCLUDE_LABELS=c.nodeDimensionsIncludeLabels,k.DEFAULT_INCREMENTAL=u.DEFAULT_INCREMENTAL=l.DEFAULT_INCREMENTAL=!c.randomize,k.ANIMATE=u.ANIMATE=l.ANIMATE=c.animate,k.TILE=c.tile,k.TILING_PADDING_VERTICAL="function"==typeof c.tilingPaddingVertical?c.tilingPaddingVertical.call():c.tilingPaddingVertical,k.TILING_PADDING_HORIZONTAL="function"==typeof c.tilingPaddingHorizontal?c.tilingPaddingHorizontal.call():c.tilingPaddingHorizontal,k.DEFAULT_INCREMENTAL=u.DEFAULT_INCREMENTAL=l.DEFAULT_INCREMENTAL=!0,k.PURE_INCREMENTAL=!c.randomize,l.DEFAULT_UNIFORM_LEAF_NODE_SIZES=c.uniformNodeDimensions,"transformed"==c.step&&(k.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,k.ENFORCE_CONSTRAINTS=!1,k.APPLY_LAYOUT=!1),"enforced"==c.step&&(k.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,k.ENFORCE_CONSTRAINTS=!0,k.APPLY_LAYOUT=!1),"cose"==c.step&&(k.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,k.ENFORCE_CONSTRAINTS=!1,k.APPLY_LAYOUT=!0),"all"==c.step&&(c.randomize?k.TRANSFORM_ON_CONSTRAINT_HANDLING=!0:k.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,k.ENFORCE_CONSTRAINTS=!0,k.APPLY_LAYOUT=!0),c.fixedNodeConstraint||c.alignmentConstraint||c.relativePlacementConstraint?k.TREE_REDUCTION_ON_INCREMENTAL=!1:k.TREE_REDUCTION_ON_INCREMENTAL=!0,new o),s=a.newGraphManager();return e(s.addRoot(),v.getTopMostNodes(r),a,c),t(a,s,n),i(a,c),a.runLayout(),f},"coseLayout");e.exports={coseLayout:r}},212:(e,t,r)=>{function n(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}mt(n,"defineProperties"),mt(i,"_classCallCheck");var a,s,o=r(658),b=r(548),w=r(657).spectralLayout,k=r(816).coseLayout,l=Object.freeze({quality:"default",randomize:!0,animate:!0,animationDuration:1e3,animationEasing:void 0,fit:!0,padding:30,nodeDimensionsIncludeLabels:!1,uniformNodeDimensions:!1,packComponents:!0,step:"all",samplingType:!0,sampleSize:25,nodeSeparation:75,piTol:1e-7,nodeRepulsion:mt(function(e){return 4500},"nodeRepulsion"),idealEdgeLength:mt(function(e){return 50},"idealEdgeLength"),edgeElasticity:mt(function(e){return.45},"edgeElasticity"),nestingFactor:.1,gravity:.25,numIter:2500,tile:!0,tilingCompareBy:void 0,tilingPaddingVertical:10,tilingPaddingHorizontal:10,gravityRangeCompound:1.5,gravityCompound:1,gravityRange:3.8,initialEnergyOnIncremental:.3,fixedNodeConstraint:void 0,alignmentConstraint:void 0,relativePlacementConstraint:void 0,ready:mt(function(){},"ready"),stop:mt(function(){},"stop")}),r=(mt(c,"Layout"),a=c,s=[{key:"run",value:mt(function(){var h=this.options,e=h.cy,t=h.eles,u=[],d=[],r=void 0,n=[],i=(!h.fixedNodeConstraint||Array.isArray(h.fixedNodeConstraint)&&0!=h.fixedNodeConstraint.length||(h.fixedNodeConstraint=void 0),!h.alignmentConstraint||(!h.alignmentConstraint.vertical||Array.isArray(h.alignmentConstraint.vertical)&&0!=h.alignmentConstraint.vertical.length||(h.alignmentConstraint.vertical=void 0),!h.alignmentConstraint.horizontal)||Array.isArray(h.alignmentConstraint.horizontal)&&0!=h.alignmentConstraint.horizontal.length||(h.alignmentConstraint.horizontal=void 0),!h.relativePlacementConstraint||Array.isArray(h.relativePlacementConstraint)&&0!=h.relativePlacementConstraint.length||(h.relativePlacementConstraint=void 0),void((h.fixedNodeConstraint||h.alignmentConstraint||h.relativePlacementConstraint)&&(h.tile=!1,h.packComponents=!1))),a=!1;if(e.layoutUtilities&&h.packComponents&&(i=(i=e.layoutUtilities("get"))||e.layoutUtilities(),a=!0),0<t.nodes().length)if(a){if(a=b.getTopMostNodes(h.eles.nodes()),(r=b.connectComponents(e,h.eles,a)).forEach(function(e){e=e.boundingBox(),n.push({x:e.x1+e.w/2,y:e.y1+e.h/2})}),h.randomize&&r.forEach(function(e){h.eles=e,u.push(w(h))}),"default"==h.quality||"proof"==h.quality){var s=e.collection();if(h.tile){var a=new Map,o=0,l={nodeIndexes:a,xCoords:[],yCoords:[]},c=[];if(r.forEach(function(r,e){0==r.edges().length&&(r.nodes().forEach(function(e,t){s.merge(r.nodes()[t]),e.isParent()||(l.nodeIndexes.set(r.nodes()[t].id(),o++),l.xCoords.push(r.nodes()[0].position().x),l.yCoords.push(r.nodes()[0].position().y))}),c.push(e))}),1<s.length){a=s.boundingBox(),n.push({x:a.x1+a.w/2,y:a.y1+a.h/2}),r.push(s),u.push(l);for(var p=c.length-1;0<=p;p--)r.splice(c[p],1),u.splice(c[p],1),n.splice(c[p],1)}}r.forEach(function(e,t){h.eles=e,d.push(k(h,u[t])),b.relocateComponent(n[t],d[t],h)})}else r.forEach(function(e,t){b.relocateComponent(n[t],u[t],h)});var g,f,m,y,v=new Set;1<r.length&&(g=[],f=t.filter(function(e){return"none"==e.css("display")}),r.forEach(function(e,o){var l,r,c=void 0;"draft"==h.quality&&(c=u[o].nodeIndexes),0<e.nodes().not(f).length&&(l={edges:[],nodes:[]},e.nodes().not(f).forEach(function(e){var t;"draft"==h.quality?e.isParent()?(t=b.calcBoundingBox(e,u[o].xCoords,u[o].yCoords,c),l.nodes.push({x:t.topLeftX,y:t.topLeftY,width:t.width,height:t.height})):(r=c.get(e.id()),l.nodes.push({x:u[o].xCoords[r]-e.boundingbox().w/2,y:u[o].yCoords[r]-e.boundingbox().h/2,width:e.boundingbox().w,height:e.boundingbox().h})):d[o][e.id()]&&l.nodes.push({x:d[o][e.id()].getLeft(),y:d[o][e.id()].getTop(),width:d[o][e.id()].getWidth(),height:d[o][e.id()].getHeight()})}),e.edges().forEach(function(e){var t,r,n,i,a,s=e.source(),e=e.target();"none"!=s.css("display")&&"none"!=e.css("display")&&("draft"==h.quality?(t=c.get(s.id()),r=c.get(e.id()),n=[],i=[],s.isParent()?(a=b.calcBoundingBox(s,u[o].xCoords,u[o].yCoords,c),n.push(a.topLeftX+a.width/2),n.push(a.topLeftY+a.height/2)):(n.push(u[o].xCoords[t]),n.push(u[o].yCoords[t])),e.isParent()?(a=b.calcBoundingBox(e,u[o].xCoords,u[o].yCoords,c),i.push(a.topLeftX+a.width/2),i.push(a.topLeftY+a.height/2)):(i.push(u[o].xCoords[r]),i.push(u[o].yCoords[r])),l.edges.push({startX:n[0],startY:n[1],endX:i[0],endY:i[1]})):d[o][s.id()]&&d[o][e.id()]&&l.edges.push({startX:d[o][s.id()].getCenterX(),startY:d[o][s.id()].getCenterY(),endX:d[o][e.id()].getCenterX(),endY:d[o][e.id()].getCenterY()}))}),0<l.nodes.length)&&(g.push(l),v.add(o))}),m=i.packComponents(g,h.randomize).shifts,"draft"==h.quality?u.forEach(function(e,t){var r=e.xCoords.map(function(e){return e+m[t].dx}),n=e.yCoords.map(function(e){return e+m[t].dy});e.xCoords=r,e.yCoords=n}):(y=0,v.forEach(function(t){Object.keys(d[t]).forEach(function(e){(e=d[t][e]).setCenter(e.getCenterX()+m[y].dx,e.getCenterY()+m[y].dy)}),y++})))}else a=h.eles.boundingBox(),n.push({x:a.x1+a.w/2,y:a.y1+a.h/2}),h.randomize&&(i=w(h),u.push(i)),"default"==h.quality||"proof"==h.quality?(d.push(k(h,u[0])),b.relocateComponent(n[0],d[0],h)):b.relocateComponent(n[0],u[0],h);var x=mt(function(r,e){var t,n,i,a;return"default"==h.quality||"proof"==h.quality?(n=t=void 0,i=(r="number"==typeof r?e:r).data("id"),d.forEach(function(e){i in e&&(t={x:e[i].getRect().getCenterX(),y:e[i].getRect().getCenterY()},n=e[i])}),h.nodeDimensionsIncludeLabels&&(n.labelWidth&&("left"==n.labelPosHorizontal?t.x+=n.labelWidth/2:"right"==n.labelPosHorizontal&&(t.x-=n.labelWidth/2)),n.labelHeight)&&("top"==n.labelPosVertical?t.y+=n.labelHeight/2:"bottom"==n.labelPosVertical&&(t.y-=n.labelHeight/2)),{x:(t=null==t?{x:r.position("x"),y:r.position("y")}:t).x,y:t.y}):(a=void 0,u.forEach(function(e){var t=e.nodeIndexes.get(r.id());null!=t&&(a={x:e.xCoords[t],y:e.yCoords[t]})}),{x:(a=null==a?{x:r.position("x"),y:r.position("y")}:a).x,y:a.y})},"getPositions");"default"==h.quality||"proof"==h.quality||h.randomize?(a=b.calcParentsWithoutChildren(e,t),i=t.filter(function(e){return"none"==e.css("display")}),h.eles=t.not(i),t.nodes().not(":parent").not(i).layoutPositions(this,h,x),0<a.length&&a.forEach(function(e){e.position(x(e))})):console.log("If randomize option is set to false, then quality option must be 'default' or 'proof'.")},"run")}],n(a.prototype,s),c);function c(e){i(this,c),this.options=o({},l,e)}e.exports=r},657:(e,t,r)=>{var G=r(548),U=r(140).layoutBase.Matrix,q=r(140).layoutBase.SVD,r=mt(function(e){var i=e.cy,a=e.eles,t=a.nodes(),r=a.nodes(":parent"),s=new Map,m=new Map,o=new Map,y=[],g=[],f=[],h=[],v=[],x=[],u=[],b=[],w=void 0,k=e.piTol,n=e.samplingType,T=e.nodeSeparation,d=void 0,P=mt(function(){for(var e=0,t=!1;e<d;){for(var r=Math.floor(Math.random()*w),t=!1,n=0;n<e;n++)if(h[n]==r){t=!0;break}t||(h[e]=r,e++)}},"randomSampleCR"),p=mt(function(e,t,r){for(var n,i=[],a=0,s=0,o=[],l=0,c=1,h=0;h<w;h++)o[h]=1e8;for(o[i[s]=e]=0;a<=s;){for(var u=i[a++],d=y[u],p=0;p<d.length;p++)1e8==o[n=m.get(d[p])]&&(o[n]=o[u]+1,i[++s]=n);x[u][t]=o[u]*T}if(r){for(var g=0;g<w;g++)x[g][t]<v[g]&&(v[g]=x[g][t]);for(var f=0;f<w;f++)l<v[f]&&(l=v[f],c=f)}return c},"BFS"),l=mt(function(e){var t=void 0;if(e){for(var t=Math.floor(Math.random()*w),r=0;r<w;r++)v[r]=1e8;for(var n=0;n<d;n++)t=p(h[n]=t,n,e)}else{P();for(var i=0;i<d;i++)p(h[i],i,e,!1)}for(var a=0;a<w;a++)for(var s=0;s<d;s++)x[a][s]*=x[a][s];for(var o=0;o<d;o++)u[o]=[];for(var l=0;l<d;l++)for(var c=0;c<d;c++)u[l][c]=x[h[c]][l]},"allBFS"),B=mt(function(){for(var e=(r=q.svd(u)).S,t=r.U,r=r.V,n=e[0]*e[0]*e[0],i=[],a=0;a<d;a++){i[a]=[];for(var s=0;s<d;s++)i[a][s]=0,a==s&&(i[a][s]=e[a]/(e[a]*e[a]+n/(e[a]*e[a])))}b=U.multMat(U.multMat(r,i),U.transpose(t))},"sample"),$=mt(function(){for(var e=void 0,t=void 0,r=[],n=[],i=[],a=[],s=0;s<w;s++)r[s]=Math.random(),n[s]=Math.random();for(var r=U.normalize(r),n=U.normalize(n),o=1e-9,l=1e-9,c=void 0;;){for(var h=0;h<w;h++)i[h]=r[h];if(r=U.multGamma(U.multL(U.multGamma(i),x,b)),e=U.dotProduct(i,r),r=U.normalize(r),o=U.dotProduct(i,r),(c=Math.abs(o/l))<=1+k&&1<=c)break;l=o}for(var u=0;u<w;u++)i[u]=r[u];for(l=1e-9;;){for(var d=0;d<w;d++)a[d]=n[d];if(a=U.minusOp(a,U.multCons(i,U.dotProduct(i,a))),n=U.multGamma(U.multL(U.multGamma(a),x,b)),t=U.dotProduct(a,n),n=U.normalize(n),o=U.dotProduct(a,n),(c=Math.abs(o/l))<=1+k&&1<=c)break;l=o}for(var p=0;p<w;p++)a[p]=n[p];g=U.multCons(i,Math.sqrt(Math.abs(e))),f=U.multCons(a,Math.sqrt(Math.abs(t)))},"powerIteration");G.connectComponents(i,a,G.getTopMostNodes(t),s),r.forEach(function(e){G.connectComponents(i,a,G.getTopMostNodes(e.descendants().intersection(a)),s)});for(var c=0,E=0;E<t.length;E++)t[E].isParent()||m.set(t[E].id(),c++);var C=!0,_=!1,S=void 0;try{for(var A,L=s.keys()[Symbol.iterator]();!(C=(A=L.next()).done);C=!0){var F=A.value;m.set(F,c++)}}catch(e){_=!0,S=e}finally{try{!C&&L.return&&L.return()}finally{if(_)throw S}}for(var N=0;N<m.size;N++)y[N]=[];r.forEach(function(e){for(var t=e.children().intersection(a);0==t.nodes(":childless").length;)t=t.nodes()[0].children().intersection(a);var r=0,n=t.nodes(":childless")[0].connectedEdges().length;t.nodes(":childless").forEach(function(e,t){e.connectedEdges().length<n&&(n=e.connectedEdges().length,r=t)}),o.set(e.id(),t.nodes(":childless")[r].id())}),t.forEach(function(t){var r=t.isParent()?m.get(o.get(t.id())):m.get(t.id());t.neighborhood().nodes().forEach(function(e){0<a.intersection(t.edgesWith(e)).length&&(e.isParent()?y[r].push(o.get(e.id())):y[r].push(e.id()))})});var z=mt(function(t){var r,n=m.get(t);s.get(t).forEach(function(e){r=i.getElementById(e).isParent()?o.get(e):e,y[n].push(r),y[m.get(r)].push(t)})},"_loop"),I=!0,_=!1,S=void 0;try{for(var R,M=s.keys()[Symbol.iterator]();!(I=(R=M.next()).done);I=!0)z(R.value)}catch(e){_=!0,S=e}finally{try{!I&&M.return&&M.return()}finally{if(_)throw S}}if(2<(w=m.size)){for(var d=w<e.sampleSize?w:e.sampleSize,D=0;D<w;D++)x[D]=[];for(var O=0;O<d;O++)b[O]=[];"draft"==e.quality||"all"==e.step?(l(n),B(),$()):m.forEach(function(e,t){g.push(i.getElementById(t).position("x")),f.push(i.getElementById(t).position("y"))})}else r=m.keys(),S=(_=i.getElementById(r.next().value)).position(),l=_.outerWidth(),g.push(S.x),f.push(S.y),2==w&&(n=i.getElementById(r.next().value).outerWidth(),g.push(S.x+l/2+n/2+e.idealEdgeLength),f.push(S.y));return{nodeIndexes:m,xCoords:g,yCoords:f}},"spectralLayout");e.exports={spectralLayout:r}},579:(e,t,r)=>{var n=r(212),r=mt(function(e){e&&e("layout","fcose",n)},"register");typeof cytoscape<"u"&&r(cytoscape),e.exports=r},140:e=>{e.exports=t}},i={},mt(r,"__webpack_require__"),r(579);function r(e){var t=i[e];return void 0===t&&(t=i[e]={exports:{}},n[e](t,t.exports,r)),t.exports}var n,i})}),K$e=b(()=>{Pc(),P$e=mt(e=>`<g><rect width="80" height="80" style="fill: #087ebf; stroke-width: 0px;"/>${e}</g>`,"wrapIcon"),B$e={prefix:"mermaid-architecture",height:80,width:80,icons:{database:{body:P$e('<path id="b" data-name="4" d="m20,57.86c0,3.94,8.95,7.14,20,7.14s20-3.2,20-7.14" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><path id="c" data-name="3" d="m20,45.95c0,3.94,8.95,7.14,20,7.14s20-3.2,20-7.14" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><path id="d" data-name="2" d="m20,34.05c0,3.94,8.95,7.14,20,7.14s20-3.2,20-7.14" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse id="e" data-name="1" cx="40" cy="22.14" rx="20" ry="7.14" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="20" y1="57.86" x2="20" y2="22.14" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="60" y1="57.86" x2="60" y2="22.14" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/>')},server:{body:P$e('<rect x="17.5" y="17.5" width="45" height="45" rx="2" ry="2" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="17.5" y1="32.5" x2="62.5" y2="32.5" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="17.5" y1="47.5" x2="62.5" y2="47.5" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><g><path d="m56.25,25c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z" style="fill: #fff; stroke-width: 0px;"/><path d="m56.25,25c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z" style="fill: none; stroke: #fff; stroke-miterlimit: 10;"/></g><g><path d="m56.25,40c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z" style="fill: #fff; stroke-width: 0px;"/><path d="m56.25,40c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z" style="fill: none; stroke: #fff; stroke-miterlimit: 10;"/></g><g><path d="m56.25,55c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z" style="fill: #fff; stroke-width: 0px;"/><path d="m56.25,55c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z" style="fill: none; stroke: #fff; stroke-miterlimit: 10;"/></g><g><circle cx="32.5" cy="25" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/><circle cx="27.5" cy="25" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/><circle cx="22.5" cy="25" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/></g><g><circle cx="32.5" cy="40" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/><circle cx="27.5" cy="40" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/><circle cx="22.5" cy="40" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/></g><g><circle cx="32.5" cy="55" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/><circle cx="27.5" cy="55" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/><circle cx="22.5" cy="55" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/></g>')},disk:{body:P$e('<rect x="20" y="15" width="40" height="50" rx="1" ry="1" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse cx="24" cy="19.17" rx=".8" ry=".83" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse cx="56" cy="19.17" rx=".8" ry=".83" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse cx="24" cy="60.83" rx=".8" ry=".83" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse cx="56" cy="60.83" rx=".8" ry=".83" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse cx="40" cy="33.75" rx="14" ry="14.58" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse cx="40" cy="33.75" rx="4" ry="4.17" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><path d="m37.51,42.52l-4.83,13.22c-.26.71-1.1,1.02-1.76.64l-4.18-2.42c-.66-.38-.81-1.26-.33-1.84l9.01-10.8c.88-1.05,2.56-.08,2.09,1.2Z" style="fill: #fff; stroke-width: 0px;"/>')},internet:{body:P$e('<circle cx="40" cy="40" r="22.5" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="40" y1="17.5" x2="40" y2="62.5" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="17.5" y1="40" x2="62.5" y2="40" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><path d="m39.99,17.51c-15.28,11.1-15.28,33.88,0,44.98" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><path d="m40.01,17.51c15.28,11.1,15.28,33.88,0,44.98" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="19.75" y1="30.1" x2="60.25" y2="30.1" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="19.75" y1="49.9" x2="60.25" y2="49.9" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/>')},cloud:{body:P$e('<path d="m65,47.5c0,2.76-2.24,5-5,5H20c-2.76,0-5-2.24-5-5,0-1.87,1.03-3.51,2.56-4.36-.04-.21-.06-.42-.06-.64,0-2.6,2.48-4.74,5.65-4.97,1.65-4.51,6.34-7.76,11.85-7.76.86,0,1.69.08,2.5.23,2.09-1.57,4.69-2.5,7.5-2.5,6.1,0,11.19,4.38,12.28,10.17,2.14.56,3.72,2.51,3.72,4.83,0,.03,0,.07-.01.1,2.29.46,4.01,2.48,4.01,4.9Z" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/>')},unknown:Ac,blank:{body:P$e("")}}}}),Z$e=b(()=>{Tu(),JL(),Pc(),Oc(),K$e(),q$e(),i_(),$$e=mt(async function(w,e,k){let T=k.getConfigField("padding"),t=k.getConfigField("iconSize"),E=t/2,C=t/6,_=C/2;await Promise.all(e.edges().map(async e=>{let{source:t,sourceDir:r,sourceArrow:n,sourceGroup:i,target:a,targetDir:s,targetArrow:o,targetGroup:l,label:c}=A$e(e),{x:h,y:u}=e[0].sourceEndpoint(),{x:d,y:p}=e[0].midpoint(),{x:g,y:f}=e[0].targetEndpoint(),m=T+4;var y,v,x,b;i&&(y$e(r)?h+="L"===r?-m:m:u+="T"===r?-m:m+18),l&&(y$e(s)?g+="L"===s?-m:m:f+="T"===s?-m:m+18),i||"junction"!==k.getNode(t)?.type||(y$e(r)?h+="L"===r?E:-E:u+="T"===r?E:-E),l||"junction"!==k.getNode(a)?.type||(y$e(s)?g+="L"===s?E:-E:f+="T"===s?E:-E),e[0]._private.rscratch&&((e=w.insert("g")).insert("path").attr("d",`M ${h},${u} L ${d},${p} L${g},${f} `).attr("class","edge").attr("id",n_(t,a,{prefix:"L"})),n&&(b=y$e(r)?g$e[r](h,C):h-_,y=v$e(r)?g$e[r](u,C):u-_,e.insert("polygon").attr("points",p$e[r](C)).attr("transform",`translate(${b},${y})`).attr("class","arrow")),o&&(b=y$e(s)?g$e[s](g,C):g-_,y=v$e(s)?g$e[s](f,C):f-_,e.insert("polygon").attr("points",p$e[s](C)).attr("transform",`translate(${b},${y})`).attr("class","arrow")),c)&&(v=0,v="X"==(x=x$e(r,s)?"XY":y$e(r)?"X":"Y")?Math.abs(h-g):"Y"==x?Math.abs(u-f)/1.5:Math.abs(h-g)/2,b=e.append("g"),await QL(b,c,{useHtmlLabels:!1,width:v,classes:"architecture-service-label"},O()),b.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle"),"X"==x?b.attr("transform","translate("+d+", "+p+")"):"Y"==x?b.attr("transform","translate("+d+", "+p+") rotate(-90)"):"XY"==x&&(y=k$e(r,s))&&b$e(y)&&(e=b.node().getBoundingClientRect(),[y,v]=E$e(y),b.attr("dominant-baseline","auto").attr("transform",`rotate(${-1*y*v*45})`),x=b.node().getBoundingClientRect(),b.attr("transform",` + translate(${d}, ${p-e.height/2}) + translate(${y*x.width/2}, ${v*x.height/2}) + rotate(${-1*y*v*45}, 0, ${e.height/2}) + `)))}))},"drawEdges"),F$e=mt(async function(c,e,h){let u=.75*h.getConfigField("padding"),d=h.getConfigField("fontSize"),p=h.getConfigField("iconSize")/2;await Promise.all(e.nodes().map(async n=>{var i=L$e(n);if("group"===i.type){var{h:n,w:a,x1:s,y1:o}=n.boundingBox(),l=c.append("rect");l.attr("id","group-"+i.id).attr("x",s+p).attr("y",o+p).attr("width",a).attr("height",n).attr("class","node-bkg");let e=c.append("g"),t=s,r=o;i.icon&&((n=e.append("g")).html(`<g>${await Dc(i.icon,{height:u,width:u,fallbackPrefix:B$e.prefix})}</g>`),n.attr("transform","translate("+(t+p+1)+", "+(r+p+1)+")"),t+=u,r+=d/2-1-2),i.label&&(s=e.append("g"),await QL(s,i.label,{useHtmlLabels:!1,width:a,classes:"architecture-service-label"},O()),s.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","start").attr("text-anchor","start"),s.attr("transform","translate("+(t+p+4)+", "+(r+p+2)+")")),h.setElementForId(i.id,l)}}))},"drawGroups"),z$e=mt(async function(e,t,r){var n,i=O();for(n of r){var a=t.append("g"),s=e.getConfigField("iconSize"),o=(n.title&&(o=a.append("g"),await QL(o,n.title,{useHtmlLabels:!1,width:1.5*s,classes:"architecture-service-label"},i),o.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle"),o.attr("transform","translate("+s/2+", "+s+")")),a.append("g")),{width:l,height:c}=(n.icon?o.html(`<g>${await Dc(n.icon,{height:s,width:s,fallbackPrefix:B$e.prefix})}</g>`):n.iconText?(o.html(`<g>${await Dc("blank",{height:s,width:s,fallbackPrefix:B$e.prefix})}</g>`),l=o.append("g").append("foreignObject").attr("width",s).attr("height",s).append("div").attr("class","node-icon-text").attr("style",`height: ${s}px;`).append("div").html(lc(n.iconText,i)),c=parseInt(window.getComputedStyle(l.node(),null).getPropertyValue("font-size").replace(/\D/g,""))??16,l.attr("style",`-webkit-line-clamp: ${Math.floor((s-2)/c)};`)):o.append("path").attr("class","node-bkg").attr("id","node-"+n.id).attr("d",`M0 ${s} v${-s} q0,-5 5,-5 h${s} q5,0 5,5 v${s} H0 Z`),a.attr("id","service-"+n.id).attr("class","architecture-service"),a.node().getBBox());n.width=l,n.height=c,e.setElementForId(n.id,a)}return 0},"drawServices"),G$e=mt(function(i,a,e){e.forEach(e=>{var t=a.append("g"),r=i.getConfigField("iconSize"),{width:r,height:n}=(t.append("g").append("rect").attr("id","node-"+e.id).attr("fill-opacity","0").attr("width",r).attr("height",r),t.attr("class","architecture-junction"),t._groups[0][0].getBBox());t.width=r,t.height=n,i.setElementForId(e.id,t)})},"drawJunctions")});function Q$e(e,t,r){e.forEach(e=>{t.add({group:"nodes",data:{type:"service",id:e.id,icon:e.icon,label:e.title,parent:e.in,width:r.getConfigField("iconSize"),height:r.getConfigField("iconSize")},classes:"node-service"})})}function J$e(e,t,r){e.forEach(e=>{t.add({group:"nodes",data:{type:"junction",id:e.id,parent:e.in,width:r.getConfigField("iconSize"),height:r.getConfigField("iconSize")},classes:"node-junction"})})}function eFe(r,e){e.nodes().map(e=>{var t=L$e(e);"group"!==t.type&&(t.x=e.position().x,t.y=e.position().y,r.getElementById(t.id).attr("transform","translate("+(t.x||0)+","+(t.y||0)+")"))})}function tFe(e,t){e.forEach(e=>{t.add({group:"nodes",data:{type:"group",id:e.id,icon:e.icon,label:e.title,parent:e.in},classes:"node-group"})})}function rFe(e,h){e.forEach(e=>{var{lhsId:t,rhsId:r,lhsInto:n,lhsGroup:i,rhsInto:a,lhsDir:s,rhsDir:o,rhsGroup:l,title:c}=e,e=x$e(e.lhsDir,e.rhsDir)?"segments":"straight";h.add({group:"edges",data:{id:t+"-"+r,label:c,source:t,sourceDir:s,sourceArrow:n,sourceGroup:i,sourceEndpoint:"L"===s?"0 50%":"R"===s?"100% 50%":"T"===s?"50% 0":"50% 100%",target:r,targetDir:o,targetArrow:a,targetGroup:l,targetEndpoint:"L"===o?"0 50%":"R"===o?"100% 50%":"T"===o?"50% 0":"50% 100%"},classes:e})})}function nFe(s,e,u){let t=mt((e,h)=>Object.entries(e).reduce((r,[n,e])=>{let i=0,a=Object.entries(e);if(1===a.length)r[n]=a[0][1];else for(let t=0;t<a.length-1;t++)for(let e=t+1;e<a.length;e++){var[s,o]=a[t],[l,c]=a[e];u[s]?.[l]===h||"default"===s||"default"===l?(r[n]??=[],r[n]=[...r[n],...o,...c]):(r[n+"-"+i++]=o,r[n+"-"+i++]=c)}return r},{}),"flattenAlignments"),r=e.map(e=>{let i={},a={};return Object.entries(e).forEach(([e,[t,r]])=>{var n=s.getNode(e)?.in??"default";i[r]??={},i[r][n]??=[],i[r][n].push(e),a[t]??={},a[t][n]??=[],a[t][n].push(e)}),{horiz:Object.values(t(i,"horizontal")).filter(e=>1<e.length),vert:Object.values(t(a,"vertical")).filter(e=>1<e.length)}}),[n,i]=r.reduce(([e,t],{horiz:r,vert:n})=>[[...e,...r],[...t,...n]],[[],[]]);return{horizontal:n,vertical:i}}function iFe(e,l){let c=[],h=mt(e=>e[0]+","+e[1],"posToStr"),u=mt(e=>e.split(",").map(e=>parseInt(e)),"strToPos");return e.forEach(e=>{let a=Object.fromEntries(Object.entries(e).map(([e,t])=>[h(t),e])),s=[h([0,0])],o={},t={L:[-1,0],R:[1,0],T:[0,1],B:[0,-1]};for(;0<s.length;){var r=s.shift();if(r){o[r]=1;let i=a[r];if(i){let n=u(r);Object.entries(t).forEach(([e,t])=>{var t=h([n[0]+t[0],n[1]+t[1]]),r=a[t];r&&!o[t]&&(s.push(t),c.push({[d$e[e]]:r,[d$e[f$e(e)]]:i,gap:1.5*l.getConfigField("iconSize")}))})}}}}),c}function aFe(i,a,l,c,h,{spatialMaps:u,groupAlignments:d}){return new Promise(t=>{let e=H("body").append("div").attr("id","cy").attr("style","display:none"),s=ghe({container:document.getElementById("cy"),style:[{selector:"edge",style:{"curve-style":"straight",label:"data(label)","source-endpoint":"data(sourceEndpoint)","target-endpoint":"data(targetEndpoint)"}},{selector:"edge.segments",style:{"curve-style":"segments","segment-weights":"0","segment-distances":[.5],"edge-distances":"endpoints","source-endpoint":"data(sourceEndpoint)","target-endpoint":"data(targetEndpoint)"}},{selector:"node",style:{"compound-sizing-wrt-labels":"include"}},{selector:"node[label]",style:{"text-valign":"bottom","text-halign":"center","font-size":h.getConfigField("fontSize")+"px"}},{selector:".node-service",style:{label:"data(label)",width:"data(width)",height:"data(height)"}},{selector:".node-junction",style:{width:"data(width)",height:"data(height)"}},{selector:".node-group",style:{padding:h.getConfigField("padding")+"px"}}],layout:{name:"grid",boundingBox:{x1:0,x2:100,y1:0,y2:100}}}),r=(e.remove(),tFe(l,s),Q$e(i,s,h),J$e(a,s,h),rFe(c,s),nFe(h,u,d)),n=iFe(u,h),o=s.layout({name:"fcose",quality:"proof",styleEnabled:!1,animate:!1,nodeDimensionsIncludeLabels:!1,idealEdgeLength(e){var[e,t]=e.connectedNodes();return(e=L$e(e).parent)===L$e(t).parent?1.5*h.getConfigField("iconSize"):.5*h.getConfigField("iconSize")},edgeElasticity(e){var[e,t]=e.connectedNodes();return(e=L$e(e).parent)===L$e(t).parent?.45:.001},alignmentConstraint:r,relativePlacementConstraint:n});o.one("layoutstop",()=>{function e(e,t,r,n){var{x:e,y:i}=e,{x:t,y:a}=t,s=(n-i+(e-r)*(i-a)/(e-t))/Math.sqrt(1+Math.pow((i-a)/(e-t),2)),o=Math.sqrt(Math.pow(n-i,2)+Math.pow(r-e,2)-Math.pow(s,2));o/=Math.sqrt(Math.pow(t-e,2)+Math.pow(a-i,2));let l=(t-e)*(n-i)-(a-i)*(r-e);switch(!0){case 0<=l:l=1;break;case l<0:l=-1}let c=(t-e)*(r-e)+(a-i)*(n-i);switch(!0){case 0<=c:c=1;break;case c<0:c=-1}return{distances:Math.abs(s)*l,weights:o*=c}}mt(e,"getSegmentWeights"),s.startBatch();for(var t of Object.values(s.edges())){var r,n,i,a;t.data?.()&&({x:i,y:n}=t.source().position(),{x:a,y:r}=t.target().position(),i!==a)&&n!==r&&(i=t.sourceEndpoint(),a=t.targetEndpoint(),n=A$e(t).sourceDir,[r,n]=v$e(n)?[i.x,a.y]:[a.x,i.y],{weights:i,distances:a}=e(i,a,r,n),t.style("segment-distances",a),t.style("segment-weights",i))}s.endBatch(),o.run()}),o.run(),s.ready(e=>{D.info("Ready",e),t(s)})})}var sFe,oFe,lFe=b(()=>{fhe(),sFe=q(X$e(),1),i6(),e(),Pc(),LEe(),lh(),K$e(),q$e(),Z$e(),Ic([{name:B$e.prefix,icons:B$e}]),ghe.use(sFe.default),mt(Q$e,"addServices"),mt(J$e,"addJunctions"),mt(eFe,"positionNodes"),mt(tFe,"addGroups"),mt(rFe,"addEdges"),mt(nFe,"getAlignments"),mt(iFe,"getRelativeConstraints"),mt(aFe,"layoutArchitecture"),sFe=mt(async(e,t,r,n)=>{var i=(n=n.db).getServices(),a=n.getJunctions(),s=n.getGroups(),o=n.getEdges(),l=n.getDataStructures(),c=(t=kEe(t)).append("g"),h=(c.attr("class","architecture-edges"),(u=t.append("g")).attr("class","architecture-services"),t.append("g")),u=(h.attr("class","architecture-groups"),await z$e(n,u,i),G$e(n,u,a),await aFe(i,a,s,o,n,l));await $$e(c,u,n),await F$e(h,u,n),eFe(n,u),Qc(void 0,t,n.getConfigField("padding"),n.getConfigField("useMaxWidth"))},"draw"),oFe={draw:sFe}}),cFe={};OFe(cFe,{diagram:()=>hFe});var hFe,uFe,dFe=b(()=>{Y$e(),j$e(),W$e(),lFe(),hFe={parser:M$e,get db(){return new I$e},renderer:oFe,styles:O$e}}),pFe=b(()=>{en(),rn(),i_(),MN(),ku(),uFe=class{constructor(){this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.setAccTitle=mh,this.getAccTitle=yh,this.setDiagramTitle=bh,this.getDiagramTitle=wh,this.getAccDescription=xh,this.setAccDescription=vh}static{mt(this,"TreeMapDB")}getNodes(){return this.nodes}getConfig(){var e=Yt,t=ar();return _C({...e.treemap,...t.treemap??{}})}addNode(e,t){this.nodes.push(e),this.levels.set(e,t),0===t&&(this.outerNodes.push(e),this.root??=e)}getRoot(){return{name:"",children:this.outerNodes}}addClass(e,t){let r=this.classes.get(e)??{id:e,styles:[],textStyles:[]},n=t.replace(/\\,/g,"§§§").replace(/,/g,";").replace(/§§§/g,",").split(";");n&&n.forEach(e=>{SN(e)&&(r?.textStyles?r.textStyles.push(e):r.textStyles=[e]),r?.styles?r.styles.push(e):r.styles=[e]}),this.classes.set(e,r)}getClasses(){return this.classes}getStylesForClass(e){return this.classes.get(e)?.styles??[]}clear(){fh(),this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.root=void 0}}});function gFe(e){if(!e.length)return[];let n=[],i=[];return e.forEach(e=>{var t,r={name:e.name,children:"Leaf"===e.type?void 0:[]};for(r.classSelector=e?.classSelector,e?.cssCompiledStyles&&(r.cssCompiledStyles=[e.cssCompiledStyles]),"Leaf"===e.type&&void 0!==e.value&&(r.value=e.value);0<i.length&&i[i.length-1].level>=e.level;)i.pop();0===i.length?n.push(r):(t=i[i.length-1].node).children?t.children.push(r):t.children=[r],"Leaf"!==e.type&&i.push({node:r,level:e.level})}),n}var fFe,mFe,yFe,vFe,xFe,bFe,wFe,kFe,TFe,EFe=b(()=>{mt(gFe,"buildHierarchy")}),CFe=b(()=>{oTe(),e(),uTe(),EFe(),pFe(),fFe=mt((e,n)=>{lTe(e,n);var t,r,i=[];for(t of e.TreemapRows??[])"ClassDefStatement"===t.$type&&n.addClass(t.className??"",t.styleText??"");for(r of e.TreemapRows??[]){var a,s,o,l=r.item;l&&(o=r.indent?parseInt(r.indent):0,a=mFe(l),s=0<(s=l.classSelector?n.getStylesForClass(l.classSelector):[]).length?s.join(";"):void 0,o={level:o,name:a,type:l.$type,value:l.value,classSelector:l.classSelector,cssCompiledStyles:s},i.push(o))}let c=gFe(i),h=mt((e,t)=>{for(var r of e)n.addNode(r,t),r.children&&0<r.children.length&&h(r.children,t+1)},"addNodesRecursively");h(c,0)},"populate"),mFe=mt(e=>e.name?String(e.name):"","getItemName"),yFe={parser:{yy:void 0},parse:mt(async e=>{try{var t=await nTe("treemap",e),r=(D.debug("Treemap AST:",t),yFe.parser?.yy);if(!(r instanceof uFe))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.");fFe(t,r)}catch(e){throw D.error("Error parsing treemap:",e),e}},"parse")}}),_Fe=b(()=>{LEe(),Jhe(),lh(),i6(),MN(),rn(),e(),vFe=mt((e,a,t,s)=>{let r=s.db,o=r.getConfig(),l=o.padding??10,c=r.getDiagramTitle(),h=r.getRoot(),u=ar().themeVariables;if(h){var s=c?30:0,d=kEe(a),p=o.nodeWidth?10*o.nodeWidth:960,g=o.nodeHeight?10*o.nodeHeight:500,f=p,m=g+s;d.attr("viewBox",`0 0 ${f} `+m),Zc(d,m,f,o.useMaxWidth);let r;try{var y=o.valueFormat||",";if("$0,0"===y)r=mt(e=>"$"+rv(",")(e),"valueFormat");else if(y.startsWith("$")&&y.includes(",")){let e=/\.\d+/.exec(y),t=e?e[0]:"";r=mt(e=>"$"+rv(","+t)(e),"valueFormat")}else if(y.startsWith("$")){let t=y.substring(1);r=mt(e=>"$"+rv(t||"")(e),"valueFormat")}else r=rv(y)}catch(e){D.error("Error creating format function:",e),r=rv(",")}let t=yx().range(["transparent",u.cScale0,u.cScale1,u.cScale2,u.cScale3,u.cScale4,u.cScale5,u.cScale6,u.cScale7,u.cScale8,u.cScale9,u.cScale10,u.cScale11]),n=yx().range(["transparent",u.cScalePeer0,u.cScalePeer1,u.cScalePeer2,u.cScalePeer3,u.cScalePeer4,u.cScalePeer5,u.cScalePeer6,u.cScalePeer7,u.cScalePeer8,u.cScalePeer9,u.cScalePeer10,u.cScalePeer11]),i=yx().range([u.cScaleLabel0,u.cScaleLabel1,u.cScaleLabel2,u.cScaleLabel3,u.cScaleLabel4,u.cScaleLabel5,u.cScaleLabel6,u.cScaleLabel7,u.cScaleLabel8,u.cScaleLabel9,u.cScaleLabel10,u.cScaleLabel11]);c&&d.append("text").attr("x",f/2).attr("y",s/2).attr("class","treemapTitle").attr("text-anchor","middle").attr("dominant-baseline","middle").text(c),m=d.append("g").attr("transform",`translate(0, ${s})`).attr("class","treemapContainer"),y=Gv(h).sum(e=>e.value??0).sort((e,t)=>(t.value??0)-(e.value??0)),s=(f=hx().size([p,g]).paddingTop(e=>e.children&&0<e.children.length?35:0).paddingInner(l).paddingLeft(e=>e.children&&0<e.children.length?10:0).paddingRight(e=>e.children&&0<e.children.length?10:0).paddingBottom(e=>e.children&&0<e.children.length?10:0).round(!0)(y)).descendants().filter(e=>e.children&&0<e.children.length),(p=m.selectAll(".treemapSection").data(s).enter().append("g").attr("class","treemapSection").attr("transform",e=>`translate(${e.x0},${e.y0})`)).append("rect").attr("width",e=>e.x1-e.x0).attr("height",25).attr("class","treemapSectionHeader").attr("fill","none").attr("fill-opacity",.6).attr("stroke-width",.6).attr("style",e=>0===e.depth?"display: none;":""),p.append("clipPath").attr("id",(e,t)=>`clip-section-${a}-`+t).append("rect").attr("width",e=>Math.max(0,e.x1-e.x0-12)).attr("height",25),p.append("rect").attr("width",e=>e.x1-e.x0).attr("height",e=>e.y1-e.y0).attr("class",(e,t)=>"treemapSection section"+t).attr("fill",e=>t(e.data.name)).attr("fill-opacity",.6).attr("stroke",e=>n(e.data.name)).attr("stroke-width",2).attr("stroke-opacity",.4).attr("style",e=>0===e.depth?"display: none;":(e=Q({cssCompiledStyles:e.data.cssCompiledStyles})).nodeStyles+";"+e.borderStyles.join(";")),p.append("text").attr("class","treemapSectionLabel").attr("x",6).attr("y",12.5).attr("dominant-baseline","middle").text(e=>0===e.depth?"":e.data.name).attr("font-weight","bold").attr("style",e=>0===e.depth?"display: none;":"dominant-baseline: middle; font-size: 12px; fill:"+i(e.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;"+Q({cssCompiledStyles:e.data.cssCompiledStyles}).labelStyles.replace("color:","fill:")).each(function(e){if(0!==e.depth){var t=H(this),r=e.data.name,n=(t.text(r),e.x1-e.x0),e=!1!==o.showValues&&e.value?n-10-30-10-6:n-6-6,i=Math.max(15,e),a=t.node();if(a.getComputedTextLength()>i){let e=r;for(;0<e.length;){if(0===(e=r.substring(0,e.length-1)).length){t.text("..."),a.getComputedTextLength()>i&&t.text("");break}if(t.text(e+"..."),a.getComputedTextLength()<=i)break}}}}),!1!==o.showValues&&p.append("text").attr("class","treemapSectionValue").attr("x",e=>e.x1-e.x0-10).attr("y",12.5).attr("text-anchor","end").attr("dominant-baseline","middle").text(e=>e.value?r(e.value):"").attr("font-style","italic").attr("style",e=>0===e.depth?"display: none;":"text-anchor: end; dominant-baseline: middle; font-size: 10px; fill:"+i(e.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;"+Q({cssCompiledStyles:e.data.cssCompiledStyles}).labelStyles.replace("color:","fill:")),g=f.leaves(),(y=m.selectAll(".treemapLeafGroup").data(g).enter().append("g").attr("class",(e,t)=>`treemapNode treemapLeafGroup leaf${t}${e.data.classSelector?" "+e.data.classSelector:""}x`).attr("transform",e=>`translate(${e.x0},${e.y0})`)).append("rect").attr("width",e=>e.x1-e.x0).attr("height",e=>e.y1-e.y0).attr("class","treemapLeaf").attr("fill",e=>e.parent?t(e.parent.data.name):t(e.data.name)).attr("style",e=>Q({cssCompiledStyles:e.data.cssCompiledStyles}).nodeStyles).attr("fill-opacity",.3).attr("stroke",e=>e.parent?t(e.parent.data.name):t(e.data.name)).attr("stroke-width",3),y.append("clipPath").attr("id",(e,t)=>`clip-${a}-`+t).append("rect").attr("width",e=>Math.max(0,e.x1-e.x0-4)).attr("height",e=>Math.max(0,e.y1-e.y0-4)),y.append("text").attr("class","treemapLabel").attr("x",e=>(e.x1-e.x0)/2).attr("y",e=>(e.y1-e.y0)/2).attr("style",e=>"text-anchor: middle; dominant-baseline: middle; font-size: 38px;fill:"+i(e.data.name)+";"+Q({cssCompiledStyles:e.data.cssCompiledStyles}).labelStyles.replace("color:","fill:")).attr("clip-path",(e,t)=>`url(#clip-${a}-${t})`).text(e=>e.data.name).each(function(e){var n=H(this),t=e.x1-e.x0,e=e.y1-e.y0,i=n.node(),a=t-8,s=e-8;if(a<10||s<10)n.style("display","none");else{let e=parseInt(n.style("font-size"),10);for(;i.getComputedTextLength()>a&&8<e;)e--,n.style("font-size",e+"px");let t=Math.max(6,Math.min(28,Math.round(.6*e))),r=e+2+t;for(;r>s&&8<e&&(e--,!((t=Math.max(6,Math.min(28,Math.round(.6*e))))<6&&8===e));)n.style("font-size",e+"px"),r=e+2+t,t<=6&&r;n.style("font-size",e+"px"),(i.getComputedTextLength()>a||e<8||s<e)&&n.style("display","none")}}),!1!==o.showValues&&y.append("text").attr("class","treemapValue").attr("x",e=>(e.x1-e.x0)/2).attr("y",function(e){return(e.y1-e.y0)/2}).attr("style",e=>"text-anchor: middle; dominant-baseline: hanging; font-size: 28px;fill:"+i(e.data.name)+";"+Q({cssCompiledStyles:e.data.cssCompiledStyles}).labelStyles.replace("color:","fill:")).attr("clip-path",(e,t)=>`url(#clip-${a}-${t})`).text(e=>e.value?r(e.value):"").each(function(e){var t,r,n=H(this),i=this.parentNode;!i||(i=H(i).select(".treemapLabel")).empty()||"none"===i.style("display")||(i=parseFloat(i.style("font-size")),t=Math.max(6,Math.min(28,Math.round(.6*i))),n.style("font-size",t+"px"),i=(e.y1-e.y0)/2+i/2+2,n.attr("y",i),r=e.x1-e.x0,e=e.y1-e.y0-4,r-=8,n.node().getComputedTextLength()>r)||e<i+t||t<6?n.style("display","none"):n.style("display",null)}),s=o.diagramPadding??8,Bhe(d,s,"flowchart",o?.useMaxWidth||!1)}},"draw"),xFe=mt(function(e,t){return t.db.getClasses()},"getClasses"),bFe={draw:vFe,getClasses:xFe}}),SFe=b(()=>{i_(),wFe={sectionStrokeColor:"black",sectionStrokeWidth:"1",sectionFillColor:"#efefef",leafStrokeColor:"black",leafStrokeWidth:"1",leafFillColor:"#efefef",labelColor:"black",labelFontSize:"12px",valueFontSize:"10px",valueColor:"black",titleColor:"black",titleFontSize:"14px"},kFe=mt(({treemap:e}={})=>` + .treemapNode.section { + stroke: ${(e=_C(wFe,e)).sectionStrokeColor}; + stroke-width: ${e.sectionStrokeWidth}; + fill: ${e.sectionFillColor}; + } + .treemapNode.leaf { + stroke: ${e.leafStrokeColor}; + stroke-width: ${e.leafStrokeWidth}; + fill: ${e.leafFillColor}; + } + .treemapLabel { + fill: ${e.labelColor}; + font-size: ${e.labelFontSize}; + } + .treemapValue { + fill: ${e.valueColor}; + font-size: ${e.valueFontSize}; + } + .treemapTitle { + fill: ${e.titleColor}; + font-size: ${e.titleFontSize}; + } + `,"getStyles"),TFe=kFe}),AFe={};OFe(AFe,{diagram:()=>LFe});var LFe,NFe,IFe=b(()=>{pFe(),CFe(),_Fe(),SFe(),LFe={parser:yFe,get db(){return new uFe},renderer:bFe,styles:TFe}}),RFe=(OFe(NFe={},{default:()=>YGe}),Pc(),nh(),sh(),{id:"c4",detector:mt(e=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(e),"detector"),loader:mt(async()=>({id:"c4",diagram:(await Promise.resolve().then(()=>(I_(),L_))).diagram}),"loader")}),MFe={id:"flowchart",detector:mt((e,t)=>"dagre-wrapper"!==t?.flowchart?.defaultRenderer&&"elk"!==t?.flowchart?.defaultRenderer&&/^\s*graph/.test(e),"detector"),loader:mt(async()=>({id:"flowchart",diagram:(await Promise.resolve().then(()=>(hue(),aue))).diagram}),"loader")},DFe="flowchart-v2",b=mt((e,t)=>"dagre-d3"!==t?.flowchart?.defaultRenderer&&("elk"===t?.flowchart?.defaultRenderer&&(t.layout="elk"),!(!/^\s*graph/.test(e)||"dagre-wrapper"!==t?.flowchart?.defaultRenderer)||/^\s*flowchart/.test(e)),"detector"),OFe=mt(async()=>{var e=(await Promise.resolve().then(()=>(hue(),aue))).diagram;return{id:DFe,diagram:e}},"loader"),PFe={id:DFe,detector:b,loader:OFe},BFe={id:"er",detector:mt(e=>/^\s*erDiagram/.test(e),"detector"),loader:mt(async()=>({id:"er",diagram:(await Promise.resolve().then(()=>(kue(),bue))).diagram}),"loader")},$Fe={id:"gitGraph",detector:mt(e=>/^\s*gitGraph/.test(e),"detector"),loader:mt(async()=>({id:"gitGraph",diagram:(await Promise.resolve().then(()=>(M7e(),L7e))).diagram}),"loader")},FFe={id:"gantt",detector:mt(e=>/^\s*gantt/.test(e),"detector"),loader:mt(async()=>({id:"gantt",diagram:(await Promise.resolve().then(()=>(CEe(),fEe))).diagram}),"loader")},zFe={id:"info",detector:mt(e=>/^\s*info/.test(e),"detector"),loader:mt(async()=>({id:"info",diagram:(await Promise.resolve().then(()=>(ZEe(),IEe))).diagram}),"loader")},GFe={id:"pie",detector:mt(e=>/^\s*pie/.test(e),"detector"),loader:mt(async()=>({id:"pie",diagram:(await Promise.resolve().then(()=>(lCe(),rCe))).diagram}),"loader")},UFe="quadrantChart",b=mt(e=>/^\s*quadrantChart/.test(e),"detector"),OFe=mt(async()=>{var e=(await Promise.resolve().then(()=>(qCe(),FCe))).diagram;return{id:UFe,diagram:e}},"loader"),qFe={id:UFe,detector:b,loader:OFe},jFe={id:"xychart",detector:mt(e=>/^\s*xychart(-beta)?/.test(e),"detector"),loader:mt(async()=>({id:"xychart",diagram:(await Promise.resolve().then(()=>(sSe(),J_e))).diagram}),"loader")},YFe="requirement",b=mt(e=>/^\s*requirement(Diagram)?/.test(e),"detector"),OFe=mt(async()=>{var e=(await Promise.resolve().then(()=>(hAe(),pSe))).diagram;return{id:YFe,diagram:e}},"loader"),WFe={id:YFe,detector:b,loader:OFe},HFe={id:"sequence",detector:mt(e=>/^\s*sequenceDiagram/.test(e),"detector"),loader:mt(async()=>({id:"sequence",diagram:(await Promise.resolve().then(()=>(e9e(),$Ae))).diagram}),"loader")},VFe={id:"class",detector:mt((e,t)=>"dagre-wrapper"!==t?.class?.defaultRenderer&&/^\s*classDiagram/.test(e),"detector"),loader:mt(async()=>({id:"class",diagram:(await Promise.resolve().then(()=>(l9e(),s9e))).diagram}),"loader")},XFe="classDiagram",b=mt((e,t)=>!(!/^\s*classDiagram/.test(e)||"dagre-wrapper"!==t?.class?.defaultRenderer)||/^\s*classDiagram-v2/.test(e),"detector"),OFe=mt(async()=>{var e=(await Promise.resolve().then(()=>(W9e(),c9e))).diagram;return{id:XFe,diagram:e}},"loader"),KFe={id:XFe,detector:b,loader:OFe},ZFe={id:"state",detector:mt((e,t)=>"dagre-wrapper"!==t?.state?.defaultRenderer&&/^\s*stateDiagram/.test(e),"detector"),loader:mt(async()=>({id:"state",diagram:(await Promise.resolve().then(()=>(jLe(),ULe))).diagram}),"loader")},QFe="stateDiagram",b=mt((e,t)=>!!(/^\s*stateDiagram-v2/.test(e)||/^\s*stateDiagram/.test(e)&&"dagre-wrapper"===t?.state?.defaultRenderer),"detector"),OFe=mt(async()=>{var e=(await Promise.resolve().then(()=>(TNe(),YLe))).diagram;return{id:QFe,diagram:e}},"loader"),JFe={id:QFe,detector:b,loader:OFe},eze={id:"journey",detector:mt(e=>/^\s*journey/.test(e),"detector"),loader:mt(async()=>({id:"journey",diagram:(await Promise.resolve().then(()=>(YNe(),GNe))).diagram}),"loader")},tze=(e(),LEe(),lh(),b={draw:mt((e,t,r)=>{D.debug(`rendering svg for syntax error +`);var n=(t=kEe(t)).append("g");t.attr("viewBox","0 0 2412 512"),Zc(t,100,512,!0),n.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"),n.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"),n.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"),n.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"),n.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"),n.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"),n.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"),n.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text("mermaid version "+r)},"draw")}),rze={db:{},renderer:b,parser:{parse:mt(()=>{},"parse")}},nze="flowchart-elk",OFe=mt((e,t={})=>!!(/^\s*flowchart-elk/.test(e)||/^\s*(flowchart|graph)/.test(e)&&"elk"===t?.flowchart?.defaultRenderer)&&(t.layout="elk",!0),"detector"),b=mt(async()=>{var e=(await Promise.resolve().then(()=>(hue(),aue))).diagram;return{id:nze,diagram:e}},"loader"),ize={id:nze,detector:OFe,loader:b},aze={id:"timeline",detector:mt(e=>/^\s*timeline/.test(e),"detector"),loader:mt(async()=>({id:"timeline",diagram:(await Promise.resolve().then(()=>(UIe(),$Ie))).diagram}),"loader")},sze={id:"mindmap",detector:mt(e=>/^\s*mindmap/.test(e),"detector"),loader:mt(async()=>({id:"mindmap",diagram:(await Promise.resolve().then(()=>(zRe(),gRe))).diagram}),"loader")},oze={id:"kanban",detector:mt(e=>/^\s*kanban/.test(e),"detector"),loader:mt(async()=>({id:"kanban",diagram:(await Promise.resolve().then(()=>(oMe(),YRe))).diagram}),"loader")},lze={id:"sankey",detector:mt(e=>/^\s*sankey(-beta)?/.test(e),"detector"),loader:mt(async()=>({id:"sankey",diagram:(await Promise.resolve().then(()=>(MDe(),bDe))).diagram}),"loader")},cze={id:"packet",detector:mt(e=>/^\s*packet(-beta)?/.test(e),"detector"),loader:mt(async()=>({id:"packet",diagram:(await Promise.resolve().then(()=>(rOe(),$De))).diagram}),"loader")},hze={id:"radar",detector:mt(e=>/^\s*radar-beta/.test(e),"detector"),loader:mt(async()=>({id:"radar",diagram:(await Promise.resolve().then(()=>(TOe(),xOe))).diagram}),"loader")},uze={id:"block",detector:mt(e=>/^\s*block(-beta)?/.test(e),"detector"),loader:mt(async()=>({id:"block",diagram:(await Promise.resolve().then(()=>(U$e(),h$e))).diagram}),"loader")},dze="architecture",OFe=mt(e=>/^\s*architecture/.test(e),"detector"),b=mt(async()=>{var e=(await Promise.resolve().then(()=>(dFe(),cFe))).diagram;return{id:dze,diagram:e}},"loader"),pze={id:dze,detector:OFe,loader:b},gze=(sh(),Tu(),{id:"treemap",detector:mt(e=>/^\s*treemap/.test(e),"detector"),loader:mt(async()=>({id:"treemap",diagram:(await Promise.resolve().then(()=>(IFe(),AFe))).diagram}),"loader")}),fze=!1,mze=mt(()=>{fze||(fze=!0,Nh("error",rze,e=>"error"===e.toLowerCase().trim()),Nh("---",{db:{clear:mt(()=>{},"clear")},styles:{},renderer:{draw:mt(()=>{},"draw")},parser:{parse:mt(()=>{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:mt(()=>null,"init")},e=>e.toLowerCase().trimStart().startsWith("---")),jc(ize,sze,pze),jc(RFe,oze,KFe,VFe,BFe,FFe,zFe,GFe,WFe,HFe,PFe,MFe,aze,$Fe,JFe,ZFe,eze,qFe,lze,cze,jFe,uze,hze,gze))},"addDiagrams"),yze=(e(),sh(),Tu(),mt(async()=>{D.debug("Loading registered diagrams");var e=(await Promise.allSettled(Object.entries(Uc).map(async([e,{detector:t,loader:r}])=>{if(r)try{Ih(e)}catch{try{var{diagram:n,id:i}=await r();Nh(i,n,t)}catch(t){throw D.error(`Failed to load external diagram with key ${e}. Removing from detectors.`),delete Uc[e],t}}}))).filter(e=>"rejected"===e.status);if(0<e.length){D.error(`Failed to load ${e.length} external diagrams`);for(var t of e)D.error(t);throw new Error(`Failed to load ${e.length} external diagrams`)}},"loadRegisteredDiagrams")),vze=(e(),i6(),"comm"),xze="rule",bze="decl",wze=Math.abs,kze=String.fromCharCode;function Tze(e){return e.trim()}function Eze(e,t,r){return e.replace(t,r)}function Cze(e,t,r){return e.indexOf(t,r)}function _ze(e,t){return 0|e.charCodeAt(t)}function Sze(e,t,r){return e.slice(t,r)}function Aze(e){return e.length}function Lze(e){return e.length}function Nze(e,t){return t.push(e),e}mt(Tze,"trim"),mt(Eze,"replace"),mt(Cze,"indexof"),mt(_ze,"charat"),mt(Sze,"substr"),mt(Aze,"strlen"),mt(Lze,"sizeof"),mt(Nze,"append");var Ize=1,Rze=1,Mze=0,Dze=0,Oze=0,Pze="";function Bze(e,t,r,n,i,a,s,o){return{value:e,root:t,parent:r,type:n,props:i,children:a,line:Ize,column:Rze,length:s,return:"",siblings:o}}function $ze(){return Oze=0<Dze?_ze(Pze,--Dze):0,Rze--,10===Oze&&(Rze=1,Ize--),Oze}function Fze(){return Oze=Dze<Mze?_ze(Pze,Dze++):0,Rze++,10===Oze&&(Rze=1,Ize++),Oze}function zze(){return _ze(Pze,Dze)}function Gze(e,t){return Sze(Pze,e,t)}function Uze(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function qze(e){return Ize=Rze=1,Mze=Aze(Pze=e),Dze=0,[]}function jze(e){return Pze="",e}function Yze(e){return Tze(Gze(Dze-1,Vze(91===e?e+2:40===e?e+1:e)))}function Wze(e){for(;(Oze=zze())&&Oze<33;)Fze();return 2<Uze(e)||3<Uze(Oze)?"":" "}function Hze(e,t){for(;--t&&Fze()&&!(Oze<48||102<Oze||57<Oze&&Oze<65||70<Oze&&Oze<97););return Gze(e,Dze+(t<6&&32==zze()&&32==Fze()))}function Vze(e){for(;Fze();)switch(Oze){case e:return Dze;case 34:case 39:34!==e&&39!==e&&Vze(Oze);break;case 40:41===e&&Vze(e);break;case 92:Fze()}return Dze}function Xze(e,t){for(;Fze()&&e+Oze!==57&&(e+Oze!==84||47!==zze()););return"/*"+Gze(t,Dze-1)+"*"+kze(47===e?e:Fze())}function Kze(e){for(;!Uze(zze());)Fze();return Gze(e,Dze)}function Zze(e){return jze(Qze("",null,null,null,[""],e=qze(e),0,[0],e))}function Qze(e,t,r,n,i,a,s,o,l){for(var c,h,u,d=0,p=0,g=s,f=0,m=0,y=1,v=1,x=1,b=0,w="",k=i,T=w;v;)switch(c=b,b=Fze()){case 40:if(108!=c&&58==_ze(T,g-1)){-1!=Cze(T+=Eze(Yze(b),"&","&\f"),"&\f",wze(d?o[d-1]:0))&&(x=-1);break}case 34:case 39:case 91:T+=Yze(b);break;case 9:case 10:case 13:case 32:T+=Wze(c);break;case 92:T+=Hze(Dze-1,7);continue;case 47:switch(zze()){case 42:case 47:Nze(eGe(Xze(Fze(),Dze),t,r,l),l),5!=Uze(c||1)&&5!=Uze(zze()||1)||!Aze(T)||" "===Sze(T,-1,void 0)||(T+=" ");break;default:T+="/"}break;case 123*y:o[d++]=Aze(T)*x;case 125*y:case 59:case 0:switch(b){case 0:case 125:v=0;case 59+p:-1==x&&(T=Eze(T,/\f/g,"")),0<m&&(Aze(T)-g||0===y&&47===c)&&Nze(32<m?tGe(T+";",n,r,g-1,l):tGe(Eze(T," ","")+";",n,r,g-2,l),l);break;case 59:T+=";";default:if(Nze(u=Jze(T,t,r,d,p,i,o,w,k=[],h=[],g,a),a),123===b)if(0===p)Qze(T,t,u,u,k,a,g,o,h);else{switch(f){case 99:if(110===_ze(T,3))break;case 108:if(97===_ze(T,2))break;default:p=0;case 100:case 109:case 115:}p?Qze(e,u,u,n&&Nze(Jze(e,u,u,0,0,i,o,w,i,k=[],g,h),h),i,h,g,o,n?k:h):Qze(T,u,u,u,[""],h,0,o,h)}}d=p=m=0,y=x=1,w=T="",g=s;break;case 58:g=1+Aze(T),m=c;default:if(y<1)if(123==b)--y;else if(125==b&&0==y++&&125==$ze())continue;switch(T+=kze(b),b*y){case 38:x=0<p?1:(T+="\f",-1);break;case 44:o[d++]=(Aze(T)-1)*x,x=1;break;case 64:45===zze()&&(T+=Yze(Fze())),f=zze(),p=g=Aze(w=T+=Kze(Dze)),b++;break;case 45:45===c&&2==Aze(T)&&(y=0)}}return a}function Jze(e,t,r,n,i,a,s,o,l,c,h,u){for(var d,p=i-1,g=0===i?a:[""],f=Lze(g),m=0,y=0;m<n;++m)for(var v,x=0,b=Sze(e,p+1,p=wze(d=s[m]));x<f;++x)(v=Tze(0<d?g[x]+" "+b:Eze(b,/&\f/g,g[x])))&&(l[y++]=v);return Bze(e,t,r,0===i?xze:o,l,c,h,u)}function eGe(e,t,r,n){return Bze(e,t,r,vze,kze(Oze),Sze(e,2,-2),0,n)}function tGe(e,t,r,n,i){return Bze(e,t,r,bze,Sze(e,0,n),Sze(e,n+1,-1),n,i)}function rGe(e,t){for(var r="",n=0;n<e.length;n++)r+=t(e[n],n,e,t)||"";return r}function nGe(e,t,r,n){switch(e.type){case"@layer":if(e.children.length)break;case"@import":case"@namespace":case bze:return e.return=e.return||e.value;case vze:return"";case"@keyframes":return e.return=e.value+"{"+rGe(e.children,n)+"}";case xze:if(!Aze(e.value=e.props.join(",")))return""}return Aze(r=rGe(e.children,n))?e.return=e.value+"{"+r+"}":""}function iGe(e,t){e.attr("role","graphics-document document"),""!==t&&e.attr("aria-roledescription",t)}function aGe(e,t,r,n){var i;void 0!==e.insert&&(r&&(e.attr("aria-describedby",i="chart-desc-"+n),e.insert("desc",":first-child").attr("id",i).text(r)),t)&&(e.attr("aria-labelledby",i="chart-title-"+n),e.insert("title",":first-child").attr("id",i).text(t))}mt(Bze,"node"),mt(function(){return Oze},"char"),mt($ze,"prev"),mt(Fze,"next"),mt(zze,"peek"),mt(function(){return Dze},"caret"),mt(Gze,"slice"),mt(Uze,"token"),mt(qze,"alloc"),mt(jze,"dealloc"),mt(Yze,"delimit"),mt(Wze,"whitespace"),mt(Hze,"escaping"),mt(Vze,"delimiter"),mt(Xze,"commenter"),mt(Kze,"identifier"),mt(Zze,"compile"),mt(Qze,"parse"),mt(Jze,"ruleset"),mt(eGe,"comment"),mt(tGe,"declaration"),mt(rGe,"serialize"),mt(nGe,"stringify"),oi(),_j(),SEe(),mt(iGe,"setA11yDiagramInfo"),mt(aGe,"addSVGa11yTitleDescription"),mr(),rn(),rn(),Tu(),sh(),ah(),i_();var sGe=class WGe{constructor(e,t,r,n,i){this.type=e,this.text=t,this.db=r,this.parser=n,this.renderer=i}static{mt(this,"Diagram")}static async fromText(e,t={}){var r=ar(),n=qc(e,r);e=t_(e)+` +`;try{Ih(n)}catch{if(!(i=Wc(n)))throw new Gc(`Diagram ${n} not found.`);var{id:i,diagram:a}=await i();Nh(i,a)}var{db:i,parser:a,renderer:s,init:o}=Ih(n);return a.parser&&(a.parser.yy=i),i.clear?.(),o?.(r),t.title&&i.setDiagramTitle?.(t.title),await a.parse(e),new WGe(n,e,i,a,s)}async render(e,t){await this.renderer.draw(this.text,e,t,this)}getParser(){return this.parser}getType(){return this.type}},oGe=(Oc(),[]),lGe=mt(()=>{oGe.forEach(e=>{e()}),oGe=[]},"attachFunctions"),cGe=(e(),mt(e=>e.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments"));function hGe(e){var t,r,n=e.match($c);return n?(r={},(t="object"!=typeof(t=$9(n[1],{schema:B9})??{})||Array.isArray(t)?{}:t).displayMode&&(r.displayMode=t.displayMode.toString()),t.title&&(r.title=t.title.toString()),t.config&&(r.config=t.config),{text:e.slice(n[0].length),metadata:r}):{text:e,metadata:{}}}ih(),F9(),mt(hGe,"extractFrontMatter"),i_();var uGe=mt(e=>e.replace(/\r\n?/g,` +`).replace(/<(\w+)([^>]*)>/g,(e,t,r)=>"<"+t+r.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),dGe=mt(e=>{var{text:e,metadata:t}=hGe(e),{displayMode:t,title:r,config:n={}}=t;return t&&(n.gantt||(n.gantt={}),n.gantt.displayMode=t),{title:r,config:n,text:e}},"processFrontmatter"),pGe=mt(e=>{var t=e_.detectInit(e)??{},r=e_.detectDirective(e,"wrap");return Array.isArray(r)?t.wrap=r.some(({type:e})=>"wrap"===e):"wrap"===r?.type&&(t.wrap=!0),{text:OC(e),directive:t}},"processDirectives");function gGe(e){var t=uGe(e),t=dGe(t),r=pGe(t.text),n=_C(t.config,r.directive);return{code:e=cGe(r.text),title:t.title,config:n}}function fGe(e){return e=(new TextEncoder).encode(e),e=Array.from(e,e=>String.fromCodePoint(e)).join(""),btoa(e)}mt(gGe,"preprocessDiagram"),ch(),Qr(),i_(),mt(fGe,"toBase64");var mGe=["foreignobject"],yGe=["dominant-baseline"];function vGe(e){return e=gGe(e),lr(),or(e.config??{}),e}async function xGe(e,t){mze();try{var{code:r,config:n}=vGe(e);return{diagramType:(await LGe(r)).type,config:n}}catch(e){if(t?.suppressErrors)return!1;throw e}}mt(vGe,"processAndSetConfigs"),mt(xGe,"parse");var bGe=mt((e,t,r=[])=>` +.${e} ${t} { ${r.join(" !important; ")} !important; }`,"cssImportantStyles"),wGe=mt((t,r=new Map)=>{let n="";if(void 0!==t.themeCSS&&(n+=` +`+t.themeCSS),void 0!==t.fontFamily&&(n+=` +:root { --mermaid-font-family: ${t.fontFamily}}`),void 0!==t.altFontFamily&&(n+=` +:root { --mermaid-alt-font-family: ${t.altFontFamily}}`),r instanceof Map){let e=t.htmlLabels??t.flowchart?.htmlLabels?["> *","span"]:["rect","polygon","ellipse","circle","path"];r.forEach(t=>{Cj(t.styles)||e.forEach(e=>{n+=bGe(t.id,e,t.styles)}),Cj(t.textStyles)||(n+=bGe(t.id,"tspan",(t?.textStyles||[]).map(e=>e.replace("color","fill"))))})}return n},"createCssStyles"),kGe=mt((e,t,r,n)=>(r=wGe(e,r),rGe(Zze(n+`{${rh(t,r,e.themeVariables)}}`),nGe)),"createUserStyles"),TGe=mt((e="",t,r)=>{let n=e;return r||t||(n=n.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),n=(n=r_(n)).replace(/<br>/g,"<br/>")},"cleanUpSvgCode"),EGe=mt((e="",t)=>`<iframe style="width:100%;height:${t?.viewBox?.baseVal?.height?t.viewBox.baseVal.height+"px":"100%"};border:0;margin:0;" src="data:text/html;charset=UTF-8;base64,${fGe(`<body style="margin:0">${e}</body>`)}" sandbox="allow-top-navigation-by-user-activation allow-popups"> + The "iframe" tag is not supported by your browser. +</iframe>`,"putIntoIFrame"),CGe=mt((e,t,r,n,i)=>{var a=e.append("div"),r=(a.attr("id",r),n&&a.attr("style",n),a.append("svg").attr("id",t).attr("width","100%").attr("xmlns","http://www.w3.org/2000/svg"));return i&&r.attr("xmlns:xlink",i),r.append("g"),e},"appendDivSvgG");function _Ge(e,t){return e.append("iframe").attr("id",t).attr("style","width: 100%; height: 100%;").attr("sandbox","")}mt(_Ge,"sandboxedIframe");var SGe=mt((e,t,r,n)=>{e.getElementById(t)?.remove(),e.getElementById(r)?.remove(),e.getElementById(n)?.remove()},"removeExistingElements"),OFe=mt(async function(e,t,r){mze();var n=vGe(t),i=(t=n.code,ar());D.debug(i),t.length>(i?.maxTextSize??5e4)&&(t="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa");let a="#"+e,s="i"+e,o="#"+s,l="d"+e,c="#"+l,h=mt(()=>{var e=H(d?o:c).node();e&&"remove"in e&&e.remove()},"removeTempElements"),u=H("body"),d="sandbox"===i.securityLevel,p="loose"===i.securityLevel,g=i.fontFamily;void 0!==r?(r&&(r.innerHTML=""),d?(y=_Ge(H(r),s),(u=H(y.nodes()[0].contentDocument.body)).node().style.margin=0):u=H(r),CGe(u,e,l,"font-family: "+g,"http://www.w3.org/1999/xlink")):(SGe(document,e,l,s),d?(y=_Ge(H("body"),s),(u=H(y.nodes()[0].contentDocument.body)).node().style.margin=0):u=H("body"),CGe(u,e,l));let f,m;try{f=await sGe.fromText(t,{title:n.title})}catch(r){if(i.suppressErrorRendering)throw h(),r;f=await sGe.fromText("error"),m=r}var r=u.select(c).node(),y=f.type,r=(n=r.firstChild).firstChild,v=f.renderer.getClasses?.(t,f),v=kGe(i,y,v,a),x=document.createElement("style");x.innerHTML=v,n.insertBefore(x,r);try{await f.renderer.draw(t,e,vEe.version,f)}catch(r){throw i.suppressErrorRendering?h():tze.draw(t,e,vEe.version),r}NGe(y,u.select(c+" svg"),f.db.getAccTitle?.(),f.db.getAccDescription?.()),u.select(`[id="${e}"]`).selectAll("foreignobject > *").attr("xmlns","http://www.w3.org/1999/xhtml");let b=u.select(c).node().innerHTML;if(D.debug("config.arrowMarkerAbsolute",i.arrowMarkerAbsolute),b=TGe(b,d,fc(i.arrowMarkerAbsolute)),d?(v=u.select(c+" svg").node(),b=EGe(b,v)):p||(b=si.sanitize(b,{ADD_TAGS:mGe,ADD_ATTR:yGe,HTML_INTEGRATION_POINTS:{foreignobject:!0}})),lGe(),m)throw m;return h(),{diagramType:y,svg:b,bindFunctions:f.db.bindFunctions}},"render");function AGe(e={}){(e=Ae({},e))?.fontFamily&&!e.themeVariables?.fontFamily&&(e.themeVariables||(e.themeVariables={}),e.themeVariables.fontFamily=e.fontFamily),tr(e),e?.theme&&e.theme in zt?e.themeVariables=zt[e.theme].getThemeVariables(e.themeVariables):e&&(e.themeVariables=zt.default.getThemeVariables(e.themeVariables)),e="object"==typeof e?er(e):nr(),Ie(e.logLevel),mze()}mt(AGe,"initialize");var LGe=mt((e,t={})=>(e=gGe(e).code,sGe.fromText(e,t)),"getDiagramFromText");function NGe(e,t,r,n){iGe(t,e),aGe(t,r,n,t.attr("id"))}mt(NGe,"addA11yInfo");var IGe=Object.freeze({render:OFe,parse:xGe,getDiagramFromText:LGe,initialize:AGe,getConfig:ar,setConfig:ir,getSiteConfig:nr,updateSiteConfig:rr,reset:mt(()=>{lr()},"reset"),globalReset:mt(()=>{lr(Vt)},"globalReset"),defaultConfig:Vt}),RGe=(Ie(ar().logLevel),lr(ar()),Qhe(),i_(),mt((e,t,r)=>{D.warn(e),CC(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")),MGe=mt(async function(t={querySelector:".mermaid"}){try{await DGe(t)}catch(e){if(CC(e)&&D.error(e.str),jGe.parseError&&jGe.parseError(e),!t.suppressErrors)throw D.error("Use the suppressErrors option to suppress these errors"),e}},"run"),DGe=mt(async function({postRenderCallback:e,querySelector:t,nodes:r}={querySelector:".mermaid"}){var n=IGe.getConfig();D.debug(`${e?"":"No "}Callback function found`);let i;if(r)i=r;else{if(!t)throw new Error("Nodes and querySelector are both undefined");i=document.querySelectorAll(t)}D.debug(`Found ${i.length} diagrams`),void 0!==n?.startOnLoad&&(D.debug("Start On Load: "+n?.startOnLoad),IGe.updateSiteConfig({startOnLoad:n?.startOnLoad}));var a,s=new e_.InitIDGenerator(n.deterministicIds,n.deterministicIDSeed),o=[];for(a of Array.from(i))if(D.info("Rendering diagram: "+a.id),!a.getAttribute("data-processed")){a.setAttribute("data-processed","true");var l="mermaid-"+s.next(),c=a.innerHTML,h=(c=Bc(e_.entityDecode(c)).trim().replace(/<br\s*\/?>/gi,"<br/>"),e_.detectInit(c));h&&D.debug("Detected early reinit: ",h);try{var{svg:u,bindFunctions:d}=await UGe(l,c,a);a.innerHTML=u,e&&await e(l),d&&d(a)}catch(e){RGe(e,o,jGe.parseError)}}if(0<o.length)throw o[0]},"runThrowsErrors"),OGe=mt(function(e){IGe.initialize(e)},"initialize"),b=mt(async function(e,t,r){D.warn("mermaid.init is deprecated. Please use run instead."),e&&OGe(e),e={postRenderCallback:r,querySelector:".mermaid"},"string"==typeof t?e.querySelector=t:t&&(t instanceof HTMLElement?e.nodes=[t]:e.nodes=t),await MGe(e)},"init"),OFe=mt(async(e,{lazyLoad:t=!0}={})=>{mze(),jc(...e),!1===t&&await yze()},"registerExternalDiagrams"),PGe=mt(function(){jGe.startOnLoad&&IGe.getConfig().startOnLoad&&jGe.run().catch(e=>D.error("Mermaid failed to initialize",e))},"contentLoaded"),BGe=(typeof document<"u"&&window.addEventListener("load",PGe,!1),mt(function(e){jGe.parseError=e},"setParseErrorHandler")),$Ge=[],FGe=!1,zGe=mt(async()=>{if(!FGe){for(FGe=!0;0<$Ge.length;){var e=$Ge.shift();if(e)try{await e()}catch(e){D.error("Error executing queue",e)}}FGe=!1}},"executeQueue"),GGe=mt(async(a,s)=>new Promise((n,i)=>{var e=mt(()=>new Promise((t,r)=>{IGe.parse(a,s).then(e=>{t(e),n(e)},e=>{D.error("Error parsing",e),jGe.parseError?.(e),r(e),i(e)})}),"performCall");$Ge.push(e),zGe().catch(i)}),"parse"),UGe=mt((a,s,o)=>new Promise((n,i)=>{var e=mt(()=>new Promise((t,r)=>{IGe.render(a,s,o).then(e=>{t(e),n(e)},e=>{D.error("Error parsing",e),jGe.parseError?.(e),r(e),i(e)})}),"performCall");$Ge.push(e),zGe().catch(i)}),"render"),qGe=mt(()=>Object.keys(Uc).map(e=>({id:e})),"getRegisteredDiagramsMetadata"),jGe={startOnLoad:!0,mermaidAPI:IGe,parse:GGe,render:UGe,init:b,run:MGe,registerExternalDiagrams:OFe,registerLayoutLoaders:Dhe,initialize:OGe,parseError:void 0,contentLoaded:PGe,setParseErrorHandler:BGe,detectType:qc,registerIconPacks:Ic,getRegisteredDiagramsMetadata:qGe},YGe=jGe,GGe=NFe;return G(R({},"__esModule",{value:!0}),GGe)})(),globalThis.mermaid=globalThis.__esbuild_esm_mermaid_nm.mermaid.default; diff --git a/static/js/searchElasticlunr.js b/static/js/searchElasticlunr.js index e6c8aee..9ad09e1 100644 --- a/static/js/searchElasticlunr.js +++ b/static/js/searchElasticlunr.js @@ -2675,6 +2675,7 @@ window.onload = function () { results.innerHTML = ''; resultsContainer.style.display = 'none'; searchInput.removeAttribute('aria-activedescendant'); + clearSearchButton.style.display = 'none'; } // Close modal when clicking/tapping outside. @@ -2685,7 +2686,7 @@ window.onload = function () { event.stopPropagation(); // Prevents tapping through the modal. } searchModal.addEventListener('click', handleModalInteraction); - searchModal.addEventListener('touchend', handleModalInteraction); + searchModal.addEventListener('touchend', handleModalInteraction, { passive: true }); // Close modal when pressing escape. document.addEventListener('keydown', function (event) { @@ -2710,7 +2711,7 @@ window.onload = function () { // Clicking/tapping the search button opens the modal. searchButton.addEventListener('mouseover', loadSearchIndex); searchButton.addEventListener('click', openSearchModal); - searchButton.addEventListener('touchstart', openSearchModal); + searchButton.addEventListener('touchstart', openSearchModal, { passive: true }); let searchIndexPromise = null; function loadSearchIndex() { @@ -2941,10 +2942,13 @@ window.onload = function () { searchInput.addEventListener( 'input', async function () { - const searchTerm = this.value.trim(); + const inputValue = this.value; + const searchTerm = inputValue.trim(); const searchIndex = await searchIndexPromise; results.innerHTML = ''; + // Use the raw input so the "clear" button appears even if there's only spaces. + clearSearchButton.style.display = inputValue.length > 0 ? 'block' : 'none'; resultsContainer.style.display = searchTerm.length > 0 ? 'block' : 'none'; // Perform the search and store the results. @@ -3013,6 +3017,24 @@ window.onload = function () { } }); + results.addEventListener('click', function(event) { + const clickedElement = event.target.closest('a'); + if (clickedElement) { + const clickedHref = clickedElement.getAttribute('href'); + const currentPageUrl = window.location.href; + + // Normalise URLs by removing the text fragment and trailing slash. + const normalizeUrl = (url) => url.split('#')[0].replace(/\/$/, ''); + + // Check if the clicked link matches the current page. + // If using Ctrl+click or Cmd+click, don't close the modal. + if (normalizeUrl(clickedHref) === normalizeUrl(currentPageUrl) && + !event.ctrlKey && !event.metaKey) { + closeModal(); + } + } + }); + // Add touch events to the results. setupTouchEvents(); }, @@ -3087,7 +3109,7 @@ window.onload = function () { resultDivs.forEach((div) => { // Remove existing listener to avoid duplicates. div.removeEventListener('touchstart', handleTouchStart); - div.addEventListener('touchstart', handleTouchStart); + div.addEventListener('touchstart', handleTouchStart, { passive: true }); }); } diff --git a/static/js/searchElasticlunr.min.js b/static/js/searchElasticlunr.min.js index b6b11a9..291bc7a 100644 --- a/static/js/searchElasticlunr.min.js +++ b/static/js/searchElasticlunr.min.js @@ -1 +1 @@ -!function(){function p(e){var t=new p.Index;return t.pipeline.add(p.trimmer,p.stopWordFilter,p.stemmer),e&&e.call(t,t),t}var t;p.version="0.9.5",(lunr=p).utils={},p.utils.warn=(t=this,function(e){t.console&&console.warn&&console.warn(e)}),p.utils.toString=function(e){return null==e?"":e.toString()},(p.EventEmitter=function(){this.events={}}).prototype.addListener=function(){var e=Array.prototype.slice.call(arguments);const t=e.pop();if("function"!=typeof t)throw new TypeError("last argument must be a function");e.forEach(function(e){this.hasHandler(e)||(this.events[e]=[]),this.events[e].push(t)},this)},p.EventEmitter.prototype.removeListener=function(e,t){this.hasHandler(e)&&-1!==(t=this.events[e].indexOf(t))&&(this.events[e].splice(t,1),0===this.events[e].length)&&delete this.events[e]},p.EventEmitter.prototype.emit=function(e){if(this.hasHandler(e)){const t=Array.prototype.slice.call(arguments,1);this.events[e].forEach(function(e){e.apply(void 0,t)},this)}},p.EventEmitter.prototype.hasHandler=function(e){return e in this.events},(p.tokenizer=function(n){if(!arguments.length||null==n)return[];if(Array.isArray(n)){let e=n.filter(function(e){return null!=e}),t=(e=e.map(function(e){return p.utils.toString(e).toLowerCase()}),[]);return e.forEach(function(e){e=e.split(p.tokenizer.seperator),t=t.concat(e)},this),t}return n.toString().trim().toLowerCase().split(p.tokenizer.seperator)}).defaultSeperator=/[\s-]+/,p.tokenizer.seperator=p.tokenizer.defaultSeperator,p.tokenizer.setSeperator=function(e){null!=e&&"object"==typeof e&&(p.tokenizer.seperator=e)},p.tokenizer.resetSeperator=function(){p.tokenizer.seperator=p.tokenizer.defaultSeperator},p.tokenizer.getSeperator=function(){return p.tokenizer.seperator},(p.Pipeline=function(){this._queue=[]}).registeredFunctions={},p.Pipeline.registerFunction=function(e,t){t in p.Pipeline.registeredFunctions&&p.utils.warn("Overwriting existing registered function: "+t),e.label=t,p.Pipeline.registeredFunctions[t]=e},p.Pipeline.getRegisteredFunction=function(e){return e in p.Pipeline.registeredFunctions!=1?null:p.Pipeline.registeredFunctions[e]},p.Pipeline.warnIfFunctionNotRegistered=function(e){e.label&&e.label in this.registeredFunctions||p.utils.warn("Function is not registered with pipeline. This may cause problems when serialising the index.\n",e)},p.Pipeline.load=function(e){const n=new p.Pipeline;return e.forEach(function(e){var t=p.Pipeline.getRegisteredFunction(e);if(!t)throw new Error("Cannot load un-registered function: "+e);n.add(t)}),n},p.Pipeline.prototype.add=function(){Array.prototype.slice.call(arguments).forEach(function(e){p.Pipeline.warnIfFunctionNotRegistered(e),this._queue.push(e)},this)},p.Pipeline.prototype.after=function(e,t){if(p.Pipeline.warnIfFunctionNotRegistered(t),-1===(e=this._queue.indexOf(e)))throw new Error("Cannot find existingFn");this._queue.splice(e+1,0,t)},p.Pipeline.prototype.before=function(e,t){if(p.Pipeline.warnIfFunctionNotRegistered(t),-1===(e=this._queue.indexOf(e)))throw new Error("Cannot find existingFn");this._queue.splice(e,0,t)},p.Pipeline.prototype.remove=function(e){-1!==(e=this._queue.indexOf(e))&&this._queue.splice(e,1)},p.Pipeline.prototype.run=function(o){var e=[],t=o.length,i=this._queue.length;for(let n=0;n<t;n++){let t=o[n];for(let e=0;e<i&&void 0!==(t=this._queue[e](t,n,o))&&null!==t;e++);null!=t&&e.push(t)}return e},p.Pipeline.prototype.reset=function(){this._queue=[]},p.Pipeline.prototype.get=function(){return this._queue},p.Pipeline.prototype.toJSON=function(){return this._queue.map(function(e){return p.Pipeline.warnIfFunctionNotRegistered(e),e.label})},(p.Index=function(){this._fields=[],this._ref="id",this.pipeline=new p.Pipeline,this.documentStore=new p.DocumentStore,this.index={},this.eventEmitter=new p.EventEmitter,this._idfCache={},this.on("add","remove","update",function(){this._idfCache={}}.bind(this))}).prototype.on=function(){var e=Array.prototype.slice.call(arguments);return this.eventEmitter.addListener.apply(this.eventEmitter,e)},p.Index.prototype.off=function(e,t){return this.eventEmitter.removeListener(e,t)},p.Index.load=function(e){e.version!==p.version&&p.utils.warn("version mismatch: current "+p.version+" importing "+e.version);var t=new this;t._fields=e.fields,t._ref=e.ref,t.documentStore=p.DocumentStore.load(e.documentStore),t.pipeline=p.Pipeline.load(e.pipeline),t.index={};for(const n in e.index)t.index[n]=p.InvertedIndex.load(e.index[n]);return t},p.Index.prototype.addField=function(e){return this._fields.push(e),this.index[e]=new p.InvertedIndex,this},p.Index.prototype.setRef=function(e){return this._ref=e,this},p.Index.prototype.saveDocument=function(e){return this.documentStore=new p.DocumentStore(e),this},p.Index.prototype.addDoc=function(i,e){if(i){e=void 0===e||e;const r=i[this._ref];this.documentStore.addDoc(r,i),this._fields.forEach(function(e){var t=this.pipeline.run(p.tokenizer(i[e]));this.documentStore.addFieldLength(r,e,t.length);const n={};t.forEach(function(e){e in n?n[e]+=1:n[e]=1},this);for(const p in n){var o=n[p],o=Math.sqrt(o);this.index[e].addToken(p,{ref:r,tf:o})}},this),e&&this.eventEmitter.emit("add",i,this)}},p.Index.prototype.removeDocByRef=function(e,t){e&&!1!==this.documentStore.isDocStored()&&this.documentStore.hasDoc(e)&&(e=this.documentStore.getDoc(e),this.removeDoc(e,!1))},p.Index.prototype.removeDoc=function(e,t){if(e){t=void 0===t||t;const n=e[this._ref];this.documentStore.hasDoc(n)&&(this.documentStore.removeDoc(n),this._fields.forEach(function(t){this.pipeline.run(p.tokenizer(e[t])).forEach(function(e){this.index[t].removeToken(e,n)},this)},this),t)&&this.eventEmitter.emit("remove",e,this)}},p.Index.prototype.updateDoc=function(e,t){t=void 0===t||t,this.removeDocByRef(e[this._ref],!1),this.addDoc(e,!1),t&&this.eventEmitter.emit("update",e,this)},p.Index.prototype.idf=function(e,t){var n="@"+t+"/"+e;return Object.prototype.hasOwnProperty.call(this._idfCache,n)?this._idfCache[n]:(t=this.index[t].getDocFreq(e),e=1+Math.log(this.documentStore.length/(t+1)),this._idfCache[n]=e)},p.Index.prototype.getFields=function(){return this._fields.slice()},p.Index.prototype.search=function(t,e){if(!t)return[];t="string"==typeof t?{any:t}:JSON.parse(JSON.stringify(t));let n=null;null!=e&&(n=JSON.stringify(e));var o=new p.Configuration(n,this.getFields()).get(),i={},r=Object.keys(t);for(let e=0;e<r.length;e++){var s=r[e];i[s]=this.pipeline.run(p.tokenizer(t[s]))}var l={};for(const p in o){var u=i[p]||i.any;if(u){var a=this.fieldSearch(u,p,o),c=o[p].boost;for(h in a)a[h]=a[h]*c;for(h in a)h in l?l[h]+=a[h]:l[h]=a[h]}}var d,h,f=[];for(h in l)d={ref:h,score:l[h]},this.documentStore.hasDoc(h)&&(d.doc=this.documentStore.getDoc(h)),f.push(d);return f.sort(function(e,t){return t.score-e.score}),f},p.Index.prototype.fieldSearch=function(e,a,t){const c=t[a].bool,n=t[a].expand;t=t[a].boost;let d=null;const h={};if(0!==t)return e.forEach(function(l){let e=[l];!0===n&&(e=this.index[a].expandToken(l));const u={};e.forEach(function(n){let e=this.index[a].getDocs(n);var o=this.idf(n,a);if(d&&"AND"===c){var i,t={};for(i in d)i in e&&(t[i]=e[i]);e=t}for(i in n===l&&this.fieldSearchStats(h,n,e),e){var r=this.index[a].getTermFrequency(n,i),s=this.documentStore.getFieldLength(i,a);let e=1,t=(0!==s&&(e=1/Math.sqrt(s)),1);n!==l&&(t=.15*(1-(n.length-l.length)/n.length)),s=r*o*e*t,i in u?u[i]+=s:u[i]=s}},this),d=this.mergeScores(d,u,c)},this),d=this.coordNorm(d,h,e.length)},p.Index.prototype.mergeScores=function(e,t,n){if(!e)return t;if("AND"===n){var o={};for(i in t)i in e&&(o[i]=e[i]+t[i]);return o}for(var i in t)i in e?e[i]+=t[i]:e[i]=t[i];return e},p.Index.prototype.fieldSearchStats=function(e,t,n){for(const o in n)o in e?e[o].push(t):e[o]=[t]},p.Index.prototype.coordNorm=function(e,t,n){for(const i in e){var o;i in t&&(o=t[i].length,e[i]=e[i]*o/n)}return e},p.Index.prototype.toJSON=function(){const t={};return this._fields.forEach(function(e){t[e]=this.index[e].toJSON()},this),{version:p.version,fields:this._fields,ref:this._ref,documentStore:this.documentStore.toJSON(),index:t,pipeline:this.pipeline.toJSON()}},p.Index.prototype.use=function(e){var t=Array.prototype.slice.call(arguments,1);t.unshift(this),e.apply(this,t)},(p.DocumentStore=function(e){this._save=null==e||e,this.docs={},this.docInfo={},this.length=0}).load=function(e){var t=new this;return t.length=e.length,t.docs=e.docs,t.docInfo=e.docInfo,t._save=e.save,t},p.DocumentStore.prototype.isDocStored=function(){return this._save},p.DocumentStore.prototype.addDoc=function(e,t){this.hasDoc(e)||this.length++,!0===this._save?this.docs[e]=function(e){if(null===e||"object"!=typeof e)return e;var t=e.constructor();for(const n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t}(t):this.docs[e]=null},p.DocumentStore.prototype.getDoc=function(e){return!1===this.hasDoc(e)?null:this.docs[e]},p.DocumentStore.prototype.hasDoc=function(e){return e in this.docs},p.DocumentStore.prototype.removeDoc=function(e){this.hasDoc(e)&&(delete this.docs[e],delete this.docInfo[e],this.length--)},p.DocumentStore.prototype.addFieldLength=function(e,t,n){null!=e&&0!=this.hasDoc(e)&&(this.docInfo[e]||(this.docInfo[e]={}),this.docInfo[e][t]=n)},p.DocumentStore.prototype.updateFieldLength=function(e,t,n){null!=e&&0!=this.hasDoc(e)&&this.addFieldLength(e,t,n)},p.DocumentStore.prototype.getFieldLength=function(e,t){return null!=e&&e in this.docs&&t in this.docInfo[e]?this.docInfo[e][t]:0},p.DocumentStore.prototype.toJSON=function(){return{docs:this.docs,docInfo:this.docInfo,length:this.length,save:this._save}},p.stemmer=function(){const a={ational:"ate",tional:"tion",enci:"ence",anci:"ance",izer:"ize",bli:"ble",alli:"al",entli:"ent",eli:"e",ousli:"ous",ization:"ize",ation:"ate",ator:"ate",alism:"al",iveness:"ive",fulness:"ful",ousness:"ous",aliti:"al",iviti:"ive",biliti:"ble",logi:"log"},c={icate:"ic",ative:"",alize:"al",iciti:"ic",ical:"ic",ful:"",ness:""};var e="[aeiouy]",t="[^aeiou][^aeiouy]*";const d=new RegExp("^([^aeiou][^aeiouy]*)?[aeiouy][aeiou]*[^aeiou][^aeiouy]*"),h=new RegExp("^([^aeiou][^aeiouy]*)?[aeiouy][aeiou]*[^aeiou][^aeiouy]*[aeiouy][aeiou]*[^aeiou][^aeiouy]*"),f=new RegExp("^([^aeiou][^aeiouy]*)?[aeiouy][aeiou]*[^aeiou][^aeiouy]*([aeiouy][aeiou]*)?$"),p=new RegExp("^([^aeiou][^aeiouy]*)?[aeiouy]"),g=/^(.+?)(ss|i)es$/,m=/^(.+?)([^s])s$/,y=/^(.+?)eed$/,v=/^(.+?)(ed|ing)$/,w=/.$/,S=/(at|bl|iz)$/,b=new RegExp("([^aeiouylsz])\\1$"),x=new RegExp("^"+t+e+"[^aeiouwxy]$"),E=/^(.+?[^aeiou])y$/,I=/^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/,k=/^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/,_=/^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/,D=/^(.+?)(s|t)(ion)$/,F=/^(.+?)e$/,A=/ll$/,P=new RegExp("^"+t+e+"[^aeiouwxy]$");return function(e){let t,n,o,i,r,s,l;var u;return e.length<3||("y"==(o=e.substr(0,1))&&(e=o.toUpperCase()+e.substr(1)),i=g,r=m,i.test(e)?e=e.replace(i,"$1$2"):r.test(e)&&(e=e.replace(r,"$1$2")),i=y,r=v,i.test(e)?(u=i.exec(e),(i=d).test(u[1])&&(i=w,e=e.replace(i,""))):r.test(e)&&(t=(u=r.exec(e))[1],(r=p).test(t))&&(e=t,r=S,s=b,l=x,r.test(e)?e+="e":s.test(e)?(i=w,e=e.replace(i,"")):l.test(e)&&(e+="e")),(i=E).test(e)&&(e=(t=(u=i.exec(e))[1])+"i"),(i=I).test(e)&&(t=(u=i.exec(e))[1],n=u[2],(i=d).test(t))&&(e=t+a[n]),(i=k).test(e)&&(t=(u=i.exec(e))[1],n=u[2],(i=d).test(t))&&(e=t+c[n]),i=_,r=D,i.test(e)?(t=(u=i.exec(e))[1],(i=h).test(t)&&(e=t)):r.test(e)&&(t=(u=r.exec(e))[1]+u[2],(r=h).test(t))&&(e=t),(i=F).test(e)&&(t=(u=i.exec(e))[1],i=h,r=f,s=P,i.test(t)||r.test(t)&&!s.test(t))&&(e=t),i=A,r=h,i.test(e)&&r.test(e)&&(i=w,e=e.replace(i,"")),"y"==o&&(e=o.toLowerCase()+e.substr(1))),e}}(),p.Pipeline.registerFunction(p.stemmer,"stemmer"),p.stopWordFilter=function(e){if(e&&!0!==p.stopWordFilter.stopWords[e])return e},p.clearStopWords=function(){p.stopWordFilter.stopWords={}},p.addStopWords=function(e){null!=e&&!1!==Array.isArray(e)&&e.forEach(function(e){p.stopWordFilter.stopWords[e]=!0},this)},p.resetStopWords=function(){p.stopWordFilter.stopWords=p.defaultStopWords},p.stopWordFilter.stopWords=p.defaultStopWords={"":!0,a:!0,able:!0,about:!0,across:!0,after:!0,all:!0,almost:!0,also:!0,am:!0,among:!0,an:!0,and:!0,any:!0,are:!0,as:!0,at:!0,be:!0,because:!0,been:!0,but:!0,by:!0,can:!0,cannot:!0,could:!0,dear:!0,did:!0,do:!0,does:!0,either:!0,else:!0,ever:!0,every:!0,for:!0,from:!0,get:!0,got:!0,had:!0,has:!0,have:!0,he:!0,her:!0,hers:!0,him:!0,his:!0,how:!0,however:!0,i:!0,if:!0,in:!0,into:!0,is:!0,it:!0,its:!0,just:!0,least:!0,let:!0,like:!0,likely:!0,may:!0,me:!0,might:!0,most:!0,must:!0,my:!0,neither:!0,no:!0,nor:!0,not:!0,of:!0,off:!0,often:!0,on:!0,only:!0,or:!0,other:!0,our:!0,own:!0,rather:!0,said:!0,say:!0,says:!0,she:!0,should:!0,since:!0,so:!0,some:!0,than:!0,that:!0,the:!0,their:!0,them:!0,then:!0,there:!0,these:!0,they:!0,this:!0,tis:!0,to:!0,too:!0,twas:!0,us:!0,wants:!0,was:!0,we:!0,were:!0,what:!0,when:!0,where:!0,which:!0,while:!0,who:!0,whom:!0,why:!0,will:!0,with:!0,would:!0,yet:!0,you:!0,your:!0},p.Pipeline.registerFunction(p.stopWordFilter,"stopWordFilter"),p.Pipeline.registerFunction(p.trimmer=function(e){if(null==e)throw new Error("token should not be undefined");return e.replace(/^\W+/,"").replace(/\W+$/,"")},"trimmer"),(p.InvertedIndex=function(){this.root={docs:{},df:0}}).load=function(e){var t=new this;return t.root=e.root,t},p.InvertedIndex.prototype.addToken=function(e,t,n){n=n||this.root;let o=0;for(;o<=e.length-1;){var i=e[o];i in n||(n[i]={docs:{},df:0}),o+=1,n=n[i]}var r=t.ref;n.docs[r]?n.docs[r]={tf:t.tf}:(n.docs[r]={tf:t.tf},n.df+=1)},p.InvertedIndex.prototype.hasToken=function(t){if(!t)return!1;let n=this.root;for(let e=0;e<t.length;e++){if(!n[t[e]])return!1;n=n[t[e]]}return!0},p.InvertedIndex.prototype.getNode=function(t){if(!t)return null;let n=this.root;for(let e=0;e<t.length;e++){if(!n[t[e]])return null;n=n[t[e]]}return n},p.InvertedIndex.prototype.getDocs=function(e){return null==(e=this.getNode(e))?{}:e.docs},p.InvertedIndex.prototype.getTermFrequency=function(e,t){return null!=(e=this.getNode(e))&&t in e.docs?e.docs[t].tf:0},p.InvertedIndex.prototype.getDocFreq=function(e){return null==(e=this.getNode(e))?0:e.df},p.InvertedIndex.prototype.removeToken=function(e,t){e&&null!=(e=this.getNode(e))&&t in e.docs&&(delete e.docs[t],--e.df)},p.InvertedIndex.prototype.expandToken=function(e,t,n){if(null==e||""==e)return[];if(t=t||[],null!=n||null!=(n=this.getNode(e))){0<n.df&&t.push(e);for(const o in n)"docs"!==o&&"df"!==o&&this.expandToken(e+o,t,n[o])}return t},p.InvertedIndex.prototype.toJSON=function(){return{root:this.root}},(p.Configuration=function(e,t){var n;if(e=e||"",null==t)throw new Error("fields should not be null");this.config={};try{n=JSON.parse(e),this.buildUserConfig(n,t)}catch(e){p.utils.warn("user configuration parse failed, will use default configuration"),this.buildDefaultConfig(t)}}).prototype.buildDefaultConfig=function(e){this.reset(),e.forEach(function(e){this.config[e]={boost:1,bool:"OR",expand:!1}},this)},p.Configuration.prototype.buildUserConfig=function(t,e){let n="OR",o=!1;if(this.reset(),"bool"in t&&(n=t.bool||n),"expand"in t&&(o=t.expand||o),"fields"in t)for(const r in t.fields)if(-1<e.indexOf(r)){var i=t.fields[r];let e=o;null!=i.expand&&(e=i.expand),this.config[r]={boost:i.boost||0===i.boost?i.boost:1,bool:i.bool||n,expand:e}}else p.utils.warn("field name in user configuration not found in index instance fields");else this.addAllFields2UserConfig(n,o,e)},p.Configuration.prototype.addAllFields2UserConfig=function(t,n,e){e.forEach(function(e){this.config[e]={boost:1,bool:t,expand:n}},this)},p.Configuration.prototype.get=function(){return this.config},p.Configuration.prototype.reset=function(){this.config={}},lunr.SortedSet=function(){this.length=0,this.elements=[]},lunr.SortedSet.load=function(e){var t=new this;return t.elements=e,t.length=e.length,t},lunr.SortedSet.prototype.add=function(){let e,t;for(e=0;e<arguments.length;e++)t=arguments[e],~this.indexOf(t)||this.elements.splice(this.locationFor(t),0,t);this.length=this.elements.length},lunr.SortedSet.prototype.toArray=function(){return this.elements.slice()},lunr.SortedSet.prototype.map=function(e,t){return this.elements.map(e,t)},lunr.SortedSet.prototype.forEach=function(e,t){return this.elements.forEach(e,t)},lunr.SortedSet.prototype.indexOf=function(e){let t=0,n=this.elements.length,o=n-t,i=t+Math.floor(o/2),r=this.elements[i];for(;1<o;){if(r===e)return i;r<e&&(t=i),r>e&&(n=i),o=n-t,i=t+Math.floor(o/2),r=this.elements[i]}return r===e?i:-1},lunr.SortedSet.prototype.locationFor=function(e){let t=0,n=this.elements.length,o=n-t,i=t+Math.floor(o/2),r=this.elements[i];for(;1<o;)r<e&&(t=i),r>e&&(n=i),o=n-t,i=t+Math.floor(o/2),r=this.elements[i];return r>e?i:r<e?i+1:void 0},lunr.SortedSet.prototype.intersect=function(e){var t=new lunr.SortedSet;let n=0,o=0;for(var i=this.length,r=e.length,s=this.elements,l=e.elements;!(n>i-1||o>r-1);)s[n]===l[o]?(t.add(s[n]),n++,o++):s[n]<l[o]?n++:s[n]>l[o]&&o++;return t},lunr.SortedSet.prototype.clone=function(){var e=new lunr.SortedSet;return e.elements=this.toArray(),e.length=e.elements.length,e},lunr.SortedSet.prototype.union=function(e){let t,n,o;n=this.length>=e.length?(t=this,e):(t=e,this),o=t.clone();for(let e=0,t=n.toArray();e<t.length;e++)o.add(t[e]);return o},lunr.SortedSet.prototype.toJSON=function(){return this.toArray()},"function"==typeof define&&define.amd?define(function(){return p}):"object"==typeof exports?module.exports=p:this.elasticlunr=p}(),window.onload=function(){if(document.body.contains(document.getElementById("searchModal"))){const d=document.documentElement.lang,h=document.getElementById("searchInput"),f=document.getElementById("searchModal"),s=document.getElementById("search-button"),p=document.getElementById("clear-search"),g=document.getElementById("results-container"),m=document.getElementById("results"),v={zero_results:document.getElementById("zero_results"),one_results:document.getElementById("one_results"),two_results:document.getElementById("two_results"),few_results:document.getElementById("few_results"),many_results:document.getElementById("many_results")};{var n=s;const w=window.navigator.userAgent.toLowerCase().includes("mac")?"Cmd + K":"Ctrl + K";["title","aria-label"].forEach(e=>{let t=n.getAttribute(e);t&&(t=t.replace("$SHORTCUT",w),n.setAttribute(e,t))})}s.addEventListener("keydown",function(e){"Enter"!==e.key&&" "!==e.key||s.click()});let e,r=(f.addEventListener("click",o),f.addEventListener("touchend",o),document.addEventListener("keydown",function(e){"Escape"===e.key&&u()}),p.addEventListener("click",function(){t(),h.focus()}),p.addEventListener("keydown",function(e){"Enter"!==e.key&&" "!==e.key||(t(),h.focus(),e.preventDefault())}),s.addEventListener("mouseover",i),s.addEventListener("click",l),s.addEventListener("touchstart",l),null);function l(){e=document.activeElement,i(),f.style.display="block",h.focus()}function u(){f.style.display="none",t(),e&&document.body.contains(e)&&e.focus()}function a(e){var t;"true"!==e.getAttribute("aria-selected")&&([t=null]=[e],m.querySelectorAll("#results > div").forEach(e=>{e!==t&&e.setAttribute("aria-selected","false")}),e.setAttribute("aria-selected","true")),h.setAttribute("aria-activedescendant",e.id)}function t(){h.value="",m.innerHTML="",g.style.display="none",h.removeAttribute("aria-activedescendant")}function o(e){e.target===f&&u(),e.stopPropagation()}function i(){if(!r)if(window.searchIndex)r=Promise.resolve(elasticlunr.Index.load(window.searchIndex));else{var t=document.documentElement.getAttribute("lang").substring(0,2);let e=document.querySelector("meta[name='base']").getAttribute("content");e.endsWith("/")&&(e=e.slice(0,-1)),r=fetch(e+"/search_index."+t+".json").then(e=>e.json()).then(e=>elasticlunr.Index.load(e))}}function y(e){return e=parseInt(e,16).toString(2),[0,1,2,3,4][Math.ceil(e.length/8)]}function c(){a(this)}h.addEventListener("input",async function(){const s=this.value.trim();var e=await r;m.innerHTML="",g.style.display=0<s.length?"block":"none";var t,n=(e=e.search(s,{bool:"OR",fields:{title:{boost:3},body:{boost:2},description:{boost:1},path:{boost:1}}})).length,o=d,i=0===(i=n)?"zero_results":1===i?"one_results":"ar"===o?(t=i%100,2===i?"two_results":3<=t&&t<=10?"few_results":"many_results"):["uk","be","bs","hr","ru","sr"].includes(o)?(t=i%100,1==(o=i%10)&&11!=t?"one_results":2<=o&&o<=4&&!(12<=t&&t<=14)?"few_results":"many_results"):"many_results";Object.values(v).forEach(e=>{e&&(e.style.display="none")}),(i=v[i])&&(i.style.display="inline",i.textContent=i.textContent.replace("$NUMBER",n.toString()));let l=0;e.forEach(function(t){if(t.doc.title||t.doc.path||t.doc.id){var n=document.createElement("div"),o=(n.setAttribute("role","option"),n.id="result-"+l++,n.innerHTML="<a href><span></span><span></span></a>",n.querySelector("a")),i=n.querySelector("span:first-child"),r=n.querySelector("span:nth-child(2)");i.textContent=t.doc.title||t.doc.path||t.doc.id,i=t.doc.body?function(n,e){var o=e.map(function(e){return elasticlunr.stemmer(e.toLowerCase())});let i=0;var r=[];for(const e of n.toLowerCase().split(". ")){let t=!0;for(const s of e.split(/[\s\n]/)){if(0<s.length){let e=t?8:2;for(const n of o)elasticlunr.stemmer(s).startsWith(n)&&(e=40);r.push([s,e,i]),t=!1}i+=s.length+1}i+=1}if(0===r.length)return 150<n.length?n.substring(0,150)+"…":n;var s=[];let t=0;for(var l=0;l<Math.min(r.length,30);l++)t+=r[l][1];for(s.push(t),l=1;l<=r.length-30;l++)t=(t-=r[l-1][1])+r[l+30-1][1],s.push(t);let u=0,a=0;for(l=s.length-1;0<=l;l--)a<s[l]&&(a=s[l],u=l);var c=[];let d=function(e,t){let n=0,o=t-1;for(;0<=o&&n<4;){if(" "===e[o]&&"."!==e[o-1])n++;else if("."===e[o]&&" "===e[o+1])break;o--}return 4===n?o+1:t}(n,r[u][2]);for(var h=/^[\x00-\xff]+$/,l=u;l<u+30&&l<r.length;l++){var f,p=r[l],g=(d<p[2]&&(c.push(n.substring(d,p[2])),d=p[2]),40===p[1]&&c.push("<b>"),p[2]+p[0].length);!h.test(p[0])&&12<=p[0].length?(f=function(t){let n="",o=!1,i=0,r=0,s=0;for(let e=0;e<t.length;e++){var l=t.codePointAt(e).toString(16);if(o=4<l.length&&++e+1<t.length?"200d"===t.codePointAt(e+1).toString(16):o){if(i+=y(l),e==t.length-1){if(!((r+=i)<=12))break;n+=t.substr(s,e-s+1)}}else if(0!=i){if(!((r=(r+=i)+y(l))<=12))break;n+=t.substr(s,e-s+1),s=e+1,i=0}else{if(!((r+=y(l))<=12))break;l.length<=4?n+=t[e]:n+=t[e-1]+t[e],s=e+1}}return n}(n.substring(p[2],g)),c.push(f)):c.push(n.substring(p[2],g)),40===p[1]&&c.push("</b>"),d=g}c.push("…");var m=e=c.join("");return 150<e.replace(/<[^>]+>/g,"").length?e.substring(0,150)+"…":m}(t.doc.body,s.split(/\s+/)):t.doc.description||"",r.innerHTML=i;let e=t.ref;t.doc.body&&(e+="#:~:text="+(r=encodeURIComponent(s))),o.href=e,m.appendChild(n)}}),h.setAttribute("aria-expanded",0<l?"true":"false"),m.firstChild&&a(m.firstChild),m.addEventListener("mouseover",function(e){e.target.closest('div[role="option"]')&&a(e.target.closest('div[role="option"]'))}),document.querySelectorAll("#results > div").forEach(e=>{e.removeEventListener("touchstart",c),e.addEventListener("touchstart",c)})},!0),document.addEventListener("keydown",function(t){var e=navigator.userAgent.toLowerCase().includes("mac")?t.metaKey:t.ctrlKey;if("k"===t.key&&e)t.preventDefault(),("block"===f.style.display?u:l)();else if(e=document.activeElement,"Tab"!==t.key||e!==h&&e!==p){if(0!==(r=m.querySelectorAll("#results > div")).length){var n,o,i=Array.from(r),r=m.querySelector('[aria-selected="true"]'),s=i.indexOf(r);if(["ArrowUp","ArrowDown","Home","End","PageUp","PageDown"].includes(t.key)){t.preventDefault();let e=s;switch(t.key){case"ArrowUp":e=Math.max(s-1,0);break;case"ArrowDown":e=Math.min(s+1,i.length-1);break;case"Home":e=0;break;case"End":e=i.length-1;break;case"PageUp":e=Math.max(s-3,0);break;case"PageDown":e=Math.min(s+3,i.length-1)}e!==s&&(a((o=i)[n=e]),o[n].scrollIntoView({block:"nearest",inline:"start"}))}"Enter"===t.key&&r&&(t.preventDefault(),t.stopImmediatePropagation(),(o=r.querySelector("a"))&&(window.location.href=o.getAttribute("href")),u())}}else t.preventDefault(),(e===h?p:h).focus()})}}; +!function(){function g(e){var t=new g.Index;return t.pipeline.add(g.trimmer,g.stopWordFilter,g.stemmer),e&&e.call(t,t),t}var t;g.version="0.9.5",(lunr=g).utils={},g.utils.warn=(t=this,function(e){t.console&&console.warn&&console.warn(e)}),g.utils.toString=function(e){return null==e?"":e.toString()},(g.EventEmitter=function(){this.events={}}).prototype.addListener=function(){var e=Array.prototype.slice.call(arguments);const t=e.pop();if("function"!=typeof t)throw new TypeError("last argument must be a function");e.forEach(function(e){this.hasHandler(e)||(this.events[e]=[]),this.events[e].push(t)},this)},g.EventEmitter.prototype.removeListener=function(e,t){this.hasHandler(e)&&-1!==(t=this.events[e].indexOf(t))&&(this.events[e].splice(t,1),0===this.events[e].length)&&delete this.events[e]},g.EventEmitter.prototype.emit=function(e){if(this.hasHandler(e)){const t=Array.prototype.slice.call(arguments,1);this.events[e].forEach(function(e){e.apply(void 0,t)},this)}},g.EventEmitter.prototype.hasHandler=function(e){return e in this.events},(g.tokenizer=function(n){if(!arguments.length||null==n)return[];if(Array.isArray(n)){let e=n.filter(function(e){return null!=e}),t=(e=e.map(function(e){return g.utils.toString(e).toLowerCase()}),[]);return e.forEach(function(e){e=e.split(g.tokenizer.seperator),t=t.concat(e)},this),t}return n.toString().trim().toLowerCase().split(g.tokenizer.seperator)}).defaultSeperator=/[\s-]+/,g.tokenizer.seperator=g.tokenizer.defaultSeperator,g.tokenizer.setSeperator=function(e){null!=e&&"object"==typeof e&&(g.tokenizer.seperator=e)},g.tokenizer.resetSeperator=function(){g.tokenizer.seperator=g.tokenizer.defaultSeperator},g.tokenizer.getSeperator=function(){return g.tokenizer.seperator},(g.Pipeline=function(){this._queue=[]}).registeredFunctions={},g.Pipeline.registerFunction=function(e,t){t in g.Pipeline.registeredFunctions&&g.utils.warn("Overwriting existing registered function: "+t),e.label=t,g.Pipeline.registeredFunctions[t]=e},g.Pipeline.getRegisteredFunction=function(e){return e in g.Pipeline.registeredFunctions!=1?null:g.Pipeline.registeredFunctions[e]},g.Pipeline.warnIfFunctionNotRegistered=function(e){e.label&&e.label in this.registeredFunctions||g.utils.warn("Function is not registered with pipeline. This may cause problems when serialising the index.\n",e)},g.Pipeline.load=function(e){const n=new g.Pipeline;return e.forEach(function(e){var t=g.Pipeline.getRegisteredFunction(e);if(!t)throw new Error("Cannot load un-registered function: "+e);n.add(t)}),n},g.Pipeline.prototype.add=function(){Array.prototype.slice.call(arguments).forEach(function(e){g.Pipeline.warnIfFunctionNotRegistered(e),this._queue.push(e)},this)},g.Pipeline.prototype.after=function(e,t){if(g.Pipeline.warnIfFunctionNotRegistered(t),-1===(e=this._queue.indexOf(e)))throw new Error("Cannot find existingFn");this._queue.splice(e+1,0,t)},g.Pipeline.prototype.before=function(e,t){if(g.Pipeline.warnIfFunctionNotRegistered(t),-1===(e=this._queue.indexOf(e)))throw new Error("Cannot find existingFn");this._queue.splice(e,0,t)},g.Pipeline.prototype.remove=function(e){-1!==(e=this._queue.indexOf(e))&&this._queue.splice(e,1)},g.Pipeline.prototype.run=function(o){var e=[],t=o.length,i=this._queue.length;for(let n=0;n<t;n++){let t=o[n];for(let e=0;e<i&&void 0!==(t=this._queue[e](t,n,o))&&null!==t;e++);void 0!==t&&null!==t&&e.push(t)}return e},g.Pipeline.prototype.reset=function(){this._queue=[]},g.Pipeline.prototype.get=function(){return this._queue},g.Pipeline.prototype.toJSON=function(){return this._queue.map(function(e){return g.Pipeline.warnIfFunctionNotRegistered(e),e.label})},(g.Index=function(){this._fields=[],this._ref="id",this.pipeline=new g.Pipeline,this.documentStore=new g.DocumentStore,this.index={},this.eventEmitter=new g.EventEmitter,this._idfCache={},this.on("add","remove","update",function(){this._idfCache={}}.bind(this))}).prototype.on=function(){var e=Array.prototype.slice.call(arguments);return this.eventEmitter.addListener.apply(this.eventEmitter,e)},g.Index.prototype.off=function(e,t){return this.eventEmitter.removeListener(e,t)},g.Index.load=function(e){e.version!==g.version&&g.utils.warn("version mismatch: current "+g.version+" importing "+e.version);var t=new this;t._fields=e.fields,t._ref=e.ref,t.documentStore=g.DocumentStore.load(e.documentStore),t.pipeline=g.Pipeline.load(e.pipeline),t.index={};for(const n in e.index)t.index[n]=g.InvertedIndex.load(e.index[n]);return t},g.Index.prototype.addField=function(e){return this._fields.push(e),this.index[e]=new g.InvertedIndex,this},g.Index.prototype.setRef=function(e){return this._ref=e,this},g.Index.prototype.saveDocument=function(e){return this.documentStore=new g.DocumentStore(e),this},g.Index.prototype.addDoc=function(r,e){if(r){e=void 0===e||e;const s=r[this._ref];this.documentStore.addDoc(s,r),this._fields.forEach(function(e){var t=this.pipeline.run(g.tokenizer(r[e]));this.documentStore.addFieldLength(s,e,t.length);const n={};t.forEach(function(e){e in n?n[e]+=1:n[e]=1},this);for(const i in n){var o=n[i],o=Math.sqrt(o);this.index[e].addToken(i,{ref:s,tf:o})}},this),e&&this.eventEmitter.emit("add",r,this)}},g.Index.prototype.removeDocByRef=function(e,t){e&&!1!==this.documentStore.isDocStored()&&this.documentStore.hasDoc(e)&&(e=this.documentStore.getDoc(e),this.removeDoc(e,!1))},g.Index.prototype.removeDoc=function(e,t){if(e){t=void 0===t||t;const n=e[this._ref];this.documentStore.hasDoc(n)&&(this.documentStore.removeDoc(n),this._fields.forEach(function(t){this.pipeline.run(g.tokenizer(e[t])).forEach(function(e){this.index[t].removeToken(e,n)},this)},this),t)&&this.eventEmitter.emit("remove",e,this)}},g.Index.prototype.updateDoc=function(e,t){t=void 0===t||t,this.removeDocByRef(e[this._ref],!1),this.addDoc(e,!1),t&&this.eventEmitter.emit("update",e,this)},g.Index.prototype.idf=function(e,t){var n="@"+t+"/"+e;return Object.prototype.hasOwnProperty.call(this._idfCache,n)?this._idfCache[n]:(t=this.index[t].getDocFreq(e),e=1+Math.log(this.documentStore.length/(t+1)),this._idfCache[n]=e)},g.Index.prototype.getFields=function(){return this._fields.slice()},g.Index.prototype.search=function(t,e){if(!t)return[];t="string"==typeof t?{any:t}:JSON.parse(JSON.stringify(t));let n=null;null!=e&&(n=JSON.stringify(e));var o=new g.Configuration(n,this.getFields()).get(),i={},r=Object.keys(t);for(let e=0;e<r.length;e++){var s=r[e];i[s]=this.pipeline.run(g.tokenizer(t[s]))}var l={};for(const p in o){var u=i[p]||i.any;if(u){var a=this.fieldSearch(u,p,o),c=o[p].boost;for(h in a)a[h]=a[h]*c;for(h in a)h in l?l[h]+=a[h]:l[h]=a[h]}}var d,h,f=[];for(h in l)d={ref:h,score:l[h]},this.documentStore.hasDoc(h)&&(d.doc=this.documentStore.getDoc(h)),f.push(d);return f.sort(function(e,t){return t.score-e.score}),f},g.Index.prototype.fieldSearch=function(e,a,t){const c=t[a].bool,n=t[a].expand;t=t[a].boost;let d=null;const h={};if(0!==t)return e.forEach(function(l){let e=[l];!0===n&&(e=this.index[a].expandToken(l));const u={};e.forEach(function(n){let e=this.index[a].getDocs(n);var o=this.idf(n,a);if(d&&"AND"===c){var i,t={};for(i in d)i in e&&(t[i]=e[i]);e=t}for(i in n===l&&this.fieldSearchStats(h,n,e),e){var r=this.index[a].getTermFrequency(n,i),s=this.documentStore.getFieldLength(i,a);let e=1,t=(0!==s&&(e=1/Math.sqrt(s)),1);n!==l&&(t=.15*(1-(n.length-l.length)/n.length)),s=r*o*e*t,i in u?u[i]+=s:u[i]=s}},this),d=this.mergeScores(d,u,c)},this),d=this.coordNorm(d,h,e.length)},g.Index.prototype.mergeScores=function(e,t,n){if(!e)return t;if("AND"===n){var o={};for(i in t)i in e&&(o[i]=e[i]+t[i]);return o}for(var i in t)i in e?e[i]+=t[i]:e[i]=t[i];return e},g.Index.prototype.fieldSearchStats=function(e,t,n){for(const o in n)o in e?e[o].push(t):e[o]=[t]},g.Index.prototype.coordNorm=function(e,t,n){for(const i in e){var o;i in t&&(o=t[i].length,e[i]=e[i]*o/n)}return e},g.Index.prototype.toJSON=function(){const t={};return this._fields.forEach(function(e){t[e]=this.index[e].toJSON()},this),{version:g.version,fields:this._fields,ref:this._ref,documentStore:this.documentStore.toJSON(),index:t,pipeline:this.pipeline.toJSON()}},g.Index.prototype.use=function(e){var t=Array.prototype.slice.call(arguments,1);t.unshift(this),e.apply(this,t)},(g.DocumentStore=function(e){this._save=null==e||e,this.docs={},this.docInfo={},this.length=0}).load=function(e){var t=new this;return t.length=e.length,t.docs=e.docs,t.docInfo=e.docInfo,t._save=e.save,t},g.DocumentStore.prototype.isDocStored=function(){return this._save},g.DocumentStore.prototype.addDoc=function(e,t){this.hasDoc(e)||this.length++,!0===this._save?this.docs[e]=function(e){if(null===e||"object"!=typeof e)return e;var t=e.constructor();for(const n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t}(t):this.docs[e]=null},g.DocumentStore.prototype.getDoc=function(e){return!1===this.hasDoc(e)?null:this.docs[e]},g.DocumentStore.prototype.hasDoc=function(e){return e in this.docs},g.DocumentStore.prototype.removeDoc=function(e){this.hasDoc(e)&&(delete this.docs[e],delete this.docInfo[e],this.length--)},g.DocumentStore.prototype.addFieldLength=function(e,t,n){null!=e&&0!=this.hasDoc(e)&&(this.docInfo[e]||(this.docInfo[e]={}),this.docInfo[e][t]=n)},g.DocumentStore.prototype.updateFieldLength=function(e,t,n){null!=e&&0!=this.hasDoc(e)&&this.addFieldLength(e,t,n)},g.DocumentStore.prototype.getFieldLength=function(e,t){return null!=e&&e in this.docs&&t in this.docInfo[e]?this.docInfo[e][t]:0},g.DocumentStore.prototype.toJSON=function(){return{docs:this.docs,docInfo:this.docInfo,length:this.length,save:this._save}},g.stemmer=function(){const a={ational:"ate",tional:"tion",enci:"ence",anci:"ance",izer:"ize",bli:"ble",alli:"al",entli:"ent",eli:"e",ousli:"ous",ization:"ize",ation:"ate",ator:"ate",alism:"al",iveness:"ive",fulness:"ful",ousness:"ous",aliti:"al",iviti:"ive",biliti:"ble",logi:"log"},c={icate:"ic",ative:"",alize:"al",iciti:"ic",ical:"ic",ful:"",ness:""};var e="[aeiouy]",t="[^aeiou][^aeiouy]*";const d=new RegExp("^([^aeiou][^aeiouy]*)?[aeiouy][aeiou]*[^aeiou][^aeiouy]*"),h=new RegExp("^([^aeiou][^aeiouy]*)?[aeiouy][aeiou]*[^aeiou][^aeiouy]*[aeiouy][aeiou]*[^aeiou][^aeiouy]*"),f=new RegExp("^([^aeiou][^aeiouy]*)?[aeiouy][aeiou]*[^aeiou][^aeiouy]*([aeiouy][aeiou]*)?$"),p=new RegExp("^([^aeiou][^aeiouy]*)?[aeiouy]"),g=/^(.+?)(ss|i)es$/,y=/^(.+?)([^s])s$/,m=/^(.+?)eed$/,v=/^(.+?)(ed|ing)$/,w=/.$/,S=/(at|bl|iz)$/,b=new RegExp("([^aeiouylsz])\\1$"),x=new RegExp("^"+t+e+"[^aeiouwxy]$"),E=/^(.+?[^aeiou])y$/,I=/^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/,k=/^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/,_=/^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/,D=/^(.+?)(s|t)(ion)$/,F=/^(.+?)e$/,A=/ll$/,P=new RegExp("^"+t+e+"[^aeiouwxy]$");return function(e){let t,n,o,i,r,s,l;var u;return e.length<3||("y"==(o=e.substr(0,1))&&(e=o.toUpperCase()+e.substr(1)),i=g,r=y,i.test(e)?e=e.replace(i,"$1$2"):r.test(e)&&(e=e.replace(r,"$1$2")),i=m,r=v,i.test(e)?(u=i.exec(e),(i=d).test(u[1])&&(i=w,e=e.replace(i,""))):r.test(e)&&(u=r.exec(e),t=u[1],(r=p).test(t))&&(e=t,r=S,s=b,l=x,r.test(e)?e+="e":s.test(e)?(i=w,e=e.replace(i,"")):l.test(e)&&(e+="e")),(i=E).test(e)&&(u=i.exec(e),e=(t=u[1])+"i"),(i=I).test(e)&&(u=i.exec(e),t=u[1],n=u[2],(i=d).test(t))&&(e=t+a[n]),(i=k).test(e)&&(u=i.exec(e),t=u[1],n=u[2],(i=d).test(t))&&(e=t+c[n]),i=_,r=D,i.test(e)?(u=i.exec(e),t=u[1],(i=h).test(t)&&(e=t)):r.test(e)&&(u=r.exec(e),t=u[1]+u[2],(r=h).test(t))&&(e=t),(i=F).test(e)&&(u=i.exec(e),t=u[1],i=h,r=f,s=P,i.test(t)||r.test(t)&&!s.test(t))&&(e=t),i=A,r=h,i.test(e)&&r.test(e)&&(i=w,e=e.replace(i,"")),"y"==o&&(e=o.toLowerCase()+e.substr(1))),e}}(),g.Pipeline.registerFunction(g.stemmer,"stemmer"),g.stopWordFilter=function(e){if(e&&!0!==g.stopWordFilter.stopWords[e])return e},g.clearStopWords=function(){g.stopWordFilter.stopWords={}},g.addStopWords=function(e){null!=e&&!1!==Array.isArray(e)&&e.forEach(function(e){g.stopWordFilter.stopWords[e]=!0},this)},g.resetStopWords=function(){g.stopWordFilter.stopWords=g.defaultStopWords},g.stopWordFilter.stopWords=g.defaultStopWords={"":!0,a:!0,able:!0,about:!0,across:!0,after:!0,all:!0,almost:!0,also:!0,am:!0,among:!0,an:!0,and:!0,any:!0,are:!0,as:!0,at:!0,be:!0,because:!0,been:!0,but:!0,by:!0,can:!0,cannot:!0,could:!0,dear:!0,did:!0,do:!0,does:!0,either:!0,else:!0,ever:!0,every:!0,for:!0,from:!0,get:!0,got:!0,had:!0,has:!0,have:!0,he:!0,her:!0,hers:!0,him:!0,his:!0,how:!0,however:!0,i:!0,if:!0,in:!0,into:!0,is:!0,it:!0,its:!0,just:!0,least:!0,let:!0,like:!0,likely:!0,may:!0,me:!0,might:!0,most:!0,must:!0,my:!0,neither:!0,no:!0,nor:!0,not:!0,of:!0,off:!0,often:!0,on:!0,only:!0,or:!0,other:!0,our:!0,own:!0,rather:!0,said:!0,say:!0,says:!0,she:!0,should:!0,since:!0,so:!0,some:!0,than:!0,that:!0,the:!0,their:!0,them:!0,then:!0,there:!0,these:!0,they:!0,this:!0,tis:!0,to:!0,too:!0,twas:!0,us:!0,wants:!0,was:!0,we:!0,were:!0,what:!0,when:!0,where:!0,which:!0,while:!0,who:!0,whom:!0,why:!0,will:!0,with:!0,would:!0,yet:!0,you:!0,your:!0},g.Pipeline.registerFunction(g.stopWordFilter,"stopWordFilter"),g.Pipeline.registerFunction(g.trimmer=function(e){if(null==e)throw new Error("token should not be undefined");return e.replace(/^\W+/,"").replace(/\W+$/,"")},"trimmer"),(g.InvertedIndex=function(){this.root={docs:{},df:0}}).load=function(e){var t=new this;return t.root=e.root,t},g.InvertedIndex.prototype.addToken=function(e,t,n){n=n||this.root;let o=0;for(;o<=e.length-1;){var i=e[o];i in n||(n[i]={docs:{},df:0}),o+=1,n=n[i]}var r=t.ref;n.docs[r]?n.docs[r]={tf:t.tf}:(n.docs[r]={tf:t.tf},n.df+=1)},g.InvertedIndex.prototype.hasToken=function(t){if(!t)return!1;let n=this.root;for(let e=0;e<t.length;e++){if(!n[t[e]])return!1;n=n[t[e]]}return!0},g.InvertedIndex.prototype.getNode=function(t){if(!t)return null;let n=this.root;for(let e=0;e<t.length;e++){if(!n[t[e]])return null;n=n[t[e]]}return n},g.InvertedIndex.prototype.getDocs=function(e){return null==(e=this.getNode(e))?{}:e.docs},g.InvertedIndex.prototype.getTermFrequency=function(e,t){return null!=(e=this.getNode(e))&&t in e.docs?e.docs[t].tf:0},g.InvertedIndex.prototype.getDocFreq=function(e){return null==(e=this.getNode(e))?0:e.df},g.InvertedIndex.prototype.removeToken=function(e,t){e&&null!=(e=this.getNode(e))&&t in e.docs&&(delete e.docs[t],--e.df)},g.InvertedIndex.prototype.expandToken=function(e,t,n){if(null==e||""==e)return[];if(t=t||[],null!=n||null!=(n=this.getNode(e))){0<n.df&&t.push(e);for(const o in n)"docs"!==o&&"df"!==o&&this.expandToken(e+o,t,n[o])}return t},g.InvertedIndex.prototype.toJSON=function(){return{root:this.root}},(g.Configuration=function(e,t){var n,e=e||"";if(null==t)throw new Error("fields should not be null");this.config={};try{n=JSON.parse(e),this.buildUserConfig(n,t)}catch(e){g.utils.warn("user configuration parse failed, will use default configuration"),this.buildDefaultConfig(t)}}).prototype.buildDefaultConfig=function(e){this.reset(),e.forEach(function(e){this.config[e]={boost:1,bool:"OR",expand:!1}},this)},g.Configuration.prototype.buildUserConfig=function(t,e){let n="OR",o=!1;if(this.reset(),"bool"in t&&(n=t.bool||n),"expand"in t&&(o=t.expand||o),"fields"in t)for(const r in t.fields)if(-1<e.indexOf(r)){var i=t.fields[r];let e=o;null!=i.expand&&(e=i.expand),this.config[r]={boost:i.boost||0===i.boost?i.boost:1,bool:i.bool||n,expand:e}}else g.utils.warn("field name in user configuration not found in index instance fields");else this.addAllFields2UserConfig(n,o,e)},g.Configuration.prototype.addAllFields2UserConfig=function(t,n,e){e.forEach(function(e){this.config[e]={boost:1,bool:t,expand:n}},this)},g.Configuration.prototype.get=function(){return this.config},g.Configuration.prototype.reset=function(){this.config={}},lunr.SortedSet=function(){this.length=0,this.elements=[]},lunr.SortedSet.load=function(e){var t=new this;return t.elements=e,t.length=e.length,t},lunr.SortedSet.prototype.add=function(){let e,t;for(e=0;e<arguments.length;e++)t=arguments[e],~this.indexOf(t)||this.elements.splice(this.locationFor(t),0,t);this.length=this.elements.length},lunr.SortedSet.prototype.toArray=function(){return this.elements.slice()},lunr.SortedSet.prototype.map=function(e,t){return this.elements.map(e,t)},lunr.SortedSet.prototype.forEach=function(e,t){return this.elements.forEach(e,t)},lunr.SortedSet.prototype.indexOf=function(e){let t=0,n=this.elements.length,o=n-t,i=t+Math.floor(o/2),r=this.elements[i];for(;1<o;){if(r===e)return i;r<e&&(t=i),r>e&&(n=i),o=n-t,i=t+Math.floor(o/2),r=this.elements[i]}return r===e?i:-1},lunr.SortedSet.prototype.locationFor=function(e){let t=0,n=this.elements.length,o=n-t,i=t+Math.floor(o/2),r=this.elements[i];for(;1<o;)r<e&&(t=i),r>e&&(n=i),o=n-t,i=t+Math.floor(o/2),r=this.elements[i];return r>e?i:r<e?i+1:void 0},lunr.SortedSet.prototype.intersect=function(e){var t=new lunr.SortedSet;let n=0,o=0;for(var i=this.length,r=e.length,s=this.elements,l=e.elements;!(n>i-1||o>r-1);)s[n]===l[o]?(t.add(s[n]),n++,o++):s[n]<l[o]?n++:s[n]>l[o]&&o++;return t},lunr.SortedSet.prototype.clone=function(){var e=new lunr.SortedSet;return e.elements=this.toArray(),e.length=e.elements.length,e},lunr.SortedSet.prototype.union=function(e){let t,n,o;n=this.length>=e.length?(t=this,e):(t=e,this),o=t.clone();for(let e=0,t=n.toArray();e<t.length;e++)o.add(t[e]);return o},lunr.SortedSet.prototype.toJSON=function(){return this.toArray()},"function"==typeof define&&define.amd?define(function(){return g}):"object"==typeof exports?module.exports=g:this.elasticlunr=g}(),window.onload=function(){if(document.body.contains(document.getElementById("searchModal"))){const d=document.documentElement.lang,h=document.getElementById("searchInput"),f=document.getElementById("searchModal"),s=document.getElementById("search-button"),p=document.getElementById("clear-search"),g=document.getElementById("results-container"),y=document.getElementById("results"),m={zero_results:document.getElementById("zero_results"),one_results:document.getElementById("one_results"),two_results:document.getElementById("two_results"),few_results:document.getElementById("few_results"),many_results:document.getElementById("many_results")};{var n=s;const v=window.navigator.userAgent.toLowerCase().includes("mac")?"Cmd + K":"Ctrl + K";["title","aria-label"].forEach(e=>{let t=n.getAttribute(e);t&&(t=t.replace("$SHORTCUT",v),n.setAttribute(e,t))})}s.addEventListener("keydown",function(e){"Enter"!==e.key&&" "!==e.key||s.click()});let e,r=(f.addEventListener("click",o),f.addEventListener("touchend",o,{passive:!0}),document.addEventListener("keydown",function(e){"Escape"===e.key&&u()}),p.addEventListener("click",function(){t(),h.focus()}),p.addEventListener("keydown",function(e){"Enter"!==e.key&&" "!==e.key||(t(),h.focus(),e.preventDefault())}),s.addEventListener("mouseover",i),s.addEventListener("click",l),s.addEventListener("touchstart",l,{passive:!0}),null);function l(){e=document.activeElement,i(),f.style.display="block",h.focus()}function u(){f.style.display="none",t(),e&&document.body.contains(e)&&e.focus()}function a(e){var t;"true"!==e.getAttribute("aria-selected")&&([t=null]=[e],y.querySelectorAll("#results > div").forEach(e=>{e!==t&&e.setAttribute("aria-selected","false")}),e.setAttribute("aria-selected","true")),h.setAttribute("aria-activedescendant",e.id)}function t(){h.value="",y.innerHTML="",g.style.display="none",h.removeAttribute("aria-activedescendant"),p.style.display="none"}function o(e){e.target===f&&u(),e.stopPropagation()}function i(){if(!r)if(window.searchIndex)r=Promise.resolve(elasticlunr.Index.load(window.searchIndex));else{var t=document.documentElement.getAttribute("lang").substring(0,2);let e=document.querySelector("meta[name='base']").getAttribute("content");e.endsWith("/")&&(e=e.slice(0,-1)),r=fetch(e+"/search_index."+t+".json").then(e=>e.json()).then(e=>elasticlunr.Index.load(e))}}function S(e){return e=parseInt(e,16).toString(2),[0,1,2,3,4][Math.ceil(e.length/8)]}function c(){a(this)}h.addEventListener("input",async function(){var e=this.value;const s=e.trim();var t=await r;y.innerHTML="",p.style.display=0<e.length?"block":"none",g.style.display=0<s.length?"block":"none";var n,o=t=(e=t.search(s,{bool:"OR",fields:{title:{boost:3},body:{boost:2},description:{boost:1},path:{boost:1}}})).length,i=d,o=0===o?"zero_results":1===o?"one_results":"ar"===i?(n=o%100,2===o?"two_results":3<=n&&n<=10?"few_results":"many_results"):["uk","be","bs","hr","ru","sr"].includes(i)?(n=o%100,1==(i=o%10)&&11!=n?"one_results":2<=i&&i<=4&&!(12<=n&&n<=14)?"few_results":"many_results"):"many_results";Object.values(m).forEach(e=>{e&&(e.style.display="none")}),(o=m[o])&&(o.style.display="inline",o.textContent=o.textContent.replace("$NUMBER",t.toString()));let l=0;e.forEach(function(t){if(t.doc.title||t.doc.path||t.doc.id){var n=document.createElement("div"),o=(n.setAttribute("role","option"),n.id="result-"+l++,n.innerHTML="<a href><span></span><span></span></a>",n.querySelector("a")),i=n.querySelector("span:first-child"),r=n.querySelector("span:nth-child(2)"),i=(i.textContent=t.doc.title||t.doc.path||t.doc.id,t.doc.body?function(e,t){var n=t.map(function(e){return elasticlunr.stemmer(e.toLowerCase())});let o=0;var i=[];for(const m of e.toLowerCase().split(". ")){let t=!0;for(const v of m.split(/[\s\n]/)){if(0<v.length){let e=t?8:2;for(const w of n)elasticlunr.stemmer(v).startsWith(w)&&(e=40);i.push([v,e,o]),t=!1}o+=v.length+1}o+=1}if(0===i.length)return 150<e.length?e.substring(0,150)+"…":e;var r=[];let s=0;for(var l=0;l<Math.min(i.length,30);l++)s+=i[l][1];for(r.push(s),l=1;l<=i.length-30;l++)s=(s-=i[l-1][1])+i[l+30-1][1],r.push(s);let u=0,a=0;for(l=r.length-1;0<=l;l--)a<r[l]&&(a=r[l],u=l);var c=[];let d=function(e,t){let n=0,o=t-1;for(;0<=o&&n<4;){if(" "===e[o]&&"."!==e[o-1])n++;else if("."===e[o]&&" "===e[o+1])break;o--}return 4===n?o+1:t}(e,i[u][2]);for(var h=/^[\x00-\xff]+$/,l=u;l<u+30&&l<i.length;l++){var f,p=i[l],g=(d<p[2]&&(c.push(e.substring(d,p[2])),d=p[2]),40===p[1]&&c.push("<b>"),p[2]+p[0].length);!h.test(p[0])&&12<=p[0].length?(f=function(t){let n="",o=!1,i=0,r=0,s=0;for(let e=0;e<t.length;e++){var l=t.codePointAt(e).toString(16);if(o=4<l.length&&++e+1<t.length?"200d"===t.codePointAt(e+1).toString(16):o){if(i+=S(l),e==t.length-1){if(!((r+=i)<=12))break;n+=t.substr(s,e-s+1)}}else if(0!=i){if(!((r=(r+=i)+S(l))<=12))break;n+=t.substr(s,e-s+1),s=e+1,i=0}else{if(!((r+=S(l))<=12))break;l.length<=4?n+=t[e]:n+=t[e-1]+t[e],s=e+1}}return n}(e.substring(p[2],g)),c.push(f)):c.push(e.substring(p[2],g)),40===p[1]&&c.push("</b>"),d=g}c.push("…");var y=t=c.join("");return 150<t.replace(/<[^>]+>/g,"").length?t.substring(0,150)+"…":y}(t.doc.body,s.split(/\s+/)):t.doc.description||"");r.innerHTML=i;let e=t.ref;t.doc.body&&(r=encodeURIComponent(s),e+="#:~:text="+r),o.href=e,y.appendChild(n)}}),h.setAttribute("aria-expanded",0<l?"true":"false"),y.firstChild&&a(y.firstChild),y.addEventListener("mouseover",function(e){e.target.closest('div[role="option"]')&&a(e.target.closest('div[role="option"]'))}),y.addEventListener("click",function(e){var t,n,o=e.target.closest("a");o&&(o=o.getAttribute("href"),t=window.location.href,(n=e=>e.split("#")[0].replace(/\/$/,""))(o)!==n(t)||e.ctrlKey||e.metaKey||u())}),document.querySelectorAll("#results > div").forEach(e=>{e.removeEventListener("touchstart",c),e.addEventListener("touchstart",c,{passive:!0})})},!0),document.addEventListener("keydown",function(t){var e=navigator.userAgent.toLowerCase().includes("mac")?t.metaKey:t.ctrlKey;if("k"===t.key&&e)t.preventDefault(),("block"===f.style.display?u:l)();else if(e=document.activeElement,"Tab"!==t.key||e!==h&&e!==p){if(0!==(r=y.querySelectorAll("#results > div")).length){var n,o,i=Array.from(r),r=y.querySelector('[aria-selected="true"]'),s=i.indexOf(r);if(["ArrowUp","ArrowDown","Home","End","PageUp","PageDown"].includes(t.key)){t.preventDefault();let e=s;switch(t.key){case"ArrowUp":e=Math.max(s-1,0);break;case"ArrowDown":e=Math.min(s+1,i.length-1);break;case"Home":e=0;break;case"End":e=i.length-1;break;case"PageUp":e=Math.max(s-3,0);break;case"PageDown":e=Math.min(s+3,i.length-1)}e!==s&&(a((o=i)[n=e]),o[n].scrollIntoView({block:"nearest",inline:"start"}))}"Enter"===t.key&&r&&(t.preventDefault(),t.stopImmediatePropagation(),(o=r.querySelector("a"))&&(window.location.href=o.getAttribute("href")),u())}}else t.preventDefault(),(e===h?p:h).focus()})}}; diff --git a/static/js/webmention.js b/static/js/webmention.js new file mode 100644 index 0000000..261b238 --- /dev/null +++ b/static/js/webmention.js @@ -0,0 +1,412 @@ +/* webmention.js + +Simple thing for embedding webmentions from webmention.io into a page, client-side. + +(c)2018-2022 fluffy (http://beesbuzz.biz) +2025 mmai (https://misc.rhumbs.fr) + +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. + +Basic usage: + +<script src="/path/to/webmention.js" data-param="val" ... async /> +<div id="webmentions"></div> + +Allowed parameters: + + page-url: + + The base URL to use for this page. Defaults to window.location + + add-urls: + + Additional URLs to check, separated by |s + + id: + + The HTML ID for the object to fill in with the webmention data. + Defaults to "webmentions" + + wordcount: + + The maximum number of words to render in reply mentions. + + max-webmentions: + + The maximum number of mentions to retrieve. Defaults to 30. + + prevent-spoofing: + + By default, Webmentions render using the mf2 'url' element, which plays + nicely with webmention bridges (such as brid.gy and telegraph) + but allows certain spoofing attacks. If you would like to prevent + spoofing, set this to a non-empty string (e.g. "true"). + + sort-by: + + What to order the responses by; defaults to 'published'. See + https://github.com/aaronpk/webmention.io#api + + sort-dir: + + The order to sort the responses by; defaults to 'up' (i.e. oldest + first). See https://github.com/aaronpk/webmention.io#api + + comments-are-reactions: + + If set to a non-empty string (e.g. "true"), will display comment-type responses + (replies/mentions/etc.) as being part of the reactions + (favorites/bookmarks/etc.) instead of in a separate comment list. + +A more detailed example: + +<!-- If you want to translate the UI --> +<script src="/path/to/umd/i18next.js"></script> +<script> + // Setup i18next as described in https://www.i18next.com/overview/getting-started#basic-sample +</script> +<!-- Otherwise, only using the following is fine --> +<script src="/path/to/webmention.min.js" + data-id="webmentionContainer" + data-wordcount="30" + data-prevent-spoofing="true" + data-comments-are-reactions="true" + /> + +*/ + +// Begin LibreJS code licensing +// @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt + +(function () { + "use strict"; + + // Shim i18next + window.i18next = window.i18next || { + t: function t(/** @type {string} */key) { return key; } + } + const t = window.i18next.t.bind(window.i18next); + + /** + * Read the configuration value. + * + * @param {string} key The configuration key. + * @param {string} dfl The default value. + * @returns {string} + */ + function getCfg(key, dfl) { + return document.currentScript.getAttribute("data-" + key) || dfl; + } + + const refurl = getCfg("page-url", window.location.href.replace(/#.*$/, "")); + const addurls = getCfg("add-urls", undefined); + const containerID = getCfg("id", "webmentions"); + /** @type {Number} */ + const textMaxWords = getCfg("wordcount"); + const maxWebmentions = getCfg("max-webmentions", 30); + const mentionSource = getCfg("prevent-spoofing") ? "wm-source" : "url"; + const sortBy = getCfg("sort-by", "published"); + const sortDir = getCfg("sort-dir", "up"); + + /** + * Strip the protocol off a URL. + * + * @param {string} url The URL to strip protocol off. + * @returns {string} + */ + function stripurl(url) { + return url.substr(url.indexOf('//')); + } + + /** + * Deduplicate multiple mentions from the same source URL. + * + * @param {Array<Reaction>} mentions Mentions of the source URL. + * @return {Array<Reaction>} + */ + function dedupe(mentions) { + /** @type {Array<Reaction>} */ + const filtered = []; + /** @type {Record<string, boolean>} */ + const seen = {}; + + mentions.forEach(function (r) { + // Strip off the protocol (i.e. treat http and https the same) + const source = stripurl(r.url); + if (!seen[source]) { + filtered.push(r); + seen[source] = true; + } + }); + + return filtered; + } + + /** + * Format comments as HTML. + * + * @param {Array<Reaction>} comments The comments to format. + * @returns string + */ + function formatComments(type, comments) { + + let html = ` + <div class="webcomments"> + <h3 id="replies-header">` + getIcon('comment') + ` <span>` + comments.length + `</span> ` + type + `s </h3> + <ol aria-labelledby="replies-header" role="list">`; + comments.forEach(function (comment) { + let content = ''; + if (comment.hasOwnProperty('content')) { + if (comment.content.hasOwnProperty('html')) { + content = comment.content.html; + } else if (comment.content.hasOwnProperty('text')) { + content = comment.content.text; + } + } + + html += ` + <li class="comment h-entry"> + <div> + <a class="comment_author u-author" + href="`+ comment.author.url + `" + target="_blank" + title="`+ comment.author.name + `" + rel="noreferrer"> + <img + src="`+ comment.author.photo + `" + alt="" + class="u-photo" + loading="lazy" + decoding="async" + width="48" + height="48" + > + <span class="p-author">`+ comment.author.name + `</span> + </a>`; + if (comment.published) { + const published = new Date(comment.published); + html += ` + <time class="dt-published" datetime="`+ comment.published + `">` + published.toLocaleString(undefined, { dateStyle: "medium", timeStyle: "short" }) + `</time>`; + } + html += ` + </div> + + <p class="e-entry">`+ content + ` + <a class="u-url" + href="`+ comment.url + `" + target="_blank" + rel="noreferrer"> + source + </a> + </p> + </li> +`; + }); + html += ` + </ol > + </div > + `; + + return html; + } + + /** + * @typedef {Object} Reaction + * @property {string} url + * @property {Object?} author + * @property {string?} author.name + * @property {string?} author.photo + * @property {Object?} content + * @property {string?} content.text + * @property {RSVPEmoji?} rsvp + * @property {MentionType?} wm-property + * @property {string?} wm-source + */ + + function getIcon(name) { + + if (name == 'like') { + return `<svg focusable = "false" width = "24" height = "24" viewBox = "0 0 192 192" xmlns = "http://www.w3.org/2000/svg" > <path d="M95.997 41.986l-.026-.035C85.746 28.36 68.428 21.423 51.165 24.881 30.138 29.094 15.004 47.558 15 69.003c0 24.413 14.906 47.964 39.486 70.086 8.43 7.586 17.437 14.468 26.444 20.533.728.49 1.444.967 2.148 1.43l1.39.909 1.355.872 1.317.835.645.403 1.259.78 1.194.726 1.032.619 1.38.807.418.236a6 6 0 005.864 0l1.138-.654 1.154-.684 1.118-.675.614-.376 1.26-.779a212 212 0 00.644-.403l1.317-.835 1.355-.872 1.39-.909c.704-.463 1.42-.94 2.148-1.43 9.007-6.065 18.015-12.947 26.444-20.533C162.094 116.967 177 93.416 177 69.004c-.004-21.446-15.138-39.91-36.165-44.123-17.07-3.42-34.174 3.323-44.43 16.568l-.408.537zm42.48-5.338c15.421 3.09 26.52 16.63 26.523 32.357 0 19.607-12.438 39.847-33.532 59.357l-1.316 1.205c-.22.201-.443.402-.666.603-7.977 7.18-16.548 13.727-25.118 19.498l-.745.5c-.74.494-1.466.973-2.177 1.437l-1.402.906-1.359.864-.662.416-1.292.8-.732.446-.73-.446-1.292-.8-.662-.416-1.36-.864-1.4-.906a235.406 235.406 0 01-2.923-1.937c-8.57-5.77-17.14-12.319-25.118-19.498l-.666-.603-1.316-1.205C39.438 108.852 27 88.612 27 69.004c.003-15.726 11.102-29.267 26.523-32.356 15.253-3.056 30.565 4.954 36.756 19.208l.204.478c2.084 4.878 9.009 4.85 11.053-.045 6.062-14.511 21.52-22.73 36.941-19.641z" fill="currentColor" /></svg> `; + } else if (name == 'repost') { + return `<svg focusable = "false" width = "24" height = "24" viewBox = "0 0 192 192" xmlns = "http://www.w3.org/2000/svg" > <path d="M18.472 146.335l-.075-.184a5.968 5.968 0 01-.216-.684l-.014-.056a5.643 5.643 0 01-.082-.397l-.013-.083a5.886 5.886 0 01-.072-.96V144c0-.157.006-.313.018-.467l.006-.075c.012-.132.028-.261.048-.39l.016-.095c.008-.05.017-.1.027-.149.005-.019.008-.038.012-.058.028-.133.06-.264.096-.393l.026-.088a5.86 5.86 0 01.482-1.159l.043-.077a5.642 5.642 0 01.31-.49l.015-.022.076-.104.044-.059a3.856 3.856 0 01.165-.208l.052-.061c.102-.12.21-.236.321-.348l18-18a6 6 0 018.661 8.303l-.175.183L38.484 138H120c23.196 0 42-18.804 42-42a6 6 0 0112 0c0 29.525-23.696 53.516-53.107 53.993L120 150H38.486l7.757 7.757a6 6 0 01.175 8.303l-.175.183a6 6 0 01-8.303.175l-.183-.175-18-18-.145-.151a6.036 6.036 0 01-.829-1.125l-.058-.105a4.08 4.08 0 01-.06-.114l-.04-.077a4.409 4.409 0 01-.139-.3l-.014-.036zM154.06 25.582l.183.175 18 18a6.036 6.036 0 01.974 1.276l.058.105c.02.035.038.07.056.105l.043.086a4.411 4.411 0 01.14.3l.014.036a5.965 5.965 0 01.291.868l.014.056c.032.13.059.263.082.397l.013.083a5.886 5.886 0 01.067.692v.014a6.11 6.11 0 01-.013.692l-.006.075a5.856 5.856 0 01-.048.39l-.016.095c-.008.05-.017.1-.027.149-.005.019-.008.038-.012.058-.028.133-.06.264-.096.393l-.026.088a5.86 5.86 0 01-.482 1.159l-.043.077-.052.09-.029.048a6.006 6.006 0 01-.32.478l-.044.059a3.857 3.857 0 01-.165.208l-.052.061a6.34 6.34 0 01-.176.197l-.145.15-18 18a6 6 0 01-8.661-8.302l.175-.183L153.514 54H72c-23.196 0-42 18.804-42 42a6 6 0 11-12 0c0-29.525 23.696-53.516 53.107-53.993L72 42h81.516l-7.759-7.757a6 6 0 01-.175-8.303l.175-.183a6 6 0 018.303-.175z" fill="currentColor" /></svg> `; + } else if (name == 'comment') { + return `<svg width = "24" height = "24" viewBox = "0 0 150 150" xmlns = "http://www.w3.org/2000/svg" > <path d="M75-.006a75 75 0 0174.997 74.31l.003.69c0 41.422-33.579 75-75 75H11.75c-6.49 0-11.75-5.26-11.75-11.75v-63.25a75 75 0 0175-75zm0 12a63 63 0 00-63 63v63h63c34.446 0 62.435-27.645 62.992-61.93l.008-1.041-.003-.633A63 63 0 0075 11.994zm21 72a6 6 0 01.225 11.996l-.225.004H51a6 6 0 01-.225-11.996l.225-.004h45zm0-24a6 6 0 01.225 11.996l-.225.004H51a6 6 0 01-.225-11.996l.225-.004h45z" fill="currentColor" /></svg> `; + } else if (name == 'bookmark') { + return `<svg xmlns="http://www.w3.org/2000/svg" x="0px" y="0px" width="24" height="24" viewBox="0 0 24 24"> +<path d="M 6.0097656 2 C 4.9143111 2 4.0097656 2.9025988 4.0097656 3.9980469 L 4 22 L 12 19 L 20 22 L 20 20.556641 L 20 4 C 20 2.9069372 19.093063 2 18 2 L 6.0097656 2 z M 6.0097656 4 L 18 4 L 18 19.113281 L 12 16.863281 L 6.0019531 19.113281 L 6.0097656 4 z" fill="currentColor"></path> +</svg>` + } + } + + /** + * Formats a list of reactions as HTML. + * + * @param {Array<Reaction>} reacts List of reactions to format + * @returns string + */ + function formatReactions(type, reacts) { + let html = ` + <div class="color--primary" > + <h3 id=`+ type + ` - header"> ` + getIcon(type) + `  <span>` + reacts.length + `</span> ` + type + `s </h3> + + <ol class="likes" role = "list" aria - labelledby="`+ type + `-header"> `; + + reacts.forEach(function (react) { + html += ` + <li class="h-card"> + <a class="u-url" + href="`+ react.author.url + ` + target="_blank" + rel = "noreferrer" + title = "`+ react.author.name + `" > + <img + alt="" + class="lazy mentions__image u-photo" + src="`+ react.author.photo + `" + loading="lazy" + decoding="async" + width="48" + height="48" + > + <span class="p-author visually-hidden" aria-hidden="true">{{ author }}</span> + </a> + </li> + `; + }); + + html += ` + </ol > + </div > + `; + return html; + } + + /** + * @typedef WebmentionResponse + * @type {Object} + * @property {Array<Reaction>} children + */ + + /** + * Register event listener. + */ + window.addEventListener("load", async function () { + const container = document.getElementById(containerID); + if (!container) { + // no container, so do nothing + return; + } + + const pages = [stripurl(refurl)]; + if (!!addurls) { + addurls.split('|').forEach(function (url) { + pages.push(stripurl(url)); + }); + } + + let apiURL = `https://webmention.io/api/mentions.jf2?per-page=${maxWebmentions}&sort-by=${sortBy}&sort-dir=${sortDir}`; + + pages.forEach(function (path) { + apiURL += `&target[]=${encodeURIComponent('http:' + path)}&target[]=${encodeURIComponent('https:' + path)}`; + }); + + // apiURL = 'http://127.0.0.1:1111/test_webmentions.jf2'; + /** @type {WebmentionResponse} */ + let json = {}; + try { + // const response = await window.fetch(apiURL); + const response = await window.fetch(apiURL); + if (response.status >= 200 && response.status < 300) { + json = await response.json(); + } else { + console.error("Could not parse response"); + new Error(response.statusText); + } + } catch (error) { + // Purposefully not escalate further, i.e. no UI update + console.error("Request failed", error); + } + + /** @type {Array<Reaction>} */ + let comments = []; + /** @type {Array<Reaction>} */ + let mentions = []; + /** @type {Array<Reaction>} */ + const bookmarks = []; + /** @type {Array<Reaction>} */ + const likes = []; + /** @type {Array<Reaction>} */ + const reposts = []; + /** @type {Array<Reaction>} */ + const follows = []; + + /** @type {Record<MentionType, Array<Reaction>>} */ + const mapping = { + "in-reply-to": comments, + "like-of": likes, + "repost-of": reposts, + "bookmark-of": bookmarks, + "follow-of": follows, + "mention-of": mentions, + "rsvp": comments + }; + + json.children.forEach(function (child) { + // Map each mention into its respective container + const store = mapping[child['wm-property']]; + if (store) { + store.push(child); + } + }); + + // format the comment-type things + let formattedMentions = ''; + if (mentions.length > 0) { + formattedMentions = formatComments('mention', dedupe(mentions)); + } + + let formattedComments = ''; + if (comments.length > 0) { + formattedComments = formatComments('comment', dedupe(comments)); + } + + // format likes + let likesStr = ''; + if (likes.length > 0) { + likesStr = formatReactions('like', dedupe(likes)); + } + + // format reposts + let repostsStr = ''; + if (reposts.length > 0) { + repostsStr = formatReactions('repost', dedupe(reposts)); + } + + // format bookmarks + let bookmarksStr = ''; + if (bookmarks.length > 0) { + bookmarksStr = formatReactions('bookmark', dedupe(bookmarks)); + } + + container.innerHTML = `<div id="webmentions">${repostsStr}${likesStr}${bookmarksStr}${formattedComments}${formattedMentions}</div>`; + }); +}()); + +// End-of-file marker for LibreJS +// @license-end diff --git a/static/js/webmention.min.js b/static/js/webmention.min.js new file mode 100644 index 0000000..5340d7e --- /dev/null +++ b/static/js/webmention.min.js @@ -0,0 +1,66 @@ +(()=>{function t(t,e){return document.currentScript.getAttribute("data-"+t)||e}window.i18next=window.i18next||{t:function(t){return t}},window.i18next.t.bind(window.i18next);let m=t("page-url",window.location.href.replace(/#.*$/,"")),f=t("add-urls",void 0),e=t("id","webmentions"),g=(t("wordcount"),t("max-webmentions",30)),v=(t("prevent-spoofing"),t("sort-by","published")),b=t("sort-dir","up");function y(t){return t.substr(t.indexOf("//"))}function x(t){let l=[],a={};return t.forEach(function(t){var e=y(t.url);a[e]||(l.push(t),a[e]=!0)}),l}function L(t,e){let a=` + <div class="webcomments"> + <h3 id="replies-header">`+o("comment")+" <span>"+e.length+"</span> "+t+`s </h3> + <ol aria-labelledby="replies-header" role="list">`;return e.forEach(function(t){let e="";var l;t.hasOwnProperty("content")&&(t.content.hasOwnProperty("html")?e=t.content.html:t.content.hasOwnProperty("text")&&(e=t.content.text)),a+=` + <li class="comment h-entry"> + <div> + <a class="comment_author u-author" + href="`+t.author.url+`" + target="_blank" + title="`+t.author.name+`" + rel="noreferrer"> + <img + src="`+t.author.photo+`" + alt="" + class="u-photo" + loading="lazy" + decoding="async" + width="48" + height="48" + > + <span class="p-author">`+t.author.name+`</span> + </a>`,t.published&&(l=new Date(t.published),a+=` + <time class="dt-published" datetime="`+t.published+'">'+l.toLocaleString(void 0,{dateStyle:"medium",timeStyle:"short"})+"</time>"),a+=` + </div> + + <p class="e-entry">`+e+` + <a class="u-url" + href="`+t.url+`" + target="_blank" + rel="noreferrer"> + source + </a> + </p> + </li> +`}),a+=` + </ol > + </div > + `}function o(t){return"like"==t?'<svg focusable = "false" width = "24" height = "24" viewBox = "0 0 192 192" xmlns = "http://www.w3.org/2000/svg" > <path d="M95.997 41.986l-.026-.035C85.746 28.36 68.428 21.423 51.165 24.881 30.138 29.094 15.004 47.558 15 69.003c0 24.413 14.906 47.964 39.486 70.086 8.43 7.586 17.437 14.468 26.444 20.533.728.49 1.444.967 2.148 1.43l1.39.909 1.355.872 1.317.835.645.403 1.259.78 1.194.726 1.032.619 1.38.807.418.236a6 6 0 005.864 0l1.138-.654 1.154-.684 1.118-.675.614-.376 1.26-.779a212 212 0 00.644-.403l1.317-.835 1.355-.872 1.39-.909c.704-.463 1.42-.94 2.148-1.43 9.007-6.065 18.015-12.947 26.444-20.533C162.094 116.967 177 93.416 177 69.004c-.004-21.446-15.138-39.91-36.165-44.123-17.07-3.42-34.174 3.323-44.43 16.568l-.408.537zm42.48-5.338c15.421 3.09 26.52 16.63 26.523 32.357 0 19.607-12.438 39.847-33.532 59.357l-1.316 1.205c-.22.201-.443.402-.666.603-7.977 7.18-16.548 13.727-25.118 19.498l-.745.5c-.74.494-1.466.973-2.177 1.437l-1.402.906-1.359.864-.662.416-1.292.8-.732.446-.73-.446-1.292-.8-.662-.416-1.36-.864-1.4-.906a235.406 235.406 0 01-2.923-1.937c-8.57-5.77-17.14-12.319-25.118-19.498l-.666-.603-1.316-1.205C39.438 108.852 27 88.612 27 69.004c.003-15.726 11.102-29.267 26.523-32.356 15.253-3.056 30.565 4.954 36.756 19.208l.204.478c2.084 4.878 9.009 4.85 11.053-.045 6.062-14.511 21.52-22.73 36.941-19.641z" fill="currentColor" /></svg> ':"repost"==t?'<svg focusable = "false" width = "24" height = "24" viewBox = "0 0 192 192" xmlns = "http://www.w3.org/2000/svg" > <path d="M18.472 146.335l-.075-.184a5.968 5.968 0 01-.216-.684l-.014-.056a5.643 5.643 0 01-.082-.397l-.013-.083a5.886 5.886 0 01-.072-.96V144c0-.157.006-.313.018-.467l.006-.075c.012-.132.028-.261.048-.39l.016-.095c.008-.05.017-.1.027-.149.005-.019.008-.038.012-.058.028-.133.06-.264.096-.393l.026-.088a5.86 5.86 0 01.482-1.159l.043-.077a5.642 5.642 0 01.31-.49l.015-.022.076-.104.044-.059a3.856 3.856 0 01.165-.208l.052-.061c.102-.12.21-.236.321-.348l18-18a6 6 0 018.661 8.303l-.175.183L38.484 138H120c23.196 0 42-18.804 42-42a6 6 0 0112 0c0 29.525-23.696 53.516-53.107 53.993L120 150H38.486l7.757 7.757a6 6 0 01.175 8.303l-.175.183a6 6 0 01-8.303.175l-.183-.175-18-18-.145-.151a6.036 6.036 0 01-.829-1.125l-.058-.105a4.08 4.08 0 01-.06-.114l-.04-.077a4.409 4.409 0 01-.139-.3l-.014-.036zM154.06 25.582l.183.175 18 18a6.036 6.036 0 01.974 1.276l.058.105c.02.035.038.07.056.105l.043.086a4.411 4.411 0 01.14.3l.014.036a5.965 5.965 0 01.291.868l.014.056c.032.13.059.263.082.397l.013.083a5.886 5.886 0 01.067.692v.014a6.11 6.11 0 01-.013.692l-.006.075a5.856 5.856 0 01-.048.39l-.016.095c-.008.05-.017.1-.027.149-.005.019-.008.038-.012.058-.028.133-.06.264-.096.393l-.026.088a5.86 5.86 0 01-.482 1.159l-.043.077-.052.09-.029.048a6.006 6.006 0 01-.32.478l-.044.059a3.857 3.857 0 01-.165.208l-.052.061a6.34 6.34 0 01-.176.197l-.145.15-18 18a6 6 0 01-8.661-8.302l.175-.183L153.514 54H72c-23.196 0-42 18.804-42 42a6 6 0 11-12 0c0-29.525 23.696-53.516 53.107-53.993L72 42h81.516l-7.759-7.757a6 6 0 01-.175-8.303l.175-.183a6 6 0 018.303-.175z" fill="currentColor" /></svg> ':"comment"==t?'<svg width = "24" height = "24" viewBox = "0 0 150 150" xmlns = "http://www.w3.org/2000/svg" > <path d="M75-.006a75 75 0 0174.997 74.31l.003.69c0 41.422-33.579 75-75 75H11.75c-6.49 0-11.75-5.26-11.75-11.75v-63.25a75 75 0 0175-75zm0 12a63 63 0 00-63 63v63h63c34.446 0 62.435-27.645 62.992-61.93l.008-1.041-.003-.633A63 63 0 0075 11.994zm21 72a6 6 0 01.225 11.996l-.225.004H51a6 6 0 01-.225-11.996l.225-.004h45zm0-24a6 6 0 01.225 11.996l-.225.004H51a6 6 0 01-.225-11.996l.225-.004h45z" fill="currentColor" /></svg> ':"bookmark"==t?`<svg xmlns="http://www.w3.org/2000/svg" x="0px" y="0px" width="24" height="24" viewBox="0 0 24 24"> +<path d="M 6.0097656 2 C 4.9143111 2 4.0097656 2.9025988 4.0097656 3.9980469 L 4 22 L 12 19 L 20 22 L 20 20.556641 L 20 4 C 20 2.9069372 19.093063 2 18 2 L 6.0097656 2 z M 6.0097656 4 L 18 4 L 18 19.113281 L 12 16.863281 L 6.0019531 19.113281 L 6.0097656 4 z" fill="currentColor"></path> +</svg>`:void 0}function k(t,e){let l=` + <div class="color--primary" > + <h3 id=`+t+' - header"> '+o(t)+"  <span>"+e.length+"</span> "+t+`s </h3> + + <ol class="likes" role = "list" aria - labelledby="`+t+'-header"> ';return e.forEach(function(t){l+=` + <li class="h-card"> + <a class="u-url" + href="`+t.author.url+` + target="_blank" + rel = "noreferrer" + title = "`+t.author.name+`" > + <img + alt="" + class="lazy mentions__image u-photo" + src="`+t.author.photo+`" + loading="lazy" + decoding="async" + width="48" + height="48" + > + <span class="p-author visually-hidden" aria-hidden="true">{{ author }}</span> + </a> + </li> + `}),l+=` + </ol > + </div > + `}window.addEventListener("load",async function(){var c=document.getElementById(e);if(c){let e=[y(m)],l=(f&&f.split("|").forEach(function(t){e.push(y(t))}),`https://webmention.io/api/mentions.jf2?per-page=${g}&sort-by=${v}&sort-dir=`+b),t=(e.forEach(function(t){l+=`&target[]=${encodeURIComponent("http:"+t)}&target[]=`+encodeURIComponent("https:"+t)}),{});try{200<=(h=await window.fetch(l)).status&&h.status<300?t=await h.json():(console.error("Could not parse response"),new Error(h.statusText))}catch(t){console.error("Request failed",t)}var h,d=[],u=[],p=[],w=[];let a={"in-reply-to":h=[],"like-of":p,"repost-of":w,"bookmark-of":u,"follow-of":[],"mention-of":d,rsvp:h},o=(t.children.forEach(function(t){var e=a[t["wm-property"]];e&&e.push(t)}),""),n=(0<d.length&&(o=L("mention",x(d))),""),r=(0<h.length&&(n=L("comment",x(h))),""),i=(0<p.length&&(r=k("like",x(p))),""),s=(0<w.length&&(i=k("repost",x(w))),"");0<u.length&&(s=k("bookmark",x(u))),c.innerHTML=`<div id="webmentions">${i}${r}${s}${n}${o}</div>`}})})(); diff --git a/static/katex.min.css b/static/katex.min.css index 3095c8b..23187c5 100644 --- a/static/katex.min.css +++ b/static/katex.min.css @@ -1 +1 @@ -@font-face{font-style:normal;font-weight:400;src:url(fonts/KaTeX/KaTeX_AMS-Regular.woff2) format("woff2"),url(fonts/KaTeX/KaTeX_AMS-Regular.woff) format("woff"),url(fonts/KaTeX/KaTeX_AMS-Regular.ttf) format("truetype");font-family:KaTeX_AMS}@font-face{font-style:normal;font-weight:700;src:url(fonts/KaTeX/KaTeX_Caligraphic-Bold.woff2) format("woff2"),url(fonts/KaTeX/KaTeX_Caligraphic-Bold.woff) format("woff"),url(fonts/KaTeX/KaTeX_Caligraphic-Bold.ttf) format("truetype");font-family:KaTeX_Caligraphic}@font-face{font-style:normal;font-weight:400;src:url(fonts/KaTeX/KaTeX_Caligraphic-Regular.woff2) format("woff2"),url(fonts/KaTeX/KaTeX_Caligraphic-Regular.woff) format("woff"),url(fonts/KaTeX/KaTeX_Caligraphic-Regular.ttf) format("truetype");font-family:KaTeX_Caligraphic}@font-face{font-style:normal;font-weight:700;src:url(fonts/KaTeX/KaTeX_Fraktur-Bold.woff2) format("woff2"),url(fonts/KaTeX/KaTeX_Fraktur-Bold.woff) format("woff"),url(fonts/KaTeX/KaTeX_Fraktur-Bold.ttf) format("truetype");font-family:KaTeX_Fraktur}@font-face{font-style:normal;font-weight:400;src:url(fonts/KaTeX/KaTeX_Fraktur-Regular.woff2) format("woff2"),url(fonts/KaTeX/KaTeX_Fraktur-Regular.woff) format("woff"),url(fonts/KaTeX/KaTeX_Fraktur-Regular.ttf) format("truetype");font-family:KaTeX_Fraktur}@font-face{font-style:normal;font-weight:700;src:url(fonts/KaTeX/KaTeX_Main-Bold.woff2) format("woff2"),url(fonts/KaTeX/KaTeX_Main-Bold.woff) format("woff"),url(fonts/KaTeX/KaTeX_Main-Bold.ttf) format("truetype");font-family:KaTeX_Main}@font-face{font-style:italic;font-weight:700;src:url(fonts/KaTeX/KaTeX_Main-BoldItalic.woff2) format("woff2"),url(fonts/KaTeX/KaTeX_Main-BoldItalic.woff) format("woff"),url(fonts/KaTeX/KaTeX_Main-BoldItalic.ttf) format("truetype");font-family:KaTeX_Main}@font-face{font-style:italic;font-weight:400;src:url(fonts/KaTeX/KaTeX_Main-Italic.woff2) format("woff2"),url(fonts/KaTeX/KaTeX_Main-Italic.woff) format("woff"),url(fonts/KaTeX/KaTeX_Main-Italic.ttf) format("truetype");font-family:KaTeX_Main}@font-face{font-style:normal;font-weight:400;src:url(fonts/KaTeX/KaTeX_Main-Regular.woff2) format("woff2"),url(fonts/KaTeX/KaTeX_Main-Regular.woff) format("woff"),url(fonts/KaTeX/KaTeX_Main-Regular.ttf) format("truetype");font-family:KaTeX_Main}@font-face{font-style:italic;font-weight:700;src:url(fonts/KaTeX/KaTeX_Math-BoldItalic.woff2) format("woff2"),url(fonts/KaTeX/KaTeX_Math-BoldItalic.woff) format("woff"),url(fonts/KaTeX/KaTeX_Math-BoldItalic.ttf) format("truetype");font-family:KaTeX_Math}@font-face{font-style:italic;font-weight:400;src:url(fonts/KaTeX/KaTeX_Math-Italic.woff2) format("woff2"),url(fonts/KaTeX/KaTeX_Math-Italic.woff) format("woff"),url(fonts/KaTeX/KaTeX_Math-Italic.ttf) format("truetype");font-family:KaTeX_Math}@font-face{font-style:normal;font-weight:700;src:url(fonts/KaTeX/KaTeX_SansSerif-Bold.woff2) format("woff2"),url(fonts/KaTeX/KaTeX_SansSerif-Bold.woff) format("woff"),url(fonts/KaTeX/KaTeX_SansSerif-Bold.ttf) format("truetype");font-family:"KaTeX_SansSerif"}@font-face{font-style:italic;font-weight:400;src:url(fonts/KaTeX/KaTeX_SansSerif-Italic.woff2) format("woff2"),url(fonts/KaTeX/KaTeX_SansSerif-Italic.woff) format("woff"),url(fonts/KaTeX/KaTeX_SansSerif-Italic.ttf) format("truetype");font-family:"KaTeX_SansSerif"}@font-face{font-style:normal;font-weight:400;src:url(fonts/KaTeX/KaTeX_SansSerif-Regular.woff2) format("woff2"),url(fonts/KaTeX/KaTeX_SansSerif-Regular.woff) format("woff"),url(fonts/KaTeX/KaTeX_SansSerif-Regular.ttf) format("truetype");font-family:"KaTeX_SansSerif"}@font-face{font-style:normal;font-weight:400;src:url(fonts/KaTeX/KaTeX_Script-Regular.woff2) format("woff2"),url(fonts/KaTeX/KaTeX_Script-Regular.woff) format("woff"),url(fonts/KaTeX/KaTeX_Script-Regular.ttf) format("truetype");font-family:KaTeX_Script}@font-face{font-style:normal;font-weight:400;src:url(fonts/KaTeX/KaTeX_Size1-Regular.woff2) format("woff2"),url(fonts/KaTeX/KaTeX_Size1-Regular.woff) format("woff"),url(fonts/KaTeX/KaTeX_Size1-Regular.ttf) format("truetype");font-family:KaTeX_Size1}@font-face{font-style:normal;font-weight:400;src:url(fonts/KaTeX/KaTeX_Size2-Regular.woff2) format("woff2"),url(fonts/KaTeX/KaTeX_Size2-Regular.woff) format("woff"),url(fonts/KaTeX/KaTeX_Size2-Regular.ttf) format("truetype");font-family:KaTeX_Size2}@font-face{font-style:normal;font-weight:400;src:url(fonts/KaTeX/KaTeX_Size3-Regular.woff2) format("woff2"),url(fonts/KaTeX/KaTeX_Size3-Regular.woff) format("woff"),url(fonts/KaTeX/KaTeX_Size3-Regular.ttf) format("truetype");font-family:KaTeX_Size3}@font-face{font-style:normal;font-weight:400;src:url(fonts/KaTeX/KaTeX_Size4-Regular.woff2) format("woff2"),url(fonts/KaTeX/KaTeX_Size4-Regular.woff) format("woff"),url(fonts/KaTeX/KaTeX_Size4-Regular.ttf) format("truetype");font-family:KaTeX_Size4}@font-face{font-style:normal;font-weight:400;src:url(fonts/KaTeX/KaTeX_Typewriter-Regular.woff2) format("woff2"),url(fonts/KaTeX/KaTeX_Typewriter-Regular.woff) format("woff"),url(fonts/KaTeX/KaTeX_Typewriter-Regular.ttf) format("truetype");font-family:KaTeX_Typewriter}.katex{font:normal 1.21em KaTeX_Main,Times New Roman,serif;line-height:1.2;text-indent:0;text-rendering:auto}.katex *{-ms-high-contrast-adjust:none!important;border-color:currentColor}.katex .katex-version:after{content:"0.16.10"}.katex .katex-mathml{clip:rect(1px,1px,1px,1px);position:absolute;border:0;padding:0;width:1px;height:1px;overflow:hidden}.katex .katex-html>.newline{display:block}.katex .base{position:relative;width:-webkit-min-content;width:-moz-min-content;width:min-content;white-space:nowrap}.katex .base,.katex .strut{display:inline-block}.katex .textbf{font-weight:700}.katex .textit{font-style:italic}.katex .textrm{font-family:KaTeX_Main}.katex .textsf{font-family:KaTeX_SansSerif}.katex .texttt{font-family:KaTeX_Typewriter}.katex .mathnormal{font-style:italic;font-family:KaTeX_Math}.katex .mathit{font-style:italic;font-family:KaTeX_Main}.katex .mathrm{font-style:normal}.katex .mathbf{font-weight:700;font-family:KaTeX_Main}.katex .boldsymbol{font-style:italic;font-weight:700;font-family:KaTeX_Math}.katex .amsrm,.katex .mathbb,.katex .textbb{font-family:KaTeX_AMS}.katex .mathcal{font-family:KaTeX_Caligraphic}.katex .mathfrak,.katex .textfrak{font-family:KaTeX_Fraktur}.katex .mathboldfrak,.katex .textboldfrak{font-weight:700;font-family:KaTeX_Fraktur}.katex .mathtt{font-family:KaTeX_Typewriter}.katex .mathscr,.katex .textscr{font-family:KaTeX_Script}.katex .mathsf,.katex .textsf{font-family:KaTeX_SansSerif}.katex .mathboldsf,.katex .textboldsf{font-weight:700;font-family:KaTeX_SansSerif}.katex .mathitsf,.katex .textitsf{font-style:italic;font-family:KaTeX_SansSerif}.katex .mainrm{font-style:normal;font-family:KaTeX_Main}.katex .vlist-t{display:inline-table;border-collapse:collapse;table-layout:fixed}.katex .vlist-r{display:table-row}.katex .vlist{display:table-cell;position:relative;vertical-align:bottom}.katex .vlist>span{display:block;position:relative;height:0}.katex .vlist>span>span{display:inline-block}.katex .vlist>span>.pstrut{width:0;overflow:hidden}.katex .vlist-t2{margin-right:-2px}.katex .vlist-s{display:table-cell;vertical-align:bottom;width:2px;min-width:2px;font-size:1px}.katex .vbox{display:inline-flex;flex-direction:column;align-items:baseline}.katex .hbox{width:100%}.katex .hbox,.katex .thinbox{display:inline-flex;flex-direction:row}.katex .thinbox{width:0;max-width:0}.katex .msupsub{text-align:left}.katex .mfrac>span>span{text-align:center}.katex .mfrac .frac-line{display:inline-block;border-bottom-style:solid;width:100%}.katex .hdashline,.katex .hline,.katex .mfrac .frac-line,.katex .overline .overline-line,.katex .rule,.katex .underline .underline-line{min-height:1px}.katex .mspace{display:inline-block}.katex .clap,.katex .llap,.katex .rlap{position:relative;width:0}.katex .clap>.inner,.katex .llap>.inner,.katex .rlap>.inner{position:absolute}.katex .clap>.fix,.katex .llap>.fix,.katex .rlap>.fix{display:inline-block}.katex .llap>.inner{right:0}.katex .clap>.inner,.katex .rlap>.inner{left:0}.katex .clap>.inner>span{margin-right:50%;margin-left:-50%}.katex .rule{display:inline-block;position:relative;border:0 solid}.katex .hline,.katex .overline .overline-line,.katex .underline .underline-line{display:inline-block;border-bottom-style:solid;width:100%}.katex .hdashline{display:inline-block;border-bottom-style:dashed;width:100%}.katex .sqrt>.root{margin-right:-.55555556em;margin-left:.27777778em}.katex .fontsize-ensurer.reset-size1.size1,.katex .sizing.reset-size1.size1{font-size:1em}.katex .fontsize-ensurer.reset-size1.size2,.katex .sizing.reset-size1.size2{font-size:1.2em}.katex .fontsize-ensurer.reset-size1.size3,.katex .sizing.reset-size1.size3{font-size:1.4em}.katex .fontsize-ensurer.reset-size1.size4,.katex .sizing.reset-size1.size4{font-size:1.6em}.katex .fontsize-ensurer.reset-size1.size5,.katex .sizing.reset-size1.size5{font-size:1.8em}.katex .fontsize-ensurer.reset-size1.size6,.katex .sizing.reset-size1.size6{font-size:2em}.katex .fontsize-ensurer.reset-size1.size7,.katex .sizing.reset-size1.size7{font-size:2.4em}.katex .fontsize-ensurer.reset-size1.size8,.katex .sizing.reset-size1.size8{font-size:2.88em}.katex .fontsize-ensurer.reset-size1.size9,.katex .sizing.reset-size1.size9{font-size:3.456em}.katex .fontsize-ensurer.reset-size1.size10,.katex .sizing.reset-size1.size10{font-size:4.148em}.katex .fontsize-ensurer.reset-size1.size11,.katex .sizing.reset-size1.size11{font-size:4.976em}.katex .fontsize-ensurer.reset-size2.size1,.katex .sizing.reset-size2.size1{font-size:.83333333em}.katex .fontsize-ensurer.reset-size2.size2,.katex .sizing.reset-size2.size2{font-size:1em}.katex .fontsize-ensurer.reset-size2.size3,.katex .sizing.reset-size2.size3{font-size:1.16666667em}.katex .fontsize-ensurer.reset-size2.size4,.katex .sizing.reset-size2.size4{font-size:1.33333333em}.katex .fontsize-ensurer.reset-size2.size5,.katex .sizing.reset-size2.size5{font-size:1.5em}.katex .fontsize-ensurer.reset-size2.size6,.katex .sizing.reset-size2.size6{font-size:1.66666667em}.katex .fontsize-ensurer.reset-size2.size7,.katex .sizing.reset-size2.size7{font-size:2em}.katex .fontsize-ensurer.reset-size2.size8,.katex .sizing.reset-size2.size8{font-size:2.4em}.katex .fontsize-ensurer.reset-size2.size9,.katex .sizing.reset-size2.size9{font-size:2.88em}.katex .fontsize-ensurer.reset-size2.size10,.katex .sizing.reset-size2.size10{font-size:3.45666667em}.katex .fontsize-ensurer.reset-size2.size11,.katex .sizing.reset-size2.size11{font-size:4.14666667em}.katex .fontsize-ensurer.reset-size3.size1,.katex .sizing.reset-size3.size1{font-size:.71428571em}.katex .fontsize-ensurer.reset-size3.size2,.katex .sizing.reset-size3.size2{font-size:.85714286em}.katex .fontsize-ensurer.reset-size3.size3,.katex .sizing.reset-size3.size3{font-size:1em}.katex .fontsize-ensurer.reset-size3.size4,.katex .sizing.reset-size3.size4{font-size:1.14285714em}.katex .fontsize-ensurer.reset-size3.size5,.katex .sizing.reset-size3.size5{font-size:1.28571429em}.katex .fontsize-ensurer.reset-size3.size6,.katex .sizing.reset-size3.size6{font-size:1.42857143em}.katex .fontsize-ensurer.reset-size3.size7,.katex .sizing.reset-size3.size7{font-size:1.71428571em}.katex .fontsize-ensurer.reset-size3.size8,.katex .sizing.reset-size3.size8{font-size:2.05714286em}.katex .fontsize-ensurer.reset-size3.size9,.katex .sizing.reset-size3.size9{font-size:2.46857143em}.katex .fontsize-ensurer.reset-size3.size10,.katex .sizing.reset-size3.size10{font-size:2.96285714em}.katex .fontsize-ensurer.reset-size3.size11,.katex .sizing.reset-size3.size11{font-size:3.55428571em}.katex .fontsize-ensurer.reset-size4.size1,.katex .sizing.reset-size4.size1{font-size:.625em}.katex .fontsize-ensurer.reset-size4.size2,.katex .sizing.reset-size4.size2{font-size:.75em}.katex .fontsize-ensurer.reset-size4.size3,.katex .sizing.reset-size4.size3{font-size:.875em}.katex .fontsize-ensurer.reset-size4.size4,.katex .sizing.reset-size4.size4{font-size:1em}.katex .fontsize-ensurer.reset-size4.size5,.katex .sizing.reset-size4.size5{font-size:1.125em}.katex .fontsize-ensurer.reset-size4.size6,.katex .sizing.reset-size4.size6{font-size:1.25em}.katex .fontsize-ensurer.reset-size4.size7,.katex .sizing.reset-size4.size7{font-size:1.5em}.katex .fontsize-ensurer.reset-size4.size8,.katex .sizing.reset-size4.size8{font-size:1.8em}.katex .fontsize-ensurer.reset-size4.size9,.katex .sizing.reset-size4.size9{font-size:2.16em}.katex .fontsize-ensurer.reset-size4.size10,.katex .sizing.reset-size4.size10{font-size:2.5925em}.katex .fontsize-ensurer.reset-size4.size11,.katex .sizing.reset-size4.size11{font-size:3.11em}.katex .fontsize-ensurer.reset-size5.size1,.katex .sizing.reset-size5.size1{font-size:.55555556em}.katex .fontsize-ensurer.reset-size5.size2,.katex .sizing.reset-size5.size2{font-size:.66666667em}.katex .fontsize-ensurer.reset-size5.size3,.katex .sizing.reset-size5.size3{font-size:.77777778em}.katex .fontsize-ensurer.reset-size5.size4,.katex .sizing.reset-size5.size4{font-size:.88888889em}.katex .fontsize-ensurer.reset-size5.size5,.katex .sizing.reset-size5.size5{font-size:1em}.katex .fontsize-ensurer.reset-size5.size6,.katex .sizing.reset-size5.size6{font-size:1.11111111em}.katex .fontsize-ensurer.reset-size5.size7,.katex .sizing.reset-size5.size7{font-size:1.33333333em}.katex .fontsize-ensurer.reset-size5.size8,.katex .sizing.reset-size5.size8{font-size:1.6em}.katex .fontsize-ensurer.reset-size5.size9,.katex .sizing.reset-size5.size9{font-size:1.92em}.katex .fontsize-ensurer.reset-size5.size10,.katex .sizing.reset-size5.size10{font-size:2.30444444em}.katex .fontsize-ensurer.reset-size5.size11,.katex .sizing.reset-size5.size11{font-size:2.76444444em}.katex .fontsize-ensurer.reset-size6.size1,.katex .sizing.reset-size6.size1{font-size:.5em}.katex .fontsize-ensurer.reset-size6.size2,.katex .sizing.reset-size6.size2{font-size:.6em}.katex .fontsize-ensurer.reset-size6.size3,.katex .sizing.reset-size6.size3{font-size:.7em}.katex .fontsize-ensurer.reset-size6.size4,.katex .sizing.reset-size6.size4{font-size:.8em}.katex .fontsize-ensurer.reset-size6.size5,.katex .sizing.reset-size6.size5{font-size:.9em}.katex .fontsize-ensurer.reset-size6.size6,.katex .sizing.reset-size6.size6{font-size:1em}.katex .fontsize-ensurer.reset-size6.size7,.katex .sizing.reset-size6.size7{font-size:1.2em}.katex .fontsize-ensurer.reset-size6.size8,.katex .sizing.reset-size6.size8{font-size:1.44em}.katex .fontsize-ensurer.reset-size6.size9,.katex .sizing.reset-size6.size9{font-size:1.728em}.katex .fontsize-ensurer.reset-size6.size10,.katex .sizing.reset-size6.size10{font-size:2.074em}.katex .fontsize-ensurer.reset-size6.size11,.katex .sizing.reset-size6.size11{font-size:2.488em}.katex .fontsize-ensurer.reset-size7.size1,.katex .sizing.reset-size7.size1{font-size:.41666667em}.katex .fontsize-ensurer.reset-size7.size2,.katex .sizing.reset-size7.size2{font-size:.5em}.katex .fontsize-ensurer.reset-size7.size3,.katex .sizing.reset-size7.size3{font-size:.58333333em}.katex .fontsize-ensurer.reset-size7.size4,.katex .sizing.reset-size7.size4{font-size:.66666667em}.katex .fontsize-ensurer.reset-size7.size5,.katex .sizing.reset-size7.size5{font-size:.75em}.katex .fontsize-ensurer.reset-size7.size6,.katex .sizing.reset-size7.size6{font-size:.83333333em}.katex .fontsize-ensurer.reset-size7.size7,.katex .sizing.reset-size7.size7{font-size:1em}.katex .fontsize-ensurer.reset-size7.size8,.katex .sizing.reset-size7.size8{font-size:1.2em}.katex .fontsize-ensurer.reset-size7.size9,.katex .sizing.reset-size7.size9{font-size:1.44em}.katex .fontsize-ensurer.reset-size7.size10,.katex .sizing.reset-size7.size10{font-size:1.72833333em}.katex .fontsize-ensurer.reset-size7.size11,.katex .sizing.reset-size7.size11{font-size:2.07333333em}.katex .fontsize-ensurer.reset-size8.size1,.katex .sizing.reset-size8.size1{font-size:.34722222em}.katex .fontsize-ensurer.reset-size8.size2,.katex .sizing.reset-size8.size2{font-size:.41666667em}.katex .fontsize-ensurer.reset-size8.size3,.katex .sizing.reset-size8.size3{font-size:.48611111em}.katex .fontsize-ensurer.reset-size8.size4,.katex .sizing.reset-size8.size4{font-size:.55555556em}.katex .fontsize-ensurer.reset-size8.size5,.katex .sizing.reset-size8.size5{font-size:.625em}.katex .fontsize-ensurer.reset-size8.size6,.katex .sizing.reset-size8.size6{font-size:.69444444em}.katex .fontsize-ensurer.reset-size8.size7,.katex .sizing.reset-size8.size7{font-size:.83333333em}.katex .fontsize-ensurer.reset-size8.size8,.katex .sizing.reset-size8.size8{font-size:1em}.katex .fontsize-ensurer.reset-size8.size9,.katex .sizing.reset-size8.size9{font-size:1.2em}.katex .fontsize-ensurer.reset-size8.size10,.katex .sizing.reset-size8.size10{font-size:1.44027778em}.katex .fontsize-ensurer.reset-size8.size11,.katex .sizing.reset-size8.size11{font-size:1.72777778em}.katex .fontsize-ensurer.reset-size9.size1,.katex .sizing.reset-size9.size1{font-size:.28935185em}.katex .fontsize-ensurer.reset-size9.size2,.katex .sizing.reset-size9.size2{font-size:.34722222em}.katex .fontsize-ensurer.reset-size9.size3,.katex .sizing.reset-size9.size3{font-size:.40509259em}.katex .fontsize-ensurer.reset-size9.size4,.katex .sizing.reset-size9.size4{font-size:.46296296em}.katex .fontsize-ensurer.reset-size9.size5,.katex .sizing.reset-size9.size5{font-size:.52083333em}.katex .fontsize-ensurer.reset-size9.size6,.katex .sizing.reset-size9.size6{font-size:.5787037em}.katex .fontsize-ensurer.reset-size9.size7,.katex .sizing.reset-size9.size7{font-size:.69444444em}.katex .fontsize-ensurer.reset-size9.size8,.katex .sizing.reset-size9.size8{font-size:.83333333em}.katex .fontsize-ensurer.reset-size9.size9,.katex .sizing.reset-size9.size9{font-size:1em}.katex .fontsize-ensurer.reset-size9.size10,.katex .sizing.reset-size9.size10{font-size:1.20023148em}.katex .fontsize-ensurer.reset-size9.size11,.katex .sizing.reset-size9.size11{font-size:1.43981481em}.katex .fontsize-ensurer.reset-size10.size1,.katex .sizing.reset-size10.size1{font-size:.24108004em}.katex .fontsize-ensurer.reset-size10.size2,.katex .sizing.reset-size10.size2{font-size:.28929605em}.katex .fontsize-ensurer.reset-size10.size3,.katex .sizing.reset-size10.size3{font-size:.33751205em}.katex .fontsize-ensurer.reset-size10.size4,.katex .sizing.reset-size10.size4{font-size:.38572806em}.katex .fontsize-ensurer.reset-size10.size5,.katex .sizing.reset-size10.size5{font-size:.43394407em}.katex .fontsize-ensurer.reset-size10.size6,.katex .sizing.reset-size10.size6{font-size:.48216008em}.katex .fontsize-ensurer.reset-size10.size7,.katex .sizing.reset-size10.size7{font-size:.57859209em}.katex .fontsize-ensurer.reset-size10.size8,.katex .sizing.reset-size10.size8{font-size:.69431051em}.katex .fontsize-ensurer.reset-size10.size9,.katex .sizing.reset-size10.size9{font-size:.83317261em}.katex .fontsize-ensurer.reset-size10.size10,.katex .sizing.reset-size10.size10{font-size:1em}.katex .fontsize-ensurer.reset-size10.size11,.katex .sizing.reset-size10.size11{font-size:1.19961427em}.katex .fontsize-ensurer.reset-size11.size1,.katex .sizing.reset-size11.size1{font-size:.20096463em}.katex .fontsize-ensurer.reset-size11.size2,.katex .sizing.reset-size11.size2{font-size:.24115756em}.katex .fontsize-ensurer.reset-size11.size3,.katex .sizing.reset-size11.size3{font-size:.28135048em}.katex .fontsize-ensurer.reset-size11.size4,.katex .sizing.reset-size11.size4{font-size:.32154341em}.katex .fontsize-ensurer.reset-size11.size5,.katex .sizing.reset-size11.size5{font-size:.36173633em}.katex .fontsize-ensurer.reset-size11.size6,.katex .sizing.reset-size11.size6{font-size:.40192926em}.katex .fontsize-ensurer.reset-size11.size7,.katex .sizing.reset-size11.size7{font-size:.48231511em}.katex .fontsize-ensurer.reset-size11.size8,.katex .sizing.reset-size11.size8{font-size:.57877814em}.katex .fontsize-ensurer.reset-size11.size9,.katex .sizing.reset-size11.size9{font-size:.69453376em}.katex .fontsize-ensurer.reset-size11.size10,.katex .sizing.reset-size11.size10{font-size:.83360129em}.katex .fontsize-ensurer.reset-size11.size11,.katex .sizing.reset-size11.size11{font-size:1em}.katex .delimsizing.size1{font-family:KaTeX_Size1}.katex .delimsizing.size2{font-family:KaTeX_Size2}.katex .delimsizing.size3{font-family:KaTeX_Size3}.katex .delimsizing.size4{font-family:KaTeX_Size4}.katex .delimsizing.mult .delim-size1>span{font-family:KaTeX_Size1}.katex .delimsizing.mult .delim-size4>span{font-family:KaTeX_Size4}.katex .nulldelimiter{display:inline-block;width:.12em}.katex .delimcenter,.katex .op-symbol{position:relative}.katex .op-symbol.small-op{font-family:KaTeX_Size1}.katex .op-symbol.large-op{font-family:KaTeX_Size2}.katex .accent>.vlist-t,.katex .op-limits>.vlist-t{text-align:center}.katex .accent .accent-body{position:relative}.katex .accent .accent-body:not(.accent-full){width:0}.katex .overlay{display:block}.katex .mtable .vertical-separator{display:inline-block;min-width:1px}.katex .mtable .arraycolsep{display:inline-block}.katex .mtable .col-align-c>.vlist-t{text-align:center}.katex .mtable .col-align-l>.vlist-t{text-align:left}.katex .mtable .col-align-r>.vlist-t{text-align:right}.katex .svg-align{text-align:left}.katex svg{fill:currentColor;stroke:currentColor;fill-rule:nonzero;fill-opacity:1;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;display:block;position:absolute;width:100%;height:inherit}.katex svg path{stroke:none}.katex img{border-style:none;min-width:0;max-width:none;min-height:0;max-height:none}.katex .stretchy{display:block;position:relative;width:100%;overflow:hidden}.katex .stretchy:after,.katex .stretchy:before{content:""}.katex .hide-tail{position:relative;width:100%;overflow:hidden}.katex .halfarrow-left{position:absolute;left:0;width:50.2%;overflow:hidden}.katex .halfarrow-right{position:absolute;right:0;width:50.2%;overflow:hidden}.katex .brace-left{position:absolute;left:0;width:25.1%;overflow:hidden}.katex .brace-center{position:absolute;left:25%;width:50%;overflow:hidden}.katex .brace-right{position:absolute;right:0;width:25.1%;overflow:hidden}.katex .x-arrow-pad{padding:0 .5em}.katex .cd-arrow-pad{padding:0 .55556em 0 .27778em}.katex .mover,.katex .munder,.katex .x-arrow{text-align:center}.katex .boxpad{padding:0 .3em}.katex .fbox,.katex .fcolorbox{box-sizing:border-box;border:.04em solid}.katex .cancel-pad{padding:0 .2em}.katex .cancel-lap{margin-right:-.2em;margin-left:-.2em}.katex .sout{border-bottom-width:.08em;border-bottom-style:solid}.katex .angl{box-sizing:border-box;margin-right:.03889em;border-top:.049em solid;border-right:.049em solid}.katex .anglpad{padding:0 .03889em}.katex .eqn-num:before{counter-increment:katexEqnNo;content:"(" counter(katexEqnNo) ")"}.katex .mml-eqn-num:before{counter-increment:mmlEqnNo;content:"(" counter(mmlEqnNo) ")"}.katex .mtr-glue{width:50%}.katex .cd-vert-arrow{display:inline-block;position:relative}.katex .cd-label-left{display:inline-block;position:absolute;right:calc(50% + .3em);text-align:left}.katex .cd-label-right{display:inline-block;position:absolute;left:calc(50% + .3em);text-align:right}.katex-display{display:block;margin:1em 0;text-align:center}.katex-display>.katex{display:block;text-align:center;white-space:nowrap}.katex-display>.katex>.katex-html{display:block;position:relative}.katex-display>.katex>.katex-html>.tag{position:absolute;right:0}.katex-display.leqno>.katex>.katex-html>.tag{right:auto;left:0}.katex-display.fleqn>.katex{padding-left:2em;text-align:left}body{counter-reset:katexEqnNo mmlEqnNo} +@font-face{font-family:KaTeX_AMS;font-style:normal;font-weight:400;src:url(fonts/KaTeX/KaTeX_AMS-Regular.woff2) format("woff2"),url(fonts/KaTeX/KaTeX_AMS-Regular.woff) format("woff"),url(fonts/KaTeX/KaTeX_AMS-Regular.ttf) format("truetype")}@font-face{font-family:KaTeX_Caligraphic;font-style:normal;font-weight:700;src:url(fonts/KaTeX/KaTeX_Caligraphic-Bold.woff2) format("woff2"),url(fonts/KaTeX/KaTeX_Caligraphic-Bold.woff) format("woff"),url(fonts/KaTeX/KaTeX_Caligraphic-Bold.ttf) format("truetype")}@font-face{font-family:KaTeX_Caligraphic;font-style:normal;font-weight:400;src:url(fonts/KaTeX/KaTeX_Caligraphic-Regular.woff2) format("woff2"),url(fonts/KaTeX/KaTeX_Caligraphic-Regular.woff) format("woff"),url(fonts/KaTeX/KaTeX_Caligraphic-Regular.ttf) format("truetype")}@font-face{font-family:KaTeX_Fraktur;font-style:normal;font-weight:700;src:url(fonts/KaTeX/KaTeX_Fraktur-Bold.woff2) format("woff2"),url(fonts/KaTeX/KaTeX_Fraktur-Bold.woff) format("woff"),url(fonts/KaTeX/KaTeX_Fraktur-Bold.ttf) format("truetype")}@font-face{font-family:KaTeX_Fraktur;font-style:normal;font-weight:400;src:url(fonts/KaTeX/KaTeX_Fraktur-Regular.woff2) format("woff2"),url(fonts/KaTeX/KaTeX_Fraktur-Regular.woff) format("woff"),url(fonts/KaTeX/KaTeX_Fraktur-Regular.ttf) format("truetype")}@font-face{font-family:KaTeX_Main;font-style:normal;font-weight:700;src:url(fonts/KaTeX/KaTeX_Main-Bold.woff2) format("woff2"),url(fonts/KaTeX/KaTeX_Main-Bold.woff) format("woff"),url(fonts/KaTeX/KaTeX_Main-Bold.ttf) format("truetype")}@font-face{font-family:KaTeX_Main;font-style:italic;font-weight:700;src:url(fonts/KaTeX/KaTeX_Main-BoldItalic.woff2) format("woff2"),url(fonts/KaTeX/KaTeX_Main-BoldItalic.woff) format("woff"),url(fonts/KaTeX/KaTeX_Main-BoldItalic.ttf) format("truetype")}@font-face{font-family:KaTeX_Main;font-style:italic;font-weight:400;src:url(fonts/KaTeX/KaTeX_Main-Italic.woff2) format("woff2"),url(fonts/KaTeX/KaTeX_Main-Italic.woff) format("woff"),url(fonts/KaTeX/KaTeX_Main-Italic.ttf) format("truetype")}@font-face{font-family:KaTeX_Main;font-style:normal;font-weight:400;src:url(fonts/KaTeX/KaTeX_Main-Regular.woff2) format("woff2"),url(fonts/KaTeX/KaTeX_Main-Regular.woff) format("woff"),url(fonts/KaTeX/KaTeX_Main-Regular.ttf) format("truetype")}@font-face{font-family:KaTeX_Math;font-style:italic;font-weight:700;src:url(fonts/KaTeX/KaTeX_Math-BoldItalic.woff2) format("woff2"),url(fonts/KaTeX/KaTeX_Math-BoldItalic.woff) format("woff"),url(fonts/KaTeX/KaTeX_Math-BoldItalic.ttf) format("truetype")}@font-face{font-family:KaTeX_Math;font-style:italic;font-weight:400;src:url(fonts/KaTeX/KaTeX_Math-Italic.woff2) format("woff2"),url(fonts/KaTeX/KaTeX_Math-Italic.woff) format("woff"),url(fonts/KaTeX/KaTeX_Math-Italic.ttf) format("truetype")}@font-face{font-family:"KaTeX_SansSerif";font-style:normal;font-weight:700;src:url(fonts/KaTeX/KaTeX_SansSerif-Bold.woff2) format("woff2"),url(fonts/KaTeX/KaTeX_SansSerif-Bold.woff) format("woff"),url(fonts/KaTeX/KaTeX_SansSerif-Bold.ttf) format("truetype")}@font-face{font-family:"KaTeX_SansSerif";font-style:italic;font-weight:400;src:url(fonts/KaTeX/KaTeX_SansSerif-Italic.woff2) format("woff2"),url(fonts/KaTeX/KaTeX_SansSerif-Italic.woff) format("woff"),url(fonts/KaTeX/KaTeX_SansSerif-Italic.ttf) format("truetype")}@font-face{font-family:"KaTeX_SansSerif";font-style:normal;font-weight:400;src:url(fonts/KaTeX/KaTeX_SansSerif-Regular.woff2) format("woff2"),url(fonts/KaTeX/KaTeX_SansSerif-Regular.woff) format("woff"),url(fonts/KaTeX/KaTeX_SansSerif-Regular.ttf) format("truetype")}@font-face{font-family:KaTeX_Script;font-style:normal;font-weight:400;src:url(fonts/KaTeX/KaTeX_Script-Regular.woff2) format("woff2"),url(fonts/KaTeX/KaTeX_Script-Regular.woff) format("woff"),url(fonts/KaTeX/KaTeX_Script-Regular.ttf) format("truetype")}@font-face{font-family:KaTeX_Size1;font-style:normal;font-weight:400;src:url(fonts/KaTeX/KaTeX_Size1-Regular.woff2) format("woff2"),url(fonts/KaTeX/KaTeX_Size1-Regular.woff) format("woff"),url(fonts/KaTeX/KaTeX_Size1-Regular.ttf) format("truetype")}@font-face{font-family:KaTeX_Size2;font-style:normal;font-weight:400;src:url(fonts/KaTeX/KaTeX_Size2-Regular.woff2) format("woff2"),url(fonts/KaTeX/KaTeX_Size2-Regular.woff) format("woff"),url(fonts/KaTeX/KaTeX_Size2-Regular.ttf) format("truetype")}@font-face{font-family:KaTeX_Size3;font-style:normal;font-weight:400;src:url(fonts/KaTeX/KaTeX_Size3-Regular.woff2) format("woff2"),url(fonts/KaTeX/KaTeX_Size3-Regular.woff) format("woff"),url(fonts/KaTeX/KaTeX_Size3-Regular.ttf) format("truetype")}@font-face{font-family:KaTeX_Size4;font-style:normal;font-weight:400;src:url(fonts/KaTeX/KaTeX_Size4-Regular.woff2) format("woff2"),url(fonts/KaTeX/KaTeX_Size4-Regular.woff) format("woff"),url(fonts/KaTeX/KaTeX_Size4-Regular.ttf) format("truetype")}@font-face{font-family:KaTeX_Typewriter;font-style:normal;font-weight:400;src:url(fonts/KaTeX/KaTeX_Typewriter-Regular.woff2) format("woff2"),url(fonts/KaTeX/KaTeX_Typewriter-Regular.woff) format("woff"),url(fonts/KaTeX/KaTeX_Typewriter-Regular.ttf) format("truetype")}.katex{font:normal 1.21em KaTeX_Main,Times New Roman,serif;line-height:1.2;text-indent:0;text-rendering:auto}.katex *{-ms-high-contrast-adjust:none!important;border-color:currentColor}.katex .katex-version:after{content:"0.16.23"}.katex .katex-mathml{clip:rect(1px,1px,1px,1px);border:0;height:1px;overflow:hidden;padding:0;position:absolute;width:1px}.katex .katex-html>.newline{display:block}.katex .base{position:relative;white-space:nowrap;width:-webkit-min-content;width:-moz-min-content;width:min-content}.katex .base,.katex .strut{display:inline-block}.katex .textbf{font-weight:700}.katex .textit{font-style:italic}.katex .textrm{font-family:KaTeX_Main}.katex .textsf{font-family:KaTeX_SansSerif}.katex .texttt{font-family:KaTeX_Typewriter}.katex .mathnormal{font-family:KaTeX_Math;font-style:italic}.katex .mathit{font-family:KaTeX_Main;font-style:italic}.katex .mathrm{font-style:normal}.katex .mathbf{font-family:KaTeX_Main;font-weight:700}.katex .boldsymbol{font-family:KaTeX_Math;font-style:italic;font-weight:700}.katex .amsrm,.katex .mathbb,.katex .textbb{font-family:KaTeX_AMS}.katex .mathcal{font-family:KaTeX_Caligraphic}.katex .mathfrak,.katex .textfrak{font-family:KaTeX_Fraktur}.katex .mathboldfrak,.katex .textboldfrak{font-family:KaTeX_Fraktur;font-weight:700}.katex .mathtt{font-family:KaTeX_Typewriter}.katex .mathscr,.katex .textscr{font-family:KaTeX_Script}.katex .mathsf,.katex .textsf{font-family:KaTeX_SansSerif}.katex .mathboldsf,.katex .textboldsf{font-family:KaTeX_SansSerif;font-weight:700}.katex .mathitsf,.katex .mathsfit,.katex .textitsf{font-family:KaTeX_SansSerif;font-style:italic}.katex .mainrm{font-family:KaTeX_Main;font-style:normal}.katex .vlist-t{border-collapse:collapse;display:inline-table;table-layout:fixed}.katex .vlist-r{display:table-row}.katex .vlist{display:table-cell;position:relative;vertical-align:bottom}.katex .vlist>span{display:block;height:0;position:relative}.katex .vlist>span>span{display:inline-block}.katex .vlist>span>.pstrut{overflow:hidden;width:0}.katex .vlist-t2{margin-right:-2px}.katex .vlist-s{display:table-cell;font-size:1px;min-width:2px;vertical-align:bottom;width:2px}.katex .vbox{align-items:baseline;display:inline-flex;flex-direction:column}.katex .hbox{width:100%}.katex .hbox,.katex .thinbox{display:inline-flex;flex-direction:row}.katex .thinbox{max-width:0;width:0}.katex .msupsub{text-align:left}.katex .mfrac>span>span{text-align:center}.katex .mfrac .frac-line{border-bottom-style:solid;display:inline-block;width:100%}.katex .hdashline,.katex .hline,.katex .mfrac .frac-line,.katex .overline .overline-line,.katex .rule,.katex .underline .underline-line{min-height:1px}.katex .mspace{display:inline-block}.katex .clap,.katex .llap,.katex .rlap{position:relative;width:0}.katex .clap>.inner,.katex .llap>.inner,.katex .rlap>.inner{position:absolute}.katex .clap>.fix,.katex .llap>.fix,.katex .rlap>.fix{display:inline-block}.katex .llap>.inner{right:0}.katex .clap>.inner,.katex .rlap>.inner{left:0}.katex .clap>.inner>span{margin-left:-50%;margin-right:50%}.katex .rule{border:0 solid;display:inline-block;position:relative}.katex .hline,.katex .overline .overline-line,.katex .underline .underline-line{border-bottom-style:solid;display:inline-block;width:100%}.katex .hdashline{border-bottom-style:dashed;display:inline-block;width:100%}.katex .sqrt>.root{margin-left:.2777777778em;margin-right:-.5555555556em}.katex .fontsize-ensurer.reset-size1.size1,.katex .sizing.reset-size1.size1{font-size:1em}.katex .fontsize-ensurer.reset-size1.size2,.katex .sizing.reset-size1.size2{font-size:1.2em}.katex .fontsize-ensurer.reset-size1.size3,.katex .sizing.reset-size1.size3{font-size:1.4em}.katex .fontsize-ensurer.reset-size1.size4,.katex .sizing.reset-size1.size4{font-size:1.6em}.katex .fontsize-ensurer.reset-size1.size5,.katex .sizing.reset-size1.size5{font-size:1.8em}.katex .fontsize-ensurer.reset-size1.size6,.katex .sizing.reset-size1.size6{font-size:2em}.katex .fontsize-ensurer.reset-size1.size7,.katex .sizing.reset-size1.size7{font-size:2.4em}.katex .fontsize-ensurer.reset-size1.size8,.katex .sizing.reset-size1.size8{font-size:2.88em}.katex .fontsize-ensurer.reset-size1.size9,.katex .sizing.reset-size1.size9{font-size:3.456em}.katex .fontsize-ensurer.reset-size1.size10,.katex .sizing.reset-size1.size10{font-size:4.148em}.katex .fontsize-ensurer.reset-size1.size11,.katex .sizing.reset-size1.size11{font-size:4.976em}.katex .fontsize-ensurer.reset-size2.size1,.katex .sizing.reset-size2.size1{font-size:.8333333333em}.katex .fontsize-ensurer.reset-size2.size2,.katex .sizing.reset-size2.size2{font-size:1em}.katex .fontsize-ensurer.reset-size2.size3,.katex .sizing.reset-size2.size3{font-size:1.1666666667em}.katex .fontsize-ensurer.reset-size2.size4,.katex .sizing.reset-size2.size4{font-size:1.3333333333em}.katex .fontsize-ensurer.reset-size2.size5,.katex .sizing.reset-size2.size5{font-size:1.5em}.katex .fontsize-ensurer.reset-size2.size6,.katex .sizing.reset-size2.size6{font-size:1.6666666667em}.katex .fontsize-ensurer.reset-size2.size7,.katex .sizing.reset-size2.size7{font-size:2em}.katex .fontsize-ensurer.reset-size2.size8,.katex .sizing.reset-size2.size8{font-size:2.4em}.katex .fontsize-ensurer.reset-size2.size9,.katex .sizing.reset-size2.size9{font-size:2.88em}.katex .fontsize-ensurer.reset-size2.size10,.katex .sizing.reset-size2.size10{font-size:3.4566666667em}.katex .fontsize-ensurer.reset-size2.size11,.katex .sizing.reset-size2.size11{font-size:4.1466666667em}.katex .fontsize-ensurer.reset-size3.size1,.katex .sizing.reset-size3.size1{font-size:.7142857143em}.katex .fontsize-ensurer.reset-size3.size2,.katex .sizing.reset-size3.size2{font-size:.8571428571em}.katex .fontsize-ensurer.reset-size3.size3,.katex .sizing.reset-size3.size3{font-size:1em}.katex .fontsize-ensurer.reset-size3.size4,.katex .sizing.reset-size3.size4{font-size:1.1428571429em}.katex .fontsize-ensurer.reset-size3.size5,.katex .sizing.reset-size3.size5{font-size:1.2857142857em}.katex .fontsize-ensurer.reset-size3.size6,.katex .sizing.reset-size3.size6{font-size:1.4285714286em}.katex .fontsize-ensurer.reset-size3.size7,.katex .sizing.reset-size3.size7{font-size:1.7142857143em}.katex .fontsize-ensurer.reset-size3.size8,.katex .sizing.reset-size3.size8{font-size:2.0571428571em}.katex .fontsize-ensurer.reset-size3.size9,.katex .sizing.reset-size3.size9{font-size:2.4685714286em}.katex .fontsize-ensurer.reset-size3.size10,.katex .sizing.reset-size3.size10{font-size:2.9628571429em}.katex .fontsize-ensurer.reset-size3.size11,.katex .sizing.reset-size3.size11{font-size:3.5542857143em}.katex .fontsize-ensurer.reset-size4.size1,.katex .sizing.reset-size4.size1{font-size:.625em}.katex .fontsize-ensurer.reset-size4.size2,.katex .sizing.reset-size4.size2{font-size:.75em}.katex .fontsize-ensurer.reset-size4.size3,.katex .sizing.reset-size4.size3{font-size:.875em}.katex .fontsize-ensurer.reset-size4.size4,.katex .sizing.reset-size4.size4{font-size:1em}.katex .fontsize-ensurer.reset-size4.size5,.katex .sizing.reset-size4.size5{font-size:1.125em}.katex .fontsize-ensurer.reset-size4.size6,.katex .sizing.reset-size4.size6{font-size:1.25em}.katex .fontsize-ensurer.reset-size4.size7,.katex .sizing.reset-size4.size7{font-size:1.5em}.katex .fontsize-ensurer.reset-size4.size8,.katex .sizing.reset-size4.size8{font-size:1.8em}.katex .fontsize-ensurer.reset-size4.size9,.katex .sizing.reset-size4.size9{font-size:2.16em}.katex .fontsize-ensurer.reset-size4.size10,.katex .sizing.reset-size4.size10{font-size:2.5925em}.katex .fontsize-ensurer.reset-size4.size11,.katex .sizing.reset-size4.size11{font-size:3.11em}.katex .fontsize-ensurer.reset-size5.size1,.katex .sizing.reset-size5.size1{font-size:.5555555556em}.katex .fontsize-ensurer.reset-size5.size2,.katex .sizing.reset-size5.size2{font-size:.6666666667em}.katex .fontsize-ensurer.reset-size5.size3,.katex .sizing.reset-size5.size3{font-size:.7777777778em}.katex .fontsize-ensurer.reset-size5.size4,.katex .sizing.reset-size5.size4{font-size:.8888888889em}.katex .fontsize-ensurer.reset-size5.size5,.katex .sizing.reset-size5.size5{font-size:1em}.katex .fontsize-ensurer.reset-size5.size6,.katex .sizing.reset-size5.size6{font-size:1.1111111111em}.katex .fontsize-ensurer.reset-size5.size7,.katex .sizing.reset-size5.size7{font-size:1.3333333333em}.katex .fontsize-ensurer.reset-size5.size8,.katex .sizing.reset-size5.size8{font-size:1.6em}.katex .fontsize-ensurer.reset-size5.size9,.katex .sizing.reset-size5.size9{font-size:1.92em}.katex .fontsize-ensurer.reset-size5.size10,.katex .sizing.reset-size5.size10{font-size:2.3044444444em}.katex .fontsize-ensurer.reset-size5.size11,.katex .sizing.reset-size5.size11{font-size:2.7644444444em}.katex .fontsize-ensurer.reset-size6.size1,.katex .sizing.reset-size6.size1{font-size:.5em}.katex .fontsize-ensurer.reset-size6.size2,.katex .sizing.reset-size6.size2{font-size:.6em}.katex .fontsize-ensurer.reset-size6.size3,.katex .sizing.reset-size6.size3{font-size:.7em}.katex .fontsize-ensurer.reset-size6.size4,.katex .sizing.reset-size6.size4{font-size:.8em}.katex .fontsize-ensurer.reset-size6.size5,.katex .sizing.reset-size6.size5{font-size:.9em}.katex .fontsize-ensurer.reset-size6.size6,.katex .sizing.reset-size6.size6{font-size:1em}.katex .fontsize-ensurer.reset-size6.size7,.katex .sizing.reset-size6.size7{font-size:1.2em}.katex .fontsize-ensurer.reset-size6.size8,.katex .sizing.reset-size6.size8{font-size:1.44em}.katex .fontsize-ensurer.reset-size6.size9,.katex .sizing.reset-size6.size9{font-size:1.728em}.katex .fontsize-ensurer.reset-size6.size10,.katex .sizing.reset-size6.size10{font-size:2.074em}.katex .fontsize-ensurer.reset-size6.size11,.katex .sizing.reset-size6.size11{font-size:2.488em}.katex .fontsize-ensurer.reset-size7.size1,.katex .sizing.reset-size7.size1{font-size:.4166666667em}.katex .fontsize-ensurer.reset-size7.size2,.katex .sizing.reset-size7.size2{font-size:.5em}.katex .fontsize-ensurer.reset-size7.size3,.katex .sizing.reset-size7.size3{font-size:.5833333333em}.katex .fontsize-ensurer.reset-size7.size4,.katex .sizing.reset-size7.size4{font-size:.6666666667em}.katex .fontsize-ensurer.reset-size7.size5,.katex .sizing.reset-size7.size5{font-size:.75em}.katex .fontsize-ensurer.reset-size7.size6,.katex .sizing.reset-size7.size6{font-size:.8333333333em}.katex .fontsize-ensurer.reset-size7.size7,.katex .sizing.reset-size7.size7{font-size:1em}.katex .fontsize-ensurer.reset-size7.size8,.katex .sizing.reset-size7.size8{font-size:1.2em}.katex .fontsize-ensurer.reset-size7.size9,.katex .sizing.reset-size7.size9{font-size:1.44em}.katex .fontsize-ensurer.reset-size7.size10,.katex .sizing.reset-size7.size10{font-size:1.7283333333em}.katex .fontsize-ensurer.reset-size7.size11,.katex .sizing.reset-size7.size11{font-size:2.0733333333em}.katex .fontsize-ensurer.reset-size8.size1,.katex .sizing.reset-size8.size1{font-size:.3472222222em}.katex .fontsize-ensurer.reset-size8.size2,.katex .sizing.reset-size8.size2{font-size:.4166666667em}.katex .fontsize-ensurer.reset-size8.size3,.katex .sizing.reset-size8.size3{font-size:.4861111111em}.katex .fontsize-ensurer.reset-size8.size4,.katex .sizing.reset-size8.size4{font-size:.5555555556em}.katex .fontsize-ensurer.reset-size8.size5,.katex .sizing.reset-size8.size5{font-size:.625em}.katex .fontsize-ensurer.reset-size8.size6,.katex .sizing.reset-size8.size6{font-size:.6944444444em}.katex .fontsize-ensurer.reset-size8.size7,.katex .sizing.reset-size8.size7{font-size:.8333333333em}.katex .fontsize-ensurer.reset-size8.size8,.katex .sizing.reset-size8.size8{font-size:1em}.katex .fontsize-ensurer.reset-size8.size9,.katex .sizing.reset-size8.size9{font-size:1.2em}.katex .fontsize-ensurer.reset-size8.size10,.katex .sizing.reset-size8.size10{font-size:1.4402777778em}.katex .fontsize-ensurer.reset-size8.size11,.katex .sizing.reset-size8.size11{font-size:1.7277777778em}.katex .fontsize-ensurer.reset-size9.size1,.katex .sizing.reset-size9.size1{font-size:.2893518519em}.katex .fontsize-ensurer.reset-size9.size2,.katex .sizing.reset-size9.size2{font-size:.3472222222em}.katex .fontsize-ensurer.reset-size9.size3,.katex .sizing.reset-size9.size3{font-size:.4050925926em}.katex .fontsize-ensurer.reset-size9.size4,.katex .sizing.reset-size9.size4{font-size:.462962963em}.katex .fontsize-ensurer.reset-size9.size5,.katex .sizing.reset-size9.size5{font-size:.5208333333em}.katex .fontsize-ensurer.reset-size9.size6,.katex .sizing.reset-size9.size6{font-size:.5787037037em}.katex .fontsize-ensurer.reset-size9.size7,.katex .sizing.reset-size9.size7{font-size:.6944444444em}.katex .fontsize-ensurer.reset-size9.size8,.katex .sizing.reset-size9.size8{font-size:.8333333333em}.katex .fontsize-ensurer.reset-size9.size9,.katex .sizing.reset-size9.size9{font-size:1em}.katex .fontsize-ensurer.reset-size9.size10,.katex .sizing.reset-size9.size10{font-size:1.2002314815em}.katex .fontsize-ensurer.reset-size9.size11,.katex .sizing.reset-size9.size11{font-size:1.4398148148em}.katex .fontsize-ensurer.reset-size10.size1,.katex .sizing.reset-size10.size1{font-size:.2410800386em}.katex .fontsize-ensurer.reset-size10.size2,.katex .sizing.reset-size10.size2{font-size:.2892960463em}.katex .fontsize-ensurer.reset-size10.size3,.katex .sizing.reset-size10.size3{font-size:.337512054em}.katex .fontsize-ensurer.reset-size10.size4,.katex .sizing.reset-size10.size4{font-size:.3857280617em}.katex .fontsize-ensurer.reset-size10.size5,.katex .sizing.reset-size10.size5{font-size:.4339440694em}.katex .fontsize-ensurer.reset-size10.size6,.katex .sizing.reset-size10.size6{font-size:.4821600771em}.katex .fontsize-ensurer.reset-size10.size7,.katex .sizing.reset-size10.size7{font-size:.5785920926em}.katex .fontsize-ensurer.reset-size10.size8,.katex .sizing.reset-size10.size8{font-size:.6943105111em}.katex .fontsize-ensurer.reset-size10.size9,.katex .sizing.reset-size10.size9{font-size:.8331726133em}.katex .fontsize-ensurer.reset-size10.size10,.katex .sizing.reset-size10.size10{font-size:1em}.katex .fontsize-ensurer.reset-size10.size11,.katex .sizing.reset-size10.size11{font-size:1.1996142719em}.katex .fontsize-ensurer.reset-size11.size1,.katex .sizing.reset-size11.size1{font-size:.2009646302em}.katex .fontsize-ensurer.reset-size11.size2,.katex .sizing.reset-size11.size2{font-size:.2411575563em}.katex .fontsize-ensurer.reset-size11.size3,.katex .sizing.reset-size11.size3{font-size:.2813504823em}.katex .fontsize-ensurer.reset-size11.size4,.katex .sizing.reset-size11.size4{font-size:.3215434084em}.katex .fontsize-ensurer.reset-size11.size5,.katex .sizing.reset-size11.size5{font-size:.3617363344em}.katex .fontsize-ensurer.reset-size11.size6,.katex .sizing.reset-size11.size6{font-size:.4019292605em}.katex .fontsize-ensurer.reset-size11.size7,.katex .sizing.reset-size11.size7{font-size:.4823151125em}.katex .fontsize-ensurer.reset-size11.size8,.katex .sizing.reset-size11.size8{font-size:.578778135em}.katex .fontsize-ensurer.reset-size11.size9,.katex .sizing.reset-size11.size9{font-size:.6945337621em}.katex .fontsize-ensurer.reset-size11.size10,.katex .sizing.reset-size11.size10{font-size:.8336012862em}.katex .fontsize-ensurer.reset-size11.size11,.katex .sizing.reset-size11.size11{font-size:1em}.katex .delimsizing.size1{font-family:KaTeX_Size1}.katex .delimsizing.size2{font-family:KaTeX_Size2}.katex .delimsizing.size3{font-family:KaTeX_Size3}.katex .delimsizing.size4{font-family:KaTeX_Size4}.katex .delimsizing.mult .delim-size1>span{font-family:KaTeX_Size1}.katex .delimsizing.mult .delim-size4>span{font-family:KaTeX_Size4}.katex .nulldelimiter{display:inline-block;width:.12em}.katex .delimcenter,.katex .op-symbol{position:relative}.katex .op-symbol.small-op{font-family:KaTeX_Size1}.katex .op-symbol.large-op{font-family:KaTeX_Size2}.katex .accent>.vlist-t,.katex .op-limits>.vlist-t{text-align:center}.katex .accent .accent-body{position:relative}.katex .accent .accent-body:not(.accent-full){width:0}.katex .overlay{display:block}.katex .mtable .vertical-separator{display:inline-block;min-width:1px}.katex .mtable .arraycolsep{display:inline-block}.katex .mtable .col-align-c>.vlist-t{text-align:center}.katex .mtable .col-align-l>.vlist-t{text-align:left}.katex .mtable .col-align-r>.vlist-t{text-align:right}.katex .svg-align{text-align:left}.katex svg{fill:currentColor;stroke:currentColor;fill-rule:nonzero;fill-opacity:1;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;display:block;height:inherit;position:absolute;width:100%}.katex svg path{stroke:none}.katex img{border-style:none;max-height:none;max-width:none;min-height:0;min-width:0}.katex .stretchy{display:block;overflow:hidden;position:relative;width:100%}.katex .stretchy:after,.katex .stretchy:before{content:""}.katex .hide-tail{overflow:hidden;position:relative;width:100%}.katex .halfarrow-left{left:0;overflow:hidden;position:absolute;width:50.2%}.katex .halfarrow-right{overflow:hidden;position:absolute;right:0;width:50.2%}.katex .brace-left{left:0;overflow:hidden;position:absolute;width:25.1%}.katex .brace-center{left:25%;overflow:hidden;position:absolute;width:50%}.katex .brace-right{overflow:hidden;position:absolute;right:0;width:25.1%}.katex .x-arrow-pad{padding:0 .5em}.katex .cd-arrow-pad{padding:0 .55556em 0 .27778em}.katex .mover,.katex .munder,.katex .x-arrow{text-align:center}.katex .boxpad{padding:0 .3em}.katex .fbox,.katex .fcolorbox{border:.04em solid;box-sizing:border-box}.katex .cancel-pad{padding:0 .2em}.katex .cancel-lap{margin-left:-.2em;margin-right:-.2em}.katex .sout{border-bottom-style:solid;border-bottom-width:.08em}.katex .angl{border-right:.049em solid;border-top:.049em solid;box-sizing:border-box;margin-right:.03889em}.katex .anglpad{padding:0 .03889em}.katex .eqn-num:before{content:"(" counter(katexEqnNo) ")";counter-increment:katexEqnNo}.katex .mml-eqn-num:before{content:"(" counter(mmlEqnNo) ")";counter-increment:mmlEqnNo}.katex .mtr-glue{width:50%}.katex .cd-vert-arrow{display:inline-block;position:relative}.katex .cd-label-left{display:inline-block;position:absolute;right:calc(50% + .3em);text-align:left}.katex .cd-label-right{display:inline-block;left:calc(50% + .3em);position:absolute;text-align:right}.katex-display{display:block;margin:1em 0;text-align:center}.katex-display>.katex{display:block;text-align:center;white-space:nowrap}.katex-display>.katex>.katex-html{display:block;position:relative}.katex-display>.katex>.katex-html>.tag{position:absolute;right:0}.katex-display.leqno>.katex>.katex-html>.tag{left:0;right:auto}.katex-display.fleqn>.katex{padding-left:2em;text-align:left}body{counter-reset:katexEqnNo mmlEqnNo} diff --git a/static/social_icons/calckey.svg b/static/social_icons/calckey.svg new file mode 100755 index 0000000..70c9ef1 --- /dev/null +++ b/static/social_icons/calckey.svg @@ -0,0 +1,5 @@ +<!-- CC-BY - https://github.com/reiver/fediverse-icons --> +<svg width="512" height="512" viewBox="0 0 512 512" fill="none" xmlns="http://www.w3.org/2000/svg"> +<path d="M253.327 231.222C273.138 225.034 283.687 203.21 272.188 185.932C260.55 168.444 245.621 152.451 229.602 143.462C203.361 128.737 172.782 123.673 143.189 129.15C113.596 134.628 86.862 150.3 67.642 173.439C48.422 196.579 37.9328 225.719 38.0003 255.788C38.0679 285.858 48.6879 314.951 68.0117 338.004C87.3355 361.057 114.139 376.609 143.757 381.954C173.374 387.298 203.93 382.097 230.105 367.254C247.097 357.619 260.996 342.705 271.555 325.726C281.231 310.169 273.378 290.598 257.062 282.264L246.267 276.749C230.326 268.607 210.566 276.498 198.502 289.722C195.653 292.846 192.785 295.394 190.135 296.897C180.439 302.395 169.121 304.321 158.15 302.342C147.179 300.362 137.25 294.601 130.092 286.061C122.934 277.522 119 266.745 118.975 255.607C118.95 244.469 122.835 233.674 129.955 225.103C137.075 216.531 146.977 210.726 157.939 208.697C168.901 206.668 180.229 208.544 189.949 213.998C192.537 215.451 194.968 217.547 197.216 220.038C207.837 231.804 222.93 240.717 238.06 235.991L253.327 231.222Z" fill="black"/> +<path d="M421.573 367.463C403.986 378.276 394 384 363.125 384C318.094 380.224 285.22 359.611 281.006 332.093C278.04 312.732 293.883 296.726 308.315 283.484L338.429 255.854C344.434 250.344 351.456 245.328 359.605 245.252C374.389 245.114 387 254.944 387 273.5C387 297 347.525 303.39 356.532 314.5C360.484 319.376 367.351 318.507 372.544 314.982C378.422 310.992 384.145 306.646 389.128 302.248C394.303 297.682 398.329 291.945 400.802 285.502C403.018 279.727 404.777 273.376 404.399 268.651C403.789 261.014 401.082 253.697 396.577 247.508C392.073 241.319 385.948 236.5 378.88 233.585C371.812 230.67 364.077 229.773 356.532 230.993C348.986 232.212 341.925 235.502 336.129 240.496C327.139 248.243 314.042 248.66 305.606 240.312L290.129 224.995C279.549 214.525 279.604 197.416 290.251 187.014C305.896 173.531 324.958 164.652 345.327 161.36C365.696 158.067 386.577 160.489 405.657 168.358C424.737 176.227 441.272 189.235 453.431 205.942C465.589 222.649 472.897 242.404 474.545 263.017C476.193 283.631 472.116 304.299 462.767 322.734C453.417 341.168 439.16 356.65 421.573 367.463Z" fill="black"/> +</svg> diff --git a/static/social_icons/castopod.svg b/static/social_icons/castopod.svg new file mode 100755 index 0000000..709288a --- /dev/null +++ b/static/social_icons/castopod.svg @@ -0,0 +1,5 @@ +<!-- CC-BY - https://github.com/reiver/fediverse-icons --> +<svg width="512" height="512" viewBox="0 0 512 512" fill="none" xmlns="http://www.w3.org/2000/svg"> +<rect x="86" y="86" width="340" height="341" rx="95" stroke="black" stroke-width="18"/> +<path fill-rule="evenodd" clip-rule="evenodd" d="M179.5 154C122.891 154 77 199.891 77 256.5C77 313.109 122.891 359 179.5 359H332.5C389.109 359 435 313.109 435 256.5C435 199.891 389.109 154 332.5 154H179.5ZM174.669 230.184C179.504 231.338 184.359 228.355 185.513 223.52C186.668 218.686 183.684 213.831 178.85 212.676C178.199 212.521 177.553 212.395 176.913 212.3C170.739 211.376 164.977 213.68 160.921 216.999C156.866 220.319 153.468 225.511 153.153 231.746C153.12 232.392 153.115 233.05 153.139 233.719C153.315 238.687 157.484 242.571 162.452 242.395C167.419 242.219 171.304 238.05 171.128 233.082C171.122 232.917 171.124 232.775 171.13 232.654C171.136 232.534 171.312 231.756 172.322 230.929C173.332 230.102 174.13 230.084 174.249 230.101C174.368 230.119 174.508 230.146 174.669 230.184ZM326.323 223.52C327.477 228.355 332.332 231.338 337.167 230.184C337.328 230.146 337.468 230.119 337.587 230.101C337.706 230.084 338.503 230.102 339.514 230.929C340.524 231.756 340.7 232.534 340.706 232.654C340.712 232.775 340.714 232.917 340.708 233.082C340.532 238.05 344.417 242.219 349.384 242.395C354.352 242.571 358.521 238.687 358.697 233.719C358.72 233.05 358.716 232.392 358.683 231.746C358.368 225.511 354.97 220.319 350.914 216.999C346.859 213.68 341.097 211.376 334.923 212.3C334.283 212.395 333.637 212.521 332.986 212.676C328.152 213.831 325.168 218.686 326.323 223.52ZM339 285C334.029 285 330 280.971 330 276C330 272.059 326.462 268 321 268C315.538 268 312 272.059 312 276C312 280.971 307.971 285 303 285C298.029 285 294 280.971 294 276C294 261.163 306.58 250 321 250C335.42 250 348 261.163 348 276C348 280.971 343.971 285 339 285ZM237 267C241.971 267 246 271.029 246 276C246 278.899 249.004 283 255 283C260.996 283 264 278.899 264 276C264 271.029 268.029 267 273 267C277.971 267 282 271.029 282 276C282 290.774 268.886 301 255 301C241.114 301 228 290.774 228 276C228 271.029 232.029 267 237 267ZM199 276C199 280.971 203.029 285 208 285C212.971 285 217 280.971 217 276C217 260.939 203.956 250 189.5 250C175.044 250 162 260.939 162 276C162 280.971 166.029 285 171 285C175.971 285 180 280.971 180 276C180 272.283 183.522 268 189.5 268C195.478 268 199 272.283 199 276Z" fill="black"/> +</svg> diff --git a/static/social_icons/codeberg.svg b/static/social_icons/codeberg.svg new file mode 100644 index 0000000..d5fdd1a --- /dev/null +++ b/static/social_icons/codeberg.svg @@ -0,0 +1,3 @@ +<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 4.233 4.233"> + <path d="M0 2.265c0 .398.112.788.323 1.125l1.765-2.281c.013-.016.044-.016.057 0l.737.953h-.528l.011.042h.549l.156.201h-.648l.018.066h.681l.137.177H2.49l.024.085h.81l.122.158h-.888l.029.104h.939l.107.139H2.625l.032.115h1.065l.099.128H2.693l.032.115H3.91c.211-.337.323-.727.323-1.125 0-1.169-.947-2.116-2.117-2.116S0 1.096 0 2.265zm2.761 1.253l.032.115h.939l.091-.115zm.068.243l.032.115h.628l.126-.115zm.067.243l.032.114h.212l.184-.114z" paint-order="markers fill stroke"/> +</svg> diff --git a/static/social_icons/debian.svg b/static/social_icons/debian.svg new file mode 100644 index 0000000..cf9d229 --- /dev/null +++ b/static/social_icons/debian.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--!Font Awesome Free 6.5.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2024 Fonticons, Inc.--><path d="M380.2 245.6c3-7.6 5.5-14 5.2-24.4l-4.3 9c4.4-13.2 4-27.1 3.6-40.4c-.2-6-.3-11.8 0-17.4l-1.8-.5c-1.5-45.2-40.6-93.1-75.3-109.4c-30-13.8-76.1-16.2-97.3-5.8c1.3-1.1 4.2-2 6.8-2.7l.3-.1c3.3-1 6-1.7 4-2.9c-19.2 1.9-24.9 5.5-31.1 9.4l-.1 0c-4.6 2.9-9.5 6-20.3 8.7c-3.5 3.4 1.7 2 5.8 .9l0 0c4.1-1.1 7.2-1.9-.1 2.4c-3.5 1-6.6 1.3-9.6 1.6l-.1 0c-8.3 .8-15.8 1.6-30.7 17c.8 1.3 3.4-.2 5.3-1.3l.1-.1c2.3-1.4 3.4-2-1.7 4.4c-19.1-2.4-60.3 43.7-69.1 59l4.6 .8c-3.2 8-6.8 14.8-10 20.8c-4.3 8.1-7.9 14.9-8.7 21.3c-.3 5.1-1 11-1.7 17.3l0 0c-.1 1-.2 2-.3 3l-.1 .6c-3 27.3-6.7 60.8 3.9 73l-1.3 13c.6 1.2 1.1 2.3 1.6 3.5c.2 .4 .4 .8 .5 1.1l0 0 0 0 0 0 0 0 0 0 0 0 0 0c1 2.1 2 4.2 3.3 6.2l-3 .2c7 22.1 10.8 22.5 15.1 22.9l0 0c4.4 .4 9.3 .9 18.7 24.2c-2.7-.9-5.5-1.9-9.4-7.2c-.5 4.1 5.8 16.3 13.1 25.8l-3.1 3.6c2.1 3.7 4.8 6.2 7.6 8.8l0 0 0 0c1 .9 2.1 1.9 3.1 2.9c-11.9-6.5 3.2 13.7 11.9 25.2c.8 1.1 1.5 2 2.2 2.9l0 0 0 0 0 0 0 0 0 0c1.4 1.9 2.5 3.4 2.9 4.1l2.4-4.2c-.3 6.1 4.3 13.9 13.1 24.7l7.3-.3c3 6 14 16.7 20.7 17.2l-4.4 5.8c8.1 2.6 10.3 4.3 12.7 6.2c2.6 2.1 5.4 4.3 16.1 8.1l-4.2-7.4c3.5 3 6.2 5.9 8.8 8.7l.1 .1c5.2 5.6 9.9 10.6 19.7 15.3c10.7 3.7 16.6 4.7 22.7 5.8c.3 0 .6 .1 .9 .1c5.4 .8 11.2 1.8 20.8 4.5c-1.1-.1-2.2-.1-3.3-.1h0c-2.3-.1-4.7-.1-7-.1l0 0 0 0 0 0 0 0 0 0 0 0 0 0c-14.4-.2-29.2-.4-42.7-5.2C107.8 480.5 19.5 367.2 26 250.6c-.6-9.9-.3-20.9 0-30.7c.4-13.5 .7-24.8-1.6-28.3l1-3.1c5.3-17.4 11.7-38.2 23.8-62.8l-.1-.2v-.1c.4 .4 3.4 3.4 8.8-5.8c.8-1.8 1.6-3.7 2.4-5.6c.5-1.1 .9-2.2 1.4-3.2c2.5-6.1 5.1-12.3 8.4-17.9l2.6-.6c1.7-10.1 17-23.8 29.8-35.2l1.1-1c5.7-5.1 10.7-9.7 13.6-13.1l.7 4.4c17-15.9 44.6-27.5 65.6-36.4l.5-.2c4.8-2 9.3-3.9 13.3-5.7c-3.4 3.8 2.2 2.7 10 1c4.8-1 10.4-2.1 15.3-2.4l-3.9 2.1c-2.7 1.4-5.4 2.8-8 4.6c8.1-2 11.7-1.4 15.7-.8l.3 0c3.5 .6 7.3 1.2 14.6 .2c-5.6 .8-12.3 3-11.2 3.8c7.9 .9 12.8-.1 17.2-1l.2 0c5.5-1.1 10.3-2 19.3 .9l-1-4.8c7.3 2.6 12.7 4.3 17.5 5.8l.5 .1c10 3 17.6 5.3 34.2 14.1c3.2 .2 5.3-.5 7.4-1.2l.1 0c3.6-1.1 7-2.1 15.2 1.2c.3 .5 .5 1 .7 1.4c.1 .2 .2 .5 .3 .7l0 .1c1 2.6 1.8 4.6 14.6 12.1c1.7-.7-2.7-4.7-6.4-8.2c0 0 0 0-.1-.1c-.2-.1-.3-.3-.5-.4c32.2 17.3 67.3 54.1 78 93.5c-6-11.1-5.2-5.5-4.3 .5c.6 4 1.2 8.1-.2 7.5c4.5 12.1 8.1 24.5 10.4 37.4l-.8-2.9-.1-.3c-3.3-11.9-9.6-34.3-19.9-49.3c-.4 4.3-2.8 3.9-5.2 3.5l-.1 0 0 0c-3.3-.6-6.2-1.1-1.9 12.6c2.6 3.8 3.1 2.4 3.5 1.1l0 0c.5-1.5 .9-2.7 4.7 5.2c.1 4.1 1 8.2 2.1 12.7l0 0 0 0 .1 .6c.1 .3 .1 .5 .2 .8l.1 .6c.6 2.6 1.3 5.4 1.8 8.4c-1.1-.2-2.3-2.2-3.4-4.2c-1.4-2.4-2.8-4.7-3.7-3.2c2.4 11.5 6.5 17.4 8 18.3c-.3 .6-.6 .7-1.1 .7c-.8 0-1.8 .1-1.9 5.3c.7 13.7 3.3 12.5 5.3 11.6l0 0c.6-.3 1.2-.6 1.7-.4c-.6 2.5-1.6 5.1-2.7 7.9c-2.8 7.1-6 15.4-3.4 26.1c-.8-3-2-6-3.1-8.9l-.1-.4c-.2-.5-.4-1-.6-1.5l0 0c-.3-.8-.6-1.6-.9-2.3c-.6 4.4-.3 7.7-.1 10.6c0 .2 0 .5 0 .7c.4 5.3 .7 10-3 19.9c4.3-14.2 3.8-26.9-.2-20.8c1 10.9-3.7 20.4-8 28.9l-.1 .2c-3.6 7.1-6.8 13.5-5.9 19.3l-5.2-7.1c-7.5 10.9-7 13.3-6.5 15.5l0 .1c.5 1.9 1 3.8-3.4 10.8c1.7-2.9 1.3-3.6 1-4.2l0 0c-.4-.8-.7-1.5 1.7-5.1c-1.6 .1-5.5 3.9-10.1 8.5c-3.9 3.9-8.5 8.4-12.8 11.8c-37.5 30.1-82.3 34-125.6 17.8c.2-1-.2-2.1-3.1-4.1c-36.8-28.2-58.5-52.1-50.9-107.5c2.1-1.6 3.6-5.8 5.3-10.8l0 0 0 0 .2-.4 .1-.3 0-.1c2.9-8.4 6.5-18.8 14.3-23.8c7.8-17.3 31.3-33.3 56.4-33.7c25.6-1.4 47.2 13.7 58.1 27.9c-19.8-18.4-52.1-24-79.7-10.4c-28.2 12.7-45 43.8-42.5 74.7c.3-.4 .6-.6 .9-.8l0 0s0 0 0 0c0 0 .1-.1 .1-.1l.1-.1c.6-.5 1.1-.9 1.4-3.3c-.9 60.2 64.8 104.3 112.1 82l.6 1.3c12.7-3.5 15.9-6.5 20.3-10.7l.1-.1 0 0c2.2-2.1 4.7-4.5 8.9-7.3c-.3 .7-1.3 1.7-2.4 2.7c-2.2 2.1-4.6 4.5-1.6 4.6c5-1.3 18.5-13.4 28.5-22.3l0 0 0 0c.6-.5 1.2-1 1.7-1.5c1.5-1.3 2.8-2.5 4-3.6l0 0 .3-.3c1.9-4.2 1.6-5.6 1.3-7l0-.1c-.4-1.6-.8-3.3 2.4-9.6l7.3-3.7c.8-2.1 1.5-4.1 2.2-6c.2-.6 .5-1.2 .7-1.8l-.4-.2zM349.3 34.3l-.2-.1 .2 .1 0 0zM247.8 334.1c-6-3-13.7-8.9-14.8-11.4l-.4 .3c-.3 .6-.5 1.3-.2 2.2c-12.2-5.7-23.4-14.3-32.6-24.9c4.9 7.1 10.1 14.1 17 19.5c-6.9-2.3-15.1-11.8-21.6-19.3l-.1-.1c-4.3-5-7.9-9.1-9.7-9.5c19.8 35.5 80.5 62.3 112.3 49c-14.7 .5-33.4 .3-49.9-5.8zm79.3-119.7l-.1-.2c-.5-1.5-1.1-3.1-1.7-3.4c1.4-5.8 5.4-10.7 4.4 4.6c-1 3.8-1.8 1.5-2.6-1zm-4.2 22.2c-1.3 7.9-5 15.5-10.1 22.5c.2-2-1.2-2.4-2.6-2.8l0 0c-2.9-.8-5.9-1.6 5.6-16.1c-.5 1.9-2.1 4.6-3.7 7.3l0 0 0 0-.3 .4c-3.6 5.9-6.7 11 4 4.3l1-1.8c2.6-4.5 5-8.8 6-13.8h.1zm-55.6 33.9c7.1 .6 14.1 .6 21-1.1c-2.5 2.4-5.2 4.8-8.3 7.2c-11.1-1.7-21.2-6-12.7-6.1zm-92.6 11.6c3.6 7.1 6.4 11.5 9 15.7l.1 .2c2.3 3.7 4.4 7.1 6.8 11.7c-5.1-4.2-8.7-9.5-12.5-15l-.3-.5c-1.4-2.1-2.8-4.2-4.4-6.2l1.2-5.9h.1zm7.5-9.6c1.6 3.3 3.2 6.4 5.7 9.1l2.6 7.7-1.3-2.1c-3.2-5.3-6.3-10.6-8-16.7l.8 1.6 .2 .4zm238.9-41.6c-2.3 17.4-7.7 34.6-16 50.3c7.6-14.9 12.5-30.9 14.8-47.2l1.2-3.1zM35.6 110.6c.4 .8 1.4 .5 2.3 .3c1.9-.5 3.6-.9-.1 7.6c-.5 .3-1 .7-1.5 1l0 0 0 0c-1.4 .9-2.8 1.9-3.9 3c1.9-3.8 3.5-7.4 3.2-11.9zM25.3 152.3c-.7 3.7-1.5 7.9-3.4 13.9c.2-1.9 0-3.5-.2-4.9l0-.1c-.4-3.4-.7-6.3 4.3-12.8c-.3 1.2-.5 2.5-.7 3.8v.1z"/></svg> \ No newline at end of file diff --git a/static/social_icons/forgejo.svg b/static/social_icons/forgejo.svg new file mode 100755 index 0000000..64769ca --- /dev/null +++ b/static/social_icons/forgejo.svg @@ -0,0 +1,4 @@ +<!-- CC-BY - https://github.com/reiver/fediverse-icons --> +<svg width="512" height="512" viewBox="0 0 512 512" fill="none" xmlns="http://www.w3.org/2000/svg"> +<path fill-rule="evenodd" clip-rule="evenodd" d="M181 77C123.562 77 77 123.562 77 181V332C77 389.438 123.562 436 181 436H332C389.438 436 436 389.438 436 332V181C436 123.562 389.438 77 332 77H181ZM303.03 151.269C294.762 151.269 288.06 157.971 288.06 166.239C288.06 174.506 294.762 181.209 303.03 181.209C311.297 181.209 318 174.506 318 166.239C318 157.971 311.297 151.269 303.03 151.269ZM271.173 157.714C274.93 143.638 287.769 133.269 303.03 133.269C321.239 133.269 336 148.03 336 166.239C336 184.448 321.239 199.209 303.03 199.209C288.153 199.209 275.577 189.355 271.473 175.818C242.538 179.872 220.271 204.724 220.271 234.777V275.467C232.746 260.426 250.741 250.13 271.15 247.686C274.879 233.566 287.739 223.156 303.03 223.156C321.239 223.156 336 237.917 336 256.126C336 274.335 321.239 289.096 303.03 289.096C288.188 289.096 275.637 279.289 271.503 265.802C245.851 269.666 225.495 289.692 221.136 315.179C234.719 319.254 244.615 331.852 244.615 346.762C244.615 364.971 229.854 379.732 211.645 379.732C193.436 379.732 178.675 364.971 178.675 346.762C178.675 331.81 188.629 319.182 202.271 315.144V234.777C202.271 194.874 232.414 162.01 271.173 157.714ZM288.06 256.126C288.06 247.858 294.762 241.156 303.03 241.156C311.297 241.156 318 247.858 318 256.126C318 264.394 311.297 271.096 303.03 271.096C294.762 271.096 288.06 264.394 288.06 256.126ZM196.675 346.762C196.675 338.494 203.378 331.792 211.645 331.792C219.913 331.792 226.615 338.494 226.615 346.762C226.615 355.029 219.913 361.732 211.645 361.732C203.378 361.732 196.675 355.029 196.675 346.762Z" fill="black"/> +</svg> diff --git a/static/social_icons/friendica.svg b/static/social_icons/friendica.svg new file mode 100755 index 0000000..200aa8b --- /dev/null +++ b/static/social_icons/friendica.svg @@ -0,0 +1,5 @@ +<!-- CC-BY - https://github.com/reiver/fediverse-icons --> +<svg width="512" height="512" viewBox="0 0 512 512" fill="none" xmlns="http://www.w3.org/2000/svg"> +<path d="M86 181C86 128.533 128.533 86 181 86H332C384.467 86 427 128.533 427 181V332C427 384.467 384.467 427 332 427H181C128.533 427 86 384.467 86 332V181Z" stroke="black" stroke-width="18"/> +<path fill-rule="evenodd" clip-rule="evenodd" d="M330 77H181C176.726 77 172.513 77.2578 168.374 77.7586C151.65 81.1648 128.281 89.788 109.43 105.543C91.8071 122.264 80.0368 145.092 77.5098 170.637C77.5033 171.09 77.5001 171.544 77.5001 172V341.854C80.5 372.569 105.6 434 182 434V381.854C182 359.763 199.909 341.854 222 341.854H291.299C312.673 341.854 330 324.527 330 303.153C330 281.779 312.673 264.451 291.299 264.451H222C199.909 264.451 182 246.543 182 224.451V206.513C182 184.422 199.909 166.513 222 166.513H290C312.091 166.513 330 148.605 330 126.513V77Z" fill="black"/> +</svg> diff --git a/static/social_icons/funkwhale.svg b/static/social_icons/funkwhale.svg new file mode 100755 index 0000000..a320e0a --- /dev/null +++ b/static/social_icons/funkwhale.svg @@ -0,0 +1,9 @@ +<!-- CC-BY - https://github.com/reiver/fediverse-icons --> +<svg width="512" height="512" viewBox="0 0 512 512" fill="none" xmlns="http://www.w3.org/2000/svg"> +<rect x="86" y="86" width="341" height="341" rx="95" stroke="black" stroke-width="18"/> +<path d="M353.955 202.068C364.17 217.924 369.701 236.006 369.988 254.485C370.275 272.964 365.308 291.186 355.589 307.31C345.87 323.434 331.743 336.889 314.635 346.315C297.528 355.742 278.046 360.805 258.158 360.994C238.27 361.184 218.68 356.492 201.368 347.394C184.057 338.295 169.636 325.112 159.563 309.177C149.49 293.241 144.123 275.117 144.002 256.636C143.882 238.156 149.012 219.973 158.877 203.925" stroke="black" stroke-width="18" stroke-linecap="round" stroke-linejoin="round"/> +<path d="M324.266 232.106C328.403 242.193 329.86 253.06 328.513 263.783C327.165 274.506 323.052 284.767 316.525 293.693C309.998 302.619 301.25 309.944 291.025 315.046C280.801 320.148 269.403 322.876 257.801 322.996C246.2 323.116 234.74 320.626 224.396 315.737C214.051 310.848 205.13 303.705 198.391 294.917C191.652 286.129 187.295 275.955 185.691 265.263C184.087 254.57 185.284 243.675 189.179 233.506" stroke="black" stroke-width="18" stroke-linecap="round" stroke-linejoin="round"/> +<path d="M289 256C289 259.808 288.172 263.579 286.564 267.098C284.956 270.616 282.599 273.813 279.627 276.506C276.656 279.199 273.128 281.335 269.246 282.793C265.363 284.25 261.202 285 257 285C252.798 285 248.637 284.25 244.754 282.793C240.872 281.335 237.344 279.199 234.373 276.506C231.401 273.813 229.044 270.616 227.436 267.098C225.828 263.579 225 259.808 225 256" stroke="black" stroke-width="18" stroke-linecap="round" stroke-linejoin="round"/> +<path d="M245.708 245.863C245.708 251.269 251.101 254.648 254.809 255.662L255.513 255.78C256.386 255.926 257.277 255.926 258.15 255.78L258.854 255.662C262.562 254.648 268.292 251.269 268.292 245.863C268.292 239.105 268.629 213.086 296.606 207.342C324.584 201.598 331.325 171.524 330.988 164.766C330.651 158.008 301.191 164.766 284.472 172.876C274.022 177.945 257.169 184.703 257.169 197.881H256.831C256.831 184.703 239.978 177.945 229.528 172.876C212.809 164.766 183.349 158.008 183.012 164.766C182.675 171.524 189.416 201.598 217.394 207.342C245.371 213.086 245.708 239.105 245.708 245.863Z" fill="black"/> +<path d="M254.809 255.662L252.436 264.344C252.729 264.424 253.026 264.489 253.326 264.539L254.809 255.662ZM217.394 207.342L215.583 216.158L217.394 207.342ZM183.012 164.766L192.001 165.215L183.012 164.766ZM229.528 172.876L233.456 164.778V164.778L229.528 172.876ZM256.831 197.881H247.831C247.831 202.851 251.861 206.881 256.831 206.881V197.881ZM258.854 255.662L260.337 264.539C260.637 264.489 260.934 264.424 261.227 264.344L258.854 255.662ZM330.988 164.766L339.977 164.318V164.318L330.988 164.766ZM284.472 172.876L288.4 180.974V180.974L284.472 172.876ZM257.169 197.881V206.881C262.139 206.881 266.169 202.851 266.169 197.881H257.169ZM258.15 255.78L256.667 246.903L256.667 246.903L258.15 255.78ZM255.513 255.78L256.996 246.903L256.996 246.903L255.513 255.78ZM257.182 246.981C256.915 246.908 256.498 246.755 256.034 246.51C255.573 246.266 255.193 245.996 254.923 245.751C254.652 245.504 254.59 245.372 254.608 245.408C254.646 245.482 254.708 245.663 254.708 245.863H236.708C236.708 251.831 239.743 256.277 242.814 259.069C245.812 261.795 249.402 263.514 252.436 264.344L257.182 246.981ZM254.708 245.863C254.708 242.308 254.667 232.479 250.268 222.571C245.642 212.15 236.35 202.046 219.204 198.526L215.583 216.158C226.415 218.382 231.28 224.16 233.816 229.874C236.581 236.101 236.708 242.66 236.708 245.863H254.708ZM219.204 198.526C208.448 196.318 201.668 189.511 197.417 182.001C195.279 178.223 193.862 174.385 193.008 171.159C192.583 169.553 192.312 168.155 192.158 167.056C192.082 166.508 192.038 166.062 192.017 165.724C191.994 165.371 192.001 165.211 192.001 165.215L174.023 164.318C173.874 167.304 174.466 171.456 175.607 175.765C176.797 180.258 178.751 185.564 181.753 190.868C187.782 201.52 198.362 212.622 215.583 216.158L219.204 198.526ZM192.001 165.215C191.839 168.456 189.643 170.279 188.527 170.851C187.776 171.236 187.573 171.09 188.627 171.025C190.556 170.905 193.909 171.2 198.398 172.078C207.223 173.805 218.017 177.295 225.6 180.974L233.456 164.778C224.321 160.347 212.025 156.403 201.855 154.413C196.847 153.433 191.727 152.798 187.515 153.059C185.498 153.184 182.808 153.555 180.317 154.833C177.459 156.297 174.269 159.387 174.023 164.318L192.001 165.215ZM225.6 180.974C231.364 183.769 237.142 186.262 241.843 189.643C246.518 193.006 247.831 195.645 247.831 197.881H265.831C265.831 186.939 258.718 179.609 252.354 175.031C246.016 170.472 238.142 167.051 233.456 164.778L225.6 180.974ZM261.227 264.344C264.181 263.536 267.802 261.866 270.866 259.204C273.969 256.508 277.292 252.034 277.292 245.863H259.292C259.292 245.56 259.386 245.317 259.435 245.228C259.458 245.186 259.383 245.336 259.061 245.616C258.743 245.892 258.303 246.19 257.78 246.458C257.255 246.728 256.784 246.898 256.48 246.981L261.227 264.344ZM277.292 245.863C277.292 242.66 277.419 236.101 280.184 229.874C282.72 224.16 287.585 218.382 298.417 216.158L294.796 198.526C277.65 202.046 268.358 212.15 263.732 222.571C259.333 232.479 259.292 242.308 259.292 245.863H277.292ZM298.417 216.158C315.638 212.622 326.218 201.52 332.247 190.868C335.249 185.564 337.203 180.258 338.393 175.765C339.534 171.456 340.126 167.304 339.977 164.318L321.999 165.215C321.999 165.211 322.006 165.371 321.983 165.724C321.962 166.062 321.918 166.508 321.842 167.056C321.688 168.155 321.417 169.553 320.992 171.159C320.138 174.385 318.721 178.223 316.583 182.001C312.332 189.511 305.552 196.318 294.796 198.526L298.417 216.158ZM339.977 164.318C339.731 159.387 336.541 156.297 333.683 154.833C331.192 153.555 328.502 153.184 326.485 153.059C322.273 152.798 317.153 153.433 312.145 154.413C301.975 156.403 289.679 160.347 280.544 164.778L288.4 180.974C295.983 177.295 306.777 173.805 315.602 172.078C320.091 171.2 323.444 170.905 325.373 171.025C326.427 171.09 326.224 171.236 325.473 170.851C324.357 170.279 322.161 168.456 321.999 165.215L339.977 164.318ZM280.544 164.778C275.858 167.051 267.984 170.472 261.646 175.031C255.282 179.609 248.169 186.939 248.169 197.881H266.169C266.169 195.645 267.482 193.006 272.157 189.643C276.858 186.262 282.636 183.769 288.4 180.974L280.544 164.778ZM256.831 206.881H257.169V188.881H256.831V206.881ZM257.371 246.785L256.667 246.903L259.632 264.657L260.337 264.539L257.371 246.785ZM256.996 246.903L256.292 246.785L253.326 264.539L254.031 264.657L256.996 246.903ZM256.667 246.903C256.776 246.885 256.887 246.885 256.996 246.903L254.031 264.657C255.885 264.967 257.778 264.967 259.632 264.657L256.667 246.903Z" fill="black"/> +</svg> diff --git a/static/social_icons/gitea.svg b/static/social_icons/gitea.svg new file mode 100755 index 0000000..3022da4 --- /dev/null +++ b/static/social_icons/gitea.svg @@ -0,0 +1,5 @@ +<!-- CC-BY - https://github.com/reiver/fediverse-icons --> +<svg width="512" height="512" viewBox="0 0 512 512" fill="none" xmlns="http://www.w3.org/2000/svg"> +<path d="M111 262C91.374 262 72.5518 254.204 58.6741 240.326C44.7964 226.448 37 207.626 37 188C37 168.374 44.7964 149.552 58.6741 135.674C72.5518 121.796 91.374 114 111 114L123 114" stroke="black" stroke-width="18"/> +<path fill-rule="evenodd" clip-rule="evenodd" d="M158 76C131.49 76 110 97.4903 110 124V285.5C110 367.79 176.71 434.5 259 434.5H334C416.29 434.5 483 367.79 483 285.5V124C483 97.4903 461.51 76 435 76H158ZM323 161.201V93.5H305V150.808L288.773 141.44C273.946 132.879 254.987 137.96 246.426 152.787L182.121 264.167C173.561 278.994 178.641 297.953 193.468 306.514L304.848 370.819C319.675 379.379 338.634 374.299 347.195 359.472L411.5 248.092C420.06 233.265 414.98 214.306 400.153 205.745L323 161.201ZM316.845 178.432L391.153 221.334C397.371 224.924 399.501 232.874 395.912 239.092L331.606 350.472C328.016 356.69 320.066 358.82 313.848 355.231L202.468 290.925C196.25 287.335 194.12 279.385 197.709 273.167L262.015 161.787C265.605 155.569 273.555 153.438 279.773 157.028L301.257 169.432L291.498 186.335C284.705 186.123 278.018 189.561 274.382 195.859C270.746 202.157 271.112 209.667 274.692 215.444L253.853 251.539C247.06 251.328 240.372 254.765 236.736 261.063C231.473 270.18 234.597 281.838 243.713 287.101C252.83 292.365 264.488 289.241 269.751 280.124C273.387 273.826 273.021 266.316 269.441 260.538L290.28 224.445C293.284 224.538 296.268 223.918 298.976 222.652L329.227 240.118L305.306 281.551C298.702 281.535 292.273 284.956 288.735 291.085C283.471 300.202 286.595 311.859 295.711 317.123C304.828 322.386 316.486 319.263 321.749 310.146C325.481 303.682 324.997 295.941 321.15 290.108L353.816 233.529L309.763 208.095C310.398 203.65 309.433 199.12 307.087 195.334L316.845 178.432Z" fill="black"/> +</svg> diff --git a/static/social_icons/greatape.svg b/static/social_icons/greatape.svg new file mode 100755 index 0000000..3a58d86 --- /dev/null +++ b/static/social_icons/greatape.svg @@ -0,0 +1,4 @@ +<!-- CC-BY - https://github.com/reiver/fediverse-icons --> +<svg width="512" height="512" viewBox="0 0 512 512" fill="none" xmlns="http://www.w3.org/2000/svg"> +<path fill-rule="evenodd" clip-rule="evenodd" d="M175.394 91.7845L232.098 84.5849C259.535 81.1012 286.351 93.3871 301.711 115.881L278.501 121.263C254.24 126.889 237.063 148.515 237.063 173.433V179.987C237.063 204.42 253.591 225.755 277.238 231.848L304.335 238.829L302.58 256.702C299.132 291.83 326.715 322.273 361.992 322.273H394.259C419.619 322.273 441.619 302.514 434.989 283.157C442.141 292.886 446.063 304.703 446.063 316.918V324.433H435.466L426.867 352.433C414.687 392.098 374.274 415.933 333.667 407.403L291.049 398.45C279.438 396.011 267.68 401.907 262.691 412.671C255.052 429.148 233.12 432.573 220.821 419.21L88.7782 275.742C56.8167 241.015 57.1105 187.496 89.4511 153.122L121.182 119.396C135.499 104.178 154.666 94.4163 175.394 91.7845ZM406.977 249.724L412.346 241.577L338.408 186.901L350.873 173.753C354.233 170.208 356.678 165.897 357.997 161.194C358.795 158.346 359.058 155.478 358.849 152.695C356.653 157.774 351.916 161.358 346.358 162.037L319.725 165.29V154.395H274.298V195.25L319.725 207.878L366.145 249.724H406.977ZM166.564 243.076L175.628 243.076C180.01 243.076 183.563 239.524 183.563 235.142C183.563 230.76 187.115 227.207 191.497 227.207H197.254C204.816 227.207 210.946 233.337 210.946 240.899V251.49C210.946 264.901 200.074 275.773 186.663 275.773L160.214 275.773C145.106 275.773 132.198 264.881 129.656 249.988L121.321 201.152C119.327 189.472 124.167 177.676 133.79 170.762L134.477 170.269C143.116 164.061 154.334 162.717 164.195 166.708L180.397 173.265C185.637 175.385 189.066 180.472 189.066 186.124C189.066 193.786 182.855 199.997 175.193 199.997H169.316C158.408 199.997 149.566 208.839 149.566 219.747L149.566 226.078C149.566 235.465 157.176 243.076 166.564 243.076Z" fill="black"/> +</svg> diff --git a/static/social_icons/hubzilla.svg b/static/social_icons/hubzilla.svg new file mode 100755 index 0000000..2d6c740 --- /dev/null +++ b/static/social_icons/hubzilla.svg @@ -0,0 +1,4 @@ +<!-- CC-BY - https://github.com/reiver/fediverse-icons --> +<svg width="512" height="512" viewBox="0 0 512 512" fill="none" xmlns="http://www.w3.org/2000/svg"> +<path fill-rule="evenodd" clip-rule="evenodd" d="M181 77C123.562 77 77 123.562 77 181V332C77 389.438 123.562 436 181 436H332C389.438 436 436 389.438 436 332V181C436 123.562 389.438 77 332 77H181ZM281.422 155.866C315.228 144.088 352.18 161.945 363.958 195.751C375.736 229.557 357.879 266.509 324.073 278.287C312.972 282.155 301.531 282.827 290.753 280.788L284.289 304.229C291.982 308.027 298.247 314.729 301.293 323.471C307.452 341.15 298.114 360.475 280.435 366.634C262.756 372.794 243.431 363.455 237.271 345.776C235.122 339.608 234.86 333.239 236.18 327.3L209.857 311.573C205.659 315.576 200.559 318.768 194.725 320.801C172.857 328.42 148.954 316.868 141.335 295.001C133.716 273.133 145.267 249.229 167.135 241.611C184.359 235.61 202.845 241.501 213.643 254.959L242.054 239.834C241.877 239.36 241.704 238.883 241.537 238.402C229.759 204.597 247.616 167.644 281.422 155.866ZM250.638 255.656C256.76 263.93 264.7 270.507 273.674 275.01L266.555 300.827C263.745 301.056 260.917 301.642 258.13 302.613C252.799 304.47 248.228 307.524 244.61 311.368L219.924 296.62C223.053 288.714 223.804 279.828 221.626 271.101L250.638 255.656Z" fill="black"/> +</svg> diff --git a/static/social_icons/itchio.svg b/static/social_icons/itchio.svg new file mode 100644 index 0000000..4a4ac25 --- /dev/null +++ b/static/social_icons/itchio.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" height="235.452" width="261.728" viewBox="0 0 245.371 220.736"><path d="M31.99 1.365C21.287 7.72.2 31.945 0 38.298v10.516C0 62.144 12.46 73.86 23.773 73.86c13.584 0 24.902-11.258 24.903-24.62 0 13.362 10.93 24.62 24.515 24.62 13.586 0 24.165-11.258 24.165-24.62 0 13.362 11.622 24.62 25.207 24.62h.246c13.586 0 25.208-11.258 25.208-24.62 0 13.362 10.58 24.62 24.164 24.62 13.585 0 24.515-11.258 24.515-24.62 0 13.362 11.32 24.62 24.903 24.62 11.313 0 23.773-11.714 23.773-25.046V38.298c-.2-6.354-21.287-30.58-31.988-36.933C180.118.197 157.056-.005 122.685 0c-34.37.003-81.228.54-90.697 1.365zm65.194 66.217a28.025 28.025 0 0 1-4.78 6.155c-5.128 5.014-12.157 8.122-19.906 8.122a28.482 28.482 0 0 1-19.948-8.126c-1.858-1.82-3.27-3.766-4.563-6.032l-.006.004c-1.292 2.27-3.092 4.215-4.954 6.037a28.5 28.5 0 0 1-19.948 8.12c-.934 0-1.906-.258-2.692-.528-1.092 11.372-1.553 22.24-1.716 30.164l-.002.045c-.02 4.024-.04 7.333-.06 11.93.21 23.86-2.363 77.334 10.52 90.473 19.964 4.655 56.7 6.775 93.555 6.788h.006c36.854-.013 73.59-2.133 93.554-6.788 12.883-13.14 10.31-66.614 10.52-90.474-.022-4.596-.04-7.905-.06-11.93l-.003-.045c-.162-7.926-.623-18.793-1.715-30.165-.786.27-1.757.528-2.692.528a28.5 28.5 0 0 1-19.948-8.12c-1.862-1.822-3.662-3.766-4.955-6.037l-.006-.004c-1.294 2.266-2.705 4.213-4.563 6.032a28.48 28.48 0 0 1-19.947 8.125c-7.748 0-14.778-3.11-19.906-8.123a28.025 28.025 0 0 1-4.78-6.155 27.99 27.99 0 0 1-4.736 6.155 28.49 28.49 0 0 1-19.95 8.124c-.27 0-.54-.012-.81-.02h-.007c-.27.008-.54.02-.813.02a28.49 28.49 0 0 1-19.95-8.123 27.992 27.992 0 0 1-4.736-6.155zm-20.486 26.49l-.002.01h.015c8.113.017 15.32 0 24.25 9.746 7.028-.737 14.372-1.105 21.722-1.094h.006c7.35-.01 14.694.357 21.723 1.094 8.93-9.747 16.137-9.73 24.25-9.746h.014l-.002-.01c3.833 0 19.166 0 29.85 30.007L210 165.244c8.504 30.624-2.723 31.373-16.727 31.4-20.768-.773-32.267-15.855-32.267-30.935-11.496 1.884-24.907 2.826-38.318 2.827h-.006c-13.412 0-26.823-.943-38.318-2.827 0 15.08-11.5 30.162-32.267 30.935-14.004-.027-25.23-.775-16.726-31.4L46.85 124.08C57.534 94.073 72.867 94.073 76.7 94.073zm45.985 23.582v.006c-.02.02-21.863 20.08-25.79 27.215l14.304-.573v12.474c0 .584 5.74.346 11.486.08h.006c5.744.266 11.485.504 11.485-.08v-12.474l14.304.573c-3.928-7.135-25.79-27.215-25.79-27.215v-.006l-.003.002z" color="#000"/></svg> \ No newline at end of file diff --git a/static/social_icons/lemmy.svg b/static/social_icons/lemmy.svg new file mode 100755 index 0000000..07eede1 --- /dev/null +++ b/static/social_icons/lemmy.svg @@ -0,0 +1,8 @@ +<!-- CC-BY - https://github.com/reiver/fediverse-icons --> +<svg width="512" height="512" viewBox="0 0 512 512" fill="none" xmlns="http://www.w3.org/2000/svg"> +<path d="M289 395C289 411.913 274.884 426 257 426C239.116 426 225 411.913 225 395C225 378.087 239.116 364 257 364C274.884 364 289 378.087 289 395Z" stroke="black" stroke-width="18"/> +<path fill-rule="evenodd" clip-rule="evenodd" d="M187.997 113.368C126.039 111.595 74.8511 161.339 74.8511 223.323V290.043C74.8511 349.569 122.203 398.296 181.705 399.998L217.077 401.01C216.862 399.32 216.751 397.598 216.751 395.849C216.751 373.544 234.832 355.462 257.137 355.462C279.442 355.462 297.524 373.544 297.524 395.849C297.524 398.392 297.289 400.88 296.84 403.293L324.095 404.073C386.053 405.845 437.241 356.101 437.241 294.117V227.397C437.241 167.871 389.889 119.145 330.387 117.443L187.997 113.368ZM349 313C361.15 313 371 303.15 371 291C371 278.85 361.15 269 349 269C336.85 269 327 278.85 327 291C327 303.15 336.85 313 349 313ZM349 331C371.091 331 389 313.091 389 291C389 268.909 371.091 251 349 251C326.909 251 309 268.909 309 291C309 313.091 326.909 331 349 331ZM185 291C185 303.15 175.15 313 163 313C150.85 313 141 303.15 141 291C141 278.85 150.85 269 163 269C175.15 269 185 278.85 185 291ZM203 291C203 313.091 185.091 331 163 331C140.909 331 123 313.091 123 291C123 268.909 140.909 251 163 251C185.091 251 203 268.909 203 291Z" fill="black"/> +<path d="M408.586 359L453 379.861M383 379.861L408.586 408" stroke="black" stroke-width="18" stroke-linecap="round"/> +<path d="M103.414 359L59 379.861M129 379.861L103.414 408" stroke="black" stroke-width="18" stroke-linecap="round"/> +<path fill-rule="evenodd" clip-rule="evenodd" d="M139.653 123.006C131.167 105.821 113.464 94 93 94C64.2812 94 41 117.281 41 146C41 169.612 56.7378 189.549 78.2961 195.892C76.8144 201.667 75.7895 207.628 75.2628 213.733C45.1917 205.88 23 178.532 23 146C23 107.34 54.3401 76 93 76C121.297 76 145.672 92.7902 156.707 116.951C150.817 118.507 145.117 120.539 139.653 123.006ZM96.4091 197.89C123.539 196.134 145 173.573 145 146C145 144.148 144.903 142.318 144.714 140.516C150.199 137.851 155.985 135.717 162.006 134.178C162.66 138.021 163 141.971 163 146C163 184.614 131.734 215.925 93.1379 216C93.6283 209.765 94.7396 203.708 96.4091 197.89ZM436.378 213.563C466.123 205.491 488 178.3 488 146C488 107.34 456.66 76 418 76C388.377 76 363.053 94.4002 352.831 120.395C358.75 121.804 364.48 123.691 369.981 126.011C377.814 107.214 396.364 94 418 94C446.719 94 470 117.281 470 146C470 169.627 454.242 189.574 432.663 195.904C434.366 201.611 435.618 207.512 436.378 213.563ZM414.4 197.877C416.365 203.682 417.767 209.744 418.541 215.998C418.361 215.999 418.18 216 418 216C379.34 216 348 184.66 348 146C348 143.248 348.159 140.532 348.468 137.863C354.587 139.307 360.466 141.361 366.039 143.956C366.013 144.634 366 145.315 366 146C366 173.509 387.36 196.028 414.4 197.877Z" fill="black"/> +</svg> diff --git a/static/social_icons/letterboxd.svg b/static/social_icons/letterboxd.svg new file mode 100644 index 0000000..d3e1925 --- /dev/null +++ b/static/social_icons/letterboxd.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512"><!--!Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc.--><path d="M521.3 128C586.9 128 640 181.1 640 246.6s-53.1 118.6-118.7 118.6c-42.5 0-79.7-22.3-100.7-55.8c11.4-18.2 18-39.7 18-62.8s-6.6-44.6-18-62.8l0 0 .8-1.2c20.8-32.3 56.8-53.9 97.9-54.6l2 0zM320 128c42.5 0 79.7 22.3 100.7 55.8c-11.4 18.2-18 39.7-18 62.8s6.6 44.6 18 62.8l0 0-.8 1.2c-20.8 32.3-56.8 53.9-97.9 54.6l-2 0c-42.5 0-79.7-22.3-100.7-55.8c11.4-18.2 18-39.7 18-62.8s-6.6-44.6-18-62.8l0 0 .8-1.2c20.8-32.3 56.8-53.9 97.9-54.6l2 0zm-201.3 0c42.5 0 79.7 22.3 100.7 55.8c-11.4 18.2-18 39.7-18 62.8s6.6 44.6 18 62.8l0 0-.8 1.2c-20.8 32.3-56.8 53.9-97.9 54.6l-2 0C53.1 365.1 0 312.1 0 246.6S53.1 128 118.7 128z"/></svg> \ No newline at end of file diff --git a/static/social_icons/misskey.svg b/static/social_icons/misskey.svg new file mode 100755 index 0000000..ab3a381 --- /dev/null +++ b/static/social_icons/misskey.svg @@ -0,0 +1,9 @@ +<!-- CC-BY - https://github.com/reiver/fediverse-icons --> +<svg width="512" height="512" viewBox="0 0 512 512" fill="none" xmlns="http://www.w3.org/2000/svg"> +<path fill-rule="evenodd" clip-rule="evenodd" d="M95.2379 182.246V350.989C95.2379 364.802 106.436 376 120.249 376H121.593C135.406 376 146.604 364.802 146.604 350.989V245.078L164.604 266.756V350.989C164.604 374.743 145.347 394 121.593 394H120.249C96.4945 394 77.2379 374.743 77.2379 350.989V160.011C77.2379 136.257 96.4945 117 120.249 117H121.593C139.006 117 154.002 127.348 160.768 142.23L157.719 138.558C146.429 124.962 126.254 123.092 112.657 134.382L108.18 138.099C105.125 139.786 102.459 142.093 100.354 144.851C90.6383 154.915 88.6789 170.119 95.2379 182.246ZM256.001 267.238V350.989C256.001 374.743 275.258 394 299.012 394H300.356C324.11 394 343.367 374.743 343.367 350.989V160.011C343.367 136.257 324.11 117 300.356 117H299.012C281.203 117 265.923 127.823 259.389 143.251L263.285 138.558C274.575 124.962 294.75 123.092 308.347 134.382L313.839 138.942C315.594 140.067 317.199 141.406 318.618 142.922C330.282 153.074 332.857 169.929 325.367 182.963V350.989C325.367 364.802 314.169 376 300.356 376H299.012C285.199 376 274.001 364.802 274.001 350.989V245.56L256.001 267.238Z" fill="black"/> +<path d="M327.482 127.637C345.737 142.828 348.247 169.974 333.09 188.269L249.846 288.741C225.458 321.519 195.25 320.846 170.434 288.144L88.0374 188.694C72.6853 170.164 75.2282 142.671 93.717 127.285C112.206 111.899 139.639 114.447 154.991 132.977L207.307 196.12C208.907 198.051 211.868 198.051 213.468 196.12L266.136 132.552C281.293 114.257 308.379 111.741 326.634 126.932L327.482 127.637Z" fill="black"/> +<path d="M189.5 297.5L95 186C92.6667 183.667 88 178.2 88 175C88 171 88.5 151 88 143.5C87.5 136 103.5 128.5 116.5 125C126.9 122.2 137.5 128.5 141.5 132C172.167 168.667 235 243.4 241 249C247 254.6 247.5 270.333 247 277.5C241 284.167 227.2 298.7 220 303.5C212.8 308.3 196.667 301.5 189.5 297.5Z" fill="black" stroke="black"/> +<path d="M358 239C358 218.013 375.013 201 396 201C416.987 201 434 218.013 434 239V356C434 376.987 416.987 394 396 394C375.013 394 358 376.987 358 356V239Z" fill="black"/> +<ellipse cx="397" cy="156" rx="37" ry="38" fill="black"/> +<path d="M264.5 357.5V264V257L334.5 179.5V357.5L325.5 372L310 383.5H296L278 376.5L264.5 357.5Z" fill="black"/> +</svg> diff --git a/static/social_icons/orcid.svg b/static/social_icons/orcid.svg new file mode 100644 index 0000000..2c3e4bd --- /dev/null +++ b/static/social_icons/orcid.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--!Font Awesome Free 6.7.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2024 Fonticons, Inc.--><path d="M294.8 188.2h-45.9V342h47.5c67.6 0 83.1-51.3 83.1-76.9 0-41.6-26.5-76.9-84.7-76.9zM256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zm-80.8 360.8h-29.8v-207.5h29.8zm-14.9-231.1a19.6 19.6 0 1 1 19.6-19.6 19.6 19.6 0 0 1 -19.6 19.6zM300 369h-81V161.3h80.6c76.7 0 110.4 54.8 110.4 103.9C410 318.4 368.4 369 300 369z"/></svg> \ No newline at end of file diff --git a/static/social_icons/peertube.svg b/static/social_icons/peertube.svg new file mode 100755 index 0000000..3986e7f --- /dev/null +++ b/static/social_icons/peertube.svg @@ -0,0 +1,7 @@ +<!-- CC-BY - https://github.com/reiver/fediverse-icons --> +<svg width="512" height="512" viewBox="0 0 512 512" fill="none" xmlns="http://www.w3.org/2000/svg"> +<path d="M280.5 358.5L173.503 420.287C142.17 438.381 103 415.768 103 379.586L103 256L280.5 358.5Z" fill="black"/> +<path d="M280.5 153.5L103 256L103 132.414C103 96.232 142.17 73.6194 173.504 91.7133L280.5 153.5Z" fill="black"/> +<path d="M387.518 215.299C418.846 233.39 418.846 278.61 387.517 296.701L280.5 358.5L280.5 153.5L387.518 215.299Z" fill="black"/> +<path d="M280.5 358.5L173.503 420.287C142.17 438.381 103 415.768 103 379.586L103 256M280.5 358.5L103 256M280.5 358.5L387.517 296.701C418.846 278.61 418.846 233.39 387.518 215.299L280.5 153.5M280.5 358.5L280.5 153.5M103 256L280.5 153.5M103 256L103 132.414C103 96.232 142.17 73.6194 173.504 91.7133L280.5 153.5" stroke="black" stroke-width="18"/> +</svg> diff --git a/static/social_icons/pixelfed.svg b/static/social_icons/pixelfed.svg new file mode 100755 index 0000000..87b2154 --- /dev/null +++ b/static/social_icons/pixelfed.svg @@ -0,0 +1,4 @@ +<!-- CC-BY - https://github.com/reiver/fediverse-icons --> +<svg width="512" height="512" viewBox="0 0 512 512" fill="none" xmlns="http://www.w3.org/2000/svg"> +<path fill-rule="evenodd" clip-rule="evenodd" d="M435 256C435 287.17 427.033 316.479 413.025 342.001C391.664 344.91 368.991 344.165 348.586 337.918C329.966 332.217 313.449 322.017 301.281 306.026C299.348 303.486 297.512 300.783 295.787 297.908C322.925 294.791 344 271.74 344 243.767V237.274C345.958 236.247 347.862 235.153 349.711 233.993C369.733 221.44 382.241 201.974 389.607 180.708C393.431 169.668 395.931 157.977 397.382 146.204C420.959 176.521 435 214.621 435 256ZM342.867 216.945C356.957 207.118 366.533 192.327 372.598 174.816C377.719 160.034 380.192 143.709 380.825 127.705C348.58 96.3263 304.547 77 256 77C157.141 77 77 157.141 77 256C77 258.032 77.0339 260.057 77.1011 262.073C96.1237 244.734 119.094 233.101 142.821 226.028C158.042 221.49 173.696 218.784 189 217.631V206C189 188.327 203.327 174 221 174H255.71C245.912 144.618 225.33 124.59 201.78 111.04C192.329 105.602 182.427 101.233 172.602 97.7727C179.957 93.8773 187.615 90.478 195.531 87.6195C200.671 89.9669 205.766 92.5664 210.757 95.4379C238.99 111.683 264.048 136.818 274.552 174H290C316.034 174 337.766 192.424 342.867 216.945ZM190.988 346.224C189.952 346.156 189 345.326 189 344.111V267.2V236.134V235.685C175.434 236.792 161.529 239.233 147.964 243.277C121.972 251.026 97.6574 264.497 79.405 285.413C90.518 352.636 139.086 407.22 202.953 427.009C200.261 421.782 197.985 416.505 196.101 411.193C188.308 389.215 187.398 367.119 190.988 346.224ZM215.671 323.921C213.579 329.506 211.806 335.226 210.418 341.045C205.458 361.831 205.442 383.677 213.066 405.177C216.321 414.355 221.008 423.585 227.418 432.73C236.725 434.224 246.272 435 256 435C315.506 435 368.23 405.964 400.777 361.286C381.537 362.46 361.757 360.775 343.317 355.129C321.737 348.523 301.786 336.413 286.957 316.926C282.66 311.28 278.835 305.068 275.539 298.267H266.5H253.963H247.695H244.561C242.554 298.267 240.629 299.064 239.211 300.484L238.435 301.26L235.443 304.252L229.46 310.238L217.493 322.208L215.671 323.921Z" fill="black"/> +</svg> diff --git a/static/social_icons/pleroma.svg b/static/social_icons/pleroma.svg new file mode 100755 index 0000000..b2390cc --- /dev/null +++ b/static/social_icons/pleroma.svg @@ -0,0 +1,6 @@ +<!-- CC-BY - https://github.com/reiver/fediverse-icons --> +<svg width="512" height="512" viewBox="0 0 512 512" fill="none" xmlns="http://www.w3.org/2000/svg"> +<path d="M144 124C144 97.4903 165.49 76 192 76H209C222.255 76 233 86.7452 233 100V412C233 425.255 222.255 436 209 436H168C154.745 436 144 425.255 144 412V124Z" fill="black"/> +<path d="M278 100C278 86.7452 288.745 76 302 76H344C357.255 76 368 86.7452 368 100V227C368 251.853 347.853 272 323 272H302C288.745 272 278 261.255 278 248V100Z" fill="black"/> +<path d="M278 358C278 344.745 288.745 334 302 334H344C357.255 334 368 344.745 368 358V388C368 414.51 346.51 436 320 436H302C288.745 436 278 425.255 278 412V358Z" fill="black"/> +</svg> diff --git a/static/social_icons/wordpress.svg b/static/social_icons/wordpress.svg new file mode 100755 index 0000000..807a5ed --- /dev/null +++ b/static/social_icons/wordpress.svg @@ -0,0 +1,5 @@ +<!-- CC-BY - https://github.com/reiver/fediverse-icons --> +<svg width="512" height="512" viewBox="0 0 512 512" fill="none" xmlns="http://www.w3.org/2000/svg"> +<path fill-rule="evenodd" clip-rule="evenodd" d="M343.257 404.255C393.974 374.341 428 319.144 428 256C428 230.686 422.531 206.649 412.711 185.006C411.662 202.528 407.909 220.432 404.044 233.595L343.257 404.255ZM319.987 415.704L273.3 290.764C270.034 282.024 257.637 282.123 254.511 290.914L210.084 415.832C209.316 417.992 207.99 419.626 206.378 420.734C222.09 425.46 238.748 428 256 428C278.614 428 300.208 423.636 319.987 415.704ZM191.052 415.315C128.255 389.688 84 328.012 84 256C84 227.061 91.147 199.791 103.772 175.859L191.052 415.315ZM116.415 155.479H169.999C174.507 155.479 178.161 159.133 178.161 163.641C178.161 168.148 174.507 171.802 169.999 171.802H167.916C161.022 171.802 156.196 178.613 158.481 185.116L208.11 326.389C211.247 335.32 223.884 335.298 226.991 326.358L254.386 247.528C255.158 245.306 255.122 242.883 254.284 240.685L230.488 178.241C229.011 174.364 225.293 171.802 221.144 171.802H213.579C209.071 171.802 205.417 168.148 205.417 163.641C205.417 159.133 209.071 155.479 213.579 155.479H299.904C304.411 155.479 308.065 159.133 308.065 163.641C308.065 168.148 304.411 171.802 299.904 171.802H297.884C290.973 171.802 286.145 178.646 288.464 185.157L338.349 325.249C341.569 334.291 354.41 334.038 357.238 324.867C363.743 303.768 370.861 280.281 373.307 270.904C377.947 253.124 378.237 218.73 368.668 205.03C359.771 192.293 325.556 133.191 367.41 124.954C337.396 99.413 298.498 84 256 84C198.534 84 147.65 112.182 116.415 155.479Z" fill="black"/> +<path d="M410.638 235.944L410.704 235.757L410.76 235.567C416.245 216.893 421.635 188.545 419.535 164.489C418.487 152.486 415.511 140.747 408.999 131.852C402.206 122.573 391.995 117 378.237 117C362.493 117 351.281 121.615 345.111 130.844C339.204 139.68 339.291 150.814 341.249 160.734C345.19 180.697 357.947 201.906 362.929 209.039C364.598 211.428 366.113 215.172 367.26 220.168C368.387 225.079 369.064 230.778 369.322 236.74C369.843 248.745 368.64 261.068 366.534 269.136C364.136 278.329 357.073 301.643 350.549 322.804C349.718 325.497 345.918 325.638 344.944 322.901L295.058 182.808C294.362 180.855 295.811 178.802 297.884 178.802H299.904C308.277 178.802 315.065 172.014 315.065 163.641C315.065 155.267 308.277 148.479 299.904 148.479H213.579C205.205 148.479 198.417 155.267 198.417 163.641C198.417 172.014 205.205 178.802 213.579 178.802H221.144C222.389 178.802 223.504 179.571 223.947 180.734L247.743 243.177C247.995 243.837 248.005 244.564 247.774 245.23L220.379 324.06C219.447 326.742 215.656 326.748 214.714 324.069L165.085 182.796C164.4 180.845 165.848 178.802 167.916 178.802H169.999C178.373 178.802 185.161 172.014 185.161 163.641C185.161 155.267 178.373 148.479 169.999 148.479H105.193C97.9069 148.479 92 154.386 92 161.673C92 163.214 92.27 164.743 92.7977 166.191L184.69 418.303C190.145 433.27 211.342 433.187 216.68 418.178L261.106 293.259C262.044 290.622 265.763 290.592 266.743 293.214L313.663 418.78C319.214 433.634 340.281 433.471 345.602 418.533L410.638 235.944Z" stroke="black" stroke-width="14" stroke-linecap="round"/> +</svg> diff --git a/static/social_icons/writefreely.svg b/static/social_icons/writefreely.svg new file mode 100755 index 0000000..c2bd4fc --- /dev/null +++ b/static/social_icons/writefreely.svg @@ -0,0 +1,4 @@ +<!-- CC-BY - https://github.com/reiver/fediverse-icons --> +<svg width="521" height="521" viewBox="0 0 521 521" fill="none" xmlns="http://www.w3.org/2000/svg"> +<path fill-rule="evenodd" clip-rule="evenodd" d="M185 81C127.562 81 81 127.562 81 185V336C81 393.438 127.562 440 185 440H336C393.438 440 440 393.438 440 336V185C440 127.562 393.438 81 336 81H185ZM347.261 302.318C353.068 294.389 357.947 283.263 361.357 271.479C364.793 259.608 366.928 246.416 366.831 234.07C366.736 221.936 364.475 209.481 357.993 200.108C351.015 190.017 339.9 184.615 325.359 186.013C319.294 186.597 314.023 188.657 310.178 192.011C306.47 195.246 303.499 200.377 304.449 206.269C305.488 212.72 310.608 216.592 316.089 217.758C321.282 218.864 327.222 217.834 333.377 215.343C337.153 213.814 339.328 210.013 338.963 206.155C340.678 207.257 342.045 208.693 343.188 210.346C346.713 215.444 348.749 223.68 348.832 234.211C348.913 244.53 347.105 255.977 344.067 266.475C341.004 277.059 336.878 286.031 332.739 291.683C322.798 305.257 312.989 312.694 304.461 315.632C296.305 318.443 288.746 317.378 281.782 312.617C280.605 311.813 278.555 309.136 276.868 302.56C275.278 296.362 274.41 288.287 274.141 279.056C273.766 266.213 274.566 251.91 275.764 238.762C276.624 233.132 277.39 227.724 278.059 222.768C278.182 221.857 278.269 220.496 277.946 218.97C277.79 218.231 277.439 216.975 276.564 215.658C275.693 214.347 273.733 212.2 270.362 211.67C266.917 211.129 264.323 212.635 263.013 213.75C261.743 214.832 261.046 216.015 260.698 216.704C259.976 218.131 259.719 219.497 259.611 220.399C259.012 225.388 258.417 230.846 257.89 236.568C255.149 254.441 251.55 273.946 247.355 287.715C238.055 318.24 212.07 319.579 202.328 312.696C197.605 309.359 195.185 301.984 197.043 285.625C198.246 275.036 200.907 263 203.91 249.414C205.399 242.675 206.973 235.555 208.495 228.042C211.159 214.89 209.829 204.919 204.981 197.868C200.095 190.759 192.992 188.575 188.467 188.035L188.443 188.032L188.42 188.03C177.902 186.831 167.697 191.154 161.177 198.748C154.465 206.568 151.756 217.749 156.116 229.408C157.857 234.063 163.043 236.426 167.698 234.685C172.354 232.944 174.717 227.759 172.976 223.103C170.987 217.785 172.257 213.476 174.835 210.473C177.6 207.252 181.985 205.422 186.357 205.911C187.75 206.082 189.181 206.658 190.148 208.065C191.16 209.536 193.004 213.853 190.853 224.468C189.509 231.105 188.04 237.761 186.598 244.291L186.598 244.291C183.468 258.473 180.468 272.064 179.158 283.593C177.305 299.913 178.043 317.578 191.942 327.397C210.257 340.338 243.128 335.614 259.175 305.995C259.259 306.344 259.345 306.689 259.433 307.032C261.398 314.694 264.848 322.845 271.623 327.477C283.282 335.447 296.783 337.317 310.325 332.65C323.497 328.112 336.026 317.66 347.261 302.318ZM321.837 205.745C321.836 205.745 321.842 205.737 321.857 205.721C321.845 205.737 321.837 205.745 321.837 205.745Z" fill="black"/> +</svg> diff --git a/templates/archive.html b/templates/archive.html index 0bf581a..637b414 100644 --- a/templates/archive.html +++ b/templates/archive.html @@ -7,6 +7,18 @@ {# Set locale for date #} {% set date_locale = macros_translate::translate(key="date_locale", default="en_GB", language_strings=language_strings) %} +{#- Check for language-specific date formats -#} +{%- set language_format = "" -%} +{%- if config.extra.date_formats -%} + {%- for format_config in config.extra.date_formats -%} + {%- if format_config.lang == lang -%} + {%- if format_config.archive -%} + {%- set_global language_format = format_config.archive -%} + {%- endif -%} + {%- endif -%} + {%- endfor -%} +{%- endif -%} + <div class="archive"> <ul class="list-with-title"> {%- set source_paths = section.extra.section_path | default(value="blog/") -%} @@ -25,6 +37,13 @@ {%- set_global all_posts = all_posts | concat(with=section_item.pages) -%} {%- endfor %} + {# Sort all posts by date #} + {%- set archive_reverse = section.extra.archive_reverse | default(value=false) -%} + {%- set all_posts = all_posts | sort(attribute="date") -%} + {%- if not archive_reverse -%} + {%- set all_posts = all_posts | reverse -%} + {%- endif -%} + {# Group posts by year. #} {% set posts_by_year = all_posts | group_by(attribute="year") %} {% set years = [] %} @@ -32,8 +51,13 @@ {% set_global years = years | concat(with=[year]) %} {% endfor %} - {# Iterate over sorted & reversed years (newest to oldest). #} - {% for year in years | sort | reverse %} + {# Iterate over years #} + {% set years = years | sort %} + {%- if not archive_reverse -%} + {%- set years = years | reverse -%} + {%- endif -%} + + {% for year in years %} {% set posts = posts_by_year[year] %} {% if posts | length > 0 %} <li> @@ -43,10 +67,16 @@ <li class="listing-item"> <div class="post-time"> <span class="date"> - {{ post.date | date(format="%d %b", locale=date_locale) }} + {%- if language_format -%} + {{ post.date | date(format=language_format, locale=date_locale) }} + {%- elif config.extra.archive_date_format -%} + {{ post.date | date(format=config.extra.archive_date_format, locale=date_locale) }} + {%- else -%} + {{ post.date | date(format="%d %b", locale=date_locale) }} + {%- endif -%} </span> </div> - <a href="{{ post.permalink }}" title="{{ post.title }}">{{ post.title }}</a> + <a href="{{ post.permalink }}" title="{{ post.title }}">{{ post.title | markdown(inline=true) | safe }}</a> </li> {% endfor %} </ul> diff --git a/templates/atom.xml b/templates/atom.xml index 4f59410..3e5b55c 100644 --- a/templates/atom.xml +++ b/templates/atom.xml @@ -7,18 +7,40 @@ {%- endif -%} <?xml version="1.0" encoding="utf-8"?> <?xml-stylesheet href="{{ get_url(path='/feed_style.xsl', trailing_slash=false) | safe }}" type="text/xsl"?> -<feed xmlns="http://www.w3.org/2005/Atom" xmlns:base="http://purl.org/atompub/base/1.0/" xml:lang="{{ lang }}" xml:base="{{ config.base_url }}"> - <str:translations xmlns:str="https://github.com/welpo/tabi"> - <str:about_feeds> +<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="{{ lang }}"> + <tabi:metadata xmlns:tabi="https://github.com/welpo/tabi"> + <tabi:base_url>{{ config.base_url }}</tabi:base_url> + <tabi:separator> + {{ config.extra.separator | default(value="•") }} + </tabi:separator> + <tabi:about_feeds> {{- macros_translate::translate(key="about_feeds", default="This is a web feed, also known as an Atom feed. Subscribe by copying the URL from the address bar into your newsreader", language_strings=language_strings) -}} - </str:about_feeds> - <str:visit_the_site> + </tabi:about_feeds> + <tabi:visit_the_site> {{- macros_translate::translate(key="visit_the_site", default="Visit website", language_strings=language_strings) -}} - </str:visit_the_site> - <str:recent_posts> + </tabi:visit_the_site> + <tabi:recent_posts> {{- macros_translate::translate(key="recent_posts", default="Recent posts", language_strings=language_strings) -}} - </str:recent_posts> - </str:translations> + </tabi:recent_posts> + <tabi:last_updated_on> + {{- macros_translate::translate(key="last_updated_on", default="Updated on $DATE", language_strings=language_strings) -}} + </tabi:last_updated_on> + <tabi:default_theme> + {{- config.extra.default_theme | default(value="") -}} + </tabi:default_theme> + <tabi:post_listing_date> + {{- config.extra.post_listing_date | default(value="date") -}} + </tabi:post_listing_date> + <tabi:current_section> + {%- if term -%} + {{ term.name }} + {%- elif section.title -%} + {{ section.title }} + {%- else -%} + {{ config.title }} + {%- endif -%} + </tabi:current_section> + </tabi:metadata> {#- Load extra CSS (skin) if set in config.toml -#} {%- if config.extra.skin -%} @@ -35,19 +57,29 @@ {%- endif %} <link href="{{ feed_url | safe }}" rel="self" type="application/atom+xml"/> <link href=" - {%- if section -%} + {%- if term -%} + {{ term.permalink | escape_xml | safe }} + {%- elif section -%} {{ section.permalink | escape_xml | safe }} {%- else -%} {{ get_url(path="/", lang=lang) | escape_xml | safe }} {%- endif -%} - "/> + " rel="alternate" type="text/html"/> <generator uri="https://www.getzola.org/">Zola</generator> + {%- if last_updated -%} <updated>{{ last_updated | date(format="%+") }}</updated> + {%- endif -%} <id>{{ feed_url | safe }}</id> {%- for page in pages %} {%- if macros_settings::evaluate_setting_priority(setting="hide_from_feed", page=page, default_global_value=false) == "true" -%} {%- continue -%} {%- endif -%} + {#- Skip if hide_from_main_feed is true and this is the main feed -#} + {%- if macros_settings::evaluate_setting_priority(setting="hide_from_main_feed", page=page, default_global_value=false) == "true" + and not section + and not term -%} + {%- continue -%} + {%- endif -%} <entry xml:lang="{{ page.lang }}"> <title>{{ page.title }} {{ page.date | date(format="%+") }} @@ -68,10 +100,10 @@ {% if config.extra.full_content_in_feed %} {{ page.content }} {% endif -%} - {% if page.summary -%} - {{ page.summary | striptags | trim_end_matches(pat=".") | safe }}… - {% elif page.description -%} + {% if page.description -%} {{ page.description }} + {% elif page.summary -%} + {{ page.summary | striptags | trim_end_matches(pat=".") | safe }}… {% endif -%} {%- endfor %} diff --git a/templates/base.html b/templates/base.html index 679d975..84ad479 100644 --- a/templates/base.html +++ b/templates/base.html @@ -1,9 +1,12 @@ +{% import "macros/feed_utils.html" as feed_utils %} {% import "macros/format_date.html" as macros_format_date %} {% import "macros/list_posts.html" as macros_list_posts %} {% import "macros/page_header.html" as macros_page_header %} {% import "macros/rel_attributes.html" as macros_rel_attributes %} +{% import "macros/series_page.html" as macros_series_page %} {% import "macros/settings.html" as macros_settings %} {% import "macros/table_of_contents.html" as macros_toc %} +{% import "macros/target_attribute.html" as macros_target_attribute %} {% import "macros/translate.html" as macros_translate %} {# Load the internationalisation data for the current language from @@ -15,17 +18,25 @@ This variable will hold all the text strings for the language #} {%- endif -%} {% set rtl_languages = ["ar", "arc", "az", "dv", "ff", "he", "ku", "nqo", "fa", "rhg", "syc", "ur"] %} +{#- Necessary for the hierarchy macro -#} +{%- if page -%} + {%- set current_page = page -%} +{%- else -%} + {%- set current_page = ""-%} +{%- endif -%} +{%- endif -%}{% if macros_settings::evaluate_setting_priority(setting="force_codeblock_ltr", page=current_page, default_global_value=true) == "false" -%} + data-code-direction="inherit"{% endif %}> {% include "partials/header.html" %} - + + {% include "partials/nav.html" %} -
+
{# Post page is the default #} {% block main_content %} @@ -33,6 +44,9 @@ This variable will hold all the text strings for the language #} {% endblock main_content %}
{% include "partials/footer.html" %} + + {# Users can optionally provide this template to add content to the body element. #} + {% include "tabi/extend_body.html" ignore missing %} diff --git a/templates/cards.html b/templates/cards.html index eae90cb..451f6b2 100644 --- a/templates/cards.html +++ b/templates/cards.html @@ -18,7 +18,12 @@ {%- set show_pages = section.pages -%} {% endif -%} - {%- include "partials/cards_pages.html" -%} + {%- if macros_settings::evaluate_setting_priority(setting="enable_cards_tag_filtering", page=section, default_global_value=true) == "true" -%} + {%- include "partials/filter_card_tags.html" -%} + {%- endif -%} + + + {%- include "partials/cards_pages.html" -%} {% if paginator %} diff --git a/templates/info-page.html b/templates/info-page.html index e92ceeb..077b1a1 100644 --- a/templates/info-page.html +++ b/templates/info-page.html @@ -4,13 +4,15 @@ {%- block main_content %} -{{ macros_page_header::page_header(title=page.title) }} +{%- set page_or_section = page | default(value=section) -%} + +{{ macros_page_header::page_header(title=page_or_section.title) }}
{# The replace pattern is used to enable arbitrary locations for the Table of Contents #} {# This is Philipp Oppermann's workaround: https://github.com/getzola/zola/issues/584#issuecomment-474329637 #} - {{ page.content | replace(from="", to=macros_toc::toc(page=page, header=false, language_strings=language_strings)) | safe }} + {{ page_or_section.content | replace(from="", to=macros_toc::toc(page=page_or_section, header=false, language_strings=language_strings)) | safe }}
diff --git a/templates/macros/feed_utils.html b/templates/macros/feed_utils.html new file mode 100644 index 0000000..ff35194 --- /dev/null +++ b/templates/macros/feed_utils.html @@ -0,0 +1,17 @@ +{#- Feed utility macros -#} + +{#- Zola 0.19.0 uses `generate_feeds`. Prior versions use `generate_feed` -#} +{%- macro get_generate_feed() -%} + {{- config.generate_feeds | default(value=config.generate_feed) -}} +{%- endmacro get_generate_feed -%} + +{%- macro get_feed_url() -%} + {{- config.feed_filenames[0] | default(value=(config.feed_filename)) -}} +{%- endmacro get_feed_url -%} + +{#- Check footer feed icon conditions -#} +{%- macro should_show_footer_feed_icon() -%} + {%- set generate_feed = feed_utils::get_generate_feed() == "true" -%} + {%- set feed_url = feed_utils::get_feed_url() -%} + {{- generate_feed and config.extra.feed_icon and feed_url -}} +{%- endmacro should_show_footer_feed_icon -%} diff --git a/templates/macros/format_date.html b/templates/macros/format_date.html index 3d22eba..f747fd1 100644 --- a/templates/macros/format_date.html +++ b/templates/macros/format_date.html @@ -3,7 +3,23 @@ {#- Set locale -#} {%- set date_locale = macros_translate::translate(key="date_locale", default="en_GB", language_strings=language_strings) -%} -{%- if config.extra.short_date_format and short -%} +{#- Check for language-specific date formats -#} +{%- set language_format = "" -%} +{%- if config.extra.date_formats -%} + {%- for format_config in config.extra.date_formats -%} + {%- if format_config.lang == lang -%} + {%- if short and format_config.short -%} + {%- set_global language_format = format_config.short -%} + {%- elif not short and format_config.long -%} + {%- set_global language_format = format_config.long -%} + {%- endif -%} + {%- endif -%} + {%- endfor -%} +{%- endif -%} + +{%- if language_format -%} + {{ date | date(format=language_format, locale=date_locale) }} +{%- elif config.extra.short_date_format and short -%} {{ date | date(format=config.extra.short_date_format, locale=date_locale) }} {%- elif config.extra.long_date_format and not short -%} {{ date | date(format=config.extra.long_date_format, locale=date_locale) }} diff --git a/templates/macros/list_posts.html b/templates/macros/list_posts.html index 1063cd5..2076194 100644 --- a/templates/macros/list_posts.html +++ b/templates/macros/list_posts.html @@ -1,48 +1,156 @@ -{% macro list_posts(posts, max, language_strings="", section_path="blog") %} +{# `metadata` can be "dates", "indexes" or both (e.g. "dates indexes" or "indexes dates"). #} +{# If both, the order doesn't matter and indexes will always be displayed before dates. #} +{# It would also work with arrays (e.g. ["dates"] or ["indexes"] or even ["indexes","dates"]). #} +{# Nevertheless, arrays cannot be used as a default value for a macro parameter in Tera (see https://github.com/Keats/tera/issues/710). #} +{# `paginator` is only used to compute indexes metadata and can be let empty otherwise. #} +{% macro list_posts(posts, all_posts="", max=999999, metadata="dates", language_strings="", section_path="", paginator="", pinned_first=false, current_page=1) %} + +{%- set separator = config.extra.separator | default(value="•") -%} + +{# Separate pinned and regular posts from all_posts if available, otherwise from posts #} +{% if pinned_first %} + {% set source_posts = all_posts | default(value=posts) %} + {% set pinned_posts = [] %} + {% set regular_posts = [] %} + {% for post in source_posts %} + {% if post.extra.pinned %} + {% set_global pinned_posts = pinned_posts | concat(with=post) %} + {% else %} + {% set_global regular_posts = regular_posts | concat(with=post) %} + {% endif %} + {% endfor %} + + {# On page 1 or when no pagination, show pinned then regular #} + {% if current_page == 1 %} + {% if paginator %} + {# With pagination: pinned + current page's posts #} + {% set display_posts = pinned_posts | concat(with=posts) %} + {% else %} + {# Without pagination: pinned + regular (no duplicates) #} + {% set display_posts = pinned_posts | concat(with=regular_posts) %} + {% endif %} + {% else %} + {% set display_posts = posts %} + {% endif %} +{% else %} + {% set display_posts = posts %} +{% endif %}
- {% for post in posts %} + {# Display posts #} + {% for post in display_posts %} {% if loop.index <= max %} - {% if loop.index == max %} -
- {% elif loop.last %} -
+ {% if loop.index == max or loop.last %} + {% set bottom_divider = false %} {% else %} -
+ {% set bottom_divider = true %} {% endif %} -
    - {% if post.date %} -
  • {{ macros_format_date::format_date(date=post.date, short=false, language_strings=language_strings) }}
  • - {% endif %} - {% if post.draft %} -
  • {{ macros_translate::translate(key="draft", default="DRAFT", language_strings=language_strings) }}
  • - {% endif %} -
-
-

- {{ post.title }} -

+
+
    + {%- if "indexes" in metadata -%} + {%- set post_index = loop.index -%} + {%- set number_of_posts = posts | length -%} + {# in case we have a pager, the index has been computed for the current page. #} + {%- if paginator -%} + {%- set number_of_posts = paginator.total_pages -%} + {%- set number_of_other_pages = paginator.current_index - 1 -%} + {%- set posts_per_page = paginator.paginate_by -%} + {%- set posts_in_other_pages = number_of_other_pages * posts_per_page -%} + {%- set post_index = posts_in_other_pages + post_index -%} + {%- endif -%} + {%- if macros_settings::evaluate_setting_priority(setting="post_listing_index_reversed", page=section, default_global_value=false) == "true" -%} + {# index starts at 1 instead of 0 #} + {%- set post_index = number_of_posts + 1 - post_index -%} + {%- endif -%} +
  • {{ post_index }}
  • + {%- endif -%} - {% if post.taxonomies.tags %} -
    - {% for tag in post.taxonomies.tags %} - {{ tag }} - {% endfor %} -
    - {% endif %} + {%- if "dates" in metadata -%} + {%- set allowed_post_listing_dates = ["date", "updated", "both"] -%} + {#- Calling the hierarchy macro here causes an error due to the "get parents" part of the macro. -#} + {#- This seems cleaner. -#} + {%- set post_listing_date = section.extra.post_listing_date | default(value=config.extra.post_listing_date) | default(value="date") -%} + {%- if post_listing_date not in allowed_post_listing_dates -%} + {{ throw(message="ERROR: Invalid value for config.extra.post_listing_date. Allowed values are 'date', 'updated', or 'both'.") }} + {%- endif -%} -
    - {% if post.description %} -

    {{ post.description }}

    - {% elif post.summary %} -

    {{ post.summary | striptags | trim_end_matches(pat=".") | safe }}…

    + {%- set show_date = post.date and post_listing_date == "date" or post.date and post_listing_date == "both" or post.date and post_listing_date == "updated" and not post.updated -%} + {%- set show_updated = post.updated and post_listing_date == "updated" or post.updated and post_listing_date == "both" -%} + + {%- if show_date or show_updated -%} + {%- if show_date -%} +
  • {{- macros_format_date::format_date(date=post.date, short=false, language_strings=language_strings) -}}
  • + {%- endif -%} + {%- if show_date and show_updated -%} +
  • {{- separator -}}
  • + {%- endif -%} + {%- if show_updated -%} + {%- set last_updated_str = macros_translate::translate(key="last_updated_on", default="Updated on $DATE", language_strings=language_strings) -%} + {%- set formatted_date = macros_format_date::format_date(date=post.updated, short=true, language_strings=language_strings) -%} + {%- set updated_str = last_updated_str | replace(from="$DATE", to=formatted_date) -%} +
  • {{ updated_str }}
  • + {%- endif -%} + {%- endif -%} + {%- endif -%} + + {% if post.extra.local_image or post.extra.remote_image %} +
  • + + {% if post.extra.local_image %} + {% set meta = get_image_metadata(path=post.extra.local_image, allow_missing=true) %} + {{ post.extra.local_image }} + {% elif post.extra.remote_image %} + {{ post.extra.remote_image }} + {% endif %} + +
  • {% endif %} + + {% if post.draft %} +
  • {{ macros_translate::translate(key="draft", default="DRAFT", language_strings=language_strings) }}
  • + {% endif %} +
+
+ +
+
+ {% if pinned_first and post.extra.pinned %} +
+ + {{ macros_translate::translate(key="pinned", default="Pinned", language_strings=language_strings) }} +
+ {% endif %} + +

+ {{ post.title }} +

+ + {% if post.taxonomies.tags %} +
+ {% for tag in post.taxonomies.tags %} + {{ tag }} + {% endfor %} +
+ {% endif %} + +
+ {% if post.description %} +

{{ post.description | markdown(inline=true) | safe }}

+ {% elif post.summary %} +

{{ post.summary | markdown(inline=true) | trim_end_matches(pat=".") | safe }}…

+ {% endif %} +
+ {{ macros_translate::translate(key="read_more", default="Read more", language_strings=language_strings) }} 
- {{ macros_translate::translate(key="read_more", default="Read more", language_strings=language_strings) }}  -
-
- {% endif %} +
+ {% endif %} {% if not loop.last %} {% if loop.index == max %}
@@ -52,5 +160,4 @@ {% endif %} {% endfor %}
- {% endmacro %} diff --git a/templates/macros/page_header.html b/templates/macros/page_header.html index 58a23dc..daa8d02 100644 --- a/templates/macros/page_header.html +++ b/templates/macros/page_header.html @@ -1,5 +1,18 @@ -{% macro page_header(title) %} +{% macro page_header(title, show_feed_icon=false) %} + +{% set rel_attributes = macros_rel_attributes::rel_attributes() | trim %} + + +{%- set blank_target = macros_target_attribute::target_attribute(new_tab=config.markdown.external_links_target_blank) -%} +

- {{ title }} + {{ title -}} + {% if show_feed_icon %} + {%- set feed_url = feed_utils::get_feed_url() -%} + + {% endif %}

+ {% endmacro page_header %} diff --git a/templates/macros/series_page.html b/templates/macros/series_page.html new file mode 100644 index 0000000..d5704a1 --- /dev/null +++ b/templates/macros/series_page.html @@ -0,0 +1,162 @@ +{# +Those macros deal with introduction and navigation for series pages. +Using macros have been prefered over partial inclusion or inline code to make sure series_ordered_pages is forced to be used. +A section's pages natural order is invalid in case of reversed pagination which would lead to invalid series' pages order. +To prevent this, pages are ordered correctly in a separate variable which must be used instead of the series section pages. +#} + +{# +Computes the introduction of a series's page. + +Parameters: + - `page`: The page object being part of the series. + - `series_section`: The series' section the page belongs to. + - `series_ordered_pages`: The series' pages properly ordered (see at the top of this file for an explanation). + - `language_strings`: A dictionary containing the translation strings. +#} +{% macro process_series_template(template_type, page, series_section, series_ordered_pages, language_strings) %} + {%- if "series" in series_section.extra and series_section.extra.series -%} + {# Prepare variables for substitution #} + {%- set series_title = series_section.title -%} + {%- set series_permalink = series_section.permalink -%} + {%- set series_html_link = '' ~ series_section.title ~ '' -%} + {# Build series pages list #} + {%- set series_pages_list = [] -%} + {%- for series_page in series_ordered_pages -%} + {%- if series_page.relative_path == page.relative_path -%} + {%- set series_pages_list_item = '
  • ' ~ series_page.title ~ '
  • ' -%} + {%- else -%} + {%- set series_pages_list_item = '
  • ' ~ series_page.title ~ '
  • ' -%} + {%- endif -%} + {%- set_global series_pages_list = series_pages_list | concat(with=series_pages_list_item) -%} + {%- endfor -%} + {%- set series_pages_list = series_pages_list | join(sep="") -%} + {%- if macros_settings::evaluate_setting_priority(setting="post_listing_index_reversed", page=series_section, default_global_value=false) == "true" -%} + {%- set series_pages_ordered_list = '
      ' ~ series_pages_list ~ '
    ' -%} + {%- else -%} + {%- set series_pages_ordered_list = '
      ' ~ series_pages_list ~ '
    ' -%} + {%- endif -%} + {%- set series_pages_unordered_list = '
      ' ~ series_pages_list ~ '
    ' -%} + + {# Get page position and navigation info #} + {%- set series_pages_number = 0 -%} + {%- set series_page_index = 0 -%} + {%- set first_page = series_ordered_pages | first -%} + {%- set is_found = false -%} + + {%- for series_page in series_ordered_pages -%} + {%- set_global series_pages_number = series_pages_number + 1 -%} + {%- if series_page.relative_path == page.relative_path -%} + {%- set_global series_page_index = series_pages_number -%} + {%- set_global is_found = true -%} + {%- else -%} + {%- if not is_found -%} + {%- set_global prev_page = series_page -%} + {%- elif not next_page is defined -%} + {%- set_global next_page = series_page -%} + {%- endif -%} + {%- endif -%} + {%- endfor -%} + + {# Determine template to use based on available navigation #} + {%- set position = "middle" -%} + {%- if prev_page is defined and not next_page is defined -%} + {%- set_global position = "prev_only" -%} + {%- elif next_page is defined and not prev_page is defined -%} + {%- set_global position = "next_only" -%} + {%- endif -%} + + {# Get template from config #} + {%- set templates_key = "series_" ~ template_type ~ "_templates" -%} + {%- set template = "" -%} + {%- if series_section.extra[templates_key] is defined -%} + {%- if series_section.extra[templates_key][position] is defined -%} + {%- set_global template = series_section.extra[templates_key][position] -%} + {%- elif series_section.extra[templates_key].default is defined -%} + {%- set_global template = series_section.extra[templates_key].default -%} + {%- endif -%} + {%- endif -%} + + {# Prepare navigation variables #} + {%- if prev_page is defined -%} + {%- set prev_title = prev_page.title -%} + {%- set prev_permalink = prev_page.permalink -%} + {%- set prev_html_link = '' ~ prev_page.title ~ '' -%} + {%- set prev_description = prev_page.description | default(value="") -%} + {%- endif -%} + {%- if next_page is defined -%} + {%- set next_title = next_page.title -%} + {%- set next_permalink = next_page.permalink -%} + {%- set next_html_link = '' ~ next_page.title ~ '' -%} + {%- set next_description = next_page.description | default(value="") -%} + {%- endif -%} + + {# Replace standard variables #} + {%- set template = template + | replace(from="$SERIES_TITLE", to=series_title) + | replace(from="$SERIES_PERMALINK", to=series_permalink) + | replace(from="$SERIES_HTML_LINK", to=series_html_link) + | replace(from="$FIRST_TITLE", to=first_page.title) + | replace(from="$FIRST_HTML_LINK", to='' ~ first_page.title ~ '') + | replace(from="$SERIES_PAGES_NUMBER", to=series_pages_number | as_str) + | replace(from="$SERIES_PAGE_INDEX", to=series_page_index | as_str) + | replace(from="$SERIES_PAGES_OLIST", to=series_pages_ordered_list) + | replace(from="$SERIES_PAGES_ULIST", to=series_pages_unordered_list) + -%} + + {# Replace navigation variables if they exist #} + {%- if prev_page is defined -%} + {%- set template = template + | replace(from="$PREV_TITLE", to=prev_title) + | replace(from="$PREV_PERMALINK", to=prev_permalink) + | replace(from="$PREV_HTML_LINK", to=prev_html_link) + | replace(from="$PREV_DESCRIPTION", to=prev_description) + -%} + {%- endif -%} + + {%- if next_page is defined -%} + {%- set template = template + | replace(from="$NEXT_TITLE", to=next_title) + | replace(from="$NEXT_PERMALINK", to=next_permalink) + | replace(from="$NEXT_HTML_LINK", to=next_html_link) + | replace(from="$NEXT_DESCRIPTION", to=next_description) + -%} + {%- endif -%} + + {# Custom placeholders #} + {%- if series_section.extra.series_template_placeholders is defined -%} + {%- set missing_vars = [] -%} + {%- for placeholder in series_section.extra.series_template_placeholders -%} + {%- if placeholder in template -%} + {%- set var_name = placeholder | replace(from="$", to="") | lower -%} + {%- if page.extra.series_template_variables is defined and page.extra.series_template_variables[var_name] is defined -%} + {%- set_global template = template | replace(from=placeholder, to=page.extra.series_template_variables[var_name]) -%} + {%- else -%} + {%- set_global missing_vars = missing_vars | concat(with=var_name) -%} + {%- endif -%} + {%- endif -%} + {%- endfor -%} + {%- if missing_vars | length > 0 -%} + {%- set missing_vars_str = missing_vars | join(sep=", ") -%} + {{ throw(message="ERROR: The following variables are included in this page's series templates (`series_template_placeholders`) but have not been set in the `series_template_variables` of this page: " ~ missing_vars_str) }} + {%- endif -%} + {%- endif -%} + + {# Output the processed template if not empty #} + {%- if template | length > 0 -%} +
    + {{ template | markdown | safe }} +
    + {%- endif -%} + {%- endif -%} +{% endmacro %} + +{# Macro for series introduction #} +{% macro get_introduction(page, series_section, series_ordered_pages, language_strings) %} + {{ macros_series_page::process_series_template(template_type="intro", page=page, series_section=series_section, series_ordered_pages=series_ordered_pages, language_strings=language_strings) }} +{% endmacro %} + +{# Macro for series outro #} +{% macro get_outro(page, series_section, series_ordered_pages, language_strings) %} + {{ macros_series_page::process_series_template(template_type="outro", page=page, series_section=series_section, series_ordered_pages=series_ordered_pages, language_strings=language_strings) }} +{% endmacro %} diff --git a/templates/macros/settings.html b/templates/macros/settings.html index b00c7e4..d237d7a 100644 --- a/templates/macros/settings.html +++ b/templates/macros/settings.html @@ -14,9 +14,38 @@ Parameters: {%- if section -%} {%- set current_section = section -%} {%- elif page -%} + {%- set current_section = "" -%} {#- Retrieve last ancestor to determine current section, if applicable -#} - {%- set last_ancestor = page.ancestors | slice(start=-1) %} - {%- set current_section = get_section(path=last_ancestor.0, metadata_only=true) %} + {%- if page.ancestors | length > 0 -%} + {%- set last_ancestor = page.ancestors | slice(start=-1) -%} + {%- set_global current_section = get_section(path=last_ancestor.0, metadata_only=true) -%} + {%- else -%} + {#- We're likely in a nested page. Try to find the parent page or nearest section. -#} + {%- set components = page.components -%} + {%- for i in range(start=1, end=components | length) -%} + {%- if lang == config.default_language -%} + {%- set potential_path = components | slice(end=components | length - i) | join(sep="/") -%} + {%- set potential_page = potential_path ~ "/index.md" -%} + {%- set potential_section = potential_path ~ "/_index.md" -%} + {%- else -%} + {%- set potential_path = components | slice(start=1, end=components | length - i) | join(sep="/") -%} + {%- set potential_page = potential_path ~ "/index." ~ lang ~ ".md" -%} + {%- set potential_section = potential_path ~ "/_index." ~ lang ~ ".md" -%} + {%- endif -%} + {#- Check for parent page first. -#} + {%- set page_data = load_data(path=potential_page, required=false) -%} + {%- if page_data -%} + {%- set_global current_section = get_page(path=potential_page) -%} + {%- break -%} + {%- endif -%} + {#- No parent page, check for section. -#} + {%- set section_data = load_data(path=potential_section, required=false) -%} + {%- if section_data -%} + {%- set_global current_section = get_section(path=potential_section, metadata_only=true) -%} + {%- break -%} + {%- endif -%} + {%- endfor -%} + {%- endif -%} {%- endif -%} {%- set priority_order = [ diff --git a/templates/macros/target_attribute.html b/templates/macros/target_attribute.html new file mode 100644 index 0000000..2da5b9d --- /dev/null +++ b/templates/macros/target_attribute.html @@ -0,0 +1,11 @@ +{% macro target_attribute(new_tab) %} + +{%- set blank_target = "" -%} + +{%- if new_tab -%} + {%- set blank_target = "target=_blank" -%} +{%- endif -%} + +{{ blank_target }} + +{% endmacro target_attribute %} diff --git a/templates/page.html b/templates/page.html index eed6f52..0dff1a7 100644 --- a/templates/page.html +++ b/templates/page.html @@ -5,63 +5,111 @@ {%- set rel_attributes = macros_rel_attributes::rel_attributes() | trim -%} -{%- if config.markdown.external_links_target_blank -%} - {%- set blank_target = "target=_blank" -%} -{%- else -%} - {%- set blank_target = "" -%} -{%- endif -%} +{%- set blank_target = macros_target_attribute::target_attribute(new_tab=config.markdown.external_links_target_blank) -%} {# Debugging #} -{# {% set last_ancestor = page.ancestors | slice(start=-1) %} -{% set current_section = get_section(path=last_ancestor.0) %} +{#
    +    Page path: {{ page.path }}
    +    Page components: {{ page.components | join(sep=", ") }}
    +    Page ancestors: {{ page.ancestors | join(sep=", ") }}
    +    Current language: {{ lang }}
    +    Default language: {{ config.default_language }}
    +    Current section: {% if current_section %}{{ current_section.path }}{% else %}None{% endif %}
    +    Page extra: {{ page.extra | json_encode() }}
    +    {% if section -%}
    +        {%- set current_section = section -%}
    +    {%- elif page -%}
    +        {%- set current_section = "" -%}
    +        {%- if page.ancestors | length > 0 -%}
    +            {%- set last_ancestor = page.ancestors | slice(start=-1) -%}
    +            {%- set_global current_section = get_section(path=last_ancestor.0, metadata_only=true) -%}
    +        {%- else -%}
    +            {%- set components = page.components -%}
    +            {%- for i in range(start=1, end=components | length) -%}
    +                {%- if lang == config.default_language -%}
    +                    {%- set potential_path = components | slice(end=components | length - i) | join(sep="/") -%}
    +                    {%- set potential_page = potential_path ~ "/index.md" -%}
    +                    {%- set potential_section = potential_path ~ "/_index.md" -%}
    +                {%- else -%}
    +                    {%- set potential_path = components | slice(start=1, end=components | length - i) | join(sep="/") -%}
    +                    {%- set potential_page = potential_path ~ "/index." ~ lang ~ ".md" -%}
    +                    {%- set potential_section = potential_path ~ "/_index." ~ lang ~ ".md" -%}
    +                {%- endif -%}
    +                Checking parent page: {{ potential_page }}
    +                {%- set page_data = load_data(path=potential_page, required=false) -%}
    +                {%- if page_data -%}
    +                    {%- set_global current_section = get_page(path=potential_page) %}
    +    Parent page found: {{ current_section.path }}
    +                    {%- break -%}
    +                {%- endif -%}
    +                Checking section: {{ potential_section }}
    +                {%- set section_data = load_data(path=potential_section, required=false) -%}
    +                {%- if section_data -%}
    +                    {%- set_global current_section = get_section(path=potential_section, metadata_only=true) -%}
    +                    Section found: {{ current_section.path }}
    +                    {%- break -%}
    +                {%- endif -%}
    +            {%- endfor -%}
    +        {%- endif -%}
    +    {%- endif %}
    +Found nearest parent/section: {% if current_section %}{{ current_section.path }}{% else %}None{% endif %}
    +Current section extra: {% if current_section %}{{ current_section.extra | json_encode() }}{% else %}None{% endif %}
    +
    -{% set settings_to_test = [ - "footnote_backlinks", - "add_src_to_code_block", - "copy_button", - "katex", - "quick_navigation_buttons", - "show_reading_time", - "show_date", - "show_author", - "show_remote_changes", - "toc", - "show_previous_next_article_links", - "invert_previous_next_article_links", - "previous_next_article_links_full_width", - "enable_csp", -] %} + {% set settings_to_test = [ + "iine", + "iine_icon", + "enable_cards_tag_filtering", + "footnote_backlinks", + "add_src_to_code_block", + "force_codeblock_ltr", + "copy_button", + "katex", + "quick_navigation_buttons", + "show_reading_time", + "show_date", + "show_author", + "show_remote_changes", + "toc", + "show_previous_next_article_links", + "invert_previous_next_article_links", + "previous_next_article_links_full_width", + "enable_csp", + ] %} - - - - - - - - - - - - {% for setting in settings_to_test %} +
    settingpagesectionconfigmacro output
    + - - - - - + + + + + - {% endfor %} - -
    {{ setting }}{{ page.extra[setting] | default(value="⬛") }}{{ current_section.extra[setting] | default(value="⬛") }}{{ config.extra[setting] | default(value="⬛") }}{{ macros_settings::evaluate_setting_priority(setting=setting, page=page) }}settingpagesectionconfigmacro output
    #} + + + {% for setting in settings_to_test %} + + {{ setting }} + {{ page.extra[setting] | default(value="⬛") }} + {{ current_section.extra[setting] | default(value="⬛") }} + {{ config.extra[setting] | default(value="⬛") }} + {{ macros_settings::evaluate_setting_priority(setting=setting, page=page) }} + + {% endfor %} + + +
    #} + {# {{ __tera_context }} #} {# End debugging #}
    -
    -

    - {{ page.title }} +
    +

    + {{ page.title | markdown(inline=true) | safe }}

    +
      {#- Draft indicator -#} @@ -69,8 +117,8 @@
    • {{ macros_translate::translate(key="draft", default="DRAFT", language_strings=language_strings) }}
    • {% endif %} - {#- Author(s) -#} - {% if page.authors or config.author and macros_settings::evaluate_setting_priority(setting="show_author", page=page, default_global_value=false) == "true" %} + {#- Author(s) -#} + {%- if page.authors or config.author and macros_settings::evaluate_setting_priority(setting="show_author", page=page, default_global_value=false) == "true" -%} {%- if page.authors -%} {%- set author_list = page.authors -%} {%- else -%} @@ -78,39 +126,48 @@ {%- endif -%} {%- if author_list | length == 1 -%} - {%- set author_string = author_list.0 -%} + {%- set author_string = '' ~ author_list.0 ~ '' -%} {%- else -%} {%- set last_author = author_list | last -%} {%- set other_authors = author_list | slice(end=-1) -%} {%- set author_separator = macros_translate::translate(key="author_separator", default=", ", language_strings=language_strings) -%} + {%- set author_separator = '' ~ author_separator ~ '' -%} {%- set conjunction = macros_translate::translate(key="author_conjunction", default=" and ", language_strings=language_strings) -%} + {%- set conjunction = '' ~ conjunction ~ '' -%} {%- set author_string = other_authors | join(sep=author_separator) -%} {%- set author_string = author_string ~ conjunction ~ last_author -%} + {%- set author_string = '' ~ author_string ~ '' -%} {%- endif -%} {%- set by_author = macros_translate::translate(key="by_author", default="By $AUTHOR", language_strings=language_strings) -%} -
    • {{ by_author | replace(from="$AUTHOR", to=author_string) }}
    • +
    • {{ by_author | replace(from="$AUTHOR", to=author_string) | safe }}
    • {%- set previous_visible = true -%} - {% endif %} + {%- endif -%} + + {%- if config.extra.hcard and config.extra.hcard.enable and ( not author_list or author_list is containing(config.author)) -%} + {% include "partials/hcard_small.html" %} + {%- endif -%} + + {%- set separator_with_class = ""-%} {#- Date -#} - {% if page.date and macros_settings::evaluate_setting_priority(setting="show_date", page=page, default_global_value=true) == "true" %} - {%- if previous_visible -%} {{ separator }} {%- endif -%}
    • {{ macros_format_date::format_date(date=page.date, short=true, language_strings=language_strings) }}
    • + {%- if page.date and macros_settings::evaluate_setting_priority(setting="show_date", page=page, default_global_value=true) == "true" -%} +
    • {#- Variable to keep track of whether we've shown a section, to avoid separators as the first element -#} {%- set previous_visible = true -%} - {% endif %} + {%- endif -%} {#- Reading time -#} - {% if macros_settings::evaluate_setting_priority(setting="show_reading_time", page=page, default_global_value=true) == "true" %} - {%- if previous_visible -%} {{ separator }} {%- endif -%}
    • {{ macros_translate::translate(key="min_read", number=page.reading_time, default="$NUMBER min read", language_strings=language_strings) }}
    • + {%- if macros_settings::evaluate_setting_priority(setting="show_reading_time", page=page, default_global_value=true) == "true" -%} +
    • {%- if previous_visible -%}{{ separator_with_class | safe }}{%- endif -%}{{ macros_translate::translate(key="min_read", number=page.reading_time, default="$NUMBER min read", language_strings=language_strings) }}
    • {%- set previous_visible = true -%} - {% endif %} + {%- endif -%} {#- Tags -#} {%- if page.taxonomies and page.taxonomies.tags -%} - {%- if previous_visible -%} {{ separator }} {%- endif -%}
    • {{- macros_translate::translate(key="tags", default="tags", language_strings=language_strings) | capitalize -}}: 
    • +
    • {%- if previous_visible -%}{{ separator_with_class | safe }}{%- endif -%}{{- macros_translate::translate(key="tags", default="tags", language_strings=language_strings) | capitalize -}}: 
    • {%- for tag in page.taxonomies.tags -%} -
    • {{ tag }} +
    • {{ tag }} {%- if not loop.last -%} ,  {%- endif -%} @@ -121,53 +178,108 @@ {#- Last updated on -#} {% if page.updated %} -
    • {{ macros_translate::translate(key="last_updated_on", default="Last updated on", language_strings=language_strings) }} {{ macros_format_date::format_date(date=page.updated, short=true, language_strings=language_strings) }}
    • - {# Show link to remote changes if enabled #} - {% if config.extra.remote_repository_url and macros_settings::evaluate_setting_priority(setting="show_remote_changes", page=page, default_global_value=true) == "true" %} - {%- if previous_visible -%}{{ separator }} {%- endif -%} -
    • {{ macros_translate::translate(key="see_changes", default="See changes", language_strings=language_strings) }} 
    • - {% endif %} + {%- set last_updated_str = macros_translate::translate(key="last_updated_on", default="Updated on $DATE", language_strings=language_strings) -%} + {%- set formatted_date = macros_format_date::format_date(date=page.updated, short=true, language_strings=language_strings) -%} + {%- set updated_str = last_updated_str | replace(from="$DATE", to=formatted_date) -%} + {%- set previous_visible = true -%} +
    + {#- A page is part of a series if one of the sections above (whether it is transparent or not) has the `extra.series` parameter set to true. -#} + {#- As a series might be a transparent section in order to mix up its articles with those of the section just above or the root, -#} + {#- there is no other way but to compute the potential path of each ancestor section related to the page and look for the first one being a series. -#} + {#- Using the `ancestors` field of a section is not possible because transparent sections are not present in this field. -#} + {%- set series_path_components = [] -%} + {%- set section_paths = [] -%} + {%- for path in page.relative_path | split(pat="/") | slice(end=-1) -%} + {%- set_global series_path_components = series_path_components | concat(with=path) -%} + {%- set section_path = series_path_components | concat(with="_index.md") | join(sep="/") -%} + {%- set_global section_paths = section_paths | concat(with=section_path) -%} + {%- endfor -%} + {#- The series the page is part of is the closest section flagged as a series, if any -#} + {%- for section_path in section_paths | reverse -%} + {%- set section_file_exists = load_data(path=section_path, required=false) -%} + {%- if section_file_exists -%} + {%- set loaded_section = get_section(path=section_path,lang=lang) -%} + {%- if "series" in loaded_section.extra and loaded_section.extra.series -%} + {%- set_global series_section = loaded_section -%} + {%- set_global series_ordered_pages = loaded_section.pages -%} + {%- if loaded_section.paginated | default(value=0) > 0 and loaded_section.paginate_reversed -%} + {%- set_global series_ordered_pages = loaded_section.pages | reverse -%} + {%- endif -%} + {%- break -%} + {%- endif -%} + {%- endif -%} + {%- endfor -%} + {% if page.extra.tldr %} -
    -

    TL;DR:

    -

    {{ page.extra.tldr }}

    +
    +
    +
    + + TL;DR + +

    {{ page.extra.tldr | markdown | safe }}

    +
    {% endif %} - {# Optional table of contents below the header #} + {#- Optional table of contents below the header -#} {% if page.toc and macros_settings::evaluate_setting_priority(setting="toc", page=page, default_global_value=false) == "true" %} {{ macros_toc::toc(page=page, header=true, language_strings=language_strings) }} {% endif %} -
    - {# The replace pattern is used to enable arbitrary locations for the Table of Contents #} - {# This is Philipp Oppermann's workaround: https://github.com/getzola/zola/issues/584#issuecomment-474329637 #} - {{ page.content | replace(from="", to=macros_toc::toc(page=page, header=false, language_strings=language_strings)) | safe }} + {#- Optional Summary paragraph for readers -#} + {% if page.description %} + + {%- endif -%} + + +
    + {#- Replace series_intro placeholder -#} + {%- set content_with_intro = page.content -%} + {%- if "" in page.content -%} + {%- set series_intro_html = macros_series_page::get_introduction(page=page, series_section=series_section, series_ordered_pages=series_ordered_pages, language_strings=language_strings) -%} + {%- set content_with_intro = content_with_intro | replace(from="", to=series_intro_html) -%} + {%- elif series_section -%} + {%- set series_intro_html = macros_series_page::get_introduction(page=page, series_section=series_section, series_ordered_pages=series_ordered_pages, language_strings=language_strings) -%} + {%- set content_with_intro = series_intro_html ~ content_with_intro -%} + {%- endif -%} + + {#- Handle series_outro placeholder -#} + {%- set processed_content = content_with_intro -%} + {%- if "" in content_with_intro -%} + {%- set series_outro_html = macros_series_page::get_outro(page=page, series_section=series_section, series_ordered_pages=series_ordered_pages, language_strings=language_strings) -%} + {%- set processed_content = processed_content | replace(from="", to=series_outro_html) -%} + {%- elif series_section -%} + {%- set series_outro_html = macros_series_page::get_outro(page=page, series_section=series_section, series_ordered_pages=series_ordered_pages, language_strings=language_strings) -%} + {#- We want the outro at the end of the article, but before footnote definitions -#} + {%- set footnotes_marker = '
      ' -%} + {%- if footnotes_marker in content_with_intro -%} + {%- set content_sections = processed_content | split(pat=footnotes_marker) -%} + {%- set main_content = content_sections | first -%} + {%- set footnotes_content = content_sections | slice(start=1) | join(sep=footnotes_marker) -%} + {%- set processed_content = main_content ~ series_outro_html ~ footnotes_marker ~ footnotes_content -%} + {%- else -%} + {%- set processed_content = processed_content ~ series_outro_html -%} + {%- endif -%} + {%- endif -%} + + {#- Replace TOC and render final content -#} + {#- The replace pattern is used to enable arbitrary locations for the Table of Contents -#} + {#- This is Philipp Oppermann's workaround: https://github.com/getzola/zola/issues/584#issuecomment-474329637 -#} + {{ processed_content | replace(from="", to=macros_toc::toc(page=page, header=false, language_strings=language_strings)) | safe }}
    - {# Check if comments are enabled, checking that they are not disabled on the specific page #} - {% set systems = ["giscus", "utterances", "hyvortalk", "isso"] %} - {% set enabled_systems = 0 %} - {% set comment_system = "" %} - - {% for system in systems %} - {% set global_enabled = config.extra[system].enabled_for_all_posts | default(value=false) %} - {% set page_enabled = page.extra[system] | default(value=global_enabled) %} - {% set is_enabled = global_enabled and page_enabled != false or page_enabled == true %} - - {% if is_enabled %} - {% set_global comment_system = system %} - {% set_global enabled_systems = enabled_systems + 1 %} - {% endif %} - {% endfor %} - - {# Ensure only one comment system is enabled #} - {% if enabled_systems > 1 %} - {{ throw(message="ERROR: Multiple comment systems have been enabled for the same page. Check your config.toml and individual page settings to ensure only one comment system is activated at a time.") }} - {% endif %} + {#- iine button -#} + {%- if macros_settings::evaluate_setting_priority(setting="iine", page=page, default_global_value=false) == "true" -%} + {% include "partials/iine_button.html" %} + {%- endif -%} {% if macros_settings::evaluate_setting_priority(setting="show_previous_next_article_links", page=page, default_global_value=true) == "true" %} {%- if page.lower or page.higher -%} @@ -203,24 +315,51 @@
    {%- if left_link and left_label and left_title -%}  {{ left_label }} - + {%- endif -%}
    {%- if right_link and right_label and right_title -%} {{ right_label }}  - + {%- endif -%}
    {%- endif -%} {%- endif -%} - {# Comments #} + {#- Comments -#} + {#- Check if comments are enabled, checking that they are not disabled on the specific page -#} + {% set systems = ["giscus", "utterances", "hyvortalk", "isso"] %} + {% set enabled_systems = 0 %} + {% set comment_system = "" %} + + {% for system in systems %} + {% set global_enabled = config.extra[system].enabled_for_all_posts | default(value=false) %} + {% set page_enabled = page.extra[system] | default(value=global_enabled) %} + {% set is_enabled = global_enabled and page_enabled != false or page_enabled == true %} + + {% if is_enabled %} + {% set_global comment_system = system %} + {% set_global enabled_systems = enabled_systems + 1 %} + {% endif %} + {% endfor %} + {#- Ensure only one comment system is enabled -#} + {% if enabled_systems > 1 %} + {{ throw(message="ERROR: Multiple comment systems have been enabled for the same page. Check your config.toml and individual page settings to ensure only one comment system is activated at a time.") }} + {% endif %} {% if comment_system %} {% include "partials/comments.html" %} {% endif %} + {#- Webmentions -#} + {%- set global_webmentions_enabled = config.extra.webmentions.enable | default(value=false) -%} + {%- set page_webmentions_enabled = page.extra.webmentions | default(value=global_webmentions_enabled) -%} + {%- set webmentions_enabled = global_webmentions_enabled and page_webmentions_enabled != false or page_webmentions_enabled == true -%} + {%- if webmentions_enabled -%} + {%- include "partials/webmentions.html" -%} + {%- endif -%} +

    diff --git a/templates/partials/analytics.html b/templates/partials/analytics.html index 398287e..6a5d30e 100644 --- a/templates/partials/analytics.html +++ b/templates/partials/analytics.html @@ -20,12 +20,12 @@ {% elif analytics_service == "plausible" %} diff --git a/templates/partials/cards_pages.html b/templates/partials/cards_pages.html index b6045cb..89bdabc 100644 --- a/templates/partials/cards_pages.html +++ b/templates/partials/cards_pages.html @@ -7,32 +7,38 @@ {% break %} {% endif %} {# Determine which URL to use, default is page.permalink #} - {%- if page.extra.link_to and config.markdown.external_links_target_blank -%} - {%- set blank_target = "target=_blank" -%} - {%- else -%} - {%- set blank_target = "" -%} - {%- endif -%} + {%- set blank_target = macros_target_attribute::target_attribute(new_tab=config.markdown.external_links_target_blank and page.extra.link_to) -%} {% set target_url = page.extra.link_to | default(value=page.permalink) %} - -
    - {% if page.extra.local_image %} - {% set meta = get_image_metadata(path=page.extra.local_image, allow_missing=true) %} - {{ page.extra.local_image }} - {% elif page.extra.remote_image %} - {{ page.extra.remote_image }} - {% else %} -
    - {% endif %} +
    + {% if page.extra.local_image %} + {% set meta = get_image_metadata(path=page.extra.local_image, allow_missing=true) %} + {{ page.extra.local_image }} + {% elif page.extra.remote_image %} + {{ page.extra.remote_image }} + {% else %} +
    + {% endif %} -
    -

    {{ page.title }}

    -
    - {% if page.description %} - {{ page.description }} - {% endif %} -
    +
    +

    {{ page.title | markdown(inline=true) | safe }}

    +
    + {% if page.description %} + {{ page.description | markdown(inline=true) | safe }} + {% endif %}
    diff --git a/templates/partials/content_security_policy.html b/templates/partials/content_security_policy.html index 08b4f5d..e8fa062 100644 --- a/templates/partials/content_security_policy.html +++ b/templates/partials/content_security_policy.html @@ -7,6 +7,13 @@ content="default-src 'self' {%- set giscus_enabled = config.extra.giscus.enabled_for_all_posts or page.extra.giscus -%} {%- set hyvortalk_enabled = config.extra.hyvortalk.enabled_for_all_posts or page.extra.hyvortalk -%} {%- set isso_enabled = config.extra.isso.enabled_for_all_posts or page.extra.isso -%} + {%- if page -%} + {%- set iine_enabled = macros_settings::evaluate_setting_priority(setting="iine", page=page, default_global_value=false) == "true" -%} + {%- endif -%} + {%- if page -%} + {%- set mermaid_enabled = macros_settings::evaluate_setting_priority(setting="mermaid", page=page, default_global_value=false) == "true" -%} + {%- endif -%} + {%- set serve_local_mermaid = config.extra.serve_local_mermaid | default(value=true) -%} {#- Initialise a base script-src directive -#} {%- set script_src = "script-src 'self'" -%} @@ -23,10 +30,10 @@ content="default-src 'self' {%- if config.extra.analytics.service -%} {%- if config.extra.analytics.service == "goatcounter" -%} {%- set script_src = script_src ~ " gc.zgo.at" -%} - {%- set connect_src = connect_src ~ " gc.zgo.at" -%} + {%- set connect_src = connect_src ~ " " ~ config.extra.analytics.id ~ ".goatcounter.com/count" -%} {%- elif config.extra.analytics.service == "umami" -%} - {%- set script_src = script_src ~ " analytics.eu.umami.is" -%} - {%- set connect_src = connect_src ~ " *.umami.dev" ~ " analytics.eu.umami.is" -%} + {%- set script_src = script_src ~ " cloud.umami.is" -%} + {%- set connect_src = connect_src ~ " *.umami.dev" ~ " cloud.umami.is" -%} {%- elif config.extra.analytics.service == "plausible" -%} {%- set script_src = script_src ~ " plausible.io" -%} {%- set connect_src = connect_src ~ " plausible.io" -%} @@ -46,6 +53,20 @@ content="default-src 'self' {%- set script_src = script_src ~ " " ~ " utteranc.es" -%} {%- endif -%} + {%- if (mermaid_enabled and not serve_local_mermaid) or iine_enabled -%} + {%- set script_src = script_src ~ " " ~ " cdn.jsdelivr.net" -%} + {%- endif -%} + + {#- Check if a webmention system is enabled to allow the necessary domains and directives -#} + {%- if config.extra.webmentions.enable -%} + {%- set connect_src = connect_src ~ " webmention.io" -%} + {%- endif -%} + + {#- Check if iine like buttons are enabled to allow the necessary domains -#} + {%- if iine_enabled -%} + {%- set connect_src = connect_src ~ " vhiweeypifbwacashxjz.supabase.co" -%} + {%- endif -%} + {#- Append WebSocket for Zola serve mode -#} {%- if config.mode == "serve" -%} {%- set connect_src = connect_src ~ " ws:" -%} @@ -53,22 +74,27 @@ content="default-src 'self' {%- for domain in config.extra.allowed_domains -%} {%- if domain.directive == "connect-src" -%} - {%- set configured_connect_src = domain.domains | join(sep=' ') -%} + {%- set configured_connect_src = domain.domains | join(sep=' ') | safe -%} {%- set_global connect_src = connect_src ~ " " ~ configured_connect_src -%} {%- continue -%} {%- endif -%} {%- if domain.directive == "script-src" -%} - {%- set configured_script_src = domain.domains | join(sep=' ') -%} + {%- set configured_script_src = domain.domains | join(sep=' ') | safe -%} {%- set_global script_src = script_src ~ " " ~ configured_script_src -%} {%- continue -%} {%- endif -%} {#- Handle directives that are not connect-src -#} - {{ domain.directive }} {{ domain.domains | join(sep=' ') -}} + {{ domain.directive }} {{ domain.domains | join(sep=' ') | safe -}} - {%- if utterances_enabled or hyvortalk_enabled -%} - {%- if domain.directive == "style-src" %} 'unsafe-inline' + {%- if domain.directive == "style-src" -%} + {%- if utterances_enabled or hyvortalk_enabled or mermaid_enabled %} 'unsafe-inline' + {%- endif -%} + {%- endif -%} + + {%- if domain.directive == "font-src" -%} + {%- if mermaid_enabled %} 'self' {%- endif -%} {%- endif -%} diff --git a/templates/partials/extra_features.html b/templates/partials/extra_features.html index e0671e4..50c3337 100644 --- a/templates/partials/extra_features.html +++ b/templates/partials/extra_features.html @@ -1,8 +1,14 @@ +{%- set page_or_section = page | default(value=section) -%} + +{# prepare parameters for evaluate_setting_priority macro #} +{%- set page_s = page | default(value="") -%} +{%- set section_s = section | default(value="") -%} + {# Quick navigation buttons #} -{% if macros_settings::evaluate_setting_priority(setting="quick_navigation_buttons", page=page, default_global_value=false) == "true" %} +{% if macros_settings::evaluate_setting_priority(setting="quick_navigation_buttons", page=page_s, section=section_s, default_global_value=false) == "true" %}
    {# Button to go show a floating Table of Contents #} - {% if page.toc %} + {% if page_or_section.toc %}
    @@ -10,14 +16,21 @@
    - {{ macros_toc::toc(page=page, header=false, language_strings=language_strings) }} + {{ macros_toc::toc(page=page_or_section, header=false, language_strings=language_strings) }}
    {% endif %} - {# Button to go to the comment section #} - {% if comment_system %} - + {# Button to go to the comment/webmentions section #} + {% if comment_system or config.extra.webmentions.enable %} + {%- if comment_system -%} + {#- Comments are shown above webmentions -#} + {%- set comments_id = "comments" -%} + {%- else -%} + {%- set comments_id = "webmentions" -%} + {%- endif -%} + + {% endif %} @@ -30,13 +43,22 @@ {% endif %} {# Add KaTeX functionality #} -{%- if macros_settings::evaluate_setting_priority(setting="katex", page=page, default_global_value=false) == "true" -%} +{%- if macros_settings::evaluate_setting_priority(setting="katex", page=page_s, section=section_s, default_global_value=false) == "true" -%} {%- endif -%} +{# Load mermaid.js #} +{%- if macros_settings::evaluate_setting_priority(setting="mermaid", page=page_s, section=section_s, default_global_value=false) == "true" -%} + {%- if config.extra.serve_local_mermaid | default(value=true) -%} + + {%- else -%} + + {%- endif -%} +{%- endif -%} + {# Add copy button to code blocks #} -{%- if macros_settings::evaluate_setting_priority(setting="copy_button", page=page, default_global_value=true) == "true" -%} +{%- if macros_settings::evaluate_setting_priority(setting="copy_button", page=page_s, section=section_s, default_global_value=true) == "true" -%} {#- Add hidden HTML elements with the translated strings for the button's interactions -#}
    - {% if paginator %} + {% if paginator and paginator.pages | length > 0 %} {%- include "partials/paginate.html" -%} {% endif %} {%- endif -%} diff --git a/templates/partials/nav.html b/templates/partials/nav.html index 591089c..de55151 100644 --- a/templates/partials/nav.html +++ b/templates/partials/nav.html @@ -1,7 +1,7 @@
    {% endif %} diff --git a/templates/partials/paginate.html b/templates/partials/paginate.html index 1833dca..6502af7 100644 --- a/templates/partials/paginate.html +++ b/templates/partials/paginate.html @@ -1,4 +1,4 @@ -{% if paginator %} +{% if paginator and paginator.number_pagers > 1 %}
      {% if paginator.previous %}
    • diff --git a/templates/partials/social_media_images.html b/templates/partials/social_media_images.html new file mode 100644 index 0000000..d6bbcc7 --- /dev/null +++ b/templates/partials/social_media_images.html @@ -0,0 +1,50 @@ +{%- set social_media_card = macros_settings::evaluate_setting_priority(setting="social_media_card", page=page | default(value=""), section=section | default(value=""), default_global_value="") -%} +{% if social_media_card %} + {# Get base path from page/section #} + {% set base_path = "" %} + {% if section and section.path %} + {% set base_path = section.path | trim_end_matches(pat="/_index.md") %} + {% if base_path and not social_media_card is starting_with("/") %} + {% set base_path = base_path ~ "/" %} + {% endif %} + {% else %} + {% set base_path = page.colocated_path | default(value="") %} + {% endif %} + + {% set current_path = base_path ~ social_media_card | trim_start_matches(pat="/") %} + + {# Try parent path by removing the last directory component #} + {% set parent_path = base_path | split(pat="/") | slice(end=-2) | join(sep="/") %} + {% if parent_path and not social_media_card is starting_with("/") %} + {% set parent_path = parent_path ~ "/" %} + {% endif %} + {% set parent_relative_path = parent_path ~ social_media_card | trim_start_matches(pat="/") %} + + {# Check all possible locations #} + {%- set current_meta = get_image_metadata(path=current_path, allow_missing=true) -%} + {%- set parent_meta = get_image_metadata(path=parent_relative_path, allow_missing=true) -%} + {%- set absolute_meta = get_image_metadata(path=social_media_card, allow_missing=true) -%} + + {% if current_meta %} + {% set final_path = current_path %} + {% set meta = current_meta %} + {% elif parent_meta %} + {% set final_path = parent_relative_path %} + {% set meta = parent_meta %} + {% elif absolute_meta %} + {% set final_path = social_media_card %} + {% set meta = absolute_meta %} + {% else %} + {{ throw(message="Could not find social media card image. Tried: + 1. Current page path: '" ~ current_path ~ "' + 2. Parent page path: '" ~ parent_relative_path ~ "' + 3. Absolute path: '" ~ social_media_card ~ "' + Please ensure the file exists at one of these locations.") }} + {% endif %} + + + + + + +{% endif %} diff --git a/templates/partials/theme_switcher.html b/templates/partials/theme_switcher.html index cb4c93b..2e30f90 100644 --- a/templates/partials/theme_switcher.html +++ b/templates/partials/theme_switcher.html @@ -21,7 +21,7 @@