diff --git a/CHANGELOG.md b/CHANGELOG.md index c2759b460..93de02fe1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -34,6 +34,7 @@ All notable changes to Bambuddy will be documented in this file. ### Security - **Path-traversal hardening across the upload / import / file-write surface (routes + services); fifth CI backstop ships alongside** — A private path-traversal report against `POST /api/v1/projects/import/file` traced two attacker-controlled strings being joined to `library_dir` with no resolve + containment check: (a) `linked_folders[*].name` from the request's `project.json` ("Vector A" — an absolute path in this field collapsed `library_dir / "/anywhere"` to `Path("/anywhere")` because pathlib discards the left side when the right is absolute, letting the next `write_bytes` land anywhere the backend could write), and (b) per-entry `zf.namelist()` paths from the ZIP itself ("Vector B" — ZIP filenames carry `..` segments by spec and the join `library_dir / folder_name / relative_path` had no per-component check). Concrete escalation: drop a `.pth` file into the venv's `site-packages` directory for code execution on next service restart; overwrite the JWT signing-secret file to forge an admin token; overwrite `~/.ssh/authorized_keys` or `~/.bashrc` on native installs. **Fix is structural, not just patch the diff** (per [[feedback_dont_dismiss_preexisting]]). New `backend/app/utils/safe_path.py::safe_join_under(parent, *parts)` helper joins under a trusted parent, resolves both sides, asserts `is_relative_to(parent.resolve())`, and rejects up-front empty / null-byte / absolute path components. Wired into `import_project_file` at both vectors. **Adjacent fix from the routes audit**: `GET /api/v1/archives/{id}/photos/{filename}` had NO validation on `filename` and FileResponse-served arbitrary paths — the existing DELETE endpoint at least had a membership check against `archive.photos` (which is UUID-generated on upload), but GET shared neither the check nor any traversal guard. Both GET and DELETE now route through `safe_join_under` for defence-in-depth on top of the membership check. **Second adjacent fix from the services audit**: `ArchiveService.attach_timelapse(archive_id, data, filename)` in `backend/app/services/archive.py:1456` wrote `archive_dir / filename` where `filename` ultimately comes from either a printer's FTP listing (compromised-printer threat model — the printer is part of the trust surface) or the `?filename=...` query param on `POST /api/v1/archives/{id}/timelapse/select`. A malicious printer that returns a directory listing entry with `..` segments could write the timelapse bytes outside the archive directory; the `f.get("name") == filename` gate in the route did not prevent it because the gate is satisfied by whatever the printer claims is on disk. `attach_timelapse` now routes through `safe_join_under(..., http=False)` and returns `False` (logging the rejection) when the join would escape — matching the existing not-found contract of the function rather than raising 400 from inside a background task. **Audit sweep methodology**: AST-walked every Python file under `backend/app/api/routes/` AND `backend/app/services/` for `Path / Name` shapes (the exact shape that produced the original report). 25 additional route-layer sites and 8 additional service-layer sites confirmed safe case-by-case (UUID-generated filenames written by Bambuddy itself, `_safe_filename(...)` / `Path(arg).name` basename-stripped inputs, `os.walk`-discovered names, denylist + format-validated backup names, hardcoded constants iterated through a tuple, DB-stored paths whose write origin already goes through a resolved-and-containment-checked helper). Each safe site got a `# SEC-PATH-OK: ` marker so future audits can trust the inline guard at a glance. Six pre-existing safe-with-marker sites (`library.py` external upload, `archives.py` timelapse output, `projects.py` attachment download/delete, `settings.py` backup extractall) carry the same marker shape. **Fifth CI backstop** `test_route_path_arithmetic_is_safe_joined_or_marked` (`backend/tests/unit/test_no_unsafe_path_joins.py`) AST-walks every Python file in `backend/app/api/routes/` AND `backend/app/services/` and fails the build on any ` / ` join that doesn't either route through `safe_join_under` or carry the marker on the join line. Joins matching the higher-structure shapes (Attribute access, Subscript, f-string, `str(...)` call) are categorically different and out of scope — those are caught by the broader audit sweep, not the regression backstop. The services layer is in scope because it receives values from the routes verbatim AND from external sources Bambuddy has no control over (the printer FTP-listing case above). **Tests**: 17 unit tests for `safe_join_under` covering every escape vector (absolute path, Windows abs path, `..` segments, embedded `..`, null byte, empty string, no parts, non-str, plus legitimate nested-path round-trip); 4 integration tests against `POST /api/v1/projects/import/file` exercising the full FastAPI stack with the verbatim shape from the report (absolute path in `folder_name` → 400 + filesystem assertion that the target file doesn't exist; `..` in `folder_name` → 400; `..` in `relative_path` → 400; legitimate nested ZIP still imports cleanly to guard against the fix being over-strict); 3 unit tests against `ArchiveService.attach_timelapse` exercising the compromised-printer threat model (filename with `..` segments → returns False + no file at the escape target; absolute filename → returns False + no file at `/tmp`; legitimate `timelapse_YYYY-MM-DD_HH-MM-SS.mp4` → returns True + file lands inside archive_dir, guarding against the fix being over-strict). **SECURITY.md** gains a fifth rule + a fifth row in the CI-test mapping table; the rule explicitly names the printer FTP-listing case as in-scope to set the expectation for future services-layer audits. Full 5500+ test backend suite green; ruff clean. ### Fixed +- **Print-run log, spool usage history, camera-token list, and SpoolBuddy device "last calibrated" timestamps now render in the browser's local timezone instead of UTC (#1602, reported by @maziggy and confirmed by @IndividualGhost1905 with a UTC+3 reproduction)** — Reporter saw print-run completion timestamps show UTC clock values (e.g. `07:50` instead of the correct local `10:50` for Berlin / `10:50` instead of `13:50` for a UTC+3 host). Same shape as the #504 timezone-offset bug from Feb 2026 — frontend display helpers calling `new Date(isoString)` directly on backend timestamps without timezone indicators. Per ECMAScript, a bare `"2026-06-02T07:50:00"` is parsed as **local time**, so a UTC-stored value gets displayed as if its numeric components were already local — visually identical to UTC. The #504 fix patched 13 sites but missed four: PrintLogTable and SpoolUsageHistory hadn't been written yet; CameraTokensPage and SpoolBuddySettingsPage existed but were overlooked. **Fix** — replaced the bare `new Date(iso)` calls in `frontend/src/components/PrintLogTable.tsx::formatDate` (per-archive Runs list — the reporter's literal symptom), `frontend/src/components/SpoolUsageHistory.tsx::formatDate` (spool usage records), `frontend/src/pages/CameraTokensPage.tsx::formatDate` + `isExpired` (long-lived camera token created / expires / last-used columns), and `frontend/src/pages/spoolbuddy/SpoolBuddySettingsPage.tsx::formatDateTime` (SpoolBuddy device "last calibrated") with calls to the shared `parseUTCDate()` helper from `utils/date.ts`, which appends `Z` to naive ISO strings and parses TZ-tagged strings as-is — already used by every other date formatter in the codebase and well-tested (`parseUTCDate` has 4 dedicated test cases covering null/empty/tagged/naive inputs). `isExpired` in `CameraTokensPage.tsx` got the same treatment because comparing a misparsed Date against `Date.now()` would have produced false "not expired" / "expired" results around the TZ-offset boundary. **What this does NOT fix** — the printer-card ETA reporter #1 described (10:50 + 57m showing 09:48). That comes from `formatETA(status.remaining_time)` which is purely client-side (`new Date()` plus minutes from the WebSocket payload, then `toLocaleTimeString([])`); for it to render UTC the browser timezone itself would need to be UTC. That's a browser / OS config issue, not Bambuddy's display. If reporter #1 was actually looking at log timestamps (the same surface reporter #2 explicitly called out), this fix covers it; otherwise their ETA complaint stays a config matter. **Audit confirmed no other regressions** — grepped every `new Date(` call in `frontend/src/` for backend-supplied string arguments. Remaining call sites either pass a number (epoch ms from chart data — `AMSHistoryModal.tsx:327,349`), construct from a numeric date string only with no time component (chart axis labels — `FilamentTrends.tsx:57,129`), use the result only for `.getTime()` arithmetic where the same TZ offset cancels out (sort comparators in `StatsPage.tsx:920`, `ForecastPanel.tsx:101,111,112,141`, `FilamentTrends.tsx:70`), or already wrap in `parseUTCDate(...) || new Date(...)` as defensive fallback (`StatsPage.tsx:607,895`). `FailureDetectionSettings.tsx:359` uses `new Date(ev.timestamp)` directly but the backend (`obico_detection.py:293`) emits `datetime.now(timezone.utc).isoformat()` which includes a `+00:00` indicator so ECMAScript parses it as UTC correctly — unchanged. **No new tests added** — the four `formatDate` / `formatDateTime` helpers are local to their files and the bug is mechanical "use the existing helper"; `parseUTCDate` itself has full coverage in `__tests__/utils/date.test.ts`. Frontend build clean, ESLint zero output, full date-utils + impacted-component vitest suites (103 tests) green, i18n parity green at 5007 leaves × 9 locales. - **Archive card's Print Time + accuracy badge are now consistent for multi-run / multi-plate archives (#1608, reported via an AI-assisted diagnosis that included the failing SQL, file line numbers, and a worked example for archive #65)** — Reporter's case: 3-plate `.gcode.3mf` printed plate-by-plate over 9 runs. Card showed `1h 46m +188%` next to the now-correct `156.7g` / `$9.81`. The 1h 46m = 6364 s = one run's `completed_at − started_at`; the +188% = `print_time_seconds / 6364` − 100 % where `print_time_seconds` is 18354 s (the whole-file estimate the #1593 parser fix correctly stores). The two halves describe different scopes — apples-to-oranges. **Root cause** — `backend/app/api/routes/archives.py::compute_time_accuracy` (line 152) only inspects the archive row's own `started_at` / `completed_at`, which reflect the latest run, while `archive.print_time_seconds` is the sum across plates post-#1593. The existing 5-500 % sanity band catches truly broken values but lets the deterministic N×100% shape through (300% for a 3-plate file). `archive_to_response` calls `compute_time_accuracy` on every list / detail / search / project-archive / patch render (line 275), so the bad number reaches the frontend on every card surface. The stats endpoint (`/api/v1/archives/stats`, line 940-988) has its OWN per-run accuracy loop with a tighter 50-200 % band filter shipped with #1593 — that's untouched and stays correct. **Fix** — `compute_time_accuracy(archive, run_aggregate=None)` gains an optional `run_aggregate` argument. When `run_aggregate["run_count"] > 1`, both `actual_time_seconds` and `time_accuracy` are returned as `None`. The frontend already falls through to `archive.print_time_seconds` for the Time display (`archive.actual_time_seconds || archive.print_time_seconds`) and conditionally renders the badge only when `archive.time_accuracy` is truthy, so multi-run archives now show "Estimated 5h 6m" with no badge instead of "Actual 1h 46m +188%". Single-run archives — the case the badge was designed for, and the only case where one-run actual versus whole-file estimate is a meaningful ratio — keep the original behaviour verbatim. **Audit-wide** — `archive_to_response` now passes `run_aggregate` through to `compute_time_accuracy` at the response-conversion call site. The 3 endpoints that did NOT previously load run aggregates (`backend/app/api/routes/archives.py` search endpoint's pre-FTS fast path at line 583 and FTS path at line 610, the single-archive PATCH endpoint at line 1419, and `backend/app/api/routes/projects.py::list_project_archives` at line 706) now batch-load `_load_run_aggregates` and pass it through, so the badge-suppression applies on every card surface — not just the main list and detail endpoints. One extra `SELECT … GROUP BY archive_id` per endpoint (the helper is already batched), cheap. Per the [[feedback_pr_reviews_thorough]] HARD RULE the fix is shipped across every call site that renders an archive card. **What this does NOT change** — the stats endpoint's per-run accuracy aggregation at line 940-988, its 50-200% band filter, the `archive.started_at` / `completed_at` source-of-truth for the latest-run timestamps, the frontend `ArchivesPage.tsx:1004-1022` rendering logic, or the time-accuracy computation for single-run archives. Reprint scope is unchanged (the reporter's option A — comparing summed run durations against the whole-file estimate — was not pursued because it produces a different but equally misleading number for the reprints-of-a-single-plate-file shape, where sum-of-runs = N × estimate). **Tests** — `backend/tests/unit/test_archive_run_aggregation.py::TestComputeTimeAccuracyMultiRun`: 4 new direct unit tests for the function — single-run archive keeps original badge, no `run_aggregate` argument keeps original badge (defends the legacy caller pattern), multi-run archive (reporter's exact 9-run case) clears both fields, and `run_count: 0` edge case keeps original behaviour. Two new integration tests against the live archives list endpoint: `test_archive_list_suppresses_time_accuracy_for_multi_run_archives` is the #1608 regression (3-plate plate-by-plate fixture, asserts both `actual_time_seconds is None` and `time_accuracy is None` AND that the estimate `print_time_seconds` survives so the card has something to render), and `test_archive_list_keeps_time_accuracy_for_single_run_archives` is the sanity check that the badge still shows for the happy path. Full backend pytest 3680 passed under `-n 30`; ruff clean. **No frontend change required** — the existing rendering logic in `ArchivesPage.tsx:1004-1026` (`formatDuration(archive.actual_time_seconds || archive.print_time_seconds || 0)` for the time + `{archive.time_accuracy && …}` conditional badge) naturally produces the desired "show estimate, no badge" presentation when the backend returns null for both fields. - **Queue / Review / Archive virtual-printer modes now complete the TLS handshake on hardened-distro hosts (#1610, reported by an AI-assisted diagnosis)** — Reporter ran Bambuddy in a container on a hardened-policy host (Fedora / RHEL with `update-crypto-policies` or similar) and OrcaSlicer / BambuStudio failed to connect to any non-proxy-mode virtual printer with `code=-1` after the TCP handshake completed. Switching the same VP to Proxy mode worked. They grepped the container and pinpointed that the #620 cipher-suite fix only patched `tcp_proxy.py::_create_client_ssl_context` (printer-facing) and missed every other slicer-facing VP TLS context. Diagnosis confirmed: real Bambu printers (and slicer paths written to mimic them) offer only the plain-RSA AES-GCM suites `AES256-GCM-SHA384` / `AES128-GCM-SHA256`; on stock OpenSSL these stay in `DEFAULT`, but a system crypto policy that strips them leaves the server side offering ECDHE-only and the slicer's ClientHello finds no overlap — handshake aborts before any data flows. **Audit-wide fix (4 contexts patched, one regression test class per site)**: (a) `backend/app/services/virtual_printer/bind_server.py::_create_tls_context` (port 3002, used by Queue/Review/Archive modes — the literal reported failure) — added `ctx.set_ciphers("DEFAULT:AES256-GCM-SHA384:AES128-GCM-SHA256")`; (b) `backend/app/services/virtual_printer/mqtt_server.py::SimpleMQTTServer.start` (port 8883, slicer MQTT-over-TLS) — same cipher pin; (c) `backend/app/services/virtual_printer/tcp_proxy.py::TLSProxy._create_server_ssl_context` (slicer side of Proxy-mode 3002 — the #620 fix's *other* half that was never written) — same cipher pin; (d) `backend/app/services/virtual_printer/ftp_server.py::VirtualPrinterFTPServer.start` (port 990, FTPS upload) — changed from the historical `HIGH:!aNULL:!MD5:!RC4` to `HIGH:AES256-GCM-SHA384:AES128-GCM-SHA256:!aNULL:!MD5:!RC4`. The `HIGH` baseline is kept verbatim (not replaced with `DEFAULT`) so the cipher set stays a strict superset of what shipped before — the original `HIGH` set offers ~58 ciphers `DEFAULT` doesn't (CCM, ARIA, CAMELLIA, DSS variants); none are picked by any known Bambu slicer, but the [[feedback_dont_remove_compat_pinning]] HARD RULE says don't narrow a compat surface without proof. The `!aNULL:!MD5:!RC4` exclusions are preserved as well. For the three new contexts (a/b/c), the cipher string is `DEFAULT:AES256-GCM-SHA384:AES128-GCM-SHA256` — verbatim match with the #620 client-side fix. **Verified strict-superset** at audit time (`{c['name'] for c in old.get_ciphers()}.issubset({c['name'] for c in new.get_ciphers()})` returns True for all four call sites). Per the [[feedback_vp_regression_matrix]] HARD RULE, the slicer-facing TLS surface gets the fix in one drop instead of a per-mode-per-issue ticket trail. Per [[feedback_dont_remove_compat_pinning]], the `minimum_version = TLSv1_2` and the FTPS `maximum_version = TLSv1_2` pins (the BambuStudio FTPS-data-channel-PSK-reuse compat) are unchanged — only the cipher list is widened, never narrowed. **Tests** (`backend/tests/unit/test_vp_tls_ciphers.py`, new file): 5 cases — one per slicer-facing surface (bind / mqtt / proxy-server / ftp) asserting `AES256-GCM-SHA384` AND `AES128-GCM-SHA256` are in the SSL context's offered cipher list, plus a guard test that the original #620 client-side `tcp_proxy._create_client_ssl_context` still has them so this audit's edits can't accidentally regress that fix. Cipher assertions use the production `CertificateService` to generate a real self-signed CA + per-VP cert pair into `tmp_path` (rather than mocking `load_cert_chain`) so the SSL contexts are configured exactly as production would. Full backend unit suite 3674 passed under `-n 30`; ruff clean. **Why neither maintainer nor the local CI box reproduces the bug**: stock OpenSSL 3.x ships `AES256-GCM-SHA384` / `AES128-GCM-SHA256` in `DEFAULT` already, so the missing `set_ciphers()` calls were harmless on most builds — verifiable with `python -c "import ssl; print(c['name'] for c in ssl.SSLContext().get_ciphers())"`. The bug only manifests on builds where a system crypto policy or vendor build flag narrows the default to forward-secrecy-only. The explicit cipher pins now survive any such narrowing. **What this does NOT do**: the printer-side TLS surface (proxy client context, MQTT printer-client context in `bambu_mqtt.py`) is unchanged — printers always sit behind the unfiltered #620 client pin, and there's no equivalent failure mode reported there. - **External-spool usage is now tracked when the AMS has empty slots in between loaded ones (#1607, reported by @ahmtcnby)** — Reporter had AMS slots 0–2 loaded, slot 3 empty, and an external spool. After every multi-filament print, the external's weight never decremented; assigning the external spool to the empty AMS slot 3 in Bambuddy made the deduction appear correctly. Root cause: when no explicit slot-to-tray mapping is available (path 5 of 6 in `usage_tracker.py::_track_from_3mf`, e.g. the very first print after a fresh container start before the request-topic subscription that captures `ams_mapping` from `print_command` is accepted — the bundle showed `Request topic subscription accepted. ams_mapping capture enabled` only fired at 19:36:29), the tracker falls back to a position-based mapping built from `spoolman_tracking.py::build_ams_tray_lookup`. That helper enumerated every AMS tray by `id` regardless of whether a spool was loaded, so the reporter's layout yielded `available_trays = [0, 1, 2, 3, 254]`. BambuStudio / OrcaSlicer compact their filament-assignment UI by hiding unloaded AMS slots — the slicer's 4th filament is the external, so the 3MF carries slot_ids 1–4 with slot 4 = external. Position-based mapping then routed slot 4 → `available_trays[3]` = AMS0-T3 (the empty slot) instead of 254 (the external). No spool assignment exists at AMS0-T3, so usage was silently skipped at line 1273-1274 and the external spool's weight stayed unchanged. **Fix** (`backend/app/services/usage_tracker.py:1232-1245`): the position-based fallback now filters `build_ams_tray_lookup`'s output to slots whose `tray_type` is non-empty before sorting. `build_ams_tray_lookup` itself is unchanged (its other callers — `spoolman_tracking.store_print_data`, `routes/printers`, `spool_assignment_notifications` — want every physical slot for AMS-state purposes); the filter is applied at the call site so we only narrow what the fallback uses. vt_tray entries are already filtered the same way inside `build_ams_tray_lookup` at line 174 (`if vt.get("tray_type"):`) — this mirrors that behaviour for the AMS side. **Why the reporter's workaround helped**: assigning the external spool to AMS0-T3 in Bambuddy made the wrong-target rewrite accidentally land on the right spool — the empty AMS slot resolved to the same spool the external was fed from. The fix removes the need for that workaround. **Tests**: 2 new in `backend/tests/unit/test_usage_tracker.py::TestPositionBasedFallbackEmptyAmsSlot` — `test_external_routed_correctly_when_ams_has_empty_middle_slot` is the literal #1607 regression (3 AMS slots loaded + 1 empty + external loaded, slicer's slot 4 must charge spool at AMS255-T0, **must NOT** charge anything at AMS0-T3 — explicit `(0, 3) not in handled_trays` assertion); `test_dense_ams_unchanged_no_empty_slots` is the no-empty-slots sanity check that confirms the fix doesn't regress the everyday case (4 AMS slots all loaded + external → slot 5 still maps to external). Path priority order unchanged: explicit `print_cmd` / MQTT / queue / color-match mappings still override the position-based fallback, so this only changes behaviour when none of those paths fired. Full backend pytest 3669 passed under `-n 30`; ruff clean. diff --git a/frontend/src/components/PrintLogTable.tsx b/frontend/src/components/PrintLogTable.tsx index dc8d55ae4..2ed572e04 100644 --- a/frontend/src/components/PrintLogTable.tsx +++ b/frontend/src/components/PrintLogTable.tsx @@ -2,6 +2,7 @@ import { useQuery } from '@tanstack/react-query'; import { useTranslation } from 'react-i18next'; import { Loader2 } from 'lucide-react'; import { api } from '../api/client'; +import { parseUTCDate } from '../utils/date'; interface PrintLogTableProps { archiveId: number; @@ -17,8 +18,8 @@ function formatDuration(seconds: number | null): string { function formatDate(isoString: string | null): string { if (!isoString) return '—'; - const d = new Date(isoString); - return d.toLocaleString(); + const d = parseUTCDate(isoString); + return d ? d.toLocaleString() : '—'; } export function PrintLogTable({ archiveId }: PrintLogTableProps) { diff --git a/frontend/src/components/SpoolUsageHistory.tsx b/frontend/src/components/SpoolUsageHistory.tsx index 3bce2f318..dc6581c6b 100644 --- a/frontend/src/components/SpoolUsageHistory.tsx +++ b/frontend/src/components/SpoolUsageHistory.tsx @@ -5,8 +5,10 @@ import { api } from '../api/client'; import type { SpoolUsageRecord } from '../api/client'; import { Button } from './Button'; import { useToast } from '../contexts/ToastContext'; +import { parseUTCDate } from '../utils/date'; function formatDate(dateStr: string): string { - const date = new Date(dateStr); + const date = parseUTCDate(dateStr); + if (!date) return ''; return date.toLocaleDateString('en-GB', { day: '2-digit', month: '2-digit', year: '2-digit' }) + ' ' + date.toLocaleTimeString('en-GB', { hour: '2-digit', minute: '2-digit' }); } diff --git a/frontend/src/pages/CameraTokensPage.tsx b/frontend/src/pages/CameraTokensPage.tsx index d3518c829..5d389189b 100644 --- a/frontend/src/pages/CameraTokensPage.tsx +++ b/frontend/src/pages/CameraTokensPage.tsx @@ -21,18 +21,20 @@ import { Copy, Plus, Trash2, AlertTriangle } from 'lucide-react'; import { api, type LongLivedCameraToken } from '../api/client'; import { useToast } from '../contexts/ToastContext'; import { useAuth } from '../contexts/AuthContext'; +import { parseUTCDate } from '../utils/date'; const DEFAULT_LIFETIME_DAYS = 90; const MAX_LIFETIME_DAYS = 365; function formatDate(iso: string | null): string { if (!iso) return '—'; - const d = new Date(iso); - return d.toLocaleString(); + const d = parseUTCDate(iso); + return d ? d.toLocaleString() : '—'; } function isExpired(iso: string): boolean { - return new Date(iso).getTime() < Date.now(); + const d = parseUTCDate(iso); + return d ? d.getTime() < Date.now() : false; } interface CreateTokenFormProps { diff --git a/frontend/src/pages/spoolbuddy/SpoolBuddySettingsPage.tsx b/frontend/src/pages/spoolbuddy/SpoolBuddySettingsPage.tsx index bdf68ce59..98756aef0 100644 --- a/frontend/src/pages/spoolbuddy/SpoolBuddySettingsPage.tsx +++ b/frontend/src/pages/spoolbuddy/SpoolBuddySettingsPage.tsx @@ -6,6 +6,7 @@ import type { SpoolBuddyOutletContext } from '../../components/spoolbuddy/SpoolB import { spoolbuddyApi, type SpoolBuddyDevice } from '../../api/client'; import { DiagnosticModal } from '../../components/spoolbuddy/DiagnosticModal'; import { FileText, Wand2, Zap } from 'lucide-react'; +import { parseUTCDate } from '../../utils/date'; function formatUptime(seconds: number): string { @@ -18,13 +19,10 @@ function formatUptime(seconds: number): string { function formatDateTime(iso: string | null): string { if (!iso) return '-'; - try { - const d = new Date(iso); - return d.toLocaleDateString(undefined, { month: 'short', day: 'numeric' }) + ' ' + - d.toLocaleTimeString(undefined, { hour: '2-digit', minute: '2-digit' }); - } catch { - return '-'; - } + const d = parseUTCDate(iso); + if (!d) return '-'; + return d.toLocaleDateString(undefined, { month: 'short', day: 'numeric' }) + ' ' + + d.toLocaleTimeString(undefined, { hour: '2-digit', minute: '2-digit' }); } const BLANK_OPTIONS = [ diff --git a/static/assets/index-BuuCTvNJ.js b/static/assets/index-DLXkorBx.js similarity index 94% rename from static/assets/index-BuuCTvNJ.js rename to static/assets/index-DLXkorBx.js index 1f79e2318..34f09d5a5 100644 --- a/static/assets/index-BuuCTvNJ.js +++ b/static/assets/index-DLXkorBx.js @@ -1,12 +1,12 @@ -function ime(t,e){for(var a=0;ar[i]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const o of s.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function a(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerPolicy&&(s.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?s.credentials="include":i.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(i){if(i.ep)return;i.ep=!0;const s=a(i);fetch(i.href,s)}})();var T_=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Fc(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var rE={exports:{}},a0={};var AH;function sme(){if(AH)return a0;AH=1;var t=Symbol.for("react.transitional.element"),e=Symbol.for("react.fragment");function a(r,i,s){var o=null;if(s!==void 0&&(o=""+s),i.key!==void 0&&(o=""+i.key),"key"in i){s={};for(var l in i)l!=="key"&&(s[l]=i[l])}else s=i;return i=s.ref,{$$typeof:t,type:r,key:o,ref:i!==void 0?i:null,props:s}}return a0.Fragment=e,a0.jsx=a,a0.jsxs=a,a0}var jH;function ome(){return jH||(jH=1,rE.exports=sme()),rE.exports}var n=ome(),iE={exports:{}},Ka={};var MH;function lme(){if(MH)return Ka;MH=1;var t=Symbol.for("react.transitional.element"),e=Symbol.for("react.portal"),a=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),s=Symbol.for("react.consumer"),o=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),d=Symbol.for("react.memo"),u=Symbol.for("react.lazy"),m=Symbol.for("react.activity"),p=Symbol.iterator;function f(Y){return Y===null||typeof Y!="object"?null:(Y=p&&Y[p]||Y["@@iterator"],typeof Y=="function"?Y:null)}var g={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},v=Object.assign,b={};function x(Y,re,pe){this.props=Y,this.context=re,this.refs=b,this.updater=pe||g}x.prototype.isReactComponent={},x.prototype.setState=function(Y,re){if(typeof Y!="object"&&typeof Y!="function"&&Y!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,Y,re,"setState")},x.prototype.forceUpdate=function(Y){this.updater.enqueueForceUpdate(this,Y,"forceUpdate")};function S(){}S.prototype=x.prototype;function k(Y,re,pe){this.props=Y,this.context=re,this.refs=b,this.updater=pe||g}var C=k.prototype=new S;C.constructor=k,v(C,x.prototype),C.isPureReactComponent=!0;var P=Array.isArray;function T(){}var j={H:null,A:null,T:null,S:null},F=Object.prototype.hasOwnProperty;function N(Y,re,pe){var me=pe.ref;return{$$typeof:t,type:Y,key:re,ref:me!==void 0?me:null,props:pe}}function D(Y,re){return N(Y.type,re,Y.props)}function R(Y){return typeof Y=="object"&&Y!==null&&Y.$$typeof===t}function B(Y){var re={"=":"=0",":":"=2"};return"$"+Y.replace(/[=:]/g,function(pe){return re[pe]})}var z=/\/+/g;function L(Y,re){return typeof Y=="object"&&Y!==null&&Y.key!=null?B(""+Y.key):re.toString(36)}function Q(Y){switch(Y.status){case"fulfilled":return Y.value;case"rejected":throw Y.reason;default:switch(typeof Y.status=="string"?Y.then(T,T):(Y.status="pending",Y.then(function(re){Y.status==="pending"&&(Y.status="fulfilled",Y.value=re)},function(re){Y.status==="pending"&&(Y.status="rejected",Y.reason=re)})),Y.status){case"fulfilled":return Y.value;case"rejected":throw Y.reason}}throw Y}function ee(Y,re,pe,me,be){var H=typeof Y;(H==="undefined"||H==="boolean")&&(Y=null);var J=!1;if(Y===null)J=!0;else switch(H){case"bigint":case"string":case"number":J=!0;break;case"object":switch(Y.$$typeof){case t:case e:J=!0;break;case u:return J=Y._init,ee(J(Y._payload),re,pe,me,be)}}if(J)return be=be(Y),J=me===""?"."+L(Y,0):me,P(be)?(pe="",J!=null&&(pe=J.replace(z,"$&/")+"/"),ee(be,re,pe,"",function(q){return q})):be!=null&&(R(be)&&(be=D(be,pe+(be.key==null||Y&&Y.key===be.key?"":(""+be.key).replace(z,"$&/")+"/")+J)),re.push(be)),1;J=0;var A=me===""?".":me+":";if(P(Y))for(var M=0;M>>1,ue=ee[de];if(0>>1;dei(pe,ce))mei(be,pe)?(ee[de]=be,ee[me]=ce,de=me):(ee[de]=pe,ee[re]=ce,de=re);else if(mei(be,ce))ee[de]=be,ee[me]=ce,de=me;else break e}}return Z}function i(ee,Z){var ce=ee.sortIndex-Z.sortIndex;return ce!==0?ce:ee.id-Z.id}if(t.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var s=performance;t.unstable_now=function(){return s.now()}}else{var o=Date,l=o.now();t.unstable_now=function(){return o.now()-l}}var c=[],d=[],u=1,m=null,p=3,f=!1,g=!1,v=!1,b=!1,x=typeof setTimeout=="function"?setTimeout:null,S=typeof clearTimeout=="function"?clearTimeout:null,k=typeof setImmediate<"u"?setImmediate:null;function C(ee){for(var Z=a(d);Z!==null;){if(Z.callback===null)r(d);else if(Z.startTime<=ee)r(d),Z.sortIndex=Z.expirationTime,e(c,Z);else break;Z=a(d)}}function P(ee){if(v=!1,C(ee),!g)if(a(c)!==null)g=!0,T||(T=!0,B());else{var Z=a(d);Z!==null&&Q(P,Z.startTime-ee)}}var T=!1,j=-1,F=5,N=-1;function D(){return b?!0:!(t.unstable_now()-Nee&&D());){var de=m.callback;if(typeof de=="function"){m.callback=null,p=m.priorityLevel;var ue=de(m.expirationTime<=ee);if(ee=t.unstable_now(),typeof ue=="function"){m.callback=ue,C(ee),Z=!0;break t}m===a(c)&&r(c),C(ee)}else r(c);m=a(c)}if(m!==null)Z=!0;else{var Y=a(d);Y!==null&&Q(P,Y.startTime-ee),Z=!1}}break e}finally{m=null,p=ce,f=!1}Z=void 0}}finally{Z?B():T=!1}}}var B;if(typeof k=="function")B=function(){k(R)};else if(typeof MessageChannel<"u"){var z=new MessageChannel,L=z.port2;z.port1.onmessage=R,B=function(){L.postMessage(null)}}else B=function(){x(R,0)};function Q(ee,Z){j=x(function(){ee(t.unstable_now())},Z)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(ee){ee.callback=null},t.unstable_forceFrameRate=function(ee){0>ee||125de?(ee.sortIndex=ce,e(d,ee),a(c)===null&&ee===a(d)&&(v?(S(j),j=-1):v=!0,Q(P,ce-de))):(ee.sortIndex=ue,e(c,ee),g||f||(g=!0,T||(T=!0,B()))),ee},t.unstable_shouldYield=D,t.unstable_wrapCallback=function(ee){var Z=p;return function(){var ce=p;p=Z;try{return ee.apply(this,arguments)}finally{p=ce}}}})(lE)),lE}var FH;function ume(){return FH||(FH=1,oE.exports=dme()),oE.exports}var cE={exports:{}},Hs={};var LH;function mme(){if(LH)return Hs;LH=1;var t=ob();function e(c){var d="https://react.dev/errors/"+c;if(1"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(e){console.error(e)}}return t(),cE.exports=mme(),cE.exports}var IH;function pme(){if(IH)return n0;IH=1;var t=ume(),e=ob(),a=eZ();function r(h){var w="https://react.dev/errors/"+h;if(1ue||(h.current=de[ue],de[ue]=null,ue--)}function pe(h,w){ue++,de[ue]=h.current,h.current=w}var me=Y(null),be=Y(null),H=Y(null),J=Y(null);function A(h,w){switch(pe(H,w),pe(be,h),pe(me,null),w.nodeType){case 9:case 11:h=(h=w.documentElement)&&(h=h.namespaceURI)?Zq(h):0;break;default:if(h=w.tagName,w=w.namespaceURI)w=Zq(w),h=Jq(w,h);else switch(h){case"svg":h=1;break;case"math":h=2;break;default:h=0}}re(me),pe(me,h)}function M(){re(me),re(be),re(H)}function q(h){h.memoizedState!==null&&pe(J,h);var w=me.current,_=Jq(w,h.type);w!==_&&(pe(be,h),pe(me,_))}function W(h){be.current===h&&(re(me),re(be)),J.current===h&&(re(J),Zv._currentValue=ce)}var U,se;function O(h){if(U===void 0)try{throw Error()}catch(_){var w=_.stack.trim().match(/\n( *(at )?)/);U=w&&w[1]||"",se=-1<_.stack.indexOf(` +function ime(t,e){for(var a=0;ar[i]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const o of s.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function a(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerPolicy&&(s.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?s.credentials="include":i.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(i){if(i.ep)return;i.ep=!0;const s=a(i);fetch(i.href,s)}})();var T_=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Fc(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var rE={exports:{}},a0={};var AH;function sme(){if(AH)return a0;AH=1;var t=Symbol.for("react.transitional.element"),e=Symbol.for("react.fragment");function a(r,i,s){var o=null;if(s!==void 0&&(o=""+s),i.key!==void 0&&(o=""+i.key),"key"in i){s={};for(var l in i)l!=="key"&&(s[l]=i[l])}else s=i;return i=s.ref,{$$typeof:t,type:r,key:o,ref:i!==void 0?i:null,props:s}}return a0.Fragment=e,a0.jsx=a,a0.jsxs=a,a0}var jH;function ome(){return jH||(jH=1,rE.exports=sme()),rE.exports}var n=ome(),iE={exports:{}},Qa={};var MH;function lme(){if(MH)return Qa;MH=1;var t=Symbol.for("react.transitional.element"),e=Symbol.for("react.portal"),a=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),s=Symbol.for("react.consumer"),o=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),d=Symbol.for("react.memo"),u=Symbol.for("react.lazy"),m=Symbol.for("react.activity"),p=Symbol.iterator;function f(Y){return Y===null||typeof Y!="object"?null:(Y=p&&Y[p]||Y["@@iterator"],typeof Y=="function"?Y:null)}var g={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},v=Object.assign,b={};function x(Y,re,pe){this.props=Y,this.context=re,this.refs=b,this.updater=pe||g}x.prototype.isReactComponent={},x.prototype.setState=function(Y,re){if(typeof Y!="object"&&typeof Y!="function"&&Y!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,Y,re,"setState")},x.prototype.forceUpdate=function(Y){this.updater.enqueueForceUpdate(this,Y,"forceUpdate")};function S(){}S.prototype=x.prototype;function k(Y,re,pe){this.props=Y,this.context=re,this.refs=b,this.updater=pe||g}var C=k.prototype=new S;C.constructor=k,v(C,x.prototype),C.isPureReactComponent=!0;var P=Array.isArray;function T(){}var j={H:null,A:null,T:null,S:null},F=Object.prototype.hasOwnProperty;function N(Y,re,pe){var me=pe.ref;return{$$typeof:t,type:Y,key:re,ref:me!==void 0?me:null,props:pe}}function D(Y,re){return N(Y.type,re,Y.props)}function R(Y){return typeof Y=="object"&&Y!==null&&Y.$$typeof===t}function B(Y){var re={"=":"=0",":":"=2"};return"$"+Y.replace(/[=:]/g,function(pe){return re[pe]})}var z=/\/+/g;function L(Y,re){return typeof Y=="object"&&Y!==null&&Y.key!=null?B(""+Y.key):re.toString(36)}function Q(Y){switch(Y.status){case"fulfilled":return Y.value;case"rejected":throw Y.reason;default:switch(typeof Y.status=="string"?Y.then(T,T):(Y.status="pending",Y.then(function(re){Y.status==="pending"&&(Y.status="fulfilled",Y.value=re)},function(re){Y.status==="pending"&&(Y.status="rejected",Y.reason=re)})),Y.status){case"fulfilled":return Y.value;case"rejected":throw Y.reason}}throw Y}function ee(Y,re,pe,me,be){var H=typeof Y;(H==="undefined"||H==="boolean")&&(Y=null);var J=!1;if(Y===null)J=!0;else switch(H){case"bigint":case"string":case"number":J=!0;break;case"object":switch(Y.$$typeof){case t:case e:J=!0;break;case u:return J=Y._init,ee(J(Y._payload),re,pe,me,be)}}if(J)return be=be(Y),J=me===""?"."+L(Y,0):me,P(be)?(pe="",J!=null&&(pe=J.replace(z,"$&/")+"/"),ee(be,re,pe,"",function(q){return q})):be!=null&&(R(be)&&(be=D(be,pe+(be.key==null||Y&&Y.key===be.key?"":(""+be.key).replace(z,"$&/")+"/")+J)),re.push(be)),1;J=0;var A=me===""?".":me+":";if(P(Y))for(var M=0;M>>1,ue=ee[de];if(0>>1;dei(pe,ce))mei(be,pe)?(ee[de]=be,ee[me]=ce,de=me):(ee[de]=pe,ee[re]=ce,de=re);else if(mei(be,ce))ee[de]=be,ee[me]=ce,de=me;else break e}}return Z}function i(ee,Z){var ce=ee.sortIndex-Z.sortIndex;return ce!==0?ce:ee.id-Z.id}if(t.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var s=performance;t.unstable_now=function(){return s.now()}}else{var o=Date,l=o.now();t.unstable_now=function(){return o.now()-l}}var c=[],d=[],u=1,m=null,p=3,f=!1,g=!1,v=!1,b=!1,x=typeof setTimeout=="function"?setTimeout:null,S=typeof clearTimeout=="function"?clearTimeout:null,k=typeof setImmediate<"u"?setImmediate:null;function C(ee){for(var Z=a(d);Z!==null;){if(Z.callback===null)r(d);else if(Z.startTime<=ee)r(d),Z.sortIndex=Z.expirationTime,e(c,Z);else break;Z=a(d)}}function P(ee){if(v=!1,C(ee),!g)if(a(c)!==null)g=!0,T||(T=!0,B());else{var Z=a(d);Z!==null&&Q(P,Z.startTime-ee)}}var T=!1,j=-1,F=5,N=-1;function D(){return b?!0:!(t.unstable_now()-Nee&&D());){var de=m.callback;if(typeof de=="function"){m.callback=null,p=m.priorityLevel;var ue=de(m.expirationTime<=ee);if(ee=t.unstable_now(),typeof ue=="function"){m.callback=ue,C(ee),Z=!0;break t}m===a(c)&&r(c),C(ee)}else r(c);m=a(c)}if(m!==null)Z=!0;else{var Y=a(d);Y!==null&&Q(P,Y.startTime-ee),Z=!1}}break e}finally{m=null,p=ce,f=!1}Z=void 0}}finally{Z?B():T=!1}}}var B;if(typeof k=="function")B=function(){k(R)};else if(typeof MessageChannel<"u"){var z=new MessageChannel,L=z.port2;z.port1.onmessage=R,B=function(){L.postMessage(null)}}else B=function(){x(R,0)};function Q(ee,Z){j=x(function(){ee(t.unstable_now())},Z)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(ee){ee.callback=null},t.unstable_forceFrameRate=function(ee){0>ee||125de?(ee.sortIndex=ce,e(d,ee),a(c)===null&&ee===a(d)&&(v?(S(j),j=-1):v=!0,Q(P,ce-de))):(ee.sortIndex=ue,e(c,ee),g||f||(g=!0,T||(T=!0,B()))),ee},t.unstable_shouldYield=D,t.unstable_wrapCallback=function(ee){var Z=p;return function(){var ce=p;p=Z;try{return ee.apply(this,arguments)}finally{p=ce}}}})(lE)),lE}var FH;function ume(){return FH||(FH=1,oE.exports=dme()),oE.exports}var cE={exports:{}},Hs={};var LH;function mme(){if(LH)return Hs;LH=1;var t=ob();function e(c){var d="https://react.dev/errors/"+c;if(1"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(e){console.error(e)}}return t(),cE.exports=mme(),cE.exports}var IH;function pme(){if(IH)return n0;IH=1;var t=ume(),e=ob(),a=eZ();function r(h){var w="https://react.dev/errors/"+h;if(1ue||(h.current=de[ue],de[ue]=null,ue--)}function pe(h,w){ue++,de[ue]=h.current,h.current=w}var me=Y(null),be=Y(null),H=Y(null),J=Y(null);function A(h,w){switch(pe(H,w),pe(be,h),pe(me,null),w.nodeType){case 9:case 11:h=(h=w.documentElement)&&(h=h.namespaceURI)?Zq(h):0;break;default:if(h=w.tagName,w=w.namespaceURI)w=Zq(w),h=Jq(w,h);else switch(h){case"svg":h=1;break;case"math":h=2;break;default:h=0}}re(me),pe(me,h)}function M(){re(me),re(be),re(H)}function q(h){h.memoizedState!==null&&pe(J,h);var w=me.current,_=Jq(w,h.type);w!==_&&(pe(be,h),pe(me,_))}function W(h){be.current===h&&(re(me),re(be)),J.current===h&&(re(J),Zv._currentValue=ce)}var U,se;function O(h){if(U===void 0)try{throw Error()}catch(_){var w=_.stack.trim().match(/\n( *(at )?)/);U=w&&w[1]||"",se=-1<_.stack.indexOf(` at`)?" ()":-1<_.stack.indexOf("@")?"@unknown:0:0":""}return` `+U+h+se}var $=!1;function K(h,w){if(!h||$)return"";$=!0;var _=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var E={DetermineComponentFrameRoot:function(){try{if(w){var Gt=function(){throw Error()};if(Object.defineProperty(Gt.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Gt,[])}catch(Bt){var Lt=Bt}Reflect.construct(h,[],Gt)}else{try{Gt.call()}catch(Bt){Lt=Bt}h.call(Gt.prototype)}}else{try{throw Error()}catch(Bt){Lt=Bt}(Gt=h())&&typeof Gt.catch=="function"&&Gt.catch(function(){})}}catch(Bt){if(Bt&&Lt&&typeof Bt.stack=="string")return[Bt.stack,Lt.stack]}return[null,null]}};E.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var G=Object.getOwnPropertyDescriptor(E.DetermineComponentFrameRoot,"name");G&&G.configurable&&Object.defineProperty(E.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var te=E.DetermineComponentFrameRoot(),we=te[0],qe=te[1];if(we&&qe){var mt=we.split(` `),Et=qe.split(` `);for(G=E=0;EG||mt[E]!==Et[G]){var Ht=` `+mt[E].replace(" at new "," at ");return h.displayName&&Ht.includes("")&&(Ht=Ht.replace("",h.displayName)),Ht}while(1<=E&&0<=G);break}}}finally{$=!1,Error.prepareStackTrace=_}return(_=h?h.displayName||h.name:"")?O(_):""}function X(h,w){switch(h.tag){case 26:case 27:case 5:return O(h.type);case 16:return O("Lazy");case 13:return h.child!==w&&w!==null?O("Suspense Fallback"):O("Suspense");case 19:return O("SuspenseList");case 0:case 15:return K(h.type,!1);case 11:return K(h.type.render,!1);case 1:return K(h.type,!0);case 31:return O("Activity");default:return""}}function ie(h){try{var w="",_=null;do w+=X(h,_),_=h,h=h.return;while(h);return w}catch(E){return` Error generating stack: `+E.message+` -`+E.stack}}var oe=Object.prototype.hasOwnProperty,he=t.unstable_scheduleCallback,le=t.unstable_cancelCallback,fe=t.unstable_shouldYield,V=t.unstable_requestPaint,I=t.unstable_now,ae=t.unstable_getCurrentPriorityLevel,ge=t.unstable_ImmediatePriority,xe=t.unstable_UserBlockingPriority,ve=t.unstable_NormalPriority,je=t.unstable_LowPriority,Me=t.unstable_IdlePriority,Se=t.log,Ue=t.unstable_setDisableYieldValue,_e=null,Ie=null;function Fe(h){if(typeof Se=="function"&&Ue(h),Ie&&typeof Ie.setStrictMode=="function")try{Ie.setStrictMode(_e,h)}catch{}}var He=Math.clz32?Math.clz32:Le,ze=Math.log,it=Math.LN2;function Le(h){return h>>>=0,h===0?32:31-(ze(h)/it|0)|0}var st=256,Te=262144,Xe=4194304;function Ve(h){var w=h&42;if(w!==0)return w;switch(h&-h){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return h&261888;case 262144:case 524288:case 1048576:case 2097152:return h&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return h&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return h}}function Ce(h,w,_){var E=h.pendingLanes;if(E===0)return 0;var G=0,te=h.suspendedLanes,we=h.pingedLanes;h=h.warmLanes;var qe=E&134217727;return qe!==0?(E=qe&~te,E!==0?G=Ve(E):(we&=qe,we!==0?G=Ve(we):_||(_=qe&~h,_!==0&&(G=Ve(_))))):(qe=E&~te,qe!==0?G=Ve(qe):we!==0?G=Ve(we):_||(_=E&~h,_!==0&&(G=Ve(_)))),G===0?0:w!==0&&w!==G&&(w&te)===0&&(te=G&-G,_=w&-w,te>=_||te===32&&(_&4194048)!==0)?w:G}function Oe(h,w){return(h.pendingLanes&~(h.suspendedLanes&~h.pingedLanes)&w)===0}function et(h,w){switch(h){case 1:case 2:case 4:case 8:case 64:return w+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return w+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function We(){var h=Xe;return Xe<<=1,(Xe&62914560)===0&&(Xe=4194304),h}function Ae(h){for(var w=[],_=0;31>_;_++)w.push(h);return w}function at(h,w){h.pendingLanes|=w,w!==268435456&&(h.suspendedLanes=0,h.pingedLanes=0,h.warmLanes=0)}function nt(h,w,_,E,G,te){var we=h.pendingLanes;h.pendingLanes=_,h.suspendedLanes=0,h.pingedLanes=0,h.warmLanes=0,h.expiredLanes&=_,h.entangledLanes&=_,h.errorRecoveryDisabledLanes&=_,h.shellSuspendCounter=0;var qe=h.entanglements,mt=h.expirationTimes,Et=h.hiddenUpdates;for(_=we&~_;0<_;){var Ht=31-He(_),Gt=1<"u")return null;try{return h.activeElement||h.body}catch{return h.body}}var zn=/[\n"\\]/g;function Oa(h){return h.replace(zn,function(w){return"\\"+w.charCodeAt(0).toString(16)+" "})}function Ur(h,w,_,E,G,te,we,qe){h.name="",we!=null&&typeof we!="function"&&typeof we!="symbol"&&typeof we!="boolean"?h.type=we:h.removeAttribute("type"),w!=null?we==="number"?(w===0&&h.value===""||h.value!=w)&&(h.value=""+da(w)):h.value!==""+da(w)&&(h.value=""+da(w)):we!=="submit"&&we!=="reset"||h.removeAttribute("value"),w!=null?ur(h,we,da(w)):_!=null?ur(h,we,da(_)):E!=null&&h.removeAttribute("value"),G==null&&te!=null&&(h.defaultChecked=!!te),G!=null&&(h.checked=G&&typeof G!="function"&&typeof G!="symbol"),qe!=null&&typeof qe!="function"&&typeof qe!="symbol"&&typeof qe!="boolean"?h.name=""+da(qe):h.removeAttribute("name")}function Ba(h,w,_,E,G,te,we,qe){if(te!=null&&typeof te!="function"&&typeof te!="symbol"&&typeof te!="boolean"&&(h.type=te),w!=null||_!=null){if(!(te!=="submit"&&te!=="reset"||w!=null)){ma(h);return}_=_!=null?""+da(_):"",w=w!=null?""+da(w):_,qe||w===h.value||(h.value=w),h.defaultValue=w}E=E??G,E=typeof E!="function"&&typeof E!="symbol"&&!!E,h.checked=qe?h.checked:!!E,h.defaultChecked=!!E,we!=null&&typeof we!="function"&&typeof we!="symbol"&&typeof we!="boolean"&&(h.name=we),ma(h)}function ur(h,w,_){w==="number"&&Xa(h.ownerDocument)===h||h.defaultValue===""+_||(h.defaultValue=""+_)}function Mn(h,w,_,E){if(h=h.options,w){w={};for(var G=0;G<_.length;G++)w["$"+_[G]]=!0;for(_=0;_"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),hp=!1;if(Za)try{var _d={};Object.defineProperty(_d,"passive",{get:function(){hp=!0}}),window.addEventListener("test",_d,_d),window.removeEventListener("test",_d,_d)}catch{hp=!1}var li=null,Au=null,vi=null;function yf(){if(vi)return vi;var h,w=Au,_=w.length,E,G="value"in li?li.value:li.textContent,te=G.length;for(h=0;h<_&&w[h]===G[h];h++);var we=_-h;for(E=1;E<=we&&w[_-E]===G[te-E];E++);return vi=G.slice(h,1=di),yp=" ",_b=!1;function ye(h,w){switch(h){case"keyup":return kv.indexOf(w.keyCode)!==-1;case"keydown":return w.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function zt(h){return h=h.detail,typeof h=="object"&&"data"in h?h.data:null}var la=!1;function Ta(h,w){switch(h){case"compositionend":return zt(w);case"keypress":return w.which!==32?null:(_b=!0,yp);case"textInput":return h=w.data,h===yp&&_b?null:h;default:return null}}function Ua(h,w){if(la)return h==="compositionend"||!il&&ye(h,w)?(h=yf(),vi=Au=li=null,la=!1,h):null;switch(h){case"paste":return null;case"keypress":if(!(w.ctrlKey||w.altKey||w.metaKey)||w.ctrlKey&&w.altKey){if(w.char&&1=w)return{node:_,offset:w-h};h=E}e:{for(;_;){if(_.nextSibling){_=_.nextSibling;break e}_=_.parentNode}_=void 0}_=Eo(_)}}function Do(h,w){return h&&w?h===w?!0:h&&h.nodeType===3?!1:w&&w.nodeType===3?Do(h,w.parentNode):"contains"in h?h.contains(w):h.compareDocumentPosition?!!(h.compareDocumentPosition(w)&16):!1:!1}function uo(h){h=h!=null&&h.ownerDocument!=null&&h.ownerDocument.defaultView!=null?h.ownerDocument.defaultView:window;for(var w=Xa(h.document);w instanceof h.HTMLIFrameElement;){try{var _=typeof w.contentWindow.location.href=="string"}catch{_=!1}if(_)h=w.contentWindow;else break;w=Xa(h.document)}return w}function wi(h){var w=h&&h.nodeName&&h.nodeName.toLowerCase();return w&&(w==="input"&&(h.type==="text"||h.type==="search"||h.type==="tel"||h.type==="url"||h.type==="password")||w==="textarea"||h.contentEditable==="true")}var Ad=Za&&"documentMode"in document&&11>=document.documentMode,mi=null,hn=null,En=null,Yr=!1;function vp(h,w,_){var E=_.window===_?_.document:_.nodeType===9?_:_.ownerDocument;Yr||mi==null||mi!==Xa(E)||(E=mi,"selectionStart"in E&&wi(E)?E={start:E.selectionStart,end:E.selectionEnd}:(E=(E.ownerDocument&&E.ownerDocument.defaultView||window).getSelection(),E={anchorNode:E.anchorNode,anchorOffset:E.anchorOffset,focusNode:E.focusNode,focusOffset:E.focusOffset}),En&&vs(En,E)||(En=E,E=p_(hn,"onSelect"),0>=we,G-=we,Md=1<<32-He(w)+G|_<tn?(_n=Ca,Ca=null):_n=Ca.sibling;var Rn=Lt(kt,Ca,jt[tn],Vt);if(Rn===null){Ca===null&&(Ca=_n);break}h&&Ca&&Rn.alternate===null&&w(kt,Ca),xt=te(Rn,xt,tn),Ln===null?Da=Rn:Ln.sibling=Rn,Ln=Rn,Ca=_n}if(tn===jt.length)return _(kt,Ca),Cn&&Iu(kt,tn),Da;if(Ca===null){for(;tntn?(_n=Ca,Ca=null):_n=Ca.sibling;var qp=Lt(kt,Ca,Rn.value,Vt);if(qp===null){Ca===null&&(Ca=_n);break}h&&Ca&&qp.alternate===null&&w(kt,Ca),xt=te(qp,xt,tn),Ln===null?Da=qp:Ln.sibling=qp,Ln=qp,Ca=_n}if(Rn.done)return _(kt,Ca),Cn&&Iu(kt,tn),Da;if(Ca===null){for(;!Rn.done;tn++,Rn=jt.next())Rn=Gt(kt,Rn.value,Vt),Rn!==null&&(xt=te(Rn,xt,tn),Ln===null?Da=Rn:Ln.sibling=Rn,Ln=Rn);return Cn&&Iu(kt,tn),Da}for(Ca=E(Ca);!Rn.done;tn++,Rn=jt.next())Rn=Bt(Ca,kt,tn,Rn.value,Vt),Rn!==null&&(h&&Rn.alternate!==null&&Ca.delete(Rn.key===null?tn:Rn.key),xt=te(Rn,xt,tn),Ln===null?Da=Rn:Ln.sibling=Rn,Ln=Rn);return h&&Ca.forEach(function(rme){return w(kt,rme)}),Cn&&Iu(kt,tn),Da}function ar(kt,xt,jt,Vt){if(typeof jt=="object"&&jt!==null&&jt.type===v&&jt.key===null&&(jt=jt.props.children),typeof jt=="object"&&jt!==null){switch(jt.$$typeof){case f:e:{for(var Da=jt.key;xt!==null;){if(xt.key===Da){if(Da=jt.type,Da===v){if(xt.tag===7){_(kt,xt.sibling),Vt=G(xt,jt.props.children),Vt.return=kt,kt=Vt;break e}}else if(xt.elementType===Da||typeof Da=="object"&&Da!==null&&Da.$$typeof===F&&Af(Da)===xt.type){_(kt,xt.sibling),Vt=G(xt,jt.props),Av(Vt,jt),Vt.return=kt,kt=Vt;break e}_(kt,xt);break}else w(kt,xt);xt=xt.sibling}jt.type===v?(Vt=_f(jt.props.children,kt.mode,Vt,jt.key),Vt.return=kt,kt=Vt):(Vt=jk(jt.type,jt.key,jt.props,null,kt.mode,Vt),Av(Vt,jt),Vt.return=kt,kt=Vt)}return we(kt);case g:e:{for(Da=jt.key;xt!==null;){if(xt.key===Da)if(xt.tag===4&&xt.stateNode.containerInfo===jt.containerInfo&&xt.stateNode.implementation===jt.implementation){_(kt,xt.sibling),Vt=G(xt,jt.children||[]),Vt.return=kt,kt=Vt;break e}else{_(kt,xt);break}else w(kt,xt);xt=xt.sibling}Vt=Sj(jt,kt.mode,Vt),Vt.return=kt,kt=Vt}return we(kt);case F:return jt=Af(jt),ar(kt,xt,jt,Vt)}if(Q(jt))return wa(kt,xt,jt,Vt);if(B(jt)){if(Da=B(jt),typeof Da!="function")throw Error(r(150));return jt=Da.call(jt),Ia(kt,xt,jt,Vt)}if(typeof jt.then=="function")return ar(kt,xt,Ik(jt),Vt);if(jt.$$typeof===k)return ar(kt,xt,Dk(kt,jt),Vt);Ok(kt,jt)}return typeof jt=="string"&&jt!==""||typeof jt=="number"||typeof jt=="bigint"?(jt=""+jt,xt!==null&&xt.tag===6?(_(kt,xt.sibling),Vt=G(xt,jt),Vt.return=kt,kt=Vt):(_(kt,xt),Vt=wj(jt,kt.mode,Vt),Vt.return=kt,kt=Vt),we(kt)):_(kt,xt)}return function(kt,xt,jt,Vt){try{Tv=0;var Da=ar(kt,xt,jt,Vt);return Fb=null,Da}catch(Ca){if(Ca===Db||Ca===Lk)throw Ca;var Ln=sl(29,Ca,null,kt.mode);return Ln.lanes=Vt,Ln.return=kt,Ln}}}var Mf=HB(!0),$B=HB(!1),Np=!1;function Fj(h){h.updateQueue={baseState:h.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Lj(h,w){h=h.updateQueue,w.updateQueue===h&&(w.updateQueue={baseState:h.baseState,firstBaseUpdate:h.firstBaseUpdate,lastBaseUpdate:h.lastBaseUpdate,shared:h.shared,callbacks:null})}function Cp(h){return{lane:h,tag:0,payload:null,callback:null,next:null}}function Pp(h,w,_){var E=h.updateQueue;if(E===null)return null;if(E=E.shared,(Un&2)!==0){var G=E.pending;return G===null?w.next=w:(w.next=G.next,G.next=w),E.pending=w,w=Ak(h),PB(h,null,_),w}return Tk(h,E,w,_),Ak(h)}function jv(h,w,_){if(w=w.updateQueue,w!==null&&(w=w.shared,(_&4194048)!==0)){var E=w.lanes;E&=h.pendingLanes,_|=E,w.lanes=_,Ut(h,_)}}function Rj(h,w){var _=h.updateQueue,E=h.alternate;if(E!==null&&(E=E.updateQueue,_===E)){var G=null,te=null;if(_=_.firstBaseUpdate,_!==null){do{var we={lane:_.lane,tag:_.tag,payload:_.payload,callback:null,next:null};te===null?G=te=we:te=te.next=we,_=_.next}while(_!==null);te===null?G=te=w:te=te.next=w}else G=te=w;_={baseState:E.baseState,firstBaseUpdate:G,lastBaseUpdate:te,shared:E.shared,callbacks:E.callbacks},h.updateQueue=_;return}h=_.lastBaseUpdate,h===null?_.firstBaseUpdate=w:h.next=w,_.lastBaseUpdate=w}var Ij=!1;function Mv(){if(Ij){var h=Eb;if(h!==null)throw h}}function Ev(h,w,_,E){Ij=!1;var G=h.updateQueue;Np=!1;var te=G.firstBaseUpdate,we=G.lastBaseUpdate,qe=G.shared.pending;if(qe!==null){G.shared.pending=null;var mt=qe,Et=mt.next;mt.next=null,we===null?te=Et:we.next=Et,we=mt;var Ht=h.alternate;Ht!==null&&(Ht=Ht.updateQueue,qe=Ht.lastBaseUpdate,qe!==we&&(qe===null?Ht.firstBaseUpdate=Et:qe.next=Et,Ht.lastBaseUpdate=mt))}if(te!==null){var Gt=G.baseState;we=0,Ht=Et=mt=null,qe=te;do{var Lt=qe.lane&-536870913,Bt=Lt!==qe.lane;if(Bt?(kn&Lt)===Lt:(E&Lt)===Lt){Lt!==0&&Lt===Mb&&(Ij=!0),Ht!==null&&(Ht=Ht.next={lane:0,tag:qe.tag,payload:qe.payload,callback:null,next:null});e:{var wa=h,Ia=qe;Lt=w;var ar=_;switch(Ia.tag){case 1:if(wa=Ia.payload,typeof wa=="function"){Gt=wa.call(ar,Gt,Lt);break e}Gt=wa;break e;case 3:wa.flags=wa.flags&-65537|128;case 0:if(wa=Ia.payload,Lt=typeof wa=="function"?wa.call(ar,Gt,Lt):wa,Lt==null)break e;Gt=m({},Gt,Lt);break e;case 2:Np=!0}}Lt=qe.callback,Lt!==null&&(h.flags|=64,Bt&&(h.flags|=8192),Bt=G.callbacks,Bt===null?G.callbacks=[Lt]:Bt.push(Lt))}else Bt={lane:Lt,tag:qe.tag,payload:qe.payload,callback:qe.callback,next:null},Ht===null?(Et=Ht=Bt,mt=Gt):Ht=Ht.next=Bt,we|=Lt;if(qe=qe.next,qe===null){if(qe=G.shared.pending,qe===null)break;Bt=qe,qe=Bt.next,Bt.next=null,G.lastBaseUpdate=Bt,G.shared.pending=null}}while(!0);Ht===null&&(mt=Gt),G.baseState=mt,G.firstBaseUpdate=Et,G.lastBaseUpdate=Ht,te===null&&(G.shared.lanes=0),Ep|=we,h.lanes=we,h.memoizedState=Gt}}function VB(h,w){if(typeof h!="function")throw Error(r(191,h));h.call(w)}function GB(h,w){var _=h.callbacks;if(_!==null)for(h.callbacks=null,h=0;h<_.length;h++)VB(_[h],w)}var Lb=Y(null),zk=Y(0);function WB(h,w){h=Ku,pe(zk,h),pe(Lb,w),Ku=h|w.baseLanes}function Oj(){pe(zk,Ku),pe(Lb,Lb.current)}function zj(){Ku=zk.current,re(Lb),re(zk)}var ol=Y(null),Ql=null;function Tp(h){var w=h.alternate;pe(pi,pi.current&1),pe(ol,h),Ql===null&&(w===null||Lb.current!==null||w.memoizedState!==null)&&(Ql=h)}function Bj(h){pe(pi,pi.current),pe(ol,h),Ql===null&&(Ql=h)}function KB(h){h.tag===22?(pe(pi,pi.current),pe(ol,h),Ql===null&&(Ql=h)):Ap()}function Ap(){pe(pi,pi.current),pe(ol,ol.current)}function ll(h){re(ol),Ql===h&&(Ql=null),re(pi)}var pi=Y(0);function Bk(h){for(var w=h;w!==null;){if(w.tag===13){var _=w.memoizedState;if(_!==null&&(_=_.dehydrated,_===null||GM(_)||WM(_)))return w}else if(w.tag===19&&(w.memoizedProps.revealOrder==="forwards"||w.memoizedProps.revealOrder==="backwards"||w.memoizedProps.revealOrder==="unstable_legacy-backwards"||w.memoizedProps.revealOrder==="together")){if((w.flags&128)!==0)return w}else if(w.child!==null){w.child.return=w,w=w.child;continue}if(w===h)break;for(;w.sibling===null;){if(w.return===null||w.return===h)return null;w=w.return}w.sibling.return=w.return,w=w.sibling}return null}var Bu=0,Ja=null,er=null,ki=null,Uk=!1,Rb=!1,Ef=!1,qk=0,Dv=0,Ib=null,Kde=0;function Xr(){throw Error(r(321))}function Uj(h,w){if(w===null)return!1;for(var _=0;_te?te:8;var we=ee.T,qe={};ee.T=qe,aM(h,!1,w,_);try{var mt=G(),Et=ee.S;if(Et!==null&&Et(qe,mt),mt!==null&&typeof mt=="object"&&typeof mt.then=="function"){var Ht=Wde(mt,E);Lv(h,w,Ht,ul(h))}else Lv(h,w,E,ul(h))}catch(Gt){Lv(h,w,{then:function(){},status:"rejected",reason:Gt},ul())}finally{Z.p=te,we!==null&&qe.types!==null&&(we.types=qe.types),ee.T=we}}function Jde(){}function eM(h,w,_,E){if(h.tag!==5)throw Error(r(476));var G=_U(h).queue;kU(h,G,w,ce,_===null?Jde:function(){return NU(h),_(E)})}function _U(h){var w=h.memoizedState;if(w!==null)return w;w={memoizedState:ce,baseState:ce,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Uu,lastRenderedState:ce},next:null};var _={};return w.next={memoizedState:_,baseState:_,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Uu,lastRenderedState:_},next:null},h.memoizedState=w,h=h.alternate,h!==null&&(h.memoizedState=w),w}function NU(h){var w=_U(h);w.next===null&&(w=h.alternate.memoizedState),Lv(h,w.next.queue,{},ul())}function tM(){return Ss(Zv)}function CU(){return hi().memoizedState}function PU(){return hi().memoizedState}function eue(h){for(var w=h.return;w!==null;){switch(w.tag){case 24:case 3:var _=ul();h=Cp(_);var E=Pp(w,h,_);E!==null&&(Oo(E,w,_),jv(E,w,_)),w={cache:jj()},h.payload=w;return}w=w.return}}function tue(h,w,_){var E=ul();_={lane:E,revertLane:0,gesture:null,action:_,hasEagerState:!1,eagerState:null,next:null},Kk(h)?AU(w,_):(_=yj(h,w,_,E),_!==null&&(Oo(_,h,E),jU(_,w,E)))}function TU(h,w,_){var E=ul();Lv(h,w,_,E)}function Lv(h,w,_,E){var G={lane:E,revertLane:0,gesture:null,action:_,hasEagerState:!1,eagerState:null,next:null};if(Kk(h))AU(w,G);else{var te=h.alternate;if(h.lanes===0&&(te===null||te.lanes===0)&&(te=w.lastRenderedReducer,te!==null))try{var we=w.lastRenderedState,qe=te(we,_);if(G.hasEagerState=!0,G.eagerState=qe,Mr(qe,we))return Tk(h,w,G,0),hr===null&&Pk(),!1}catch{}if(_=yj(h,w,G,E),_!==null)return Oo(_,h,E),jU(_,w,E),!0}return!1}function aM(h,w,_,E){if(E={lane:2,revertLane:FM(),gesture:null,action:E,hasEagerState:!1,eagerState:null,next:null},Kk(h)){if(w)throw Error(r(479))}else w=yj(h,_,E,2),w!==null&&Oo(w,h,2)}function Kk(h){var w=h.alternate;return h===Ja||w!==null&&w===Ja}function AU(h,w){Rb=Uk=!0;var _=h.pending;_===null?w.next=w:(w.next=_.next,_.next=w),h.pending=w}function jU(h,w,_){if((_&4194048)!==0){var E=w.lanes;E&=h.pendingLanes,_|=E,w.lanes=_,Ut(h,_)}}var Rv={readContext:Ss,use:$k,useCallback:Xr,useContext:Xr,useEffect:Xr,useImperativeHandle:Xr,useLayoutEffect:Xr,useInsertionEffect:Xr,useMemo:Xr,useReducer:Xr,useRef:Xr,useState:Xr,useDebugValue:Xr,useDeferredValue:Xr,useTransition:Xr,useSyncExternalStore:Xr,useId:Xr,useHostTransitionStatus:Xr,useFormState:Xr,useActionState:Xr,useOptimistic:Xr,useMemoCache:Xr,useCacheRefresh:Xr};Rv.useEffectEvent=Xr;var MU={readContext:Ss,use:$k,useCallback:function(h,w){return mo().memoizedState=[h,w===void 0?null:w],h},useContext:Ss,useEffect:hU,useImperativeHandle:function(h,w,_){_=_!=null?_.concat([h]):null,Gk(4194308,4,xU.bind(null,w,h),_)},useLayoutEffect:function(h,w){return Gk(4194308,4,h,w)},useInsertionEffect:function(h,w){Gk(4,2,h,w)},useMemo:function(h,w){var _=mo();w=w===void 0?null:w;var E=h();if(Ef){Fe(!0);try{h()}finally{Fe(!1)}}return _.memoizedState=[E,w],E},useReducer:function(h,w,_){var E=mo();if(_!==void 0){var G=_(w);if(Ef){Fe(!0);try{_(w)}finally{Fe(!1)}}}else G=w;return E.memoizedState=E.baseState=G,h={pending:null,lanes:0,dispatch:null,lastRenderedReducer:h,lastRenderedState:G},E.queue=h,h=h.dispatch=tue.bind(null,Ja,h),[E.memoizedState,h]},useRef:function(h){var w=mo();return h={current:h},w.memoizedState=h},useState:function(h){h=Qj(h);var w=h.queue,_=TU.bind(null,Ja,w);return w.dispatch=_,[h.memoizedState,_]},useDebugValue:Zj,useDeferredValue:function(h,w){var _=mo();return Jj(_,h,w)},useTransition:function(){var h=Qj(!1);return h=kU.bind(null,Ja,h.queue,!0,!1),mo().memoizedState=h,[!1,h]},useSyncExternalStore:function(h,w,_){var E=Ja,G=mo();if(Cn){if(_===void 0)throw Error(r(407));_=_()}else{if(_=w(),hr===null)throw Error(r(349));(kn&127)!==0||ZB(E,w,_)}G.memoizedState=_;var te={value:_,getSnapshot:w};return G.queue=te,hU(eU.bind(null,E,te,h),[h]),E.flags|=2048,Ob(9,{destroy:void 0},JB.bind(null,E,te,_,w),null),_},useId:function(){var h=mo(),w=hr.identifierPrefix;if(Cn){var _=Ed,E=Md;_=(E&~(1<<32-He(E)-1)).toString(32)+_,w="_"+w+"R_"+_,_=qk++,0<_&&(w+="H"+_.toString(32)),w+="_"}else _=Kde++,w="_"+w+"r_"+_.toString(32)+"_";return h.memoizedState=w},useHostTransitionStatus:tM,useFormState:cU,useActionState:cU,useOptimistic:function(h){var w=mo();w.memoizedState=w.baseState=h;var _={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return w.queue=_,w=aM.bind(null,Ja,!0,_),_.dispatch=w,[h,w]},useMemoCache:Gj,useCacheRefresh:function(){return mo().memoizedState=eue.bind(null,Ja)},useEffectEvent:function(h){var w=mo(),_={impl:h};return w.memoizedState=_,function(){if((Un&2)!==0)throw Error(r(440));return _.impl.apply(void 0,arguments)}}},nM={readContext:Ss,use:$k,useCallback:vU,useContext:Ss,useEffect:Xj,useImperativeHandle:yU,useInsertionEffect:gU,useLayoutEffect:bU,useMemo:wU,useReducer:Vk,useRef:pU,useState:function(){return Vk(Uu)},useDebugValue:Zj,useDeferredValue:function(h,w){var _=hi();return SU(_,er.memoizedState,h,w)},useTransition:function(){var h=Vk(Uu)[0],w=hi().memoizedState;return[typeof h=="boolean"?h:Fv(h),w]},useSyncExternalStore:XB,useId:CU,useHostTransitionStatus:tM,useFormState:dU,useActionState:dU,useOptimistic:function(h,w){var _=hi();return nU(_,er,h,w)},useMemoCache:Gj,useCacheRefresh:PU};nM.useEffectEvent=fU;var EU={readContext:Ss,use:$k,useCallback:vU,useContext:Ss,useEffect:Xj,useImperativeHandle:yU,useInsertionEffect:gU,useLayoutEffect:bU,useMemo:wU,useReducer:Kj,useRef:pU,useState:function(){return Kj(Uu)},useDebugValue:Zj,useDeferredValue:function(h,w){var _=hi();return er===null?Jj(_,h,w):SU(_,er.memoizedState,h,w)},useTransition:function(){var h=Kj(Uu)[0],w=hi().memoizedState;return[typeof h=="boolean"?h:Fv(h),w]},useSyncExternalStore:XB,useId:CU,useHostTransitionStatus:tM,useFormState:mU,useActionState:mU,useOptimistic:function(h,w){var _=hi();return er!==null?nU(_,er,h,w):(_.baseState=h,[h,_.queue.dispatch])},useMemoCache:Gj,useCacheRefresh:PU};EU.useEffectEvent=fU;function rM(h,w,_,E){w=h.memoizedState,_=_(E,w),_=_==null?w:m({},w,_),h.memoizedState=_,h.lanes===0&&(h.updateQueue.baseState=_)}var iM={enqueueSetState:function(h,w,_){h=h._reactInternals;var E=ul(),G=Cp(E);G.payload=w,_!=null&&(G.callback=_),w=Pp(h,G,E),w!==null&&(Oo(w,h,E),jv(w,h,E))},enqueueReplaceState:function(h,w,_){h=h._reactInternals;var E=ul(),G=Cp(E);G.tag=1,G.payload=w,_!=null&&(G.callback=_),w=Pp(h,G,E),w!==null&&(Oo(w,h,E),jv(w,h,E))},enqueueForceUpdate:function(h,w){h=h._reactInternals;var _=ul(),E=Cp(_);E.tag=2,w!=null&&(E.callback=w),w=Pp(h,E,_),w!==null&&(Oo(w,h,_),jv(w,h,_))}};function DU(h,w,_,E,G,te,we){return h=h.stateNode,typeof h.shouldComponentUpdate=="function"?h.shouldComponentUpdate(E,te,we):w.prototype&&w.prototype.isPureReactComponent?!vs(_,E)||!vs(G,te):!0}function FU(h,w,_,E){h=w.state,typeof w.componentWillReceiveProps=="function"&&w.componentWillReceiveProps(_,E),typeof w.UNSAFE_componentWillReceiveProps=="function"&&w.UNSAFE_componentWillReceiveProps(_,E),w.state!==h&&iM.enqueueReplaceState(w,w.state,null)}function Df(h,w){var _=w;if("ref"in w){_={};for(var E in w)E!=="ref"&&(_[E]=w[E])}if(h=h.defaultProps){_===w&&(_=m({},_));for(var G in h)_[G]===void 0&&(_[G]=h[G])}return _}function LU(h){Ck(h)}function RU(h){console.error(h)}function IU(h){Ck(h)}function Qk(h,w){try{var _=h.onUncaughtError;_(w.value,{componentStack:w.stack})}catch(E){setTimeout(function(){throw E})}}function OU(h,w,_){try{var E=h.onCaughtError;E(_.value,{componentStack:_.stack,errorBoundary:w.tag===1?w.stateNode:null})}catch(G){setTimeout(function(){throw G})}}function sM(h,w,_){return _=Cp(_),_.tag=3,_.payload={element:null},_.callback=function(){Qk(h,w)},_}function zU(h){return h=Cp(h),h.tag=3,h}function BU(h,w,_,E){var G=_.type.getDerivedStateFromError;if(typeof G=="function"){var te=E.value;h.payload=function(){return G(te)},h.callback=function(){OU(w,_,E)}}var we=_.stateNode;we!==null&&typeof we.componentDidCatch=="function"&&(h.callback=function(){OU(w,_,E),typeof G!="function"&&(Dp===null?Dp=new Set([this]):Dp.add(this));var qe=E.stack;this.componentDidCatch(E.value,{componentStack:qe!==null?qe:""})})}function aue(h,w,_,E,G){if(_.flags|=32768,E!==null&&typeof E=="object"&&typeof E.then=="function"){if(w=_.alternate,w!==null&&jb(w,_,G,!0),_=ol.current,_!==null){switch(_.tag){case 31:case 13:return Ql===null?o_():_.alternate===null&&Zr===0&&(Zr=3),_.flags&=-257,_.flags|=65536,_.lanes=G,E===Rk?_.flags|=16384:(w=_.updateQueue,w===null?_.updateQueue=new Set([E]):w.add(E),MM(h,E,G)),!1;case 22:return _.flags|=65536,E===Rk?_.flags|=16384:(w=_.updateQueue,w===null?(w={transitions:null,markerInstances:null,retryQueue:new Set([E])},_.updateQueue=w):(_=w.retryQueue,_===null?w.retryQueue=new Set([E]):_.add(E)),MM(h,E,G)),!1}throw Error(r(435,_.tag))}return MM(h,E,G),o_(),!1}if(Cn)return w=ol.current,w!==null?((w.flags&65536)===0&&(w.flags|=256),w.flags|=65536,w.lanes=G,E!==Nj&&(h=Error(r(422),{cause:E}),Nv(Vl(h,_)))):(E!==Nj&&(w=Error(r(423),{cause:E}),Nv(Vl(w,_))),h=h.current.alternate,h.flags|=65536,G&=-G,h.lanes|=G,E=Vl(E,_),G=sM(h.stateNode,E,G),Rj(h,G),Zr!==4&&(Zr=2)),!1;var te=Error(r(520),{cause:E});if(te=Vl(te,_),$v===null?$v=[te]:$v.push(te),Zr!==4&&(Zr=2),w===null)return!0;E=Vl(E,_),_=w;do{switch(_.tag){case 3:return _.flags|=65536,h=G&-G,_.lanes|=h,h=sM(_.stateNode,E,h),Rj(_,h),!1;case 1:if(w=_.type,te=_.stateNode,(_.flags&128)===0&&(typeof w.getDerivedStateFromError=="function"||te!==null&&typeof te.componentDidCatch=="function"&&(Dp===null||!Dp.has(te))))return _.flags|=65536,G&=-G,_.lanes|=G,G=zU(G),BU(G,h,_,E),Rj(_,G),!1}_=_.return}while(_!==null);return!1}var oM=Error(r(461)),_i=!1;function ks(h,w,_,E){w.child=h===null?$B(w,null,_,E):Mf(w,h.child,_,E)}function UU(h,w,_,E,G){_=_.render;var te=w.ref;if("ref"in E){var we={};for(var qe in E)qe!=="ref"&&(we[qe]=E[qe])}else we=E;return Pf(w),E=qj(h,w,_,we,te,G),qe=Hj(),h!==null&&!_i?($j(h,w,G),qu(h,w,G)):(Cn&&qe&&kj(w),w.flags|=1,ks(h,w,E,G),w.child)}function qU(h,w,_,E,G){if(h===null){var te=_.type;return typeof te=="function"&&!vj(te)&&te.defaultProps===void 0&&_.compare===null?(w.tag=15,w.type=te,HU(h,w,te,E,G)):(h=jk(_.type,null,E,w,w.mode,G),h.ref=w.ref,h.return=w,w.child=h)}if(te=h.child,!fM(h,G)){var we=te.memoizedProps;if(_=_.compare,_=_!==null?_:vs,_(we,E)&&h.ref===w.ref)return qu(h,w,G)}return w.flags|=1,h=Ru(te,E),h.ref=w.ref,h.return=w,w.child=h}function HU(h,w,_,E,G){if(h!==null){var te=h.memoizedProps;if(vs(te,E)&&h.ref===w.ref)if(_i=!1,w.pendingProps=E=te,fM(h,G))(h.flags&131072)!==0&&(_i=!0);else return w.lanes=h.lanes,qu(h,w,G)}return lM(h,w,_,E,G)}function $U(h,w,_,E){var G=E.children,te=h!==null?h.memoizedState:null;if(h===null&&w.stateNode===null&&(w.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),E.mode==="hidden"){if((w.flags&128)!==0){if(te=te!==null?te.baseLanes|_:_,h!==null){for(E=w.child=h.child,G=0;E!==null;)G=G|E.lanes|E.childLanes,E=E.sibling;E=G&~te}else E=0,w.child=null;return VU(h,w,te,_,E)}if((_&536870912)!==0)w.memoizedState={baseLanes:0,cachePool:null},h!==null&&Fk(w,te!==null?te.cachePool:null),te!==null?WB(w,te):Oj(),KB(w);else return E=w.lanes=536870912,VU(h,w,te!==null?te.baseLanes|_:_,_,E)}else te!==null?(Fk(w,te.cachePool),WB(w,te),Ap(),w.memoizedState=null):(h!==null&&Fk(w,null),Oj(),Ap());return ks(h,w,G,_),w.child}function Iv(h,w){return h!==null&&h.tag===22||w.stateNode!==null||(w.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),w.sibling}function VU(h,w,_,E,G){var te=Ej();return te=te===null?null:{parent:Si._currentValue,pool:te},w.memoizedState={baseLanes:_,cachePool:te},h!==null&&Fk(w,null),Oj(),KB(w),h!==null&&jb(h,w,E,!0),w.childLanes=G,null}function Yk(h,w){return w=Zk({mode:w.mode,children:w.children},h.mode),w.ref=h.ref,h.child=w,w.return=h,w}function GU(h,w,_){return Mf(w,h.child,null,_),h=Yk(w,w.pendingProps),h.flags|=2,ll(w),w.memoizedState=null,h}function nue(h,w,_){var E=w.pendingProps,G=(w.flags&128)!==0;if(w.flags&=-129,h===null){if(Cn){if(E.mode==="hidden")return h=Yk(w,E),w.lanes=536870912,Iv(null,h);if(Bj(w),(h=_r)?(h=rH(h,Kl),h=h!==null&&h.data==="&"?h:null,h!==null&&(w.memoizedState={dehydrated:h,treeContext:wp!==null?{id:Md,overflow:Ed}:null,retryLane:536870912,hydrationErrors:null},_=AB(h),_.return=w,w.child=_,ws=w,_r=null)):h=null,h===null)throw kp(w);return w.lanes=536870912,null}return Yk(w,E)}var te=h.memoizedState;if(te!==null){var we=te.dehydrated;if(Bj(w),G)if(w.flags&256)w.flags&=-257,w=GU(h,w,_);else if(w.memoizedState!==null)w.child=h.child,w.flags|=128,w=null;else throw Error(r(558));else if(_i||jb(h,w,_,!1),G=(_&h.childLanes)!==0,_i||G){if(E=hr,E!==null&&(we=ft(E,_),we!==0&&we!==te.retryLane))throw te.retryLane=we,kf(h,we),Oo(E,h,we),oM;o_(),w=GU(h,w,_)}else h=te.treeContext,_r=Yl(we.nextSibling),ws=w,Cn=!0,Sp=null,Kl=!1,h!==null&&EB(w,h),w=Yk(w,E),w.flags|=4096;return w}return h=Ru(h.child,{mode:E.mode,children:E.children}),h.ref=w.ref,w.child=h,h.return=w,h}function Xk(h,w){var _=w.ref;if(_===null)h!==null&&h.ref!==null&&(w.flags|=4194816);else{if(typeof _!="function"&&typeof _!="object")throw Error(r(284));(h===null||h.ref!==_)&&(w.flags|=4194816)}}function lM(h,w,_,E,G){return Pf(w),_=qj(h,w,_,E,void 0,G),E=Hj(),h!==null&&!_i?($j(h,w,G),qu(h,w,G)):(Cn&&E&&kj(w),w.flags|=1,ks(h,w,_,G),w.child)}function WU(h,w,_,E,G,te){return Pf(w),w.updateQueue=null,_=YB(w,E,_,G),QB(h),E=Hj(),h!==null&&!_i?($j(h,w,te),qu(h,w,te)):(Cn&&E&&kj(w),w.flags|=1,ks(h,w,_,te),w.child)}function KU(h,w,_,E,G){if(Pf(w),w.stateNode===null){var te=Cb,we=_.contextType;typeof we=="object"&&we!==null&&(te=Ss(we)),te=new _(E,te),w.memoizedState=te.state!==null&&te.state!==void 0?te.state:null,te.updater=iM,w.stateNode=te,te._reactInternals=w,te=w.stateNode,te.props=E,te.state=w.memoizedState,te.refs={},Fj(w),we=_.contextType,te.context=typeof we=="object"&&we!==null?Ss(we):Cb,te.state=w.memoizedState,we=_.getDerivedStateFromProps,typeof we=="function"&&(rM(w,_,we,E),te.state=w.memoizedState),typeof _.getDerivedStateFromProps=="function"||typeof te.getSnapshotBeforeUpdate=="function"||typeof te.UNSAFE_componentWillMount!="function"&&typeof te.componentWillMount!="function"||(we=te.state,typeof te.componentWillMount=="function"&&te.componentWillMount(),typeof te.UNSAFE_componentWillMount=="function"&&te.UNSAFE_componentWillMount(),we!==te.state&&iM.enqueueReplaceState(te,te.state,null),Ev(w,E,te,G),Mv(),te.state=w.memoizedState),typeof te.componentDidMount=="function"&&(w.flags|=4194308),E=!0}else if(h===null){te=w.stateNode;var qe=w.memoizedProps,mt=Df(_,qe);te.props=mt;var Et=te.context,Ht=_.contextType;we=Cb,typeof Ht=="object"&&Ht!==null&&(we=Ss(Ht));var Gt=_.getDerivedStateFromProps;Ht=typeof Gt=="function"||typeof te.getSnapshotBeforeUpdate=="function",qe=w.pendingProps!==qe,Ht||typeof te.UNSAFE_componentWillReceiveProps!="function"&&typeof te.componentWillReceiveProps!="function"||(qe||Et!==we)&&FU(w,te,E,we),Np=!1;var Lt=w.memoizedState;te.state=Lt,Ev(w,E,te,G),Mv(),Et=w.memoizedState,qe||Lt!==Et||Np?(typeof Gt=="function"&&(rM(w,_,Gt,E),Et=w.memoizedState),(mt=Np||DU(w,_,mt,E,Lt,Et,we))?(Ht||typeof te.UNSAFE_componentWillMount!="function"&&typeof te.componentWillMount!="function"||(typeof te.componentWillMount=="function"&&te.componentWillMount(),typeof te.UNSAFE_componentWillMount=="function"&&te.UNSAFE_componentWillMount()),typeof te.componentDidMount=="function"&&(w.flags|=4194308)):(typeof te.componentDidMount=="function"&&(w.flags|=4194308),w.memoizedProps=E,w.memoizedState=Et),te.props=E,te.state=Et,te.context=we,E=mt):(typeof te.componentDidMount=="function"&&(w.flags|=4194308),E=!1)}else{te=w.stateNode,Lj(h,w),we=w.memoizedProps,Ht=Df(_,we),te.props=Ht,Gt=w.pendingProps,Lt=te.context,Et=_.contextType,mt=Cb,typeof Et=="object"&&Et!==null&&(mt=Ss(Et)),qe=_.getDerivedStateFromProps,(Et=typeof qe=="function"||typeof te.getSnapshotBeforeUpdate=="function")||typeof te.UNSAFE_componentWillReceiveProps!="function"&&typeof te.componentWillReceiveProps!="function"||(we!==Gt||Lt!==mt)&&FU(w,te,E,mt),Np=!1,Lt=w.memoizedState,te.state=Lt,Ev(w,E,te,G),Mv();var Bt=w.memoizedState;we!==Gt||Lt!==Bt||Np||h!==null&&h.dependencies!==null&&Ek(h.dependencies)?(typeof qe=="function"&&(rM(w,_,qe,E),Bt=w.memoizedState),(Ht=Np||DU(w,_,Ht,E,Lt,Bt,mt)||h!==null&&h.dependencies!==null&&Ek(h.dependencies))?(Et||typeof te.UNSAFE_componentWillUpdate!="function"&&typeof te.componentWillUpdate!="function"||(typeof te.componentWillUpdate=="function"&&te.componentWillUpdate(E,Bt,mt),typeof te.UNSAFE_componentWillUpdate=="function"&&te.UNSAFE_componentWillUpdate(E,Bt,mt)),typeof te.componentDidUpdate=="function"&&(w.flags|=4),typeof te.getSnapshotBeforeUpdate=="function"&&(w.flags|=1024)):(typeof te.componentDidUpdate!="function"||we===h.memoizedProps&&Lt===h.memoizedState||(w.flags|=4),typeof te.getSnapshotBeforeUpdate!="function"||we===h.memoizedProps&&Lt===h.memoizedState||(w.flags|=1024),w.memoizedProps=E,w.memoizedState=Bt),te.props=E,te.state=Bt,te.context=mt,E=Ht):(typeof te.componentDidUpdate!="function"||we===h.memoizedProps&&Lt===h.memoizedState||(w.flags|=4),typeof te.getSnapshotBeforeUpdate!="function"||we===h.memoizedProps&&Lt===h.memoizedState||(w.flags|=1024),E=!1)}return te=E,Xk(h,w),E=(w.flags&128)!==0,te||E?(te=w.stateNode,_=E&&typeof _.getDerivedStateFromError!="function"?null:te.render(),w.flags|=1,h!==null&&E?(w.child=Mf(w,h.child,null,G),w.child=Mf(w,null,_,G)):ks(h,w,_,G),w.memoizedState=te.state,h=w.child):h=qu(h,w,G),h}function QU(h,w,_,E){return Nf(),w.flags|=256,ks(h,w,_,E),w.child}var cM={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function dM(h){return{baseLanes:h,cachePool:OB()}}function uM(h,w,_){return h=h!==null?h.childLanes&~_:0,w&&(h|=dl),h}function YU(h,w,_){var E=w.pendingProps,G=!1,te=(w.flags&128)!==0,we;if((we=te)||(we=h!==null&&h.memoizedState===null?!1:(pi.current&2)!==0),we&&(G=!0,w.flags&=-129),we=(w.flags&32)!==0,w.flags&=-33,h===null){if(Cn){if(G?Tp(w):Ap(),(h=_r)?(h=rH(h,Kl),h=h!==null&&h.data!=="&"?h:null,h!==null&&(w.memoizedState={dehydrated:h,treeContext:wp!==null?{id:Md,overflow:Ed}:null,retryLane:536870912,hydrationErrors:null},_=AB(h),_.return=w,w.child=_,ws=w,_r=null)):h=null,h===null)throw kp(w);return WM(h)?w.lanes=32:w.lanes=536870912,null}var qe=E.children;return E=E.fallback,G?(Ap(),G=w.mode,qe=Zk({mode:"hidden",children:qe},G),E=_f(E,G,_,null),qe.return=w,E.return=w,qe.sibling=E,w.child=qe,E=w.child,E.memoizedState=dM(_),E.childLanes=uM(h,we,_),w.memoizedState=cM,Iv(null,E)):(Tp(w),mM(w,qe))}var mt=h.memoizedState;if(mt!==null&&(qe=mt.dehydrated,qe!==null)){if(te)w.flags&256?(Tp(w),w.flags&=-257,w=pM(h,w,_)):w.memoizedState!==null?(Ap(),w.child=h.child,w.flags|=128,w=null):(Ap(),qe=E.fallback,G=w.mode,E=Zk({mode:"visible",children:E.children},G),qe=_f(qe,G,_,null),qe.flags|=2,E.return=w,qe.return=w,E.sibling=qe,w.child=E,Mf(w,h.child,null,_),E=w.child,E.memoizedState=dM(_),E.childLanes=uM(h,we,_),w.memoizedState=cM,w=Iv(null,E));else if(Tp(w),WM(qe)){if(we=qe.nextSibling&&qe.nextSibling.dataset,we)var Et=we.dgst;we=Et,E=Error(r(419)),E.stack="",E.digest=we,Nv({value:E,source:null,stack:null}),w=pM(h,w,_)}else if(_i||jb(h,w,_,!1),we=(_&h.childLanes)!==0,_i||we){if(we=hr,we!==null&&(E=ft(we,_),E!==0&&E!==mt.retryLane))throw mt.retryLane=E,kf(h,E),Oo(we,h,E),oM;GM(qe)||o_(),w=pM(h,w,_)}else GM(qe)?(w.flags|=192,w.child=h.child,w=null):(h=mt.treeContext,_r=Yl(qe.nextSibling),ws=w,Cn=!0,Sp=null,Kl=!1,h!==null&&EB(w,h),w=mM(w,E.children),w.flags|=4096);return w}return G?(Ap(),qe=E.fallback,G=w.mode,mt=h.child,Et=mt.sibling,E=Ru(mt,{mode:"hidden",children:E.children}),E.subtreeFlags=mt.subtreeFlags&65011712,Et!==null?qe=Ru(Et,qe):(qe=_f(qe,G,_,null),qe.flags|=2),qe.return=w,E.return=w,E.sibling=qe,w.child=E,Iv(null,E),E=w.child,qe=h.child.memoizedState,qe===null?qe=dM(_):(G=qe.cachePool,G!==null?(mt=Si._currentValue,G=G.parent!==mt?{parent:mt,pool:mt}:G):G=OB(),qe={baseLanes:qe.baseLanes|_,cachePool:G}),E.memoizedState=qe,E.childLanes=uM(h,we,_),w.memoizedState=cM,Iv(h.child,E)):(Tp(w),_=h.child,h=_.sibling,_=Ru(_,{mode:"visible",children:E.children}),_.return=w,_.sibling=null,h!==null&&(we=w.deletions,we===null?(w.deletions=[h],w.flags|=16):we.push(h)),w.child=_,w.memoizedState=null,_)}function mM(h,w){return w=Zk({mode:"visible",children:w},h.mode),w.return=h,h.child=w}function Zk(h,w){return h=sl(22,h,null,w),h.lanes=0,h}function pM(h,w,_){return Mf(w,h.child,null,_),h=mM(w,w.pendingProps.children),h.flags|=2,w.memoizedState=null,h}function XU(h,w,_){h.lanes|=w;var E=h.alternate;E!==null&&(E.lanes|=w),Tj(h.return,w,_)}function hM(h,w,_,E,G,te){var we=h.memoizedState;we===null?h.memoizedState={isBackwards:w,rendering:null,renderingStartTime:0,last:E,tail:_,tailMode:G,treeForkCount:te}:(we.isBackwards=w,we.rendering=null,we.renderingStartTime=0,we.last=E,we.tail=_,we.tailMode=G,we.treeForkCount=te)}function ZU(h,w,_){var E=w.pendingProps,G=E.revealOrder,te=E.tail;E=E.children;var we=pi.current,qe=(we&2)!==0;if(qe?(we=we&1|2,w.flags|=128):we&=1,pe(pi,we),ks(h,w,E,_),E=Cn?_v:0,!qe&&h!==null&&(h.flags&128)!==0)e:for(h=w.child;h!==null;){if(h.tag===13)h.memoizedState!==null&&XU(h,_,w);else if(h.tag===19)XU(h,_,w);else if(h.child!==null){h.child.return=h,h=h.child;continue}if(h===w)break e;for(;h.sibling===null;){if(h.return===null||h.return===w)break e;h=h.return}h.sibling.return=h.return,h=h.sibling}switch(G){case"forwards":for(_=w.child,G=null;_!==null;)h=_.alternate,h!==null&&Bk(h)===null&&(G=_),_=_.sibling;_=G,_===null?(G=w.child,w.child=null):(G=_.sibling,_.sibling=null),hM(w,!1,G,_,te,E);break;case"backwards":case"unstable_legacy-backwards":for(_=null,G=w.child,w.child=null;G!==null;){if(h=G.alternate,h!==null&&Bk(h)===null){w.child=G;break}h=G.sibling,G.sibling=_,_=G,G=h}hM(w,!0,_,null,te,E);break;case"together":hM(w,!1,null,null,void 0,E);break;default:w.memoizedState=null}return w.child}function qu(h,w,_){if(h!==null&&(w.dependencies=h.dependencies),Ep|=w.lanes,(_&w.childLanes)===0)if(h!==null){if(jb(h,w,_,!1),(_&w.childLanes)===0)return null}else return null;if(h!==null&&w.child!==h.child)throw Error(r(153));if(w.child!==null){for(h=w.child,_=Ru(h,h.pendingProps),w.child=_,_.return=w;h.sibling!==null;)h=h.sibling,_=_.sibling=Ru(h,h.pendingProps),_.return=w;_.sibling=null}return w.child}function fM(h,w){return(h.lanes&w)!==0?!0:(h=h.dependencies,!!(h!==null&&Ek(h)))}function rue(h,w,_){switch(w.tag){case 3:A(w,w.stateNode.containerInfo),_p(w,Si,h.memoizedState.cache),Nf();break;case 27:case 5:q(w);break;case 4:A(w,w.stateNode.containerInfo);break;case 10:_p(w,w.type,w.memoizedProps.value);break;case 31:if(w.memoizedState!==null)return w.flags|=128,Bj(w),null;break;case 13:var E=w.memoizedState;if(E!==null)return E.dehydrated!==null?(Tp(w),w.flags|=128,null):(_&w.child.childLanes)!==0?YU(h,w,_):(Tp(w),h=qu(h,w,_),h!==null?h.sibling:null);Tp(w);break;case 19:var G=(h.flags&128)!==0;if(E=(_&w.childLanes)!==0,E||(jb(h,w,_,!1),E=(_&w.childLanes)!==0),G){if(E)return ZU(h,w,_);w.flags|=128}if(G=w.memoizedState,G!==null&&(G.rendering=null,G.tail=null,G.lastEffect=null),pe(pi,pi.current),E)break;return null;case 22:return w.lanes=0,$U(h,w,_,w.pendingProps);case 24:_p(w,Si,h.memoizedState.cache)}return qu(h,w,_)}function JU(h,w,_){if(h!==null)if(h.memoizedProps!==w.pendingProps)_i=!0;else{if(!fM(h,_)&&(w.flags&128)===0)return _i=!1,rue(h,w,_);_i=(h.flags&131072)!==0}else _i=!1,Cn&&(w.flags&1048576)!==0&&MB(w,_v,w.index);switch(w.lanes=0,w.tag){case 16:e:{var E=w.pendingProps;if(h=Af(w.elementType),w.type=h,typeof h=="function")vj(h)?(E=Df(h,E),w.tag=1,w=KU(null,w,h,E,_)):(w.tag=0,w=lM(null,w,h,E,_));else{if(h!=null){var G=h.$$typeof;if(G===C){w.tag=11,w=UU(null,w,h,E,_);break e}else if(G===j){w.tag=14,w=qU(null,w,h,E,_);break e}}throw w=L(h)||h,Error(r(306,w,""))}}return w;case 0:return lM(h,w,w.type,w.pendingProps,_);case 1:return E=w.type,G=Df(E,w.pendingProps),KU(h,w,E,G,_);case 3:e:{if(A(w,w.stateNode.containerInfo),h===null)throw Error(r(387));E=w.pendingProps;var te=w.memoizedState;G=te.element,Lj(h,w),Ev(w,E,null,_);var we=w.memoizedState;if(E=we.cache,_p(w,Si,E),E!==te.cache&&Aj(w,[Si],_,!0),Mv(),E=we.element,te.isDehydrated)if(te={element:E,isDehydrated:!1,cache:we.cache},w.updateQueue.baseState=te,w.memoizedState=te,w.flags&256){w=QU(h,w,E,_);break e}else if(E!==G){G=Vl(Error(r(424)),w),Nv(G),w=QU(h,w,E,_);break e}else for(h=w.stateNode.containerInfo,h.nodeType===9?h=h.body:h=h.nodeName==="HTML"?h.ownerDocument.body:h,_r=Yl(h.firstChild),ws=w,Cn=!0,Sp=null,Kl=!0,_=$B(w,null,E,_),w.child=_;_;)_.flags=_.flags&-3|4096,_=_.sibling;else{if(Nf(),E===G){w=qu(h,w,_);break e}ks(h,w,E,_)}w=w.child}return w;case 26:return Xk(h,w),h===null?(_=dH(w.type,null,w.pendingProps,null))?w.memoizedState=_:Cn||(_=w.type,h=w.pendingProps,E=h_(H.current).createElement(_),E[vt]=w,E[Nt]=h,_s(E,_,h),ot(E),w.stateNode=E):w.memoizedState=dH(w.type,h.memoizedProps,w.pendingProps,h.memoizedState),null;case 27:return q(w),h===null&&Cn&&(E=w.stateNode=oH(w.type,w.pendingProps,H.current),ws=w,Kl=!0,G=_r,Ip(w.type)?(KM=G,_r=Yl(E.firstChild)):_r=G),ks(h,w,w.pendingProps.children,_),Xk(h,w),h===null&&(w.flags|=4194304),w.child;case 5:return h===null&&Cn&&((G=E=_r)&&(E=Fue(E,w.type,w.pendingProps,Kl),E!==null?(w.stateNode=E,ws=w,_r=Yl(E.firstChild),Kl=!1,G=!0):G=!1),G||kp(w)),q(w),G=w.type,te=w.pendingProps,we=h!==null?h.memoizedProps:null,E=te.children,HM(G,te)?E=null:we!==null&&HM(G,we)&&(w.flags|=32),w.memoizedState!==null&&(G=qj(h,w,Qde,null,null,_),Zv._currentValue=G),Xk(h,w),ks(h,w,E,_),w.child;case 6:return h===null&&Cn&&((h=_=_r)&&(_=Lue(_,w.pendingProps,Kl),_!==null?(w.stateNode=_,ws=w,_r=null,h=!0):h=!1),h||kp(w)),null;case 13:return YU(h,w,_);case 4:return A(w,w.stateNode.containerInfo),E=w.pendingProps,h===null?w.child=Mf(w,null,E,_):ks(h,w,E,_),w.child;case 11:return UU(h,w,w.type,w.pendingProps,_);case 7:return ks(h,w,w.pendingProps,_),w.child;case 8:return ks(h,w,w.pendingProps.children,_),w.child;case 12:return ks(h,w,w.pendingProps.children,_),w.child;case 10:return E=w.pendingProps,_p(w,w.type,E.value),ks(h,w,E.children,_),w.child;case 9:return G=w.type._context,E=w.pendingProps.children,Pf(w),G=Ss(G),E=E(G),w.flags|=1,ks(h,w,E,_),w.child;case 14:return qU(h,w,w.type,w.pendingProps,_);case 15:return HU(h,w,w.type,w.pendingProps,_);case 19:return ZU(h,w,_);case 31:return nue(h,w,_);case 22:return $U(h,w,_,w.pendingProps);case 24:return Pf(w),E=Ss(Si),h===null?(G=Ej(),G===null&&(G=hr,te=jj(),G.pooledCache=te,te.refCount++,te!==null&&(G.pooledCacheLanes|=_),G=te),w.memoizedState={parent:E,cache:G},Fj(w),_p(w,Si,G)):((h.lanes&_)!==0&&(Lj(h,w),Ev(w,null,null,_),Mv()),G=h.memoizedState,te=w.memoizedState,G.parent!==E?(G={parent:E,cache:E},w.memoizedState=G,w.lanes===0&&(w.memoizedState=w.updateQueue.baseState=G),_p(w,Si,E)):(E=te.cache,_p(w,Si,E),E!==G.cache&&Aj(w,[Si],_,!0))),ks(h,w,w.pendingProps.children,_),w.child;case 29:throw w.pendingProps}throw Error(r(156,w.tag))}function Hu(h){h.flags|=4}function gM(h,w,_,E,G){if((w=(h.mode&32)!==0)&&(w=!1),w){if(h.flags|=16777216,(G&335544128)===G)if(h.stateNode.complete)h.flags|=8192;else if(Cq())h.flags|=8192;else throw jf=Rk,Dj}else h.flags&=-16777217}function eq(h,w){if(w.type!=="stylesheet"||(w.state.loading&4)!==0)h.flags&=-16777217;else if(h.flags|=16777216,!fH(w))if(Cq())h.flags|=8192;else throw jf=Rk,Dj}function Jk(h,w){w!==null&&(h.flags|=4),h.flags&16384&&(w=h.tag!==22?We():536870912,h.lanes|=w,qb|=w)}function Ov(h,w){if(!Cn)switch(h.tailMode){case"hidden":w=h.tail;for(var _=null;w!==null;)w.alternate!==null&&(_=w),w=w.sibling;_===null?h.tail=null:_.sibling=null;break;case"collapsed":_=h.tail;for(var E=null;_!==null;)_.alternate!==null&&(E=_),_=_.sibling;E===null?w||h.tail===null?h.tail=null:h.tail.sibling=null:E.sibling=null}}function Nr(h){var w=h.alternate!==null&&h.alternate.child===h.child,_=0,E=0;if(w)for(var G=h.child;G!==null;)_|=G.lanes|G.childLanes,E|=G.subtreeFlags&65011712,E|=G.flags&65011712,G.return=h,G=G.sibling;else for(G=h.child;G!==null;)_|=G.lanes|G.childLanes,E|=G.subtreeFlags,E|=G.flags,G.return=h,G=G.sibling;return h.subtreeFlags|=E,h.childLanes=_,w}function iue(h,w,_){var E=w.pendingProps;switch(_j(w),w.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Nr(w),null;case 1:return Nr(w),null;case 3:return _=w.stateNode,E=null,h!==null&&(E=h.memoizedState.cache),w.memoizedState.cache!==E&&(w.flags|=2048),zu(Si),M(),_.pendingContext&&(_.context=_.pendingContext,_.pendingContext=null),(h===null||h.child===null)&&(Ab(w)?Hu(w):h===null||h.memoizedState.isDehydrated&&(w.flags&256)===0||(w.flags|=1024,Cj())),Nr(w),null;case 26:var G=w.type,te=w.memoizedState;return h===null?(Hu(w),te!==null?(Nr(w),eq(w,te)):(Nr(w),gM(w,G,null,E,_))):te?te!==h.memoizedState?(Hu(w),Nr(w),eq(w,te)):(Nr(w),w.flags&=-16777217):(h=h.memoizedProps,h!==E&&Hu(w),Nr(w),gM(w,G,h,E,_)),null;case 27:if(W(w),_=H.current,G=w.type,h!==null&&w.stateNode!=null)h.memoizedProps!==E&&Hu(w);else{if(!E){if(w.stateNode===null)throw Error(r(166));return Nr(w),null}h=me.current,Ab(w)?DB(w):(h=oH(G,E,_),w.stateNode=h,Hu(w))}return Nr(w),null;case 5:if(W(w),G=w.type,h!==null&&w.stateNode!=null)h.memoizedProps!==E&&Hu(w);else{if(!E){if(w.stateNode===null)throw Error(r(166));return Nr(w),null}if(te=me.current,Ab(w))DB(w);else{var we=h_(H.current);switch(te){case 1:te=we.createElementNS("http://www.w3.org/2000/svg",G);break;case 2:te=we.createElementNS("http://www.w3.org/1998/Math/MathML",G);break;default:switch(G){case"svg":te=we.createElementNS("http://www.w3.org/2000/svg",G);break;case"math":te=we.createElementNS("http://www.w3.org/1998/Math/MathML",G);break;case"script":te=we.createElement("div"),te.innerHTML=" +