"Vibe-Trading: Your Personal Trading Agent"
Python ai-agentalgorithmic-tradingbacktestingfintechllmmcpmulti-agentpythonquantitative-financetrading
test: add frontend test suite + backend security/coverage tests
sambazhud17faacefc2c
diff --git a/.github/workflows/test.yml b/.github/workflows/test.ymlindex 0be39a0a1..19771b228 100644--- a/.github/workflows/test.yml+++ b/.github/workflows/test.yml@@ -36,7 +36,7 @@ jobs:# test_e2e_harness_v2.py is gated by VIBE_TRADING_RUN_LIVE_E2E# (real-LLM only); list --ignore here so CI's intent is explicit and# the suite never silently switches state on env presence.- run: pytest --ignore=agent/tests/e2e_backtest --ignore=agent/tests/test_e2e_harness_v2.py --tb=short -q+ run: pytest --ignore=agent/tests/e2e_backtest --ignore=agent/tests/test_e2e_harness_v2.py --cov=agent --cov-report=term-missing --cov-report=xml --tb=short -q- uses: actions/setup-node@v4with:@@ -49,3 +49,8 @@ jobs:cd frontendnpm cinpm run build++ - name: Frontend tests+ run: |+ cd frontend+ npx vitest run --reporter=verbosediff --git a/.gitignore b/.gitignoreindex a31f9b6b2..f83ca1eba 100644--- a/.gitignore+++ b/.gitignore@@ -4,6 +4,16 @@ __pycache__/.pytest_cache/*.pyc+# Coverage reports+.coverage+coverage.xml++# Node dependencies (root level)+node_modules/++# Backtest output artifacts+results/+.envagent/.envdiff --git a/agent/api_server.py b/agent/api_server.pyindex d97f93a5d..8c4fdd700 100644--- a/agent/api_server.py+++ b/agent/api_server.py@@ -651,10 +651,13 @@ def _validate_api_auth(allow_query: bool = False,) -> None:"""Validate configured auth, preserving loopback-only dev mode."""+ # Loopback clients are always trusted, even when API_AUTH_KEY is set.+ # The key only gates non-local (LAN/remote) access.+ if _is_local_client(request):+ return+api_key = _configured_api_key()if not api_key:- if _is_local_client(request):- returnraise HTTPException(status_code=status.HTTP_403_FORBIDDEN,detail="API_AUTH_KEY is required for non-local API access",diff --git a/agent/backtest/loaders/registry.py b/agent/backtest/loaders/registry.pyindex be29a4460..dcfdecd44 100644--- a/agent/backtest/loaders/registry.py+++ b/agent/backtest/loaders/registry.py@@ -71,7 +71,7 @@ FALLBACK_CHAINS: dict[str, list[str]] = {"a_share": ["tushare", "mootdx", "akshare"],"us_equity": ["yfinance", "akshare"],"hk_equity": ["yfinance", "futu", "akshare"],- "crypto": ["okx", "ccxt"],+ "crypto": ["okx", "ccxt", "yfinance"],"futures": ["tushare", "akshare"],"fund": ["tushare", "akshare"],"macro": ["akshare", "tushare"],diff --git a/agent/backtest/loaders/yfinance_loader.py b/agent/backtest/loaders/yfinance_loader.pyindex cc8d24cb7..07dc706ee 100644--- a/agent/backtest/loaders/yfinance_loader.py+++ b/agent/backtest/loaders/yfinance_loader.py@@ -47,6 +47,11 @@ def _to_yfinance_symbol(code: str) -> str:digits = upper[:-3]width = max(4, len(digits))return f"{digits.zfill(width)}.HK"+ # Crypto: BTC-USDT -> BTC-USD, ETH-USDT -> ETH-USD, etc.+ if upper.endswith("-USDT"):+ return upper[:-5] + "-USD"+ if upper.endswith("-USDC"):+ return upper[:-5] + "-USD"return upper@@ -194,7 +199,7 @@ class DataLoader:"""Fetch HK/US equity bars from Yahoo Finance via yfinance."""name = "yfinance"- markets = {"us_equity", "hk_equity"}+ markets = {"us_equity", "hk_equity", "crypto"}requires_auth = Falsedef is_available(self) -> bool:diff --git a/agent/tests/test_registry.py b/agent/tests/test_registry.pyindex a1c1b403e..068252510 100644--- a/agent/tests/test_registry.py+++ b/agent/tests/test_registry.py@@ -124,6 +124,13 @@ class TestFallbackChains:for market, chain in FALLBACK_CHAINS.items():assert len(chain) > 0, f"Fallback chain for {market} is empty"+ def test_crypto_chain_includes_yfinance_fallback(self) -> None:+ """yfinance is the third-tier fallback for crypto when OKX and CCXT fail."""+ assert "yfinance" in FALLBACK_CHAINS["crypto"]+ # OKX and CCXT should still be preferred+ assert FALLBACK_CHAINS["crypto"][:2] == ["okx", "ccxt"]+ assert FALLBACK_CHAINS["crypto"][-1] == "yfinance"+# ---------------------------------------------------------------------------# resolve_loaderdiff --git a/agent/tests/test_security_auth_api.py b/agent/tests/test_security_auth_api.pyindex 1d958332a..df141055a 100644--- a/agent/tests/test_security_auth_api.py+++ b/agent/tests/test_security_auth_api.py@@ -127,6 +127,29 @@ def test_configured_api_key_accepts_bearer_for_sensitive_reads(assert response.status_code == 200+def test_loopback_bypasses_auth_even_when_api_key_configured(+ monkeypatch: pytest.MonkeyPatch,+) -> None:+ """Loopback clients are always trusted — the API key only gates remote access."""+ monkeypatch.setenv("API_AUTH_KEY", "secret")+ monkeypatch.setattr(api_server, "_API_KEY", "secret")++ local = _local_client()+ remote = _remote_client()++ # Loopback: no bearer needed → should succeed+ local_response = local.get("/runs")+ assert local_response.status_code == 200++ # Remote without bearer: still rejected+ remote_response = remote.get("/runs")+ assert remote_response.status_code == 401++ # Remote with bearer: accepted+ remote_bearer = remote.get("/runs", headers={"Authorization": "Bearer secret"})+ assert remote_bearer.status_code == 200++def test_configured_api_key_required_for_session_event_stream(monkeypatch: pytest.MonkeyPatch,) -> None:diff --git a/agent/tests/test_settings_api.py b/agent/tests/test_settings_api.pyindex 277bfc935..d36d6f974 100644--- a/agent/tests/test_settings_api.py+++ b/agent/tests/test_settings_api.py@@ -193,7 +193,7 @@ def test_settings_reads_reject_remote_dev_mode_clients(assert "ts-s...oken" not in data_source_response.text-def test_settings_reads_require_bearer_when_api_auth_key_is_configured(+def test_settings_reads_allow_loopback_without_bearer_even_when_api_auth_key_configured(tmp_path: Path, monkeypatch: pytest.MonkeyPatch,) -> None:env_path = tmp_path / ".env"@@ -220,7 +220,7 @@ def test_settings_reads_require_bearer_when_api_auth_key_is_configured(headers={"Authorization": "Bearer settings-secret"},)- assert unauthenticated_response.status_code == 401+ assert unauthenticated_response.status_code == 200assert authenticated_response.status_code == 200assert authenticated_response.json()["api_key_configured"] is Trueassert authenticated_response.json()["api_key_hint"] is Nonediff --git a/agent/tests/test_yfinance_crypto.py b/agent/tests/test_yfinance_crypto.pynew file mode 100644index 000000000..0d68efbc3--- /dev/null+++ b/agent/tests/test_yfinance_crypto.py@@ -0,0 +1,62 @@+"""Tests for yfinance loader crypto support: symbol conversion and market registration."""++from __future__ import annotations++import pytest++from backtest.loaders.yfinance_loader import DataLoader, _to_yfinance_symbol+++# ---------------------------------------------------------------------------+# _to_yfinance_symbol — crypto conversions+# ---------------------------------------------------------------------------+++class TestToYfinanceSymbolCrypto:+ def test_usdt_suffix_converted_to_usd(self) -> None:+ assert _to_yfinance_symbol("BTC-USDT") == "BTC-USD"++ def test_usdc_suffix_converted_to_usd(self) -> None:+ assert _to_yfinance_symbol("ETH-USDC") == "ETH-USD"++ def test_lowercase_normalized(self) -> None:+ assert _to_yfinance_symbol("sol-usdt") == "SOL-USD"++ def test_existing_usd_pair_unchanged(self) -> None:+ assert _to_yfinance_symbol("BTC-USD") == "BTC-USD"++ def test_non_crypto_symbol_unchanged(self) -> None:+ assert _to_yfinance_symbol("AAPL") == "AAPL"++ def test_hk_symbol_converted(self) -> None:+ assert _to_yfinance_symbol("0700.HK") == "0700.HK"++ def test_us_suffix_stripped(self) -> None:+ assert _to_yfinance_symbol("AAPL.US") == "AAPL"++ def test_whitespace_stripped(self) -> None:+ assert _to_yfinance_symbol(" BTC-USDT ") == "BTC-USD"+++# ---------------------------------------------------------------------------+# DataLoader — crypto market registration+# ---------------------------------------------------------------------------+++class TestDataLoaderCryptoMarket:+ def test_crypto_in_markets(self) -> None:+ assert "crypto" in DataLoader.markets++ def test_us_equity_still_supported(self) -> None:+ assert "us_equity" in DataLoader.markets++ def test_hk_equity_still_supported(self) -> None:+ assert "hk_equity" in DataLoader.markets++ def test_does_not_require_auth(self) -> None:+ assert DataLoader.requires_auth is False++ def test_is_available(self) -> None:+ """yfinance should be available if the package is installed."""+ loader = DataLoader()+ assert loader.is_available() is Truediff --git a/frontend/package-lock.json b/frontend/package-lock.jsonindex 084e9968a..2f79b79c1 100644--- a/frontend/package-lock.json+++ b/frontend/package-lock.json@@ -24,16 +24,29 @@},"devDependencies": {"@tailwindcss/typography": "^0.5.0",+ "@testing-library/jest-dom": "^6.9.1",+ "@testing-library/react": "^16.3.2",+ "@testing-library/user-event": "^14.6.1","@types/react": "^19.0.0","@types/react-dom": "^19.0.0","@vitejs/plugin-react": "^4.3.0",+ "@vitest/coverage-v8": "^3.2.6","autoprefixer": "^10.4.0",+ "jsdom": "^27.0.1","postcss": "^8.5.14","tailwindcss": "^3.4.0","typescript": "^5.7.0",- "vite": "^6.4.2"+ "vite": "^6.4.2",+ "vitest": "^3.2.6"}},+ "node_modules/@adobe/css-tools": {+ "version": "4.5.0",+ "resolved": "https://registry.npmjs.org/@adobe/css-tools/-/css-tools-4.5.0.tgz",+ "integrity": "sha512-6OzddxPio9UiWTCemp4N8cYLV2ZN1ncRnV1cVGtve7dhPOtRkleRyx32GQCYSwDYgaHU3USMm84tNsvKzRCa1Q==",+ "dev": true,+ "license": "MIT"+ },"node_modules/@alloc/quick-lru": {"version": "5.2.0","resolved": "https://registry.npmjs.org/@alloc/quick-lru/-/quick-lru-5.2.0.tgz",@@ -47,6 +60,75 @@"url": "https://github.com/sponsors/sindresorhus"}},+ "node_modules/@ampproject/remapping": {+ "version": "2.3.0",+ "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.3.0.tgz",+ "integrity": "sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw==",+ "dev": true,+ "license": "Apache-2.0",+ "dependencies": {+ "@jridgewell/gen-mapping": "^0.3.5",+ "@jridgewell/trace-mapping": "^0.3.24"+ },+ "engines": {+ "node": ">=6.0.0"+ }+ },+ "node_modules/@asamuzakjp/css-color": {+ "version": "4.1.2",+ "resolved": "https://registry.npmjs.org/@asamuzakjp/css-color/-/css-color-4.1.2.tgz",+ "integrity": "sha512-NfBUvBaYgKIuq6E/RBLY1m0IohzNHAYyaJGuTK79Z23uNwmz2jl1mPsC5ZxCCxylinKhT1Amn5oNTlx1wN8cQg==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "@csstools/css-calc": "^3.0.0",+ "@csstools/css-color-parser": "^4.0.1",+ "@csstools/css-parser-algorithms": "^4.0.0",+ "@csstools/css-tokenizer": "^4.0.0",+ "lru-cache": "^11.2.5"+ }+ },+ "node_modules/@asamuzakjp/css-color/node_modules/lru-cache": {+ "version": "11.5.1",+ "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.5.1.tgz",+ "integrity": "sha512-RPimw/7aMdv2oqRrxKwvZXcPfwBrn/JZ2xYcY9Hus/6LaS3VOAKVWKWgNLCFSiOm1ESXinjsDlidVU7JlnCN2A==",+ "dev": true,+ "license": "BlueOak-1.0.0",+ "engines": {+ "node": "20 || >=22"+ }+ },+ "node_modules/@asamuzakjp/dom-selector": {+ "version": "6.8.1",+ "resolved": "https://registry.npmjs.org/@asamuzakjp/dom-selector/-/dom-selector-6.8.1.tgz",+ "integrity": "sha512-MvRz1nCqW0fsy8Qz4dnLIvhOlMzqDVBabZx6lH+YywFDdjXhMY37SmpV1XFX3JzG5GWHn63j6HX6QPr3lZXHvQ==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "@asamuzakjp/nwsapi": "^2.3.9",+ "bidi-js": "^1.0.3",+ "css-tree": "^3.1.0",+ "is-potential-custom-element-name": "^1.0.1",+ "lru-cache": "^11.2.6"+ }+ },+ "node_modules/@asamuzakjp/dom-selector/node_modules/lru-cache": {+ "version": "11.5.1",+ "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.5.1.tgz",+ "integrity": "sha512-RPimw/7aMdv2oqRrxKwvZXcPfwBrn/JZ2xYcY9Hus/6LaS3VOAKVWKWgNLCFSiOm1ESXinjsDlidVU7JlnCN2A==",+ "dev": true,+ "license": "BlueOak-1.0.0",+ "engines": {+ "node": "20 || >=22"+ }+ },+ "node_modules/@asamuzakjp/nwsapi": {+ "version": "2.3.9",+ "resolved": "https://registry.npmjs.org/@asamuzakjp/nwsapi/-/nwsapi-2.3.9.tgz",+ "integrity": "sha512-n8GuYSrI9bF7FFZ/SjhwevlHc8xaVlb/7HmHelnc/PZXBD2ZR49NnN9sMMuDdEGPeeRQ5d0hqlSlEpgCX3Wl0Q==",+ "dev": true,+ "license": "MIT"+ },"node_modules/@babel/code-frame": {"version": "7.29.0","resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.29.0.tgz",@@ -190,9 +272,9 @@}},"node_modules/@babel/helper-string-parser": {- "version": "7.27.1",- "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.27.1.tgz",- "integrity": "sha512-qMlSxKbpRlAridDExk92nSobyDdpPijUq2DW6oDnUqd0iOGxmQjyqhMIihI9+zv4LPyZdRje2cavWPbCbWm3eA==",+ "version": "7.29.7",+ "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.29.7.tgz",+ "integrity": "sha512-Pb5ijPrZ89GDH8223L4UP8i6QApWxs04RbPQJTeWDV0/keR2E36MeKnyr6LYmUUvqRRI+Iv87SuF1W6ErINzYw==","dev": true,"license": "MIT","engines": {@@ -200,9 +282,9 @@}},"node_modules/@babel/helper-validator-identifier": {- "version": "7.28.5",- "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.28.5.tgz",- "integrity": "sha512-qSs4ifwzKJSV39ucNjsvc6WVHs6b7S03sOh2OcHF9UHfVPqWWALUsNUVzhSBiItjRZoLHx7nIarVjqKVusUZ1Q==",+ "version": "7.29.7",+ "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.29.7.tgz",+ "integrity": "sha512-qehxGkRj55h/ff8EMaJ+cYhyaKlHIxqYDn682wQD7RNp9UujOQsHog2uS0r2vzr4pW+sXf90NeeayjcNaX3fFg==","dev": true,"license": "MIT","engines": {@@ -234,13 +316,13 @@}},"node_modules/@babel/parser": {- "version": "7.29.2",- "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.29.2.tgz",- "integrity": "sha512-4GgRzy/+fsBa72/RZVJmGKPmZu9Byn8o4MoLpmNe1m8ZfYnz5emHLQz3U4gLud6Zwl0RZIcgiLD7Uq7ySFuDLA==",+ "version": "7.29.7",+ "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.29.7.tgz",+ "integrity": "sha512-hnORnjP/1P/zFEndoeX+n+t1RwWRJiJpM/jO7FW32Kn9r5+sJB2JWOdYo4L6k78j15eCwY3Gm/7364B1EMwtNg==","dev": true,"license": "MIT","dependencies": {- "@babel/types": "^7.29.0"+ "@babel/types": "^7.29.7"},"bin": {"parser": "bin/babel-parser.js"@@ -281,6 +363,16 @@"@babel/core": "^7.0.0-0"}},+ "node_modules/@babel/runtime": {+ "version": "7.29.7",+ "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.29.7.tgz",+ "integrity": "sha512-Nq8OhGWiZIZGV6hLHoyAKLLcJihP/xFeBMGJoUrxTX2psI8dCifzLhZISFb+VWS3wFMRDmCGw5R+dOySCqPLhw==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">=6.9.0"+ }+ },"node_modules/@babel/template": {"version": "7.28.6","resolved": "https://registry.npmjs.org/@babel/template/-/template-7.28.6.tgz",@@ -316,19 +408,169 @@}},"node_modules/@babel/types": {- "version": "7.29.0",- "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.29.0.tgz",- "integrity": "sha512-LwdZHpScM4Qz8Xw2iKSzS+cfglZzJGvofQICy7W7v4caru4EaAmyUuO6BGrbyQ2mYV11W0U8j5mBhd14dd3B0A==",+ "version": "7.29.7",+ "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.29.7.tgz",+ "integrity": "sha512-4zBIxpPzowiZpusoFkyGVwakdRJUyuH5PxQ/PrqghfdFWWasvnCdPfQXHrenDai+gyLARulZjZowCOj6fjT4pA==","dev": true,"license": "MIT","dependencies": {- "@babel/helper-string-parser": "^7.27.1",- "@babel/helper-validator-identifier": "^7.28.5"+ "@babel/helper-string-parser": "^7.29.7",+ "@babel/helper-validator-identifier": "^7.29.7"},"engines": {"node": ">=6.9.0"}},+ "node_modules/@bcoe/v8-coverage": {+ "version": "1.0.2",+ "resolved": "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-1.0.2.tgz",+ "integrity": "sha512-6zABk/ECA/QYSCQ1NGiVwwbQerUCZ+TQbp64Q3AgmfNvurHH0j8TtXa1qbShXA6qqkpAj4V5W8pP6mLe1mcMqA==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">=18"+ }+ },+ "node_modules/@csstools/color-helpers": {+ "version": "6.0.2",+ "resolved": "https://registry.npmjs.org/@csstools/color-helpers/-/color-helpers-6.0.2.tgz",+ "integrity": "sha512-LMGQLS9EuADloEFkcTBR3BwV/CGHV7zyDxVRtVDTwdI2Ca4it0CCVTT9wCkxSgokjE5Ho41hEPgb8OEUwoXr6Q==",+ "dev": true,+ "funding": [+ {+ "type": "github",+ "url": "https://github.com/sponsors/csstools"+ },+ {+ "type": "opencollective",+ "url": "https://opencollective.com/csstools"+ }+ ],+ "license": "MIT-0",+ "engines": {+ "node": ">=20.19.0"+ }+ },+ "node_modules/@csstools/css-calc": {+ "version": "3.2.1",+ "resolved": "https://registry.npmjs.org/@csstools/css-calc/-/css-calc-3.2.1.tgz",+ "integrity": "sha512-DtdHlgXh5ZkA43cwBcAm+huzgJiwx3ZTWVjBs94kwz2xKqSimDA3lBgCjphYgwgVUMWatSM0pDd8TILB1yrVVg==",+ "dev": true,+ "funding": [+ {+ "type": "github",+ "url": "https://github.com/sponsors/csstools"+ },+ {+ "type": "opencollective",+ "url": "https://opencollective.com/csstools"+ }+ ],+ "license": "MIT",+ "engines": {+ "node": ">=20.19.0"+ },+ "peerDependencies": {+ "@csstools/css-parser-algorithms": "^4.0.0",+ "@csstools/css-tokenizer": "^4.0.0"+ }+ },+ "node_modules/@csstools/css-color-parser": {+ "version": "4.1.1",+ "resolved": "https://registry.npmjs.org/@csstools/css-color-parser/-/css-color-parser-4.1.1.tgz",+ "integrity": "sha512-eZ5XOtyhK+mggRafYUWzA0tvaYOFgdY8AkgQiCJF9qNAePnUo/zmsqqYubBBb3sQ8uNUaSKTY9s9klfRaAXL0g==",+ "dev": true,+ "funding": [+ {+ "type": "github",+ "url": "https://github.com/sponsors/csstools"+ },+ {+ "type": "opencollective",+ "url": "https://opencollective.com/csstools"+ }+ ],+ "license": "MIT",+ "dependencies": {+ "@csstools/color-helpers": "^6.0.2",+ "@csstools/css-calc": "^3.2.1"+ },+ "engines": {+ "node": ">=20.19.0"+ },+ "peerDependencies": {+ "@csstools/css-parser-algorithms": "^4.0.0",+ "@csstools/css-tokenizer": "^4.0.0"+ }+ },+ "node_modules/@csstools/css-parser-algorithms": {+ "version": "4.0.0",+ "resolved": "https://registry.npmjs.org/@csstools/css-parser-algorithms/-/css-parser-algorithms-4.0.0.tgz",+ "integrity": "sha512-+B87qS7fIG3L5h3qwJ/IFbjoVoOe/bpOdh9hAjXbvx0o8ImEmUsGXN0inFOnk2ChCFgqkkGFQ+TpM5rbhkKe4w==",+ "dev": true,+ "funding": [+ {+ "type": "github",+ "url": "https://github.com/sponsors/csstools"+ },+ {+ "type": "opencollective",+ "url": "https://opencollective.com/csstools"+ }+ ],+ "license": "MIT",+ "engines": {+ "node": ">=20.19.0"+ },+ "peerDependencies": {+ "@csstools/css-tokenizer": "^4.0.0"+ }+ },+ "node_modules/@csstools/css-syntax-patches-for-csstree": {+ "version": "1.1.4",+ "resolved": "https://registry.npmjs.org/@csstools/css-syntax-patches-for-csstree/-/css-syntax-patches-for-csstree-1.1.4.tgz",+ "integrity": "sha512-wgsqt92b7C7tQhIdPNxj0n9zuUbQlvAuI1exyzeNrOKOi62SD7ren8zqszmpVREjAOqg8cD2FqYhQfAuKjk4sw==",+ "dev": true,+ "funding": [+ {+ "type": "github",+ "url": "https://github.com/sponsors/csstools"+ },+ {+ "type": "opencollective",+ "url": "https://opencollective.com/csstools"+ }+ ],+ "license": "MIT-0",+ "peerDependencies": {+ "css-tree": "^3.2.1"+ },+ "peerDependenciesMeta": {+ "css-tree": {+ "optional": true+ }+ }+ },+ "node_modules/@csstools/css-tokenizer": {+ "version": "4.0.0",+ "resolved": "https://registry.npmjs.org/@csstools/css-tokenizer/-/css-tokenizer-4.0.0.tgz",+ "integrity": "sha512-QxULHAm7cNu72w97JUNCBFODFaXpbDg+dP8b/oWFAZ2MTRppA3U00Y2L1HqaS4J6yBqxwa/Y3nMBaxVKbB/NsA==",+ "dev": true,+ "funding": [+ {+ "type": "github",+ "url": "https://github.com/sponsors/csstools"+ },+ {+ "type": "opencollective",+ "url": "https://opencollective.com/csstools"+ }+ ],+ "license": "MIT",+ "engines": {+ "node": ">=20.19.0"+ }+ },"node_modules/@esbuild/aix-ppc64": {"version": "0.25.12","resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.25.12.tgz",@@ -771,6 +1013,34 @@"node": ">=18"}},+ "node_modules/@isaacs/cliui": {+ "version": "8.0.2",+ "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz",+ "integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==",+ "dev": true,+ "license": "ISC",+ "dependencies": {+ "string-width": "^5.1.2",+ "string-width-cjs": "npm:string-width@^4.2.0",+ "strip-ansi": "^7.0.1",+ "strip-ansi-cjs": "npm:strip-ansi@^6.0.1",+ "wrap-ansi": "^8.1.0",+ "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0"+ },+ "engines": {+ "node": ">=12"+ }+ },+ "node_modules/@istanbuljs/schema": {+ "version": "0.1.6",+ "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.6.tgz",+ "integrity": "sha512-+Sg6GCR/wy1oSmQDFq4LQDAhm3ETKnorxN+y5nbLULOR3P0c14f2Wurzj3/xqPXtasLFfHd5iRFQ7AJt4KH2cw==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">=8"+ }+ },"node_modules/@jridgewell/gen-mapping": {"version": "0.3.13","resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.13.tgz",@@ -859,6 +1129,17 @@"node": ">= 8"}},+ "node_modules/@pkgjs/parseargs": {+ "version": "0.11.0",+ "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz",+ "integrity": "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==",+ "dev": true,+ "license": "MIT",+ "optional": true,+ "engines": {+ "node": ">=14"+ }+ },"node_modules/@rolldown/pluginutils": {"version": "1.0.0-beta.27","resolved": "https://registry.npmjs.org/@rolldown/pluginutils/-/pluginutils-1.0.0-beta.27.tgz",@@ -958,9 +1239,6 @@"arm"],"dev": true,- "libc": [- "glibc"- ],"license": "MIT","optional": true,"os": [@@ -975,9 +1253,6 @@"arm"],"dev": true,- "libc": [- "musl"- ],"license": "MIT","optional": true,"os": [@@ -992,9 +1267,6 @@"arm64"],"dev": true,- "libc": [- "glibc"- ],"license": "MIT","optional": true,"os": [@@ -1009,9 +1281,6 @@"arm64"],"dev": true,- "libc": [- "musl"- ],"license": "MIT","optional": true,"os": [@@ -1026,9 +1295,6 @@"loong64"],"dev": true,- "libc": [- "glibc"- ],"license": "MIT","optional": true,"os": [@@ -1043,9 +1309,6 @@"loong64"],"dev": true,- "libc": [- "musl"- ],"license": "MIT","optional": true,"os": [@@ -1060,9 +1323,6 @@"ppc64"],"dev": true,- "libc": [- "glibc"- ],"license": "MIT","optional": true,"os": [@@ -1077,9 +1337,6 @@"ppc64"],"dev": true,- "libc": [- "musl"- ],"license": "MIT","optional": true,"os": [@@ -1094,9 +1351,6 @@"riscv64"],"dev": true,- "libc": [- "glibc"- ],"license": "MIT","optional": true,"os": [@@ -1111,9 +1365,6 @@"riscv64"],"dev": true,- "libc": [- "musl"- ],"license": "MIT","optional": true,"os": [@@ -1128,9 +1379,6 @@"s390x"],"dev": true,- "libc": [- "glibc"- ],"license": "MIT","optional": true,"os": [@@ -1145,9 +1393,6 @@"x64"],"dev": true,- "libc": [- "glibc"- ],"license": "MIT","optional": true,"os": [@@ -1162,9 +1407,6 @@"x64"],"dev": true,- "libc": [- "musl"- ],"license": "MIT","optional": true,"os": [@@ -1268,6 +1510,104 @@"tailwindcss": ">=3.0.0 || insiders || >=4.0.0-alpha.20 || >=4.0.0-beta.1"}},+ "node_modules/@testing-library/dom": {+ "version": "10.4.1",+ "resolved": "https://registry.npmjs.org/@testing-library/dom/-/dom-10.4.1.tgz",+ "integrity": "sha512-o4PXJQidqJl82ckFaXUeoAW+XysPLauYI43Abki5hABd853iMhitooc6znOnczgbTYmEP6U6/y1ZyKAIsvMKGg==",+ "dev": true,+ "license": "MIT",+ "peer": true,+ "dependencies": {+ "@babel/code-frame": "^7.10.4",+ "@babel/runtime": "^7.12.5",+ "@types/aria-query": "^5.0.1",+ "aria-query": "5.3.0",+ "dom-accessibility-api": "^0.5.9",+ "lz-string": "^1.5.0",+ "picocolors": "1.1.1",+ "pretty-format": "^27.0.2"+ },+ "engines": {+ "node": ">=18"+ }+ },+ "node_modules/@testing-library/jest-dom": {+ "version": "6.9.1",+ "resolved": "https://registry.npmjs.org/@testing-library/jest-dom/-/jest-dom-6.9.1.tgz",+ "integrity": "sha512-zIcONa+hVtVSSep9UT3jZ5rizo2BsxgyDYU7WFD5eICBE7no3881HGeb/QkGfsJs6JTkY1aQhT7rIPC7e+0nnA==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "@adobe/css-tools": "^4.4.0",+ "aria-query": "^5.0.0",+ "css.escape": "^1.5.1",+ "dom-accessibility-api": "^0.6.3",+ "picocolors": "^1.1.1",+ "redent": "^3.0.0"+ },+ "engines": {+ "node": ">=14",+ "npm": ">=6",+ "yarn": ">=1"+ }+ },+ "node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api": {+ "version": "0.6.3",+ "resolved": "https://registry.npmjs.org/dom-accessibility-api/-/dom-accessibility-api-0.6.3.tgz",+ "integrity": "sha512-7ZgogeTnjuHbo+ct10G9Ffp0mif17idi0IyWNVA/wcwcm7NPOD/WEHVP3n7n3MhXqxoIYm8d6MuZohYWIZ4T3w==",+ "dev": true,+ "license": "MIT"+ },+ "node_modules/@testing-library/react": {+ "version": "16.3.2",+ "resolved": "https://registry.npmjs.org/@testing-library/react/-/react-16.3.2.tgz",+ "integrity": "sha512-XU5/SytQM+ykqMnAnvB2umaJNIOsLF3PVv//1Ew4CTcpz0/BRyy/af40qqrt7SjKpDdT1saBMc42CUok5gaw+g==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "@babel/runtime": "^7.12.5"+ },+ "engines": {+ "node": ">=18"+ },+ "peerDependencies": {+ "@testing-library/dom": "^10.0.0",+ "@types/react": "^18.0.0 || ^19.0.0",+ "@types/react-dom": "^18.0.0 || ^19.0.0",+ "react": "^18.0.0 || ^19.0.0",+ "react-dom": "^18.0.0 || ^19.0.0"+ },+ "peerDependenciesMeta": {+ "@types/react": {+ "optional": true+ },+ "@types/react-dom": {+ "optional": true+ }+ }+ },+ "node_modules/@testing-library/user-event": {+ "version": "14.6.1",+ "resolved": "https://registry.npmjs.org/@testing-library/user-event/-/user-event-14.6.1.tgz",+ "integrity": "sha512-vq7fv0rnt+QTXgPxr5Hjc210p6YKq2kmdziLgnsZGgLJ9e6VAShx1pACLuRjd/AS/sr7phAR58OIIpf0LlmQNw==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">=12",+ "npm": ">=6"+ },+ "peerDependencies": {+ "@testing-library/dom": ">=7.21.4"+ }+ },+ "node_modules/@types/aria-query": {+ "version": "5.0.4",+ "resolved": "https://registry.npmjs.org/@types/aria-query/-/aria-query-5.0.4.tgz",+ "integrity": "sha512-rfT93uj5s0PRL7EzccGMs3brplhcrghnDoV26NqKhCAS1hVo+WdNsPvE/yb6ilfr5hi2MEk6d5EWJTKdxg8jVw==",+ "dev": true,+ "license": "MIT",+ "peer": true+ },"node_modules/@types/babel__core": {"version": "7.20.5","resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.5.tgz",@@ -1313,6 +1653,17 @@"@babel/types": "^7.28.2"}},+ "node_modules/@types/chai": {+ "version": "5.2.3",+ "resolved": "https://registry.npmjs.org/@types/chai/-/chai-5.2.3.tgz",+ "integrity": "sha512-Mw558oeA9fFbv65/y4mHtXDs9bPnFMZAL/jxdPFUpOHHIXX91mcgEHbS5Lahr+pwZFR8A7GQleRWeI6cGFC2UA==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "@types/deep-eql": "*",+ "assertion-error": "^2.0.1"+ }+ },"node_modules/@types/debug": {"version": "4.1.12","resolved": "https://registry.npmjs.org/@types/debug/-/debug-4.1.12.tgz",@@ -1322,6 +1673,13 @@"@types/ms": "*"}},+ "node_modules/@types/deep-eql": {+ "version": "4.0.2",+ "resolved": "https://registry.npmjs.org/@types/deep-eql/-/deep-eql-4.0.2.tgz",+ "integrity": "sha512-c9h9dVVMigMPc4bwTvC5dxqtqJZwQPePsWjPlpSOnojbor6pGqdk541lfA7AqFQr5pB1BRdq0juY9db81BwyFw==",+ "dev": true,+ "license": "MIT"+ },"node_modules/@types/estree": {"version": "1.0.8","resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.8.tgz",@@ -1413,21 +1771,245 @@"vite": "^4.2.0 || ^5.0.0 || ^6.0.0 || ^7.0.0"}},- "node_modules/any-promise": {- "version": "1.3.0",- "resolved": "https://registry.npmjs.org/any-promise/-/any-promise-1.3.0.tgz",- "integrity": "sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A==",+ "node_modules/@vitest/coverage-v8": {+ "version": "3.2.6",+ "resolved": "https://registry.npmjs.org/@vitest/coverage-v8/-/coverage-v8-3.2.6.tgz",+ "integrity": "sha512-LsAdmUapA0qSN306d8+zOyawM0hFm2m2Hg9IwVNIKBm+qJV8cijiq2c+gxKZcB1HCfIWAy+0qEZDCUQA58A1cw==","dev": true,- "license": "MIT"+ "license": "MIT",+ "dependencies": {+ "@ampproject/remapping": "^2.3.0",+ "@bcoe/v8-coverage": "^1.0.2",+ "ast-v8-to-istanbul": "^0.3.3",+ "debug": "^4.4.1",+ "istanbul-lib-coverage": "^3.2.2",+ "istanbul-lib-report": "^3.0.1",+ "istanbul-lib-source-maps": "^5.0.6",+ "istanbul-reports": "^3.1.7",+ "magic-string": "^0.30.17",+ "magicast": "^0.3.5",+ "std-env": "^3.9.0",+ "test-exclude": "^7.0.1",+ "tinyrainbow": "^2.0.0"+ },+ "funding": {+ "url": "https://opencollective.com/vitest"+ },+ "peerDependencies": {+ "@vitest/browser": "3.2.6",+ "vitest": "3.2.6"+ },+ "peerDependenciesMeta": {+ "@vitest/browser": {+ "optional": true+ }+ }},- "node_modules/anymatch": {- "version": "3.1.3",- "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz",- "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==",+ "node_modules/@vitest/expect": {+ "version": "3.2.6",+ "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-3.2.6.tgz",+ "integrity": "sha512-1+7q9BtaKzEmO+fmNT3kYvoNn5Y71XWAx2Q5HRim4tTVRQVRv4uJFAQ5FbK0OPUeNP/WmVCpxYxoJdvuHVjzBQ==","dev": true,- "license": "ISC",+ "license": "MIT","dependencies": {- "normalize-path": "^3.0.0",+ "@types/chai": "^5.2.2",+ "@vitest/spy": "3.2.6",+ "@vitest/utils": "3.2.6",+ "chai": "^5.2.0",+ "tinyrainbow": "^2.0.0"+ },+ "funding": {+ "url": "https://opencollective.com/vitest"+ }+ },+ "node_modules/@vitest/expect/node_modules/@vitest/pretty-format": {+ "version": "3.2.6",+ "resolved": "https://registry.npmjs.org/@vitest/pretty-format/-/pretty-format-3.2.6.tgz",+ "integrity": "sha512-lb7XXXzmm2h2ASzFnRvQpDo6onT1NmMJA3tkGTWiBFtRJ9lxGY3d3mm/Apt36gej2bkkOVLL/yTOtufDaFa/jA==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "tinyrainbow": "^2.0.0"+ },+ "funding": {+ "url": "https://opencollective.com/vitest"+ }+ },+ "node_modules/@vitest/expect/node_modules/@vitest/utils": {+ "version": "3.2.6",+ "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-3.2.6.tgz",+ "integrity": "sha512-lI23nIs4bnT3T8NIoh+vFaz5s2/DdP0Jgt2jxwgWljvwn82cLJtyi/If+fjFyoLMGIOz0U/fKvWE0d4jsNQEfg==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "@vitest/pretty-format": "3.2.6",+ "loupe": "^3.1.4",+ "tinyrainbow": "^2.0.0"+ },+ "funding": {+ "url": "https://opencollective.com/vitest"+ }+ },+ "node_modules/@vitest/mocker": {+ "version": "3.2.6",+ "resolved": "https://registry.npmjs.org/@vitest/mocker/-/mocker-3.2.6.tgz",+ "integrity": "sha512-EZOrpDbkKotFAP7wPAQV1UIyoGOk4oX7ynWhBhLB7v+meMHbQhU16oPpIYGTTe4oFlhpryGpgpcZP/sin3hYuw==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "@vitest/spy": "3.2.6",+ "estree-walker": "^3.0.3",+ "magic-string": "^0.30.17"+ },+ "funding": {+ "url": "https://opencollective.com/vitest"+ },+ "peerDependencies": {+ "msw": "^2.4.9",+ "vite": "^5.0.0 || ^6.0.0 || ^7.0.0-0"+ },+ "peerDependenciesMeta": {+ "msw": {+ "optional": true+ },+ "vite": {+ "optional": true+ }+ }+ },+ "node_modules/@vitest/runner": {+ "version": "3.2.6",+ "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-3.2.6.tgz",+ "integrity": "sha512-HYcoSj1w5tcgUnzoF0HcyaAQjpA1gj9ftUJ7iSJSuipc02jW9gKkigwZbjFldAfYHA1fa8UZVRftdMY5msWM9Q==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "@vitest/utils": "3.2.6",+ "pathe": "^2.0.3",+ "strip-literal": "^3.0.0"+ },+ "funding": {+ "url": "https://opencollective.com/vitest"+ }+ },+ "node_modules/@vitest/runner/node_modules/@vitest/pretty-format": {+ "version": "3.2.6",+ "resolved": "https://registry.npmjs.org/@vitest/pretty-format/-/pretty-format-3.2.6.tgz",+ "integrity": "sha512-lb7XXXzmm2h2ASzFnRvQpDo6onT1NmMJA3tkGTWiBFtRJ9lxGY3d3mm/Apt36gej2bkkOVLL/yTOtufDaFa/jA==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "tinyrainbow": "^2.0.0"+ },+ "funding": {+ "url": "https://opencollective.com/vitest"+ }+ },+ "node_modules/@vitest/runner/node_modules/@vitest/utils": {+ "version": "3.2.6",+ "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-3.2.6.tgz",+ "integrity": "sha512-lI23nIs4bnT3T8NIoh+vFaz5s2/DdP0Jgt2jxwgWljvwn82cLJtyi/If+fjFyoLMGIOz0U/fKvWE0d4jsNQEfg==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "@vitest/pretty-format": "3.2.6",+ "loupe": "^3.1.4",+ "tinyrainbow": "^2.0.0"+ },+ "funding": {+ "url": "https://opencollective.com/vitest"+ }+ },+ "node_modules/@vitest/snapshot": {+ "version": "3.2.6",+ "resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-3.2.6.tgz",+ "integrity": "sha512-H+ZjNTWGpObenh0YnlBctAPnJSI20P81PL8BPzWpx54YXLLTm8hEsWawtcYLMrwvpK48hGxLLbCS+1KRXhsKhw==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "@vitest/pretty-format": "3.2.6",+ "magic-string": "^0.30.17",+ "pathe": "^2.0.3"+ },+ "funding": {+ "url": "https://opencollective.com/vitest"+ }+ },+ "node_modules/@vitest/snapshot/node_modules/@vitest/pretty-format": {+ "version": "3.2.6",+ "resolved": "https://registry.npmjs.org/@vitest/pretty-format/-/pretty-format-3.2.6.tgz",+ "integrity": "sha512-lb7XXXzmm2h2ASzFnRvQpDo6onT1NmMJA3tkGTWiBFtRJ9lxGY3d3mm/Apt36gej2bkkOVLL/yTOtufDaFa/jA==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "tinyrainbow": "^2.0.0"+ },+ "funding": {+ "url": "https://opencollective.com/vitest"+ }+ },+ "node_modules/@vitest/spy": {+ "version": "3.2.6",+ "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-3.2.6.tgz",+ "integrity": "sha512-oq6BbH68WzcWmwtBrU9nqLeaXTR4XwJF7FSLkKEZo4i6eoXcrxjcwSuTvWBIRUTC6VC72nXYunzqgZA+IKdtxg==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "tinyspy": "^4.0.3"+ },+ "funding": {+ "url": "https://opencollective.com/vitest"+ }+ },+ "node_modules/agent-base": {+ "version": "7.1.4",+ "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.4.tgz",+ "integrity": "sha512-MnA+YT8fwfJPgBx3m60MNqakm30XOkyIoH1y6huTQvC0PwZG7ki8NacLBcrPbNoo8vEZy7Jpuk7+jMO+CUovTQ==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">= 14"+ }+ },+ "node_modules/ansi-regex": {+ "version": "5.0.1",+ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz",+ "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">=8"+ }+ },+ "node_modules/ansi-styles": {+ "version": "5.2.0",+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz",+ "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==",+ "dev": true,+ "license": "MIT",+ "peer": true,+ "engines": {+ "node": ">=10"+ },+ "funding": {+ "url": "https://github.com/chalk/ansi-styles?sponsor=1"+ }+ },+ "node_modules/any-promise": {+ "version": "1.3.0",+ "resolved": "https://registry.npmjs.org/any-promise/-/any-promise-1.3.0.tgz",+ "integrity": "sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A==",+ "dev": true,+ "license": "MIT"+ },+ "node_modules/anymatch": {+ "version": "3.1.3",+ "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz",+ "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==",+ "dev": true,+ "license": "ISC",+ "dependencies": {+ "normalize-path": "^3.0.0","picomatch": "^2.0.4"},"engines": {@@ -1441,6 +2023,45 @@"dev": true,"license": "MIT"},+ "node_modules/aria-query": {+ "version": "5.3.0",+ "resolved": "https://registry.npmjs.org/aria-query/-/aria-query-5.3.0.tgz",+ "integrity": "sha512-b0P0sZPKtyu8HkeRAfCq0IfURZK+SuwMjY1UXGBU27wpAiTwQAIlq56IbIO+ytk/JjS1fMR14ee5WBBfKi5J6A==",+ "dev": true,+ "license": "Apache-2.0",+ "dependencies": {+ "dequal": "^2.0.3"+ }+ },+ "node_modules/assertion-error": {+ "version": "2.0.1",+ "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-2.0.1.tgz",+ "integrity": "sha512-Izi8RQcffqCeNVgFigKli1ssklIbpHnCYc6AknXGYoB6grJqyeby7jv12JUQgmTAnIDnbck1uxksT4dzN3PWBA==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">=12"+ }+ },+ "node_modules/ast-v8-to-istanbul": {+ "version": "0.3.12",+ "resolved": "https://registry.npmjs.org/ast-v8-to-istanbul/-/ast-v8-to-istanbul-0.3.12.tgz",+ "integrity": "sha512-BRRC8VRZY2R4Z4lFIL35MwNXmwVqBityvOIwETtsCSwvjl0IdgFsy9NhdaA6j74nUdtJJlIypeRhpDam19Wq3g==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "@jridgewell/trace-mapping": "^0.3.31",+ "estree-walker": "^3.0.3",+ "js-tokens": "^10.0.0"+ }+ },+ "node_modules/ast-v8-to-istanbul/node_modules/js-tokens": {+ "version": "10.0.0",+ "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-10.0.0.tgz",+ "integrity": "sha512-lM/UBzQmfJRo9ABXbPWemivdCW8V2G8FHaHdypQaIy523snUjog0W71ayWXTjiR+ixeMyVHN2XcpnTd/liPg/Q==",+ "dev": true,+ "license": "MIT"+ },"node_modules/autoprefixer": {"version": "10.4.27","resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.4.27.tgz",@@ -1488,6 +2109,16 @@"url": "https://github.com/sponsors/wooorm"}},+ "node_modules/balanced-match": {+ "version": "4.0.4",+ "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-4.0.4.tgz",+ "integrity": "sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": "18 || 20 || >=22"+ }+ },"node_modules/baseline-browser-mapping": {"version": "2.10.8","resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.10.8.tgz",@@ -1501,6 +2132,16 @@"node": ">=6.0.0"}},+ "node_modules/bidi-js": {+ "version": "1.0.3",+ "resolved": "https://registry.npmjs.org/bidi-js/-/bidi-js-1.0.3.tgz",+ "integrity": "sha512-RKshQI1R3YQ+n9YJz2QQ147P66ELpa1FQEg20Dk8oW9t2KgLbpDLLp9aGZ7y8WHSshDknG0bknqGw5/tyCs5tw==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "require-from-string": "^2.0.2"+ }+ },"node_modules/binary-extensions": {"version": "2.3.0","resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz",@@ -1514,6 +2155,19 @@"url": "https://github.com/sponsors/sindresorhus"}},+ "node_modules/brace-expansion": {+ "version": "5.0.6",+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.6.tgz",+ "integrity": "sha512-kLpxurY4Z4r9sgMsyG0Z9uzsBlgiU/EFKhj/h91/8yHu0edo7XuixOIH3VcJ8kkxs6/jPzoI6U9Vj3WqbMQ94g==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "balanced-match": "^4.0.2"+ },+ "engines": {+ "node": "18 || 20 || >=22"+ }+ },"node_modules/braces": {"version": "3.0.3","resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz",@@ -1561,6 +2215,16 @@"node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7"}},+ "node_modules/cac": {+ "version": "6.7.14",+ "resolved": "https://registry.npmjs.org/cac/-/cac-6.7.14.tgz",+ "integrity": "sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">=8"+ }+ },"node_modules/camelcase-css": {"version": "2.0.1","resolved": "https://registry.npmjs.org/camelcase-css/-/camelcase-css-2.0.1.tgz",@@ -1602,6 +2266,23 @@"url": "https://github.com/sponsors/wooorm"}},+ "node_modules/chai": {+ "version": "5.3.3",+ "resolved": "https://registry.npmjs.org/chai/-/chai-5.3.3.tgz",+ "integrity": "sha512-4zNhdJD/iOjSH0A05ea+Ke6MU5mmpQcbQsSOkgdaUMJ9zTlDTD/GYlwohmIE2u0gaxHYiVHEn1Fw9mZ/ktJWgw==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "assertion-error": "^2.0.1",+ "check-error": "^2.1.1",+ "deep-eql": "^5.0.1",+ "loupe": "^3.1.0",+ "pathval": "^2.0.0"+ },+ "engines": {+ "node": ">=18"+ }+ },"node_modules/character-entities": {"version": "2.0.2","resolved": "https://registry.npmjs.org/character-entities/-/character-entities-2.0.2.tgz",@@ -1642,6 +2323,16 @@"url": "https://github.com/sponsors/wooorm"}},+ "node_modules/check-error": {+ "version": "2.1.3",+ "resolved": "https://registry.npmjs.org/check-error/-/check-error-2.1.3.tgz",+ "integrity": "sha512-PAJdDJusoxnwm1VwW07VWwUN1sl7smmC3OKggvndJFadxxDRyFJBX/ggnu/KE4kQAB7a3Dp8f/YXC1FlUprWmA==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">= 16"+ }+ },"node_modules/chokidar": {"version": "3.6.0","resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz",@@ -1689,6 +2380,26 @@"node": ">=6"}},+ "node_modules/color-convert": {+ "version": "2.0.1",+ "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",+ "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "color-name": "~1.1.4"+ },+ "engines": {+ "node": ">=7.0.0"+ }+ },+ "node_modules/color-name": {+ "version": "1.1.4",+ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",+ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",+ "dev": true,+ "license": "MIT"+ },"node_modules/comma-separated-tokens": {"version": "2.0.3","resolved": "https://registry.npmjs.org/comma-separated-tokens/-/comma-separated-tokens-2.0.3.tgz",@@ -1729,6 +2440,42 @@"url": "https://opencollective.com/express"}},+ "node_modules/cross-spawn": {+ "version": "7.0.6",+ "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz",+ "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "path-key": "^3.1.0",+ "shebang-command": "^2.0.0",+ "which": "^2.0.1"+ },+ "engines": {+ "node": ">= 8"+ }+ },+ "node_modules/css-tree": {+ "version": "3.2.1",+ "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-3.2.1.tgz",+ "integrity": "sha512-X7sjQzceUhu1u7Y/ylrRZFU2FS6LRiFVp6rKLPg23y3x3c3DOKAwuXGDp+PAGjh6CSnCjYeAul8pcT8bAl+lSA==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "mdn-data": "2.27.1",+ "source-map-js": "^1.2.1"+ },+ "engines": {+ "node": "^10 || ^12.20.0 || ^14.13.0 || >=15.0.0"+ }+ },+ "node_modules/css.escape": {+ "version": "1.5.1",+ "resolved": "https://registry.npmjs.org/css.escape/-/css.escape-1.5.1.tgz",+ "integrity": "sha512-YUifsXXuknHlUsmlgyY0PKzgPOr7/FjCePfHNt0jxm83wHZi44VDMQ7/fGNkjY3/jV1MC+1CmZbaHzugyeRtpg==",+ "dev": true,+ "license": "MIT"+ },"node_modules/cssesc": {"version": "3.0.0","resolved": "https://registry.npmjs.org/cssesc/-/cssesc-3.0.0.tgz",@@ -1742,12 +2489,62 @@"node": ">=4"}},+ "node_modules/cssstyle": {+ "version": "5.3.7",+ "resolved": "https://registry.npmjs.org/cssstyle/-/cssstyle-5.3.7.tgz",+ "integrity": "sha512-7D2EPVltRrsTkhpQmksIu+LxeWAIEk6wRDMJ1qljlv+CKHJM+cJLlfhWIzNA44eAsHXSNe3+vO6DW1yCYx8SuQ==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "@asamuzakjp/css-color": "^4.1.1",+ "@csstools/css-syntax-patches-for-csstree": "^1.0.21",+ "css-tree": "^3.1.0",+ "lru-cache": "^11.2.4"+ },+ "engines": {+ "node": ">=20"+ }+ },+ "node_modules/cssstyle/node_modules/lru-cache": {+ "version": "11.5.1",+ "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.5.1.tgz",+ "integrity": "sha512-RPimw/7aMdv2oqRrxKwvZXcPfwBrn/JZ2xYcY9Hus/6LaS3VOAKVWKWgNLCFSiOm1ESXinjsDlidVU7JlnCN2A==",+ "dev": true,+ "license": "BlueOak-1.0.0",+ "engines": {+ "node": "20 || >=22"+ }+ },"node_modules/csstype": {"version": "3.2.3","resolved": "https://registry.npmjs.org/csstype/-/csstype-3.2.3.tgz","integrity": "sha512-z1HGKcYy2xA8AGQfwrn0PAy+PB7X/GSj3UVJW9qKyn43xWa+gl5nXmU4qqLMRzWVLFC8KusUX8T/0kCiOYpAIQ==","license": "MIT"},+ "node_modules/data-urls": {+ "version": "6.0.1",+ "resolved": "https://registry.npmjs.org/data-urls/-/data-urls-6.0.1.tgz",+ "integrity": "sha512-euIQENZg6x8mj3fO6o9+fOW8MimUI4PpD/fZBhJfeioZVy9TUpM4UY7KjQNVZFlqwJ0UdzRDzkycB997HEq1BQ==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "whatwg-mimetype": "^5.0.0",+ "whatwg-url": "^15.1.0"+ },+ "engines": {+ "node": ">=20"+ }+ },+ "node_modules/data-urls/node_modules/whatwg-mimetype": {+ "version": "5.0.0",+ "resolved": "https://registry.npmjs.org/whatwg-mimetype/-/whatwg-mimetype-5.0.0.tgz",+ "integrity": "sha512-sXcNcHOC51uPGF0P/D4NVtrkjSU2fNsm9iog4ZvZJsL3rjoDAzXZhkm2MWt1y+PUdggKAYVoMAIYcs78wJ51Cw==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">=20"+ }+ },"node_modules/debug": {"version": "4.4.3","resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz",@@ -1765,6 +2562,13 @@}}},+ "node_modules/decimal.js": {+ "version": "10.6.0",+ "resolved": "https://registry.npmjs.org/decimal.js/-/decimal.js-10.6.0.tgz",+ "integrity": "sha512-YpgQiITW3JXGntzdUmyUR1V812Hn8T1YVXhCu+wO3OpS4eU9l4YdD3qjyiKdV6mvV29zapkMeD390UVEf2lkUg==",+ "dev": true,+ "license": "MIT"+ },"node_modules/decode-named-character-reference": {"version": "1.3.0","resolved": "https://registry.npmjs.org/decode-named-character-reference/-/decode-named-character-reference-1.3.0.tgz",@@ -1778,6 +2582,16 @@"url": "https://github.com/sponsors/wooorm"}},+ "node_modules/deep-eql": {+ "version": "5.0.2",+ "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-5.0.2.tgz",+ "integrity": "sha512-h5k/5U50IJJFpzfL6nO9jaaumfjO/f2NjK/oYB2Djzm4p9L+3T9qWpZqZ2hAbLPuuYq9wrU08WQyBTL5GbPk5Q==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">=6"+ }+ },"node_modules/dequal": {"version": "2.0.3","resolved": "https://registry.npmjs.org/dequal/-/dequal-2.0.3.tgz",@@ -1814,6 +2628,21 @@"dev": true,"license": "MIT"},+ "node_modules/dom-accessibility-api": {+ "version": "0.5.16",+ "resolved": "https://registry.npmjs.org/dom-accessibility-api/-/dom-accessibility-api-0.5.16.tgz",+ "integrity": "sha512-X7BJ2yElsnOJ30pZF4uIIDfBEVgF4XEBxL9Bxhy6dnrm5hkzqmsWHGTiHqRiITNhMyFLyAiWndIJP7Z1NTteDg==",+ "dev": true,+ "license": "MIT",+ "peer": true+ },+ "node_modules/eastasianwidth": {+ "version": "0.2.0",+ "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz",+ "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==",+ "dev": true,+ "license": "MIT"+ },"node_modules/echarts": {"version": "6.0.0","resolved": "https://registry.npmjs.org/echarts/-/echarts-6.0.0.tgz",@@ -1831,6 +2660,33 @@"dev": true,"license": "ISC"},+ "node_modules/emoji-regex": {+ "version": "9.2.2",+ "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz",+ "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==",+ "dev": true,+ "license": "MIT"+ },+ "node_modules/entities": {+ "version": "8.0.0",+ "resolved": "https://registry.npmjs.org/entities/-/entities-8.0.0.tgz",+ "integrity": "sha512-zwfzJecQ/Uej6tusMqwAqU/6KL2XaB2VZ2Jg54Je6ahNBGNH6Ek6g3jjNCF0fG9EWQKGZNddNjU5F1ZQn/sBnA==",+ "dev": true,+ "license": "BSD-2-Clause",+ "engines": {+ "node": ">=20.19.0"+ },+ "funding": {+ "url": "https://github.com/fb55/entities?sponsor=1"+ }+ },+ "node_modules/es-module-lexer": {+ "version": "1.7.0",+ "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.7.0.tgz",+ "integrity": "sha512-jEQoCwk8hyb2AZziIOLhDqpm5+2ww5uIE6lkO/6jcOCusfk6LhMHpXXfBLXTZ7Ydyt0j4VoUQv6uGNYbdW+kBA==",+ "dev": true,+ "license": "MIT"+ },"node_modules/esbuild": {"version": "0.25.12","resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.25.12.tgz",@@ -1905,10 +2761,30 @@"url": "https://opencollective.com/unified"}},- "node_modules/extend": {- "version": "3.0.2",- "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz",- "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==",+ "node_modules/estree-walker": {+ "version": "3.0.3",+ "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-3.0.3.tgz",+ "integrity": "sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "@types/estree": "^1.0.0"+ }+ },+ "node_modules/expect-type": {+ "version": "1.3.0",+ "resolved": "https://registry.npmjs.org/expect-type/-/expect-type-1.3.0.tgz",+ "integrity": "sha512-knvyeauYhqjOYvQ66MznSMs83wmHrCycNEN6Ao+2AeYEfxUIkuiVxdEa1qlGEPK+We3n0THiDciYSsCcgW/DoA==",+ "dev": true,+ "license": "Apache-2.0",+ "engines": {+ "node": ">=12.0.0"+ }+ },+ "node_modules/extend": {+ "version": "3.0.2",+ "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz",+ "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==","license": "MIT"},"node_modules/fast-glob": {@@ -1964,6 +2840,23 @@"node": ">=8"}},+ "node_modules/foreground-child": {+ "version": "3.3.1",+ "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.3.1.tgz",+ "integrity": "sha512-gIXjKqtFuWEgzFRJA9WCQeSJLZDjgJUOMCMzxtvFq/37KojM1BFGufqsCy0r4qSQmYLsZYMeyRqzIWOMup03sw==",+ "dev": true,+ "license": "ISC",+ "dependencies": {+ "cross-spawn": "^7.0.6",+ "signal-exit": "^4.0.1"+ },+ "engines": {+ "node": ">=14"+ },+ "funding": {+ "url": "https://github.com/sponsors/isaacs"+ }+ },"node_modules/fraction.js": {"version": "5.3.4","resolved": "https://registry.npmjs.org/fraction.js/-/fraction.js-5.3.4.tgz",@@ -2013,6 +2906,28 @@"node": ">=6.9.0"}},+ "node_modules/glob": {+ "version": "10.5.0",+ "resolved": "https://registry.npmjs.org/glob/-/glob-10.5.0.tgz",+ "integrity": "sha512-DfXN8DfhJ7NH3Oe7cFmu3NCu1wKbkReJ8TorzSAFbSKrlNaQSKfIzqYqVY8zlbs2NLBbWpRiU52GX2PbaBVNkg==",+ "deprecated": "Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting [email protected]",+ "dev": true,+ "license": "ISC",+ "dependencies": {+ "foreground-child": "^3.1.0",+ "jackspeak": "^3.1.2",+ "minimatch": "^9.0.4",+ "minipass": "^7.1.2",+ "package-json-from-dist": "^1.0.0",+ "path-scurry": "^1.11.1"+ },+ "bin": {+ "glob": "dist/esm/bin.mjs"+ },+ "funding": {+ "url": "https://github.com/sponsors/isaacs"+ }+ },"node_modules/glob-parent": {"version": "6.0.2","resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz",@@ -2026,6 +2941,49 @@"node": ">=10.13.0"}},+ "node_modules/glob/node_modules/balanced-match": {+ "version": "1.0.2",+ "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz",+ "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==",+ "dev": true,+ "license": "MIT"+ },+ "node_modules/glob/node_modules/brace-expansion": {+ "version": "2.1.1",+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.1.1.tgz",+ "integrity": "sha512-WR1cURNjuvBLMZBMbqM0UoE+WAfdUcEV1ccD8PVBVOI+Z3ND4+SZbN8RsfT2bMuG1qwz5RFvPukSZm5fF2D5eA==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "balanced-match": "^1.0.0"+ }+ },+ "node_modules/glob/node_modules/minimatch": {+ "version": "9.0.9",+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.9.tgz",+ "integrity": "sha512-OBwBN9AL4dqmETlpS2zasx+vTeWclWzkblfZk7KTA5j3jeOONz/tRCnZomUyvNg83wL5Zv9Ss6HMJXAgL8R2Yg==",+ "dev": true,+ "license": "ISC",+ "dependencies": {+ "brace-expansion": "^2.0.2"+ },+ "engines": {+ "node": ">=16 || 14 >=14.17"+ },+ "funding": {+ "url": "https://github.com/sponsors/isaacs"+ }+ },+ "node_modules/has-flag": {+ "version": "4.0.0",+ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",+ "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">=8"+ }+ },"node_modules/hasown": {"version": "2.0.2","resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz",@@ -2117,6 +3075,26 @@"node": ">=12.0.0"}},+ "node_modules/html-encoding-sniffer": {+ "version": "4.0.0",+ "resolved": "https://registry.npmjs.org/html-encoding-sniffer/-/html-encoding-sniffer-4.0.0.tgz",+ "integrity": "sha512-Y22oTqIU4uuPgEemfz7NDJz6OeKf12Lsu+QC+s3BVpda64lTiMYCyGwg5ki4vFxkMwQdeZDl2adZoqUgdFuTgQ==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "whatwg-encoding": "^3.1.1"+ },+ "engines": {+ "node": ">=18"+ }+ },+ "node_modules/html-escaper": {+ "version": "2.0.2",+ "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz",+ "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==",+ "dev": true,+ "license": "MIT"+ },"node_modules/html-url-attributes": {"version": "3.0.1","resolved": "https://registry.npmjs.org/html-url-attributes/-/html-url-attributes-3.0.1.tgz",@@ -2127,6 +3105,57 @@"url": "https://opencollective.com/unified"}},+ "node_modules/http-proxy-agent": {+ "version": "7.0.2",+ "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-7.0.2.tgz",+ "integrity": "sha512-T1gkAiYYDWYx3V5Bmyu7HcfcvL7mUrTWiM6yOfa3PIphViJ/gFPbvidQ+veqSOHci/PxBcDabeUNCzpOODJZig==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "agent-base": "^7.1.0",+ "debug": "^4.3.4"+ },+ "engines": {+ "node": ">= 14"+ }+ },+ "node_modules/https-proxy-agent": {+ "version": "7.0.6",+ "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.6.tgz",+ "integrity": "sha512-vK9P5/iUfdl95AI+JVyUuIcVtd4ofvtrOr3HNtM2yxC9bnMbEdp3x01OhQNnjb8IJYi38VlTE3mBXwcfvywuSw==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "agent-base": "^7.1.2",+ "debug": "4"+ },+ "engines": {+ "node": ">= 14"+ }+ },+ "node_modules/iconv-lite": {+ "version": "0.6.3",+ "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz",+ "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "safer-buffer": ">= 2.1.2 < 3.0.0"+ },+ "engines": {+ "node": ">=0.10.0"+ }+ },+ "node_modules/indent-string": {+ "version": "4.0.0",+ "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz",+ "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">=8"+ }+ },"node_modules/inline-style-parser": {"version": "0.2.7","resolved": "https://registry.npmjs.org/inline-style-parser/-/inline-style-parser-0.2.7.tgz",@@ -2206,6 +3235,16 @@"node": ">=0.10.0"}},+ "node_modules/is-fullwidth-code-point": {+ "version": "3.0.0",+ "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",+ "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">=8"+ }+ },"node_modules/is-glob": {"version": "4.0.3","resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz",@@ -2251,6 +3290,90 @@"url": "https://github.com/sponsors/sindresorhus"}},+ "node_modules/is-potential-custom-element-name": {+ "version": "1.0.1",+ "resolved": "https://registry.npmjs.org/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.1.tgz",+ "integrity": "sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ==",+ "dev": true,+ "license": "MIT"+ },+ "node_modules/isexe": {+ "version": "2.0.0",+ "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz",+ "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==",+ "dev": true,+ "license": "ISC"+ },+ "node_modules/istanbul-lib-coverage": {+ "version": "3.2.2",+ "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.2.tgz",+ "integrity": "sha512-O8dpsF+r0WV/8MNRKfnmrtCWhuKjxrq2w+jpzBL5UZKTi2LeVWnWOmWRxFlesJONmc+wLAGvKQZEOanko0LFTg==",+ "dev": true,+ "license": "BSD-3-Clause",+ "engines": {+ "node": ">=8"+ }+ },+ "node_modules/istanbul-lib-report": {+ "version": "3.0.1",+ "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.1.tgz",+ "integrity": "sha512-GCfE1mtsHGOELCU8e/Z7YWzpmybrx/+dSTfLrvY8qRmaY6zXTKWn6WQIjaAFw069icm6GVMNkgu0NzI4iPZUNw==",+ "dev": true,+ "license": "BSD-3-Clause",+ "dependencies": {+ "istanbul-lib-coverage": "^3.0.0",+ "make-dir": "^4.0.0",+ "supports-color": "^7.1.0"+ },+ "engines": {+ "node": ">=10"+ }+ },+ "node_modules/istanbul-lib-source-maps": {+ "version": "5.0.6",+ "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-5.0.6.tgz",+ "integrity": "sha512-yg2d+Em4KizZC5niWhQaIomgf5WlL4vOOjZ5xGCmF8SnPE/mDWWXgvRExdcpCgh9lLRRa1/fSYp2ymmbJ1pI+A==",+ "dev": true,+ "license": "BSD-3-Clause",+ "dependencies": {+ "@jridgewell/trace-mapping": "^0.3.23",+ "debug": "^4.1.1",+ "istanbul-lib-coverage": "^3.0.0"+ },+ "engines": {+ "node": ">=10"+ }+ },+ "node_modules/istanbul-reports": {+ "version": "3.2.0",+ "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.2.0.tgz",+ "integrity": "sha512-HGYWWS/ehqTV3xN10i23tkPkpH46MLCIMFNCaaKNavAXTF1RkqxawEPtnjnGZ6XKSInBKkiOA5BKS+aZiY3AvA==",+ "dev": true,+ "license": "BSD-3-Clause",+ "dependencies": {+ "html-escaper": "^2.0.0",+ "istanbul-lib-report": "^3.0.0"+ },+ "engines": {+ "node": ">=8"+ }+ },+ "node_modules/jackspeak": {+ "version": "3.4.3",+ "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-3.4.3.tgz",+ "integrity": "sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==",+ "dev": true,+ "license": "BlueOak-1.0.0",+ "dependencies": {+ "@isaacs/cliui": "^8.0.2"+ },+ "funding": {+ "url": "https://github.com/sponsors/isaacs"+ },+ "optionalDependencies": {+ "@pkgjs/parseargs": "^0.11.0"+ }+ },"node_modules/jiti": {"version": "1.21.7","resolved": "https://registry.npmjs.org/jiti/-/jiti-1.21.7.tgz",@@ -2268,6 +3391,46 @@"dev": true,"license": "MIT"},+ "node_modules/jsdom": {+ "version": "27.0.1",+ "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-27.0.1.tgz",+ "integrity": "sha512-SNSQteBL1IlV2zqhwwolaG9CwhIhTvVHWg3kTss/cLE7H/X4644mtPQqYvCfsSrGQWt9hSZcgOXX8bOZaMN+kA==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "@asamuzakjp/dom-selector": "^6.7.2",+ "cssstyle": "^5.3.1",+ "data-urls": "^6.0.0",+ "decimal.js": "^10.6.0",+ "html-encoding-sniffer": "^4.0.0",+ "http-proxy-agent": "^7.0.2",+ "https-proxy-agent": "^7.0.6",+ "is-potential-custom-element-name": "^1.0.1",+ "parse5": "^8.0.0",+ "rrweb-cssom": "^0.8.0",+ "saxes": "^6.0.0",+ "symbol-tree": "^3.2.4",+ "tough-cookie": "^6.0.0",+ "w3c-xmlserializer": "^5.0.0",+ "webidl-conversions": "^8.0.0",+ "whatwg-encoding": "^3.1.1",+ "whatwg-mimetype": "^4.0.0",+ "whatwg-url": "^15.1.0",+ "ws": "^8.18.3",+ "xml-name-validator": "^5.0.0"+ },+ "engines": {+ "node": ">=20"+ },+ "peerDependencies": {+ "canvas": "^3.0.0"+ },+ "peerDependenciesMeta": {+ "canvas": {+ "optional": true+ }+ }+ },"node_modules/jsesc": {"version": "3.1.0","resolved": "https://registry.npmjs.org/jsesc/-/jsesc-3.1.0.tgz",@@ -2324,6 +3487,13 @@"url": "https://github.com/sponsors/wooorm"}},+ "node_modules/loupe": {+ "version": "3.2.1",+ "resolved": "https://registry.npmjs.org/loupe/-/loupe-3.2.1.tgz",+ "integrity": "sha512-CdzqowRJCeLU72bHvWqwRBBlLcMEtIvGrlvef74kMnV2AolS9Y8xUv1I0U/MNAWMhBlKIoyuEgoJ0t/bbwHbLQ==",+ "dev": true,+ "license": "MIT"+ },"node_modules/lowlight": {"version": "3.3.0","resolved": "https://registry.npmjs.org/lowlight/-/lowlight-3.3.0.tgz",@@ -2358,6 +3528,68 @@"react": "^16.5.1 || ^17.0.0 || ^18.0.0 || ^19.0.0-rc"}},+ "node_modules/lz-string": {+ "version": "1.5.0",+ "resolved": "https://registry.npmjs.org/lz-string/-/lz-string-1.5.0.tgz",+ "integrity": "sha512-h5bgJWpxJNswbU7qCrV0tIKQCaS3blPDrqKWx+QxzuzL1zGUzij9XCWLrSLsJPu5t+eWA/ycetzYAO5IOMcWAQ==",+ "dev": true,+ "license": "MIT",+ "peer": true,+ "bin": {+ "lz-string": "bin/bin.js"+ }+ },+ "node_modules/magic-string": {+ "version": "0.30.21",+ "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.21.tgz",+ "integrity": "sha512-vd2F4YUyEXKGcLHoq+TEyCjxueSeHnFxyyjNp80yg0XV4vUhnDer/lvvlqM/arB5bXQN5K2/3oinyCRyx8T2CQ==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "@jridgewell/sourcemap-codec": "^1.5.5"+ }+ },+ "node_modules/magicast": {+ "version": "0.3.5",+ "resolved": "https://registry.npmjs.org/magicast/-/magicast-0.3.5.tgz",+ "integrity": "sha512-L0WhttDl+2BOsybvEOLK7fW3UA0OQ0IQ2d6Zl2x/a6vVRs3bAY0ECOSHHeL5jD+SbOpOCUEi0y1DgHEn9Qn1AQ==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "@babel/parser": "^7.25.4",+ "@babel/types": "^7.25.4",+ "source-map-js": "^1.2.0"+ }+ },+ "node_modules/make-dir": {+ "version": "4.0.0",+ "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-4.0.0.tgz",+ "integrity": "sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "semver": "^7.5.3"+ },+ "engines": {+ "node": ">=10"+ },+ "funding": {+ "url": "https://github.com/sponsors/sindresorhus"+ }+ },+ "node_modules/make-dir/node_modules/semver": {+ "version": "7.8.1",+ "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.1.tgz",+ "integrity": "sha512-rkVq3IXh+4FDGch+KwzX3aV9W3kO54GyEgpvBzSyctDA6Xtd7RJQV1xmXbeQp5v7+VzLOfVqiutSE6GICgPFvg==",+ "dev": true,+ "license": "ISC",+ "bin": {+ "semver": "bin/semver.js"+ },+ "engines": {+ "node": ">=10"+ }+ },"node_modules/markdown-table": {"version": "3.0.4","resolved": "https://registry.npmjs.org/markdown-table/-/markdown-table-3.0.4.tgz",@@ -2638,6 +3870,13 @@"url": "https://opencollective.com/unified"}},+ "node_modules/mdn-data": {+ "version": "2.27.1",+ "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.27.1.tgz",+ "integrity": "sha512-9Yubnt3e8A0OKwxYSXyhLymGW4sCufcLG6VdiDdUGVkPhpqLxlvP5vl1983gQjJl3tqbrM731mjaZaP68AgosQ==",+ "dev": true,+ "license": "CC0-1.0"+ },"node_modules/merge2": {"version": "1.4.1","resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz",@@ -3225,6 +4464,42 @@"node": ">=8.6"}},+ "node_modules/min-indent": {+ "version": "1.0.1",+ "resolved": "https://registry.npmjs.org/min-indent/-/min-indent-1.0.1.tgz",+ "integrity": "sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">=4"+ }+ },+ "node_modules/minimatch": {+ "version": "10.2.5",+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.2.5.tgz",+ "integrity": "sha512-MULkVLfKGYDFYejP07QOurDLLQpcjk7Fw+7jXS2R2czRQzR56yHRveU5NDJEOviH+hETZKSkIk5c+T23GjFUMg==",+ "dev": true,+ "license": "BlueOak-1.0.0",+ "dependencies": {+ "brace-expansion": "^5.0.5"+ },+ "engines": {+ "node": "18 || 20 || >=22"+ },+ "funding": {+ "url": "https://github.com/sponsors/isaacs"+ }+ },+ "node_modules/minipass": {+ "version": "7.1.3",+ "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.3.tgz",+ "integrity": "sha512-tEBHqDnIoM/1rXME1zgka9g6Q2lcoCkxHLuc7ODJ5BxbP5d4c2Z5cGgtXAku59200Cx7diuHTOYfSBD8n6mm8A==",+ "dev": true,+ "license": "BlueOak-1.0.0",+ "engines": {+ "node": ">=16 || 14 >=14.17"+ }+ },"node_modules/ms": {"version": "2.1.3","resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",@@ -3299,6 +4574,13 @@"node": ">= 6"}},+ "node_modules/package-json-from-dist": {+ "version": "1.0.1",+ "resolved": "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.1.tgz",+ "integrity": "sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==",+ "dev": true,+ "license": "BlueOak-1.0.0"+ },"node_modules/parse-entities": {"version": "4.0.2","resolved": "https://registry.npmjs.org/parse-entities/-/parse-entities-4.0.2.tgz",@@ -3324,6 +4606,29 @@"integrity": "sha512-CmBKiL6NNo/OqgmMn95Fk9Whlp2mtvIv+KNpQKN2F4SjvrEesubTRWGYSg+BnWZOnlCaSTU1sMpsBOzgbYhnsA==","license": "MIT"},+ "node_modules/parse5": {+ "version": "8.0.1",+ "resolved": "https://registry.npmjs.org/parse5/-/parse5-8.0.1.tgz",+ "integrity": "sha512-z1e/HMG90obSGeidlli3hj7cbocou0/wa5HacvI3ASx34PecNjNQeaHNo5WIZpWofN9kgkqV1q5YvXe3F0FoPw==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "entities": "^8.0.0"+ },+ "funding": {+ "url": "https://github.com/inikulin/parse5?sponsor=1"+ }+ },+ "node_modules/path-key": {+ "version": "3.1.1",+ "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz",+ "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">=8"+ }+ },"node_modules/path-parse": {"version": "1.0.7","resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz",@@ -3331,16 +4636,57 @@"dev": true,"license": "MIT"},- "node_modules/picocolors": {- "version": "1.1.1",- "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz",- "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==",+ "node_modules/path-scurry": {+ "version": "1.11.1",+ "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.11.1.tgz",+ "integrity": "sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==","dev": true,- "license": "ISC"- },- "node_modules/picomatch": {- "version": "2.3.2",- "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.2.tgz",+ "license": "BlueOak-1.0.0",+ "dependencies": {+ "lru-cache": "^10.2.0",+ "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0"+ },+ "engines": {+ "node": ">=16 || 14 >=14.18"+ },+ "funding": {+ "url": "https://github.com/sponsors/isaacs"+ }+ },+ "node_modules/path-scurry/node_modules/lru-cache": {+ "version": "10.4.3",+ "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz",+ "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==",+ "dev": true,+ "license": "ISC"+ },+ "node_modules/pathe": {+ "version": "2.0.3",+ "resolved": "https://registry.npmjs.org/pathe/-/pathe-2.0.3.tgz",+ "integrity": "sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w==",+ "dev": true,+ "license": "MIT"+ },+ "node_modules/pathval": {+ "version": "2.0.1",+ "resolved": "https://registry.npmjs.org/pathval/-/pathval-2.0.1.tgz",+ "integrity": "sha512-//nshmD55c46FuFw26xV/xFAaB5HF9Xdap7HJBBnrKdAd6/GxDBaNA1870O79+9ueg61cZLSVc+OaFlfmObYVQ==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">= 14.16"+ }+ },+ "node_modules/picocolors": {+ "version": "1.1.1",+ "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz",+ "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==",+ "dev": true,+ "license": "ISC"+ },+ "node_modules/picomatch": {+ "version": "2.3.2",+ "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.2.tgz","integrity": "sha512-V7+vQEJ06Z+c5tSye8S+nHUfI51xoXIXjHQ99cQtKUkQqqO1kO/KCJUfZXuB47h/YBlDhah2H3hdUGXn8ie0oA==","dev": true,"license": "MIT",@@ -3548,6 +4894,22 @@"dev": true,"license": "MIT"},+ "node_modules/pretty-format": {+ "version": "27.5.1",+ "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-27.5.1.tgz",+ "integrity": "sha512-Qb1gy5OrP5+zDf2Bvnzdl3jsTf1qXVMazbvCoKhtKqVs4/YK4ozX4gKQJJVyNe+cajNPn0KoC0MC3FUmaHWEmQ==",+ "dev": true,+ "license": "MIT",+ "peer": true,+ "dependencies": {+ "ansi-regex": "^5.0.1",+ "ansi-styles": "^5.0.0",+ "react-is": "^17.0.1"+ },+ "engines": {+ "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0"+ }+ },"node_modules/property-information": {"version": "7.1.0","resolved": "https://registry.npmjs.org/property-information/-/property-information-7.1.0.tgz",@@ -3558,6 +4920,16 @@"url": "https://github.com/sponsors/wooorm"}},+ "node_modules/punycode": {+ "version": "2.3.1",+ "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz",+ "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">=6"+ }+ },"node_modules/queue-microtask": {"version": "1.2.3","resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz",@@ -3600,6 +4972,14 @@"react": "^19.2.4"}},+ "node_modules/react-is": {+ "version": "17.0.2",+ "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz",+ "integrity": "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==",+ "dev": true,+ "license": "MIT",+ "peer": true+ },"node_modules/react-markdown": {"version": "9.1.0","resolved": "https://registry.npmjs.org/react-markdown/-/react-markdown-9.1.0.tgz",@@ -3698,6 +5078,20 @@"node": ">=8.10.0"}},+ "node_modules/redent": {+ "version": "3.0.0",+ "resolved": "https://registry.npmjs.org/redent/-/redent-3.0.0.tgz",+ "integrity": "sha512-6tDA8g98We0zd0GvVeMT9arEOnTw9qM03L9cJXaCjrip1OO764RDBLBfrB4cwzNGDj5OA5ioymC9GkizgWJDUg==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "indent-string": "^4.0.0",+ "strip-indent": "^3.0.0"+ },+ "engines": {+ "node": ">=8"+ }+ },"node_modules/rehype-highlight": {"version": "7.0.2","resolved": "https://registry.npmjs.org/rehype-highlight/-/rehype-highlight-7.0.2.tgz",@@ -3781,6 +5175,16 @@"url": "https://opencollective.com/unified"}},+ "node_modules/require-from-string": {+ "version": "2.0.2",+ "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz",+ "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">=0.10.0"+ }+ },"node_modules/resolve": {"version": "1.22.11","resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.11.tgz",@@ -3858,6 +5262,13 @@"fsevents": "~2.3.2"}},+ "node_modules/rrweb-cssom": {+ "version": "0.8.0",+ "resolved": "https://registry.npmjs.org/rrweb-cssom/-/rrweb-cssom-0.8.0.tgz",+ "integrity": "sha512-guoltQEx+9aMf2gDZ0s62EcV8lsXR+0w8915TC3ITdn2YueuNjdAYh/levpU9nFaoChh9RUS5ZdQMrKfVEN9tw==",+ "dev": true,+ "license": "MIT"+ },"node_modules/run-parallel": {"version": "1.2.0","resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz",@@ -3882,6 +5293,26 @@"queue-microtask": "^1.2.2"}},+ "node_modules/safer-buffer": {+ "version": "2.1.2",+ "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",+ "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==",+ "dev": true,+ "license": "MIT"+ },+ "node_modules/saxes": {+ "version": "6.0.0",+ "resolved": "https://registry.npmjs.org/saxes/-/saxes-6.0.0.tgz",+ "integrity": "sha512-xAg7SOnEhrm5zI3puOOKyy1OMcMlIJZYNJY7xLBwSze0UjhPLnWfj2GF2EpT0jmzaJKIWKHLsaSSajf35bcYnA==",+ "dev": true,+ "license": "ISC",+ "dependencies": {+ "xmlchars": "^2.2.0"+ },+ "engines": {+ "node": ">=v12.22.7"+ }+ },"node_modules/scheduler": {"version": "0.27.0","resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.27.0.tgz",@@ -3904,6 +5335,49 @@"integrity": "sha512-oeM1lpU/UvhTxw+g3cIfxXHyJRc/uidd3yK1P242gzHds0udQBYzs3y8j4gCCW+ZJ7ad0yctld8RYO+bdurlvw==","license": "MIT"},+ "node_modules/shebang-command": {+ "version": "2.0.0",+ "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz",+ "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "shebang-regex": "^3.0.0"+ },+ "engines": {+ "node": ">=8"+ }+ },+ "node_modules/shebang-regex": {+ "version": "3.0.0",+ "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz",+ "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">=8"+ }+ },+ "node_modules/siginfo": {+ "version": "2.0.0",+ "resolved": "https://registry.npmjs.org/siginfo/-/siginfo-2.0.0.tgz",+ "integrity": "sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g==",+ "dev": true,+ "license": "ISC"+ },+ "node_modules/signal-exit": {+ "version": "4.1.0",+ "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz",+ "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==",+ "dev": true,+ "license": "ISC",+ "engines": {+ "node": ">=14"+ },+ "funding": {+ "url": "https://github.com/sponsors/isaacs"+ }+ },"node_modules/sonner": {"version": "2.0.7","resolved": "https://registry.npmjs.org/sonner/-/sonner-2.0.7.tgz",@@ -3934,6 +5408,74 @@"url": "https://github.com/sponsors/wooorm"}},+ "node_modules/stackback": {+ "version": "0.0.2",+ "resolved": "https://registry.npmjs.org/stackback/-/stackback-0.0.2.tgz",+ "integrity": "sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==",+ "dev": true,+ "license": "MIT"+ },+ "node_modules/std-env": {+ "version": "3.10.0",+ "resolved": "https://registry.npmjs.org/std-env/-/std-env-3.10.0.tgz",+ "integrity": "sha512-5GS12FdOZNliM5mAOxFRg7Ir0pWz8MdpYm6AY6VPkGpbA7ZzmbzNcBJQ0GPvvyWgcY7QAhCgf9Uy89I03faLkg==",+ "dev": true,+ "license": "MIT"+ },+ "node_modules/string-width": {+ "version": "5.1.2",+ "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz",+ "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "eastasianwidth": "^0.2.0",+ "emoji-regex": "^9.2.2",+ "strip-ansi": "^7.0.1"+ },+ "engines": {+ "node": ">=12"+ },+ "funding": {+ "url": "https://github.com/sponsors/sindresorhus"+ }+ },+ "node_modules/string-width-cjs": {+ "name": "string-width",+ "version": "4.2.3",+ "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz",+ "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "emoji-regex": "^8.0.0",+ "is-fullwidth-code-point": "^3.0.0",+ "strip-ansi": "^6.0.1"+ },+ "engines": {+ "node": ">=8"+ }+ },+ "node_modules/string-width-cjs/node_modules/emoji-regex": {+ "version": "8.0.0",+ "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz",+ "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==",+ "dev": true,+ "license": "MIT"+ },+ "node_modules/string-width-cjs/node_modules/strip-ansi": {+ "version": "6.0.1",+ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz",+ "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "ansi-regex": "^5.0.1"+ },+ "engines": {+ "node": ">=8"+ }+ },"node_modules/stringify-entities": {"version": "4.0.4","resolved": "https://registry.npmjs.org/stringify-entities/-/stringify-entities-4.0.4.tgz",@@ -3948,6 +5490,82 @@"url": "https://github.com/sponsors/wooorm"}},+ "node_modules/strip-ansi": {+ "version": "7.2.0",+ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.2.0.tgz",+ "integrity": "sha512-yDPMNjp4WyfYBkHnjIRLfca1i6KMyGCtsVgoKe/z1+6vukgaENdgGBZt+ZmKPc4gavvEZ5OgHfHdrazhgNyG7w==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "ansi-regex": "^6.2.2"+ },+ "engines": {+ "node": ">=12"+ },+ "funding": {+ "url": "https://github.com/chalk/strip-ansi?sponsor=1"+ }+ },+ "node_modules/strip-ansi-cjs": {+ "name": "strip-ansi",+ "version": "6.0.1",+ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz",+ "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "ansi-regex": "^5.0.1"+ },+ "engines": {+ "node": ">=8"+ }+ },+ "node_modules/strip-ansi/node_modules/ansi-regex": {+ "version": "6.2.2",+ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.2.2.tgz",+ "integrity": "sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">=12"+ },+ "funding": {+ "url": "https://github.com/chalk/ansi-regex?sponsor=1"+ }+ },+ "node_modules/strip-indent": {+ "version": "3.0.0",+ "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-3.0.0.tgz",+ "integrity": "sha512-laJTa3Jb+VQpaC6DseHhF7dXVqHTfJPCRDaEbid/drOhgitgYku/letMUqOXFoWV0zIIUbjpdH2t+tYj4bQMRQ==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "min-indent": "^1.0.0"+ },+ "engines": {+ "node": ">=8"+ }+ },+ "node_modules/strip-literal": {+ "version": "3.1.0",+ "resolved": "https://registry.npmjs.org/strip-literal/-/strip-literal-3.1.0.tgz",+ "integrity": "sha512-8r3mkIM/2+PpjHoOtiAW8Rg3jJLHaV7xPwG+YRGrv6FP0wwk/toTpATxWYOW0BKdWwl82VT2tFYi5DlROa0Mxg==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "js-tokens": "^9.0.1"+ },+ "funding": {+ "url": "https://github.com/sponsors/antfu"+ }+ },+ "node_modules/strip-literal/node_modules/js-tokens": {+ "version": "9.0.1",+ "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-9.0.1.tgz",+ "integrity": "sha512-mxa9E9ITFOt0ban3j6L5MpjwegGz6lBQmM1IJkWeBZGcMxto50+eWdjC/52xDbS2vy0k7vIMK0Fe2wfL9OQSpQ==",+ "dev": true,+ "license": "MIT"+ },"node_modules/style-to-js": {"version": "1.1.21","resolved": "https://registry.npmjs.org/style-to-js/-/style-to-js-1.1.21.tgz",@@ -3989,6 +5607,19 @@"node": ">=16 || 14 >=14.17"}},+ "node_modules/supports-color": {+ "version": "7.2.0",+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",+ "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "has-flag": "^4.0.0"+ },+ "engines": {+ "node": ">=8"+ }+ },"node_modules/supports-preserve-symlinks-flag": {"version": "1.0.0","resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz",@@ -4002,6 +5633,13 @@"url": "https://github.com/sponsors/ljharb"}},+ "node_modules/symbol-tree": {+ "version": "3.2.4",+ "resolved": "https://registry.npmjs.org/symbol-tree/-/symbol-tree-3.2.4.tgz",+ "integrity": "sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==",+ "dev": true,+ "license": "MIT"+ },"node_modules/tailwind-merge": {"version": "2.6.1","resolved": "https://registry.npmjs.org/tailwind-merge/-/tailwind-merge-2.6.1.tgz",@@ -4064,6 +5702,21 @@"node": ">=4"}},+ "node_modules/test-exclude": {+ "version": "7.0.2",+ "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-7.0.2.tgz",+ "integrity": "sha512-u9E6A+ZDYdp7a4WnarkXPZOx8Ilz46+kby6p1yZ8zsGTz9gYa6FIS7lj2oezzNKmtdyyJNNmmXDppga5GB7kSw==",+ "dev": true,+ "license": "ISC",+ "dependencies": {+ "@istanbuljs/schema": "^0.1.2",+ "glob": "^10.4.1",+ "minimatch": "^10.2.2"+ },+ "engines": {+ "node": ">=18"+ }+ },"node_modules/thenify": {"version": "3.3.1","resolved": "https://registry.npmjs.org/thenify/-/thenify-3.3.1.tgz",@@ -4087,6 +5740,20 @@"node": ">=0.8"}},+ "node_modules/tinybench": {+ "version": "2.9.0",+ "resolved": "https://registry.npmjs.org/tinybench/-/tinybench-2.9.0.tgz",+ "integrity": "sha512-0+DUvqWMValLmha6lr4kD8iAMK1HzV0/aKnCtWb9v9641TnP/MFb7Pc2bxoxQjTXAErryXVgUOfv2YqNllqGeg==",+ "dev": true,+ "license": "MIT"+ },+ "node_modules/tinyexec": {+ "version": "0.3.2",+ "resolved": "https://registry.npmjs.org/tinyexec/-/tinyexec-0.3.2.tgz",+ "integrity": "sha512-KQQR9yN7R5+OSwaK0XQoj22pwHoTlgYqmUscPYoknOoWCWfj/5/ABTMRi69FrKU5ffPVh5QcFikpWJI/P1ocHA==",+ "dev": true,+ "license": "MIT"+ },"node_modules/tinyglobby": {"version": "0.2.15","resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.15.tgz",@@ -4135,6 +5802,56 @@"url": "https://github.com/sponsors/jonschlinkert"}},+ "node_modules/tinypool": {+ "version": "1.1.1",+ "resolved": "https://registry.npmjs.org/tinypool/-/tinypool-1.1.1.tgz",+ "integrity": "sha512-Zba82s87IFq9A9XmjiX5uZA/ARWDrB03OHlq+Vw1fSdt0I+4/Kutwy8BP4Y/y/aORMo61FQ0vIb5j44vSo5Pkg==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": "^18.0.0 || >=20.0.0"+ }+ },+ "node_modules/tinyrainbow": {+ "version": "2.0.0",+ "resolved": "https://registry.npmjs.org/tinyrainbow/-/tinyrainbow-2.0.0.tgz",+ "integrity": "sha512-op4nsTR47R6p0vMUUoYl/a+ljLFVtlfaXkLQmqfLR1qHma1h/ysYk4hEXZ880bf2CYgTskvTa/e196Vd5dDQXw==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">=14.0.0"+ }+ },+ "node_modules/tinyspy": {+ "version": "4.0.4",+ "resolved": "https://registry.npmjs.org/tinyspy/-/tinyspy-4.0.4.tgz",+ "integrity": "sha512-azl+t0z7pw/z958Gy9svOTuzqIk6xq+NSheJzn5MMWtWTFywIacg2wUlzKFGtt3cthx0r2SxMK0yzJOR0IES7Q==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">=14.0.0"+ }+ },+ "node_modules/tldts": {+ "version": "7.4.2",+ "resolved": "https://registry.npmjs.org/tldts/-/tldts-7.4.2.tgz",+ "integrity": "sha512-kCwffuaH8ntKtygnWe1b4BJKWiCUH30n5KfoTr6IchcXOwR7chAOFJxFrH3vjANafUYrIA4a7SDL+nn7SiR4Sw==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "tldts-core": "^7.4.2"+ },+ "bin": {+ "tldts": "bin/cli.js"+ }+ },+ "node_modules/tldts-core": {+ "version": "7.4.2",+ "resolved": "https://registry.npmjs.org/tldts-core/-/tldts-core-7.4.2.tgz",+ "integrity": "sha512-nwEyF4vl4RSJjwSjBUmOSxc3BFPoIFdlRthJ6e+5v9P3bHNsoD06UjuqMUspqp7vsEZ1beaHi1km+optiE17yA==",+ "dev": true,+ "license": "MIT"+ },"node_modules/to-regex-range": {"version": "5.0.1","resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz",@@ -4148,6 +5865,32 @@"node": ">=8.0"}},+ "node_modules/tough-cookie": {+ "version": "6.0.1",+ "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-6.0.1.tgz",+ "integrity": "sha512-LktZQb3IeoUWB9lqR5EWTHgW/VTITCXg4D21M+lvybRVdylLrRMnqaIONLVb5mav8vM19m44HIcGq4qASeu2Qw==",+ "dev": true,+ "license": "BSD-3-Clause",+ "dependencies": {+ "tldts": "^7.0.5"+ },+ "engines": {+ "node": ">=16"+ }+ },+ "node_modules/tr46": {+ "version": "6.0.0",+ "resolved": "https://registry.npmjs.org/tr46/-/tr46-6.0.0.tgz",+ "integrity": "sha512-bLVMLPtstlZ4iMQHpFHTR7GAGj2jxi8Dg0s2h2MafAE4uSWF98FC/3MomU51iQAMf8/qDUbKWf5GxuvvVcXEhw==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "punycode": "^2.3.1"+ },+ "engines": {+ "node": ">=20"+ }+ },"node_modules/trim-lines": {"version": "3.0.1","resolved": "https://registry.npmjs.org/trim-lines/-/trim-lines-3.0.1.tgz",@@ -4437,6 +6180,29 @@}}},+ "node_modules/vite-node": {+ "version": "3.2.4",+ "resolved": "https://registry.npmjs.org/vite-node/-/vite-node-3.2.4.tgz",+ "integrity": "sha512-EbKSKh+bh1E1IFxeO0pg1n4dvoOTt0UDiXMd/qn++r98+jPO1xtJilvXldeuQ8giIB5IkpjCgMleHMNEsGH6pg==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "cac": "^6.7.14",+ "debug": "^4.4.1",+ "es-module-lexer": "^1.7.0",+ "pathe": "^2.0.3",+ "vite": "^5.0.0 || ^6.0.0 || ^7.0.0-0"+ },+ "bin": {+ "vite-node": "vite-node.mjs"+ },+ "engines": {+ "node": "^18.0.0 || ^20.0.0 || >=22.0.0"+ },+ "funding": {+ "url": "https://opencollective.com/vitest"+ }+ },"node_modules/vite/node_modules/fdir": {"version": "6.5.0","resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz",@@ -4468,6 +6234,354 @@"url": "https://github.com/sponsors/jonschlinkert"}},+ "node_modules/vitest": {+ "version": "3.2.6",+ "resolved": "https://registry.npmjs.org/vitest/-/vitest-3.2.6.tgz",+ "integrity": "sha512-xejya+bT/j/+R/AGa1XOfRxLmNUlLtlwjRsFUILF+xHfzElmGcmFydy2gqqIrd62ptIEfwVMofd19uNWD9L7Nw==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "@types/chai": "^5.2.2",+ "@vitest/expect": "3.2.6",+ "@vitest/mocker": "3.2.6",+ "@vitest/pretty-format": "^3.2.6",+ "@vitest/runner": "3.2.6",+ "@vitest/snapshot": "3.2.6",+ "@vitest/spy": "3.2.6",+ "@vitest/utils": "3.2.6",+ "chai": "^5.2.0",+ "debug": "^4.4.1",+ "expect-type": "^1.2.1",+ "magic-string": "^0.30.17",+ "pathe": "^2.0.3",+ "picomatch": "^4.0.2",+ "std-env": "^3.9.0",+ "tinybench": "^2.9.0",+ "tinyexec": "^0.3.2",+ "tinyglobby": "^0.2.14",+ "tinypool": "^1.1.1",+ "tinyrainbow": "^2.0.0",+ "vite": "^5.0.0 || ^6.0.0 || ^7.0.0-0",+ "vite-node": "3.2.4",+ "why-is-node-running": "^2.3.0"+ },+ "bin": {+ "vitest": "vitest.mjs"+ },+ "engines": {+ "node": "^18.0.0 || ^20.0.0 || >=22.0.0"+ },+ "funding": {+ "url": "https://opencollective.com/vitest"+ },+ "peerDependencies": {+ "@edge-runtime/vm": "*",+ "@types/debug": "^4.1.12",+ "@types/node": "^18.0.0 || ^20.0.0 || >=22.0.0",+ "@vitest/browser": "3.2.6",+ "@vitest/ui": "3.2.6",+ "happy-dom": "*",+ "jsdom": "*"+ },+ "peerDependenciesMeta": {+ "@edge-runtime/vm": {+ "optional": true+ },+ "@types/debug": {+ "optional": true+ },+ "@types/node": {+ "optional": true+ },+ "@vitest/browser": {+ "optional": true+ },+ "@vitest/ui": {+ "optional": true+ },+ "happy-dom": {+ "optional": true+ },+ "jsdom": {+ "optional": true+ }+ }+ },+ "node_modules/vitest/node_modules/@vitest/pretty-format": {+ "version": "3.2.6",+ "resolved": "https://registry.npmjs.org/@vitest/pretty-format/-/pretty-format-3.2.6.tgz",+ "integrity": "sha512-lb7XXXzmm2h2ASzFnRvQpDo6onT1NmMJA3tkGTWiBFtRJ9lxGY3d3mm/Apt36gej2bkkOVLL/yTOtufDaFa/jA==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "tinyrainbow": "^2.0.0"+ },+ "funding": {+ "url": "https://opencollective.com/vitest"+ }+ },+ "node_modules/vitest/node_modules/@vitest/utils": {+ "version": "3.2.6",+ "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-3.2.6.tgz",+ "integrity": "sha512-lI23nIs4bnT3T8NIoh+vFaz5s2/DdP0Jgt2jxwgWljvwn82cLJtyi/If+fjFyoLMGIOz0U/fKvWE0d4jsNQEfg==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "@vitest/pretty-format": "3.2.6",+ "loupe": "^3.1.4",+ "tinyrainbow": "^2.0.0"+ },+ "funding": {+ "url": "https://opencollective.com/vitest"+ }+ },+ "node_modules/vitest/node_modules/picomatch": {+ "version": "4.0.4",+ "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.4.tgz",+ "integrity": "sha512-QP88BAKvMam/3NxH6vj2o21R6MjxZUAd6nlwAS/pnGvN9IVLocLHxGYIzFhg6fUQ+5th6P4dv4eW9jX3DSIj7A==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">=12"+ },+ "funding": {+ "url": "https://github.com/sponsors/jonschlinkert"+ }+ },+ "node_modules/w3c-xmlserializer": {+ "version": "5.0.0",+ "resolved": "https://registry.npmjs.org/w3c-xmlserializer/-/w3c-xmlserializer-5.0.0.tgz",+ "integrity": "sha512-o8qghlI8NZHU1lLPrpi2+Uq7abh4GGPpYANlalzWxyWteJOCsr/P+oPBA49TOLu5FTZO4d3F9MnWJfiMo4BkmA==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "xml-name-validator": "^5.0.0"+ },+ "engines": {+ "node": ">=18"+ }+ },+ "node_modules/webidl-conversions": {+ "version": "8.0.1",+ "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-8.0.1.tgz",+ "integrity": "sha512-BMhLD/Sw+GbJC21C/UgyaZX41nPt8bUTg+jWyDeg7e7YN4xOM05YPSIXceACnXVtqyEw/LMClUQMtMZ+PGGpqQ==",+ "dev": true,+ "license": "BSD-2-Clause",+ "engines": {+ "node": ">=20"+ }+ },+ "node_modules/whatwg-encoding": {+ "version": "3.1.1",+ "resolved": "https://registry.npmjs.org/whatwg-encoding/-/whatwg-encoding-3.1.1.tgz",+ "integrity": "sha512-6qN4hJdMwfYBtE3YBTTHhoeuUrDBPZmbQaxWAqSALV/MeEnR5z1xd8UKud2RAkFoPkmB+hli1TZSnyi84xz1vQ==",+ "deprecated": "Use @exodus/bytes instead for a more spec-conformant and faster implementation",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "iconv-lite": "0.6.3"+ },+ "engines": {+ "node": ">=18"+ }+ },+ "node_modules/whatwg-mimetype": {+ "version": "4.0.0",+ "resolved": "https://registry.npmjs.org/whatwg-mimetype/-/whatwg-mimetype-4.0.0.tgz",+ "integrity": "sha512-QaKxh0eNIi2mE9p2vEdzfagOKHCcj1pJ56EEHGQOVxp8r9/iszLUUV7v89x9O1p/T+NlTM5W7jW6+cz4Fq1YVg==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">=18"+ }+ },+ "node_modules/whatwg-url": {+ "version": "15.1.0",+ "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-15.1.0.tgz",+ "integrity": "sha512-2ytDk0kiEj/yu90JOAp44PVPUkO9+jVhyf+SybKlRHSDlvOOZhdPIrr7xTH64l4WixO2cP+wQIcgujkGBPPz6g==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "tr46": "^6.0.0",+ "webidl-conversions": "^8.0.0"+ },+ "engines": {+ "node": ">=20"+ }+ },+ "node_modules/which": {+ "version": "2.0.2",+ "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz",+ "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==",+ "dev": true,+ "license": "ISC",+ "dependencies": {+ "isexe": "^2.0.0"+ },+ "bin": {+ "node-which": "bin/node-which"+ },+ "engines": {+ "node": ">= 8"+ }+ },+ "node_modules/why-is-node-running": {+ "version": "2.3.0",+ "resolved": "https://registry.npmjs.org/why-is-node-running/-/why-is-node-running-2.3.0.tgz",+ "integrity": "sha512-hUrmaWBdVDcxvYqnyh09zunKzROWjbZTiNy8dBEjkS7ehEDQibXJ7XvlmtbwuTclUiIyN+CyXQD4Vmko8fNm8w==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "siginfo": "^2.0.0",+ "stackback": "0.0.2"+ },+ "bin": {+ "why-is-node-running": "cli.js"+ },+ "engines": {+ "node": ">=8"+ }+ },+ "node_modules/wrap-ansi": {+ "version": "8.1.0",+ "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz",+ "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "ansi-styles": "^6.1.0",+ "string-width": "^5.0.1",+ "strip-ansi": "^7.0.1"+ },+ "engines": {+ "node": ">=12"+ },+ "funding": {+ "url": "https://github.com/chalk/wrap-ansi?sponsor=1"+ }+ },+ "node_modules/wrap-ansi-cjs": {+ "name": "wrap-ansi",+ "version": "7.0.0",+ "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz",+ "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "ansi-styles": "^4.0.0",+ "string-width": "^4.1.0",+ "strip-ansi": "^6.0.0"+ },+ "engines": {+ "node": ">=10"+ },+ "funding": {+ "url": "https://github.com/chalk/wrap-ansi?sponsor=1"+ }+ },+ "node_modules/wrap-ansi-cjs/node_modules/ansi-styles": {+ "version": "4.3.0",+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",+ "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "color-convert": "^2.0.1"+ },+ "engines": {+ "node": ">=8"+ },+ "funding": {+ "url": "https://github.com/chalk/ansi-styles?sponsor=1"+ }+ },+ "node_modules/wrap-ansi-cjs/node_modules/emoji-regex": {+ "version": "8.0.0",+ "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz",+ "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==",+ "dev": true,+ "license": "MIT"+ },+ "node_modules/wrap-ansi-cjs/node_modules/string-width": {+ "version": "4.2.3",+ "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz",+ "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "emoji-regex": "^8.0.0",+ "is-fullwidth-code-point": "^3.0.0",+ "strip-ansi": "^6.0.1"+ },+ "engines": {+ "node": ">=8"+ }+ },+ "node_modules/wrap-ansi-cjs/node_modules/strip-ansi": {+ "version": "6.0.1",+ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz",+ "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "ansi-regex": "^5.0.1"+ },+ "engines": {+ "node": ">=8"+ }+ },+ "node_modules/wrap-ansi/node_modules/ansi-styles": {+ "version": "6.2.3",+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.3.tgz",+ "integrity": "sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">=12"+ },+ "funding": {+ "url": "https://github.com/chalk/ansi-styles?sponsor=1"+ }+ },+ "node_modules/ws": {+ "version": "8.21.0",+ "resolved": "https://registry.npmjs.org/ws/-/ws-8.21.0.tgz",+ "integrity": "sha512-Vsp28b7DRcimFQvrqu2Wek3z1iYxDCWqHYB8Qsnk/S4RfaCQzPGPyBNuVjJV3cd6UiKtUtp6sNM77gWvzcCH+g==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">=10.0.0"+ },+ "peerDependencies": {+ "bufferutil": "^4.0.1",+ "utf-8-validate": ">=5.0.2"+ },+ "peerDependenciesMeta": {+ "bufferutil": {+ "optional": true+ },+ "utf-8-validate": {+ "optional": true+ }+ }+ },+ "node_modules/xml-name-validator": {+ "version": "5.0.0",+ "resolved": "https://registry.npmjs.org/xml-name-validator/-/xml-name-validator-5.0.0.tgz",+ "integrity": "sha512-EvGK8EJ3DhaHfbRlETOWAS5pO9MZITeauHKJyb8wyajUfQUenkIg2MvLDTZ4T/TgIcm3HU0TFBgWWboAZ30UHg==",+ "dev": true,+ "license": "Apache-2.0",+ "engines": {+ "node": ">=18"+ }+ },+ "node_modules/xmlchars": {+ "version": "2.2.0",+ "resolved": "https://registry.npmjs.org/xmlchars/-/xmlchars-2.2.0.tgz",+ "integrity": "sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw==",+ "dev": true,+ "license": "MIT"+ },"node_modules/yallist": {"version": "3.1.1","resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz",diff --git a/frontend/package.json b/frontend/package.jsonindex e3cf8752e..604c5151b 100644--- a/frontend/package.json+++ b/frontend/package.json@@ -6,7 +6,10 @@"scripts": {"dev": "vite","build": "tsc -b && vite build",- "preview": "vite preview"+ "preview": "vite preview",+ "test": "vitest",+ "test:run": "vitest run",+ "test:coverage": "vitest run --coverage"},"dependencies": {"clsx": "^2.1.0",@@ -25,13 +28,19 @@},"devDependencies": {"@tailwindcss/typography": "^0.5.0",+ "@testing-library/jest-dom": "^6.9.1",+ "@testing-library/react": "^16.3.2",+ "@testing-library/user-event": "^14.6.1","@types/react": "^19.0.0","@types/react-dom": "^19.0.0","@vitejs/plugin-react": "^4.3.0",+ "@vitest/coverage-v8": "^3.2.6","autoprefixer": "^10.4.0",+ "jsdom": "^27.0.1","postcss": "^8.5.14","tailwindcss": "^3.4.0","typescript": "^5.7.0",- "vite": "^6.4.2"+ "vite": "^6.4.2",+ "vitest": "^3.2.6"}}diff --git a/frontend/src/components/chat/__tests__/AgentAvatar.test.tsx b/frontend/src/components/chat/__tests__/AgentAvatar.test.tsxnew file mode 100644index 000000000..17b4e4238--- /dev/null+++ b/frontend/src/components/chat/__tests__/AgentAvatar.test.tsx@@ -0,0 +1,15 @@+import { render, screen } from "@testing-library/react";+import { AgentAvatar } from "../AgentAvatar";++describe("AgentAvatar", () => {+ it("renders the letter P", () => {+ render(<AgentAvatar />);+ expect(screen.getByText("P")).toBeInTheDocument();+ });++ it("has gradient background styling", () => {+ const { container } = render(<AgentAvatar />);+ const el = container.firstChild as HTMLElement;+ expect(el.className).toMatch(/bg-gradient/);+ });+});diff --git a/frontend/src/components/chat/__tests__/MessageBubble.test.tsx b/frontend/src/components/chat/__tests__/MessageBubble.test.tsxnew file mode 100644index 000000000..27258afb7--- /dev/null+++ b/frontend/src/components/chat/__tests__/MessageBubble.test.tsx@@ -0,0 +1,102 @@+import { render, screen } from "@testing-library/react";+import userEvent from "@testing-library/user-event";+import { MessageBubble } from "../MessageBubble";+import type { AgentMessage } from "@/types/agent";++// Mock react-markdown (heavy dependency, renders raw content in tests)+vi.mock("react-markdown", () => ({+ default: ({ children }: { children: string }) => <div data-testid="markdown">{children}</div>,+}));+vi.mock("remark-gfm", () => ({ default: () => {} }));+vi.mock("rehype-highlight", () => ({ default: () => {} }));++// Mock RunCompleteCard (complex component with ECharts)+vi.mock("../RunCompleteCard", () => ({+ RunCompleteCard: ({ msg }: { msg: AgentMessage }) => (+ <div data-testid="run-complete-card">Run: {msg.runId}</div>+ ),+}));++function makeMsg(overrides: Partial<AgentMessage> = {}): AgentMessage {+ return {+ id: "msg-1",+ type: "answer",+ content: "test",+ timestamp: new Date(2024, 0, 1, 14, 30).getTime(),+ ...overrides,+ };+}++describe("MessageBubble", () => {+ describe("user messages", () => {+ it("renders user content in a styled bubble", () => {+ render(<MessageBubble msg={makeMsg({ type: "user", content: "Hello agent!" })} />);+ expect(screen.getByText("Hello agent!")).toBeInTheDocument();+ });++ it("shows timestamp", () => {+ render(<MessageBubble msg={makeMsg({ type: "user" })} />);+ expect(screen.getByText("14:30")).toBeInTheDocument();+ });+ });++ describe("answer messages", () => {+ it("renders markdown content", () => {+ render(<MessageBubble msg={makeMsg({ type: "answer", content: "Here is the **analysis**" })} />);+ expect(screen.getByTestId("markdown")).toHaveTextContent("Here is the **analysis**");+ });+ });++ describe("error messages", () => {+ it("renders error content with danger styling", () => {+ render(<MessageBubble msg={makeMsg({ type: "error", content: "Execution failed" })} />);+ expect(screen.getByText("Execution failed")).toBeInTheDocument();+ });++ it("shows retry button when onRetry is provided", () => {+ const onRetry = vi.fn();+ render(<MessageBubble msg={makeMsg({ type: "error", content: "Something broke" })} onRetry={onRetry} />);+ expect(screen.getByRole("button")).toBeInTheDocument();+ });++ it("calls onRetry when retry button is clicked", async () => {+ const onRetry = vi.fn();+ const msg = makeMsg({ type: "error", content: "Something broke" });+ render(<MessageBubble msg={msg} onRetry={onRetry} />);++ const user = userEvent.setup();+ await user.click(screen.getByRole("button"));+ expect(onRetry).toHaveBeenCalledWith(msg);+ });++ it("shows timeout hint for timeout errors", () => {+ render(+ <MessageBubble+ msg={makeMsg({ type: "error", content: "Execution timed out after 600s" })}+ onRetry={vi.fn()}+ />,+ );+ expect(screen.getByText(/Try simplifying the strategy/)).toBeInTheDocument();+ });+ });++ describe("run_complete messages", () => {+ it("renders RunCompleteCard when runId is present", () => {+ render(<MessageBubble msg={makeMsg({ type: "run_complete", runId: "run-42" })} />);+ expect(screen.getByTestId("run-complete-card")).toBeInTheDocument();+ expect(screen.getByText("Run: run-42")).toBeInTheDocument();+ });+ });++ describe("fallback", () => {+ it("renders content for unknown message types", () => {+ render(<MessageBubble msg={makeMsg({ type: "thinking", content: "analyzing data..." })} />);+ expect(screen.getByText("analyzing data...")).toBeInTheDocument();+ });++ it("renders null for empty content on unknown types", () => {+ const { container } = render(<MessageBubble msg={makeMsg({ type: "thinking", content: "" })} />);+ expect(container.innerHTML).toBe("");+ });+ });+});diff --git a/frontend/src/components/chat/__tests__/MetricsCard.test.tsx b/frontend/src/components/chat/__tests__/MetricsCard.test.tsxnew file mode 100644index 000000000..1be54761d--- /dev/null+++ b/frontend/src/components/chat/__tests__/MetricsCard.test.tsx@@ -0,0 +1,69 @@+import { render, screen } from "@testing-library/react";+import { MetricsCard } from "../MetricsCard";++describe("MetricsCard", () => {+ const sampleMetrics = {+ total_return: 0.1234,+ annual_return: 0.08,+ sharpe: 1.5,+ max_drawdown: -0.1,+ win_rate: 0.55,+ trade_count: 42,+ };++ it("renders nothing when metrics is empty", () => {+ const { container } = render(<MetricsCard metrics={{}} />);+ expect(container.innerHTML).toBe("");+ });++ it("renders metric labels", () => {+ render(<MetricsCard metrics={sampleMetrics} />);+ expect(screen.getByText("Total Return")).toBeInTheDocument();+ expect(screen.getByText("Sharpe")).toBeInTheDocument();+ expect(screen.getByText("Max DD")).toBeInTheDocument();+ expect(screen.getByText("Trades")).toBeInTheDocument();+ });++ it("renders formatted metric values", () => {+ render(<MetricsCard metrics={sampleMetrics} />);+ expect(screen.getByText("+12.34%")).toBeInTheDocument();+ expect(screen.getByText("+1.50")).toBeInTheDocument();+ expect(screen.getByText("42")).toBeInTheDocument();+ });++ it("compact mode shows only first 6 metrics", () => {+ const manyMetrics: Record<string, number> = {};+ const keys = [+ "total_return", "annual_return", "sharpe", "max_drawdown",+ "win_rate", "trade_count", "calmar", "sortino",+ ];+ keys.forEach((k) => { manyMetrics[k] = 1; });++ render(<MetricsCard metrics={manyMetrics} compact />);++ // Should show the first 6 labels from DISPLAY_ORDER that exist+ expect(screen.getByText("Total Return")).toBeInTheDocument();+ expect(screen.getByText("Trades")).toBeInTheDocument();+ // Should NOT show 7th+ metric+ expect(screen.queryByText("Calmar")).not.toBeInTheDocument();+ });++ it("ignores metrics not in DISPLAY_ORDER", () => {+ const { container } = render(<MetricsCard metrics={{ unknown_metric: 999 }} />);+ expect(container.innerHTML).toBe("");+ });++ it("applies sentiment colors", () => {+ render(<MetricsCard metrics={{ sharpe: 1.5 }} />);+ // sharpe >= 1.0 → positive → text-success+ const el = screen.getByText("+1.50");+ expect(el.className).toContain("text-success");+ });++ it("applies negative sentiment for bad values", () => {+ render(<MetricsCard metrics={{ max_drawdown: -0.3 }} />);+ // max_drawdown <= -0.2 → negative → text-danger+ const el = screen.getByText("-30.00%");+ expect(el.className).toContain("text-danger");+ });+});diff --git a/frontend/src/components/chat/__tests__/ProgressBar.test.tsx b/frontend/src/components/chat/__tests__/ProgressBar.test.tsxnew file mode 100644index 000000000..f32e0291c--- /dev/null+++ b/frontend/src/components/chat/__tests__/ProgressBar.test.tsx@@ -0,0 +1,57 @@+import { render, screen } from "@testing-library/react";+import { ProgressBar } from "../ProgressBar";++describe("ProgressBar", () => {+ it("renders nothing when total <= 0", () => {+ const { container } = render(<ProgressBar current={5} total={0} />);+ expect(container.innerHTML).toBe("");+ });++ it("renders nothing for negative total", () => {+ const { container } = render(<ProgressBar current={5} total={-1} />);+ expect(container.innerHTML).toBe("");+ });++ it("renders a progress element", () => {+ render(<ProgressBar current={3} total={10} ariaLabel="test progress" />);+ expect(screen.getByRole("progressbar")).toBeInTheDocument();+ });++ it("clamps current to [0, total]", () => {+ const { container: c1 } = render(<ProgressBar current={-5} total={10} />);+ const fill1 = c1.querySelector(".bg-primary") as HTMLElement;+ expect(fill1.style.width).toBe("0%");++ const { container: c2 } = render(<ProgressBar current={20} total={10} />);+ const fill2 = c2.querySelector(".bg-primary") as HTMLElement;+ expect(fill2.style.width).toBe("100%");+ });++ it("computes correct width percentage", () => {+ const { container } = render(<ProgressBar current={3} total={10} />);+ const fill = container.querySelector(".bg-primary") as HTMLElement;+ expect(fill.style.width).toBe("30%");+ });++ it("shows count when showCount is true", () => {+ render(<ProgressBar current={3} total={10} showCount />);+ expect(screen.getByText("3/10")).toBeInTheDocument();+ });++ it("does not show count by default", () => {+ const { container } = render(<ProgressBar current={3} total={10} />);+ expect(container.querySelector("span")).not.toBeInTheDocument();+ });++ it("uses h-1 height class by default (xs)", () => {+ const { container } = render(<ProgressBar current={3} total={10} />);+ const track = container.querySelector(".bg-muted");+ expect(track?.classList.contains("h-1")).toBe(true);+ });++ it("uses h-2 height class when height=sm", () => {+ const { container } = render(<ProgressBar current={3} total={10} height="sm" />);+ const track = container.querySelector(".bg-muted");+ expect(track?.classList.contains("h-2")).toBe(true);+ });+});diff --git a/frontend/src/components/chat/__tests__/ThinkingTimeline.test.tsx b/frontend/src/components/chat/__tests__/ThinkingTimeline.test.tsxnew file mode 100644index 000000000..54442a37d--- /dev/null+++ b/frontend/src/components/chat/__tests__/ThinkingTimeline.test.tsx@@ -0,0 +1,118 @@+import { render, screen } from "@testing-library/react";+import userEvent from "@testing-library/user-event";+import { ThinkingTimeline } from "../ThinkingTimeline";+import type { AgentMessage } from "@/types/agent";++function makeMsg(overrides: Partial<AgentMessage> = {}): AgentMessage {+ return {+ id: "msg-1",+ type: "tool_call",+ content: "",+ tool: "bash",+ status: "running",+ timestamp: Date.now(),+ ...overrides,+ };+}++describe("ThinkingTimeline", () => {+ it("shows summary text when done", () => {+ const msgs: AgentMessage[] = [+ makeMsg({ type: "tool_call", tool: "run_backtest", status: "ok" }),+ makeMsg({+ type: "tool_result",+ tool: "run_backtest",+ status: "ok",+ elapsed_ms: 3200,+ content: "done",+ }),+ ];++ render(<ThinkingTimeline messages={msgs} />);+ expect(screen.getByText(/Done · 1 steps/)).toBeInTheDocument();+ expect(screen.getByText(/3\.2s/)).toBeInTheDocument();+ });++ it("shows running state with spinner", () => {+ const msgs: AgentMessage[] = [+ makeMsg({ type: "tool_call", tool: "run_backtest", status: "running" }),+ ];++ render(<ThinkingTimeline messages={msgs} isLatest />);+ expect(screen.getByText(/Running Run backtest/)).toBeInTheDocument();+ });++ it("expands and collapses on click", async () => {+ const user = userEvent.setup();+ const msgs: AgentMessage[] = [+ makeMsg({ type: "tool_call", tool: "bash", status: "ok" }),+ makeMsg({ type: "tool_result", tool: "bash", status: "ok", elapsed_ms: 100, content: "output" }),+ ];++ render(<ThinkingTimeline messages={msgs} />);++ // Initially collapsed+ expect(screen.queryByText("Run command")).not.toBeInTheDocument();++ // Click to expand+ await user.click(screen.getByRole("button"));++ // Now expanded — should show step labels+ expect(screen.getByText("Run command")).toBeInTheDocument();+ });++ it("shows error icon when a step failed", () => {+ const msgs: AgentMessage[] = [+ makeMsg({ type: "tool_call", tool: "bash", status: "ok" }),+ makeMsg({ type: "tool_result", tool: "bash", status: "error", content: "err" }),+ ];++ render(<ThinkingTimeline messages={msgs} isLatest />);+ // Error state should be visible in summary+ expect(screen.getByText(/Done · 1 steps/)).toBeInTheDocument();+ });++ it("shows thinking content when expanded with no tools", async () => {+ const user = userEvent.setup();+ const msgs: AgentMessage[] = [+ makeMsg({ type: "thinking", content: "Let me analyze this strategy carefully." }),+ ];++ render(<ThinkingTimeline messages={msgs} />);++ await user.click(screen.getByRole("button"));+ expect(screen.getByText("Let me analyze this strategy carefully.")).toBeInTheDocument();+ });++ it("starts expanded when isLatest is true", () => {+ const msgs: AgentMessage[] = [+ makeMsg({ type: "tool_call", tool: "write_file", status: "ok" }),+ makeMsg({ type: "tool_result", tool: "write_file", status: "ok", content: "ok" }),+ ];++ render(<ThinkingTimeline messages={msgs} isLatest />);+ // Should be expanded immediately — "Generate code" label visible+ expect(screen.getByText("Generate code")).toBeInTheDocument();+ });++ it("handles multiple tool steps", async () => {+ const user = userEvent.setup();+ const msgs: AgentMessage[] = [+ makeMsg({ type: "tool_call", tool: "bash", status: "ok" }),+ makeMsg({ type: "tool_result", tool: "bash", status: "ok", elapsed_ms: 500, content: "ok" }),+ makeMsg({ type: "tool_call", tool: "write_file", status: "ok" }),+ makeMsg({ type: "tool_result", tool: "write_file", status: "ok", elapsed_ms: 200, content: "ok" }),+ makeMsg({ type: "tool_call", tool: "run_backtest", status: "ok" }),+ makeMsg({ type: "tool_result", tool: "run_backtest", status: "ok", elapsed_ms: 5000, content: "ok" }),+ ];++ render(<ThinkingTimeline messages={msgs} />);+ expect(screen.getByText(/Done · 3 steps/)).toBeInTheDocument();+ expect(screen.getByText(/5\.7s/)).toBeInTheDocument();++ await user.click(screen.getByRole("button"));+ expect(screen.getByText("Run command")).toBeInTheDocument();+ expect(screen.getByText("Generate code")).toBeInTheDocument();+ expect(screen.getByText("Run backtest")).toBeInTheDocument();+ });+});diff --git a/frontend/src/components/chat/__tests__/ToolProgressIndicator.test.tsx b/frontend/src/components/chat/__tests__/ToolProgressIndicator.test.tsxnew file mode 100644index 000000000..d3de7989c--- /dev/null+++ b/frontend/src/components/chat/__tests__/ToolProgressIndicator.test.tsx@@ -0,0 +1,70 @@+import { render, screen } from "@testing-library/react";+import { ToolProgressIndicator } from "../ToolProgressIndicator";+import type { ToolCallEntry } from "@/types/agent";++function makeTc(overrides: Partial<ToolCallEntry> = {}): ToolCallEntry {+ return {+ id: "tc-1",+ tool: "run_backtest",+ arguments: {},+ status: "running",+ timestamp: Date.now(),+ ...overrides,+ };+}++describe("ToolProgressIndicator", () => {+ it("renders nothing when no tools are running", () => {+ const tcs = [makeTc({ status: "ok" }), makeTc({ id: "tc-2", status: "error" })];+ const { container } = render(<ToolProgressIndicator toolCalls={tcs} />);+ expect(container.innerHTML).toBe("");+ });++ it("renders nothing for empty array", () => {+ const { container } = render(<ToolProgressIndicator toolCalls={[]} />);+ expect(container.innerHTML).toBe("");+ });++ it("renders single running tool", () => {+ const tcs = [makeTc({ elapsed_s: 5 })];+ render(<ToolProgressIndicator toolCalls={tcs} />);+ expect(screen.getByRole("status")).toBeInTheDocument();+ expect(screen.getByText(/Run backtest/)).toBeInTheDocument();+ expect(screen.getByText("5s")).toBeInTheDocument();+ });++ it("renders multiple running tools with header", () => {+ const tcs = [+ makeTc({ id: "tc-1", tool: "bash" }),+ makeTc({ id: "tc-2", tool: "write_file" }),+ ];+ render(<ToolProgressIndicator toolCalls={tcs} />);+ expect(screen.getByText("2 tools running")).toBeInTheDocument();+ expect(screen.getByText(/Run command/)).toBeInTheDocument();+ expect(screen.getByText(/Generate code/)).toBeInTheDocument();+ });++ it("shows overflow indicator for > 3 running tools", () => {+ const tcs = [+ makeTc({ id: "tc-1", tool: "bash" }),+ makeTc({ id: "tc-2", tool: "write_file" }),+ makeTc({ id: "tc-3", tool: "run_backtest" }),+ makeTc({ id: "tc-4", tool: "read_file" }),+ ];+ render(<ToolProgressIndicator toolCalls={tcs} />);+ expect(screen.getByText(/… \+2 more/)).toBeInTheDocument();+ });++ it("shows determinate progress bar when progress data exists", () => {+ const tcs = [+ makeTc({+ progress: { current: 5, total: 10, stage: "Processing" },+ }),+ ];+ render(<ToolProgressIndicator toolCalls={tcs} />);+ expect(screen.getByText("Processing")).toBeInTheDocument();+ expect(screen.getByText("5/10")).toBeInTheDocument();+ // Should have a progressbar element+ expect(screen.getByRole("progressbar")).toBeInTheDocument();+ });+});diff --git a/frontend/src/components/chat/__tests__/WelcomeScreen.test.tsx b/frontend/src/components/chat/__tests__/WelcomeScreen.test.tsxnew file mode 100644index 000000000..42dffb7da--- /dev/null+++ b/frontend/src/components/chat/__tests__/WelcomeScreen.test.tsx@@ -0,0 +1,44 @@+import { render, screen } from "@testing-library/react";+import userEvent from "@testing-library/user-event";+import { WelcomeScreen } from "../WelcomeScreen";++describe("WelcomeScreen", () => {+ const onExample = vi.fn();++ beforeEach(() => onExample.mockClear());++ it("renders the title", () => {+ render(<WelcomeScreen onExample={onExample} />);+ expect(screen.getByText("Vibe-Trading")).toBeInTheDocument();+ });++ it("renders capability chips", () => {+ render(<WelcomeScreen onExample={onExample} />);+ expect(screen.getByText("Finance Skills Library")).toBeInTheDocument();+ expect(screen.getByText("Swarm Agent Teams")).toBeInTheDocument();+ expect(screen.getByText("Shadow Account Backtest")).toBeInTheDocument();+ });++ it("renders example categories", () => {+ render(<WelcomeScreen onExample={onExample} />);+ expect(screen.getByText("Multi-Market Backtest")).toBeInTheDocument();+ expect(screen.getByText("Research & Analysis")).toBeInTheDocument();+ expect(screen.getByText("Swarm Teams")).toBeInTheDocument();+ });++ it("calls onExample with prompt when an example button is clicked", async () => {+ render(<WelcomeScreen onExample={onExample} />);+ const user = userEvent.setup();+ await user.click(screen.getByText("Cross-Market Portfolio"));+ expect(onExample).toHaveBeenCalledTimes(1);+ expect(onExample).toHaveBeenCalledWith(+ expect.stringContaining("risk-parity portfolio"),+ );+ });++ it("renders the helper text", () => {+ render(<WelcomeScreen onExample={onExample} />);+ expect(screen.getByText("Describe a trading strategy to get started.")).toBeInTheDocument();+ expect(screen.getByText("Try an example:")).toBeInTheDocument();+ });+});diff --git a/frontend/src/components/common/__tests__/ErrorBoundary.test.tsx b/frontend/src/components/common/__tests__/ErrorBoundary.test.tsxnew file mode 100644index 000000000..5e48b989b--- /dev/null+++ b/frontend/src/components/common/__tests__/ErrorBoundary.test.tsx@@ -0,0 +1,61 @@+import React from "react";+import { render, screen } from "@testing-library/react";+import { ErrorBoundary } from "../ErrorBoundary";++function Thrower({ message }: { message: string }): React.ReactElement {+ throw new Error(message);+}++// Suppress React error boundary console.error in tests+const originalError = console.error;+beforeAll(() => {+ console.error = (...args: unknown[]) => {+ if (typeof args[0] === "string" && args[0].includes("ErrorBoundary")) return;+ originalError(...args);+ };+});+afterAll(() => {+ console.error = originalError;+});++describe("ErrorBoundary", () => {+ it("renders children normally when no error", () => {+ render(+ <ErrorBoundary>+ <div>Hello World</div>+ </ErrorBoundary>,+ );+ expect(screen.getByText("Hello World")).toBeInTheDocument();+ });++ it("renders default fallback with error message on error", () => {+ render(+ <ErrorBoundary>+ <Thrower message="Something broke" />+ </ErrorBoundary>,+ );+ expect(screen.getByText("Something broke")).toBeInTheDocument();+ });++ it("renders custom fallback when provided", () => {+ render(+ <ErrorBoundary fallback={<div>Custom fallback</div>}>+ <Thrower message="ignored" />+ </ErrorBoundary>,+ );+ expect(screen.getByText("Custom fallback")).toBeInTheDocument();+ expect(screen.queryByText("ignored")).not.toBeInTheDocument();+ });++ it("shows default message when error has no message", () => {+ function ThrowEmpty(): React.ReactElement {+ throw {};+ }+ render(+ <ErrorBoundary>+ <ThrowEmpty />+ </ErrorBoundary>,+ );+ expect(screen.getByText("Something went wrong")).toBeInTheDocument();+ });+});diff --git a/frontend/src/components/common/__tests__/Skeleton.test.tsx b/frontend/src/components/common/__tests__/Skeleton.test.tsxnew file mode 100644index 000000000..ca444c193--- /dev/null+++ b/frontend/src/components/common/__tests__/Skeleton.test.tsx@@ -0,0 +1,46 @@+import { render } from "@testing-library/react";+import { Skeleton, SkeletonMetrics, SkeletonChart } from "../Skeleton";++describe("Skeleton", () => {+ it("renders with animate-pulse class", () => {+ const { container } = render(<Skeleton />);+ const el = container.firstChild as HTMLElement;+ expect(el.classList.contains("animate-pulse")).toBe(true);+ });++ it("applies custom className", () => {+ const { container } = render(<Skeleton className="h-4 w-20" />);+ const el = container.firstChild as HTMLElement;+ expect(el.classList.contains("h-4")).toBe(true);+ expect(el.classList.contains("w-20")).toBe(true);+ });++ it("applies custom style", () => {+ const { container } = render(<Skeleton style={{ height: 42 }} />);+ const el = container.firstChild as HTMLElement;+ expect(el.style.height).toBe("42px");+ });+});++describe("SkeletonMetrics", () => {+ it("renders 6 skeleton items", () => {+ const { container } = render(<SkeletonMetrics />);+ const items = container.querySelectorAll(".animate-pulse");+ // Each of the 6 items has 2 skeleton elements (label + value)+ expect(items.length).toBe(12);+ });+});++describe("SkeletonChart", () => {+ it("renders with default height of 300", () => {+ const { container } = render(<SkeletonChart />);+ const el = container.firstChild as HTMLElement;+ expect(el.style.height).toBe("300px");+ });++ it("renders with custom height", () => {+ const { container } = render(<SkeletonChart height={200} />);+ const el = container.firstChild as HTMLElement;+ expect(el.style.height).toBe("200px");+ });+});diff --git a/frontend/src/components/layout/__tests__/ConnectionBanner.test.tsx b/frontend/src/components/layout/__tests__/ConnectionBanner.test.tsxnew file mode 100644index 000000000..03614d719--- /dev/null+++ b/frontend/src/components/layout/__tests__/ConnectionBanner.test.tsx@@ -0,0 +1,31 @@+import { render, screen } from "@testing-library/react";+import { ConnectionBanner } from "../ConnectionBanner";++describe("ConnectionBanner", () => {+ it("renders nothing when status is connected", () => {+ const { container } = render(<ConnectionBanner status="connected" />);+ expect(container.innerHTML).toBe("");+ });++ it("renders nothing when status is disconnected", () => {+ const { container } = render(<ConnectionBanner status="disconnected" />);+ expect(container.innerHTML).toBe("");+ });++ it("shows reconnecting message with attempt number", () => {+ render(<ConnectionBanner status="reconnecting" retryAttempt={3} />);+ expect(screen.getByText(/reconnecting/i)).toBeInTheDocument();+ expect(screen.getByText(/attempt 3/)).toBeInTheDocument();+ });++ it("defaults to attempt 1 when retryAttempt is not provided", () => {+ render(<ConnectionBanner status="reconnecting" />);+ expect(screen.getByText(/attempt 1/)).toBeInTheDocument();+ });++ it("has warning styling", () => {+ const { container } = render(<ConnectionBanner status="reconnecting" retryAttempt={1} />);+ const banner = container.firstChild as HTMLElement;+ expect(banner.className).toMatch(/warning/);+ });+});diff --git a/frontend/src/hooks/__tests__/useDarkMode.test.ts b/frontend/src/hooks/__tests__/useDarkMode.test.tsnew file mode 100644index 000000000..21b74de9d--- /dev/null+++ b/frontend/src/hooks/__tests__/useDarkMode.test.ts@@ -0,0 +1,59 @@+import { renderHook, act } from "@testing-library/react";+import { useDarkMode } from "../useDarkMode";++describe("useDarkMode", () => {+ beforeEach(() => {+ localStorage.clear();+ document.documentElement.classList.remove("dark");+ });++ it("defaults to light when no preference stored and OS is light", () => {+ const { result } = renderHook(() => useDarkMode());+ expect(result.current.dark).toBe(false);+ });++ it("reads dark preference from localStorage", () => {+ localStorage.setItem("qa-theme", "dark");+ const { result } = renderHook(() => useDarkMode());+ expect(result.current.dark).toBe(true);+ });++ it("reads light preference from localStorage", () => {+ localStorage.setItem("qa-theme", "light");+ const { result } = renderHook(() => useDarkMode());+ expect(result.current.dark).toBe(false);+ });++ it("toggles dark mode", () => {+ const { result } = renderHook(() => useDarkMode());+ expect(result.current.dark).toBe(false);++ act(() => result.current.toggle());+ expect(result.current.dark).toBe(true);++ act(() => result.current.toggle());+ expect(result.current.dark).toBe(false);+ });++ it("persists preference to localStorage on change", () => {+ const { result } = renderHook(() => useDarkMode());+ expect(localStorage.getItem("qa-theme")).toBe("light");++ act(() => result.current.toggle());+ expect(localStorage.getItem("qa-theme")).toBe("dark");++ act(() => result.current.toggle());+ expect(localStorage.getItem("qa-theme")).toBe("light");+ });++ it("toggles dark class on document.documentElement", () => {+ const { result } = renderHook(() => useDarkMode());+ expect(document.documentElement.classList.contains("dark")).toBe(false);++ act(() => result.current.toggle());+ expect(document.documentElement.classList.contains("dark")).toBe(true);++ act(() => result.current.toggle());+ expect(document.documentElement.classList.contains("dark")).toBe(false);+ });+});diff --git a/frontend/src/hooks/__tests__/useSSE.test.ts b/frontend/src/hooks/__tests__/useSSE.test.tsnew file mode 100644index 000000000..1413ffc4e--- /dev/null+++ b/frontend/src/hooks/__tests__/useSSE.test.ts@@ -0,0 +1,278 @@+import { renderHook, act } from "@testing-library/react";+import { useSSE } from "../useSSE";++// ── Mock EventSource ──────────────────────────────────────++type ESHandler = (e: MessageEvent) => void;++class MockEventSource {+ url: string;+ onopen: (() => void) | null = null;+ onerror: (() => void) | null = null;+ private listeners = new Map<string, ESHandler[]>();++ constructor(url: string) {+ this.url = url;+ MockEventSource.instances.push(this);+ }++ addEventListener(type: string, handler: ESHandler) {+ if (!this.listeners.has(type)) this.listeners.set(type, []);+ this.listeners.get(type)!.push(handler);+ }++ /** Test helper: simulate an event from the server */+ emit(type: string, data: unknown, lastEventId?: string) {+ const event = new MessageEvent(type, { data: JSON.stringify(data) });+ Object.defineProperty(event, "lastEventId", { value: lastEventId || "" });+ const handlers = this.listeners.get(type) || [];+ handlers.forEach((h) => h(event));+ }++ close() {+ this.listeners.clear();+ }++ // ── Static helpers ──+ static instances: MockEventSource[] = [];++ static reset() {+ this.instances = [];+ }++ static get latest(): MockEventSource {+ return this.instances[this.instances.length - 1];+ }+}++beforeEach(() => {+ MockEventSource.reset();+ vi.stubGlobal("EventSource", MockEventSource);+ vi.useFakeTimers();+});++afterEach(() => {+ vi.useRealTimers();+ vi.unstubAllGlobals();+});++// ── Tests ─────────────────────────────────────────────────++describe("useSSE — connect/disconnect", () => {+ it("creates an EventSource on connect", () => {+ const { result } = renderHook(() => useSSE());+ act(() => result.current.connect("http://test/events", {}));+ expect(MockEventSource.instances).toHaveLength(1);+ expect(MockEventSource.latest.url).toBe("http://test/events");+ });++ it("closes previous EventSource on reconnect", () => {+ const { result } = renderHook(() => useSSE());+ const closeSpy = vi.fn();++ act(() => result.current.connect("http://test/events", {}));+ MockEventSource.latest.close = closeSpy;++ act(() => result.current.connect("http://test/events2", {}));+ expect(closeSpy).toHaveBeenCalled();+ });++ it("sets status to connected on open", () => {+ const statuses: string[] = [];+ const { result } = renderHook(() => useSSE());++ act(() => {+ result.current.onStatusChange((s) => statuses.push(s));+ result.current.connect("http://test/events", {});+ });++ act(() => MockEventSource.latest.onopen?.());+ expect(statuses).toContain("connected");+ expect(result.current.getStatus()).toBe("connected");+ });++ it("disconnect closes source and sets disconnected status", () => {+ const statuses: string[] = [];+ const { result } = renderHook(() => useSSE());++ act(() => {+ result.current.onStatusChange((s) => statuses.push(s));+ result.current.connect("http://test/events", {});+ });++ act(() => result.current.disconnect());+ expect(statuses).toContain("disconnected");+ expect(result.current.getStatus()).toBe("disconnected");+ });+});++describe("useSSE — event handling", () => {+ it("dispatches typed events to handlers", () => {+ const textDeltas: unknown[] = [];+ const { result } = renderHook(() => useSSE());++ act(() =>+ result.current.connect("http://test/events", {+ text_delta: (data) => textDeltas.push(data),+ }),+ );++ act(() => MockEventSource.latest.emit("text_delta", { content: "hello" }));+ expect(textDeltas).toHaveLength(1);+ expect(textDeltas[0]).toEqual({ content: "hello" });+ });++ it("falls back to message handler for known event types without specific handler", () => {+ const messages: unknown[] = [];+ const { result } = renderHook(() => useSSE());++ act(() =>+ result.current.connect("http://test/events", {+ message: (data) => messages.push(data),+ }),+ );++ // "text_delta" is a known type the hook subscribes to,+ // but no specific handler → falls back to "message"+ act(() => MockEventSource.latest.emit("text_delta", { foo: "bar" }, "evt-1"));+ expect(messages).toHaveLength(1);+ });++ it("handles malformed JSON gracefully", () => {+ const messages: unknown[] = [];+ const { result } = renderHook(() => useSSE());++ act(() =>+ result.current.connect("http://test/events", {+ text_delta: (data) => messages.push(data),+ }),+ );++ // Emit with raw non-JSON data+ const event = new MessageEvent("text_delta", { data: "not json" });+ Object.defineProperty(event, "lastEventId", { value: "evt-x" });+ const handlers = (MockEventSource.latest as any).listeners.get("text_delta");+ act(() => handlers?.forEach((h: ESHandler) => h(event)));++ expect(messages).toHaveLength(1);+ expect(messages[0]).toEqual({ raw: "not json" });+ });+});++describe("useSSE — deduplication", () => {+ it("deduplicates events by lastEventId", () => {+ const messages: unknown[] = [];+ const { result } = renderHook(() => useSSE({ dedupeCapacity: 10 }));++ act(() =>+ result.current.connect("http://test/events", {+ text_delta: (data) => messages.push(data),+ }),+ );++ act(() => MockEventSource.latest.emit("text_delta", { n: 1 }, "dup-1"));+ act(() => MockEventSource.latest.emit("text_delta", { n: 2 }, "dup-1")); // duplicate+ act(() => MockEventSource.latest.emit("text_delta", { n: 3 }, "dup-2"));++ expect(messages).toHaveLength(2);+ expect(messages[0]).toEqual({ n: 1 });+ expect(messages[1]).toEqual({ n: 3 });+ });++ it("evicts oldest events when dedup capacity exceeded", () => {+ const messages: unknown[] = [];+ const { result } = renderHook(() => useSSE({ dedupeCapacity: 3 }));++ act(() =>+ result.current.connect("http://test/events", {+ text_delta: (data) => messages.push(data),+ }),+ );++ // Fill dedup set to capacity (3)+ act(() => MockEventSource.latest.emit("text_delta", { n: 1 }, "a"));+ act(() => MockEventSource.latest.emit("text_delta", { n: 2 }, "b"));+ act(() => MockEventSource.latest.emit("text_delta", { n: 3 }, "c"));++ // Duplicate: should be suppressed+ act(() => MockEventSource.latest.emit("text_delta", { n: 10 }, "a"));+ expect(messages).toHaveLength(3);++ // Adding 4th event → "a" gets evicted → re-emit "a" should pass through+ act(() => MockEventSource.latest.emit("text_delta", { n: 4 }, "d"));+ expect(messages).toHaveLength(4);+ act(() => MockEventSource.latest.emit("text_delta", { n: 5 }, "a"));+ expect(messages).toHaveLength(5);+ });+});++describe("useSSE — exponential backoff", () => {+ it("schedules reconnect with exponential delay on error", () => {+ const reconnects: unknown[] = [];+ const { result } = renderHook(() =>+ useSSE({ initialRetryMs: 100, maxRetryMs: 5000, backoffFactor: 2 }),+ );++ act(() =>+ result.current.connect("http://test/events", {+ reconnect: (data) => reconnects.push(data),+ }),+ );++ // Trigger error → should schedule reconnect+ act(() => MockEventSource.latest.onerror?.());++ expect(reconnects).toHaveLength(1);+ expect(reconnects[0]).toEqual({ attempt: 1, delayMs: 100 });+ expect(result.current.getStatus()).toBe("reconnecting");++ // Advance timer past the delay → should create a new EventSource+ act(() => vi.advanceTimersByTime(150));+ expect(MockEventSource.instances.length).toBeGreaterThan(1);+ });++ it("caps retry delay at maxRetryMs", () => {+ const reconnects: unknown[] = [];+ const { result } = renderHook(() =>+ useSSE({ initialRetryMs: 100, maxRetryMs: 200, backoffFactor: 10 }),+ );++ act(() =>+ result.current.connect("http://test/events", {+ reconnect: (data) => reconnects.push(data),+ }),+ );++ act(() => MockEventSource.latest.onerror?.());+ expect((reconnects[0] as any).delayMs).toBe(100);++ // Trigger another error on the new source+ act(() => vi.advanceTimersByTime(200));+ act(() => MockEventSource.latest.onerror?.());+ // backoff: 100 * 10^1 = 1000, but capped at 200+ expect((reconnects[1] as any).delayMs).toBe(200);+ });+});++describe("useSSE — Last-Event-ID resume", () => {+ it("appends Last-Event-ID to reconnect URL", () => {+ const { result } = renderHook(() => useSSE());++ act(() =>+ result.current.connect("http://test/events", {+ text_delta: () => {},+ }),+ );++ // Emit an event with lastEventId+ act(() => MockEventSource.latest.emit("text_delta", { n: 1 }, "resume-42"));++ // Trigger reconnect+ act(() => MockEventSource.latest.onerror?.());+ act(() => vi.advanceTimersByTime(2000));++ // The new EventSource should have Last-Event-ID in the URL+ const newUrl = MockEventSource.latest.url;+ expect(newUrl).toContain("Last-Event-ID=resume-42");+ });+});diff --git a/frontend/src/lib/__tests__/apiAuth.test.ts b/frontend/src/lib/__tests__/apiAuth.test.tsnew file mode 100644index 000000000..885584cce--- /dev/null+++ b/frontend/src/lib/__tests__/apiAuth.test.ts@@ -0,0 +1,68 @@+import { getApiAuthKey, setApiAuthKey, authHeaders, authQuerySuffix, withAuthQuery } from "../apiAuth";++describe("apiAuth", () => {+ beforeEach(() => {+ localStorage.clear();+ });++ describe("getApiAuthKey", () => {+ it("returns empty string when nothing stored", () => {+ expect(getApiAuthKey()).toBe("");+ });+ it("returns stored key", () => {+ localStorage.setItem("vibe_trading_api_auth_key", "my-secret");+ expect(getApiAuthKey()).toBe("my-secret");+ });+ });++ describe("setApiAuthKey", () => {+ it("stores trimmed value", () => {+ setApiAuthKey(" abc-123 ");+ expect(localStorage.getItem("vibe_trading_api_auth_key")).toBe("abc-123");+ });+ it("removes key when value is empty/whitespace", () => {+ setApiAuthKey("abc");+ setApiAuthKey(" ");+ expect(localStorage.getItem("vibe_trading_api_auth_key")).toBeNull();+ });+ it("removes key when value is empty string", () => {+ setApiAuthKey("abc");+ setApiAuthKey("");+ expect(localStorage.getItem("vibe_trading_api_auth_key")).toBeNull();+ });+ });++ describe("authHeaders", () => {+ it("returns empty object when no key set", () => {+ expect(authHeaders()).toEqual({});+ });+ it("returns Bearer header when key exists", () => {+ setApiAuthKey("token-xyz");+ expect(authHeaders()).toEqual({ Authorization: "Bearer token-xyz" });+ });+ });++ describe("authQuerySuffix", () => {+ it("returns empty string when no key", () => {+ expect(authQuerySuffix()).toBe("");+ });+ it("returns encoded query param when key exists", () => {+ setApiAuthKey("key with spaces");+ expect(authQuerySuffix()).toBe("api_key=key%20with%20spaces");+ });+ });++ describe("withAuthQuery", () => {+ it("returns url unchanged when no key", () => {+ expect(withAuthQuery("https://api.com/data")).toBe("https://api.com/data");+ });+ it("appends with ? when url has no query string", () => {+ setApiAuthKey("abc");+ expect(withAuthQuery("https://api.com/data")).toBe("https://api.com/data?api_key=abc");+ });+ it("appends with & when url already has query string", () => {+ setApiAuthKey("abc");+ expect(withAuthQuery("https://api.com/data?foo=bar")).toBe("https://api.com/data?foo=bar&api_key=abc");+ });+ });+});diff --git a/frontend/src/lib/__tests__/formatters.test.ts b/frontend/src/lib/__tests__/formatters.test.tsnew file mode 100644index 000000000..37be73499--- /dev/null+++ b/frontend/src/lib/__tests__/formatters.test.ts@@ -0,0 +1,159 @@+import {+ getMetricLabel,+ formatMetricVal,+ metricSentiment,+ formatTimestamp,+ abbreviateNum,+ DISPLAY_ORDER,+ METRIC_LABELS,+} from "../formatters";++describe("getMetricLabel", () => {+ it("returns human label for known keys", () => {+ expect(getMetricLabel("sharpe")).toBe("Sharpe");+ expect(getMetricLabel("max_drawdown")).toBe("Max DD");+ });++ it("returns raw key for unknown keys", () => {+ expect(getMetricLabel("custom_metric")).toBe("custom_metric");+ });+});++describe("formatMetricVal", () => {+ // Percentage keys+ it("formats percentage keys with sign and %", () => {+ expect(formatMetricVal("total_return", 0.1234)).toBe("+12.34%");+ expect(formatMetricVal("annual_return", -0.05)).toBe("-5.00%");+ expect(formatMetricVal("win_rate", 0.5)).toBe("+50.00%");+ expect(formatMetricVal("max_drawdown", -0.15)).toBe("-15.00%");+ });++ it("formats zero percentage without sign", () => {+ // v > 0 is false when v === 0, so sign is ""+ expect(formatMetricVal("total_return", 0)).toBe("0.00%");+ });++ // Ratio keys+ it("formats ratio keys with sign", () => {+ expect(formatMetricVal("sharpe", 1.5)).toBe("+1.50");+ expect(formatMetricVal("sortino", -0.3)).toBe("-0.30");+ });++ // Integer keys+ it("formats integer keys as rounded whole numbers", () => {+ expect(formatMetricVal("trade_count", 42.7)).toBe("43");+ expect(formatMetricVal("max_consecutive_loss", 3.2)).toBe("3");+ });++ // Special keys+ it("formats final_value with locale grouping", () => {+ const result = formatMetricVal("final_value", 1234567);+ expect(result).toMatch(/1.*234.*567|1,234,567/);+ });++ it("formats avg_holding_days with one decimal", () => {+ expect(formatMetricVal("avg_holding_days", 3.456)).toBe("3.5");+ });++ // Fallback+ it("falls back to 4 decimal places for unknown keys", () => {+ expect(formatMetricVal("unknown_key", 1.23456789)).toBe("1.2346");+ });+});++describe("metricSentiment", () => {+ it("returns neutral for neutral keys regardless of value", () => {+ expect(metricSentiment("trade_count", 100)).toBe("neutral");+ expect(metricSentiment("avg_holding_days", 0)).toBe("neutral");+ expect(metricSentiment("final_value", -999)).toBe("neutral");+ });++ // max_drawdown thresholds+ it("max_drawdown: > -0.05 is positive", () => {+ expect(metricSentiment("max_drawdown", -0.01)).toBe("positive");+ });+ it("max_drawdown: -0.05 to -0.2 is neutral", () => {+ expect(metricSentiment("max_drawdown", -0.1)).toBe("neutral");+ });+ it("max_drawdown: <= -0.2 is negative", () => {+ expect(metricSentiment("max_drawdown", -0.25)).toBe("negative");+ });++ // win_rate thresholds+ it("win_rate: >= 0.5 is positive", () => {+ expect(metricSentiment("win_rate", 0.6)).toBe("positive");+ });+ it("win_rate: 0.35-0.5 is neutral", () => {+ expect(metricSentiment("win_rate", 0.4)).toBe("neutral");+ });+ it("win_rate: < 0.35 is negative", () => {+ expect(metricSentiment("win_rate", 0.2)).toBe("negative");+ });++ // sharpe/calmar/sortino thresholds+ it("sharpe: >= 1.0 positive, >= 0.3 neutral, < 0.3 negative", () => {+ expect(metricSentiment("sharpe", 1.5)).toBe("positive");+ expect(metricSentiment("sharpe", 0.5)).toBe("neutral");+ expect(metricSentiment("sharpe", 0.1)).toBe("negative");+ });++ // information_ratio+ it("information_ratio: >= 0.5 positive, >= 0 neutral, < 0 negative", () => {+ expect(metricSentiment("information_ratio", 0.6)).toBe("positive");+ expect(metricSentiment("information_ratio", 0.2)).toBe("neutral");+ expect(metricSentiment("information_ratio", -0.1)).toBe("negative");+ });++ // max_consecutive_loss+ it("max_consecutive_loss: <= 3 positive, <= 6 neutral, > 6 negative", () => {+ expect(metricSentiment("max_consecutive_loss", 2)).toBe("positive");+ expect(metricSentiment("max_consecutive_loss", 5)).toBe("neutral");+ expect(metricSentiment("max_consecutive_loss", 8)).toBe("negative");+ });++ // Generic fallback+ it("generic: positive > 0, neutral === 0, negative < 0", () => {+ expect(metricSentiment("total_return", 0.1)).toBe("positive");+ expect(metricSentiment("total_return", 0)).toBe("neutral");+ expect(metricSentiment("total_return", -0.1)).toBe("negative");+ });+});++describe("formatTimestamp", () => {+ it("formats timestamp as HH:MM with zero-padding", () => {+ const d = new Date(2024, 0, 1, 9, 5);+ expect(formatTimestamp(d.getTime())).toBe("09:05");+ });++ it("handles midnight", () => {+ const d = new Date(2024, 0, 1, 0, 0);+ expect(formatTimestamp(d.getTime())).toBe("00:00");+ });+});++describe("abbreviateNum", () => {+ it("abbreviates billions", () => {+ expect(abbreviateNum(1_500_000_000)).toBe("1.5B");+ });+ it("abbreviates millions", () => {+ expect(abbreviateNum(2_300_000)).toBe("2.3M");+ });+ it("abbreviates thousands", () => {+ expect(abbreviateNum(15_000)).toBe("15K");+ });+ it("returns locale string for small numbers", () => {+ expect(abbreviateNum(999)).toBe("999");+ });+ it("handles negative values", () => {+ expect(abbreviateNum(-2_500_000)).toBe("-2.5M");+ });+});++describe("DISPLAY_ORDER", () => {+ it("contains all keys from METRIC_LABELS", () => {+ const labelKeys = Object.keys(METRIC_LABELS);+ for (const key of labelKeys) {+ expect(DISPLAY_ORDER).toContain(key);+ }+ });+});diff --git a/frontend/src/lib/__tests__/indicators.test.ts b/frontend/src/lib/__tests__/indicators.test.tsnew file mode 100644index 000000000..d22b1c03c--- /dev/null+++ b/frontend/src/lib/__tests__/indicators.test.ts@@ -0,0 +1,210 @@+import { calcMA, calcEMA, calcBOLL, calcMACD, calcRSI, calcKDJ } from "../indicators";++describe("calcMA", () => {+ it("returns null for indices before period-1", () => {+ const result = calcMA([1, 2, 3, 4, 5], 3);+ expect(result[0]).toBeNull();+ expect(result[1]).toBeNull();+ });++ it("computes correct simple moving average", () => {+ const result = calcMA([1, 2, 3, 4, 5], 3);+ expect(result[2]).toBe(2); // (1+2+3)/3+ expect(result[3]).toBe(3); // (2+3+4)/3+ expect(result[4]).toBe(4); // (3+4+5)/3+ });++ it("handles period equal to data length", () => {+ const result = calcMA([10, 20, 30], 3);+ expect(result[0]).toBeNull();+ expect(result[1]).toBeNull();+ expect(result[2]).toBe(20);+ });++ it("handles single element with period 1", () => {+ expect(calcMA([42], 1)).toEqual([42]);+ });++ it("returns all null when period exceeds data length", () => {+ expect(calcMA([1, 2], 5)).toEqual([null, null]);+ });+});++describe("calcEMA", () => {+ it("returns null before period-1", () => {+ const result = calcEMA([1, 2, 3, 4, 5], 3);+ expect(result[0]).toBeNull();+ expect(result[1]).toBeNull();+ });++ it("first EMA value equals SMA of first period values", () => {+ const result = calcEMA([1, 2, 3, 4, 5], 3);+ expect(result[2]).toBe(2); // SMA seed: (1+2+3)/3+ });++ it("subsequent values use exponential smoothing", () => {+ const result = calcEMA([1, 2, 3, 4, 5], 3);+ // k = 2/(3+1) = 0.5+ // EMA[3] = 4 * 0.5 + 2 * 0.5 = 3.0+ expect(result[3]).toBe(3);+ // EMA[4] = 5 * 0.5 + 3 * 0.5 = 4.0+ expect(result[4]).toBe(4);+ });++ it("handles empty array", () => {+ expect(calcEMA([], 3)).toEqual([]);+ });+});++describe("calcBOLL", () => {+ const data = Array.from({ length: 25 }, (_, i) => 100 + i);++ it("returns null for upper/lower/mid before period", () => {+ const { upper, mid, lower } = calcBOLL(data, 20);+ expect(mid[18]).toBeNull();+ expect(upper[18]).toBeNull();+ expect(lower[18]).toBeNull();+ });++ it("mid equals SMA at period boundary", () => {+ const { mid } = calcBOLL(data, 20);+ // SMA of [100..119] = 109.5+ expect(mid[19]).toBeCloseTo(109.5, 4);+ });++ it("upper > mid > lower for varying data", () => {+ const { upper, mid, lower } = calcBOLL(data, 20);+ for (let i = 19; i < 25; i++) {+ if (mid[i] !== null) {+ expect(upper[i]!).toBeGreaterThan(mid[i]!);+ expect(lower[i]!).toBeLessThan(mid[i]!);+ }+ }+ });++ it("upper and lower are symmetric around mid", () => {+ const { upper, mid, lower } = calcBOLL(data, 20, 2);+ const i = 19;+ const bandUp = upper[i]! - mid[i]!;+ const bandDn = mid[i]! - lower[i]!;+ expect(bandUp).toBeCloseTo(bandDn, 10);+ });+});++describe("calcMACD", () => {+ const data = Array.from({ length: 50 }, (_, i) => 100 + Math.sin(i / 5) * 10);++ it("returns null DIF before slow period", () => {+ const { dif } = calcMACD(data);+ expect(dif[24]).toBeNull(); // slow=26, so dif[0..24] are null+ });++ it("DIF exists after slow period", () => {+ const { dif } = calcMACD(data);+ expect(dif[25]).not.toBeNull();+ });++ it("signal line exists after enough DIF values", () => {+ const { signal } = calcMACD(data);+ const firstSignal = signal.findIndex((v) => v !== null);+ expect(firstSignal).toBeGreaterThanOrEqual(25);+ expect(firstSignal).toBeLessThan(45);+ });++ it("histogram = dif - signal where both exist", () => {+ const { dif, signal, histogram } = calcMACD(data);+ for (let i = 0; i < data.length; i++) {+ if (dif[i] !== null && signal[i] !== null) {+ expect(histogram[i]).toBeCloseTo(dif[i]! - signal[i]!, 10);+ }+ }+ });+});++describe("calcRSI", () => {+ it("returns null for first period entries", () => {+ const data = Array.from({ length: 20 }, (_, i) => 100 + i);+ const result = calcRSI(data, 14);+ for (let i = 0; i < 14; i++) expect(result[i]).toBeNull();+ });++ it("RSI is between 0 and 100", () => {+ const data = Array.from({ length: 50 }, (_, i) => 100 + Math.sin(i) * 5);+ const result = calcRSI(data, 14);+ result.forEach((v) => {+ if (v !== null) {+ expect(v).toBeGreaterThanOrEqual(0);+ expect(v).toBeLessThanOrEqual(100);+ }+ });+ });++ it("all-up data gives RSI = 100", () => {+ const data = Array.from({ length: 20 }, (_, i) => 100 + i);+ const result = calcRSI(data, 14);+ expect(result[14]).toBe(100);+ });++ it("all-down data gives RSI = 0", () => {+ const data = Array.from({ length: 20 }, (_, i) => 100 - i);+ const result = calcRSI(data, 14);+ expect(result[14]).toBe(0);+ });++ it("returns all null when data length < period+1", () => {+ const result = calcRSI([1, 2, 3], 14);+ expect(result.every((v) => v === null)).toBe(true);+ });+});++describe("calcKDJ", () => {+ const highs = [110, 112, 108, 115, 120, 118, 122, 125, 119, 121];+ const lows = [ 95, 98, 96, 100, 105, 102, 108, 110, 104, 107];+ const closes = [105, 110, 100, 112, 118, 105, 120, 122, 110, 119];++ it("returns null for indices before period-1", () => {+ const { k, d, j } = calcKDJ(highs, lows, closes, 9);+ for (let i = 0; i < 8; i++) {+ expect(k[i]).toBeNull();+ expect(d[i]).toBeNull();+ expect(j[i]).toBeNull();+ }+ });++ it("produces non-null K, D, J from period-1 onward", () => {+ const { k, d, j } = calcKDJ(highs, lows, closes, 9);+ expect(k[8]).not.toBeNull();+ expect(d[8]).not.toBeNull();+ expect(j[8]).not.toBeNull();+ });++ it("J = 3K - 2D", () => {+ const { k, d, j } = calcKDJ(highs, lows, closes, 9);+ for (let i = 8; i < closes.length; i++) {+ expect(j[i]).toBeCloseTo(3 * k[i]! - 2 * d[i]!, 10);+ }+ });++ it("K and D are between 0 and 100", () => {+ const { k, d } = calcKDJ(highs, lows, closes, 9);+ k.forEach((v) => {+ if (v !== null) {+ expect(v).toBeGreaterThanOrEqual(0);+ expect(v).toBeLessThanOrEqual(100);+ }+ });+ d.forEach((v) => {+ if (v !== null) {+ expect(v).toBeGreaterThanOrEqual(0);+ expect(v).toBeLessThanOrEqual(100);+ }+ });+ });++ it("returns all null when data shorter than period", () => {+ const { k, d, j } = calcKDJ([110], [95], [105], 9);+ expect(k[0]).toBeNull();+ expect(d[0]).toBeNull();+ expect(j[0]).toBeNull();+ });+});diff --git a/frontend/src/lib/__tests__/runReports.test.ts b/frontend/src/lib/__tests__/runReports.test.tsnew file mode 100644index 000000000..904eac18b--- /dev/null+++ b/frontend/src/lib/__tests__/runReports.test.ts@@ -0,0 +1,89 @@+import { isReportWorthyRun } from "../runReports";+import { makeRunData } from "@/tests/helpers/factories";++describe("isReportWorthyRun", () => {+ it("returns false for null/undefined", () => {+ expect(isReportWorthyRun(null)).toBe(false);+ expect(isReportWorthyRun(undefined)).toBe(false);+ });++ it("returns false for empty run with no data", () => {+ expect(isReportWorthyRun(makeRunData())).toBe(false);+ });++ it("returns true when metrics has keys", () => {+ expect(+ isReportWorthyRun(makeRunData({ metrics: { total_return: 0.1, final_value: 10000 } })),+ ).toBe(true);+ });++ it("returns true when run_card has keys", () => {+ expect(+ isReportWorthyRun(makeRunData({ run_card: { schema_version: "1.0" } })),+ ).toBe(true);+ });++ it("returns true when equity_curve is non-empty", () => {+ expect(+ isReportWorthyRun(makeRunData({ equity_curve: [{ time: "2024-01-01", equity: 10000 }] })),+ ).toBe(true);+ });++ it("returns true when trade_log is non-empty", () => {+ expect(+ isReportWorthyRun(makeRunData({ trade_log: [{ date: "2024-01-01", action: "BUY" }] })),+ ).toBe(true);+ });++ it("returns true when trade_markers is non-empty", () => {+ expect(+ isReportWorthyRun(makeRunData({ trade_markers: [{ time: "2024-01-01", side: "buy", price: 100 }] })),+ ).toBe(true);+ });++ it("returns true when validation has keys", () => {+ expect(+ isReportWorthyRun(makeRunData({ validation: { passed: true } })),+ ).toBe(true);+ });++ it("returns true when price_series has non-empty array", () => {+ expect(+ isReportWorthyRun(+ makeRunData({+ price_series: {+ AAPL: [{ time: "2024-01-01", open: 100, high: 105, low: 99, close: 103, volume: 1000 }],+ },+ }),+ ),+ ).toBe(true);+ });++ it("returns false when price_series values are all empty arrays", () => {+ expect(+ isReportWorthyRun(makeRunData({ price_series: { AAPL: [] } })),+ ).toBe(false);+ });++ it("returns true when artifacts contain matching filenames", () => {+ expect(+ isReportWorthyRun(makeRunData({ artifacts: [{ name: "metrics.json", path: "/tmp/metrics.json" }] })),+ ).toBe(true);+ expect(+ isReportWorthyRun(makeRunData({ artifacts: [{ name: "trades.csv", path: "/tmp/t.csv" }] })),+ ).toBe(true);+ expect(+ isReportWorthyRun(makeRunData({ artifacts: [{ name: "strategy.pine", path: "/tmp/s.pine" }] })),+ ).toBe(true);+ });++ it("returns false for artifacts with non-matching names", () => {+ expect(+ isReportWorthyRun(makeRunData({ artifacts: [{ name: "readme.txt", path: "/tmp/r.txt" }] })),+ ).toBe(false);+ });++ it("handles empty artifacts array", () => {+ expect(isReportWorthyRun(makeRunData({ artifacts: [] }))).toBe(false);+ });+});diff --git a/frontend/src/lib/__tests__/tools.test.ts b/frontend/src/lib/__tests__/tools.test.tsnew file mode 100644index 000000000..df4babff6--- /dev/null+++ b/frontend/src/lib/__tests__/tools.test.ts@@ -0,0 +1,33 @@+import { localizeToolName, TOOL_LABELS } from "../tools";++describe("TOOL_LABELS", () => {+ it("maps known tool names to user-facing labels", () => {+ expect(TOOL_LABELS["run_backtest"]).toBe("Run backtest");+ expect(TOOL_LABELS["write_file"]).toBe("Generate code");+ expect(TOOL_LABELS["bash"]).toBe("Run command");+ expect(TOOL_LABELS["compact"]).toBe("Summarize conversation");+ });++ it("contains all trading connector tools", () => {+ const tradingKeys = Object.keys(TOOL_LABELS).filter((k) => k.startsWith("trading_"));+ expect(tradingKeys.length).toBeGreaterThanOrEqual(6);+ });+});++describe("localizeToolName", () => {+ it("returns label for known tools", () => {+ expect(localizeToolName("run_backtest")).toBe("Run backtest");+ });++ it("returns fallback for unknown tools when fallback provided", () => {+ expect(localizeToolName("unknown_tool", "My Fallback")).toBe("My Fallback");+ });++ it("returns raw tool name for unknown tools with no fallback", () => {+ expect(localizeToolName("some_new_tool")).toBe("some_new_tool");+ });++ it("prefers TOOL_LABELS over fallback", () => {+ expect(localizeToolName("bash", "ignored")).toBe("Run command");+ });+});diff --git a/frontend/src/lib/__tests__/utils.test.ts b/frontend/src/lib/__tests__/utils.test.tsnew file mode 100644index 000000000..0ef7d0177--- /dev/null+++ b/frontend/src/lib/__tests__/utils.test.ts@@ -0,0 +1,31 @@+import { cn } from "../utils";++describe("cn", () => {+ it("merges class names", () => {+ expect(cn("px-2", "py-1")).toBe("px-2 py-1");+ });++ it("deduplicates tailwind conflicts — last wins", () => {+ expect(cn("px-2", "px-4")).toBe("px-4");+ });++ it("handles conditional classes via clsx", () => {+ expect(cn("base", false && "hidden", "end")).toBe("base end");+ });++ it("handles undefined and null inputs", () => {+ expect(cn("a", undefined, null, "b")).toBe("a b");+ });++ it("handles empty input", () => {+ expect(cn()).toBe("");+ });++ it("merges complex tailwind conflicts", () => {+ expect(cn("bg-red-500", "bg-blue-500")).toBe("bg-blue-500");+ });++ it("preserves non-conflicting classes from different groups", () => {+ expect(cn("text-red-500", "bg-blue-500")).toBe("text-red-500 bg-blue-500");+ });+});diff --git a/frontend/src/stores/__tests__/agent.test.ts b/frontend/src/stores/__tests__/agent.test.tsnew file mode 100644index 000000000..c610d7bf7--- /dev/null+++ b/frontend/src/stores/__tests__/agent.test.ts@@ -0,0 +1,236 @@+import { useAgentStore } from "../agent";+import { makeMessage, makeToolCall, resetFactories } from "@/tests/helpers/factories";++beforeEach(() => {+ useAgentStore.getState().reset();+ resetFactories();+});++describe("agent store — initial state", () => {+ it("has correct defaults", () => {+ const s = useAgentStore.getState();+ expect(s.messages).toEqual([]);+ expect(s.sessionId).toBeNull();+ expect(s.status).toBe("idle");+ expect(s.streamingText).toBe("");+ expect(s.streamingSessionId).toBeNull();+ expect(s.toolCalls).toEqual([]);+ expect(s.sseStatus).toBe("disconnected");+ expect(s.sseRetryAttempt).toBe(0);+ expect(s.sessionLoading).toBe(false);+ });+});++describe("addMessage", () => {+ it("appends a message with auto-generated id", () => {+ useAgentStore.getState().addMessage({ type: "answer", content: "hello", timestamp: Date.now() });+ const msgs = useAgentStore.getState().messages;+ expect(msgs).toHaveLength(1);+ expect(msgs[0].content).toBe("hello");+ expect(msgs[0].id).toBeTruthy();+ });++ it("preserves provided id", () => {+ useAgentStore.getState().addMessage(makeMessage({ id: "custom-id" }));+ expect(useAgentStore.getState().messages[0].id).toBe("custom-id");+ });++ it("accumulates multiple messages in order", () => {+ useAgentStore.getState().addMessage(makeMessage({ content: "first" }));+ useAgentStore.getState().addMessage(makeMessage({ content: "second" }));+ const msgs = useAgentStore.getState().messages;+ expect(msgs.map((m) => m.content)).toEqual(["first", "second"]);+ });+});++describe("appendDelta / clearStreaming", () => {+ it("accumulates streaming text", () => {+ const { appendDelta } = useAgentStore.getState();+ appendDelta("Hello ");+ appendDelta("World");+ expect(useAgentStore.getState().streamingText).toBe("Hello World");+ });++ it("clearStreaming resets to empty", () => {+ useAgentStore.getState().appendDelta("data");+ useAgentStore.getState().clearStreaming();+ expect(useAgentStore.getState().streamingText).toBe("");+ });+});++describe("setStatus", () => {+ it("sets status to streaming and records streamingSessionId", () => {+ const store = useAgentStore.getState();+ store.setSessionId("sess-1");+ store.setStatus("streaming");+ const s = useAgentStore.getState();+ expect(s.status).toBe("streaming");+ expect(s.streamingSessionId).toBe("sess-1");+ });++ it("clears streamingSessionId when status leaves streaming", () => {+ const store = useAgentStore.getState();+ store.setSessionId("sess-1");+ store.setStatus("streaming");+ store.setStatus("idle");+ const s = useAgentStore.getState();+ expect(s.streamingSessionId).toBeNull();+ });++ it("does not set streamingSessionId when sessionId is null", () => {+ useAgentStore.getState().setStatus("streaming");+ expect(useAgentStore.getState().streamingSessionId).toBeNull();+ });+});++describe("setSessionId / loadHistory", () => {+ it("sets session id", () => {+ useAgentStore.getState().setSessionId("abc");+ expect(useAgentStore.getState().sessionId).toBe("abc");+ });++ it("loadHistory replaces messages", () => {+ useAgentStore.getState().addMessage(makeMessage({ content: "old" }));+ const newMsgs = [makeMessage({ content: "new1" }), makeMessage({ content: "new2" })];+ useAgentStore.getState().loadHistory(newMsgs);+ expect(useAgentStore.getState().messages).toHaveLength(2);+ expect(useAgentStore.getState().messages[0].content).toBe("new1");+ });+});++describe("tool calls", () => {+ it("addToolCall appends entry", () => {+ const tc = makeToolCall({ tool: "run_backtest" });+ useAgentStore.getState().addToolCall(tc);+ expect(useAgentStore.getState().toolCalls).toHaveLength(1);+ expect(useAgentStore.getState().toolCalls[0].tool).toBe("run_backtest");+ });++ it("updateToolCall patches matching entry", () => {+ const tc = makeToolCall({ id: "tc-1", status: "running" });+ useAgentStore.getState().addToolCall(tc);+ useAgentStore.getState().updateToolCall("tc-1", { status: "ok", elapsed_ms: 500 });+ const updated = useAgentStore.getState().toolCalls[0];+ expect(updated.status).toBe("ok");+ expect(updated.elapsed_ms).toBe(500);+ });++ it("updateToolCall ignores non-matching id", () => {+ useAgentStore.getState().addToolCall(makeToolCall({ id: "tc-1" }));+ useAgentStore.getState().updateToolCall("nonexistent", { status: "error" });+ expect(useAgentStore.getState().toolCalls[0].status).toBe("running");+ });+});++describe("session cache", () => {+ it("caches and retrieves session messages", () => {+ const msgs = [makeMessage({ content: "cached" })];+ useAgentStore.getState().cacheSession("sess-1", msgs);+ const cached = useAgentStore.getState().getCachedSession("sess-1");+ expect(cached).toHaveLength(1);+ expect(cached![0].content).toBe("cached");+ });++ it("returns undefined for uncached session", () => {+ expect(useAgentStore.getState().getCachedSession("unknown")).toBeUndefined();+ });++ it("evicts oldest when cache exceeds SESSION_CACHE_MAX (5)", () => {+ for (let i = 1; i <= 6; i++) {+ useAgentStore.getState().cacheSession(`sess-${i}`, [makeMessage()]);+ }+ expect(useAgentStore.getState().getCachedSession("sess-1")).toBeUndefined();+ expect(useAgentStore.getState().getCachedSession("sess-6")).toBeDefined();+ });++ it("re-caching same key moves it to newest", () => {+ for (let i = 1; i <= 5; i++) {+ useAgentStore.getState().cacheSession(`sess-${i}`, [makeMessage()]);+ }+ // Re-cache sess-1 → now it's the newest+ useAgentStore.getState().cacheSession("sess-1", [makeMessage({ content: "refreshed" })]);+ // Add one more → sess-2 should be evicted (oldest)+ useAgentStore.getState().cacheSession("sess-6", [makeMessage()]);+ expect(useAgentStore.getState().getCachedSession("sess-2")).toBeUndefined();+ expect(useAgentStore.getState().getCachedSession("sess-1")).toBeDefined();+ });+});++describe("setSseStatus", () => {+ it("sets status and retry attempt", () => {+ useAgentStore.getState().setSseStatus("reconnecting", 3);+ const s = useAgentStore.getState();+ expect(s.sseStatus).toBe("reconnecting");+ expect(s.sseRetryAttempt).toBe(3);+ });++ it("defaults retryAttempt to 0", () => {+ useAgentStore.getState().setSseStatus("connected");+ expect(useAgentStore.getState().sseRetryAttempt).toBe(0);+ });+});++describe("switchSession", () => {+ it("sets new session, clears messages/status/toolCalls", () => {+ const store = useAgentStore.getState();+ store.addMessage(makeMessage());+ store.addToolCall(makeToolCall());+ store.appendDelta("streaming...");+ store.setStatus("streaming");++ store.switchSession("new-sess");+ const s = useAgentStore.getState();+ expect(s.sessionId).toBe("new-sess");+ expect(s.messages).toEqual([]);+ expect(s.toolCalls).toEqual([]);+ expect(s.streamingText).toBe("");+ expect(s.status).toBe("idle");+ expect(s.sessionLoading).toBe(true);+ });++ it("pre-loads messages when provided", () => {+ const msgs = [makeMessage({ content: "history" })];+ useAgentStore.getState().switchSession("s1", msgs);+ const s = useAgentStore.getState();+ expect(s.messages).toHaveLength(1);+ expect(s.sessionLoading).toBe(false);+ });++ it("preserves streamingSessionId from prior session", () => {+ const store = useAgentStore.getState();+ store.setSessionId("old-sess");+ store.setStatus("streaming");+ store.switchSession("new-sess");+ expect(useAgentStore.getState().streamingSessionId).toBe("old-sess");+ });+});++describe("setSessionLoading", () => {+ it("sets loading flag", () => {+ useAgentStore.getState().setSessionLoading(true);+ expect(useAgentStore.getState().sessionLoading).toBe(true);+ useAgentStore.getState().setSessionLoading(false);+ expect(useAgentStore.getState().sessionLoading).toBe(false);+ });+});++describe("reset", () => {+ it("returns store to initial state", () => {+ const store = useAgentStore.getState();+ store.addMessage(makeMessage());+ store.setSessionId("sess");+ store.appendDelta("data");+ store.addToolCall(makeToolCall());+ store.setSseStatus("connected");++ store.reset();+ const s = useAgentStore.getState();+ expect(s.messages).toEqual([]);+ expect(s.sessionId).toBeNull();+ expect(s.streamingText).toBe("");+ expect(s.toolCalls).toEqual([]);+ expect(s.status).toBe("idle");+ expect(s.streamingSessionId).toBeNull();+ expect(s.sessionLoading).toBe(false);+ });+});diff --git a/frontend/src/tests/helpers/factories.ts b/frontend/src/tests/helpers/factories.tsnew file mode 100644index 000000000..912f9ea0f--- /dev/null+++ b/frontend/src/tests/helpers/factories.ts@@ -0,0 +1,40 @@+import type { AgentMessage, ToolCallEntry } from "@/types/agent";++let _seq = 0;++export function makeMessage(overrides: Partial<AgentMessage> = {}): AgentMessage {+ return {+ id: `msg-${++_seq}`,+ type: "answer",+ content: "test content",+ timestamp: Date.now(),+ ...overrides,+ };+}++export function makeToolCall(overrides: Partial<ToolCallEntry> = {}): ToolCallEntry {+ return {+ id: `tc-${++_seq}`,+ tool: "bash",+ arguments: {},+ status: "running",+ timestamp: Date.now(),+ ...overrides,+ };+}++/** Minimal RunData shape for isReportWorthyRun tests */+type ReportWorthyInput = Parameters<typeof import("@/lib/runReports").isReportWorthyRun>[0];++export function makeRunData<T extends object = object>(overrides: T = {} as T): ReportWorthyInput {+ return {+ status: "done",+ run_id: `run-${++_seq}`,+ ...overrides,+ } as ReportWorthyInput;+}++/** Reset factory counters between test files */+export function resetFactories() {+ _seq = 0;+}diff --git a/frontend/src/tests/setup.ts b/frontend/src/tests/setup.tsnew file mode 100644index 000000000..58b819f3b--- /dev/null+++ b/frontend/src/tests/setup.ts@@ -0,0 +1,25 @@+import "@testing-library/jest-dom/vitest";++// ── Global mocks for jsdom ───────────────────────────────────++// jsdom doesn't implement ResizeObserver (ECharts + layout components need it)+globalThis.ResizeObserver = class {+ observe() {}+ unobserve() {}+ disconnect() {}+} as unknown as typeof ResizeObserver;++// jsdom doesn't implement matchMedia+Object.defineProperty(window, "matchMedia", {+ writable: true,+ value: (query: string) => ({+ matches: false,+ media: query,+ onchange: null,+ addListener: () => {},+ removeListener: () => {},+ addEventListener: () => {},+ removeEventListener: () => {},+ dispatchEvent: () => false,+ }),+});diff --git a/frontend/tsconfig.json b/frontend/tsconfig.jsonindex e7c7526bc..dc7a1b655 100644--- a/frontend/tsconfig.json+++ b/frontend/tsconfig.json@@ -15,6 +15,7 @@"noUnusedLocals": true,"noUnusedParameters": true,"noFallthroughCasesInSwitch": true,+ "types": ["vitest/globals"],"baseUrl": ".","paths": { "@/*": ["./src/*"] }},diff --git a/frontend/vitest.config.ts b/frontend/vitest.config.tsnew file mode 100644index 000000000..18e1c7ce4--- /dev/null+++ b/frontend/vitest.config.ts@@ -0,0 +1,23 @@+import { defineConfig } from "vitest/config";+import react from "@vitejs/plugin-react";+import path from "path";++export default defineConfig({+ plugins: [react()],+ resolve: {+ alias: { "@": path.resolve(__dirname, "./src") },+ },+ test: {+ globals: true,+ environment: "jsdom",+ setupFiles: ["./src/tests/setup.ts"],+ include: ["src/**/__tests__/**/*.test.{ts,tsx}"],+ coverage: {+ provider: "v8",+ reporter: ["text", "html", "lcov"],+ include: ["src/lib/**", "src/stores/**"],+ exclude: ["src/**/__tests__/**", "src/tests/**"],+ },+ restoreMocks: true,+ },+});diff --git a/pyproject.toml b/pyproject.tomlindex 2400286bc..0b272f629 100644--- a/pyproject.toml+++ b/pyproject.toml@@ -113,6 +113,24 @@ target-version = "py311"line-length = 120src = ["agent"]+[tool.coverage.run]+source = ["agent"]+omit = [+ "agent/tests/*",+ "agent/tests/**/*",+ "agent/**/__init__.py",+]++[tool.coverage.report]+show_missing = true+skip_empty = true+fail_under = 0+exclude_also = [+ "if __name__ == .__main__.",+ "raise NotImplementedError",+ "\\.\\.\\.",+]+[tool.ruff.lint]select = ["E", "F", "W"]ignore = ["E501"]