diff --git a/CHANGELOG.md b/CHANGELOG.md
index f277c0732..44e96149d 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -5,6 +5,20 @@ All notable changes to Bambuddy will be documented in this file.
## [0.1.6b5] - 2026-01-01
### Added
+- **Spoolman Link Spool feature** - Manually link existing Spoolman spools to AMS trays:
+ - Hover over any AMS slot to see "Link to Spoolman" button (when Spoolman enabled)
+ - Select from list of unlinked Spoolman spools
+ - Automatically sets the `extra.tag` field in Spoolman for proper sync
+ - Useful for connecting existing Spoolman inventory to physical spools
+- **Spool UUID display** - View and copy Bambu Lab spool UUID in AMS hover card:
+ - Shows first 8 chars of UUID with copy button
+ - Full UUID copied to clipboard (with fallback for HTTP contexts)
+ - Only visible when Spoolman integration is enabled
+- **Spoolman sync feedback** - Improved sync result display:
+ - Shows count of successfully synced spools
+ - Lists skipped spools with reasons (e.g., "Non-Bambu Lab spool")
+ - Expandable list when more than 5 spools skipped
+ - Color swatches for easy identification
- **Printer control buttons** - Stop and Pause/Resume buttons on printer cards when printing:
- Stop button cancels the current print job
- Pause/Resume toggle for pausing and resuming prints
@@ -32,6 +46,13 @@ All notable changes to Bambuddy will be documented in this file.
### Changed
- **Temperature cards layout** - Refactored printer card layout with slimmer temperature displays to make room for control buttons
- **Cover image availability** - Print cover image now shown in PAUSE/PAUSED states (not just RUNNING) for skip objects modal
+- **Spoolman info banner** - Updated settings UI with clearer sync documentation
+
+### Fixed
+- **Spoolman spool creation** - Fixed 400 Bad Request error when creating new spools:
+ - Spoolman `extra` field values must be valid JSON
+ - Now properly JSON-encodes the `tag` value
+ - Affects both auto-sync and manual link operations
### Tests
- Added integration tests for printer control endpoints (stop, pause, resume)
diff --git a/backend/app/api/routes/spoolman.py b/backend/app/api/routes/spoolman.py
index a616f1804..9ee600704 100644
--- a/backend/app/api/routes/spoolman.py
+++ b/backend/app/api/routes/spoolman.py
@@ -1,21 +1,21 @@
"""Spoolman integration API routes."""
import logging
+
from fastapi import APIRouter, Depends, HTTPException
-from sqlalchemy.ext.asyncio import AsyncSession
-from sqlalchemy import select
from pydantic import BaseModel
+from sqlalchemy import select
+from sqlalchemy.ext.asyncio import AsyncSession
from backend.app.core.database import get_db
from backend.app.models.printer import Printer
from backend.app.models.settings import Settings
+from backend.app.services.printer_manager import printer_manager
from backend.app.services.spoolman import (
- SpoolmanClient,
+ close_spoolman_client,
get_spoolman_client,
init_spoolman_client,
- close_spoolman_client,
)
-from backend.app.services.printer_manager import printer_manager
logger = logging.getLogger(__name__)
@@ -30,11 +30,22 @@ class SpoolmanStatus(BaseModel):
url: str | None
+class SkippedSpool(BaseModel):
+ """Information about a skipped spool during sync."""
+
+ location: str # e.g., "AMS A1" or "External Spool"
+ reason: str # e.g., "Not a Bambu Lab spool", "Empty tray"
+ filament_type: str | None = None # e.g., "PLA", "PETG"
+ color: str | None = None # Hex color
+
+
class SyncResult(BaseModel):
"""Result of a Spoolman sync operation."""
success: bool
synced_count: int
+ skipped_count: int = 0
+ skipped: list[SkippedSpool] = []
errors: list[str]
@@ -156,6 +167,7 @@ async def sync_printer_ams(
# Sync each AMS tray to Spoolman
synced = 0
+ skipped: list[SkippedSpool] = []
errors = []
# Handle different AMS data structures
@@ -193,19 +205,28 @@ async def sync_printer_ams(
tray = client.parse_ams_tray(ams_id, tray_data)
if not tray:
- continue # Empty tray
+ continue # Empty tray - nothing to sync
- # Skip non-Bambu Lab spools (SpoolEase/third-party) - this is not an error
+ # Build location string for reporting
+ location = client.convert_ams_slot_to_location(ams_id, tray.tray_id)
+
+ # Skip non-Bambu Lab spools (SpoolEase/third-party) - track as skipped
if not client.is_bambu_lab_spool(tray.tray_uuid):
+ skipped.append(
+ SkippedSpool(
+ location=location,
+ reason="Non-Bambu Lab spool (no RFID tag)",
+ filament_type=tray.tray_type if tray.tray_type else None,
+ color=tray.tray_color[:6] if tray.tray_color else None,
+ )
+ )
continue
try:
sync_result = await client.sync_ams_tray(tray, printer.name)
if sync_result:
synced += 1
- logger.info(
- f"Synced {tray.tray_sub_brands} from {printer.name} AMS {ams_id} tray {tray.tray_id}"
- )
+ logger.info(f"Synced {tray.tray_sub_brands} from {printer.name} AMS {ams_id} tray {tray.tray_id}")
else:
# Bambu Lab spool that wasn't synced (not found in Spoolman)
errors.append(f"Spool not found in Spoolman: AMS {ams_id}:{tray.tray_id}")
@@ -217,6 +238,8 @@ async def sync_printer_ams(
return SyncResult(
success=len(errors) == 0,
synced_count=synced,
+ skipped_count=len(skipped),
+ skipped=skipped,
errors=errors,
)
@@ -240,10 +263,11 @@ async def sync_all_printers(db: AsyncSession = Depends(get_db)):
raise HTTPException(status_code=503, detail="Spoolman is not reachable")
# Get all active printers
- result = await db.execute(select(Printer).where(Printer.is_active == True))
+ result = await db.execute(select(Printer).where(Printer.is_active.is_(True)))
printers = result.scalars().all()
total_synced = 0
+ all_skipped: list[SkippedSpool] = []
all_errors = []
for printer in printers:
@@ -291,8 +315,19 @@ async def sync_all_printers(db: AsyncSession = Depends(get_db)):
if not tray:
continue
- # Skip non-Bambu Lab spools (SpoolEase/third-party) - this is not an error
+ # Build location string for reporting
+ location = f"{printer.name} - {client.convert_ams_slot_to_location(ams_id, tray.tray_id)}"
+
+ # Skip non-Bambu Lab spools (SpoolEase/third-party) - track as skipped
if not client.is_bambu_lab_spool(tray.tray_uuid):
+ all_skipped.append(
+ SkippedSpool(
+ location=location,
+ reason="Non-Bambu Lab spool (no RFID tag)",
+ filament_type=tray.tray_type if tray.tray_type else None,
+ color=tray.tray_color[:6] if tray.tray_color else None,
+ )
+ )
continue
try:
@@ -305,6 +340,8 @@ async def sync_all_printers(db: AsyncSession = Depends(get_db)):
return SyncResult(
success=len(all_errors) == 0,
synced_count=total_synced,
+ skipped_count=len(all_skipped),
+ skipped=all_skipped,
errors=all_errors,
)
@@ -349,3 +386,106 @@ async def get_filaments(db: AsyncSession = Depends(get_db)):
filaments = await client.get_filaments()
return {"filaments": filaments}
+
+
+class UnlinkedSpool(BaseModel):
+ """A Spoolman spool that is not linked to any AMS tray."""
+
+ id: int
+ filament_name: str | None
+ filament_material: str | None
+ filament_color_hex: str | None
+ remaining_weight: float | None
+ location: str | None
+
+
+@router.get("/spools/unlinked", response_model=list[UnlinkedSpool])
+async def get_unlinked_spools(db: AsyncSession = Depends(get_db)):
+ """Get all Spoolman spools that don't have a tag (not linked to AMS)."""
+ enabled, url, _ = await get_spoolman_settings(db)
+ if not enabled:
+ raise HTTPException(status_code=400, detail="Spoolman integration is not enabled")
+
+ client = await get_spoolman_client()
+ if not client:
+ if url:
+ client = await init_spoolman_client(url)
+ else:
+ raise HTTPException(status_code=400, detail="Spoolman URL is not configured")
+
+ if not await client.health_check():
+ raise HTTPException(status_code=503, detail="Spoolman is not reachable")
+
+ spools = await client.get_spools()
+ unlinked = []
+
+ for spool in spools:
+ # Check if spool has a tag in extra field
+ extra = spool.get("extra", {}) or {}
+ tag = extra.get("tag", "")
+ if not tag:
+ filament = spool.get("filament", {}) or {}
+ unlinked.append(
+ UnlinkedSpool(
+ id=spool["id"],
+ filament_name=filament.get("name"),
+ filament_material=filament.get("material"),
+ filament_color_hex=filament.get("color_hex"),
+ remaining_weight=spool.get("remaining_weight"),
+ location=spool.get("location"),
+ )
+ )
+
+ return unlinked
+
+
+class LinkSpoolRequest(BaseModel):
+ """Request to link a Spoolman spool to an AMS tray."""
+
+ tray_uuid: str
+
+
+@router.post("/spools/{spool_id}/link")
+async def link_spool(
+ spool_id: int,
+ request: LinkSpoolRequest,
+ db: AsyncSession = Depends(get_db),
+):
+ """Link a Spoolman spool to an AMS tray by setting the tag to tray_uuid."""
+ enabled, url, _ = await get_spoolman_settings(db)
+ if not enabled:
+ raise HTTPException(status_code=400, detail="Spoolman integration is not enabled")
+
+ client = await get_spoolman_client()
+ if not client:
+ if url:
+ client = await init_spoolman_client(url)
+ else:
+ raise HTTPException(status_code=400, detail="Spoolman URL is not configured")
+
+ if not await client.health_check():
+ raise HTTPException(status_code=503, detail="Spoolman is not reachable")
+
+ # Validate tray_uuid format (32 hex characters)
+ tray_uuid = request.tray_uuid.strip()
+ if len(tray_uuid) != 32:
+ raise HTTPException(status_code=400, detail="Invalid tray_uuid format (must be 32 hex characters)")
+ try:
+ int(tray_uuid, 16)
+ except ValueError:
+ raise HTTPException(status_code=400, detail="Invalid tray_uuid format (must be hex)")
+
+ # Update spool with tag
+ # Note: Spoolman extra field values must be valid JSON, so we encode the string
+ import json
+
+ result = await client.update_spool(
+ spool_id=spool_id,
+ extra={"tag": json.dumps(tray_uuid)},
+ )
+
+ if result:
+ logger.info(f"Linked Spoolman spool {spool_id} to tray_uuid {tray_uuid}")
+ return {"success": True, "message": f"Spool {spool_id} linked to AMS tray"}
+ else:
+ raise HTTPException(status_code=500, detail="Failed to update spool")
diff --git a/backend/app/services/spoolman.py b/backend/app/services/spoolman.py
index 88d4e3460..f95638b7b 100644
--- a/backend/app/services/spoolman.py
+++ b/backend/app/services/spoolman.py
@@ -2,7 +2,7 @@
import logging
from dataclasses import dataclass
-from datetime import datetime, timezone
+from datetime import UTC, datetime
import httpx
@@ -170,9 +170,7 @@ class SpoolmanClient:
"""
try:
client = await self._get_client()
- response = await client.post(
- f"{self.api_url}/vendor", json={"name": name}
- )
+ response = await client.post(f"{self.api_url}/vendor", json={"name": name})
response.raise_for_status()
return response.json()
except Exception as e:
@@ -314,7 +312,9 @@ class SpoolmanClient:
client = await self._get_client()
response = await client.post(f"{self.api_url}/spool", json=data)
response.raise_for_status()
- return response.json()
+ result = response.json()
+ logger.info(f"Created spool {result.get('id')} in Spoolman")
+ return result
except httpx.HTTPStatusError as e:
logger.error(f"Failed to create spool in Spoolman: {e}, response: {e.response.text}")
return None
@@ -350,12 +350,10 @@ class SpoolmanClient:
data["extra"] = extra
# Always update last_used
- data["last_used"] = datetime.now(timezone.utc).isoformat()
+ data["last_used"] = datetime.now(UTC).isoformat()
client = await self._get_client()
- response = await client.patch(
- f"{self.api_url}/spool/{spool_id}", json=data
- )
+ response = await client.patch(f"{self.api_url}/spool/{spool_id}", json=data)
response.raise_for_status()
return response.json()
except Exception as e:
@@ -519,9 +517,7 @@ class SpoolmanClient:
except ValueError:
return False
- def calculate_remaining_weight(
- self, remain_percent: int, spool_weight: int
- ) -> float:
+ def calculate_remaining_weight(self, remain_percent: int, spool_weight: int) -> float:
"""Calculate remaining weight from percentage.
Args:
@@ -533,9 +529,7 @@ class SpoolmanClient:
"""
return (remain_percent / 100.0) * spool_weight
- async def sync_ams_tray(
- self, tray: AMSTray, printer_name: str
- ) -> dict | None:
+ async def sync_ams_tray(self, tray: AMSTray, printer_name: str) -> dict | None:
"""Sync a single AMS tray to Spoolman.
Only syncs trays with valid Bambu Lab tray_uuid (32 hex characters).
@@ -564,9 +558,7 @@ class SpoolmanClient:
f"(tray_uuid={tray.tray_uuid}, tag_uid={tray.tag_uid})"
)
else:
- logger.debug(
- f"Skipping tray without RFID tag: AMS {tray.ams_id} tray {tray.tray_id}"
- )
+ logger.debug(f"Skipping tray without RFID tag: AMS {tray.ams_id} tray {tray.tray_id}")
return None
# Calculate remaining weight
@@ -577,9 +569,7 @@ class SpoolmanClient:
existing = await self.find_spool_by_tag(tray.tray_uuid)
if existing:
# Update existing spool
- logger.info(
- f"Updating existing spool {existing['id']} for tray_uuid {tray.tray_uuid}"
- )
+ logger.info(f"Updating existing spool {existing['id']} for tray_uuid {tray.tray_uuid}")
return await self.update_spool(
spool_id=existing["id"],
remaining_weight=remaining,
@@ -588,8 +578,7 @@ class SpoolmanClient:
# Spool not found - auto-create it
logger.info(
- f"Creating new spool in Spoolman for {tray.tray_sub_brands} "
- f"(tray_uuid: {tray.tray_uuid[:16]}...)"
+ f"Creating new spool in Spoolman for {tray.tray_sub_brands} " f"(tray_uuid: {tray.tray_uuid[:16]}...)"
)
# First find or create the filament type
@@ -599,12 +588,15 @@ class SpoolmanClient:
return None
# Create the spool with tray_uuid stored as "tag" in extra field
+ # Note: Spoolman extra field values must be valid JSON, so we encode the string
+ import json
+
return await self.create_spool(
filament_id=filament["id"],
remaining_weight=remaining,
location=location,
comment=f"Auto-created from {printer_name} AMS",
- extra={"tag": tray.tray_uuid},
+ extra={"tag": json.dumps(tray.tray_uuid)},
)
async def _find_or_create_filament(self, tray: AMSTray) -> dict | None:
@@ -624,10 +616,7 @@ class SpoolmanClient:
# Match by material and color (handle None values)
fil_material = filament.get("material") or ""
fil_color = filament.get("color_hex") or ""
- if (
- fil_material.upper() == tray.tray_type.upper()
- and fil_color.upper() == color_hex.upper()
- ):
+ if fil_material.upper() == tray.tray_type.upper() and fil_color.upper() == color_hex.upper():
return filament
# Search external filaments (Bambu library)
@@ -635,10 +624,7 @@ class SpoolmanClient:
for filament in external:
fil_material = filament.get("material") or ""
fil_color = filament.get("color_hex") or ""
- if (
- fil_material.upper() == tray.tray_type.upper()
- and fil_color.upper() == color_hex.upper()
- ):
+ if fil_material.upper() == tray.tray_type.upper() and fil_color.upper() == color_hex.upper():
# Found in external library - need to create internal copy
return await self._create_filament_from_external(filament, tray)
@@ -652,9 +638,7 @@ class SpoolmanClient:
weight=tray.tray_weight,
)
- async def _create_filament_from_external(
- self, external: dict, tray: AMSTray
- ) -> dict | None:
+ async def _create_filament_from_external(self, external: dict, tray: AMSTray) -> dict | None:
"""Create internal filament from external library entry.
Args:
diff --git a/frontend/src/api/client.ts b/frontend/src/api/client.ts
index dca7c55e4..83ab6a0cb 100644
--- a/frontend/src/api/client.ts
+++ b/frontend/src/api/client.ts
@@ -1119,12 +1119,30 @@ export interface SpoolmanStatus {
url: string | null;
}
+export interface SkippedSpool {
+ location: string;
+ reason: string;
+ filament_type: string | null;
+ color: string | null;
+}
+
export interface SpoolmanSyncResult {
success: boolean;
synced_count: number;
+ skipped_count: number;
+ skipped: SkippedSpool[];
errors: string[];
}
+export interface UnlinkedSpool {
+ id: number;
+ filament_name: string | null;
+ filament_material: string | null;
+ filament_color_hex: string | null;
+ remaining_weight: number | null;
+ location: string | null;
+}
+
// Update types
export interface VersionInfo {
version: string;
@@ -2037,6 +2055,13 @@ export const api = {
request<{ spools: unknown[] }>('/spoolman/spools'),
getSpoolmanFilaments: () =>
request<{ filaments: unknown[] }>('/spoolman/filaments'),
+ getUnlinkedSpools: () =>
+ request Linking AMS tray: Spool UUID:
+ Select a Spoolman spool to link:
+ No unlinked spools found in Spoolman. All spools are already linked to AMS trays.Link to Spoolman
+ {trayUuid}
+
How Sync Works
+Linking Existing Spools
++ To link existing Spoolman spools to your AMS, hover over an AMS slot and click "Link to Spoolman". +
+ee?(q.sortIndex=Q,e(u,q),n(c)===null&&q===n(u)&&(v?(E(N),N=-1):v=!0,K(A,Q-ee))):(q.sortIndex=J,e(c,q),x||p||(x=!0,C||(C=!0,L()))),q},t.unstable_shouldYield=j,t.unstable_wrapCallback=function(q){var $=g;return function(){var Q=g;g=$;try{return q.apply(this,arguments)}finally{g=Q}}}})(FT)),FT}var CF;function iie(){return CF||(CF=1,IT.exports=rie()),IT.exports}var UT={exports:{}},ua={};var kF;function aie(){if(kF)return ua;kF=1;var t=eg();function e(c){var u="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(),UT.exports=aie(),UT.exports}var jF;function sie(){if(jF)return px;jF=1;var t=iie(),e=eg(),n=Z9();function r(h){var m="https://react.dev/errors/"+h;if(1 J||(h.current=ee[J],ee[J]=null,J--)}function V(h,m){J++,ee[J]=h.current,h.current=m}var te=z(null),de=z(null),ue=z(null),ge=z(null);function Ee(h,m){switch(V(ue,m),V(de,h),V(te,null),m.nodeType){case 9:case 11:h=(h=m.documentElement)&&(h=h.namespaceURI)?q5(h):0;break;default:if(h=m.tagName,m=m.namespaceURI)m=q5(m),h=K5(m,h);else switch(h){case"svg":h=1;break;case"math":h=2;break;default:h=0}}G(te),V(te,h)}function pe(){G(te),G(de),G(ue)}function le(h){h.memoizedState!==null&&V(ge,h);var m=te.current,_=K5(m,h.type);m!==_&&(V(de,h),V(te,_))}function Re(h){de.current===h&&(G(te),G(de)),ge.current===h&&(G(ge),ux._currentValue=Q)}var he,Fe;function U(h){if(he===void 0)try{throw Error()}catch(_){var m=_.stack.trim().match(/\n( *(at )?)/);he=m&&m[1]||"",Fe=-1<_.stack.indexOf(` at`)?" ( )":-1<_.stack.indexOf("@")?"@unknown:0:0":""}return` -`+he+h+Fe}var z=!1;function re(h,m){if(!h||z)return"";z=!0;var _=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var S={DetermineComponentFrameRoot:function(){try{if(m){var ft=function(){throw Error()};if(Object.defineProperty(ft.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ft,[])}catch(ot){var nt=ot}Reflect.construct(h,[],ft)}else{try{ft.call()}catch(ot){nt=ot}h.call(ft.prototype)}}else{try{throw Error()}catch(ot){nt=ot}(ft=h())&&typeof ft.catch=="function"&&ft.catch(function(){})}}catch(ot){if(ot&&nt&&typeof ot.stack=="string")return[ot.stack,nt.stack]}return[null,null]}};S.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var P=Object.getOwnPropertyDescriptor(S.DetermineComponentFrameRoot,"name");P&&P.configurable&&Object.defineProperty(S.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var D=S.DetermineComponentFrameRoot(),Y=D[0],oe=D[1];if(Y&&oe){var Pe=Y.split(` -`),tt=oe.split(` -`);for(P=S=0;S P||Pe[S]!==tt[P]){var ut=` -`+Pe[S].replace(" at new "," at ");return h.displayName&&ut.includes(" ")&&(ut=ut.replace(" ",h.displayName)),ut}while(1<=S&&0<=P);break}}}finally{z=!1,Error.prepareStackTrace=_}return(_=h?h.displayName||h.name:"")?U(_):""}function q(h,m){switch(h.tag){case 26:case 27:case 5:return U(h.type);case 16:return U("Lazy");case 13:return h.child!==m&&m!==null?U("Suspense Fallback"):U("Suspense");case 19:return U("SuspenseList");case 0:case 15:return re(h.type,!1);case 11:return re(h.type.render,!1);case 1:return re(h.type,!0);case 31:return U("Activity");default:return""}}function Z(h){try{var m="",_=null;do m+=q(h,_),_=h,h=h.return;while(h);return m}catch(S){return` +`+he+h+Fe}var H=!1;function re(h,m){if(!h||H)return"";H=!0;var _=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var S={DetermineComponentFrameRoot:function(){try{if(m){var mt=function(){throw Error()};if(Object.defineProperty(mt.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(mt,[])}catch(lt){var rt=lt}Reflect.construct(h,[],mt)}else{try{mt.call()}catch(lt){rt=lt}h.call(mt.prototype)}}else{try{throw Error()}catch(lt){rt=lt}(mt=h())&&typeof mt.catch=="function"&&mt.catch(function(){})}}catch(lt){if(lt&&rt&&typeof lt.stack=="string")return[lt.stack,rt.stack]}return[null,null]}};S.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var P=Object.getOwnPropertyDescriptor(S.DetermineComponentFrameRoot,"name");P&&P.configurable&&Object.defineProperty(S.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var D=S.DetermineComponentFrameRoot(),Y=D[0],oe=D[1];if(Y&&oe){var Ce=Y.split(` +`),et=oe.split(` +`);for(P=S=0;S P||Ce[S]!==et[P]){var dt=` +`+Ce[S].replace(" at new "," at ");return h.displayName&&dt.includes(" ")&&(dt=dt.replace(" ",h.displayName)),dt}while(1<=S&&0<=P);break}}}finally{H=!1,Error.prepareStackTrace=_}return(_=h?h.displayName||h.name:"")?U(_):""}function W(h,m){switch(h.tag){case 26:case 27:case 5:return U(h.type);case 16:return U("Lazy");case 13:return h.child!==m&&m!==null?U("Suspense Fallback"):U("Suspense");case 19:return U("SuspenseList");case 0:case 15:return re(h.type,!1);case 11:return re(h.type.render,!1);case 1:return re(h.type,!0);case 31:return U("Activity");default:return""}}function Z(h){try{var m="",_=null;do m+=W(h,_),_=h,h=h.return;while(h);return m}catch(S){return` Error generating stack: `+S.message+` -`+S.stack}}var se=Object.prototype.hasOwnProperty,be=t.unstable_scheduleCallback,ke=t.unstable_cancelCallback,Ee=t.unstable_shouldYield,F=t.unstable_requestPaint,O=t.unstable_now,ne=t.unstable_getCurrentPriorityLevel,_e=t.unstable_ImmediatePriority,ve=t.unstable_UserBlockingPriority,ye=t.unstable_NormalPriority,Ke=t.unstable_LowPriority,He=t.unstable_IdlePriority,Qe=t.log,ct=t.unstable_setDisableYieldValue,ce=null,ie=null;function Ve(h){if(typeof Qe=="function"&&ct(h),ie&&typeof ie.setStrictMode=="function")try{ie.setStrictMode(ce,h)}catch{}}var Be=Math.clz32?Math.clz32:fe,et=Math.log,dt=Math.LN2;function fe(h){return h>>>=0,h===0?32:31-(et(h)/dt|0)|0}var Ye=256,xe=262144,Se=4194304;function Ne(h){var m=h&42;if(m!==0)return m;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 we(h,m,_){var S=h.pendingLanes;if(S===0)return 0;var P=0,D=h.suspendedLanes,Y=h.pingedLanes;h=h.warmLanes;var oe=S&134217727;return oe!==0?(S=oe&~D,S!==0?P=Ne(S):(Y&=oe,Y!==0?P=Ne(Y):_||(_=oe&~h,_!==0&&(P=Ne(_))))):(oe=S&~D,oe!==0?P=Ne(oe):Y!==0?P=Ne(Y):_||(_=S&~h,_!==0&&(P=Ne(_)))),P===0?0:m!==0&&m!==P&&(m&D)===0&&(D=P&-P,_=m&-m,D>=_||D===32&&(_&4194048)!==0)?m:P}function Te(h,m){return(h.pendingLanes&~(h.suspendedLanes&~h.pingedLanes)&m)===0}function rt(h,m){switch(h){case 1:case 2:case 4:case 8:case 64:return m+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 m+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 mt(){var h=Se;return Se<<=1,(Se&62914560)===0&&(Se=4194304),h}function At(h){for(var m=[],_=0;31>_;_++)m.push(h);return m}function Bt(h,m){h.pendingLanes|=m,m!==268435456&&(h.suspendedLanes=0,h.pingedLanes=0,h.warmLanes=0)}function Dt(h,m,_,S,P,D){var Y=h.pendingLanes;h.pendingLanes=_,h.suspendedLanes=0,h.pingedLanes=0,h.warmLanes=0,h.expiredLanes&=_,h.entangledLanes&=_,h.errorRecoveryDisabledLanes&=_,h.shellSuspendCounter=0;var oe=h.entanglements,Pe=h.expirationTimes,tt=h.hiddenUpdates;for(_=Y&~_;0<_;){var ut=31-Be(_),ft=1< "u")return null;try{return h.activeElement||h.body}catch{return h.body}}var qr=/[\n"\\]/g;function Un(h){return h.replace(qr,function(m){return"\\"+m.charCodeAt(0).toString(16)+" "})}function vo(h,m,_,S,P,D,Y,oe){h.name="",Y!=null&&typeof Y!="function"&&typeof Y!="symbol"&&typeof Y!="boolean"?h.type=Y:h.removeAttribute("type"),m!=null?Y==="number"?(m===0&&h.value===""||h.value!=m)&&(h.value=""+xn(m)):h.value!==""+xn(m)&&(h.value=""+xn(m)):Y!=="submit"&&Y!=="reset"||h.removeAttribute("value"),m!=null?Pi(h,Y,xn(m)):_!=null?Pi(h,Y,xn(_)):S!=null&&h.removeAttribute("value"),P==null&&D!=null&&(h.defaultChecked=!!D),P!=null&&(h.checked=P&&typeof P!="function"&&typeof P!="symbol"),oe!=null&&typeof oe!="function"&&typeof oe!="symbol"&&typeof oe!="boolean"?h.name=""+xn(oe):h.removeAttribute("name")}function $n(h,m,_,S,P,D,Y,oe){if(D!=null&&typeof D!="function"&&typeof D!="symbol"&&typeof D!="boolean"&&(h.type=D),m!=null||_!=null){if(!(D!=="submit"&&D!=="reset"||m!=null)){rn(h);return}_=_!=null?""+xn(_):"",m=m!=null?""+xn(m):_,oe||m===h.value||(h.value=m),h.defaultValue=m}S=S??P,S=typeof S!="function"&&typeof S!="symbol"&&!!S,h.checked=oe?h.checked:!!S,h.defaultChecked=!!S,Y!=null&&typeof Y!="function"&&typeof Y!="symbol"&&typeof Y!="boolean"&&(h.name=Y),rn(h)}function Pi(h,m,_){m==="number"&&Fr(h.ownerDocument)===h||h.defaultValue===""+_||(h.defaultValue=""+_)}function pi(h,m,_,S){if(h=h.options,m){m={};for(var P=0;P<_.length;P++)m["$"+_[P]]=!0;for(_=0;_ "u"||typeof window.document>"u"||typeof window.document.createElement>"u"),RE=!1;if(Il)try{var Ag={};Object.defineProperty(Ag,"passive",{get:function(){RE=!0}}),window.addEventListener("test",Ag,Ag),window.removeEventListener("test",Ag,Ag)}catch{RE=!1}var tu=null,DE=null,py=null;function KL(){if(py)return py;var h,m=DE,_=m.length,S,P="value"in tu?tu.value:tu.textContent,D=P.length;for(h=0;h<_&&m[h]===P[h];h++);var Y=_-h;for(S=1;S<=Y&&m[_-S]===P[D-S];S++);return py=P.slice(h,1 =kg),e4=" ",t4=!1;function n4(h,m){switch(h){case"keyup":return vne.indexOf(m.keyCode)!==-1;case"keydown":return m.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function r4(h){return h=h.detail,typeof h=="object"&&"data"in h?h.data:null}var Pf=!1;function wne(h,m){switch(h){case"compositionend":return r4(m);case"keypress":return m.which!==32?null:(t4=!0,e4);case"textInput":return h=m.data,h===e4&&t4?null:h;default:return null}}function Sne(h,m){if(Pf)return h==="compositionend"||!UE&&n4(h,m)?(h=KL(),py=DE=tu=null,Pf=!1,h):null;switch(h){case"paste":return null;case"keypress":if(!(m.ctrlKey||m.altKey||m.metaKey)||m.ctrlKey&&m.altKey){if(m.char&&1=m)return{node:_,offset:m-h};h=S}e:{for(;_;){if(_.nextSibling){_=_.nextSibling;break e}_=_.parentNode}_=void 0}_=d4(_)}}function f4(h,m){return h&&m?h===m?!0:h&&h.nodeType===3?!1:m&&m.nodeType===3?f4(h,m.parentNode):"contains"in h?h.contains(m):h.compareDocumentPosition?!!(h.compareDocumentPosition(m)&16):!1:!1}function m4(h){h=h!=null&&h.ownerDocument!=null&&h.ownerDocument.defaultView!=null?h.ownerDocument.defaultView:window;for(var m=Fr(h.document);m instanceof h.HTMLIFrameElement;){try{var _=typeof m.contentWindow.location.href=="string"}catch{_=!1}if(_)h=m.contentWindow;else break;m=Fr(h.document)}return m}function HE(h){var m=h&&h.nodeName&&h.nodeName.toLowerCase();return m&&(m==="input"&&(h.type==="text"||h.type==="search"||h.type==="tel"||h.type==="url"||h.type==="password")||m==="textarea"||h.contentEditable==="true")}var Pne=Il&&"documentMode"in document&&11>=document.documentMode,jf=null,$E=null,Dg=null,VE=!1;function p4(h,m,_){var S=_.window===_?_.document:_.nodeType===9?_:_.ownerDocument;VE||jf==null||jf!==Fr(S)||(S=jf,"selectionStart"in S&&HE(S)?S={start:S.selectionStart,end:S.selectionEnd}:(S=(S.ownerDocument&&S.ownerDocument.defaultView||window).getSelection(),S={anchorNode:S.anchorNode,anchorOffset:S.anchorOffset,focusNode:S.focusNode,focusOffset:S.focusOffset}),Dg&&Rg(Dg,S)||(Dg=S,S=lv($E,"onSelect"),0 >=Y,P-=Y,Xo=1<<32-Be(m)+P|_< ln?(En=Ut,Ut=null):En=Ut.sibling;var Rn=nt(Ge,Ut,Je[ln],ht);if(Rn===null){Ut===null&&(Ut=En);break}h&&Ut&&Rn.alternate===null&&m(Ge,Ut),Le=D(Rn,Le,ln),jn===null?Vt=Rn:jn.sibling=Rn,jn=Rn,Ut=En}if(ln===Je.length)return _(Ge,Ut),Nn&&Ul(Ge,ln),Vt;if(Ut===null){for(;ln
ln?(En=Ut,Ut=null):En=Ut.sibling;var Su=nt(Ge,Ut,Rn.value,ht);if(Su===null){Ut===null&&(Ut=En);break}h&&Ut&&Su.alternate===null&&m(Ge,Ut),Le=D(Su,Le,ln),jn===null?Vt=Su:jn.sibling=Su,jn=Su,Ut=En}if(Rn.done)return _(Ge,Ut),Nn&&Ul(Ge,ln),Vt;if(Ut===null){for(;!Rn.done;ln++,Rn=Je.next())Rn=ft(Ge,Rn.value,ht),Rn!==null&&(Le=D(Rn,Le,ln),jn===null?Vt=Rn:jn.sibling=Rn,jn=Rn);return Nn&&Ul(Ge,ln),Vt}for(Ut=S(Ut);!Rn.done;ln++,Rn=Je.next())Rn=ot(Ut,Ge,ln,Rn.value,ht),Rn!==null&&(h&&Rn.alternate!==null&&Ut.delete(Rn.key===null?ln:Rn.key),Le=D(Rn,Le,ln),jn===null?Vt=Rn:jn.sibling=Rn,jn=Rn);return h&&Ut.forEach(function(Zre){return m(Ge,Zre)}),Nn&&Ul(Ge,ln),Vt}function er(Ge,Le,Je,ht){if(typeof Je=="object"&&Je!==null&&Je.type===v&&Je.key===null&&(Je=Je.props.children),typeof Je=="object"&&Je!==null){switch(Je.$$typeof){case p:e:{for(var Vt=Je.key;Le!==null;){if(Le.key===Vt){if(Vt=Je.type,Vt===v){if(Le.tag===7){_(Ge,Le.sibling),ht=P(Le,Je.props.children),ht.return=Ge,Ge=ht;break e}}else if(Le.elementType===Vt||typeof Vt=="object"&&Vt!==null&&Vt.$$typeof===I&&Gd(Vt)===Le.type){_(Ge,Le.sibling),ht=P(Le,Je.props),zg(ht,Je),ht.return=Ge,Ge=ht;break e}_(Ge,Le);break}else m(Ge,Le);Le=Le.sibling}Je.type===v?(ht=zd(Je.props.children,Ge.mode,ht,Je.key),ht.return=Ge,Ge=ht):(ht=Ey(Je.type,Je.key,Je.props,null,Ge.mode,ht),zg(ht,Je),ht.return=Ge,Ge=ht)}return Y(Ge);case x:e:{for(Vt=Je.key;Le!==null;){if(Le.key===Vt)if(Le.tag===4&&Le.stateNode.containerInfo===Je.containerInfo&&Le.stateNode.implementation===Je.implementation){_(Ge,Le.sibling),ht=P(Le,Je.children||[]),ht.return=Ge,Ge=ht;break e}else{_(Ge,Le);break}else m(Ge,Le);Le=Le.sibling}ht=ZE(Je,Ge.mode,ht),ht.return=Ge,Ge=ht}return Y(Ge);case I:return Je=Gd(Je),er(Ge,Le,Je,ht)}if(V(Je))return It(Ge,Le,Je,ht);if(L(Je)){if(Vt=L(Je),typeof Vt!="function")throw Error(r(150));return Je=Vt.call(Je),Yt(Ge,Le,Je,ht)}if(typeof Je.then=="function")return er(Ge,Le,jy(Je),ht);if(Je.$$typeof===w)return er(Ge,Le,Ny(Ge,Je),ht);Ry(Ge,Je)}return typeof Je=="string"&&Je!==""||typeof Je=="number"||typeof Je=="bigint"?(Je=""+Je,Le!==null&&Le.tag===6?(_(Ge,Le.sibling),ht=P(Le,Je),ht.return=Ge,Ge=ht):(_(Ge,Le),ht=YE(Je,Ge.mode,ht),ht.return=Ge,Ge=ht),Y(Ge)):_(Ge,Le)}return function(Ge,Le,Je,ht){try{Ug=0;var Vt=er(Ge,Le,Je,ht);return $f=null,Vt}catch(Ut){if(Ut===Hf||Ut===ky)throw Ut;var jn=ds(29,Ut,null,Ge.mode);return jn.lanes=ht,jn.return=Ge,jn}finally{}}}var qd=F4(!0),U4=F4(!1),su=!1;function c2(h){h.updateQueue={baseState:h.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function u2(h,m){h=h.updateQueue,m.updateQueue===h&&(m.updateQueue={baseState:h.baseState,firstBaseUpdate:h.firstBaseUpdate,lastBaseUpdate:h.lastBaseUpdate,shared:h.shared,callbacks:null})}function ou(h){return{lane:h,tag:0,payload:null,callback:null,next:null}}function lu(h,m,_){var S=h.updateQueue;if(S===null)return null;if(S=S.shared,(In&2)!==0){var P=S.pending;return P===null?m.next=m:(m.next=P.next,P.next=m),S.pending=m,m=My(h),w4(h,null,_),m}return Sy(h,S,m,_),My(h)}function Bg(h,m,_){if(m=m.updateQueue,m!==null&&(m=m.shared,(_&4194048)!==0)){var S=m.lanes;S&=h.pendingLanes,_|=S,m.lanes=_,zt(h,_)}}function d2(h,m){var _=h.updateQueue,S=h.alternate;if(S!==null&&(S=S.updateQueue,_===S)){var P=null,D=null;if(_=_.firstBaseUpdate,_!==null){do{var Y={lane:_.lane,tag:_.tag,payload:_.payload,callback:null,next:null};D===null?P=D=Y:D=D.next=Y,_=_.next}while(_!==null);D===null?P=D=m:D=D.next=m}else P=D=m;_={baseState:S.baseState,firstBaseUpdate:P,lastBaseUpdate:D,shared:S.shared,callbacks:S.callbacks},h.updateQueue=_;return}h=_.lastBaseUpdate,h===null?_.firstBaseUpdate=m:h.next=m,_.lastBaseUpdate=m}var h2=!1;function Hg(){if(h2){var h=Bf;if(h!==null)throw h}}function $g(h,m,_,S){h2=!1;var P=h.updateQueue;su=!1;var D=P.firstBaseUpdate,Y=P.lastBaseUpdate,oe=P.shared.pending;if(oe!==null){P.shared.pending=null;var Pe=oe,tt=Pe.next;Pe.next=null,Y===null?D=tt:Y.next=tt,Y=Pe;var ut=h.alternate;ut!==null&&(ut=ut.updateQueue,oe=ut.lastBaseUpdate,oe!==Y&&(oe===null?ut.firstBaseUpdate=tt:oe.next=tt,ut.lastBaseUpdate=Pe))}if(D!==null){var ft=P.baseState;Y=0,ut=tt=Pe=null,oe=D;do{var nt=oe.lane&-536870913,ot=nt!==oe.lane;if(ot?(Mn&nt)===nt:(S&nt)===nt){nt!==0&&nt===zf&&(h2=!0),ut!==null&&(ut=ut.next={lane:0,tag:oe.tag,payload:oe.payload,callback:null,next:null});e:{var It=h,Yt=oe;nt=m;var er=_;switch(Yt.tag){case 1:if(It=Yt.payload,typeof It=="function"){ft=It.call(er,ft,nt);break e}ft=It;break e;case 3:It.flags=It.flags&-65537|128;case 0:if(It=Yt.payload,nt=typeof It=="function"?It.call(er,ft,nt):It,nt==null)break e;ft=f({},ft,nt);break e;case 2:su=!0}}nt=oe.callback,nt!==null&&(h.flags|=64,ot&&(h.flags|=8192),ot=P.callbacks,ot===null?P.callbacks=[nt]:ot.push(nt))}else ot={lane:nt,tag:oe.tag,payload:oe.payload,callback:oe.callback,next:null},ut===null?(tt=ut=ot,Pe=ft):ut=ut.next=ot,Y|=nt;if(oe=oe.next,oe===null){if(oe=P.shared.pending,oe===null)break;ot=oe,oe=ot.next,ot.next=null,P.lastBaseUpdate=ot,P.shared.pending=null}}while(!0);ut===null&&(Pe=ft),P.baseState=Pe,P.firstBaseUpdate=tt,P.lastBaseUpdate=ut,D===null&&(P.shared.lanes=0),fu|=Y,h.lanes=Y,h.memoizedState=ft}}function z4(h,m){if(typeof h!="function")throw Error(r(191,h));h.call(m)}function B4(h,m){var _=h.callbacks;if(_!==null)for(h.callbacks=null,h=0;h<_.length;h++)z4(_[h],m)}var Vf=B(null),Dy=B(0);function H4(h,m){h=Yl,J(Dy,h),J(Vf,m),Yl=h|m.baseLanes}function f2(){J(Dy,Yl),J(Vf,Vf.current)}function m2(){Yl=Dy.current,G(Vf),G(Dy)}var hs=B(null),zs=null;function cu(h){var m=h.alternate;J(Kr,Kr.current&1),J(hs,h),zs===null&&(m===null||Vf.current!==null||m.memoizedState!==null)&&(zs=h)}function p2(h){J(Kr,Kr.current),J(hs,h),zs===null&&(zs=h)}function $4(h){h.tag===22?(J(Kr,Kr.current),J(hs,h),zs===null&&(zs=h)):uu()}function uu(){J(Kr,Kr.current),J(hs,hs.current)}function fs(h){G(hs),zs===h&&(zs=null),G(Kr)}var Kr=B(0);function Oy(h){for(var m=h;m!==null;){if(m.tag===13){var _=m.memoizedState;if(_!==null&&(_=_.dehydrated,_===null||_T(_)||wT(_)))return m}else if(m.tag===19&&(m.memoizedProps.revealOrder==="forwards"||m.memoizedProps.revealOrder==="backwards"||m.memoizedProps.revealOrder==="unstable_legacy-backwards"||m.memoizedProps.revealOrder==="together")){if((m.flags&128)!==0)return m}else if(m.child!==null){m.child.return=m,m=m.child;continue}if(m===h)break;for(;m.sibling===null;){if(m.return===null||m.return===h)return null;m=m.return}m.sibling.return=m.return,m=m.sibling}return null}var Hl=0,on=null,Qn=null,ni=null,Ly=!1,Gf=!1,Kd=!1,Iy=0,Vg=0,Wf=null,Bne=0;function Ur(){throw Error(r(321))}function g2(h,m){if(m===null)return!1;for(var _=0;_ D?D:8;var Y=X.T,oe={};X.T=oe,P2(h,!1,m,_);try{var Pe=P(),tt=X.S;if(tt!==null&&tt(oe,Pe),Pe!==null&&typeof Pe=="object"&&typeof Pe.then=="function"){var ut=zne(Pe,S);Wg(h,m,ut,gs(h))}else Wg(h,m,S,gs(h))}catch(ft){Wg(h,m,{then:function(){},status:"rejected",reason:ft},gs())}finally{W.p=D,Y!==null&&oe.types!==null&&(Y.types=oe.types),X.T=Y}}function Wne(){}function C2(h,m,_,S){if(h.tag!==5)throw Error(r(476));var P=yI(h).queue;bI(h,P,m,Q,_===null?Wne:function(){return vI(h),_(S)})}function yI(h){var m=h.memoizedState;if(m!==null)return m;m={memoizedState:Q,baseState:Q,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:$l,lastRenderedState:Q},next:null};var _={};return m.next={memoizedState:_,baseState:_,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:$l,lastRenderedState:_},next:null},h.memoizedState=m,h=h.alternate,h!==null&&(h.memoizedState=m),m}function vI(h){var m=yI(h);m.next===null&&(m=h.alternate.memoizedState),Wg(h,m.next.queue,{},gs())}function k2(){return Xi(cx)}function _I(){return Xr().memoizedState}function wI(){return Xr().memoizedState}function qne(h){for(var m=h.return;m!==null;){switch(m.tag){case 24:case 3:var _=gs();h=ou(_);var S=lu(m,h,_);S!==null&&(Wa(S,m,_),Bg(S,m,_)),m={cache:a2()},h.payload=m;return}m=m.return}}function Kne(h,m,_){var S=gs();_={lane:S,revertLane:0,gesture:null,action:_,hasEagerState:!1,eagerState:null,next:null},$y(h)?MI(m,_):(_=KE(h,m,_,S),_!==null&&(Wa(_,h,S),EI(_,m,S)))}function SI(h,m,_){var S=gs();Wg(h,m,_,S)}function Wg(h,m,_,S){var P={lane:S,revertLane:0,gesture:null,action:_,hasEagerState:!1,eagerState:null,next:null};if($y(h))MI(m,P);else{var D=h.alternate;if(h.lanes===0&&(D===null||D.lanes===0)&&(D=m.lastRenderedReducer,D!==null))try{var Y=m.lastRenderedState,oe=D(Y,_);if(P.hasEagerState=!0,P.eagerState=oe,us(oe,Y))return Sy(h,m,P,0),ur===null&&wy(),!1}catch{}finally{}if(_=KE(h,m,P,S),_!==null)return Wa(_,h,S),EI(_,m,S),!0}return!1}function P2(h,m,_,S){if(S={lane:2,revertLane:cT(),gesture:null,action:S,hasEagerState:!1,eagerState:null,next:null},$y(h)){if(m)throw Error(r(479))}else m=KE(h,_,S,2),m!==null&&Wa(m,h,2)}function $y(h){var m=h.alternate;return h===on||m!==null&&m===on}function MI(h,m){Gf=Ly=!0;var _=h.pending;_===null?m.next=m:(m.next=_.next,_.next=m),h.pending=m}function EI(h,m,_){if((_&4194048)!==0){var S=m.lanes;S&=h.pendingLanes,_|=S,m.lanes=_,zt(h,_)}}var qg={readContext:Xi,use:Uy,useCallback:Ur,useContext:Ur,useEffect:Ur,useImperativeHandle:Ur,useLayoutEffect:Ur,useInsertionEffect:Ur,useMemo:Ur,useReducer:Ur,useRef:Ur,useState:Ur,useDebugValue:Ur,useDeferredValue:Ur,useTransition:Ur,useSyncExternalStore:Ur,useId:Ur,useHostTransitionStatus:Ur,useFormState:Ur,useActionState:Ur,useOptimistic:Ur,useMemoCache:Ur,useCacheRefresh:Ur};qg.useEffectEvent=Ur;var TI={readContext:Xi,use:Uy,useCallback:function(h,m){return Ea().memoizedState=[h,m===void 0?null:m],h},useContext:Xi,useEffect:cI,useImperativeHandle:function(h,m,_){_=_!=null?_.concat([h]):null,By(4194308,4,fI.bind(null,m,h),_)},useLayoutEffect:function(h,m){return By(4194308,4,h,m)},useInsertionEffect:function(h,m){By(4,2,h,m)},useMemo:function(h,m){var _=Ea();m=m===void 0?null:m;var S=h();if(Kd){Ve(!0);try{h()}finally{Ve(!1)}}return _.memoizedState=[S,m],S},useReducer:function(h,m,_){var S=Ea();if(_!==void 0){var P=_(m);if(Kd){Ve(!0);try{_(m)}finally{Ve(!1)}}}else P=m;return S.memoizedState=S.baseState=P,h={pending:null,lanes:0,dispatch:null,lastRenderedReducer:h,lastRenderedState:P},S.queue=h,h=h.dispatch=Kne.bind(null,on,h),[S.memoizedState,h]},useRef:function(h){var m=Ea();return h={current:h},m.memoizedState=h},useState:function(h){h=M2(h);var m=h.queue,_=SI.bind(null,on,m);return m.dispatch=_,[h.memoizedState,_]},useDebugValue:A2,useDeferredValue:function(h,m){var _=Ea();return N2(_,h,m)},useTransition:function(){var h=M2(!1);return h=bI.bind(null,on,h.queue,!0,!1),Ea().memoizedState=h,[!1,h]},useSyncExternalStore:function(h,m,_){var S=on,P=Ea();if(Nn){if(_===void 0)throw Error(r(407));_=_()}else{if(_=m(),ur===null)throw Error(r(349));(Mn&127)!==0||q4(S,m,_)}P.memoizedState=_;var D={value:_,getSnapshot:m};return P.queue=D,cI(X4.bind(null,S,D,h),[h]),S.flags|=2048,qf(9,{destroy:void 0},K4.bind(null,S,D,_,m),null),_},useId:function(){var h=Ea(),m=ur.identifierPrefix;if(Nn){var _=Yo,S=Xo;_=(S&~(1<<32-Be(S)-1)).toString(32)+_,m="_"+m+"R_"+_,_=Iy++,0<_&&(m+="H"+_.toString(32)),m+="_"}else _=Bne++,m="_"+m+"r_"+_.toString(32)+"_";return h.memoizedState=m},useHostTransitionStatus:k2,useFormState:iI,useActionState:iI,useOptimistic:function(h){var m=Ea();m.memoizedState=m.baseState=h;var _={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return m.queue=_,m=P2.bind(null,on,!0,_),_.dispatch=m,[h,m]},useMemoCache:_2,useCacheRefresh:function(){return Ea().memoizedState=qne.bind(null,on)},useEffectEvent:function(h){var m=Ea(),_={impl:h};return m.memoizedState=_,function(){if((In&2)!==0)throw Error(r(440));return _.impl.apply(void 0,arguments)}}},j2={readContext:Xi,use:Uy,useCallback:pI,useContext:Xi,useEffect:T2,useImperativeHandle:mI,useInsertionEffect:dI,useLayoutEffect:hI,useMemo:gI,useReducer:zy,useRef:lI,useState:function(){return zy($l)},useDebugValue:A2,useDeferredValue:function(h,m){var _=Xr();return xI(_,Qn.memoizedState,h,m)},useTransition:function(){var h=zy($l)[0],m=Xr().memoizedState;return[typeof h=="boolean"?h:Gg(h),m]},useSyncExternalStore:W4,useId:_I,useHostTransitionStatus:k2,useFormState:aI,useActionState:aI,useOptimistic:function(h,m){var _=Xr();return Q4(_,Qn,h,m)},useMemoCache:_2,useCacheRefresh:wI};j2.useEffectEvent=uI;var AI={readContext:Xi,use:Uy,useCallback:pI,useContext:Xi,useEffect:T2,useImperativeHandle:mI,useInsertionEffect:dI,useLayoutEffect:hI,useMemo:gI,useReducer:S2,useRef:lI,useState:function(){return S2($l)},useDebugValue:A2,useDeferredValue:function(h,m){var _=Xr();return Qn===null?N2(_,h,m):xI(_,Qn.memoizedState,h,m)},useTransition:function(){var h=S2($l)[0],m=Xr().memoizedState;return[typeof h=="boolean"?h:Gg(h),m]},useSyncExternalStore:W4,useId:_I,useHostTransitionStatus:k2,useFormState:oI,useActionState:oI,useOptimistic:function(h,m){var _=Xr();return Qn!==null?Q4(_,Qn,h,m):(_.baseState=h,[h,_.queue.dispatch])},useMemoCache:_2,useCacheRefresh:wI};AI.useEffectEvent=uI;function R2(h,m,_,S){m=h.memoizedState,_=_(S,m),_=_==null?m:f({},m,_),h.memoizedState=_,h.lanes===0&&(h.updateQueue.baseState=_)}var D2={enqueueSetState:function(h,m,_){h=h._reactInternals;var S=gs(),P=ou(S);P.payload=m,_!=null&&(P.callback=_),m=lu(h,P,S),m!==null&&(Wa(m,h,S),Bg(m,h,S))},enqueueReplaceState:function(h,m,_){h=h._reactInternals;var S=gs(),P=ou(S);P.tag=1,P.payload=m,_!=null&&(P.callback=_),m=lu(h,P,S),m!==null&&(Wa(m,h,S),Bg(m,h,S))},enqueueForceUpdate:function(h,m){h=h._reactInternals;var _=gs(),S=ou(_);S.tag=2,m!=null&&(S.callback=m),m=lu(h,S,_),m!==null&&(Wa(m,h,_),Bg(m,h,_))}};function NI(h,m,_,S,P,D,Y){return h=h.stateNode,typeof h.shouldComponentUpdate=="function"?h.shouldComponentUpdate(S,D,Y):m.prototype&&m.prototype.isPureReactComponent?!Rg(_,S)||!Rg(P,D):!0}function CI(h,m,_,S){h=m.state,typeof m.componentWillReceiveProps=="function"&&m.componentWillReceiveProps(_,S),typeof m.UNSAFE_componentWillReceiveProps=="function"&&m.UNSAFE_componentWillReceiveProps(_,S),m.state!==h&&D2.enqueueReplaceState(m,m.state,null)}function Xd(h,m){var _=m;if("ref"in m){_={};for(var S in m)S!=="ref"&&(_[S]=m[S])}if(h=h.defaultProps){_===m&&(_=f({},_));for(var P in h)_[P]===void 0&&(_[P]=h[P])}return _}function kI(h){_y(h)}function PI(h){console.error(h)}function jI(h){_y(h)}function Vy(h,m){try{var _=h.onUncaughtError;_(m.value,{componentStack:m.stack})}catch(S){setTimeout(function(){throw S})}}function RI(h,m,_){try{var S=h.onCaughtError;S(_.value,{componentStack:_.stack,errorBoundary:m.tag===1?m.stateNode:null})}catch(P){setTimeout(function(){throw P})}}function O2(h,m,_){return _=ou(_),_.tag=3,_.payload={element:null},_.callback=function(){Vy(h,m)},_}function DI(h){return h=ou(h),h.tag=3,h}function OI(h,m,_,S){var P=_.type.getDerivedStateFromError;if(typeof P=="function"){var D=S.value;h.payload=function(){return P(D)},h.callback=function(){RI(m,_,S)}}var Y=_.stateNode;Y!==null&&typeof Y.componentDidCatch=="function"&&(h.callback=function(){RI(m,_,S),typeof P!="function"&&(mu===null?mu=new Set([this]):mu.add(this));var oe=S.stack;this.componentDidCatch(S.value,{componentStack:oe!==null?oe:""})})}function Xne(h,m,_,S,P){if(_.flags|=32768,S!==null&&typeof S=="object"&&typeof S.then=="function"){if(m=_.alternate,m!==null&&Uf(m,_,P,!0),_=hs.current,_!==null){switch(_.tag){case 31:case 13:return zs===null?nv():_.alternate===null&&zr===0&&(zr=3),_.flags&=-257,_.flags|=65536,_.lanes=P,S===Py?_.flags|=16384:(m=_.updateQueue,m===null?_.updateQueue=new Set([S]):m.add(S),sT(h,S,P)),!1;case 22:return _.flags|=65536,S===Py?_.flags|=16384:(m=_.updateQueue,m===null?(m={transitions:null,markerInstances:null,retryQueue:new Set([S])},_.updateQueue=m):(_=m.retryQueue,_===null?m.retryQueue=new Set([S]):_.add(S)),sT(h,S,P)),!1}throw Error(r(435,_.tag))}return sT(h,S,P),nv(),!1}if(Nn)return m=hs.current,m!==null?((m.flags&65536)===0&&(m.flags|=256),m.flags|=65536,m.lanes=P,S!==e2&&(h=Error(r(422),{cause:S}),Lg(Ls(h,_)))):(S!==e2&&(m=Error(r(423),{cause:S}),Lg(Ls(m,_))),h=h.current.alternate,h.flags|=65536,P&=-P,h.lanes|=P,S=Ls(S,_),P=O2(h.stateNode,S,P),d2(h,P),zr!==4&&(zr=2)),!1;var D=Error(r(520),{cause:S});if(D=Ls(D,_),tx===null?tx=[D]:tx.push(D),zr!==4&&(zr=2),m===null)return!0;S=Ls(S,_),_=m;do{switch(_.tag){case 3:return _.flags|=65536,h=P&-P,_.lanes|=h,h=O2(_.stateNode,S,h),d2(_,h),!1;case 1:if(m=_.type,D=_.stateNode,(_.flags&128)===0&&(typeof m.getDerivedStateFromError=="function"||D!==null&&typeof D.componentDidCatch=="function"&&(mu===null||!mu.has(D))))return _.flags|=65536,P&=-P,_.lanes|=P,P=DI(P),OI(P,h,_,S),d2(_,P),!1}_=_.return}while(_!==null);return!1}var L2=Error(r(461)),ri=!1;function Yi(h,m,_,S){m.child=h===null?U4(m,null,_,S):qd(m,h.child,_,S)}function LI(h,m,_,S,P){_=_.render;var D=m.ref;if("ref"in S){var Y={};for(var oe in S)oe!=="ref"&&(Y[oe]=S[oe])}else Y=S;return $d(m),S=x2(h,m,_,Y,D,P),oe=b2(),h!==null&&!ri?(y2(h,m,P),Vl(h,m,P)):(Nn&&oe&&QE(m),m.flags|=1,Yi(h,m,S,P),m.child)}function II(h,m,_,S,P){if(h===null){var D=_.type;return typeof D=="function"&&!XE(D)&&D.defaultProps===void 0&&_.compare===null?(m.tag=15,m.type=D,FI(h,m,D,S,P)):(h=Ey(_.type,null,S,m,m.mode,P),h.ref=m.ref,h.return=m,m.child=h)}if(D=h.child,!V2(h,P)){var Y=D.memoizedProps;if(_=_.compare,_=_!==null?_:Rg,_(Y,S)&&h.ref===m.ref)return Vl(h,m,P)}return m.flags|=1,h=Fl(D,S),h.ref=m.ref,h.return=m,m.child=h}function FI(h,m,_,S,P){if(h!==null){var D=h.memoizedProps;if(Rg(D,S)&&h.ref===m.ref)if(ri=!1,m.pendingProps=S=D,V2(h,P))(h.flags&131072)!==0&&(ri=!0);else return m.lanes=h.lanes,Vl(h,m,P)}return I2(h,m,_,S,P)}function UI(h,m,_,S){var P=S.children,D=h!==null?h.memoizedState:null;if(h===null&&m.stateNode===null&&(m.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),S.mode==="hidden"){if((m.flags&128)!==0){if(D=D!==null?D.baseLanes|_:_,h!==null){for(S=m.child=h.child,P=0;S!==null;)P=P|S.lanes|S.childLanes,S=S.sibling;S=P&~D}else S=0,m.child=null;return zI(h,m,D,_,S)}if((_&536870912)!==0)m.memoizedState={baseLanes:0,cachePool:null},h!==null&&Cy(m,D!==null?D.cachePool:null),D!==null?H4(m,D):f2(),$4(m);else return S=m.lanes=536870912,zI(h,m,D!==null?D.baseLanes|_:_,_,S)}else D!==null?(Cy(m,D.cachePool),H4(m,D),uu(),m.memoizedState=null):(h!==null&&Cy(m,null),f2(),uu());return Yi(h,m,P,_),m.child}function Kg(h,m){return h!==null&&h.tag===22||m.stateNode!==null||(m.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),m.sibling}function zI(h,m,_,S,P){var D=o2();return D=D===null?null:{parent:ti._currentValue,pool:D},m.memoizedState={baseLanes:_,cachePool:D},h!==null&&Cy(m,null),f2(),$4(m),h!==null&&Uf(h,m,S,!0),m.childLanes=P,null}function Gy(h,m){return m=qy({mode:m.mode,children:m.children},h.mode),m.ref=h.ref,h.child=m,m.return=h,m}function BI(h,m,_){return qd(m,h.child,null,_),h=Gy(m,m.pendingProps),h.flags|=2,fs(m),m.memoizedState=null,h}function Yne(h,m,_){var S=m.pendingProps,P=(m.flags&128)!==0;if(m.flags&=-129,h===null){if(Nn){if(S.mode==="hidden")return h=Gy(m,S),m.lanes=536870912,Kg(null,h);if(p2(m),(h=yr)?(h=J5(h,Us),h=h!==null&&h.data==="&"?h:null,h!==null&&(m.memoizedState={dehydrated:h,treeContext:nu!==null?{id:Xo,overflow:Yo}:null,retryLane:536870912,hydrationErrors:null},_=M4(h),_.return=m,m.child=_,Ki=m,yr=null)):h=null,h===null)throw iu(m);return m.lanes=536870912,null}return Gy(m,S)}var D=h.memoizedState;if(D!==null){var Y=D.dehydrated;if(p2(m),P)if(m.flags&256)m.flags&=-257,m=BI(h,m,_);else if(m.memoizedState!==null)m.child=h.child,m.flags|=128,m=null;else throw Error(r(558));else if(ri||Uf(h,m,_,!1),P=(_&h.childLanes)!==0,ri||P){if(S=ur,S!==null&&(Y=Bn(S,_),Y!==0&&Y!==D.retryLane))throw D.retryLane=Y,Ud(h,Y),Wa(S,h,Y),L2;nv(),m=BI(h,m,_)}else h=D.treeContext,yr=Bs(Y.nextSibling),Ki=m,Nn=!0,ru=null,Us=!1,h!==null&&A4(m,h),m=Gy(m,S),m.flags|=4096;return m}return h=Fl(h.child,{mode:S.mode,children:S.children}),h.ref=m.ref,m.child=h,h.return=m,h}function Wy(h,m){var _=m.ref;if(_===null)h!==null&&h.ref!==null&&(m.flags|=4194816);else{if(typeof _!="function"&&typeof _!="object")throw Error(r(284));(h===null||h.ref!==_)&&(m.flags|=4194816)}}function I2(h,m,_,S,P){return $d(m),_=x2(h,m,_,S,void 0,P),S=b2(),h!==null&&!ri?(y2(h,m,P),Vl(h,m,P)):(Nn&&S&&QE(m),m.flags|=1,Yi(h,m,_,P),m.child)}function HI(h,m,_,S,P,D){return $d(m),m.updateQueue=null,_=G4(m,S,_,P),V4(h),S=b2(),h!==null&&!ri?(y2(h,m,D),Vl(h,m,D)):(Nn&&S&&QE(m),m.flags|=1,Yi(h,m,_,D),m.child)}function $I(h,m,_,S,P){if($d(m),m.stateNode===null){var D=Of,Y=_.contextType;typeof Y=="object"&&Y!==null&&(D=Xi(Y)),D=new _(S,D),m.memoizedState=D.state!==null&&D.state!==void 0?D.state:null,D.updater=D2,m.stateNode=D,D._reactInternals=m,D=m.stateNode,D.props=S,D.state=m.memoizedState,D.refs={},c2(m),Y=_.contextType,D.context=typeof Y=="object"&&Y!==null?Xi(Y):Of,D.state=m.memoizedState,Y=_.getDerivedStateFromProps,typeof Y=="function"&&(R2(m,_,Y,S),D.state=m.memoizedState),typeof _.getDerivedStateFromProps=="function"||typeof D.getSnapshotBeforeUpdate=="function"||typeof D.UNSAFE_componentWillMount!="function"&&typeof D.componentWillMount!="function"||(Y=D.state,typeof D.componentWillMount=="function"&&D.componentWillMount(),typeof D.UNSAFE_componentWillMount=="function"&&D.UNSAFE_componentWillMount(),Y!==D.state&&D2.enqueueReplaceState(D,D.state,null),$g(m,S,D,P),Hg(),D.state=m.memoizedState),typeof D.componentDidMount=="function"&&(m.flags|=4194308),S=!0}else if(h===null){D=m.stateNode;var oe=m.memoizedProps,Pe=Xd(_,oe);D.props=Pe;var tt=D.context,ut=_.contextType;Y=Of,typeof ut=="object"&&ut!==null&&(Y=Xi(ut));var ft=_.getDerivedStateFromProps;ut=typeof ft=="function"||typeof D.getSnapshotBeforeUpdate=="function",oe=m.pendingProps!==oe,ut||typeof D.UNSAFE_componentWillReceiveProps!="function"&&typeof D.componentWillReceiveProps!="function"||(oe||tt!==Y)&&CI(m,D,S,Y),su=!1;var nt=m.memoizedState;D.state=nt,$g(m,S,D,P),Hg(),tt=m.memoizedState,oe||nt!==tt||su?(typeof ft=="function"&&(R2(m,_,ft,S),tt=m.memoizedState),(Pe=su||NI(m,_,Pe,S,nt,tt,Y))?(ut||typeof D.UNSAFE_componentWillMount!="function"&&typeof D.componentWillMount!="function"||(typeof D.componentWillMount=="function"&&D.componentWillMount(),typeof D.UNSAFE_componentWillMount=="function"&&D.UNSAFE_componentWillMount()),typeof D.componentDidMount=="function"&&(m.flags|=4194308)):(typeof D.componentDidMount=="function"&&(m.flags|=4194308),m.memoizedProps=S,m.memoizedState=tt),D.props=S,D.state=tt,D.context=Y,S=Pe):(typeof D.componentDidMount=="function"&&(m.flags|=4194308),S=!1)}else{D=m.stateNode,u2(h,m),Y=m.memoizedProps,ut=Xd(_,Y),D.props=ut,ft=m.pendingProps,nt=D.context,tt=_.contextType,Pe=Of,typeof tt=="object"&&tt!==null&&(Pe=Xi(tt)),oe=_.getDerivedStateFromProps,(tt=typeof oe=="function"||typeof D.getSnapshotBeforeUpdate=="function")||typeof D.UNSAFE_componentWillReceiveProps!="function"&&typeof D.componentWillReceiveProps!="function"||(Y!==ft||nt!==Pe)&&CI(m,D,S,Pe),su=!1,nt=m.memoizedState,D.state=nt,$g(m,S,D,P),Hg();var ot=m.memoizedState;Y!==ft||nt!==ot||su||h!==null&&h.dependencies!==null&&Ay(h.dependencies)?(typeof oe=="function"&&(R2(m,_,oe,S),ot=m.memoizedState),(ut=su||NI(m,_,ut,S,nt,ot,Pe)||h!==null&&h.dependencies!==null&&Ay(h.dependencies))?(tt||typeof D.UNSAFE_componentWillUpdate!="function"&&typeof D.componentWillUpdate!="function"||(typeof D.componentWillUpdate=="function"&&D.componentWillUpdate(S,ot,Pe),typeof D.UNSAFE_componentWillUpdate=="function"&&D.UNSAFE_componentWillUpdate(S,ot,Pe)),typeof D.componentDidUpdate=="function"&&(m.flags|=4),typeof D.getSnapshotBeforeUpdate=="function"&&(m.flags|=1024)):(typeof D.componentDidUpdate!="function"||Y===h.memoizedProps&&nt===h.memoizedState||(m.flags|=4),typeof D.getSnapshotBeforeUpdate!="function"||Y===h.memoizedProps&&nt===h.memoizedState||(m.flags|=1024),m.memoizedProps=S,m.memoizedState=ot),D.props=S,D.state=ot,D.context=Pe,S=ut):(typeof D.componentDidUpdate!="function"||Y===h.memoizedProps&&nt===h.memoizedState||(m.flags|=4),typeof D.getSnapshotBeforeUpdate!="function"||Y===h.memoizedProps&&nt===h.memoizedState||(m.flags|=1024),S=!1)}return D=S,Wy(h,m),S=(m.flags&128)!==0,D||S?(D=m.stateNode,_=S&&typeof _.getDerivedStateFromError!="function"?null:D.render(),m.flags|=1,h!==null&&S?(m.child=qd(m,h.child,null,P),m.child=qd(m,null,_,P)):Yi(h,m,_,P),m.memoizedState=D.state,h=m.child):h=Vl(h,m,P),h}function VI(h,m,_,S){return Bd(),m.flags|=256,Yi(h,m,_,S),m.child}var F2={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function U2(h){return{baseLanes:h,cachePool:R4()}}function z2(h,m,_){return h=h!==null?h.childLanes&~_:0,m&&(h|=ps),h}function GI(h,m,_){var S=m.pendingProps,P=!1,D=(m.flags&128)!==0,Y;if((Y=D)||(Y=h!==null&&h.memoizedState===null?!1:(Kr.current&2)!==0),Y&&(P=!0,m.flags&=-129),Y=(m.flags&32)!==0,m.flags&=-33,h===null){if(Nn){if(P?cu(m):uu(),(h=yr)?(h=J5(h,Us),h=h!==null&&h.data!=="&"?h:null,h!==null&&(m.memoizedState={dehydrated:h,treeContext:nu!==null?{id:Xo,overflow:Yo}:null,retryLane:536870912,hydrationErrors:null},_=M4(h),_.return=m,m.child=_,Ki=m,yr=null)):h=null,h===null)throw iu(m);return wT(h)?m.lanes=32:m.lanes=536870912,null}var oe=S.children;return S=S.fallback,P?(uu(),P=m.mode,oe=qy({mode:"hidden",children:oe},P),S=zd(S,P,_,null),oe.return=m,S.return=m,oe.sibling=S,m.child=oe,S=m.child,S.memoizedState=U2(_),S.childLanes=z2(h,Y,_),m.memoizedState=F2,Kg(null,S)):(cu(m),B2(m,oe))}var Pe=h.memoizedState;if(Pe!==null&&(oe=Pe.dehydrated,oe!==null)){if(D)m.flags&256?(cu(m),m.flags&=-257,m=H2(h,m,_)):m.memoizedState!==null?(uu(),m.child=h.child,m.flags|=128,m=null):(uu(),oe=S.fallback,P=m.mode,S=qy({mode:"visible",children:S.children},P),oe=zd(oe,P,_,null),oe.flags|=2,S.return=m,oe.return=m,S.sibling=oe,m.child=S,qd(m,h.child,null,_),S=m.child,S.memoizedState=U2(_),S.childLanes=z2(h,Y,_),m.memoizedState=F2,m=Kg(null,S));else if(cu(m),wT(oe)){if(Y=oe.nextSibling&&oe.nextSibling.dataset,Y)var tt=Y.dgst;Y=tt,S=Error(r(419)),S.stack="",S.digest=Y,Lg({value:S,source:null,stack:null}),m=H2(h,m,_)}else if(ri||Uf(h,m,_,!1),Y=(_&h.childLanes)!==0,ri||Y){if(Y=ur,Y!==null&&(S=Bn(Y,_),S!==0&&S!==Pe.retryLane))throw Pe.retryLane=S,Ud(h,S),Wa(Y,h,S),L2;_T(oe)||nv(),m=H2(h,m,_)}else _T(oe)?(m.flags|=192,m.child=h.child,m=null):(h=Pe.treeContext,yr=Bs(oe.nextSibling),Ki=m,Nn=!0,ru=null,Us=!1,h!==null&&A4(m,h),m=B2(m,S.children),m.flags|=4096);return m}return P?(uu(),oe=S.fallback,P=m.mode,Pe=h.child,tt=Pe.sibling,S=Fl(Pe,{mode:"hidden",children:S.children}),S.subtreeFlags=Pe.subtreeFlags&65011712,tt!==null?oe=Fl(tt,oe):(oe=zd(oe,P,_,null),oe.flags|=2),oe.return=m,S.return=m,S.sibling=oe,m.child=S,Kg(null,S),S=m.child,oe=h.child.memoizedState,oe===null?oe=U2(_):(P=oe.cachePool,P!==null?(Pe=ti._currentValue,P=P.parent!==Pe?{parent:Pe,pool:Pe}:P):P=R4(),oe={baseLanes:oe.baseLanes|_,cachePool:P}),S.memoizedState=oe,S.childLanes=z2(h,Y,_),m.memoizedState=F2,Kg(h.child,S)):(cu(m),_=h.child,h=_.sibling,_=Fl(_,{mode:"visible",children:S.children}),_.return=m,_.sibling=null,h!==null&&(Y=m.deletions,Y===null?(m.deletions=[h],m.flags|=16):Y.push(h)),m.child=_,m.memoizedState=null,_)}function B2(h,m){return m=qy({mode:"visible",children:m},h.mode),m.return=h,h.child=m}function qy(h,m){return h=ds(22,h,null,m),h.lanes=0,h}function H2(h,m,_){return qd(m,h.child,null,_),h=B2(m,m.pendingProps.children),h.flags|=2,m.memoizedState=null,h}function WI(h,m,_){h.lanes|=m;var S=h.alternate;S!==null&&(S.lanes|=m),r2(h.return,m,_)}function $2(h,m,_,S,P,D){var Y=h.memoizedState;Y===null?h.memoizedState={isBackwards:m,rendering:null,renderingStartTime:0,last:S,tail:_,tailMode:P,treeForkCount:D}:(Y.isBackwards=m,Y.rendering=null,Y.renderingStartTime=0,Y.last=S,Y.tail=_,Y.tailMode=P,Y.treeForkCount=D)}function qI(h,m,_){var S=m.pendingProps,P=S.revealOrder,D=S.tail;S=S.children;var Y=Kr.current,oe=(Y&2)!==0;if(oe?(Y=Y&1|2,m.flags|=128):Y&=1,J(Kr,Y),Yi(h,m,S,_),S=Nn?Og:0,!oe&&h!==null&&(h.flags&128)!==0)e:for(h=m.child;h!==null;){if(h.tag===13)h.memoizedState!==null&&WI(h,_,m);else if(h.tag===19)WI(h,_,m);else if(h.child!==null){h.child.return=h,h=h.child;continue}if(h===m)break e;for(;h.sibling===null;){if(h.return===null||h.return===m)break e;h=h.return}h.sibling.return=h.return,h=h.sibling}switch(P){case"forwards":for(_=m.child,P=null;_!==null;)h=_.alternate,h!==null&&Oy(h)===null&&(P=_),_=_.sibling;_=P,_===null?(P=m.child,m.child=null):(P=_.sibling,_.sibling=null),$2(m,!1,P,_,D,S);break;case"backwards":case"unstable_legacy-backwards":for(_=null,P=m.child,m.child=null;P!==null;){if(h=P.alternate,h!==null&&Oy(h)===null){m.child=P;break}h=P.sibling,P.sibling=_,_=P,P=h}$2(m,!0,_,null,D,S);break;case"together":$2(m,!1,null,null,void 0,S);break;default:m.memoizedState=null}return m.child}function Vl(h,m,_){if(h!==null&&(m.dependencies=h.dependencies),fu|=m.lanes,(_&m.childLanes)===0)if(h!==null){if(Uf(h,m,_,!1),(_&m.childLanes)===0)return null}else return null;if(h!==null&&m.child!==h.child)throw Error(r(153));if(m.child!==null){for(h=m.child,_=Fl(h,h.pendingProps),m.child=_,_.return=m;h.sibling!==null;)h=h.sibling,_=_.sibling=Fl(h,h.pendingProps),_.return=m;_.sibling=null}return m.child}function V2(h,m){return(h.lanes&m)!==0?!0:(h=h.dependencies,!!(h!==null&&Ay(h)))}function Zne(h,m,_){switch(m.tag){case 3:Ae(m,m.stateNode.containerInfo),au(m,ti,h.memoizedState.cache),Bd();break;case 27:case 5:le(m);break;case 4:Ae(m,m.stateNode.containerInfo);break;case 10:au(m,m.type,m.memoizedProps.value);break;case 31:if(m.memoizedState!==null)return m.flags|=128,p2(m),null;break;case 13:var S=m.memoizedState;if(S!==null)return S.dehydrated!==null?(cu(m),m.flags|=128,null):(_&m.child.childLanes)!==0?GI(h,m,_):(cu(m),h=Vl(h,m,_),h!==null?h.sibling:null);cu(m);break;case 19:var P=(h.flags&128)!==0;if(S=(_&m.childLanes)!==0,S||(Uf(h,m,_,!1),S=(_&m.childLanes)!==0),P){if(S)return qI(h,m,_);m.flags|=128}if(P=m.memoizedState,P!==null&&(P.rendering=null,P.tail=null,P.lastEffect=null),J(Kr,Kr.current),S)break;return null;case 22:return m.lanes=0,UI(h,m,_,m.pendingProps);case 24:au(m,ti,h.memoizedState.cache)}return Vl(h,m,_)}function KI(h,m,_){if(h!==null)if(h.memoizedProps!==m.pendingProps)ri=!0;else{if(!V2(h,_)&&(m.flags&128)===0)return ri=!1,Zne(h,m,_);ri=(h.flags&131072)!==0}else ri=!1,Nn&&(m.flags&1048576)!==0&&T4(m,Og,m.index);switch(m.lanes=0,m.tag){case 16:e:{var S=m.pendingProps;if(h=Gd(m.elementType),m.type=h,typeof h=="function")XE(h)?(S=Xd(h,S),m.tag=1,m=$I(null,m,h,S,_)):(m.tag=0,m=I2(null,m,h,S,_));else{if(h!=null){var P=h.$$typeof;if(P===T){m.tag=11,m=LI(null,m,h,S,_);break e}else if(P===N){m.tag=14,m=II(null,m,h,S,_);break e}}throw m=j(h)||h,Error(r(306,m,""))}}return m;case 0:return I2(h,m,m.type,m.pendingProps,_);case 1:return S=m.type,P=Xd(S,m.pendingProps),$I(h,m,S,P,_);case 3:e:{if(Ae(m,m.stateNode.containerInfo),h===null)throw Error(r(387));S=m.pendingProps;var D=m.memoizedState;P=D.element,u2(h,m),$g(m,S,null,_);var Y=m.memoizedState;if(S=Y.cache,au(m,ti,S),S!==D.cache&&i2(m,[ti],_,!0),Hg(),S=Y.element,D.isDehydrated)if(D={element:S,isDehydrated:!1,cache:Y.cache},m.updateQueue.baseState=D,m.memoizedState=D,m.flags&256){m=VI(h,m,S,_);break e}else if(S!==P){P=Ls(Error(r(424)),m),Lg(P),m=VI(h,m,S,_);break e}else{switch(h=m.stateNode.containerInfo,h.nodeType){case 9:h=h.body;break;default:h=h.nodeName==="HTML"?h.ownerDocument.body:h}for(yr=Bs(h.firstChild),Ki=m,Nn=!0,ru=null,Us=!0,_=U4(m,null,S,_),m.child=_;_;)_.flags=_.flags&-3|4096,_=_.sibling}else{if(Bd(),S===P){m=Vl(h,m,_);break e}Yi(h,m,S,_)}m=m.child}return m;case 26:return Wy(h,m),h===null?(_=aF(m.type,null,m.pendingProps,null))?m.memoizedState=_:Nn||(_=m.type,h=m.pendingProps,S=cv(de.current).createElement(_),S[Zt]=m,S[Oe]=h,Zi(S,_,h),Ue(S),m.stateNode=S):m.memoizedState=aF(m.type,h.memoizedProps,m.pendingProps,h.memoizedState),null;case 27:return le(m),h===null&&Nn&&(S=m.stateNode=nF(m.type,m.pendingProps,de.current),Ki=m,Us=!0,P=yr,bu(m.type)?(ST=P,yr=Bs(S.firstChild)):yr=P),Yi(h,m,m.pendingProps.children,_),Wy(h,m),h===null&&(m.flags|=4194304),m.child;case 5:return h===null&&Nn&&((P=S=yr)&&(S=Are(S,m.type,m.pendingProps,Us),S!==null?(m.stateNode=S,Ki=m,yr=Bs(S.firstChild),Us=!1,P=!0):P=!1),P||iu(m)),le(m),P=m.type,D=m.pendingProps,Y=h!==null?h.memoizedProps:null,S=D.children,bT(P,D)?S=null:Y!==null&&bT(P,Y)&&(m.flags|=32),m.memoizedState!==null&&(P=x2(h,m,Hne,null,null,_),cx._currentValue=P),Wy(h,m),Yi(h,m,S,_),m.child;case 6:return h===null&&Nn&&((h=_=yr)&&(_=Nre(_,m.pendingProps,Us),_!==null?(m.stateNode=_,Ki=m,yr=null,h=!0):h=!1),h||iu(m)),null;case 13:return GI(h,m,_);case 4:return Ae(m,m.stateNode.containerInfo),S=m.pendingProps,h===null?m.child=qd(m,null,S,_):Yi(h,m,S,_),m.child;case 11:return LI(h,m,m.type,m.pendingProps,_);case 7:return Yi(h,m,m.pendingProps,_),m.child;case 8:return Yi(h,m,m.pendingProps.children,_),m.child;case 12:return Yi(h,m,m.pendingProps.children,_),m.child;case 10:return S=m.pendingProps,au(m,m.type,S.value),Yi(h,m,S.children,_),m.child;case 9:return P=m.type._context,S=m.pendingProps.children,$d(m),P=Xi(P),S=S(P),m.flags|=1,Yi(h,m,S,_),m.child;case 14:return II(h,m,m.type,m.pendingProps,_);case 15:return FI(h,m,m.type,m.pendingProps,_);case 19:return qI(h,m,_);case 31:return Yne(h,m,_);case 22:return UI(h,m,_,m.pendingProps);case 24:return $d(m),S=Xi(ti),h===null?(P=o2(),P===null&&(P=ur,D=a2(),P.pooledCache=D,D.refCount++,D!==null&&(P.pooledCacheLanes|=_),P=D),m.memoizedState={parent:S,cache:P},c2(m),au(m,ti,P)):((h.lanes&_)!==0&&(u2(h,m),$g(m,null,null,_),Hg()),P=h.memoizedState,D=m.memoizedState,P.parent!==S?(P={parent:S,cache:S},m.memoizedState=P,m.lanes===0&&(m.memoizedState=m.updateQueue.baseState=P),au(m,ti,S)):(S=D.cache,au(m,ti,S),S!==P.cache&&i2(m,[ti],_,!0))),Yi(h,m,m.pendingProps.children,_),m.child;case 29:throw m.pendingProps}throw Error(r(156,m.tag))}function Gl(h){h.flags|=4}function G2(h,m,_,S,P){if((m=(h.mode&32)!==0)&&(m=!1),m){if(h.flags|=16777216,(P&335544128)===P)if(h.stateNode.complete)h.flags|=8192;else if(_5())h.flags|=8192;else throw Wd=Py,l2}else h.flags&=-16777217}function XI(h,m){if(m.type!=="stylesheet"||(m.state.loading&4)!==0)h.flags&=-16777217;else if(h.flags|=16777216,!uF(m))if(_5())h.flags|=8192;else throw Wd=Py,l2}function Ky(h,m){m!==null&&(h.flags|=4),h.flags&16384&&(m=h.tag!==22?mt():536870912,h.lanes|=m,Zf|=m)}function Xg(h,m){if(!Nn)switch(h.tailMode){case"hidden":m=h.tail;for(var _=null;m!==null;)m.alternate!==null&&(_=m),m=m.sibling;_===null?h.tail=null:_.sibling=null;break;case"collapsed":_=h.tail;for(var S=null;_!==null;)_.alternate!==null&&(S=_),_=_.sibling;S===null?m||h.tail===null?h.tail=null:h.tail.sibling=null:S.sibling=null}}function vr(h){var m=h.alternate!==null&&h.alternate.child===h.child,_=0,S=0;if(m)for(var P=h.child;P!==null;)_|=P.lanes|P.childLanes,S|=P.subtreeFlags&65011712,S|=P.flags&65011712,P.return=h,P=P.sibling;else for(P=h.child;P!==null;)_|=P.lanes|P.childLanes,S|=P.subtreeFlags,S|=P.flags,P.return=h,P=P.sibling;return h.subtreeFlags|=S,h.childLanes=_,m}function Qne(h,m,_){var S=m.pendingProps;switch(JE(m),m.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return vr(m),null;case 1:return vr(m),null;case 3:return _=m.stateNode,S=null,h!==null&&(S=h.memoizedState.cache),m.memoizedState.cache!==S&&(m.flags|=2048),Bl(ti),pe(),_.pendingContext&&(_.context=_.pendingContext,_.pendingContext=null),(h===null||h.child===null)&&(Ff(m)?Gl(m):h===null||h.memoizedState.isDehydrated&&(m.flags&256)===0||(m.flags|=1024,t2())),vr(m),null;case 26:var P=m.type,D=m.memoizedState;return h===null?(Gl(m),D!==null?(vr(m),XI(m,D)):(vr(m),G2(m,P,null,S,_))):D?D!==h.memoizedState?(Gl(m),vr(m),XI(m,D)):(vr(m),m.flags&=-16777217):(h=h.memoizedProps,h!==S&&Gl(m),vr(m),G2(m,P,h,S,_)),null;case 27:if(Re(m),_=de.current,P=m.type,h!==null&&m.stateNode!=null)h.memoizedProps!==S&&Gl(m);else{if(!S){if(m.stateNode===null)throw Error(r(166));return vr(m),null}h=te.current,Ff(m)?N4(m):(h=nF(P,S,_),m.stateNode=h,Gl(m))}return vr(m),null;case 5:if(Re(m),P=m.type,h!==null&&m.stateNode!=null)h.memoizedProps!==S&&Gl(m);else{if(!S){if(m.stateNode===null)throw Error(r(166));return vr(m),null}if(D=te.current,Ff(m))N4(m);else{var Y=cv(de.current);switch(D){case 1:D=Y.createElementNS("http://www.w3.org/2000/svg",P);break;case 2:D=Y.createElementNS("http://www.w3.org/1998/Math/MathML",P);break;default:switch(P){case"svg":D=Y.createElementNS("http://www.w3.org/2000/svg",P);break;case"math":D=Y.createElementNS("http://www.w3.org/1998/Math/MathML",P);break;case"script":D=Y.createElement("div"),D.innerHTML=" - + +