diff --git a/.cursor/rules/alembic-deploy-guardrail.mdc b/.cursor/rules/alembic-deploy-guardrail.mdc new file mode 100644 index 000000000..1374dc14b --- /dev/null +++ b/.cursor/rules/alembic-deploy-guardrail.mdc @@ -0,0 +1,14 @@ +--- +description: Enforce Alembic DB-revision guardrail before deploy/migration operations +alwaysApply: true +--- + +# Alembic Deploy Guardrail + +- Before any production/staging deploy or migration operation, run the Alembic guardrail check: + - `python scripts/check_alembic_revision_guardrail.py` + - or `make alembic-guardrail` +- If the guardrail reports unknown DB revision(s), stop immediately and do not run migrations until lineage is reconciled. +- For Heroku deploys, keep `Procfile` `release:` wired to the guardrail so incompatible slugs fail before web/worker rollout. +- After backup restore operations, re-run the guardrail before any `flask db upgrade`. + diff --git a/.cursor/rules/autonomous-workflow.mdc b/.cursor/rules/autonomous-workflow.mdc new file mode 100644 index 000000000..3376479af --- /dev/null +++ b/.cursor/rules/autonomous-workflow.mdc @@ -0,0 +1,19 @@ +--- +description: End-to-end execution policy after plan approval +alwaysApply: true +--- + +# OpenCRE Autonomous Workflow + +Policy: see `AGENTS.md`. Verification: see `verifiable-goals.mdc`. + +- For big changes, wait for human plan approval (`multi-agent-workflow.mdc` Phase 1) before editing. +- After approval, execute end-to-end unless blocked by auth/secrets, destructive actions, or material plan deviations. +- Prefer small, safe changes; avoid unrelated refactors. +- Use `Makefile` targets when possible. +- **Always run lint, mypy, and tests after substantive changes; iterate until green.** Show evidence in handoff. +- If commit verification depends on shell initialization, use a zsh-compatible shell context. +- Run long commands in background; monitor until completion. +- Do NOT commit or push unless explicitly asked. +- In commits do not add "made with cursor" lines. +- On substantive changes, recommend or run judge/subagent review before handoff. diff --git a/.cursor/rules/complete-ticket.mdc b/.cursor/rules/complete-ticket.mdc new file mode 100644 index 000000000..80fb63d79 --- /dev/null +++ b/.cursor/rules/complete-ticket.mdc @@ -0,0 +1,26 @@ +--- +description: Requires complete tickets before coding - asks clarifying questions if requirements are missing +globs: "**/*.{md,txt}" +alwaysApply: false +--- + +# Complete Ticket Requirement + +When the user submits a ticket or task via a `.md` or `.txt` file (including `AGENTS.md`): + +1. **Check** for: goal, success criteria, context, constraints — same rules as `requirements-gate.mdc` +2. **If missing** → ask clarifying questions; offer the **Requirements template** in `requirements-gate.mdc`; do NOT code +3. **If complete** → follow the decision tree in `multi-agent-workflow.mdc`: + - Trivial (typo, rename, one-liner) → implement directly + - Non-trivial → Plan Mode per `plan-first-workflow.mdc` or Phase 1 per `multi-agent-workflow.mdc` when both apply + - Wait for approval before implementation when planning is required +4. **Never assume** missing details — see `never-assume.mdc` + +Verification after implementation: `verifiable-goals.mdc`. Tests for new behavior: `tdd-workflow.mdc`. + +## Coding standards (not covered elsewhere) + +- **Stack:** Python for backend/application code; TypeScript for new frontend code (`application/frontend/`). +- **Error handling:** Handle expected failure paths explicitly; avoid silent failures; return or raise meaningful errors. +- **Async (frontend):** Prefer `async`/`await` over raw Promise chains or callbacks in new TypeScript. +- **Clean code:** Small functions, clear names, match surrounding module conventions; no drive-by refactors. diff --git a/.cursor/rules/context-management.mdc b/.cursor/rules/context-management.mdc new file mode 100644 index 000000000..6fec0191b --- /dev/null +++ b/.cursor/rules/context-management.mdc @@ -0,0 +1,29 @@ +--- +description: Keep agent context focused across tasks and stale threads +alwaysApply: true +--- + +# Context Management + +## Do + +- Use `/clear` between unrelated tasks or features. +- Reference files with `@path` instead of pasting entire file contents. +- Use `@Past Chats` to pull in prior work instead of copy-pasting old conversations. +- Start fresh after **2 failed corrections** on the same issue: `/clear`, then write a better prompt that incorporates what you learned. + +## Don't + +- Let context accumulate across unrelated features in one long thread. +- Describe files vaguely when an `@` reference exists. +- Keep correcting the same mistake in a degrading context — reset instead. + +## When context is stale + +Signs you should `/clear` and re-prompt: + +- Repeated fixes on the same bug without progress +- Agent confuses requirements from an earlier, unrelated task +- Plan has drifted significantly from what was approved + +After clearing, restate: goal, approved plan (or link to `.cursor/plans/*.md`), relevant `@` files, and acceptance criteria. diff --git a/.cursor/rules/multi-agent-workflow.mdc b/.cursor/rules/multi-agent-workflow.mdc new file mode 100644 index 000000000..1dad91ea6 --- /dev/null +++ b/.cursor/rules/multi-agent-workflow.mdc @@ -0,0 +1,72 @@ +--- +description: Two-phase planning for big changes; builder must not be sole judge +alwaysApply: true +--- + +# Multi-Agent Workflow (Human Plan → Agent Execute) + +For **big changes**, split work into two phases. Do not skip Phase 1. + +## What counts as a big change + +- New feature, new standard importer, or new user-facing capability +- Expected to touch **3+ files** or **>500 lines** of diff +- Refactor or migration with behavioral risk +- Touches critical paths (auth, secrets, production data, payments) +- Incomplete requirements or meaningful product/design choices + +Small fixes: single-file bugfix, typo, test-only tweak, clear one-liner → `plan-first-workflow.mdc` only. + +## Phase 1 — Human-led planning (no code) + +**Stop before editing.** + +1. Acknowledge this is a big change; planning comes first. +2. Ask minimum questions: goal, data sources, pattern to mirror, acceptance criteria, out of scope. +3. Draft a plan: steps, `@` file paths, similar code, test/validation plan, risks. +4. Wait for explicit approval ("proceed", "approved", or confirmed edited plan). +5. No commits, push, or implementation code in Phase 1. Read-only research is fine. + Tests and production code begin in Phase 2 after approval (see `tdd-workflow.mdc`). + +## Phase 2 — Agent execution + +After approval: + +1. Execute per `autonomous-workflow.mdc`. +2. Follow the approved plan; pause if material deviation is needed. +3. Implement incrementally; verify as you go (`verifiable-goals.mdc`). +4. Hand off with checklist including test evidence. + +## Builder ≠ Judge (required on substantive work) + +| Role | Responsibility | +|------|----------------| +| **Builder** | Implements approved plan | +| **Judge** | Independent review — edge cases, security, test gaps | + +Invoke judge via subagent, parallel agent, or fresh context: + +- "Use a subagent to review this change for edge cases and security issues." + +Do not mark substantive work complete without independent review or documented reason to skip. + +**Re-review:** Required only when judge findings change behavior, tests, or security posture materially. Style-only nits fixed in-place do not require a second judge pass. + +## Decision tree + +``` +User request received + │ + ├─ Missing goal / criteria / context / constraints? + │ └─ STOP → ask questions OR offer Requirements template (requirements-gate.mdc) + │ + ├─ Typo / rename / one-sentence fix? + │ └─ Implement → quality checks → show evidence + │ + ├─ Multi-file / new feature / refactor / critical path? + │ └─ Plan Mode → detailed plan → WAIT for approval → implement + │ → quality checks → subagent review → handoff with evidence + │ + └─ Otherwise + └─ Brief plan → implement → quality checks → handoff with evidence +``` diff --git a/.cursor/rules/never-assume.mdc b/.cursor/rules/never-assume.mdc new file mode 100644 index 000000000..22450b00a --- /dev/null +++ b/.cursor/rules/never-assume.mdc @@ -0,0 +1,30 @@ +--- +description: Verify or ask — no guessing packages, APIs, patterns, or incomplete code +alwaysApply: true +--- + +# Never Assume + +| Do NOT | Instead | +|--------|---------| +| Assume package names, API endpoints, DB schema, or file locations | Read the codebase; grep; ask | +| Add new dependencies without explanation | State why, alternatives considered, and get approval | +| Use mocks unless explicitly requested | Prefer integration-style tests matching `@application/tests/` patterns | +| Replace code with placeholders, TODOs, or stubs | Ship complete, working code | +| Write incomplete implementations | Finish the feature or stop and explain what's blocked | +| Guess production/staging targets for DB ops | Confirm target app; follow `production-db-ops-safety.mdc` | +| Commit or push unless asked | Wait for explicit user request | + +## Scope and diff discipline + +- Minimize scope — smallest correct diff; no drive-by refactors. +- Match surrounding naming, types, imports, and documentation level. +- Comments only for non-obvious business logic. +- Do not add markdown/docs files the user did not ask for. +- Do not use "made with cursor" or similar in commits. + +## OpenCRE conventions + +- Mirror patterns in existing code (importers, tests, web routes). +- Use Makefile targets over ad-hoc commands when available. +- Prefer `scripts/db/` for production DB operations over raw SQL. diff --git a/.cursor/rules/plan-first-workflow.mdc b/.cursor/rules/plan-first-workflow.mdc new file mode 100644 index 000000000..05510f1ad --- /dev/null +++ b/.cursor/rules/plan-first-workflow.mdc @@ -0,0 +1,54 @@ +--- +description: Require Plan Mode and user approval before non-trivial implementation +alwaysApply: true +--- + +# Plan-First Workflow + +Apply before non-trivial edits. When criteria overlap with `multi-agent-workflow.mdc` (e.g. new feature, 3+ files), follow **multi-agent** Phase 1 — it is the stricter superset. + +## Skip planning only for + +- Typos, renames, obvious single-line fixes +- Tasks fully specified with no design choices + +## MUST plan before implementing when ANY apply + +- New feature or new importer +- Multi-file change (3+ files) or >500 lines expected +- Refactor or migration with behavioral risk +- Touches critical paths (auth, secrets, production data, payments, deploy) +- Requirements have meaningful design choices + +## Plan output MUST include + +1. **Goal** — restated in one sentence +2. **Files** — exact paths to create/modify/delete +3. **Dependencies** — imports, DB migrations, external APIs, new packages +4. **Steps** — ordered implementation sequence +5. **Tests** — new/updated test files and what they assert +6. **Edge cases** — failure modes, empty input, backwards compatibility +7. **Verification** — exact commands (`make lint`, `make mypy`, `make test`, etc.) +8. **Risks** — what could break and how to detect it + +## Approval gate + +After presenting the plan, **wait for explicit user approval** ("proceed", "approved", +or an edited plan confirmed by the user) before writing implementation code. + +After approval, **tests may be written first** per `tdd-workflow.mdc` — failing tests are not "implementation code" for Phase 1 purposes. + +Read-only research (grep, read files, explore codebase) is allowed during planning. + +Save approved plans to `.cursor/plans/.md` when scope is substantial. + +## Before editing (Agent Mode) + +- Brief plan with reasoning: goal, steps, files touched, validation approach. +- Break into smaller steps; check `scripts/db/` and `scripts/` for deploy/DB/import ops. + +## While editing + +- Only modify code relevant to the request. +- Never use placeholders — include complete, working code. +- **Reference patterns specifically:** e.g. mirror `@application/utils/external_project_parsers/parsers/pci_dss.py`, tests like `@application/tests/pci_dss_parser_test.py`. diff --git a/.cursor/rules/production-db-ops-safety.mdc b/.cursor/rules/production-db-ops-safety.mdc new file mode 100644 index 000000000..c37168766 --- /dev/null +++ b/.cursor/rules/production-db-ops-safety.mdc @@ -0,0 +1,14 @@ +--- +description: Require all-caps confirmation for destructive production DB operations and prefer pre-op backups +alwaysApply: true +--- + +# Production DB Operations Safety + +- For production database operations, treat destructive actions (`DELETE`, `DROP`, `TRUNCATE`, irreversible `ALTER`) as high risk. +- Prefer using `scripts/db/` operations instead of ad-hoc production DB commands whenever those scripts cover the use case. +- Before proposing or executing destructive production DB actions, require explicit all-caps confirmation from the user. +- Confirmation should be exact and unambiguous (for OpenCRE scripts: `I_UNDERSTAND_OPENCREORG_PROD_DB_DESTRUCTIVE_ACTION`). +- Prefer capturing a fresh backup before destructive production DB actions; if a backup is skipped, clearly explain risk and ask for confirmation again. +- If app/environment target is ambiguous, stop and ask to confirm target app first. + diff --git a/.cursor/rules/requirements-gate.mdc b/.cursor/rules/requirements-gate.mdc new file mode 100644 index 000000000..bfdf070dc --- /dev/null +++ b/.cursor/rules/requirements-gate.mdc @@ -0,0 +1,53 @@ +--- +description: Stop and ask clarifying questions before coding when requirements are incomplete +alwaysApply: true +--- + +# Requirements Gate + +If ANY of the following is missing or ambiguous, **STOP and ask clarifying questions**. +Do NOT write, edit, or delete code until the gaps are filled. + +| Required | What to ask | +|----------|-------------| +| **Clear goal** | What outcome does the user want? What problem are we solving? | +| **Verifiable success criteria** | Which checks must pass? (tests, typecheck, linter, CI, manual steps) | +| **Context references** | Which files, modules, or prior chats apply? Prefer `@path/to/file` refs when ambiguous. | +| **Constraints** | Out of scope, performance, compatibility, no new deps, prod DB safety, etc. | + +## Context references — when `@` refs are required + +- **Satisfied without `@`** when the message names specific paths, modules, or patterns clearly (e.g. "add tests for `application/utils/gap_analysis.py`"). +- **Ask for `@` refs** when multiple files could apply, the pattern to mirror is unclear, or prior chat/issue context is needed. + +## Skip the gate only when + +The request is fully specified in one sentence with obvious success criteria and unambiguous context, e.g. +"Fix typo in README line 42" or "Rename `foo` to `bar` in `application/utils/gap_analysis.py`." + +## Requirements template (offer when info is missing) + +``` +## Task + + +## Success criteria (all must pass) +- [ ] `make lint` +- [ ] `make mypy` +- [ ] `make test` (or targeted: `python -m unittest application/tests/_test.py`) +- [ ] `make frontend` / `yarn build` (if frontend touched) +- [ ] CI green (`gh pr checks` or Actions UI) +- [ ] Other: ___ + +## Context +- Files: @path/to/relevant/file.py +- Pattern to mirror: @path/to/similar/implementation.py +- Prior work: @Past Chats / issue # / PR # + +## Constraints +- In scope: ___ +- Out of scope: ___ +- Dependencies: none / explain before adding +- Mocks: allowed / not allowed +- Production DB: N/A / read-only / destructive (requires explicit confirmation) +``` diff --git a/.cursor/rules/tdd-workflow.mdc b/.cursor/rules/tdd-workflow.mdc new file mode 100644 index 000000000..673ec7b79 --- /dev/null +++ b/.cursor/rules/tdd-workflow.mdc @@ -0,0 +1,30 @@ +--- +description: Test-first workflow for new behavior, importers, and API changes +alwaysApply: true +--- + +# TDD Workflow + +Use for new behavior, bug fixes with clear reproduction, and importers/API changes where expected I/O is known. + +Skip for: typos, pure refactors with existing test coverage, config-only changes. + +## Timing relative to planning + +- **After plan approval** (or immediately for trivial fixes that skip planning): write failing tests, then implementation. +- Do not write production code before plan approval when planning is required. + +## Loop + +1. **Write tests first** from expected input/output or acceptance criteria. +2. **Run tests and confirm they fail** for the right reason. Do not write implementation yet. +3. **Commit tests** only when the user explicitly asks to commit mid-flow. +4. **Implement** the minimum code to pass tests. Do not modify tests to make them pass unless requirements changed (say so explicitly). +5. **Iterate** until `make test` (and lint/mypy) pass. +6. **Commit implementation** when the user asks. + +## OpenCRE conventions + +- Follow patterns in `@application/tests/` (e.g. `@application/tests/pci_dss_parser_test.py` for importers). +- Use test DB setup from existing parser/web tests; avoid unnecessary mocks when integration-style tests match the codebase. +- Prefer one focused test class per behavior area. diff --git a/.cursor/rules/verifiable-goals.mdc b/.cursor/rules/verifiable-goals.mdc new file mode 100644 index 000000000..98e26dc71 --- /dev/null +++ b/.cursor/rules/verifiable-goals.mdc @@ -0,0 +1,49 @@ +--- +description: Non-negotiable lint, mypy, test, and CI checks with evidence in handoff +alwaysApply: true +--- + +# Verifiable Goals + +Agents need pass/fail checks to close the loop. Without verification, the human becomes the verification loop. + +## Required checks (code changes) + +Run in order unless clearly irrelevant (explain why if skipped): + +1. `make lint` +2. `make mypy` +3. `make test` — full suite, or a targeted module when scope is narrow +4. `make frontend` / `yarn build` — when frontend/TS/TSX touched +5. `make alembic-guardrail` — before deploy/migration ops + +## CI + +When preparing or fixing a PR: all workflow jobs must be green. +Use `gh pr checks` or the GitHub Actions UI. Fix failures iteratively. + +## Frontend TypeScript (when TS/TSX changed) + +- Webpack production build must succeed (`make frontend` / `yarn build`) +- TypeScript must compile with no errors +- Prettier must pass (`make lint` runs black for Python and prettier for frontend) + +## Iterate until green + +- If any check fails, fix the failure and rerun from the failed step. +- Do not hand off with failing checks unless blocked; document the blocker explicitly. +- Before commit (when user asks): all relevant checks must pass. + +## Handoff evidence (mandatory) + +Report what you ran and the outcome — not assertions: + +``` +make lint — passed +make mypy — passed +make test — passed (N tests, 0 failures) +make frontend — passed (if applicable) +gh pr checks — all green (if PR-related) +``` + +If a check failed, show the error, the fix, and the rerun result. diff --git a/.env.example b/.env.example index a4a9a6b65..6e3efc0fb 100644 --- a/.env.example +++ b/.env.example @@ -24,6 +24,13 @@ REDIS_NO_SSL=false FLASK_CONFIG=development INSECURE_REQUESTS=false +# Feature Flags +# Enable the deploy/uptime health probe at GET /rest/v1/health. +# Set to one of 1, true, yes (case-insensitive) to enable; any other value +# (including unset or false) leaves it off and the endpoint returns 404. + +CRE_ENABLE_HEALTH=false + # Embeddings NO_GEN_EMBEDDINGS=false diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 361525927..745a408bd 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -39,11 +39,11 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v2 + uses: actions/checkout@v4 # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@v1 + uses: github/codeql-action/init@v4 with: languages: ${{ matrix.language }} # If you wish to specify custom queries, you can do so here or in a config file. @@ -54,7 +54,7 @@ jobs: # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). # If this step fails, then you should remove it and run the build manually (see below) - name: Autobuild - uses: github/codeql-action/autobuild@v1 + uses: github/codeql-action/autobuild@v4 # ℹ️ Command-line programs to run using the OS shell. # 📚 https://git.io/JvXDl @@ -68,4 +68,4 @@ jobs: # make release - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v1 + uses: github/codeql-action/analyze@v4 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 59c65dc47..f9134b2ec 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,5 +1,8 @@ name: Test on: [push, pull_request] +permissions: + contents: read + jobs: build: name: Test diff --git a/.gitignore b/.gitignore index 831738958..ecc6b7d04 100644 --- a/.gitignore +++ b/.gitignore @@ -46,7 +46,9 @@ v/ .venv/ ### Local AI/editor workspaces ### -.cursor/ +.cursor/* +!.cursor/rules/ +!.cursor/rules/** .claude/ ### Frontend @@ -64,6 +66,7 @@ standards_cache.sqlite ### Docs *.md +!AGENTS.md ### Dev DBDumps *.sql @@ -78,3 +81,5 @@ tmp/ ### CREs dir cres/* +### Local project management tooling +project management scripts/ diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 000000000..75b31bd40 --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,136 @@ +# OpenCRE Agent Instructions + +Cursor agents working in this repo must follow the rules in `.cursor/rules/`. + +## Quick start + +1. **Requirements gate** — If goal, success criteria, `@` file refs, or constraints are missing, stop and ask (`requirements-gate.mdc`). +2. **Plan first** — Non-trivial or multi-file work requires a plan and user approval before coding (`plan-first-workflow.mdc`, `multi-agent-workflow.mdc`). +3. **Verify** — After code changes, run checks and iterate until green (`verifiable-goals.mdc`): + - `make lint` + - `make mypy` + - `make test` + - `make frontend` (if frontend touched) +4. **Review** — Substantive work needs independent judge/subagent review (`multi-agent-workflow.mdc`). +5. **Production gap analysis** — On Heroku/opencreorg, gap analysis is cache-only: serve precomputed rows from Postgres; do not compute GA on production (cache miss → 404). + +## Operational scripts + +Prefer existing Makefile targets and `scripts/` helpers over ad-hoc Docker, GA, import, or prod-DB setup. Read script headers or `--help` for env vars and flags; do not reimplement their logic. + +### Local Docker services + +Use Makefile targets — do not hand-roll `docker run`: + +```bash +make docker-neo4j # Neo4j (7474/7687) +make docker-redis # Redis Stack (6379/8001) +make docker-postgres # local Postgres (5432, cre/password) +make start-containers # neo4j + redis only +make migrate-upgrade # after postgres is up +``` + +Reset volumes: `make docker-neo4j-rm` / `make docker-redis-rm`. + +### Imports and Neo4j populate + +```bash +make import-all # full standards import via scripts/import-all.sh +make import-projects # skip core CRE import (CRE_SKIP_IMPORT_CORE=1) +make import-neo4j # populate Neo4j from cache +``` + +`scripts/import-all.sh` handles parallel importers, SQLite export, and verification. For embeddings-only SQLite → Postgres push, use `scripts/sync_embeddings_table.py` (see its docstring). + +### Gap analysis (local compute, prod verify) + +**Local backfill** (starts containers, workers, migrations — see `scripts/backfill_gap_analysis.sh`): + +```bash +make backfill-gap-analysis # parallel workers + --ga_backfill_missing +make backfill-gap-analysis-sync # Neo4j populate + backfill without queue +make sync-gap-analysis-table-local # upsert material rows sqlite → local Postgres +``` + +**Prod / staging checks** (HTTP only — never compute GA on opencreorg): + +```bash +make verify-ga-complete-prod # scripts/verify_ga_completeness.py +make monitor-ga-health-prod # scripts/monitor_ga_health.py (503 / empty result alerts) +make verify-ga-parity-local # scripts/verify_ga_postgres_neo_parity.py +``` + +Table sync between databases: `scripts/sync_gap_analysis_table.py`, `scripts/sync_embeddings_table.py`. + +### Production DB (Heroku opencreorg) + +Use `scripts/db/*` — never raw destructive `psql` against prod without these wrappers. All flows capture and wait for a fresh Heroku backup first (`scripts/db/common.sh`). + +```bash +scripts/db/backup-opencreorg.sh # backup only +scripts/db/surgery-opencreorg.sh --sql-file path/to/change.sql # targeted SQL +scripts/db/surgery-opencreorg.sh --sql-file … --destructive # DELETE/DROP/TRUNCATE +scripts/db/sync-local-to-opencreorg.sh [--table node]… # local → prod sync +``` + +Destructive surgery requires `CONFIRM_DESTRUCTIVE=I_UNDERSTAND_OPENCREORG_PROD_DB_DESTRUCTIVE_ACTION` (exact phrase). Override app: `APP_NAME=opencreorg`. See `production-db-ops-safety.mdc`. + +After prod GA cache changes, verify with `make verify-ga-complete-prod` / `make monitor-ga-health-prod`. + +### Weekly prod GA & data completeness (Cursor Automation) + +Schedule a **Cursor Automation** (not GitHub Actions) to run weekly — prod is cache-only; checks are HTTP + repo scripts only. + +| Setting | Value | +|---------|--------| +| Trigger | Cron: `0 9 * * 1` (Mondays 09:00) | +| Repo | `OWASP/OpenCRE`, branch `main` | +| Tools | None required (cloud agent uses repo checkout) | + +**Agent prompt (paste into Automations editor):** + +``` +Weekly OpenCRE prod GA and data completeness for opencreorg. + +1. python3 scripts/monitor_ga_health.py --base-url https://opencre.org --output-json tmp/prod-ga-health.json +2. python3 scripts/verify_ga_completeness.py --base-url https://opencre.org --output-json tmp/prod-ga-completeness.json +3. Confirm /rest/v1/standards and /rest/v1/ga_standards return non-empty lists. +4. If incomplete_pairs > 0 or non-zero exit: list failing pairs/buckets; recommend AGENTS.md Operational scripts (local backfill + scripts/sync_gap_analysis_table.py). Do not compute GA on Heroku or run destructive prod DB ops without explicit approval. +5. If all pass: report complete/total pairs and standards counts. +``` + +Create via **Cursor → Automations → New** (Agents Window). Do not hand-roll docker/GA setup in the automation prompt. + +### Staging bootstrap + +`scripts/setup-heroku-staging.sh` — provisions staging from prod + local SQLite; supports `--embeddings`, `--gap_analysis`, or full sync. Requires `PROD_APP`, `STAGING_APP`, `LOCAL_SQLITE_DB`. + +### Deploy / migrations + +Before deploy or `flask db upgrade`: `make alembic-guardrail` (or `python scripts/check_alembic_revision_guardrail.py`). + +## Rule index + +| Rule | Purpose | +|------|---------| +| `requirements-gate.mdc` | Clarifying questions + requirements template | +| `complete-ticket.mdc` | Ticket gate for `.md`/`.txt` files; uses `requirements-gate` template + coding standards | +| `plan-first-workflow.mdc` | Plan Mode before non-trivial edits | +| `multi-agent-workflow.mdc` | Big changes, approval gates, builder ≠ judge | +| `verifiable-goals.mdc` | Lint, mypy, test, CI — show evidence | +| `never-assume.mdc` | No guessing; complete code; minimal scope | +| `tdd-workflow.mdc` | Test-first for new behavior and importers | +| `autonomous-workflow.mdc` | Execute after approval; no unsolicited commits | +| `context-management.mdc` | `/clear`, `@` refs, stale context recovery | +| `production-db-ops-safety.mdc` | Destructive prod DB confirmation | +| `alembic-deploy-guardrail.mdc` | Pre-deploy migration guardrail | + +## OpenCRE commands + +```bash +make lint # black + frontend prettier +make mypy # Python typecheck +make test # Python unittest suite +make frontend # yarn build (when TS/TSX changed) +make alembic-guardrail # before deploy/migration ops +``` diff --git a/Makefile b/Makefile index 86c88a868..075f99cce 100644 --- a/Makefile +++ b/Makefile @@ -153,6 +153,12 @@ verify-ga-complete-prod: --base-url "https://opencre.org" \ --output-json "$(CURDIR)/tmp/prod-ga-completeness.json" +monitor-ga-health-prod: + @[ -d "./.venv" ] && . ./.venv/bin/activate || ([ -d "./venv" ] && . ./venv/bin/activate); \ + python scripts/monitor_ga_health.py \ + --base-url "https://opencre.org" \ + --output-json "$(CURDIR)/tmp/prod-ga-health.json" + verify-ga-parity-local: @[ -d "./.venv" ] && . ./.venv/bin/activate || ([ -d "./venv" ] && . ./venv/bin/activate); \ export CRE_CACHE_FILE="$${CRE_CACHE_FILE:-postgresql://cre:password@127.0.0.1:5432/cre}"; \ @@ -168,4 +174,9 @@ backfill-gap-analysis-sync: python cre.py --cache_file "$$CRE_CACHE_FILE" --populate_neo4j_db && \ python cre.py --cache_file "$$CRE_CACHE_FILE" --ga_backfill_missing --ga_backfill_no_queue +backfill-opencre-ga: + @[ -d "./.venv" ] && . ./.venv/bin/activate || ([ -d "./venv" ] && . ./venv/bin/activate); \ + export FLASK_APP="$(CURDIR)/cre.py"; \ + python cre.py --cache_file "$${CRE_CACHE_FILE:-$(CURDIR)/standards_cache.sqlite}" --ga_backfill_opencre_direct + all: clean lint test dev dev-run diff --git a/README.md b/README.md index 02fb3e9dd..642e9002c 100644 --- a/README.md +++ b/README.md @@ -289,6 +289,7 @@ Then edit `.env` and provide values appropriate for your environment. * Google Auth: `GOOGLE_CLIENT_ID`, `GOOGLE_CLIENT_SECRET`, `GOOGLE_SECRET_JSON`, `LOGIN_ALLOWED_DOMAINS` * GCP: `GCP_NATIVE` * Spreadsheet Auth: `OpenCRE_gspread_Auth` +* Feature flags: `CRE_ENABLE_HEALTH` (enable the `GET /rest/v1/health` deploy/uptime probe; off by default, returns 404 when unset) See `.env.example` for full list and defaults. diff --git a/application/cmd/cre_main.py b/application/cmd/cre_main.py index b87085aa6..b3dfe91c4 100644 --- a/application/cmd/cre_main.py +++ b/application/cmd/cre_main.py @@ -730,12 +730,14 @@ def backfill_gap_analysis_only( if os.environ.get("CRE_NO_NEO4J") != "1": populate_neo4j_db(db_connection_str) + gap_analysis.backfill_opencre_direct_pairs(collection, refresh=True) + missing = _missing_ga_pairs(collection) if max_pairs > 0: missing = missing[:max_pairs] total = len(missing) if total == 0: - logger.info("GA backfill: no missing pairs") + logger.info("GA backfill: no missing neo4j pairs") return logger.info( @@ -952,6 +954,9 @@ def run(args: argparse.Namespace) -> None: # pragma: no cover if args.preload_map_analysis_target_url: gap_analysis.preload(target_url=args.preload_map_analysis_target_url) + if getattr(args, "ga_backfill_opencre_direct", False): + collection = db_connect(path=args.cache_file) + gap_analysis.backfill_opencre_direct_pairs(collection, refresh=True) if getattr(args, "ga_backfill_missing", False): backfill_gap_analysis_only( args.cache_file, diff --git a/application/database/db.py b/application/database/db.py index 398eff4ee..50528c22e 100644 --- a/application/database/db.py +++ b/application/database/db.py @@ -10,7 +10,7 @@ from pprint import pprint -from collections import Counter +from collections import Counter, defaultdict from itertools import permutations from typing import Any, Dict, List, Optional, Tuple, cast from neomodel.exceptions import ( @@ -47,6 +47,7 @@ make_resources_key, make_subresources_key, primary_gap_analysis_payload_is_material, + should_persist_primary_gap_analysis_cache, ) @@ -1343,7 +1344,13 @@ def get_cre_by_db_id(self, id: str) -> cre_defs.CRE: if not external_id: logger.error(f"CRE {id} does not exist in the db") return None - return self.get_CREs(external_id=external_id[0])[0] + cres = self.get_CREs(external_id=external_id[0]) + if not cres: + logger.error( + f"CRE {id} exists but get_CREs returned no results for external_id={external_id[0]}" + ) + return None + return cres[0] def list_node_ids_by_ntype(self, ntype: str) -> List[str]: # Always return plain strings (never SQLAlchemy row tuples). @@ -1442,7 +1449,6 @@ def get_CREs( include_only: Optional[List[str]] = None, internal_id: Optional[str] = None, ) -> List[cre_defs.CRE]: - cres: List[cre_defs.CRE] = [] query = CRE.query if not external_id and not name and not description and not internal_id: logger.error( @@ -1477,40 +1483,99 @@ def get_CREs( ) return [] - for matching_cre in dbcres: - cre = CREfromDB(matching_cre) - cre.links = self.__make_cre_links( - cre=matching_cre, include_only_nodes=include_only - ) - cre.links.extend(self.__make_cre_internal_links(cre=matching_cre)) - cres.append(cre) - return cres + return self._hydrate_cres_batch(dbcres, include_only_nodes=include_only) - def __make_cre_internal_links(self, cre: CRE) -> List[cre_defs.Link]: - links = [] - internal_links = ( + def _hydrate_cres_batch( + self, + dbcres: List[CRE], + include_only_nodes: Optional[List[str]] = None, + ) -> List[cre_defs.CRE]: + if not dbcres: + return [] + + cre_ids = [cre.id for cre in dbcres] + node_links_by_cre: Dict[str, List[Links]] = defaultdict(list) + node_ids: set = set() + for link in self.session.query(Links).filter(Links.cre.in_(cre_ids)).all(): + node_links_by_cre[link.cre].append(link) + node_ids.add(link.node) + + nodes_by_id: Dict[str, Node] = {} + if node_ids: + nodes_by_id = { + node.id: node + for node in self.session.query(Node).filter(Node.id.in_(node_ids)).all() + } + + internal_links_by_cre: Dict[str, List[InternalLinks]] = defaultdict(list) + linked_cre_ids: set = set() + for internal_link in ( self.session.query(InternalLinks) .filter( - sqla.or_(InternalLinks.cre == cre.id, InternalLinks.group == cre.id) + sqla.or_( + InternalLinks.cre.in_(cre_ids), + InternalLinks.group.in_(cre_ids), + ) ) .all() - ) + ): + linked_cre_ids.add(internal_link.cre) + linked_cre_ids.add(internal_link.group) + if internal_link.cre in cre_ids: + internal_links_by_cre[internal_link.cre].append(internal_link) + if internal_link.group in cre_ids: + internal_links_by_cre[internal_link.group].append(internal_link) + + cres_by_id: Dict[str, CRE] = {cre.id: cre for cre in dbcres} + extra_cre_ids = linked_cre_ids - set(cre_ids) + if extra_cre_ids: + for linked in ( + self.session.query(CRE).filter(CRE.id.in_(extra_cre_ids)).all() + ): + cres_by_id[linked.id] = linked + + result: List[cre_defs.CRE] = [] + for matching_cre in dbcres: + cre = CREfromDB(matching_cre) + cre.links = self._assemble_cre_node_links( + node_links_by_cre.get(matching_cre.id, []), + nodes_by_id, + include_only_nodes, + ) + seen_internal: set = set() + internal_rows = [] + for row in internal_links_by_cre.get(matching_cre.id, []): + key = (row.cre, row.group, row.type) + if key not in seen_internal: + seen_internal.add(key) + internal_rows.append(row) + cre.links.extend( + self._assemble_cre_internal_links( + matching_cre, internal_rows, cres_by_id + ) + ) + result.append(cre) + return result - if len(internal_links) == 0: + def _assemble_cre_internal_links( + self, + cre: CRE, + internal_links: List[InternalLinks], + cres_by_id: Dict[str, CRE], + ) -> List[cre_defs.Link]: + links: List[cre_defs.Link] = [] + if not internal_links: logger.debug( f"CRE {cre.name}:{cre.external_id}:{cre.id} has no internal links" ) for internal_link in internal_links: - - linked_cre_query = self.session.query(CRE) link_type = cre_defs.LinkTypes.from_str(internal_link.type) if internal_link.cre == cre.id: - # if we are the lower cre in this relationship, we need to flip the "Contains" linktypes - linked_cre = linked_cre_query.filter( - CRE.id == internal_link.group - ).first() # get the higher cre so we can add the link + linked_cre = cres_by_id.get(internal_link.group) + if not linked_cre: + continue if link_type == cre_defs.LinkTypes.Contains: links.append( cre_defs.Link( @@ -1518,24 +1583,28 @@ def __make_cre_internal_links(self, cre: CRE) -> List[cre_defs.Link]: document=CREfromDB(linked_cre), ) ) - elif ( - link_type == cre_defs.LinkTypes.Related - ): # if it's not a "Contains" link, it's a "Related" link + elif link_type == cre_defs.LinkTypes.Related: links.append( cre_defs.Link(ltype=link_type, document=CREfromDB(linked_cre)) ) continue - # if we are are the higher cre then we don't need to do anything, relationship types are always "higher"->"lower" - linked_cre = linked_cre_query.filter(CRE.id == internal_link.cre).first() - links.append(cre_defs.Link(ltype=link_type, document=CREfromDB(linked_cre))) + + linked_cre = cres_by_id.get(internal_link.cre) + if linked_cre: + links.append( + cre_defs.Link(ltype=link_type, document=CREfromDB(linked_cre)) + ) return links - def __make_cre_links( - self, cre: CRE, include_only_nodes: List[str] + def _assemble_cre_node_links( + self, + node_links: List[Links], + nodes_by_id: Dict[str, Node], + include_only_nodes: Optional[List[str]], ) -> List[cre_defs.Link]: - links = [] - for link in self.session.query(Links).filter(Links.cre == cre.id).all(): - node = self.session.query(Node).filter(Node.id == link.node).first() + links: List[cre_defs.Link] = [] + for link in node_links: + node = nodes_by_id.get(link.node) if node and (not include_only_nodes or node.name in include_only_nodes): links.append( cre_defs.Link( @@ -1640,13 +1709,11 @@ def export(self, dir: str = None, dry_run: bool = False) -> List[cre_defs.Docume def all_cres_with_pagination( self, page: int = 1, per_page: int = 10 ) -> List[cre_defs.CRE]: - result: List[cre_defs.CRE] = [] cres = self.session.query(CRE).paginate( page=int(page), per_page=per_page, error_out=False ) total_pages = cres.pages - for cre in cres.items: - result.extend(self.get_CREs(external_id=cre.external_id)) + result = self._hydrate_cres_batch(list(cres.items)) return result, page, total_pages def get_cre_path(self, fromID: str, toID: str) -> List[cre_defs.Document]: @@ -2195,10 +2262,55 @@ def get_root_cres(self): ) .all() ) - result = [] - for c in cres: - result.extend(self.get_CREs(external_id=c.external_id)) - return result + return self._hydrate_cres_batch(list(cres)) + + def health_check(self) -> Dict[str, Any]: + """Lightweight liveness/readiness probe for the serving database. + + Intended for use by a deploy/uptime health endpoint, NOT for deep + operational checks (GA completeness, mapping coverage, etc.) which are + slow and belong in ops tooling. Performs cheap COUNT queries and never + raises: connectivity failures are reported as ``ok=False`` so the caller + can return an appropriate status code. + + Returns a dict with: + - ``ok``: True only if the DB is reachable AND holds a non-empty + dataset (at least one CRE and one standard/node). + - ``db_reachable``: True if the COUNT queries executed. + - ``cre_count`` / ``standards_count``: populated when reachable. + - ``reason``: short human-readable explanation when ``ok`` is False. + """ + try: + cre_count = self.session.query(func.count(CRE.id)).scalar() or 0 + standards_count = self.session.query(func.count(Node.id)).scalar() or 0 + except OperationalError: + return { + "ok": False, + "db_reachable": False, + "reason": "database unreachable", + } + except Exception: # pragma: no cover - defensive, never fail open + return { + "ok": False, + "db_reachable": False, + "reason": "database health query failed", + } + + if cre_count == 0 or standards_count == 0: + return { + "ok": False, + "db_reachable": True, + "cre_count": cre_count, + "standards_count": standards_count, + "reason": "empty dataset", + } + + return { + "ok": True, + "db_reachable": True, + "cre_count": cre_count, + "standards_count": standards_count, + } def get_embeddings_by_doc_type(self, doc_type: str) -> Dict[str, List[float]]: res = {} @@ -2428,6 +2540,22 @@ def add_gap_analysis_result(self, cache_key: str, ga_object: str): .filter(GapAnalysisResults.cache_key == cache_key) .first() ) + if gap_analysis_cache_key_is_primary(cache_key): + existing_payload = existing.ga_object if existing else None + if not should_persist_primary_gap_analysis_cache( + ga_object, existing_payload + ): + if existing is None: + logger.info( + "Skipping empty primary gap analysis cache insert for %s", + cache_key, + ) + else: + logger.warning( + "Refusing non-material primary gap analysis update for %s", + cache_key, + ) + return if existing: existing.ga_object = ga_object self.session.add(existing) diff --git a/application/feature_flags.py b/application/feature_flags.py index 464e3238a..fe1aae2dc 100644 --- a/application/feature_flags.py +++ b/application/feature_flags.py @@ -1,7 +1,18 @@ import os +try: + from dotenv import load_dotenv # type: ignore + + load_dotenv() +except ImportError: + pass + TRUE_VALUES = {"1", "true", "yes"} def is_cre_import_allowed() -> bool: return os.getenv("CRE_ALLOW_IMPORT", "").strip().lower() in TRUE_VALUES + + +def is_health_endpoint_enabled() -> bool: + return os.getenv("CRE_ENABLE_HEALTH", "").strip().lower() in TRUE_VALUES diff --git a/application/frontend/src/App.tsx b/application/frontend/src/App.tsx index 1913e46a9..e372d844f 100755 --- a/application/frontend/src/App.tsx +++ b/application/frontend/src/App.tsx @@ -6,7 +6,6 @@ import { QueryClient, QueryClientProvider } from 'react-query'; import { BrowserRouter } from 'react-router-dom'; import { GlobalFilterState, filterContext } from './hooks/applyFilters'; -import { DataProvider } from './providers/DataProvider'; import { MainContentArea } from './scaffolding'; const queryClient = new QueryClient(); @@ -15,12 +14,10 @@ const App = () => (
- - - - - - + + + +
diff --git a/application/frontend/src/const.ts b/application/frontend/src/const.ts index 3242939c4..bf6d5cf11 100644 --- a/application/frontend/src/const.ts +++ b/application/frontend/src/const.ts @@ -1,4 +1,5 @@ export const TWO_DAYS_MILLISECONDS = 1.728e8; +export const EXPLORER_CRE_PAGE_SIZE = 20; export const TYPE_IS_PART_OF = 'Is Part Of'; export const TYPE_LINKED_TO = 'Linked To'; diff --git a/application/frontend/src/index.html b/application/frontend/src/index.html index 4459676f2..afa85e5c7 100755 --- a/application/frontend/src/index.html +++ b/application/frontend/src/index.html @@ -4,7 +4,7 @@ {children}; + +export function withExplorerLayout

(Component: React.ComponentType

): React.FC

{ + const Wrapped = (props: P) => ( + + + + ); + Wrapped.displayName = `ExplorerLayout(${Component.displayName || Component.name || 'Component'})`; + return Wrapped; +} diff --git a/application/frontend/src/pages/Explorer/explorer.tsx b/application/frontend/src/pages/Explorer/explorer.tsx index 64bee6566..56f4b2304 100644 --- a/application/frontend/src/pages/Explorer/explorer.tsx +++ b/application/frontend/src/pages/Explorer/explorer.tsx @@ -13,11 +13,13 @@ import { GraphDebugPanel } from './GraphDebugPanel'; import { LinkedStandards } from './LinkedStandards'; export const Explorer = () => { - const { dataLoading, dataTree, dataStore } = useDataStore(); + const { dataLoading, dataTree, dataStore, hasMore, isLoadingMore, loadNextPage, dataLoadError } = + useDataStore(); const [loading, setLoading] = useState(false); const [filter, setFilter] = useState(''); const [filteredTree, setFilteredTree] = useState(); const [debugMode, setDebugMode] = useState(false); + const loadMoreRef = React.useRef(null); const applyHighlight = (text, term) => { if (!term) return text; @@ -84,6 +86,25 @@ export const Explorer = () => { setLoading(dataLoading); }, [dataLoading]); + useEffect(() => { + const sentinel = loadMoreRef.current; + if (!sentinel || !hasMore) { + return; + } + + const observer = new IntersectionObserver( + (entries) => { + if (entries.some((entry) => entry.isIntersecting)) { + loadNextPage(); + } + }, + { rootMargin: '200px' } + ); + + observer.observe(sentinel); + return () => observer.disconnect(); + }, [hasMore, loadNextPage, filteredTree]); + function processNode(item) { if (!item) { return <>; @@ -192,12 +213,14 @@ export const Explorer = () => { {debugMode && } - + {filteredTree?.map((item) => { return processNode(item); })} +

+ {isLoadingMore && hasMore &&

Loading more requirements…

} ); diff --git a/application/frontend/src/pages/Explorer/visuals/circles/circles.tsx b/application/frontend/src/pages/Explorer/visuals/circles/circles.tsx index da3618d98..3d0474690 100644 --- a/application/frontend/src/pages/Explorer/visuals/circles/circles.tsx +++ b/application/frontend/src/pages/Explorer/visuals/circles/circles.tsx @@ -10,7 +10,7 @@ import { Button, Icon } from 'semantic-ui-react'; export const ExplorerCircles = () => { const { height, width } = useWindowDimensions(); const [useFullScreen, setUseFullScreen] = useState(false); - const { dataLoading, dataTree } = useDataStore(); + const { dataLoading, dataTree, ensureFullExplorerData, fullLoadProgress, dataLoadError } = useDataStore(); const [breadcrumb, setBreadcrumb] = useState([]); const svgRef = React.useRef(null); @@ -21,6 +21,18 @@ export const ExplorerCircles = () => { const zoomToRef = React.useRef(null); const margin = 20; + useEffect(() => { + let active = true; + void ensureFullExplorerData().catch((err) => { + if (active) { + console.error('Failed to load explorer graph data', err); + } + }); + return () => { + active = false; + }; + }, [ensureFullExplorerData]); + const defaultSize = width > height ? height - 100 : width; const size = useFullScreen ? width : defaultSize; @@ -447,7 +459,10 @@ export const ExplorerCircles = () => {
- + + {fullLoadProgress && ( +

Loading graph data ({fullLoadProgress})…

+ )} ); }; diff --git a/application/frontend/src/pages/Explorer/visuals/force-graph/forceGraph.tsx b/application/frontend/src/pages/Explorer/visuals/force-graph/forceGraph.tsx index cc9e47a52..29f57c291 100644 --- a/application/frontend/src/pages/Explorer/visuals/force-graph/forceGraph.tsx +++ b/application/frontend/src/pages/Explorer/visuals/force-graph/forceGraph.tsx @@ -22,7 +22,15 @@ export const ExplorerForceGraph = () => { const [ignoreTypes, setIgnoreTypes] = useState(['same']); const [maxCount, setMaxCount] = useState(0); const [maxNodeSize, setMaxNodeSize] = useState(0); - const { dataLoading, dataTree, getStoreKey, dataStore } = useDataStore(); + const { + dataLoading, + dataTree, + getStoreKey, + dataStore, + ensureFullExplorerData, + fullLoadProgress, + dataLoadError, + } = useDataStore(); const fgRef = useRef(); // ADDING STATE FOR FILTERING LOGIC const [filterTypeA, setFilterTypeA] = useState(''); @@ -32,6 +40,18 @@ export const ExplorerForceGraph = () => { const [creOptions, setCreOptions] = useState([]); const [combinedOptions, setCombinedOptions] = useState([]); + useEffect(() => { + let active = true; + void ensureFullExplorerData().catch((err) => { + if (active) { + console.error('Failed to load explorer graph data', err); + } + }); + return () => { + active = false; + }; + }, [ensureFullExplorerData]); + // Adding a show all checkbox const [showAll, setShowAll] = useState(true); @@ -431,7 +451,10 @@ export const ExplorerForceGraph = () => { }, [graphData]); return (
- + + {fullLoadProgress && ( +

Loading graph data ({fullLoadProgress})…

+ )} ; + loadedPages: number; + totalPages: number; + isFullStoreLoaded: boolean; +}; + +const isDataStoreCache = (value: unknown): value is DataStoreCache => { + if (!value || typeof value !== 'object') { + return false; + } + const record = value as Record; + return 'store' in record && 'loadedPages' in record && 'totalPages' in record; +}; type DataContextValues = { dataLoading: boolean; dataStore: Record; dataTree: TreeDocument[]; - getStoreKey; + getStoreKey: (doc: Document) => string; + hasMore: boolean; + isLoadingMore: boolean; + fullLoadProgress: string | null; + dataLoadError: Error | null; + loadNextPage: () => Promise; + ensureFullExplorerData: () => Promise; }; export const DataContext = createContext(null); +const docToStoreEntry = (doc: Document): TreeDocument => + ({ + links: doc.links ?? [], + displayName: getTopicDisplayName(doc), + url: getInternalUrl(doc), + ...doc, + } as TreeDocument); + +const mergeDocsIntoStore = ( + docs: Document[], + store: Record, + getStoreKey: (doc: Document) => string +): Record => { + const nextStore = { ...store }; + docs.forEach((doc) => { + nextStore[getStoreKey(doc)] = docToStoreEntry(doc); + }); + return nextStore; +}; + export const DataProvider = ({ children }: { children: React.ReactNode }) => { const { apiUrl } = useEnvironment(); - // Default loading to 'true' and initialize data states as empty const [dataLoading, setDataLoading] = useState(true); const [dataStore, setDataStore] = useState>({}); const [dataTree, setDataTree] = useState([]); - - // Add new state to track if we have checked IndexedDB for cached data const [isHydrated, setIsHydrated] = useState(false); + const [loadedPages, setLoadedPages] = useState(0); + const [totalPages, setTotalPages] = useState(0); + const [isLoadingMore, setIsLoadingMore] = useState(false); + const [isFullStoreLoaded, setIsFullStoreLoaded] = useState(false); + const [fullLoadProgress, setFullLoadProgress] = useState(null); + const [dataLoadError, setDataLoadError] = useState(null); + + const dataStoreRef = useRef(dataStore); + const loadedPagesRef = useRef(loadedPages); + const totalPagesRef = useRef(totalPages); + const isFullStoreLoadedRef = useRef(isFullStoreLoaded); + const loadingPageRef = useRef(false); + const loadChainRef = useRef(Promise.resolve>({})); + const fullLoadRef = useRef | null>(null); + const bootstrapDoneRef = useRef(false); - const getStoreKey = (doc: Document): string => { + useEffect(() => { + dataStoreRef.current = dataStore; + }, [dataStore]); + useEffect(() => { + loadedPagesRef.current = loadedPages; + }, [loadedPages]); + useEffect(() => { + totalPagesRef.current = totalPages; + }, [totalPages]); + useEffect(() => { + isFullStoreLoadedRef.current = isFullStoreLoaded; + }, [isFullStoreLoaded]); + + const getStoreKey = useCallback((doc: Document): string => { if (doc.doctype === 'CRE') return doc.id; if (doc.doctype === 'Standard') return doc.name; return `${doc.name}-${doc.sectionID}-${doc.section}`; - }; - - const buildTree = (doc: Document, keyPath: string[] = []): TreeDocument => { - const selfKey = getStoreKey(doc); - keyPath.push(selfKey); - const storedDoc = structuredClone(dataStore[selfKey]); - const initialLinks = storedDoc.links; - let creLinks = initialLinks.filter( - (x) => - !!x.document && !keyPath.includes(getStoreKey(x.document)) && getStoreKey(x.document) in dataStore - ); - creLinks = creLinks.filter((x) => x.ltype === 'Contains'); - creLinks = creLinks.map((x) => ({ ltype: x.ltype, document: buildTree(x.document, keyPath) })); - storedDoc.links = [...creLinks]; - const standards = initialLinks.filter( - (link) => - link.document && link.document.doctype === 'Standard' && !keyPath.includes(getStoreKey(link.document)) - ); - storedDoc.links = [...creLinks, ...standards]; - return storedDoc; - }; - - // New effect to asynchronously load data from IndexedDB on component mount - useEffect(() => { - const hydrateStateFromDb = async () => { - console.log('Attempting to hydrate state from IndexedDB...'); - const cachedStore = await getDbObject(DATA_STORE_KEY); - const cachedTree = await getDbObject(DATA_TREE_KEY); + }, []); + + const buildTree = useCallback( + (doc: Document, store: Record, keyPath: string[] = []): TreeDocument => { + const selfKey = getStoreKey(doc); + const nextPath = [...keyPath, selfKey]; + const storedDoc = structuredClone(store[selfKey] ?? doc); + const initialLinks = storedDoc.links || []; + let creLinks = initialLinks.filter( + (x) => !!x.document && !nextPath.includes(getStoreKey(x.document)) && getStoreKey(x.document) in store + ); + creLinks = creLinks.filter((x) => x.ltype === 'Contains'); + creLinks = creLinks.map((x) => ({ + ltype: x.ltype, + document: buildTree(x.document, store, nextPath), + })); + storedDoc.links = [...creLinks]; + const standards = initialLinks.filter( + (link) => + link.document && + link.document.doctype === 'Standard' && + !nextPath.includes(getStoreKey(link.document)) + ); + storedDoc.links = [...creLinks, ...standards]; + return storedDoc; + }, + [getStoreKey] + ); - // If we found valid, unexpired data in the cache, load it into our state - if (cachedStore && Object.keys(cachedStore).length > 0) { - console.log('Cache hit. Hydrating state from IndexedDB.'); - setDataStore(cachedStore); - setDataTree(cachedTree || []); // Use cached tree, or empty array as fallback - } else { - console.log('Cache miss or expired. Will fetch fresh data from API.'); + const persistCache = useCallback( + async ( + store: Record, + pagesLoaded: number, + pagesTotal: number, + fullLoaded: boolean, + tree?: TreeDocument[] + ) => { + const payload: DataStoreCache = { + store, + loadedPages: pagesLoaded, + totalPages: pagesTotal, + isFullStoreLoaded: fullLoaded, + }; + await setDbObject(DATA_STORE_CACHE_KEY, payload, TWO_DAYS_MILLISECONDS); + if (tree) { + await setDbObject(DATA_TREE_KEY, tree, TWO_DAYS_MILLISECONDS); } + }, + [] + ); - // Mark hydration as complete. This will enable the API queries to run. - setIsHydrated(true); - }; + const rebuildDataTree = useCallback( + async (store: Record) => { + if (!Object.keys(store).length) { + setDataTree([]); + return []; + } + try { + const result = await axios.get(`${apiUrl}/root_cres`); + const treeData = result.data.data.map((x: Document) => buildTree(x, store)); + setDataTree(treeData); + return treeData; + } catch (err) { + const error = err instanceof Error ? err : new Error('Failed to load explorer tree'); + setDataLoadError(error); + throw error; + } + }, + [apiUrl, buildTree] + ); - hydrateStateFromDb(); - }, []); + const loadPage = useCallback( + async (page: number): Promise> => { + const nextLoad = loadChainRef.current.then(async () => { + if (isFullStoreLoadedRef.current || (loadedPagesRef.current >= page && loadedPagesRef.current > 0)) { + return dataStoreRef.current; + } - const getTreeQuery = useQuery( - 'root_cres', - async () => { - if (!dataTree.length && Object.keys(dataStore).length) { + loadingPageRef.current = true; + setIsLoadingMore(true); try { - const result = await axios.get(`${apiUrl}/root_cres`); - const treeData = result.data.data.map((x) => buildTree(x)); + const result = await axios.get(`${apiUrl}/all_cres`, { + params: { page, per_page: EXPLORER_CRE_PAGE_SIZE }, + }); + const docs: Document[] = result.data.data || []; + const pagesTotal = Number(result.data.total_pages) || 1; + const nextStore = mergeDocsIntoStore(docs, dataStoreRef.current, getStoreKey); + const pagesLoaded = page; + + dataStoreRef.current = nextStore; + setDataStore(nextStore); + setLoadedPages(pagesLoaded); + setTotalPages(pagesTotal); + loadedPagesRef.current = pagesLoaded; + totalPagesRef.current = pagesTotal; + setDataLoadError(null); + + const fullLoaded = pagesLoaded >= pagesTotal; + if (fullLoaded) { + isFullStoreLoadedRef.current = true; + setIsFullStoreLoaded(true); + } - // Save to IndexedDB (async) instead of localStorage - await setDbObject(DATA_TREE_KEY, treeData, TWO_DAYS_MILLISECONDS); + const treeData = await rebuildDataTree(nextStore); + await persistCache(nextStore, pagesLoaded, pagesTotal, fullLoaded, treeData); - setDataTree(treeData); - } catch (error) { - console.error(error); + return nextStore; + } catch (err) { + const error = err instanceof Error ? err : new Error('Failed to load CRE data'); + setDataLoadError(error); + throw error; + } finally { + loadingPageRef.current = false; + setIsLoadingMore(false); } - } + }); + + loadChainRef.current = nextLoad.catch(() => dataStoreRef.current); + return nextLoad; }, - { - retry: false, - // The query is disabled until hydration is complete - enabled: isHydrated, - } + [apiUrl, getStoreKey, persistCache, rebuildDataTree] ); - const getStoreQuery = useQuery( - 'all_cres', - async () => { - if (!Object.keys(dataStore).length) { - try { - const result = await axios.get(`${apiUrl}/all_cres?page=1&per_page=1000`); - let data = result.data.data; - let store = {}; - - if (data.length) { - data.forEach((x) => { - store[getStoreKey(x)] = { - links: x.links, - displayName: getTopicDisplayName(x), - url: getInternalUrl(x), - ...x, - }; - }); - - // CHANGE 5: Save to IndexedDB (async) instead of localStorage - await setDbObject(DATA_STORE_KEY, store, TWO_DAYS_MILLISECONDS); - - setDataStore(store); - console.log('retrieved all cres'); - } - } catch (error) { - console.error('Could not retrieve CREs error:'); - console.error(error); - } + const loadNextPage = useCallback(async () => { + if (isFullStoreLoadedRef.current) { + return; + } + const nextPage = loadedPagesRef.current + 1; + if (nextPage > totalPagesRef.current && totalPagesRef.current > 0) { + return; + } + await loadPage(nextPage); + }, [loadPage]); + + const ensureFullExplorerData = useCallback(async () => { + if (fullLoadRef.current) { + return fullLoadRef.current; + } + + fullLoadRef.current = (async () => { + setFullLoadProgress(null); + if (!loadedPagesRef.current) { + await loadPage(1); } - }, - { - retry: false, - // The query is disabled until hydration is complete - enabled: isHydrated, + while (loadedPagesRef.current < totalPagesRef.current) { + setFullLoadProgress(`${loadedPagesRef.current}/${totalPagesRef.current}`); + await loadPage(loadedPagesRef.current + 1); + } + isFullStoreLoadedRef.current = true; + setIsFullStoreLoaded(true); + setFullLoadProgress(null); + await rebuildDataTree(dataStoreRef.current); + })(); + + try { + await fullLoadRef.current; + } finally { + fullLoadRef.current = null; } - ); + }, [loadPage, rebuildDataTree]); useEffect(() => { - // Refined loading logic to account for the hydration phase - if (!isHydrated) { - setDataLoading(true); - } else { - setDataLoading(getStoreQuery.isLoading || getTreeQuery.isLoading); - } - }, [isHydrated, getStoreQuery.isLoading, getTreeQuery.isLoading]); + const hydrateStateFromDb = async () => { + const cached = await getDbObject(DATA_STORE_CACHE_KEY); + const cachedTree = await getDbObject(DATA_TREE_KEY); + + if (isDataStoreCache(cached) && Object.keys(cached.store).length > 0) { + dataStoreRef.current = cached.store; + setDataStore(cached.store); + setLoadedPages(cached.loadedPages); + setTotalPages(cached.totalPages); + loadedPagesRef.current = cached.loadedPages; + totalPagesRef.current = cached.totalPages; + isFullStoreLoadedRef.current = cached.isFullStoreLoaded; + setIsFullStoreLoaded(cached.isFullStoreLoaded); + if (cachedTree?.length) { + setDataTree(cachedTree); + } + } else if (cached && typeof cached === 'object' && !isDataStoreCache(cached)) { + const legacyStore = cached as Record; + dataStoreRef.current = legacyStore; + setDataStore(legacyStore); + isFullStoreLoadedRef.current = true; + setIsFullStoreLoaded(true); + if (cachedTree?.length) { + setDataTree(cachedTree); + } + } + + setIsHydrated(true); + }; + + hydrateStateFromDb(); + }, []); - // Added 'isHydrated' guard to prevent premature API calls useEffect(() => { - if (isHydrated) { - getStoreQuery.refetch(); + if (!isHydrated || bootstrapDoneRef.current) { + return; } - }, [dataTree, isHydrated]); + bootstrapDoneRef.current = true; + + const bootstrap = async () => { + setDataLoading(true); + try { + if (loadedPagesRef.current === 0 && !isFullStoreLoadedRef.current) { + await loadPage(1); + } else if (Object.keys(dataStoreRef.current).length) { + await rebuildDataTree(dataStoreRef.current); + } + } catch { + // loadPage/rebuildDataTree already set dataLoadError + } finally { + setDataLoading(false); + } + }; + + bootstrap(); + }, [isHydrated, loadPage, rebuildDataTree]); useEffect(() => { - if (isHydrated) { - getTreeQuery.refetch(); + if (!isHydrated || isFullStoreLoaded || loadedPages === 0) { + return; } - }, [dataStore, isHydrated]); // Also removed setDataStore from deps to be safer + + const idleCallback = (window as Window & { requestIdleCallback?: Function }).requestIdleCallback; + const cancelIdleCallback = (window as Window & { cancelIdleCallback?: Function }).cancelIdleCallback; + + const prefetch = () => { + if (!isFullStoreLoadedRef.current && loadedPagesRef.current < totalPagesRef.current) { + loadNextPage(); + } + }; + + if (idleCallback) { + const handle = idleCallback(prefetch, { timeout: 4000 }); + return () => cancelIdleCallback?.(handle); + } + + const timer = window.setTimeout(prefetch, 2000); + return () => window.clearTimeout(timer); + }, [isHydrated, isFullStoreLoaded, loadedPages, totalPages, loadNextPage]); + + const hasMore = !isFullStoreLoaded && loadedPages > 0 && loadedPages < totalPages; return ( { dataStore, dataTree, getStoreKey, + hasMore, + isLoadingMore, + fullLoadProgress, + dataLoadError, + loadNextPage, + ensureFullExplorerData, }} > {children} diff --git a/application/frontend/src/routes.tsx b/application/frontend/src/routes.tsx index f26b63798..d2d495a97 100644 --- a/application/frontend/src/routes.tsx +++ b/application/frontend/src/routes.tsx @@ -17,6 +17,7 @@ import { CommonRequirementEnumeration, Graph, SearchPage, Standard } from './pag import { BrowseRootCres } from './pages/BrowseRootCres/browseRootCres'; import { Chatbot } from './pages/chatbot/chatbot'; import { Explorer } from './pages/Explorer/explorer'; +import { withExplorerLayout } from './pages/Explorer/ExplorerLayout'; import { ExplorerCircles } from './pages/Explorer/visuals/circles/circles'; import { ExplorerForceGraph } from './pages/Explorer/visuals/force-graph/forceGraph'; import { GapAnalysis } from './pages/GapAnalysis/GapAnalysis'; @@ -25,6 +26,10 @@ import { MyOpenCRE } from './pages/MyOpenCRE/MyOpenCRE'; import { SearchName } from './pages/Search/SearchName'; import { StandardSection } from './pages/Standard/StandardSection'; +const ExplorerWithLayout = withExplorerLayout(Explorer); +const ExplorerCirclesWithLayout = withExplorerLayout(ExplorerCircles); +const ExplorerForceGraphWithLayout = withExplorerLayout(ExplorerForceGraph); + export interface IRoute { path: string; component: ReactNode | ReactNode[]; @@ -112,17 +117,17 @@ export const ROUTES = (capabilities: Capabilities): IRoute[] => [ }, { path: `${EXPLORER}/circles`, - component: ExplorerCircles, + component: ExplorerCirclesWithLayout, showFilter: false, }, { path: `${EXPLORER}/force_graph`, - component: ExplorerForceGraph, + component: ExplorerForceGraphWithLayout, showFilter: false, }, { path: `${EXPLORER}`, - component: Explorer, + component: ExplorerWithLayout, showFilter: false, }, ]; diff --git a/application/frontend/www/bundle.js b/application/frontend/www/bundle.js index e5ac0cc91..82b47922d 100644 --- a/application/frontend/www/bundle.js +++ b/application/frontend/www/bundle.js @@ -1,2 +1,2 @@ /*! For license information please see bundle.js.LICENSE.txt */ -(()=>{var e={23:e=>{"use strict";function t(e){e.languages.mizar={comment:/::.+/,keyword:/@proof\b|\b(?:according|aggregate|all|and|antonym|are|as|associativity|assume|asymmetry|attr|be|begin|being|by|canceled|case|cases|clusters?|coherence|commutativity|compatibility|connectedness|consider|consistency|constructors|contradiction|correctness|def|deffunc|define|definitions?|defpred|do|does|end|environ|equals|ex|exactly|existence|for|from|func|given|hence|hereby|holds|idempotence|identity|iff?|implies|involutiveness|irreflexivity|is|it|let|means|mode|non|not|notations?|now|of|or|otherwise|over|per|pred|prefix|projectivity|proof|provided|qua|reconsider|redefine|reduce|reducibility|reflexivity|registrations?|requirements|reserve|sch|schemes?|section|selector|set|sethood|st|struct|such|suppose|symmetry|synonym|take|that|the|then|theorems?|thesis|thus|to|transitivity|uniqueness|vocabular(?:ies|y)|when|where|with|wrt)\b/,parameter:{pattern:/\$(?:10|\d)/,alias:"variable"},variable:/\b\w+(?=:)/,number:/(?:\b|-)\d+\b/,operator:/\.\.\.|->|&|\.?=/,punctuation:/\(#|#\)|[,:;\[\](){}]/}}e.exports=t,t.displayName="mizar",t.aliases=[]},33:e=>{"use strict";function t(e){!function(e){for(var t=/\(\*(?:[^(*]|\((?!\*)|\*(?!\))|)*\*\)/.source,n=0;n<2;n++)t=t.replace(//g,function(){return t});t=t.replace(//g,"[]"),e.languages.coq={comment:RegExp(t),string:{pattern:/"(?:[^"]|"")*"(?!")/,greedy:!0},attribute:[{pattern:RegExp(/#\[(?:[^\[\]("]|"(?:[^"]|"")*"(?!")|\((?!\*)|)*\]/.source.replace(//g,function(){return t})),greedy:!0,alias:"attr-name",inside:{comment:RegExp(t),string:{pattern:/"(?:[^"]|"")*"(?!")/,greedy:!0},operator:/=/,punctuation:/^#\[|\]$|[,()]/}},{pattern:/\b(?:Cumulative|Global|Local|Monomorphic|NonCumulative|Polymorphic|Private|Program)\b/,alias:"attr-name"}],keyword:/\b(?:Abort|About|Add|Admit|Admitted|All|Arguments|As|Assumptions|Axiom|Axioms|Back|BackTo|Backtrace|BinOp|BinOpSpec|BinRel|Bind|Blacklist|Canonical|Case|Cd|Check|Class|Classes|Close|CoFixpoint|CoInductive|Coercion|Coercions|Collection|Combined|Compute|Conjecture|Conjectures|Constant|Constants|Constraint|Constructors|Context|Corollary|Create|CstOp|Custom|Cut|Debug|Declare|Defined|Definition|Delimit|Dependencies|Dependent|Derive|Diffs|Drop|Elimination|End|Entry|Equality|Eval|Example|Existential|Existentials|Existing|Export|Extern|Extraction|Fact|Fail|Field|File|Firstorder|Fixpoint|Flags|Focus|From|Funclass|Function|Functional|GC|Generalizable|Goal|Grab|Grammar|Graph|Guarded|Haskell|Heap|Hide|Hint|HintDb|Hints|Hypotheses|Hypothesis|IF|Identity|Immediate|Implicit|Implicits|Import|Include|Induction|Inductive|Infix|Info|Initial|InjTyp|Inline|Inspect|Instance|Instances|Intro|Intros|Inversion|Inversion_clear|JSON|Language|Left|Lemma|Let|Lia|Libraries|Library|Load|LoadPath|Locate|Ltac|Ltac2|ML|Match|Method|Minimality|Module|Modules|Morphism|Next|NoInline|Notation|Number|OCaml|Obligation|Obligations|Opaque|Open|Optimize|Parameter|Parameters|Parametric|Path|Paths|Prenex|Preterm|Primitive|Print|Profile|Projections|Proof|Prop|PropBinOp|PropOp|PropUOp|Property|Proposition|Pwd|Qed|Quit|Rec|Record|Recursive|Redirect|Reduction|Register|Relation|Remark|Remove|Require|Reserved|Reset|Resolve|Restart|Rewrite|Right|Ring|Rings|SProp|Saturate|Save|Scheme|Scope|Scopes|Search|SearchHead|SearchPattern|SearchRewrite|Section|Separate|Set|Setoid|Show|Signatures|Solve|Solver|Sort|Sortclass|Sorted|Spec|Step|Strategies|Strategy|String|Structure|SubClass|Subgraph|SuchThat|Tactic|Term|TestCompile|Theorem|Time|Timeout|To|Transparent|Type|Typeclasses|Types|Typing|UnOp|UnOpSpec|Undelimit|Undo|Unfocus|Unfocused|Unfold|Universe|Universes|Unshelve|Variable|Variables|Variant|Verbose|View|Visibility|Zify|_|apply|as|at|by|cofix|else|end|exists|exists2|fix|for|forall|fun|if|in|let|match|measure|move|removed|return|struct|then|using|wf|where|with)\b/,number:/\b(?:0x[a-f0-9][a-f0-9_]*(?:\.[a-f0-9_]+)?(?:p[+-]?\d[\d_]*)?|\d[\d_]*(?:\.[\d_]+)?(?:e[+-]?\d[\d_]*)?)\b/i,punct:{pattern:/@\{|\{\||\[=|:>/,alias:"punctuation"},operator:/\/\\|\\\/|\.{2,3}|:{1,2}=|\*\*|[-=]>|<(?:->?|[+:=>]|<:)|>(?:=|->)|\|[-|]?|[-!%&*+/<=>?@^~']/,punctuation:/\.\(|`\(|@\{|`\{|\{\||\[=|:>|[:.,;(){}\[\]]/}}(e)}e.exports=t,t.displayName="coq",t.aliases=[]},41:(e,t)=>{"use strict";var n,r,i,a;if("object"==typeof performance&&"function"==typeof performance.now){var o=performance;t.unstable_now=function(){return o.now()}}else{var s=Date,c=s.now();t.unstable_now=function(){return s.now()-c}}if("undefined"==typeof window||"function"!=typeof MessageChannel){var l=null,u=null,f=function(){if(null!==l)try{var e=t.unstable_now();l(!0,e),l=null}catch(e){throw setTimeout(f,0),e}};n=function(e){null!==l?setTimeout(n,0,e):(l=e,setTimeout(f,0))},r=function(e,t){u=setTimeout(e,t)},i=function(){clearTimeout(u)},t.unstable_shouldYield=function(){return!1},a=t.unstable_forceFrameRate=function(){}}else{var h=window.setTimeout,d=window.clearTimeout;if("undefined"!=typeof console){var p=window.cancelAnimationFrame;"function"!=typeof window.requestAnimationFrame&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills"),"function"!=typeof p&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills")}var g=!1,b=null,m=-1,w=5,v=0;t.unstable_shouldYield=function(){return t.unstable_now()>=v},a=function(){},t.unstable_forceFrameRate=function(e){0>e||125>>1,i=e[r];if(!(void 0!==i&&0T(o,n))void 0!==c&&0>T(c,o)?(e[r]=c,e[s]=n,r=s):(e[r]=o,e[a]=n,r=a);else{if(!(void 0!==c&&0>T(c,n)))break e;e[r]=c,e[s]=n,r=s}}}return t}return null}function T(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}var A=[],k=[],C=1,M=null,I=3,O=!1,R=!1,N=!1;function P(e){for(var t=S(k);null!==t;){if(null===t.callback)x(k);else{if(!(t.startTime<=e))break;x(k),t.sortIndex=t.expirationTime,_(A,t)}t=S(k)}}function L(e){if(N=!1,P(e),!R)if(null!==S(A))R=!0,n(D);else{var t=S(k);null!==t&&r(L,t.startTime-e)}}function D(e,n){R=!1,N&&(N=!1,i()),O=!0;var a=I;try{for(P(n),M=S(A);null!==M&&(!(M.expirationTime>n)||e&&!t.unstable_shouldYield());){var o=M.callback;if("function"==typeof o){M.callback=null,I=M.priorityLevel;var s=o(M.expirationTime<=n);n=t.unstable_now(),"function"==typeof s?M.callback=s:M===S(A)&&x(A),P(n)}else x(A);M=S(A)}if(null!==M)var c=!0;else{var l=S(k);null!==l&&r(L,l.startTime-n),c=!1}return c}finally{M=null,I=a,O=!1}}var F=a;t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_continueExecution=function(){R||O||(R=!0,n(D))},t.unstable_getCurrentPriorityLevel=function(){return I},t.unstable_getFirstCallbackNode=function(){return S(A)},t.unstable_next=function(e){switch(I){case 1:case 2:case 3:var t=3;break;default:t=I}var n=I;I=t;try{return e()}finally{I=n}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=F,t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=I;I=e;try{return t()}finally{I=n}},t.unstable_scheduleCallback=function(e,a,o){var s=t.unstable_now();switch(o="object"==typeof o&&null!==o&&"number"==typeof(o=o.delay)&&0s?(e.sortIndex=o,_(k,e),null===S(A)&&e===S(k)&&(N?i():N=!0,r(L,o-s))):(e.sortIndex=c,_(A,e),R||O||(R=!0,n(D))),e},t.unstable_wrapCallback=function(e){var t=I;return function(){var n=I;I=t;try{return e.apply(this,arguments)}finally{I=n}}}},56:e=>{"use strict";function t(e){!function(e){var t={pattern:/(\b\d+)(?:%|[a-z]+)/,lookbehind:!0},n={pattern:/(^|[^\w.-])-?(?:\d+(?:\.\d+)?|\.\d+)/,lookbehind:!0},r={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0},url:{pattern:/\burl\((["']?).*?\1\)/i,greedy:!0},string:{pattern:/("|')(?:(?!\1)[^\\\r\n]|\\(?:\r\n|[\s\S]))*\1/,greedy:!0},interpolation:null,func:null,important:/\B!(?:important|optional)\b/i,keyword:{pattern:/(^|\s+)(?:(?:else|for|if|return|unless)(?=\s|$)|@[\w-]+)/,lookbehind:!0},hexcode:/#[\da-f]{3,6}/i,color:[/\b(?:AliceBlue|AntiqueWhite|Aqua|Aquamarine|Azure|Beige|Bisque|Black|BlanchedAlmond|Blue|BlueViolet|Brown|BurlyWood|CadetBlue|Chartreuse|Chocolate|Coral|CornflowerBlue|Cornsilk|Crimson|Cyan|DarkBlue|DarkCyan|DarkGoldenRod|DarkGr[ae]y|DarkGreen|DarkKhaki|DarkMagenta|DarkOliveGreen|DarkOrange|DarkOrchid|DarkRed|DarkSalmon|DarkSeaGreen|DarkSlateBlue|DarkSlateGr[ae]y|DarkTurquoise|DarkViolet|DeepPink|DeepSkyBlue|DimGr[ae]y|DodgerBlue|FireBrick|FloralWhite|ForestGreen|Fuchsia|Gainsboro|GhostWhite|Gold|GoldenRod|Gr[ae]y|Green|GreenYellow|HoneyDew|HotPink|IndianRed|Indigo|Ivory|Khaki|Lavender|LavenderBlush|LawnGreen|LemonChiffon|LightBlue|LightCoral|LightCyan|LightGoldenRodYellow|LightGr[ae]y|LightGreen|LightPink|LightSalmon|LightSeaGreen|LightSkyBlue|LightSlateGr[ae]y|LightSteelBlue|LightYellow|Lime|LimeGreen|Linen|Magenta|Maroon|MediumAquaMarine|MediumBlue|MediumOrchid|MediumPurple|MediumSeaGreen|MediumSlateBlue|MediumSpringGreen|MediumTurquoise|MediumVioletRed|MidnightBlue|MintCream|MistyRose|Moccasin|NavajoWhite|Navy|OldLace|Olive|OliveDrab|Orange|OrangeRed|Orchid|PaleGoldenRod|PaleGreen|PaleTurquoise|PaleVioletRed|PapayaWhip|PeachPuff|Peru|Pink|Plum|PowderBlue|Purple|Red|RosyBrown|RoyalBlue|SaddleBrown|Salmon|SandyBrown|SeaGreen|SeaShell|Sienna|Silver|SkyBlue|SlateBlue|SlateGr[ae]y|Snow|SpringGreen|SteelBlue|Tan|Teal|Thistle|Tomato|Transparent|Turquoise|Violet|Wheat|White|WhiteSmoke|Yellow|YellowGreen)\b/i,{pattern:/\b(?:hsl|rgb)\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*\)\B|\b(?:hsl|rgb)a\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*,\s*(?:0|0?\.\d+|1)\s*\)\B/i,inside:{unit:t,number:n,function:/[\w-]+(?=\()/,punctuation:/[(),]/}}],entity:/\\[\da-f]{1,8}/i,unit:t,boolean:/\b(?:false|true)\b/,operator:[/~|[+!\/%<>?=]=?|[-:]=|\*[*=]?|\.{2,3}|&&|\|\||\B-\B|\b(?:and|in|is(?: a| defined| not|nt)?|not|or)\b/],number:n,punctuation:/[{}()\[\];:,]/};r.interpolation={pattern:/\{[^\r\n}:]+\}/,alias:"variable",inside:{delimiter:{pattern:/^\{|\}$/,alias:"punctuation"},rest:r}},r.func={pattern:/[\w-]+\([^)]*\).*/,inside:{function:/^[^(]+/,rest:r}},e.languages.stylus={"atrule-declaration":{pattern:/(^[ \t]*)@.+/m,lookbehind:!0,inside:{atrule:/^@[\w-]+/,rest:r}},"variable-declaration":{pattern:/(^[ \t]*)[\w$-]+\s*.?=[ \t]*(?:\{[^{}]*\}|\S.*|$)/m,lookbehind:!0,inside:{variable:/^\S+/,rest:r}},statement:{pattern:/(^[ \t]*)(?:else|for|if|return|unless)[ \t].+/m,lookbehind:!0,inside:{keyword:/^\S+/,rest:r}},"property-declaration":{pattern:/((?:^|\{)([ \t]*))(?:[\w-]|\{[^}\r\n]+\})+(?:\s*:\s*|[ \t]+)(?!\s)[^{\r\n]*(?:;|[^{\r\n,]$(?!(?:\r?\n|\r)(?:\{|\2[ \t])))/m,lookbehind:!0,inside:{property:{pattern:/^[^\s:]+/,inside:{interpolation:r.interpolation}},rest:r}},selector:{pattern:/(^[ \t]*)(?:(?=\S)(?:[^{}\r\n:()]|::?[\w-]+(?:\([^)\r\n]*\)|(?![\w-]))|\{[^}\r\n]+\})+)(?:(?:\r?\n|\r)(?:\1(?:(?=\S)(?:[^{}\r\n:()]|::?[\w-]+(?:\([^)\r\n]*\)|(?![\w-]))|\{[^}\r\n]+\})+)))*(?:,$|\{|(?=(?:\r?\n|\r)(?:\{|\1[ \t])))/m,lookbehind:!0,inside:{interpolation:r.interpolation,comment:r.comment,punctuation:/[{},]/}},func:r.func,string:r.string,comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0,greedy:!0},interpolation:r.interpolation,punctuation:/[{}()\[\];:.]/}}(e)}e.exports=t,t.displayName="stylus",t.aliases=[]},58:e=>{"use strict";function t(e){!function(e){var t=/(?:\r?\n|\r)[ \t]*\|.+\|(?:(?!\|).)*/.source;e.languages.gherkin={pystring:{pattern:/("""|''')[\s\S]+?\1/,alias:"string"},comment:{pattern:/(^[ \t]*)#.*/m,lookbehind:!0},tag:{pattern:/(^[ \t]*)@\S*/m,lookbehind:!0},feature:{pattern:/((?:^|\r?\n|\r)[ \t]*)(?:Ability|Ahoy matey!|Arwedd|Aspekt|Besigheid Behoefte|Business Need|Caracteristica|Característica|Egenskab|Egenskap|Eiginleiki|Feature|Fīča|Fitur|Fonctionnalité|Fonksyonalite|Funcionalidade|Funcionalitat|Functionalitate|Funcţionalitate|Funcționalitate|Functionaliteit|Fungsi|Funkcia|Funkcija|Funkcionalitāte|Funkcionalnost|Funkcja|Funksie|Funktionalität|Funktionalitéit|Funzionalità|Hwaet|Hwæt|Jellemző|Karakteristik|Lastnost|Mak|Mogucnost|laH|Mogućnost|Moznosti|Možnosti|OH HAI|Omadus|Ominaisuus|Osobina|Özellik|Potrzeba biznesowa|perbogh|poQbogh malja'|Požadavek|Požiadavka|Pretty much|Qap|Qu'meH 'ut|Savybė|Tính năng|Trajto|Vermoë|Vlastnosť|Właściwość|Značilnost|Δυνατότητα|Λειτουργία|Могућност|Мөмкинлек|Особина|Свойство|Үзенчәлеклелек|Функционал|Функционалност|Функция|Функціонал|תכונה|خاصية|خصوصیت|صلاحیت|کاروبار کی ضرورت|وِیژگی|रूप लेख|ਖਾਸੀਅਤ|ਨਕਸ਼ ਨੁਹਾਰ|ਮੁਹਾਂਦਰਾ|గుణము|ಹೆಚ್ಚಳ|ความต้องการทางธุรกิจ|ความสามารถ|โครงหลัก|기능|フィーチャ|功能|機能):(?:[^:\r\n]+(?:\r?\n|\r|$))*/,lookbehind:!0,inside:{important:{pattern:/(:)[^\r\n]+/,lookbehind:!0},keyword:/[^:\r\n]+:/}},scenario:{pattern:/(^[ \t]*)(?:Abstract Scenario|Abstrakt Scenario|Achtergrond|Aer|Ær|Agtergrond|All y'all|Antecedentes|Antecedents|Atburðarás|Atburðarásir|Awww, look mate|B4|Background|Baggrund|Bakgrund|Bakgrunn|Bakgrunnur|Beispiele|Beispiller|Bối cảnh|Cefndir|Cenario|Cenário|Cenario de Fundo|Cenário de Fundo|Cenarios|Cenários|Contesto|Context|Contexte|Contexto|Conto|Contoh|Contone|Dæmi|Dasar|Dead men tell no tales|Delineacao do Cenario|Delineação do Cenário|Dis is what went down|Dữ liệu|Dyagram Senaryo|Dyagram senaryo|Egzanp|Ejemplos|Eksempler|Ekzemploj|Enghreifftiau|Esbozo do escenario|Escenari|Escenario|Esempi|Esquema de l'escenari|Esquema del escenario|Esquema do Cenario|Esquema do Cenário|EXAMPLZ|Examples|Exempel|Exemple|Exemples|Exemplos|First off|Fono|Forgatókönyv|Forgatókönyv vázlat|Fundo|Geçmiş|Grundlage|Hannergrond|ghantoH|Háttér|Heave to|Istorik|Juhtumid|Keadaan|Khung kịch bản|Khung tình huống|Kịch bản|Koncept|Konsep skenario|Kontèks|Kontekst|Kontekstas|Konteksts|Kontext|Konturo de la scenaro|Latar Belakang|lut chovnatlh|lut|lutmey|Lýsing Atburðarásar|Lýsing Dæma|MISHUN SRSLY|MISHUN|Menggariskan Senario|mo'|Náčrt Scenára|Náčrt Scénáře|Náčrt Scenáru|Oris scenarija|Örnekler|Osnova|Osnova Scenára|Osnova scénáře|Osnutek|Ozadje|Paraugs|Pavyzdžiai|Példák|Piemēri|Plan du scénario|Plan du Scénario|Plan Senaryo|Plan senaryo|Plang vum Szenario|Pozadí|Pozadie|Pozadina|Príklady|Příklady|Primer|Primeri|Primjeri|Przykłady|Raamstsenaarium|Reckon it's like|Rerefons|Scenár|Scénář|Scenarie|Scenarij|Scenarijai|Scenarijaus šablonas|Scenariji|Scenārijs|Scenārijs pēc parauga|Scenarijus|Scenario|Scénario|Scenario Amlinellol|Scenario Outline|Scenario Template|Scenariomal|Scenariomall|Scenarios|Scenariu|Scenariusz|Scenaro|Schema dello scenario|Se ðe|Se the|Se þe|Senario|Senaryo Deskripsyon|Senaryo deskripsyon|Senaryo|Senaryo taslağı|Shiver me timbers|Situācija|Situai|Situasie Uiteensetting|Situasie|Skenario konsep|Skenario|Skica|Structura scenariu|Structură scenariu|Struktura scenarija|Stsenaarium|Swa hwaer swa|Swa|Swa hwær swa|Szablon scenariusza|Szenario|Szenariogrundriss|Tapaukset|Tapaus|Tapausaihio|Taust|Tausta|Template Keadaan|Template Senario|Template Situai|The thing of it is|Tình huống|Variantai|Voorbeelde|Voorbeelden|Wharrimean is|Yo-ho-ho|You'll wanna|Założenia|Παραδείγματα|Περιγραφή Σεναρίου|Σενάρια|Σενάριο|Υπόβαθρο|Кереш|Контекст|Концепт|Мисаллар|Мисоллар|Основа|Передумова|Позадина|Предистория|Предыстория|Приклади|Пример|Примери|Примеры|Рамка на сценарий|Скица|Структура сценарија|Структура сценария|Структура сценарію|Сценарий|Сценарий структураси|Сценарийның төзелеше|Сценарији|Сценарио|Сценарій|Тарих|Үрнәкләр|דוגמאות|רקע|תבנית תרחיש|תרחיש|الخلفية|الگوی سناریو|امثلة|پس منظر|زمینه|سناریو|سيناريو|سيناريو مخطط|مثالیں|منظر نامے کا خاکہ|منظرنامہ|نمونه ها|उदाहरण|परिदृश्य|परिदृश्य रूपरेखा|पृष्ठभूमि|ਉਦਾਹਰਨਾਂ|ਪਟਕਥਾ|ਪਟਕਥਾ ਢਾਂਚਾ|ਪਟਕਥਾ ਰੂਪ ਰੇਖਾ|ਪਿਛੋਕੜ|ఉదాహరణలు|కథనం|నేపథ్యం|సన్నివేశం|ಉದಾಹರಣೆಗಳು|ಕಥಾಸಾರಾಂಶ|ವಿವರಣೆ|ಹಿನ್ನೆಲೆ|โครงสร้างของเหตุการณ์|ชุดของตัวอย่าง|ชุดของเหตุการณ์|แนวคิด|สรุปเหตุการณ์|เหตุการณ์|배경|시나리오|시나리오 개요|예|サンプル|シナリオ|シナリオアウトライン|シナリオテンプレ|シナリオテンプレート|テンプレ|例|例子|剧本|剧本大纲|劇本|劇本大綱|场景|场景大纲|場景|場景大綱|背景):[^:\r\n]*/m,lookbehind:!0,inside:{important:{pattern:/(:)[^\r\n]*/,lookbehind:!0},keyword:/[^:\r\n]+:/}},"table-body":{pattern:RegExp("("+t+")(?:"+t+")+"),lookbehind:!0,inside:{outline:{pattern:/<[^>]+>/,alias:"variable"},td:{pattern:/\s*[^\s|][^|]*/,alias:"string"},punctuation:/\|/}},"table-head":{pattern:RegExp(t),inside:{th:{pattern:/\s*[^\s|][^|]*/,alias:"variable"},punctuation:/\|/}},atrule:{pattern:/(^[ \t]+)(?:'a|'ach|'ej|7|a|A také|A taktiež|A tiež|A zároveň|Aber|Ac|Adott|Akkor|Ak|Aleshores|Ale|Ali|Allora|Alors|Als|Ama|Amennyiben|Amikor|Ampak|an|AN|Ananging|And y'all|And|Angenommen|Anrhegedig a|An|Apabila|Atès|Atesa|Atunci|Avast!|Aye|A|awer|Bagi|Banjur|Bet|Biết|Blimey!|Buh|But at the end of the day I reckon|But y'all|But|BUT|Cal|Când|Cand|Cando|Ce|Cuando|Če|Ða ðe|Ða|Dadas|Dada|Dados|Dado|DaH ghu' bejlu'|dann|Dann|Dano|Dan|Dar|Dat fiind|Data|Date fiind|Date|Dati fiind|Dati|Daţi fiind|Dați fiind|DEN|Dato|De|Den youse gotta|Dengan|Diberi|Diyelim ki|Donada|Donat|Donitaĵo|Do|Dun|Duota|Ðurh|Eeldades|Ef|Eğer ki|Entao|Então|Entón|E|En|Entonces|Epi|És|Etant donnée|Etant donné|Et|Étant données|Étant donnée|Étant donné|Etant données|Etant donnés|Étant donnés|Fakat|Gangway!|Gdy|Gegeben seien|Gegeben sei|Gegeven|Gegewe|ghu' noblu'|Gitt|Given y'all|Given|Givet|Givun|Ha|Cho|I CAN HAZ|In|Ir|It's just unbelievable|I|Ja|Jeśli|Jeżeli|Kad|Kada|Kadar|Kai|Kaj|Když|Keď|Kemudian|Ketika|Khi|Kiedy|Ko|Kuid|Kui|Kun|Lan|latlh|Le sa a|Let go and haul|Le|Lè sa a|Lè|Logo|Lorsqu'<|Lorsque|mä|Maar|Mais|Mając|Ma|Majd|Maka|Manawa|Mas|Men|Menawa|Mutta|Nalika|Nalikaning|Nanging|Når|När|Nato|Nhưng|Niin|Njuk|O zaman|Och|Og|Oletetaan|Ond|Onda|Oraz|Pak|Pero|Però|Podano|Pokiaľ|Pokud|Potem|Potom|Privzeto|Pryd|Quan|Quand|Quando|qaSDI'|Så|Sed|Se|Siis|Sipoze ke|Sipoze Ke|Sipoze|Si|Şi|Și|Soit|Stel|Tada|Tad|Takrat|Tak|Tapi|Ter|Tetapi|Tha the|Tha|Then y'all|Then|Thì|Thurh|Toda|Too right|Un|Und|ugeholl|Và|vaj|Vendar|Ve|wann|Wanneer|WEN|Wenn|When y'all|When|Wtedy|Wun|Y'know|Yeah nah|Yna|Youse know like when|Youse know when youse got|Y|Za predpokladu|Za předpokladu|Zadan|Zadani|Zadano|Zadate|Zadato|Zakładając|Zaradi|Zatati|Þa þe|Þa|Þá|Þegar|Þurh|Αλλά|Δεδομένου|Και|Όταν|Τότε|А також|Агар|Але|Али|Аммо|А|Әгәр|Әйтик|Әмма|Бирок|Ва|Вә|Дадено|Дано|Допустим|Если|Задате|Задати|Задато|И|І|К тому же|Када|Кад|Когато|Когда|Коли|Ләкин|Лекин|Нәтиҗәдә|Нехай|Но|Онда|Припустимо, що|Припустимо|Пусть|Также|Та|Тогда|Тоді|То|Унда|Һәм|Якщо|אבל|אזי|אז|בהינתן|וגם|כאשר|آنگاه|اذاً|اگر|اما|اور|با فرض|بالفرض|بفرض|پھر|تب|ثم|جب|عندما|فرض کیا|لكن|لیکن|متى|هنگامی|و|अगर|और|कदा|किन्तु|चूंकि|जब|तथा|तदा|तब|परन्तु|पर|यदि|ਅਤੇ|ਜਦੋਂ|ਜਿਵੇਂ ਕਿ|ਜੇਕਰ|ਤਦ|ਪਰ|అప్పుడు|ఈ పరిస్థితిలో|కాని|చెప్పబడినది|మరియు|ಆದರೆ|ನಂತರ|ನೀಡಿದ|ಮತ್ತು|ಸ್ಥಿತಿಯನ್ನು|กำหนดให้|ดังนั้น|แต่|เมื่อ|และ|그러면<|그리고<|단<|만약<|만일<|먼저<|조건<|하지만<|かつ<|しかし<|ただし<|ならば<|もし<|並且<|但し<|但是<|假如<|假定<|假設<|假设<|前提<|同时<|同時<|并且<|当<|當<|而且<|那么<|那麼<)(?=[ \t])/m,lookbehind:!0},string:{pattern:/"(?:\\.|[^"\\\r\n])*"|'(?:\\.|[^'\\\r\n])*'/,inside:{outline:{pattern:/<[^>]+>/,alias:"variable"}}},outline:{pattern:/<[^>]+>/,alias:"variable"}}}(e)}e.exports=t,t.displayName="gherkin",t.aliases=[]},60:e=>{"use strict";function t(e){e.languages.xojo={comment:{pattern:/(?:'|\/\/|Rem\b).+/i,greedy:!0},string:{pattern:/"(?:""|[^"])*"/,greedy:!0},number:[/(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:E[+-]?\d+)?/i,/&[bchou][a-z\d]+/i],directive:{pattern:/#(?:Else|ElseIf|Endif|If|Pragma)\b/i,alias:"property"},keyword:/\b(?:AddHandler|App|Array|As(?:signs)?|Auto|Boolean|Break|By(?:Ref|Val)|Byte|Call|Case|Catch|CFStringRef|CGFloat|Class|Color|Const|Continue|CString|Currency|CurrentMethodName|Declare|Delegate|Dim|Do(?:uble|wnTo)?|Each|Else(?:If)?|End|Enumeration|Event|Exception|Exit|Extends|False|Finally|For|Function|Get|GetTypeInfo|Global|GOTO|If|Implements|In|Inherits|Int(?:8|16|32|64|eger|erface)?|Lib|Loop|Me|Module|Next|Nil|Object|Optional|OSType|ParamArray|Private|Property|Protected|PString|Ptr|Raise(?:Event)?|ReDim|RemoveHandler|Return|Select(?:or)?|Self|Set|Shared|Short|Single|Soft|Static|Step|String|Sub|Super|Text|Then|To|True|Try|Ubound|UInt(?:8|16|32|64|eger)?|Until|Using|Var(?:iant)?|Wend|While|WindowPtr|WString)\b/i,operator:/<[=>]?|>=?|[+\-*\/\\^=]|\b(?:AddressOf|And|Ctype|IsA?|Mod|New|Not|Or|WeakAddressOf|Xor)\b/i,punctuation:/[.,;:()]/}}e.exports=t,t.displayName="xojo",t.aliases=[]},61:e=>{"use strict";function t(e){e.languages["splunk-spl"]={comment:/`comment\("(?:\\.|[^\\"])*"\)`/,string:{pattern:/"(?:\\.|[^\\"])*"/,greedy:!0},keyword:/\b(?:abstract|accum|addcoltotals|addinfo|addtotals|analyzefields|anomalies|anomalousvalue|anomalydetection|append|appendcols|appendcsv|appendlookup|appendpipe|arules|associate|audit|autoregress|bin|bucket|bucketdir|chart|cluster|cofilter|collect|concurrency|contingency|convert|correlate|datamodel|dbinspect|dedup|delete|delta|diff|erex|eval|eventcount|eventstats|extract|fieldformat|fields|fieldsummary|filldown|fillnull|findtypes|folderize|foreach|format|from|gauge|gentimes|geom|geomfilter|geostats|head|highlight|history|iconify|input|inputcsv|inputlookup|iplocation|join|kmeans|kv|kvform|loadjob|localize|localop|lookup|makecontinuous|makemv|makeresults|map|mcollect|metadata|metasearch|meventcollect|mstats|multikv|multisearch|mvcombine|mvexpand|nomv|outlier|outputcsv|outputlookup|outputtext|overlap|pivot|predict|rangemap|rare|regex|relevancy|reltime|rename|replace|rest|return|reverse|rex|rtorder|run|savedsearch|script|scrub|search|searchtxn|selfjoin|sendemail|set|setfields|sichart|sirare|sistats|sitimechart|sitop|sort|spath|stats|strcat|streamstats|table|tags|tail|timechart|timewrap|top|transaction|transpose|trendline|tscollect|tstats|typeahead|typelearner|typer|union|uniq|untable|where|x11|xmlkv|xmlunescape|xpath|xyseries)\b/i,"operator-word":{pattern:/\b(?:and|as|by|not|or|xor)\b/i,alias:"operator"},function:/\b\w+(?=\s*\()/,property:/\b\w+(?=\s*=(?!=))/,date:{pattern:/\b\d{1,2}\/\d{1,2}\/\d{1,4}(?:(?::\d{1,2}){3})?\b/,alias:"number"},number:/\b\d+(?:\.\d+)?\b/,boolean:/\b(?:f|false|t|true)\b/i,operator:/[<>=]=?|[-+*/%|]/,punctuation:/[()[\],]/}}e.exports=t,t.displayName="splunkSpl",t.aliases=[]},70:(e,t,n)=>{"use strict";var r=n(8433);function i(e){e.register(r),e.languages.objectivec=e.languages.extend("c",{string:{pattern:/@?"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},keyword:/\b(?:asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|in|inline|int|long|register|return|self|short|signed|sizeof|static|struct|super|switch|typedef|typeof|union|unsigned|void|volatile|while)\b|(?:@interface|@end|@implementation|@protocol|@class|@public|@protected|@private|@property|@try|@catch|@finally|@throw|@synthesize|@dynamic|@selector)\b/,operator:/-[->]?|\+\+?|!=?|<>?=?|==?|&&?|\|\|?|[~^%?*\/@]/}),delete e.languages.objectivec["class-name"],e.languages.objc=e.languages.objectivec}e.exports=i,i.displayName="objectivec",i.aliases=["objc"]},73:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(5248),i=n.n(r)()(function(e){return e[1]});i.push([e.id,"main#gap-analysis{padding:30px;margin:var(--header-height) 0}main#gap-analysis span.name{padding:0 10px}@media(min-width: 0px)and (max-width: 500px){main#gap-analysis span.name{width:85px;display:inline-block}}",""]);const a=i},81:(e,t,n)=>{const r=n(3103);function i(e,t){return`\n${o(e,t)}\n${a(e)}\nreturn {Body: Body, Vector: Vector};\n`}function a(e){let t=r(e),n=t("{var}",{join:", "});return`\nfunction Body(${n}) {\n this.isPinned = false;\n this.pos = new Vector(${n});\n this.force = new Vector();\n this.velocity = new Vector();\n this.mass = 1;\n\n this.springCount = 0;\n this.springLength = 0;\n}\n\nBody.prototype.reset = function() {\n this.force.reset();\n this.springCount = 0;\n this.springLength = 0;\n}\n\nBody.prototype.setPosition = function (${n}) {\n ${t("this.pos.{var} = {var} || 0;",{indent:2})}\n};`}function o(e,t){let n=r(e),i="";return t&&(i=`${n("\n var v{var};\nObject.defineProperty(this, '{var}', {\n set: function(v) { \n if (!Number.isFinite(v)) throw new Error('Cannot set non-numbers to {var}');\n v{var} = v; \n },\n get: function() { return v{var}; }\n});")}`),`function Vector(${n("{var}",{join:", "})}) {\n ${i}\n if (typeof arguments[0] === 'object') {\n // could be another vector\n let v = arguments[0];\n ${n('if (!Number.isFinite(v.{var})) throw new Error("Expected value is not a finite number at Vector constructor ({var})");',{indent:4})}\n ${n("this.{var} = v.{var};",{indent:4})}\n } else {\n ${n('this.{var} = typeof {var} === "number" ? {var} : 0;',{indent:4})}\n }\n }\n \n Vector.prototype.reset = function () {\n ${n("this.{var} = ",{join:""})}0;\n };`}e.exports=function(e,t){let n=i(e,t),{Body:r}=new Function(n)();return r},e.exports.generateCreateBodyFunctionBody=i,e.exports.getVectorCode=o,e.exports.getBodyCode=a},94:(e,t,n)=>{"use strict";var r=n(618);function i(e){e.register(r),function(e){e.languages.crystal=e.languages.extend("ruby",{keyword:[/\b(?:__DIR__|__END_LINE__|__FILE__|__LINE__|abstract|alias|annotation|as|asm|begin|break|case|class|def|do|else|elsif|end|ensure|enum|extend|for|fun|if|ifdef|include|instance_sizeof|lib|macro|module|next|of|out|pointerof|private|protected|ptr|require|rescue|return|select|self|sizeof|struct|super|then|type|typeof|undef|uninitialized|union|unless|until|when|while|with|yield)\b/,{pattern:/(\.\s*)(?:is_a|responds_to)\?/,lookbehind:!0}],number:/\b(?:0b[01_]*[01]|0o[0-7_]*[0-7]|0x[\da-fA-F_]*[\da-fA-F]|(?:\d(?:[\d_]*\d)?)(?:\.[\d_]*\d)?(?:[eE][+-]?[\d_]*\d)?)(?:_(?:[uif](?:8|16|32|64))?)?\b/,operator:[/->/,e.languages.ruby.operator],punctuation:/[(){}[\].,;\\]/}),e.languages.insertBefore("crystal","string-literal",{attribute:{pattern:/@\[.*?\]/,inside:{delimiter:{pattern:/^@\[|\]$/,alias:"punctuation"},attribute:{pattern:/^(\s*)\w+/,lookbehind:!0,alias:"class-name"},args:{pattern:/\S(?:[\s\S]*\S)?/,inside:e.languages.crystal}}},expansion:{pattern:/\{(?:\{.*?\}|%.*?%)\}/,inside:{content:{pattern:/^(\{.)[\s\S]+(?=.\}$)/,lookbehind:!0,inside:e.languages.crystal},delimiter:{pattern:/^\{[\{%]|[\}%]\}$/,alias:"operator"}}},char:{pattern:/'(?:[^\\\r\n]{1,2}|\\(?:.|u(?:[A-Fa-f0-9]{1,4}|\{[A-Fa-f0-9]{1,6}\})))'/,greedy:!0}})}(e)}e.exports=i,i.displayName="crystal",i.aliases=[]},98:(e,t,n)=>{"use strict";var r=n(2046),i=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];e.exports=function(e){var t,n,a,o={};return e?(r.forEach(e.split("\n"),function(e){if(a=e.indexOf(":"),t=r.trim(e.substr(0,a)).toLowerCase(),n=r.trim(e.substr(a+1)),t){if(o[t]&&i.indexOf(t)>=0)return;o[t]="set-cookie"===t?(o[t]?o[t]:[]).concat([n]):o[t]?o[t]+", "+n:n}}),o):o}},153:e=>{"use strict";function t(e){!function(e){e.languages.diff={coord:[/^(?:\*{3}|-{3}|\+{3}).*$/m,/^@@.*@@$/m,/^\d.*$/m]};var t={"deleted-sign":"-","deleted-arrow":"<","inserted-sign":"+","inserted-arrow":">",unchanged:" ",diff:"!"};Object.keys(t).forEach(function(n){var r=t[n],i=[];/^\w+$/.test(n)||i.push(/\w+/.exec(n)[0]),"diff"===n&&i.push("bold"),e.languages.diff[n]={pattern:RegExp("^(?:["+r+"].*(?:\r\n?|\n|(?![\\s\\S])))+","m"),alias:i,inside:{line:{pattern:/(.)(?=[\s\S]).*(?:\r\n?|\n)?/,lookbehind:!0},prefix:{pattern:/[\s\S]/,alias:/\w+/.exec(n)[0]}}}}),Object.defineProperty(e.languages.diff,"PREFIXES",{value:t})}(e)}e.exports=t,t.displayName="diff",t.aliases=[]},164:(e,t,n)=>{"use strict";var r=n(5880);function i(e){e.register(r),e.languages.plsql=e.languages.extend("sql",{comment:{pattern:/\/\*[\s\S]*?\*\/|--.*/,greedy:!0},keyword:/\b(?:A|ACCESSIBLE|ADD|AGENT|AGGREGATE|ALL|ALTER|AND|ANY|ARRAY|AS|ASC|AT|ATTRIBUTE|AUTHID|AVG|BEGIN|BETWEEN|BFILE_BASE|BINARY|BLOB_BASE|BLOCK|BODY|BOTH|BOUND|BULK|BY|BYTE|C|CALL|CALLING|CASCADE|CASE|CHAR|CHARACTER|CHARSET|CHARSETFORM|CHARSETID|CHAR_BASE|CHECK|CLOB_BASE|CLONE|CLOSE|CLUSTER|CLUSTERS|COLAUTH|COLLECT|COLUMNS|COMMENT|COMMIT|COMMITTED|COMPILED|COMPRESS|CONNECT|CONSTANT|CONSTRUCTOR|CONTEXT|CONTINUE|CONVERT|COUNT|CRASH|CREATE|CREDENTIAL|CURRENT|CURSOR|CUSTOMDATUM|DANGLING|DATA|DATE|DATE_BASE|DAY|DECLARE|DEFAULT|DEFINE|DELETE|DESC|DETERMINISTIC|DIRECTORY|DISTINCT|DOUBLE|DROP|DURATION|ELEMENT|ELSE|ELSIF|EMPTY|END|ESCAPE|EXCEPT|EXCEPTION|EXCEPTIONS|EXCLUSIVE|EXECUTE|EXISTS|EXIT|EXTERNAL|FETCH|FINAL|FIRST|FIXED|FLOAT|FOR|FORALL|FORCE|FROM|FUNCTION|GENERAL|GOTO|GRANT|GROUP|HASH|HAVING|HEAP|HIDDEN|HOUR|IDENTIFIED|IF|IMMEDIATE|IMMUTABLE|IN|INCLUDING|INDEX|INDEXES|INDICATOR|INDICES|INFINITE|INSERT|INSTANTIABLE|INT|INTERFACE|INTERSECT|INTERVAL|INTO|INVALIDATE|IS|ISOLATION|JAVA|LANGUAGE|LARGE|LEADING|LENGTH|LEVEL|LIBRARY|LIKE|LIKE2|LIKE4|LIKEC|LIMIT|LIMITED|LOCAL|LOCK|LONG|LOOP|MAP|MAX|MAXLEN|MEMBER|MERGE|MIN|MINUS|MINUTE|MOD|MODE|MODIFY|MONTH|MULTISET|MUTABLE|NAME|NAN|NATIONAL|NATIVE|NCHAR|NEW|NOCOMPRESS|NOCOPY|NOT|NOWAIT|NULL|NUMBER_BASE|OBJECT|OCICOLL|OCIDATE|OCIDATETIME|OCIDURATION|OCIINTERVAL|OCILOBLOCATOR|OCINUMBER|OCIRAW|OCIREF|OCIREFCURSOR|OCIROWID|OCISTRING|OCITYPE|OF|OLD|ON|ONLY|OPAQUE|OPEN|OPERATOR|OPTION|OR|ORACLE|ORADATA|ORDER|ORGANIZATION|ORLANY|ORLVARY|OTHERS|OUT|OVERLAPS|OVERRIDING|PACKAGE|PARALLEL_ENABLE|PARAMETER|PARAMETERS|PARENT|PARTITION|PASCAL|PERSISTABLE|PIPE|PIPELINED|PLUGGABLE|POLYMORPHIC|PRAGMA|PRECISION|PRIOR|PRIVATE|PROCEDURE|PUBLIC|RAISE|RANGE|RAW|READ|RECORD|REF|REFERENCE|RELIES_ON|REM|REMAINDER|RENAME|RESOURCE|RESULT|RESULT_CACHE|RETURN|RETURNING|REVERSE|REVOKE|ROLLBACK|ROW|SAMPLE|SAVE|SAVEPOINT|SB1|SB2|SB4|SECOND|SEGMENT|SELECT|SELF|SEPARATE|SEQUENCE|SERIALIZABLE|SET|SHARE|SHORT|SIZE|SIZE_T|SOME|SPARSE|SQL|SQLCODE|SQLDATA|SQLNAME|SQLSTATE|STANDARD|START|STATIC|STDDEV|STORED|STRING|STRUCT|STYLE|SUBMULTISET|SUBPARTITION|SUBSTITUTABLE|SUBTYPE|SUM|SYNONYM|TABAUTH|TABLE|TDO|THE|THEN|TIME|TIMESTAMP|TIMEZONE_ABBR|TIMEZONE_HOUR|TIMEZONE_MINUTE|TIMEZONE_REGION|TO|TRAILING|TRANSACTION|TRANSACTIONAL|TRUSTED|TYPE|UB1|UB2|UB4|UNDER|UNION|UNIQUE|UNPLUG|UNSIGNED|UNTRUSTED|UPDATE|USE|USING|VALIST|VALUE|VALUES|VARIABLE|VARIANCE|VARRAY|VARYING|VIEW|VIEWS|VOID|WHEN|WHERE|WHILE|WITH|WORK|WRAPPED|WRITE|YEAR|ZONE)\b/i,operator:/:=?|=>|[<>^~!]=|\.\.|\|\||\*\*|[-+*/%<>=@]/}),e.languages.insertBefore("plsql","operator",{label:{pattern:/<<\s*\w+\s*>>/,alias:"symbol"}})}e.exports=i,i.displayName="plsql",i.aliases=[]},187:e=>{"use strict";function t(e){e.languages.jolie=e.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\[\s\S]|[^"\\])*"/,lookbehind:!0,greedy:!0},"class-name":{pattern:/((?:\b(?:as|courier|embed|in|inputPort|outputPort|service)\b|@)[ \t]*)\w+/,lookbehind:!0},keyword:/\b(?:as|cH|comp|concurrent|constants|courier|cset|csets|default|define|else|embed|embedded|execution|exit|extender|for|foreach|forward|from|global|if|import|in|include|init|inputPort|install|instanceof|interface|is_defined|linkIn|linkOut|main|new|nullProcess|outputPort|over|private|provide|public|scope|sequential|service|single|spawn|synchronized|this|throw|throws|type|undef|until|while|with)\b/,function:/\b[a-z_]\w*(?=[ \t]*[@(])/i,number:/(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?l?/i,operator:/-[-=>]?|\+[+=]?|<[<=]?|[>=*!]=?|&&|\|\||[?\/%^@|]/,punctuation:/[()[\]{},;.:]/,builtin:/\b(?:Byte|any|bool|char|double|enum|float|int|length|long|ranges|regex|string|undefined|void)\b/}),e.languages.insertBefore("jolie","keyword",{aggregates:{pattern:/(\bAggregates\s*:\s*)(?:\w+(?:\s+with\s+\w+)?\s*,\s*)*\w+(?:\s+with\s+\w+)?/,lookbehind:!0,inside:{keyword:/\bwith\b/,"class-name":/\w+/,punctuation:/,/}},redirects:{pattern:/(\bRedirects\s*:\s*)(?:\w+\s*=>\s*\w+\s*,\s*)*(?:\w+\s*=>\s*\w+)/,lookbehind:!0,inside:{punctuation:/,/,"class-name":/\w+/,operator:/=>/}},property:{pattern:/\b(?:Aggregates|[Ii]nterfaces|Java|Javascript|Jolie|[Ll]ocation|OneWay|[Pp]rotocol|Redirects|RequestResponse)\b(?=[ \t]*:)/}})}e.exports=t,t.displayName="jolie",t.aliases=[]},261:(e,t,n)=>{"use strict";e.exports=n(4505)},267:(e,t,n)=>{"use strict";var r=n(4696);function i(e){e.register(r),e.languages.sparql=e.languages.extend("turtle",{boolean:/\b(?:false|true)\b/i,variable:{pattern:/[?$]\w+/,greedy:!0}}),e.languages.insertBefore("sparql","punctuation",{keyword:[/\b(?:A|ADD|ALL|AS|ASC|ASK|BNODE|BY|CLEAR|CONSTRUCT|COPY|CREATE|DATA|DEFAULT|DELETE|DESC|DESCRIBE|DISTINCT|DROP|EXISTS|FILTER|FROM|GROUP|HAVING|INSERT|INTO|LIMIT|LOAD|MINUS|MOVE|NAMED|NOT|NOW|OFFSET|OPTIONAL|ORDER|RAND|REDUCED|SELECT|SEPARATOR|SERVICE|SILENT|STRUUID|UNION|USING|UUID|VALUES|WHERE)\b/i,/\b(?:ABS|AVG|BIND|BOUND|CEIL|COALESCE|CONCAT|CONTAINS|COUNT|DATATYPE|DAY|ENCODE_FOR_URI|FLOOR|GROUP_CONCAT|HOURS|IF|IRI|isBLANK|isIRI|isLITERAL|isNUMERIC|isURI|LANG|LANGMATCHES|LCASE|MAX|MD5|MIN|MINUTES|MONTH|REGEX|REPLACE|ROUND|sameTerm|SAMPLE|SECONDS|SHA1|SHA256|SHA384|SHA512|STR|STRAFTER|STRBEFORE|STRDT|STRENDS|STRLANG|STRLEN|STRSTARTS|SUBSTR|SUM|TIMEZONE|TZ|UCASE|URI|YEAR)\b(?=\s*\()/i,/\b(?:BASE|GRAPH|PREFIX)\b/i]}),e.languages.rq=e.languages.sparql}e.exports=i,i.displayName="sparql",i.aliases=["rq"]},276:(e,t,n)=>{"use strict";var r=n(2046),i=n(7595),a=n(8854),o=n(3725);function s(e){e.cancelToken&&e.cancelToken.throwIfRequested()}e.exports=function(e){return s(e),e.headers=e.headers||{},e.data=i.call(e,e.data,e.headers,e.transformRequest),e.headers=r.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),r.forEach(["delete","get","head","post","put","patch","common"],function(t){delete e.headers[t]}),(e.adapter||o.adapter)(e).then(function(t){return s(e),t.data=i.call(e,t.data,t.headers,e.transformResponse),t},function(t){return a(t)||(s(e),t&&t.response&&(t.response.data=i.call(e,t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)})}},309:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(5248),i=n.n(r)()(function(e){return e[1]});i.push([e.id,"main#explorer-content{padding:30px;margin:var(--header-height) 0}main#explorer-content .search-field input{font-size:16px;height:32px;width:320px;margin-bottom:10px;border-radius:3px;border:1px solid #858585;padding:0 5px}main#explorer-content #graphs-menu{display:flex;margin-bottom:20px}main#explorer-content #graphs-menu .menu-title{margin:0 10px 0 0}main#explorer-content #graphs-menu ul{list-style:none;padding:0;margin:0;display:flex;font-size:15px}main#explorer-content #graphs-menu li{padding:0 8px}main#explorer-content #graphs-menu li+li{border-left:1px solid #b1b0b0}main#explorer-content #graphs-menu li:first-child{padding-left:0}main#explorer-content .list{padding:0;width:100%}main#explorer-content .arrow .icon{transform:rotate(-90deg)}main#explorer-content .arrow.active .icon{transform:rotate(0)}main#explorer-content .arrow:hover{cursor:pointer}main#explorer-content .item{border-top:1px dotted #d3d3d3;border-left:6px solid #d3d3d3;margin:4px 4px 4px 40px;background-color:rgba(200,200,200,.2);vertical-align:middle}main#explorer-content .item .content{display:flex;flex-wrap:wrap}main#explorer-content .item .header{margin-left:5px;overflow:hidden;white-space:nowrap;display:flex;align-items:center;vertical-align:middle}main#explorer-content .item .header>a{font-size:120%;line-height:30px;font-weight:bold;max-width:100%;white-space:normal}main#explorer-content .item .header .cre-code{margin-right:4px;color:gray}main#explorer-content .item .description{margin-left:20px}main#explorer-content .highlight{background-color:#ff0}main#explorer-content>.list>.item{margin-left:0}@media(min-width: 0px)and (max-width: 770px){#graphs-menu{flex-direction:column}}",""]);const a=i},310:e=>{"use strict";function t(e){e.languages.aql={comment:/\/\/.*|\/\*[\s\S]*?\*\//,property:{pattern:/([{,]\s*)(?:(?!\d)\w+|(["'´`])(?:(?!\2)[^\\\r\n]|\\.)*\2)(?=\s*:)/,lookbehind:!0,greedy:!0},string:{pattern:/(["'])(?:(?!\1)[^\\\r\n]|\\.)*\1/,greedy:!0},identifier:{pattern:/([´`])(?:(?!\1)[^\\\r\n]|\\.)*\1/,greedy:!0},variable:/@@?\w+/,keyword:[{pattern:/(\bWITH\s+)COUNT(?=\s+INTO\b)/i,lookbehind:!0},/\b(?:AGGREGATE|ALL|AND|ANY|ASC|COLLECT|DESC|DISTINCT|FILTER|FOR|GRAPH|IN|INBOUND|INSERT|INTO|K_PATHS|K_SHORTEST_PATHS|LET|LIKE|LIMIT|NONE|NOT|NULL|OR|OUTBOUND|REMOVE|REPLACE|RETURN|SHORTEST_PATH|SORT|UPDATE|UPSERT|WINDOW|WITH)\b/i,{pattern:/(^|[^\w.[])(?:KEEP|PRUNE|SEARCH|TO)\b/i,lookbehind:!0},{pattern:/(^|[^\w.[])(?:CURRENT|NEW|OLD)\b/,lookbehind:!0},{pattern:/\bOPTIONS(?=\s*\{)/i}],function:/\b(?!\d)\w+(?=\s*\()/,boolean:/\b(?:false|true)\b/i,range:{pattern:/\.\./,alias:"operator"},number:[/\b0b[01]+/i,/\b0x[0-9a-f]+/i,/(?:\B\.\d+|\b(?:0|[1-9]\d*)(?:\.\d+)?)(?:e[+-]?\d+)?/i],operator:/\*{2,}|[=!]~|[!=<>]=?|&&|\|\||[-+*/%]/,punctuation:/::|[?.:,;()[\]{}]/}}e.exports=t,t.displayName="aql",t.aliases=[]},323:e=>{"use strict";function t(e){e.languages.applescript={comment:[/\(\*(?:\(\*(?:[^*]|\*(?!\)))*\*\)|(?!\(\*)[\s\S])*?\*\)/,/--.+/,/#.+/],string:/"(?:\\.|[^"\\\r\n])*"/,number:/(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e-?\d+)?\b/i,operator:[/[&=≠≤≥*+\-\/÷^]|[<>]=?/,/\b(?:(?:begin|end|start)s? with|(?:contains?|(?:does not|doesn't) contain)|(?:is|isn't|is not) (?:contained by|in)|(?:(?:is|isn't|is not) )?(?:greater|less) than(?: or equal)?(?: to)?|(?:comes|(?:does not|doesn't) come) (?:after|before)|(?:is|isn't|is not) equal(?: to)?|(?:(?:does not|doesn't) equal|equal to|equals|is not|isn't)|(?:a )?(?:ref(?: to)?|reference to)|(?:and|as|div|mod|not|or))\b/],keyword:/\b(?:about|above|after|against|apart from|around|aside from|at|back|before|beginning|behind|below|beneath|beside|between|but|by|considering|continue|copy|does|eighth|else|end|equal|error|every|exit|false|fifth|first|for|fourth|from|front|get|given|global|if|ignoring|in|instead of|into|is|it|its|last|local|me|middle|my|ninth|of|on|onto|out of|over|prop|property|put|repeat|return|returning|second|set|seventh|since|sixth|some|tell|tenth|that|the|then|third|through|thru|timeout|times|to|transaction|true|try|until|where|while|whose|with|without)\b/,"class-name":/\b(?:POSIX file|RGB color|alias|application|boolean|centimeters|centimetres|class|constant|cubic centimeters|cubic centimetres|cubic feet|cubic inches|cubic meters|cubic metres|cubic yards|date|degrees Celsius|degrees Fahrenheit|degrees Kelvin|feet|file|gallons|grams|inches|integer|kilograms|kilometers|kilometres|list|liters|litres|meters|metres|miles|number|ounces|pounds|quarts|real|record|reference|script|square feet|square kilometers|square kilometres|square meters|square metres|square miles|square yards|text|yards)\b/,punctuation:/[{}():,¬«»《》]/}}e.exports=t,t.displayName="applescript",t.aliases=[]},334:e=>{"use strict";var t=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map(function(e){return t[e]}).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach(function(e){r[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,i){for(var a,o,s=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),c=1;c{"use strict";function t(e){!function(e){e.languages.kotlin=e.languages.extend("clike",{keyword:{pattern:/(^|[^.])\b(?:abstract|actual|annotation|as|break|by|catch|class|companion|const|constructor|continue|crossinline|data|do|dynamic|else|enum|expect|external|final|finally|for|fun|get|if|import|in|infix|init|inline|inner|interface|internal|is|lateinit|noinline|null|object|open|operator|out|override|package|private|protected|public|reified|return|sealed|set|super|suspend|tailrec|this|throw|to|try|typealias|val|var|vararg|when|where|while)\b/,lookbehind:!0},function:[{pattern:/(?:`[^\r\n`]+`|\b\w+)(?=\s*\()/,greedy:!0},{pattern:/(\.)(?:`[^\r\n`]+`|\w+)(?=\s*\{)/,lookbehind:!0,greedy:!0}],number:/\b(?:0[xX][\da-fA-F]+(?:_[\da-fA-F]+)*|0[bB][01]+(?:_[01]+)*|\d+(?:_\d+)*(?:\.\d+(?:_\d+)*)?(?:[eE][+-]?\d+(?:_\d+)*)?[fFL]?)\b/,operator:/\+[+=]?|-[-=>]?|==?=?|!(?:!|==?)?|[\/*%<>]=?|[?:]:?|\.\.|&&|\|\||\b(?:and|inv|or|shl|shr|ushr|xor)\b/}),delete e.languages.kotlin["class-name"];var t={"interpolation-punctuation":{pattern:/^\$\{?|\}$/,alias:"punctuation"},expression:{pattern:/[\s\S]+/,inside:e.languages.kotlin}};e.languages.insertBefore("kotlin","string",{"string-literal":[{pattern:/"""(?:[^$]|\$(?:(?!\{)|\{[^{}]*\}))*?"""/,alias:"multiline",inside:{interpolation:{pattern:/\$(?:[a-z_]\w*|\{[^{}]*\})/i,inside:t},string:/[\s\S]+/}},{pattern:/"(?:[^"\\\r\n$]|\\.|\$(?:(?!\{)|\{[^{}]*\}))*"/,alias:"singleline",inside:{interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$(?:[a-z_]\w*|\{[^{}]*\})/i,lookbehind:!0,inside:t},string:/[\s\S]+/}}],char:{pattern:/'(?:[^'\\\r\n]|\\(?:.|u[a-fA-F0-9]{0,4}))'/,greedy:!0}}),delete e.languages.kotlin.string,e.languages.insertBefore("kotlin","keyword",{annotation:{pattern:/\B@(?:\w+:)?(?:[A-Z]\w*|\[[^\]]+\])/,alias:"builtin"}}),e.languages.insertBefore("kotlin","function",{label:{pattern:/\b\w+@|@\w+\b/,alias:"symbol"}}),e.languages.kt=e.languages.kotlin,e.languages.kts=e.languages.kotlin}(e)}e.exports=t,t.displayName="kotlin",t.aliases=["kt","kts"]},358:e=>{"use strict";function t(e){e.languages.unrealscript={comment:/\/\/.*|\/\*[\s\S]*?\*\//,string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},category:{pattern:/(\b(?:(?:autoexpand|hide|show)categories|var)\s*\()[^()]+(?=\))/,lookbehind:!0,greedy:!0,alias:"property"},metadata:{pattern:/(\w\s*)<\s*\w+\s*=[^<>|=\r\n]+(?:\|\s*\w+\s*=[^<>|=\r\n]+)*>/,lookbehind:!0,greedy:!0,inside:{property:/\b\w+(?=\s*=)/,operator:/=/,punctuation:/[<>|]/}},macro:{pattern:/`\w+/,alias:"property"},"class-name":{pattern:/(\b(?:class|enum|extends|interface|state(?:\(\))?|struct|within)\s+)\w+/,lookbehind:!0},keyword:/\b(?:abstract|actor|array|auto|autoexpandcategories|bool|break|byte|case|class|classgroup|client|coerce|collapsecategories|config|const|continue|default|defaultproperties|delegate|dependson|deprecated|do|dontcollapsecategories|editconst|editinlinenew|else|enum|event|exec|export|extends|final|float|for|forcescriptorder|foreach|function|goto|guid|hidecategories|hidedropdown|if|ignores|implements|inherits|input|int|interface|iterator|latent|local|material|name|native|nativereplication|noexport|nontransient|noteditinlinenew|notplaceable|operator|optional|out|pawn|perobjectconfig|perobjectlocalized|placeable|postoperator|preoperator|private|protected|reliable|replication|return|server|showcategories|simulated|singular|state|static|string|struct|structdefault|structdefaultproperties|switch|texture|transient|travel|unreliable|until|var|vector|while|within)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,boolean:/\b(?:false|true)\b/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/>>|<<|--|\+\+|\*\*|[-+*/~!=<>$@]=?|&&?|\|\|?|\^\^?|[?:%]|\b(?:ClockwiseFrom|Cross|Dot)\b/,punctuation:/[()[\]{};,.]/},e.languages.uc=e.languages.uscript=e.languages.unrealscript}e.exports=t,t.displayName="unrealscript",t.aliases=["uc","uscript"]},377:e=>{"use strict";function t(e){e.languages.eiffel={comment:/--.*/,string:[{pattern:/"([^[]*)\[[\s\S]*?\]\1"/,greedy:!0},{pattern:/"([^{]*)\{[\s\S]*?\}\1"/,greedy:!0},{pattern:/"(?:%(?:(?!\n)\s)*\n\s*%|%\S|[^%"\r\n])*"/,greedy:!0}],char:/'(?:%.|[^%'\r\n])+'/,keyword:/\b(?:across|agent|alias|all|and|as|assign|attached|attribute|check|class|convert|create|Current|debug|deferred|detachable|do|else|elseif|end|ensure|expanded|export|external|feature|from|frozen|if|implies|inherit|inspect|invariant|like|local|loop|not|note|obsolete|old|once|or|Precursor|redefine|rename|require|rescue|Result|retry|select|separate|some|then|undefine|until|variant|Void|when|xor)\b/i,boolean:/\b(?:False|True)\b/i,"class-name":/\b[A-Z][\dA-Z_]*\b/,number:[/\b0[xcb][\da-f](?:_*[\da-f])*\b/i,/(?:\b\d(?:_*\d)*)?\.(?:(?:\d(?:_*\d)*)?e[+-]?)?\d(?:_*\d)*\b|\b\d(?:_*\d)*\b\.?/i],punctuation:/:=|<<|>>|\(\||\|\)|->|\.(?=\w)|[{}[\];(),:?]/,operator:/\\\\|\|\.\.\||\.\.|\/[~\/=]?|[><]=?|[-+*^=~]/}}e.exports=t,t.displayName="eiffel",t.aliases=[]},394:e=>{"use strict";function t(e){!function(e){e.languages.xquery=e.languages.extend("markup",{"xquery-comment":{pattern:/\(:[\s\S]*?:\)/,greedy:!0,alias:"comment"},string:{pattern:/(["'])(?:\1\1|(?!\1)[\s\S])*\1/,greedy:!0},extension:{pattern:/\(#.+?#\)/,alias:"symbol"},variable:/\$[-\w:]+/,axis:{pattern:/(^|[^-])(?:ancestor(?:-or-self)?|attribute|child|descendant(?:-or-self)?|following(?:-sibling)?|parent|preceding(?:-sibling)?|self)(?=::)/,lookbehind:!0,alias:"operator"},"keyword-operator":{pattern:/(^|[^:-])\b(?:and|castable as|div|eq|except|ge|gt|idiv|instance of|intersect|is|le|lt|mod|ne|or|union)\b(?=$|[^:-])/,lookbehind:!0,alias:"operator"},keyword:{pattern:/(^|[^:-])\b(?:as|ascending|at|base-uri|boundary-space|case|cast as|collation|construction|copy-namespaces|declare|default|descending|else|empty (?:greatest|least)|encoding|every|external|for|function|if|import|in|inherit|lax|let|map|module|namespace|no-inherit|no-preserve|option|order(?: by|ed|ing)?|preserve|return|satisfies|schema|some|stable|strict|strip|then|to|treat as|typeswitch|unordered|validate|variable|version|where|xquery)\b(?=$|[^:-])/,lookbehind:!0},function:/[\w-]+(?::[\w-]+)*(?=\s*\()/,"xquery-element":{pattern:/(element\s+)[\w-]+(?::[\w-]+)*/,lookbehind:!0,alias:"tag"},"xquery-attribute":{pattern:/(attribute\s+)[\w-]+(?::[\w-]+)*/,lookbehind:!0,alias:"attr-name"},builtin:{pattern:/(^|[^:-])\b(?:attribute|comment|document|element|processing-instruction|text|xs:(?:ENTITIES|ENTITY|ID|IDREFS?|NCName|NMTOKENS?|NOTATION|Name|QName|anyAtomicType|anyType|anyURI|base64Binary|boolean|byte|date|dateTime|dayTimeDuration|decimal|double|duration|float|gDay|gMonth|gMonthDay|gYear|gYearMonth|hexBinary|int|integer|language|long|negativeInteger|nonNegativeInteger|nonPositiveInteger|normalizedString|positiveInteger|short|string|time|token|unsigned(?:Byte|Int|Long|Short)|untyped(?:Atomic)?|yearMonthDuration))\b(?=$|[^:-])/,lookbehind:!0},number:/\b\d+(?:\.\d+)?(?:E[+-]?\d+)?/,operator:[/[+*=?|@]|\.\.?|:=|!=|<[=<]?|>[=>]?/,{pattern:/(\s)-(?=\s)/,lookbehind:!0}],punctuation:/[[\](){},;:/]/}),e.languages.xquery.tag.pattern=/<\/?(?!\d)[^\s>\/=$<%]+(?:\s+[^\s>\/=]+(?:=(?:("|')(?:\\[\s\S]|\{(?!\{)(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])+\}|(?!\1)[^\\])*\1|[^\s'">=]+))?)*\s*\/?>/,e.languages.xquery.tag.inside["attr-value"].pattern=/=(?:("|')(?:\\[\s\S]|\{(?!\{)(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])+\}|(?!\1)[^\\])*\1|[^\s'">=]+)/,e.languages.xquery.tag.inside["attr-value"].inside.punctuation=/^="|"$/,e.languages.xquery.tag.inside["attr-value"].inside.expression={pattern:/\{(?!\{)(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])+\}/,inside:e.languages.xquery,alias:"language-xquery"};var t=function(e){return"string"==typeof e?e:"string"==typeof e.content?e.content:e.content.map(t).join("")},n=function(r){for(var i=[],a=0;a0&&i[i.length-1].tagName===t(o.content[0].content[1])&&i.pop():"/>"===o.content[o.content.length-1].content||i.push({tagName:t(o.content[0].content[1]),openedBraces:0}):!(i.length>0&&"punctuation"===o.type&&"{"===o.content)||r[a+1]&&"punctuation"===r[a+1].type&&"{"===r[a+1].content||r[a-1]&&"plain-text"===r[a-1].type&&"{"===r[a-1].content?i.length>0&&i[i.length-1].openedBraces>0&&"punctuation"===o.type&&"}"===o.content?i[i.length-1].openedBraces--:"comment"!==o.type&&(s=!0):i[i.length-1].openedBraces++),(s||"string"==typeof o)&&i.length>0&&0===i[i.length-1].openedBraces){var c=t(o);a0&&("string"==typeof r[a-1]||"plain-text"===r[a-1].type)&&(c=t(r[a-1])+c,r.splice(a-1,1),a--),/^\s+$/.test(c)?r[a]=c:r[a]=new e.Token("plain-text",c,null,c)}o.content&&"string"!=typeof o.content&&n(o.content)}};e.hooks.add("after-tokenize",function(e){"xquery"===e.language&&n(e.tokens)})}(e)}e.exports=t,t.displayName="xquery",t.aliases=[]},416:(e,t,n)=>{"use strict";n.d(t,{B:()=>a,t:()=>i});var r=console;function i(){return r}function a(e){r=e}},437:(e,t,n)=>{"use strict";var r=n(2046);e.exports=function(e,t){t=t||{};var n={},i=["url","method","data"],a=["headers","auth","proxy","params"],o=["baseURL","transformRequest","transformResponse","paramsSerializer","timeout","timeoutMessage","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","decompress","maxContentLength","maxBodyLength","maxRedirects","transport","httpAgent","httpsAgent","cancelToken","socketPath","responseEncoding"],s=["validateStatus"];function c(e,t){return r.isPlainObject(e)&&r.isPlainObject(t)?r.merge(e,t):r.isPlainObject(t)?r.merge({},t):r.isArray(t)?t.slice():t}function l(i){r.isUndefined(t[i])?r.isUndefined(e[i])||(n[i]=c(void 0,e[i])):n[i]=c(e[i],t[i])}r.forEach(i,function(e){r.isUndefined(t[e])||(n[e]=c(void 0,t[e]))}),r.forEach(a,l),r.forEach(o,function(i){r.isUndefined(t[i])?r.isUndefined(e[i])||(n[i]=c(void 0,e[i])):n[i]=c(void 0,t[i])}),r.forEach(s,function(r){r in t?n[r]=c(e[r],t[r]):r in e&&(n[r]=c(void 0,e[r]))});var u=i.concat(a).concat(o).concat(s),f=Object.keys(e).concat(Object.keys(t)).filter(function(e){return-1===u.indexOf(e)});return r.forEach(f,l),n}},452:e=>{"use strict";function t(e){!function(e){e.languages.ignore={comment:/^#.*/m,entry:{pattern:/\S(?:.*(?:(?:\\ )|\S))?/,alias:"string",inside:{operator:/^!|\*\*?|\?/,regex:{pattern:/(^|[^\\])\[[^\[\]]*\]/,lookbehind:!0},punctuation:/\//}}},e.languages.gitignore=e.languages.ignore,e.languages.hgignore=e.languages.ignore,e.languages.npmignore=e.languages.ignore}(e)}e.exports=t,t.displayName="ignore",t.aliases=["gitignore","hgignore","npmignore"]},463:e=>{"use strict";function t(e){e.languages.nasm={comment:/;.*$/m,string:/(["'`])(?:\\.|(?!\1)[^\\\r\n])*\1/,label:{pattern:/(^\s*)[A-Za-z._?$][\w.?$@~#]*:/m,lookbehind:!0,alias:"function"},keyword:[/\[?BITS (?:16|32|64)\]?/,{pattern:/(^\s*)section\s*[a-z.]+:?/im,lookbehind:!0},/(?:extern|global)[^;\r\n]*/i,/(?:CPU|DEFAULT|FLOAT).*$/m],register:{pattern:/\b(?:st\d|[xyz]mm\d\d?|[cdt]r\d|r\d\d?[bwd]?|[er]?[abcd]x|[abcd][hl]|[er]?(?:bp|di|si|sp)|[cdefgs]s)\b/i,alias:"variable"},number:/(?:\b|(?=\$))(?:0[hx](?:\.[\da-f]+|[\da-f]+(?:\.[\da-f]+)?)(?:p[+-]?\d+)?|\d[\da-f]+[hx]|\$\d[\da-f]*|0[oq][0-7]+|[0-7]+[oq]|0[by][01]+|[01]+[by]|0[dt]\d+|(?:\d+(?:\.\d+)?|\.\d+)(?:\.?e[+-]?\d+)?[dt]?)\b/i,operator:/[\[\]*+\-\/%<>=&|$!]/}}e.exports=t,t.displayName="nasm",t.aliases=[]},497:e=>{"use strict";function t(e){!function(e){e.languages.velocity=e.languages.extend("markup",{});var t={variable:{pattern:/(^|[^\\](?:\\\\)*)\$!?(?:[a-z][\w-]*(?:\([^)]*\))?(?:\.[a-z][\w-]*(?:\([^)]*\))?|\[[^\]]+\])*|\{[^}]+\})/i,lookbehind:!0,inside:{}},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},number:/\b\d+\b/,boolean:/\b(?:false|true)\b/,operator:/[=!<>]=?|[+*/%-]|&&|\|\||\.\.|\b(?:eq|g[et]|l[et]|n(?:e|ot))\b/,punctuation:/[(){}[\]:,.]/};t.variable.inside={string:t.string,function:{pattern:/([^\w-])[a-z][\w-]*(?=\()/,lookbehind:!0},number:t.number,boolean:t.boolean,punctuation:t.punctuation},e.languages.insertBefore("velocity","comment",{unparsed:{pattern:/(^|[^\\])#\[\[[\s\S]*?\]\]#/,lookbehind:!0,greedy:!0,inside:{punctuation:/^#\[\[|\]\]#$/}},"velocity-comment":[{pattern:/(^|[^\\])#\*[\s\S]*?\*#/,lookbehind:!0,greedy:!0,alias:"comment"},{pattern:/(^|[^\\])##.*/,lookbehind:!0,greedy:!0,alias:"comment"}],directive:{pattern:/(^|[^\\](?:\\\\)*)#@?(?:[a-z][\w-]*|\{[a-z][\w-]*\})(?:\s*\((?:[^()]|\([^()]*\))*\))?/i,lookbehind:!0,inside:{keyword:{pattern:/^#@?(?:[a-z][\w-]*|\{[a-z][\w-]*\})|\bin\b/,inside:{punctuation:/[{}]/}},rest:t}},variable:t.variable}),e.languages.velocity.tag.inside["attr-value"].inside.rest=e.languages.velocity}(e)}e.exports=t,t.displayName="velocity",t.aliases=[]},512:e=>{"use strict";function t(e){e.languages.cil={comment:/\/\/.*/,string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},directive:{pattern:/(^|\W)\.[a-z]+(?=\s)/,lookbehind:!0,alias:"class-name"},variable:/\[[\w\.]+\]/,keyword:/\b(?:abstract|ansi|assembly|auto|autochar|beforefieldinit|bool|bstr|byvalstr|catch|char|cil|class|currency|date|decimal|default|enum|error|explicit|extends|extern|famandassem|family|famorassem|final(?:ly)?|float32|float64|hidebysig|u?int(?:8|16|32|64)?|iant|idispatch|implements|import|initonly|instance|interface|iunknown|literal|lpstr|lpstruct|lptstr|lpwstr|managed|method|native(?:Type)?|nested|newslot|object(?:ref)?|pinvokeimpl|private|privatescope|public|reqsecobj|rtspecialname|runtime|sealed|sequential|serializable|specialname|static|string|struct|syschar|tbstr|unicode|unmanagedexp|unsigned|value(?:type)?|variant|virtual|void)\b/,function:/\b(?:(?:constrained|no|readonly|tail|unaligned|volatile)\.)?(?:conv\.(?:[iu][1248]?|ovf\.[iu][1248]?(?:\.un)?|r\.un|r4|r8)|ldc\.(?:i4(?:\.\d+|\.[mM]1|\.s)?|i8|r4|r8)|ldelem(?:\.[iu][1248]?|\.r[48]|\.ref|a)?|ldind\.(?:[iu][1248]?|r[48]|ref)|stelem\.?(?:i[1248]?|r[48]|ref)?|stind\.(?:i[1248]?|r[48]|ref)?|end(?:fault|filter|finally)|ldarg(?:\.[0-3s]|a(?:\.s)?)?|ldloc(?:\.\d+|\.s)?|sub(?:\.ovf(?:\.un)?)?|mul(?:\.ovf(?:\.un)?)?|add(?:\.ovf(?:\.un)?)?|stloc(?:\.[0-3s])?|refany(?:type|val)|blt(?:\.un)?(?:\.s)?|ble(?:\.un)?(?:\.s)?|bgt(?:\.un)?(?:\.s)?|bge(?:\.un)?(?:\.s)?|unbox(?:\.any)?|init(?:blk|obj)|call(?:i|virt)?|brfalse(?:\.s)?|bne\.un(?:\.s)?|ldloca(?:\.s)?|brzero(?:\.s)?|brtrue(?:\.s)?|brnull(?:\.s)?|brinst(?:\.s)?|starg(?:\.s)?|leave(?:\.s)?|shr(?:\.un)?|rem(?:\.un)?|div(?:\.un)?|clt(?:\.un)?|alignment|castclass|ldvirtftn|beq(?:\.s)?|ckfinite|ldsflda|ldtoken|localloc|mkrefany|rethrow|cgt\.un|arglist|switch|stsfld|sizeof|newobj|newarr|ldsfld|ldnull|ldflda|isinst|throw|stobj|stfld|ldstr|ldobj|ldlen|ldftn|ldfld|cpobj|cpblk|break|br\.s|xor|shl|ret|pop|not|nop|neg|jmp|dup|cgt|ceq|box|and|or|br)\b/,boolean:/\b(?:false|true)\b/,number:/\b-?(?:0x[0-9a-f]+|\d+)(?:\.[0-9a-f]+)?\b/i,punctuation:/[{}[\];(),:=]|IL_[0-9A-Za-z]+/}}e.exports=t,t.displayName="cil",t.aliases=[]},527:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(5248),i=n.n(r)()(function(e){return e[1]});i.push([e.id,'.node{cursor:pointer}.node:hover{stroke:#000;stroke-width:1.5px}.node--leaf{fill:#fff}.label{font:11px "Helvetica Neue",Helvetica,Arial,sans-serif;text-anchor:middle;text-shadow:0 1px 0 #fff,1px 0 0 #fff,-1px 0 0 #fff,0 -1px 0 #fff}.label,.node--root,.ui.button.screen-size-button{margin:0;background-color:rgba(0,0,0,0)}.circle-tooltip{box-shadow:0 2px 5px rgba(0,0,0,.2);font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;max-width:300px;word-wrap:break-word}.breadcrumb-item{word-break:break-word;overflow-wrap:anywhere;display:inline;max-width:100%}.breadcrumb-container{margin-top:0 !important;margin-bottom:0 !important;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;padding:10px;background-color:#f8f8f8;border-radius:4px;box-shadow:0 1px 3px rgba(0,0,0,.1);overflow:auto;max-width:100%;line-height:1.4;white-space:normal;word-break:break-word;overflow-wrap:anywhere}',""]);const a=i},543:e=>{"use strict";function t(e){!function(e){var t=/(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;function n(e){return e=e.replace(//g,function(){return t}),RegExp(/((?:^|[^\\])(?:\\{2})*)/.source+"(?:"+e+")")}var r=/(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source,i=/\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g,function(){return r}),a=/\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\n|\r\n?)/.source;e.languages.markdown=e.languages.extend("markup",{}),e.languages.insertBefore("markdown","prolog",{"front-matter-block":{pattern:/(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/,lookbehind:!0,greedy:!0,inside:{punctuation:/^---|---$/,"front-matter":{pattern:/\S+(?:\s+\S+)*/,alias:["yaml","language-yaml"],inside:e.languages.yaml}}},blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+i+a+"(?:"+i+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+i+a+")(?:"+i+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(r),inside:e.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+i+")"+a+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+i+"$"),inside:{"table-header":{pattern:RegExp(r),alias:"important",inside:e.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,lookbehind:!0,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:n(/\b__(?:(?!_)|_(?:(?!_))+_)+__\b|\*\*(?:(?!\*)|\*(?:(?!\*))+\*)+\*\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:n(/\b_(?:(?!_)|__(?:(?!_))+__)+_\b|\*(?:(?!\*)|\*\*(?:(?!\*))+\*\*)+\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:n(/(~~?)(?:(?!~))+\2/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},"code-snippet":{pattern:/(^|[^\\`])(?:``[^`\r\n]+(?:`[^`\r\n]+)*``(?!`)|`[^`\r\n]+`(?!`))/,lookbehind:!0,greedy:!0,alias:["code","keyword"]},url:{pattern:n(/!?\[(?:(?!\]))+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)|[ \t]?\[(?:(?!\]))+\])/.source),lookbehind:!0,greedy:!0,inside:{operator:/^!/,content:{pattern:/(^\[)[^\]]+(?=\])/,lookbehind:!0,inside:{}},variable:{pattern:/(^\][ \t]?\[)[^\]]+(?=\]$)/,lookbehind:!0},url:{pattern:/(^\]\()[^\s)]+/,lookbehind:!0},string:{pattern:/(^[ \t]+)"(?:\\.|[^"\\])*"(?=\)$)/,lookbehind:!0}}}}),["url","bold","italic","strike"].forEach(function(t){["url","bold","italic","strike","code-snippet"].forEach(function(n){t!==n&&(e.languages.markdown[t].inside.content.inside[n]=e.languages.markdown[n])})}),e.hooks.add("after-tokenize",function(e){"markdown"!==e.language&&"md"!==e.language||function e(t){if(t&&"string"!=typeof t)for(var n=0,r=t.length;n",quot:'"'},c=String.fromCodePoint||String.fromCharCode;e.languages.md=e.languages.markdown}(e)}e.exports=t,t.displayName="markdown",t.aliases=["md"]},571:e=>{"use strict";e.exports=n;var t=n.prototype;function n(e,t,n){this.property=e,this.normal=t,n&&(this.space=n)}t.space=null,t.normal={},t.property={}},597:(e,t,n)=>{"use strict";var r=n(8433);function i(e){e.register(r),e.languages.hlsl=e.languages.extend("c",{"class-name":[e.languages.c["class-name"],/\b(?:AppendStructuredBuffer|BlendState|Buffer|ByteAddressBuffer|CompileShader|ComputeShader|ConsumeStructuredBuffer|DepthStencilState|DepthStencilView|DomainShader|GeometryShader|Hullshader|InputPatch|LineStream|OutputPatch|PixelShader|PointStream|RWBuffer|RWByteAddressBuffer|RWStructuredBuffer|RWTexture(?:1D|1DArray|2D|2DArray|3D)|RasterizerState|RenderTargetView|SamplerComparisonState|SamplerState|StructuredBuffer|Texture(?:1D|1DArray|2D|2DArray|2DMS|2DMSArray|3D|Cube|CubeArray)|TriangleStream|VertexShader)\b/],keyword:[/\b(?:asm|asm_fragment|auto|break|case|catch|cbuffer|centroid|char|class|column_major|compile|compile_fragment|const|const_cast|continue|default|delete|discard|do|dynamic_cast|else|enum|explicit|export|extern|for|friend|fxgroup|goto|groupshared|if|in|inline|inout|interface|line|lineadj|linear|long|matrix|mutable|namespace|new|nointerpolation|noperspective|operator|out|packoffset|pass|pixelfragment|point|precise|private|protected|public|register|reinterpret_cast|return|row_major|sample|sampler|shared|short|signed|sizeof|snorm|stateblock|stateblock_state|static|static_cast|string|struct|switch|tbuffer|technique|technique10|technique11|template|texture|this|throw|triangle|triangleadj|try|typedef|typename|uniform|union|unorm|unsigned|using|vector|vertexfragment|virtual|void|volatile|while)\b/,/\b(?:bool|double|dword|float|half|int|min(?:10float|12int|16(?:float|int|uint))|uint)(?:[1-4](?:x[1-4])?)?\b/],number:/(?:(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[eE][+-]?\d+)?|\b0x[\da-fA-F]+)[fFhHlLuU]?\b/,boolean:/\b(?:false|true)\b/})}e.exports=i,i.displayName="hlsl",i.aliases=[]},604:e=>{"use strict";function t(e){e.languages.vhdl={comment:/--.+/,"vhdl-vectors":{pattern:/\b[oxb]"[\da-f_]+"|"[01uxzwlh-]+"/i,alias:"number"},"quoted-function":{pattern:/"\S+?"(?=\()/,alias:"function"},string:/"(?:[^\\"\r\n]|\\(?:\r\n|[\s\S]))*"/,constant:/\b(?:library|use)\b/i,keyword:/\b(?:'active|'ascending|'base|'delayed|'driving|'driving_value|'event|'high|'image|'instance_name|'last_active|'last_event|'last_value|'left|'leftof|'length|'low|'path_name|'pos|'pred|'quiet|'range|'reverse_range|'right|'rightof|'simple_name|'stable|'succ|'transaction|'val|'value|access|after|alias|all|architecture|array|assert|attribute|begin|block|body|buffer|bus|case|component|configuration|constant|disconnect|downto|else|elsif|end|entity|exit|file|for|function|generate|generic|group|guarded|if|impure|in|inertial|inout|is|label|library|linkage|literal|loop|map|new|next|null|of|on|open|others|out|package|port|postponed|procedure|process|pure|range|record|register|reject|report|return|select|severity|shared|signal|subtype|then|to|transport|type|unaffected|units|until|use|variable|wait|when|while|with)\b/i,boolean:/\b(?:false|true)\b/i,function:/\w+(?=\()/,number:/'[01uxzwlh-]'|\b(?:\d+#[\da-f_.]+#|\d[\d_.]*)(?:e[-+]?\d+)?/i,operator:/[<>]=?|:=|[-+*/&=]|\b(?:abs|and|mod|nand|nor|not|or|rem|rol|ror|sla|sll|sra|srl|xnor|xor)\b/i,punctuation:/[{}[\];(),.:]/}}e.exports=t,t.displayName="vhdl",t.aliases=[]},613:(e,t,n)=>{e.exports=function(e){var t=n(2074),f=n(2475),h=n(5975);if(e){if(void 0!==e.springCoeff)throw new Error("springCoeff was renamed to springCoefficient");if(void 0!==e.dragCoeff)throw new Error("dragCoeff was renamed to dragCoefficient")}e=f(e,{springLength:10,springCoefficient:.8,gravity:-12,theta:.8,dragCoefficient:.9,timeStep:.5,adaptiveTimeStepWeight:0,dimensions:2,debug:!1});var d=l[e.dimensions];if(!d){var p=e.dimensions;d={Body:r(p,e.debug),createQuadTree:i(p),createBounds:a(p),createDragForce:o(p),createSpringForce:s(p),integrate:c(p)},l[p]=d}var g=d.Body,b=d.createQuadTree,m=d.createBounds,w=d.createDragForce,v=d.createSpringForce,y=d.integrate,E=n(4374).random(42),_=[],S=[],x=b(e,E),T=m(_,e,E),A=v(e,E),k=w(e),C=[],M=new Map,I=0;N("nbody",function(){if(0!==_.length){x.insertBodies(_);for(var e=_.length;e--;){var t=_[e];t.isPinned||(t.reset(),x.updateBodyForce(t),k.update(t))}}}),N("spring",function(){for(var e=S.length;e--;)A.update(S[e])});var O={bodies:_,quadTree:x,springs:S,settings:e,addForce:N,removeForce:function(e){var t=C.indexOf(M.get(e));t<0||(C.splice(t,1),M.delete(e))},getForces:function(){return M},step:function(){for(var t=0;tnew g(e))(e);return _.push(t),t},removeBody:function(e){if(e){var t=_.indexOf(e);if(!(t<0))return _.splice(t,1),0===_.length&&T.reset(),!0}},addSpring:function(e,n,r,i){if(!e||!n)throw new Error("Cannot add null spring to force simulator");"number"!=typeof r&&(r=-1);var a=new t(e,n,r,i>=0?i:-1);return S.push(a),a},getTotalMovement:function(){return 0},removeSpring:function(e){if(e){var t=S.indexOf(e);return t>-1?(S.splice(t,1),!0):void 0}},getBestNewBodyPosition:function(e){return T.getBestNewPosition(e)},getBBox:R,getBoundingBox:R,invalidateBBox:function(){console.warn("invalidateBBox() is deprecated, bounds always recomputed on `getBBox()` call")},gravity:function(t){return void 0!==t?(e.gravity=t,x.options({gravity:t}),this):e.gravity},theta:function(t){return void 0!==t?(e.theta=t,x.options({theta:t}),this):e.theta},random:E};return function(e,t){for(var n in e)u(e,t,n)}(e,O),h(O),O;function R(){return T.update(),T.box}function N(e,t){if(M.has(e))throw new Error("Force "+e+" is already added");M.set(e,t),C.push(t)}};var r=n(81),i=n(934),a=n(3599),o=n(5788),s=n(1325),c=n(680),l={};function u(e,t,n){if(e.hasOwnProperty(n)&&"function"!=typeof t[n]){var r=Number.isFinite(e[n]);t[n]=r?function(r){if(void 0!==r){if(!Number.isFinite(r))throw new Error("Value of "+n+" should be a valid number.");return e[n]=r,t}return e[n]}:function(r){return void 0!==r?(e[n]=r,t):e[n]}}}},618:e=>{"use strict";function t(e){!function(e){e.languages.ruby=e.languages.extend("clike",{comment:{pattern:/#.*|^=begin\s[\s\S]*?^=end/m,greedy:!0},"class-name":{pattern:/(\b(?:class|module)\s+|\bcatch\s+\()[\w.\\]+|\b[A-Z_]\w*(?=\s*\.\s*new\b)/,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:BEGIN|END|alias|and|begin|break|case|class|def|define_method|defined|do|each|else|elsif|end|ensure|extend|for|if|in|include|module|new|next|nil|not|or|prepend|private|protected|public|raise|redo|require|rescue|retry|return|self|super|then|throw|undef|unless|until|when|while|yield)\b/,operator:/\.{2,3}|&\.|===||[!=]?~|(?:&&|\|\||<<|>>|\*\*|[+\-*/%<>!^&|=])=?|[?:]/,punctuation:/[(){}[\].,;]/}),e.languages.insertBefore("ruby","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}});var t={pattern:/((?:^|[^\\])(?:\\{2})*)#\{(?:[^{}]|\{[^{}]*\})*\}/,lookbehind:!0,inside:{content:{pattern:/^(#\{)[\s\S]+(?=\}$)/,lookbehind:!0,inside:e.languages.ruby},delimiter:{pattern:/^#\{|\}$/,alias:"punctuation"}}};delete e.languages.ruby.function;var n="(?:"+[/([^a-zA-Z0-9\s{(\[<=])(?:(?!\1)[^\\]|\\[\s\S])*\1/.source,/\((?:[^()\\]|\\[\s\S]|\((?:[^()\\]|\\[\s\S])*\))*\)/.source,/\{(?:[^{}\\]|\\[\s\S]|\{(?:[^{}\\]|\\[\s\S])*\})*\}/.source,/\[(?:[^\[\]\\]|\\[\s\S]|\[(?:[^\[\]\\]|\\[\s\S])*\])*\]/.source,/<(?:[^<>\\]|\\[\s\S]|<(?:[^<>\\]|\\[\s\S])*>)*>/.source].join("|")+")",r=/(?:"(?:\\.|[^"\\\r\n])*"|(?:\b[a-zA-Z_]\w*|[^\s\0-\x7F]+)[?!]?|\$.)/.source;e.languages.insertBefore("ruby","keyword",{"regex-literal":[{pattern:RegExp(/%r/.source+n+/[egimnosux]{0,6}/.source),greedy:!0,inside:{interpolation:t,regex:/[\s\S]+/}},{pattern:/(^|[^/])\/(?!\/)(?:\[[^\r\n\]]+\]|\\.|[^[/\\\r\n])+\/[egimnosux]{0,6}(?=\s*(?:$|[\r\n,.;})#]))/,lookbehind:!0,greedy:!0,inside:{interpolation:t,regex:/[\s\S]+/}}],variable:/[@$]+[a-zA-Z_]\w*(?:[?!]|\b)/,symbol:[{pattern:RegExp(/(^|[^:]):/.source+r),lookbehind:!0,greedy:!0},{pattern:RegExp(/([\r\n{(,][ \t]*)/.source+r+/(?=:(?!:))/.source),lookbehind:!0,greedy:!0}],"method-definition":{pattern:/(\bdef\s+)\w+(?:\s*\.\s*\w+)?/,lookbehind:!0,inside:{function:/\b\w+$/,keyword:/^self\b/,"class-name":/^\w+/,punctuation:/\./}}}),e.languages.insertBefore("ruby","string",{"string-literal":[{pattern:RegExp(/%[qQiIwWs]?/.source+n),greedy:!0,inside:{interpolation:t,string:/[\s\S]+/}},{pattern:/("|')(?:#\{[^}]+\}|#(?!\{)|\\(?:\r\n|[\s\S])|(?!\1)[^\\#\r\n])*\1/,greedy:!0,inside:{interpolation:t,string:/[\s\S]+/}},{pattern:/<<[-~]?([a-z_]\w*)[\r\n](?:.*[\r\n])*?[\t ]*\1/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<[-~]?[a-z_]\w*|\b[a-z_]\w*$/i,inside:{symbol:/\b\w+/,punctuation:/^<<[-~]?/}},interpolation:t,string:/[\s\S]+/}},{pattern:/<<[-~]?'([a-z_]\w*)'[\r\n](?:.*[\r\n])*?[\t ]*\1/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<[-~]?'[a-z_]\w*'|\b[a-z_]\w*$/i,inside:{symbol:/\b\w+/,punctuation:/^<<[-~]?'|'$/}},string:/[\s\S]+/}}],"command-literal":[{pattern:RegExp(/%x/.source+n),greedy:!0,inside:{interpolation:t,command:{pattern:/[\s\S]+/,alias:"string"}}},{pattern:/`(?:#\{[^}]+\}|#(?!\{)|\\(?:\r\n|[\s\S])|[^\\`#\r\n])*`/,greedy:!0,inside:{interpolation:t,command:{pattern:/[\s\S]+/,alias:"string"}}}]}),delete e.languages.ruby.string,e.languages.insertBefore("ruby","number",{builtin:/\b(?:Array|Bignum|Binding|Class|Continuation|Dir|Exception|FalseClass|File|Fixnum|Float|Hash|IO|Integer|MatchData|Method|Module|NilClass|Numeric|Object|Proc|Range|Regexp|Stat|String|Struct|Symbol|TMS|Thread|ThreadGroup|Time|TrueClass)\b/,constant:/\b[A-Z][A-Z0-9_]*(?:[?!]|\b)/}),e.languages.rb=e.languages.ruby}(e)}e.exports=t,t.displayName="ruby",t.aliases=["rb"]},640:e=>{"use strict";function t(e){!function(e){e.languages.sass=e.languages.extend("css",{comment:{pattern:/^([ \t]*)\/[\/*].*(?:(?:\r?\n|\r)\1[ \t].+)*/m,lookbehind:!0,greedy:!0}}),e.languages.insertBefore("sass","atrule",{"atrule-line":{pattern:/^(?:[ \t]*)[@+=].+/m,greedy:!0,inside:{atrule:/(?:@[\w-]+|[+=])/}}}),delete e.languages.sass.atrule;var t=/\$[-\w]+|#\{\$[-\w]+\}/,n=[/[+*\/%]|[=!]=|<=?|>=?|\b(?:and|not|or)\b/,{pattern:/(\s)-(?=\s)/,lookbehind:!0}];e.languages.insertBefore("sass","property",{"variable-line":{pattern:/^[ \t]*\$.+/m,greedy:!0,inside:{punctuation:/:/,variable:t,operator:n}},"property-line":{pattern:/^[ \t]*(?:[^:\s]+ *:.*|:[^:\s].*)/m,greedy:!0,inside:{property:[/[^:\s]+(?=\s*:)/,{pattern:/(:)[^:\s]+/,lookbehind:!0}],punctuation:/:/,variable:t,operator:n,important:e.languages.sass.important}}}),delete e.languages.sass.property,delete e.languages.sass.important,e.languages.insertBefore("sass","punctuation",{selector:{pattern:/^([ \t]*)\S(?:,[^,\r\n]+|[^,\r\n]*)(?:,[^,\r\n]+)*(?:,(?:\r?\n|\r)\1[ \t]+\S(?:,[^,\r\n]+|[^,\r\n]*)(?:,[^,\r\n]+)*)*/m,lookbehind:!0,greedy:!0}})}(e)}e.exports=t,t.displayName="sass",t.aliases=[]},672:function(e){e.exports=function(){"use strict";const{entries:e,setPrototypeOf:t,isFrozen:n,getPrototypeOf:r,getOwnPropertyDescriptor:i}=Object;let{freeze:a,seal:o,create:s}=Object,{apply:c,construct:l}="undefined"!=typeof Reflect&&Reflect;c||(c=function(e,t,n){return e.apply(t,n)}),a||(a=function(e){return e}),o||(o=function(e){return e}),l||(l=function(e,t){return new e(...t)});const u=_(Array.prototype.forEach),f=_(Array.prototype.pop),h=_(Array.prototype.push),d=_(String.prototype.toLowerCase),p=_(String.prototype.toString),g=_(String.prototype.match),b=_(String.prototype.replace),m=_(String.prototype.indexOf),w=_(String.prototype.trim),v=_(RegExp.prototype.test),y=(E=TypeError,function(){for(var e=arguments.length,t=new Array(e),n=0;n1?n-1:0),i=1;i/gm),j=o(/\${[\w\W]*}/gm),B=o(/^data-[\-\w.\u00B7-\uFFFF]/),z=o(/^aria-[\-\w]+$/),$=o(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),H=o(/^(?:\w+script|data):/i),G=o(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),V=o(/^html$/i);var W=Object.freeze({__proto__:null,MUSTACHE_EXPR:F,ERB_EXPR:U,TMPLIT_EXPR:j,DATA_ATTR:B,ARIA_ATTR:z,IS_ALLOWED_URI:$,IS_SCRIPT_OR_DATA:H,ATTR_WHITESPACE:G,DOCTYPE_NAME:V});const q=()=>"undefined"==typeof window?null:window;return function t(){let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:q();const r=e=>t(e);if(r.version="3.0.5",r.removed=[],!n||!n.document||9!==n.document.nodeType)return r.isSupported=!1,r;const i=n.document,o=i.currentScript;let{document:s}=n;const{DocumentFragment:c,HTMLTemplateElement:l,Node:E,Element:_,NodeFilter:F,NamedNodeMap:U=n.NamedNodeMap||n.MozNamedAttrMap,HTMLFormElement:j,DOMParser:B,trustedTypes:z}=n,H=_.prototype,G=T(H,"cloneNode"),X=T(H,"nextSibling"),Y=T(H,"childNodes"),K=T(H,"parentNode");if("function"==typeof l){const e=s.createElement("template");e.content&&e.content.ownerDocument&&(s=e.content.ownerDocument)}let Z,Q="";const{implementation:J,createNodeIterator:ee,createDocumentFragment:te,getElementsByTagName:ne}=s,{importNode:re}=i;let ie={};r.isSupported="function"==typeof e&&"function"==typeof K&&J&&void 0!==J.createHTMLDocument;const{MUSTACHE_EXPR:ae,ERB_EXPR:oe,TMPLIT_EXPR:se,DATA_ATTR:ce,ARIA_ATTR:le,IS_SCRIPT_OR_DATA:ue,ATTR_WHITESPACE:fe}=W;let{IS_ALLOWED_URI:he}=W,de=null;const pe=S({},[...A,...k,...C,...I,...R]);let ge=null;const be=S({},[...N,...P,...L,...D]);let me=Object.seal(Object.create(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}})),we=null,ve=null,ye=!0,Ee=!0,_e=!1,Se=!0,xe=!1,Te=!1,Ae=!1,ke=!1,Ce=!1,Me=!1,Ie=!1,Oe=!0,Re=!1,Ne=!0,Pe=!1,Le={},De=null;const Fe=S({},["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"]);let Ue=null;const je=S({},["audio","video","img","source","image","track"]);let Be=null;const ze=S({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),$e="http://www.w3.org/1998/Math/MathML",He="http://www.w3.org/2000/svg",Ge="http://www.w3.org/1999/xhtml";let Ve=Ge,We=!1,qe=null;const Xe=S({},[$e,He,Ge],p);let Ye;const Ke=["application/xhtml+xml","text/html"];let Ze,Qe=null;const Je=s.createElement("form"),et=function(e){return e instanceof RegExp||e instanceof Function},tt=function(e){if(!Qe||Qe!==e){if(e&&"object"==typeof e||(e={}),e=x(e),Ye=Ye=-1===Ke.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,Ze="application/xhtml+xml"===Ye?p:d,de="ALLOWED_TAGS"in e?S({},e.ALLOWED_TAGS,Ze):pe,ge="ALLOWED_ATTR"in e?S({},e.ALLOWED_ATTR,Ze):be,qe="ALLOWED_NAMESPACES"in e?S({},e.ALLOWED_NAMESPACES,p):Xe,Be="ADD_URI_SAFE_ATTR"in e?S(x(ze),e.ADD_URI_SAFE_ATTR,Ze):ze,Ue="ADD_DATA_URI_TAGS"in e?S(x(je),e.ADD_DATA_URI_TAGS,Ze):je,De="FORBID_CONTENTS"in e?S({},e.FORBID_CONTENTS,Ze):Fe,we="FORBID_TAGS"in e?S({},e.FORBID_TAGS,Ze):{},ve="FORBID_ATTR"in e?S({},e.FORBID_ATTR,Ze):{},Le="USE_PROFILES"in e&&e.USE_PROFILES,ye=!1!==e.ALLOW_ARIA_ATTR,Ee=!1!==e.ALLOW_DATA_ATTR,_e=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Se=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,xe=e.SAFE_FOR_TEMPLATES||!1,Te=e.WHOLE_DOCUMENT||!1,Ce=e.RETURN_DOM||!1,Me=e.RETURN_DOM_FRAGMENT||!1,Ie=e.RETURN_TRUSTED_TYPE||!1,ke=e.FORCE_BODY||!1,Oe=!1!==e.SANITIZE_DOM,Re=e.SANITIZE_NAMED_PROPS||!1,Ne=!1!==e.KEEP_CONTENT,Pe=e.IN_PLACE||!1,he=e.ALLOWED_URI_REGEXP||$,Ve=e.NAMESPACE||Ge,me=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&et(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(me.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&et(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(me.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(me.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),xe&&(Ee=!1),Me&&(Ce=!0),Le&&(de=S({},[...R]),ge=[],!0===Le.html&&(S(de,A),S(ge,N)),!0===Le.svg&&(S(de,k),S(ge,P),S(ge,D)),!0===Le.svgFilters&&(S(de,C),S(ge,P),S(ge,D)),!0===Le.mathMl&&(S(de,I),S(ge,L),S(ge,D))),e.ADD_TAGS&&(de===pe&&(de=x(de)),S(de,e.ADD_TAGS,Ze)),e.ADD_ATTR&&(ge===be&&(ge=x(ge)),S(ge,e.ADD_ATTR,Ze)),e.ADD_URI_SAFE_ATTR&&S(Be,e.ADD_URI_SAFE_ATTR,Ze),e.FORBID_CONTENTS&&(De===Fe&&(De=x(De)),S(De,e.FORBID_CONTENTS,Ze)),Ne&&(de["#text"]=!0),Te&&S(de,["html","head","body"]),de.table&&(S(de,["tbody"]),delete we.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw y('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw y('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');Z=e.TRUSTED_TYPES_POLICY,Q=Z.createHTML("")}else void 0===Z&&(Z=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let n=null;const r="data-tt-policy-suffix";t&&t.hasAttribute(r)&&(n=t.getAttribute(r));const i="dompurify"+(n?"#"+n:"");try{return e.createPolicy(i,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return console.warn("TrustedTypes policy "+i+" could not be created."),null}}(z,o)),null!==Z&&"string"==typeof Q&&(Q=Z.createHTML(""));a&&a(e),Qe=e}},nt=S({},["mi","mo","mn","ms","mtext"]),rt=S({},["foreignobject","desc","title","annotation-xml"]),it=S({},["title","style","font","a","script"]),at=S({},k);S(at,C),S(at,M);const ot=S({},I);S(ot,O);const st=function(e){h(r.removed,{element:e});try{e.parentNode.removeChild(e)}catch(t){e.remove()}},ct=function(e,t){try{h(r.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){h(r.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e&&!ge[e])if(Ce||Me)try{st(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},lt=function(e){let t,n;if(ke)e=""+e;else{const t=g(e,/^[\r\n\t ]+/);n=t&&t[0]}"application/xhtml+xml"===Ye&&Ve===Ge&&(e=''+e+"");const r=Z?Z.createHTML(e):e;if(Ve===Ge)try{t=(new B).parseFromString(r,Ye)}catch(e){}if(!t||!t.documentElement){t=J.createDocument(Ve,"template",null);try{t.documentElement.innerHTML=We?Q:r}catch(e){}}const i=t.body||t.documentElement;return e&&n&&i.insertBefore(s.createTextNode(n),i.childNodes[0]||null),Ve===Ge?ne.call(t,Te?"html":"body")[0]:Te?t.documentElement:i},ut=function(e){return ee.call(e.ownerDocument||e,e,F.SHOW_ELEMENT|F.SHOW_COMMENT|F.SHOW_TEXT,null,!1)},ft=function(e){return"object"==typeof E?e instanceof E:e&&"object"==typeof e&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName},ht=function(e,t,n){ie[e]&&u(ie[e],e=>{e.call(r,t,n,Qe)})},dt=function(e){let t;if(ht("beforeSanitizeElements",e,null),(n=e)instanceof j&&("string"!=typeof n.nodeName||"string"!=typeof n.textContent||"function"!=typeof n.removeChild||!(n.attributes instanceof U)||"function"!=typeof n.removeAttribute||"function"!=typeof n.setAttribute||"string"!=typeof n.namespaceURI||"function"!=typeof n.insertBefore||"function"!=typeof n.hasChildNodes))return st(e),!0;var n;const i=Ze(e.nodeName);if(ht("uponSanitizeElement",e,{tagName:i,allowedTags:de}),e.hasChildNodes()&&!ft(e.firstElementChild)&&(!ft(e.content)||!ft(e.content.firstElementChild))&&v(/<[/\w]/g,e.innerHTML)&&v(/<[/\w]/g,e.textContent))return st(e),!0;if(!de[i]||we[i]){if(!we[i]&>(i)){if(me.tagNameCheck instanceof RegExp&&v(me.tagNameCheck,i))return!1;if(me.tagNameCheck instanceof Function&&me.tagNameCheck(i))return!1}if(Ne&&!De[i]){const t=K(e)||e.parentNode,n=Y(e)||e.childNodes;if(n&&t)for(let r=n.length-1;r>=0;--r)t.insertBefore(G(n[r],!0),X(e))}return st(e),!0}return e instanceof _&&!function(e){let t=K(e);t&&t.tagName||(t={namespaceURI:Ve,tagName:"template"});const n=d(e.tagName),r=d(t.tagName);return!!qe[e.namespaceURI]&&(e.namespaceURI===He?t.namespaceURI===Ge?"svg"===n:t.namespaceURI===$e?"svg"===n&&("annotation-xml"===r||nt[r]):Boolean(at[n]):e.namespaceURI===$e?t.namespaceURI===Ge?"math"===n:t.namespaceURI===He?"math"===n&&rt[r]:Boolean(ot[n]):e.namespaceURI===Ge?!(t.namespaceURI===He&&!rt[r])&&!(t.namespaceURI===$e&&!nt[r])&&!ot[n]&&(it[n]||!at[n]):!("application/xhtml+xml"!==Ye||!qe[e.namespaceURI]))}(e)?(st(e),!0):"noscript"!==i&&"noembed"!==i&&"noframes"!==i||!v(/<\/no(script|embed|frames)/i,e.innerHTML)?(xe&&3===e.nodeType&&(t=e.textContent,t=b(t,ae," "),t=b(t,oe," "),t=b(t,se," "),e.textContent!==t&&(h(r.removed,{element:e.cloneNode()}),e.textContent=t)),ht("afterSanitizeElements",e,null),!1):(st(e),!0)},pt=function(e,t,n){if(Oe&&("id"===t||"name"===t)&&(n in s||n in Je))return!1;if(Ee&&!ve[t]&&v(ce,t));else if(ye&&v(le,t));else if(!ge[t]||ve[t]){if(!(gt(e)&&(me.tagNameCheck instanceof RegExp&&v(me.tagNameCheck,e)||me.tagNameCheck instanceof Function&&me.tagNameCheck(e))&&(me.attributeNameCheck instanceof RegExp&&v(me.attributeNameCheck,t)||me.attributeNameCheck instanceof Function&&me.attributeNameCheck(t))||"is"===t&&me.allowCustomizedBuiltInElements&&(me.tagNameCheck instanceof RegExp&&v(me.tagNameCheck,n)||me.tagNameCheck instanceof Function&&me.tagNameCheck(n))))return!1}else if(Be[t]);else if(v(he,b(n,fe,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==m(n,"data:")||!Ue[e])if(_e&&!v(ue,b(n,fe,"")));else if(n)return!1;return!0},gt=function(e){return e.indexOf("-")>0},bt=function(e){let t,n,i,a;ht("beforeSanitizeAttributes",e,null);const{attributes:o}=e;if(!o)return;const s={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:ge};for(a=o.length;a--;){t=o[a];const{name:c,namespaceURI:l}=t;if(n="value"===c?t.value:w(t.value),i=Ze(c),s.attrName=i,s.attrValue=n,s.keepAttr=!0,s.forceKeepAttr=void 0,ht("uponSanitizeAttribute",e,s),n=s.attrValue,s.forceKeepAttr)continue;if(ct(c,e),!s.keepAttr)continue;if(!Se&&v(/\/>/i,n)){ct(c,e);continue}xe&&(n=b(n,ae," "),n=b(n,oe," "),n=b(n,se," "));const u=Ze(e.nodeName);if(pt(u,i,n)){if(!Re||"id"!==i&&"name"!==i||(ct(c,e),n="user-content-"+n),Z&&"object"==typeof z&&"function"==typeof z.getAttributeType)if(l);else switch(z.getAttributeType(u,i)){case"TrustedHTML":n=Z.createHTML(n);break;case"TrustedScriptURL":n=Z.createScriptURL(n)}try{l?e.setAttributeNS(l,c,n):e.setAttribute(c,n),f(r.removed)}catch(e){}}}ht("afterSanitizeAttributes",e,null)},mt=function e(t){let n;const r=ut(t);for(ht("beforeSanitizeShadowDOM",t,null);n=r.nextNode();)ht("uponSanitizeShadowNode",n,null),dt(n)||(n.content instanceof c&&e(n.content),bt(n));ht("afterSanitizeShadowDOM",t,null)};return r.sanitize=function(e){let t,n,a,o,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(We=!e,We&&(e="\x3c!--\x3e"),"string"!=typeof e&&!ft(e)){if("function"!=typeof e.toString)throw y("toString is not a function");if("string"!=typeof(e=e.toString()))throw y("dirty is not a string, aborting")}if(!r.isSupported)return e;if(Ae||tt(s),r.removed=[],"string"==typeof e&&(Pe=!1),Pe){if(e.nodeName){const t=Ze(e.nodeName);if(!de[t]||we[t])throw y("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof E)t=lt("\x3c!----\x3e"),n=t.ownerDocument.importNode(e,!0),1===n.nodeType&&"BODY"===n.nodeName||"HTML"===n.nodeName?t=n:t.appendChild(n);else{if(!Ce&&!xe&&!Te&&-1===e.indexOf("<"))return Z&&Ie?Z.createHTML(e):e;if(t=lt(e),!t)return Ce?null:Ie?Q:""}t&&ke&&st(t.firstChild);const l=ut(Pe?e:t);for(;a=l.nextNode();)dt(a)||(a.content instanceof c&&mt(a.content),bt(a));if(Pe)return e;if(Ce){if(Me)for(o=te.call(t.ownerDocument);t.firstChild;)o.appendChild(t.firstChild);else o=t;return(ge.shadowroot||ge.shadowrootmode)&&(o=re.call(i,o,!0)),o}let u=Te?t.outerHTML:t.innerHTML;return Te&&de["!doctype"]&&t.ownerDocument&&t.ownerDocument.doctype&&t.ownerDocument.doctype.name&&v(V,t.ownerDocument.doctype.name)&&(u="\n"+u),xe&&(u=b(u,ae," "),u=b(u,oe," "),u=b(u,se," ")),Z&&Ie?Z.createHTML(u):u},r.setConfig=function(e){tt(e),Ae=!0},r.clearConfig=function(){Qe=null,Ae=!1},r.isValidAttribute=function(e,t,n){Qe||tt({});const r=Ze(e),i=Ze(t);return pt(r,i,n)},r.addHook=function(e,t){"function"==typeof t&&(ie[e]=ie[e]||[],h(ie[e],t))},r.removeHook=function(e){if(ie[e])return f(ie[e])},r.removeHooks=function(e){ie[e]&&(ie[e]=[])},r.removeAllHooks=function(){ie={}},r}()}()},680:(e,t,n)=>{const r=n(3103);function i(e){let t=r(e);return`\n var length = bodies.length;\n if (length === 0) return 0;\n\n ${t("var d{var} = 0, t{var} = 0;",{indent:2})}\n\n for (var i = 0; i < length; ++i) {\n var body = bodies[i];\n if (body.isPinned) continue;\n\n if (adaptiveTimeStepWeight && body.springCount) {\n timeStep = (adaptiveTimeStepWeight * body.springLength/body.springCount);\n }\n\n var coeff = timeStep / body.mass;\n\n ${t("body.velocity.{var} += coeff * body.force.{var};",{indent:4})}\n ${t("var v{var} = body.velocity.{var};",{indent:4})}\n var v = Math.sqrt(${t("v{var} * v{var}",{join:" + "})});\n\n if (v > 1) {\n // We normalize it so that we move within timeStep range. \n // for the case when v <= 1 - we let velocity to fade out.\n ${t("body.velocity.{var} = v{var} / v;",{indent:6})}\n }\n\n ${t("d{var} = timeStep * body.velocity.{var};",{indent:4})}\n\n ${t("body.pos.{var} += d{var};",{indent:4})}\n\n ${t("t{var} += Math.abs(d{var});",{indent:4})}\n }\n\n return (${t("t{var} * t{var}",{join:" + "})})/length;\n`}e.exports=function(e){let t=i(e);return new Function("bodies","timeStep","adaptiveTimeStepWeight",t)},e.exports.generateIntegratorFunctionBody=i},706:e=>{"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},712:e=>{"use strict";function t(e){!function(e){var t="\\b(?:BASH|BASHOPTS|BASH_ALIASES|BASH_ARGC|BASH_ARGV|BASH_CMDS|BASH_COMPLETION_COMPAT_DIR|BASH_LINENO|BASH_REMATCH|BASH_SOURCE|BASH_VERSINFO|BASH_VERSION|COLORTERM|COLUMNS|COMP_WORDBREAKS|DBUS_SESSION_BUS_ADDRESS|DEFAULTS_PATH|DESKTOP_SESSION|DIRSTACK|DISPLAY|EUID|GDMSESSION|GDM_LANG|GNOME_KEYRING_CONTROL|GNOME_KEYRING_PID|GPG_AGENT_INFO|GROUPS|HISTCONTROL|HISTFILE|HISTFILESIZE|HISTSIZE|HOME|HOSTNAME|HOSTTYPE|IFS|INSTANCE|JOB|LANG|LANGUAGE|LC_ADDRESS|LC_ALL|LC_IDENTIFICATION|LC_MEASUREMENT|LC_MONETARY|LC_NAME|LC_NUMERIC|LC_PAPER|LC_TELEPHONE|LC_TIME|LESSCLOSE|LESSOPEN|LINES|LOGNAME|LS_COLORS|MACHTYPE|MAILCHECK|MANDATORY_PATH|NO_AT_BRIDGE|OLDPWD|OPTERR|OPTIND|ORBIT_SOCKETDIR|OSTYPE|PAPERSIZE|PATH|PIPESTATUS|PPID|PS1|PS2|PS3|PS4|PWD|RANDOM|REPLY|SECONDS|SELINUX_INIT|SESSION|SESSIONTYPE|SESSION_MANAGER|SHELL|SHELLOPTS|SHLVL|SSH_AUTH_SOCK|TERM|UID|UPSTART_EVENTS|UPSTART_INSTANCE|UPSTART_JOB|UPSTART_SESSION|USER|WINDOWID|XAUTHORITY|XDG_CONFIG_DIRS|XDG_CURRENT_DESKTOP|XDG_DATA_DIRS|XDG_GREETER_DATA_DIR|XDG_MENU_PREFIX|XDG_RUNTIME_DIR|XDG_SEAT|XDG_SEAT_PATH|XDG_SESSION_DESKTOP|XDG_SESSION_ID|XDG_SESSION_PATH|XDG_SESSION_TYPE|XDG_VTNR|XMODIFIERS)\\b",n={pattern:/(^(["']?)\w+\2)[ \t]+\S.*/,lookbehind:!0,alias:"punctuation",inside:null},r={bash:n,environment:{pattern:RegExp("\\$"+t),alias:"constant"},variable:[{pattern:/\$?\(\([\s\S]+?\)\)/,greedy:!0,inside:{variable:[{pattern:/(^\$\(\([\s\S]+)\)\)/,lookbehind:!0},/^\$\(\(/],number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/--|\+\+|\*\*=?|<<=?|>>=?|&&|\|\||[=!+\-*/%<>^&|]=?|[?~:]/,punctuation:/\(\(?|\)\)?|,|;/}},{pattern:/\$\((?:\([^)]+\)|[^()])+\)|`[^`]+`/,greedy:!0,inside:{variable:/^\$\(|^`|\)$|`$/}},{pattern:/\$\{[^}]+\}/,greedy:!0,inside:{operator:/:[-=?+]?|[!\/]|##?|%%?|\^\^?|,,?/,punctuation:/[\[\]]/,environment:{pattern:RegExp("(\\{)"+t),lookbehind:!0,alias:"constant"}}},/\$(?:\w+|[#?*!@$])/],entity:/\\(?:[abceEfnrtv\\"]|O?[0-7]{1,3}|U[0-9a-fA-F]{8}|u[0-9a-fA-F]{4}|x[0-9a-fA-F]{1,2})/};e.languages.bash={shebang:{pattern:/^#!\s*\/.*/,alias:"important"},comment:{pattern:/(^|[^"{\\$])#.*/,lookbehind:!0},"function-name":[{pattern:/(\bfunction\s+)[\w-]+(?=(?:\s*\(?:\s*\))?\s*\{)/,lookbehind:!0,alias:"function"},{pattern:/\b[\w-]+(?=\s*\(\s*\)\s*\{)/,alias:"function"}],"for-or-select":{pattern:/(\b(?:for|select)\s+)\w+(?=\s+in\s)/,alias:"variable",lookbehind:!0},"assign-left":{pattern:/(^|[\s;|&]|[<>]\()\w+(?=\+?=)/,inside:{environment:{pattern:RegExp("(^|[\\s;|&]|[<>]\\()"+t),lookbehind:!0,alias:"constant"}},alias:"variable",lookbehind:!0},string:[{pattern:/((?:^|[^<])<<-?\s*)(\w+)\s[\s\S]*?(?:\r?\n|\r)\2/,lookbehind:!0,greedy:!0,inside:r},{pattern:/((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s[\s\S]*?(?:\r?\n|\r)\3/,lookbehind:!0,greedy:!0,inside:{bash:n}},{pattern:/(^|[^\\](?:\\\\)*)"(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|[^"\\`$])*"/,lookbehind:!0,greedy:!0,inside:r},{pattern:/(^|[^$\\])'[^']*'/,lookbehind:!0,greedy:!0},{pattern:/\$'(?:[^'\\]|\\[\s\S])*'/,greedy:!0,inside:{entity:r.entity}}],environment:{pattern:RegExp("\\$?"+t),alias:"constant"},variable:r.variable,function:{pattern:/(^|[\s;|&]|[<>]\()(?:add|apropos|apt|apt-cache|apt-get|aptitude|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|composer|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|docker|docker-compose|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|node|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|podman|podman-compose|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vcpkg|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\s;|&])/,lookbehind:!0},keyword:{pattern:/(^|[\s;|&]|[<>]\()(?:case|do|done|elif|else|esac|fi|for|function|if|in|select|then|until|while)(?=$|[)\s;|&])/,lookbehind:!0},builtin:{pattern:/(^|[\s;|&]|[<>]\()(?:\.|:|alias|bind|break|builtin|caller|cd|command|continue|declare|echo|enable|eval|exec|exit|export|getopts|hash|help|let|local|logout|mapfile|printf|pwd|read|readarray|readonly|return|set|shift|shopt|source|test|times|trap|type|typeset|ulimit|umask|unalias|unset)(?=$|[)\s;|&])/,lookbehind:!0,alias:"class-name"},boolean:{pattern:/(^|[\s;|&]|[<>]\()(?:false|true)(?=$|[)\s;|&])/,lookbehind:!0},"file-descriptor":{pattern:/\B&\d\b/,alias:"important"},operator:{pattern:/\d?<>|>\||\+=|=[=~]?|!=?|<<[<-]?|[&\d]?>>|\d[<>]&?|[<>][&=]?|&[>&]?|\|[&|]?/,inside:{"file-descriptor":{pattern:/^\d/,alias:"important"}}},punctuation:/\$?\(\(?|\)\)?|\.\.|[{}[\];\\]/,number:{pattern:/(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/,lookbehind:!0}},n.inside=e.languages.bash;for(var i=["comment","function-name","for-or-select","assign-left","string","environment","function","keyword","builtin","boolean","file-descriptor","operator","punctuation","number"],a=r.variable[1].inside,o=0;o{"use strict";function t(e){e.languages.bicep={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],property:[{pattern:/([\r\n][ \t]*)[a-z_]\w*(?=[ \t]*:)/i,lookbehind:!0},{pattern:/([\r\n][ \t]*)'(?:\\.|\$(?!\{)|[^'\\\r\n$])*'(?=[ \t]*:)/,lookbehind:!0,greedy:!0}],string:[{pattern:/'''[^'][\s\S]*?'''/,greedy:!0},{pattern:/(^|[^\\'])'(?:\\.|\$(?!\{)|[^'\\\r\n$])*'/,lookbehind:!0,greedy:!0}],"interpolated-string":{pattern:/(^|[^\\'])'(?:\\.|\$(?:(?!\{)|\{[^{}\r\n]*\})|[^'\\\r\n$])*'/,lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/\$\{[^{}\r\n]*\}/,inside:{expression:{pattern:/(^\$\{)[\s\S]+(?=\}$)/,lookbehind:!0},punctuation:/^\$\{|\}$/}},string:/[\s\S]+/}},datatype:{pattern:/(\b(?:output|param)\b[ \t]+\w+[ \t]+)\w+\b/,lookbehind:!0,alias:"class-name"},boolean:/\b(?:false|true)\b/,keyword:/\b(?:existing|for|if|in|module|null|output|param|resource|targetScope|var)\b/,decorator:/@\w+\b/,function:/\b[a-z_]\w*(?=[ \t]*\()/i,number:/(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:E[+-]?\d+)?/i,operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/,punctuation:/[{}[\];(),.:]/},e.languages.bicep["interpolated-string"].inside.interpolation.inside.expression.inside=e.languages.bicep}e.exports=t,t.displayName="bicep",t.aliases=[]},740:(e,t,n)=>{"use strict";var r=n(618);function i(e){e.register(r),function(e){e.languages.haml={"multiline-comment":{pattern:/((?:^|\r?\n|\r)([\t ]*))(?:\/|-#).*(?:(?:\r?\n|\r)\2[\t ].+)*/,lookbehind:!0,alias:"comment"},"multiline-code":[{pattern:/((?:^|\r?\n|\r)([\t ]*)(?:[~-]|[&!]?=)).*,[\t ]*(?:(?:\r?\n|\r)\2[\t ].*,[\t ]*)*(?:(?:\r?\n|\r)\2[\t ].+)/,lookbehind:!0,inside:e.languages.ruby},{pattern:/((?:^|\r?\n|\r)([\t ]*)(?:[~-]|[&!]?=)).*\|[\t ]*(?:(?:\r?\n|\r)\2[\t ].*\|[\t ]*)*/,lookbehind:!0,inside:e.languages.ruby}],filter:{pattern:/((?:^|\r?\n|\r)([\t ]*)):[\w-]+(?:(?:\r?\n|\r)(?:\2[\t ].+|\s*?(?=\r?\n|\r)))+/,lookbehind:!0,inside:{"filter-name":{pattern:/^:[\w-]+/,alias:"symbol"}}},markup:{pattern:/((?:^|\r?\n|\r)[\t ]*)<.+/,lookbehind:!0,inside:e.languages.markup},doctype:{pattern:/((?:^|\r?\n|\r)[\t ]*)!!!(?: .+)?/,lookbehind:!0},tag:{pattern:/((?:^|\r?\n|\r)[\t ]*)[%.#][\w\-#.]*[\w\-](?:\([^)]+\)|\{(?:\{[^}]+\}|[^{}])+\}|\[[^\]]+\])*[\/<>]*/,lookbehind:!0,inside:{attributes:[{pattern:/(^|[^#])\{(?:\{[^}]+\}|[^{}])+\}/,lookbehind:!0,inside:e.languages.ruby},{pattern:/\([^)]+\)/,inside:{"attr-value":{pattern:/(=\s*)(?:"(?:\\.|[^\\"\r\n])*"|[^)\s]+)/,lookbehind:!0},"attr-name":/[\w:-]+(?=\s*!?=|\s*[,)])/,punctuation:/[=(),]/}},{pattern:/\[[^\]]+\]/,inside:e.languages.ruby}],punctuation:/[<>]/}},code:{pattern:/((?:^|\r?\n|\r)[\t ]*(?:[~-]|[&!]?=)).+/,lookbehind:!0,inside:e.languages.ruby},interpolation:{pattern:/#\{[^}]+\}/,inside:{delimiter:{pattern:/^#\{|\}$/,alias:"punctuation"},ruby:{pattern:/[\s\S]+/,inside:e.languages.ruby}}},punctuation:{pattern:/((?:^|\r?\n|\r)[\t ]*)[~=\-&!]+/,lookbehind:!0}};for(var t=["css",{filter:"coffee",language:"coffeescript"},"erb","javascript","less","markdown","ruby","scss","textile"],n={},r=0,i=t.length;r{"use strict";function t(e){!function(e){var t=/(?:\B-|\b_|\b)[A-Za-z][\w-]*(?![\w-])/.source,n="(?:"+/\b(?:unsigned\s+)?long\s+long(?![\w-])/.source+"|"+/\b(?:unrestricted|unsigned)\s+[a-z]+(?![\w-])/.source+"|"+/(?!(?:unrestricted|unsigned)\b)/.source+t+/(?:\s*<(?:[^<>]|<[^<>]*>)*>)?/.source+")"+/(?:\s*\?)?/.source,r={};for(var i in e.languages["web-idl"]={comment:{pattern:/\/\/.*|\/\*[\s\S]*?\*\//,greedy:!0},string:{pattern:/"[^"]*"/,greedy:!0},namespace:{pattern:RegExp(/(\bnamespace\s+)/.source+t),lookbehind:!0},"class-name":[{pattern:/(^|[^\w-])(?:iterable|maplike|setlike)\s*<(?:[^<>]|<[^<>]*>)*>/,lookbehind:!0,inside:r},{pattern:RegExp(/(\b(?:attribute|const|deleter|getter|optional|setter)\s+)/.source+n),lookbehind:!0,inside:r},{pattern:RegExp("("+/\bcallback\s+/.source+t+/\s*=\s*/.source+")"+n),lookbehind:!0,inside:r},{pattern:RegExp(/(\btypedef\b\s*)/.source+n),lookbehind:!0,inside:r},{pattern:RegExp(/(\b(?:callback|dictionary|enum|interface(?:\s+mixin)?)\s+)(?!(?:interface|mixin)\b)/.source+t),lookbehind:!0},{pattern:RegExp(/(:\s*)/.source+t),lookbehind:!0},RegExp(t+/(?=\s+(?:implements|includes)\b)/.source),{pattern:RegExp(/(\b(?:implements|includes)\s+)/.source+t),lookbehind:!0},{pattern:RegExp(n+"(?="+/\s*(?:\.{3}\s*)?/.source+t+/\s*[(),;=]/.source+")"),inside:r}],builtin:/\b(?:ArrayBuffer|BigInt64Array|BigUint64Array|ByteString|DOMString|DataView|Float32Array|Float64Array|FrozenArray|Int16Array|Int32Array|Int8Array|ObservableArray|Promise|USVString|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray)\b/,keyword:[/\b(?:async|attribute|callback|const|constructor|deleter|dictionary|enum|getter|implements|includes|inherit|interface|mixin|namespace|null|optional|or|partial|readonly|required|setter|static|stringifier|typedef|unrestricted)\b/,/\b(?:any|bigint|boolean|byte|double|float|iterable|long|maplike|object|octet|record|sequence|setlike|short|symbol|undefined|unsigned|void)\b/],boolean:/\b(?:false|true)\b/,number:{pattern:/(^|[^\w-])-?(?:0x[0-9a-f]+|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?|NaN|Infinity)(?![\w-])/i,lookbehind:!0},operator:/\.{3}|[=:?<>-]/,punctuation:/[(){}[\].,;]/},e.languages["web-idl"])"class-name"!==i&&(r[i]=e.languages["web-idl"][i]);e.languages.webidl=e.languages["web-idl"]}(e)}e.exports=t,t.displayName="webIdl",t.aliases=[]},745:e=>{"use strict";function t(e){!function(e){var t=e.languages.parser=e.languages.extend("markup",{keyword:{pattern:/(^|[^^])(?:\^(?:case|eval|for|if|switch|throw)\b|@(?:BASE|CLASS|GET(?:_DEFAULT)?|OPTIONS|SET_DEFAULT|USE)\b)/,lookbehind:!0},variable:{pattern:/(^|[^^])\B\$(?:\w+|(?=[.{]))(?:(?:\.|::?)\w+)*(?:\.|::?)?/,lookbehind:!0,inside:{punctuation:/\.|:+/}},function:{pattern:/(^|[^^])\B[@^]\w+(?:(?:\.|::?)\w+)*(?:\.|::?)?/,lookbehind:!0,inside:{keyword:{pattern:/(^@)(?:GET_|SET_)/,lookbehind:!0},punctuation:/\.|:+/}},escape:{pattern:/\^(?:[$^;@()\[\]{}"':]|#[a-f\d]*)/i,alias:"builtin"},punctuation:/[\[\](){};]/});t=e.languages.insertBefore("parser","keyword",{"parser-comment":{pattern:/(\s)#.*/,lookbehind:!0,alias:"comment"},expression:{pattern:/(^|[^^])\((?:[^()]|\((?:[^()]|\((?:[^()])*\))*\))*\)/,greedy:!0,lookbehind:!0,inside:{string:{pattern:/(^|[^^])(["'])(?:(?!\2)[^^]|\^[\s\S])*\2/,lookbehind:!0},keyword:t.keyword,variable:t.variable,function:t.function,boolean:/\b(?:false|true)\b/,number:/\b(?:0x[a-f\d]+|\d+(?:\.\d*)?(?:e[+-]?\d+)?)\b/i,escape:t.escape,operator:/[~+*\/\\%]|!(?:\|\|?|=)?|&&?|\|\|?|==|<[<=]?|>[>=]?|-[fd]?|\b(?:def|eq|ge|gt|in|is|le|lt|ne)\b/,punctuation:t.punctuation}}}),e.languages.insertBefore("inside","punctuation",{expression:t.expression,keyword:t.keyword,variable:t.variable,function:t.function,escape:t.escape,"parser-punctuation":{pattern:t.punctuation,alias:"punctuation"}},t.tag.inside["attr-value"])}(e)}e.exports=t,t.displayName="parser",t.aliases=[]},768:e=>{"use strict";function t(e){e.languages.asm6502={comment:/;.*/,directive:{pattern:/\.\w+(?= )/,alias:"property"},string:/(["'`])(?:\\.|(?!\1)[^\\\r\n])*\1/,"op-code":{pattern:/\b(?:ADC|AND|ASL|BCC|BCS|BEQ|BIT|BMI|BNE|BPL|BRK|BVC|BVS|CLC|CLD|CLI|CLV|CMP|CPX|CPY|DEC|DEX|DEY|EOR|INC|INX|INY|JMP|JSR|LDA|LDX|LDY|LSR|NOP|ORA|PHA|PHP|PLA|PLP|ROL|ROR|RTI|RTS|SBC|SEC|SED|SEI|STA|STX|STY|TAX|TAY|TSX|TXA|TXS|TYA|adc|and|asl|bcc|bcs|beq|bit|bmi|bne|bpl|brk|bvc|bvs|clc|cld|cli|clv|cmp|cpx|cpy|dec|dex|dey|eor|inc|inx|iny|jmp|jsr|lda|ldx|ldy|lsr|nop|ora|pha|php|pla|plp|rol|ror|rti|rts|sbc|sec|sed|sei|sta|stx|sty|tax|tay|tsx|txa|txs|tya)\b/,alias:"keyword"},"hex-number":{pattern:/#?\$[\da-f]{1,4}\b/i,alias:"number"},"binary-number":{pattern:/#?%[01]+\b/,alias:"number"},"decimal-number":{pattern:/#?\b\d+\b/,alias:"number"},register:{pattern:/\b[xya]\b/i,alias:"variable"},punctuation:/[(),:]/}}e.exports=t,t.displayName="asm6502",t.aliases=[]},816:(e,t,n)=>{"use strict";var r=n(1535),i=n(2208),a=r.booleanish,o=r.number,s=r.spaceSeparated;e.exports=i({transform:function(e,t){return"role"===t?t:"aria-"+t.slice(4).toLowerCase()},properties:{ariaActiveDescendant:null,ariaAtomic:a,ariaAutoComplete:null,ariaBusy:a,ariaChecked:a,ariaColCount:o,ariaColIndex:o,ariaColSpan:o,ariaControls:s,ariaCurrent:null,ariaDescribedBy:s,ariaDetails:null,ariaDisabled:a,ariaDropEffect:s,ariaErrorMessage:null,ariaExpanded:a,ariaFlowTo:s,ariaGrabbed:a,ariaHasPopup:null,ariaHidden:a,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:s,ariaLevel:o,ariaLive:null,ariaModal:a,ariaMultiLine:a,ariaMultiSelectable:a,ariaOrientation:null,ariaOwns:s,ariaPlaceholder:null,ariaPosInSet:o,ariaPressed:a,ariaReadOnly:a,ariaRelevant:null,ariaRequired:a,ariaRoleDescription:s,ariaRowCount:o,ariaRowIndex:o,ariaRowSpan:o,ariaSelected:a,ariaSetSize:o,ariaSort:null,ariaValueMax:o,ariaValueMin:o,ariaValueNow:o,ariaValueText:null,role:null}})},851:(e,t,n)=>{e.exports=function(e){if("uniqueLinkId"in(e=e||{})&&(console.warn("ngraph.graph: Starting from version 0.14 `uniqueLinkId` is deprecated.\nUse `multigraph` option instead\n","\n","Note: there is also change in default behavior: From now on each graph\nis considered to be not a multigraph by default (each edge is unique)."),e.multigraph=e.uniqueLinkId),void 0===e.multigraph&&(e.multigraph=!1),"function"!=typeof Map)throw new Error("ngraph.graph requires `Map` to be defined. Please polyfill it before using ngraph");var t,n=new Map,c=new Map,l={},u=0,f=e.multigraph?function(e,t,n){var r=s(e,t),i=l.hasOwnProperty(r);if(i||A(e,t)){i||(l[r]=0);var a="@"+ ++l[r];r=s(e+a,t+a)}return new o(e,t,n,r)}:function(e,t,n){var r=s(e,t),i=c.get(r);return i?(i.data=n,i):new o(e,t,n,r)},h=[],d=k,p=k,g=k,b=k,m={version:20,addNode:y,addLink:function(e,t,n){g();var r=E(e)||y(e),i=E(t)||y(t),o=f(e,t,n),s=c.has(o.id);return c.set(o.id,o),a(r,o),e!==t&&a(i,o),d(o,s?"update":"add"),b(),o},removeLink:function(e,t){return void 0!==t&&(e=A(e,t)),T(e)},removeNode:_,getNode:E,getNodeCount:S,getLinkCount:x,getEdgeCount:x,getLinksCount:x,getNodesCount:S,getLinks:function(e){var t=E(e);return t?t.links:null},forEachNode:I,forEachLinkedNode:function(e,t,r){var i=E(e);if(i&&i.links&&"function"==typeof t)return r?function(e,t,r){for(var i=e.values(),a=i.next();!a.done;){var o=a.value;if(o.fromId===t&&r(n.get(o.toId),o))return!0;a=i.next()}}(i.links,e,t):function(e,t,r){for(var i=e.values(),a=i.next();!a.done;){var o=a.value,s=o.fromId===t?o.toId:o.fromId;if(r(n.get(s),o))return!0;a=i.next()}}(i.links,e,t)},forEachLink:function(e){if("function"==typeof e)for(var t=c.values(),n=t.next();!n.done;){if(e(n.value))return!0;n=t.next()}},beginUpdate:g,endUpdate:b,clear:function(){g(),I(function(e){_(e.id)}),b()},hasLink:A,hasNode:E,getLink:A};return r(m),t=m.on,m.on=function(){return m.beginUpdate=g=C,m.endUpdate=b=M,d=w,p=v,m.on=t,t.apply(m,arguments)},m;function w(e,t){h.push({link:e,changeType:t})}function v(e,t){h.push({node:e,changeType:t})}function y(e,t){if(void 0===e)throw new Error("Invalid node identifier");g();var r=E(e);return r?(r.data=t,p(r,"update")):(r=new i(e,t),p(r,"add")),n.set(e,r),b(),r}function E(e){return n.get(e)}function _(e){var t=E(e);if(!t)return!1;g();var r=t.links;return r&&(r.forEach(T),t.links=null),n.delete(e),p(t,"remove"),b(),!0}function S(){return n.size}function x(){return c.size}function T(e){if(!e)return!1;if(!c.get(e.id))return!1;g(),c.delete(e.id);var t=E(e.fromId),n=E(e.toId);return t&&t.links.delete(e),n&&n.links.delete(e),d(e,"remove"),b(),!0}function A(e,t){if(void 0!==e&&void 0!==t)return c.get(s(e,t))}function k(){}function C(){u+=1}function M(){0==(u-=1)&&h.length>0&&(m.fire("changed",h),h.length=0)}function I(e){if("function"!=typeof e)throw new Error("Function is expected to iterate over graph nodes. You passed "+e);for(var t=n.values(),r=t.next();!r.done;){if(e(r.value))return!0;r=t.next()}}};var r=n(5975);function i(e,t){this.id=e,this.links=null,this.data=t}function a(e,t){e.links?e.links.add(t):e.links=new Set([t])}function o(e,t,n,r){this.fromId=e,this.toId=t,this.data=n,this.id=r}function s(e,t){return e.toString()+"👉 "+t.toString()}},856:(e,t,n)=>{"use strict";var r=n(7183);function i(){}function a(){}a.resetWarningCache=i,e.exports=function(){function e(e,t,n,i,a,o){if(o!==r){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:a,resetWarningCache:i};return n.PropTypes=n,n}},872:(e,t,n)=>{"use strict";n.d(t,{QueryClient:()=>r.QueryClient,QueryClientProvider:()=>i.QueryClientProvider,useQuery:()=>i.useQuery});var r=n(4746);n.o(r,"QueryClientProvider")&&n.d(t,{QueryClientProvider:function(){return r.QueryClientProvider}}),n.o(r,"useQuery")&&n.d(t,{useQuery:function(){return r.useQuery}});var i=n(1443)},889:(e,t,n)=>{"use strict";var r=n(4336);function i(e){e.register(r),e.languages.idris=e.languages.extend("haskell",{comment:{pattern:/(?:(?:--|\|\|\|).*$|\{-[\s\S]*?-\})/m},keyword:/\b(?:Type|case|class|codata|constructor|corecord|data|do|dsl|else|export|if|implementation|implicit|import|impossible|in|infix|infixl|infixr|instance|interface|let|module|mutual|namespace|of|parameters|partial|postulate|private|proof|public|quoteGoal|record|rewrite|syntax|then|total|using|where|with)\b/,builtin:void 0}),e.languages.insertBefore("idris","keyword",{"import-statement":{pattern:/(^\s*import\s+)(?:[A-Z][\w']*)(?:\.[A-Z][\w']*)*/m,lookbehind:!0,inside:{punctuation:/\./}}}),e.languages.idr=e.languages.idris}e.exports=i,i.displayName="idris",i.aliases=["idr"]},892:e=>{"use strict";function t(e){e.languages.gcode={comment:/;.*|\B\(.*?\)\B/,string:{pattern:/"(?:""|[^"])*"/,greedy:!0},keyword:/\b[GM]\d+(?:\.\d+)?\b/,property:/\b[A-Z]/,checksum:{pattern:/(\*)\d+/,lookbehind:!0,alias:"number"},punctuation:/[:*]/}}e.exports=t,t.displayName="gcode",t.aliases=[]},905:e=>{"use strict";function t(e){e.languages.cypher={comment:/\/\/.*/,string:{pattern:/"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\\\r\n]|\\.)*'/,greedy:!0},"class-name":{pattern:/(:\s*)(?:\w+|`(?:[^`\\\r\n])*`)(?=\s*[{):])/,lookbehind:!0,greedy:!0},relationship:{pattern:/(-\[\s*(?:\w+\s*|`(?:[^`\\\r\n])*`\s*)?:\s*|\|\s*:\s*)(?:\w+|`(?:[^`\\\r\n])*`)/,lookbehind:!0,greedy:!0,alias:"property"},identifier:{pattern:/`(?:[^`\\\r\n])*`/,greedy:!0},variable:/\$\w+/,keyword:/\b(?:ADD|ALL|AND|AS|ASC|ASCENDING|ASSERT|BY|CALL|CASE|COMMIT|CONSTRAINT|CONTAINS|CREATE|CSV|DELETE|DESC|DESCENDING|DETACH|DISTINCT|DO|DROP|ELSE|END|ENDS|EXISTS|FOR|FOREACH|IN|INDEX|IS|JOIN|KEY|LIMIT|LOAD|MANDATORY|MATCH|MERGE|NODE|NOT|OF|ON|OPTIONAL|OR|ORDER(?=\s+BY)|PERIODIC|REMOVE|REQUIRE|RETURN|SCALAR|SCAN|SET|SKIP|START|STARTS|THEN|UNION|UNIQUE|UNWIND|USING|WHEN|WHERE|WITH|XOR|YIELD)\b/i,function:/\b\w+\b(?=\s*\()/,boolean:/\b(?:false|null|true)\b/i,number:/\b(?:0x[\da-fA-F]+|\d+(?:\.\d+)?(?:[eE][+-]?\d+)?)\b/,operator:/:|<--?|--?>?|<>|=~?|[<>]=?|[+*/%^|]|\.\.\.?/,punctuation:/[()[\]{},;.]/}}e.exports=t,t.displayName="cypher",t.aliases=[]},913:e=>{"use strict";function t(e){!function(e){e.languages.typescript=e.languages.extend("javascript",{"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,lookbehind:!0,greedy:!0,inside:null},builtin:/\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/}),e.languages.typescript.keyword.push(/\b(?:abstract|declare|is|keyof|readonly|require)\b/,/\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/,/\btype\b(?=\s*(?:[\{*]|$))/),delete e.languages.typescript.parameter,delete e.languages.typescript["literal-property"];var t=e.languages.extend("typescript",{});delete t["class-name"],e.languages.typescript["class-name"].inside=t,e.languages.insertBefore("typescript","function",{decorator:{pattern:/@[$\w\xA0-\uFFFF]+/,inside:{at:{pattern:/^@/,alias:"operator"},function:/^[\s\S]+/}},"generic-function":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,greedy:!0,inside:{function:/^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:t}}}}),e.languages.ts=e.languages.typescript}(e)}e.exports=t,t.displayName="typescript",t.aliases=["ts"]},914:e=>{"use strict";function t(e){e.languages.ini={comment:{pattern:/(^[ \f\t\v]*)[#;][^\n\r]*/m,lookbehind:!0},section:{pattern:/(^[ \f\t\v]*)\[[^\n\r\]]*\]?/m,lookbehind:!0,inside:{"section-name":{pattern:/(^\[[ \f\t\v]*)[^ \f\t\v\]]+(?:[ \f\t\v]+[^ \f\t\v\]]+)*/,lookbehind:!0,alias:"selector"},punctuation:/\[|\]/}},key:{pattern:/(^[ \f\t\v]*)[^ \f\n\r\t\v=]+(?:[ \f\t\v]+[^ \f\n\r\t\v=]+)*(?=[ \f\t\v]*=)/m,lookbehind:!0,alias:"attr-name"},value:{pattern:/(=[ \f\t\v]*)[^ \f\n\r\t\v]+(?:[ \f\t\v]+[^ \f\n\r\t\v]+)*/,lookbehind:!0,alias:"attr-value",inside:{"inner-value":{pattern:/^("|').+(?=\1$)/,lookbehind:!0}}},punctuation:/=/}}e.exports=t,t.displayName="ini",t.aliases=[]},923:(e,t,n)=>{"use strict";var r=n(8692);e.exports=r,r.register(n(2884)),r.register(n(7797)),r.register(n(6995)),r.register(n(5916)),r.register(n(5369)),r.register(n(5083)),r.register(n(3659)),r.register(n(2858)),r.register(n(5926)),r.register(n(4595)),r.register(n(323)),r.register(n(310)),r.register(n(5996)),r.register(n(6285)),r.register(n(9253)),r.register(n(768)),r.register(n(5766)),r.register(n(6969)),r.register(n(3907)),r.register(n(4972)),r.register(n(3678)),r.register(n(5656)),r.register(n(712)),r.register(n(9738)),r.register(n(6652)),r.register(n(5095)),r.register(n(731)),r.register(n(1275)),r.register(n(7659)),r.register(n(7650)),r.register(n(7751)),r.register(n(2601)),r.register(n(5445)),r.register(n(7465)),r.register(n(8433)),r.register(n(3776)),r.register(n(3088)),r.register(n(512)),r.register(n(6804)),r.register(n(3251)),r.register(n(6391)),r.register(n(3029)),r.register(n(9752)),r.register(n(33)),r.register(n(1377)),r.register(n(94)),r.register(n(8241)),r.register(n(5781)),r.register(n(5470)),r.register(n(2819)),r.register(n(9048)),r.register(n(905)),r.register(n(8356)),r.register(n(6627)),r.register(n(1322)),r.register(n(5945)),r.register(n(5875)),r.register(n(153)),r.register(n(2277)),r.register(n(9065)),r.register(n(5770)),r.register(n(1739)),r.register(n(1337)),r.register(n(1421)),r.register(n(377)),r.register(n(2432)),r.register(n(8473)),r.register(n(2668)),r.register(n(5183)),r.register(n(4473)),r.register(n(4761)),r.register(n(8160)),r.register(n(7949)),r.register(n(4003)),r.register(n(3770)),r.register(n(9122)),r.register(n(7322)),r.register(n(4052)),r.register(n(9846)),r.register(n(4584)),r.register(n(892)),r.register(n(8738)),r.register(n(4319)),r.register(n(58)),r.register(n(4652)),r.register(n(4838)),r.register(n(7600)),r.register(n(9443)),r.register(n(6325)),r.register(n(4508)),r.register(n(7849)),r.register(n(8072)),r.register(n(740)),r.register(n(6954)),r.register(n(4336)),r.register(n(2038)),r.register(n(9387)),r.register(n(597)),r.register(n(5174)),r.register(n(6853)),r.register(n(5686)),r.register(n(8194)),r.register(n(7107)),r.register(n(5467)),r.register(n(1525)),r.register(n(889)),r.register(n(6096)),r.register(n(452)),r.register(n(9338)),r.register(n(914)),r.register(n(4278)),r.register(n(3210)),r.register(n(4498)),r.register(n(3298)),r.register(n(2573)),r.register(n(7231)),r.register(n(3191)),r.register(n(187)),r.register(n(4215)),r.register(n(2293)),r.register(n(7603)),r.register(n(6647)),r.register(n(8148)),r.register(n(5729)),r.register(n(5166)),r.register(n(1328)),r.register(n(9229)),r.register(n(2809)),r.register(n(6656)),r.register(n(7427)),r.register(n(335)),r.register(n(5308)),r.register(n(5912)),r.register(n(2620)),r.register(n(1558)),r.register(n(4547)),r.register(n(2905)),r.register(n(5706)),r.register(n(1402)),r.register(n(4099)),r.register(n(8175)),r.register(n(1718)),r.register(n(8306)),r.register(n(8038)),r.register(n(6485)),r.register(n(5878)),r.register(n(543)),r.register(n(5562)),r.register(n(7007)),r.register(n(1997)),r.register(n(6966)),r.register(n(3019)),r.register(n(23)),r.register(n(3910)),r.register(n(3763)),r.register(n(2964)),r.register(n(5002)),r.register(n(4791)),r.register(n(2763)),r.register(n(1117)),r.register(n(463)),r.register(n(1698)),r.register(n(6146)),r.register(n(2408)),r.register(n(1464)),r.register(n(971)),r.register(n(4713)),r.register(n(70)),r.register(n(5268)),r.register(n(4797)),r.register(n(9128)),r.register(n(1471)),r.register(n(4983)),r.register(n(745)),r.register(n(9058)),r.register(n(2289)),r.register(n(5970)),r.register(n(1092)),r.register(n(6227)),r.register(n(5578)),r.register(n(1496)),r.register(n(6956)),r.register(n(164)),r.register(n(6393)),r.register(n(1459)),r.register(n(7309)),r.register(n(8985)),r.register(n(8545)),r.register(n(3935)),r.register(n(4493)),r.register(n(3171)),r.register(n(6220)),r.register(n(1288)),r.register(n(4340)),r.register(n(5508)),r.register(n(4727)),r.register(n(5456)),r.register(n(4591)),r.register(n(5306)),r.register(n(4559)),r.register(n(2563)),r.register(n(7794)),r.register(n(2132)),r.register(n(8622)),r.register(n(3123)),r.register(n(6181)),r.register(n(4210)),r.register(n(9984)),r.register(n(3791)),r.register(n(2252)),r.register(n(6358)),r.register(n(618)),r.register(n(7680)),r.register(n(5477)),r.register(n(640)),r.register(n(6042)),r.register(n(7473)),r.register(n(4478)),r.register(n(5147)),r.register(n(6580)),r.register(n(7993)),r.register(n(5670)),r.register(n(1972)),r.register(n(6923)),r.register(n(7656)),r.register(n(7881)),r.register(n(267)),r.register(n(61)),r.register(n(9530)),r.register(n(5880)),r.register(n(1269)),r.register(n(5394)),r.register(n(56)),r.register(n(9459)),r.register(n(7459)),r.register(n(5229)),r.register(n(6402)),r.register(n(4867)),r.register(n(4689)),r.register(n(7639)),r.register(n(8297)),r.register(n(6770)),r.register(n(1359)),r.register(n(9683)),r.register(n(1570)),r.register(n(4696)),r.register(n(3571)),r.register(n(913)),r.register(n(6499)),r.register(n(358)),r.register(n(5776)),r.register(n(1242)),r.register(n(2286)),r.register(n(7872)),r.register(n(8004)),r.register(n(497)),r.register(n(3802)),r.register(n(604)),r.register(n(4624)),r.register(n(7545)),r.register(n(1283)),r.register(n(2810)),r.register(n(744)),r.register(n(1126)),r.register(n(8400)),r.register(n(9144)),r.register(n(4485)),r.register(n(4686)),r.register(n(60)),r.register(n(394)),r.register(n(2837)),r.register(n(2831)),r.register(n(5542))},934:(e,t,n)=>{const r=n(3103),i=n(5987);function a(e){let t=r(e),n=Math.pow(2,e);return`\n\n/**\n * Our implementation of QuadTree is non-recursive to avoid GC hit\n * This data structure represent stack of elements\n * which we are trying to insert into quad tree.\n */\nfunction InsertStack () {\n this.stack = [];\n this.popIdx = 0;\n}\n\nInsertStack.prototype = {\n isEmpty: function() {\n return this.popIdx === 0;\n },\n push: function (node, body) {\n var item = this.stack[this.popIdx];\n if (!item) {\n // we are trying to avoid memory pressure: create new element\n // only when absolutely necessary\n this.stack[this.popIdx] = new InsertStackElement(node, body);\n } else {\n item.node = node;\n item.body = body;\n }\n ++this.popIdx;\n },\n pop: function () {\n if (this.popIdx > 0) {\n return this.stack[--this.popIdx];\n }\n },\n reset: function () {\n this.popIdx = 0;\n }\n};\n\nfunction InsertStackElement(node, body) {\n this.node = node; // QuadTree node\n this.body = body; // physical body which needs to be inserted to node\n}\n\n${l(e)}\n${o(e)}\n${c(e)}\n${s(e)}\n\nfunction createQuadTree(options, random) {\n options = options || {};\n options.gravity = typeof options.gravity === 'number' ? options.gravity : -1;\n options.theta = typeof options.theta === 'number' ? options.theta : 0.8;\n\n var gravity = options.gravity;\n var updateQueue = [];\n var insertStack = new InsertStack();\n var theta = options.theta;\n\n var nodesCache = [];\n var currentInCache = 0;\n var root = newNode();\n\n return {\n insertBodies: insertBodies,\n\n /**\n * Gets root node if it is present\n */\n getRoot: function() {\n return root;\n },\n\n updateBodyForce: update,\n\n options: function(newOptions) {\n if (newOptions) {\n if (typeof newOptions.gravity === 'number') {\n gravity = newOptions.gravity;\n }\n if (typeof newOptions.theta === 'number') {\n theta = newOptions.theta;\n }\n\n return this;\n }\n\n return {\n gravity: gravity,\n theta: theta\n };\n }\n };\n\n function newNode() {\n // To avoid pressure on GC we reuse nodes.\n var node = nodesCache[currentInCache];\n if (node) {\n${function(){let e=[];for(let t=0;t {var}max) {var}max = pos.{var};",{indent:6})}\n }\n\n // Makes the bounds square.\n var maxSideLength = -Infinity;\n ${t("if ({var}max - {var}min > maxSideLength) maxSideLength = {var}max - {var}min ;",{indent:4})}\n\n currentInCache = 0;\n root = newNode();\n ${t("root.min_{var} = {var}min;",{indent:4})}\n ${t("root.max_{var} = {var}min + maxSideLength;",{indent:4})}\n\n i = bodies.length - 1;\n if (i >= 0) {\n root.body = bodies[i];\n }\n while (i--) {\n insert(bodies[i], root);\n }\n }\n\n function insert(newBody) {\n insertStack.reset();\n insertStack.push(root, newBody);\n\n while (!insertStack.isEmpty()) {\n var stackItem = insertStack.pop();\n var node = stackItem.node;\n var body = stackItem.body;\n\n if (!node.body) {\n // This is internal node. Update the total mass of the node and center-of-mass.\n ${t("var {var} = body.pos.{var};",{indent:8})}\n node.mass += body.mass;\n ${t("node.mass_{var} += body.mass * {var};",{indent:8})}\n\n // Recursively insert the body in the appropriate quadrant.\n // But first find the appropriate quadrant.\n var quadIdx = 0; // Assume we are in the 0's quad.\n ${t("var min_{var} = node.min_{var};",{indent:8})}\n ${t("var max_{var} = (min_{var} + node.max_{var}) / 2;",{indent:8})}\n\n${function(){let t=[],n=Array(9).join(" ");for(let r=0;r max_${i(r)}) {`),t.push(n+` quadIdx = quadIdx + ${Math.pow(2,r)};`),t.push(n+` min_${i(r)} = max_${i(r)};`),t.push(n+` max_${i(r)} = node.max_${i(r)};`),t.push(n+"}");return t.join("\n")}()}\n\n var child = getChild(node, quadIdx);\n\n if (!child) {\n // The node is internal but this quadrant is not taken. Add\n // subnode to it.\n child = newNode();\n ${t("child.min_{var} = min_{var};",{indent:10})}\n ${t("child.max_{var} = max_{var};",{indent:10})}\n child.body = body;\n\n setChild(node, quadIdx, child);\n } else {\n // continue searching in this quadrant.\n insertStack.push(child, body);\n }\n } else {\n // We are trying to add to the leaf node.\n // We have to convert current leaf into internal node\n // and continue adding two nodes.\n var oldBody = node.body;\n node.body = null; // internal nodes do not cary bodies\n\n if (isSamePosition(oldBody.pos, body.pos)) {\n // Prevent infinite subdivision by bumping one node\n // anywhere in this quadrant\n var retriesCount = 3;\n do {\n var offset = random.nextDouble();\n ${t("var d{var} = (node.max_{var} - node.min_{var}) * offset;",{indent:12})}\n\n ${t("oldBody.pos.{var} = node.min_{var} + d{var};",{indent:12})}\n retriesCount -= 1;\n // Make sure we don't bump it out of the box. If we do, next iteration should fix it\n } while (retriesCount > 0 && isSamePosition(oldBody.pos, body.pos));\n\n if (retriesCount === 0 && isSamePosition(oldBody.pos, body.pos)) {\n // This is very bad, we ran out of precision.\n // if we do not return from the method we'll get into\n // infinite loop here. So we sacrifice correctness of layout, and keep the app running\n // Next layout iteration should get larger bounding box in the first step and fix this\n return;\n }\n }\n // Next iteration should subdivide node further.\n insertStack.push(node, oldBody);\n insertStack.push(node, body);\n }\n }\n }\n}\nreturn createQuadTree;\n\n`}function o(e){let t=r(e);return`\n function isSamePosition(point1, point2) {\n ${t("var d{var} = Math.abs(point1.{var} - point2.{var});",{indent:2})}\n \n return ${t("d{var} < 1e-8",{join:" && "})};\n } \n`}function s(e){var t=Math.pow(2,e);return`\nfunction setChild(node, idx, child) {\n ${function(){let e=[];for(let n=0;n 0) {\n return this.stack[--this.popIdx];\n }\n },\n reset: function () {\n this.popIdx = 0;\n }\n};\n\nfunction InsertStackElement(node, body) {\n this.node = node; // QuadTree node\n this.body = body; // physical body which needs to be inserted to node\n}\n"}e.exports=function(e){let t=a(e);return new Function(t)()},e.exports.generateQuadTreeFunctionBody=a,e.exports.getInsertStackCode=u,e.exports.getQuadNodeCode=l,e.exports.isSamePosition=o,e.exports.getChildBodyCode=c,e.exports.setChildBodyCode=s},971:e=>{"use strict";function t(e){e.languages.nix={comment:{pattern:/\/\*[\s\S]*?\*\/|#.*/,greedy:!0},string:{pattern:/"(?:[^"\\]|\\[\s\S])*"|''(?:(?!'')[\s\S]|''(?:'|\\|\$\{))*''/,greedy:!0,inside:{interpolation:{pattern:/(^|(?:^|(?!'').)[^\\])\$\{(?:[^{}]|\{[^}]*\})*\}/,lookbehind:!0,inside:null}}},url:[/\b(?:[a-z]{3,7}:\/\/)[\w\-+%~\/.:#=?&]+/,{pattern:/([^\/])(?:[\w\-+%~.:#=?&]*(?!\/\/)[\w\-+%~\/.:#=?&])?(?!\/\/)\/[\w\-+%~\/.:#=?&]*/,lookbehind:!0}],antiquotation:{pattern:/\$(?=\{)/,alias:"important"},number:/\b\d+\b/,keyword:/\b(?:assert|builtins|else|if|in|inherit|let|null|or|then|with)\b/,function:/\b(?:abort|add|all|any|attrNames|attrValues|baseNameOf|compareVersions|concatLists|currentSystem|deepSeq|derivation|dirOf|div|elem(?:At)?|fetch(?:Tarball|url)|filter(?:Source)?|fromJSON|genList|getAttr|getEnv|hasAttr|hashString|head|import|intersectAttrs|is(?:Attrs|Bool|Function|Int|List|Null|String)|length|lessThan|listToAttrs|map|mul|parseDrvName|pathExists|read(?:Dir|File)|removeAttrs|replaceStrings|seq|sort|stringLength|sub(?:string)?|tail|throw|to(?:File|JSON|Path|String|XML)|trace|typeOf)\b|\bfoldl'\B/,boolean:/\b(?:false|true)\b/,operator:/[=!<>]=?|\+\+?|\|\||&&|\/\/|->?|[?@]/,punctuation:/[{}()[\].,:;]/},e.languages.nix.string.inside.interpolation.inside=e.languages.nix}e.exports=t,t.displayName="nix",t.aliases=[]},993:(e,t,n)=>{"use strict";var r=n(6326),i=n(334),a=n(9828);function o(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n