diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md index b2373b27c..2654d2dd7 100644 --- a/.github/copilot-instructions.md +++ b/.github/copilot-instructions.md @@ -1,196 +1,99 @@ -# Cosmian KMS +# Cosmian KMS — Build and Test Guide -Cosmian KMS is a high-performance, open-source FIPS 140-3 compliant Key Management System written in Rust. The repository contains the KMS server (`cosmian_kms_server`) and supporting libraries for cryptographic operations, database management, and various integrations. +Cosmian KMS is a high-performance, open-source FIPS 140-3 compliant Key Management System written in Rust. -Always reference these instructions first and fallback to search or bash commands only when you encounter unexpected information that does not match the info here. +## Quick start -## Working Effectively - -- **Bootstrap and build the repository:** - - - First, initialize git submodules: `git submodule update --recursive --init` - - System requires Rust stable toolchain (1.90.0) with rustfmt and clippy components - - OpenSSL 3.2.0 is REQUIRED (not 3.0.13+) for proper FIPS compliance and static linking - - OpenSSL must be installed to `/usr/local/openssl` using `.github/reusable_scripts/get_openssl_binaries.sh` - - Build process follows CI workflow: `bash .github/scripts/cargo_build.sh` - - Environment variables required: `OPENSSL_DIR=/usr/local/openssl`, `DEBUG_OR_RELEASE=debug|release` - - For non-FIPS builds: `FEATURES=non-fips` - - The CLI binary `cosmian` IS built in this repository and included in build artifacts +```bash +# Build the project +cargo build --release -- **UI and Packaging:** +# Build with specific features +cargo build --release --features fips - - UI is built on Ubuntu distributions using `bash .github/scripts/build_ui.sh` - - UI files are located in `crate/server/ui` directory - - Release builds create Debian packages via `cargo deb -p cosmian_kms_server` - - RPM packages created via `cargo generate-rpm -p crate/server` - - Packages support both FIPS and non-FIPS variants +# Run tests +cargo test -- **Testing and validation:** +# Run tests with specific features +cargo test --features fips +``` - - Multi-database testing: sqlite, postgresql, mysql, redis-findex - - Database environment variables: `KMS_POSTGRES_URL=postgresql://kms:kms@127.0.0.1:5432/kms`, `KMS_MYSQL_URL=mysql://kms:kms@localhost:3306/kms`, `KMS_SQLITE_PATH=data/shared` - - MySQL tests are currently disabled (skipped in CI) - - Redis-findex tests skipped in FIPS mode (not supported) - - Debug builds only test sqlite; release builds test all enabled databases - - macOS runners only support sqlite tests (no docker containers) - - HSM testing on Ubuntu with Utimaco: `HSM_USER_PASSWORD="12345678" cargo test -p utimaco_pkcs11_loader --features utimaco` - - Logging control: `RUST_LOG="cosmian_kms_cli=error,cosmian_kms_server=error,cosmian_kmip=error,test_kms_server=error"` - - Test execution: `cargo test --workspace --lib $RELEASE $FEATURES -- --nocapture $SKIP_SERVICES_TESTS` +## Testing -- **Build artifacts and binaries:** +```bash +# Run all tests +cargo test - - Primary binaries: `cosmian`, `cosmian_kms`, `cosmian_findex_server` - - Binary locations: `target/$DEBUG_OR_RELEASE/` (e.g., `target/debug/`) - - Release builds include benchmarks: `cargo bench $FEATURES --no-run` - - Static linking verified (no dynamic OpenSSL dependencies): `ldd cosmian_kms | grep ssl` should fail - - Version verification: `cosmian_kms --info` must show OpenSSL 3.2.0 - - Binary tests: `cargo test --workspace --bins $RELEASE $FEATURES` +# Run tests with specific features +cargo test --features fips -- **Run the KMS server:** +# Run tests for a specific package +cargo test -p cosmian_kms_server +cargo test -p cosmian_kms_cli - - ALWAYS build first using the build script above - - Debug mode: `./target/debug/cosmian_kms --database-type sqlite --sqlite-path /tmp/kms-data` - - Release mode: `./target/release/cosmian_kms --database-type sqlite --sqlite-path /tmp/kms-data` - - Server listens on by default - - Supported databases: sqlite, postgresql, mysql, redis-findex (redis-findex not available in FIPS mode) +# Run specific test suites +cargo test sqlite # SQLite tests +cargo test postgres # PostgreSQL tests (requires local PostgreSQL) +cargo test redis # Redis tests +``` -- **Docker usage:** - - Development with services: `docker compose up -d` (starts postgresql, mysql, redis) - - Production: `docker run -p 9998:9998 --name kms ghcr.io/cosmian/kms:latest` - - Pre-built images include UI at - - Local Docker builds use the same OpenSSL setup as CI +Environment variables for DB tests: -## Validation +- `KMS_POSTGRES_URL=postgresql://kms:kms@127.0.0.1:5432/kms` +- `KMS_MYSQL_URL=mysql://kms:kms@localhost:3306/kms` +- `KMS_SQLITE_PATH=data/shared` -- **CRITICAL**: Always manually test server functionality after making changes by starting the server and verifying it responds to HTTP requests -- Test server startup: Start server with `--database-type sqlite --sqlite-path /tmp/test-db` -- Test API responses: `curl -s -X POST -H "Content-Type: application/json" -d '{}' http://localhost:9998/kmip/2_1` should return KMIP validation error (confirms server is working) -- Test server version: `./target/release/cosmian_kms --version` should show version 5.12.0 -- OpenSSL validation: `./target/release/cosmian_kms --info` should show OpenSSL 3.2.0 -- Static linking check: `ldd ./target/release/cosmian_kms | grep ssl` should return empty (no dynamic OpenSSL) -- Always run `cargo fmt --check` before committing (takes 3 seconds) -- Clippy requires installation: `rustup component add clippy` +Notes: -## Common tasks +- MySQL tests are currently disabled in CI +- Redis-findex tests are skipped in FIPS mode +- Start database backends with `docker compose up -d` before running DB tests -The following are outputs from frequently run commands. Reference them instead of viewing, searching, or running bash commands to save time. +## Running the server -### Repo root structure +After building, you can run the server manually: -```text -.cargo/ # Cargo configuration -.github/ # CI/CD workflows and scripts - scripts/ # Build scripts (cargo_build.sh, build_ui.sh) - reusable_scripts/ # OpenSSL setup scripts -crate/ # Rust workspace crates - server/ # KMS server binary crate - ui/ # Web UI files (built by build_ui.sh) - cli/ # CLI binary crate (cosmian) - crypto/ # Cryptographic operations - kmip/ # KMIP protocol implementation - client_utils/ # Client utilities - kms_client/ # KMS client library - access/ # Access control - interfaces/ # Database and HSM interfaces - server_database/ # Database management - hsm/ # HSM integrations (proteccio, utimaco, softhsm2) -documentation/ # Project documentation -docker-compose.yml # Development services (postgres, mysql, redis) -Dockerfile # Container build -README.md # Project documentation -Cargo.toml # Workspace configuration -rust-toolchain.toml # Rust toolchain: 1.90.0 +```bash +cargo run --release --bin cosmian_kms -- --database-type sqlite --sqlite-path /tmp/kms-data ``` -### Key build commands and timing +Or run the compiled binary directly: ```bash -# Full CI build process (includes UI, packaging, multi-database tests) -git submodule update --recursive --init -export OPENSSL_DIR=/usr/local/openssl -export DEBUG_OR_RELEASE=debug # or release -export FEATURES=non-fips # optional, for non-FIPS builds - -# OpenSSL setup (required first) -sudo mkdir -p /usr/local/openssl/ssl /usr/local/openssl/lib64/ossl-modules -sudo chown -R $USER /usr/local/openssl -bash .github/reusable_scripts/get_openssl_binaries.sh -bash .github/scripts/cargo_build.sh - - -# UI build (Ubuntu only) -bash .github/scripts/build_ui.sh - -# Individual builds (after OpenSSL setup) -cargo build --features non-fips -cargo build --release --features non-fips - -# Multi-database testing -export KMS_TEST_DB=sqlite # or postgresql, mysql, redis-findex -cargo test --workspace --lib --features non-fips - -# HSM testing (Ubuntu only) -bash .github/reusable_scripts/test_utimaco.sh -HSM_USER_PASSWORD="12345678" cargo test -p utimaco_pkcs11_loader --features utimaco - -# Packaging (release builds only) -cargo install cargo-deb cargo-generate-rpm -cargo deb -p cosmian_kms_server -cargo generate-rpm -p crate/server - -# Format check (3 seconds) -cargo fmt --check +./target/release/cosmian_kms --database-type sqlite --sqlite-path /tmp/kms-data ``` -### Server startup and validation +Basic API probe: ```bash -# Start server (debug) -./target/debug/cosmian_kms --database-type sqlite --sqlite-path /tmp/kms-data - -# Start server (release) -./target/release/cosmian_kms --database-type sqlite --sqlite-path /tmp/kms-data - -# Test server is responding curl -s -X POST -H "Content-Type: application/json" -d '{}' http://localhost:9998/kmip/2_1 -# Expected response: "Invalid Request: missing field `tag` at line 1 column 2" +``` -# Check version and OpenSSL -./target/release/cosmian_kms --version -# Expected: "cosmian_kms_server 5.12.0" +Expected response is a KMIP validation error, confirming the server is alive. -./target/release/cosmian_kms --info -# Expected: Output containing "OpenSSL 3.2.0" +## Repository layout (high level) -# Verify static linking (should return empty) -ldd ./target/release/cosmian_kms | grep ssl +```text +.github/ # CI workflows and scripts +crate/ # Rust workspace crates (server, cli, crypto, …) +pkg/ # Packaging metadata (deb/rpm service files, configs) +documentation/ # Documentation and guides +resources/ # Configuration files and resources +test_data/ # Test fixtures and data +ui/ # Web UI source ``` -### Docker quick start +## Tips + +- Format/lints: run `cargo fmt --check` and `cargo clippy` to check code style +- Use `cargo build --release` for optimized builds +- Run `cargo test` frequently to ensure changes don't break functionality + +## Docker ```bash -# Pull and run pre-built image (includes UI) docker pull ghcr.io/cosmian/kms:latest docker run -p 9998:9998 --name kms ghcr.io/cosmian/kms:latest - -# Development with services -docker compose up -d - -# Access UI -curl http://localhost:9998/ui -# Expected: HTML content with KMS web interface ``` -## Important notes - -- **OpenSSL Version**: OpenSSL 3.2.0 is mandatory, not 3.0.13+. The build verifies this specific version. -- **Static Linking**: All binaries must be statically linked with OpenSSL. CI verifies no dynamic OpenSSL dependencies. -- **Build Artifacts**: Three primary binaries are built: `cosmian`, `cosmian_kms`, `cosmian_findex_server` -- **Database Testing**: Only sqlite works in debug mode and on macOS. Full database testing requires release builds. -- **FIPS vs non-FIPS**: Redis-findex database support is not available in FIPS mode -- **UI Building**: UI is only built on Ubuntu distributions and requires separate build script -- **Packaging**: Debian and RPM packages are created as part of release builds with proper FIPS/non-FIPS variants -- **HSM Support**: Utimaco HSM testing is included but only runs on Ubuntu with specific setup -- **MySQL**: MySQL database tests are currently disabled in CI -- **Workspace**: Build from workspace root using cargo_build.sh script, not individual crate directories -- **HashMaps**: Verify that when creating HashMaps, use `HashMap::with_capacity(n)` to avoid unnecessary reallocations instead of `HashMap::new()`. +Images include the UI at `http://localhost:9998/ui`. diff --git a/.github/reusable_scripts b/.github/reusable_scripts index a131eb0bf..f8cfdf193 160000 --- a/.github/reusable_scripts +++ b/.github/reusable_scripts @@ -1 +1 @@ -Subproject commit a131eb0bf34332e3df0588f0034345c7cfe688da +Subproject commit f8cfdf193c581a45456e00946db135c613d3ca71 diff --git a/.github/scripts/README.md b/.github/scripts/README.md new file mode 100644 index 000000000..c3bf32b95 --- /dev/null +++ b/.github/scripts/README.md @@ -0,0 +1,637 @@ +# Cosmian KMS Script Suite + +This directory contains the complete script infrastructure for building, testing, packaging, and releasing Cosmian KMS. +The primary entrypoint is `nix.sh`, which provides a unified interface to all workflows through Nix-managed environments. + +--- + +## Table of Contents + +1. [Overview](#overview) +2. [nix.sh — Unified Command Interface](#nixsh--unified-command-interface) +3. [The Role of Nix](#the-role-of-nix) +4. [Script Ecosystem](#script-ecosystem) +5. [Maintenance Guidelines](#maintenance-guidelines) +6. [Future Enhancements](#future-enhancements) + +--- + +## Overview + +Cosmian KMS uses **Nix** to achieve: +- **Reproducible builds**: Pinned dependencies (nixpkgs 24.05, Rust 1.90.0, OpenSSL 3.1.2) +- **Hermetic packaging**: Static linking, no runtime /nix/store paths +- **Offline capability**: Pre-warming enables network-free builds +- **Variant isolation**: FIPS and non-FIPS builds with controlled feature sets + +**Key principle**: `nix.sh` is the single entrypoint for developers and CI; it orchestrates all other scripts within controlled Nix environments. + +--- + +## nix.sh — Unified Command Interface + +### Commands + +#### 1. `build` — Build the KMS Server + +Compiles the `cosmian_kms_server` binary inside a Nix shell with pinned toolchain. + +**Syntax:** +```bash +bash .github/scripts/nix.sh build [--profile ] [--variant ] +``` + +**What it does:** +- Invokes `nix/scripts/build.sh` inside pure `nix-shell` +- Enforces static OpenSSL linking (no dynamic SSL dependencies) +- On Linux: strips `/nix/store` paths from ELF metadata (interpreter, RPATH) +- Validates GLIBC symbol versions ≤ 2.28 for broad Linux compatibility +- Verifies binary runs and reports correct version + +**Examples:** +```bash +# Debug FIPS build (default) +bash .github/scripts/nix.sh build + +# Release non-FIPS build +bash .github/scripts/nix.sh build --profile release --variant non-fips +``` + +**Outputs:** +- Binary: `target//cosmian_kms` +- Platform-specific checks via `ldd` (Linux) or `otool` (macOS) + +--- + +#### 2. `test` — Run Test Suites + +Executes comprehensive test suites across databases, cryptographic backends, and client protocols. + +**Syntax:** +```bash +bash .github/scripts/nix.sh test [type] [backend] [--profile ] [--variant ] +``` + +**Test Types:** + +| Type | Description | Script | Notes | +|--------------|-------------------------------------------------|--------------------------------|--------------------------------| +| `all` | Run complete test suite (default) | `test_all.sh` | Includes DB + HSM (if release) | +| `sqlite` | SQLite embedded database tests | `test_sqlite.sh` | Always run; core functionality | +| `mysql` | MySQL backend tests | `test_mysql.sh` | Requires MySQL server | +| `psql` | PostgreSQL backend tests | `test_psql.sh` | Requires PostgreSQL server | +| `redis` | Redis-findex encrypted index tests | `test_redis.sh` | Non-FIPS only; requires Redis | +| `google_cse` | Google Client-Side Encryption integration | `test_google_cse.sh` | Requires OAuth credentials | +| `pykmip` | PyKMIP client compatibility tests | `test_pykmip.sh` | Non-FIPS only; uses Python venv| +| `hsm [backend]` | Hardware Security Module tests | `test_hsm*.sh` | Linux only; see backends below | + +**HSM Backends** (used with `test hsm [backend]`): +- `softhsm2` — Software HSM emulator (default in CI) +- `utimaco` — Utimaco simulator tests +- `proteccio` — Proteccio NetHSM tests +- `all` — Run all HSM backends sequentially (default) + +**Environment Variables:** + +Database connections: +- `REDIS_HOST`, `REDIS_PORT` +- `MYSQL_HOST`, `MYSQL_PORT` +- `POSTGRES_HOST`, `POSTGRES_PORT` + +Google CSE (required for `google_cse` tests): +- `TEST_GOOGLE_OAUTH_CLIENT_ID` +- `TEST_GOOGLE_OAUTH_CLIENT_SECRET` +- `TEST_GOOGLE_OAUTH_REFRESH_TOKEN` +- `GOOGLE_SERVICE_ACCOUNT_PRIVATE_KEY` + +**Examples:** +```bash +# Run all tests (default variant: FIPS, profile: debug) +bash .github/scripts/nix.sh test + +# Specific database tests +bash .github/scripts/nix.sh test sqlite +bash .github/scripts/nix.sh test psql + +# Redis tests (non-FIPS required) +bash .github/scripts/nix.sh --variant non-fips test redis + +# PyKMIP client tests (non-FIPS, includes Python environment) +bash .github/scripts/nix.sh --variant non-fips test pykmip + +# Google CSE tests (with credentials) +TEST_GOOGLE_OAUTH_CLIENT_ID=... \ +TEST_GOOGLE_OAUTH_CLIENT_SECRET=... \ +TEST_GOOGLE_OAUTH_REFRESH_TOKEN=... \ +GOOGLE_SERVICE_ACCOUNT_PRIVATE_KEY=... \ + bash .github/scripts/nix.sh test google_cse + +# HSM tests (specific backend) +bash .github/scripts/nix.sh test hsm softhsm2 +bash .github/scripts/nix.sh test hsm all +``` + +**Special Modes:** +- **Pure shell**: Standard DB tests run in `--pure` mode (hermetic) +- **Non-pure shell**: HSM tests need system PKCS#11 libraries; automatically disables `--pure` +- **Auto-dependencies**: `nix.sh` injects `WITH_WGET`, `WITH_HSM`, `WITH_PYTHON` env vars to provision tools + +--- + +#### 3. `package` — Build Distribution Packages + +Creates platform-native packages (DEB, RPM, DMG) using Nix derivations, with mandatory smoke tests. + +**Syntax:** +```bash +bash .github/scripts/nix.sh package [type] [--variant ] +``` + +**Package Types:** + +| Type | Platform | Output | Script | +|-------|----------|----------------------------|-------------------------| +| `deb` | Linux | Debian/Ubuntu `.deb` | `nix/scripts/package_deb.sh` | +| `rpm` | Linux | RedHat/SUSE `.rpm` | `nix/scripts/package_rpm.sh` | +| `dmg` | macOS | macOS disk image `.dmg` | `nix/scripts/package_dmg.sh` | +| (none)| Auto | All types for current OS | — | + +**Build Process:** +1. **Prewarm** (skippable via `NO_PREWARM=1`): + - Fetch pinned nixpkgs (24.05) to local store + - Pre-download packaging tools (`dpkg`, `rpm`, `cpio`) for offline use +2. **Build**: + - Execute package-specific Nix script + - On Linux: Use Nix derivations directly (`nix-build`) + - On macOS: Use `nix-shell` (non-pure) + `cargo-packager` for DMG (requires `hdiutil`, `osascript`) +3. **Smoke Test** (mandatory): + - Extract package to temp directory + - Run `cosmian_kms --info` + - Verify OpenSSL version is exactly `3.1.2` + - Fail entire build if test fails +4. **Checksum**: + - Generate SHA-256 checksum file (`.sha256`) alongside package + +**Examples:** +```bash +# Build all packages for current platform (Linux: deb+rpm; macOS: dmg) +bash .github/scripts/nix.sh package + +# Build specific package type (FIPS variant) +bash .github/scripts/nix.sh package deb +bash .github/scripts/nix.sh package rpm + +# Build non-FIPS variant +bash .github/scripts/nix.sh --variant non-fips package deb +bash .github/scripts/nix.sh --variant non-fips package dmg +``` + +**Output Locations:** +- DEB: `result-deb-/` symlink +- RPM: `result-rpm-/` symlink +- DMG: `result-dmg-/` symlink + +**Offline Builds:** +After one successful online run, subsequent package builds work offline (network disconnected) if: +- Nix store contains pinned nixpkgs +- Cargo vendor cache is populated +- OpenSSL 3.1.2 tarball is cached + +--- + +#### 4. `sbom` — Generate Software Bill of Materials + +Produces comprehensive SBOM files using `sbomnix` tools for supply chain transparency and compliance. + +**Syntax:** +```bash +bash .github/scripts/nix.sh sbom [--variant ] +``` + +**What it does:** +- Automatically builds the server if not already built (works from scratch) +- Analyzes the Nix derivation for the specified variant +- Generates multiple SBOM formats + vulnerability reports +- Runs **outside** `nix-shell` (sbomnix needs direct `nix` commands) + +**Generated Files** (in `./sbom/` directory): + +| File | Format | Description | +|-------------------|-------------|----------------------------------------------| +| `bom.cdx.json` | CycloneDX | Industry-standard SBOM (OWASP ecosystem) | +| `bom.spdx.json` | SPDX | ISO/IEC 5962:2021 standard SBOM | +| `sbom.csv` | CSV | Spreadsheet-friendly dependency list | +| `vulns.csv` | CSV | Vulnerability scan results (CVE mapping) | +| `graph.png` | PNG | Visual dependency graph | +| `meta.json` | JSON | Build metadata (timestamps, variant, hashes) | +| `README.txt` | Text | Integration guide and usage instructions | + +**Examples:** +```bash +# Generate SBOM for FIPS variant +bash .github/scripts/nix.sh sbom + +# Generate SBOM for non-FIPS variant +bash .github/scripts/nix.sh --variant non-fips sbom +``` + +**Use Cases:** +- Compliance audits (SBOM submission to customers) +- Vulnerability monitoring (scan `vulns.csv` for CVEs) +- License verification (check dependencies in `bom.spdx.json`) +- Supply chain attestation (provenance tracking) + +--- + +#### 5. `update-hashes` — Update Expected Hashes + +Automated hash maintenance for Nix build reproducibility verification. + +**Syntax:** +```bash +bash .github/scripts/nix.sh update-hashes [options] +``` + +**Options:** + +| Flag | Effect | Use Case | +|--------------------|------------------------------------------------|------------------------------------| +| `--vendor-only` | Update only Cargo vendor hash (`cargoHash`) | After `Cargo.lock` changes | +| `--binary-only` | Update only binary hashes | After code changes (deps unchanged)| +| `--variant ` | Update specific variant only | Single-variant changes | +| (no flags) | Update all hashes (vendor + binaries) | Full dependency + code update | + +**What it does:** +1. **Vendor Hash** (`--vendor-only` or default): + - Triggers intentional Cargo vendor fetch failure + - Extracts correct hash from Nix error message + - Updates `nix/kms-server.nix` `cargoHash` field + +2. **Binary Hashes** (`--binary-only` or default): + - Builds FIPS and/or non-FIPS variants + - Computes SHA-256 of resulting `cosmian_kms` binary + - Updates `nix/expected-hashes//.sha256` + +**Examples:** +```bash +# Update all hashes after dependency upgrade +bash .github/scripts/nix.sh update-hashes + +# Update only vendor hash after Cargo.lock change +bash .github/scripts/nix.sh update-hashes --vendor-only + +# Update only binary hashes after code change +bash .github/scripts/nix.sh update-hashes --binary-only + +# Update only FIPS variant hashes +bash .github/scripts/nix.sh update-hashes --variant fips +``` + +**Platform Support:** +- `x86_64-linux` (Intel/AMD Linux) +- `aarch64-linux` (ARM64 Linux) +- `aarch64-darwin` (Apple Silicon macOS) + +**Important**: Hash updates should be reviewed carefully. Binary hash changes indicate: +- Code modifications affecting the binary +- Dependency updates (even with locked `Cargo.lock`, Nix vendor hash may differ) +- Potential supply chain tampering (investigate unexpected changes) + +--- + +### Global Options + +All commands support these flags: + +| Flag | Values | Default | Effect | +|--------------------------------|---------------------|------------------------------|----------------------------------| +| `-p`, `--profile` | `debug`, `release` | `debug` (build/test)
`release` (package) | Cargo build profile | +| `-v`, `--variant` | `fips`, `non-fips` | `fips` | Cryptographic feature set | +| `-h`, `--help` | — | — | Show usage and exit | + +**Feature Set Differences:** + +| Aspect | FIPS Variant | Non-FIPS Variant | +|---------------------|---------------------------------------|------------------------------------| +| Crypto backend | OpenSSL 3.1.2 FIPS module | OpenSSL 3.1.2 (standard) | +| Redis-findex | Disabled | Enabled | +| Reproducibility | Bit-for-bit deterministic (Linux) | Hash-verified (may vary by env) | +| Target users | Government, regulated industries | General enterprise | + +--- + +### Internal Mechanics + +**Key Functions:** + +| Function | Purpose | +|--------------------------------|----------------------------------------------------------| +| `usage()` | Display help text and exit | +| `compute_sha256(file)` | Platform-agnostic SHA-256 hash (uses `sha256sum` or `shasum`) | +| `resolve_pinned_nixpkgs_store()` | Realize pinned nixpkgs tarball in local Nix store | +| `prewarm_nixpkgs_and_tools()` | Pre-fetch nixpkgs + packaging tools (skip via `NO_PREWARM=1`) | + +**Execution Flow:** + +``` +┌─────────────────────────────────────────────────────────────┐ +│ 1. Parse CLI arguments (profile, variant, command) │ +└────────────────┬────────────────────────────────────────────┘ + │ + ├──[build/test]─→ Select script, enter nix-shell ──→ Run script + │ (pure mode unless HSM/macOS DMG) + │ + ├──[package]────→ Prewarm (unless NO_PREWARM) ──────→ For each type: + │ ├─ Build via Nix + │ ├─ Smoke test + │ └─ Generate .sha256 + │ + ├──[sbom]───────→ Delegate to generate_sbom.sh ────────→ Run sbomnix + │ (outside nix-shell) + │ + └──[update-hashes]→ Delegate to update_all_hashes.sh ─→ Update Nix files +``` + +**Pure vs Non-Pure Shell:** + +| Scenario | Mode | Rationale | +|--------------------------------|------------|-------------------------------------------------| +| Standard build | `--pure` | Hermetic toolchain (Rust, OpenSSL from Nix) | +| Database tests (sqlite/psql) | `--pure` | Self-contained test environment | +| HSM tests | Non-pure | Needs system PKCS#11 libraries (vendor-specific)| +| macOS DMG packaging | Non-pure | Requires system tools (`hdiutil`, `osascript`) | + +--- + +## The Role of Nix + +Nix provides the foundation for deterministic, auditable builds: + +### Key Benefits + +| Aspect | Implementation | Impact | +|-------------------------------|-----------------------------------------------|-----------------------------------------------------| +| **Pinned Dependencies** | nixpkgs 24.05 tarball locked by hash | Identical build environment across machines/time | +| **Reproducible Toolchain** | Rust 1.90.0 from Nix (no rustup) | Eliminates "works on my machine" compiler issues | +| **Static OpenSSL** | Vendored 3.1.2 source tarball | No runtime SSL dependency; portable binaries | +| **Hash Enforcement** | Binary SHA-256 checked in `installCheckPhase` | Detects drift/tampering (FIPS builds on Linux) | +| **Offline Capability** | Pre-warmed store + Cargo offline cache | Air-gapped builds after first online run | +| **Variant Isolation** | Separate derivations for FIPS/non-FIPS | Controlled cryptographic footprint | + +### Reproducibility Guarantees + +**FIPS builds on Linux** are **bit-for-bit reproducible**: +- Same source code + Nix environment → identical binary hash +- Verified by CI hash checks against `nix/expected-hashes/` + +**Non-FIPS builds** use hash verification for consistency tracking but may produce different binaries across environments due to less restrictive build constraints. + +### Hash Update Workflow + +When binary hash mismatches occur: + +1. **Investigate**: Determine if change is expected (code/dep update) or unexpected (supply chain issue) +2. **Rebuild**: `nix-build -A kms-server-` +3. **Verify**: `./result/bin/cosmian_kms --info` (check version, OpenSSL) +4. **Update**: Run `bash .github/scripts/nix.sh update-hashes` (or use `--binary-only`) +5. **Commit**: Include updated hash files in PR with justification + +--- + +## Script Ecosystem + +### Core Scripts + +#### `.github/scripts/` + +| Script | Purpose | Invocation Context | +|---------------------------|------------------------------------------|-----------------------------| +| `nix.sh` | Unified entrypoint | Developer CLI, CI pipelines | +| `common.sh` | Shared test helpers (sourced by others) | Never run directly | +| `test_*.sh` | Individual test suite runners | Via `nix.sh test ` | +| `build_ui.sh` | Build WASM + web UI for one variant | Via `build_ui_all.sh` | +| `build_ui_all.sh` | Build UIs for both variants | Release workflow | +| `release.sh` | Version bump automation | Release workflow | +| `test_docker_image.sh` | Docker TLS/auth integration tests | CI container tests | +| `reinitialize_demo_kms.sh`| Demo server key rotation | Demo VM cron job | + +#### `nix/scripts/` + +| Script | Purpose | Invocation Context | +|-------------------------|------------------------------------------|-----------------------------| +| `build.sh` | Core build logic (called by `nix.sh`) | Inside `nix-shell --pure` | +| `package_deb.sh` | Debian package build | Via `nix.sh package deb` | +| `package_rpm.sh` | RPM package build | Via `nix.sh package rpm` | +| `package_dmg.sh` | macOS DMG build | Via `nix.sh package dmg` | +| `generate_sbom.sh` | SBOM generation orchestrator | Via `nix.sh sbom` | +| `update_all_hashes.sh` | Hash update automation | Via `nix.sh update-hashes` | +| `get_version.sh` | Extract version from `Cargo.toml` | Packaging scripts | +| `package_common.sh` | Shared packaging helpers | Sourced by `package_*.sh` | + +### Test Scripts Detailed + +#### Database Tests + +| Test Type | Script | Requirements | Key Features | +|--------------|---------------------|---------------------|---------------------------------------| +| SQLite | `test_sqlite.sh` | None (embedded) | Bins, benchmarks, DB tests | +| PostgreSQL | `test_psql.sh` | PostgreSQL server | Connection check + targeted tests | +| MySQL | `test_mysql.sh` | MySQL server | Connection check + targeted tests | +| Redis-findex | `test_redis.sh` | Redis server | Non-FIPS only; encrypted index tests | + +#### Specialized Tests + +| Test Type | Script | Requirements | Key Features | +|--------------|-----------------------|--------------------------------|---------------------------------------| +| Google CSE | `test_google_cse.sh` | OAuth credentials (4 env vars) | Client-Side Encryption integration | +| PyKMIP | `test_pykmip.sh` | Python 3.11 + virtualenv | KMIP protocol compatibility | + +#### HSM Tests + +| Backend | Script | Requirements | Key Features | +|--------------|--------------------------|------------------------|---------------------------------------| +| SoftHSM2 | `test_hsm_softhsm2.sh` | SoftHSM2 library | Token init, server + loader tests | +| Utimaco | `test_hsm_utimaco.sh` | Utimaco simulator | Simulator setup, PKCS#11 tests | +| Proteccio | `test_hsm_proteccio.sh` | Proteccio NetHSM | NetHSM env config, integration tests | +| Orchestrator | `test_hsm.sh` | All above (sequential) | Runs all three backends in order | + +**HSM Test Characteristics:** +- Run in **non-pure** `nix-shell` (needs system PKCS#11 libraries) +- Linux only (vendor libraries unavailable on macOS) +- Sequential execution (backends may conflict if parallel) + +### Call Graph + +``` +┌────────────────────────────────────────────────────────────────────────────┐ +│ nix.sh (entrypoint) │ +└──────┬──────────────────────────────────────┬─────────────────────┬────────┘ + │ │ │ + ├──[build]──→ nix/scripts/build.sh │ │ + │ │ │ + ├──[test]───→ .github/scripts/test_*.sh │ + │ ├─ sources common.sh │ + │ │ ├─ init_build_env() │ + │ │ ├─ setup_test_logging() │ + │ │ └─ check_and_test_db() │ + │ └─ cargo test (targeted) │ + │ │ + ├──[package]─→ nix/scripts/package_*.sh ────────────────────┤ + │ ├─ prewarm_nixpkgs_and_tools() │ + │ ├─ nix-build / nix-shell │ + │ ├─ Smoke test (extract + run --info) │ + │ └─ Generate .sha256 checksum │ + │ │ + ├──[sbom]────→ nix/scripts/generate_sbom.sh │ + │ └─ sbomnix (CycloneDX, SPDX, CSV, vulns) │ + │ │ + └──[update-hashes]─→ nix/scripts/update_all_hashes.sh │ + └─ Update cargoHash + binary hashes │ + +┌────────────────────────────────────────────────────────────────────────────┐ +│ Related Workflows │ +└────────────────────────────────────────────────────────────────────────────┘ + +release.sh ──→ build_ui_all.sh ──→ build_ui.sh (fips, non-fips) + └──→ cargo build + └──→ update_readme_kmip.py + └──→ git cliff (changelog) + +test_all.sh ──→ test_sqlite.sh + └──→ test_psql.sh (if release profile) + └──→ test_mysql.sh (if release profile) + └──→ test_redis.sh (if non-fips variant) + └──→ test_google_cse.sh (if credentials present) + └──→ test_hsm.sh (if Linux + release) + +test_hsm.sh ──→ test_hsm_softhsm2.sh + └──→ test_hsm_utimaco.sh + └──→ test_hsm_proteccio.sh +``` + +--- + +## Maintenance Guidelines + +### Adding a New Test Type + +1. **Create test script**: `.github/scripts/test_.sh` + - Source `common.sh` for shared helpers + - Call `init_build_env "$@"` to parse variant/profile + - Use `require_cmd` to check dependencies + - Run targeted `cargo test` commands + +2. **Update dispatcher**: Add case to `nix.sh` test command handling + ```bash + ) + SCRIPT="$REPO_ROOT/.github/scripts/test_.sh" + KEEP_VARS="..." # Add any required env vars + ;; + ``` + +3. **Update help text**: Add to `usage()` function in `nix.sh` + +4. **Optional**: Add to `test_all.sh` if it should run in comprehensive test suite + +### Updating Expected Hashes + +**When to update:** +- After modifying source code (binary hash changes) +- After updating dependencies (`Cargo.lock` changes → vendor hash) +- After Nix derivation changes (build flags, OpenSSL version) + +**Process:** +```bash +# Automatic (recommended): +bash .github/scripts/nix.sh update-hashes [--vendor-only | --binary-only] + +# Manual (for verification): +nix-build -A kms-server-fips +sha256sum result/bin/cosmian_kms +# Update nix/expected-hashes//fips.sha256 +``` + +**Review checklist:** +- [ ] Understand why hash changed (code change, dep update, etc.) +- [ ] Verify `cosmian_kms --info` shows correct version +- [ ] Smoke test passes (OpenSSL 3.1.2 present) +- [ ] No unexpected `/nix/store` paths in binary (Linux: `ldd`, `readelf -d`) +- [ ] Document reason in commit message + +### Script Best Practices + +- **Prefer `nix.sh` invocation**: Don't run test scripts directly; use `nix.sh test ` to ensure correct environment +- **Keep scripts side-effect minimal**: Rely on Nix for purity; avoid global state changes +- **Use `set -euo pipefail`**: Fail fast on errors; catch undefined variables +- **Source `common.sh`** for shared logic (don't duplicate) +- **Add usage functions**: Include `--help` text in all standalone scripts +- **Test in CI**: Ensure new scripts work in GitHub Actions (check `NO_PREWARM` behavior) + +--- + +## Future Enhancements + +### Proposed Improvements + +| Enhancement | Benefit | Effort | +|--------------------------------------------------|--------------------------------------------|--------| +| Structured JSON output (`nix.sh --json`) | Easier CI parsing, dashboard integration | Medium | +| UI bundle checksums in Nix derivations | Detect accidental web UI drift | Low | +| `shellcheck` + `shfmt` lint target | Enforce consistent script style | Low | +| HSM slot/PIN via CLI flags (not env only) | Clearer invocation, better security | Medium | +| Parallel test execution (independent DB tests) | Faster CI runs | High | +| SBOM integration in packages (embed in DEB/RPM) | One-click supply chain transparency | Medium | +| Cross-compilation support (ARM Linux from x86) | Broader platform coverage | High | +| Nix flakes migration | Modern Nix UX, better reproducibility | High | + +### Ongoing Maintenance + +- **Keep nixpkgs pinned**: Avoid unexpected breakage; update deliberately with testing +- **Monitor OpenSSL**: Watch for 3.1.x security patches; update tarball + hashes +- **Rust toolchain updates**: Test clippy/fmt changes before updating `rust-toolchain.toml` +- **Documentation sync**: Update this README when adding commands/scripts + +--- + +## Quick Reference + +### Common Tasks + +```bash +# Development +bash .github/scripts/nix.sh build # Debug FIPS build +bash .github/scripts/nix.sh test sqlite # Quick test iteration + +# Release preparation +bash .github/scripts/nix.sh build --profile release --variant fips +bash .github/scripts/nix.sh build --profile release --variant non-fips +bash .github/scripts/nix.sh test all # Full test suite +bash .github/scripts/nix.sh package # All packages +bash .github/scripts/nix.sh sbom # FIPS SBOM +bash .github/scripts/nix.sh --variant non-fips sbom # Non-FIPS SBOM + +# Hash maintenance +bash .github/scripts/nix.sh update-hashes --vendor-only # After Cargo.lock change +bash .github/scripts/nix.sh update-hashes --binary-only # After code change + +# CI simulation +NO_PREWARM=1 bash .github/scripts/nix.sh package deb # Skip prewarm (cached store) +``` + +### Environment Variables + +**Build/Package:** +- `NO_PREWARM=1`: Skip nixpkgs pre-fetch (for cached/offline builds) +- `NIX_PATH`: Override nixpkgs location (set automatically by `nix.sh`) + +**Tests:** +- `RUST_LOG=`: Cargo test verbosity (debug, info, warn, error) +- `COSMIAN_KMS_CONF`: Path to KMS config file (default: `scripts/kms.toml`) +- Database connection vars (see test section above) +- Google CSE credential vars (see test section above) + +--- + +**Generated**: 2025-01-23 +**Last Updated**: Match with changes to `nix.sh` and related scripts +**Maintainer**: Cosmian KMS Team diff --git a/.github/scripts/benchmarks.sh b/.github/scripts/benchmarks.sh new file mode 100755 index 000000000..01d2b6e0d --- /dev/null +++ b/.github/scripts/benchmarks.sh @@ -0,0 +1,23 @@ +#!/usr/bin/env bash +set -euo pipefail +set -x + +# SQLite tests - always available, runs on filesystem +SCRIPT_DIR=$(cd "$(dirname "$0")" && pwd) +source "$SCRIPT_DIR/common.sh" + +init_build_env "$@" +setup_test_logging +setup_fips_openssl_env + +# Ensure required tools are available when running outside Nix +require_cmd cargo "Cargo is required to build and run tests. Install Rust (rustup) and retry." + +echo "=========================================" +echo "Benchmarks tests" +echo "=========================================" + +echo "Building benchmarks..." +cargo bench "${FEATURES_FLAG[@]}" --no-run + +echo "Benchmarks completed successfully." diff --git a/.github/scripts/build_packages.sh b/.github/scripts/build_packages.sh deleted file mode 100755 index adc5f41f2..000000000 --- a/.github/scripts/build_packages.sh +++ /dev/null @@ -1,53 +0,0 @@ -#!/bin/bash - -set -exo pipefail - -# export FEATURES="non-fips" - -if [ -z "$TARGET" ]; then - echo "Error: TARGET is not set. Examples of TARGET are x86_64-unknown-linux-gnu, x86_64-apple-darwin, aarch64-apple-darwin." - exit 1 -fi - -if [ -n "$FEATURES" ]; then - FEATURES="--features $FEATURES" -fi - -if [ -z "$FEATURES" ]; then - echo "Info: FEATURES is not set." - unset FEATURES -fi - -if [ -z "$OPENSSL_DIR" ]; then - echo "Error: OPENSSL_DIR is not set. Example OPENSSL_DIR=/usr/local/openssl" - exit 1 -fi - -ROOT_FOLDER=$(pwd) - -if [ "$DEBUG_OR_RELEASE" = "release" ]; then - # First build the Debian and RPM packages. It must come at first since - # after this step `cosmian` and `cosmian_kms` are built with custom features flags (non-fips for example). - rm -rf target/"$TARGET"/debian - rm -rf target/"$TARGET"/generate-rpm - if [ -f /etc/redhat-release ]; then - cd crate/server && cargo build --features non-fips --release --target "$TARGET" && cd - - cargo install --version 0.16.0 cargo-generate-rpm --force - cd "$ROOT_FOLDER" - cargo generate-rpm --target "$TARGET" -p crate/server --metadata-overwrite=pkg/rpm/scriptlets.toml - elif [ -f /etc/debian_version ]; then - cargo install --version 2.4.0 cargo-deb --force - if [ -n "$FEATURES" ]; then - cargo deb --target "$TARGET" -p cosmian_kms_server - else - cargo deb --target "$TARGET" -p cosmian_kms_server --variant fips - fi - elif [[ "$TARGET" == *"apple-darwin"* ]]; then - cargo install --version 0.11.7 cargo-packager --force - cd crate/server - cargo build --features non-fips --release - cargo packager --verbose --formats dmg --release - cd "$ROOT_FOLDER" - fi - -fi diff --git a/.github/scripts/build_ui.sh b/.github/scripts/build_ui.sh index 1aebe149a..6b6550a56 100644 --- a/.github/scripts/build_ui.sh +++ b/.github/scripts/build_ui.sh @@ -9,8 +9,30 @@ # Exit on error, print commands set -ex -if [ -n "$FEATURES" ]; then - CARGO_FEATURES="--features $FEATURES" +# Args: --variant fips|non-fips (default: fips) +VARIANT="fips" +while [ $# -gt 0 ]; do + case "$1" in + -v | --variant) + VARIANT="${2:-}" + shift 2 || true + ;; + *) shift ;; # ignore + esac +done + +case "$VARIANT" in +fips | non-fips) : ;; +*) + echo "Error: --variant must be 'fips' or 'non-fips'" >&2 + exit 1 + ;; +esac + +if [ "$VARIANT" = "non-fips" ]; then + CARGO_FEATURES=(--features non-fips) +else + CARGO_FEATURES=() fi # Install nodejs from nodesource if npm is not installed @@ -37,7 +59,7 @@ cargo install wasm-pack # Build WASM component cd crate/wasm # shellcheck disable=SC2086 -wasm-pack build --target web --release $CARGO_FEATURES +wasm-pack build --target web --release "${CARGO_FEATURES[@]}" # Copy WASM artifacts to UI directory WASM_DIR="../../ui/src/wasm/" @@ -56,7 +78,10 @@ npm audit # Deploy built UI to root cd .. # current path: ./ -DEST_DIR="crate/server/ui${CARGO_FEATURES:+_non_fips}" +DEST_DIR="crate/server/ui" +if [ "$VARIANT" = "non-fips" ]; then + DEST_DIR="crate/server/ui_non_fips" +fi rm -rf "$DEST_DIR" mkdir -p "$DEST_DIR" cp -R ui/dist "$DEST_DIR" diff --git a/.github/scripts/build_ui_all.sh b/.github/scripts/build_ui_all.sh index b50b0fe0e..fc8f46152 100644 --- a/.github/scripts/build_ui_all.sh +++ b/.github/scripts/build_ui_all.sh @@ -9,8 +9,8 @@ # Exit on error, print commands set -ex -bash ./.github/scripts/build_ui.sh +bash ./.github/scripts/build_ui.sh --variant fips git add crate/server/ui -FEATURES=non-fips bash ./.github/scripts/build_ui.sh +bash ./.github/scripts/build_ui.sh --variant non-fips git add crate/server/ui_non_fips diff --git a/.github/scripts/cargo_build.ps1 b/.github/scripts/cargo_build.ps1 index 6f6a00a71..1fc66e17e 100644 --- a/.github/scripts/cargo_build.ps1 +++ b/.github/scripts/cargo_build.ps1 @@ -10,7 +10,6 @@ function BuildProject [string]$BuildType ) - $env:RUST_LOG = "cosmian_kms_cli=error,cosmian_kms_server=error,cosmian_kmip=error,test_kms_server=error" # Add target rustup target add x86_64-pc-windows-msvc @@ -44,24 +43,7 @@ function BuildProject exit 1 } - if ($BuildType -eq "release") - { - cargo test --lib --workspace --release --features "non-fips" -- --nocapture - if ($LASTEXITCODE -ne 0) - { - Write-Error "Release tests failed with exit code $LASTEXITCODE" - exit $LASTEXITCODE - } - } - else - { - cargo test --lib --workspace --features "non-fips" -- --nocapture - if ($LASTEXITCODE -ne 0) - { - Write-Error "Debug tests failed with exit code $LASTEXITCODE" - exit $LASTEXITCODE - } - } + exit 0 } diff --git a/.github/scripts/cargo_build.sh b/.github/scripts/cargo_build.sh deleted file mode 100755 index 7ec11b567..000000000 --- a/.github/scripts/cargo_build.sh +++ /dev/null @@ -1,59 +0,0 @@ -#!/bin/bash - -set -exo pipefail - -# export FEATURES="non-fips" - -if [ -z "$TARGET" ]; then - echo "Error: TARGET is not set. Examples of TARGET are x86_64-unknown-linux-gnu, x86_64-apple-darwin, aarch64-apple-darwin." - exit 1 -fi - -if [ "$DEBUG_OR_RELEASE" = "release" ]; then - RELEASE="--release" -fi - -if [ -n "$FEATURES" ]; then - FEATURES="--features $FEATURES" -fi - -if [ -z "$FEATURES" ]; then - echo "Info: FEATURES is not set." - unset FEATURES -fi - -if [ -z "$OPENSSL_DIR" ]; then - echo "Error: OPENSSL_DIR is not set. Example OPENSSL_DIR=/usr/local/openssl" - exit 1 -fi - -rustup target add "$TARGET" - -# shellcheck disable=SC2086 -cargo build -p cosmian_kms_server --target $TARGET $RELEASE $FEATURES - -COSMIAN_KMS_EXE="target/$TARGET/$DEBUG_OR_RELEASE/cosmian_kms" - -# Must use OpenSSL with this specific version 3.2.0 -OPENSSL_VERSION_REQUIRED="3.2.0" -correct_openssl_version_found=$(./"$COSMIAN_KMS_EXE" --info | grep "$OPENSSL_VERSION_REQUIRED") -if [ -z "$correct_openssl_version_found" ]; then - echo "Error: The correct OpenSSL version $OPENSSL_VERSION_REQUIRED is not found." - exit 1 -fi - -if [ "$(uname)" = "Linux" ]; then - LDD_OUTPUT=$(ldd "$COSMIAN_KMS_EXE") - echo "$LDD_OUTPUT" - if echo "$LDD_OUTPUT" | grep -qi ssl; then - echo "Error: Dynamic OpenSSL linkage detected on Linux (ldd | grep ssl)." - exit 1 - fi -else - OTOOL_OUTPUT=$(otool -L "$COSMIAN_KMS_EXE") - echo "$OTOOL_OUTPUT" - if echo "$OTOOL_OUTPUT" | grep -qi ssl; then - echo "Error: Dynamic OpenSSL linkage detected on macOS (otool -L | grep openssl)." - exit 1 - fi -fi diff --git a/.github/scripts/cargo_test.ps1 b/.github/scripts/cargo_test.ps1 new file mode 100644 index 000000000..7284d2d21 --- /dev/null +++ b/.github/scripts/cargo_test.ps1 @@ -0,0 +1,43 @@ +$ErrorActionPreference = "Stop" +Set-StrictMode -Version Latest +$PSNativeCommandUseErrorActionPreference = $true # might be true by default + +function TestProject +{ + param ( + [Parameter(Mandatory = $true)] + [ValidateSet("debug", "release")] + [string]$BuildType + ) + + $env:RUST_LOG = "cosmian_kms_cli=error,cosmian_kms_server=error,cosmian_kmip=error,test_kms_server=error" + # Add target + rustup target add x86_64-pc-windows-msvc + + $env:OPENSSL_DIR = "$env:VCPKG_INSTALLATION_ROOT\packages\openssl_x64-windows-static" + Get-ChildItem -Recurse $env:OPENSSL_DIR + + if ($BuildType -eq "release") + { + cargo test --lib --workspace --release --features "non-fips" -- --nocapture + if ($LASTEXITCODE -ne 0) + { + Write-Error "Release tests failed with exit code $LASTEXITCODE" + exit $LASTEXITCODE + } + } + else + { + cargo test --lib --workspace --features "non-fips" -- --nocapture + if ($LASTEXITCODE -ne 0) + { + Write-Error "Debug tests failed with exit code $LASTEXITCODE" + exit $LASTEXITCODE + } + } +} + + +# Example usage: +# TestProject -BuildType debug +# TestProject -BuildType release diff --git a/.github/scripts/cargo_test.sh b/.github/scripts/cargo_test.sh deleted file mode 100755 index a6715186b..000000000 --- a/.github/scripts/cargo_test.sh +++ /dev/null @@ -1,136 +0,0 @@ -#!/bin/bash - -set -exo pipefail - -# export FEATURES="non-fips" - -if [ -z "$TARGET" ]; then - echo "Error: TARGET is not set. Examples of TARGET are x86_64-unknown-linux-gnu, x86_64-apple-darwin, aarch64-apple-darwin." - exit 1 -fi - -if [ "$DEBUG_OR_RELEASE" = "release" ]; then - RELEASE="--release" -fi - -if [ -n "$FEATURES" ]; then - FEATURES="--features $FEATURES" -fi - -if [ -z "$FEATURES" ]; then - echo "Info: FEATURES is not set." - unset FEATURES -fi - -if [ -z "$OPENSSL_DIR" ]; then - echo "Error: OPENSSL_DIR is not set. Example OPENSSL_DIR=/usr/local/openssl" - exit 1 -fi - -export RUST_LOG="cosmian_kms_cli=error,cosmian_kms_server=error,cosmian_kmip=error,test_kms_server=error" - -# shellcheck disable=SC2086 -cargo test --workspace --bins --target $TARGET $RELEASE $FEATURES - -# shellcheck disable=SC2086 -cargo bench --target $TARGET $FEATURES --no-run - -echo "SQLite is running on filesystem" -# shellcheck disable=SC2086 -KMS_TEST_DB="sqlite" cargo test --workspace --lib --target $TARGET $RELEASE $FEATURES -- --nocapture -# shellcheck disable=SC2086 -KMS_TEST_DB="sqlite" cargo test -p cosmian_kms_server_database --lib --target $TARGET $RELEASE $FEATURES -- --nocapture test_db_sqlite --ignored - -if nc -z "$REDIS_HOST" "$REDIS_PORT"; then - echo "Redis is running at $REDIS_HOST:$REDIS_PORT" - # shellcheck disable=SC2086 - KMS_TEST_DB="redis-findex" cargo test --workspace --lib --target $TARGET $RELEASE $FEATURES -- --nocapture - # shellcheck disable=SC2086 - KMS_TEST_DB="redis-findex" cargo test -p cosmian_kms_server_database --lib --target $TARGET $RELEASE $FEATURES -- --nocapture test_db_redis_with_findex --ignored -else - echo "Redis is not running at $REDIS_HOST:$REDIS_PORT" -fi - -if nc -z "$MYSQL_HOST" "$MYSQL_PORT"; then - echo "MySQL is running at $MYSQL_HOST:$MYSQL_PORT" - # shellcheck disable=SC2086 - KMS_TEST_DB="mysql" cargo test --workspace --lib --target $TARGET $RELEASE $FEATURES -- --nocapture - # shellcheck disable=SC2086 - KMS_TEST_DB="mysql" cargo test -p cosmian_kms_server_database --lib --target $TARGET $RELEASE $FEATURES -- --nocapture test_db_mysql --ignored -else - echo "MySQL is not running at $MYSQL_HOST:$MYSQL_PORT" -fi - -if nc -z "$POSTGRES_HOST" "$POSTGRES_PORT"; then - echo "PostgreSQL is running at $POSTGRES_HOST:$POSTGRES_PORT" - # shellcheck disable=SC2086 - KMS_TEST_DB="postgresql" cargo test --workspace --lib --target $TARGET $RELEASE $FEATURES -- --nocapture - # shellcheck disable=SC2086 - KMS_TEST_DB="postgresql" cargo test --workspace --lib --target $TARGET $RELEASE $FEATURES -- --nocapture test_db_postgresql --ignored -else - echo "PostgreSQL is not running at $POSTGRES_HOST:$POSTGRES_PORT" -fi - -# Google CSE tests -if [ -n "$TEST_GOOGLE_OAUTH_CLIENT_ID" ] && [ -n "$TEST_GOOGLE_OAUTH_CLIENT_SECRET" ] && [ -n "$TEST_GOOGLE_OAUTH_REFRESH_TOKEN" ] && [ -n "$GOOGLE_SERVICE_ACCOUNT_PRIVATE_KEY" ]; then - echo "Running Google CSE tests..." - # shellcheck disable=SC2086 - cargo test --workspace --lib --target $TARGET $RELEASE $FEATURES -- --nocapture test_google_cse --ignored -fi - -if [ -f /etc/lsb-release ]; then - export HSM_USER_PASSWORD="12345678" - - # Install Utimaco simulator and run tests - bash .github/reusable_scripts/test_utimaco.sh - - # Install SoftHSM2 and run tests - sudo apt-get install -y libsofthsm2 - sudo softhsm2-util --init-token --slot 0 --label "my_token_1" --so-pin "$HSM_USER_PASSWORD" --pin "$HSM_USER_PASSWORD" - - UTIMACO_HSM_SLOT_ID=0 - SOFTHSM2_HSM_SLOT_ID=$(sudo softhsm2-util --show-slots | grep -o "Slot [0-9]*" | head -n1 | awk '{print $2}') - - # HSM tests with uniformized loop - declare -a HSM_MODELS=('utimaco' 'softhsm2') - for HSM_MODEL in "${HSM_MODELS[@]}"; do - if [ "$HSM_MODEL" = "utimaco" ]; then - HSM_SLOT_ID="$UTIMACO_HSM_SLOT_ID" - HSM_PACKAGE="utimaco_pkcs11_loader" - HSM_FEATURE="utimaco" - else - HSM_SLOT_ID="$SOFTHSM2_HSM_SLOT_ID" - HSM_PACKAGE="softhsm2_pkcs11_loader" - HSM_FEATURE="softhsm2" - fi - - # Test HSM package directly - # shellcheck disable=SC2086 - sudo -E env "PATH=$PATH" HSM_MODEL="$HSM_MODEL" HSM_USER_PASSWORD="$HSM_USER_PASSWORD" HSM_SLOT_ID="$HSM_SLOT_ID" \ - cargo test -p "$HSM_PACKAGE" --target "$TARGET" $RELEASE --features "$HSM_FEATURE" -- tests::test_hsm_${HSM_MODEL}_all --ignored - - # Test HSM integration with KMS server - # shellcheck disable=SC2086 - sudo -E env "PATH=$PATH" HSM_MODEL="$HSM_MODEL" HSM_USER_PASSWORD="$HSM_USER_PASSWORD" HSM_SLOT_ID="$HSM_SLOT_ID" \ - cargo test --target "$TARGET" $FEATURES $RELEASE -- tests::hsm::test_hsm_all --ignored - done - - # Fail if env. variables for Google CSE tests are not set - if [ -z "$TEST_GOOGLE_OAUTH_CLIENT_ID" ] || [ -z "$TEST_GOOGLE_OAUTH_CLIENT_SECRET" ] || [ -z "$TEST_GOOGLE_OAUTH_REFRESH_TOKEN" ] || [ -z "$GOOGLE_SERVICE_ACCOUNT_PRIVATE_KEY" ]; then - echo "Error: One or more environment variables for Google CSE tests are not set." - echo "Please set TEST_GOOGLE_OAUTH_CLIENT_ID, TEST_GOOGLE_OAUTH_CLIENT_SECRET, TEST_GOOGLE_OAUTH_REFRESH_TOKEN, and GOOGLE_SERVICE_ACCOUNT_PRIVATE_KEY." - exit 1 - fi - - # shellcheck disable=SC2086 - sudo -E env "PATH=$PATH" \ - RUST_LOG="cosmian_kms_cli=trace,cosmian_kms_server=trace" \ - HSM_MODEL="utimaco" \ - HSM_USER_PASSWORD="$HSM_USER_PASSWORD" \ - HSM_SLOT_ID=$UTIMACO_HSM_SLOT_ID \ - TEST_GOOGLE_OAUTH_CLIENT_ID="$TEST_GOOGLE_OAUTH_CLIENT_ID" \ - TEST_GOOGLE_OAUTH_CLIENT_SECRET="$TEST_GOOGLE_OAUTH_CLIENT_SECRET" \ - TEST_GOOGLE_OAUTH_REFRESH_TOKEN="$TEST_GOOGLE_OAUTH_REFRESH_TOKEN" \ - GOOGLE_SERVICE_ACCOUNT_PRIVATE_KEY="$GOOGLE_SERVICE_ACCOUNT_PRIVATE_KEY" \ - cargo test -p cosmian_kms_cli --target "$TARGET" $RELEASE $FEATURES -- --nocapture hsm_google_cse --ignored -fi diff --git a/.github/scripts/check_build.sh b/.github/scripts/check_build.sh deleted file mode 100644 index 28ec498c8..000000000 --- a/.github/scripts/check_build.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/bash - -set -e - -# Install cargo deny if not already installed -# cargo install --version 0.18.2 cargo-deny --locked - -find . -name "Cargo.toml" -not -path "./Cargo.toml" -exec dirname {} \; | while read -r dir; do - echo "Running cargo build in $dir" - pushd "$dir" - cargo build - cargo test -- --nocapture - cargo clippy --all-targets -- -D warnings - cargo deny check advisories - popd -done - -cargo hack build --all --feature-powerset diff --git a/.github/scripts/common.sh b/.github/scripts/common.sh new file mode 100644 index 000000000..00c176b1f --- /dev/null +++ b/.github/scripts/common.sh @@ -0,0 +1,252 @@ +#!/usr/bin/env bash +# Minimal shared helpers for packaging scripts (nix build) and smoke tests + +set -euo pipefail + +# Initialize build/test configuration from CLI args +# Usage: init_build_env "$@" +# Exports: +# VARIANT fips | non-fips +# VARIANT_NAME FIPS | non-FIPS (pretty) +# BUILD_PROFILE debug | release +# RELEASE_FLAG "" | --release +# FEATURES_FLAG cargo feature array (non-fips -> --features non-fips) +init_build_env() { + local profile="debug" variant="fips" + + # Parse only our known flags; ignore/keep others for callers + local i=1 + while [ $i -le $# ]; do + case "${!i}" in + --profile) + i=$((i + 1)) + profile="${!i:-}" + ;; + --variant) + i=$((i + 1)) + variant="${!i:-}" + ;; + -p) + i=$((i + 1)) + profile="${!i:-}" + ;; + -v) + i=$((i + 1)) + variant="${!i:-}" + ;; + esac + i=$((i + 1)) + done + + case "$variant" in + fips | non-fips) : ;; + *) + echo "Error: --variant must be 'fips' or 'non-fips'" >&2 + exit 1 + ;; + esac + VARIANT="$variant" + VARIANT_NAME=$([ "$VARIANT" = "non-fips" ] && echo "non-FIPS" || echo "FIPS") + + # Default profile when not specified: debug + case "${profile:-debug}" in + release) + BUILD_PROFILE="release" + RELEASE_FLAG="--release" + ;; + debug | *) + BUILD_PROFILE="debug" + RELEASE_FLAG="" + ;; + esac + + # FEATURES_FLAG derived strictly from variant + FEATURES_FLAG=() + if [ "$VARIANT" = "non-fips" ]; then + FEATURES_FLAG=(--features non-fips) + fi + + export VARIANT VARIANT_NAME BUILD_PROFILE RELEASE_FLAG +} + +# Require a command to be available (gentle helper for running outside Nix) +require_cmd() { + local cmd="$1" + shift || true + local msg="${*:-Required command $cmd not found. Please install it and retry.}" + if ! command -v "$cmd" >/dev/null 2>&1; then + echo "Error: $msg" >&2 + exit 1 + fi +} + +# Resolve repository root directory. +# Usage: get_repo_root [hint_path] +# Tries git first; falls back to walking up until Cargo.toml and crate/ are found; +# as a last resort, returns hint/../.. (suitable for scripts under .github/scripts). +get_repo_root() { + local hint="${1:-$(pwd)}" + + # Try git if available + if command -v git >/dev/null 2>&1; then + local root + if root=$(git -C "$hint" rev-parse --show-toplevel 2>/dev/null); then + echo "$root" + return 0 + fi + fi + + # Walk up until we find clear markers of the repo root + local dir="$hint" + while [ "$dir" != "/" ]; do + if [ -f "$dir/Cargo.toml" ] && [ -d "$dir/crate" ]; then + echo "$dir" + return 0 + fi + dir="$(dirname "$dir")" + done + + # Fallback: assume scripts live in .github/scripts -> go up two levels + (cd "$hint/../.." >/dev/null 2>&1 && pwd) +} + +# Note: legacy packaging helpers removed; packaging smoke tests now live in nix.sh + +# ------------------------------ +# Test helpers (used by test_*.sh) +# ------------------------------ + +# Setup concise logging for tests unless caller overrides RUST_LOG +setup_test_logging() { + : "${RUST_LOG:=cosmian_kms_cli=error,cosmian_kms_server=error,cosmian_kmip=error,test_kms_server=error}" + export RUST_LOG +} + +# Export OpenSSL FIPS runtime variables to match the locally built static OpenSSL +# Only for FIPS variant and when not running inside Nix (Nix sets these via derivations) +setup_fips_openssl_env() { + if [ "${VARIANT:-}" != "fips" ] || [ -n "${IN_NIX_SHELL:-}" ]; then + return 0 + fi + + local repo_root + repo_root="$(get_repo_root "${SCRIPT_DIR:-$(pwd)}")" + + # Map platform to the same os/arch scheme used by build.rs + local os arch + case "$(uname -s)" in + Darwin) os="macos" ;; + Linux) os="linux" ;; + *) os="unknown-os" ;; + esac + case "$(uname -m)" in + arm64 | aarch64) arch="aarch64" ;; + x86_64 | amd64) arch="x86_64" ;; + *) arch="unknown-arch" ;; + esac + + local prefix + prefix="${repo_root}/target/openssl-fips-3.1.2-${os}-${arch}" + + # Point OpenSSL to our patched config and provider modules + export OPENSSL_CONF="${prefix}/ssl/openssl.cnf" + export OPENSSL_MODULES="${prefix}/lib/ossl-modules" +} + +# Internal: run the Rust workspace tests for a given DB selector +# Usage: _run_workspace_tests +_run_workspace_tests() { + local db="$1" + # Ensure cargo is available when running outside Nix + require_cmd cargo "Cargo is required to run the Rust test workspace. Install Rust (rustup) and retry." + # Export the selector understood by the test harness + case "$db" in + sqlite | postgresql | mysql | redis-findex) + export KMS_TEST_DB="$db" + ;; + redis) + export KMS_TEST_DB="redis-findex" + ;; + *) + echo "Unknown DB '$db'" >&2 + return 1 + ;; + esac + + # Provide sensible defaults matching repo docs when applicable + case "$KMS_TEST_DB" in + sqlite) + : "${KMS_SQLITE_PATH:=data/shared}" + export KMS_SQLITE_PATH + ;; + postgresql) + : "${KMS_POSTGRES_URL:=postgresql://kms:kms@127.0.0.1:5432/kms}" + export KMS_POSTGRES_URL + ;; + mysql) + : "${KMS_MYSQL_URL:=mysql://kms:kms@127.0.0.1:3306/kms}" + export KMS_MYSQL_URL + ;; + esac + + # When running outside Nix in non-FIPS mode, skip CLI crate tests by default to avoid + # TLS/FIPS provider mismatches on host systems. Opt-in via KMS_INCLUDE_CLI=1. + local extra_args=() + if [ -z "${IN_NIX_SHELL:-}" ] && [ "${VARIANT:-}" = "non-fips" ] && [ -z "${KMS_INCLUDE_CLI:-}" ]; then + echo "Notice: Skipping cosmian_kms_cli tests (outside Nix, non-FIPS). Set KMS_INCLUDE_CLI=1 to include them." >&2 + extra_args+=(--exclude cosmian_kms_cli) + fi + + # shellcheck disable=SC2086 + cargo test --workspace --lib "${extra_args[@]}" $RELEASE_FLAG "${FEATURES_FLAG[@]}" -- --nocapture +} + +# Public: run DB-specific tests with optional service checks +# Usage: run_db_tests +run_db_tests() { + local db="$1" + _run_workspace_tests "$db" +} + +# Wait for a TCP host:port to be reachable (best-effort, small timeout) +_wait_for_port() { + local host="$1" port="$2" timeout="${3:-10}" + local start now + start=$(date +%s) + while true; do + if (exec 3<>"/dev/tcp/$host/$port") 2>/dev/null; then + exec 3>&- 3<&- + return 0 + fi + now=$(date +%s) + [ $((now - start)) -ge "$timeout" ] && return 1 + sleep 1 + done +} + +# Check that a DB service is up, then run tests for that DB +# Usage: check_and_test_db +check_and_test_db() { + local pretty="$1" dbkey="$2" host_var="$3" port_var="$4" + local host="${!host_var:-127.0.0.1}" port="${!port_var:-}" + case "$dbkey" in + postgresql) : "${port:=5432}" ;; + mysql) : "${port:=3306}" ;; + redis | redis-findex) : "${port:=6379}" ;; + esac + + echo "Checking $pretty at $host:$port..." + if _wait_for_port "$host" "$port" 10; then + echo "$pretty is reachable. Running tests..." + else + echo "Error: $pretty at $host:$port not reachable after timeout; skipping $pretty tests." >&2 + # Respect repo guidance: only run DB-backed suites when the service is available. + # Return success to allow the overall orchestrator to continue to other suites. + return 0 + fi + + case "$dbkey" in + redis) dbkey="redis-findex" ;; + esac + run_db_tests "$dbkey" +} diff --git a/.github/scripts/find_empty_files.sh b/.github/scripts/find_empty_files.sh deleted file mode 100644 index f45d0988c..000000000 --- a/.github/scripts/find_empty_files.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/bash - -set -ex - -# Find all regular files that are empty (size 0) -find . -not -path "./*.cargo_check/**" -not -path "./**target/**" -not -path "./*env/lib/*" -not -path "./*node_modules/**" -not -path "./.git/**" -type f -empty -print diff --git a/.github/scripts/nix.sh b/.github/scripts/nix.sh new file mode 100755 index 000000000..6224ca85d --- /dev/null +++ b/.github/scripts/nix.sh @@ -0,0 +1,583 @@ +#!/usr/bin/env bash +# Unified entrypoint to run nix-shell commands: build, test, or packages +set -euo pipefail + +# Display usage information +usage() { + cat < Build/test profile (default: debug for build/test; release for package) + -v, --variant Cryptographic variant (default: fips) + + For testing, also supports environment variables: + REDIS_HOST, REDIS_PORT + MYSQL_HOST, MYSQL_PORT + POSTGRES_HOST, POSTGRES_PORT + TEST_GOOGLE_OAUTH_CLIENT_ID, TEST_GOOGLE_OAUTH_CLIENT_SECRET + TEST_GOOGLE_OAUTH_REFRESH_TOKEN, GOOGLE_SERVICE_ACCOUNT_PRIVATE_KEY + + Examples: + $0 build --profile release --variant non-fips + $0 test # defaults to all + $0 test all + $0 test sqlite + $0 test mysql + $0 --variant non-fips test redis + $0 --variant non-fips test pykmip # PyKMIP client tests + $0 test hsm # both SoftHSM2 + Utimaco + Proteccio + $0 test hsm softhsm2 # SoftHSM2 only + $0 test hsm utimaco # Utimaco only + $0 test hsm proteccio # Proteccio only + $0 package # Build all packages for this OS + $0 package deb # FIPS variant + $0 --variant non-fips package deb # non-FIPS variant + $0 --variant non-fips package rpm # non-FIPS variant + $0 --variant non-fips package dmg # non-FIPS variant + $0 sbom # Generate SBOM for FIPS variant + $0 --variant non-fips sbom # Generate SBOM for non-FIPS variant + $0 update-hashes # Update all hashes for current platform + $0 update-hashes --vendor-only # Update only Cargo vendor hash + $0 update-hashes --binary-only # Update only binary hashes +EOF + exit 1 +} + +# Default options +PROFILE="debug" +VARIANT="fips" + +# Parse global options before the subcommand +while [ $# -gt 0 ]; do + case "$1" in + -p | --profile) + PROFILE="${2:-}" + shift 2 || true + ;; + -v | --variant) + VARIANT="${2:-}" + shift 2 || true + ;; + build | test | package | sbom | update-hashes) + COMMAND="$1" + shift + break + ;; + -h | --help) + usage + ;; + *) + # Stop at first non-option token if command already provided + if [ -n "${COMMAND:-}" ]; then + break + fi + echo "Unknown option: $1" >&2 + usage + ;; + esac +done + +# Validate command argument +[ -z "${COMMAND:-}" ] && usage + +# Handle test subcommand +TEST_TYPE="" +if [ "$COMMAND" = "test" ]; then + if [ $# -eq 0 ]; then + # Default to all when no type is provided + TEST_TYPE="all" + else + TEST_TYPE="$1" + shift + fi +fi + +# Handle package subcommand (type is optional; if omitted, build all for platform) +PACKAGE_TYPE="" +if [ "$COMMAND" = "package" ]; then + if [ $# -ge 1 ]; then + PACKAGE_TYPE="$1" + shift + fi +fi + +# Flag extra tools for nix-shell through environment (avoids mixing -p with shell.nix) +if [ "$COMMAND" = "test" ]; then + export WITH_WGET=1 +fi + +# Determine repository root +REPO_ROOT=$(cd "$(dirname "$0")/../.." && pwd) +cd "$REPO_ROOT" + +# Compute a SHA-256 for a given file using the best available tool +compute_sha256() { + local file="$1" + if command -v sha256sum >/dev/null 2>&1; then + sha256sum "$file" | awk '{print $1}' + else + shasum -a 256 "$file" | awk '{print $1}' + fi +} + +# Validate command and corresponding script +case "$COMMAND" in +build) + SCRIPT="$REPO_ROOT/nix/scripts/build.sh" + KEEP_VARS="" + ;; +test) + case "$TEST_TYPE" in + all) + SCRIPT="$REPO_ROOT/.github/scripts/test_all.sh" + ;; + sqlite) + SCRIPT="$REPO_ROOT/.github/scripts/test_sqlite.sh" + ;; + mysql) + SCRIPT="$REPO_ROOT/.github/scripts/test_mysql.sh" + ;; + psql) + SCRIPT="$REPO_ROOT/.github/scripts/test_psql.sh" + ;; + redis) + SCRIPT="$REPO_ROOT/.github/scripts/test_redis.sh" + ;; + google_cse) + SCRIPT="$REPO_ROOT/.github/scripts/test_google_cse.sh" + # Validate required Google OAuth credentials before entering nix-shell + for var in TEST_GOOGLE_OAUTH_CLIENT_ID TEST_GOOGLE_OAUTH_CLIENT_SECRET \ + TEST_GOOGLE_OAUTH_REFRESH_TOKEN GOOGLE_SERVICE_ACCOUNT_PRIVATE_KEY; do + if [ -z "${!var:-}" ]; then + echo "Error: Required environment variable $var is not set" >&2 + echo "Google CSE tests require valid OAuth credentials." >&2 + echo "Please set the following environment variables:" >&2 + echo " - TEST_GOOGLE_OAUTH_CLIENT_ID" >&2 + echo " - TEST_GOOGLE_OAUTH_CLIENT_SECRET" >&2 + echo " - TEST_GOOGLE_OAUTH_REFRESH_TOKEN" >&2 + echo " - GOOGLE_SERVICE_ACCOUNT_PRIVATE_KEY" >&2 + exit 1 + fi + done + ;; + pykmip) + SCRIPT="$REPO_ROOT/.github/scripts/test_pykmip.sh" + ;; + hsm) + # Optional backend argument: softhsm2 | utimaco | proteccio | all (default) + HSM_BACKEND="${1:-all}" + case "$HSM_BACKEND" in + all) + SCRIPT="$REPO_ROOT/.github/scripts/test_hsm.sh" + ;; + softhsm2) + SCRIPT="$REPO_ROOT/.github/scripts/test_hsm_softhsm2.sh" + shift + ;; + utimaco) + SCRIPT="$REPO_ROOT/.github/scripts/test_hsm_utimaco.sh" + shift + ;; + proteccio) + SCRIPT="$REPO_ROOT/.github/scripts/test_hsm_proteccio.sh" + shift + ;; + *) + echo "Error: Unknown HSM backend '$HSM_BACKEND'" >&2 + echo "Valid backends for 'hsm': softhsm2, utimaco, proteccio, all" >&2 + usage + ;; + esac + ;; + *) + echo "Error: Unknown test type '$TEST_TYPE'" >&2 + echo "Valid types: sqlite, mysql, psql, redis, google_cse, pykmip, hsm [softhsm2|utimaco|proteccio|all]" >&2 + usage + ;; + esac + # Signal to shell.nix to include extra tools for tests (wget, softhsm2, psmisc) + if [ "$TEST_TYPE" = "hsm" ] || [ "$TEST_TYPE" = "all" ]; then + export WITH_HSM=1 + fi + # For PyKMIP tests, ensure Python tooling is present inside the Nix shell + if [ "$TEST_TYPE" = "pykmip" ]; then + export WITH_PYTHON=1 + fi + KEEP_VARS=" \ + --keep REDIS_HOST --keep REDIS_PORT \ + --keep MYSQL_HOST --keep MYSQL_PORT \ + --keep POSTGRES_HOST --keep POSTGRES_PORT \ + --keep TEST_GOOGLE_OAUTH_CLIENT_ID \ + --keep TEST_GOOGLE_OAUTH_CLIENT_SECRET \ + --keep TEST_GOOGLE_OAUTH_REFRESH_TOKEN \ + --keep GOOGLE_SERVICE_ACCOUNT_PRIVATE_KEY \ + --keep WITH_WGET \ + --keep WITH_HSM \ + --keep WITH_PYTHON" + ;; +package) + # Prefer Nix derivations (nix/package.nix) over shell scripts + case "$VARIANT" in + fips | non-fips) : ;; + *) + echo "Error: --variant must be 'fips' or 'non-fips'" >&2 + exit 1 + ;; + esac + case "$PACKAGE_TYPE" in + "" | deb | rpm | dmg) + : + ;; + *) + echo "Error: Unknown package type '$PACKAGE_TYPE'" >&2 + echo "Valid types: deb, rpm, dmg or leave empty to build all" >&2 + usage + ;; + esac + + # Special-case: On macOS, DMG packaging needs system tools (hdiutil, osascript). + # Run inside nix-shell (non-pure) to keep access to system utilities and still use cargo-packager. + if [ "$(uname)" = "Darwin" ]; then + # Build only DMG on macOS when no type specified + if [ -z "$PACKAGE_TYPE" ]; then + PACKAGE_TYPE="dmg" + fi + if [ "$PACKAGE_TYPE" = "dmg" ]; then + SCRIPT="$REPO_ROOT/nix/scripts/package_dmg.sh" + KEEP_VARS="" + echo "Note: Building DMG via nix-shell to allow macOS system tools (cargo-packager path)." + # Run without --pure to preserve access to /usr/bin tools + PIN_URL="https://github.com/NixOS/nixpkgs/archive/24.05.tar.gz" + # shellcheck disable=SC2086 + nix-shell -I "nixpkgs=${PIN_URL}" $KEEP_VARS "$REPO_ROOT/shell.nix" \ + --run "bash '$SCRIPT' --variant '$VARIANT'" + # After packaging, compute checksum for the produced DMG (if present) + OUT_DIR="$REPO_ROOT/result-dmg-$VARIANT" + dmg_file=$(find "$OUT_DIR" -maxdepth 1 -type f -name '*.dmg' | head -n1 || true) + if [ -n "${dmg_file:-}" ] && [ -f "$dmg_file" ]; then + if command -v shasum >/dev/null 2>&1; then + sum=$(shasum -a 256 "$dmg_file" | awk '{print $1}') + else + sum=$(sha256sum "$dmg_file" | awk '{print $1}') + fi + echo "$sum $(basename "$dmg_file")" >"$dmg_file.sha256" + echo "Wrote checksum: $dmg_file.sha256 ($sum)" + fi + exit 0 + fi + fi + ;; +sbom) + # SBOM generation using sbomnix - runs OUTSIDE nix-shell + # sbomnix needs direct access to nix-store and nix commands + SCRIPT="$REPO_ROOT/nix/scripts/generate_sbom.sh" + echo "Running SBOM generation (not in nix-shell - sbomnix needs nix commands)..." + bash "$SCRIPT" --variant "$VARIANT" "$@" + exit $? + ;; +update-hashes) + # Hash update - delegate to standalone script + echo "Delegating to nix/scripts/update_all_hashes.sh..." + SCRIPT="$REPO_ROOT/nix/scripts/update_all_hashes.sh" + + # Pass through variant flag and all arguments + if [ "$VARIANT" != "fips" ]; then + exec bash "$SCRIPT" --variant "$VARIANT" "$@" + else + exec bash "$SCRIPT" "$@" + fi + ;; +*) + echo "Error: Unknown command '$COMMAND'" >&2 + usage + ;; +esac + +# Ensure lookups work even if NIX_PATH is unset (common on CI) +# Pin to the same nixpkgs as shell.nix to keep environments consistent +PINNED_NIXPKGS_URL="https://github.com/NixOS/nixpkgs/archive/24.05.tar.gz" +if [ -z "${NIX_PATH:-}" ]; then + export NIX_PATH="nixpkgs=${PINNED_NIXPKGS_URL}" +fi + +# Resolve pinned nixpkgs to a local store path so later -I uses do not hit the network. +resolve_pinned_nixpkgs_store() { + # Try nix (new) first, fallback to nix-instantiate + local path + if path=$(nix eval --raw "(builtins.fetchTarball \"${PINNED_NIXPKGS_URL}\")" 2>/dev/null); then + : + else + # nix-instantiate returns a quoted string; strip quotes + path=$(nix-instantiate --eval -E "builtins.fetchTarball { url = \"${PINNED_NIXPKGS_URL}\"; }" | sed -e 's/\"//g') || path="" + fi + if [ -n "$path" ] && [ -e "$path" ]; then + echo "$path" + return 0 + fi + return 1 +} + +# Optionally prewarm nixpkgs and smoke-test tools into the store (online phase) +prewarm_nixpkgs_and_tools() { + # Skip if explicitly disabled + if [ -n "${NO_PREWARM:-}" ]; then + echo "Skipping prewarm (NO_PREWARM set)" + return 0 + fi + echo "Prewarming pinned nixpkgs into the store…" + # Evaluate fetchTarball to realize nixpkgs tarball in store + if ! resolve_pinned_nixpkgs_store >/dev/null; then + # Trigger realization via eval to fetch the tarball + nix-instantiate --eval -E "builtins.fetchTarball { url = \"${PINNED_NIXPKGS_URL}\"; }" >/dev/null + fi + local NIXPKGS_STORE + NIXPKGS_STORE=$(resolve_pinned_nixpkgs_store || true) + if [ -n "$NIXPKGS_STORE" ]; then + export NIXPKGS_STORE + echo "Pinned nixpkgs realized at: $NIXPKGS_STORE" + # Prewarm tools used later by nix-shell -p during smoke tests so offline works + if [ "$(uname)" = "Linux" ]; then + echo "Prewarming dpkg/rpm/cpio/curl into the store…" + # These may download from cache or build; okay during online prewarm + nix-build -I "nixpkgs=${NIXPKGS_STORE}" -E 'with import {}; dpkg' --no-out-link >/dev/null 2>/dev/null || true + nix-build -I "nixpkgs=${NIXPKGS_STORE}" -E 'with import {}; rpm' --no-out-link >/dev/null 2>/dev/null || true + nix-build -I "nixpkgs=${NIXPKGS_STORE}" -E 'with import {}; cpio' --no-out-link >/dev/null 2>/dev/null || true + nix-build -I "nixpkgs=${NIXPKGS_STORE}" -E 'with import {}; curl.bin' --no-out-link >/dev/null 2>/dev/null || + nix-build -I "nixpkgs=${NIXPKGS_STORE}" -E 'with import {}; curl' --no-out-link >/dev/null 2>/dev/null || true + fi + fi +} + +# If packaging, build directly via Nix attributes and exit (no shell wrapper) +if [ "$COMMAND" = "package" ]; then + # Determine which package types to build + if [ -z "$PACKAGE_TYPE" ]; then + if [ "$(uname)" = "Darwin" ]; then + TYPES="dmg" + else + # Linux and others: DEB and RPM + TYPES="deb rpm" + fi + else + TYPES="$PACKAGE_TYPE" + fi + + # Prewarm nixpkgs and base tools once per packaging invocation (if not disabled) + prewarm_nixpkgs_and_tools || true + NIXPKGS_STORE="${NIXPKGS_STORE:-}" + # Prefer store path over URL for -I nixpkgs to avoid network usage offline + NIXPKGS_ARG="$PINNED_NIXPKGS_URL" + if [ -n "$NIXPKGS_STORE" ] && [ -e "$NIXPKGS_STORE" ]; then + NIXPKGS_ARG="$NIXPKGS_STORE" + fi + + for TYPE in $TYPES; do + case "$TYPE" in + deb) + if [ "$(uname)" = "Linux" ]; then + SCRIPT_LINUX="$REPO_ROOT/nix/scripts/package_deb.sh" + [ -f "$SCRIPT_LINUX" ] || { + echo "Missing $SCRIPT_LINUX" >&2 + exit 1 + } + # Ensure required tools are available via a minimal nix-shell; remove NO_PREWARM default + nix-shell -I "nixpkgs=${NIXPKGS_ARG}" -p curl --run "bash '$SCRIPT_LINUX' --variant '$VARIANT'" + REAL_OUT="$REPO_ROOT/result-deb-$VARIANT" + echo "Built deb ($VARIANT): $REAL_OUT" + else + echo "DEB packaging is only supported on Linux in this flow." >&2 + exit 1 + fi + ;; + rpm) + if [ "$(uname)" = "Linux" ]; then + SCRIPT_LINUX="$REPO_ROOT/nix/scripts/package_rpm.sh" + [ -f "$SCRIPT_LINUX" ] || { + echo "Missing $SCRIPT_LINUX" >&2 + exit 1 + } + nix-shell -I "nixpkgs=${NIXPKGS_ARG}" -p curl --run "bash '$SCRIPT_LINUX' --variant '$VARIANT'" + REAL_OUT="$REPO_ROOT/result-rpm-$VARIANT" + echo "Built rpm ($VARIANT): $REAL_OUT" + else + echo "RPM packaging is only supported on Linux in this flow." >&2 + exit 1 + fi + ;; + dmg) + ATTR="kms-server-${VARIANT}-dmg" + OUT_LINK="$REPO_ROOT/result-dmg-$VARIANT" + nix-build -A "$ATTR" -o "$OUT_LINK" + REAL_OUT=$(readlink -f "$OUT_LINK" || echo "$OUT_LINK") + echo "Built dmg ($VARIANT): $REAL_OUT" + ;; + *) + echo "Skipping unsupported package type: $TYPE" >&2 + continue + ;; + esac + + # Mandatory smoke test (fail hard if any smoke test fails) + if ! ( + set -euo pipefail + echo "Running smoke test for $TYPE ($VARIANT)…" + tmpdir=$(mktemp -d) + # Cleanup this temp dir when this subshell exits + trap 'chmod -R u+w "$tmpdir" 2>/dev/null || true; rm -rf "$tmpdir" 2>/dev/null || true' EXIT + + case "$TYPE" in + deb) + deb_file=$(find "$REAL_OUT" -maxdepth 1 -type f -name '*.deb' | head -n1) + if [ -z "$deb_file" ]; then + echo "Error: no .deb found in $REAL_OUT" >&2 + exit 1 + fi + echo "Extracting $deb_file to $tmpdir" + nix-shell -I "nixpkgs=${NIXPKGS_ARG}" -p dpkg --run "dpkg-deb -x '$deb_file' '$tmpdir'" + ;; + rpm) + rpm_file=$(find "$REAL_OUT" -maxdepth 1 -type f -name '*.rpm' | head -n1) + if [ -z "$rpm_file" ]; then + echo "Error: no .rpm found in $REAL_OUT" >&2 + exit 1 + fi + echo "Extracting $rpm_file to $tmpdir" + nix-shell -I "nixpkgs=${NIXPKGS_ARG}" -p rpm cpio --run "cd '$tmpdir' && rpm2cpio '$rpm_file' | cpio -idmv" + ;; + dmg) + echo "Skipping DMG smoke test on macOS." + exit 0 + ;; + esac + + BIN_PATH="$tmpdir/usr/bin/cosmian_kms" + if [ ! -x "$BIN_PATH" ]; then BIN_PATH="$tmpdir/usr/sbin/cosmian_kms"; fi + if [ ! -x "$BIN_PATH" ]; then BIN_PATH=$(find "$tmpdir/usr" -type f -name cosmian_kms | head -n1 || true); fi + if [ -z "$BIN_PATH" ] || [ ! -x "$BIN_PATH" ]; then + echo "Error: expected server binary not found under /usr/bin or /usr/sbin" >&2 + exit 1 + fi + + echo "Running cosmian_kms --info from extracted package…" + INFO_OUT="$($BIN_PATH --info 2>&1)" + STATUS=$? + echo "$INFO_OUT" + if [ $STATUS -ne 0 ]; then + echo "Smoke test failed: exit $STATUS" >&2 + exit $STATUS + fi + echo "$INFO_OUT" | grep -q "OpenSSL 3\.1\.2" || { + echo "Smoke test failed: expected OpenSSL 3.1.2" >&2 + exit 1 + } + echo "Smoke test PASS" + ); then + echo "Smoke test FAILED for $TYPE ($VARIANT)" >&2 + exit 1 + fi + + # After a successful smoke test, generate a .sha256 checksum file next to the artifact + case "$TYPE" in + deb) + deb_file=$(find "$REAL_OUT" -maxdepth 1 -type f -name '*.deb' | head -n1 || true) + if [ -n "${deb_file:-}" ] && [ -f "$deb_file" ]; then + sum=$(compute_sha256 "$deb_file") + echo "$sum $(basename "$deb_file")" >"$deb_file.sha256" + echo "Wrote checksum: $deb_file.sha256 ($sum)" + fi + ;; + rpm) + rpm_file=$(find "$REAL_OUT" -maxdepth 1 -type f -name '*.rpm' | head -n1 || true) + if [ -n "${rpm_file:-}" ] && [ -f "$rpm_file" ]; then + sum=$(compute_sha256 "$rpm_file") + echo "$sum $(basename "$rpm_file")" >"$rpm_file.sha256" + echo "Wrote checksum: $rpm_file.sha256 ($sum)" + fi + ;; + dmg) + dmg_file=$(find "$REAL_OUT" -maxdepth 1 -type f -name '*.dmg' | head -n1 || true) + if [ -n "${dmg_file:-}" ] && [ -f "$dmg_file" ]; then + sum=$(compute_sha256 "$dmg_file") + echo "$sum $(basename "$dmg_file")" >"$dmg_file.sha256" + echo "Wrote checksum: $dmg_file.sha256 ($sum)" + fi + ;; + esac + done + + exit 0 +fi + +# Check if script exists (build/test flows) +[ -f "$SCRIPT" ] || { + echo "Missing $SCRIPT" >&2 + exit 1 +} + +# Check if shell.nix exists +[ -f "$REPO_ROOT/shell.nix" ] || { + echo "Error: No shell.nix found at $REPO_ROOT" >&2 + exit 1 +} + +# Run the appropriate script inside nix-shell +# Determine if we should use --pure mode +USE_PURE=true + +# On macOS, DMG packaging requires system utilities (hdiutil, sw_vers) not available in pure mode +if [ "$COMMAND" = "package" ] && [ "$PACKAGE_TYPE" = "dmg" ] && [ "$(uname)" = "Darwin" ]; then + USE_PURE=false + echo "Note: Running without --pure mode on macOS for DMG packaging (requires system utilities)" +fi + +# For HSM tests we need access to system libraries (e.g., vendor PKCS#11, OpenSSL) +if [ "$COMMAND" = "test" ] && { [ "$TEST_TYPE" = "hsm" ] || [ "$TEST_TYPE" = "all" ]; }; then + USE_PURE=false + echo "Note: Running without --pure mode for HSM tests to allow system PKCS#11/runtime libraries" +fi + +if [ "$USE_PURE" = true ]; then + # shellcheck disable=SC2086 + if [ "$COMMAND" = "sbom" ]; then + nix-shell -I "nixpkgs=${PINNED_NIXPKGS_URL}" --pure $KEEP_VARS "$REPO_ROOT/shell.nix" \ + --run "bash '$SCRIPT' --variant '$VARIANT' $*" + else + nix-shell -I "nixpkgs=${PINNED_NIXPKGS_URL}" --pure $KEEP_VARS "$REPO_ROOT/shell.nix" \ + --run "bash '$SCRIPT' ${PROFILE:+--profile "$PROFILE"} --variant '$VARIANT' $*" + fi +else + # shellcheck disable=SC2086 + if [ "$COMMAND" = "sbom" ]; then + nix-shell -I "nixpkgs=${PINNED_NIXPKGS_URL}" $KEEP_VARS "$REPO_ROOT/shell.nix" \ + --run "bash '$SCRIPT' --variant '$VARIANT' $*" + else + nix-shell -I "nixpkgs=${PINNED_NIXPKGS_URL}" $KEEP_VARS "$REPO_ROOT/shell.nix" \ + --run "bash '$SCRIPT' ${PROFILE:+--profile "$PROFILE"} --variant '$VARIANT' $*" + fi +fi diff --git a/.github/scripts/release.sh b/.github/scripts/release.sh index f04030cf8..b432b637e 100755 --- a/.github/scripts/release.sh +++ b/.github/scripts/release.sh @@ -39,6 +39,7 @@ ${SED_BINARY} "${SED_IN_PLACE[@]}" "s/$OLD_VERSION/$NEW_VERSION/g" crate/test_km ${SED_BINARY} "${SED_IN_PLACE[@]}" "s/$OLD_VERSION/$NEW_VERSION/g" crate/wasm/Cargo.toml # Other files +${SED_BINARY} "${SED_IN_PLACE[@]}" "s/$OLD_VERSION/$NEW_VERSION/g" nix/kms-server.nix ${SED_BINARY} "${SED_IN_PLACE[@]}" "s/$OLD_VERSION/$NEW_VERSION/g" Dockerfile ${SED_BINARY} "${SED_IN_PLACE[@]}" "s/$OLD_VERSION/$NEW_VERSION/g" ui/package.json ${SED_BINARY} "${SED_IN_PLACE[@]}" "s/$OLD_VERSION/$NEW_VERSION/g" documentation/docs/index.md @@ -58,3 +59,6 @@ git cliff -w "$PWD" -u -p CHANGELOG.md -t "$NEW_VERSION" # Convert (#XXX) references to full GitHub pull request URLs ${SED_BINARY} "${SED_IN_PLACE[@]}" 's/(#\([0-9]\+\))/([#\1](https:\/\/github.com\/Cosmian\/kms\/pull\/\1))/g' CHANGELOG.md + +bash .github/scripts/nix.sh --variant non-fips update-hashes +bash .github/scripts/nix.sh update-hashes diff --git a/.github/scripts/renew_server_doc.sh b/.github/scripts/renew_server_doc.sh new file mode 100755 index 000000000..37de4f66d --- /dev/null +++ b/.github/scripts/renew_server_doc.sh @@ -0,0 +1,11 @@ +#!/bin/bash +# Script to regenerate server CLI documentation +# This script is called by the pre-commit hook 'renew-server-doc' + +set -e + +./result-server-non-fips/bin/cosmian_kms -h | tail -n +2 | { + printf '```text\n' + cat + printf '```\n' +} >documentation/docs/server_cli.md diff --git a/.github/scripts/test_all.sh b/.github/scripts/test_all.sh new file mode 100644 index 000000000..466584007 --- /dev/null +++ b/.github/scripts/test_all.sh @@ -0,0 +1,81 @@ +#!/usr/bin/env bash +set -euo pipefail +set -x + +# Orchestrate running all available test categories sequentially +# Categories: sqlite, psql, mysql, redis (non-fips only), google_cse (if creds present), hsm (Linux) + +SCRIPT_DIR=$(cd "$(dirname "$0")" && pwd) +source "$SCRIPT_DIR/common.sh" + +init_build_env "$@" +setup_test_logging + +echo "=========================================" +echo "Running ALL tests" +echo "Variant: ${VARIANT_NAME} | Mode: ${BUILD_PROFILE}" +echo "=========================================" + +# Helper to run a test script with a nice header and capture/continue on skip-eligible failures +run_step() { + local name="$1" + shift + printf "\n===== %s =====\n" "$name" + ( + set -euo pipefail + bash "$@" + ) +} + +# 1) SQLite (always) +run_step "SQLite" "$SCRIPT_DIR/test_sqlite.sh" + +# In debug builds, only run SQLite (per repo policy). Release builds run all enabled DBs. +if [ "$BUILD_PROFILE" = "debug" ]; then + echo "Debug mode: skipping PostgreSQL, MySQL, Redis-findex, Google CSE, and HSM tests." + echo "=========================================" + echo "All test categories executed." + echo "=========================================" + exit 0 +fi + +# 2) PostgreSQL (requires server) +run_step "PostgreSQL" "$SCRIPT_DIR/test_psql.sh" + +# 3) MySQL (requires server) +run_step "MySQL" "$SCRIPT_DIR/test_mysql.sh" + +# 4) Redis-findex (non-FIPS only) +if [ "$VARIANT_NAME" = "non-FIPS" ]; then + run_step "Redis-findex" "$SCRIPT_DIR/test_redis.sh" +else + echo "Skipping Redis-findex (FIPS mode)" +fi + +# 5) Google CSE (only if all creds are present) +missing_creds=false +for var in TEST_GOOGLE_OAUTH_CLIENT_ID TEST_GOOGLE_OAUTH_CLIENT_SECRET \ + TEST_GOOGLE_OAUTH_REFRESH_TOKEN GOOGLE_SERVICE_ACCOUNT_PRIVATE_KEY; do + if [ -z "${!var:-}" ]; then + missing_creds=true + break + fi +done +if [ "$missing_creds" = false ]; then + run_step "Google CSE" "$SCRIPT_DIR/test_google_cse.sh" +else + echo "Skipping Google CSE (credentials not fully provided)" +fi + +# 6) HSM (Linux only) +if [ -f /etc/lsb-release ]; then + # Running both SoftHSM2 and Utimaco wrappers (the wrapper script already sequences them) + # Note: hsm scripts adjust LD_LIBRARY_PATH and vendor env, and may require simulator setup + run_step "HSM (SoftHSM2 + Utimaco)" "$SCRIPT_DIR/test_hsm.sh" +else + echo "Skipping HSM tests (non-Linux environment)" +fi + +echo "=========================================" +echo "All test categories executed." +echo "=========================================" diff --git a/.github/scripts/test_docker_image.sh b/.github/scripts/test_docker_image.sh index dc30049c9..da0dd5d3d 100644 --- a/.github/scripts/test_docker_image.sh +++ b/.github/scripts/test_docker_image.sh @@ -18,9 +18,7 @@ CLIENT_PKCS12_PATH="test_data/certificates/client_server/owner/owner.client.acme set -ex # install cli -sudo apt update && sudo apt install -y wget -wget "https://package.cosmian.com/cli/$CLI_VERSION/ubuntu-24.04/cosmian-cli_$CLI_VERSION-1_amd64.deb" -sudo apt install ./"cosmian-cli_$CLI_VERSION-1_amd64.deb" +cargo install cosmian_cli --version "$CLI_VERSION" cosmian --version # update cli conf diff --git a/.github/scripts/test_google_cse.sh b/.github/scripts/test_google_cse.sh new file mode 100644 index 000000000..57b27bc03 --- /dev/null +++ b/.github/scripts/test_google_cse.sh @@ -0,0 +1,28 @@ +#!/usr/bin/env bash +set -euo pipefail +set -x + +# Google CSE tests - requires Google OAuth credentials +SCRIPT_DIR=$(cd "$(dirname "$0")" && pwd) +source "$SCRIPT_DIR/common.sh" + +init_build_env "$@" +setup_test_logging + +echo "=========================================" +echo "Running Google CSE tests" +echo "=========================================" + +# Verify all required credentials are available +for var in TEST_GOOGLE_OAUTH_CLIENT_ID TEST_GOOGLE_OAUTH_CLIENT_SECRET \ + TEST_GOOGLE_OAUTH_REFRESH_TOKEN GOOGLE_SERVICE_ACCOUNT_PRIVATE_KEY; do + [ -z "${!var:-}" ] && { + echo "Error: Required environment variable $var is not set" >&2 + exit 1 + } +done + +echo "Running Google CSE tests..." +cargo test --workspace --lib "$RELEASE_FLAG" "${FEATURES_FLAG[@]}" -- --nocapture test_google_cse --ignored --exact + +echo "Google CSE tests completed successfully." diff --git a/.github/scripts/test_hsm.sh b/.github/scripts/test_hsm.sh new file mode 100644 index 000000000..b53f5011f --- /dev/null +++ b/.github/scripts/test_hsm.sh @@ -0,0 +1,16 @@ +#!/usr/bin/env bash +set -euo pipefail +set -x + +# Wrapper to run HSM tests +SCRIPT_DIR=$(cd "$(dirname "$0")" && pwd) + +echo "=========================================" +echo "Running all HSM tests (SoftHSM2 + Utimaco + Proteccio)" +echo "=========================================" + +bash "$SCRIPT_DIR/test_hsm_softhsm2.sh" "$@" +bash "$SCRIPT_DIR/test_hsm_utimaco.sh" "$@" +bash "$SCRIPT_DIR/test_hsm_proteccio.sh" "$@" + +echo "All HSM tests completed successfully." diff --git a/.github/scripts/test_hsm_proteccio.sh b/.github/scripts/test_hsm_proteccio.sh new file mode 100644 index 000000000..ec1e5cce3 --- /dev/null +++ b/.github/scripts/test_hsm_proteccio.sh @@ -0,0 +1,57 @@ +#!/usr/bin/env bash +set -eo pipefail +set -x + +# Proteccio-only tests (Linux only) +SCRIPT_DIR=$(cd "$(dirname "$0")" && pwd) +source "$SCRIPT_DIR/common.sh" + +REPO_ROOT=$(get_repo_root "$SCRIPT_DIR") +init_build_env "$@" +setup_test_logging + +echo "=========================================" +echo "Running Proteccio HSM tests" +echo "=========================================" + +[ ! -f /etc/lsb-release ] && { + echo "Error: HSM tests are only supported on Linux (Ubuntu/Debian)" >&2 + exit 1 +} + +# If HSM is down on env.variable PROTECCIO_IP, skip tests. +if ! ping -c 1 -W 1 "$PROTECCIO_IP" &>/dev/null; then + echo "Warning: PROTECCIO_IP is set but HSM is unreachable. Skipping tests." + exit 0 +fi + +export HSM_USER_PASSWORD="${PROTECCIO_PASSWORD}" + +# Setup Proteccio HSM client tools +source "$REPO_ROOT/.github/reusable_scripts/prepare_proteccio.sh" + +# PROTECCIO integration test (KMS) +env \ + PATH="$PATH" \ + HSM_MODEL="proteccio" \ + HSM_USER_PASSWORD="$HSM_USER_PASSWORD" \ + HSM_SLOT_ID="1" \ + cargo test \ + -p cosmian_kms_server \ + "${FEATURES_FLAG[@]}" \ + "$RELEASE_FLAG" \ + -- tests::hsm::test_hsm_all --ignored --exact + +env \ + PATH="$PATH" \ + HSM_MODEL="proteccio" \ + HSM_USER_PASSWORD="$HSM_USER_PASSWORD" \ + HSM_SLOT_ID="1" \ + RUST_LOG="trace" \ + cargo test \ + -p proteccio_pkcs11_loader \ + "$RELEASE_FLAG" \ + --features proteccio \ + -- tests::test_hsm_proteccio_all --ignored --exact + +echo "Proteccio HSM tests completed successfully." diff --git a/.github/scripts/test_hsm_softhsm2.sh b/.github/scripts/test_hsm_softhsm2.sh new file mode 100644 index 000000000..3f4884a79 --- /dev/null +++ b/.github/scripts/test_hsm_softhsm2.sh @@ -0,0 +1,80 @@ +#!/usr/bin/env bash +set -euo pipefail +set -x + +# SoftHSM2-only tests (Linux only) +SCRIPT_DIR=$(cd "$(dirname "$0")" && pwd) +source "$SCRIPT_DIR/common.sh" + +REPO_ROOT=$(get_repo_root "$SCRIPT_DIR") +init_build_env "$@" +setup_test_logging + +echo "=========================================" +echo "Running SoftHSM2 HSM tests" +echo "=========================================" + +[ ! -f /etc/lsb-release ] && { + echo "Error: HSM tests are only supported on Linux (Ubuntu/Debian)" >&2 + exit 1 +} + +export HSM_USER_PASSWORD="12345678" + +# Prepare SoftHSM2 token +export SOFTHSM2_HOME="$REPO_ROOT/.softhsm2" +mkdir -p "$SOFTHSM2_HOME/tokens" +export SOFTHSM2_CONF="$SOFTHSM2_HOME/softhsm2.conf" +echo "directories.tokendir = $SOFTHSM2_HOME/tokens" >"$SOFTHSM2_CONF" + +softhsm2-util --version +SOFTHSM2_BIN_PATH="$(command -v softhsm2-util || true)" +if [ -n "$SOFTHSM2_BIN_PATH" ]; then + SOFTHSM2_PREFIX="$(dirname "$(dirname "$SOFTHSM2_BIN_PATH")")" + if [ -d "$SOFTHSM2_PREFIX/lib/softhsm" ]; then + SOFTHSM2_LIB_DIR="$SOFTHSM2_PREFIX/lib/softhsm" + elif [ -d "$SOFTHSM2_PREFIX/lib" ]; then + SOFTHSM2_LIB_DIR="$SOFTHSM2_PREFIX/lib" + else + SOFTHSM2_LIB_DIR="" + fi +fi +SOFTHSM2_PKCS11_LIB_PATH="${SOFTHSM2_LIB_DIR:+$SOFTHSM2_LIB_DIR/libsofthsm2.so}" +INIT_OUT=$(softhsm2-util --init-token --free --label "my_token_1" --so-pin "$HSM_USER_PASSWORD" --pin "$HSM_USER_PASSWORD" 2>&1 | tee /dev/stderr) + +SOFTHSM2_HSM_SLOT_ID=$(echo "$INIT_OUT" | grep -o 'reassigned to slot [0-9]*' | awk '{print $4}') +if [ -z "${SOFTHSM2_HSM_SLOT_ID:-}" ]; then + SOFTHSM2_HSM_SLOT_ID=$(softhsm2-util --show-slots | awk 'BEGIN{sid=""} /^Slot/ {sid=$2} /Token label/ && $0 ~ /my_token_1/ {print sid; exit}') +fi +[ -n "${SOFTHSM2_HSM_SLOT_ID:-}" ] || { + echo "Error: Could not determine SoftHSM2 slot id" >&2 + exit 1 +} + +env \ + PATH="$PATH" \ + LD_LIBRARY_PATH="${SOFTHSM2_LIB_DIR:+$SOFTHSM2_LIB_DIR:}${NIX_OPENSSL_OUT:+$NIX_OPENSSL_OUT/lib:}${LD_LIBRARY_PATH:-}" \ + SOFTHSM2_PKCS11_LIB="${SOFTHSM2_PKCS11_LIB_PATH:-}" \ + HSM_MODEL="softhsm2" \ + HSM_USER_PASSWORD="$HSM_USER_PASSWORD" \ + HSM_SLOT_ID="$SOFTHSM2_HSM_SLOT_ID" \ + cargo test \ + -p cosmian_kms_server \ + "${FEATURES_FLAG[@]}" \ + "$RELEASE_FLAG" \ + -- tests::hsm::test_hsm_all --ignored --exact + +echo "SoftHSM2 HSM tests completed successfully." + +env \ + PATH="$PATH" \ + LD_LIBRARY_PATH="${SOFTHSM2_LIB_DIR:+$SOFTHSM2_LIB_DIR:}${NIX_OPENSSL_OUT:+$NIX_OPENSSL_OUT/lib:}${LD_LIBRARY_PATH:-}" \ + SOFTHSM2_PKCS11_LIB="${SOFTHSM2_PKCS11_LIB_PATH:-}" \ + HSM_MODEL="softhsm2" \ + HSM_USER_PASSWORD="$HSM_USER_PASSWORD" \ + HSM_SLOT_ID="$SOFTHSM2_HSM_SLOT_ID" \ + cargo test \ + -p softhsm2_pkcs11_loader \ + ${RELEASE_FLAG:+$RELEASE_FLAG} \ + --features softhsm2 \ + -- tests::test_hsm_softhsm2_all --ignored diff --git a/.github/scripts/test_hsm_utimaco.sh b/.github/scripts/test_hsm_utimaco.sh new file mode 100644 index 000000000..836476ca2 --- /dev/null +++ b/.github/scripts/test_hsm_utimaco.sh @@ -0,0 +1,116 @@ +#!/usr/bin/env bash +set -euo pipefail +set -x + +# Utimaco-only tests (Linux only) +SCRIPT_DIR=$(cd "$(dirname "$0")" && pwd) +source "$SCRIPT_DIR/common.sh" + +REPO_ROOT=$(get_repo_root "$SCRIPT_DIR") +init_build_env "$@" +setup_test_logging + +echo "=========================================" +echo "Running Utimaco HSM tests" +echo "=========================================" + +[ ! -f /etc/lsb-release ] && { + echo "Error: HSM tests are only supported on Linux (Ubuntu/Debian)" >&2 + exit 1 +} + +export HSM_USER_PASSWORD="12345678" + +# Ensure OpenSSL runtime is available for tests needing libcrypto +if [ -n "${NIX_OPENSSL_OUT:-}" ] && [ -d "${NIX_OPENSSL_OUT}/lib" ]; then + export LD_LIBRARY_PATH="${NIX_OPENSSL_OUT}/lib:${LD_LIBRARY_PATH:-}" +fi +if [ -z "${DYN_OPENSSL_LIB:-}" ]; then + DYN_OPENSSL_LIB="$(find /nix/store -type f -path '*/lib/libcrypto.so.3' -print0 2>/dev/null | xargs -0 -r dirname | head -n1)" +fi +if [ -n "${DYN_OPENSSL_LIB:-}" ] && [ -d "$DYN_OPENSSL_LIB" ]; then + export LD_LIBRARY_PATH="$DYN_OPENSSL_LIB:${LD_LIBRARY_PATH:-}" +fi + +# Setup Utimaco HSM simulator +pushd "$REPO_ROOT" >/dev/null +__LDP_SAVE__="${LD_LIBRARY_PATH-}" +unset LD_LIBRARY_PATH || true +source "$REPO_ROOT/.github/reusable_scripts/prepare_utimaco.sh" +if [ "${__LDP_SAVE__+set}" = set ]; then + export LD_LIBRARY_PATH="$__LDP_SAVE__" + unset __LDP_SAVE__ +fi +popd >/dev/null + +: "${UTIMACO_PKCS11_LIB:?UTIMACO_PKCS11_LIB not set}" +: "${CS_PKCS11_R3_CFG:?CS_PKCS11_R3_CFG not set}" +UTIMACO_LIB_DIR="$(dirname "$UTIMACO_PKCS11_LIB")" + +# Utimaco integration test (KMS) +SYS_LD_PATHS="" +CXX_LIB_PATH="$(gcc -print-file-name=libstdc++.so.6 2>/dev/null || true)" +if [ -n "$CXX_LIB_PATH" ] && [ -f "$CXX_LIB_PATH" ]; then + SYS_LD_PATHS="$(dirname "$CXX_LIB_PATH"):${SYS_LD_PATHS}" +fi + +env \ + PATH="$PATH" \ + LD_LIBRARY_PATH="${UTIMACO_LIB_DIR}:${SYS_LD_PATHS}${DYN_OPENSSL_LIB:+$DYN_OPENSSL_LIB:}${NIX_OPENSSL_OUT:+$NIX_OPENSSL_OUT/lib:}${LD_LIBRARY_PATH:-}" \ + HSM_MODEL="utimaco" \ + HSM_USER_PASSWORD="$HSM_USER_PASSWORD" \ + HSM_SLOT_ID="0" \ + UTIMACO_PKCS11_LIB="$UTIMACO_PKCS11_LIB" \ + CS_PKCS11_R3_CFG="$CS_PKCS11_R3_CFG" \ + cargo test \ + -p cosmian_kms_server \ + "${FEATURES_FLAG[@]}" \ + "$RELEASE_FLAG" \ + -- tests::hsm::test_hsm_all --ignored --exact + +# Utimaco loader test (no system lib dirs, scoped runtime) +SYS_LD_PATHS="" +CXX_LIB_PATH="$(gcc -print-file-name=libstdc++.so.6 2>/dev/null || true)" +if [ -n "$CXX_LIB_PATH" ] && [ -f "$CXX_LIB_PATH" ]; then + SYS_LD_PATHS="$(dirname "$CXX_LIB_PATH"):${SYS_LD_PATHS}" +fi + +env \ + PATH="$PATH" \ + LD_LIBRARY_PATH="${UTIMACO_LIB_DIR}:${SYS_LD_PATHS}${DYN_OPENSSL_LIB:+$DYN_OPENSSL_LIB:}${NIX_OPENSSL_OUT:+$NIX_OPENSSL_OUT/lib:}${LD_LIBRARY_PATH:-}" \ + HSM_MODEL="utimaco" \ + HSM_USER_PASSWORD="$HSM_USER_PASSWORD" \ + HSM_SLOT_ID="0" \ + UTIMACO_PKCS11_LIB="$UTIMACO_PKCS11_LIB" \ + CS_PKCS11_R3_CFG="$CS_PKCS11_R3_CFG" \ + cargo test \ + -p utimaco_pkcs11_loader \ + ${RELEASE_FLAG:+$RELEASE_FLAG} \ + --features utimaco \ + -- tests::test_hsm_utimaco_all --ignored + +# Fail if env. variables for Google CSE tests are not set +if [ -z "$TEST_GOOGLE_OAUTH_CLIENT_ID" ] || [ -z "$TEST_GOOGLE_OAUTH_CLIENT_SECRET" ] || [ -z "$TEST_GOOGLE_OAUTH_REFRESH_TOKEN" ] || [ -z "$GOOGLE_SERVICE_ACCOUNT_PRIVATE_KEY" ]; then + echo "Error: One or more environment variables for Google CSE tests are not set." + echo "Please set TEST_GOOGLE_OAUTH_CLIENT_ID, TEST_GOOGLE_OAUTH_CLIENT_SECRET, TEST_GOOGLE_OAUTH_REFRESH_TOKEN, and GOOGLE_SERVICE_ACCOUNT_PRIVATE_KEY." + exit 1 +fi + +# shellcheck disable=SC2086 +sudo -E env "PATH=$PATH" \ + LD_LIBRARY_PATH="${UTIMACO_LIB_DIR}:${SYS_LD_PATHS}${DYN_OPENSSL_LIB:+$DYN_OPENSSL_LIB:}${NIX_OPENSSL_OUT:+$NIX_OPENSSL_OUT/lib:}${LD_LIBRARY_PATH:-}" \ + HSM_MODEL="utimaco" \ + HSM_USER_PASSWORD="$HSM_USER_PASSWORD" \ + HSM_SLOT_ID="0" \ + UTIMACO_PKCS11_LIB="$UTIMACO_PKCS11_LIB" \ + CS_PKCS11_R3_CFG="$CS_PKCS11_R3_CFG" \ + TEST_GOOGLE_OAUTH_CLIENT_ID="$TEST_GOOGLE_OAUTH_CLIENT_ID" \ + TEST_GOOGLE_OAUTH_CLIENT_SECRET="$TEST_GOOGLE_OAUTH_CLIENT_SECRET" \ + TEST_GOOGLE_OAUTH_REFRESH_TOKEN="$TEST_GOOGLE_OAUTH_REFRESH_TOKEN" \ + GOOGLE_SERVICE_ACCOUNT_PRIVATE_KEY="$GOOGLE_SERVICE_ACCOUNT_PRIVATE_KEY" \ + cargo test -p cosmian_kms_cli \ + ${RELEASE_FLAG:+$RELEASE_FLAG} \ + "${FEATURES_FLAG[@]}" \ + -- --nocapture hsm_google_cse --ignored + +echo "Utimaco HSM tests completed successfully." diff --git a/.github/scripts/test_mysql.sh b/.github/scripts/test_mysql.sh new file mode 100644 index 000000000..bdf735471 --- /dev/null +++ b/.github/scripts/test_mysql.sh @@ -0,0 +1,20 @@ +#!/usr/bin/env bash +set -euo pipefail +set -x + +# MySQL tests - requires MySQL server running +SCRIPT_DIR=$(cd "$(dirname "$0")" && pwd) +source "$SCRIPT_DIR/common.sh" + +init_build_env "$@" +setup_test_logging +setup_fips_openssl_env + +echo "=========================================" +echo "Running MySQL tests" +echo "=========================================" + +: "${MYSQL_HOST:=127.0.0.1}" +: "${MYSQL_PORT:=3306}" + +check_and_test_db "MySQL" "mysql" "MYSQL_HOST" "MYSQL_PORT" diff --git a/.github/scripts/test_psql.sh b/.github/scripts/test_psql.sh new file mode 100644 index 000000000..9e4078fb3 --- /dev/null +++ b/.github/scripts/test_psql.sh @@ -0,0 +1,20 @@ +#!/usr/bin/env bash +set -euo pipefail +set -x + +# PostgreSQL tests - requires PostgreSQL server running +SCRIPT_DIR=$(cd "$(dirname "$0")" && pwd) +source "$SCRIPT_DIR/common.sh" + +init_build_env "$@" +setup_test_logging +setup_fips_openssl_env + +echo "=========================================" +echo "Running PostgreSQL tests" +echo "=========================================" + +: "${POSTGRES_HOST:=127.0.0.1}" +: "${POSTGRES_PORT:=5432}" + +check_and_test_db "PostgreSQL" "postgresql" "POSTGRES_HOST" "POSTGRES_PORT" diff --git a/.github/scripts/test_pykmip.sh b/.github/scripts/test_pykmip.sh new file mode 100644 index 000000000..7558d658e --- /dev/null +++ b/.github/scripts/test_pykmip.sh @@ -0,0 +1,96 @@ +#!/usr/bin/env bash +# Run PyKMIP client tests against a locally launched Cosmian KMS inside nix-shell +set -euo pipefail + +SCRIPT_DIR=$(cd "$(dirname "$0")" && pwd) +REPO_ROOT=$(cd "$SCRIPT_DIR/../.." && pwd) +source "$SCRIPT_DIR/common.sh" + +init_build_env "$@" +setup_test_logging +setup_fips_openssl_env + +# Enforce non-FIPS for PyKMIP as per existing CI workflow +if [ "${VARIANT}" != "non-fips" ]; then + echo "Note: For PyKMIP tests, forcing non-FIPS features (overriding --variant ${VARIANT})." >&2 +fi + +VARIANT="non-fips" +FEATURES_FLAG=(--features non-fips) + +# Default KMS config (can be overridden by env before invoking nix.sh) +: "${COSMIAN_KMS_CONF:=$REPO_ROOT/scripts/kms.toml}" +export COSMIAN_KMS_CONF + +# Ensure Python is available (nix.sh sets WITH_PYTHON=1 which adds python311 + virtualenv) +require_cmd python3 "Python 3 is required. Re-run via 'bash .github/scripts/nix.sh test pykmip' so nix-shell can provide it." + +# Prepare a throwaway virtualenv under target/tmp if none exists +VENV_DIR="$REPO_ROOT/.venv" +if [ ! -d "$VENV_DIR" ]; then + echo "Creating Python virtual environment at $VENV_DIR …" + if command -v virtualenv >/dev/null 2>&1; then + virtualenv -p python3 "$VENV_DIR" + else + python3 -m venv "$VENV_DIR" + fi +fi +# Activate venv and ensure pip works +# shellcheck disable=SC1090 +source "$VENV_DIR/bin/activate" +python -m pip install --upgrade pip >/dev/null + +# Install PyKMIP if not already present +if ! python -c "import kmip" >/dev/null 2>&1; then + echo "Installing PyKMIP into virtualenv …" + # Prefer a straightforward install; fall back to dev head if needed + if ! python -m pip install --no-compile PyKMIP >/dev/null; then + echo "Falling back to installing PyKMIP from GitHub…" + python -m pip install --no-compile git+https://github.com/OpenKMIP/PyKMIP.git + fi +fi + +# Build and launch the KMS server in the background +pushd "$REPO_ROOT" >/dev/null +cargo build --bin cosmian_kms "${FEATURES_FLAG[@]}" + +# Clean up any previous server on the same port +KMS_PORT=9998 + +# Start server +set +e +RUST_LOG=${RUST_LOG:-warn} COSMIAN_KMS_CONF="$COSMIAN_KMS_CONF" \ + cargo run --bin cosmian_kms "${FEATURES_FLAG[@]}" & +KMS_PID=$! +set -e + +# Ensure we stop the server on exit +cleanup() { + set +e + if ps -p "$KMS_PID" >/dev/null 2>&1; then + kill "$KMS_PID" >/dev/null 2>&1 || true + # Give it a moment to stop + sleep 1 + if ps -p "$KMS_PID" >/dev/null 2>&1; then + kill -9 "$KMS_PID" >/dev/null 2>&1 || true + fi + fi +} +trap cleanup EXIT INT TERM + +# Wait for the port to be ready +if _wait_for_port 127.0.0.1 "$KMS_PORT" 20; then + echo "KMS is up on port $KMS_PORT. Running PyKMIP tests…" +else + echo "Error: KMS did not start on port $KMS_PORT in time." >&2 + exit 1 +fi + +# Run the PyKMIP test runner (expects venv already active) +# Use 'all' to exercise a suite of operations +bash "$REPO_ROOT/scripts/test_pykmip.sh" all +PYKMIP_STATUS=$? + +popd >/dev/null + +exit $PYKMIP_STATUS diff --git a/.github/scripts/test_redis.sh b/.github/scripts/test_redis.sh new file mode 100644 index 000000000..92a27977b --- /dev/null +++ b/.github/scripts/test_redis.sh @@ -0,0 +1,27 @@ +#!/usr/bin/env bash +set -euo pipefail +set -x + +# Redis-findex tests - requires Redis server running +SCRIPT_DIR=$(cd "$(dirname "$0")" && pwd) +source "$SCRIPT_DIR/common.sh" + +init_build_env "$@" +setup_test_logging +setup_fips_openssl_env + +echo "=========================================" +echo "Running Redis-findex tests" +echo "=========================================" + +# Skip redis-findex in FIPS mode (not supported) +if [ "$VARIANT" != "non-fips" ]; then + echo "Error: Redis-findex tests are not supported in FIPS mode" >&2 + echo "Please run with --variant non-fips" >&2 + exit 1 +fi + +: "${REDIS_HOST:=127.0.0.1}" +: "${REDIS_PORT:=6379}" + +check_and_test_db "Redis" "redis-findex" "REDIS_HOST" "REDIS_PORT" diff --git a/.github/scripts/test_sqlite.sh b/.github/scripts/test_sqlite.sh new file mode 100755 index 000000000..78ca1b966 --- /dev/null +++ b/.github/scripts/test_sqlite.sh @@ -0,0 +1,25 @@ +#!/usr/bin/env bash +set -euo pipefail +set -x + +# SQLite tests - always available, runs on filesystem +SCRIPT_DIR=$(cd "$(dirname "$0")" && pwd) +source "$SCRIPT_DIR/common.sh" + +init_build_env "$@" +setup_test_logging +setup_fips_openssl_env + +# Ensure required tools are available when running outside Nix +require_cmd cargo "Cargo is required to build and run tests. Install Rust (rustup) and retry." + +echo "=========================================" +echo "Running SQLite tests" +echo "=========================================" + +echo "Testing workspace binaries..." +cargo test --workspace --bins "$RELEASE_FLAG" "${FEATURES_FLAG[@]}" + +run_db_tests "sqlite" + +echo "SQLite tests completed successfully." diff --git a/.github/workflows/build_docker_image.yml b/.github/workflows/build_docker_image.yml new file mode 100644 index 000000000..31bb90296 --- /dev/null +++ b/.github/workflows/build_docker_image.yml @@ -0,0 +1,159 @@ +--- +name: Docker build + +on: + workflow_call: + inputs: + registry-image: + required: true + type: string + os: + required: true + type: string + features: + required: true + type: string + debug_or_release: + required: false + type: string + default: release + +env: + REGISTRY: ghcr.io + +jobs: + build-and-push-image: + name: Image ${{ inputs.features }} - ${{ inputs.os }} + runs-on: ${{ inputs.os }} + permissions: + contents: read + packages: write + id-token: write # Required for cosign keyless signing + steps: + - name: Derive architecture from runner + id: arch + run: | + set -euo pipefail + if [[ "${{ inputs.os }}" == *arm* ]]; then + echo "arch=arm64" >> "$GITHUB_OUTPUT" + echo "platform=linux/arm64" >> "$GITHUB_OUTPUT" + echo "suffix=-arm64" >> "$GITHUB_OUTPUT" + else + echo "arch=amd64" >> "$GITHUB_OUTPUT" + echo "platform=linux/amd64" >> "$GITHUB_OUTPUT" + echo "suffix=-amd64" >> "$GITHUB_OUTPUT" + fi + - name: Display cpuinfo + run: cat /proc/cpuinfo + - uses: actions/checkout@v4 + with: + submodules: recursive + - name: Download package artifacts + id: artifacts + uses: actions/download-artifact@v4 + with: + name: ${{ inputs.features }}_${{ inputs.os }}-${{ inputs.debug_or_release }} + - name: Locate Debian package + id: deb + run: | + set -euo pipefail + DEB_FILE=$(find . -type f -name '*.deb' | head -n1 || true) + if [ -z "$DEB_FILE" ]; then + echo "No .deb file found" >&2 + exit 1 + fi + REL="${DEB_FILE##$GITHUB_WORKSPACE/}" + echo "deb_file_path=$REL" >> "$GITHUB_OUTPUT" + - name: Login to GHCR + uses: docker/login-action@v3 + with: + registry: ${{ env.REGISTRY }} + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + - name: Install Cosign + uses: sigstore/cosign-installer@v3.7.0 + - name: Extract base Docker metadata + id: meta + uses: docker/metadata-action@v4 + with: + images: | + ${{ inputs.registry-image }} + tags: | + type=ref,event=branch + type=ref,event=pr + type=semver,pattern={{version}} + type=semver,pattern={{major}}.{{minor}} + - name: Append arch suffix to tags + id: arch_tags + run: | + set -euo pipefail + echo "tags_with_arch<> $GITHUB_OUTPUT + while IFS= read -r t; do + [ -n "$t" ] && echo "${t}${{ steps.arch.outputs.suffix }}" >> $GITHUB_OUTPUT + done <<< "${{ steps.meta.outputs.tags }}" + echo "EOF" >> $GITHUB_OUTPUT + + - name: Set up Buildx + uses: docker/setup-buildx-action@v3 + - name: Build and push single-arch image(s) + id: build + uses: docker/build-push-action@v6 + with: + context: . + push: true + platforms: ${{ steps.arch.outputs.platform }} + tags: ${{ steps.arch_tags.outputs.tags_with_arch }} + build-args: | + DEB_FILE=${{ steps.deb.outputs.deb_file_path }} + labels: | + org.opencontainers.image.source=${{ github.repository }} + org.opencontainers.image.revision=${{ github.sha }} + org.opencontainers.image.arch=${{ steps.arch.outputs.arch }} + - name: Sign Docker image with Cosign + env: + DIGEST: ${{ steps.build.outputs.digest }} + TAGS: ${{ steps.arch_tags.outputs.tags_with_arch }} + run: | + images="" + for tag in ${TAGS}; do + images+="${tag}@${DIGEST} " + done + cosign sign --yes ${images} + - name: Select tag for test + id: pick + run: | + first=$(echo "${{ steps.arch_tags.outputs.tags_with_arch }}" | head -n1) + echo "first_tag=$first" >> $GITHUB_OUTPUT + outputs: + arch-tag: ${{ steps.pick.outputs.first_tag }} + arch: ${{ steps.arch.outputs.arch }} + + test-image: + name: Test Image ${{ inputs.features }} - ${{ inputs.os }} + runs-on: ${{ inputs.os }} + needs: build-and-push-image + env: + DOCKER_IMAGE_NAME: ${{ needs.build-and-push-image.outputs.arch-tag }} + steps: + - name: Login to GHCR + uses: docker/login-action@v3 + with: + registry: ${{ env.REGISTRY }} + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + - uses: actions/checkout@v4 + with: + submodules: recursive + - name: Smoke test pulled image + run: | + docker pull "$DOCKER_IMAGE_NAME" + docker image inspect "$DOCKER_IMAGE_NAME" | jq '.[0].Architecture' + + - uses: dtolnay/rust-toolchain@master + with: + toolchain: stable + components: rustfmt, clippy + + - name: test image + run: | + bash .github/scripts/test_docker_image.sh diff --git a/.github/workflows/build_windows.yml b/.github/workflows/build_windows.yml new file mode 100644 index 000000000..007fe1ffc --- /dev/null +++ b/.github/workflows/build_windows.yml @@ -0,0 +1,164 @@ +--- +name: Windows Build + +on: + workflow_call: + inputs: + toolchain: + required: true + type: string + archive-name: + required: true + type: string + debug_or_release: + required: true + type: string + +jobs: + cargo-build: + name: cargo build - ${{ inputs.archive-name }} + runs-on: windows-2022 + steps: + - name: Print ENV + run: printenv + + - uses: actions/checkout@v4 + with: + submodules: recursive + + - uses: dtolnay/rust-toolchain@master + with: + toolchain: ${{ inputs.toolchain }} + components: rustfmt, clippy + + - name: Discover environment variables on Runner + shell: pwsh + run: | + Get-ChildItem env: + + - name: Locate VCPKG_INSTALLATION_ROOT + shell: pwsh + run: | + Get-ChildItem $env:VCPKG_INSTALLATION_ROOT + + - name: Build static OpenSSL + shell: pwsh + run: | + vcpkg install --triplet x64-windows-static + vcpkg integrate install + + Get-ChildItem -Recurse "$env:VCPKG_INSTALLATION_ROOT\packages" + + - name: Build + shell: pwsh + run: | + $ErrorActionPreference = "Stop" + . .\.github\scripts\cargo_build.ps1 + BuildProject -BuildType ${{ inputs.debug_or_release }} + + - name: Upload build artifacts + uses: actions/upload-artifact@v4 + with: + name: cargo-build-${{ inputs.debug_or_release }} + path: | + target/${{ inputs.debug_or_release }}/*.exe + target/${{ inputs.debug_or_release }}/*cosmian_pkcs11.dll + retention-days: 1 + if-no-files-found: error + + fips-build: + name: FIPS OpenSSL Build - ${{ inputs.archive-name }} + runs-on: windows-2022 + steps: + - uses: actions/checkout@v4 + with: + submodules: recursive + + - name: Build FIPS OpenSSL + shell: pwsh + run: | + if (Test-Path "vcpkg_fips.json") { + Copy-Item -Path "vcpkg_fips.json" -Destination "vcpkg.json" + vcpkg install + vcpkg integrate install + + Get-ChildItem -Recurse "$env:VCPKG_INSTALLATION_ROOT\packages" + + # Copy fips.dll to the specified directory + Copy-Item -Path "$env:VCPKG_INSTALLATION_ROOT\packages\openssl_x64-windows\bin\legacy.dll" -Destination "$env:GITHUB_WORKSPACE" + Copy-Item -Path "$env:VCPKG_INSTALLATION_ROOT\packages\openssl_x64-windows\bin\fips.dll" -Destination "$env:GITHUB_WORKSPACE" + } else { + Write-Host "vcpkg_fips.json not found, skipping FIPS build" + New-Item -ItemType File -Path "$env:GITHUB_WORKSPACE\fips.dll" -Force + New-Item -ItemType File -Path "$env:GITHUB_WORKSPACE\legacy.dll" -Force + } + + - name: Upload FIPS artifacts + uses: actions/upload-artifact@v4 + with: + name: fips-dlls + path: | + fips.dll + legacy.dll + retention-days: 1 + if-no-files-found: error + + combine-artifacts: + name: Combine Artifacts - ${{ inputs.archive-name }} + needs: [cargo-build, fips-build] + runs-on: windows-2022 + steps: + - name: Download build artifacts + uses: actions/download-artifact@v4 + with: + name: cargo-build-${{ inputs.debug_or_release }} + + - name: Download FIPS artifacts + uses: actions/download-artifact@v4 + with: + name: fips-dlls + + - name: List files + shell: pwsh + run: Get-ChildItem -Recurse + + - name: Upload combined artifacts + uses: actions/upload-artifact@v4 + with: + name: ${{ inputs.archive-name }}-${{ inputs.debug_or_release }} + path: | + *.exe + *cosmian_pkcs11.dll + fips.dll + legacy.dll + retention-days: 1 + if-no-files-found: error + + test: + needs: combine-artifacts + name: Clean env. ${{ inputs.archive-name }} + runs-on: windows-2022 + steps: + - uses: actions/download-artifact@v4 + with: + name: ${{ inputs.archive-name }}-${{ inputs.debug_or_release }} + + - name: List files recursively + shell: pwsh + run: Get-ChildItem -Recurse + + - name: Copy legacy.dll + shell: pwsh + run: | + if (Test-Path "legacy.dll") { + New-Item -ItemType Directory -Force -Path C:/Windows/System32/OpenSSL/lib/ossl-modules + Copy-Item -Path legacy.dll -Destination C:/Windows/System32/OpenSSL/lib/ossl-modules/legacy.dll + Get-ChildItem -Recurse C:/Windows/System32/OpenSSL + } + + - name: Launch binaries + run: | + Get-ChildItem -Filter "cosmian*.exe" | ForEach-Object { + Write-Host "Testing $_..." + & $_.FullName -V + } diff --git a/.github/workflows/cargo-publish.yml b/.github/workflows/cargo-publish.yml new file mode 100644 index 000000000..e30bb6483 --- /dev/null +++ b/.github/workflows/cargo-publish.yml @@ -0,0 +1,68 @@ +--- +name: Cargo Publish Workspace + +on: + workflow_call: + inputs: + toolchain: + required: true + type: string + secrets: + token: + required: true + +jobs: + publish: + runs-on: ubuntu-latest + steps: + - name: Free Disk Space (Ubuntu) + uses: jlumbroso/free-disk-space@main + with: + # This might remove tools that are actually needed, + # if set to "true" but frees about 6 GB + tool-cache: false + + # All of these default to true, but feel free to set to + # "false" if necessary for your workflow + android: true + dotnet: true + haskell: true + large-packages: true + docker-images: true + swap-storage: true + + - name: Manual cleanup for extra space + run: | + sudo rm -rf /usr/share/dotnet + sudo rm -rf /usr/local/lib/android + sudo rm -rf /opt/ghc + sudo rm -rf /opt/hostedtoolcache/CodeQL + sudo docker image prune --all --force + df -h + + - name: Dump context for debug + uses: crazy-max/ghaction-dump-context@v1 + + - uses: actions/checkout@v5 + with: + submodules: recursive + + - name: Publishing - dry run + if: startsWith(github.ref, 'refs/tags/') != true + shell: bash + run: | + cargo publish --dry-run --all-features --workspace --allow-dirty + + - name: Publishing + if: startsWith(github.ref, 'refs/tags/') + shell: bash + env: + CARGO_REGISTRY_TOKEN: ${{ secrets.token }} + run: | + rustup toolchain install + cargo install cargo-workspaces + cargo workspaces publish --from-git --allow-dirty --yes --no-verify + + - name: Check disk space after build + if: always() + run: df -h diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index c7b5c1b97..a26230714 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,19 +1,31 @@ --- -name: CI in debug +name: CI on: push: - branches: - - '**' tags: - - '!**' + - '**' + pull_request: + schedule: + # every day at 1 AM + - cron: 00 1 * * * workflow_dispatch: jobs: + # Determine build type based on trigger main: secrets: inherit uses: ./.github/workflows/main_base.yml with: toolchain: 1.90.0 - debug_or_release: debug - platforms: linux/amd64 + # Use release for tags and scheduled runs, debug for everything else + debug_or_release: ${{ (startsWith(github.ref, 'refs/tags/') || github.event_name == 'schedule') && 'release' || 'debug' }} + + # Run packaging on tags, PRs, and scheduled runs + packaging: + if: (startsWith(github.ref, 'refs/tags/') || github.event_name == 'pull_request' || github.event_name == 'pull_request_target' || github.event_name + == 'schedule') && github.repository == 'Cosmian/kms' && !startsWith(github.ref_name, 'dependabot/') + uses: ./.github/workflows/packaging.yml + secrets: inherit + with: + toolchain: 1.90.0 diff --git a/.github/workflows/main_base.yml b/.github/workflows/main_base.yml index 64e7dad36..d98093da6 100644 --- a/.github/workflows/main_base.yml +++ b/.github/workflows/main_base.yml @@ -10,9 +10,6 @@ on: debug_or_release: required: true type: string - platforms: - required: true - type: string jobs: cla-assistant: @@ -44,93 +41,20 @@ jobs: # toolchain: ${{ inputs.toolchain }} cargo-publish: - uses: Cosmian/reusable_workflows/.github/workflows/cargo-publish-workspace.yml@develop + name: Cargo Publish Workspace + uses: ./.github/workflows/cargo-publish.yml with: toolchain: ${{ inputs.toolchain }} secrets: token: ${{ secrets.CRATES_IO }} - pykmip: - env: - OPENSSL_DIR: /usr/local/openssl - runs-on: ubuntu-24.04 - container: - image: cosmian/rockylinux9 - - steps: - - uses: actions/checkout@v5 - with: - submodules: recursive - - - uses: dtolnay/rust-toolchain@master - with: - toolchain: ${{ inputs.toolchain }} - components: rustfmt, clippy - - - name: Local OpenSSL Install - run: | - bash .github/reusable_scripts/get_openssl_binaries.sh - env: - OS_NAME: ubuntu_20_04 - - - name: Tests PyKMIP - env: - OPENSSL_DIR: ${{ env.OPENSSL_DIR }} - COSMIAN_KMS_CONF: ./scripts/kms.toml - run: | - cargo build --bin cosmian_kms --features non-fips - cargo run --bin cosmian_kms --features non-fips & - - python3 -m pip install --upgrade pip - python3 -m venv .venv - source .venv/bin/activate - pip install PyKMIP - bash ./scripts/test_pykmip.sh all - - build: # Build on Ubuntu 22/24, Rocky 8/9, MacOS 13/15 and Windows Server 22 - uses: Cosmian/reusable_workflows/.github/workflows/build_all.yml@develop + test: # Run all tests + uses: ./.github/workflows/test_all.yml secrets: inherit with: toolchain: ${{ inputs.toolchain }} debug_or_release: ${{ inputs.debug_or_release }} - non-fips-image: - name: Non-FIPS image build and tests - if: github.repository == 'Cosmian/kms' && !startsWith(github.ref_name, 'dependabot/') - uses: Cosmian/reusable_workflows/.github/workflows/build_docker_image.yml@develop - with: - prefix: '' - registry-image: ghcr.io/cosmian/kms - platforms: ${{ inputs.platforms }} - fips: false - - fips-image: - name: FIPS image build and tests - if: github.repository == 'Cosmian/kms' && !startsWith(github.ref_name, 'dependabot/') - uses: Cosmian/reusable_workflows/.github/workflows/build_docker_image.yml@develop - with: - prefix: FIPS - registry-image: ghcr.io/cosmian/kms-fips - platforms: ${{ inputs.platforms }} - fips: true - - ############################################################################## - ### Push binaries on package.cosmian.com and make Release - ############################################################################## - push-artifacts: - if: github.repository == 'Cosmian/kms' && !startsWith(github.ref_name, 'dependabot/') - needs: - - cargo-clippy - - cargo-deny - - cargo-machete - - build - - pykmip - uses: Cosmian/reusable_workflows/.github/workflows/push-artifacts.yml@develop - with: - project-name: kms - destination: kms - debug_or_release: ${{ inputs.debug_or_release }} - public_documentation: if: github.repository == 'Cosmian/kms' && !startsWith(github.ref_name, 'dependabot/') runs-on: ubuntu-latest diff --git a/.github/workflows/main_release.yml b/.github/workflows/main_release.yml deleted file mode 100644 index e46f4fbbb..000000000 --- a/.github/workflows/main_release.yml +++ /dev/null @@ -1,21 +0,0 @@ ---- -name: CI nightly release - -on: - push: - # any tags, including tags with / like v1.0/alpha - tags: - - '**' - schedule: - # every day at 1 AM - - cron: 00 1 * * * - workflow_dispatch: - -jobs: - main: - secrets: inherit - uses: ./.github/workflows/main_base.yml - with: - toolchain: 1.90.0 - debug_or_release: release - platforms: linux/amd64,linux/arm64 diff --git a/.github/workflows/packaging.yml b/.github/workflows/packaging.yml new file mode 100644 index 000000000..c9d420a1e --- /dev/null +++ b/.github/workflows/packaging.yml @@ -0,0 +1,286 @@ +--- +name: Packaging + +on: + workflow_call: + inputs: + toolchain: + required: true + type: string + default: 1.90.0 + workflow_dispatch: + inputs: + toolchain: + description: Rust toolchain to use (e.g., stable, nightly-YYYY-MM-DD) + required: true + type: string + default: 1.90.0 + +jobs: + windows-2022: + uses: ./.github/workflows/build_windows.yml + with: + toolchain: ${{ inputs.toolchain }} + archive-name: windows + debug_or_release: release + + packages: + name: Package ${{ matrix.runner }} - ${{ matrix.features }} + runs-on: ${{ matrix.runner }} + strategy: + fail-fast: false + matrix: + features: [fips, non-fips] + runner: [ubuntu-24.04, ubuntu-24.04-arm, macos-15] + + steps: + - name: Nix installation + uses: cachix/install-nix-action@v31 + + - uses: actions/checkout@v4 + with: + submodules: recursive + + - name: Set up GPG + uses: crazy-max/ghaction-import-gpg@v5 + with: + gpg_private_key: ${{ secrets.GPG_SIGNING_KEY }} + passphrase: ${{ secrets.GPG_SIGNING_KEY_PASSPHRASE }} + + - name: List keys + run: gpg -K + + - name: Package + run: | + bash .github/scripts/nix.sh --profile release --variant ${{ matrix.features }} package + env: + GPG_SIGNING_KEY: ${{ secrets.GPG_SIGNING_KEY }} + GPG_SIGNING_KEY_PASSPHRASE: ${{ secrets.GPG_SIGNING_KEY_PASSPHRASE }} + + - name: Upload package + uses: actions/upload-artifact@v4 + with: + name: ${{ matrix.features }}_${{ matrix.runner }}-release + path: result-*-${{ matrix.features }}/* + retention-days: 1 + if-no-files-found: error + + packages-test: + needs: packages + name: Package tests ${{ matrix.container }} - ${{ matrix.features }}${{ matrix.runner == 'ubuntu-24.04-arm' && ' - ARM' || ' - AMD64' }} + runs-on: ${{ matrix.runner }} + container: ${{ matrix.container }} + strategy: + fail-fast: false + matrix: + container: + # Ubuntu LTS releases within the last ~10 years + - ubuntu:25.04 + - ubuntu:24.04 + - ubuntu:22.04 + - ubuntu:20.04 + # Cannot download artifacts using actions/download-artifact@v4 - Glibc v2.28 required + # - ubuntu:18.04 + # Debian stable releases within the last ~10 years + - debian:trixie-slim # Debian 13 + - debian:bookworm-slim # Debian 12 + - debian:bullseye-slim # Debian 11 + - debian:buster-slim # Debian 10 + # Cannot download artifacts using actions/download-artifact@v4 - Glibc v2.28 required + # - debian:stretch-slim # Debian 9 + # Rocky Linux releases + - rockylinux/rockylinux:10 + - rockylinux/rockylinux:9 + - rockylinux/rockylinux:8 + features: [fips, non-fips] + runner: [ubuntu-24.04, ubuntu-24.04-arm] + + steps: + - name: Download package artifacts + uses: actions/download-artifact@v4 + with: + name: ${{ matrix.features }}_${{ matrix.runner }}-release + + - name: List downloaded artifacts + if: ${{ matrix.container != 'rockylinux/rockylinux:8' }} + run: find . + + - name: Install package + shell: bash + run: | + set -ex + if [ "${{ startsWith(matrix.container, 'rockylinux') }}" = "true" ]; then + # RPM-based (Rocky Linux) + rpm -qpl ./result-rpm-${{ matrix.features }}/*.rpm + rpm -i ./result-rpm-${{ matrix.features }}/*.rpm --nodeps || true + else + # DEB-based (Ubuntu/Debian) + dpkg --contents ./result-deb-${{ matrix.features }}/*.deb + # Use apt to handle dependencies when installing local .deb files + dpkg -i ./result-deb-${{ matrix.features }}/*.deb || true + fi + + - name: Enable info flag in config + shell: bash + run: | + set -ex + if [ -f /etc/cosmian/kms.toml ]; then + sed -i 's/info = false/info = true/g' /etc/cosmian/kms.toml + else + echo "Config file /etc/cosmian/kms.toml not found; skipping info flag enable." + exit 1 + fi + + - name: Pre-check file + shell: bash + run: | + set -ex + # Determine installed binary path + BIN="/usr/sbin/cosmian_kms" + if [ ! -x "$BIN" ]; then + if [ -f "/usr/bin/cosmian_kms" ]; then + BIN="/usr/bin/cosmian_kms" + fi + fi + # Show libs and run + ldd "$BIN" + chmod +x "$BIN" + "$BIN" --version + "$BIN" --info + + - name: Disable info flag in config + shell: bash + run: | + set -ex + if [ -f /etc/cosmian/kms.toml ]; then + sed -i 's/info = true/info = false/g' /etc/cosmian/kms.toml + else + echo "Config file /etc/cosmian/kms.toml not found; skipping info flag enable." + exit 1 + fi + + - name: Run executable file + shell: bash + run: | + set -ex + # Determine installed binary path + BIN="/usr/sbin/cosmian_kms" + "$BIN" & + sleep 5 + + # Test UI endpoints + if command -v curl >/dev/null 2>&1; then + curl -I http://127.0.0.1:9998/ui/index.html + else + # Last resort: pure Bash using /dev/tcp + # Requires bash; sends a HEAD request and checks for 200 + set +e + { + exec 3<>/dev/tcp/127.0.0.1/9998 + printf 'HEAD /ui/index.html HTTP/1.1\r\nHost: 127.0.0.1\r\nConnection: close\r\n\r\n' >&3 + read -r status_line <&3 + echo "$status_line" + echo "$status_line" | grep -qE 'HTTP/.* 2[0-9]{2}\b' + } ; rc=$? + exec 3>&- 3<&- + set -e + exit $rc + fi + + docker-image: + name: Docker image build ${{ matrix.runner }} - ${{ matrix.features }} + needs: packages + strategy: + fail-fast: false + matrix: + features: [fips, non-fips] + runner: [ubuntu-24.04, ubuntu-24.04-arm] + uses: ./.github/workflows/build_docker_image.yml + with: + registry-image: ${{ (matrix.features == 'fips' && 'ghcr.io/cosmian/kms-fips' || 'ghcr.io/cosmian/kms') }} + os: ${{ matrix.runner }} + features: ${{ matrix.features }} + debug_or_release: release + secrets: inherit + + docker-manifest: + name: Docker manifest - ${{ matrix.features }} + needs: docker-image + runs-on: ubuntu-24.04 + permissions: + contents: read + packages: write + id-token: write # Required for cosign keyless signing + strategy: + fail-fast: false + matrix: + features: [fips, non-fips] + env: + REGISTRY_IMAGE: ${{ (matrix.features == 'fips' && 'ghcr.io/cosmian/kms-fips' || 'ghcr.io/cosmian/kms') }} + steps: + - name: Login to GHCR + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Install Cosign + uses: sigstore/cosign-installer@v3.7.0 + + - name: Set up Buildx + uses: docker/setup-buildx-action@v3 + + - name: Compute tags + id: meta + uses: docker/metadata-action@v4 + with: + images: | + ${{ env.REGISTRY_IMAGE }} + tags: | + type=ref,event=branch + type=ref,event=pr + type=semver,pattern={{version}} + type=semver,pattern={{major}}.{{minor}} + + - name: Create and push manifest list + id: manifest + run: | + set -euo pipefail + echo "Tags to manifest:"; echo "${{ steps.meta.outputs.tags }}" + while IFS= read -r tag; do + [ -z "$tag" ] && continue + echo "Creating manifest for $tag" + docker buildx imagetools create \ + --tag "$tag" \ + "${tag}-amd64" \ + "${tag}-arm64" + + # Get the manifest digest + DIGEST=$(docker buildx imagetools inspect "$tag" --format '{{json .Manifest}}' | jq -r '.digest') + echo "manifest_digest_${tag##*:}=$DIGEST" >> $GITHUB_OUTPUT + + docker buildx imagetools inspect "$tag" + done <<< "${{ steps.meta.outputs.tags }}" + + - name: Sign multi-arch manifest with Cosign + env: + TAGS: ${{ steps.meta.outputs.tags }} + run: | + images="" + for tag in ${TAGS}; do + images+="${tag} " + done + cosign sign --yes ${images} + + push-artifacts: + if: github.repository == 'Cosmian/kms' && !startsWith(github.ref_name, 'dependabot/') + needs: + - windows-2022 + - packages + - docker-manifest + uses: ./.github/workflows/push-artifacts.yml + with: + project-name: kms + destination: kms + debug_or_release: release diff --git a/.github/workflows/push-artifacts.yml b/.github/workflows/push-artifacts.yml new file mode 100644 index 000000000..babedfa71 --- /dev/null +++ b/.github/workflows/push-artifacts.yml @@ -0,0 +1,142 @@ +--- +name: Push artifacts to package.cosmian.com + +on: + workflow_call: + inputs: + project-name: + required: true + type: string + destination: + required: true + type: string + debug_or_release: + required: true + type: string + +jobs: + ############################################################################## + ### Packages + ############################################################################## + packages: + name: push ${{ inputs.project-name }} to package.cosmian.com + runs-on: [self-hosted, not-sgx] + container: + image: cosmian/docker_doc_ci + volumes: + - /home/cosmian/.ssh/id_rsa:/root/.ssh/id_rsa + + # Each artifact contains 1 Debian package + 1 RPM package + env: + ARCHIVE_NAMES: >- + fips_ubuntu-24.04-${{ inputs.debug_or_release }}/result-* + non-fips_ubuntu-24.04-${{ inputs.debug_or_release }}/result-* + fips_ubuntu-24.04-arm-${{ inputs.debug_or_release }}/result-* + non-fips_ubuntu-24.04-arm-${{ inputs.debug_or_release }}/result-* + non-fips_macos-15-${{ inputs.debug_or_release }}/result-* + windows-release + + steps: + - run: rm -rf ${{ inputs.project-name }}_* fips_* windows* ubuntu* macos* rockylinux* debian* + - uses: actions/download-artifact@v4 + with: + pattern: '*fips*' + - uses: actions/download-artifact@v4 + with: + pattern: windows-* + + - run: find . + + - name: Fail if expected number of packages is incorrect + shell: bash + run: | + set -ex + DEB_COUNT=0 + RPM_COUNT=0 + DMG_COUNT=0 + EXE_COUNT=0 + for archive_name in $ARCHIVE_NAMES; do + DEB_COUNT=$((DEB_COUNT + $(compgen -G "$archive_name/*.deb" | wc -l || true))) + RPM_COUNT=$((RPM_COUNT + $(compgen -G "$archive_name/*.rpm" | wc -l || true))) + DMG_COUNT=$((DMG_COUNT + $(compgen -G "$archive_name/*.dmg" | wc -l || true))) + EXE_COUNT=$((EXE_COUNT + $(compgen -G "$archive_name/*setup.exe" | wc -l || true))) + done + + if [ "$DEB_COUNT" -lt 4 ] && [ "$RPM_COUNT" -lt 4 ]; then + echo "Error: Less than 4 Debian or 4 RPM packages found." + exit 1 + fi + + if [ "$DMG_COUNT" -lt 1 ]; then + echo "Error: No macOS DMG package found." + exit 1 + fi + + if [ "$EXE_COUNT" -lt 1 ]; then + echo "Error: No Windows executable found." + exit 1 + fi + + - name: Push to package.cosmian.com + shell: bash + run: | + set -ex + if [[ "${GITHUB_REF}" =~ 'refs/tags/' ]]; then + BRANCH="${GITHUB_REF_NAME}" + else + BRANCH="last_build/${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" + fi + DESTINATION_DIR=/mnt/package/${{ inputs.destination }}/$BRANCH + ssh -o 'StrictHostKeyChecking no' -i /root/.ssh/id_rsa cosmian@package.cosmian.com mkdir -p $DESTINATION_DIR + + # Copy Debian, RPM, DMG, and EXE artifacts using ARCHIVE_NAMES patterns + for dir in $ARCHIVE_NAMES; do + # Debian + if compgen -G "$dir/*.deb*" > /dev/null; then + scp -o 'StrictHostKeyChecking no' -i /root/.ssh/id_rsa $dir/*.deb* cosmian@package.cosmian.com:$DESTINATION_DIR/ + fi + # RPM + if compgen -G "$dir/*.rpm*" > /dev/null; then + scp -o 'StrictHostKeyChecking no' -i /root/.ssh/id_rsa $dir/*.rpm* cosmian@package.cosmian.com:$DESTINATION_DIR/ + fi + # DMG (macOS) + if compgen -G "$dir/*.dmg*" > /dev/null; then + scp -o 'StrictHostKeyChecking no' -i /root/.ssh/id_rsa $dir/*.dmg* cosmian@package.cosmian.com:$DESTINATION_DIR/ + fi + done + + # Include Cosmian public GPG key + scp -o 'StrictHostKeyChecking no' -i /root/.ssh/id_rsa fips_ubuntu-24.04-*/result-deb-fips/cosmian-kms-public.asc cosmian@package.cosmian.com:$DESTINATION_DIR/ + + # Windows EXE packages (kept separate because path differs from ARCHIVE_NAMES patterns) + if compgen -G "windows-release/*setup.exe" > /dev/null; then + scp -o 'StrictHostKeyChecking no' -i /root/.ssh/id_rsa \ + windows-release/*setup.exe \ + cosmian@package.cosmian.com:$DESTINATION_DIR/ + fi + + - name: Release on tags, attach asset on release + if: startsWith(github.ref, 'refs/tags/') + uses: softprops/action-gh-release@v1 + with: + files: | + # Debian packages (match both x86_64 and ARM, under result-* folders) + fips_ubuntu-24.04-*/result-*/*.deb* + non-fips_ubuntu-24.04-*/result-*/*.deb* + fips_ubuntu-24.04-arm-*/result-*/*.deb* + non-fips_ubuntu-24.04-arm-*/result-*/*.deb* + + # RPM packages (match both x86_64 and ARM, under result-* folders) + fips_ubuntu-24.04-*/result-*/*.rpm* + non-fips_ubuntu-24.04-*/result-*/*.rpm* + fips_ubuntu-24.04-arm-*/result-*/*.rpm* + non-fips_ubuntu-24.04-arm-*/result-*/*.rpm* + + # macOS DMG packages (non-FIPS, under result-* folder) + non-fips_macos-15-*/result-*/*.dmg* + + # Windows EXE packages + windows-release/*.exe + + # Include Cosmian public GPG key + fips_ubuntu-24.04-*/result-deb-fips/cosmian-kms-public.asc diff --git a/.github/workflows/test_all.yml b/.github/workflows/test_all.yml new file mode 100644 index 000000000..fdd688bc6 --- /dev/null +++ b/.github/workflows/test_all.yml @@ -0,0 +1,191 @@ +--- +name: Build all + +on: + workflow_call: + inputs: + toolchain: + required: true + type: string + debug_or_release: + required: true + type: string + workflow_dispatch: + +jobs: + test-nix: + name: Test on ${{ matrix.type }} - ${{ matrix.features }} + if: github.repository == 'Cosmian/kms' && !startsWith(github.ref_name, 'dependabot/') + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + type: + - sqlite + - mysql + - psql + - google_cse + - redis + - pykmip + features: [fips, non-fips] + exclude: + # redis is exclusively for non-fips + - type: redis + features: fips + + steps: + - name: Nix installation + uses: cachix/install-nix-action@v31 + + - uses: actions/checkout@v4 + with: + submodules: recursive + + - name: Run docker containers + run: | + docker compose -h + docker compose up -d + + - name: Test + env: + POSTGRES_USER: kms + PGUSER: kms + POSTGRES_PASSWORD: kms + POSTGRES_DB: kms + POSTGRES_HOST: localhost + POSTGRES_PORT: 5432 + KMS_POSTGRES_URL: postgresql://kms:kms@127.0.0.1:5432/kms + + MYSQL_DATABASE: kms + MYSQL_ROOT_PASSWORD: kms + MYSQL_HOST: localhost + MYSQL_PORT: 3306 + KMS_MYSQL_URL: mysql://root:kms@localhost:3306/kms + + KMS_SQLITE_PATH: data/shared + + REDIS_HOST: localhost + REDIS_PORT: 6379 + KMS_REDIS_URL: redis://localhost:6379 + + # Google variables + TEST_GOOGLE_OAUTH_CLIENT_ID: ${{ secrets.TEST_GOOGLE_OAUTH_CLIENT_ID }} + TEST_GOOGLE_OAUTH_CLIENT_SECRET: ${{ secrets.TEST_GOOGLE_OAUTH_CLIENT_SECRET }} + TEST_GOOGLE_OAUTH_REFRESH_TOKEN: ${{ secrets.TEST_GOOGLE_OAUTH_REFRESH_TOKEN }} + GOOGLE_SERVICE_ACCOUNT_PRIVATE_KEY: ${{ secrets.GOOGLE_SERVICE_ACCOUNT_PRIVATE_KEY }} + run: | + set -ex + bash .github/scripts/nix.sh --profile ${{ inputs.debug_or_release }} --variant ${{ matrix.features }} test ${{ matrix.type }} + + test: + name: Test on ${{ matrix.type }} - ${{ matrix.features }} - without Nix + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + type: + - sqlite + - mysql + # - psql + # - redis + # - pykmip + features: [fips, non-fips] + exclude: + # redis is exclusively for non-fips + - type: redis + features: fips + + steps: + - uses: dtolnay/rust-toolchain@master + with: + toolchain: ${{ inputs.toolchain }} + components: rustfmt, clippy + + - uses: actions/checkout@v4 + with: + submodules: recursive + + - name: Run docker containers + run: | + docker compose -h + docker compose up -d + + - name: Test + env: + POSTGRES_USER: kms + PGUSER: kms + POSTGRES_PASSWORD: kms + POSTGRES_DB: kms + POSTGRES_HOST: localhost + POSTGRES_PORT: 5432 + KMS_POSTGRES_URL: postgresql://kms:kms@127.0.0.1:5432/kms + + MYSQL_DATABASE: kms + MYSQL_ROOT_PASSWORD: kms + MYSQL_HOST: localhost + MYSQL_PORT: 3306 + KMS_MYSQL_URL: mysql://root:kms@localhost:3306/kms + + KMS_SQLITE_PATH: data/shared + + REDIS_HOST: localhost + REDIS_PORT: 6379 + KMS_REDIS_URL: redis://localhost:6379 + run: | + set -ex + bash .github/scripts/test_${{ matrix.type }}.sh --profile ${{ inputs.debug_or_release }} --variant ${{ matrix.features }} + + hsm: + name: HSM ${{ matrix.hsm-type }} - ${{ matrix.features }} + if: github.repository == 'Cosmian/kms' && !startsWith(github.ref_name, 'dependabot/') + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + hsm-type: + - utimaco + - proteccio + - softhsm2 + features: [fips, non-fips] + exclude: + # parallel connections on proteccio is not supported + - hsm-type: proteccio + features: non-fips + + steps: + - name: Nix installation + uses: cachix/install-nix-action@v31 + + - uses: actions/checkout@v4 + with: + submodules: recursive + + - name: Test + env: + # HSM + PROTECCIO_IP: ${{ secrets.PROTECCIO_IP }} + PROTECCIO_PASSWORD: ${{ secrets.PROTECCIO_PASSWORD }} + PROTECCIO_SLOT: ${{ secrets.PROTECCIO_SLOT }} + # Google variables + TEST_GOOGLE_OAUTH_CLIENT_ID: ${{ secrets.TEST_GOOGLE_OAUTH_CLIENT_ID }} + TEST_GOOGLE_OAUTH_CLIENT_SECRET: ${{ secrets.TEST_GOOGLE_OAUTH_CLIENT_SECRET }} + TEST_GOOGLE_OAUTH_REFRESH_TOKEN: ${{ secrets.TEST_GOOGLE_OAUTH_REFRESH_TOKEN }} + GOOGLE_SERVICE_ACCOUNT_PRIVATE_KEY: ${{ secrets.GOOGLE_SERVICE_ACCOUNT_PRIVATE_KEY }} + run: | + bash .github/scripts/nix.sh --profile ${{ inputs.debug_or_release }} --variant ${{ matrix.features }} test hsm ${{ matrix.hsm-type }} + + windows-2022: + uses: ./.github/workflows/test_windows.yml + with: + toolchain: ${{ inputs.toolchain }} + archive-name: windows + debug_or_release: ${{ inputs.debug_or_release }} + + cleanup: + needs: + - test-nix + - test + - hsm + - windows-2022 + uses: Cosmian/reusable_workflows/.github/workflows/cleanup_cache.yml@develop + secrets: inherit diff --git a/.github/workflows/test_windows.yml b/.github/workflows/test_windows.yml new file mode 100644 index 000000000..9deb51735 --- /dev/null +++ b/.github/workflows/test_windows.yml @@ -0,0 +1,47 @@ +--- +name: Windows Tests + +on: + workflow_call: + inputs: + toolchain: + required: true + type: string + archive-name: + required: true + type: string + debug_or_release: + required: true + type: string + +jobs: + cargo-test: + name: cargo test - ${{ inputs.archive-name }} + runs-on: windows-2022 + steps: + - uses: actions/checkout@v4 + with: + submodules: recursive + + - uses: dtolnay/rust-toolchain@master + with: + toolchain: ${{ inputs.toolchain }} + components: rustfmt, clippy + + - name: Build static OpenSSL + shell: pwsh + run: | + vcpkg install --triplet x64-windows-static + vcpkg integrate install + + - name: Tests + shell: pwsh + run: | + $ErrorActionPreference = "Stop" + . .\.github\scripts\cargo_test.ps1 + TestProject -BuildType ${{ inputs.debug_or_release }} + env: + # Google variables + TEST_GOOGLE_OAUTH_CLIENT_ID: ${{ secrets.TEST_GOOGLE_OAUTH_CLIENT_ID }} + TEST_GOOGLE_OAUTH_CLIENT_SECRET: ${{ secrets.TEST_GOOGLE_OAUTH_CLIENT_SECRET }} + TEST_GOOGLE_OAUTH_REFRESH_TOKEN: ${{ secrets.TEST_GOOGLE_OAUTH_REFRESH_TOKEN }} diff --git a/.gitignore b/.gitignore index bdcd95ac4..529c1b7fd 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,6 @@ target/ .cargo_check/ .history/ -*nix *.swp TODO.md data/html @@ -20,3 +19,15 @@ node_modules/ **/*cosmian-kms/sqlite-data* run.sh .aider/ +.cache +.local +.openssl +resources/tarballs/openssl-3.1.2.tar.gz +.utimaco +.softhsm2 +*.xz* +result* +crate/server/Cargo.toml.bak +sbom/*.json +sbom/*.csv +sbom/*.png diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index cedf24fee..0b0a56f65 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -92,6 +92,7 @@ repos: - id: check-vcs-permalinks exclude: crate/kmip/src/ttlv/kmip_ttlv_deserializer - id: check-xml + exclude: crate/server/resources/production.drawio.svg - id: check-yaml - id: debug-statements - id: destroyed-symlinks @@ -130,15 +131,43 @@ repos: - id: cargo-update stages: [manual] - id: cargo-machete - - id: cargo-build - - id: renew-server-cli-doc + + - repo: https://github.com/EmbarkStudios/cargo-deny + rev: 0.18.2 + hooks: + - id: cargo-deny + args: [--all-features, check] + stages: [manual] + + - repo: https://github.com/Cosmian/git-hooks.git + rev: v1.0.42 + hooks: - id: docker-compose-up - - id: cargo-test - - id: cargo-build - args: [--all-features] - - id: cargo-test - alias: cargo-test-all - args: [--all-features] + + - repo: local + hooks: + - id: cargo-test-fips + name: cargo test (sqlite fips) + entry: bash .github/scripts/test_sqlite.sh --variant fips + language: system + types: [rust] + pass_filenames: false + - id: cargo-test-non-fips + name: cargo test (sqlite non-fips) + entry: bash .github/scripts/test_sqlite.sh --variant non-fips + language: system + types: [rust] + pass_filenames: false + - id: renew-server-doc + name: renew server cli doc + entry: bash .github/scripts/renew_server_doc.sh + language: system + pass_filenames: false + always_run: true + + - repo: https://github.com/Cosmian/git-hooks.git + rev: v1.0.42 + hooks: - id: nightly-clippy-autofix-unreachable-pub - id: nightly-clippy-autofix-all-targets-all-features - id: nightly-clippy-autofix-all-targets @@ -146,10 +175,3 @@ repos: - id: clippy-all-targets - id: cargo-format # in last du to clippy fixes - id: docker-compose-down - - - repo: https://github.com/EmbarkStudios/cargo-deny - rev: 0.18.2 - hooks: - - id: cargo-deny - args: [--all-features, check] - stages: [manual] diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index eef78b208..d86d20b48 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -77,11 +77,6 @@ we'll mark the PR incomplete and ask you to follow up on the missing requirement Please include a file within your PR named `changelog/#.txt`, where `#` is your pull request ID. There are many examples under [changelog](changelog), but the general format is: -```text -```CATEGORY -COMPONENT: summary of change -``` - CATEGORY is one of `🚀 Features`, `🐛 Bug Fixes`, `📚 Documentation`, `🧪 Testing`, `⚙️ Miscellaneous Tasks`, or `🚜 Refactor`. Your PR is almost certain to be one of `🐛 Bug Fixes` or `🚀 Features`, but don't worry too much about getting it exactly right, we'll tell you if a change is needed. @@ -116,16 +111,16 @@ If you have never worked with Rust before, you will have to complete the followi 1. Install Rust using [rustup](https://rustup.rs/) 2. Install the required stable toolchain: `rustup toolchain install 1.90.0` 3. Install required components: `rustup component add rustfmt clippy --toolchain 1.90.0` -4. Set up OpenSSL 3.2.0 (required for FIPS compliance) by running: `bash .github/reusable_scripts/get_openssl_binaries.sh` +4. Build the project: `cargo build --release` -For detailed development setup, please refer to the [README](README.md) and the build instructions in -[.github/copilot-instructions.md](.github/copilot-instructions.md). +For detailed development setup including Nix-based reproducible builds, please refer to the [README](README.md) and +the build instructions in [.github/copilot-instructions.md](.github/copilot-instructions.md). ## Testing Before submitting a pull request, please ensure that: -• All existing tests pass: `cargo test --workspace --lib` +• All existing tests pass: `cargo test` • Your code is properly formatted: `cargo fmt --check` • Your code passes clippy lints: `cargo clippy --workspace --all-targets --all-features` • If you've added new functionality, include appropriate unit and/or integration tests diff --git a/Cargo.lock b/Cargo.lock index afd280ffb..14020f2b0 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1405,6 +1405,7 @@ dependencies = [ "reqwest 0.11.27", "serde", "serde_json", + "sha2", "smartcardhsm_pkcs11_loader", "softhsm2_pkcs11_loader", "strum", diff --git a/Cargo.toml b/Cargo.toml index fc7ad3f1f..a0468a516 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -100,8 +100,15 @@ keywords = ["kms", "cosmian"] categories = ["security"] [profile.release] -lto = true -strip = true +# Deterministic build configuration for reproducible binaries +# These settings ensure the same source produces identical binaries across builds +lto = "fat" # Fat LTO: maximum cross-crate optimization for smallest binaries +strip = "symbols" # Strip symbol tables for smaller binaries +opt-level = "z" # Optimize for size while maintaining performance +codegen-units = 1 # Single codegen unit: best optimization and determinism +panic = "abort" # Smaller binaries, no unwinding tables +incremental = false # Disable incremental compilation for determinism +debug = 0 # No debug info (timestamps/paths) [profile.dev] strip = "debuginfo" diff --git a/Dockerfile b/Dockerfile index 0874cd96e..1513f40ba 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,14 @@ +############################################################ +# Cosmian KMS - Docker image built from local Debian package # -# KMS server -# -FROM rust:1.86.0-bookworm AS builder +# This Dockerfile installs the prebuilt KMS server Debian package +# (FIPS by default) directly into a minimal Debian runtime image. +# Use DEB_FILE build-arg to select the exact .deb to install: +# --build-arg DEB_FILE=result-deb-fips/cosmian-kms-server-fips_X.Y.Z-1_amd64.deb (default) +# --build-arg DEB_FILE=result-deb-non-fips/cosmian-kms-server_X.Y.Z-1_amd64.deb +############################################################ + +FROM debian:bookworm-20250428-slim AS kms-server LABEL version="5.12.0" LABEL name="Cosmian KMS docker container" @@ -12,52 +19,39 @@ LABEL org.opencontainers.image.source="https://github.com/Cosmian/kms" LABEL org.opencontainers.image.documentation="https://docs.cosmian.com/key_management_system/" LABEL org.opencontainers.image.licenses="BUSL-1.1" -ENV OPENSSL_DIR=/usr/local/openssl - -# Add build argument for FIPS mode -ARG FIPS=false - -WORKDIR /root - -COPY . /root/kms - -WORKDIR /root/kms - -ARG TARGETPLATFORM -RUN if [ "$TARGETPLATFORM" = "linux/amd64" ]; then export ARCHITECTURE=x86_64; elif [ "$TARGETPLATFORM" = "linux/arm/v7" ]; then export ARCHITECTURE=arm; elif [ "$TARGETPLATFORM" = "linux/arm64" ]; then export ARCHITECTURE=arm64; else export ARCHITECTURE=x86_64; fi \ - && bash /root/kms/.github/reusable_scripts/get_openssl_binaries.sh - -# Conditional cargo build based on FIPS argument -RUN if [ "$FIPS" = "true" ]; then \ - cargo build -p cosmian_kms_server --release --no-default-features; \ - else \ - cargo build -p cosmian_kms_server --release --no-default-features --features="non-fips"; \ - fi - -# Create UI directory structure based on FIPS mode -RUN if [ "$FIPS" = "true" ]; then \ - cp -r crate/server/ui /tmp/ui_to_copy; \ - else \ - cp -r crate/server/ui_non_fips /tmp/ui_to_copy; \ - fi - -# -# KMS server -# -FROM debian:bookworm-20250428-slim AS kms-server +### +# Provide the Debian package file directly. +# Default to the FIPS variant produced by packaging. +# Override to non-FIPS with: +# --build-arg DEB_FILE=result-deb-non-fips/cosmian-kms-server_X.Y.Z-1_amd64.deb +### +ARG DEB_FILE=result-deb-fips/cosmian-kms-server-fips_X.Y.Z-1_amd64.deb ENV DEBIAN_FRONTEND=noninteractive -RUN apt-get update && apt-get install --no-install-recommends -qq -y ca-certificates \ +# Install ca-certificates and the locally provided Debian package +RUN apt-get update \ + && apt-get install --no-install-recommends -y ca-certificates \ && update-ca-certificates \ && rm -rf /var/lib/apt/lists/* -RUN mkdir -p /usr/local/cosmian - -COPY --from=builder /tmp/ui_to_copy /usr/local/cosmian/ui -COPY --from=builder /root/kms/target/release/cosmian_kms /usr/bin/cosmian_kms -COPY --from=builder /usr/local/openssl /usr/local/openssl +# Copy the Debian package produced by the repository into the image +# Default file is the FIPS .deb; override with --build-arg DEB_FILE=... +COPY ${DEB_FILE} /tmp/kms.deb + +# Install the package; apt can install a local .deb directly +# Provide a stub systemctl so postinst scripts that try to touch systemd succeed +RUN printf '#!/bin/sh\nexit 0\n' > /bin/systemctl \ + && chmod +x /bin/systemctl \ + && apt-get update \ + && apt-get install -y /tmp/kms.deb \ + && ln -s /usr/sbin/cosmian_kms /usr/bin/cosmian_kms \ + && rm -f /tmp/kms.deb \ + && rm -f /etc/cosmian/kms.toml \ + && rm -f /bin/systemctl \ + && rm -rf /var/lib/apt/lists/* EXPOSE 9998 +# Default entrypoint; pass args at docker run time if desired ENTRYPOINT ["cosmian_kms"] diff --git a/README.md b/README.md index faa9d5a70..1975310ca 100644 --- a/README.md +++ b/README.md @@ -70,10 +70,10 @@ The KMS has extensive online [documentation](https://docs.cosmian.com/key_manage - [Additional Directories](#additional-directories) - [Building and running the KMS](#building-and-running-the-kms) - [Features](#features) - - [Linux or macOS (CPU Intel or macOS ARM)](#linux-or-macos-cpu-intel-or-macos-arm) + - [Linux or macOS](#linux-or-macos) - [Windows](#windows) - - [Build the KMS](#build-the-kms) - [Build the Docker Ubuntu container](#build-the-docker-ubuntu-container) + - [Packaging (DEB/RPM/DMG) and hashes](#packaging-debrpmdmg-and-hashes) - [Running the unit and integration tests](#running-the-unit-and-integration-tests) - [Development: running the server with cargo](#development-running-the-server-with-cargo) - [Server parameters](#server-parameters) @@ -210,46 +210,56 @@ directory. ## Building and running the KMS -The Cosmian KMS is built using the [Rust](https://www.rust-lang.org/) programming language. -A Rust toolchain is required to build the KMS. +Two paths are supported: + +- For production use, use Nix build: use the unified script `.github/scripts/nix.sh` for a pinned toolchain, + reproducible FIPS builds (non-FIPS builds are tracked for consistency), and packaging. +- For development purpose, use traditional `cargo` command: `cargo build...`, `cargo test` ### Features -From version 5.4.0, the KMS runs in FIPS mode by default. -The non-FIPS mode can be enabled by passing the `--features non-fips` flag to `cargo build` or `cargo run`. +- From 5.4.0 the server runs in FIPS mode by default. Enable non-FIPS with `--features non-fips` (Cargo) or + `--variant non-fips` (Nix). +- OpenSSL v3.1.2 is required when building outside Nix. The Nix flow provides the pinned version automatically. + +### Linux or macOS -OpenSSL v3.2.0 is required to build the KMS. +Nix-based (reproducible FIPS builds): -### Linux or macOS (CPU Intel or macOS ARM) +```sh +# Build (debug by default); add --profile release for optimized builds +bash .github/scripts/nix.sh build -Retrieve OpenSSL v3.2.0 (already built) with the following commands: +# Run tests (defaults to 'all'; DB backends require services) +bash .github/scripts/nix.sh test + +# Package artifacts (Linux → deb+rpm, macOS → dmg) +bash .github/scripts/nix.sh package +``` + +Simple (Cargo-only): ```sh -export OPENSSL_DIR=/usr/local/openssl -sudo mkdir -p ${OPENSSL_DIR} -sudo chown -R $USER ${OPENSSL_DIR} -bash .github/reusable_scripts/get_openssl_binaries.sh +cargo build +cargo test ``` ### Windows -1. Install Visual Studio Community with the C++ workload and clang support. -2. Install Strawberry Perl. -3. Install `vcpkg` following - [these instructions](https://github.com/Microsoft/vcpkg#quick-start-windows) +Follow the prerequisites below, or use the provided PowerShell helpers. -4. Then install OpenSSL 3.2.0: +Prerequisites (manual): -The files `vcpkg.json` and `vcpkg_fips.json` are provided in the repository to install OpenSSL v3.2.0: +1. Install Visual Studio (C++ workload + clang), Strawberry Perl, and `vcpkg`. +2. Install OpenSSL 3.1.2 with vcpkg: ```powershell -vcpkg install --triplet x64-windows-static # arm64-windows-static for ARM64 - +vcpkg install --triplet x64-windows-static # arm64-windows-static for ARM64 vcpkg integrate install -$env:OPENSSL_DIR = "$env:VCPKG_INSTALLATION_ROOT\packages\openssl_x64-windows-static" # openssl_arm64-windows-static for ARM64 +$env:OPENSSL_DIR = "$env:VCPKG_INSTALLATION_ROOT\packages\openssl_x64-windows-static" ``` -For a FIPS-compliant build, use the following commands (to build fips.dll), also run: +For FIPS builds (to build fips.dll): ```powershell Copy-Item -Path "vcpkg_fips.json" -Destination "vcpkg.json" @@ -257,34 +267,47 @@ vcpkg install vcpkg integrate install ``` -### Build the KMS +PowerShell helpers (non-FIPS by default): -Once OpenSSL is installed, you can build the KMS. To avoid the _additive feature_ issues, the main artifacts - the CLI, -the KMS server and the PKCS11 provider should be directly built using `cargo build --release` within their crate, -not from the project root. - -Build the server: +```powershell +. .github/scripts/cargo_build.ps1 +BuildProject -BuildType release # or debug -```sh -cd crate/server -cargo build --release +. .github/scripts/cargo_test.ps1 +TestProject -BuildType release # or debug ``` ### Build the Docker Ubuntu container -You can build a Docker containing the KMS server as follows: +You can build a Docker image that contains the KMS server as follows: ```sh docker buildx build . -t kms ``` -Or: +Or, with FIPS support: ```sh -# Example with FIPS support docker buildx build --build-arg FIPS="true" -t kms . ``` +### Packaging (DEB/RPM/DMG) and hashes + +Use the Nix entrypoint to build packages: + +```sh +# Linux +bash .github/scripts/nix.sh package # builds deb + rpm +bash .github/scripts/nix.sh package deb # build deb only +bash .github/scripts/nix.sh package rpm # build rpm only + +# macOS +bash .github/scripts/nix.sh package dmg +``` + +On success, a SHA-256 checksum file (.sha256) is written next to each generated package +(.deb/.rpm/.dmg) to ease verification and artifact distribution. + ## Running the unit and integration tests Pull the test data using: diff --git a/SECURITY.md b/SECURITY.md index 87b5ea899..c4e68ddce 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -52,7 +52,7 @@ When using Cosmian KMS, we recommend: ## FIPS Compliance -Cosmian KMS supports FIPS 140-3 compliance when built with FIPS features enabled. The FIPS build uses OpenSSL 3.2.0 in FIPS mode for cryptographic operations. +Cosmian KMS supports FIPS 140-3 compliance when built with FIPS features enabled. The FIPS build uses OpenSSL 3.1.2 in FIPS mode for cryptographic operations. ## Security Audits diff --git a/crate/cli/src/tests/kms/shared/locate.rs b/crate/cli/src/tests/kms/shared/locate.rs index b4e63df1e..af4b70b89 100644 --- a/crate/cli/src/tests/kms/shared/locate.rs +++ b/crate/cli/src/tests/kms/shared/locate.rs @@ -182,9 +182,17 @@ pub(crate) async fn test_locate_elliptic_curve() -> KmsCliResult<()> { let ctx = start_default_test_kms_server_with_cert_auth().await; // generate a new key pair + // Use a unique tag to avoid interference from objects created in other tests + let unique_tag = format!( + "test_ec_{}", + std::time::SystemTime::now() + .duration_since(std::time::UNIX_EPOCH) + .unwrap_or_default() + .as_nanos() + ); let (private_key_id, public_key_id) = CreateEcKeyPairAction { curve: Curve::NistP256, - tags: vec!["test_ec".to_owned()], + tags: vec![unique_tag.clone()], sensitive: false, ..Default::default() } @@ -193,7 +201,7 @@ pub(crate) async fn test_locate_elliptic_curve() -> KmsCliResult<()> { // Locate with Tags let ids = LocateObjectsAction { - tags: Some(vec!["test_ec".to_owned()]), + tags: Some(vec![unique_tag.clone()]), ..Default::default() } .run(ctx.get_owner_client()) @@ -205,7 +213,7 @@ pub(crate) async fn test_locate_elliptic_curve() -> KmsCliResult<()> { // Locate with cryptographic algorithm // this should be case insensitive let ids = LocateObjectsAction { - tags: Some(vec!["test_ec".to_owned()]), + tags: Some(vec![unique_tag.clone()]), cryptographic_algorithm: Some(CryptographicAlgorithm::ECDH), ..Default::default() } @@ -217,7 +225,7 @@ pub(crate) async fn test_locate_elliptic_curve() -> KmsCliResult<()> { // locate using the key format type let ids = LocateObjectsAction { - tags: Some(vec!["test_ec".to_owned()]), + tags: Some(vec![unique_tag.clone()]), key_format_type: Some(KeyFormatType::TransparentECPrivateKey), ..Default::default() } @@ -226,7 +234,7 @@ pub(crate) async fn test_locate_elliptic_curve() -> KmsCliResult<()> { assert_eq!(ids.len(), 1); assert!(ids.contains(&private_key_id)); let ids = LocateObjectsAction { - tags: Some(vec!["test_ec".to_owned()]), + tags: Some(vec![unique_tag.clone()]), key_format_type: Some(KeyFormatType::TransparentECPublicKey), ..Default::default() } @@ -237,7 +245,7 @@ pub(crate) async fn test_locate_elliptic_curve() -> KmsCliResult<()> { // locate using tags and cryptographic algorithm and key format type let ids = LocateObjectsAction { - tags: Some(vec!["test_ec".to_owned()]), + tags: Some(vec![unique_tag.clone()]), cryptographic_algorithm: Some(CryptographicAlgorithm::ECDH), key_format_type: Some(KeyFormatType::TransparentECPrivateKey), ..Default::default() @@ -249,7 +257,7 @@ pub(crate) async fn test_locate_elliptic_curve() -> KmsCliResult<()> { // test using system Tags let ids = LocateObjectsAction { - tags: Some(vec!["test_ec".to_owned(), "_sk".to_owned()]), + tags: Some(vec![unique_tag.clone(), "_sk".to_owned()]), ..Default::default() } .run(ctx.get_owner_client()) @@ -257,7 +265,7 @@ pub(crate) async fn test_locate_elliptic_curve() -> KmsCliResult<()> { assert_eq!(ids.len(), 1); assert!(ids.contains(&private_key_id)); let ids = LocateObjectsAction { - tags: Some(vec!["test_ec".to_owned(), "_pk".to_owned()]), + tags: Some(vec![unique_tag, "_pk".to_owned()]), ..Default::default() } .run(ctx.get_owner_client()) @@ -274,15 +282,23 @@ pub(crate) async fn test_locate_symmetric_key() -> KmsCliResult<()> { let ctx = start_default_test_kms_server_with_cert_auth().await; // generate a new key + // Use a unique tag to avoid interference from objects created in other tests + let unique_tag = format!( + "test_sym_{}", + std::time::SystemTime::now() + .duration_since(std::time::UNIX_EPOCH) + .unwrap_or_default() + .as_nanos() + ); let key_id = CreateKeyAction { - tags: vec!["test_sym".to_owned()], + tags: vec![unique_tag.clone()], ..Default::default() } .run(ctx.get_owner_client()) .await?; // Locate with Tags let ids = LocateObjectsAction { - tags: Some(vec!["test_sym".to_owned()]), + tags: Some(vec![unique_tag.clone()]), ..Default::default() } .run(ctx.get_owner_client()) @@ -293,7 +309,7 @@ pub(crate) async fn test_locate_symmetric_key() -> KmsCliResult<()> { // Locate with cryptographic algorithm // this should be case insensitive let ids = LocateObjectsAction { - tags: Some(vec!["test_sym".to_owned()]), + tags: Some(vec![unique_tag.clone()]), cryptographic_algorithm: Some(CryptographicAlgorithm::AES), ..Default::default() } @@ -304,7 +320,7 @@ pub(crate) async fn test_locate_symmetric_key() -> KmsCliResult<()> { // locate using the key format type let ids = LocateObjectsAction { - tags: Some(vec!["test_sym".to_owned()]), + tags: Some(vec![unique_tag.clone()]), key_format_type: Some(KeyFormatType::TransparentSymmetricKey), ..Default::default() } @@ -315,7 +331,7 @@ pub(crate) async fn test_locate_symmetric_key() -> KmsCliResult<()> { // locate using tags and cryptographic algorithm and key format type let ids = LocateObjectsAction { - tags: Some(vec!["test_sym".to_owned()]), + tags: Some(vec![unique_tag.clone()]), cryptographic_algorithm: Some(CryptographicAlgorithm::AES), key_format_type: Some(KeyFormatType::TransparentSymmetricKey), ..Default::default() @@ -327,7 +343,7 @@ pub(crate) async fn test_locate_symmetric_key() -> KmsCliResult<()> { // test using system Tags let ids = LocateObjectsAction { - tags: Some(vec!["test_sym".to_owned(), "_kk".to_owned()]), + tags: Some(vec![unique_tag, "_kk".to_owned()]), ..Default::default() } .run(ctx.get_owner_client()) diff --git a/crate/hsm/base_hsm/src/tests_shared.rs b/crate/hsm/base_hsm/src/tests_shared.rs index 765ac06da..e7a3edf71 100644 --- a/crate/hsm/base_hsm/src/tests_shared.rs +++ b/crate/hsm/base_hsm/src/tests_shared.rs @@ -24,10 +24,23 @@ use crate::{ Session, SlotManager, hsm_call, }; +/// Returns the library path for a given HSM, checking environment variable override first. +/// +/// # Arguments +/// * `env_var` - The environment variable name to check (e.g., `UTIMACO_PKCS11_LIB`) +/// * `default_path` - The default library path to use if environment variable is not set +/// +/// # Returns +/// The library path as a `String` +#[must_use] +pub fn lib_path(env_var: &str, default_path: &str) -> String { + std::env::var(env_var).unwrap_or_else(|_| default_path.to_owned()) +} + /// Per-HSM configuration for shared tests #[derive(Debug)] -pub struct HsmTestConfig<'a> { - pub lib_path: &'a str, +pub struct HsmTestConfig { + pub lib_path: String, pub slot_ids_and_passwords: HashMap>, // for BaseHsm::instantiate pub slot_id_for_tests: usize, // slot to use pub rsa_oaep_digest: Option, // Some if supported, None if not @@ -45,7 +58,7 @@ fn generate_random_data() -> HResult<[u8; T]> { #[allow(unsafe_code)] pub fn low_level_init_test(cfg: &HsmTestConfig) -> HResult<()> { - let path = cfg.lib_path; + let path = &cfg.lib_path; let library = unsafe { Library::new(path) }?; let init = unsafe { library.get:: CK_RV>(b"C_Initialize") }?; @@ -74,7 +87,7 @@ where BaseHsm

: Sized, { info!("instantiating hsm"); - BaseHsm::

::instantiate(cfg.lib_path, cfg.slot_ids_and_passwords.clone()) + BaseHsm::

::instantiate(&cfg.lib_path, cfg.slot_ids_and_passwords.clone()) } pub fn get_slot

(hsm: &BaseHsm

, cfg: &HsmTestConfig) -> HResult> @@ -111,7 +124,7 @@ where BaseHsm

: Sized, { log_init(None); - let hsm = BaseHsm::

::instantiate(cfg.lib_path, HashMap::new())?; + let hsm = BaseHsm::

::instantiate(&cfg.lib_path, HashMap::new())?; let info = hsm.get_info()?; info!("Connected to the HSM: {info}"); Ok(()) @@ -144,7 +157,7 @@ where { log_init(None); info!("Config: {cfg:#?}"); - let hsm = BaseHsm::

::instantiate(cfg.lib_path, cfg.slot_ids_and_passwords.clone())?; + let hsm = BaseHsm::

::instantiate(&cfg.lib_path, cfg.slot_ids_and_passwords.clone())?; let supported_algorithms = hsm.get_algorithms(cfg.slot_id_for_tests)?; info!("{:?}", supported_algorithms); Ok(()) diff --git a/crate/hsm/crypt2pay/src/tests.rs b/crate/hsm/crypt2pay/src/tests.rs index 68b8e053e..6ae274d1f 100644 --- a/crate/hsm/crypt2pay/src/tests.rs +++ b/crate/hsm/crypt2pay/src/tests.rs @@ -15,13 +15,12 @@ use cosmian_kms_base_hsm::{ use crate::{CRYPT2PAY_PKCS11_LIB, Crypt2payCapabilityProvider}; -const LIB_PATH: &str = CRYPT2PAY_PKCS11_LIB; const SLOT_ID: usize = 0x01; // Crypt2pay default slot -fn cfg() -> HResult> { +fn cfg() -> HResult { let user_password = get_hsm_password()?; Ok(shared::HsmTestConfig { - lib_path: LIB_PATH, + lib_path: shared::lib_path("CRYPT2PAY_PKCS11_LIB", CRYPT2PAY_PKCS11_LIB), slot_ids_and_passwords: HashMap::from([( get_hsm_slot_id().unwrap_or(SLOT_ID), Some(user_password), diff --git a/crate/hsm/proteccio/src/tests.rs b/crate/hsm/proteccio/src/tests.rs index 1fdb0bce3..da4134bdd 100644 --- a/crate/hsm/proteccio/src/tests.rs +++ b/crate/hsm/proteccio/src/tests.rs @@ -8,20 +8,22 @@ use std::collections::HashMap; use cosmian_kms_base_hsm::{ - HResult, RsaOaepDigest, test_helpers::get_hsm_password, tests_shared as shared, + HResult, RsaOaepDigest, + test_helpers::{get_hsm_password, get_hsm_slot_id}, + tests_shared as shared, }; use crate::{PROTECCIO_PKCS11_LIB, ProteccioCapabilityProvider}; -const LIB_PATH: &str = PROTECCIO_PKCS11_LIB; -const SLOT_ID: usize = 0x04; // Proteccio default slot +const SLOT_ID: usize = 0x01; // Proteccio default slot -fn cfg() -> HResult> { +fn cfg() -> HResult { let user_password = get_hsm_password()?; + let slot = get_hsm_slot_id().unwrap_or(SLOT_ID); Ok(shared::HsmTestConfig { - lib_path: LIB_PATH, - slot_ids_and_passwords: HashMap::from([(SLOT_ID, Some(user_password))]), - slot_id_for_tests: SLOT_ID, + lib_path: shared::lib_path("PROTECCIO_PKCS11_LIB", PROTECCIO_PKCS11_LIB), + slot_ids_and_passwords: HashMap::from([(slot, Some(user_password))]), + slot_id_for_tests: slot, rsa_oaep_digest: Some(RsaOaepDigest::SHA256), threads: 4, supports_rsa_wrap: true, diff --git a/crate/hsm/smartcardhsm/src/tests.rs b/crate/hsm/smartcardhsm/src/tests.rs index 1f19edb4b..b74029b62 100644 --- a/crate/hsm/smartcardhsm/src/tests.rs +++ b/crate/hsm/smartcardhsm/src/tests.rs @@ -16,13 +16,13 @@ use pkcs11_sys::{CK_C_INITIALIZE_ARGS, CK_RV, CK_VOID_PTR, CKF_OS_LOCKING_OK, CK use crate::{SMARTCARDHSM_PKCS11_LIB, SmartcardHsmCapabilityProvider}; -const LIB_PATH: &str = SMARTCARDHSM_PKCS11_LIB; +const SLOT_ID: usize = 0x01; // SmartcardHSM default slot -fn cfg() -> HResult> { +fn cfg() -> HResult { let user_password = get_hsm_password()?; - let slot = get_hsm_slot_id()?; + let slot = get_hsm_slot_id().unwrap_or(SLOT_ID); Ok(shared::HsmTestConfig { - lib_path: LIB_PATH, + lib_path: shared::lib_path("SMARTCARDHSM_PKCS11_LIB", SMARTCARDHSM_PKCS11_LIB), slot_ids_and_passwords: HashMap::from([(slot, Some(user_password))]), slot_id_for_tests: slot, rsa_oaep_digest: Some(RsaOaepDigest::SHA1), @@ -56,8 +56,8 @@ fn test_hsm_smartcardhsm_all() -> HResult<()> { #[test] #[ignore = "Requires Linux, SmartcardHSM PKCS#11 library, and HSM environment"] fn test_hsm_smartcardhsm_low_level_test() -> HResult<()> { - let path = LIB_PATH; - let library = unsafe { Library::new(path) }?; + let cfg = cfg()?; + let library = unsafe { Library::new(&cfg.lib_path) }?; let init = unsafe { library.get:: CK_RV>(b"C_Initialize") }?; let mut p_init_args = CK_C_INITIALIZE_ARGS { diff --git a/crate/hsm/softhsm2/src/tests.rs b/crate/hsm/softhsm2/src/tests.rs index 6d9401b47..7e99f1afe 100644 --- a/crate/hsm/softhsm2/src/tests.rs +++ b/crate/hsm/softhsm2/src/tests.rs @@ -15,13 +15,13 @@ use pkcs11_sys::{CK_C_INITIALIZE_ARGS, CK_RV, CK_VOID_PTR, CKF_OS_LOCKING_OK, CK use crate::{SOFTHSM2_PKCS11_LIB, SofthsmCapabilityProvider}; -const LIB_PATH: &str = SOFTHSM2_PKCS11_LIB; +const SLOT_ID: usize = 0x01; // SoftHSM2 fallback slot if HSM_SLOT_ID is not set -fn cfg() -> HResult> { +fn cfg() -> HResult { let user_password = get_hsm_password()?; - let slot = get_hsm_slot_id()?; + let slot = get_hsm_slot_id().unwrap_or(SLOT_ID); Ok(shared::HsmTestConfig { - lib_path: LIB_PATH, + lib_path: shared::lib_path("SOFTHSM2_PKCS11_LIB", SOFTHSM2_PKCS11_LIB), slot_ids_and_passwords: HashMap::from([(slot, Some(user_password))]), slot_id_for_tests: slot, rsa_oaep_digest: Some(RsaOaepDigest::SHA1), @@ -65,8 +65,8 @@ fn test_hsm_softhsm2_all() -> HResult<()> { #[test] #[ignore = "Requires Linux, SoftHSM2 library, and HSM environment"] fn test_hsm_softhsm2_low_level_test() -> HResult<()> { - let path = LIB_PATH; - let library = unsafe { Library::new(path) }?; + let cfg = cfg()?; + let library = unsafe { Library::new(&cfg.lib_path) }?; let init = unsafe { library.get:: CK_RV>(b"C_Initialize") }?; let mut p_init_args = CK_C_INITIALIZE_ARGS { diff --git a/crate/hsm/utimaco/src/tests.rs b/crate/hsm/utimaco/src/tests.rs index 2645d59de..19356ba91 100644 --- a/crate/hsm/utimaco/src/tests.rs +++ b/crate/hsm/utimaco/src/tests.rs @@ -7,20 +7,22 @@ use std::collections::HashMap; use cosmian_kms_base_hsm::{ - HResult, RsaOaepDigest, test_helpers::get_hsm_password, tests_shared as shared, + HResult, RsaOaepDigest, + test_helpers::{get_hsm_password, get_hsm_slot_id}, + tests_shared as shared, }; use crate::{UTIMACO_PKCS11_LIB, UtimacoCapabilityProvider}; -const LIB_PATH: &str = UTIMACO_PKCS11_LIB; -const SLOT_ID: usize = 0x00; +const SLOT_ID: usize = 0x00; // Utimaco default slot -fn cfg() -> HResult> { +fn cfg() -> HResult { let user_password = get_hsm_password()?; + let slot = get_hsm_slot_id().unwrap_or(SLOT_ID); Ok(shared::HsmTestConfig { - lib_path: LIB_PATH, - slot_ids_and_passwords: HashMap::from([(SLOT_ID, Some(user_password))]), - slot_id_for_tests: SLOT_ID, + lib_path: shared::lib_path("UTIMACO_PKCS11_LIB", UTIMACO_PKCS11_LIB), + slot_ids_and_passwords: HashMap::from([(slot, Some(user_password))]), + slot_id_for_tests: slot, rsa_oaep_digest: Some(RsaOaepDigest::SHA256), threads: 4, supports_rsa_wrap: true, diff --git a/crate/server/Cargo.toml b/crate/server/Cargo.toml index fadc903c3..f87a75023 100644 --- a/crate/server/Cargo.toml +++ b/crate/server/Cargo.toml @@ -108,6 +108,10 @@ pem = { workspace = true } [build-dependencies] actix-http = "3.10" time = { workspace = true, features = ["local-offset", "formatting"] } +sha2 = "0.10" + +[package.metadata.cargo-machete] +ignored = ["sha2"] # ------------------------------------------------------------------------------ # START DEBIAN PACKAGING @@ -148,9 +152,9 @@ assets = [ "400", ], [ - "/usr/local/openssl/lib64/ossl-modules/legacy.so", - "usr/local/openssl/lib64/ossl-modules/legacy.so", - "400", + "XXX/lib/ossl-modules/legacy.so", + "YYY/lib/ossl-modules/legacy.so", + "500", ], ] systemd-units = [ @@ -186,18 +190,18 @@ assets = [ "400", ], [ - "/usr/local/openssl/lib64/ossl-modules/fips.so", - "usr/local/openssl/lib64/ossl-modules/fips.so", - "400", + "XXX/lib/ossl-modules/fips.so", + "YYY/lib/ossl-modules/fips.so", + "500", ], [ - "/usr/local/openssl/ssl/openssl.cnf", - "usr/local/openssl/ssl/openssl.cnf", + "XXX/ssl/openssl.cnf", + "YYY/ssl/openssl.cnf", "400", ], [ - "/usr/local/openssl/ssl/fipsmodule.cnf", - "usr/local/openssl/ssl/fipsmodule.cnf", + "XXX/ssl/fipsmodule.cnf", + "YYY/ssl/fipsmodule.cnf", "400", ], ] @@ -210,10 +214,28 @@ assets = [ [package.metadata.generate-rpm] license = "BUSL-1.1" assets = [ + { source = "ui_non_fips/dist/*", dest = "/usr/local/cosmian/ui/dist/", mode = "500" }, + { source = "ui_non_fips/dist/assets/*", dest = "/usr/local/cosmian/ui/dist/assets/", mode = "500" }, + { source = "target/release/cosmian_kms", dest = "/usr/sbin/cosmian_kms", mode = "500" }, + { source = "XXX/lib/ossl-modules/legacy.so", dest = "XXX/lib/ossl-modules/legacy.so", mode = "500" }, + { source = "../../README.md", dest = "/usr/share/doc/cosmian/README", mode = "644", doc = true }, + { source = "../../pkg/kms.toml", dest = "/etc/cosmian/kms.toml", mode = "400" }, + { source = "../../pkg/cosmian_kms.service", dest = "/lib/systemd/system/cosmian_kms.service", mode = "644" }, +] +auto-req = "no" # do not try to discover .so dependencies +features = ["non-fips"] +require-sh = true + +[package.metadata.generate-rpm.variants.fips] +license = "BUSL-1.1" +assets = [ + # Use FIPS UI assets for the FIPS variant { source = "ui/dist/*", dest = "/usr/local/cosmian/ui/dist/", mode = "500" }, { source = "ui/dist/assets/*", dest = "/usr/local/cosmian/ui/dist/assets/", mode = "500" }, { source = "target/release/cosmian_kms", dest = "/usr/sbin/cosmian_kms", mode = "500" }, - { source = "/usr/local/openssl/lib64/ossl-modules/legacy.so", dest = "/usr/local/openssl/lib64/ossl-modules/legacy.so", mode = "500" }, + { source = "XXX/lib/ossl-modules/fips.so", dest = "XXX/lib/ossl-modules/fips.so", mode = "500" }, + { source = "XXX/ssl/openssl.cnf", dest = "XXX/ssl/openssl.cnf", mode = "400" }, + { source = "XXX/ssl/fipsmodule.cnf", dest = "XXX/ssl/fipsmodule.cnf", mode = "400" }, { source = "../../README.md", dest = "/usr/share/doc/cosmian/README", mode = "644", doc = true }, { source = "../../pkg/kms.toml", dest = "/etc/cosmian/kms.toml", mode = "400" }, { source = "../../pkg/cosmian_kms.service", dest = "/lib/systemd/system/cosmian_kms.service", mode = "644" }, diff --git a/crate/server/build.rs b/crate/server/build.rs index 7ce8dd91b..f22c828ef 100644 --- a/crate/server/build.rs +++ b/crate/server/build.rs @@ -1,34 +1,431 @@ -use std::{env, fs, path::Path}; +#![allow( + clippy::unwrap_used, + clippy::expect_used, + clippy::panic, + clippy::manual_assert, + clippy::uninlined_format_args, + clippy::verbose_file_reads, + let_underscore_drop +)] + +use std::{env, fs, path::Path, process::Command}; use time::{OffsetDateTime, ext::NumericalDuration, format_description::well_known::Rfc2822}; const DEMO_TIMEOUT: i64 = 90; // 3 months in days -#[expect(clippy::unwrap_used)] +// OpenSSL FIPS build parameters (must mirror nix/openssl-3_1_2.nix) +const OPENSSL_VERSION: &str = "3.1.2"; +const OPENSSL_TARBALL: &str = "openssl-3.1.2.tar.gz"; +const OPENSSL_URL: &str = "https://www.openssl.org/source/old/3.1/openssl-3.1.2.tar.gz"; // pinned historic URL +const OPENSSL_SHA256: &str = "a0ce69b8b97ea6a35b96875235aa453b966ba3cba8af2de23657d8b6767d6539"; // expected hash (same as nix derivation) + fn main() { - if cfg!(feature = "timeout") { - let now = OffsetDateTime::now_utc(); - let three_months_later = now + DEMO_TIMEOUT.days(); + // Always re-run if this script changes + println!("cargo:rerun-if-changed=build.rs"); + + maybe_emit_demo_timeout(); + maybe_build_fips_openssl(); +} + +#[expect(clippy::unwrap_used)] +fn maybe_emit_demo_timeout() { + if !cfg!(feature = "timeout") { + return; + } + let now = OffsetDateTime::now_utc(); + let three_months_later = now + DEMO_TIMEOUT.days(); + + let now_formatted = now.format(&Rfc2822).unwrap(); + let three_months_later_formatted = three_months_later.format(&Rfc2822).unwrap(); + + println!("cargo:warning=Timeout set for demo version"); + println!("cargo:warning=- date of compilation: \t{now_formatted}"); + println!("cargo:warning=- end of demo in {DEMO_TIMEOUT} days:\t{three_months_later_formatted}"); + let out_dir = env::var_os("OUT_DIR").unwrap(); + let dest_path = Path::new(&out_dir).join("demo_timeout.rs"); + if let Err(e) = fs::write( + dest_path, + format!( + "const DEMO_TIMEOUT: &[u8] = &{:?};\n ", + three_months_later_formatted.as_bytes() + ), + ) { + println!("cargo:warning=Failed to write demo timeout file: {e}"); + } +} + +// Decide whether we are in FIPS mode: default is FIPS unless `non-fips` is enabled. +fn is_fips_mode() -> bool { + env::var("CARGO_FEATURE_NON_FIPS").is_err() +} + +// Detect a Nix build environment — in that case the Nix derivation already provides a fully built OpenSSL (static, FIPS provider). +fn in_nix_env() -> bool { + env::var("NIX_BUILD_TOP").is_ok() || env::var("IN_NIX_SHELL").is_ok() +} + +fn maybe_build_fips_openssl() { + if !is_fips_mode() { + // Non-FIPS build: rely on system / existing OpenSSL (or vendored via other means) + println!("cargo:warning=non-fips feature enabled; skipping FIPS OpenSSL build"); + return; + } + + if in_nix_env() { + // Nix provides OPENSSL_DIR (or paths discovered by openssl-sys). Nothing to do. + println!("cargo:warning=Detected Nix environment; skipping local FIPS OpenSSL build"); + return; + } - let now_formatted = now.format(&Rfc2822).unwrap(); - let three_months_later_formatted = three_months_later.format(&Rfc2822).unwrap(); + // If user already exported OPENSSL_DIR, only respect it if it looks FIPS-capable + if let Ok(dir) = env::var("OPENSSL_DIR") { + let dirp = Path::new(&dir); + if dirp.join("include").exists() { + if fips_artifacts_present(dirp) { + println!( + "cargo:warning=Using existing OPENSSL_DIR={dir} (FIPS artifacts detected; not rebuilding)" + ); + return; + } + println!( + "cargo:warning=OPENSSL_DIR is set to {dir}, but FIPS provider artifacts were not found; falling back to non-FIPS" + ); + return; // safe fallback: do not attempt local build here + } + } + + println!( + "cargo:warning=Building OpenSSL {OPENSSL_VERSION} locally in FIPS mode (explicit/legacy FIPS requested, non-Nix environment)" + ); + + let out_dir_os = env::var_os("OUT_DIR").unwrap(); + let out_dir = Path::new(&out_dir_os); + // Temporary build root can live under the ephemeral OUT_DIR + let build_root = out_dir.join("openssl_build"); + + // Install prefix must be stable across builds so we can reuse the same artifacts. + // Use the workspace `target/` directory with a deterministic subpath based on + // version and target (os/arch). This avoids rebuilding OpenSSL for every OUT_DIR. + let arch = env::var("CARGO_CFG_TARGET_ARCH").unwrap_or_else(|_| "unknown-arch".into()); + let os = env::var("CARGO_CFG_TARGET_OS").unwrap_or_else(|_| "unknown-os".into()); + + // Resolve workspace root from CARGO_MANIFEST_DIR (crate/server -> crate -> repo root) + let Some(manifest_dir_os) = env::var_os("CARGO_MANIFEST_DIR") else { + println!("cargo:warning=Missing CARGO_MANIFEST_DIR; aborting OpenSSL build"); + return; + }; + let manifest_dir = Path::new(&manifest_dir_os); + let workspace_root = manifest_dir + .parent() + .and_then(|p| p.parent()) + .unwrap_or_else(|| Path::new(".")); + + // Allow respect of CARGO_TARGET_DIR if set; fallback to /target + #[allow(clippy::map_unwrap_or)] + let target_dir = env::var_os("CARGO_TARGET_DIR") + .map(|s| Path::new(&s).to_path_buf()) + .unwrap_or_else(|| workspace_root.join("target")); + + let install_prefix = + target_dir.join(format!("openssl-fips-{}-{}-{}", OPENSSL_VERSION, os, arch)); + + if install_prefix.join("lib/libcrypto.a").exists() { + println!( + "cargo:warning=Cached FIPS OpenSSL already present at {}", + install_prefix.display() + ); + emit_link_env(&install_prefix); + return; + } + + if let Err(e) = fs::create_dir_all(&build_root) { + println!("cargo:warning=Failed to create build_root: {e}"); + return; + } + if let Err(e) = fs::create_dir_all(&install_prefix) { + println!("cargo:warning=Failed to create install_prefix: {e}"); + return; + } + + // Obtain the tarball: prefer project-local resources/tarballs like the Nix derivation for offline parity + let local_tarball = workspace_root + .join("resources/tarballs") + .join(OPENSSL_TARBALL); - println!("cargo:warning=Timeout set for demo version"); - println!("cargo:warning=- date of compilation: \t{now_formatted}"); + let tarball_path = if local_tarball.exists() { + println!( + "cargo:warning=Using local cached tarball {}", + local_tarball.display() + ); + local_tarball + } else { + let dl_path = build_root.join(OPENSSL_TARBALL); + if !dl_path.exists() { + println!("cargo:warning=Downloading {OPENSSL_URL}"); + match Command::new("curl") + .args(["-fsSL", OPENSSL_URL, "-o", dl_path.to_str().unwrap()]) + .status() + { + Ok(status) if status.success() => {} + Ok(status) => { + println!( + "cargo:warning=curl download failed with status {status}; aborting FIPS build" + ); + return; + } + Err(e) => { + println!("cargo:warning=Failed to spawn curl: {e}; aborting FIPS build"); + return; + } + } + } + dl_path + }; + + verify_hash(&tarball_path, OPENSSL_SHA256); + + // Extract + let extract_dir = build_root.join("src"); + if !extract_dir.exists() { + if let Err(e) = fs::create_dir_all(&extract_dir) { + println!("cargo:warning=Failed to create extract_dir: {e}"); + return; + } + match Command::new("tar") + .current_dir(&extract_dir) + .args(["-xf", tarball_path.to_str().unwrap()]) + .status() + { + Ok(status) if status.success() => {} + Ok(status) => { + println!("cargo:warning=tar extraction failed (status {status})"); + return; + } + Err(e) => { + println!("cargo:warning=Failed to spawn tar: {e}"); + return; + } + } + } + + let src_root = extract_dir.join(format!("openssl-{OPENSSL_VERSION}")); + if !src_root.exists() { + println!( + "cargo:warning=Expected source root not found: {}", + src_root.display() + ); + return; + } + + // Determine OpenSSL target (mirrors nix expression logic) + let target = determine_openssl_target(); + + // Configure + if let Err(e) = run_cmd( + Command::new("perl").current_dir(&src_root).args([ + "./Configure", + "no-shared", + "enable-fips", + &format!("--prefix={}", install_prefix.display()), + &format!("--openssldir={}/ssl", install_prefix.display()), + "--libdir=lib", + &target, + ]), + "Configure (FIPS)", + ) { + println!("cargo:warning=Configure failed: {e}"); + return; + } + + // Build (parallel jobs = cores - 1) + let jobs = num_parallel_jobs(); + if let Err(e) = run_cmd( + Command::new("make").current_dir(&src_root).args(["depend"]), + "make depend", + ) { + println!("cargo:warning=make depend failed: {e}"); + return; + } + if let Err(e) = run_cmd( + Command::new("make") + .current_dir(&src_root) + .args(["-j", &jobs.to_string()]), + "make -j", + ) { + println!("cargo:warning=make build failed: {e}"); + return; + } + + // Install (including FIPS artifacts) + if let Err(e) = run_cmd( + Command::new("make").current_dir(&src_root).args([ + "install_sw", + "install_ssldirs", + "install_fips", + "-j", + &jobs.to_string(), + ]), + "make install", + ) { + println!("cargo:warning=make install failed: {e}"); + return; + } + + // Patch openssl.cnf to activate FIPS module exactly like nix derivation + let ssl_dir = install_prefix.join("ssl"); + let openssl_cnf = ssl_dir.join("openssl.cnf"); + if openssl_cnf.exists() { + let Ok(mut cnf) = fs::read_to_string(&openssl_cnf) else { + println!("cargo:warning=Failed to read openssl.cnf"); + return; + }; + if cnf.contains("# .include fipsmodule.cnf") { + cnf = cnf.replace( + "# .include fipsmodule.cnf", + &format!(".include {}/fipsmodule.cnf", ssl_dir.display()), + ); + } + if cnf.contains("# activate = 1") { + cnf = cnf.replace("# activate = 1", "activate = 1"); + } + if cnf.contains("# fips = fips_sect") { + cnf = cnf.replace( + "# fips = fips_sect", + "fips = fips_sect\nbase = base_sect\n\n[ base_sect ]\nactivate = 1\n", + ); + } + if let Err(e) = fs::write(&openssl_cnf, cnf) { + println!("cargo:warning=Failed to patch openssl.cnf: {e}"); + } + } else { + println!("cargo:warning=openssl.cnf not found; FIPS activation patch skipped"); + } + + // Normalize provider path (lib64 -> lib) if necessary + let lib64 = install_prefix.join("lib64/ossl-modules"); + let lib = install_prefix.join("lib/ossl-modules"); + if lib64.exists() && !lib.exists() { + if let Some(parent) = lib.parent() { + let _ = fs::create_dir_all(parent); + } + if let Ok(entries) = fs::read_dir(&lib64) { + for entry in entries.flatten() { + let dest = lib.join(entry.file_name()); + let _ = fs::rename(entry.path(), dest); + } + } + if let Some(parent64) = lib64.parent() { + let _ = fs::remove_dir_all(parent64.join("ossl-modules")); + let _ = fs::create_dir_all(parent64); + #[cfg(unix)] + { + use std::os::unix::fs::symlink; + let _ = symlink("../lib/ossl-modules", parent64.join("ossl-modules")); + } + } + } + + // Only enable link env if the resulting tree contains FIPS provider artifacts + if fips_artifacts_present(&install_prefix) { + emit_link_env(&install_prefix); + } else { + println!( + "cargo:warning=Local OpenSSL build completed but FIPS artifacts are missing; falling back to non-FIPS" + ); + } +} + +fn emit_link_env(install_prefix: &Path) { + println!("cargo:rustc-env=OPENSSL_DIR={}", install_prefix.display()); + println!( + "cargo:rustc-link-search=native={}/lib", + install_prefix.display() + ); + // Static linking (no shared libcrypto/libssl) + println!("cargo:rustc-link-lib=static=crypto"); + println!("cargo:rustc-link-lib=static=ssl"); +} + +fn fips_artifacts_present(prefix: &Path) -> bool { + let mod_ext = if cfg!(target_os = "macos") { + "dylib" + } else { + "so" + }; + let provider = prefix.join(format!("lib/ossl-modules/fips.{mod_ext}")); + let cnf = prefix.join("ssl/fipsmodule.cnf"); + provider.exists() && cnf.exists() +} + +fn run_cmd(cmd: &mut Command, context: &str) -> Result<(), String> { + println!("cargo:warning=Running {context} -> {:?}", cmd); + match cmd.status() { + Ok(status) if status.success() => Ok(()), + Ok(status) => Err(format!("{context} failed with status {status}")), + Err(e) => Err(format!("Failed to spawn {context}: {e}")), + } +} + +fn determine_openssl_target() -> String { + let arch = env::var("CARGO_CFG_TARGET_ARCH").unwrap_or_default(); + let os = env::var("CARGO_CFG_TARGET_OS").unwrap_or_default(); + if os == "macos" { + if arch == "aarch64" { + "darwin64-arm64-cc".into() + } else { + "darwin64-x86_64-cc".into() + } + } else if arch == "aarch64" { + "linux-aarch64".into() + } else { + "linux-x86_64".into() + } +} + +fn num_parallel_jobs() -> usize { + // Try common environment hints / commands, fall back to 2 + if let Ok(v) = env::var("NUM_JOBS") { + if let Ok(n) = v.parse::() { + return n.max(1); + } + } + #[cfg(target_os = "linux")] + { + if let Ok(output) = Command::new("nproc").output() { + if let Ok(s) = std::str::from_utf8(&output.stdout) { + if let Ok(n) = s.trim().parse::() { + return n.max(1); + } + } + } + } + #[cfg(target_os = "macos")] + { + if let Ok(output) = Command::new("sysctl").args(["-n", "hw.ncpu"]).output() { + if let Ok(s) = std::str::from_utf8(&output.stdout) { + if let Ok(n) = s.trim().parse::() { + return n.max(1); + } + } + } + } + 2 +} + +fn verify_hash(path: &Path, expected: &str) { + use sha2::{Digest, Sha256}; + let Ok(buf) = fs::read(path) else { + println!( + "cargo:warning=Failed to read {} for hash verification", + path.display() + ); + return; + }; + let actual = format!("{:x}", Sha256::digest(&buf)); + if actual != expected { println!( - "cargo:warning=- end of demo in {DEMO_TIMEOUT} days:\t{three_months_later_formatted}" + "cargo:warning=OpenSSL tarball hash mismatch! expected {expected} got {actual}; aborting FIPS build" ); - let out_dir = env::var_os("OUT_DIR").unwrap(); - let dest_path = Path::new(&out_dir).join("demo_timeout.rs"); - fs::write( - dest_path, - format!( - "const DEMO_TIMEOUT: &[u8] = &{:?}; - ", - three_months_later_formatted.as_bytes() - ), - ) - .unwrap(); - println!("cargo:rerun-if-changed=build.rs"); } } diff --git a/crate/server/src/core/kms/mod.rs b/crate/server/src/core/kms/mod.rs index f8659b412..fa1b06f3c 100644 --- a/crate/server/src/core/kms/mod.rs +++ b/crate/server/src/core/kms/mod.rs @@ -36,6 +36,26 @@ static GLOBAL_HSM: OnceCell> = OnceCell::const_new(); use crate::{config::ServerParams, error::KmsError, kms_bail, result::KResult}; +/// Macro to instantiate an HSM with support for environment variable override +/// Allows overriding PKCS#11 lib path via env for testing (falls back to default constant) +#[cfg(all(target_os = "linux", target_arch = "x86_64"))] +#[allow(unused_macros)] +macro_rules! instantiate_hsm_with_env { + ($hsm_type:ty, $env_var:expr, $default_lib:expr, $hsm_name:expr, $slot_passwords:expr) => {{ + let lib_path = std::env::var($env_var).unwrap_or_else(|_| $default_lib.to_owned()); + let hsm: Arc = Arc::new( + <$hsm_type>::instantiate(&lib_path, $slot_passwords).map_err(|e| { + KmsError::InvalidRequest(format!( + "Failed to instantiate the {} HSM (lib: {lib_path}): {e}", + $hsm_name + )) + })?, + ); + GLOBAL_HSM.set(hsm.clone()).ok(); + Some(hsm) + }}; +} + /// A Key Management System that partially implements KMIP 2.1 /// /// `https://www.oasis-open.org/committees/tc_home.php?wg_abbrev=kmip` @@ -126,97 +146,48 @@ impl KMS { KmsError::InvalidRequest("The HSM model is not specified".to_owned()) })?; match hsm_model.as_str() { - "crypt2pay" => { - let crypt2pay: Arc = Arc::new( - Crypt2pay::instantiate( - CRYPT2PAY_PKCS11_LIB, - server_params.slot_passwords.clone(), - ) - .map_err(|e| { - KmsError::InvalidRequest(format!( - "Failed to instantiate the Crypt2pay HSM: {e}" - )) - })?, - ); - GLOBAL_HSM.set(crypt2pay.clone()).ok(); - Some(crypt2pay) - } - "proteccio" => { - let proteccio: Arc = Arc::new( - Proteccio::instantiate( - PROTECCIO_PKCS11_LIB, - server_params.slot_passwords.clone(), - ) - .map_err(|e| { - KmsError::InvalidRequest(format!( - "Failed to instantiate the Proteccio HSM: {e}" - )) - })?, - ); - GLOBAL_HSM.set(proteccio.clone()).ok(); - Some(proteccio) - } - "utimaco" => { - let utimaco: Arc = Arc::new( - Utimaco::instantiate( - UTIMACO_PKCS11_LIB, - server_params.slot_passwords.clone(), - ) - .map_err(|e| { - KmsError::InvalidRequest(format!( - "Failed to instantiate the Utimaco HSM: {e}" - )) - })?, - ); - GLOBAL_HSM.set(utimaco.clone()).ok(); - Some(utimaco) - } - "softhsm2" => { - let softhsm2: Arc = Arc::new( - Softhsm2::instantiate( - SOFTHSM2_PKCS11_LIB, - server_params.slot_passwords.clone(), - ) - .map_err(|e| { - KmsError::InvalidRequest(format!( - "Failed to instantiate the Softhsm2: {e}" - )) - })?, - ); - GLOBAL_HSM.set(softhsm2.clone()).ok(); - Some(softhsm2) - } - "smartcardhsm" => { - let smartcardhsm: Arc = Arc::new( - Smartcardhsm::instantiate( - SMARTCARDHSM_PKCS11_LIB, - server_params.slot_passwords.clone(), - ) - .map_err(|e| { - KmsError::InvalidRequest(format!( - "Failed to instantiate the Smartcardhsm: {e}" - )) - })?, - ); - GLOBAL_HSM.set(smartcardhsm.clone()).ok(); - Some(smartcardhsm) - } - "other" => { - // we expect the other HSM to be compatible with Softhsm2 - let other_hsm: Arc = Arc::new( - Softhsm2::instantiate( - OTHER_HSM_PKCS11_LIB, - server_params.slot_passwords.clone(), - ) - .map_err(|e| { - KmsError::InvalidRequest(format!( - "Failed to instantiate the HSM lib at {OTHER_HSM_PKCS11_LIB}: {e}" - )) - })?, - ); - GLOBAL_HSM.set(other_hsm.clone()).ok(); - Some(other_hsm) - } + "crypt2pay" => instantiate_hsm_with_env!( + Crypt2pay, + "CRYPT2PAY_PKCS11_LIB", + CRYPT2PAY_PKCS11_LIB, + "Crypt2pay", + server_params.slot_passwords.clone() + ), + "proteccio" => instantiate_hsm_with_env!( + Proteccio, + "PROTECCIO_PKCS11_LIB", + PROTECCIO_PKCS11_LIB, + "Proteccio", + server_params.slot_passwords.clone() + ), + "utimaco" => instantiate_hsm_with_env!( + Utimaco, + "UTIMACO_PKCS11_LIB", + UTIMACO_PKCS11_LIB, + "Utimaco", + server_params.slot_passwords.clone() + ), + "softhsm2" => instantiate_hsm_with_env!( + Softhsm2, + "SOFTHSM2_PKCS11_LIB", + SOFTHSM2_PKCS11_LIB, + "Softhsm2", + server_params.slot_passwords.clone() + ), + "smartcardhsm" => instantiate_hsm_with_env!( + Smartcardhsm, + "SMARTCARDHSM_PKCS11_LIB", + SMARTCARDHSM_PKCS11_LIB, + "Smartcardhsm", + server_params.slot_passwords.clone() + ), + "other" => instantiate_hsm_with_env!( + Softhsm2, + "OTHER_HSM_PKCS11_LIB", + OTHER_HSM_PKCS11_LIB, + "Other", + server_params.slot_passwords.clone() + ), _ => kms_bail!( "The only supported HSM models are proteccio, crypt2pay, smartcardhsm, softhsm2, utimaco and other" ), diff --git a/crate/server/src/main.rs b/crate/server/src/main.rs index 1b91bda1b..d84b4693c 100644 --- a/crate/server/src/main.rs +++ b/crate/server/src/main.rs @@ -9,7 +9,7 @@ use cosmian_kms_server::{ use cosmian_kms_server_database::reexport::cosmian_kmip::KmipResultHelper; #[cfg(feature = "timeout")] use cosmian_logger::warn; -use cosmian_logger::{TelemetryConfig, TracingConfig, debug, info, tracing_init}; +use cosmian_logger::{TelemetryConfig, TracingConfig, info, tracing_init}; use dotenvy::dotenv; use openssl::provider::Provider; use tracing::span; @@ -92,8 +92,6 @@ async fn run() -> KResult<()> { let span = span!(tracing::Level::TRACE, "kms"); let _guard = span.enter(); - // print openssl version - #[cfg(not(feature = "non-fips"))] info!( "OpenSSL FIPS mode version: {}, in {}, number: {:x}", @@ -130,7 +128,7 @@ async fn run() -> KResult<()> { } // Instantiate a config object using the env variables and the args of the binary - debug!("Command line / file config: {clap_config:#?}"); + info!("Command line / file config: {clap_config:#?}"); // Parse the Server Config from the command line arguments let server_params = Arc::new(ServerParams::try_from(clap_config)?); diff --git a/crate/server/ui/dist/assets/index-CwpsUgci.js b/crate/server/ui/dist/assets/index-CwpsUgci.js new file mode 100644 index 000000000..394a0c0c3 --- /dev/null +++ b/crate/server/ui/dist/assets/index-CwpsUgci.js @@ -0,0 +1,570 @@ +function OR(e,t){for(var n=0;nr[a]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))r(a);new MutationObserver(a=>{for(const o of a)if(o.type==="childList")for(const c of o.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&r(c)}).observe(document,{childList:!0,subtree:!0});function n(a){const o={};return a.integrity&&(o.integrity=a.integrity),a.referrerPolicy&&(o.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?o.credentials="include":a.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(a){if(a.ep)return;a.ep=!0;const o=n(a);fetch(a.href,o)}})();function Wi(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ub={exports:{}},pd={};/** + * @license React + * react-jsx-runtime.production.js + * + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var t_;function C6(){if(t_)return pd;t_=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(r,a,o){var c=null;if(o!==void 0&&(c=""+o),a.key!==void 0&&(c=""+a.key),"key"in a){o={};for(var u in a)u!=="key"&&(o[u]=a[u])}else o=a;return a=o.ref,{$$typeof:e,type:r,key:c,ref:a!==void 0?a:null,props:o}}return pd.Fragment=t,pd.jsx=n,pd.jsxs=n,pd}var n_;function w6(){return n_||(n_=1,Ub.exports=C6()),Ub.exports}var S=w6(),Wb={exports:{}},wn={};/** + * @license React + * react.production.js + * + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var r_;function $6(){if(r_)return wn;r_=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),o=Symbol.for("react.consumer"),c=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),d=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),v=Symbol.for("react.activity"),g=Symbol.iterator;function b(B){return B===null||typeof B!="object"?null:(B=g&&B[g]||B["@@iterator"],typeof B=="function"?B:null)}var x={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},C=Object.assign,y={};function w(B,U,K){this.props=B,this.context=U,this.refs=y,this.updater=K||x}w.prototype.isReactComponent={},w.prototype.setState=function(B,U){if(typeof B!="object"&&typeof B!="function"&&B!=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,B,U,"setState")},w.prototype.forceUpdate=function(B){this.updater.enqueueForceUpdate(this,B,"forceUpdate")};function $(){}$.prototype=w.prototype;function E(B,U,K){this.props=B,this.context=U,this.refs=y,this.updater=K||x}var O=E.prototype=new $;O.constructor=E,C(O,w.prototype),O.isPureReactComponent=!0;var I=Array.isArray;function j(){}var M={H:null,A:null,T:null,S:null},D=Object.prototype.hasOwnProperty;function N(B,U,K){var Y=K.ref;return{$$typeof:e,type:B,key:U,ref:Y!==void 0?Y:null,props:K}}function P(B,U){return N(B.type,U,B.props)}function A(B){return typeof B=="object"&&B!==null&&B.$$typeof===e}function F(B){var U={"=":"=0",":":"=2"};return"$"+B.replace(/[=:]/g,function(K){return U[K]})}var H=/\/+/g;function k(B,U){return typeof B=="object"&&B!==null&&B.key!=null?F(""+B.key):U.toString(36)}function L(B){switch(B.status){case"fulfilled":return B.value;case"rejected":throw B.reason;default:switch(typeof B.status=="string"?B.then(j,j):(B.status="pending",B.then(function(U){B.status==="pending"&&(B.status="fulfilled",B.value=U)},function(U){B.status==="pending"&&(B.status="rejected",B.reason=U)})),B.status){case"fulfilled":return B.value;case"rejected":throw B.reason}}throw B}function T(B,U,K,Y,Q){var Z=typeof B;(Z==="undefined"||Z==="boolean")&&(B=null);var ae=!1;if(B===null)ae=!0;else switch(Z){case"bigint":case"string":case"number":ae=!0;break;case"object":switch(B.$$typeof){case e:case t:ae=!0;break;case h:return ae=B._init,T(ae(B._payload),U,K,Y,Q)}}if(ae)return Q=Q(B),ae=Y===""?"."+k(B,0):Y,I(Q)?(K="",ae!=null&&(K=ae.replace(H,"$&/")+"/"),T(Q,U,K,"",function(ve){return ve})):Q!=null&&(A(Q)&&(Q=P(Q,K+(Q.key==null||B&&B.key===Q.key?"":(""+Q.key).replace(H,"$&/")+"/")+ae)),U.push(Q)),1;ae=0;var re=Y===""?".":Y+":";if(I(B))for(var ie=0;ie>>1,G=T[q];if(0>>1;qa(K,V))Ya(Q,K)?(T[q]=Q,T[Y]=V,q=Y):(T[q]=K,T[U]=V,q=U);else if(Ya(Q,V))T[q]=Q,T[Y]=V,q=Y;else break e}}return z}function a(T,z){var V=T.sortIndex-z.sortIndex;return V!==0?V:T.id-z.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var c=Date,u=c.now();e.unstable_now=function(){return c.now()-u}}var f=[],d=[],h=1,v=null,g=3,b=!1,x=!1,C=!1,y=!1,w=typeof setTimeout=="function"?setTimeout:null,$=typeof clearTimeout=="function"?clearTimeout:null,E=typeof setImmediate<"u"?setImmediate:null;function O(T){for(var z=n(d);z!==null;){if(z.callback===null)r(d);else if(z.startTime<=T)r(d),z.sortIndex=z.expirationTime,t(f,z);else break;z=n(d)}}function I(T){if(C=!1,O(T),!x)if(n(f)!==null)x=!0,j||(j=!0,F());else{var z=n(d);z!==null&&L(I,z.startTime-T)}}var j=!1,M=-1,D=5,N=-1;function P(){return y?!0:!(e.unstable_now()-NT&&P());){var q=v.callback;if(typeof q=="function"){v.callback=null,g=v.priorityLevel;var G=q(v.expirationTime<=T);if(T=e.unstable_now(),typeof G=="function"){v.callback=G,O(T),z=!0;break t}v===n(f)&&r(f),O(T)}else r(f);v=n(f)}if(v!==null)z=!0;else{var B=n(d);B!==null&&L(I,B.startTime-T),z=!1}}break e}finally{v=null,g=V,b=!1}z=void 0}}finally{z?F():j=!1}}}var F;if(typeof E=="function")F=function(){E(A)};else if(typeof MessageChannel<"u"){var H=new MessageChannel,k=H.port2;H.port1.onmessage=A,F=function(){k.postMessage(null)}}else F=function(){w(A,0)};function L(T,z){M=w(function(){T(e.unstable_now())},z)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(T){T.callback=null},e.unstable_forceFrameRate=function(T){0>T||125q?(T.sortIndex=V,t(d,T),n(f)===null&&T===n(d)&&(C?($(M),M=-1):C=!0,L(I,V-q))):(T.sortIndex=G,t(f,T),x||b||(x=!0,j||(j=!0,F()))),T},e.unstable_shouldYield=P,e.unstable_wrapCallback=function(T){var z=g;return function(){var V=g;g=z;try{return T.apply(this,arguments)}finally{g=V}}}})(Gb)),Gb}var o_;function _6(){return o_||(o_=1,Yb.exports=E6()),Yb.exports}var Xb={exports:{}},_a={};/** + * @license React + * react-dom.production.js + * + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var l_;function O6(){if(l_)return _a;l_=1;var e=fS();function t(f){var d="https://react.dev/errors/"+f;if(1"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),Xb.exports=O6(),Xb.exports}/** + * @license React + * react-dom-client.production.js + * + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var c_;function I6(){if(c_)return bd;c_=1;var e=_6(),t=fS(),n=IR();function r(i){var l="https://react.dev/errors/"+i;if(1G||(i.current=q[G],q[G]=null,G--)}function K(i,l){G++,q[G]=i.current,i.current=l}var Y=B(null),Q=B(null),Z=B(null),ae=B(null);function re(i,l){switch(K(Z,l),K(Q,i),K(Y,null),l.nodeType){case 9:case 11:i=(i=l.documentElement)&&(i=i.namespaceURI)?$E(i):0;break;default:if(i=l.tagName,l=l.namespaceURI)l=$E(l),i=EE(l,i);else switch(i){case"svg":i=1;break;case"math":i=2;break;default:i=0}}U(Y),K(Y,i)}function ie(){U(Y),U(Q),U(Z)}function ve(i){i.memoizedState!==null&&K(ae,i);var l=Y.current,m=EE(l,i.type);l!==m&&(K(Q,i),K(Y,m))}function ue(i){Q.current===i&&(U(Y),U(Q)),ae.current===i&&(U(ae),md._currentValue=V)}var oe,he;function fe(i){if(oe===void 0)try{throw Error()}catch(m){var l=m.stack.trim().match(/\n( *(at )?)/);oe=l&&l[1]||"",he=-1)":-1_||xe[p]!==ze[_]){var Xe=` +`+xe[p].replace(" at new "," at ");return i.displayName&&Xe.includes("")&&(Xe=Xe.replace("",i.displayName)),Xe}while(1<=p&&0<=_);break}}}finally{me=!1,Error.prepareStackTrace=m}return(m=i?i.displayName||i.name:"")?fe(m):""}function pe(i,l){switch(i.tag){case 26:case 27:case 5:return fe(i.type);case 16:return fe("Lazy");case 13:return i.child!==l&&l!==null?fe("Suspense Fallback"):fe("Suspense");case 19:return fe("SuspenseList");case 0:case 15:return le(i.type,!1);case 11:return le(i.type.render,!1);case 1:return le(i.type,!0);case 31:return fe("Activity");default:return""}}function Ce(i){try{var l="",m=null;do l+=pe(i,m),m=i,i=i.return;while(i);return l}catch(p){return` +Error generating stack: `+p.message+` +`+p.stack}}var De=Object.prototype.hasOwnProperty,je=e.unstable_scheduleCallback,ge=e.unstable_cancelCallback,Ie=e.unstable_shouldYield,Ee=e.unstable_requestPaint,we=e.unstable_now,Fe=e.unstable_getCurrentPriorityLevel,He=e.unstable_ImmediatePriority,it=e.unstable_UserBlockingPriority,Ze=e.unstable_NormalPriority,Ye=e.unstable_LowPriority,et=e.unstable_IdlePriority,Pe=e.log,Oe=e.unstable_setDisableYieldValue,Be=null,$e=null;function Te(i){if(typeof Pe=="function"&&Oe(i),$e&&typeof $e.setStrictMode=="function")try{$e.setStrictMode(Be,i)}catch{}}var be=Math.clz32?Math.clz32:Ge,ye=Math.log,Re=Math.LN2;function Ge(i){return i>>>=0,i===0?32:31-(ye(i)/Re|0)|0}var ft=256,$t=262144,Qe=4194304;function at(i){var l=i&42;if(l!==0)return l;switch(i&-i){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 i&261888;case 262144:case 524288:case 1048576:case 2097152:return i&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return i&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return i}}function mt(i,l,m){var p=i.pendingLanes;if(p===0)return 0;var _=0,R=i.suspendedLanes,W=i.pingedLanes;i=i.warmLanes;var ne=p&134217727;return ne!==0?(p=ne&~R,p!==0?_=at(p):(W&=ne,W!==0?_=at(W):m||(m=ne&~i,m!==0&&(_=at(m))))):(ne=p&~R,ne!==0?_=at(ne):W!==0?_=at(W):m||(m=p&~i,m!==0&&(_=at(m)))),_===0?0:l!==0&&l!==_&&(l&R)===0&&(R=_&-_,m=l&-l,R>=m||R===32&&(m&4194048)!==0)?l:_}function st(i,l){return(i.pendingLanes&~(i.suspendedLanes&~i.pingedLanes)&l)===0}function bt(i,l){switch(i){case 1:case 2:case 4:case 8:case 64:return l+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 l+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 qt(){var i=Qe;return Qe<<=1,(Qe&62914560)===0&&(Qe=4194304),i}function Gt(i){for(var l=[],m=0;31>m;m++)l.push(i);return l}function vt(i,l){i.pendingLanes|=l,l!==268435456&&(i.suspendedLanes=0,i.pingedLanes=0,i.warmLanes=0)}function It(i,l,m,p,_,R){var W=i.pendingLanes;i.pendingLanes=m,i.suspendedLanes=0,i.pingedLanes=0,i.warmLanes=0,i.expiredLanes&=m,i.entangledLanes&=m,i.errorRecoveryDisabledLanes&=m,i.shellSuspendCounter=0;var ne=i.entanglements,xe=i.expirationTimes,ze=i.hiddenUpdates;for(m=W&~m;0"u")return null;try{return i.activeElement||i.body}catch{return i.body}}var zt=/[\n"\\]/g;function un(i){return i.replace(zt,function(l){return"\\"+l.charCodeAt(0).toString(16)+" "})}function Nt(i,l,m,p,_,R,W,ne){i.name="",W!=null&&typeof W!="function"&&typeof W!="symbol"&&typeof W!="boolean"?i.type=W:i.removeAttribute("type"),l!=null?W==="number"?(l===0&&i.value===""||i.value!=l)&&(i.value=""+Gn(l)):i.value!==""+Gn(l)&&(i.value=""+Gn(l)):W!=="submit"&&W!=="reset"||i.removeAttribute("value"),l!=null?yn(i,W,Gn(l)):m!=null?yn(i,W,Gn(m)):p!=null&&i.removeAttribute("value"),_==null&&R!=null&&(i.defaultChecked=!!R),_!=null&&(i.checked=_&&typeof _!="function"&&typeof _!="symbol"),ne!=null&&typeof ne!="function"&&typeof ne!="symbol"&&typeof ne!="boolean"?i.name=""+Gn(ne):i.removeAttribute("name")}function Pt(i,l,m,p,_,R,W,ne){if(R!=null&&typeof R!="function"&&typeof R!="symbol"&&typeof R!="boolean"&&(i.type=R),l!=null||m!=null){if(!(R!=="submit"&&R!=="reset"||l!=null)){Nr(i);return}m=m!=null?""+Gn(m):"",l=l!=null?""+Gn(l):m,ne||l===i.value||(i.value=l),i.defaultValue=l}p=p??_,p=typeof p!="function"&&typeof p!="symbol"&&!!p,i.checked=ne?i.checked:!!p,i.defaultChecked=!!p,W!=null&&typeof W!="function"&&typeof W!="symbol"&&typeof W!="boolean"&&(i.name=W),Nr(i)}function yn(i,l,m){l==="number"&&At(i.ownerDocument)===i||i.defaultValue===""+m||(i.defaultValue=""+m)}function Ln(i,l,m,p){if(i=i.options,l){l={};for(var _=0;_"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),fr=!1;if(an)try{var Er={};Object.defineProperty(Er,"passive",{get:function(){fr=!0}}),window.addEventListener("test",Er,Er),window.removeEventListener("test",Er,Er)}catch{fr=!1}var ar=null,tl=null,nl=null;function Mu(){if(nl)return nl;var i,l=tl,m=l.length,p,_="value"in ar?ar.value:ar.textContent,R=_.length;for(i=0;i=Du),M1=" ",j1=!1;function T1(i,l){switch(i){case"keyup":return K4.indexOf(l.keyCode)!==-1;case"keydown":return l.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function D1(i){return i=i.detail,typeof i=="object"&&"data"in i?i.data:null}var Ws=!1;function W4(i,l){switch(i){case"compositionend":return D1(l);case"keypress":return l.which!==32?null:(j1=!0,M1);case"textInput":return i=l.data,i===M1&&j1?null:i;default:return null}}function q4(i,l){if(Ws)return i==="compositionend"||!Qg&&T1(i,l)?(i=Mu(),nl=tl=ar=null,Ws=!1,i):null;switch(i){case"paste":return null;case"keypress":if(!(l.ctrlKey||l.altKey||l.metaKey)||l.ctrlKey&&l.altKey){if(l.char&&1=l)return{node:m,offset:l-i};i=p}e:{for(;m;){if(m.nextSibling){m=m.nextSibling;break e}m=m.parentNode}m=void 0}m=F1(m)}}function K1(i,l){return i&&l?i===l?!0:i&&i.nodeType===3?!1:l&&l.nodeType===3?K1(i,l.parentNode):"contains"in i?i.contains(l):i.compareDocumentPosition?!!(i.compareDocumentPosition(l)&16):!1:!1}function U1(i){i=i!=null&&i.ownerDocument!=null&&i.ownerDocument.defaultView!=null?i.ownerDocument.defaultView:window;for(var l=At(i.document);l instanceof i.HTMLIFrameElement;){try{var m=typeof l.contentWindow.location.href=="string"}catch{m=!1}if(m)i=l.contentWindow;else break;l=At(i.document)}return l}function ep(i){var l=i&&i.nodeName&&i.nodeName.toLowerCase();return l&&(l==="input"&&(i.type==="text"||i.type==="search"||i.type==="tel"||i.type==="url"||i.type==="password")||l==="textarea"||i.contentEditable==="true")}var t3=an&&"documentMode"in document&&11>=document.documentMode,qs=null,tp=null,zu=null,np=!1;function W1(i,l,m){var p=m.window===m?m.document:m.nodeType===9?m:m.ownerDocument;np||qs==null||qs!==At(p)||(p=qs,"selectionStart"in p&&ep(p)?p={start:p.selectionStart,end:p.selectionEnd}:(p=(p.ownerDocument&&p.ownerDocument.defaultView||window).getSelection(),p={anchorNode:p.anchorNode,anchorOffset:p.anchorOffset,focusNode:p.focusNode,focusOffset:p.focusOffset}),zu&&Au(zu,p)||(zu=p,p=Um(tp,"onSelect"),0>=W,_-=W,Ji=1<<32-be(l)+_|m<<_|p,eo=R+i}else Ji=1<In?(Bn=en,en=null):Bn=en.sibling;var Zn=Le(Ne,en,Ae[In],tt);if(Zn===null){en===null&&(en=Bn);break}i&&en&&Zn.alternate===null&&l(Ne,en),_e=R(Zn,_e,In),Qn===null?ln=Zn:Qn.sibling=Zn,Qn=Zn,en=Bn}if(In===Ae.length)return m(Ne,en),Un&&xo(Ne,In),ln;if(en===null){for(;InIn?(Bn=en,en=null):Bn=en.sibling;var $l=Le(Ne,en,Zn.value,tt);if($l===null){en===null&&(en=Bn);break}i&&en&&$l.alternate===null&&l(Ne,en),_e=R($l,_e,In),Qn===null?ln=$l:Qn.sibling=$l,Qn=$l,en=Bn}if(Zn.done)return m(Ne,en),Un&&xo(Ne,In),ln;if(en===null){for(;!Zn.done;In++,Zn=Ae.next())Zn=rt(Ne,Zn.value,tt),Zn!==null&&(_e=R(Zn,_e,In),Qn===null?ln=Zn:Qn.sibling=Zn,Qn=Zn);return Un&&xo(Ne,In),ln}for(en=p(en);!Zn.done;In++,Zn=Ae.next())Zn=Ve(en,Ne,In,Zn.value,tt),Zn!==null&&(i&&Zn.alternate!==null&&en.delete(Zn.key===null?In:Zn.key),_e=R(Zn,_e,In),Qn===null?ln=Zn:Qn.sibling=Zn,Qn=Zn);return i&&en.forEach(function(S6){return l(Ne,S6)}),Un&&xo(Ne,In),ln}function vr(Ne,_e,Ae,tt){if(typeof Ae=="object"&&Ae!==null&&Ae.type===C&&Ae.key===null&&(Ae=Ae.props.children),typeof Ae=="object"&&Ae!==null){switch(Ae.$$typeof){case b:e:{for(var ln=Ae.key;_e!==null;){if(_e.key===ln){if(ln=Ae.type,ln===C){if(_e.tag===7){m(Ne,_e.sibling),tt=_(_e,Ae.props.children),tt.return=Ne,Ne=tt;break e}}else if(_e.elementType===ln||typeof ln=="object"&&ln!==null&&ln.$$typeof===D&&is(ln)===_e.type){m(Ne,_e.sibling),tt=_(_e,Ae.props),Ku(tt,Ae),tt.return=Ne,Ne=tt;break e}m(Ne,_e);break}else l(Ne,_e);_e=_e.sibling}Ae.type===C?(tt=es(Ae.props.children,Ne.mode,tt,Ae.key),tt.return=Ne,Ne=tt):(tt=sm(Ae.type,Ae.key,Ae.props,null,Ne.mode,tt),Ku(tt,Ae),tt.return=Ne,Ne=tt)}return W(Ne);case x:e:{for(ln=Ae.key;_e!==null;){if(_e.key===ln)if(_e.tag===4&&_e.stateNode.containerInfo===Ae.containerInfo&&_e.stateNode.implementation===Ae.implementation){m(Ne,_e.sibling),tt=_(_e,Ae.children||[]),tt.return=Ne,Ne=tt;break e}else{m(Ne,_e);break}else l(Ne,_e);_e=_e.sibling}tt=cp(Ae,Ne.mode,tt),tt.return=Ne,Ne=tt}return W(Ne);case D:return Ae=is(Ae),vr(Ne,_e,Ae,tt)}if(L(Ae))return Xt(Ne,_e,Ae,tt);if(F(Ae)){if(ln=F(Ae),typeof ln!="function")throw Error(r(150));return Ae=ln.call(Ae),mn(Ne,_e,Ae,tt)}if(typeof Ae.then=="function")return vr(Ne,_e,vm(Ae),tt);if(Ae.$$typeof===E)return vr(Ne,_e,dm(Ne,Ae),tt);gm(Ne,Ae)}return typeof Ae=="string"&&Ae!==""||typeof Ae=="number"||typeof Ae=="bigint"?(Ae=""+Ae,_e!==null&&_e.tag===6?(m(Ne,_e.sibling),tt=_(_e,Ae),tt.return=Ne,Ne=tt):(m(Ne,_e),tt=sp(Ae,Ne.mode,tt),tt.return=Ne,Ne=tt),W(Ne)):m(Ne,_e)}return function(Ne,_e,Ae,tt){try{Vu=0;var ln=vr(Ne,_e,Ae,tt);return ac=null,ln}catch(en){if(en===rc||en===mm)throw en;var Qn=Ga(29,en,null,Ne.mode);return Qn.lanes=tt,Qn.return=Ne,Qn}finally{}}}var ls=vw(!0),gw=vw(!1),ll=!1;function Sp(i){i.updateQueue={baseState:i.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Cp(i,l){i=i.updateQueue,l.updateQueue===i&&(l.updateQueue={baseState:i.baseState,firstBaseUpdate:i.firstBaseUpdate,lastBaseUpdate:i.lastBaseUpdate,shared:i.shared,callbacks:null})}function sl(i){return{lane:i,tag:0,payload:null,callback:null,next:null}}function cl(i,l,m){var p=i.updateQueue;if(p===null)return null;if(p=p.shared,(ir&2)!==0){var _=p.pending;return _===null?l.next=l:(l.next=_.next,_.next=l),p.pending=l,l=lm(i),J1(i,null,m),l}return om(i,p,l,m),lm(i)}function Uu(i,l,m){if(l=l.updateQueue,l!==null&&(l=l.shared,(m&4194048)!==0)){var p=l.lanes;p&=i.pendingLanes,m|=p,l.lanes=m,nt(i,m)}}function wp(i,l){var m=i.updateQueue,p=i.alternate;if(p!==null&&(p=p.updateQueue,m===p)){var _=null,R=null;if(m=m.firstBaseUpdate,m!==null){do{var W={lane:m.lane,tag:m.tag,payload:m.payload,callback:null,next:null};R===null?_=R=W:R=R.next=W,m=m.next}while(m!==null);R===null?_=R=l:R=R.next=l}else _=R=l;m={baseState:p.baseState,firstBaseUpdate:_,lastBaseUpdate:R,shared:p.shared,callbacks:p.callbacks},i.updateQueue=m;return}i=m.lastBaseUpdate,i===null?m.firstBaseUpdate=l:i.next=l,m.lastBaseUpdate=l}var $p=!1;function Wu(){if($p){var i=nc;if(i!==null)throw i}}function qu(i,l,m,p){$p=!1;var _=i.updateQueue;ll=!1;var R=_.firstBaseUpdate,W=_.lastBaseUpdate,ne=_.shared.pending;if(ne!==null){_.shared.pending=null;var xe=ne,ze=xe.next;xe.next=null,W===null?R=ze:W.next=ze,W=xe;var Xe=i.alternate;Xe!==null&&(Xe=Xe.updateQueue,ne=Xe.lastBaseUpdate,ne!==W&&(ne===null?Xe.firstBaseUpdate=ze:ne.next=ze,Xe.lastBaseUpdate=xe))}if(R!==null){var rt=_.baseState;W=0,Xe=ze=xe=null,ne=R;do{var Le=ne.lane&-536870913,Ve=Le!==ne.lane;if(Ve?(Hn&Le)===Le:(p&Le)===Le){Le!==0&&Le===tc&&($p=!0),Xe!==null&&(Xe=Xe.next={lane:0,tag:ne.tag,payload:ne.payload,callback:null,next:null});e:{var Xt=i,mn=ne;Le=l;var vr=m;switch(mn.tag){case 1:if(Xt=mn.payload,typeof Xt=="function"){rt=Xt.call(vr,rt,Le);break e}rt=Xt;break e;case 3:Xt.flags=Xt.flags&-65537|128;case 0:if(Xt=mn.payload,Le=typeof Xt=="function"?Xt.call(vr,rt,Le):Xt,Le==null)break e;rt=v({},rt,Le);break e;case 2:ll=!0}}Le=ne.callback,Le!==null&&(i.flags|=64,Ve&&(i.flags|=8192),Ve=_.callbacks,Ve===null?_.callbacks=[Le]:Ve.push(Le))}else Ve={lane:Le,tag:ne.tag,payload:ne.payload,callback:ne.callback,next:null},Xe===null?(ze=Xe=Ve,xe=rt):Xe=Xe.next=Ve,W|=Le;if(ne=ne.next,ne===null){if(ne=_.shared.pending,ne===null)break;Ve=ne,ne=Ve.next,Ve.next=null,_.lastBaseUpdate=Ve,_.shared.pending=null}}while(!0);Xe===null&&(xe=rt),_.baseState=xe,_.firstBaseUpdate=ze,_.lastBaseUpdate=Xe,R===null&&(_.shared.lanes=0),hl|=W,i.lanes=W,i.memoizedState=rt}}function pw(i,l){if(typeof i!="function")throw Error(r(191,i));i.call(l)}function bw(i,l){var m=i.callbacks;if(m!==null)for(i.callbacks=null,i=0;iR?R:8;var W=T.T,ne={};T.T=ne,Vp(i,!1,l,m);try{var xe=_(),ze=T.S;if(ze!==null&&ze(ne,xe),xe!==null&&typeof xe=="object"&&typeof xe.then=="function"){var Xe=u3(xe,p);Xu(i,l,Xe,ei(i))}else Xu(i,l,p,ei(i))}catch(rt){Xu(i,l,{then:function(){},status:"rejected",reason:rt},ei())}finally{z.p=R,W!==null&&ne.types!==null&&(W.types=ne.types),T.T=W}}function g3(){}function Bp(i,l,m,p){if(i.tag!==5)throw Error(r(476));var _=Xw(i).queue;Gw(i,_,l,V,m===null?g3:function(){return Qw(i),m(p)})}function Xw(i){var l=i.memoizedState;if(l!==null)return l;l={memoizedState:V,baseState:V,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:$o,lastRenderedState:V},next:null};var m={};return l.next={memoizedState:m,baseState:m,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:$o,lastRenderedState:m},next:null},i.memoizedState=l,i=i.alternate,i!==null&&(i.memoizedState=l),l}function Qw(i){var l=Xw(i);l.next===null&&(l=i.alternate.memoizedState),Xu(i,l.next.queue,{},ei())}function Fp(){return ba(md)}function Zw(){return Vr().memoizedState}function Jw(){return Vr().memoizedState}function p3(i){for(var l=i.return;l!==null;){switch(l.tag){case 24:case 3:var m=ei();i=sl(m);var p=cl(l,i,m);p!==null&&(Ka(p,l,m),Uu(p,l,m)),l={cache:pp()},i.payload=l;return}l=l.return}}function b3(i,l,m){var p=ei();m={lane:p,revertLane:0,gesture:null,action:m,hasEagerState:!1,eagerState:null,next:null},_m(i)?t$(l,m):(m=op(i,l,m,p),m!==null&&(Ka(m,i,p),n$(m,l,p)))}function e$(i,l,m){var p=ei();Xu(i,l,m,p)}function Xu(i,l,m,p){var _={lane:p,revertLane:0,gesture:null,action:m,hasEagerState:!1,eagerState:null,next:null};if(_m(i))t$(l,_);else{var R=i.alternate;if(i.lanes===0&&(R===null||R.lanes===0)&&(R=l.lastRenderedReducer,R!==null))try{var W=l.lastRenderedState,ne=R(W,m);if(_.hasEagerState=!0,_.eagerState=ne,Ya(ne,W))return om(i,l,_,0),yr===null&&im(),!1}catch{}finally{}if(m=op(i,l,_,p),m!==null)return Ka(m,i,p),n$(m,l,p),!0}return!1}function Vp(i,l,m,p){if(p={lane:2,revertLane:Sb(),gesture:null,action:p,hasEagerState:!1,eagerState:null,next:null},_m(i)){if(l)throw Error(r(479))}else l=op(i,m,p,2),l!==null&&Ka(l,i,2)}function _m(i){var l=i.alternate;return i===_n||l!==null&&l===_n}function t$(i,l){oc=ym=!0;var m=i.pending;m===null?l.next=l:(l.next=m.next,m.next=l),i.pending=l}function n$(i,l,m){if((m&4194048)!==0){var p=l.lanes;p&=i.pendingLanes,m|=p,l.lanes=m,nt(i,m)}}var Qu={readContext:ba,use:Cm,useCallback:zr,useContext:zr,useEffect:zr,useImperativeHandle:zr,useLayoutEffect:zr,useInsertionEffect:zr,useMemo:zr,useReducer:zr,useRef:zr,useState:zr,useDebugValue:zr,useDeferredValue:zr,useTransition:zr,useSyncExternalStore:zr,useId:zr,useHostTransitionStatus:zr,useFormState:zr,useActionState:zr,useOptimistic:zr,useMemoCache:zr,useCacheRefresh:zr};Qu.useEffectEvent=zr;var r$={readContext:ba,use:Cm,useCallback:function(i,l){return ka().memoizedState=[i,l===void 0?null:l],i},useContext:ba,useEffect:Hw,useImperativeHandle:function(i,l,m){m=m!=null?m.concat([i]):null,$m(4194308,4,Kw.bind(null,l,i),m)},useLayoutEffect:function(i,l){return $m(4194308,4,i,l)},useInsertionEffect:function(i,l){$m(4,2,i,l)},useMemo:function(i,l){var m=ka();l=l===void 0?null:l;var p=i();if(ss){Te(!0);try{i()}finally{Te(!1)}}return m.memoizedState=[p,l],p},useReducer:function(i,l,m){var p=ka();if(m!==void 0){var _=m(l);if(ss){Te(!0);try{m(l)}finally{Te(!1)}}}else _=l;return p.memoizedState=p.baseState=_,i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:i,lastRenderedState:_},p.queue=i,i=i.dispatch=b3.bind(null,_n,i),[p.memoizedState,i]},useRef:function(i){var l=ka();return i={current:i},l.memoizedState=i},useState:function(i){i=kp(i);var l=i.queue,m=e$.bind(null,_n,l);return l.dispatch=m,[i.memoizedState,m]},useDebugValue:Lp,useDeferredValue:function(i,l){var m=ka();return Hp(m,i,l)},useTransition:function(){var i=kp(!1);return i=Gw.bind(null,_n,i.queue,!0,!1),ka().memoizedState=i,[!1,i]},useSyncExternalStore:function(i,l,m){var p=_n,_=ka();if(Un){if(m===void 0)throw Error(r(407));m=m()}else{if(m=l(),yr===null)throw Error(r(349));(Hn&127)!==0||$w(p,l,m)}_.memoizedState=m;var R={value:m,getSnapshot:l};return _.queue=R,Hw(_w.bind(null,p,R,i),[i]),p.flags|=2048,sc(9,{destroy:void 0},Ew.bind(null,p,R,m,l),null),m},useId:function(){var i=ka(),l=yr.identifierPrefix;if(Un){var m=eo,p=Ji;m=(p&~(1<<32-be(p)-1)).toString(32)+m,l="_"+l+"R_"+m,m=xm++,0<\/script>",R=R.removeChild(R.firstChild);break;case"select":R=typeof p.is=="string"?W.createElement("select",{is:p.is}):W.createElement("select"),p.multiple?R.multiple=!0:p.size&&(R.size=p.size);break;default:R=typeof p.is=="string"?W.createElement(_,{is:p.is}):W.createElement(_)}}R[ut]=l,R[ot]=p;e:for(W=l.child;W!==null;){if(W.tag===5||W.tag===6)R.appendChild(W.stateNode);else if(W.tag!==4&&W.tag!==27&&W.child!==null){W.child.return=W,W=W.child;continue}if(W===l)break e;for(;W.sibling===null;){if(W.return===null||W.return===l)break e;W=W.return}W.sibling.return=W.return,W=W.sibling}l.stateNode=R;e:switch(xa(R,_,p),_){case"button":case"input":case"select":case"textarea":p=!!p.autoFocus;break e;case"img":p=!0;break e;default:p=!1}p&&_o(l)}}return Or(l),rb(l,l.type,i===null?null:i.memoizedProps,l.pendingProps,m),null;case 6:if(i&&l.stateNode!=null)i.memoizedProps!==p&&_o(l);else{if(typeof p!="string"&&l.stateNode===null)throw Error(r(166));if(i=Z.current,Js(l)){if(i=l.stateNode,m=l.memoizedProps,p=null,_=pa,_!==null)switch(_.tag){case 27:case 5:p=_.memoizedProps}i[ut]=l,i=!!(i.nodeValue===m||p!==null&&p.suppressHydrationWarning===!0||CE(i.nodeValue,m)),i||il(l,!0)}else i=Wm(i).createTextNode(p),i[ut]=l,l.stateNode=i}return Or(l),null;case 31:if(m=l.memoizedState,i===null||i.memoizedState!==null){if(p=Js(l),m!==null){if(i===null){if(!p)throw Error(r(318));if(i=l.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(r(557));i[ut]=l}else ts(),(l.flags&128)===0&&(l.memoizedState=null),l.flags|=4;Or(l),i=!1}else m=mp(),i!==null&&i.memoizedState!==null&&(i.memoizedState.hydrationErrors=m),i=!0;if(!i)return l.flags&256?(Qa(l),l):(Qa(l),null);if((l.flags&128)!==0)throw Error(r(558))}return Or(l),null;case 13:if(p=l.memoizedState,i===null||i.memoizedState!==null&&i.memoizedState.dehydrated!==null){if(_=Js(l),p!==null&&p.dehydrated!==null){if(i===null){if(!_)throw Error(r(318));if(_=l.memoizedState,_=_!==null?_.dehydrated:null,!_)throw Error(r(317));_[ut]=l}else ts(),(l.flags&128)===0&&(l.memoizedState=null),l.flags|=4;Or(l),_=!1}else _=mp(),i!==null&&i.memoizedState!==null&&(i.memoizedState.hydrationErrors=_),_=!0;if(!_)return l.flags&256?(Qa(l),l):(Qa(l),null)}return Qa(l),(l.flags&128)!==0?(l.lanes=m,l):(m=p!==null,i=i!==null&&i.memoizedState!==null,m&&(p=l.child,_=null,p.alternate!==null&&p.alternate.memoizedState!==null&&p.alternate.memoizedState.cachePool!==null&&(_=p.alternate.memoizedState.cachePool.pool),R=null,p.memoizedState!==null&&p.memoizedState.cachePool!==null&&(R=p.memoizedState.cachePool.pool),R!==_&&(p.flags|=2048)),m!==i&&m&&(l.child.flags|=8192),Mm(l,l.updateQueue),Or(l),null);case 4:return ie(),i===null&&Eb(l.stateNode.containerInfo),Or(l),null;case 10:return Co(l.type),Or(l),null;case 19:if(U(Fr),p=l.memoizedState,p===null)return Or(l),null;if(_=(l.flags&128)!==0,R=p.rendering,R===null)if(_)Ju(p,!1);else{if(Lr!==0||i!==null&&(i.flags&128)!==0)for(i=l.child;i!==null;){if(R=bm(i),R!==null){for(l.flags|=128,Ju(p,!1),i=R.updateQueue,l.updateQueue=i,Mm(l,i),l.subtreeFlags=0,i=m,m=l.child;m!==null;)ew(m,i),m=m.sibling;return K(Fr,Fr.current&1|2),Un&&xo(l,p.treeForkCount),l.child}i=i.sibling}p.tail!==null&&we()>km&&(l.flags|=128,_=!0,Ju(p,!1),l.lanes=4194304)}else{if(!_)if(i=bm(R),i!==null){if(l.flags|=128,_=!0,i=i.updateQueue,l.updateQueue=i,Mm(l,i),Ju(p,!0),p.tail===null&&p.tailMode==="hidden"&&!R.alternate&&!Un)return Or(l),null}else 2*we()-p.renderingStartTime>km&&m!==536870912&&(l.flags|=128,_=!0,Ju(p,!1),l.lanes=4194304);p.isBackwards?(R.sibling=l.child,l.child=R):(i=p.last,i!==null?i.sibling=R:l.child=R,p.last=R)}return p.tail!==null?(i=p.tail,p.rendering=i,p.tail=i.sibling,p.renderingStartTime=we(),i.sibling=null,m=Fr.current,K(Fr,_?m&1|2:m&1),Un&&xo(l,p.treeForkCount),i):(Or(l),null);case 22:case 23:return Qa(l),_p(),p=l.memoizedState!==null,i!==null?i.memoizedState!==null!==p&&(l.flags|=8192):p&&(l.flags|=8192),p?(m&536870912)!==0&&(l.flags&128)===0&&(Or(l),l.subtreeFlags&6&&(l.flags|=8192)):Or(l),m=l.updateQueue,m!==null&&Mm(l,m.retryQueue),m=null,i!==null&&i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(m=i.memoizedState.cachePool.pool),p=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(p=l.memoizedState.cachePool.pool),p!==m&&(l.flags|=2048),i!==null&&U(as),null;case 24:return m=null,i!==null&&(m=i.memoizedState.cache),l.memoizedState.cache!==m&&(l.flags|=2048),Co(Gr),Or(l),null;case 25:return null;case 30:return null}throw Error(r(156,l.tag))}function w3(i,l){switch(dp(l),l.tag){case 1:return i=l.flags,i&65536?(l.flags=i&-65537|128,l):null;case 3:return Co(Gr),ie(),i=l.flags,(i&65536)!==0&&(i&128)===0?(l.flags=i&-65537|128,l):null;case 26:case 27:case 5:return ue(l),null;case 31:if(l.memoizedState!==null){if(Qa(l),l.alternate===null)throw Error(r(340));ts()}return i=l.flags,i&65536?(l.flags=i&-65537|128,l):null;case 13:if(Qa(l),i=l.memoizedState,i!==null&&i.dehydrated!==null){if(l.alternate===null)throw Error(r(340));ts()}return i=l.flags,i&65536?(l.flags=i&-65537|128,l):null;case 19:return U(Fr),null;case 4:return ie(),null;case 10:return Co(l.type),null;case 22:case 23:return Qa(l),_p(),i!==null&&U(as),i=l.flags,i&65536?(l.flags=i&-65537|128,l):null;case 24:return Co(Gr),null;case 25:return null;default:return null}}function O$(i,l){switch(dp(l),l.tag){case 3:Co(Gr),ie();break;case 26:case 27:case 5:ue(l);break;case 4:ie();break;case 31:l.memoizedState!==null&&Qa(l);break;case 13:Qa(l);break;case 19:U(Fr);break;case 10:Co(l.type);break;case 22:case 23:Qa(l),_p(),i!==null&&U(as);break;case 24:Co(Gr)}}function ed(i,l){try{var m=l.updateQueue,p=m!==null?m.lastEffect:null;if(p!==null){var _=p.next;m=_;do{if((m.tag&i)===i){p=void 0;var R=m.create,W=m.inst;p=R(),W.destroy=p}m=m.next}while(m!==_)}}catch(ne){dr(l,l.return,ne)}}function fl(i,l,m){try{var p=l.updateQueue,_=p!==null?p.lastEffect:null;if(_!==null){var R=_.next;p=R;do{if((p.tag&i)===i){var W=p.inst,ne=W.destroy;if(ne!==void 0){W.destroy=void 0,_=l;var xe=m,ze=ne;try{ze()}catch(Xe){dr(_,xe,Xe)}}}p=p.next}while(p!==R)}}catch(Xe){dr(l,l.return,Xe)}}function I$(i){var l=i.updateQueue;if(l!==null){var m=i.stateNode;try{bw(l,m)}catch(p){dr(i,i.return,p)}}}function R$(i,l,m){m.props=cs(i.type,i.memoizedProps),m.state=i.memoizedState;try{m.componentWillUnmount()}catch(p){dr(i,l,p)}}function td(i,l){try{var m=i.ref;if(m!==null){switch(i.tag){case 26:case 27:case 5:var p=i.stateNode;break;case 30:p=i.stateNode;break;default:p=i.stateNode}typeof m=="function"?i.refCleanup=m(p):m.current=p}}catch(_){dr(i,l,_)}}function to(i,l){var m=i.ref,p=i.refCleanup;if(m!==null)if(typeof p=="function")try{p()}catch(_){dr(i,l,_)}finally{i.refCleanup=null,i=i.alternate,i!=null&&(i.refCleanup=null)}else if(typeof m=="function")try{m(null)}catch(_){dr(i,l,_)}else m.current=null}function N$(i){var l=i.type,m=i.memoizedProps,p=i.stateNode;try{e:switch(l){case"button":case"input":case"select":case"textarea":m.autoFocus&&p.focus();break e;case"img":m.src?p.src=m.src:m.srcSet&&(p.srcset=m.srcSet)}}catch(_){dr(i,i.return,_)}}function ab(i,l,m){try{var p=i.stateNode;U3(p,i.type,m,l),p[ot]=l}catch(_){dr(i,i.return,_)}}function M$(i){return i.tag===5||i.tag===3||i.tag===26||i.tag===27&&yl(i.type)||i.tag===4}function ib(i){e:for(;;){for(;i.sibling===null;){if(i.return===null||M$(i.return))return null;i=i.return}for(i.sibling.return=i.return,i=i.sibling;i.tag!==5&&i.tag!==6&&i.tag!==18;){if(i.tag===27&&yl(i.type)||i.flags&2||i.child===null||i.tag===4)continue e;i.child.return=i,i=i.child}if(!(i.flags&2))return i.stateNode}}function ob(i,l,m){var p=i.tag;if(p===5||p===6)i=i.stateNode,l?(m.nodeType===9?m.body:m.nodeName==="HTML"?m.ownerDocument.body:m).insertBefore(i,l):(l=m.nodeType===9?m.body:m.nodeName==="HTML"?m.ownerDocument.body:m,l.appendChild(i),m=m._reactRootContainer,m!=null||l.onclick!==null||(l.onclick=Ar));else if(p!==4&&(p===27&&yl(i.type)&&(m=i.stateNode,l=null),i=i.child,i!==null))for(ob(i,l,m),i=i.sibling;i!==null;)ob(i,l,m),i=i.sibling}function jm(i,l,m){var p=i.tag;if(p===5||p===6)i=i.stateNode,l?m.insertBefore(i,l):m.appendChild(i);else if(p!==4&&(p===27&&yl(i.type)&&(m=i.stateNode),i=i.child,i!==null))for(jm(i,l,m),i=i.sibling;i!==null;)jm(i,l,m),i=i.sibling}function j$(i){var l=i.stateNode,m=i.memoizedProps;try{for(var p=i.type,_=l.attributes;_.length;)l.removeAttributeNode(_[0]);xa(l,p,m),l[ut]=i,l[ot]=m}catch(R){dr(i,i.return,R)}}var Oo=!1,Zr=!1,lb=!1,T$=typeof WeakSet=="function"?WeakSet:Set,ca=null;function $3(i,l){if(i=i.containerInfo,Ib=Jm,i=U1(i),ep(i)){if("selectionStart"in i)var m={start:i.selectionStart,end:i.selectionEnd};else e:{m=(m=i.ownerDocument)&&m.defaultView||window;var p=m.getSelection&&m.getSelection();if(p&&p.rangeCount!==0){m=p.anchorNode;var _=p.anchorOffset,R=p.focusNode;p=p.focusOffset;try{m.nodeType,R.nodeType}catch{m=null;break e}var W=0,ne=-1,xe=-1,ze=0,Xe=0,rt=i,Le=null;t:for(;;){for(var Ve;rt!==m||_!==0&&rt.nodeType!==3||(ne=W+_),rt!==R||p!==0&&rt.nodeType!==3||(xe=W+p),rt.nodeType===3&&(W+=rt.nodeValue.length),(Ve=rt.firstChild)!==null;)Le=rt,rt=Ve;for(;;){if(rt===i)break t;if(Le===m&&++ze===_&&(ne=W),Le===R&&++Xe===p&&(xe=W),(Ve=rt.nextSibling)!==null)break;rt=Le,Le=rt.parentNode}rt=Ve}m=ne===-1||xe===-1?null:{start:ne,end:xe}}else m=null}m=m||{start:0,end:0}}else m=null;for(Rb={focusedElem:i,selectionRange:m},Jm=!1,ca=l;ca!==null;)if(l=ca,i=l.child,(l.subtreeFlags&1028)!==0&&i!==null)i.return=l,ca=i;else for(;ca!==null;){switch(l=ca,R=l.alternate,i=l.flags,l.tag){case 0:if((i&4)!==0&&(i=l.updateQueue,i=i!==null?i.events:null,i!==null))for(m=0;m title"))),xa(R,p,m),R[ut]=i,gt(R),p=R;break e;case"link":var W=LE("link","href",_).get(p+(m.href||""));if(W){for(var ne=0;nevr&&(W=vr,vr=mn,mn=W);var Ne=V1(ne,mn),_e=V1(ne,vr);if(Ne&&_e&&(Ve.rangeCount!==1||Ve.anchorNode!==Ne.node||Ve.anchorOffset!==Ne.offset||Ve.focusNode!==_e.node||Ve.focusOffset!==_e.offset)){var Ae=rt.createRange();Ae.setStart(Ne.node,Ne.offset),Ve.removeAllRanges(),mn>vr?(Ve.addRange(Ae),Ve.extend(_e.node,_e.offset)):(Ae.setEnd(_e.node,_e.offset),Ve.addRange(Ae))}}}}for(rt=[],Ve=ne;Ve=Ve.parentNode;)Ve.nodeType===1&&rt.push({element:Ve,left:Ve.scrollLeft,top:Ve.scrollTop});for(typeof ne.focus=="function"&&ne.focus(),ne=0;nem?32:m,T.T=null,m=hb,hb=null;var R=gl,W=jo;if(ta=0,mc=gl=null,jo=0,(ir&6)!==0)throw Error(r(331));var ne=ir;if(ir|=4,K$(R.current),B$(R,R.current,W,m),ir=ne,ld(0,!1),$e&&typeof $e.onPostCommitFiberRoot=="function")try{$e.onPostCommitFiberRoot(Be,R)}catch{}return!0}finally{z.p=_,T.T=p,sE(i,l)}}function uE(i,l,m){l=ci(m,l),l=qp(i.stateNode,l,2),i=cl(i,l,2),i!==null&&(vt(i,2),no(i))}function dr(i,l,m){if(i.tag===3)uE(i,i,m);else for(;l!==null;){if(l.tag===3){uE(l,i,m);break}else if(l.tag===1){var p=l.stateNode;if(typeof l.type.getDerivedStateFromError=="function"||typeof p.componentDidCatch=="function"&&(vl===null||!vl.has(p))){i=ci(m,i),m=d$(2),p=cl(l,m,2),p!==null&&(f$(m,p,l,i),vt(p,2),no(p));break}}l=l.return}}function bb(i,l,m){var p=i.pingCache;if(p===null){p=i.pingCache=new O3;var _=new Set;p.set(l,_)}else _=p.get(l),_===void 0&&(_=new Set,p.set(l,_));_.has(m)||(ub=!0,_.add(m),i=j3.bind(null,i,l,m),l.then(i,i))}function j3(i,l,m){var p=i.pingCache;p!==null&&p.delete(l),i.pingedLanes|=i.suspendedLanes&m,i.warmLanes&=~m,yr===i&&(Hn&m)===m&&(Lr===4||Lr===3&&(Hn&62914560)===Hn&&300>we()-Pm?(ir&2)===0&&hc(i,0):db|=m,fc===Hn&&(fc=0)),no(i)}function dE(i,l){l===0&&(l=qt()),i=Jl(i,l),i!==null&&(vt(i,l),no(i))}function T3(i){var l=i.memoizedState,m=0;l!==null&&(m=l.retryLane),dE(i,m)}function D3(i,l){var m=0;switch(i.tag){case 31:case 13:var p=i.stateNode,_=i.memoizedState;_!==null&&(m=_.retryLane);break;case 19:p=i.stateNode;break;case 22:p=i.stateNode._retryCache;break;default:throw Error(r(314))}p!==null&&p.delete(l),dE(i,m)}function P3(i,l){return je(i,l)}var Fm=null,gc=null,yb=!1,Vm=!1,xb=!1,bl=0;function no(i){i!==gc&&i.next===null&&(gc===null?Fm=gc=i:gc=gc.next=i),Vm=!0,yb||(yb=!0,A3())}function ld(i,l){if(!xb&&Vm){xb=!0;do for(var m=!1,p=Fm;p!==null;){if(i!==0){var _=p.pendingLanes;if(_===0)var R=0;else{var W=p.suspendedLanes,ne=p.pingedLanes;R=(1<<31-be(42|i)+1)-1,R&=_&~(W&~ne),R=R&201326741?R&201326741|1:R?R|2:0}R!==0&&(m=!0,vE(p,R))}else R=Hn,R=mt(p,p===yr?R:0,p.cancelPendingCommit!==null||p.timeoutHandle!==-1),(R&3)===0||st(p,R)||(m=!0,vE(p,R));p=p.next}while(m);xb=!1}}function k3(){fE()}function fE(){Vm=yb=!1;var i=0;bl!==0&&q3()&&(i=bl);for(var l=we(),m=null,p=Fm;p!==null;){var _=p.next,R=mE(p,l);R===0?(p.next=null,m===null?Fm=_:m.next=_,_===null&&(gc=m)):(m=p,(i!==0||(R&3)!==0)&&(Vm=!0)),p=_}ta!==0&&ta!==5||ld(i),bl!==0&&(bl=0)}function mE(i,l){for(var m=i.suspendedLanes,p=i.pingedLanes,_=i.expirationTimes,R=i.pendingLanes&-62914561;0ne)break;var Xe=xe.transferSize,rt=xe.initiatorType;Xe&&wE(rt)&&(xe=xe.responseEnd,W+=Xe*(xe"u"?null:document;function PE(i,l,m){var p=pc;if(p&&typeof l=="string"&&l){var _=un(l);_='link[rel="'+i+'"][href="'+_+'"]',typeof m=="string"&&(_+='[crossorigin="'+m+'"]'),DE.has(_)||(DE.add(_),i={rel:i,crossOrigin:m,href:l},p.querySelector(_)===null&&(l=p.createElement("link"),xa(l,"link",i),gt(l),p.head.appendChild(l)))}}function n6(i){To.D(i),PE("dns-prefetch",i,null)}function r6(i,l){To.C(i,l),PE("preconnect",i,l)}function a6(i,l,m){To.L(i,l,m);var p=pc;if(p&&i&&l){var _='link[rel="preload"][as="'+un(l)+'"]';l==="image"&&m&&m.imageSrcSet?(_+='[imagesrcset="'+un(m.imageSrcSet)+'"]',typeof m.imageSizes=="string"&&(_+='[imagesizes="'+un(m.imageSizes)+'"]')):_+='[href="'+un(i)+'"]';var R=_;switch(l){case"style":R=bc(i);break;case"script":R=yc(i)}vi.has(R)||(i=v({rel:"preload",href:l==="image"&&m&&m.imageSrcSet?void 0:i,as:l},m),vi.set(R,i),p.querySelector(_)!==null||l==="style"&&p.querySelector(dd(R))||l==="script"&&p.querySelector(fd(R))||(l=p.createElement("link"),xa(l,"link",i),gt(l),p.head.appendChild(l)))}}function i6(i,l){To.m(i,l);var m=pc;if(m&&i){var p=l&&typeof l.as=="string"?l.as:"script",_='link[rel="modulepreload"][as="'+un(p)+'"][href="'+un(i)+'"]',R=_;switch(p){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":R=yc(i)}if(!vi.has(R)&&(i=v({rel:"modulepreload",href:i},l),vi.set(R,i),m.querySelector(_)===null)){switch(p){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(m.querySelector(fd(R)))return}p=m.createElement("link"),xa(p,"link",i),gt(p),m.head.appendChild(p)}}}function o6(i,l,m){To.S(i,l,m);var p=pc;if(p&&i){var _=kt(p).hoistableStyles,R=bc(i);l=l||"default";var W=_.get(R);if(!W){var ne={loading:0,preload:null};if(W=p.querySelector(dd(R)))ne.loading=5;else{i=v({rel:"stylesheet",href:i,"data-precedence":l},m),(m=vi.get(R))&&kb(i,m);var xe=W=p.createElement("link");gt(xe),xa(xe,"link",i),xe._p=new Promise(function(ze,Xe){xe.onload=ze,xe.onerror=Xe}),xe.addEventListener("load",function(){ne.loading|=1}),xe.addEventListener("error",function(){ne.loading|=2}),ne.loading|=4,Ym(W,l,p)}W={type:"stylesheet",instance:W,count:1,state:ne},_.set(R,W)}}}function l6(i,l){To.X(i,l);var m=pc;if(m&&i){var p=kt(m).hoistableScripts,_=yc(i),R=p.get(_);R||(R=m.querySelector(fd(_)),R||(i=v({src:i,async:!0},l),(l=vi.get(_))&&Ab(i,l),R=m.createElement("script"),gt(R),xa(R,"link",i),m.head.appendChild(R)),R={type:"script",instance:R,count:1,state:null},p.set(_,R))}}function s6(i,l){To.M(i,l);var m=pc;if(m&&i){var p=kt(m).hoistableScripts,_=yc(i),R=p.get(_);R||(R=m.querySelector(fd(_)),R||(i=v({src:i,async:!0,type:"module"},l),(l=vi.get(_))&&Ab(i,l),R=m.createElement("script"),gt(R),xa(R,"link",i),m.head.appendChild(R)),R={type:"script",instance:R,count:1,state:null},p.set(_,R))}}function kE(i,l,m,p){var _=(_=Z.current)?qm(_):null;if(!_)throw Error(r(446));switch(i){case"meta":case"title":return null;case"style":return typeof m.precedence=="string"&&typeof m.href=="string"?(l=bc(m.href),m=kt(_).hoistableStyles,p=m.get(l),p||(p={type:"style",instance:null,count:0,state:null},m.set(l,p)),p):{type:"void",instance:null,count:0,state:null};case"link":if(m.rel==="stylesheet"&&typeof m.href=="string"&&typeof m.precedence=="string"){i=bc(m.href);var R=kt(_).hoistableStyles,W=R.get(i);if(W||(_=_.ownerDocument||_,W={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},R.set(i,W),(R=_.querySelector(dd(i)))&&!R._p&&(W.instance=R,W.state.loading=5),vi.has(i)||(m={rel:"preload",as:"style",href:m.href,crossOrigin:m.crossOrigin,integrity:m.integrity,media:m.media,hrefLang:m.hrefLang,referrerPolicy:m.referrerPolicy},vi.set(i,m),R||c6(_,i,m,W.state))),l&&p===null)throw Error(r(528,""));return W}if(l&&p!==null)throw Error(r(529,""));return null;case"script":return l=m.async,m=m.src,typeof m=="string"&&l&&typeof l!="function"&&typeof l!="symbol"?(l=yc(m),m=kt(_).hoistableScripts,p=m.get(l),p||(p={type:"script",instance:null,count:0,state:null},m.set(l,p)),p):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,i))}}function bc(i){return'href="'+un(i)+'"'}function dd(i){return'link[rel="stylesheet"]['+i+"]"}function AE(i){return v({},i,{"data-precedence":i.precedence,precedence:null})}function c6(i,l,m,p){i.querySelector('link[rel="preload"][as="style"]['+l+"]")?p.loading=1:(l=i.createElement("link"),p.preload=l,l.addEventListener("load",function(){return p.loading|=1}),l.addEventListener("error",function(){return p.loading|=2}),xa(l,"link",m),gt(l),i.head.appendChild(l))}function yc(i){return'[src="'+un(i)+'"]'}function fd(i){return"script[async]"+i}function zE(i,l,m){if(l.count++,l.instance===null)switch(l.type){case"style":var p=i.querySelector('style[data-href~="'+un(m.href)+'"]');if(p)return l.instance=p,gt(p),p;var _=v({},m,{"data-href":m.href,"data-precedence":m.precedence,href:null,precedence:null});return p=(i.ownerDocument||i).createElement("style"),gt(p),xa(p,"style",_),Ym(p,m.precedence,i),l.instance=p;case"stylesheet":_=bc(m.href);var R=i.querySelector(dd(_));if(R)return l.state.loading|=4,l.instance=R,gt(R),R;p=AE(m),(_=vi.get(_))&&kb(p,_),R=(i.ownerDocument||i).createElement("link"),gt(R);var W=R;return W._p=new Promise(function(ne,xe){W.onload=ne,W.onerror=xe}),xa(R,"link",p),l.state.loading|=4,Ym(R,m.precedence,i),l.instance=R;case"script":return R=yc(m.src),(_=i.querySelector(fd(R)))?(l.instance=_,gt(_),_):(p=m,(_=vi.get(R))&&(p=v({},m),Ab(p,_)),i=i.ownerDocument||i,_=i.createElement("script"),gt(_),xa(_,"link",p),i.head.appendChild(_),l.instance=_);case"void":return null;default:throw Error(r(443,l.type))}else l.type==="stylesheet"&&(l.state.loading&4)===0&&(p=l.instance,l.state.loading|=4,Ym(p,m.precedence,i));return l.instance}function Ym(i,l,m){for(var p=m.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),_=p.length?p[p.length-1]:null,R=_,W=0;W title"):null)}function u6(i,l,m){if(m===1||l.itemProp!=null)return!1;switch(i){case"meta":case"title":return!0;case"style":if(typeof l.precedence!="string"||typeof l.href!="string"||l.href==="")break;return!0;case"link":if(typeof l.rel!="string"||typeof l.href!="string"||l.href===""||l.onLoad||l.onError)break;switch(l.rel){case"stylesheet":return i=l.disabled,typeof l.precedence=="string"&&i==null;default:return!0}case"script":if(l.async&&typeof l.async!="function"&&typeof l.async!="symbol"&&!l.onLoad&&!l.onError&&l.src&&typeof l.src=="string")return!0}return!1}function BE(i){return!(i.type==="stylesheet"&&(i.state.loading&3)===0)}function d6(i,l,m,p){if(m.type==="stylesheet"&&(typeof p.media!="string"||matchMedia(p.media).matches!==!1)&&(m.state.loading&4)===0){if(m.instance===null){var _=bc(p.href),R=l.querySelector(dd(_));if(R){l=R._p,l!==null&&typeof l=="object"&&typeof l.then=="function"&&(i.count++,i=Xm.bind(i),l.then(i,i)),m.state.loading|=4,m.instance=R,gt(R);return}R=l.ownerDocument||l,p=AE(p),(_=vi.get(_))&&kb(p,_),R=R.createElement("link"),gt(R);var W=R;W._p=new Promise(function(ne,xe){W.onload=ne,W.onerror=xe}),xa(R,"link",p),m.instance=R}i.stylesheets===null&&(i.stylesheets=new Map),i.stylesheets.set(m,l),(l=m.state.preload)&&(m.state.loading&3)===0&&(i.count++,m=Xm.bind(i),l.addEventListener("load",m),l.addEventListener("error",m))}}var zb=0;function f6(i,l){return i.stylesheets&&i.count===0&&Zm(i,i.stylesheets),0zb?50:800)+l);return i.unsuspend=m,function(){i.unsuspend=null,clearTimeout(p),clearTimeout(_)}}:null}function Xm(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Zm(this,this.stylesheets);else if(this.unsuspend){var i=this.unsuspend;this.unsuspend=null,i()}}}var Qm=null;function Zm(i,l){i.stylesheets=null,i.unsuspend!==null&&(i.count++,Qm=new Map,l.forEach(m6,i),Qm=null,Xm.call(i))}function m6(i,l){if(!(l.state.loading&4)){var m=Qm.get(i);if(m)var p=m.get(null);else{m=new Map,Qm.set(i,m);for(var _=i.querySelectorAll("link[data-precedence],style[data-precedence]"),R=0;R<_.length;R++){var W=_[R];(W.nodeName==="LINK"||W.getAttribute("media")!=="not all")&&(m.set(W.dataset.precedence,W),p=W)}p&&m.set(null,p)}_=l.instance,W=_.getAttribute("data-precedence"),R=m.get(W)||p,R===p&&m.set(null,_),m.set(W,_),this.count++,p=Xm.bind(this),_.addEventListener("load",p),_.addEventListener("error",p),R?R.parentNode.insertBefore(_,R.nextSibling):(i=i.nodeType===9?i.head:i,i.insertBefore(_,i.firstChild)),l.state.loading|=4}}var md={$$typeof:E,Provider:null,Consumer:null,_currentValue:V,_currentValue2:V,_threadCount:0};function h6(i,l,m,p,_,R,W,ne,xe){this.tag=1,this.containerInfo=i,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Gt(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Gt(0),this.hiddenUpdates=Gt(null),this.identifierPrefix=p,this.onUncaughtError=_,this.onCaughtError=R,this.onRecoverableError=W,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=xe,this.incompleteTransitions=new Map}function FE(i,l,m,p,_,R,W,ne,xe,ze,Xe,rt){return i=new h6(i,l,m,W,xe,ze,Xe,rt,ne),l=1,R===!0&&(l|=24),R=Ga(3,null,null,l),i.current=R,R.stateNode=i,l=pp(),l.refCount++,i.pooledCache=l,l.refCount++,R.memoizedState={element:p,isDehydrated:m,cache:l},Sp(R),i}function VE(i){return i?(i=Xs,i):Xs}function KE(i,l,m,p,_,R){_=VE(_),p.context===null?p.context=_:p.pendingContext=_,p=sl(l),p.payload={element:m},R=R===void 0?null:R,R!==null&&(p.callback=R),m=cl(i,p,l),m!==null&&(Ka(m,i,l),Uu(m,i,l))}function UE(i,l){if(i=i.memoizedState,i!==null&&i.dehydrated!==null){var m=i.retryLane;i.retryLane=m!==0&&m"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),qb.exports=I6(),qb.exports}var N6=R6(),Qb={exports:{}};/*! + Copyright (c) 2018 Jed Watson. + Licensed under the MIT License (MIT), see + http://jedwatson.github.io/classnames +*/var d_;function M6(){return d_||(d_=1,(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var o="",c=0;c1&&arguments[1]!==void 0?arguments[1]:{},n=[];return Se.Children.forEach(e,function(r){r==null&&!t.keepEmpty||(Array.isArray(r)?n=n.concat(Ma(r)):RR(r)&&r.props?n=n.concat(Ma(r.props.children,t)):n.push(r))}),n}var b0={},k6=function(t){};function A6(e,t){}function z6(e,t){}function L6(){b0={}}function NR(e,t,n){!t&&!b0[n]&&(e(!1,n),b0[n]=!0)}function xr(e,t){NR(A6,e,t)}function H6(e,t){NR(z6,e,t)}xr.preMessage=k6;xr.resetWarned=L6;xr.noteOnce=H6;function B6(e,t){if(jt(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(jt(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function MR(e){var t=B6(e,"string");return jt(t)=="symbol"?t:t+""}function X(e,t,n){return(t=MR(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function f_(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function ee(e){for(var t=1;t=19)return!0;var a=Jb.isMemo(t)?t.type.type:t.type;return!(typeof a=="function"&&!((n=a.prototype)!==null&&n!==void 0&&n.render)&&a.$$typeof!==Jb.ForwardRef||typeof t=="function"&&!((r=t.prototype)!==null&&r!==void 0&&r.render)&&t.$$typeof!==Jb.ForwardRef)};function mS(e){return s.isValidElement(e)&&!RR(e)}var W6=function(t){return mS(t)&&Hi(t)},Vl=function(t){if(t&&mS(t)){var n=t;return n.props.propertyIsEnumerable("ref")?n.props.ref:n.ref}return null},y0=s.createContext(null);function q6(e){var t=e.children,n=e.onBatchResize,r=s.useRef(0),a=s.useRef([]),o=s.useContext(y0),c=s.useCallback(function(u,f,d){r.current+=1;var h=r.current;a.current.push({size:u,element:f,data:d}),Promise.resolve().then(function(){h===r.current&&(n?.(a.current),a.current=[])}),o?.(u,f,d)},[n,o]);return s.createElement(y0.Provider,{value:c},t)}var jR=(function(){if(typeof Map<"u")return Map;function e(t,n){var r=-1;return t.some(function(a,o){return a[0]===n?(r=o,!0):!1}),r}return(function(){function t(){this.__entries__=[]}return Object.defineProperty(t.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),t.prototype.get=function(n){var r=e(this.__entries__,n),a=this.__entries__[r];return a&&a[1]},t.prototype.set=function(n,r){var a=e(this.__entries__,n);~a?this.__entries__[a][1]=r:this.__entries__.push([n,r])},t.prototype.delete=function(n){var r=this.__entries__,a=e(r,n);~a&&r.splice(a,1)},t.prototype.has=function(n){return!!~e(this.__entries__,n)},t.prototype.clear=function(){this.__entries__.splice(0)},t.prototype.forEach=function(n,r){r===void 0&&(r=null);for(var a=0,o=this.__entries__;a0},e.prototype.connect_=function(){!x0||this.connected_||(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),J6?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},e.prototype.disconnect_=function(){!x0||!this.connected_||(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},e.prototype.onTransitionEnd_=function(t){var n=t.propertyName,r=n===void 0?"":n,a=Z6.some(function(o){return!!~r.indexOf(o)});a&&this.refresh()},e.getInstance=function(){return this.instance_||(this.instance_=new e),this.instance_},e.instance_=null,e})(),TR=(function(e,t){for(var n=0,r=Object.keys(t);n"u"||!(Element instanceof Object))){if(!(t instanceof Zc(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var n=this.observations_;n.has(t)||(n.set(t,new sk(t)),this.controller_.addObserver(this),this.controller_.refresh())}},e.prototype.unobserve=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element>"u"||!(Element instanceof Object))){if(!(t instanceof Zc(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var n=this.observations_;n.has(t)&&(n.delete(t),n.size||this.controller_.removeObserver(this))}},e.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},e.prototype.gatherActive=function(){var t=this;this.clearActive(),this.observations_.forEach(function(n){n.isActive()&&t.activeObservations_.push(n)})},e.prototype.broadcastActive=function(){if(this.hasActive()){var t=this.callbackCtx_,n=this.activeObservations_.map(function(r){return new ck(r.target,r.broadcastRect())});this.callback_.call(t,n,t),this.clearActive()}},e.prototype.clearActive=function(){this.activeObservations_.splice(0)},e.prototype.hasActive=function(){return this.activeObservations_.length>0},e})(),PR=typeof WeakMap<"u"?new WeakMap:new jR,kR=(function(){function e(t){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var n=ek.getInstance(),r=new uk(t,n,this);PR.set(this,r)}return e})();["observe","unobserve","disconnect"].forEach(function(e){kR.prototype[e]=function(){var t;return(t=PR.get(this))[e].apply(t,arguments)}});var dk=(function(){return typeof cv.ResizeObserver<"u"?cv.ResizeObserver:kR})(),jl=new Map;function fk(e){e.forEach(function(t){var n,r=t.target;(n=jl.get(r))===null||n===void 0||n.forEach(function(a){return a(r)})})}var AR=new dk(fk);function mk(e,t){jl.has(e)||(jl.set(e,new Set),AR.observe(e)),jl.get(e).add(t)}function hk(e,t){jl.has(e)&&(jl.get(e).delete(t),jl.get(e).size||(AR.unobserve(e),jl.delete(e)))}function Sr(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function g_(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=Array(t);n1&&arguments[1]!==void 0?arguments[1]:1;p_+=1;var r=p_;function a(o){if(o===0)FR(r),t();else{var c=HR(function(){a(o-1)});vS.set(r,c)}}return a(n),r};hn.cancel=function(e){var t=vS.get(e);return FR(e),BR(t)};function VR(e){if(Array.isArray(e))return e}function Ck(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,a,o,c,u=[],f=!0,d=!1;try{if(o=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;f=!1}else for(;!(f=(r=o.call(n)).done)&&(u.push(r.value),u.length!==t);f=!0);}catch(h){d=!0,a=h}finally{try{if(!f&&n.return!=null&&(c=n.return(),Object(c)!==c))return}finally{if(d)throw a}}return u}}function KR(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ce(e,t){return VR(e)||Ck(e,t)||hS(e,t)||KR()}function af(e){for(var t=0,n,r=0,a=e.length;a>=4;++r,a-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(a){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}function wa(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function wk(e,t){if(!e)return!1;if(e.contains)return e.contains(t);for(var n=t;n;){if(n===e)return!0;n=n.parentNode}return!1}var b_="data-rc-order",y_="data-rc-priority",$k="rc-util-key",C0=new Map;function UR(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=e.mark;return t?t.startsWith("data-")?t:"data-".concat(t):$k}function Lv(e){if(e.attachTo)return e.attachTo;var t=document.querySelector("head");return t||document.body}function Ek(e){return e==="queue"?"prependQueue":e?"prepend":"append"}function gS(e){return Array.from((C0.get(e)||e).children).filter(function(t){return t.tagName==="STYLE"})}function WR(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!wa())return null;var n=t.csp,r=t.prepend,a=t.priority,o=a===void 0?0:a,c=Ek(r),u=c==="prependQueue",f=document.createElement("style");f.setAttribute(b_,c),u&&o&&f.setAttribute(y_,"".concat(o)),n!=null&&n.nonce&&(f.nonce=n?.nonce),f.innerHTML=e;var d=Lv(t),h=d.firstChild;if(r){if(u){var v=(t.styles||gS(d)).filter(function(g){if(!["prepend","prependQueue"].includes(g.getAttribute(b_)))return!1;var b=Number(g.getAttribute(y_)||0);return o>=b});if(v.length)return d.insertBefore(f,v[v.length-1].nextSibling),f}d.insertBefore(f,h)}else d.appendChild(f);return f}function qR(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=Lv(t);return(t.styles||gS(n)).find(function(r){return r.getAttribute(UR(t))===e})}function of(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=qR(e,t);if(n){var r=Lv(t);r.removeChild(n)}}function _k(e,t){var n=C0.get(e);if(!n||!wk(document,n)){var r=WR("",t),a=r.parentNode;C0.set(e,a),e.removeChild(r)}}function Bo(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=Lv(n),a=gS(r),o=ee(ee({},n),{},{styles:a});_k(r,o);var c=qR(t,o);if(c){var u,f;if((u=o.csp)!==null&&u!==void 0&&u.nonce&&c.nonce!==((f=o.csp)===null||f===void 0?void 0:f.nonce)){var d;c.nonce=(d=o.csp)===null||d===void 0?void 0:d.nonce}return c.innerHTML!==e&&(c.innerHTML=e),c}var h=WR(e,o);return h.setAttribute(UR(o),t),h}function Ok(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function Kt(e,t){if(e==null)return{};var n,r,a=Ok(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r2&&arguments[2]!==void 0?arguments[2]:!1,r=new Set;function a(o,c){var u=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,f=r.has(o);if(xr(!f,"Warning: There may be circular references"),f)return!1;if(o===c)return!0;if(n&&u>1)return!1;r.add(o);var d=u+1;if(Array.isArray(o)){if(!Array.isArray(c)||o.length!==c.length)return!1;for(var h=0;h1&&arguments[1]!==void 0?arguments[1]:!1,c={map:this.cache};return n.forEach(function(u){if(!c)c=void 0;else{var f;c=(f=c)===null||f===void 0||(f=f.map)===null||f===void 0?void 0:f.get(u)}}),(r=c)!==null&&r!==void 0&&r.value&&o&&(c.value[1]=this.cacheCallTimes++),(a=c)===null||a===void 0?void 0:a.value}},{key:"get",value:function(n){var r;return(r=this.internalGet(n,!0))===null||r===void 0?void 0:r[0]}},{key:"has",value:function(n){return!!this.internalGet(n)}},{key:"set",value:function(n,r){var a=this;if(!this.has(n)){if(this.size()+1>e.MAX_CACHE_SIZE+e.MAX_CACHE_OFFSET){var o=this.keys.reduce(function(d,h){var v=ce(d,2),g=v[1];return a.internalGet(h)[1]0,void 0),x_+=1}return Cr(e,[{key:"getDerivativeToken",value:function(n){return this.derivatives.reduce(function(r,a){return a(n,r)},void 0)}}]),e})(),ey=new pS;function $0(e){var t=Array.isArray(e)?e:[e];return ey.has(t)||ey.set(t,new YR(t)),ey.get(t)}var jk=new WeakMap,ty={};function Tk(e,t){for(var n=jk,r=0;r3&&arguments[3]!==void 0?arguments[3]:{},a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1;if(a)return e;var o=ee(ee({},r),{},X(X({},Jc,t),ki,n)),c=Object.keys(o).map(function(u){var f=o[u];return f?"".concat(u,'="').concat(f,'"'):null}).filter(function(u){return u}).join(" ");return"")}var Ah=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";return"--".concat(n?"".concat(n,"-"):"").concat(t).replace(/([a-z0-9])([A-Z])/g,"$1-$2").replace(/([A-Z]+)([A-Z][a-z0-9]+)/g,"$1-$2").replace(/([a-z])([A-Z0-9])/g,"$1-$2").toLowerCase()},Dk=function(t,n,r){return Object.keys(t).length?".".concat(n).concat(r!=null&&r.scope?".".concat(r.scope):"","{").concat(Object.entries(t).map(function(a){var o=ce(a,2),c=o[0],u=o[1];return"".concat(c,":").concat(u,";")}).join(""),"}"):""},GR=function(t,n,r){var a={},o={};return Object.entries(t).forEach(function(c){var u,f,d=ce(c,2),h=d[0],v=d[1];if(r!=null&&(u=r.preserve)!==null&&u!==void 0&&u[h])o[h]=v;else if((typeof v=="string"||typeof v=="number")&&!(r!=null&&(f=r.ignore)!==null&&f!==void 0&&f[h])){var g,b=Ah(h,r?.prefix);a[b]=typeof v=="number"&&!(r!=null&&(g=r.unitless)!==null&&g!==void 0&&g[h])?"".concat(v,"px"):String(v),o[h]="var(".concat(b,")")}}),[o,Dk(a,n,{scope:r?.scope})]},w_=wa()?s.useLayoutEffect:s.useEffect,fn=function(t,n){var r=s.useRef(!0);w_(function(){return t(r.current)},n),w_(function(){return r.current=!1,function(){r.current=!0}},[])},ws=function(t,n){fn(function(r){if(!r)return t()},n)},Pk=ee({},kv),$_=Pk.useInsertionEffect,kk=function(t,n,r){s.useMemo(t,r),fn(function(){return n(!0)},r)},Ak=$_?function(e,t,n){return $_(function(){return e(),t()},n)}:kk,zk=ee({},kv),Lk=zk.useInsertionEffect,Hk=function(t){var n=[],r=!1;function a(o){r||n.push(o)}return s.useEffect(function(){return r=!1,function(){r=!0,n.length&&n.forEach(function(o){return o()})}},t),a},Bk=function(){return function(t){t()}},Fk=typeof Lk<"u"?Hk:Bk;function bS(e,t,n,r,a){var o=s.useContext(Rf),c=o.cache,u=[e].concat(ke(t)),f=w0(u),d=Fk([f]),h=function(x){c.opUpdate(f,function(C){var y=C||[void 0,void 0],w=ce(y,2),$=w[0],E=$===void 0?0:$,O=w[1],I=O,j=I||n(),M=[E,j];return x?x(M):M})};s.useMemo(function(){h()},[f]);var v=c.opGet(f),g=v[1];return Ak(function(){a?.(g)},function(b){return h(function(x){var C=ce(x,2),y=C[0],w=C[1];return b&&y===0&&a?.(g),[y+1,w]}),function(){c.opUpdate(f,function(x){var C=x||[],y=ce(C,2),w=y[0],$=w===void 0?0:w,E=y[1],O=$-1;return O===0?(d(function(){(b||!c.opGet(f))&&r?.(E,!1)}),null):[$-1,E]})}},[f]),g}var Vk={},Kk="css",ps=new Map;function Uk(e){ps.set(e,(ps.get(e)||0)+1)}function Wk(e,t){if(typeof document<"u"){var n=document.querySelectorAll("style[".concat(Jc,'="').concat(e,'"]'));n.forEach(function(r){if(r[Tl]===t){var a;(a=r.parentNode)===null||a===void 0||a.removeChild(r)}})}}var qk=0;function Yk(e,t){ps.set(e,(ps.get(e)||0)-1);var n=new Set;ps.forEach(function(r,a){r<=0&&n.add(a)}),ps.size-n.size>qk&&n.forEach(function(r){Wk(r,t),ps.delete(r)})}var Gk=function(t,n,r,a){var o=r.getDerivativeToken(t),c=ee(ee({},o),n);return a&&(c=a(c)),c},XR="token";function Xk(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=s.useContext(Rf),a=r.cache.instanceId,o=r.container,c=n.salt,u=c===void 0?"":c,f=n.override,d=f===void 0?Vk:f,h=n.formatToken,v=n.getComputedToken,g=n.cssVar,b=Tk(function(){return Object.assign.apply(Object,[{}].concat(ke(t)))},t),x=Vd(b),C=Vd(d),y=g?Vd(g):"",w=bS(XR,[u,e.id,x,C,y],function(){var $,E=v?v(b,d,e):Gk(b,d,e,h),O=ee({},E),I="";if(g){var j=GR(E,g.key,{prefix:g.prefix,ignore:g.ignore,unitless:g.unitless,preserve:g.preserve}),M=ce(j,2);E=M[0],I=M[1]}var D=C_(E,u);E._tokenKey=D,O._tokenKey=C_(O,u);var N=($=g?.key)!==null&&$!==void 0?$:D;E._themeKey=N,Uk(N);var P="".concat(Kk,"-").concat(af(D));return E._hashId=P,[E,P,O,I,g?.key||""]},function($){Yk($[0]._themeKey,a)},function($){var E=ce($,4),O=E[0],I=E[3];if(g&&I){var j=Bo(I,af("css-variables-".concat(O._themeKey)),{mark:ki,prepend:"queue",attachTo:o,priority:-999});j[Tl]=a,j.setAttribute(Jc,O._themeKey)}});return w}var Qk=function(t,n,r){var a=ce(t,5),o=a[2],c=a[3],u=a[4],f=r||{},d=f.plain;if(!c)return null;var h=o._tokenKey,v=-999,g={"data-rc-order":"prependQueue","data-rc-priority":"".concat(v)},b=dv(c,u,h,g,d);return[v,h,b]},Zk={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},QR="comm",ZR="rule",JR="decl",Jk="@import",eA="@namespace",tA="@keyframes",nA="@layer",eN=Math.abs,yS=String.fromCharCode;function tN(e){return e.trim()}function zh(e,t,n){return e.replace(t,n)}function rA(e,t,n){return e.indexOf(t,n)}function Fc(e,t){return e.charCodeAt(t)|0}function eu(e,t,n){return e.slice(t,n)}function ao(e){return e.length}function aA(e){return e.length}function oh(e,t){return t.push(e),e}var Hv=1,tu=1,nN=0,$i=0,ea=0,ou="";function xS(e,t,n,r,a,o,c,u){return{value:e,root:t,parent:n,type:r,props:a,children:o,line:Hv,column:tu,length:c,return:"",siblings:u}}function iA(){return ea}function oA(){return ea=$i>0?Fc(ou,--$i):0,tu--,ea===10&&(tu=1,Hv--),ea}function Ai(){return ea=$i2||lf(ea)>3?"":" "}function uA(e,t){for(;--t&&Ai()&&!(ea<48||ea>102||ea>57&&ea<65||ea>70&&ea<97););return Bv(e,Lh()+(t<6&&Dl()==32&&Ai()==32))}function _0(e){for(;Ai();)switch(ea){case e:return $i;case 34:case 39:e!==34&&e!==39&&_0(ea);break;case 40:e===41&&_0(e);break;case 92:Ai();break}return $i}function dA(e,t){for(;Ai()&&e+ea!==57;)if(e+ea===84&&Dl()===47)break;return"/*"+Bv(t,$i-1)+"*"+yS(e===47?e:Ai())}function fA(e){for(;!lf(Dl());)Ai();return Bv(e,$i)}function mA(e){return sA(Hh("",null,null,null,[""],e=lA(e),0,[0],e))}function Hh(e,t,n,r,a,o,c,u,f){for(var d=0,h=0,v=c,g=0,b=0,x=0,C=1,y=1,w=1,$=0,E="",O=a,I=o,j=r,M=E;y;)switch(x=$,$=Ai()){case 40:if(x!=108&&Fc(M,v-1)==58){rA(M+=zh(ny($),"&","&\f"),"&\f",eN(d?u[d-1]:0))!=-1&&(w=-1);break}case 34:case 39:case 91:M+=ny($);break;case 9:case 10:case 13:case 32:M+=cA(x);break;case 92:M+=uA(Lh()-1,7);continue;case 47:switch(Dl()){case 42:case 47:oh(hA(dA(Ai(),Lh()),t,n,f),f),(lf(x||1)==5||lf(Dl()||1)==5)&&ao(M)&&eu(M,-1,void 0)!==" "&&(M+=" ");break;default:M+="/"}break;case 123*C:u[d++]=ao(M)*w;case 125*C:case 59:case 0:switch($){case 0:case 125:y=0;case 59+h:w==-1&&(M=zh(M,/\f/g,"")),b>0&&(ao(M)-v||C===0&&x===47)&&oh(b>32?__(M+";",r,n,v-1,f):__(zh(M," ","")+";",r,n,v-2,f),f);break;case 59:M+=";";default:if(oh(j=E_(M,t,n,d,h,a,u,E,O=[],I=[],v,o),o),$===123)if(h===0)Hh(M,t,j,j,O,o,v,u,I);else{switch(g){case 99:if(Fc(M,3)===110)break;case 108:if(Fc(M,2)===97)break;default:h=0;case 100:case 109:case 115:}h?Hh(e,j,j,r&&oh(E_(e,j,j,0,0,a,u,E,a,O=[],v,I),I),a,I,v,u,r?O:I):Hh(M,j,j,j,[""],I,0,u,I)}}d=h=b=0,C=w=1,E=M="",v=c;break;case 58:v=1+ao(M),b=x;default:if(C<1){if($==123)--C;else if($==125&&C++==0&&oA()==125)continue}switch(M+=yS($),$*C){case 38:w=h>0?1:(M+="\f",-1);break;case 44:u[d++]=(ao(M)-1)*w,w=1;break;case 64:Dl()===45&&(M+=ny(Ai())),g=Dl(),h=v=ao(E=M+=fA(Lh())),$++;break;case 45:x===45&&ao(M)==2&&(C=0)}}return o}function E_(e,t,n,r,a,o,c,u,f,d,h,v){for(var g=a-1,b=a===0?o:[""],x=aA(b),C=0,y=0,w=0;C0?b[$]+" "+E:zh(E,/&\f/g,b[$])))&&(f[w++]=O);return xS(e,t,n,a===0?ZR:u,f,d,h,v)}function hA(e,t,n,r){return xS(e,t,n,QR,yS(iA()),eu(e,2,-2),0,r)}function __(e,t,n,r,a){return xS(e,t,n,JR,eu(e,0,r),eu(e,r+1,-1),r,a)}function O0(e,t){for(var n="",r=0;r1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{root:!0,parentSelectors:[]},a=r.root,o=r.injectHash,c=r.parentSelectors,u=n.hashId,f=n.layer;n.path;var d=n.hashPriority,h=n.transformers,v=h===void 0?[]:h;n.linters;var g="",b={};function x(w){var $=w.getName(u);if(!b[$]){var E=e(w.style,n,{root:!1,parentSelectors:c}),O=ce(E,1),I=O[0];b[$]="@keyframes ".concat(w.getName(u)).concat(I)}}function C(w){var $=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return w.forEach(function(E){Array.isArray(E)?C(E,$):E&&$.push(E)}),$}var y=C(Array.isArray(t)?t:[t]);return y.forEach(function(w){var $=typeof w=="string"&&!a?{}:w;if(typeof $=="string")g+="".concat($,` +`);else if($._keyframe)x($);else{var E=v.reduce(function(O,I){var j;return(I==null||(j=I.visit)===null||j===void 0?void 0:j.call(I,O))||O},$);Object.keys(E).forEach(function(O){var I=E[O];if(jt(I)==="object"&&I&&(O!=="animationName"||!I._keyframe)&&!xA(I)){var j=!1,M=O.trim(),D=!1;(a||o)&&u?M.startsWith("@")?j=!0:M==="&"?M=I_("",u,d):M=I_(O,u,d):a&&!u&&(M==="&"||M==="")&&(M="",D=!0);var N=e(I,n,{root:D,injectHash:j,parentSelectors:[].concat(ke(c),[M])}),P=ce(N,2),A=P[0],F=P[1];b=ee(ee({},b),F),g+="".concat(M).concat(A)}else{let L=function(T,z){var V=T.replace(/[A-Z]/g,function(G){return"-".concat(G.toLowerCase())}),q=z;!Zk[T]&&typeof q=="number"&&q!==0&&(q="".concat(q,"px")),T==="animationName"&&z!==null&&z!==void 0&&z._keyframe&&(x(z),q=z.getName(u)),g+="".concat(V,":").concat(q,";")};var H,k=(H=I?.value)!==null&&H!==void 0?H:I;jt(I)==="object"&&I!==null&&I!==void 0&&I[iN]&&Array.isArray(k)?k.forEach(function(T){L(O,T)}):L(O,k)}})}}),a?f&&(g&&(g="@layer ".concat(f.name," {").concat(g,"}")),f.dependencies&&(b["@layer ".concat(f.name)]=f.dependencies.map(function(w){return"@layer ".concat(w,", ").concat(f.name,";")}).join(` +`))):g="{".concat(g,"}"),[g,b]};function oN(e,t){return af("".concat(e.join("%")).concat(t))}function CA(){return null}var lN="style";function I0(e,t){var n=e.token,r=e.path,a=e.hashId,o=e.layer,c=e.nonce,u=e.clientOnly,f=e.order,d=f===void 0?0:f,h=s.useContext(Rf),v=h.autoClear;h.mock;var g=h.defaultCache,b=h.hashPriority,x=h.container,C=h.ssrInline,y=h.transformers,w=h.linters,$=h.cache,E=h.layer,O=n._tokenKey,I=[O];E&&I.push("layer"),I.push.apply(I,ke(r));var j=E0,M=bS(lN,I,function(){var F=I.join("|");if(pA(F)){var H=bA(F),k=ce(H,2),L=k[0],T=k[1];if(L)return[L,O,T,{},u,d]}var z=t(),V=SA(z,{hashId:a,hashPriority:b,layer:E?o:void 0,path:r.join("-"),transformers:y,linters:w}),q=ce(V,2),G=q[0],B=q[1],U=Bh(G),K=oN(I,U);return[U,O,K,B,u,d]},function(F,H){var k=ce(F,3),L=k[2];(H||v)&&E0&&of(L,{mark:ki,attachTo:x})},function(F){var H=ce(F,4),k=H[0];H[1];var L=H[2],T=H[3];if(j&&k!==rN){var z={mark:ki,prepend:E?!1:"queue",attachTo:x,priority:d},V=typeof c=="function"?c():c;V&&(z.csp={nonce:V});var q=[],G=[];Object.keys(T).forEach(function(U){U.startsWith("@layer")?q.push(U):G.push(U)}),q.forEach(function(U){Bo(Bh(T[U]),"_layer-".concat(U),ee(ee({},z),{},{prepend:!0}))});var B=Bo(k,L,z);B[Tl]=$.instanceId,B.setAttribute(Jc,O),G.forEach(function(U){Bo(Bh(T[U]),"_effect-".concat(U),z)})}}),D=ce(M,3),N=D[0],P=D[1],A=D[2];return function(F){var H;return!C||j||!g?H=s.createElement(CA,null):H=s.createElement("style",Me({},X(X({},Jc,P),ki,A),{dangerouslySetInnerHTML:{__html:N}})),s.createElement(s.Fragment,null,H,F)}}var wA=function(t,n,r){var a=ce(t,6),o=a[0],c=a[1],u=a[2],f=a[3],d=a[4],h=a[5],v=r||{},g=v.plain;if(d)return null;var b=o,x={"data-rc-order":"prependQueue","data-rc-priority":"".concat(h)};return b=dv(o,c,u,x,g),f&&Object.keys(f).forEach(function(C){if(!n[C]){n[C]=!0;var y=Bh(f[C]),w=dv(y,c,"_effect-".concat(C),x,g);C.startsWith("@layer")?b=w+b:b+=w}}),[h,u,b]},sN="cssVar",$A=function(t,n){var r=t.key,a=t.prefix,o=t.unitless,c=t.ignore,u=t.token,f=t.scope,d=f===void 0?"":f,h=s.useContext(Rf),v=h.cache.instanceId,g=h.container,b=u._tokenKey,x=[].concat(ke(t.path),[r,d,b]),C=bS(sN,x,function(){var y=n(),w=GR(y,r,{prefix:a,unitless:o,ignore:c,scope:d}),$=ce(w,2),E=$[0],O=$[1],I=oN(x,O);return[E,O,I,r]},function(y){var w=ce(y,3),$=w[2];E0&&of($,{mark:ki,attachTo:g})},function(y){var w=ce(y,3),$=w[1],E=w[2];if($){var O=Bo($,E,{mark:ki,prepend:"queue",attachTo:g,priority:-999});O[Tl]=v,O.setAttribute(Jc,r)}});return C},EA=function(t,n,r){var a=ce(t,4),o=a[1],c=a[2],u=a[3],f=r||{},d=f.plain;if(!o)return null;var h=-999,v={"data-rc-order":"prependQueue","data-rc-priority":"".concat(h)},g=dv(o,u,c,v,d);return[h,c,g]};X(X(X({},lN,wA),XR,Qk),sN,EA);var jn=(function(){function e(t,n){Sr(this,e),X(this,"name",void 0),X(this,"style",void 0),X(this,"_keyframe",!0),this.name=t,this.style=n}return Cr(e,[{key:"getName",value:function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return n?"".concat(n,"-").concat(this.name):this.name}}]),e})();function Sc(e){return e.notSplit=!0,e}Sc(["borderTop","borderBottom"]),Sc(["borderTop"]),Sc(["borderBottom"]),Sc(["borderLeft","borderRight"]),Sc(["borderLeft"]),Sc(["borderRight"]);var SS=s.createContext({});function cN(e){return VR(e)||LR(e)||hS(e)||KR()}function Aa(e,t){for(var n=e,r=0;r3&&arguments[3]!==void 0?arguments[3]:!1;return t.length&&r&&n===void 0&&!Aa(e,t.slice(0,-1))?e:uN(e,t,n,r)}function _A(e){return jt(e)==="object"&&e!==null&&Object.getPrototypeOf(e)===Object.prototype}function R_(e){return Array.isArray(e)?[]:{}}var OA=typeof Reflect>"u"?Object.keys:Reflect.ownKeys;function kc(){for(var e=arguments.length,t=new Array(e),n=0;n{const e=()=>{};return e.deprecated=IA,e},dN=s.createContext(void 0);var fN={items_per_page:"/ page",jump_to:"Go to",jump_to_confirm:"confirm",page:"Page",prev_page:"Previous Page",next_page:"Next Page",prev_5:"Previous 5 Pages",next_5:"Next 5 Pages",prev_3:"Previous 3 Pages",next_3:"Next 3 Pages",page_size:"Page Size"},NA={yearFormat:"YYYY",dayFormat:"D",cellMeridiemFormat:"A",monthBeforeYear:!0},MA=ee(ee({},NA),{},{locale:"en_US",today:"Today",now:"Now",backToToday:"Back to today",ok:"OK",clear:"Clear",week:"Week",month:"Month",year:"Year",timeSelect:"select time",dateSelect:"select date",weekSelect:"Choose a week",monthSelect:"Choose a month",yearSelect:"Choose a year",decadeSelect:"Choose a decade",dateFormat:"M/D/YYYY",dateTimeFormat:"M/D/YYYY HH:mm:ss",previousMonth:"Previous month (PageUp)",nextMonth:"Next month (PageDown)",previousYear:"Last year (Control + left)",nextYear:"Next year (Control + right)",previousDecade:"Last decade",nextDecade:"Next decade",previousCentury:"Last century",nextCentury:"Next century"});const mN={placeholder:"Select time",rangePlaceholder:["Start time","End time"]},fv={lang:Object.assign({placeholder:"Select date",yearPlaceholder:"Select year",quarterPlaceholder:"Select quarter",monthPlaceholder:"Select month",weekPlaceholder:"Select week",rangePlaceholder:["Start date","End date"],rangeYearPlaceholder:["Start year","End year"],rangeQuarterPlaceholder:["Start quarter","End quarter"],rangeMonthPlaceholder:["Start month","End month"],rangeWeekPlaceholder:["Start week","End week"]},MA),timePickerLocale:Object.assign({},mN)},ti="${label} is not a valid ${type}",lo={locale:"en",Pagination:fN,DatePicker:fv,TimePicker:mN,Calendar:fv,global:{placeholder:"Please select",close:"Close"},Table:{filterTitle:"Filter menu",filterConfirm:"OK",filterReset:"Reset",filterEmptyText:"No filters",filterCheckAll:"Select all items",filterSearchPlaceholder:"Search in filters",emptyText:"No data",selectAll:"Select current page",selectInvert:"Invert current page",selectNone:"Clear all data",selectionAll:"Select all data",sortTitle:"Sort",expand:"Expand row",collapse:"Collapse row",triggerDesc:"Click to sort descending",triggerAsc:"Click to sort ascending",cancelSort:"Click to cancel sorting"},Tour:{Next:"Next",Previous:"Previous",Finish:"Finish"},Modal:{okText:"OK",cancelText:"Cancel",justOkText:"OK"},Popconfirm:{okText:"OK",cancelText:"Cancel"},Transfer:{titles:["",""],searchPlaceholder:"Search here",itemUnit:"item",itemsUnit:"items",remove:"Remove",selectCurrent:"Select current page",removeCurrent:"Remove current page",selectAll:"Select all data",deselectAll:"Deselect all data",removeAll:"Remove all data",selectInvert:"Invert current page"},Upload:{uploading:"Uploading...",removeFile:"Remove file",uploadError:"Upload error",previewFile:"Preview file",downloadFile:"Download file"},Empty:{description:"No data"},Icon:{icon:"icon"},Text:{edit:"Edit",copy:"Copy",copied:"Copied",expand:"Expand",collapse:"Collapse"},Form:{optional:"(optional)",defaultValidateMessages:{default:"Field validation error for ${label}",required:"Please enter ${label}",enum:"${label} must be one of [${enum}]",whitespace:"${label} cannot be a blank character",date:{format:"${label} date format is invalid",parse:"${label} cannot be converted to a date",invalid:"${label} is an invalid date"},types:{string:ti,method:ti,array:ti,object:ti,number:ti,date:ti,boolean:ti,integer:ti,float:ti,regexp:ti,email:ti,url:ti,hex:ti},string:{len:"${label} must be ${len} characters",min:"${label} must be at least ${min} characters",max:"${label} must be up to ${max} characters",range:"${label} must be between ${min}-${max} characters"},number:{len:"${label} must be equal to ${len}",min:"${label} must be minimum ${min}",max:"${label} must be maximum ${max}",range:"${label} must be between ${min}-${max}"},array:{len:"Must be ${len} ${label}",min:"At least ${min} ${label}",max:"At most ${max} ${label}",range:"The amount of ${label} must be between ${min}-${max}"},pattern:{mismatch:"${label} does not match the pattern ${pattern}"}}},Image:{preview:"Preview"},QRCode:{expired:"QR code expired",refresh:"Refresh",scanned:"Scanned"},ColorPicker:{presetEmpty:"Empty",transparent:"Transparent",singleColor:"Single",gradientColor:"Gradient"}};Object.assign({},lo.Modal);let Fh=[];const N_=()=>Fh.reduce((e,t)=>Object.assign(Object.assign({},e),t),lo.Modal);function jA(e){if(e){const t=Object.assign({},e);return Fh.push(t),N_(),()=>{Fh=Fh.filter(n=>n!==t),N_()}}Object.assign({},lo.Modal)}const CS=s.createContext(void 0),ho=(e,t)=>{const n=s.useContext(CS),r=s.useMemo(()=>{var o;const c=t||lo[e],u=(o=n?.[e])!==null&&o!==void 0?o:{};return Object.assign(Object.assign({},typeof c=="function"?c():c),u||{})},[e,t,n]),a=s.useMemo(()=>{const o=n?.locale;return n?.exist&&!o?lo.locale:o},[n]);return[r,a]},TA="internalMark",DA=e=>{const{locale:t={},children:n,_ANT_MARK__:r}=e;s.useEffect(()=>jA(t?.Modal),[t]);const a=s.useMemo(()=>Object.assign(Object.assign({},t),{exist:!0}),[t]);return s.createElement(CS.Provider,{value:a},n)},hN={blue:"#1677FF",purple:"#722ED1",cyan:"#13C2C2",green:"#52C41A",magenta:"#EB2F96",pink:"#EB2F96",red:"#F5222D",orange:"#FA8C16",yellow:"#FADB14",volcano:"#FA541C",geekblue:"#2F54EB",gold:"#FAAD14",lime:"#A0D911"},sf=Object.assign(Object.assign({},hN),{colorPrimary:"#1677ff",colorSuccess:"#52c41a",colorWarning:"#faad14",colorError:"#ff4d4f",colorInfo:"#1677ff",colorLink:"",colorTextBase:"",colorBgBase:"",fontFamily:`-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, +'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', +'Noto Color Emoji'`,fontFamilyCode:"'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace",fontSize:14,lineWidth:1,lineType:"solid",motionUnit:.1,motionBase:0,motionEaseOutCirc:"cubic-bezier(0.08, 0.82, 0.17, 1)",motionEaseInOutCirc:"cubic-bezier(0.78, 0.14, 0.15, 0.86)",motionEaseOut:"cubic-bezier(0.215, 0.61, 0.355, 1)",motionEaseInOut:"cubic-bezier(0.645, 0.045, 0.355, 1)",motionEaseOutBack:"cubic-bezier(0.12, 0.4, 0.29, 1.46)",motionEaseInBack:"cubic-bezier(0.71, -0.46, 0.88, 0.6)",motionEaseInQuint:"cubic-bezier(0.755, 0.05, 0.855, 0.06)",motionEaseOutQuint:"cubic-bezier(0.23, 1, 0.32, 1)",borderRadius:6,sizeUnit:4,sizeStep:4,sizePopupArrow:16,controlHeight:32,zIndexBase:0,zIndexPopupBase:1e3,opacityImage:1,wireframe:!1,motion:!0}),ua=Math.round;function ry(e,t){const n=e.replace(/^[^(]*\((.*)/,"$1").replace(/\).*/,"").match(/\d*\.?\d+%?/g)||[],r=n.map(a=>parseFloat(a));for(let a=0;a<3;a+=1)r[a]=t(r[a]||0,n[a]||"",a);return n[3]?r[3]=n[3].includes("%")?r[3]/100:r[3]:r[3]=1,r}const M_=(e,t,n)=>n===0?e:e/100;function yd(e,t){const n=t||255;return e>n?n:e<0?0:e}let Pn=class vN{constructor(t){X(this,"isValid",!0),X(this,"r",0),X(this,"g",0),X(this,"b",0),X(this,"a",1),X(this,"_h",void 0),X(this,"_s",void 0),X(this,"_l",void 0),X(this,"_v",void 0),X(this,"_max",void 0),X(this,"_min",void 0),X(this,"_brightness",void 0);function n(r){return r[0]in t&&r[1]in t&&r[2]in t}if(t)if(typeof t=="string"){let a=function(o){return r.startsWith(o)};const r=t.trim();/^#?[A-F\d]{3,8}$/i.test(r)?this.fromHexString(r):a("rgb")?this.fromRgbString(r):a("hsl")?this.fromHslString(r):(a("hsv")||a("hsb"))&&this.fromHsvString(r)}else if(t instanceof vN)this.r=t.r,this.g=t.g,this.b=t.b,this.a=t.a,this._h=t._h,this._s=t._s,this._l=t._l,this._v=t._v;else if(n("rgb"))this.r=yd(t.r),this.g=yd(t.g),this.b=yd(t.b),this.a=typeof t.a=="number"?yd(t.a,1):1;else if(n("hsl"))this.fromHsl(t);else if(n("hsv"))this.fromHsv(t);else throw new Error("@ant-design/fast-color: unsupported input "+JSON.stringify(t))}setR(t){return this._sc("r",t)}setG(t){return this._sc("g",t)}setB(t){return this._sc("b",t)}setA(t){return this._sc("a",t,1)}setHue(t){const n=this.toHsv();return n.h=t,this._c(n)}getLuminance(){function t(o){const c=o/255;return c<=.03928?c/12.92:Math.pow((c+.055)/1.055,2.4)}const n=t(this.r),r=t(this.g),a=t(this.b);return .2126*n+.7152*r+.0722*a}getHue(){if(typeof this._h>"u"){const t=this.getMax()-this.getMin();t===0?this._h=0:this._h=ua(60*(this.r===this.getMax()?(this.g-this.b)/t+(this.g"u"){const t=this.getMax()-this.getMin();t===0?this._s=0:this._s=t/this.getMax()}return this._s}getLightness(){return typeof this._l>"u"&&(this._l=(this.getMax()+this.getMin())/510),this._l}getValue(){return typeof this._v>"u"&&(this._v=this.getMax()/255),this._v}getBrightness(){return typeof this._brightness>"u"&&(this._brightness=(this.r*299+this.g*587+this.b*114)/1e3),this._brightness}darken(t=10){const n=this.getHue(),r=this.getSaturation();let a=this.getLightness()-t/100;return a<0&&(a=0),this._c({h:n,s:r,l:a,a:this.a})}lighten(t=10){const n=this.getHue(),r=this.getSaturation();let a=this.getLightness()+t/100;return a>1&&(a=1),this._c({h:n,s:r,l:a,a:this.a})}mix(t,n=50){const r=this._c(t),a=n/100,o=u=>(r[u]-this[u])*a+this[u],c={r:ua(o("r")),g:ua(o("g")),b:ua(o("b")),a:ua(o("a")*100)/100};return this._c(c)}tint(t=10){return this.mix({r:255,g:255,b:255,a:1},t)}shade(t=10){return this.mix({r:0,g:0,b:0,a:1},t)}onBackground(t){const n=this._c(t),r=this.a+n.a*(1-this.a),a=o=>ua((this[o]*this.a+n[o]*n.a*(1-this.a))/r);return this._c({r:a("r"),g:a("g"),b:a("b"),a:r})}isDark(){return this.getBrightness()<128}isLight(){return this.getBrightness()>=128}equals(t){return this.r===t.r&&this.g===t.g&&this.b===t.b&&this.a===t.a}clone(){return this._c(this)}toHexString(){let t="#";const n=(this.r||0).toString(16);t+=n.length===2?n:"0"+n;const r=(this.g||0).toString(16);t+=r.length===2?r:"0"+r;const a=(this.b||0).toString(16);if(t+=a.length===2?a:"0"+a,typeof this.a=="number"&&this.a>=0&&this.a<1){const o=ua(this.a*255).toString(16);t+=o.length===2?o:"0"+o}return t}toHsl(){return{h:this.getHue(),s:this.getSaturation(),l:this.getLightness(),a:this.a}}toHslString(){const t=this.getHue(),n=ua(this.getSaturation()*100),r=ua(this.getLightness()*100);return this.a!==1?`hsla(${t},${n}%,${r}%,${this.a})`:`hsl(${t},${n}%,${r}%)`}toHsv(){return{h:this.getHue(),s:this.getSaturation(),v:this.getValue(),a:this.a}}toRgb(){return{r:this.r,g:this.g,b:this.b,a:this.a}}toRgbString(){return this.a!==1?`rgba(${this.r},${this.g},${this.b},${this.a})`:`rgb(${this.r},${this.g},${this.b})`}toString(){return this.toRgbString()}_sc(t,n,r){const a=this.clone();return a[t]=yd(n,r),a}_c(t){return new this.constructor(t)}getMax(){return typeof this._max>"u"&&(this._max=Math.max(this.r,this.g,this.b)),this._max}getMin(){return typeof this._min>"u"&&(this._min=Math.min(this.r,this.g,this.b)),this._min}fromHexString(t){const n=t.replace("#","");function r(a,o){return parseInt(n[a]+n[o||a],16)}n.length<6?(this.r=r(0),this.g=r(1),this.b=r(2),this.a=n[3]?r(3)/255:1):(this.r=r(0,1),this.g=r(2,3),this.b=r(4,5),this.a=n[6]?r(6,7)/255:1)}fromHsl({h:t,s:n,l:r,a}){if(this._h=t%360,this._s=n,this._l=r,this.a=typeof a=="number"?a:1,n<=0){const g=ua(r*255);this.r=g,this.g=g,this.b=g}let o=0,c=0,u=0;const f=t/60,d=(1-Math.abs(2*r-1))*n,h=d*(1-Math.abs(f%2-1));f>=0&&f<1?(o=d,c=h):f>=1&&f<2?(o=h,c=d):f>=2&&f<3?(c=d,u=h):f>=3&&f<4?(c=h,u=d):f>=4&&f<5?(o=h,u=d):f>=5&&f<6&&(o=d,u=h);const v=r-d/2;this.r=ua((o+v)*255),this.g=ua((c+v)*255),this.b=ua((u+v)*255)}fromHsv({h:t,s:n,v:r,a}){this._h=t%360,this._s=n,this._v=r,this.a=typeof a=="number"?a:1;const o=ua(r*255);if(this.r=o,this.g=o,this.b=o,n<=0)return;const c=t/60,u=Math.floor(c),f=c-u,d=ua(r*(1-n)*255),h=ua(r*(1-n*f)*255),v=ua(r*(1-n*(1-f))*255);switch(u){case 0:this.g=v,this.b=d;break;case 1:this.r=h,this.b=d;break;case 2:this.r=d,this.b=v;break;case 3:this.r=d,this.g=h;break;case 4:this.r=v,this.g=d;break;case 5:default:this.g=d,this.b=h;break}}fromHsvString(t){const n=ry(t,M_);this.fromHsv({h:n[0],s:n[1],v:n[2],a:n[3]})}fromHslString(t){const n=ry(t,M_);this.fromHsl({h:n[0],s:n[1],l:n[2],a:n[3]})}fromRgbString(t){const n=ry(t,(r,a)=>a.includes("%")?ua(r/100*255):r);this.r=n[0],this.g=n[1],this.b=n[2],this.a=n[3]}};var lh=2,j_=.16,PA=.05,kA=.05,AA=.15,gN=5,pN=4,zA=[{index:7,amount:15},{index:6,amount:25},{index:5,amount:30},{index:5,amount:45},{index:5,amount:65},{index:5,amount:85},{index:4,amount:90},{index:3,amount:95},{index:2,amount:97},{index:1,amount:98}];function T_(e,t,n){var r;return Math.round(e.h)>=60&&Math.round(e.h)<=240?r=n?Math.round(e.h)-lh*t:Math.round(e.h)+lh*t:r=n?Math.round(e.h)+lh*t:Math.round(e.h)-lh*t,r<0?r+=360:r>=360&&(r-=360),r}function D_(e,t,n){if(e.h===0&&e.s===0)return e.s;var r;return n?r=e.s-j_*t:t===pN?r=e.s+j_:r=e.s+PA*t,r>1&&(r=1),n&&t===gN&&r>.1&&(r=.1),r<.06&&(r=.06),Math.round(r*100)/100}function P_(e,t,n){var r;return n?r=e.v+kA*t:r=e.v-AA*t,r=Math.max(0,Math.min(1,r)),Math.round(r*100)/100}function cf(e){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=[],r=new Pn(e),a=r.toHsv(),o=gN;o>0;o-=1){var c=new Pn({h:T_(a,o,!0),s:D_(a,o,!0),v:P_(a,o,!0)});n.push(c)}n.push(r);for(var u=1;u<=pN;u+=1){var f=new Pn({h:T_(a,u),s:D_(a,u),v:P_(a,u)});n.push(f)}return t.theme==="dark"?zA.map(function(d){var h=d.index,v=d.amount;return new Pn(t.backgroundColor||"#141414").mix(n[h],v).toHexString()}):n.map(function(d){return d.toHexString()})}var Vc={red:"#F5222D",volcano:"#FA541C",orange:"#FA8C16",gold:"#FAAD14",yellow:"#FADB14",lime:"#A0D911",green:"#52C41A",cyan:"#13C2C2",blue:"#1677FF",geekblue:"#2F54EB",purple:"#722ED1",magenta:"#EB2F96",grey:"#666666"},R0=["#fff1f0","#ffccc7","#ffa39e","#ff7875","#ff4d4f","#f5222d","#cf1322","#a8071a","#820014","#5c0011"];R0.primary=R0[5];var N0=["#fff2e8","#ffd8bf","#ffbb96","#ff9c6e","#ff7a45","#fa541c","#d4380d","#ad2102","#871400","#610b00"];N0.primary=N0[5];var M0=["#fff7e6","#ffe7ba","#ffd591","#ffc069","#ffa940","#fa8c16","#d46b08","#ad4e00","#873800","#612500"];M0.primary=M0[5];var mv=["#fffbe6","#fff1b8","#ffe58f","#ffd666","#ffc53d","#faad14","#d48806","#ad6800","#874d00","#613400"];mv.primary=mv[5];var j0=["#feffe6","#ffffb8","#fffb8f","#fff566","#ffec3d","#fadb14","#d4b106","#ad8b00","#876800","#614700"];j0.primary=j0[5];var T0=["#fcffe6","#f4ffb8","#eaff8f","#d3f261","#bae637","#a0d911","#7cb305","#5b8c00","#3f6600","#254000"];T0.primary=T0[5];var D0=["#f6ffed","#d9f7be","#b7eb8f","#95de64","#73d13d","#52c41a","#389e0d","#237804","#135200","#092b00"];D0.primary=D0[5];var P0=["#e6fffb","#b5f5ec","#87e8de","#5cdbd3","#36cfc9","#13c2c2","#08979c","#006d75","#00474f","#002329"];P0.primary=P0[5];var nu=["#e6f4ff","#bae0ff","#91caff","#69b1ff","#4096ff","#1677ff","#0958d9","#003eb3","#002c8c","#001d66"];nu.primary=nu[5];var k0=["#f0f5ff","#d6e4ff","#adc6ff","#85a5ff","#597ef7","#2f54eb","#1d39c4","#10239e","#061178","#030852"];k0.primary=k0[5];var A0=["#f9f0ff","#efdbff","#d3adf7","#b37feb","#9254de","#722ed1","#531dab","#391085","#22075e","#120338"];A0.primary=A0[5];var z0=["#fff0f6","#ffd6e7","#ffadd2","#ff85c0","#f759ab","#eb2f96","#c41d7f","#9e1068","#780650","#520339"];z0.primary=z0[5];var L0=["#a6a6a6","#999999","#8c8c8c","#808080","#737373","#666666","#404040","#1a1a1a","#000000","#000000"];L0.primary=L0[5];var ay={red:R0,volcano:N0,orange:M0,gold:mv,yellow:j0,lime:T0,green:D0,cyan:P0,blue:nu,geekblue:k0,purple:A0,magenta:z0,grey:L0};function LA(e,{generateColorPalettes:t,generateNeutralColorPalettes:n}){const{colorSuccess:r,colorWarning:a,colorError:o,colorInfo:c,colorPrimary:u,colorBgBase:f,colorTextBase:d}=e,h=t(u),v=t(r),g=t(a),b=t(o),x=t(c),C=n(f,d),y=e.colorLink||e.colorInfo,w=t(y),$=new Pn(b[1]).mix(new Pn(b[3]),50).toHexString();return Object.assign(Object.assign({},C),{colorPrimaryBg:h[1],colorPrimaryBgHover:h[2],colorPrimaryBorder:h[3],colorPrimaryBorderHover:h[4],colorPrimaryHover:h[5],colorPrimary:h[6],colorPrimaryActive:h[7],colorPrimaryTextHover:h[8],colorPrimaryText:h[9],colorPrimaryTextActive:h[10],colorSuccessBg:v[1],colorSuccessBgHover:v[2],colorSuccessBorder:v[3],colorSuccessBorderHover:v[4],colorSuccessHover:v[4],colorSuccess:v[6],colorSuccessActive:v[7],colorSuccessTextHover:v[8],colorSuccessText:v[9],colorSuccessTextActive:v[10],colorErrorBg:b[1],colorErrorBgHover:b[2],colorErrorBgFilledHover:$,colorErrorBgActive:b[3],colorErrorBorder:b[3],colorErrorBorderHover:b[4],colorErrorHover:b[5],colorError:b[6],colorErrorActive:b[7],colorErrorTextHover:b[8],colorErrorText:b[9],colorErrorTextActive:b[10],colorWarningBg:g[1],colorWarningBgHover:g[2],colorWarningBorder:g[3],colorWarningBorderHover:g[4],colorWarningHover:g[4],colorWarning:g[6],colorWarningActive:g[7],colorWarningTextHover:g[8],colorWarningText:g[9],colorWarningTextActive:g[10],colorInfoBg:x[1],colorInfoBgHover:x[2],colorInfoBorder:x[3],colorInfoBorderHover:x[4],colorInfoHover:x[4],colorInfo:x[6],colorInfoActive:x[7],colorInfoTextHover:x[8],colorInfoText:x[9],colorInfoTextActive:x[10],colorLinkHover:w[4],colorLink:w[6],colorLinkActive:w[7],colorBgMask:new Pn("#000").setA(.45).toRgbString(),colorWhite:"#fff"})}const HA=e=>{let t=e,n=e,r=e,a=e;return e<6&&e>=5?t=e+1:e<16&&e>=6?t=e+2:e>=16&&(t=16),e<7&&e>=5?n=4:e<8&&e>=7?n=5:e<14&&e>=8?n=6:e<16&&e>=14?n=7:e>=16&&(n=8),e<6&&e>=2?r=1:e>=6&&(r=2),e>4&&e<8?a=4:e>=8&&(a=6),{borderRadius:e,borderRadiusXS:r,borderRadiusSM:n,borderRadiusLG:t,borderRadiusOuter:a}};function BA(e){const{motionUnit:t,motionBase:n,borderRadius:r,lineWidth:a}=e;return Object.assign({motionDurationFast:`${(n+t).toFixed(1)}s`,motionDurationMid:`${(n+t*2).toFixed(1)}s`,motionDurationSlow:`${(n+t*3).toFixed(1)}s`,lineWidthBold:a+1},HA(r))}const FA=e=>{const{controlHeight:t}=e;return{controlHeightSM:t*.75,controlHeightXS:t*.5,controlHeightLG:t*1.25}};function Vh(e){return(e+8)/e}function VA(e){const t=Array.from({length:10}).map((n,r)=>{const a=r-1,o=e*Math.pow(Math.E,a/5),c=r>1?Math.floor(o):Math.ceil(o);return Math.floor(c/2)*2});return t[1]=e,t.map(n=>({size:n,lineHeight:Vh(n)}))}const KA=e=>{const t=VA(e),n=t.map(h=>h.size),r=t.map(h=>h.lineHeight),a=n[1],o=n[0],c=n[2],u=r[1],f=r[0],d=r[2];return{fontSizeSM:o,fontSize:a,fontSizeLG:c,fontSizeXL:n[3],fontSizeHeading1:n[6],fontSizeHeading2:n[5],fontSizeHeading3:n[4],fontSizeHeading4:n[3],fontSizeHeading5:n[2],lineHeight:u,lineHeightLG:d,lineHeightSM:f,fontHeight:Math.round(u*a),fontHeightLG:Math.round(d*c),fontHeightSM:Math.round(f*o),lineHeightHeading1:r[6],lineHeightHeading2:r[5],lineHeightHeading3:r[4],lineHeightHeading4:r[3],lineHeightHeading5:r[2]}};function UA(e){const{sizeUnit:t,sizeStep:n}=e;return{sizeXXL:t*(n+8),sizeXL:t*(n+4),sizeLG:t*(n+2),sizeMD:t*(n+1),sizeMS:t*n,size:t*n,sizeSM:t*(n-1),sizeXS:t*(n-2),sizeXXS:t*(n-3)}}const gi=(e,t)=>new Pn(e).setA(t).toRgbString(),xd=(e,t)=>new Pn(e).darken(t).toHexString(),WA=e=>{const t=cf(e);return{1:t[0],2:t[1],3:t[2],4:t[3],5:t[4],6:t[5],7:t[6],8:t[4],9:t[5],10:t[6]}},qA=(e,t)=>{const n=e||"#fff",r=t||"#000";return{colorBgBase:n,colorTextBase:r,colorText:gi(r,.88),colorTextSecondary:gi(r,.65),colorTextTertiary:gi(r,.45),colorTextQuaternary:gi(r,.25),colorFill:gi(r,.15),colorFillSecondary:gi(r,.06),colorFillTertiary:gi(r,.04),colorFillQuaternary:gi(r,.02),colorBgSolid:gi(r,1),colorBgSolidHover:gi(r,.75),colorBgSolidActive:gi(r,.95),colorBgLayout:xd(n,4),colorBgContainer:xd(n,0),colorBgElevated:xd(n,0),colorBgSpotlight:gi(r,.85),colorBgBlur:"transparent",colorBorder:xd(n,15),colorBorderSecondary:xd(n,6)}};function YA(e){Vc.pink=Vc.magenta,ay.pink=ay.magenta;const t=Object.keys(hN).map(n=>{const r=e[n]===Vc[n]?ay[n]:cf(e[n]);return Array.from({length:10},()=>1).reduce((a,o,c)=>(a[`${n}-${c+1}`]=r[c],a[`${n}${c+1}`]=r[c],a),{})}).reduce((n,r)=>(n=Object.assign(Object.assign({},n),r),n),{});return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},e),t),LA(e,{generateColorPalettes:WA,generateNeutralColorPalettes:qA})),KA(e.fontSize)),UA(e)),FA(e)),BA(e))}const bN=$0(YA),uf={token:sf,override:{override:sf},hashed:!0},yN=Se.createContext(uf),df="ant",Fv="anticon",GA=["outlined","borderless","filled","underlined"],XA=(e,t)=>t||(e?`${df}-${e}`:df),Wt=s.createContext({getPrefixCls:XA,iconPrefixCls:Fv}),{Consumer:zue}=Wt,k_={};function ga(e){const t=s.useContext(Wt),{getPrefixCls:n,direction:r,getPopupContainer:a}=t,o=t[e];return Object.assign(Object.assign({classNames:k_,styles:k_},o),{getPrefixCls:n,direction:r,getPopupContainer:a})}const QA=`-ant-${Date.now()}-${Math.random()}`;function ZA(e,t){const n={},r=(c,u)=>{let f=c.clone();return f=u?.(f)||f,f.toRgbString()},a=(c,u)=>{const f=new Pn(c),d=cf(f.toRgbString());n[`${u}-color`]=r(f),n[`${u}-color-disabled`]=d[1],n[`${u}-color-hover`]=d[4],n[`${u}-color-active`]=d[6],n[`${u}-color-outline`]=f.clone().setA(.2).toRgbString(),n[`${u}-color-deprecated-bg`]=d[0],n[`${u}-color-deprecated-border`]=d[2]};if(t.primaryColor){a(t.primaryColor,"primary");const c=new Pn(t.primaryColor),u=cf(c.toRgbString());u.forEach((d,h)=>{n[`primary-${h+1}`]=d}),n["primary-color-deprecated-l-35"]=r(c,d=>d.lighten(35)),n["primary-color-deprecated-l-20"]=r(c,d=>d.lighten(20)),n["primary-color-deprecated-t-20"]=r(c,d=>d.tint(20)),n["primary-color-deprecated-t-50"]=r(c,d=>d.tint(50)),n["primary-color-deprecated-f-12"]=r(c,d=>d.setA(d.a*.12));const f=new Pn(u[0]);n["primary-color-active-deprecated-f-30"]=r(f,d=>d.setA(d.a*.3)),n["primary-color-active-deprecated-d-02"]=r(f,d=>d.darken(2))}return t.successColor&&a(t.successColor,"success"),t.warningColor&&a(t.warningColor,"warning"),t.errorColor&&a(t.errorColor,"error"),t.infoColor&&a(t.infoColor,"info"),` + :root { + ${Object.keys(n).map(c=>`--${e}-${c}: ${n[c]};`).join(` +`)} + } + `.trim()}function JA(e,t){const n=ZA(e,t);wa()&&Bo(n,`${QA}-dynamic-theme`)}const ja=s.createContext(!1),xN=({children:e,disabled:t})=>{const n=s.useContext(ja);return s.createElement(ja.Provider,{value:t??n},e)},Is=s.createContext(void 0),ez=({children:e,size:t})=>{const n=s.useContext(Is);return s.createElement(Is.Provider,{value:t||n},e)};function tz(){const e=s.useContext(ja),t=s.useContext(Is);return{componentDisabled:e,componentSize:t}}var SN=Cr(function e(){Sr(this,e)}),CN="CALC_UNIT",nz=new RegExp(CN,"g");function iy(e){return typeof e=="number"?"".concat(e).concat(CN):e}var rz=(function(e){oi(n,e);var t=_i(n);function n(r,a){var o;Sr(this,n),o=t.call(this),X(St(o),"result",""),X(St(o),"unitlessCssVar",void 0),X(St(o),"lowPriority",void 0);var c=jt(r);return o.unitlessCssVar=a,r instanceof n?o.result="(".concat(r.result,")"):c==="number"?o.result=iy(r):c==="string"&&(o.result=r),o}return Cr(n,[{key:"add",value:function(a){return a instanceof n?this.result="".concat(this.result," + ").concat(a.getResult()):(typeof a=="number"||typeof a=="string")&&(this.result="".concat(this.result," + ").concat(iy(a))),this.lowPriority=!0,this}},{key:"sub",value:function(a){return a instanceof n?this.result="".concat(this.result," - ").concat(a.getResult()):(typeof a=="number"||typeof a=="string")&&(this.result="".concat(this.result," - ").concat(iy(a))),this.lowPriority=!0,this}},{key:"mul",value:function(a){return this.lowPriority&&(this.result="(".concat(this.result,")")),a instanceof n?this.result="".concat(this.result," * ").concat(a.getResult(!0)):(typeof a=="number"||typeof a=="string")&&(this.result="".concat(this.result," * ").concat(a)),this.lowPriority=!1,this}},{key:"div",value:function(a){return this.lowPriority&&(this.result="(".concat(this.result,")")),a instanceof n?this.result="".concat(this.result," / ").concat(a.getResult(!0)):(typeof a=="number"||typeof a=="string")&&(this.result="".concat(this.result," / ").concat(a)),this.lowPriority=!1,this}},{key:"getResult",value:function(a){return this.lowPriority||a?"(".concat(this.result,")"):this.result}},{key:"equal",value:function(a){var o=this,c=a||{},u=c.unit,f=!0;return typeof u=="boolean"?f=u:Array.from(this.unitlessCssVar).some(function(d){return o.result.includes(d)})&&(f=!1),this.result=this.result.replace(nz,f?"px":""),typeof this.lowPriority<"u"?"calc(".concat(this.result,")"):this.result}}]),n})(SN),az=(function(e){oi(n,e);var t=_i(n);function n(r){var a;return Sr(this,n),a=t.call(this),X(St(a),"result",0),r instanceof n?a.result=r.result:typeof r=="number"&&(a.result=r),a}return Cr(n,[{key:"add",value:function(a){return a instanceof n?this.result+=a.result:typeof a=="number"&&(this.result+=a),this}},{key:"sub",value:function(a){return a instanceof n?this.result-=a.result:typeof a=="number"&&(this.result-=a),this}},{key:"mul",value:function(a){return a instanceof n?this.result*=a.result:typeof a=="number"&&(this.result*=a),this}},{key:"div",value:function(a){return a instanceof n?this.result/=a.result:typeof a=="number"&&(this.result/=a),this}},{key:"equal",value:function(){return this.result}}]),n})(SN),iz=function(t,n){var r=t==="css"?rz:az;return function(a){return new r(a,n)}},A_=function(t,n){return"".concat([n,t.replace(/([A-Z]+)([A-Z][a-z]+)/g,"$1-$2").replace(/([a-z])([A-Z])/g,"$1-$2")].filter(Boolean).join("-"))};function pn(e){var t=s.useRef();t.current=e;var n=s.useCallback(function(){for(var r,a=arguments.length,o=new Array(a),c=0;c1e4){var r=Date.now();this.lastAccessBeat.forEach(function(a,o){r-a>cz&&(n.map.delete(o),n.lastAccessBeat.delete(o))}),this.accessBeat=0}}}]),e})(),B_=new uz;function dz(e,t){return Se.useMemo(function(){var n=B_.get(t);if(n)return n;var r=e();return B_.set(t,r),r},t)}var fz=function(){return{}};function mz(e){var t=e.useCSP,n=t===void 0?fz:t,r=e.useToken,a=e.usePrefix,o=e.getResetStyles,c=e.getCommonStyle,u=e.getCompUnitless;function f(g,b,x,C){var y=Array.isArray(g)?g[0]:g;function w(D){return"".concat(String(y)).concat(D.slice(0,1).toUpperCase()).concat(D.slice(1))}var $=C?.unitless||{},E=typeof u=="function"?u(g):{},O=ee(ee({},E),{},X({},w("zIndexPopup"),!0));Object.keys($).forEach(function(D){O[w(D)]=$[D]});var I=ee(ee({},C),{},{unitless:O,prefixToken:w}),j=h(g,b,x,I),M=d(y,x,I);return function(D){var N=arguments.length>1&&arguments[1]!==void 0?arguments[1]:D,P=j(D,N),A=ce(P,2),F=A[1],H=M(N),k=ce(H,2),L=k[0],T=k[1];return[L,F,T]}}function d(g,b,x){var C=x.unitless,y=x.injectStyle,w=y===void 0?!0:y,$=x.prefixToken,E=x.ignore,O=function(M){var D=M.rootCls,N=M.cssVar,P=N===void 0?{}:N,A=r(),F=A.realToken;return $A({path:[g],prefix:P.prefix,key:P.key,unitless:C,ignore:E,token:F,scope:D},function(){var H=H_(g,F,b),k=z_(g,F,H,{deprecatedTokens:x?.deprecatedTokens});return Object.keys(H).forEach(function(L){k[$(L)]=k[L],delete k[L]}),k}),null},I=function(M){var D=r(),N=D.cssVar;return[function(P){return w&&N?Se.createElement(Se.Fragment,null,Se.createElement(O,{rootCls:M,cssVar:N,component:g}),P):P},N?.key]};return I}function h(g,b,x){var C=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},y=Array.isArray(g)?g:[g,g],w=ce(y,1),$=w[0],E=y.join("-"),O=e.layer||{name:"antd"};return function(I){var j=arguments.length>1&&arguments[1]!==void 0?arguments[1]:I,M=r(),D=M.theme,N=M.realToken,P=M.hashId,A=M.token,F=M.cssVar,H=a(),k=H.rootPrefixCls,L=H.iconPrefixCls,T=n(),z=F?"css":"js",V=dz(function(){var Y=new Set;return F&&Object.keys(C.unitless||{}).forEach(function(Q){Y.add(Ah(Q,F.prefix)),Y.add(Ah(Q,A_($,F.prefix)))}),iz(z,Y)},[z,$,F?.prefix]),q=sz(z),G=q.max,B=q.min,U={theme:D,token:A,hashId:P,nonce:function(){return T.nonce},clientOnly:C.clientOnly,layer:O,order:C.order||-999};typeof o=="function"&&I0(ee(ee({},U),{},{clientOnly:!1,path:["Shared",k]}),function(){return o(A,{prefix:{rootPrefixCls:k,iconPrefixCls:L},csp:T})});var K=I0(ee(ee({},U),{},{path:[E,I,L]}),function(){if(C.injectStyle===!1)return[];var Y=lz(A),Q=Y.token,Z=Y.flush,ae=H_($,N,x),re=".".concat(I),ie=z_($,N,ae,{deprecatedTokens:C.deprecatedTokens});F&&ae&&jt(ae)==="object"&&Object.keys(ae).forEach(function(he){ae[he]="var(".concat(Ah(he,A_($,F.prefix)),")")});var ve=xn(Q,{componentCls:re,prefixCls:I,iconCls:".".concat(L),antCls:".".concat(k),calc:V,max:G,min:B},F?ae:ie),ue=b(ve,{hashId:P,prefixCls:I,rootPrefixCls:k,iconPrefixCls:L});Z($,ie);var oe=typeof c=="function"?c(ve,I,j,C.resetFont):null;return[C.resetStyle===!1?null:oe,ue]});return[K,P]}}function v(g,b,x){var C=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},y=h(g,b,x,ee({resetStyle:!1,order:-998},C)),w=function(E){var O=E.prefixCls,I=E.rootCls,j=I===void 0?O:I;return y(O,j),null};return w}return{genStyleHooks:f,genSubStyleComponent:v,genComponentStyleHook:h}}const Rs=["blue","purple","cyan","green","magenta","pink","red","orange","yellow","volcano","geekblue","lime","gold"],hz="5.27.6";function ly(e){return e>=0&&e<=255}function Pd(e,t){const{r:n,g:r,b:a,a:o}=new Pn(e).toRgb();if(o<1)return e;const{r:c,g:u,b:f}=new Pn(t).toRgb();for(let d=.01;d<=1;d+=.01){const h=Math.round((n-c*(1-d))/d),v=Math.round((r-u*(1-d))/d),g=Math.round((a-f*(1-d))/d);if(ly(h)&&ly(v)&&ly(g))return new Pn({r:h,g:v,b:g,a:Math.round(d*100)/100}).toRgbString()}return new Pn({r:n,g:r,b:a,a:1}).toRgbString()}var vz=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,r=Object.getOwnPropertySymbols(e);a{delete r[g]});const a=Object.assign(Object.assign({},n),r),o=480,c=576,u=768,f=992,d=1200,h=1600;return a.motion===!1&&(a.motionDurationFast="0s",a.motionDurationMid="0s",a.motionDurationSlow="0s"),Object.assign(Object.assign(Object.assign({},a),{colorFillContent:a.colorFillSecondary,colorFillContentHover:a.colorFill,colorFillAlter:a.colorFillQuaternary,colorBgContainerDisabled:a.colorFillTertiary,colorBorderBg:a.colorBgContainer,colorSplit:Pd(a.colorBorderSecondary,a.colorBgContainer),colorTextPlaceholder:a.colorTextQuaternary,colorTextDisabled:a.colorTextQuaternary,colorTextHeading:a.colorText,colorTextLabel:a.colorTextSecondary,colorTextDescription:a.colorTextTertiary,colorTextLightSolid:a.colorWhite,colorHighlight:a.colorError,colorBgTextHover:a.colorFillSecondary,colorBgTextActive:a.colorFill,colorIcon:a.colorTextTertiary,colorIconHover:a.colorText,colorErrorOutline:Pd(a.colorErrorBg,a.colorBgContainer),colorWarningOutline:Pd(a.colorWarningBg,a.colorBgContainer),fontSizeIcon:a.fontSizeSM,lineWidthFocus:a.lineWidth*3,lineWidth:a.lineWidth,controlOutlineWidth:a.lineWidth*2,controlInteractiveSize:a.controlHeight/2,controlItemBgHover:a.colorFillTertiary,controlItemBgActive:a.colorPrimaryBg,controlItemBgActiveHover:a.colorPrimaryBgHover,controlItemBgActiveDisabled:a.colorFill,controlTmpOutline:a.colorFillQuaternary,controlOutline:Pd(a.colorPrimaryBg,a.colorBgContainer),lineType:a.lineType,borderRadius:a.borderRadius,borderRadiusXS:a.borderRadiusXS,borderRadiusSM:a.borderRadiusSM,borderRadiusLG:a.borderRadiusLG,fontWeightStrong:600,opacityLoading:.65,linkDecoration:"none",linkHoverDecoration:"none",linkFocusDecoration:"none",controlPaddingHorizontal:12,controlPaddingHorizontalSM:8,paddingXXS:a.sizeXXS,paddingXS:a.sizeXS,paddingSM:a.sizeSM,padding:a.size,paddingMD:a.sizeMD,paddingLG:a.sizeLG,paddingXL:a.sizeXL,paddingContentHorizontalLG:a.sizeLG,paddingContentVerticalLG:a.sizeMS,paddingContentHorizontal:a.sizeMS,paddingContentVertical:a.sizeSM,paddingContentHorizontalSM:a.size,paddingContentVerticalSM:a.sizeXS,marginXXS:a.sizeXXS,marginXS:a.sizeXS,marginSM:a.sizeSM,margin:a.size,marginMD:a.sizeMD,marginLG:a.sizeLG,marginXL:a.sizeXL,marginXXL:a.sizeXXL,boxShadow:` + 0 6px 16px 0 rgba(0, 0, 0, 0.08), + 0 3px 6px -4px rgba(0, 0, 0, 0.12), + 0 9px 28px 8px rgba(0, 0, 0, 0.05) + `,boxShadowSecondary:` + 0 6px 16px 0 rgba(0, 0, 0, 0.08), + 0 3px 6px -4px rgba(0, 0, 0, 0.12), + 0 9px 28px 8px rgba(0, 0, 0, 0.05) + `,boxShadowTertiary:` + 0 1px 2px 0 rgba(0, 0, 0, 0.03), + 0 1px 6px -1px rgba(0, 0, 0, 0.02), + 0 2px 4px 0 rgba(0, 0, 0, 0.02) + `,screenXS:o,screenXSMin:o,screenXSMax:c-1,screenSM:c,screenSMMin:c,screenSMMax:u-1,screenMD:u,screenMDMin:u,screenMDMax:f-1,screenLG:f,screenLGMin:f,screenLGMax:d-1,screenXL:d,screenXLMin:d,screenXLMax:h-1,screenXXL:h,screenXXLMin:h,boxShadowPopoverArrow:"2px 2px 5px rgba(0, 0, 0, 0.05)",boxShadowCard:` + 0 1px 2px -2px ${new Pn("rgba(0, 0, 0, 0.16)").toRgbString()}, + 0 3px 6px 0 ${new Pn("rgba(0, 0, 0, 0.12)").toRgbString()}, + 0 5px 12px 4px ${new Pn("rgba(0, 0, 0, 0.09)").toRgbString()} + `,boxShadowDrawerRight:` + -6px 0 16px 0 rgba(0, 0, 0, 0.08), + -3px 0 6px -4px rgba(0, 0, 0, 0.12), + -9px 0 28px 8px rgba(0, 0, 0, 0.05) + `,boxShadowDrawerLeft:` + 6px 0 16px 0 rgba(0, 0, 0, 0.08), + 3px 0 6px -4px rgba(0, 0, 0, 0.12), + 9px 0 28px 8px rgba(0, 0, 0, 0.05) + `,boxShadowDrawerUp:` + 0 6px 16px 0 rgba(0, 0, 0, 0.08), + 0 3px 6px -4px rgba(0, 0, 0, 0.12), + 0 9px 28px 8px rgba(0, 0, 0, 0.05) + `,boxShadowDrawerDown:` + 0 -6px 16px 0 rgba(0, 0, 0, 0.08), + 0 -3px 6px -4px rgba(0, 0, 0, 0.12), + 0 -9px 28px 8px rgba(0, 0, 0, 0.05) + `,boxShadowTabsOverflowLeft:"inset 10px 0 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowRight:"inset -10px 0 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowTop:"inset 0 10px 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowBottom:"inset 0 -10px 8px -8px rgba(0, 0, 0, 0.08)"}),r)}var F_=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,r=Object.getOwnPropertySymbols(e);a{const r=n.getDerivativeToken(e),{override:a}=t,o=F_(t,["override"]);let c=Object.assign(Object.assign({},r),{override:a});return c=$N(c),o&&Object.entries(o).forEach(([u,f])=>{const{theme:d}=f,h=F_(f,["theme"]);let v=h;d&&(v=_N(Object.assign(Object.assign({},c),h),{override:h},d)),c[u]=v}),c};function Ta(){const{token:e,hashed:t,theme:n,override:r,cssVar:a}=Se.useContext(yN),o=`${hz}-${t||""}`,c=n||bN,[u,f,d]=Xk(c,[sf,e],{salt:o,override:r,getComputedToken:_N,formatToken:$N,cssVar:a&&{prefix:a.prefix,key:a.key,unitless:EN,ignore:gz,preserve:pz}});return[c,d,t?f:"",u,a]}const Bi={overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"},zn=(e,t=!1)=>({boxSizing:"border-box",margin:0,padding:0,color:e.colorText,fontSize:e.fontSize,lineHeight:e.lineHeight,listStyle:"none",fontFamily:t?"inherit":e.fontFamily}),lu=()=>({display:"inline-flex",alignItems:"center",color:"inherit",fontStyle:"normal",lineHeight:0,textAlign:"center",textTransform:"none",verticalAlign:"-0.125em",textRendering:"optimizeLegibility","-webkit-font-smoothing":"antialiased","-moz-osx-font-smoothing":"grayscale","> *":{lineHeight:1},svg:{display:"inline-block"}}),Uo=()=>({"&::before":{display:"table",content:'""'},"&::after":{display:"table",clear:"both",content:'""'}}),bz=e=>({a:{color:e.colorLink,textDecoration:e.linkDecoration,backgroundColor:"transparent",outline:"none",cursor:"pointer",transition:`color ${e.motionDurationSlow}`,"-webkit-text-decoration-skip":"objects","&:hover":{color:e.colorLinkHover},"&:active":{color:e.colorLinkActive},"&:active, &:hover":{textDecoration:e.linkHoverDecoration,outline:0},"&:focus":{textDecoration:e.linkFocusDecoration,outline:0},"&[disabled]":{color:e.colorTextDisabled,cursor:"not-allowed"}}}),yz=(e,t,n,r)=>{const a=`[class^="${t}"], [class*=" ${t}"]`,o=n?`.${n}`:a,c={boxSizing:"border-box","&::before, &::after":{boxSizing:"border-box"}};let u={};return r!==!1&&(u={fontFamily:e.fontFamily,fontSize:e.fontSize}),{[o]:Object.assign(Object.assign(Object.assign({},u),c),{[a]:c})}},so=(e,t)=>({outline:`${te(e.lineWidthFocus)} solid ${e.colorPrimaryBorder}`,outlineOffset:t??1,transition:"outline-offset 0s, outline 0s"}),Wo=(e,t)=>({"&:focus-visible":so(e,t)}),ON=e=>({[`.${e}`]:Object.assign(Object.assign({},lu()),{[`.${e} .${e}-icon`]:{display:"block"}})}),wS=e=>Object.assign(Object.assign({color:e.colorLink,textDecoration:e.linkDecoration,outline:"none",cursor:"pointer",transition:`all ${e.motionDurationSlow}`,border:0,padding:0,background:"none",userSelect:"none"},Wo(e)),{"&:hover":{color:e.colorLinkHover,textDecoration:e.linkHoverDecoration},"&:focus":{color:e.colorLinkHover,textDecoration:e.linkFocusDecoration},"&:active":{color:e.colorLinkActive,textDecoration:e.linkHoverDecoration}}),{genStyleHooks:Kn,genComponentStyleHook:xz,genSubStyleComponent:Nf}=mz({usePrefix:()=>{const{getPrefixCls:e,iconPrefixCls:t}=s.useContext(Wt);return{rootPrefixCls:e(),iconPrefixCls:t}},useToken:()=>{const[e,t,n,r,a]=Ta();return{theme:e,realToken:t,hashId:n,token:r,cssVar:a}},useCSP:()=>{const{csp:e}=s.useContext(Wt);return e??{}},getResetStyles:(e,t)=>{var n;const r=bz(e);return[r,{"&":r},ON((n=t?.prefix.iconPrefixCls)!==null&&n!==void 0?n:Fv)]},getCommonStyle:yz,getCompUnitless:()=>EN});function IN(e,t){return Rs.reduce((n,r)=>{const a=e[`${r}1`],o=e[`${r}3`],c=e[`${r}6`],u=e[`${r}7`];return Object.assign(Object.assign({},n),t(r,{lightColor:a,lightBorderColor:o,darkColor:c,textColor:u}))},{})}const Sz=(e,t)=>{const[n,r]=Ta();return I0({token:r,hashId:"",path:["ant-design-icons",e],nonce:()=>t?.nonce,layer:{name:"antd"}},()=>ON(e))},Cz=Object.assign({},kv),{useId:V_}=Cz,wz=()=>"",$z=typeof V_>"u"?wz:V_;function Ez(e,t,n){var r;Kl();const a=e||{},o=a.inherit===!1||!t?Object.assign(Object.assign({},uf),{hashed:(r=t?.hashed)!==null&&r!==void 0?r:uf.hashed,cssVar:t?.cssVar}):t,c=$z();return Ds(()=>{var u,f;if(!e)return t;const d=Object.assign({},o.components);Object.keys(e.components||{}).forEach(g=>{d[g]=Object.assign(Object.assign({},d[g]),e.components[g])});const h=`css-var-${c.replace(/:/g,"")}`,v=((u=a.cssVar)!==null&&u!==void 0?u:o.cssVar)&&Object.assign(Object.assign(Object.assign({prefix:n?.prefixCls},typeof o.cssVar=="object"?o.cssVar:{}),typeof a.cssVar=="object"?a.cssVar:{}),{key:typeof a.cssVar=="object"&&((f=a.cssVar)===null||f===void 0?void 0:f.key)||h});return Object.assign(Object.assign(Object.assign({},o),a),{token:Object.assign(Object.assign({},o.token),a.token),components:d,cssVar:v})},[a,o],(u,f)=>u.some((d,h)=>{const v=f[h];return!oo(d,v,!0)}))}var _z=["children"],RN=s.createContext({});function Oz(e){var t=e.children,n=Kt(e,_z);return s.createElement(RN.Provider,{value:n},t)}var Iz=(function(e){oi(n,e);var t=_i(n);function n(){return Sr(this,n),t.apply(this,arguments)}return Cr(n,[{key:"render",value:function(){return this.props.children}}]),n})(s.Component);function Rz(e){var t=s.useReducer(function(u){return u+1},0),n=ce(t,2),r=n[1],a=s.useRef(e),o=pn(function(){return a.current}),c=pn(function(u){a.current=typeof u=="function"?u(a.current):u,r()});return[o,c]}var Il="none",sh="appear",ch="enter",uh="leave",K_="none",Di="prepare",Ac="start",zc="active",$S="end",NN="prepared";function U_(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit".concat(e)]="webkit".concat(t),n["Moz".concat(e)]="moz".concat(t),n["ms".concat(e)]="MS".concat(t),n["O".concat(e)]="o".concat(t.toLowerCase()),n}function Nz(e,t){var n={animationend:U_("Animation","AnimationEnd"),transitionend:U_("Transition","TransitionEnd")};return e&&("AnimationEvent"in t||delete n.animationend.animation,"TransitionEvent"in t||delete n.transitionend.transition),n}var Mz=Nz(wa(),typeof window<"u"?window:{}),MN={};if(wa()){var jz=document.createElement("div");MN=jz.style}var dh={};function jN(e){if(dh[e])return dh[e];var t=Mz[e];if(t)for(var n=Object.keys(t),r=n.length,a=0;a1&&arguments[1]!==void 0?arguments[1]:2;t();var o=hn(function(){a<=1?r({isCanceled:function(){return o!==e.current}}):n(r,a-1)});e.current=o}return s.useEffect(function(){return function(){t()}},[]),[n,t]});var Pz=[Di,Ac,zc,$S],kz=[Di,NN],AN=!1,Az=!0;function zN(e){return e===zc||e===$S}const zz=(function(e,t,n){var r=ru(K_),a=ce(r,2),o=a[0],c=a[1],u=Dz(),f=ce(u,2),d=f[0],h=f[1];function v(){c(Di,!0)}var g=t?kz:Pz;return kN(function(){if(o!==K_&&o!==$S){var b=g.indexOf(o),x=g[b+1],C=n(o);C===AN?c(x,!0):x&&d(function(y){function w(){y.isCanceled()||c(x,!0)}C===!0?w():Promise.resolve(C).then(w)})}},[e,o]),s.useEffect(function(){return function(){h()}},[]),[v,o]});function Lz(e,t,n,r){var a=r.motionEnter,o=a===void 0?!0:a,c=r.motionAppear,u=c===void 0?!0:c,f=r.motionLeave,d=f===void 0?!0:f,h=r.motionDeadline,v=r.motionLeaveImmediately,g=r.onAppearPrepare,b=r.onEnterPrepare,x=r.onLeavePrepare,C=r.onAppearStart,y=r.onEnterStart,w=r.onLeaveStart,$=r.onAppearActive,E=r.onEnterActive,O=r.onLeaveActive,I=r.onAppearEnd,j=r.onEnterEnd,M=r.onLeaveEnd,D=r.onVisibleChanged,N=ru(),P=ce(N,2),A=P[0],F=P[1],H=Rz(Il),k=ce(H,2),L=k[0],T=k[1],z=ru(null),V=ce(z,2),q=V[0],G=V[1],B=L(),U=s.useRef(!1),K=s.useRef(null);function Y(){return n()}var Q=s.useRef(!1);function Z(){T(Il),G(null,!0)}var ae=pn(function(ge){var Ie=L();if(Ie!==Il){var Ee=Y();if(!(ge&&!ge.deadline&&ge.target!==Ee)){var we=Q.current,Fe;Ie===sh&&we?Fe=I?.(Ee,ge):Ie===ch&&we?Fe=j?.(Ee,ge):Ie===uh&&we&&(Fe=M?.(Ee,ge)),we&&Fe!==!1&&Z()}}}),re=Tz(ae),ie=ce(re,1),ve=ie[0],ue=function(Ie){switch(Ie){case sh:return X(X(X({},Di,g),Ac,C),zc,$);case ch:return X(X(X({},Di,b),Ac,y),zc,E);case uh:return X(X(X({},Di,x),Ac,w),zc,O);default:return{}}},oe=s.useMemo(function(){return ue(B)},[B]),he=zz(B,!e,function(ge){if(ge===Di){var Ie=oe[Di];return Ie?Ie(Y()):AN}if(le in oe){var Ee;G(((Ee=oe[le])===null||Ee===void 0?void 0:Ee.call(oe,Y(),null))||null)}return le===zc&&B!==Il&&(ve(Y()),h>0&&(clearTimeout(K.current),K.current=setTimeout(function(){ae({deadline:!0})},h))),le===NN&&Z(),Az}),fe=ce(he,2),me=fe[0],le=fe[1],pe=zN(le);Q.current=pe;var Ce=s.useRef(null);kN(function(){if(!(U.current&&Ce.current===t)){F(t);var ge=U.current;U.current=!0;var Ie;!ge&&t&&u&&(Ie=sh),ge&&t&&o&&(Ie=ch),(ge&&!t&&d||!ge&&v&&!t&&d)&&(Ie=uh);var Ee=ue(Ie);Ie&&(e||Ee[Di])?(T(Ie),me()):T(Il),Ce.current=t}},[t]),s.useEffect(function(){(B===sh&&!u||B===ch&&!o||B===uh&&!d)&&T(Il)},[u,o,d]),s.useEffect(function(){return function(){U.current=!1,clearTimeout(K.current)}},[]);var De=s.useRef(!1);s.useEffect(function(){A&&(De.current=!0),A!==void 0&&B===Il&&((De.current||A)&&D?.(A),De.current=!0)},[A,B]);var je=q;return oe[Di]&&le===Ac&&(je=ee({transition:"none"},je)),[B,le,je,A??t]}function Hz(e){var t=e;jt(e)==="object"&&(t=e.transitionSupport);function n(a,o){return!!(a.motionName&&t&&o!==!1)}var r=s.forwardRef(function(a,o){var c=a.visible,u=c===void 0?!0:c,f=a.removeOnLeave,d=f===void 0?!0:f,h=a.forceRender,v=a.children,g=a.motionName,b=a.leavedClassName,x=a.eventProps,C=s.useContext(RN),y=C.motion,w=n(a,y),$=s.useRef(),E=s.useRef();function O(){try{return $.current instanceof HTMLElement?$.current:kh(E.current)}catch{return null}}var I=Lz(w,u,O,a),j=ce(I,4),M=j[0],D=j[1],N=j[2],P=j[3],A=s.useRef(P);P&&(A.current=!0);var F=s.useCallback(function(V){$.current=V,nf(o,V)},[o]),H,k=ee(ee({},x),{},{visible:u});if(!v)H=null;else if(M===Il)P?H=v(ee({},k),F):!d&&A.current&&b?H=v(ee(ee({},k),{},{className:b}),F):h||!d&&!b?H=v(ee(ee({},k),{},{style:{display:"none"}}),F):H=null;else{var L;D===Di?L="prepare":zN(D)?L="active":D===Ac&&(L="start");var T=Y_(g,"".concat(M,"-").concat(L));H=v(ee(ee({},k),{},{className:se(Y_(g,M),X(X({},T,T&&L),g,typeof g=="string")),style:N}),F)}if(s.isValidElement(H)&&Hi(H)){var z=Vl(H);z||(H=s.cloneElement(H,{ref:F}))}return s.createElement(Iz,{ref:E},H)});return r.displayName="CSSMotion",r}const Oi=Hz(PN);var B0="add",F0="keep",V0="remove",sy="removed";function Bz(e){var t;return e&&jt(e)==="object"&&"key"in e?t=e:t={key:e},ee(ee({},t),{},{key:String(t.key)})}function K0(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return e.map(Bz)}function Fz(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],n=[],r=0,a=t.length,o=K0(e),c=K0(t);o.forEach(function(d){for(var h=!1,v=r;v1});return f.forEach(function(d){n=n.filter(function(h){var v=h.key,g=h.status;return v!==d||g!==V0}),n.forEach(function(h){h.key===d&&(h.status=F0)})}),n}var Vz=["component","children","onVisibleChanged","onAllRemoved"],Kz=["status"],Uz=["eventProps","visible","children","motionName","motionAppear","motionEnter","motionLeave","motionLeaveImmediately","motionDeadline","removeOnLeave","leavedClassName","onAppearPrepare","onAppearStart","onAppearActive","onAppearEnd","onEnterStart","onEnterActive","onEnterEnd","onLeaveStart","onLeaveActive","onLeaveEnd"];function Wz(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Oi,n=(function(r){oi(o,r);var a=_i(o);function o(){var c;Sr(this,o);for(var u=arguments.length,f=new Array(u),d=0;dnull;var Gz=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,r=Object.getOwnPropertySymbols(e);at.endsWith("Color"))}const Jz=e=>{const{prefixCls:t,iconPrefixCls:n,theme:r,holderRender:a}=e;t!==void 0&&(hv=t),n!==void 0&&(LN=n),"holderRender"in e&&(BN=a),r&&(Zz(r)?JA(Kh(),r):HN=r)},e5=()=>({getPrefixCls:(e,t)=>t||(e?`${Kh()}-${e}`:Kh()),getIconPrefixCls:Qz,getRootPrefixCls:()=>hv||Kh(),getTheme:()=>HN,holderRender:BN}),t5=e=>{const{children:t,csp:n,autoInsertSpaceInButton:r,alert:a,anchor:o,form:c,locale:u,componentSize:f,direction:d,space:h,splitter:v,virtual:g,dropdownMatchSelectWidth:b,popupMatchSelectWidth:x,popupOverflow:C,legacyLocale:y,parentContext:w,iconPrefixCls:$,theme:E,componentDisabled:O,segmented:I,statistic:j,spin:M,calendar:D,carousel:N,cascader:P,collapse:A,typography:F,checkbox:H,descriptions:k,divider:L,drawer:T,skeleton:z,steps:V,image:q,layout:G,list:B,mentions:U,modal:K,progress:Y,result:Q,slider:Z,breadcrumb:ae,menu:re,pagination:ie,input:ve,textArea:ue,empty:oe,badge:he,radio:fe,rate:me,switch:le,transfer:pe,avatar:Ce,message:De,tag:je,table:ge,card:Ie,tabs:Ee,timeline:we,timePicker:Fe,upload:He,notification:it,tree:Ze,colorPicker:Ye,datePicker:et,rangePicker:Pe,flex:Oe,wave:Be,dropdown:$e,warning:Te,tour:be,tooltip:ye,popover:Re,popconfirm:Ge,floatButton:ft,floatButtonGroup:$t,variant:Qe,inputNumber:at,treeSelect:mt}=e,st=s.useCallback((Dt,Jt)=>{const{prefixCls:ut}=e;if(Jt)return Jt;const ot=ut||w.getPrefixCls("");return Dt?`${ot}-${Dt}`:ot},[w.getPrefixCls,e.prefixCls]),bt=$||w.iconPrefixCls||Fv,qt=n||w.csp;Sz(bt,qt);const Gt=Ez(E,w.theme,{prefixCls:st("")}),vt={csp:qt,autoInsertSpaceInButton:r,alert:a,anchor:o,locale:u||y,direction:d,space:h,splitter:v,virtual:g,popupMatchSelectWidth:x??b,popupOverflow:C,getPrefixCls:st,iconPrefixCls:bt,theme:Gt,segmented:I,statistic:j,spin:M,calendar:D,carousel:N,cascader:P,collapse:A,typography:F,checkbox:H,descriptions:k,divider:L,drawer:T,skeleton:z,steps:V,image:q,input:ve,textArea:ue,layout:G,list:B,mentions:U,modal:K,progress:Y,result:Q,slider:Z,breadcrumb:ae,menu:re,pagination:ie,empty:oe,badge:he,radio:fe,rate:me,switch:le,transfer:pe,avatar:Ce,message:De,tag:je,table:ge,card:Ie,tabs:Ee,timeline:we,timePicker:Fe,upload:He,notification:it,tree:Ze,colorPicker:Ye,datePicker:et,rangePicker:Pe,flex:Oe,wave:Be,dropdown:$e,warning:Te,tour:be,tooltip:ye,popover:Re,popconfirm:Ge,floatButton:ft,floatButtonGroup:$t,variant:Qe,inputNumber:at,treeSelect:mt},It=Object.assign({},w);Object.keys(vt).forEach(Dt=>{vt[Dt]!==void 0&&(It[Dt]=vt[Dt])}),Xz.forEach(Dt=>{const Jt=e[Dt];Jt&&(It[Dt]=Jt)}),typeof r<"u"&&(It.button=Object.assign({autoInsertSpace:r},It.button));const Et=Ds(()=>It,It,(Dt,Jt)=>{const ut=Object.keys(Dt),ot=Object.keys(Jt);return ut.length!==ot.length||ut.some(Lt=>Dt[Lt]!==Jt[Lt])}),{layer:nt}=s.useContext(Rf),Ue=s.useMemo(()=>({prefixCls:bt,csp:qt,layer:nt?"antd":void 0}),[bt,qt,nt]);let qe=s.createElement(s.Fragment,null,s.createElement(Yz,{dropdownMatchSelectWidth:b}),t);const ct=s.useMemo(()=>{var Dt,Jt,ut,ot;return kc(((Dt=lo.Form)===null||Dt===void 0?void 0:Dt.defaultValidateMessages)||{},((ut=(Jt=Et.locale)===null||Jt===void 0?void 0:Jt.Form)===null||ut===void 0?void 0:ut.defaultValidateMessages)||{},((ot=Et.form)===null||ot===void 0?void 0:ot.validateMessages)||{},c?.validateMessages||{})},[Et,c?.validateMessages]);Object.keys(ct).length>0&&(qe=s.createElement(dN.Provider,{value:ct},qe)),u&&(qe=s.createElement(DA,{locale:u,_ANT_MARK__:TA},qe)),qe=s.createElement(SS.Provider,{value:Ue},qe),f&&(qe=s.createElement(ez,{size:f},qe)),qe=s.createElement(qz,null,qe);const Tt=s.useMemo(()=>{const Dt=Gt||{},{algorithm:Jt,token:ut,components:ot,cssVar:Lt}=Dt,tn=Gz(Dt,["algorithm","token","components","cssVar"]),vn=Jt&&(!Array.isArray(Jt)||Jt.length>0)?$0(Jt):bN,cn={};Object.entries(ot||{}).forEach(([rn,Sn])=>{const lt=Object.assign({},Sn);"algorithm"in lt&&(lt.algorithm===!0?lt.theme=vn:(Array.isArray(lt.algorithm)||typeof lt.algorithm=="function")&&(lt.theme=$0(lt.algorithm)),delete lt.algorithm),cn[rn]=lt});const En=Object.assign(Object.assign({},sf),ut);return Object.assign(Object.assign({},tn),{theme:vn,token:En,components:cn,override:Object.assign({override:En},cn),cssVar:Lt})},[Gt]);return E&&(qe=s.createElement(yN.Provider,{value:Tt},qe)),Et.warning&&(qe=s.createElement(RA.Provider,{value:Et.warning},qe)),O!==void 0&&(qe=s.createElement(xN,{disabled:O},qe)),s.createElement(Wt.Provider,{value:Et},qe)},vo=e=>{const t=s.useContext(Wt),n=s.useContext(CS);return s.createElement(t5,Object.assign({parentContext:t,legacyLocale:n},e))};vo.ConfigContext=Wt;vo.SizeContext=Is;vo.config=Jz;vo.useConfig=tz;Object.defineProperty(vo,"SizeContext",{get:()=>Is});var n5={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm193.5 301.7l-210.6 292a31.8 31.8 0 01-51.7 0L318.5 484.9c-3.8-5.3 0-12.7 6.5-12.7h46.9c10.2 0 19.9 4.9 25.9 13.3l71.2 98.8 157.2-218c6-8.3 15.6-13.3 25.9-13.3H699c6.5 0 10.3 7.4 6.5 12.7z"}}]},name:"check-circle",theme:"filled"};function FN(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}function r5(e){return FN(e)instanceof ShadowRoot}function vv(e){return r5(e)?FN(e):null}function a5(e){return e.replace(/-(.)/g,function(t,n){return n.toUpperCase()})}function i5(e,t){xr(e,"[@ant-design/icons] ".concat(t))}function X_(e){return jt(e)==="object"&&typeof e.name=="string"&&typeof e.theme=="string"&&(jt(e.icon)==="object"||typeof e.icon=="function")}function Q_(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return Object.keys(e).reduce(function(t,n){var r=e[n];switch(n){case"class":t.className=r,delete t.class;break;default:delete t[n],t[a5(n)]=r}return t},{})}function U0(e,t,n){return n?Se.createElement(e.tag,ee(ee({key:t},Q_(e.attrs)),n),(e.children||[]).map(function(r,a){return U0(r,"".concat(t,"-").concat(e.tag,"-").concat(a))})):Se.createElement(e.tag,ee({key:t},Q_(e.attrs)),(e.children||[]).map(function(r,a){return U0(r,"".concat(t,"-").concat(e.tag,"-").concat(a))}))}function VN(e){return cf(e)[0]}function KN(e){return e?Array.isArray(e)?e:[e]:[]}var o5=` +.anticon { + display: inline-flex; + align-items: center; + color: inherit; + font-style: normal; + line-height: 0; + text-align: center; + text-transform: none; + vertical-align: -0.125em; + text-rendering: optimizeLegibility; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} + +.anticon > * { + line-height: 1; +} + +.anticon svg { + display: inline-block; +} + +.anticon::before { + display: none; +} + +.anticon .anticon-icon { + display: block; +} + +.anticon[tabindex] { + cursor: pointer; +} + +.anticon-spin::before, +.anticon-spin { + display: inline-block; + -webkit-animation: loadingCircle 1s infinite linear; + animation: loadingCircle 1s infinite linear; +} + +@-webkit-keyframes loadingCircle { + 100% { + -webkit-transform: rotate(360deg); + transform: rotate(360deg); + } +} + +@keyframes loadingCircle { + 100% { + -webkit-transform: rotate(360deg); + transform: rotate(360deg); + } +} +`,l5=function(t){var n=s.useContext(SS),r=n.csp,a=n.prefixCls,o=n.layer,c=o5;a&&(c=c.replace(/anticon/g,a)),o&&(c="@layer ".concat(o,` { +`).concat(c,` +}`)),s.useEffect(function(){var u=t.current,f=vv(u);Bo(c,"@ant-design-icons",{prepend:!o,csp:r,attachTo:f})},[])},s5=["icon","className","onClick","style","primaryColor","secondaryColor"],Kd={primaryColor:"#333",secondaryColor:"#E6E6E6",calculated:!1};function c5(e){var t=e.primaryColor,n=e.secondaryColor;Kd.primaryColor=t,Kd.secondaryColor=n||VN(t),Kd.calculated=!!n}function u5(){return ee({},Kd)}var su=function(t){var n=t.icon,r=t.className,a=t.onClick,o=t.style,c=t.primaryColor,u=t.secondaryColor,f=Kt(t,s5),d=s.useRef(),h=Kd;if(c&&(h={primaryColor:c,secondaryColor:u||VN(c)}),l5(d),i5(X_(n),"icon should be icon definiton, but got ".concat(n)),!X_(n))return null;var v=n;return v&&typeof v.icon=="function"&&(v=ee(ee({},v),{},{icon:v.icon(h.primaryColor,h.secondaryColor)})),U0(v.icon,"svg-".concat(v.name),ee(ee({className:r,onClick:a,style:o,"data-icon":v.name,width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},f),{},{ref:d}))};su.displayName="IconReact";su.getTwoToneColors=u5;su.setTwoToneColors=c5;function UN(e){var t=KN(e),n=ce(t,2),r=n[0],a=n[1];return su.setTwoToneColors({primaryColor:r,secondaryColor:a})}function d5(){var e=su.getTwoToneColors();return e.calculated?[e.primaryColor,e.secondaryColor]:e.primaryColor}var f5=["className","icon","spin","rotate","tabIndex","onClick","twoToneColor"];UN(nu.primary);var $n=s.forwardRef(function(e,t){var n=e.className,r=e.icon,a=e.spin,o=e.rotate,c=e.tabIndex,u=e.onClick,f=e.twoToneColor,d=Kt(e,f5),h=s.useContext(SS),v=h.prefixCls,g=v===void 0?"anticon":v,b=h.rootClassName,x=se(b,g,X(X({},"".concat(g,"-").concat(r.name),!!r.name),"".concat(g,"-spin"),!!a||r.name==="loading"),n),C=c;C===void 0&&u&&(C=-1);var y=o?{msTransform:"rotate(".concat(o,"deg)"),transform:"rotate(".concat(o,"deg)")}:void 0,w=KN(f),$=ce(w,2),E=$[0],O=$[1];return s.createElement("span",Me({role:"img","aria-label":r.name},d,{ref:t,tabIndex:C,onClick:u,className:x}),s.createElement(su,{icon:r,primaryColor:E,secondaryColor:O,style:y}))});$n.displayName="AntdIcon";$n.getTwoToneColor=d5;$n.setTwoToneColor=UN;var m5=function(t,n){return s.createElement($n,Me({},t,{ref:n,icon:n5}))},Vv=s.forwardRef(m5),h5={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64c247.4 0 448 200.6 448 448S759.4 960 512 960 64 759.4 64 512 264.6 64 512 64zm127.98 274.82h-.04l-.08.06L512 466.75 384.14 338.88c-.04-.05-.06-.06-.08-.06a.12.12 0 00-.07 0c-.03 0-.05.01-.09.05l-45.02 45.02a.2.2 0 00-.05.09.12.12 0 000 .07v.02a.27.27 0 00.06.06L466.75 512 338.88 639.86c-.05.04-.06.06-.06.08a.12.12 0 000 .07c0 .03.01.05.05.09l45.02 45.02a.2.2 0 00.09.05.12.12 0 00.07 0c.02 0 .04-.01.08-.05L512 557.25l127.86 127.87c.04.04.06.05.08.05a.12.12 0 00.07 0c.03 0 .05-.01.09-.05l45.02-45.02a.2.2 0 00.05-.09.12.12 0 000-.07v-.02a.27.27 0 00-.05-.06L557.25 512l127.87-127.86c.04-.04.05-.06.05-.08a.12.12 0 000-.07c0-.03-.01-.05-.05-.09l-45.02-45.02a.2.2 0 00-.09-.05.12.12 0 00-.07 0z"}}]},name:"close-circle",theme:"filled"},v5=function(t,n){return s.createElement($n,Me({},t,{ref:n,icon:h5}))},cu=s.forwardRef(v5),g5={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M799.86 166.31c.02 0 .04.02.08.06l57.69 57.7c.04.03.05.05.06.08a.12.12 0 010 .06c0 .03-.02.05-.06.09L569.93 512l287.7 287.7c.04.04.05.06.06.09a.12.12 0 010 .07c0 .02-.02.04-.06.08l-57.7 57.69c-.03.04-.05.05-.07.06a.12.12 0 01-.07 0c-.03 0-.05-.02-.09-.06L512 569.93l-287.7 287.7c-.04.04-.06.05-.09.06a.12.12 0 01-.07 0c-.02 0-.04-.02-.08-.06l-57.69-57.7c-.04-.03-.05-.05-.06-.07a.12.12 0 010-.07c0-.03.02-.05.06-.09L454.07 512l-287.7-287.7c-.04-.04-.05-.06-.06-.09a.12.12 0 010-.07c0-.02.02-.04.06-.08l57.7-57.69c.03-.04.05-.05.07-.06a.12.12 0 01.07 0c.03 0 .05.02.09.06L512 454.07l287.7-287.7c.04-.04.06-.05.09-.06a.12.12 0 01.07 0z"}}]},name:"close",theme:"outlined"},p5=function(t,n){return s.createElement($n,Me({},t,{ref:n,icon:g5}))},uu=s.forwardRef(p5),b5={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm-32 232c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V296zm32 440a48.01 48.01 0 010-96 48.01 48.01 0 010 96z"}}]},name:"exclamation-circle",theme:"filled"},y5=function(t,n){return s.createElement($n,Me({},t,{ref:n,icon:b5}))},_S=s.forwardRef(y5),x5={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm32 664c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V456c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272zm-32-344a48.01 48.01 0 010-96 48.01 48.01 0 010 96z"}}]},name:"info-circle",theme:"filled"},S5=function(t,n){return s.createElement($n,Me({},t,{ref:n,icon:x5}))},WN=s.forwardRef(S5),C5=`accept acceptCharset accessKey action allowFullScreen allowTransparency + alt async autoComplete autoFocus autoPlay capture cellPadding cellSpacing challenge + charSet checked classID className colSpan cols content contentEditable contextMenu + controls coords crossOrigin data dateTime default defer dir disabled download draggable + encType form formAction formEncType formMethod formNoValidate formTarget frameBorder + headers height hidden high href hrefLang htmlFor httpEquiv icon id inputMode integrity + is keyParams keyType kind label lang list loop low manifest marginHeight marginWidth max maxLength media + mediaGroup method min minLength multiple muted name noValidate nonce open + optimum pattern placeholder poster preload radioGroup readOnly rel required + reversed role rowSpan rows sandbox scope scoped scrolling seamless selected + shape size sizes span spellCheck src srcDoc srcLang srcSet start step style + summary tabIndex target title type useMap value width wmode wrap`,w5=`onCopy onCut onPaste onCompositionEnd onCompositionStart onCompositionUpdate onKeyDown + onKeyPress onKeyUp onFocus onBlur onChange onInput onSubmit onClick onContextMenu onDoubleClick + onDrag onDragEnd onDragEnter onDragExit onDragLeave onDragOver onDragStart onDrop onMouseDown + onMouseEnter onMouseLeave onMouseMove onMouseOut onMouseOver onMouseUp onSelect onTouchCancel + onTouchEnd onTouchMove onTouchStart onScroll onWheel onAbort onCanPlay onCanPlayThrough + onDurationChange onEmptied onEncrypted onEnded onError onLoadedData onLoadedMetadata + onLoadStart onPause onPlay onPlaying onProgress onRateChange onSeeked onSeeking onStalled onSuspend onTimeUpdate onVolumeChange onWaiting onLoad onError`,$5="".concat(C5," ").concat(w5).split(/[\s\n]+/),E5="aria-",_5="data-";function Z_(e,t){return e.indexOf(t)===0}function ma(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n;t===!1?n={aria:!0,data:!0,attr:!0}:t===!0?n={aria:!0}:n=ee({},t);var r={};return Object.keys(e).forEach(function(a){(n.aria&&(a==="role"||Z_(a,E5))||n.data&&Z_(a,_5)||n.attr&&$5.includes(a))&&(r[a]=e[a])}),r}function qN(e){return e&&Se.isValidElement(e)&&e.type===Se.Fragment}const OS=(e,t,n)=>Se.isValidElement(e)?Se.cloneElement(e,typeof n=="function"?n(e.props||{}):n):t;function $a(e,t){return OS(e,e,t)}const fh=(e,t,n,r,a)=>({background:e,border:`${te(r.lineWidth)} ${r.lineType} ${t}`,[`${a}-icon`]:{color:n}}),O5=e=>{const{componentCls:t,motionDurationSlow:n,marginXS:r,marginSM:a,fontSize:o,fontSizeLG:c,lineHeight:u,borderRadiusLG:f,motionEaseInOutCirc:d,withDescriptionIconSize:h,colorText:v,colorTextHeading:g,withDescriptionPadding:b,defaultPadding:x}=e;return{[t]:Object.assign(Object.assign({},zn(e)),{position:"relative",display:"flex",alignItems:"center",padding:x,wordWrap:"break-word",borderRadius:f,[`&${t}-rtl`]:{direction:"rtl"},[`${t}-content`]:{flex:1,minWidth:0},[`${t}-icon`]:{marginInlineEnd:r,lineHeight:0},"&-description":{display:"none",fontSize:o,lineHeight:u},"&-message":{color:g},[`&${t}-motion-leave`]:{overflow:"hidden",opacity:1,transition:`max-height ${n} ${d}, opacity ${n} ${d}, + padding-top ${n} ${d}, padding-bottom ${n} ${d}, + margin-bottom ${n} ${d}`},[`&${t}-motion-leave-active`]:{maxHeight:0,marginBottom:"0 !important",paddingTop:0,paddingBottom:0,opacity:0}}),[`${t}-with-description`]:{alignItems:"flex-start",padding:b,[`${t}-icon`]:{marginInlineEnd:a,fontSize:h,lineHeight:0},[`${t}-message`]:{display:"block",marginBottom:r,color:g,fontSize:c},[`${t}-description`]:{display:"block",color:v}},[`${t}-banner`]:{marginBottom:0,border:"0 !important",borderRadius:0}}},I5=e=>{const{componentCls:t,colorSuccess:n,colorSuccessBorder:r,colorSuccessBg:a,colorWarning:o,colorWarningBorder:c,colorWarningBg:u,colorError:f,colorErrorBorder:d,colorErrorBg:h,colorInfo:v,colorInfoBorder:g,colorInfoBg:b}=e;return{[t]:{"&-success":fh(a,r,n,e,t),"&-info":fh(b,g,v,e,t),"&-warning":fh(u,c,o,e,t),"&-error":Object.assign(Object.assign({},fh(h,d,f,e,t)),{[`${t}-description > pre`]:{margin:0,padding:0}})}}},R5=e=>{const{componentCls:t,iconCls:n,motionDurationMid:r,marginXS:a,fontSizeIcon:o,colorIcon:c,colorIconHover:u}=e;return{[t]:{"&-action":{marginInlineStart:a},[`${t}-close-icon`]:{marginInlineStart:a,padding:0,overflow:"hidden",fontSize:o,lineHeight:te(o),backgroundColor:"transparent",border:"none",outline:"none",cursor:"pointer",[`${n}-close`]:{color:c,transition:`color ${r}`,"&:hover":{color:u}}},"&-close-text":{color:c,transition:`color ${r}`,"&:hover":{color:u}}}}},N5=e=>({withDescriptionIconSize:e.fontSizeHeading3,defaultPadding:`${e.paddingContentVerticalSM}px 12px`,withDescriptionPadding:`${e.paddingMD}px ${e.paddingContentHorizontalLG}px`}),M5=Kn("Alert",e=>[O5(e),I5(e),R5(e)],N5);var J_=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,r=Object.getOwnPropertySymbols(e);a{const{icon:t,prefixCls:n,type:r}=e,a=j5[r]||null;return t?OS(t,s.createElement("span",{className:`${n}-icon`},t),()=>({className:se(`${n}-icon`,t.props.className)})):s.createElement(a,{className:`${n}-icon`})},D5=e=>{const{isClosable:t,prefixCls:n,closeIcon:r,handleClose:a,ariaProps:o}=e,c=r===!0||r===void 0?s.createElement(uu,null):r;return t?s.createElement("button",Object.assign({type:"button",onClick:a,className:`${n}-close-icon`,tabIndex:0},o),c):null},YN=s.forwardRef((e,t)=>{const{description:n,prefixCls:r,message:a,banner:o,className:c,rootClassName:u,style:f,onMouseEnter:d,onMouseLeave:h,onClick:v,afterClose:g,showIcon:b,closable:x,closeText:C,closeIcon:y,action:w,id:$}=e,E=J_(e,["description","prefixCls","message","banner","className","rootClassName","style","onMouseEnter","onMouseLeave","onClick","afterClose","showIcon","closable","closeText","closeIcon","action","id"]),[O,I]=s.useState(!1),j=s.useRef(null);s.useImperativeHandle(t,()=>({nativeElement:j.current}));const{getPrefixCls:M,direction:D,closable:N,closeIcon:P,className:A,style:F}=ga("alert"),H=M("alert",r),[k,L,T]=M5(H),z=Q=>{var Z;I(!0),(Z=e.onClose)===null||Z===void 0||Z.call(e,Q)},V=s.useMemo(()=>e.type!==void 0?e.type:o?"warning":"info",[e.type,o]),q=s.useMemo(()=>typeof x=="object"&&x.closeIcon||C?!0:typeof x=="boolean"?x:y!==!1&&y!==null&&y!==void 0?!0:!!N,[C,y,x,N]),G=o&&b===void 0?!0:b,B=se(H,`${H}-${V}`,{[`${H}-with-description`]:!!n,[`${H}-no-icon`]:!G,[`${H}-banner`]:!!o,[`${H}-rtl`]:D==="rtl"},A,c,u,T,L),U=ma(E,{aria:!0,data:!0}),K=s.useMemo(()=>typeof x=="object"&&x.closeIcon?x.closeIcon:C||(y!==void 0?y:typeof N=="object"&&N.closeIcon?N.closeIcon:P),[y,x,C,P]),Y=s.useMemo(()=>{const Q=x??N;if(typeof Q=="object"){const{closeIcon:Z}=Q;return J_(Q,["closeIcon"])}return{}},[x,N]);return k(s.createElement(Oi,{visible:!O,motionName:`${H}-motion`,motionAppear:!1,motionEnter:!1,onLeaveStart:Q=>({maxHeight:Q.offsetHeight}),onLeaveEnd:g},({className:Q,style:Z},ae)=>s.createElement("div",Object.assign({id:$,ref:Ea(j,ae),"data-show":!O,className:se(B,Q),style:Object.assign(Object.assign(Object.assign({},F),f),Z),onMouseEnter:d,onMouseLeave:h,onClick:v,role:"alert"},U),G?s.createElement(T5,{description:n,icon:e.icon,prefixCls:H,type:V}):null,s.createElement("div",{className:`${H}-content`},a?s.createElement("div",{className:`${H}-message`},a):null,n?s.createElement("div",{className:`${H}-description`},n):null),w?s.createElement("div",{className:`${H}-action`},w):null,s.createElement(D5,{isClosable:q,prefixCls:H,closeIcon:K,handleClose:z,ariaProps:Y}))))});function P5(e,t,n){return t=Os(t),zR(e,zv()?Reflect.construct(t,n||[],Os(e).constructor):t.apply(e,n))}let k5=(function(e){function t(){var n;return Sr(this,t),n=P5(this,t,arguments),n.state={error:void 0,info:{componentStack:""}},n}return oi(t,e),Cr(t,[{key:"componentDidCatch",value:function(r,a){this.setState({error:r,info:a})}},{key:"render",value:function(){const{message:r,description:a,id:o,children:c}=this.props,{error:u,info:f}=this.state,d=f?.componentStack||null,h=typeof r>"u"?(u||"").toString():r,v=typeof a>"u"?d:a;return u?s.createElement(YN,{id:o,type:"error",message:h,description:s.createElement("pre",{style:{fontSize:"0.9em",overflowX:"auto"}},v)}):c}}])})(s.Component);const GN=YN;GN.ErrorBoundary=k5;const e2=e=>typeof e=="object"&&e!=null&&e.nodeType===1,t2=(e,t)=>(!t||e!=="hidden")&&e!=="visible"&&e!=="clip",mh=(e,t)=>{if(e.clientHeight{const a=(o=>{if(!o.ownerDocument||!o.ownerDocument.defaultView)return null;try{return o.ownerDocument.defaultView.frameElement}catch{return null}})(r);return!!a&&(a.clientHeightot||o>e&&c=t&&u>=n?o-e-r:c>t&&un?c-t+a:0,A5=e=>{const t=e.parentElement;return t??(e.getRootNode().host||null)},n2=(e,t)=>{var n,r,a,o;if(typeof document>"u")return[];const{scrollMode:c,block:u,inline:f,boundary:d,skipOverflowHiddenElements:h}=t,v=typeof d=="function"?d:T=>T!==d;if(!e2(e))throw new TypeError("Invalid target");const g=document.scrollingElement||document.documentElement,b=[];let x=e;for(;e2(x)&&v(x);){if(x=A5(x),x===g){b.push(x);break}x!=null&&x===document.body&&mh(x)&&!mh(document.documentElement)||x!=null&&mh(x,h)&&b.push(x)}const C=(r=(n=window.visualViewport)==null?void 0:n.width)!=null?r:innerWidth,y=(o=(a=window.visualViewport)==null?void 0:a.height)!=null?o:innerHeight,{scrollX:w,scrollY:$}=window,{height:E,width:O,top:I,right:j,bottom:M,left:D}=e.getBoundingClientRect(),{top:N,right:P,bottom:A,left:F}=(T=>{const z=window.getComputedStyle(T);return{top:parseFloat(z.scrollMarginTop)||0,right:parseFloat(z.scrollMarginRight)||0,bottom:parseFloat(z.scrollMarginBottom)||0,left:parseFloat(z.scrollMarginLeft)||0}})(e);let H=u==="start"||u==="nearest"?I-N:u==="end"?M+A:I+E/2-N+A,k=f==="center"?D+O/2-F+P:f==="end"?j+P:D-F;const L=[];for(let T=0;T=0&&D>=0&&M<=y&&j<=C&&(z===g&&!mh(z)||I>=G&&M<=U&&D>=K&&j<=B))return L;const Y=getComputedStyle(z),Q=parseInt(Y.borderLeftWidth,10),Z=parseInt(Y.borderTopWidth,10),ae=parseInt(Y.borderRightWidth,10),re=parseInt(Y.borderBottomWidth,10);let ie=0,ve=0;const ue="offsetWidth"in z?z.offsetWidth-z.clientWidth-Q-ae:0,oe="offsetHeight"in z?z.offsetHeight-z.clientHeight-Z-re:0,he="offsetWidth"in z?z.offsetWidth===0?0:q/z.offsetWidth:0,fe="offsetHeight"in z?z.offsetHeight===0?0:V/z.offsetHeight:0;if(g===z)ie=u==="start"?H:u==="end"?H-y:u==="nearest"?hh($,$+y,y,Z,re,$+H,$+H+E,E):H-y/2,ve=f==="start"?k:f==="center"?k-C/2:f==="end"?k-C:hh(w,w+C,C,Q,ae,w+k,w+k+O,O),ie=Math.max(0,ie+$),ve=Math.max(0,ve+w);else{ie=u==="start"?H-G-Z:u==="end"?H-U+re+oe:u==="nearest"?hh(G,U,V,Z,re+oe,H,H+E,E):H-(G+V/2)+oe/2,ve=f==="start"?k-K-Q:f==="center"?k-(K+q/2)+ue/2:f==="end"?k-B+ae+ue:hh(K,B,q,Q,ae+ue,k,k+O,O);const{scrollLeft:me,scrollTop:le}=z;ie=fe===0?0:Math.max(0,Math.min(le+ie/fe,z.scrollHeight-V/fe+oe)),ve=he===0?0:Math.max(0,Math.min(me+ve/he,z.scrollWidth-q/he+ue)),H+=le-ie,k+=me-ve}L.push({el:z,top:ie,left:ve})}return L},z5=e=>e===!1?{block:"end",inline:"nearest"}:(t=>t===Object(t)&&Object.keys(t).length!==0)(e)?e:{block:"start",inline:"nearest"};function L5(e,t){if(!e.isConnected||!(a=>{let o=a;for(;o&&o.parentNode;){if(o.parentNode===document)return!0;o=o.parentNode instanceof ShadowRoot?o.parentNode.host:o.parentNode}return!1})(e))return;const n=(a=>{const o=window.getComputedStyle(a);return{top:parseFloat(o.scrollMarginTop)||0,right:parseFloat(o.scrollMarginRight)||0,bottom:parseFloat(o.scrollMarginBottom)||0,left:parseFloat(o.scrollMarginLeft)||0}})(e);if((a=>typeof a=="object"&&typeof a.behavior=="function")(t))return t.behavior(n2(e,t));const r=typeof t=="boolean"||t==null?void 0:t.behavior;for(const{el:a,top:o,left:c}of n2(e,z5(t))){const u=o-n.top+n.bottom,f=c-n.left+n.right;a.scroll({top:u,left:f,behavior:r})}}function W0(e){return e!=null&&e===e.window}const H5=e=>{var t,n;if(typeof window>"u")return 0;let r=0;return W0(e)?r=e.pageYOffset:e instanceof Document?r=e.documentElement.scrollTop:(e instanceof HTMLElement||e)&&(r=e.scrollTop),e&&!W0(e)&&typeof r!="number"&&(r=(n=((t=e.ownerDocument)!==null&&t!==void 0?t:e).documentElement)===null||n===void 0?void 0:n.scrollTop),r};function B5(e,t,n,r){const a=n-t;return e/=r/2,e<1?a/2*e*e*e+t:a/2*((e-=2)*e*e+2)+t}function F5(e,t={}){const{getContainer:n=()=>window,callback:r,duration:a=450}=t,o=n(),c=H5(o),u=Date.now(),f=()=>{const h=Date.now()-u,v=B5(h>a?a:h,c,e,a);W0(o)?o.scrollTo(window.pageXOffset,v):o instanceof Document||o.constructor.name==="HTMLDocument"?o.documentElement.scrollTop=v:o.scrollTop=v,h{const[,,,,t]=Ta();return t?`${e}-css-var`:""};var Mt={BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,CAPS_LOCK:20,ESC:27,SPACE:32,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,N:78,P:80,META:91,WIN_KEY_RIGHT:92,CONTEXT_MENU:93,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,SEMICOLON:186,EQUALS:187,WIN_KEY:224},XN=s.forwardRef(function(e,t){var n=e.prefixCls,r=e.style,a=e.className,o=e.duration,c=o===void 0?4.5:o,u=e.showProgress,f=e.pauseOnHover,d=f===void 0?!0:f,h=e.eventKey,v=e.content,g=e.closable,b=e.closeIcon,x=b===void 0?"x":b,C=e.props,y=e.onClick,w=e.onNoticeClose,$=e.times,E=e.hovering,O=s.useState(!1),I=ce(O,2),j=I[0],M=I[1],D=s.useState(0),N=ce(D,2),P=N[0],A=N[1],F=s.useState(0),H=ce(F,2),k=H[0],L=H[1],T=E||j,z=c>0&&u,V=function(){w(h)},q=function(Q){(Q.key==="Enter"||Q.code==="Enter"||Q.keyCode===Mt.ENTER)&&V()};s.useEffect(function(){if(!T&&c>0){var Y=Date.now()-k,Q=setTimeout(function(){V()},c*1e3-k);return function(){d&&clearTimeout(Q),L(Date.now()-Y)}}},[c,T,$]),s.useEffect(function(){if(!T&&z&&(d||k===0)){var Y=performance.now(),Q,Z=function ae(){cancelAnimationFrame(Q),Q=requestAnimationFrame(function(re){var ie=re+k-Y,ve=Math.min(ie/(c*1e3),1);A(ve*100),ve<1&&ae()})};return Z(),function(){d&&cancelAnimationFrame(Q)}}},[c,k,T,z,$]);var G=s.useMemo(function(){return jt(g)==="object"&&g!==null?g:g?{closeIcon:x}:{}},[g,x]),B=ma(G,!0),U=100-(!P||P<0?0:P>100?100:P),K="".concat(n,"-notice");return s.createElement("div",Me({},C,{ref:t,className:se(K,a,X({},"".concat(K,"-closable"),g)),style:r,onMouseEnter:function(Q){var Z;M(!0),C==null||(Z=C.onMouseEnter)===null||Z===void 0||Z.call(C,Q)},onMouseLeave:function(Q){var Z;M(!1),C==null||(Z=C.onMouseLeave)===null||Z===void 0||Z.call(C,Q)},onClick:y}),s.createElement("div",{className:"".concat(K,"-content")},v),g&&s.createElement("a",Me({tabIndex:0,className:"".concat(K,"-close"),onKeyDown:q,"aria-label":"Close"},B,{onClick:function(Q){Q.preventDefault(),Q.stopPropagation(),V()}}),G.closeIcon),z&&s.createElement("progress",{className:"".concat(K,"-progress"),max:"100",value:U},U+"%"))}),QN=Se.createContext({}),V5=function(t){var n=t.children,r=t.classNames;return Se.createElement(QN.Provider,{value:{classNames:r}},n)},r2=8,a2=3,i2=16,K5=function(t){var n={offset:r2,threshold:a2,gap:i2};if(t&&jt(t)==="object"){var r,a,o;n.offset=(r=t.offset)!==null&&r!==void 0?r:r2,n.threshold=(a=t.threshold)!==null&&a!==void 0?a:a2,n.gap=(o=t.gap)!==null&&o!==void 0?o:i2}return[!!t,n]},U5=["className","style","classNames","styles"],W5=function(t){var n=t.configList,r=t.placement,a=t.prefixCls,o=t.className,c=t.style,u=t.motion,f=t.onAllNoticeRemoved,d=t.onNoticeClose,h=t.stack,v=s.useContext(QN),g=v.classNames,b=s.useRef({}),x=s.useState(null),C=ce(x,2),y=C[0],w=C[1],$=s.useState([]),E=ce($,2),O=E[0],I=E[1],j=n.map(function(T){return{config:T,key:String(T.key)}}),M=K5(h),D=ce(M,2),N=D[0],P=D[1],A=P.offset,F=P.threshold,H=P.gap,k=N&&(O.length>0||j.length<=F),L=typeof u=="function"?u(r):u;return s.useEffect(function(){N&&O.length>1&&I(function(T){return T.filter(function(z){return j.some(function(V){var q=V.key;return z===q})})})},[O,j,N]),s.useEffect(function(){var T;if(N&&b.current[(T=j[j.length-1])===null||T===void 0?void 0:T.key]){var z;w(b.current[(z=j[j.length-1])===null||z===void 0?void 0:z.key])}},[j,N]),Se.createElement(ES,Me({key:r,className:se(a,"".concat(a,"-").concat(r),g?.list,o,X(X({},"".concat(a,"-stack"),!!N),"".concat(a,"-stack-expanded"),k)),style:c,keys:j,motionAppear:!0},L,{onAllRemoved:function(){f(r)}}),function(T,z){var V=T.config,q=T.className,G=T.style,B=T.index,U=V,K=U.key,Y=U.times,Q=String(K),Z=V,ae=Z.className,re=Z.style,ie=Z.classNames,ve=Z.styles,ue=Kt(Z,U5),oe=j.findIndex(function(we){return we.key===Q}),he={};if(N){var fe=j.length-1-(oe>-1?oe:B-1),me=r==="top"||r==="bottom"?"-50%":"0";if(fe>0){var le,pe,Ce;he.height=k?(le=b.current[Q])===null||le===void 0?void 0:le.offsetHeight:y?.offsetHeight;for(var De=0,je=0;je-1?b.current[Q]=Fe:delete b.current[Q]},prefixCls:a,classNames:ie,styles:ve,className:se(ae,g?.notice),style:re,times:Y,key:K,eventKey:K,onNoticeClose:d,hovering:N&&O.length>0})))})},q5=s.forwardRef(function(e,t){var n=e.prefixCls,r=n===void 0?"rc-notification":n,a=e.container,o=e.motion,c=e.maxCount,u=e.className,f=e.style,d=e.onAllRemoved,h=e.stack,v=e.renderNotifications,g=s.useState([]),b=ce(g,2),x=b[0],C=b[1],y=function(N){var P,A=x.find(function(F){return F.key===N});A==null||(P=A.onClose)===null||P===void 0||P.call(A),C(function(F){return F.filter(function(H){return H.key!==N})})};s.useImperativeHandle(t,function(){return{open:function(N){C(function(P){var A=ke(P),F=A.findIndex(function(L){return L.key===N.key}),H=ee({},N);if(F>=0){var k;H.times=(((k=P[F])===null||k===void 0?void 0:k.times)||0)+1,A[F]=H}else H.times=0,A.push(H);return c>0&&A.length>c&&(A=A.slice(-c)),A})},close:function(N){y(N)},destroy:function(){C([])}}});var w=s.useState({}),$=ce(w,2),E=$[0],O=$[1];s.useEffect(function(){var D={};x.forEach(function(N){var P=N.placement,A=P===void 0?"topRight":P;A&&(D[A]=D[A]||[],D[A].push(N))}),Object.keys(E).forEach(function(N){D[N]=D[N]||[]}),O(D)},[x]);var I=function(N){O(function(P){var A=ee({},P),F=A[N]||[];return F.length||delete A[N],A})},j=s.useRef(!1);if(s.useEffect(function(){Object.keys(E).length>0?j.current=!0:j.current&&(d?.(),j.current=!1)},[E]),!a)return null;var M=Object.keys(E);return Li.createPortal(s.createElement(s.Fragment,null,M.map(function(D){var N=E[D],P=s.createElement(W5,{key:D,configList:N,placement:D,prefixCls:r,className:u?.(D),style:f?.(D),motion:o,onNoticeClose:y,onAllNoticeRemoved:I,stack:h});return v?v(P,{prefixCls:r,key:D}):P})),a)}),Y5=["getContainer","motion","prefixCls","maxCount","className","style","onAllRemoved","stack","renderNotifications"],G5=function(){return document.body},o2=0;function X5(){for(var e={},t=arguments.length,n=new Array(t),r=0;r0&&arguments[0]!==void 0?arguments[0]:{},t=e.getContainer,n=t===void 0?G5:t,r=e.motion,a=e.prefixCls,o=e.maxCount,c=e.className,u=e.style,f=e.onAllRemoved,d=e.stack,h=e.renderNotifications,v=Kt(e,Y5),g=s.useState(),b=ce(g,2),x=b[0],C=b[1],y=s.useRef(),w=s.createElement(q5,{container:x,ref:y,prefixCls:a,motion:r,maxCount:o,className:c,style:u,onAllRemoved:f,stack:d,renderNotifications:h}),$=s.useState([]),E=ce($,2),O=E[0],I=E[1],j=pn(function(D){var N=X5(v,D);(N.key===null||N.key===void 0)&&(N.key="rc-notification-".concat(o2),o2+=1),I(function(P){return[].concat(ke(P),[{type:"open",config:N}])})}),M=s.useMemo(function(){return{open:j,close:function(N){I(function(P){return[].concat(ke(P),[{type:"close",key:N}])})},destroy:function(){I(function(N){return[].concat(ke(N),[{type:"destroy"}])})}}},[]);return s.useEffect(function(){C(n())}),s.useEffect(function(){if(y.current&&O.length){O.forEach(function(P){switch(P.type){case"open":y.current.open(P.config);break;case"close":y.current.close(P.key);break;case"destroy":y.current.destroy();break}});var D,N;I(function(P){return(D!==P||!N)&&(D=P,N=P.filter(function(A){return!O.includes(A)})),N})}},[O]),[M,w]}var Z5={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M988 548c-19.9 0-36-16.1-36-36 0-59.4-11.6-117-34.6-171.3a440.45 440.45 0 00-94.3-139.9 437.71 437.71 0 00-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.3C772.3 66 827 103 874 150c47 47 83.9 101.8 109.7 162.7 26.7 63.1 40.2 130.2 40.2 199.3.1 19.9-16 36-35.9 36z"}}]},name:"loading",theme:"outlined"},J5=function(t,n){return s.createElement($n,Me({},t,{ref:n,icon:Z5}))},qo=s.forwardRef(J5);const IS=Se.createContext(void 0),Rl=100,e8=10,t8=Rl*e8,ZN={Modal:Rl,Drawer:Rl,Popover:Rl,Popconfirm:Rl,Tooltip:Rl,Tour:Rl,FloatButton:Rl},n8={SelectLike:50,Dropdown:50,DatePicker:50,Menu:50,ImagePreview:1};function r8(e){return e in ZN}const du=(e,t)=>{const[,n]=Ta(),r=Se.useContext(IS),a=r8(e);let o;if(t!==void 0)o=[t,t];else{let c=r??0;a?c+=(r?0:n.zIndexPopupBase)+ZN[e]:c+=n8[e],o=[r===void 0?t:c,c]}return o},a8=e=>{const{componentCls:t,iconCls:n,boxShadow:r,colorText:a,colorSuccess:o,colorError:c,colorWarning:u,colorInfo:f,fontSizeLG:d,motionEaseInOutCirc:h,motionDurationSlow:v,marginXS:g,paddingXS:b,borderRadiusLG:x,zIndexPopup:C,contentPadding:y,contentBg:w}=e,$=`${t}-notice`,E=new jn("MessageMoveIn",{"0%":{padding:0,transform:"translateY(-100%)",opacity:0},"100%":{padding:b,transform:"translateY(0)",opacity:1}}),O=new jn("MessageMoveOut",{"0%":{maxHeight:e.height,padding:b,opacity:1},"100%":{maxHeight:0,padding:0,opacity:0}}),I={padding:b,textAlign:"center",[`${t}-custom-content`]:{display:"flex",alignItems:"center"},[`${t}-custom-content > ${n}`]:{marginInlineEnd:g,fontSize:d},[`${$}-content`]:{display:"inline-block",padding:y,background:w,borderRadius:x,boxShadow:r,pointerEvents:"all"},[`${t}-success > ${n}`]:{color:o},[`${t}-error > ${n}`]:{color:c},[`${t}-warning > ${n}`]:{color:u},[`${t}-info > ${n}, + ${t}-loading > ${n}`]:{color:f}};return[{[t]:Object.assign(Object.assign({},zn(e)),{color:a,position:"fixed",top:g,width:"100%",pointerEvents:"none",zIndex:C,[`${t}-move-up`]:{animationFillMode:"forwards"},[` + ${t}-move-up-appear, + ${t}-move-up-enter + `]:{animationName:E,animationDuration:v,animationPlayState:"paused",animationTimingFunction:h},[` + ${t}-move-up-appear${t}-move-up-appear-active, + ${t}-move-up-enter${t}-move-up-enter-active + `]:{animationPlayState:"running"},[`${t}-move-up-leave`]:{animationName:O,animationDuration:v,animationPlayState:"paused",animationTimingFunction:h},[`${t}-move-up-leave${t}-move-up-leave-active`]:{animationPlayState:"running"},"&-rtl":{direction:"rtl",span:{direction:"rtl"}}})},{[t]:{[`${$}-wrapper`]:Object.assign({},I)}},{[`${t}-notice-pure-panel`]:Object.assign(Object.assign({},I),{padding:0,textAlign:"start"})}]},i8=e=>({zIndexPopup:e.zIndexPopupBase+t8+10,contentBg:e.colorBgElevated,contentPadding:`${(e.controlHeightLG-e.fontSize*e.lineHeight)/2}px ${e.paddingSM}px`}),JN=Kn("Message",e=>{const t=xn(e,{height:150});return a8(t)},i8);var o8=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,r=Object.getOwnPropertySymbols(e);as.createElement("div",{className:se(`${e}-custom-content`,`${e}-${t}`)},n||l8[t],s.createElement("span",null,r)),s8=e=>{const{prefixCls:t,className:n,type:r,icon:a,content:o}=e,c=o8(e,["prefixCls","className","type","icon","content"]),{getPrefixCls:u}=s.useContext(Wt),f=t||u("message"),d=oa(f),[h,v,g]=JN(f,d);return h(s.createElement(XN,Object.assign({},c,{prefixCls:f,className:se(n,v,`${f}-notice-pure-panel`,g,d),eventKey:"pure",duration:null,content:s.createElement(eM,{prefixCls:f,type:r,icon:a},o)})))};function c8(e,t){return{motionName:t??`${e}-move-up`}}function RS(e){let t;const n=new Promise(a=>{t=e(()=>{a(!0)})}),r=()=>{t?.()};return r.then=(a,o)=>n.then(a,o),r.promise=n,r}var u8=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,r=Object.getOwnPropertySymbols(e);a{const n=oa(t),[r,a,o]=JN(t,n);return r(s.createElement(V5,{classNames:{list:se(a,o,n)}},e))},h8=(e,{prefixCls:t,key:n})=>s.createElement(m8,{prefixCls:t,key:n},e),v8=s.forwardRef((e,t)=>{const{top:n,prefixCls:r,getContainer:a,maxCount:o,duration:c=f8,rtl:u,transitionName:f,onAllRemoved:d}=e,{getPrefixCls:h,getPopupContainer:v,message:g,direction:b}=s.useContext(Wt),x=r||h("message"),C=()=>({left:"50%",transform:"translateX(-50%)",top:n??d8}),y=()=>se({[`${x}-rtl`]:u??b==="rtl"}),w=()=>c8(x,f),$=s.createElement("span",{className:`${x}-close-x`},s.createElement(uu,{className:`${x}-close-icon`})),[E,O]=Q5({prefixCls:x,style:C,className:y,motion:w,closable:!1,closeIcon:$,duration:c,getContainer:()=>a?.()||v?.()||document.body,maxCount:o,onAllRemoved:d,renderNotifications:h8});return s.useImperativeHandle(t,()=>Object.assign(Object.assign({},E),{prefixCls:x,message:g})),O});let l2=0;function tM(e){const t=s.useRef(null);return Kl(),[s.useMemo(()=>{const r=f=>{var d;(d=t.current)===null||d===void 0||d.close(f)},a=f=>{if(!t.current){const j=()=>{};return j.then=()=>{},j}const{open:d,prefixCls:h,message:v}=t.current,g=`${h}-notice`,{content:b,icon:x,type:C,key:y,className:w,style:$,onClose:E}=f,O=u8(f,["content","icon","type","key","className","style","onClose"]);let I=y;return I==null&&(l2+=1,I=`antd-message-${l2}`),RS(j=>(d(Object.assign(Object.assign({},O),{key:I,content:s.createElement(eM,{prefixCls:h,type:C,icon:x},b),placement:"top",className:se(C&&`${g}-${C}`,w,v?.className),style:Object.assign(Object.assign({},v?.style),$),onClose:()=>{E?.(),j()}})),()=>{r(I)}))},c={open:a,destroy:f=>{var d;f!==void 0?r(f):(d=t.current)===null||d===void 0||d.destroy()}};return["info","success","warning","error","loading"].forEach(f=>{const d=(h,v,g)=>{let b;h&&typeof h=="object"&&"content"in h?b=h:b={content:h};let x,C;typeof v=="function"?C=v:(x=v,C=g);const y=Object.assign(Object.assign({onClose:C,duration:x},b),{type:f});return a(y)};c[f]=d}),c},[]),s.createElement(v8,Object.assign({key:"message-holder"},e,{ref:t}))]}function g8(e){return tM(e)}function nM(e,t){this.v=e,this.k=t}function Oa(e,t,n,r){var a=Object.defineProperty;try{a({},"",{})}catch{a=0}Oa=function(c,u,f,d){function h(v,g){Oa(c,v,function(b){return this._invoke(v,g,b)})}u?a?a(c,u,{value:f,enumerable:!d,configurable:!d,writable:!d}):c[u]=f:(h("next",0),h("throw",1),h("return",2))},Oa(e,t,n,r)}function NS(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */var e,t,n=typeof Symbol=="function"?Symbol:{},r=n.iterator||"@@iterator",a=n.toStringTag||"@@toStringTag";function o(b,x,C,y){var w=x&&x.prototype instanceof u?x:u,$=Object.create(w.prototype);return Oa($,"_invoke",(function(E,O,I){var j,M,D,N=0,P=I||[],A=!1,F={p:0,n:0,v:e,a:H,f:H.bind(e,4),d:function(L,T){return j=L,M=0,D=e,F.n=T,c}};function H(k,L){for(M=k,D=L,t=0;!A&&N&&!T&&t3?(T=q===L)&&(D=z[(M=z[4])?5:(M=3,3)],z[4]=z[5]=e):z[0]<=V&&((T=k<2&&VL||L>q)&&(z[4]=k,z[5]=L,F.n=q,M=0))}if(T||k>1)return c;throw A=!0,L}return function(k,L,T){if(N>1)throw TypeError("Generator is already running");for(A&&L===1&&H(L,T),M=L,D=T;(t=M<2?e:D)||!A;){j||(M?M<3?(M>1&&(F.n=-1),H(M,D)):F.n=D:F.v=D);try{if(N=2,j){if(M||(k="next"),t=j[k]){if(!(t=t.call(j,D)))throw TypeError("iterator result is not an object");if(!t.done)return t;D=t.value,M<2&&(M=0)}else M===1&&(t=j.return)&&t.call(j),M<2&&(D=TypeError("The iterator does not provide a '"+k+"' method"),M=1);j=e}else if((t=(A=F.n<0)?D:E.call(O,F))!==c)break}catch(z){j=e,M=1,D=z}finally{N=1}}return{value:t,done:A}}})(b,C,y),!0),$}var c={};function u(){}function f(){}function d(){}t=Object.getPrototypeOf;var h=[][r]?t(t([][r]())):(Oa(t={},r,function(){return this}),t),v=d.prototype=u.prototype=Object.create(h);function g(b){return Object.setPrototypeOf?Object.setPrototypeOf(b,d):(b.__proto__=d,Oa(b,a,"GeneratorFunction")),b.prototype=Object.create(v),b}return f.prototype=d,Oa(v,"constructor",d),Oa(d,"constructor",f),f.displayName="GeneratorFunction",Oa(d,a,"GeneratorFunction"),Oa(v),Oa(v,a,"Generator"),Oa(v,r,function(){return this}),Oa(v,"toString",function(){return"[object Generator]"}),(NS=function(){return{w:o,m:g}})()}function gv(e,t){function n(a,o,c,u){try{var f=e[a](o),d=f.value;return d instanceof nM?t.resolve(d.v).then(function(h){n("next",h,c,u)},function(h){n("throw",h,c,u)}):t.resolve(d).then(function(h){f.value=h,c(f)},function(h){return n("throw",h,c,u)})}catch(h){u(h)}}var r;this.next||(Oa(gv.prototype),Oa(gv.prototype,typeof Symbol=="function"&&Symbol.asyncIterator||"@asyncIterator",function(){return this})),Oa(this,"_invoke",function(a,o,c){function u(){return new t(function(f,d){n(a,c,f,d)})}return r=r?r.then(u,u):u()},!0)}function rM(e,t,n,r,a){return new gv(NS().w(e,t,n,r),a||Promise)}function p8(e,t,n,r,a){var o=rM(e,t,n,r,a);return o.next().then(function(c){return c.done?c.value:o.next()})}function b8(e){var t=Object(e),n=[];for(var r in t)n.unshift(r);return function a(){for(;n.length;)if((r=n.pop())in t)return a.value=r,a.done=!1,a;return a.done=!0,a}}function s2(e){if(e!=null){var t=e[typeof Symbol=="function"&&Symbol.iterator||"@@iterator"],n=0;if(t)return t.call(e);if(typeof e.next=="function")return e;if(!isNaN(e.length))return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}}}throw new TypeError(jt(e)+" is not iterable")}function Jn(){var e=NS(),t=e.m(Jn),n=(Object.getPrototypeOf?Object.getPrototypeOf(t):t.__proto__).constructor;function r(c){var u=typeof c=="function"&&c.constructor;return!!u&&(u===n||(u.displayName||u.name)==="GeneratorFunction")}var a={throw:1,return:2,break:3,continue:3};function o(c){var u,f;return function(d){u||(u={stop:function(){return f(d.a,2)},catch:function(){return d.v},abrupt:function(v,g){return f(d.a,a[v],g)},delegateYield:function(v,g,b){return u.resultName=g,f(d.d,s2(v),b)},finish:function(v){return f(d.f,v)}},f=function(v,g,b){d.p=u.prev,d.n=u.next;try{return v(g,b)}finally{u.next=d.n}}),u.resultName&&(u[u.resultName]=d.v,u.resultName=void 0),u.sent=d.v,u.next=d.n;try{return c.call(this,u)}finally{d.p=u.prev,d.n=u.next}}}return(Jn=function(){return{wrap:function(f,d,h,v){return e.w(o(f),d,h,v&&v.reverse())},isGeneratorFunction:r,mark:e.m,awrap:function(f,d){return new nM(f,d)},AsyncIterator:gv,async:function(f,d,h,v,g){return(r(d)?rM:p8)(o(f),d,h,v,g)},keys:b8,values:s2}})()}function c2(e,t,n,r,a,o,c){try{var u=e[o](c),f=u.value}catch(d){return void n(d)}u.done?t(f):Promise.resolve(f).then(r,a)}function za(e){return function(){var t=this,n=arguments;return new Promise(function(r,a){var o=e.apply(t,n);function c(f){c2(o,r,a,c,u,"next",f)}function u(f){c2(o,r,a,c,u,"throw",f)}c(void 0)})}}var Mf=ee({},F6),y8=Mf.version,cy=Mf.render,x8=Mf.unmountComponentAtNode,Kv;try{var S8=Number((y8||"").split(".")[0]);S8>=18&&(Kv=Mf.createRoot)}catch{}function u2(e){var t=Mf.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;t&&jt(t)==="object"&&(t.usingClientEntryPoint=e)}var pv="__rc_react_root__";function C8(e,t){u2(!0);var n=t[pv]||Kv(t);u2(!1),n.render(e),t[pv]=n}function w8(e,t){cy?.(e,t)}function $8(e,t){if(Kv){C8(e,t);return}w8(e,t)}function E8(e){return q0.apply(this,arguments)}function q0(){return q0=za(Jn().mark(function e(t){return Jn().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",Promise.resolve().then(function(){var a;(a=t[pv])===null||a===void 0||a.unmount(),delete t[pv]}));case 1:case"end":return r.stop()}},e)})),q0.apply(this,arguments)}function _8(e){x8(e)}function O8(e){return Y0.apply(this,arguments)}function Y0(){return Y0=za(Jn().mark(function e(t){return Jn().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:if(Kv===void 0){r.next=2;break}return r.abrupt("return",E8(t));case 2:_8(t);case 3:case"end":return r.stop()}},e)})),Y0.apply(this,arguments)}const I8=(e,t)=>($8(e,t),()=>O8(t));let R8=I8;function aM(e){return R8}const uy=()=>({height:0,opacity:0}),d2=e=>{const{scrollHeight:t}=e;return{height:t,opacity:1}},N8=e=>({height:e?e.offsetHeight:0}),dy=(e,t)=>t?.deadline===!0||t.propertyName==="height",ff=(e=df)=>({motionName:`${e}-motion-collapse`,onAppearStart:uy,onEnterStart:uy,onAppearActive:d2,onEnterActive:d2,onLeaveStart:N8,onLeaveActive:uy,onAppearEnd:dy,onEnterEnd:dy,onLeaveEnd:dy,motionDeadline:500}),MS=(e,t,n)=>n!==void 0?n:`${e}-${t}`;function lr(e,t){var n=Object.assign({},e);return Array.isArray(t)&&t.forEach(function(r){delete n[r]}),n}const fu=(function(e){if(!e)return!1;if(e instanceof Element){if(e.offsetParent)return!0;if(e.getBBox){var t=e.getBBox(),n=t.width,r=t.height;if(n||r)return!0}if(e.getBoundingClientRect){var a=e.getBoundingClientRect(),o=a.width,c=a.height;if(o||c)return!0}}return!1}),M8=e=>{const{componentCls:t,colorPrimary:n}=e;return{[t]:{position:"absolute",background:"transparent",pointerEvents:"none",boxSizing:"border-box",color:`var(--wave-color, ${n})`,boxShadow:"0 0 0 0 currentcolor",opacity:.2,"&.wave-motion-appear":{transition:[`box-shadow 0.4s ${e.motionEaseOutCirc}`,`opacity 2s ${e.motionEaseOutCirc}`].join(","),"&-active":{boxShadow:"0 0 0 6px currentcolor",opacity:0},"&.wave-quick":{transition:[`box-shadow ${e.motionDurationSlow} ${e.motionEaseInOut}`,`opacity ${e.motionDurationSlow} ${e.motionEaseInOut}`].join(",")}}}}},j8=xz("Wave",M8),Uv=`${df}-wave-target`;function T8(e){return e&&e!=="#fff"&&e!=="#ffffff"&&e!=="rgb(255, 255, 255)"&&e!=="rgba(255, 255, 255, 1)"&&!/rgba\((?:\d*, ){3}0\)/.test(e)&&e!=="transparent"&&e!=="canvastext"}function D8(e){var t;const{borderTopColor:n,borderColor:r,backgroundColor:a}=getComputedStyle(e);return(t=[n,r,a].find(T8))!==null&&t!==void 0?t:null}function fy(e){return Number.isNaN(e)?0:e}const P8=e=>{const{className:t,target:n,component:r,registerUnmount:a}=e,o=s.useRef(null),c=s.useRef(null);s.useEffect(()=>{c.current=a()},[]);const[u,f]=s.useState(null),[d,h]=s.useState([]),[v,g]=s.useState(0),[b,x]=s.useState(0),[C,y]=s.useState(0),[w,$]=s.useState(0),[E,O]=s.useState(!1),I={left:v,top:b,width:C,height:w,borderRadius:d.map(D=>`${D}px`).join(" ")};u&&(I["--wave-color"]=u);function j(){const D=getComputedStyle(n);f(D8(n));const N=D.position==="static",{borderLeftWidth:P,borderTopWidth:A}=D;g(N?n.offsetLeft:fy(-Number.parseFloat(P))),x(N?n.offsetTop:fy(-Number.parseFloat(A))),y(n.offsetWidth),$(n.offsetHeight);const{borderTopLeftRadius:F,borderTopRightRadius:H,borderBottomLeftRadius:k,borderBottomRightRadius:L}=D;h([F,H,L,k].map(T=>fy(Number.parseFloat(T))))}if(s.useEffect(()=>{if(n){const D=hn(()=>{j(),O(!0)});let N;return typeof ResizeObserver<"u"&&(N=new ResizeObserver(j),N.observe(n)),()=>{hn.cancel(D),N?.disconnect()}}},[n]),!E)return null;const M=(r==="Checkbox"||r==="Radio")&&n?.classList.contains(Uv);return s.createElement(Oi,{visible:!0,motionAppear:!0,motionName:"wave-motion",motionDeadline:5e3,onAppearEnd:(D,N)=>{var P,A;if(N.deadline||N.propertyName==="opacity"){const F=(P=o.current)===null||P===void 0?void 0:P.parentElement;(A=c.current)===null||A===void 0||A.call(c).then(()=>{F?.remove()})}return!1}},({className:D},N)=>s.createElement("div",{ref:Ea(o,N),className:se(t,D,{"wave-quick":M}),style:I}))},k8=(e,t)=>{var n;const{component:r}=t;if(r==="Checkbox"&&!(!((n=e.querySelector("input"))===null||n===void 0)&&n.checked))return;const a=document.createElement("div");a.style.position="absolute",a.style.left="0px",a.style.top="0px",e?.insertBefore(a,e?.firstChild);const o=aM();let c=null;function u(){return c}c=o(s.createElement(P8,Object.assign({},t,{target:e,registerUnmount:u})),a)},A8=(e,t,n)=>{const{wave:r}=s.useContext(Wt),[,a,o]=Ta(),c=pn(d=>{const h=e.current;if(r?.disabled||!h)return;const v=h.querySelector(`.${Uv}`)||h,{showEffect:g}=r||{};(g||k8)(v,{className:t,token:a,component:n,event:d,hashId:o})}),u=s.useRef(null);return d=>{hn.cancel(u.current),u.current=hn(()=>{c(d)})}},jf=e=>{const{children:t,disabled:n,component:r}=e,{getPrefixCls:a}=s.useContext(Wt),o=s.useRef(null),c=a("wave"),[,u]=j8(c),f=A8(o,se(c,u),r);if(Se.useEffect(()=>{const h=o.current;if(!h||h.nodeType!==window.Node.ELEMENT_NODE||n)return;const v=g=>{!fu(g.target)||!h.getAttribute||h.getAttribute("disabled")||h.disabled||h.className.includes("disabled")&&!h.className.includes("disabled:")||h.getAttribute("aria-disabled")==="true"||h.className.includes("-leave")||f(g)};return h.addEventListener("click",v,!0),()=>{h.removeEventListener("click",v,!0)}},[n]),!Se.isValidElement(t))return t??null;const d=Hi(t)?Ea(Vl(t),o):o;return $a(t,{ref:d})},la=e=>{const t=Se.useContext(Is);return Se.useMemo(()=>e?typeof e=="string"?e??t:typeof e=="function"?e(t):t:t,[e,t])},z8=e=>{const{componentCls:t}=e;return{[t]:{"&-block":{display:"flex",width:"100%"},"&-vertical":{flexDirection:"column"}}}},L8=e=>{const{componentCls:t,antCls:n}=e;return{[t]:{display:"inline-flex","&-rtl":{direction:"rtl"},"&-vertical":{flexDirection:"column"},"&-align":{flexDirection:"column","&-center":{alignItems:"center"},"&-start":{alignItems:"flex-start"},"&-end":{alignItems:"flex-end"},"&-baseline":{alignItems:"baseline"}},[`${t}-item:empty`]:{display:"none"},[`${t}-item > ${n}-badge-not-a-wrapper:only-child`]:{display:"block"}}}},H8=e=>{const{componentCls:t}=e;return{[t]:{"&-gap-row-small":{rowGap:e.spaceGapSmallSize},"&-gap-row-middle":{rowGap:e.spaceGapMiddleSize},"&-gap-row-large":{rowGap:e.spaceGapLargeSize},"&-gap-col-small":{columnGap:e.spaceGapSmallSize},"&-gap-col-middle":{columnGap:e.spaceGapMiddleSize},"&-gap-col-large":{columnGap:e.spaceGapLargeSize}}}},iM=Kn("Space",e=>{const t=xn(e,{spaceGapSmallSize:e.paddingXS,spaceGapMiddleSize:e.padding,spaceGapLargeSize:e.paddingLG});return[L8(t),H8(t),z8(t)]},()=>({}),{resetStyle:!1});var oM=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,r=Object.getOwnPropertySymbols(e);a{const n=s.useContext(Wv),r=s.useMemo(()=>{if(!n)return"";const{compactDirection:a,isFirstItem:o,isLastItem:c}=n,u=a==="vertical"?"-vertical-":"-";return se(`${e}-compact${u}item`,{[`${e}-compact${u}first-item`]:o,[`${e}-compact${u}last-item`]:c,[`${e}-compact${u}item-rtl`]:t==="rtl"})},[e,t,n]);return{compactSize:n?.compactSize,compactDirection:n?.compactDirection,compactItemClassnames:r}},B8=e=>{const{children:t}=e;return s.createElement(Wv.Provider,{value:null},t)},F8=e=>{const{children:t}=e,n=oM(e,["children"]);return s.createElement(Wv.Provider,{value:s.useMemo(()=>n,[n])},t)},V8=e=>{const{getPrefixCls:t,direction:n}=s.useContext(Wt),{size:r,direction:a,block:o,prefixCls:c,className:u,rootClassName:f,children:d}=e,h=oM(e,["size","direction","block","prefixCls","className","rootClassName","children"]),v=la(E=>r??E),g=t("space-compact",c),[b,x]=iM(g),C=se(g,x,{[`${g}-rtl`]:n==="rtl",[`${g}-block`]:o,[`${g}-vertical`]:a==="vertical"},u,f),y=s.useContext(Wv),w=Ma(d),$=s.useMemo(()=>w.map((E,O)=>{const I=E?.key||`${g}-item-${O}`;return s.createElement(F8,{key:I,compactSize:v,compactDirection:a,isFirstItem:O===0&&(!y||y?.isFirstItem),isLastItem:O===w.length-1&&(!y||y?.isLastItem)},E)}),[r,w,y]);return w.length===0?null:b(s.createElement("div",Object.assign({className:C},h),$))};var K8=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,r=Object.getOwnPropertySymbols(e);a{const{getPrefixCls:t,direction:n}=s.useContext(Wt),{prefixCls:r,size:a,className:o}=e,c=K8(e,["prefixCls","size","className"]),u=t("btn-group",r),[,,f]=Ta(),d=s.useMemo(()=>{switch(a){case"large":return"lg";case"small":return"sm";default:return""}},[a]),h=se(u,{[`${u}-${d}`]:d,[`${u}-rtl`]:n==="rtl"},o,f);return s.createElement(lM.Provider,{value:a},s.createElement("div",Object.assign({},c,{className:h})))},f2=/^[\u4E00-\u9FA5]{2}$/,G0=f2.test.bind(f2);function m2(e){return typeof e=="string"}function my(e){return e==="text"||e==="link"}function W8(e,t){if(e==null)return;const n=t?" ":"";return typeof e!="string"&&typeof e!="number"&&m2(e.type)&&G0(e.props.children)?$a(e,{children:e.props.children.split("").join(n)}):m2(e)?G0(e)?Se.createElement("span",null,e.split("").join(n)):Se.createElement("span",null,e):qN(e)?Se.createElement("span",null,e):e}function q8(e,t){let n=!1;const r=[];return Se.Children.forEach(e,a=>{const o=typeof a,c=o==="string"||o==="number";if(n&&c){const u=r.length-1,f=r[u];r[u]=`${f}${a}`}else r.push(a);n=c}),Se.Children.map(r,a=>W8(a,t))}["default","primary","danger"].concat(ke(Rs));const X0=s.forwardRef((e,t)=>{const{className:n,style:r,children:a,prefixCls:o}=e,c=se(`${o}-icon`,n);return Se.createElement("span",{ref:t,className:c,style:r},a)}),h2=s.forwardRef((e,t)=>{const{prefixCls:n,className:r,style:a,iconClassName:o}=e,c=se(`${n}-loading-icon`,r);return Se.createElement(X0,{prefixCls:n,className:c,style:a,ref:t},Se.createElement(qo,{className:o}))}),hy=()=>({width:0,opacity:0,transform:"scale(0)"}),vy=e=>({width:e.scrollWidth,opacity:1,transform:"scale(1)"}),Y8=e=>{const{prefixCls:t,loading:n,existIcon:r,className:a,style:o,mount:c}=e,u=!!n;return r?Se.createElement(h2,{prefixCls:t,className:a,style:o}):Se.createElement(Oi,{visible:u,motionName:`${t}-loading-icon-motion`,motionAppear:!c,motionEnter:!c,motionLeave:!c,removeOnLeave:!0,onAppearStart:hy,onAppearActive:vy,onEnterStart:hy,onEnterActive:vy,onLeaveStart:vy,onLeaveActive:hy},({className:f,style:d},h)=>{const v=Object.assign(Object.assign({},o),d);return Se.createElement(h2,{prefixCls:t,className:se(a,f),style:v,ref:h})})},v2=(e,t)=>({[`> span, > ${e}`]:{"&:not(:last-child)":{[`&, & > ${e}`]:{"&:not(:disabled)":{borderInlineEndColor:t}}},"&:not(:first-child)":{[`&, & > ${e}`]:{"&:not(:disabled)":{borderInlineStartColor:t}}}}}),G8=e=>{const{componentCls:t,fontSize:n,lineWidth:r,groupBorderColor:a,colorErrorHover:o}=e;return{[`${t}-group`]:[{position:"relative",display:"inline-flex",[`> span, > ${t}`]:{"&:not(:last-child)":{[`&, & > ${t}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},"&:not(:first-child)":{marginInlineStart:e.calc(r).mul(-1).equal(),[`&, & > ${t}`]:{borderStartStartRadius:0,borderEndStartRadius:0}}},[t]:{position:"relative",zIndex:1,"&:hover, &:focus, &:active":{zIndex:2},"&[disabled]":{zIndex:0}},[`${t}-icon-only`]:{fontSize:n}},v2(`${t}-primary`,a),v2(`${t}-danger`,o)]}},da=Math.round;function gy(e,t){const n=e.replace(/^[^(]*\((.*)/,"$1").replace(/\).*/,"").match(/\d*\.?\d+%?/g)||[],r=n.map(a=>parseFloat(a));for(let a=0;a<3;a+=1)r[a]=t(r[a]||0,n[a]||"",a);return n[3]?r[3]=n[3].includes("%")?r[3]/100:r[3]:r[3]=1,r}const g2=(e,t,n)=>n===0?e:e/100;function Sd(e,t){const n=t||255;return e>n?n:e<0?0:e}let sM=class cM{constructor(t){X(this,"isValid",!0),X(this,"r",0),X(this,"g",0),X(this,"b",0),X(this,"a",1),X(this,"_h",void 0),X(this,"_s",void 0),X(this,"_l",void 0),X(this,"_v",void 0),X(this,"_max",void 0),X(this,"_min",void 0),X(this,"_brightness",void 0);function n(r){return r[0]in t&&r[1]in t&&r[2]in t}if(t)if(typeof t=="string"){let a=function(o){return r.startsWith(o)};const r=t.trim();/^#?[A-F\d]{3,8}$/i.test(r)?this.fromHexString(r):a("rgb")?this.fromRgbString(r):a("hsl")?this.fromHslString(r):(a("hsv")||a("hsb"))&&this.fromHsvString(r)}else if(t instanceof cM)this.r=t.r,this.g=t.g,this.b=t.b,this.a=t.a,this._h=t._h,this._s=t._s,this._l=t._l,this._v=t._v;else if(n("rgb"))this.r=Sd(t.r),this.g=Sd(t.g),this.b=Sd(t.b),this.a=typeof t.a=="number"?Sd(t.a,1):1;else if(n("hsl"))this.fromHsl(t);else if(n("hsv"))this.fromHsv(t);else throw new Error("@ant-design/fast-color: unsupported input "+JSON.stringify(t))}setR(t){return this._sc("r",t)}setG(t){return this._sc("g",t)}setB(t){return this._sc("b",t)}setA(t){return this._sc("a",t,1)}setHue(t){const n=this.toHsv();return n.h=t,this._c(n)}getLuminance(){function t(o){const c=o/255;return c<=.03928?c/12.92:Math.pow((c+.055)/1.055,2.4)}const n=t(this.r),r=t(this.g),a=t(this.b);return .2126*n+.7152*r+.0722*a}getHue(){if(typeof this._h>"u"){const t=this.getMax()-this.getMin();t===0?this._h=0:this._h=da(60*(this.r===this.getMax()?(this.g-this.b)/t+(this.g"u"){const t=this.getMax()-this.getMin();t===0?this._s=0:this._s=t/this.getMax()}return this._s}getLightness(){return typeof this._l>"u"&&(this._l=(this.getMax()+this.getMin())/510),this._l}getValue(){return typeof this._v>"u"&&(this._v=this.getMax()/255),this._v}getBrightness(){return typeof this._brightness>"u"&&(this._brightness=(this.r*299+this.g*587+this.b*114)/1e3),this._brightness}darken(t=10){const n=this.getHue(),r=this.getSaturation();let a=this.getLightness()-t/100;return a<0&&(a=0),this._c({h:n,s:r,l:a,a:this.a})}lighten(t=10){const n=this.getHue(),r=this.getSaturation();let a=this.getLightness()+t/100;return a>1&&(a=1),this._c({h:n,s:r,l:a,a:this.a})}mix(t,n=50){const r=this._c(t),a=n/100,o=u=>(r[u]-this[u])*a+this[u],c={r:da(o("r")),g:da(o("g")),b:da(o("b")),a:da(o("a")*100)/100};return this._c(c)}tint(t=10){return this.mix({r:255,g:255,b:255,a:1},t)}shade(t=10){return this.mix({r:0,g:0,b:0,a:1},t)}onBackground(t){const n=this._c(t),r=this.a+n.a*(1-this.a),a=o=>da((this[o]*this.a+n[o]*n.a*(1-this.a))/r);return this._c({r:a("r"),g:a("g"),b:a("b"),a:r})}isDark(){return this.getBrightness()<128}isLight(){return this.getBrightness()>=128}equals(t){return this.r===t.r&&this.g===t.g&&this.b===t.b&&this.a===t.a}clone(){return this._c(this)}toHexString(){let t="#";const n=(this.r||0).toString(16);t+=n.length===2?n:"0"+n;const r=(this.g||0).toString(16);t+=r.length===2?r:"0"+r;const a=(this.b||0).toString(16);if(t+=a.length===2?a:"0"+a,typeof this.a=="number"&&this.a>=0&&this.a<1){const o=da(this.a*255).toString(16);t+=o.length===2?o:"0"+o}return t}toHsl(){return{h:this.getHue(),s:this.getSaturation(),l:this.getLightness(),a:this.a}}toHslString(){const t=this.getHue(),n=da(this.getSaturation()*100),r=da(this.getLightness()*100);return this.a!==1?`hsla(${t},${n}%,${r}%,${this.a})`:`hsl(${t},${n}%,${r}%)`}toHsv(){return{h:this.getHue(),s:this.getSaturation(),v:this.getValue(),a:this.a}}toRgb(){return{r:this.r,g:this.g,b:this.b,a:this.a}}toRgbString(){return this.a!==1?`rgba(${this.r},${this.g},${this.b},${this.a})`:`rgb(${this.r},${this.g},${this.b})`}toString(){return this.toRgbString()}_sc(t,n,r){const a=this.clone();return a[t]=Sd(n,r),a}_c(t){return new this.constructor(t)}getMax(){return typeof this._max>"u"&&(this._max=Math.max(this.r,this.g,this.b)),this._max}getMin(){return typeof this._min>"u"&&(this._min=Math.min(this.r,this.g,this.b)),this._min}fromHexString(t){const n=t.replace("#","");function r(a,o){return parseInt(n[a]+n[o||a],16)}n.length<6?(this.r=r(0),this.g=r(1),this.b=r(2),this.a=n[3]?r(3)/255:1):(this.r=r(0,1),this.g=r(2,3),this.b=r(4,5),this.a=n[6]?r(6,7)/255:1)}fromHsl({h:t,s:n,l:r,a}){if(this._h=t%360,this._s=n,this._l=r,this.a=typeof a=="number"?a:1,n<=0){const g=da(r*255);this.r=g,this.g=g,this.b=g}let o=0,c=0,u=0;const f=t/60,d=(1-Math.abs(2*r-1))*n,h=d*(1-Math.abs(f%2-1));f>=0&&f<1?(o=d,c=h):f>=1&&f<2?(o=h,c=d):f>=2&&f<3?(c=d,u=h):f>=3&&f<4?(c=h,u=d):f>=4&&f<5?(o=h,u=d):f>=5&&f<6&&(o=d,u=h);const v=r-d/2;this.r=da((o+v)*255),this.g=da((c+v)*255),this.b=da((u+v)*255)}fromHsv({h:t,s:n,v:r,a}){this._h=t%360,this._s=n,this._v=r,this.a=typeof a=="number"?a:1;const o=da(r*255);if(this.r=o,this.g=o,this.b=o,n<=0)return;const c=t/60,u=Math.floor(c),f=c-u,d=da(r*(1-n)*255),h=da(r*(1-n*f)*255),v=da(r*(1-n*(1-f))*255);switch(u){case 0:this.g=v,this.b=d;break;case 1:this.r=h,this.b=d;break;case 2:this.r=d,this.b=v;break;case 3:this.r=d,this.g=h;break;case 4:this.r=v,this.g=d;break;case 5:default:this.g=d,this.b=h;break}}fromHsvString(t){const n=gy(t,g2);this.fromHsv({h:n[0],s:n[1],v:n[2],a:n[3]})}fromHslString(t){const n=gy(t,g2);this.fromHsl({h:n[0],s:n[1],l:n[2],a:n[3]})}fromRgbString(t){const n=gy(t,(r,a)=>a.includes("%")?da(r/100*255):r);this.r=n[0],this.g=n[1],this.b=n[2],this.a=n[3]}};var X8=["b"],Q8=["v"],py=function(t){return Math.round(Number(t||0))},Z8=function(t){if(t instanceof sM)return t;if(t&&jt(t)==="object"&&"h"in t&&"b"in t){var n=t,r=n.b,a=Kt(n,X8);return ee(ee({},a),{},{v:r})}return typeof t=="string"&&/hsb/.test(t)?t.replace(/hsb/,"hsv"):t},mf=(function(e){oi(n,e);var t=_i(n);function n(r){return Sr(this,n),t.call(this,Z8(r))}return Cr(n,[{key:"toHsbString",value:function(){var a=this.toHsb(),o=py(a.s*100),c=py(a.b*100),u=py(a.h),f=a.a,d="hsb(".concat(u,", ").concat(o,"%, ").concat(c,"%)"),h="hsba(".concat(u,", ").concat(o,"%, ").concat(c,"%, ").concat(f.toFixed(f===0?0:2),")");return f===1?d:h}},{key:"toHsb",value:function(){var a=this.toHsv(),o=a.v,c=Kt(a,Q8);return ee(ee({},c),{},{b:o,a:this.a})}}]),n})(sM),J8=function(t){return t instanceof mf?t:new mf(t)};J8("#1677ff");const eL=(e,t)=>e?.replace(/[^\w/]/g,"").slice(0,t?8:6)||"",tL=(e,t)=>e?eL(e,t):"";let Q0=(function(){function e(t){Sr(this,e);var n;if(this.cleared=!1,t instanceof e){this.metaColor=t.metaColor.clone(),this.colors=(n=t.colors)===null||n===void 0?void 0:n.map(a=>({color:new e(a.color),percent:a.percent})),this.cleared=t.cleared;return}const r=Array.isArray(t);r&&t.length?(this.colors=t.map(({color:a,percent:o})=>({color:new e(a),percent:o})),this.metaColor=new mf(this.colors[0].color.metaColor)):this.metaColor=new mf(r?"":t),(!t||r&&!this.colors)&&(this.metaColor=this.metaColor.setA(0),this.cleared=!0)}return Cr(e,[{key:"toHsb",value:function(){return this.metaColor.toHsb()}},{key:"toHsbString",value:function(){return this.metaColor.toHsbString()}},{key:"toHex",value:function(){return tL(this.toHexString(),this.metaColor.a<1)}},{key:"toHexString",value:function(){return this.metaColor.toHexString()}},{key:"toRgb",value:function(){return this.metaColor.toRgb()}},{key:"toRgbString",value:function(){return this.metaColor.toRgbString()}},{key:"isGradient",value:function(){return!!this.colors&&!this.cleared}},{key:"getColors",value:function(){return this.colors||[{color:this,percent:0}]}},{key:"toCssString",value:function(){const{colors:n}=this;return n?`linear-gradient(90deg, ${n.map(a=>`${a.color.toRgbString()} ${a.percent}%`).join(", ")})`:this.metaColor.toRgbString()}},{key:"equals",value:function(n){return!n||this.isGradient()!==n.isGradient()?!1:this.isGradient()?this.colors.length===n.colors.length&&this.colors.every((r,a)=>{const o=n.colors[a];return r.percent===o.percent&&r.color.equals(o.color)}):this.toHexString()===n.toHexString()}}])})();var nL={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M765.7 486.8L314.9 134.7A7.97 7.97 0 00302 141v77.3c0 4.9 2.3 9.6 6.1 12.6l360 281.1-360 281.1c-3.9 3-6.1 7.7-6.1 12.6V883c0 6.7 7.7 10.4 12.9 6.3l450.8-352.1a31.96 31.96 0 000-50.4z"}}]},name:"right",theme:"outlined"},rL=function(t,n){return s.createElement($n,Me({},t,{ref:n,icon:nL}))},hf=s.forwardRef(rL);const qv=e=>({[e.componentCls]:{[`${e.antCls}-motion-collapse-legacy`]:{overflow:"hidden","&-active":{transition:`height ${e.motionDurationMid} ${e.motionEaseInOut}, + opacity ${e.motionDurationMid} ${e.motionEaseInOut} !important`}},[`${e.antCls}-motion-collapse`]:{overflow:"hidden",transition:`height ${e.motionDurationMid} ${e.motionEaseInOut}, + opacity ${e.motionDurationMid} ${e.motionEaseInOut} !important`}}}),aL=e=>({animationDuration:e,animationFillMode:"both"}),iL=e=>({animationDuration:e,animationFillMode:"both"}),Yv=(e,t,n,r,a=!1)=>{const o=a?"&":"";return{[` + ${o}${e}-enter, + ${o}${e}-appear + `]:Object.assign(Object.assign({},aL(r)),{animationPlayState:"paused"}),[`${o}${e}-leave`]:Object.assign(Object.assign({},iL(r)),{animationPlayState:"paused"}),[` + ${o}${e}-enter${e}-enter-active, + ${o}${e}-appear${e}-appear-active + `]:{animationName:t,animationPlayState:"running"},[`${o}${e}-leave${e}-leave-active`]:{animationName:n,animationPlayState:"running",pointerEvents:"none"}}},oL=new jn("antFadeIn",{"0%":{opacity:0},"100%":{opacity:1}}),lL=new jn("antFadeOut",{"0%":{opacity:1},"100%":{opacity:0}}),sL=(e,t=!1)=>{const{antCls:n}=e,r=`${n}-fade`,a=t?"&":"";return[Yv(r,oL,lL,e.motionDurationMid,t),{[` + ${a}${r}-enter, + ${a}${r}-appear + `]:{opacity:0,animationTimingFunction:"linear"},[`${a}${r}-leave`]:{animationTimingFunction:"linear"}}]},cL=new jn("antMoveDownIn",{"0%":{transform:"translate3d(0, 100%, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),uL=new jn("antMoveDownOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(0, 100%, 0)",transformOrigin:"0 0",opacity:0}}),dL=new jn("antMoveLeftIn",{"0%":{transform:"translate3d(-100%, 0, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),fL=new jn("antMoveLeftOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(-100%, 0, 0)",transformOrigin:"0 0",opacity:0}}),mL=new jn("antMoveRightIn",{"0%":{transform:"translate3d(100%, 0, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),hL=new jn("antMoveRightOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(100%, 0, 0)",transformOrigin:"0 0",opacity:0}}),vL=new jn("antMoveUpIn",{"0%":{transform:"translate3d(0, -100%, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),gL=new jn("antMoveUpOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(0, -100%, 0)",transformOrigin:"0 0",opacity:0}}),pL={"move-up":{inKeyframes:vL,outKeyframes:gL},"move-down":{inKeyframes:cL,outKeyframes:uL},"move-left":{inKeyframes:dL,outKeyframes:fL},"move-right":{inKeyframes:mL,outKeyframes:hL}},au=(e,t)=>{const{antCls:n}=e,r=`${n}-${t}`,{inKeyframes:a,outKeyframes:o}=pL[t];return[Yv(r,a,o,e.motionDurationMid),{[` + ${r}-enter, + ${r}-appear + `]:{opacity:0,animationTimingFunction:e.motionEaseOutCirc},[`${r}-leave`]:{animationTimingFunction:e.motionEaseInOutCirc}}]},Gv=new jn("antSlideUpIn",{"0%":{transform:"scaleY(0.8)",transformOrigin:"0% 0%",opacity:0},"100%":{transform:"scaleY(1)",transformOrigin:"0% 0%",opacity:1}}),Xv=new jn("antSlideUpOut",{"0%":{transform:"scaleY(1)",transformOrigin:"0% 0%",opacity:1},"100%":{transform:"scaleY(0.8)",transformOrigin:"0% 0%",opacity:0}}),Qv=new jn("antSlideDownIn",{"0%":{transform:"scaleY(0.8)",transformOrigin:"100% 100%",opacity:0},"100%":{transform:"scaleY(1)",transformOrigin:"100% 100%",opacity:1}}),Zv=new jn("antSlideDownOut",{"0%":{transform:"scaleY(1)",transformOrigin:"100% 100%",opacity:1},"100%":{transform:"scaleY(0.8)",transformOrigin:"100% 100%",opacity:0}}),bL=new jn("antSlideLeftIn",{"0%":{transform:"scaleX(0.8)",transformOrigin:"0% 0%",opacity:0},"100%":{transform:"scaleX(1)",transformOrigin:"0% 0%",opacity:1}}),yL=new jn("antSlideLeftOut",{"0%":{transform:"scaleX(1)",transformOrigin:"0% 0%",opacity:1},"100%":{transform:"scaleX(0.8)",transformOrigin:"0% 0%",opacity:0}}),xL=new jn("antSlideRightIn",{"0%":{transform:"scaleX(0.8)",transformOrigin:"100% 0%",opacity:0},"100%":{transform:"scaleX(1)",transformOrigin:"100% 0%",opacity:1}}),SL=new jn("antSlideRightOut",{"0%":{transform:"scaleX(1)",transformOrigin:"100% 0%",opacity:1},"100%":{transform:"scaleX(0.8)",transformOrigin:"100% 0%",opacity:0}}),CL={"slide-up":{inKeyframes:Gv,outKeyframes:Xv},"slide-down":{inKeyframes:Qv,outKeyframes:Zv},"slide-left":{inKeyframes:bL,outKeyframes:yL},"slide-right":{inKeyframes:xL,outKeyframes:SL}},co=(e,t)=>{const{antCls:n}=e,r=`${n}-${t}`,{inKeyframes:a,outKeyframes:o}=CL[t];return[Yv(r,a,o,e.motionDurationMid),{[` + ${r}-enter, + ${r}-appear + `]:{transform:"scale(0)",transformOrigin:"0% 0%",opacity:0,animationTimingFunction:e.motionEaseOutQuint,"&-prepare":{transform:"scale(1)"}},[`${r}-leave`]:{animationTimingFunction:e.motionEaseInQuint}}]},jS=new jn("antZoomIn",{"0%":{transform:"scale(0.2)",opacity:0},"100%":{transform:"scale(1)",opacity:1}}),wL=new jn("antZoomOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0.2)",opacity:0}}),p2=new jn("antZoomBigIn",{"0%":{transform:"scale(0.8)",opacity:0},"100%":{transform:"scale(1)",opacity:1}}),b2=new jn("antZoomBigOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0.8)",opacity:0}}),$L=new jn("antZoomUpIn",{"0%":{transform:"scale(0.8)",transformOrigin:"50% 0%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"50% 0%"}}),EL=new jn("antZoomUpOut",{"0%":{transform:"scale(1)",transformOrigin:"50% 0%"},"100%":{transform:"scale(0.8)",transformOrigin:"50% 0%",opacity:0}}),_L=new jn("antZoomLeftIn",{"0%":{transform:"scale(0.8)",transformOrigin:"0% 50%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"0% 50%"}}),OL=new jn("antZoomLeftOut",{"0%":{transform:"scale(1)",transformOrigin:"0% 50%"},"100%":{transform:"scale(0.8)",transformOrigin:"0% 50%",opacity:0}}),IL=new jn("antZoomRightIn",{"0%":{transform:"scale(0.8)",transformOrigin:"100% 50%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"100% 50%"}}),RL=new jn("antZoomRightOut",{"0%":{transform:"scale(1)",transformOrigin:"100% 50%"},"100%":{transform:"scale(0.8)",transformOrigin:"100% 50%",opacity:0}}),NL=new jn("antZoomDownIn",{"0%":{transform:"scale(0.8)",transformOrigin:"50% 100%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"50% 100%"}}),ML=new jn("antZoomDownOut",{"0%":{transform:"scale(1)",transformOrigin:"50% 100%"},"100%":{transform:"scale(0.8)",transformOrigin:"50% 100%",opacity:0}}),jL={zoom:{inKeyframes:jS,outKeyframes:wL},"zoom-big":{inKeyframes:p2,outKeyframes:b2},"zoom-big-fast":{inKeyframes:p2,outKeyframes:b2},"zoom-left":{inKeyframes:_L,outKeyframes:OL},"zoom-right":{inKeyframes:IL,outKeyframes:RL},"zoom-up":{inKeyframes:$L,outKeyframes:EL},"zoom-down":{inKeyframes:NL,outKeyframes:ML}},TS=(e,t)=>{const{antCls:n}=e,r=`${n}-${t}`,{inKeyframes:a,outKeyframes:o}=jL[t];return[Yv(r,a,o,t==="zoom-big-fast"?e.motionDurationFast:e.motionDurationMid),{[` + ${r}-enter, + ${r}-appear + `]:{transform:"scale(0)",opacity:0,animationTimingFunction:e.motionEaseOutCirc,"&-prepare":{transform:"none"}},[`${r}-leave`]:{animationTimingFunction:e.motionEaseInOutCirc}}]},TL=e=>e instanceof Q0?e:new Q0(e),DL=(e,t)=>{const{r:n,g:r,b:a,a:o}=e.toRgb(),c=new mf(e.toRgbString()).onBackground(t).toHsv();return o<=.5?c.v>.5:n*.299+r*.587+a*.114>192},uM=e=>{const{paddingInline:t,onlyIconSize:n}=e;return xn(e,{buttonPaddingHorizontal:t,buttonPaddingVertical:0,buttonIconOnlyFontSize:n})},dM=e=>{var t,n,r,a,o,c;const u=(t=e.contentFontSize)!==null&&t!==void 0?t:e.fontSize,f=(n=e.contentFontSizeSM)!==null&&n!==void 0?n:e.fontSize,d=(r=e.contentFontSizeLG)!==null&&r!==void 0?r:e.fontSizeLG,h=(a=e.contentLineHeight)!==null&&a!==void 0?a:Vh(u),v=(o=e.contentLineHeightSM)!==null&&o!==void 0?o:Vh(f),g=(c=e.contentLineHeightLG)!==null&&c!==void 0?c:Vh(d),b=DL(new Q0(e.colorBgSolid),"#fff")?"#000":"#fff",x=Rs.reduce((C,y)=>Object.assign(Object.assign({},C),{[`${y}ShadowColor`]:`0 ${te(e.controlOutlineWidth)} 0 ${Pd(e[`${y}1`],e.colorBgContainer)}`}),{});return Object.assign(Object.assign({},x),{fontWeight:400,iconGap:e.marginXS,defaultShadow:`0 ${e.controlOutlineWidth}px 0 ${e.controlTmpOutline}`,primaryShadow:`0 ${e.controlOutlineWidth}px 0 ${e.controlOutline}`,dangerShadow:`0 ${e.controlOutlineWidth}px 0 ${e.colorErrorOutline}`,primaryColor:e.colorTextLightSolid,dangerColor:e.colorTextLightSolid,borderColorDisabled:e.colorBorder,defaultGhostColor:e.colorBgContainer,ghostBg:"transparent",defaultGhostBorderColor:e.colorBgContainer,paddingInline:e.paddingContentHorizontal-e.lineWidth,paddingInlineLG:e.paddingContentHorizontal-e.lineWidth,paddingInlineSM:8-e.lineWidth,onlyIconSize:"inherit",onlyIconSizeSM:"inherit",onlyIconSizeLG:"inherit",groupBorderColor:e.colorPrimaryHover,linkHoverBg:"transparent",textTextColor:e.colorText,textTextHoverColor:e.colorText,textTextActiveColor:e.colorText,textHoverBg:e.colorFillTertiary,defaultColor:e.colorText,defaultBg:e.colorBgContainer,defaultBorderColor:e.colorBorder,defaultBorderColorDisabled:e.colorBorder,defaultHoverBg:e.colorBgContainer,defaultHoverColor:e.colorPrimaryHover,defaultHoverBorderColor:e.colorPrimaryHover,defaultActiveBg:e.colorBgContainer,defaultActiveColor:e.colorPrimaryActive,defaultActiveBorderColor:e.colorPrimaryActive,solidTextColor:b,contentFontSize:u,contentFontSizeSM:f,contentFontSizeLG:d,contentLineHeight:h,contentLineHeightSM:v,contentLineHeightLG:g,paddingBlock:Math.max((e.controlHeight-u*h)/2-e.lineWidth,0),paddingBlockSM:Math.max((e.controlHeightSM-f*v)/2-e.lineWidth,0),paddingBlockLG:Math.max((e.controlHeightLG-d*g)/2-e.lineWidth,0)})},PL=e=>{const{componentCls:t,iconCls:n,fontWeight:r,opacityLoading:a,motionDurationSlow:o,motionEaseInOut:c,iconGap:u,calc:f}=e;return{[t]:{outline:"none",position:"relative",display:"inline-flex",gap:u,alignItems:"center",justifyContent:"center",fontWeight:r,whiteSpace:"nowrap",textAlign:"center",backgroundImage:"none",background:"transparent",border:`${te(e.lineWidth)} ${e.lineType} transparent`,cursor:"pointer",transition:`all ${e.motionDurationMid} ${e.motionEaseInOut}`,userSelect:"none",touchAction:"manipulation",color:e.colorText,"&:disabled > *":{pointerEvents:"none"},[`${t}-icon > svg`]:lu(),"> a":{color:"currentColor"},"&:not(:disabled)":Wo(e),[`&${t}-two-chinese-chars::first-letter`]:{letterSpacing:"0.34em"},[`&${t}-two-chinese-chars > *:not(${n})`]:{marginInlineEnd:"-0.34em",letterSpacing:"0.34em"},[`&${t}-icon-only`]:{paddingInline:0,[`&${t}-compact-item`]:{flex:"none"}},[`&${t}-loading`]:{opacity:a,cursor:"default"},[`${t}-loading-icon`]:{transition:["width","opacity","margin"].map(d=>`${d} ${o} ${c}`).join(",")},[`&:not(${t}-icon-end)`]:{[`${t}-loading-icon-motion`]:{"&-appear-start, &-enter-start":{marginInlineEnd:f(u).mul(-1).equal()},"&-appear-active, &-enter-active":{marginInlineEnd:0},"&-leave-start":{marginInlineEnd:0},"&-leave-active":{marginInlineEnd:f(u).mul(-1).equal()}}},"&-icon-end":{flexDirection:"row-reverse",[`${t}-loading-icon-motion`]:{"&-appear-start, &-enter-start":{marginInlineStart:f(u).mul(-1).equal()},"&-appear-active, &-enter-active":{marginInlineStart:0},"&-leave-start":{marginInlineStart:0},"&-leave-active":{marginInlineStart:f(u).mul(-1).equal()}}}}}},fM=(e,t,n)=>({[`&:not(:disabled):not(${e}-disabled)`]:{"&:hover":t,"&:active":n}}),kL=e=>({minWidth:e.controlHeight,paddingInline:0,borderRadius:"50%"}),AL=e=>({cursor:"not-allowed",borderColor:e.borderColorDisabled,color:e.colorTextDisabled,background:e.colorBgContainerDisabled,boxShadow:"none"}),Jv=(e,t,n,r,a,o,c,u)=>({[`&${e}-background-ghost`]:Object.assign(Object.assign({color:n||void 0,background:t,borderColor:r||void 0,boxShadow:"none"},fM(e,Object.assign({background:t},c),Object.assign({background:t},u))),{"&:disabled":{cursor:"not-allowed",color:a||void 0,borderColor:o||void 0}})}),zL=e=>({[`&:disabled, &${e.componentCls}-disabled`]:Object.assign({},AL(e))}),LL=e=>({[`&:disabled, &${e.componentCls}-disabled`]:{cursor:"not-allowed",color:e.colorTextDisabled}}),eg=(e,t,n,r)=>{const o=r&&["link","text"].includes(r)?LL:zL;return Object.assign(Object.assign({},o(e)),fM(e.componentCls,t,n))},tg=(e,t,n,r,a)=>({[`&${e.componentCls}-variant-solid`]:Object.assign({color:t,background:n},eg(e,r,a))}),ng=(e,t,n,r,a)=>({[`&${e.componentCls}-variant-outlined, &${e.componentCls}-variant-dashed`]:Object.assign({borderColor:t,background:n},eg(e,r,a))}),rg=e=>({[`&${e.componentCls}-variant-dashed`]:{borderStyle:"dashed"}}),ag=(e,t,n,r)=>({[`&${e.componentCls}-variant-filled`]:Object.assign({boxShadow:"none",background:t},eg(e,n,r))}),uo=(e,t,n,r,a)=>({[`&${e.componentCls}-variant-${n}`]:Object.assign({color:t,boxShadow:"none"},eg(e,r,a,n))}),HL=e=>{const{componentCls:t}=e;return Rs.reduce((n,r)=>{const a=e[`${r}6`],o=e[`${r}1`],c=e[`${r}5`],u=e[`${r}2`],f=e[`${r}3`],d=e[`${r}7`];return Object.assign(Object.assign({},n),{[`&${t}-color-${r}`]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({color:a,boxShadow:e[`${r}ShadowColor`]},tg(e,e.colorTextLightSolid,a,{background:c},{background:d})),ng(e,a,e.colorBgContainer,{color:c,borderColor:c,background:e.colorBgContainer},{color:d,borderColor:d,background:e.colorBgContainer})),rg(e)),ag(e,o,{color:a,background:u},{color:a,background:f})),uo(e,a,"link",{color:c},{color:d})),uo(e,a,"text",{color:c,background:o},{color:d,background:f}))})},{})},BL=e=>Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({color:e.defaultColor,boxShadow:e.defaultShadow},tg(e,e.solidTextColor,e.colorBgSolid,{color:e.solidTextColor,background:e.colorBgSolidHover},{color:e.solidTextColor,background:e.colorBgSolidActive})),rg(e)),ag(e,e.colorFillTertiary,{color:e.defaultColor,background:e.colorFillSecondary},{color:e.defaultColor,background:e.colorFill})),Jv(e.componentCls,e.ghostBg,e.defaultGhostColor,e.defaultGhostBorderColor,e.colorTextDisabled,e.colorBorder)),uo(e,e.textTextColor,"link",{color:e.colorLinkHover,background:e.linkHoverBg},{color:e.colorLinkActive})),FL=e=>Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({color:e.colorPrimary,boxShadow:e.primaryShadow},ng(e,e.colorPrimary,e.colorBgContainer,{color:e.colorPrimaryTextHover,borderColor:e.colorPrimaryHover,background:e.colorBgContainer},{color:e.colorPrimaryTextActive,borderColor:e.colorPrimaryActive,background:e.colorBgContainer})),rg(e)),ag(e,e.colorPrimaryBg,{color:e.colorPrimary,background:e.colorPrimaryBgHover},{color:e.colorPrimary,background:e.colorPrimaryBorder})),uo(e,e.colorPrimaryText,"text",{color:e.colorPrimaryTextHover,background:e.colorPrimaryBg},{color:e.colorPrimaryTextActive,background:e.colorPrimaryBorder})),uo(e,e.colorPrimaryText,"link",{color:e.colorPrimaryTextHover,background:e.linkHoverBg},{color:e.colorPrimaryTextActive})),Jv(e.componentCls,e.ghostBg,e.colorPrimary,e.colorPrimary,e.colorTextDisabled,e.colorBorder,{color:e.colorPrimaryHover,borderColor:e.colorPrimaryHover},{color:e.colorPrimaryActive,borderColor:e.colorPrimaryActive})),VL=e=>Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({color:e.colorError,boxShadow:e.dangerShadow},tg(e,e.dangerColor,e.colorError,{background:e.colorErrorHover},{background:e.colorErrorActive})),ng(e,e.colorError,e.colorBgContainer,{color:e.colorErrorHover,borderColor:e.colorErrorBorderHover},{color:e.colorErrorActive,borderColor:e.colorErrorActive})),rg(e)),ag(e,e.colorErrorBg,{color:e.colorError,background:e.colorErrorBgFilledHover},{color:e.colorError,background:e.colorErrorBgActive})),uo(e,e.colorError,"text",{color:e.colorErrorHover,background:e.colorErrorBg},{color:e.colorErrorHover,background:e.colorErrorBgActive})),uo(e,e.colorError,"link",{color:e.colorErrorHover},{color:e.colorErrorActive})),Jv(e.componentCls,e.ghostBg,e.colorError,e.colorError,e.colorTextDisabled,e.colorBorder,{color:e.colorErrorHover,borderColor:e.colorErrorHover},{color:e.colorErrorActive,borderColor:e.colorErrorActive})),KL=e=>Object.assign(Object.assign({},uo(e,e.colorLink,"link",{color:e.colorLinkHover},{color:e.colorLinkActive})),Jv(e.componentCls,e.ghostBg,e.colorInfo,e.colorInfo,e.colorTextDisabled,e.colorBorder,{color:e.colorInfoHover,borderColor:e.colorInfoHover},{color:e.colorInfoActive,borderColor:e.colorInfoActive})),UL=e=>{const{componentCls:t}=e;return Object.assign({[`${t}-color-default`]:BL(e),[`${t}-color-primary`]:FL(e),[`${t}-color-dangerous`]:VL(e),[`${t}-color-link`]:KL(e)},HL(e))},WL=e=>Object.assign(Object.assign(Object.assign(Object.assign({},ng(e,e.defaultBorderColor,e.defaultBg,{color:e.defaultHoverColor,borderColor:e.defaultHoverBorderColor,background:e.defaultHoverBg},{color:e.defaultActiveColor,borderColor:e.defaultActiveBorderColor,background:e.defaultActiveBg})),uo(e,e.textTextColor,"text",{color:e.textTextHoverColor,background:e.textHoverBg},{color:e.textTextActiveColor,background:e.colorBgTextActive})),tg(e,e.primaryColor,e.colorPrimary,{background:e.colorPrimaryHover,color:e.primaryColor},{background:e.colorPrimaryActive,color:e.primaryColor})),uo(e,e.colorLink,"link",{color:e.colorLinkHover,background:e.linkHoverBg},{color:e.colorLinkActive})),DS=(e,t="")=>{const{componentCls:n,controlHeight:r,fontSize:a,borderRadius:o,buttonPaddingHorizontal:c,iconCls:u,buttonPaddingVertical:f,buttonIconOnlyFontSize:d}=e;return[{[t]:{fontSize:a,height:r,padding:`${te(f)} ${te(c)}`,borderRadius:o,[`&${n}-icon-only`]:{width:r,[u]:{fontSize:d}}}},{[`${n}${n}-circle${t}`]:kL(e)},{[`${n}${n}-round${t}`]:{borderRadius:e.controlHeight,[`&:not(${n}-icon-only)`]:{paddingInline:e.buttonPaddingHorizontal}}}]},qL=e=>{const t=xn(e,{fontSize:e.contentFontSize});return DS(t,e.componentCls)},YL=e=>{const t=xn(e,{controlHeight:e.controlHeightSM,fontSize:e.contentFontSizeSM,padding:e.paddingXS,buttonPaddingHorizontal:e.paddingInlineSM,buttonPaddingVertical:0,borderRadius:e.borderRadiusSM,buttonIconOnlyFontSize:e.onlyIconSizeSM});return DS(t,`${e.componentCls}-sm`)},GL=e=>{const t=xn(e,{controlHeight:e.controlHeightLG,fontSize:e.contentFontSizeLG,buttonPaddingHorizontal:e.paddingInlineLG,buttonPaddingVertical:0,borderRadius:e.borderRadiusLG,buttonIconOnlyFontSize:e.onlyIconSizeLG});return DS(t,`${e.componentCls}-lg`)},XL=e=>{const{componentCls:t}=e;return{[t]:{[`&${t}-block`]:{width:"100%"}}}},QL=Kn("Button",e=>{const t=uM(e);return[PL(t),qL(t),YL(t),GL(t),XL(t),UL(t),WL(t),G8(t)]},dM,{unitless:{fontWeight:!0,contentLineHeight:!0,contentLineHeightSM:!0,contentLineHeightLG:!0}});function ZL(e,t,n,r){const{focusElCls:a,focus:o,borderElCls:c}=n,u=c?"> *":"",f=["hover",o?"focus":null,"active"].filter(Boolean).map(d=>`&:${d} ${u}`).join(",");return{[`&-item:not(${t}-last-item)`]:{marginInlineEnd:e.calc(e.lineWidth).mul(-1).equal()},[`&-item:not(${r}-status-success)`]:{zIndex:2},"&-item":Object.assign(Object.assign({[f]:{zIndex:3}},a?{[`&${a}`]:{zIndex:3}}:{}),{[`&[disabled] ${u}`]:{zIndex:0}})}}function JL(e,t,n){const{borderElCls:r}=n,a=r?`> ${r}`:"";return{[`&-item:not(${t}-first-item):not(${t}-last-item) ${a}`]:{borderRadius:0},[`&-item:not(${t}-last-item)${t}-first-item`]:{[`& ${a}, &${e}-sm ${a}, &${e}-lg ${a}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&-item:not(${t}-first-item)${t}-last-item`]:{[`& ${a}, &${e}-sm ${a}, &${e}-lg ${a}`]:{borderStartStartRadius:0,borderEndStartRadius:0}}}}function Tf(e,t={focus:!0}){const{componentCls:n}=e,r=`${n}-compact`;return{[r]:Object.assign(Object.assign({},ZL(e,r,t,n)),JL(n,r,t))}}function eH(e,t,n){return{[`&-item:not(${t}-last-item)`]:{marginBottom:e.calc(e.lineWidth).mul(-1).equal()},[`&-item:not(${n}-status-success)`]:{zIndex:2},"&-item":{"&:hover,&:focus,&:active":{zIndex:3},"&[disabled]":{zIndex:0}}}}function tH(e,t){return{[`&-item:not(${t}-first-item):not(${t}-last-item)`]:{borderRadius:0},[`&-item${t}-first-item:not(${t}-last-item)`]:{[`&, &${e}-sm, &${e}-lg`]:{borderEndEndRadius:0,borderEndStartRadius:0}},[`&-item${t}-last-item:not(${t}-first-item)`]:{[`&, &${e}-sm, &${e}-lg`]:{borderStartStartRadius:0,borderStartEndRadius:0}}}}function nH(e){const t=`${e.componentCls}-compact-vertical`;return{[t]:Object.assign(Object.assign({},eH(e,t,e.componentCls)),tH(e.componentCls,t))}}const rH=e=>{const{componentCls:t,colorPrimaryHover:n,lineWidth:r,calc:a}=e,o=a(r).mul(-1).equal(),c=u=>{const f=`${t}-compact${u?"-vertical":""}-item${t}-primary:not([disabled])`;return{[`${f} + ${f}::before`]:{position:"absolute",top:u?o:0,insetInlineStart:u?0:o,backgroundColor:n,content:'""',width:u?"100%":r,height:u?r:"100%"}}};return Object.assign(Object.assign({},c()),c(!0))},aH=Nf(["Button","compact"],e=>{const t=uM(e);return[Tf(t),nH(t),rH(t)]},dM);var iH=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,r=Object.getOwnPropertySymbols(e);a{var n,r;const{loading:a=!1,prefixCls:o,color:c,variant:u,type:f,danger:d=!1,shape:h,size:v,styles:g,disabled:b,className:x,rootClassName:C,children:y,icon:w,iconPosition:$="start",ghost:E=!1,block:O=!1,htmlType:I="button",classNames:j,style:M={},autoInsertSpace:D,autoFocus:N}=e,P=iH(e,["loading","prefixCls","color","variant","type","danger","shape","size","styles","disabled","className","rootClassName","children","icon","iconPosition","ghost","block","htmlType","classNames","style","autoInsertSpace","autoFocus"]),A=f||"default",{button:F}=Se.useContext(Wt),H=h||F?.shape||"default",[k,L]=s.useMemo(()=>{if(c&&u)return[c,u];if(f||d){const ye=lH[A]||[];return d?["danger",ye[1]]:ye}return F?.color&&F?.variant?[F.color,F.variant]:["default","outlined"]},[f,c,u,d,F?.variant,F?.color]),z=k==="danger"?"dangerous":k,{getPrefixCls:V,direction:q,autoInsertSpace:G,className:B,style:U,classNames:K,styles:Y}=ga("button"),Q=(n=D??G)!==null&&n!==void 0?n:!0,Z=V("btn",o),[ae,re,ie]=QL(Z),ve=s.useContext(ja),ue=b??ve,oe=s.useContext(lM),he=s.useMemo(()=>oH(a),[a]),[fe,me]=s.useState(he.loading),[le,pe]=s.useState(!1),Ce=s.useRef(null),De=Fl(t,Ce),je=s.Children.count(y)===1&&!w&&!my(L),ge=s.useRef(!0);Se.useEffect(()=>(ge.current=!1,()=>{ge.current=!0}),[]),fn(()=>{let ye=null;he.delay>0?ye=setTimeout(()=>{ye=null,me(!0)},he.delay):me(he.loading);function Re(){ye&&(clearTimeout(ye),ye=null)}return Re},[he.delay,he.loading]),s.useEffect(()=>{if(!Ce.current||!Q)return;const ye=Ce.current.textContent||"";je&&G0(ye)?le||pe(!0):le&&pe(!1)}),s.useEffect(()=>{N&&Ce.current&&Ce.current.focus()},[]);const Ie=Se.useCallback(ye=>{var Re;if(fe||ue){ye.preventDefault();return}(Re=e.onClick)===null||Re===void 0||Re.call(e,("href"in e,ye))},[e.onClick,fe,ue]),{compactSize:Ee,compactItemClassnames:we}=Zo(Z,q),Fe={large:"lg",small:"sm",middle:void 0},He=la(ye=>{var Re,Ge;return(Ge=(Re=v??Ee)!==null&&Re!==void 0?Re:oe)!==null&&Ge!==void 0?Ge:ye}),it=He&&(r=Fe[He])!==null&&r!==void 0?r:"",Ze=fe?"loading":w,Ye=lr(P,["navigate"]),et=se(Z,re,ie,{[`${Z}-${H}`]:H!=="default"&&H,[`${Z}-${A}`]:A,[`${Z}-dangerous`]:d,[`${Z}-color-${z}`]:z,[`${Z}-variant-${L}`]:L,[`${Z}-${it}`]:it,[`${Z}-icon-only`]:!y&&y!==0&&!!Ze,[`${Z}-background-ghost`]:E&&!my(L),[`${Z}-loading`]:fe,[`${Z}-two-chinese-chars`]:le&&Q&&!fe,[`${Z}-block`]:O,[`${Z}-rtl`]:q==="rtl",[`${Z}-icon-end`]:$==="end"},we,x,C,B),Pe=Object.assign(Object.assign({},U),M),Oe=se(j?.icon,K.icon),Be=Object.assign(Object.assign({},g?.icon||{}),Y.icon||{}),$e=w&&!fe?Se.createElement(X0,{prefixCls:Z,className:Oe,style:Be},w):a&&typeof a=="object"&&a.icon?Se.createElement(X0,{prefixCls:Z,className:Oe,style:Be},a.icon):Se.createElement(Y8,{existIcon:!!w,prefixCls:Z,loading:fe,mount:ge.current}),Te=y||y===0?q8(y,je&&Q):null;if(Ye.href!==void 0)return ae(Se.createElement("a",Object.assign({},Ye,{className:se(et,{[`${Z}-disabled`]:ue}),href:ue?void 0:Ye.href,style:Pe,onClick:Ie,ref:De,tabIndex:ue?-1:0,"aria-disabled":ue}),$e,Te));let be=Se.createElement("button",Object.assign({},P,{type:I,className:et,style:Pe,onClick:Ie,disabled:ue,ref:De}),$e,Te,we&&Se.createElement(aH,{prefixCls:Z}));return my(L)||(be=Se.createElement(jf,{component:"Button",disabled:fe},be)),ae(be)}),dn=sH;dn.Group=U8;dn.__ANT_BUTTON=!0;var mM=s.createContext(null),y2=[];function cH(e,t){var n=s.useState(function(){if(!wa())return null;var x=document.createElement("div");return x}),r=ce(n,1),a=r[0],o=s.useRef(!1),c=s.useContext(mM),u=s.useState(y2),f=ce(u,2),d=f[0],h=f[1],v=c||(o.current?void 0:function(x){h(function(C){var y=[x].concat(ke(C));return y})});function g(){a.parentElement||document.body.appendChild(a),o.current=!0}function b(){var x;(x=a.parentElement)===null||x===void 0||x.removeChild(a),o.current=!1}return fn(function(){return e?c?c(g):g():b(),b},[e]),fn(function(){d.length&&(d.forEach(function(x){return x()}),h(y2))},[d]),[a,v]}var by;function hM(e){var t="rc-scrollbar-measure-".concat(Math.random().toString(36).substring(7)),n=document.createElement("div");n.id=t;var r=n.style;r.position="absolute",r.left="0",r.top="0",r.width="100px",r.height="100px",r.overflow="scroll";var a,o;if(e){var c=getComputedStyle(e);r.scrollbarColor=c.scrollbarColor,r.scrollbarWidth=c.scrollbarWidth;var u=getComputedStyle(e,"::-webkit-scrollbar"),f=parseInt(u.width,10),d=parseInt(u.height,10);try{var h=f?"width: ".concat(u.width,";"):"",v=d?"height: ".concat(u.height,";"):"";Bo(` +#`.concat(t,`::-webkit-scrollbar { +`).concat(h,` +`).concat(v,` +}`),t)}catch(x){console.error(x),a=f,o=d}}document.body.appendChild(n);var g=e&&a&&!isNaN(a)?a:n.offsetWidth-n.clientWidth,b=e&&o&&!isNaN(o)?o:n.offsetHeight-n.clientHeight;return document.body.removeChild(n),of(t),{width:g,height:b}}function x2(e){return typeof document>"u"?0:(by===void 0&&(by=hM()),by.width)}function Z0(e){return typeof document>"u"||!e||!(e instanceof Element)?{width:0,height:0}:hM(e)}function uH(){return document.body.scrollHeight>(window.innerHeight||document.documentElement.clientHeight)&&window.innerWidth>document.body.offsetWidth}var dH="rc-util-locker-".concat(Date.now()),S2=0;function fH(e){var t=!!e,n=s.useState(function(){return S2+=1,"".concat(dH,"_").concat(S2)}),r=ce(n,1),a=r[0];fn(function(){if(t){var o=Z0(document.body).width,c=uH();Bo(` +html body { + overflow-y: hidden; + `.concat(c?"width: calc(100% - ".concat(o,"px);"):"",` +}`),a)}else of(a);return function(){of(a)}},[t,a])}var mH=!1;function hH(e){return mH}var C2=function(t){return t===!1?!1:!wa()||!t?null:typeof t=="string"?document.querySelector(t):typeof t=="function"?t():t},vM=s.forwardRef(function(e,t){var n=e.open,r=e.autoLock,a=e.getContainer;e.debug;var o=e.autoDestroy,c=o===void 0?!0:o,u=e.children,f=s.useState(n),d=ce(f,2),h=d[0],v=d[1],g=h||n;s.useEffect(function(){(c||n)&&v(n)},[n,c]);var b=s.useState(function(){return C2(a)}),x=ce(b,2),C=x[0],y=x[1];s.useEffect(function(){var A=C2(a);y(A??null)});var w=cH(g&&!C),$=ce(w,2),E=$[0],O=$[1],I=C??E;fH(r&&n&&wa()&&(I===E||I===document.body));var j=null;if(u&&Hi(u)&&t){var M=u;j=M.ref}var D=Fl(j,t);if(!g||!wa()||C===void 0)return null;var N=I===!1||hH(),P=u;return t&&(P=s.cloneElement(u,{ref:D})),s.createElement(mM.Provider,{value:O},N?P:Li.createPortal(P,I))});function vH(){var e=ee({},kv);return e.useId}var w2=0,$2=vH();const PS=$2?(function(t){var n=$2();return t||n}):(function(t){var n=s.useState("ssr-id"),r=ce(n,2),a=r[0],o=r[1];return s.useEffect(function(){var c=w2;w2+=1,o("rc_unique_".concat(c))},[]),t||a});var ys="RC_FORM_INTERNAL_HOOKS",gr=function(){xr(!1,"Can not find FormContext. Please make sure you wrap Field under Form.")},Ns=s.createContext({getFieldValue:gr,getFieldsValue:gr,getFieldError:gr,getFieldWarning:gr,getFieldsError:gr,isFieldsTouched:gr,isFieldTouched:gr,isFieldValidating:gr,isFieldsValidating:gr,resetFields:gr,setFields:gr,setFieldValue:gr,setFieldsValue:gr,validateFields:gr,submit:gr,getInternalHooks:function(){return gr(),{dispatch:gr,initEntityValue:gr,registerField:gr,useSubscribe:gr,setInitialValues:gr,destroyForm:gr,setCallbacks:gr,registerWatch:gr,getFields:gr,setValidateMessages:gr,setPreserve:gr,getInitialValue:gr}}}),vf=s.createContext(null);function J0(e){return e==null?[]:Array.isArray(e)?e:[e]}function gH(e){return e&&!!e._init}function ex(){return{default:"Validation error on field %s",required:"%s is required",enum:"%s must be one of %s",whitespace:"%s cannot be empty",date:{format:"%s date %s is invalid for format %s",parse:"%s date could not be parsed, %s is invalid ",invalid:"%s date %s is invalid"},types:{string:"%s is not a %s",method:"%s is not a %s (function)",array:"%s is not an %s",object:"%s is not an %s",number:"%s is not a %s",date:"%s is not a %s",boolean:"%s is not a %s",integer:"%s is not an %s",float:"%s is not a %s",regexp:"%s is not a valid %s",email:"%s is not a valid %s",url:"%s is not a valid %s",hex:"%s is not a valid %s"},string:{len:"%s must be exactly %s characters",min:"%s must be at least %s characters",max:"%s cannot be longer than %s characters",range:"%s must be between %s and %s characters"},number:{len:"%s must equal %s",min:"%s cannot be less than %s",max:"%s cannot be greater than %s",range:"%s must be between %s and %s"},array:{len:"%s must be exactly %s in length",min:"%s cannot be less than %s in length",max:"%s cannot be greater than %s in length",range:"%s must be between %s and %s in length"},pattern:{mismatch:"%s value %s does not match pattern %s"},clone:function(){var t=JSON.parse(JSON.stringify(this));return t.clone=this.clone,t}}}var tx=ex();function pH(e){try{return Function.toString.call(e).indexOf("[native code]")!==-1}catch{return typeof e=="function"}}function bH(e,t,n){if(zv())return Reflect.construct.apply(null,arguments);var r=[null];r.push.apply(r,t);var a=new(e.bind.apply(e,r));return n&&rf(a,n.prototype),a}function nx(e){var t=typeof Map=="function"?new Map:void 0;return nx=function(r){if(r===null||!pH(r))return r;if(typeof r!="function")throw new TypeError("Super expression must either be null or a function");if(t!==void 0){if(t.has(r))return t.get(r);t.set(r,a)}function a(){return bH(r,arguments,Os(this).constructor)}return a.prototype=Object.create(r.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),rf(a,r)},nx(e)}var yH=/%[sdj%]/g,xH=function(){};function rx(e){if(!e||!e.length)return null;var t={};return e.forEach(function(n){var r=n.field;t[r]=t[r]||[],t[r].push(n)}),t}function ai(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r=o)return u;switch(u){case"%s":return String(n[a++]);case"%d":return Number(n[a++]);case"%j":try{return JSON.stringify(n[a++])}catch{return"[Circular]"}break;default:return u}});return c}return e}function SH(e){return e==="string"||e==="url"||e==="hex"||e==="email"||e==="date"||e==="pattern"}function aa(e,t){return!!(e==null||t==="array"&&Array.isArray(e)&&!e.length||SH(t)&&typeof e=="string"&&!e)}function CH(e,t,n){var r=[],a=0,o=e.length;function c(u){r.push.apply(r,ke(u||[])),a++,a===o&&n(r)}e.forEach(function(u){t(u,c)})}function E2(e,t,n){var r=0,a=e.length;function o(c){if(c&&c.length){n(c);return}var u=r;r=r+1,ut.max?a.push(ai(o.messages[v].max,t.fullField,t.max)):u&&f&&(ht.max)&&a.push(ai(o.messages[v].range,t.fullField,t.min,t.max))},gM=function(t,n,r,a,o,c){t.required&&(!r.hasOwnProperty(t.field)||aa(n,c||t.type))&&a.push(ai(o.messages.required,t.fullField))},vh;const NH=(function(){if(vh)return vh;var e="[a-fA-F\\d:]",t=function(j){return j&&j.includeBoundaries?"(?:(?<=\\s|^)(?=".concat(e,")|(?<=").concat(e,")(?=\\s|$))"):""},n="(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}",r="[a-fA-F\\d]{1,4}",a=["(?:".concat(r,":){7}(?:").concat(r,"|:)"),"(?:".concat(r,":){6}(?:").concat(n,"|:").concat(r,"|:)"),"(?:".concat(r,":){5}(?::").concat(n,"|(?::").concat(r,"){1,2}|:)"),"(?:".concat(r,":){4}(?:(?::").concat(r,"){0,1}:").concat(n,"|(?::").concat(r,"){1,3}|:)"),"(?:".concat(r,":){3}(?:(?::").concat(r,"){0,2}:").concat(n,"|(?::").concat(r,"){1,4}|:)"),"(?:".concat(r,":){2}(?:(?::").concat(r,"){0,3}:").concat(n,"|(?::").concat(r,"){1,5}|:)"),"(?:".concat(r,":){1}(?:(?::").concat(r,"){0,4}:").concat(n,"|(?::").concat(r,"){1,6}|:)"),"(?::(?:(?::".concat(r,"){0,5}:").concat(n,"|(?::").concat(r,"){1,7}|:))")],o="(?:%[0-9a-zA-Z]{1,})?",c="(?:".concat(a.join("|"),")").concat(o),u=new RegExp("(?:^".concat(n,"$)|(?:^").concat(c,"$)")),f=new RegExp("^".concat(n,"$")),d=new RegExp("^".concat(c,"$")),h=function(j){return j&&j.exact?u:new RegExp("(?:".concat(t(j)).concat(n).concat(t(j),")|(?:").concat(t(j)).concat(c).concat(t(j),")"),"g")};h.v4=function(I){return I&&I.exact?f:new RegExp("".concat(t(I)).concat(n).concat(t(I)),"g")},h.v6=function(I){return I&&I.exact?d:new RegExp("".concat(t(I)).concat(c).concat(t(I)),"g")};var v="(?:(?:[a-z]+:)?//)",g="(?:\\S+(?::\\S*)?@)?",b=h.v4().source,x=h.v6().source,C="(?:(?:[a-z\\u00a1-\\uffff0-9][-_]*)*[a-z\\u00a1-\\uffff0-9]+)",y="(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*",w="(?:\\.(?:[a-z\\u00a1-\\uffff]{2,}))",$="(?::\\d{2,5})?",E='(?:[/?#][^\\s"]*)?',O="(?:".concat(v,"|www\\.)").concat(g,"(?:localhost|").concat(b,"|").concat(x,"|").concat(C).concat(y).concat(w,")").concat($).concat(E);return vh=new RegExp("(?:^".concat(O,"$)"),"i"),vh});var R2={email:/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+\.)+[a-zA-Z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}))$/,hex:/^#?([a-f0-9]{6}|[a-f0-9]{3})$/i},kd={integer:function(t){return kd.number(t)&&parseInt(t,10)===t},float:function(t){return kd.number(t)&&!kd.integer(t)},array:function(t){return Array.isArray(t)},regexp:function(t){if(t instanceof RegExp)return!0;try{return!!new RegExp(t)}catch{return!1}},date:function(t){return typeof t.getTime=="function"&&typeof t.getMonth=="function"&&typeof t.getYear=="function"&&!isNaN(t.getTime())},number:function(t){return isNaN(t)?!1:typeof t=="number"},object:function(t){return jt(t)==="object"&&!kd.array(t)},method:function(t){return typeof t=="function"},email:function(t){return typeof t=="string"&&t.length<=320&&!!t.match(R2.email)},url:function(t){return typeof t=="string"&&t.length<=2048&&!!t.match(NH())},hex:function(t){return typeof t=="string"&&!!t.match(R2.hex)}},MH=function(t,n,r,a,o){if(t.required&&n===void 0){gM(t,n,r,a,o);return}var c=["integer","float","array","regexp","object","method","email","number","date","url","hex"],u=t.type;c.indexOf(u)>-1?kd[u](n)||a.push(ai(o.messages.types[u],t.fullField,t.type)):u&&jt(n)!==t.type&&a.push(ai(o.messages.types[u],t.fullField,t.type))},jH=function(t,n,r,a,o){(/^\s+$/.test(n)||n==="")&&a.push(ai(o.messages.whitespace,t.fullField))};const Fn={required:gM,whitespace:jH,type:MH,range:RH,enum:OH,pattern:IH};var TH=function(t,n,r,a,o){var c=[],u=t.required||!t.required&&a.hasOwnProperty(t.field);if(u){if(aa(n)&&!t.required)return r();Fn.required(t,n,a,c,o)}r(c)},DH=function(t,n,r,a,o){var c=[],u=t.required||!t.required&&a.hasOwnProperty(t.field);if(u){if(n==null&&!t.required)return r();Fn.required(t,n,a,c,o,"array"),n!=null&&(Fn.type(t,n,a,c,o),Fn.range(t,n,a,c,o))}r(c)},PH=function(t,n,r,a,o){var c=[],u=t.required||!t.required&&a.hasOwnProperty(t.field);if(u){if(aa(n)&&!t.required)return r();Fn.required(t,n,a,c,o),n!==void 0&&Fn.type(t,n,a,c,o)}r(c)},kH=function(t,n,r,a,o){var c=[],u=t.required||!t.required&&a.hasOwnProperty(t.field);if(u){if(aa(n,"date")&&!t.required)return r();if(Fn.required(t,n,a,c,o),!aa(n,"date")){var f;n instanceof Date?f=n:f=new Date(n),Fn.type(t,f,a,c,o),f&&Fn.range(t,f.getTime(),a,c,o)}}r(c)},AH="enum",zH=function(t,n,r,a,o){var c=[],u=t.required||!t.required&&a.hasOwnProperty(t.field);if(u){if(aa(n)&&!t.required)return r();Fn.required(t,n,a,c,o),n!==void 0&&Fn[AH](t,n,a,c,o)}r(c)},LH=function(t,n,r,a,o){var c=[],u=t.required||!t.required&&a.hasOwnProperty(t.field);if(u){if(aa(n)&&!t.required)return r();Fn.required(t,n,a,c,o),n!==void 0&&(Fn.type(t,n,a,c,o),Fn.range(t,n,a,c,o))}r(c)},HH=function(t,n,r,a,o){var c=[],u=t.required||!t.required&&a.hasOwnProperty(t.field);if(u){if(aa(n)&&!t.required)return r();Fn.required(t,n,a,c,o),n!==void 0&&(Fn.type(t,n,a,c,o),Fn.range(t,n,a,c,o))}r(c)},BH=function(t,n,r,a,o){var c=[],u=t.required||!t.required&&a.hasOwnProperty(t.field);if(u){if(aa(n)&&!t.required)return r();Fn.required(t,n,a,c,o),n!==void 0&&Fn.type(t,n,a,c,o)}r(c)},FH=function(t,n,r,a,o){var c=[],u=t.required||!t.required&&a.hasOwnProperty(t.field);if(u){if(n===""&&(n=void 0),aa(n)&&!t.required)return r();Fn.required(t,n,a,c,o),n!==void 0&&(Fn.type(t,n,a,c,o),Fn.range(t,n,a,c,o))}r(c)},VH=function(t,n,r,a,o){var c=[],u=t.required||!t.required&&a.hasOwnProperty(t.field);if(u){if(aa(n)&&!t.required)return r();Fn.required(t,n,a,c,o),n!==void 0&&Fn.type(t,n,a,c,o)}r(c)},KH=function(t,n,r,a,o){var c=[],u=t.required||!t.required&&a.hasOwnProperty(t.field);if(u){if(aa(n,"string")&&!t.required)return r();Fn.required(t,n,a,c,o),aa(n,"string")||Fn.pattern(t,n,a,c,o)}r(c)},UH=function(t,n,r,a,o){var c=[],u=t.required||!t.required&&a.hasOwnProperty(t.field);if(u){if(aa(n)&&!t.required)return r();Fn.required(t,n,a,c,o),aa(n)||Fn.type(t,n,a,c,o)}r(c)},WH=function(t,n,r,a,o){var c=[],u=Array.isArray(n)?"array":jt(n);Fn.required(t,n,a,c,o,u),r(c)},qH=function(t,n,r,a,o){var c=[],u=t.required||!t.required&&a.hasOwnProperty(t.field);if(u){if(aa(n,"string")&&!t.required)return r();Fn.required(t,n,a,c,o,"string"),aa(n,"string")||(Fn.type(t,n,a,c,o),Fn.range(t,n,a,c,o),Fn.pattern(t,n,a,c,o),t.whitespace===!0&&Fn.whitespace(t,n,a,c,o))}r(c)},yy=function(t,n,r,a,o){var c=t.type,u=[],f=t.required||!t.required&&a.hasOwnProperty(t.field);if(f){if(aa(n,c)&&!t.required)return r();Fn.required(t,n,a,u,o,c),aa(n,c)||Fn.type(t,n,a,u,o)}r(u)};const Ud={string:qH,method:BH,number:FH,boolean:PH,regexp:UH,integer:HH,float:LH,array:DH,object:VH,enum:zH,pattern:KH,date:kH,url:yy,hex:yy,email:yy,required:WH,any:TH};var Df=(function(){function e(t){Sr(this,e),X(this,"rules",null),X(this,"_messages",tx),this.define(t)}return Cr(e,[{key:"define",value:function(n){var r=this;if(!n)throw new Error("Cannot configure a schema with no rules");if(jt(n)!=="object"||Array.isArray(n))throw new Error("Rules must be an object");this.rules={},Object.keys(n).forEach(function(a){var o=n[a];r.rules[a]=Array.isArray(o)?o:[o]})}},{key:"messages",value:function(n){return n&&(this._messages=I2(ex(),n)),this._messages}},{key:"validate",value:function(n){var r=this,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:function(){},c=n,u=a,f=o;if(typeof u=="function"&&(f=u,u={}),!this.rules||Object.keys(this.rules).length===0)return f&&f(null,c),Promise.resolve(c);function d(x){var C=[],y={};function w(E){if(Array.isArray(E)){var O;C=(O=C).concat.apply(O,ke(E))}else C.push(E)}for(var $=0;$0&&arguments[0]!==void 0?arguments[0]:[],D=Array.isArray(M)?M:[M];!u.suppressWarning&&D.length&&e.warning("async-validator:",D),D.length&&y.message!==void 0&&(D=[].concat(y.message));var N=D.map(O2(y,c));if(u.first&&N.length)return b[y.field]=1,C(N);if(!w)C(N);else{if(y.required&&!x.value)return y.message!==void 0?N=[].concat(y.message).map(O2(y,c)):u.error&&(N=[u.error(y,ai(u.messages.required,y.field))]),C(N);var P={};y.defaultField&&Object.keys(x.value).map(function(H){P[H]=y.defaultField}),P=ee(ee({},P),x.rule.fields);var A={};Object.keys(P).forEach(function(H){var k=P[H],L=Array.isArray(k)?k:[k];A[H]=L.map($.bind(null,H))});var F=new e(A);F.messages(u.messages),x.rule.options&&(x.rule.options.messages=u.messages,x.rule.options.error=u.error),F.validate(x.value,x.rule.options||u,function(H){var k=[];N&&N.length&&k.push.apply(k,ke(N)),H&&H.length&&k.push.apply(k,ke(H)),C(k.length?k:null)})}}var O;if(y.asyncValidator)O=y.asyncValidator(y,x.value,E,x.source,u);else if(y.validator){try{O=y.validator(y,x.value,E,x.source,u)}catch(M){var I,j;(I=(j=console).error)===null||I===void 0||I.call(j,M),u.suppressValidatorError||setTimeout(function(){throw M},0),E(M.message)}O===!0?E():O===!1?E(typeof y.message=="function"?y.message(y.fullField||y.field):y.message||"".concat(y.fullField||y.field," fails")):O instanceof Array?E(O):O instanceof Error&&E(O.message)}O&&O.then&&O.then(function(){return E()},function(M){return E(M)})},function(x){d(x)},c)}},{key:"getType",value:function(n){if(n.type===void 0&&n.pattern instanceof RegExp&&(n.type="pattern"),typeof n.validator!="function"&&n.type&&!Ud.hasOwnProperty(n.type))throw new Error(ai("Unknown rule type %s",n.type));return n.type||"string"}},{key:"getValidationMethod",value:function(n){if(typeof n.validator=="function")return n.validator;var r=Object.keys(n),a=r.indexOf("message");return a!==-1&&r.splice(a,1),r.length===1&&r[0]==="required"?Ud.required:Ud[this.getType(n)]||void 0}}]),e})();X(Df,"register",function(t,n){if(typeof n!="function")throw new Error("Cannot register a validator by type, validator is not a function");Ud[t]=n});X(Df,"warning",xH);X(Df,"messages",tx);X(Df,"validators",Ud);var ni="'${name}' is not a valid ${type}",pM={default:"Validation error on field '${name}'",required:"'${name}' is required",enum:"'${name}' must be one of [${enum}]",whitespace:"'${name}' cannot be empty",date:{format:"'${name}' is invalid for format date",parse:"'${name}' could not be parsed as date",invalid:"'${name}' is invalid date"},types:{string:ni,method:ni,array:ni,object:ni,number:ni,date:ni,boolean:ni,integer:ni,float:ni,regexp:ni,email:ni,url:ni,hex:ni},string:{len:"'${name}' must be exactly ${len} characters",min:"'${name}' must be at least ${min} characters",max:"'${name}' cannot be longer than ${max} characters",range:"'${name}' must be between ${min} and ${max} characters"},number:{len:"'${name}' must equal ${len}",min:"'${name}' cannot be less than ${min}",max:"'${name}' cannot be greater than ${max}",range:"'${name}' must be between ${min} and ${max}"},array:{len:"'${name}' must be exactly ${len} in length",min:"'${name}' cannot be less than ${min} in length",max:"'${name}' cannot be greater than ${max} in length",range:"'${name}' must be between ${min} and ${max} in length"},pattern:{mismatch:"'${name}' does not match pattern ${pattern}"}},N2=Df;function YH(e,t){return e.replace(/\\?\$\{\w+\}/g,function(n){if(n.startsWith("\\"))return n.slice(1);var r=n.slice(2,-1);return t[r]})}var M2="CODE_LOGIC_ERROR";function ax(e,t,n,r,a){return ix.apply(this,arguments)}function ix(){return ix=za(Jn().mark(function e(t,n,r,a,o){var c,u,f,d,h,v,g,b,x;return Jn().wrap(function(y){for(;;)switch(y.prev=y.next){case 0:return c=ee({},r),delete c.ruleIndex,N2.warning=function(){},c.validator&&(u=c.validator,c.validator=function(){try{return u.apply(void 0,arguments)}catch(w){return console.error(w),Promise.reject(M2)}}),f=null,c&&c.type==="array"&&c.defaultField&&(f=c.defaultField,delete c.defaultField),d=new N2(X({},t,[c])),h=kc(pM,a.validateMessages),d.messages(h),v=[],y.prev=10,y.next=13,Promise.resolve(d.validate(X({},t,n),ee({},a)));case 13:y.next=18;break;case 15:y.prev=15,y.t0=y.catch(10),y.t0.errors&&(v=y.t0.errors.map(function(w,$){var E=w.message,O=E===M2?h.default:E;return s.isValidElement(O)?s.cloneElement(O,{key:"error_".concat($)}):O}));case 18:if(!(!v.length&&f)){y.next=23;break}return y.next=21,Promise.all(n.map(function(w,$){return ax("".concat(t,".").concat($),w,f,a,o)}));case 21:return g=y.sent,y.abrupt("return",g.reduce(function(w,$){return[].concat(ke(w),ke($))},[]));case 23:return b=ee(ee({},r),{},{name:t,enum:(r.enum||[]).join(", ")},o),x=v.map(function(w){return typeof w=="string"?YH(w,b):w}),y.abrupt("return",x);case 26:case"end":return y.stop()}},e,null,[[10,15]])})),ix.apply(this,arguments)}function GH(e,t,n,r,a,o){var c=e.join("."),u=n.map(function(h,v){var g=h.validator,b=ee(ee({},h),{},{ruleIndex:v});return g&&(b.validator=function(x,C,y){var w=!1,$=function(){for(var I=arguments.length,j=new Array(I),M=0;M2&&arguments[2]!==void 0?arguments[2]:!1;return e&&e.some(function(r){return bM(t,r,n)})}function bM(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;return!e||!t||!n&&e.length!==t.length?!1:t.every(function(r,a){return e[a]===r})}function ZH(e,t){if(e===t)return!0;if(!e&&t||e&&!t||!e||!t||jt(e)!=="object"||jt(t)!=="object")return!1;var n=Object.keys(e),r=Object.keys(t),a=new Set([].concat(n,r));return ke(a).every(function(o){var c=e[o],u=t[o];return typeof c=="function"&&typeof u=="function"?!0:c===u})}function JH(e){var t=arguments.length<=1?void 0:arguments[1];return t&&t.target&&jt(t.target)==="object"&&e in t.target?t.target[e]:t}function T2(e,t,n){var r=e.length;if(t<0||t>=r||n<0||n>=r)return e;var a=e[t],o=t-n;return o>0?[].concat(ke(e.slice(0,n)),[a],ke(e.slice(n,t)),ke(e.slice(t+1,r))):o<0?[].concat(ke(e.slice(0,t)),ke(e.slice(t+1,n+1)),[a],ke(e.slice(n+1,r))):e}var eB=["name"],pi=[];function xy(e,t,n,r,a,o){return typeof e=="function"?e(t,n,"source"in o?{source:o.source}:{}):r!==a}var kS=(function(e){oi(n,e);var t=_i(n);function n(r){var a;if(Sr(this,n),a=t.call(this,r),X(St(a),"state",{resetCount:0}),X(St(a),"cancelRegisterFunc",null),X(St(a),"mounted",!1),X(St(a),"touched",!1),X(St(a),"dirty",!1),X(St(a),"validatePromise",void 0),X(St(a),"prevValidating",void 0),X(St(a),"errors",pi),X(St(a),"warnings",pi),X(St(a),"cancelRegister",function(){var f=a.props,d=f.preserve,h=f.isListField,v=f.name;a.cancelRegisterFunc&&a.cancelRegisterFunc(h,d,Kr(v)),a.cancelRegisterFunc=null}),X(St(a),"getNamePath",function(){var f=a.props,d=f.name,h=f.fieldContext,v=h.prefixName,g=v===void 0?[]:v;return d!==void 0?[].concat(ke(g),ke(d)):[]}),X(St(a),"getRules",function(){var f=a.props,d=f.rules,h=d===void 0?[]:d,v=f.fieldContext;return h.map(function(g){return typeof g=="function"?g(v):g})}),X(St(a),"refresh",function(){a.mounted&&a.setState(function(f){var d=f.resetCount;return{resetCount:d+1}})}),X(St(a),"metaCache",null),X(St(a),"triggerMetaEvent",function(f){var d=a.props.onMetaChange;if(d){var h=ee(ee({},a.getMeta()),{},{destroy:f});oo(a.metaCache,h)||d(h),a.metaCache=h}else a.metaCache=null}),X(St(a),"onStoreChange",function(f,d,h){var v=a.props,g=v.shouldUpdate,b=v.dependencies,x=b===void 0?[]:b,C=v.onReset,y=h.store,w=a.getNamePath(),$=a.getValue(f),E=a.getValue(y),O=d&&Kc(d,w);switch(h.type==="valueUpdate"&&h.source==="external"&&!oo($,E)&&(a.touched=!0,a.dirty=!0,a.validatePromise=null,a.errors=pi,a.warnings=pi,a.triggerMetaEvent()),h.type){case"reset":if(!d||O){a.touched=!1,a.dirty=!1,a.validatePromise=void 0,a.errors=pi,a.warnings=pi,a.triggerMetaEvent(),C?.(),a.refresh();return}break;case"remove":{if(g&&xy(g,f,y,$,E,h)){a.reRender();return}break}case"setField":{var I=h.data;if(O){"touched"in I&&(a.touched=I.touched),"validating"in I&&!("originRCField"in I)&&(a.validatePromise=I.validating?Promise.resolve([]):null),"errors"in I&&(a.errors=I.errors||pi),"warnings"in I&&(a.warnings=I.warnings||pi),a.dirty=!0,a.triggerMetaEvent(),a.reRender();return}else if("value"in I&&Kc(d,w,!0)){a.reRender();return}if(g&&!w.length&&xy(g,f,y,$,E,h)){a.reRender();return}break}case"dependenciesUpdate":{var j=x.map(Kr);if(j.some(function(M){return Kc(h.relatedFields,M)})){a.reRender();return}break}default:if(O||(!x.length||w.length||g)&&xy(g,f,y,$,E,h)){a.reRender();return}break}g===!0&&a.reRender()}),X(St(a),"validateRules",function(f){var d=a.getNamePath(),h=a.getValue(),v=f||{},g=v.triggerName,b=v.validateOnly,x=b===void 0?!1:b,C=Promise.resolve().then(za(Jn().mark(function y(){var w,$,E,O,I,j,M;return Jn().wrap(function(N){for(;;)switch(N.prev=N.next){case 0:if(a.mounted){N.next=2;break}return N.abrupt("return",[]);case 2:if(w=a.props,$=w.validateFirst,E=$===void 0?!1:$,O=w.messageVariables,I=w.validateDebounce,j=a.getRules(),g&&(j=j.filter(function(P){return P}).filter(function(P){var A=P.validateTrigger;if(!A)return!0;var F=J0(A);return F.includes(g)})),!(I&&g)){N.next=10;break}return N.next=8,new Promise(function(P){setTimeout(P,I)});case 8:if(a.validatePromise===C){N.next=10;break}return N.abrupt("return",[]);case 10:return M=GH(d,h,j,f,E,O),M.catch(function(P){return P}).then(function(){var P=arguments.length>0&&arguments[0]!==void 0?arguments[0]:pi;if(a.validatePromise===C){var A;a.validatePromise=null;var F=[],H=[];(A=P.forEach)===null||A===void 0||A.call(P,function(k){var L=k.rule.warningOnly,T=k.errors,z=T===void 0?pi:T;L?H.push.apply(H,ke(z)):F.push.apply(F,ke(z))}),a.errors=F,a.warnings=H,a.triggerMetaEvent(),a.reRender()}}),N.abrupt("return",M);case 13:case"end":return N.stop()}},y)})));return x||(a.validatePromise=C,a.dirty=!0,a.errors=pi,a.warnings=pi,a.triggerMetaEvent(),a.reRender()),C}),X(St(a),"isFieldValidating",function(){return!!a.validatePromise}),X(St(a),"isFieldTouched",function(){return a.touched}),X(St(a),"isFieldDirty",function(){if(a.dirty||a.props.initialValue!==void 0)return!0;var f=a.props.fieldContext,d=f.getInternalHooks(ys),h=d.getInitialValue;return h(a.getNamePath())!==void 0}),X(St(a),"getErrors",function(){return a.errors}),X(St(a),"getWarnings",function(){return a.warnings}),X(St(a),"isListField",function(){return a.props.isListField}),X(St(a),"isList",function(){return a.props.isList}),X(St(a),"isPreserve",function(){return a.props.preserve}),X(St(a),"getMeta",function(){a.prevValidating=a.isFieldValidating();var f={touched:a.isFieldTouched(),validating:a.prevValidating,errors:a.errors,warnings:a.warnings,name:a.getNamePath(),validated:a.validatePromise===null};return f}),X(St(a),"getOnlyChild",function(f){if(typeof f=="function"){var d=a.getMeta();return ee(ee({},a.getOnlyChild(f(a.getControlled(),d,a.props.fieldContext))),{},{isFunction:!0})}var h=Ma(f);return h.length!==1||!s.isValidElement(h[0])?{child:h,isFunction:!1}:{child:h[0],isFunction:!1}}),X(St(a),"getValue",function(f){var d=a.props.fieldContext.getFieldsValue,h=a.getNamePath();return Aa(f||d(!0),h)}),X(St(a),"getControlled",function(){var f=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},d=a.props,h=d.name,v=d.trigger,g=d.validateTrigger,b=d.getValueFromEvent,x=d.normalize,C=d.valuePropName,y=d.getValueProps,w=d.fieldContext,$=g!==void 0?g:w.validateTrigger,E=a.getNamePath(),O=w.getInternalHooks,I=w.getFieldsValue,j=O(ys),M=j.dispatch,D=a.getValue(),N=y||function(k){return X({},C,k)},P=f[v],A=h!==void 0?N(D):{},F=ee(ee({},f),A);F[v]=function(){a.touched=!0,a.dirty=!0,a.triggerMetaEvent();for(var k,L=arguments.length,T=new Array(L),z=0;z=0&&P<=A.length?(h.keys=[].concat(ke(h.keys.slice(0,P)),[h.id],ke(h.keys.slice(P))),E([].concat(ke(A.slice(0,P)),[N],ke(A.slice(P))))):(h.keys=[].concat(ke(h.keys),[h.id]),E([].concat(ke(A),[N]))),h.id+=1},remove:function(N){var P=I(),A=new Set(Array.isArray(N)?N:[N]);A.size<=0||(h.keys=h.keys.filter(function(F,H){return!A.has(H)}),E(P.filter(function(F,H){return!A.has(H)})))},move:function(N,P){if(N!==P){var A=I();N<0||N>=A.length||P<0||P>=A.length||(h.keys=T2(h.keys,N,P),E(T2(A,N,P)))}}},M=$||[];return Array.isArray(M)||(M=[]),r(M.map(function(D,N){var P=h.keys[N];return P===void 0&&(h.keys[N]=h.id,P=h.keys[N],h.id+=1),{name:N,key:P,isListField:!0}}),j,y)})))}function tB(e){var t=!1,n=e.length,r=[];return e.length?new Promise(function(a,o){e.forEach(function(c,u){c.catch(function(f){return t=!0,f}).then(function(f){n-=1,r[u]=f,!(n>0)&&(t&&o(r),a(r))})})}):Promise.resolve([])}var xM="__@field_split__";function Sy(e){return e.map(function(t){return"".concat(jt(t),":").concat(t)}).join(xM)}var wc=(function(){function e(){Sr(this,e),X(this,"kvs",new Map)}return Cr(e,[{key:"set",value:function(n,r){this.kvs.set(Sy(n),r)}},{key:"get",value:function(n){return this.kvs.get(Sy(n))}},{key:"update",value:function(n,r){var a=this.get(n),o=r(a);o?this.set(n,o):this.delete(n)}},{key:"delete",value:function(n){this.kvs.delete(Sy(n))}},{key:"map",value:function(n){return ke(this.kvs.entries()).map(function(r){var a=ce(r,2),o=a[0],c=a[1],u=o.split(xM);return n({key:u.map(function(f){var d=f.match(/^([^:]*):(.*)$/),h=ce(d,3),v=h[1],g=h[2];return v==="number"?Number(g):g}),value:c})})}},{key:"toJSON",value:function(){var n={};return this.map(function(r){var a=r.key,o=r.value;return n[a.join(".")]=o,null}),n}}]),e})(),nB=["name"],rB=Cr(function e(t){var n=this;Sr(this,e),X(this,"formHooked",!1),X(this,"forceRootUpdate",void 0),X(this,"subscribable",!0),X(this,"store",{}),X(this,"fieldEntities",[]),X(this,"initialValues",{}),X(this,"callbacks",{}),X(this,"validateMessages",null),X(this,"preserve",null),X(this,"lastValidatePromise",null),X(this,"getForm",function(){return{getFieldValue:n.getFieldValue,getFieldsValue:n.getFieldsValue,getFieldError:n.getFieldError,getFieldWarning:n.getFieldWarning,getFieldsError:n.getFieldsError,isFieldsTouched:n.isFieldsTouched,isFieldTouched:n.isFieldTouched,isFieldValidating:n.isFieldValidating,isFieldsValidating:n.isFieldsValidating,resetFields:n.resetFields,setFields:n.setFields,setFieldValue:n.setFieldValue,setFieldsValue:n.setFieldsValue,validateFields:n.validateFields,submit:n.submit,_init:!0,getInternalHooks:n.getInternalHooks}}),X(this,"getInternalHooks",function(r){return r===ys?(n.formHooked=!0,{dispatch:n.dispatch,initEntityValue:n.initEntityValue,registerField:n.registerField,useSubscribe:n.useSubscribe,setInitialValues:n.setInitialValues,destroyForm:n.destroyForm,setCallbacks:n.setCallbacks,setValidateMessages:n.setValidateMessages,getFields:n.getFields,setPreserve:n.setPreserve,getInitialValue:n.getInitialValue,registerWatch:n.registerWatch}):(xr(!1,"`getInternalHooks` is internal usage. Should not call directly."),null)}),X(this,"useSubscribe",function(r){n.subscribable=r}),X(this,"prevWithoutPreserves",null),X(this,"setInitialValues",function(r,a){if(n.initialValues=r||{},a){var o,c=kc(r,n.store);(o=n.prevWithoutPreserves)===null||o===void 0||o.map(function(u){var f=u.key;c=xi(c,f,Aa(r,f))}),n.prevWithoutPreserves=null,n.updateStore(c)}}),X(this,"destroyForm",function(r){if(r)n.updateStore({});else{var a=new wc;n.getFieldEntities(!0).forEach(function(o){n.isMergedPreserve(o.isPreserve())||a.set(o.getNamePath(),!0)}),n.prevWithoutPreserves=a}}),X(this,"getInitialValue",function(r){var a=Aa(n.initialValues,r);return r.length?kc(a):a}),X(this,"setCallbacks",function(r){n.callbacks=r}),X(this,"setValidateMessages",function(r){n.validateMessages=r}),X(this,"setPreserve",function(r){n.preserve=r}),X(this,"watchList",[]),X(this,"registerWatch",function(r){return n.watchList.push(r),function(){n.watchList=n.watchList.filter(function(a){return a!==r})}}),X(this,"notifyWatch",function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];if(n.watchList.length){var a=n.getFieldsValue(),o=n.getFieldsValue(!0);n.watchList.forEach(function(c){c(a,o,r)})}}),X(this,"timeoutId",null),X(this,"warningUnhooked",function(){}),X(this,"updateStore",function(r){n.store=r}),X(this,"getFieldEntities",function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;return r?n.fieldEntities.filter(function(a){return a.getNamePath().length}):n.fieldEntities}),X(this,"getFieldsMap",function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,a=new wc;return n.getFieldEntities(r).forEach(function(o){var c=o.getNamePath();a.set(c,o)}),a}),X(this,"getFieldEntitiesForNamePathList",function(r){if(!r)return n.getFieldEntities(!0);var a=n.getFieldsMap(!0);return r.map(function(o){var c=Kr(o);return a.get(c)||{INVALIDATE_NAME_PATH:Kr(o)}})}),X(this,"getFieldsValue",function(r,a){n.warningUnhooked();var o,c,u;if(r===!0||Array.isArray(r)?(o=r,c=a):r&&jt(r)==="object"&&(u=r.strict,c=r.filter),o===!0&&!c)return n.store;var f=n.getFieldEntitiesForNamePathList(Array.isArray(o)?o:null),d=[];return f.forEach(function(h){var v,g,b="INVALIDATE_NAME_PATH"in h?h.INVALIDATE_NAME_PATH:h.getNamePath();if(u){var x,C;if((x=(C=h).isList)!==null&&x!==void 0&&x.call(C))return}else if(!o&&(v=(g=h).isListField)!==null&&v!==void 0&&v.call(g))return;if(!c)d.push(b);else{var y="getMeta"in h?h.getMeta():null;c(y)&&d.push(b)}}),j2(n.store,d.map(Kr))}),X(this,"getFieldValue",function(r){n.warningUnhooked();var a=Kr(r);return Aa(n.store,a)}),X(this,"getFieldsError",function(r){n.warningUnhooked();var a=n.getFieldEntitiesForNamePathList(r);return a.map(function(o,c){return o&&!("INVALIDATE_NAME_PATH"in o)?{name:o.getNamePath(),errors:o.getErrors(),warnings:o.getWarnings()}:{name:Kr(r[c]),errors:[],warnings:[]}})}),X(this,"getFieldError",function(r){n.warningUnhooked();var a=Kr(r),o=n.getFieldsError([a])[0];return o.errors}),X(this,"getFieldWarning",function(r){n.warningUnhooked();var a=Kr(r),o=n.getFieldsError([a])[0];return o.warnings}),X(this,"isFieldsTouched",function(){n.warningUnhooked();for(var r=arguments.length,a=new Array(r),o=0;o0&&arguments[0]!==void 0?arguments[0]:{},a=new wc,o=n.getFieldEntities(!0);o.forEach(function(f){var d=f.props.initialValue,h=f.getNamePath();if(d!==void 0){var v=a.get(h)||new Set;v.add({entity:f,value:d}),a.set(h,v)}});var c=function(d){d.forEach(function(h){var v=h.props.initialValue;if(v!==void 0){var g=h.getNamePath(),b=n.getInitialValue(g);if(b!==void 0)xr(!1,"Form already set 'initialValues' with path '".concat(g.join("."),"'. Field can not overwrite it."));else{var x=a.get(g);if(x&&x.size>1)xr(!1,"Multiple Field with path '".concat(g.join("."),"' set 'initialValue'. Can not decide which one to pick."));else if(x){var C=n.getFieldValue(g),y=h.isListField();!y&&(!r.skipExist||C===void 0)&&n.updateStore(xi(n.store,g,ke(x)[0].value))}}}})},u;r.entities?u=r.entities:r.namePathList?(u=[],r.namePathList.forEach(function(f){var d=a.get(f);if(d){var h;(h=u).push.apply(h,ke(ke(d).map(function(v){return v.entity})))}})):u=o,c(u)}),X(this,"resetFields",function(r){n.warningUnhooked();var a=n.store;if(!r){n.updateStore(kc(n.initialValues)),n.resetWithFieldInitialValue(),n.notifyObservers(a,null,{type:"reset"}),n.notifyWatch();return}var o=r.map(Kr);o.forEach(function(c){var u=n.getInitialValue(c);n.updateStore(xi(n.store,c,u))}),n.resetWithFieldInitialValue({namePathList:o}),n.notifyObservers(a,o,{type:"reset"}),n.notifyWatch(o)}),X(this,"setFields",function(r){n.warningUnhooked();var a=n.store,o=[];r.forEach(function(c){var u=c.name,f=Kt(c,nB),d=Kr(u);o.push(d),"value"in f&&n.updateStore(xi(n.store,d,f.value)),n.notifyObservers(a,[d],{type:"setField",data:c})}),n.notifyWatch(o)}),X(this,"getFields",function(){var r=n.getFieldEntities(!0),a=r.map(function(o){var c=o.getNamePath(),u=o.getMeta(),f=ee(ee({},u),{},{name:c,value:n.getFieldValue(c)});return Object.defineProperty(f,"originRCField",{value:!0}),f});return a}),X(this,"initEntityValue",function(r){var a=r.props.initialValue;if(a!==void 0){var o=r.getNamePath(),c=Aa(n.store,o);c===void 0&&n.updateStore(xi(n.store,o,a))}}),X(this,"isMergedPreserve",function(r){var a=r!==void 0?r:n.preserve;return a??!0}),X(this,"registerField",function(r){n.fieldEntities.push(r);var a=r.getNamePath();if(n.notifyWatch([a]),r.props.initialValue!==void 0){var o=n.store;n.resetWithFieldInitialValue({entities:[r],skipExist:!0}),n.notifyObservers(o,[r.getNamePath()],{type:"valueUpdate",source:"internal"})}return function(c,u){var f=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];if(n.fieldEntities=n.fieldEntities.filter(function(v){return v!==r}),!n.isMergedPreserve(u)&&(!c||f.length>1)){var d=c?void 0:n.getInitialValue(a);if(a.length&&n.getFieldValue(a)!==d&&n.fieldEntities.every(function(v){return!bM(v.getNamePath(),a)})){var h=n.store;n.updateStore(xi(h,a,d,!0)),n.notifyObservers(h,[a],{type:"remove"}),n.triggerDependenciesUpdate(h,a)}}n.notifyWatch([a])}}),X(this,"dispatch",function(r){switch(r.type){case"updateValue":{var a=r.namePath,o=r.value;n.updateValue(a,o);break}case"validateField":{var c=r.namePath,u=r.triggerName;n.validateFields([c],{triggerName:u});break}}}),X(this,"notifyObservers",function(r,a,o){if(n.subscribable){var c=ee(ee({},o),{},{store:n.getFieldsValue(!0)});n.getFieldEntities().forEach(function(u){var f=u.onStoreChange;f(r,a,c)})}else n.forceRootUpdate()}),X(this,"triggerDependenciesUpdate",function(r,a){var o=n.getDependencyChildrenFields(a);return o.length&&n.validateFields(o),n.notifyObservers(r,o,{type:"dependenciesUpdate",relatedFields:[a].concat(ke(o))}),o}),X(this,"updateValue",function(r,a){var o=Kr(r),c=n.store;n.updateStore(xi(n.store,o,a)),n.notifyObservers(c,[o],{type:"valueUpdate",source:"internal"}),n.notifyWatch([o]);var u=n.triggerDependenciesUpdate(c,o),f=n.callbacks.onValuesChange;if(f){var d=j2(n.store,[o]);f(d,n.getFieldsValue())}n.triggerOnFieldsChange([o].concat(ke(u)))}),X(this,"setFieldsValue",function(r){n.warningUnhooked();var a=n.store;if(r){var o=kc(n.store,r);n.updateStore(o)}n.notifyObservers(a,null,{type:"valueUpdate",source:"external"}),n.notifyWatch()}),X(this,"setFieldValue",function(r,a){n.setFields([{name:r,value:a,errors:[],warnings:[]}])}),X(this,"getDependencyChildrenFields",function(r){var a=new Set,o=[],c=new wc;n.getFieldEntities().forEach(function(f){var d=f.props.dependencies;(d||[]).forEach(function(h){var v=Kr(h);c.update(v,function(){var g=arguments.length>0&&arguments[0]!==void 0?arguments[0]:new Set;return g.add(f),g})})});var u=function f(d){var h=c.get(d)||new Set;h.forEach(function(v){if(!a.has(v)){a.add(v);var g=v.getNamePath();v.isFieldDirty()&&g.length&&(o.push(g),f(g))}})};return u(r),o}),X(this,"triggerOnFieldsChange",function(r,a){var o=n.callbacks.onFieldsChange;if(o){var c=n.getFields();if(a){var u=new wc;a.forEach(function(d){var h=d.name,v=d.errors;u.set(h,v)}),c.forEach(function(d){d.errors=u.get(d.name)||d.errors})}var f=c.filter(function(d){var h=d.name;return Kc(r,h)});f.length&&o(f,c)}}),X(this,"validateFields",function(r,a){n.warningUnhooked();var o,c;Array.isArray(r)||typeof r=="string"||typeof a=="string"?(o=r,c=a):c=r;var u=!!o,f=u?o.map(Kr):[],d=[],h=String(Date.now()),v=new Set,g=c||{},b=g.recursive,x=g.dirty;n.getFieldEntities(!0).forEach(function($){if(u||f.push($.getNamePath()),!(!$.props.rules||!$.props.rules.length)&&!(x&&!$.isFieldDirty())){var E=$.getNamePath();if(v.add(E.join(h)),!u||Kc(f,E,b)){var O=$.validateRules(ee({validateMessages:ee(ee({},pM),n.validateMessages)},c));d.push(O.then(function(){return{name:E,errors:[],warnings:[]}}).catch(function(I){var j,M=[],D=[];return(j=I.forEach)===null||j===void 0||j.call(I,function(N){var P=N.rule.warningOnly,A=N.errors;P?D.push.apply(D,ke(A)):M.push.apply(M,ke(A))}),M.length?Promise.reject({name:E,errors:M,warnings:D}):{name:E,errors:M,warnings:D}}))}}});var C=tB(d);n.lastValidatePromise=C,C.catch(function($){return $}).then(function($){var E=$.map(function(O){var I=O.name;return I});n.notifyObservers(n.store,E,{type:"validateFinish"}),n.triggerOnFieldsChange(E,$)});var y=C.then(function(){return n.lastValidatePromise===C?Promise.resolve(n.getFieldsValue(f)):Promise.reject([])}).catch(function($){var E=$.filter(function(O){return O&&O.errors.length});return Promise.reject({values:n.getFieldsValue(f),errorFields:E,outOfDate:n.lastValidatePromise!==C})});y.catch(function($){return $});var w=f.filter(function($){return v.has($.join(h))});return n.triggerOnFieldsChange(w),y}),X(this,"submit",function(){n.warningUnhooked(),n.validateFields().then(function(r){var a=n.callbacks.onFinish;if(a)try{a(r)}catch(o){console.error(o)}}).catch(function(r){var a=n.callbacks.onFinishFailed;a&&a(r)})}),this.forceRootUpdate=t});function zS(e){var t=s.useRef(),n=s.useState({}),r=ce(n,2),a=r[1];if(!t.current)if(e)t.current=e;else{var o=function(){a({})},c=new rB(o);t.current=c.getForm()}return[t.current]}var sx=s.createContext({triggerFormChange:function(){},triggerFormFinish:function(){},registerForm:function(){},unregisterForm:function(){}}),SM=function(t){var n=t.validateMessages,r=t.onFormChange,a=t.onFormFinish,o=t.children,c=s.useContext(sx),u=s.useRef({});return s.createElement(sx.Provider,{value:ee(ee({},c),{},{validateMessages:ee(ee({},c.validateMessages),n),triggerFormChange:function(d,h){r&&r(d,{changedFields:h,forms:u.current}),c.triggerFormChange(d,h)},triggerFormFinish:function(d,h){a&&a(d,{values:h,forms:u.current}),c.triggerFormFinish(d,h)},registerForm:function(d,h){d&&(u.current=ee(ee({},u.current),{},X({},d,h))),c.registerForm(d,h)},unregisterForm:function(d){var h=ee({},u.current);delete h[d],u.current=h,c.unregisterForm(d)}})},o)},aB=["name","initialValues","fields","form","preserve","children","component","validateMessages","validateTrigger","onValuesChange","onFieldsChange","onFinish","onFinishFailed","clearOnDestroy"],iB=function(t,n){var r=t.name,a=t.initialValues,o=t.fields,c=t.form,u=t.preserve,f=t.children,d=t.component,h=d===void 0?"form":d,v=t.validateMessages,g=t.validateTrigger,b=g===void 0?"onChange":g,x=t.onValuesChange,C=t.onFieldsChange,y=t.onFinish,w=t.onFinishFailed,$=t.clearOnDestroy,E=Kt(t,aB),O=s.useRef(null),I=s.useContext(sx),j=zS(c),M=ce(j,1),D=M[0],N=D.getInternalHooks(ys),P=N.useSubscribe,A=N.setInitialValues,F=N.setCallbacks,H=N.setValidateMessages,k=N.setPreserve,L=N.destroyForm;s.useImperativeHandle(n,function(){return ee(ee({},D),{},{nativeElement:O.current})}),s.useEffect(function(){return I.registerForm(r,D),function(){I.unregisterForm(r)}},[I,D,r]),H(ee(ee({},I.validateMessages),v)),F({onValuesChange:x,onFieldsChange:function(Y){if(I.triggerFormChange(r,Y),C){for(var Q=arguments.length,Z=new Array(Q>1?Q-1:0),ae=1;ae{}}),wM=s.createContext(null),$M=e=>{const t=lr(e,["prefixCls"]);return s.createElement(SM,Object.assign({},t))},LS=s.createContext({prefixCls:""}),ia=s.createContext({}),EM=({children:e,status:t,override:n})=>{const r=s.useContext(ia),a=s.useMemo(()=>{const o=Object.assign({},r);return n&&delete o.isFormItemInput,t&&(delete o.status,delete o.hasFeedback,delete o.feedbackIcon),o},[t,n,r]);return s.createElement(ia.Provider,{value:a},e)},_M=s.createContext(void 0),Go=e=>{const{space:t,form:n,children:r}=e;if(r==null)return null;let a=r;return n&&(a=Se.createElement(EM,{override:!0,status:!0},a)),t&&(a=Se.createElement(B8,null,a)),a};function gf(...e){const t={};return e.forEach(n=>{n&&Object.keys(n).forEach(r=>{n[r]!==void 0&&(t[r]=n[r])})}),t}function P2(e){if(!e)return;const{closable:t,closeIcon:n}=e;return{closable:t,closeIcon:n}}function k2(e){const{closable:t,closeIcon:n}=e||{};return Se.useMemo(()=>{if(!t&&(t===!1||n===!1||n===null))return!1;if(t===void 0&&n===void 0)return null;let r={closeIcon:typeof n!="boolean"&&n!==null?n:void 0};return t&&typeof t=="object"&&(r=Object.assign(Object.assign({},r),t)),r},[t,n])}const lB={};function sB(e,t,n=lB){const r=k2(e),a=k2(t),[o]=ho("global",lo.global),c=typeof r!="boolean"?!!r?.disabled:!1,u=Se.useMemo(()=>Object.assign({closeIcon:Se.createElement(uu,null)},n),[n]),f=Se.useMemo(()=>r===!1?!1:r?gf(u,a,r):a===!1?!1:a?gf(u,a):u.closable?u:!1,[r,a,u]);return Se.useMemo(()=>{var d,h;if(f===!1)return[!1,null,c,{}];const{closeIconRender:v}=u,{closeIcon:g}=f;let b=g;const x=ma(f,!0);return b!=null&&(v&&(b=v(g)),b=Se.isValidElement(b)?Se.cloneElement(b,Object.assign(Object.assign(Object.assign({},b.props),{"aria-label":(h=(d=b.props)===null||d===void 0?void 0:d["aria-label"])!==null&&h!==void 0?h:o.close}),x)):Se.createElement("span",Object.assign({"aria-label":o.close},x),b)),[!0,b,c,x]},[c,o.close,f,u])}var OM=function(t){if(wa()&&window.document.documentElement){var n=Array.isArray(t)?t:[t],r=window.document.documentElement;return n.some(function(a){return a in r.style})}return!1},cB=function(t,n){if(!OM(t))return!1;var r=document.createElement("div"),a=r.style[t];return r.style[t]=n,r.style[t]!==a};function cx(e,t){return!Array.isArray(e)&&t!==void 0?cB(e,t):OM(e)}const ig=e=>{const{prefixCls:t,className:n,style:r,size:a,shape:o}=e,c=se({[`${t}-lg`]:a==="large",[`${t}-sm`]:a==="small"}),u=se({[`${t}-circle`]:o==="circle",[`${t}-square`]:o==="square",[`${t}-round`]:o==="round"}),f=s.useMemo(()=>typeof a=="number"?{width:a,height:a,lineHeight:`${a}px`}:{},[a]);return s.createElement("span",{className:se(t,c,u,n),style:Object.assign(Object.assign({},f),r)})},uB=new jn("ant-skeleton-loading",{"0%":{backgroundPosition:"100% 50%"},"100%":{backgroundPosition:"0 50%"}}),og=e=>({height:e,lineHeight:te(e)}),Uc=e=>Object.assign({width:e},og(e)),dB=e=>({background:e.skeletonLoadingBackground,backgroundSize:"400% 100%",animationName:uB,animationDuration:e.skeletonLoadingMotionDuration,animationTimingFunction:"ease",animationIterationCount:"infinite"}),Cy=(e,t)=>Object.assign({width:t(e).mul(5).equal(),minWidth:t(e).mul(5).equal()},og(e)),fB=e=>{const{skeletonAvatarCls:t,gradientFromColor:n,controlHeight:r,controlHeightLG:a,controlHeightSM:o}=e;return{[t]:Object.assign({display:"inline-block",verticalAlign:"top",background:n},Uc(r)),[`${t}${t}-circle`]:{borderRadius:"50%"},[`${t}${t}-lg`]:Object.assign({},Uc(a)),[`${t}${t}-sm`]:Object.assign({},Uc(o))}},mB=e=>{const{controlHeight:t,borderRadiusSM:n,skeletonInputCls:r,controlHeightLG:a,controlHeightSM:o,gradientFromColor:c,calc:u}=e;return{[r]:Object.assign({display:"inline-block",verticalAlign:"top",background:c,borderRadius:n},Cy(t,u)),[`${r}-lg`]:Object.assign({},Cy(a,u)),[`${r}-sm`]:Object.assign({},Cy(o,u))}},A2=e=>Object.assign({width:e},og(e)),hB=e=>{const{skeletonImageCls:t,imageSizeBase:n,gradientFromColor:r,borderRadiusSM:a,calc:o}=e;return{[t]:Object.assign(Object.assign({display:"inline-flex",alignItems:"center",justifyContent:"center",verticalAlign:"middle",background:r,borderRadius:a},A2(o(n).mul(2).equal())),{[`${t}-path`]:{fill:"#bfbfbf"},[`${t}-svg`]:Object.assign(Object.assign({},A2(n)),{maxWidth:o(n).mul(4).equal(),maxHeight:o(n).mul(4).equal()}),[`${t}-svg${t}-svg-circle`]:{borderRadius:"50%"}}),[`${t}${t}-circle`]:{borderRadius:"50%"}}},wy=(e,t,n)=>{const{skeletonButtonCls:r}=e;return{[`${n}${r}-circle`]:{width:t,minWidth:t,borderRadius:"50%"},[`${n}${r}-round`]:{borderRadius:t}}},$y=(e,t)=>Object.assign({width:t(e).mul(2).equal(),minWidth:t(e).mul(2).equal()},og(e)),vB=e=>{const{borderRadiusSM:t,skeletonButtonCls:n,controlHeight:r,controlHeightLG:a,controlHeightSM:o,gradientFromColor:c,calc:u}=e;return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({[n]:Object.assign({display:"inline-block",verticalAlign:"top",background:c,borderRadius:t,width:u(r).mul(2).equal(),minWidth:u(r).mul(2).equal()},$y(r,u))},wy(e,r,n)),{[`${n}-lg`]:Object.assign({},$y(a,u))}),wy(e,a,`${n}-lg`)),{[`${n}-sm`]:Object.assign({},$y(o,u))}),wy(e,o,`${n}-sm`))},gB=e=>{const{componentCls:t,skeletonAvatarCls:n,skeletonTitleCls:r,skeletonParagraphCls:a,skeletonButtonCls:o,skeletonInputCls:c,skeletonImageCls:u,controlHeight:f,controlHeightLG:d,controlHeightSM:h,gradientFromColor:v,padding:g,marginSM:b,borderRadius:x,titleHeight:C,blockRadius:y,paragraphLiHeight:w,controlHeightXS:$,paragraphMarginTop:E}=e;return{[t]:{display:"table",width:"100%",[`${t}-header`]:{display:"table-cell",paddingInlineEnd:g,verticalAlign:"top",[n]:Object.assign({display:"inline-block",verticalAlign:"top",background:v},Uc(f)),[`${n}-circle`]:{borderRadius:"50%"},[`${n}-lg`]:Object.assign({},Uc(d)),[`${n}-sm`]:Object.assign({},Uc(h))},[`${t}-content`]:{display:"table-cell",width:"100%",verticalAlign:"top",[r]:{width:"100%",height:C,background:v,borderRadius:y,[`+ ${a}`]:{marginBlockStart:h}},[a]:{padding:0,"> li":{width:"100%",height:w,listStyle:"none",background:v,borderRadius:y,"+ li":{marginBlockStart:$}}},[`${a}> li:last-child:not(:first-child):not(:nth-child(2))`]:{width:"61%"}},[`&-round ${t}-content`]:{[`${r}, ${a} > li`]:{borderRadius:x}}},[`${t}-with-avatar ${t}-content`]:{[r]:{marginBlockStart:b,[`+ ${a}`]:{marginBlockStart:E}}},[`${t}${t}-element`]:Object.assign(Object.assign(Object.assign(Object.assign({display:"inline-block",width:"auto"},vB(e)),fB(e)),mB(e)),hB(e)),[`${t}${t}-block`]:{width:"100%",[o]:{width:"100%"},[c]:{width:"100%"}},[`${t}${t}-active`]:{[` + ${r}, + ${a} > li, + ${n}, + ${o}, + ${c}, + ${u} + `]:Object.assign({},dB(e))}}},pB=e=>{const{colorFillContent:t,colorFill:n}=e,r=t,a=n;return{color:r,colorGradientEnd:a,gradientFromColor:r,gradientToColor:a,titleHeight:e.controlHeight/2,blockRadius:e.borderRadiusSM,paragraphMarginTop:e.marginLG+e.marginXXS,paragraphLiHeight:e.controlHeight/2}},hu=Kn("Skeleton",e=>{const{componentCls:t,calc:n}=e,r=xn(e,{skeletonAvatarCls:`${t}-avatar`,skeletonTitleCls:`${t}-title`,skeletonParagraphCls:`${t}-paragraph`,skeletonButtonCls:`${t}-button`,skeletonInputCls:`${t}-input`,skeletonImageCls:`${t}-image`,imageSizeBase:n(e.controlHeight).mul(1.5).equal(),borderRadius:100,skeletonLoadingBackground:`linear-gradient(90deg, ${e.gradientFromColor} 25%, ${e.gradientToColor} 37%, ${e.gradientFromColor} 63%)`,skeletonLoadingMotionDuration:"1.4s"});return gB(r)},pB,{deprecatedTokens:[["color","gradientFromColor"],["colorGradientEnd","gradientToColor"]]}),bB=e=>{const{prefixCls:t,className:n,rootClassName:r,active:a,shape:o="circle",size:c="default"}=e,{getPrefixCls:u}=s.useContext(Wt),f=u("skeleton",t),[d,h,v]=hu(f),g=lr(e,["prefixCls","className"]),b=se(f,`${f}-element`,{[`${f}-active`]:a},n,r,h,v);return d(s.createElement("div",{className:b},s.createElement(ig,Object.assign({prefixCls:`${f}-avatar`,shape:o,size:c},g))))},yB=e=>{const{prefixCls:t,className:n,rootClassName:r,active:a,block:o=!1,size:c="default"}=e,{getPrefixCls:u}=s.useContext(Wt),f=u("skeleton",t),[d,h,v]=hu(f),g=lr(e,["prefixCls"]),b=se(f,`${f}-element`,{[`${f}-active`]:a,[`${f}-block`]:o},n,r,h,v);return d(s.createElement("div",{className:b},s.createElement(ig,Object.assign({prefixCls:`${f}-button`,size:c},g))))},xB="M365.714286 329.142857q0 45.714286-32.036571 77.677714t-77.677714 32.036571-77.677714-32.036571-32.036571-77.677714 32.036571-77.677714 77.677714-32.036571 77.677714 32.036571 32.036571 77.677714zM950.857143 548.571429l0 256-804.571429 0 0-109.714286 182.857143-182.857143 91.428571 91.428571 292.571429-292.571429zM1005.714286 146.285714l-914.285714 0q-7.460571 0-12.873143 5.412571t-5.412571 12.873143l0 694.857143q0 7.460571 5.412571 12.873143t12.873143 5.412571l914.285714 0q7.460571 0 12.873143-5.412571t5.412571-12.873143l0-694.857143q0-7.460571-5.412571-12.873143t-12.873143-5.412571zM1097.142857 164.571429l0 694.857143q0 37.741714-26.843429 64.585143t-64.585143 26.843429l-914.285714 0q-37.741714 0-64.585143-26.843429t-26.843429-64.585143l0-694.857143q0-37.741714 26.843429-64.585143t64.585143-26.843429l914.285714 0q37.741714 0 64.585143 26.843429t26.843429 64.585143z",SB=e=>{const{prefixCls:t,className:n,rootClassName:r,style:a,active:o}=e,{getPrefixCls:c}=s.useContext(Wt),u=c("skeleton",t),[f,d,h]=hu(u),v=se(u,`${u}-element`,{[`${u}-active`]:o},n,r,d,h);return f(s.createElement("div",{className:v},s.createElement("div",{className:se(`${u}-image`,n),style:a},s.createElement("svg",{viewBox:"0 0 1098 1024",xmlns:"http://www.w3.org/2000/svg",className:`${u}-image-svg`},s.createElement("title",null,"Image placeholder"),s.createElement("path",{d:xB,className:`${u}-image-path`})))))},CB=e=>{const{prefixCls:t,className:n,rootClassName:r,active:a,block:o,size:c="default"}=e,{getPrefixCls:u}=s.useContext(Wt),f=u("skeleton",t),[d,h,v]=hu(f),g=lr(e,["prefixCls"]),b=se(f,`${f}-element`,{[`${f}-active`]:a,[`${f}-block`]:o},n,r,h,v);return d(s.createElement("div",{className:b},s.createElement(ig,Object.assign({prefixCls:`${f}-input`,size:c},g))))},wB=e=>{const{prefixCls:t,className:n,rootClassName:r,style:a,active:o,children:c}=e,{getPrefixCls:u}=s.useContext(Wt),f=u("skeleton",t),[d,h,v]=hu(f),g=se(f,`${f}-element`,{[`${f}-active`]:o},h,n,r,v);return d(s.createElement("div",{className:g},s.createElement("div",{className:se(`${f}-image`,n),style:a},c)))},$B=(e,t)=>{const{width:n,rows:r=2}=t;if(Array.isArray(n))return n[e];if(r-1===e)return n},EB=e=>{const{prefixCls:t,className:n,style:r,rows:a=0}=e,o=Array.from({length:a}).map((c,u)=>s.createElement("li",{key:u,style:{width:$B(u,e)}}));return s.createElement("ul",{className:se(t,n),style:r},o)},_B=({prefixCls:e,className:t,width:n,style:r})=>s.createElement("h3",{className:se(e,t),style:Object.assign({width:n},r)});function Ey(e){return e&&typeof e=="object"?e:{}}function OB(e,t){return e&&!t?{size:"large",shape:"square"}:{size:"large",shape:"circle"}}function IB(e,t){return!e&&t?{width:"38%"}:e&&t?{width:"50%"}:{}}function RB(e,t){const n={};return(!e||!t)&&(n.width="61%"),!e&&t?n.rows=3:n.rows=2,n}const vu=e=>{const{prefixCls:t,loading:n,className:r,rootClassName:a,style:o,children:c,avatar:u=!1,title:f=!0,paragraph:d=!0,active:h,round:v}=e,{getPrefixCls:g,direction:b,className:x,style:C}=ga("skeleton"),y=g("skeleton",t),[w,$,E]=hu(y);if(n||!("loading"in e)){const O=!!u,I=!!f,j=!!d;let M;if(O){const P=Object.assign(Object.assign({prefixCls:`${y}-avatar`},OB(I,j)),Ey(u));M=s.createElement("div",{className:`${y}-header`},s.createElement(ig,Object.assign({},P)))}let D;if(I||j){let P;if(I){const F=Object.assign(Object.assign({prefixCls:`${y}-title`},IB(O,j)),Ey(f));P=s.createElement(_B,Object.assign({},F))}let A;if(j){const F=Object.assign(Object.assign({prefixCls:`${y}-paragraph`},RB(O,I)),Ey(d));A=s.createElement(EB,Object.assign({},F))}D=s.createElement("div",{className:`${y}-content`},P,A)}const N=se(y,{[`${y}-with-avatar`]:O,[`${y}-active`]:h,[`${y}-rtl`]:b==="rtl",[`${y}-round`]:v},x,r,a,$,E);return w(s.createElement("div",{className:N,style:Object.assign(Object.assign({},C),o)},M,D))}return c??null};vu.Button=yB;vu.Avatar=bB;vu.Input=CB;vu.Image=SB;vu.Node=wB;const NB=e=>{const{componentCls:t}=e;return{[t]:{display:"flex",flexFlow:"row wrap",minWidth:0,"&::before, &::after":{display:"flex"},"&-no-wrap":{flexWrap:"nowrap"},"&-start":{justifyContent:"flex-start"},"&-center":{justifyContent:"center"},"&-end":{justifyContent:"flex-end"},"&-space-between":{justifyContent:"space-between"},"&-space-around":{justifyContent:"space-around"},"&-space-evenly":{justifyContent:"space-evenly"},"&-top":{alignItems:"flex-start"},"&-middle":{alignItems:"center"},"&-bottom":{alignItems:"flex-end"}}}},MB=e=>{const{componentCls:t}=e;return{[t]:{position:"relative",maxWidth:"100%",minHeight:1}}},jB=(e,t)=>{const{prefixCls:n,componentCls:r,gridColumns:a}=e,o={};for(let c=a;c>=0;c--)c===0?(o[`${r}${t}-${c}`]={display:"none"},o[`${r}-push-${c}`]={insetInlineStart:"auto"},o[`${r}-pull-${c}`]={insetInlineEnd:"auto"},o[`${r}${t}-push-${c}`]={insetInlineStart:"auto"},o[`${r}${t}-pull-${c}`]={insetInlineEnd:"auto"},o[`${r}${t}-offset-${c}`]={marginInlineStart:0},o[`${r}${t}-order-${c}`]={order:0}):(o[`${r}${t}-${c}`]=[{"--ant-display":"block",display:"block"},{display:"var(--ant-display)",flex:`0 0 ${c/a*100}%`,maxWidth:`${c/a*100}%`}],o[`${r}${t}-push-${c}`]={insetInlineStart:`${c/a*100}%`},o[`${r}${t}-pull-${c}`]={insetInlineEnd:`${c/a*100}%`},o[`${r}${t}-offset-${c}`]={marginInlineStart:`${c/a*100}%`},o[`${r}${t}-order-${c}`]={order:c});return o[`${r}${t}-flex`]={flex:`var(--${n}${t}-flex)`},o},ux=(e,t)=>jB(e,t),TB=(e,t,n)=>({[`@media (min-width: ${te(t)})`]:Object.assign({},ux(e,n))}),DB=()=>({}),PB=()=>({}),kB=Kn("Grid",NB,DB),AB=e=>({xs:e.screenXSMin,sm:e.screenSMMin,md:e.screenMDMin,lg:e.screenLGMin,xl:e.screenXLMin,xxl:e.screenXXLMin}),zB=Kn("Grid",e=>{const t=xn(e,{gridColumns:24}),n=AB(t);return delete n.xs,[MB(t),ux(t,""),ux(t,"-xs"),Object.keys(n).map(r=>TB(t,n[r],`-${r}`)).reduce((r,a)=>Object.assign(Object.assign({},r),a),{})]},PB),LB=Se.createContext({});function HB(e){return t=>s.createElement(vo,{theme:{token:{motion:!1,zIndexPopupBase:0}}},s.createElement(e,Object.assign({},t)))}const lg=(e,t,n,r,a)=>HB(c=>{const{prefixCls:u,style:f}=c,d=s.useRef(null),[h,v]=s.useState(0),[g,b]=s.useState(0),[x,C]=Wn(!1,{value:c.open}),{getPrefixCls:y}=s.useContext(Wt),w=y(r||"select",u);s.useEffect(()=>{if(C(!0),typeof ResizeObserver<"u"){const O=new ResizeObserver(j=>{const M=j[0].target;v(M.offsetHeight+8),b(M.offsetWidth)}),I=setInterval(()=>{var j;const M=a?`.${a(w)}`:`.${w}-dropdown`,D=(j=d.current)===null||j===void 0?void 0:j.querySelector(M);D&&(clearInterval(I),O.observe(D))},10);return()=>{clearInterval(I),O.disconnect()}}},[]);let $=Object.assign(Object.assign({},c),{style:Object.assign(Object.assign({},f),{margin:0}),open:x,visible:x,getPopupContainer:()=>d.current});t&&Object.assign($,{[t]:{overflow:{adjustX:!1,adjustY:!1}}});const E={paddingBottom:h,position:"relative",minWidth:g};return s.createElement("div",{ref:d,style:E},s.createElement(e,Object.assign({},$)))}),sg=(function(){if(typeof navigator>"u"||typeof window>"u")return!1;var e=navigator.userAgent||navigator.vendor||window.opera;return/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(e)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(e?.substr(0,4))});var cg=function(t){var n=t.className,r=t.customizeIcon,a=t.customizeIconProps,o=t.children,c=t.onMouseDown,u=t.onClick,f=typeof r=="function"?r(a):r;return s.createElement("span",{className:n,onMouseDown:function(h){h.preventDefault(),c?.(h)},style:{userSelect:"none",WebkitUserSelect:"none"},unselectable:"on",onClick:u,"aria-hidden":!0},f!==void 0?f:s.createElement("span",{className:se(n.split(/\s+/).map(function(d){return"".concat(d,"-icon")}))},o))},BB=function(t,n,r,a,o){var c=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!1,u=arguments.length>6?arguments[6]:void 0,f=arguments.length>7?arguments[7]:void 0,d=Se.useMemo(function(){if(jt(a)==="object")return a.clearIcon;if(o)return o},[a,o]),h=Se.useMemo(function(){return!!(!c&&a&&(r.length||u)&&!(f==="combobox"&&u===""))},[a,c,r.length,u,f]);return{allowClear:h,clearIcon:Se.createElement(cg,{className:"".concat(t,"-clear"),onMouseDown:n,customizeIcon:d},"×")}},IM=s.createContext(null);function FB(){return s.useContext(IM)}function VB(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:10,t=s.useState(!1),n=ce(t,2),r=n[0],a=n[1],o=s.useRef(null),c=function(){window.clearTimeout(o.current)};s.useEffect(function(){return c},[]);var u=function(d,h){c(),o.current=window.setTimeout(function(){a(d),h&&h()},e)};return[r,u,c]}function RM(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:250,t=s.useRef(null),n=s.useRef(null);s.useEffect(function(){return function(){window.clearTimeout(n.current)}},[]);function r(a){(a||t.current===null)&&(t.current=a),window.clearTimeout(n.current),n.current=window.setTimeout(function(){t.current=null},e)}return[function(){return t.current},r]}function KB(e,t,n,r){var a=s.useRef(null);a.current={open:t,triggerOpen:n,customizedTrigger:r},s.useEffect(function(){function o(c){var u;if(!((u=a.current)!==null&&u!==void 0&&u.customizedTrigger)){var f=c.target;f.shadowRoot&&c.composed&&(f=c.composedPath()[0]||f),a.current.open&&e().filter(function(d){return d}).every(function(d){return!d.contains(f)&&d!==f})&&a.current.triggerOpen(!1)}}return window.addEventListener("mousedown",o),function(){return window.removeEventListener("mousedown",o)}},[])}function UB(e){return e&&![Mt.ESC,Mt.SHIFT,Mt.BACKSPACE,Mt.TAB,Mt.WIN_KEY,Mt.ALT,Mt.META,Mt.WIN_KEY_RIGHT,Mt.CTRL,Mt.SEMICOLON,Mt.EQUALS,Mt.CAPS_LOCK,Mt.CONTEXT_MENU,Mt.F1,Mt.F2,Mt.F3,Mt.F4,Mt.F5,Mt.F6,Mt.F7,Mt.F8,Mt.F9,Mt.F10,Mt.F11,Mt.F12].includes(e)}var WB=["prefixCls","invalidate","item","renderItem","responsive","responsiveDisabled","registerSize","itemKey","className","style","children","display","order","component"],$c=void 0;function qB(e,t){var n=e.prefixCls,r=e.invalidate,a=e.item,o=e.renderItem,c=e.responsive,u=e.responsiveDisabled,f=e.registerSize,d=e.itemKey,h=e.className,v=e.style,g=e.children,b=e.display,x=e.order,C=e.component,y=C===void 0?"div":C,w=Kt(e,WB),$=c&&!b;function E(D){f(d,D)}s.useEffect(function(){return function(){E(null)}},[]);var O=o&&a!==$c?o(a,{index:x}):g,I;r||(I={opacity:$?0:1,height:$?0:$c,overflowY:$?"hidden":$c,order:c?x:$c,pointerEvents:$?"none":$c,position:$?"absolute":$c});var j={};$&&(j["aria-hidden"]=!0);var M=s.createElement(y,Me({className:se(!r&&n,h),style:ee(ee({},I),v)},j,w,{ref:t}),O);return c&&(M=s.createElement(Ca,{onResize:function(N){var P=N.offsetWidth;E(P)},disabled:u},M)),M}var Lc=s.forwardRef(qB);Lc.displayName="Item";function YB(e){if(typeof MessageChannel>"u")hn(e);else{var t=new MessageChannel;t.port1.onmessage=function(){return e()},t.port2.postMessage(void 0)}}function GB(){var e=s.useRef(null),t=function(r){e.current||(e.current=[],YB(function(){Li.unstable_batchedUpdates(function(){e.current.forEach(function(a){a()}),e.current=null})})),e.current.push(r)};return t}function Ec(e,t){var n=s.useState(t),r=ce(n,2),a=r[0],o=r[1],c=pn(function(u){e(function(){o(u)})});return[a,c]}var bv=Se.createContext(null),XB=["component"],QB=["className"],ZB=["className"],JB=function(t,n){var r=s.useContext(bv);if(!r){var a=t.component,o=a===void 0?"div":a,c=Kt(t,XB);return s.createElement(o,Me({},c,{ref:n}))}var u=r.className,f=Kt(r,QB),d=t.className,h=Kt(t,ZB);return s.createElement(bv.Provider,{value:null},s.createElement(Lc,Me({ref:n,className:se(u,d)},f,h)))},NM=s.forwardRef(JB);NM.displayName="RawItem";var eF=["prefixCls","data","renderItem","renderRawItem","itemKey","itemWidth","ssr","style","className","maxCount","renderRest","renderRawRest","prefix","suffix","component","itemComponent","onVisibleChange"],MM="responsive",jM="invalidate";function tF(e){return"+ ".concat(e.length," ...")}function nF(e,t){var n=e.prefixCls,r=n===void 0?"rc-overflow":n,a=e.data,o=a===void 0?[]:a,c=e.renderItem,u=e.renderRawItem,f=e.itemKey,d=e.itemWidth,h=d===void 0?10:d,v=e.ssr,g=e.style,b=e.className,x=e.maxCount,C=e.renderRest,y=e.renderRawRest,w=e.prefix,$=e.suffix,E=e.component,O=E===void 0?"div":E,I=e.itemComponent,j=e.onVisibleChange,M=Kt(e,eF),D=v==="full",N=GB(),P=Ec(N,null),A=ce(P,2),F=A[0],H=A[1],k=F||0,L=Ec(N,new Map),T=ce(L,2),z=T[0],V=T[1],q=Ec(N,0),G=ce(q,2),B=G[0],U=G[1],K=Ec(N,0),Y=ce(K,2),Q=Y[0],Z=Y[1],ae=Ec(N,0),re=ce(ae,2),ie=re[0],ve=re[1],ue=Ec(N,0),oe=ce(ue,2),he=oe[0],fe=oe[1],me=s.useState(null),le=ce(me,2),pe=le[0],Ce=le[1],De=s.useState(null),je=ce(De,2),ge=je[0],Ie=je[1],Ee=s.useMemo(function(){return ge===null&&D?Number.MAX_SAFE_INTEGER:ge||0},[ge,F]),we=s.useState(!1),Fe=ce(we,2),He=Fe[0],it=Fe[1],Ze="".concat(r,"-item"),Ye=Math.max(B,Q),et=x===MM,Pe=o.length&&et,Oe=x===jM,Be=Pe||typeof x=="number"&&o.length>x,$e=s.useMemo(function(){var Ue=o;return Pe?F===null&&D?Ue=o:Ue=o.slice(0,Math.min(o.length,k/h)):typeof x=="number"&&(Ue=o.slice(0,x)),Ue},[o,h,F,x,Pe]),Te=s.useMemo(function(){return Pe?o.slice(Ee+1):o.slice($e.length)},[o,$e,Pe,Ee]),be=s.useCallback(function(Ue,qe){var ct;return typeof f=="function"?f(Ue):(ct=f&&Ue?.[f])!==null&&ct!==void 0?ct:qe},[f]),ye=s.useCallback(c||function(Ue){return Ue},[c]);function Re(Ue,qe,ct){ge===Ue&&(qe===void 0||qe===pe)||(Ie(Ue),ct||(it(Uek){Re(Tt-1,Ue-Dt-he+Q);break}}$&&mt(0)+he>k&&Ce(null)}},[k,z,Q,ie,he,be,$e]);var st=He&&!!Te.length,bt={};pe!==null&&Pe&&(bt={position:"absolute",left:pe,top:0});var qt={prefixCls:Ze,responsive:Pe,component:I,invalidate:Oe},Gt=u?function(Ue,qe){var ct=be(Ue,qe);return s.createElement(bv.Provider,{key:ct,value:ee(ee({},qt),{},{order:qe,item:Ue,itemKey:ct,registerSize:ft,display:qe<=Ee})},u(Ue,qe))}:function(Ue,qe){var ct=be(Ue,qe);return s.createElement(Lc,Me({},qt,{order:qe,key:ct,item:Ue,renderItem:ye,itemKey:ct,registerSize:ft,display:qe<=Ee}))},vt={order:st?Ee:Number.MAX_SAFE_INTEGER,className:"".concat(Ze,"-rest"),registerSize:$t,display:st},It=C||tF,Et=y?s.createElement(bv.Provider,{value:ee(ee({},qt),vt)},y(Te)):s.createElement(Lc,Me({},qt,vt),typeof It=="function"?It(Te):It),nt=s.createElement(O,Me({className:se(!Oe&&r,b),style:g,ref:t},M),w&&s.createElement(Lc,Me({},qt,{responsive:et,responsiveDisabled:!Pe,order:-1,className:"".concat(Ze,"-prefix"),registerSize:Qe,display:!0}),w),$e.map(Gt),Be?Et:null,$&&s.createElement(Lc,Me({},qt,{responsive:et,responsiveDisabled:!Pe,order:Ee,className:"".concat(Ze,"-suffix"),registerSize:at,display:!0,style:bt}),$));return et?s.createElement(Ca,{onResize:Ge,disabled:!Pe},nt):nt}var zi=s.forwardRef(nF);zi.displayName="Overflow";zi.Item=NM;zi.RESPONSIVE=MM;zi.INVALIDATE=jM;function rF(e,t,n){var r=ee(ee({},e),t);return Object.keys(t).forEach(function(a){var o=t[a];typeof o=="function"&&(r[a]=function(){for(var c,u=arguments.length,f=new Array(u),d=0;dE&&(je="".concat(ge.slice(0,E),"..."))}var Ie=function(we){we&&we.stopPropagation(),D(me)};return typeof j=="function"?ie(Ce,je,le,De,Ie):re(me,je,le,De,Ie)},ue=function(me){if(!a.length)return null;var le=typeof I=="function"?I(me):I;return typeof j=="function"?ie(void 0,le,!1,!1,void 0,!0):re({title:le},le,!1)},oe=s.createElement("div",{className:"".concat(Q,"-search"),style:{width:q},onFocus:function(){Y(!0)},onBlur:function(){Y(!1)}},s.createElement(TM,{ref:f,open:o,prefixCls:r,id:n,inputElement:null,disabled:h,autoFocus:b,autoComplete:x,editable:ae,activeDescendantId:C,value:Z,onKeyDown:A,onMouseDown:F,onChange:N,onPaste:P,onCompositionStart:H,onCompositionEnd:k,onBlur:L,tabIndex:y,attrs:ma(t,!0)}),s.createElement("span",{ref:T,className:"".concat(Q,"-search-mirror"),"aria-hidden":!0},Z," ")),he=s.createElement(zi,{prefixCls:"".concat(Q,"-overflow"),data:a,renderItem:ve,renderRest:ue,suffix:oe,itemKey:dF,maxCount:$});return s.createElement("span",{className:"".concat(Q,"-wrap")},he,!a.length&&!Z&&s.createElement("span",{className:"".concat(Q,"-placeholder")},d))},mF=function(t){var n=t.inputElement,r=t.prefixCls,a=t.id,o=t.inputRef,c=t.disabled,u=t.autoFocus,f=t.autoComplete,d=t.activeDescendantId,h=t.mode,v=t.open,g=t.values,b=t.placeholder,x=t.tabIndex,C=t.showSearch,y=t.searchValue,w=t.activeValue,$=t.maxLength,E=t.onInputKeyDown,O=t.onInputMouseDown,I=t.onInputChange,j=t.onInputPaste,M=t.onInputCompositionStart,D=t.onInputCompositionEnd,N=t.onInputBlur,P=t.title,A=s.useState(!1),F=ce(A,2),H=F[0],k=F[1],L=h==="combobox",T=L||C,z=g[0],V=y||"";L&&w&&!H&&(V=w),s.useEffect(function(){L&&k(!1)},[L,w]);var q=h!=="combobox"&&!v&&!C?!1:!!V,G=P===void 0?PM(z):P,B=s.useMemo(function(){return z?null:s.createElement("span",{className:"".concat(r,"-selection-placeholder"),style:q?{visibility:"hidden"}:void 0},b)},[z,q,b,r]);return s.createElement("span",{className:"".concat(r,"-selection-wrap")},s.createElement("span",{className:"".concat(r,"-selection-search")},s.createElement(TM,{ref:o,prefixCls:r,id:a,open:v,inputElement:n,disabled:c,autoFocus:u,autoComplete:f,editable:T,activeDescendantId:d,value:V,onKeyDown:E,onMouseDown:O,onChange:function(K){k(!0),I(K)},onPaste:j,onCompositionStart:M,onCompositionEnd:D,onBlur:N,tabIndex:x,attrs:ma(t,!0),maxLength:L?$:void 0})),!L&&z?s.createElement("span",{className:"".concat(r,"-selection-item"),title:G,style:q?{visibility:"hidden"}:void 0},z.label):null,B)},hF=function(t,n){var r=s.useRef(null),a=s.useRef(!1),o=t.prefixCls,c=t.open,u=t.mode,f=t.showSearch,d=t.tokenWithEnter,h=t.disabled,v=t.prefix,g=t.autoClearSearchValue,b=t.onSearch,x=t.onSearchSubmit,C=t.onToggleOpen,y=t.onInputKeyDown,w=t.onInputBlur,$=t.domRef;s.useImperativeHandle(n,function(){return{focus:function(G){r.current.focus(G)},blur:function(){r.current.blur()}}});var E=RM(0),O=ce(E,2),I=O[0],j=O[1],M=function(G){var B=G.which,U=r.current instanceof HTMLTextAreaElement;!U&&c&&(B===Mt.UP||B===Mt.DOWN)&&G.preventDefault(),y&&y(G),B===Mt.ENTER&&u==="tags"&&!a.current&&!c&&x?.(G.target.value),!(U&&!c&&~[Mt.UP,Mt.DOWN,Mt.LEFT,Mt.RIGHT].indexOf(B))&&UB(B)&&C(!0)},D=function(){j(!0)},N=s.useRef(null),P=function(G){b(G,!0,a.current)!==!1&&C(!0)},A=function(){a.current=!0},F=function(G){a.current=!1,u!=="combobox"&&P(G.target.value)},H=function(G){var B=G.target.value;if(d&&N.current&&/[\r\n]/.test(N.current)){var U=N.current.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");B=B.replace(U,N.current)}N.current=null,P(B)},k=function(G){var B=G.clipboardData,U=B?.getData("text");N.current=U||""},L=function(G){var B=G.target;if(B!==r.current){var U=document.body.style.msTouchAction!==void 0;U?setTimeout(function(){r.current.focus()}):r.current.focus()}},T=function(G){var B=I();G.target!==r.current&&!B&&!(u==="combobox"&&h)&&G.preventDefault(),(u!=="combobox"&&(!f||!B)||!c)&&(c&&g!==!1&&b("",!0,!1),C())},z={inputRef:r,onInputKeyDown:M,onInputMouseDown:D,onInputChange:H,onInputPaste:k,onInputCompositionStart:A,onInputCompositionEnd:F,onInputBlur:w},V=u==="multiple"||u==="tags"?s.createElement(fF,Me({},t,z)):s.createElement(mF,Me({},t,z));return s.createElement("div",{ref:$,className:"".concat(o,"-selector"),onClick:L,onMouseDown:T},v&&s.createElement("div",{className:"".concat(o,"-prefix")},v),V)},vF=s.forwardRef(hF);function gF(e){var t=e.prefixCls,n=e.align,r=e.arrow,a=e.arrowPos,o=r||{},c=o.className,u=o.content,f=a.x,d=f===void 0?0:f,h=a.y,v=h===void 0?0:h,g=s.useRef();if(!n||!n.points)return null;var b={position:"absolute"};if(n.autoArrow!==!1){var x=n.points[0],C=n.points[1],y=x[0],w=x[1],$=C[0],E=C[1];y===$||!["t","b"].includes(y)?b.top=v:y==="t"?b.top=0:b.bottom=0,w===E||!["l","r"].includes(w)?b.left=d:w==="l"?b.left=0:b.right=0}return s.createElement("div",{ref:g,className:se("".concat(t,"-arrow"),c),style:b},u)}function pF(e){var t=e.prefixCls,n=e.open,r=e.zIndex,a=e.mask,o=e.motion;return a?s.createElement(Oi,Me({},o,{motionAppear:!0,visible:n,removeOnLeave:!0}),function(c){var u=c.className;return s.createElement("div",{style:{zIndex:r},className:se("".concat(t,"-mask"),u)})}):null}var bF=s.memo(function(e){var t=e.children;return t},function(e,t){return t.cache}),yF=s.forwardRef(function(e,t){var n=e.popup,r=e.className,a=e.prefixCls,o=e.style,c=e.target,u=e.onVisibleChanged,f=e.open,d=e.keepDom,h=e.fresh,v=e.onClick,g=e.mask,b=e.arrow,x=e.arrowPos,C=e.align,y=e.motion,w=e.maskMotion,$=e.forceRender,E=e.getPopupContainer,O=e.autoDestroy,I=e.portal,j=e.zIndex,M=e.onMouseEnter,D=e.onMouseLeave,N=e.onPointerEnter,P=e.onPointerDownCapture,A=e.ready,F=e.offsetX,H=e.offsetY,k=e.offsetR,L=e.offsetB,T=e.onAlign,z=e.onPrepare,V=e.stretch,q=e.targetWidth,G=e.targetHeight,B=typeof n=="function"?n():n,U=f||d,K=E?.length>0,Y=s.useState(!E||!K),Q=ce(Y,2),Z=Q[0],ae=Q[1];if(fn(function(){!Z&&K&&c&&ae(!0)},[Z,K,c]),!Z)return null;var re="auto",ie={left:"-1000vw",top:"-1000vh",right:re,bottom:re};if(A||!f){var ve,ue=C.points,oe=C.dynamicInset||((ve=C._experimental)===null||ve===void 0?void 0:ve.dynamicInset),he=oe&&ue[0][1]==="r",fe=oe&&ue[0][0]==="b";he?(ie.right=k,ie.left=re):(ie.left=F,ie.right=re),fe?(ie.bottom=L,ie.top=re):(ie.top=H,ie.bottom=re)}var me={};return V&&(V.includes("height")&&G?me.height=G:V.includes("minHeight")&&G&&(me.minHeight=G),V.includes("width")&&q?me.width=q:V.includes("minWidth")&&q&&(me.minWidth=q)),f||(me.pointerEvents="none"),s.createElement(I,{open:$||U,getContainer:E&&function(){return E(c)},autoDestroy:O},s.createElement(pF,{prefixCls:a,open:f,zIndex:j,mask:g,motion:w}),s.createElement(Ca,{onResize:T,disabled:!f},function(le){return s.createElement(Oi,Me({motionAppear:!0,motionEnter:!0,motionLeave:!0,removeOnLeave:!1,forceRender:$,leavedClassName:"".concat(a,"-hidden")},y,{onAppearPrepare:z,onEnterPrepare:z,visible:f,onVisibleChanged:function(Ce){var De;y==null||(De=y.onVisibleChanged)===null||De===void 0||De.call(y,Ce),u(Ce)}}),function(pe,Ce){var De=pe.className,je=pe.style,ge=se(a,De,r);return s.createElement("div",{ref:Ea(le,t,Ce),className:ge,style:ee(ee(ee(ee({"--arrow-x":"".concat(x.x||0,"px"),"--arrow-y":"".concat(x.y||0,"px")},ie),me),je),{},{boxSizing:"border-box",zIndex:j},o),onMouseEnter:M,onMouseLeave:D,onPointerEnter:N,onClick:v,onPointerDownCapture:P},b&&s.createElement(gF,{prefixCls:a,arrow:b,arrowPos:x,align:C}),s.createElement(bF,{cache:!f&&!h},B))})}))}),xF=s.forwardRef(function(e,t){var n=e.children,r=e.getTriggerDOMNode,a=Hi(n),o=s.useCallback(function(u){nf(t,r?r(u):u)},[r]),c=Fl(o,Vl(n));return a?s.cloneElement(n,{ref:c}):n}),H2=s.createContext(null);function B2(e){return e?Array.isArray(e)?e:[e]:[]}function SF(e,t,n,r){return s.useMemo(function(){var a=B2(n??t),o=B2(r??t),c=new Set(a),u=new Set(o);return e&&(c.has("hover")&&(c.delete("hover"),c.add("click")),u.has("hover")&&(u.delete("hover"),u.add("click"))),[c,u]},[e,t,n,r])}function CF(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],n=arguments.length>2?arguments[2]:void 0;return n?e[0]===t[0]:e[0]===t[0]&&e[1]===t[1]}function wF(e,t,n,r){for(var a=n.points,o=Object.keys(e),c=0;c1&&arguments[1]!==void 0?arguments[1]:1;return Number.isNaN(e)?t:e}function Cd(e){return pf(parseFloat(e),0)}function V2(e,t){var n=ee({},e);return(t||[]).forEach(function(r){if(!(r instanceof HTMLBodyElement||r instanceof HTMLHtmlElement)){var a=Pf(r).getComputedStyle(r),o=a.overflow,c=a.overflowClipMargin,u=a.borderTopWidth,f=a.borderBottomWidth,d=a.borderLeftWidth,h=a.borderRightWidth,v=r.getBoundingClientRect(),g=r.offsetHeight,b=r.clientHeight,x=r.offsetWidth,C=r.clientWidth,y=Cd(u),w=Cd(f),$=Cd(d),E=Cd(h),O=pf(Math.round(v.width/x*1e3)/1e3),I=pf(Math.round(v.height/g*1e3)/1e3),j=(x-C-$-E)*O,M=(g-b-y-w)*I,D=y*I,N=w*I,P=$*O,A=E*O,F=0,H=0;if(o==="clip"){var k=Cd(c);F=k*O,H=k*I}var L=v.x+P-F,T=v.y+D-H,z=L+v.width+2*F-P-A-j,V=T+v.height+2*H-D-N-M;n.left=Math.max(n.left,L),n.top=Math.max(n.top,T),n.right=Math.min(n.right,z),n.bottom=Math.min(n.bottom,V)}}),n}function K2(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n="".concat(t),r=n.match(/^(.*)\%$/);return r?e*(parseFloat(r[1])/100):parseFloat(n)}function U2(e,t){var n=t||[],r=ce(n,2),a=r[0],o=r[1];return[K2(e.width,a),K2(e.height,o)]}function W2(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return[e[0],e[1]]}function _c(e,t){var n=t[0],r=t[1],a,o;return n==="t"?o=e.y:n==="b"?o=e.y+e.height:o=e.y+e.height/2,r==="l"?a=e.x:r==="r"?a=e.x+e.width:a=e.x+e.width/2,{x:a,y:o}}function El(e,t){var n={t:"b",b:"t",l:"r",r:"l"};return e.map(function(r,a){return a===t?n[r]||"c":r}).join("")}function $F(e,t,n,r,a,o,c){var u=s.useState({ready:!1,offsetX:0,offsetY:0,offsetR:0,offsetB:0,arrowX:0,arrowY:0,scaleX:1,scaleY:1,align:a[r]||{}}),f=ce(u,2),d=f[0],h=f[1],v=s.useRef(0),g=s.useMemo(function(){return t?dx(t):[]},[t]),b=s.useRef({}),x=function(){b.current={}};e||x();var C=pn(function(){if(t&&n&&e){let Cn=function(Ar,Br){var Yr=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Fe,sa=U.x+Ar,Pa=U.y+Br,Ks=sa+fe,Gl=Pa+he,Us=Math.max(sa,Yr.left),Vt=Math.max(Pa,Yr.top),an=Math.min(Ks,Yr.right),fr=Math.min(Gl,Yr.bottom);return Math.max(0,(an-Us)*(fr-Vt))},rr=function(){vn=U.y+It,cn=vn+he,En=U.x+vt,rn=En+fe};var $,E,O,I,j=t,M=j.ownerDocument,D=Pf(j),N=D.getComputedStyle(j),P=N.position,A=j.style.left,F=j.style.top,H=j.style.right,k=j.style.bottom,L=j.style.overflow,T=ee(ee({},a[r]),o),z=M.createElement("div");($=j.parentElement)===null||$===void 0||$.appendChild(z),z.style.left="".concat(j.offsetLeft,"px"),z.style.top="".concat(j.offsetTop,"px"),z.style.position=P,z.style.height="".concat(j.offsetHeight,"px"),z.style.width="".concat(j.offsetWidth,"px"),j.style.left="0",j.style.top="0",j.style.right="auto",j.style.bottom="auto",j.style.overflow="hidden";var V;if(Array.isArray(n))V={x:n[0],y:n[1],width:0,height:0};else{var q,G,B=n.getBoundingClientRect();B.x=(q=B.x)!==null&&q!==void 0?q:B.left,B.y=(G=B.y)!==null&&G!==void 0?G:B.top,V={x:B.x,y:B.y,width:B.width,height:B.height}}var U=j.getBoundingClientRect(),K=D.getComputedStyle(j),Y=K.height,Q=K.width;U.x=(E=U.x)!==null&&E!==void 0?E:U.left,U.y=(O=U.y)!==null&&O!==void 0?O:U.top;var Z=M.documentElement,ae=Z.clientWidth,re=Z.clientHeight,ie=Z.scrollWidth,ve=Z.scrollHeight,ue=Z.scrollTop,oe=Z.scrollLeft,he=U.height,fe=U.width,me=V.height,le=V.width,pe={left:0,top:0,right:ae,bottom:re},Ce={left:-oe,top:-ue,right:ie-oe,bottom:ve-ue},De=T.htmlRegion,je="visible",ge="visibleFirst";De!=="scroll"&&De!==ge&&(De=je);var Ie=De===ge,Ee=V2(Ce,g),we=V2(pe,g),Fe=De===je?we:Ee,He=Ie?we:Fe;j.style.left="auto",j.style.top="auto",j.style.right="0",j.style.bottom="0";var it=j.getBoundingClientRect();j.style.left=A,j.style.top=F,j.style.right=H,j.style.bottom=k,j.style.overflow=L,(I=j.parentElement)===null||I===void 0||I.removeChild(z);var Ze=pf(Math.round(fe/parseFloat(Q)*1e3)/1e3),Ye=pf(Math.round(he/parseFloat(Y)*1e3)/1e3);if(Ze===0||Ye===0||tf(n)&&!fu(n))return;var et=T.offset,Pe=T.targetOffset,Oe=U2(U,et),Be=ce(Oe,2),$e=Be[0],Te=Be[1],be=U2(V,Pe),ye=ce(be,2),Re=ye[0],Ge=ye[1];V.x-=Re,V.y-=Ge;var ft=T.points||[],$t=ce(ft,2),Qe=$t[0],at=$t[1],mt=W2(at),st=W2(Qe),bt=_c(V,mt),qt=_c(U,st),Gt=ee({},T),vt=bt.x-qt.x+$e,It=bt.y-qt.y+Te,Et=Cn(vt,It),nt=Cn(vt,It,we),Ue=_c(V,["t","l"]),qe=_c(U,["t","l"]),ct=_c(V,["b","r"]),Tt=_c(U,["b","r"]),Dt=T.overflow||{},Jt=Dt.adjustX,ut=Dt.adjustY,ot=Dt.shiftX,Lt=Dt.shiftY,tn=function(Br){return typeof Br=="boolean"?Br:Br>=0},vn,cn,En,rn;rr();var Sn=tn(ut),lt=st[0]===mt[0];if(Sn&&st[0]==="t"&&(cn>He.bottom||b.current.bt)){var xt=It;lt?xt-=he-me:xt=Ue.y-Tt.y-Te;var Bt=Cn(vt,xt),kt=Cn(vt,xt,we);Bt>Et||Bt===Et&&(!Ie||kt>=nt)?(b.current.bt=!0,It=xt,Te=-Te,Gt.points=[El(st,0),El(mt,0)]):b.current.bt=!1}if(Sn&&st[0]==="b"&&(vnEt||_t===Et&&(!Ie||Zt>=nt)?(b.current.tb=!0,It=gt,Te=-Te,Gt.points=[El(st,0),El(mt,0)]):b.current.tb=!1}var on=tn(Jt),yt=st[1]===mt[1];if(on&&st[1]==="l"&&(rn>He.right||b.current.rl)){var Ht=vt;yt?Ht-=fe-le:Ht=Ue.x-Tt.x-$e;var nn=Cn(Ht,It),Xn=Cn(Ht,It,we);nn>Et||nn===Et&&(!Ie||Xn>=nt)?(b.current.rl=!0,vt=Ht,$e=-$e,Gt.points=[El(st,1),El(mt,1)]):b.current.rl=!1}if(on&&st[1]==="r"&&(EnEt||wr===Et&&(!Ie||$r>=nt)?(b.current.lr=!0,vt=br,$e=-$e,Gt.points=[El(st,1),El(mt,1)]):b.current.lr=!1}rr();var Yn=ot===!0?0:ot;typeof Yn=="number"&&(Enwe.right&&(vt-=rn-we.right-$e,V.x>we.right-Yn&&(vt+=V.x-we.right+Yn)));var Gn=Lt===!0?0:Lt;typeof Gn=="number"&&(vnwe.bottom&&(It-=cn-we.bottom-Te,V.y>we.bottom-Gn&&(It+=V.y-we.bottom+Gn)));var Dr=U.x+vt,Hr=Dr+fe,Nr=U.y+It,On=Nr+he,At=V.x,zt=At+le,un=V.y,Nt=un+me,Pt=Math.max(Dr,At),yn=Math.min(Hr,zt),Ln=(Pt+yn)/2,sr=Ln-Dr,Pr=Math.max(Nr,un),cr=Math.min(On,Nt),kr=(Pr+cr)/2,gn=kr-Nr;c?.(t,Gt);var dt=it.right-U.x-(vt+U.width),Ot=it.bottom-U.y-(It+U.height);Ze===1&&(vt=Math.round(vt),dt=Math.round(dt)),Ye===1&&(It=Math.round(It),Ot=Math.round(Ot));var bn={ready:!0,offsetX:vt/Ze,offsetY:It/Ye,offsetR:dt/Ze,offsetB:Ot/Ye,arrowX:sr/Ze,arrowY:gn/Ye,scaleX:Ze,scaleY:Ye,align:Gt};h(bn)}}),y=function(){v.current+=1;var E=v.current;Promise.resolve().then(function(){v.current===E&&C()})},w=function(){h(function(E){return ee(ee({},E),{},{ready:!1})})};return fn(w,[r]),fn(function(){e||w()},[e]),[d.ready,d.offsetX,d.offsetY,d.offsetR,d.offsetB,d.arrowX,d.arrowY,d.scaleX,d.scaleY,d.align,y]}function EF(e,t,n,r,a){fn(function(){if(e&&t&&n){let v=function(){r(),a()};var o=t,c=n,u=dx(o),f=dx(c),d=Pf(c),h=new Set([d].concat(ke(u),ke(f)));return h.forEach(function(g){g.addEventListener("scroll",v,{passive:!0})}),d.addEventListener("resize",v,{passive:!0}),r(),function(){h.forEach(function(g){g.removeEventListener("scroll",v),d.removeEventListener("resize",v)})}}},[e,t,n])}function _F(e,t,n,r,a,o,c,u){var f=s.useRef(e);f.current=e;var d=s.useRef(!1);s.useEffect(function(){if(t&&r&&(!a||o)){var v=function(){d.current=!1},g=function(y){var w;f.current&&!c(((w=y.composedPath)===null||w===void 0||(w=w.call(y))===null||w===void 0?void 0:w[0])||y.target)&&!d.current&&u(!1)},b=Pf(r);b.addEventListener("pointerdown",v,!0),b.addEventListener("mousedown",g,!0),b.addEventListener("contextmenu",g,!0);var x=vv(n);return x&&(x.addEventListener("mousedown",g,!0),x.addEventListener("contextmenu",g,!0)),function(){b.removeEventListener("pointerdown",v,!0),b.removeEventListener("mousedown",g,!0),b.removeEventListener("contextmenu",g,!0),x&&(x.removeEventListener("mousedown",g,!0),x.removeEventListener("contextmenu",g,!0))}}},[t,n,r,a,o]);function h(){d.current=!0}return h}var OF=["prefixCls","children","action","showAction","hideAction","popupVisible","defaultPopupVisible","onPopupVisibleChange","afterPopupVisibleChange","mouseEnterDelay","mouseLeaveDelay","focusDelay","blurDelay","mask","maskClosable","getPopupContainer","forceRender","autoDestroy","destroyPopupOnHide","popup","popupClassName","popupStyle","popupPlacement","builtinPlacements","popupAlign","zIndex","stretch","getPopupClassNameFromAlign","fresh","alignPoint","onPopupClick","onPopupAlign","arrow","popupMotion","maskMotion","popupTransitionName","popupAnimation","maskTransitionName","maskAnimation","className","getTriggerDOMNode"];function IF(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:vM,t=s.forwardRef(function(n,r){var a=n.prefixCls,o=a===void 0?"rc-trigger-popup":a,c=n.children,u=n.action,f=u===void 0?"hover":u,d=n.showAction,h=n.hideAction,v=n.popupVisible,g=n.defaultPopupVisible,b=n.onPopupVisibleChange,x=n.afterPopupVisibleChange,C=n.mouseEnterDelay,y=n.mouseLeaveDelay,w=y===void 0?.1:y,$=n.focusDelay,E=n.blurDelay,O=n.mask,I=n.maskClosable,j=I===void 0?!0:I,M=n.getPopupContainer,D=n.forceRender,N=n.autoDestroy,P=n.destroyPopupOnHide,A=n.popup,F=n.popupClassName,H=n.popupStyle,k=n.popupPlacement,L=n.builtinPlacements,T=L===void 0?{}:L,z=n.popupAlign,V=n.zIndex,q=n.stretch,G=n.getPopupClassNameFromAlign,B=n.fresh,U=n.alignPoint,K=n.onPopupClick,Y=n.onPopupAlign,Q=n.arrow,Z=n.popupMotion,ae=n.maskMotion,re=n.popupTransitionName,ie=n.popupAnimation,ve=n.maskTransitionName,ue=n.maskAnimation,oe=n.className,he=n.getTriggerDOMNode,fe=Kt(n,OF),me=N||P||!1,le=s.useState(!1),pe=ce(le,2),Ce=pe[0],De=pe[1];fn(function(){De(sg())},[]);var je=s.useRef({}),ge=s.useContext(H2),Ie=s.useMemo(function(){return{registerSubPopup:function(an,fr){je.current[an]=fr,ge?.registerSubPopup(an,fr)}}},[ge]),Ee=PS(),we=s.useState(null),Fe=ce(we,2),He=Fe[0],it=Fe[1],Ze=s.useRef(null),Ye=pn(function(Vt){Ze.current=Vt,tf(Vt)&&He!==Vt&&it(Vt),ge?.registerSubPopup(Ee,Vt)}),et=s.useState(null),Pe=ce(et,2),Oe=Pe[0],Be=Pe[1],$e=s.useRef(null),Te=pn(function(Vt){tf(Vt)&&Oe!==Vt&&(Be(Vt),$e.current=Vt)}),be=s.Children.only(c),ye=be?.props||{},Re={},Ge=pn(function(Vt){var an,fr,Er=Oe;return Er?.contains(Vt)||((an=vv(Er))===null||an===void 0?void 0:an.host)===Vt||Vt===Er||He?.contains(Vt)||((fr=vv(He))===null||fr===void 0?void 0:fr.host)===Vt||Vt===He||Object.values(je.current).some(function(ar){return ar?.contains(Vt)||Vt===ar})}),ft=F2(o,Z,ie,re),$t=F2(o,ae,ue,ve),Qe=s.useState(g||!1),at=ce(Qe,2),mt=at[0],st=at[1],bt=v??mt,qt=pn(function(Vt){v===void 0&&st(Vt)});fn(function(){st(v||!1)},[v]);var Gt=s.useRef(bt);Gt.current=bt;var vt=s.useRef([]);vt.current=[];var It=pn(function(Vt){var an;qt(Vt),((an=vt.current[vt.current.length-1])!==null&&an!==void 0?an:bt)!==Vt&&(vt.current.push(Vt),b?.(Vt))}),Et=s.useRef(),nt=function(){clearTimeout(Et.current)},Ue=function(an){var fr=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;nt(),fr===0?It(an):Et.current=setTimeout(function(){It(an)},fr*1e3)};s.useEffect(function(){return nt},[]);var qe=s.useState(!1),ct=ce(qe,2),Tt=ct[0],Dt=ct[1];fn(function(Vt){(!Vt||bt)&&Dt(!0)},[bt]);var Jt=s.useState(null),ut=ce(Jt,2),ot=ut[0],Lt=ut[1],tn=s.useState(null),vn=ce(tn,2),cn=vn[0],En=vn[1],rn=function(an){En([an.clientX,an.clientY])},Sn=$F(bt,He,U&&cn!==null?cn:Oe,k,T,z,Y),lt=ce(Sn,11),xt=lt[0],Bt=lt[1],kt=lt[2],gt=lt[3],_t=lt[4],Zt=lt[5],on=lt[6],yt=lt[7],Ht=lt[8],nn=lt[9],Xn=lt[10],br=SF(Ce,f,d,h),wr=ce(br,2),$r=wr[0],Yn=wr[1],Gn=$r.has("click"),Dr=Yn.has("click")||Yn.has("contextMenu"),Hr=pn(function(){Tt||Xn()}),Nr=function(){Gt.current&&U&&Dr&&Ue(!1)};EF(bt,Oe,He,Hr,Nr),fn(function(){Hr()},[cn,k]),fn(function(){bt&&!(T!=null&&T[k])&&Hr()},[JSON.stringify(z)]);var On=s.useMemo(function(){var Vt=wF(T,o,nn,U);return se(Vt,G?.(nn))},[nn,G,T,o,U]);s.useImperativeHandle(r,function(){return{nativeElement:$e.current,popupElement:Ze.current,forceAlign:Hr}});var At=s.useState(0),zt=ce(At,2),un=zt[0],Nt=zt[1],Pt=s.useState(0),yn=ce(Pt,2),Ln=yn[0],sr=yn[1],Pr=function(){if(q&&Oe){var an=Oe.getBoundingClientRect();Nt(an.width),sr(an.height)}},cr=function(){Pr(),Hr()},kr=function(an){Dt(!1),Xn(),x?.(an)},gn=function(){return new Promise(function(an){Pr(),Lt(function(){return an})})};fn(function(){ot&&(Xn(),ot(),Lt(null))},[ot]);function dt(Vt,an,fr,Er){Re[Vt]=function(ar){var tl;Er?.(ar),Ue(an,fr);for(var nl=arguments.length,Mu=new Array(nl>1?nl-1:0),bo=1;bo1?fr-1:0),ar=1;ar1?fr-1:0),ar=1;ar1&&arguments[1]!==void 0?arguments[1]:{},n=t.fieldNames,r=t.childrenAsData,a=[],o=kM(n,!1),c=o.label,u=o.value,f=o.options,d=o.groupLabel;function h(v,g){Array.isArray(v)&&v.forEach(function(b){if(g||!(f in b)){var x=b[u];a.push({key:q2(b,a.length),groupOption:g,data:b,label:b[c],value:x})}else{var C=b[d];C===void 0&&r&&(C=b.label),a.push({key:q2(b,a.length),group:!0,data:b,label:C}),h(b[f],!0)}})}return h(e,!1),a}function mx(e){var t=ee({},e);return"props"in t||Object.defineProperty(t,"props",{get:function(){return xr(!1,"Return type is option instead of Option instance. Please read value directly instead of reading from `props`."),t}}),t}var DF=function(t,n,r){if(!n||!n.length)return null;var a=!1,o=function u(f,d){var h=cN(d),v=h[0],g=h.slice(1);if(!v)return[f];var b=f.split(v);return a=a||b.length>1,b.reduce(function(x,C){return[].concat(ke(x),ke(u(C,g)))},[]).filter(Boolean)},c=o(t,n);return a?typeof r<"u"?c.slice(0,r):c:null},HS=s.createContext(null);function PF(e){var t=e.visible,n=e.values;if(!t)return null;var r=50;return s.createElement("span",{"aria-live":"polite",style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0}},"".concat(n.slice(0,r).map(function(a){var o=a.label,c=a.value;return["number","string"].includes(jt(o))?o:c}).join(", ")),n.length>r?", ...":null)}var kF=["id","prefixCls","className","showSearch","tagRender","direction","omitDomProps","displayValues","onDisplayValuesChange","emptyOptions","notFoundContent","onClear","mode","disabled","loading","getInputElement","getRawInputElement","open","defaultOpen","onDropdownVisibleChange","activeValue","onActiveValueChange","activeDescendantId","searchValue","autoClearSearchValue","onSearch","onSearchSplit","tokenSeparators","allowClear","prefix","suffixIcon","clearIcon","OptionList","animation","transitionName","dropdownStyle","dropdownClassName","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","placement","builtinPlacements","getPopupContainer","showAction","onFocus","onBlur","onKeyUp","onKeyDown","onMouseDown"],AF=["value","onChange","removeIcon","placeholder","autoFocus","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown","onPopupScroll","tabIndex"],hx=function(t){return t==="tags"||t==="multiple"},zF=s.forwardRef(function(e,t){var n,r=e.id,a=e.prefixCls,o=e.className,c=e.showSearch,u=e.tagRender,f=e.direction,d=e.omitDomProps,h=e.displayValues,v=e.onDisplayValuesChange,g=e.emptyOptions,b=e.notFoundContent,x=b===void 0?"Not Found":b,C=e.onClear,y=e.mode,w=e.disabled,$=e.loading,E=e.getInputElement,O=e.getRawInputElement,I=e.open,j=e.defaultOpen,M=e.onDropdownVisibleChange,D=e.activeValue,N=e.onActiveValueChange,P=e.activeDescendantId,A=e.searchValue,F=e.autoClearSearchValue,H=e.onSearch,k=e.onSearchSplit,L=e.tokenSeparators,T=e.allowClear,z=e.prefix,V=e.suffixIcon,q=e.clearIcon,G=e.OptionList,B=e.animation,U=e.transitionName,K=e.dropdownStyle,Y=e.dropdownClassName,Q=e.dropdownMatchSelectWidth,Z=e.dropdownRender,ae=e.dropdownAlign,re=e.placement,ie=e.builtinPlacements,ve=e.getPopupContainer,ue=e.showAction,oe=ue===void 0?[]:ue,he=e.onFocus,fe=e.onBlur,me=e.onKeyUp,le=e.onKeyDown,pe=e.onMouseDown,Ce=Kt(e,kF),De=hx(y),je=(c!==void 0?c:De)||y==="combobox",ge=ee({},Ce);AF.forEach(function(At){delete ge[At]}),d?.forEach(function(At){delete ge[At]});var Ie=s.useState(!1),Ee=ce(Ie,2),we=Ee[0],Fe=Ee[1];s.useEffect(function(){Fe(sg())},[]);var He=s.useRef(null),it=s.useRef(null),Ze=s.useRef(null),Ye=s.useRef(null),et=s.useRef(null),Pe=s.useRef(!1),Oe=VB(),Be=ce(Oe,3),$e=Be[0],Te=Be[1],be=Be[2];s.useImperativeHandle(t,function(){var At,zt;return{focus:(At=Ye.current)===null||At===void 0?void 0:At.focus,blur:(zt=Ye.current)===null||zt===void 0?void 0:zt.blur,scrollTo:function(Nt){var Pt;return(Pt=et.current)===null||Pt===void 0?void 0:Pt.scrollTo(Nt)},nativeElement:He.current||it.current}});var ye=s.useMemo(function(){var At;if(y!=="combobox")return A;var zt=(At=h[0])===null||At===void 0?void 0:At.value;return typeof zt=="string"||typeof zt=="number"?String(zt):""},[A,y,h]),Re=y==="combobox"&&typeof E=="function"&&E()||null,Ge=typeof O=="function"&&O(),ft=Fl(it,Ge==null||(n=Ge.props)===null||n===void 0?void 0:n.ref),$t=s.useState(!1),Qe=ce($t,2),at=Qe[0],mt=Qe[1];fn(function(){mt(!0)},[]);var st=Wn(!1,{defaultValue:j,value:I}),bt=ce(st,2),qt=bt[0],Gt=bt[1],vt=at?qt:!1,It=!x&&g;(w||It&&vt&&y==="combobox")&&(vt=!1);var Et=It?!1:vt,nt=s.useCallback(function(At){var zt=At!==void 0?At:!vt;w||(Gt(zt),vt!==zt&&M?.(zt))},[w,vt,Gt,M]),Ue=s.useMemo(function(){return(L||[]).some(function(At){return[` +`,`\r +`].includes(At)})},[L]),qe=s.useContext(HS)||{},ct=qe.maxCount,Tt=qe.rawValues,Dt=function(zt,un,Nt){if(!(De&&fx(ct)&&Tt?.size>=ct)){var Pt=!0,yn=zt;N?.(null);var Ln=DF(zt,L,fx(ct)?ct-Tt.size:void 0),sr=Nt?null:Ln;return y!=="combobox"&&sr&&(yn="",k?.(sr),nt(!1),Pt=!1),H&&ye!==yn&&H(yn,{source:un?"typing":"effect"}),Pt}},Jt=function(zt){!zt||!zt.trim()||H(zt,{source:"submit"})};s.useEffect(function(){!vt&&!De&&y!=="combobox"&&Dt("",!1,!1)},[vt]),s.useEffect(function(){qt&&w&&Gt(!1),w&&!Pe.current&&Te(!1)},[w]);var ut=RM(),ot=ce(ut,2),Lt=ot[0],tn=ot[1],vn=s.useRef(!1),cn=function(zt){var un=Lt(),Nt=zt.key,Pt=Nt==="Enter";if(Pt&&(y!=="combobox"&&zt.preventDefault(),vt||nt(!0)),tn(!!ye),Nt==="Backspace"&&!un&&De&&!ye&&h.length){for(var yn=ke(h),Ln=null,sr=yn.length-1;sr>=0;sr-=1){var Pr=yn[sr];if(!Pr.disabled){yn.splice(sr,1),Ln=Pr;break}}Ln&&v(yn,{type:"remove",values:[Ln]})}for(var cr=arguments.length,kr=new Array(cr>1?cr-1:0),gn=1;gn1?un-1:0),Pt=1;Pt1?Ln-1:0),Pr=1;Pr"u"?"undefined":jt(navigator))==="object"&&/Firefox/i.test(navigator.userAgent);const zM=(function(e,t,n,r){var a=s.useRef(!1),o=s.useRef(null);function c(){clearTimeout(o.current),a.current=!0,o.current=setTimeout(function(){a.current=!1},50)}var u=s.useRef({top:e,bottom:t,left:n,right:r});return u.current.top=e,u.current.bottom=t,u.current.left=n,u.current.right=r,function(f,d){var h=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,v=f?d<0&&u.current.left||d>0&&u.current.right:d<0&&u.current.top||d>0&&u.current.bottom;return h&&v?(clearTimeout(o.current),a.current=!1):(!v||a.current)&&c(),!a.current&&v}});function VF(e,t,n,r,a,o,c){var u=s.useRef(0),f=s.useRef(null),d=s.useRef(null),h=s.useRef(!1),v=zM(t,n,r,a);function g($,E){if(hn.cancel(f.current),!v(!1,E)){var O=$;if(!O._virtualHandled)O._virtualHandled=!0;else return;u.current+=E,d.current=E,Y2||O.preventDefault(),f.current=hn(function(){var I=h.current?10:1;c(u.current*I,!1),u.current=0})}}function b($,E){c(E,!0),Y2||$.preventDefault()}var x=s.useRef(null),C=s.useRef(null);function y($){if(e){hn.cancel(C.current),C.current=hn(function(){x.current=null},2);var E=$.deltaX,O=$.deltaY,I=$.shiftKey,j=E,M=O;(x.current==="sx"||!x.current&&I&&O&&!E)&&(j=O,M=0,x.current="sx");var D=Math.abs(j),N=Math.abs(M);x.current===null&&(x.current=o&&D>N?"x":"y"),x.current==="y"?g($,M):b($,j)}}function w($){e&&(h.current=$.detail===d.current)}return[y,w]}function KF(e,t,n,r){var a=s.useMemo(function(){return[new Map,[]]},[e,n.id,r]),o=ce(a,2),c=o[0],u=o[1],f=function(h){var v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:h,g=c.get(h),b=c.get(v);if(g===void 0||b===void 0)for(var x=e.length,C=u.length;C0&&arguments[0]!==void 0?arguments[0]:!1;h();var x=function(){var w=!1;u.current.forEach(function($,E){if($&&$.offsetParent){var O=$.offsetHeight,I=getComputedStyle($),j=I.marginTop,M=I.marginBottom,D=G2(j),N=G2(M),P=O+D+N;f.current.get(E)!==P&&(f.current.set(E,P),w=!0)}}),w&&c(function($){return $+1})};if(b)x();else{d.current+=1;var C=d.current;Promise.resolve().then(function(){C===d.current&&x()})}}function g(b,x){var C=e(b);u.current.get(C),x?(u.current.set(C,x),v()):u.current.delete(C)}return s.useEffect(function(){return h},[]),[g,v,f.current,o]}var X2=14/15;function qF(e,t,n){var r=s.useRef(!1),a=s.useRef(0),o=s.useRef(0),c=s.useRef(null),u=s.useRef(null),f,d=function(b){if(r.current){var x=Math.ceil(b.touches[0].pageX),C=Math.ceil(b.touches[0].pageY),y=a.current-x,w=o.current-C,$=Math.abs(y)>Math.abs(w);$?a.current=x:o.current=C;var E=n($,$?y:w,!1,b);E&&b.preventDefault(),clearInterval(u.current),E&&(u.current=setInterval(function(){$?y*=X2:w*=X2;var O=Math.floor($?y:w);(!n($,O,!0)||Math.abs(O)<=.1)&&clearInterval(u.current)},16))}},h=function(){r.current=!1,f()},v=function(b){f(),b.touches.length===1&&!r.current&&(r.current=!0,a.current=Math.ceil(b.touches[0].pageX),o.current=Math.ceil(b.touches[0].pageY),c.current=b.target,c.current.addEventListener("touchmove",d,{passive:!1}),c.current.addEventListener("touchend",h,{passive:!0}))};f=function(){c.current&&(c.current.removeEventListener("touchmove",d),c.current.removeEventListener("touchend",h))},fn(function(){return e&&t.current.addEventListener("touchstart",v,{passive:!0}),function(){var g;(g=t.current)===null||g===void 0||g.removeEventListener("touchstart",v),f(),clearInterval(u.current)}},[e])}function Q2(e){return Math.floor(Math.pow(e,.5))}function vx(e,t){var n="touches"in e?e.touches[0]:e;return n[t?"pageX":"pageY"]-window[t?"scrollX":"scrollY"]}function YF(e,t,n){s.useEffect(function(){var r=t.current;if(e&&r){var a=!1,o,c,u=function(){hn.cancel(o)},f=function g(){u(),o=hn(function(){n(c),g()})},d=function(){a=!1,u()},h=function(b){if(!(b.target.draggable||b.button!==0)){var x=b;x._virtualHandled||(x._virtualHandled=!0,a=!0)}},v=function(b){if(a){var x=vx(b,!1),C=r.getBoundingClientRect(),y=C.top,w=C.bottom;if(x<=y){var $=y-x;c=-Q2($),f()}else if(x>=w){var E=x-w;c=Q2(E),f()}else u()}};return r.addEventListener("mousedown",h),r.ownerDocument.addEventListener("mouseup",d),r.ownerDocument.addEventListener("mousemove",v),r.ownerDocument.addEventListener("dragend",d),function(){r.removeEventListener("mousedown",h),r.ownerDocument.removeEventListener("mouseup",d),r.ownerDocument.removeEventListener("mousemove",v),r.ownerDocument.removeEventListener("dragend",d),u()}}},[e])}var GF=10;function XF(e,t,n,r,a,o,c,u){var f=s.useRef(),d=s.useState(null),h=ce(d,2),v=h[0],g=h[1];return fn(function(){if(v&&v.times=0;k-=1){var L=a(t[k]),T=n.get(L);if(T===void 0){$=!0;break}if(H-=T,H<=0)break}switch(I){case"top":O=M-y;break;case"bottom":O=D-w+y;break;default:{var z=e.current.scrollTop,V=z+w;MV&&(E="bottom")}}O!==null&&c(O),O!==v.lastTop&&($=!0)}$&&g(ee(ee({},v),{},{times:v.times+1,targetAlign:E,lastTop:O}))}},[v,e.current]),function(b){if(b==null){u();return}if(hn.cancel(f.current),typeof b=="number")c(b);else if(b&&jt(b)==="object"){var x,C=b.align;"index"in b?x=b.index:x=t.findIndex(function($){return a($)===b.key});var y=b.offset,w=y===void 0?0:y;g({times:0,index:x,offset:w,originAlign:C})}}}var Z2=s.forwardRef(function(e,t){var n=e.prefixCls,r=e.rtl,a=e.scrollOffset,o=e.scrollRange,c=e.onStartMove,u=e.onStopMove,f=e.onScroll,d=e.horizontal,h=e.spinSize,v=e.containerSize,g=e.style,b=e.thumbStyle,x=e.showScrollBar,C=s.useState(!1),y=ce(C,2),w=y[0],$=y[1],E=s.useState(null),O=ce(E,2),I=O[0],j=O[1],M=s.useState(null),D=ce(M,2),N=D[0],P=D[1],A=!r,F=s.useRef(),H=s.useRef(),k=s.useState(x),L=ce(k,2),T=L[0],z=L[1],V=s.useRef(),q=function(){x===!0||x===!1||(clearTimeout(V.current),z(!0),V.current=setTimeout(function(){z(!1)},3e3))},G=o-v||0,B=v-h||0,U=s.useMemo(function(){if(a===0||G===0)return 0;var ue=a/G;return ue*B},[a,G,B]),K=function(oe){oe.stopPropagation(),oe.preventDefault()},Y=s.useRef({top:U,dragging:w,pageY:I,startTop:N});Y.current={top:U,dragging:w,pageY:I,startTop:N};var Q=function(oe){$(!0),j(vx(oe,d)),P(Y.current.top),c(),oe.stopPropagation(),oe.preventDefault()};s.useEffect(function(){var ue=function(me){me.preventDefault()},oe=F.current,he=H.current;return oe.addEventListener("touchstart",ue,{passive:!1}),he.addEventListener("touchstart",Q,{passive:!1}),function(){oe.removeEventListener("touchstart",ue),he.removeEventListener("touchstart",Q)}},[]);var Z=s.useRef();Z.current=G;var ae=s.useRef();ae.current=B,s.useEffect(function(){if(w){var ue,oe=function(me){var le=Y.current,pe=le.dragging,Ce=le.pageY,De=le.startTop;hn.cancel(ue);var je=F.current.getBoundingClientRect(),ge=v/(d?je.width:je.height);if(pe){var Ie=(vx(me,d)-Ce)*ge,Ee=De;!A&&d?Ee-=Ie:Ee+=Ie;var we=Z.current,Fe=ae.current,He=Fe?Ee/Fe:0,it=Math.ceil(He*we);it=Math.max(it,0),it=Math.min(it,we),ue=hn(function(){f(it,d)})}},he=function(){$(!1),u()};return window.addEventListener("mousemove",oe,{passive:!0}),window.addEventListener("touchmove",oe,{passive:!0}),window.addEventListener("mouseup",he,{passive:!0}),window.addEventListener("touchend",he,{passive:!0}),function(){window.removeEventListener("mousemove",oe),window.removeEventListener("touchmove",oe),window.removeEventListener("mouseup",he),window.removeEventListener("touchend",he),hn.cancel(ue)}}},[w]),s.useEffect(function(){return q(),function(){clearTimeout(V.current)}},[a]),s.useImperativeHandle(t,function(){return{delayHidden:q}});var re="".concat(n,"-scrollbar"),ie={position:"absolute",visibility:T?null:"hidden"},ve={position:"absolute",borderRadius:99,background:"var(--rc-virtual-list-scrollbar-bg, rgba(0, 0, 0, 0.5))",cursor:"pointer",userSelect:"none"};return d?(Object.assign(ie,{height:8,left:0,right:0,bottom:0}),Object.assign(ve,X({height:"100%",width:h},A?"left":"right",U))):(Object.assign(ie,X({width:8,top:0,bottom:0},A?"right":"left",0)),Object.assign(ve,{width:"100%",height:h,top:U})),s.createElement("div",{ref:F,className:se(re,X(X(X({},"".concat(re,"-horizontal"),d),"".concat(re,"-vertical"),!d),"".concat(re,"-visible"),T)),style:ee(ee({},ie),g),onMouseDown:K,onMouseMove:q},s.createElement("div",{ref:H,className:se("".concat(re,"-thumb"),X({},"".concat(re,"-thumb-moving"),w)),style:ee(ee({},ve),b),onMouseDown:Q}))}),QF=20;function J2(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=e/t*e;return isNaN(n)&&(n=0),n=Math.max(n,QF),Math.floor(n)}var ZF=["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","direction","scrollWidth","component","onScroll","onVirtualScroll","onVisibleChange","innerProps","extraRender","styles","showScrollBar"],JF=[],e7={overflowY:"auto",overflowAnchor:"none"};function t7(e,t){var n=e.prefixCls,r=n===void 0?"rc-virtual-list":n,a=e.className,o=e.height,c=e.itemHeight,u=e.fullHeight,f=u===void 0?!0:u,d=e.style,h=e.data,v=e.children,g=e.itemKey,b=e.virtual,x=e.direction,C=e.scrollWidth,y=e.component,w=y===void 0?"div":y,$=e.onScroll,E=e.onVirtualScroll,O=e.onVisibleChange,I=e.innerProps,j=e.extraRender,M=e.styles,D=e.showScrollBar,N=D===void 0?"optional":D,P=Kt(e,ZF),A=s.useCallback(function(lt){return typeof g=="function"?g(lt):lt?.[g]},[g]),F=WF(A),H=ce(F,4),k=H[0],L=H[1],T=H[2],z=H[3],V=!!(b!==!1&&o&&c),q=s.useMemo(function(){return Object.values(T.maps).reduce(function(lt,xt){return lt+xt},0)},[T.id,T.maps]),G=V&&h&&(Math.max(c*h.length,q)>o||!!C),B=x==="rtl",U=se(r,X({},"".concat(r,"-rtl"),B),a),K=h||JF,Y=s.useRef(),Q=s.useRef(),Z=s.useRef(),ae=s.useState(0),re=ce(ae,2),ie=re[0],ve=re[1],ue=s.useState(0),oe=ce(ue,2),he=oe[0],fe=oe[1],me=s.useState(!1),le=ce(me,2),pe=le[0],Ce=le[1],De=function(){Ce(!0)},je=function(){Ce(!1)},ge={getKey:A};function Ie(lt){ve(function(xt){var Bt;typeof lt=="function"?Bt=lt(xt):Bt=lt;var kt=mt(Bt);return Y.current.scrollTop=kt,kt})}var Ee=s.useRef({start:0,end:K.length}),we=s.useRef(),Fe=FF(K,A),He=ce(Fe,1),it=He[0];we.current=it;var Ze=s.useMemo(function(){if(!V)return{scrollHeight:void 0,start:0,end:K.length-1,offset:void 0};if(!G){var lt;return{scrollHeight:((lt=Q.current)===null||lt===void 0?void 0:lt.offsetHeight)||0,start:0,end:K.length-1,offset:void 0}}for(var xt=0,Bt,kt,gt,_t=K.length,Zt=0;Zt<_t;Zt+=1){var on=K[Zt],yt=A(on),Ht=T.get(yt),nn=xt+(Ht===void 0?c:Ht);nn>=ie&&Bt===void 0&&(Bt=Zt,kt=xt),nn>ie+o&>===void 0&&(gt=Zt),xt=nn}return Bt===void 0&&(Bt=0,kt=0,gt=Math.ceil(o/c)),gt===void 0&&(gt=K.length-1),gt=Math.min(gt+1,K.length-1),{scrollHeight:xt,start:Bt,end:gt,offset:kt}},[G,V,ie,K,z,o]),Ye=Ze.scrollHeight,et=Ze.start,Pe=Ze.end,Oe=Ze.offset;Ee.current.start=et,Ee.current.end=Pe,s.useLayoutEffect(function(){var lt=T.getRecord();if(lt.size===1){var xt=Array.from(lt.keys())[0],Bt=lt.get(xt),kt=K[et];if(kt&&Bt===void 0){var gt=A(kt);if(gt===xt){var _t=T.get(xt),Zt=_t-c;Ie(function(on){return on+Zt})}}}T.resetRecord()},[Ye]);var Be=s.useState({width:0,height:o}),$e=ce(Be,2),Te=$e[0],be=$e[1],ye=function(xt){be({width:xt.offsetWidth,height:xt.offsetHeight})},Re=s.useRef(),Ge=s.useRef(),ft=s.useMemo(function(){return J2(Te.width,C)},[Te.width,C]),$t=s.useMemo(function(){return J2(Te.height,Ye)},[Te.height,Ye]),Qe=Ye-o,at=s.useRef(Qe);at.current=Qe;function mt(lt){var xt=lt;return Number.isNaN(at.current)||(xt=Math.min(xt,at.current)),xt=Math.max(xt,0),xt}var st=ie<=0,bt=ie>=Qe,qt=he<=0,Gt=he>=C,vt=zM(st,bt,qt,Gt),It=function(){return{x:B?-he:he,y:ie}},Et=s.useRef(It()),nt=pn(function(lt){if(E){var xt=ee(ee({},It()),lt);(Et.current.x!==xt.x||Et.current.y!==xt.y)&&(E(xt),Et.current=xt)}});function Ue(lt,xt){var Bt=lt;xt?(Li.flushSync(function(){fe(Bt)}),nt()):Ie(Bt)}function qe(lt){var xt=lt.currentTarget.scrollTop;xt!==ie&&Ie(xt),$?.(lt),nt()}var ct=function(xt){var Bt=xt,kt=C?C-Te.width:0;return Bt=Math.max(Bt,0),Bt=Math.min(Bt,kt),Bt},Tt=pn(function(lt,xt){xt?(Li.flushSync(function(){fe(function(Bt){var kt=Bt+(B?-lt:lt);return ct(kt)})}),nt()):Ie(function(Bt){var kt=Bt+lt;return kt})}),Dt=VF(V,st,bt,qt,Gt,!!C,Tt),Jt=ce(Dt,2),ut=Jt[0],ot=Jt[1];qF(V,Y,function(lt,xt,Bt,kt){var gt=kt;return vt(lt,xt,Bt)?!1:!gt||!gt._virtualHandled?(gt&&(gt._virtualHandled=!0),ut({preventDefault:function(){},deltaX:lt?xt:0,deltaY:lt?0:xt}),!0):!1}),YF(G,Y,function(lt){Ie(function(xt){return xt+lt})}),fn(function(){function lt(Bt){var kt=st&&Bt.detail<0,gt=bt&&Bt.detail>0;V&&!kt&&!gt&&Bt.preventDefault()}var xt=Y.current;return xt.addEventListener("wheel",ut,{passive:!1}),xt.addEventListener("DOMMouseScroll",ot,{passive:!0}),xt.addEventListener("MozMousePixelScroll",lt,{passive:!1}),function(){xt.removeEventListener("wheel",ut),xt.removeEventListener("DOMMouseScroll",ot),xt.removeEventListener("MozMousePixelScroll",lt)}},[V,st,bt]),fn(function(){if(C){var lt=ct(he);fe(lt),nt({x:lt})}},[Te.width,C]);var Lt=function(){var xt,Bt;(xt=Re.current)===null||xt===void 0||xt.delayHidden(),(Bt=Ge.current)===null||Bt===void 0||Bt.delayHidden()},tn=XF(Y,K,T,c,A,function(){return L(!0)},Ie,Lt);s.useImperativeHandle(t,function(){return{nativeElement:Z.current,getScrollInfo:It,scrollTo:function(xt){function Bt(kt){return kt&&jt(kt)==="object"&&("left"in kt||"top"in kt)}Bt(xt)?(xt.left!==void 0&&fe(ct(xt.left)),tn(xt.top)):tn(xt)}}}),fn(function(){if(O){var lt=K.slice(et,Pe+1);O(lt,K)}},[et,Pe,K]);var vn=KF(K,A,T,c),cn=j?.({start:et,end:Pe,virtual:G,offsetX:he,offsetY:Oe,rtl:B,getSize:vn}),En=HF(K,et,Pe,C,he,k,v,ge),rn=null;o&&(rn=ee(X({},f?"height":"maxHeight",o),e7),V&&(rn.overflowY="hidden",C&&(rn.overflowX="hidden"),pe&&(rn.pointerEvents="none")));var Sn={};return B&&(Sn.dir="rtl"),s.createElement("div",Me({ref:Z,style:ee(ee({},d),{},{position:"relative"}),className:U},Sn,P),s.createElement(Ca,{onResize:ye},s.createElement(w,{className:"".concat(r,"-holder"),style:rn,ref:Y,onScroll:qe,onMouseEnter:Lt},s.createElement(AM,{prefixCls:r,height:Ye,offsetX:he,offsetY:Oe,scrollWidth:C,onInnerResize:L,ref:Q,innerProps:I,rtl:B,extra:cn},En))),G&&Ye>o&&s.createElement(Z2,{ref:Re,prefixCls:r,scrollOffset:ie,scrollRange:Ye,rtl:B,onScroll:Ue,onStartMove:De,onStopMove:je,spinSize:$t,containerSize:Te.height,style:M?.verticalScrollBar,thumbStyle:M?.verticalScrollBarThumb,showScrollBar:N}),G&&C>Te.width&&s.createElement(Z2,{ref:Ge,prefixCls:r,scrollOffset:he,scrollRange:C,rtl:B,onScroll:Ue,onStartMove:De,onStopMove:je,spinSize:ft,containerSize:Te.width,horizontal:!0,style:M?.horizontalScrollBar,thumbStyle:M?.horizontalScrollBarThumb,showScrollBar:N}))}var ug=s.forwardRef(t7);ug.displayName="List";function n7(){return/(mac\sos|macintosh)/i.test(navigator.appVersion)}var r7=["disabled","title","children","style","className"];function eO(e){return typeof e=="string"||typeof e=="number"}var a7=function(t,n){var r=FB(),a=r.prefixCls,o=r.id,c=r.open,u=r.multiple,f=r.mode,d=r.searchValue,h=r.toggleOpen,v=r.notFoundContent,g=r.onPopupScroll,b=s.useContext(HS),x=b.maxCount,C=b.flattenOptions,y=b.onActiveValue,w=b.defaultActiveFirstOption,$=b.onSelect,E=b.menuItemSelectedIcon,O=b.rawValues,I=b.fieldNames,j=b.virtual,M=b.direction,D=b.listHeight,N=b.listItemHeight,P=b.optionRender,A="".concat(a,"-item"),F=Ds(function(){return C},[c,C],function(ue,oe){return oe[0]&&ue[1]!==oe[1]}),H=s.useRef(null),k=s.useMemo(function(){return u&&fx(x)&&O?.size>=x},[u,x,O?.size]),L=function(oe){oe.preventDefault()},T=function(oe){var he;(he=H.current)===null||he===void 0||he.scrollTo(typeof oe=="number"?{index:oe}:oe)},z=s.useCallback(function(ue){return f==="combobox"?!1:O.has(ue)},[f,ke(O).toString(),O.size]),V=function(oe){for(var he=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,fe=F.length,me=0;me1&&arguments[1]!==void 0?arguments[1]:!1;U(oe);var fe={source:he?"keyboard":"mouse"},me=F[oe];if(!me){y(null,-1,fe);return}y(me.value,oe,fe)};s.useEffect(function(){K(w!==!1?V(0):-1)},[F.length,d]);var Y=s.useCallback(function(ue){return f==="combobox"?String(ue).toLowerCase()===d.toLowerCase():O.has(ue)},[f,d,ke(O).toString(),O.size]);s.useEffect(function(){var ue=setTimeout(function(){if(!u&&c&&O.size===1){var he=Array.from(O)[0],fe=F.findIndex(function(me){var le=me.data;return d?String(le.value).startsWith(d):le.value===he});fe!==-1&&(K(fe),T(fe))}});if(c){var oe;(oe=H.current)===null||oe===void 0||oe.scrollTo(void 0)}return function(){return clearTimeout(ue)}},[c,d]);var Q=function(oe){oe!==void 0&&$(oe,{selected:!O.has(oe)}),u||h(!1)};if(s.useImperativeHandle(n,function(){return{onKeyDown:function(oe){var he=oe.which,fe=oe.ctrlKey;switch(he){case Mt.N:case Mt.P:case Mt.UP:case Mt.DOWN:{var me=0;if(he===Mt.UP?me=-1:he===Mt.DOWN?me=1:n7()&&fe&&(he===Mt.N?me=1:he===Mt.P&&(me=-1)),me!==0){var le=V(B+me,me);T(le),K(le,!0)}break}case Mt.TAB:case Mt.ENTER:{var pe,Ce=F[B];Ce&&!(Ce!=null&&(pe=Ce.data)!==null&&pe!==void 0&&pe.disabled)&&!k?Q(Ce.value):Q(void 0),c&&oe.preventDefault();break}case Mt.ESC:h(!1),c&&oe.stopPropagation()}},onKeyUp:function(){},scrollTo:function(oe){T(oe)}}}),F.length===0)return s.createElement("div",{role:"listbox",id:"".concat(o,"_list"),className:"".concat(A,"-empty"),onMouseDown:L},v);var Z=Object.keys(I).map(function(ue){return I[ue]}),ae=function(oe){return oe.label};function re(ue,oe){var he=ue.group;return{role:he?"presentation":"option",id:"".concat(o,"_list_").concat(oe)}}var ie=function(oe){var he=F[oe];if(!he)return null;var fe=he.data||{},me=fe.value,le=he.group,pe=ma(fe,!0),Ce=ae(he);return he?s.createElement("div",Me({"aria-label":typeof Ce=="string"&&!le?Ce:null},pe,{key:oe},re(he,oe),{"aria-selected":Y(me)}),me):null},ve={role:"listbox",id:"".concat(o,"_list")};return s.createElement(s.Fragment,null,j&&s.createElement("div",Me({},ve,{style:{height:0,width:0,overflow:"hidden"}}),ie(B-1),ie(B),ie(B+1)),s.createElement(ug,{itemKey:"key",ref:H,data:F,height:D,itemHeight:N,fullHeight:!1,onMouseDown:L,onScroll:g,virtual:j,direction:M,innerProps:j?null:ve},function(ue,oe){var he=ue.group,fe=ue.groupOption,me=ue.data,le=ue.label,pe=ue.value,Ce=me.key;if(he){var De,je=(De=me.title)!==null&&De!==void 0?De:eO(le)?le.toString():void 0;return s.createElement("div",{className:se(A,"".concat(A,"-group"),me.className),title:je},le!==void 0?le:Ce)}var ge=me.disabled,Ie=me.title;me.children;var Ee=me.style,we=me.className,Fe=Kt(me,r7),He=lr(Fe,Z),it=z(pe),Ze=ge||!it&&k,Ye="".concat(A,"-option"),et=se(A,Ye,we,X(X(X(X({},"".concat(Ye,"-grouped"),fe),"".concat(Ye,"-active"),B===oe&&!Ze),"".concat(Ye,"-disabled"),Ze),"".concat(Ye,"-selected"),it)),Pe=ae(ue),Oe=!E||typeof E=="function"||it,Be=typeof Pe=="number"?Pe:Pe||pe,$e=eO(Be)?Be.toString():void 0;return Ie!==void 0&&($e=Ie),s.createElement("div",Me({},ma(He),j?{}:re(ue,oe),{"aria-selected":Y(pe),className:et,title:$e,onMouseMove:function(){B===oe||Ze||K(oe)},onClick:function(){Ze||Q(pe)},style:Ee}),s.createElement("div",{className:"".concat(Ye,"-content")},typeof P=="function"?P(ue,{index:oe}):Be),s.isValidElement(E)||it,Oe&&s.createElement(cg,{className:"".concat(A,"-option-state"),customizeIcon:E,customizeIconProps:{value:pe,disabled:Ze,isSelected:it}},it?"✓":null))}))},i7=s.forwardRef(a7);const o7=(function(e,t){var n=s.useRef({values:new Map,options:new Map}),r=s.useMemo(function(){var o=n.current,c=o.values,u=o.options,f=e.map(function(v){if(v.label===void 0){var g;return ee(ee({},v),{},{label:(g=c.get(v.value))===null||g===void 0?void 0:g.label})}return v}),d=new Map,h=new Map;return f.forEach(function(v){d.set(v.value,v),h.set(v.value,t.get(v.value)||u.get(v.value))}),n.current.values=d,n.current.options=h,f},[e,t]),a=s.useCallback(function(o){return t.get(o)||n.current.options.get(o)},[t]);return[r,a]});function _y(e,t){return DM(e).join("").toUpperCase().includes(t)}const l7=(function(e,t,n,r,a){return s.useMemo(function(){if(!n||r===!1)return e;var o=t.options,c=t.label,u=t.value,f=[],d=typeof r=="function",h=n.toUpperCase(),v=d?r:function(b,x){return a?_y(x[a],h):x[o]?_y(x[c!=="children"?c:"label"],h):_y(x[u],h)},g=d?function(b){return mx(b)}:function(b){return b};return e.forEach(function(b){if(b[o]){var x=v(n,g(b));if(x)f.push(b);else{var C=b[o].filter(function(y){return v(n,g(y))});C.length&&f.push(ee(ee({},b),{},X({},o,C)))}return}v(n,g(b))&&f.push(b)}),f},[e,r,a,n,t])});var tO=0,s7=wa();function c7(){var e;return s7?(e=tO,tO+=1):e="TEST_OR_SSR",e}function u7(e){var t=s.useState(),n=ce(t,2),r=n[0],a=n[1];return s.useEffect(function(){a("rc_select_".concat(c7()))},[]),e||r}var d7=["children","value"],f7=["children"];function m7(e){var t=e,n=t.key,r=t.props,a=r.children,o=r.value,c=Kt(r,d7);return ee({key:n,value:o!==void 0?o:n,children:a},c)}function LM(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return Ma(e).map(function(n,r){if(!s.isValidElement(n)||!n.type)return null;var a=n,o=a.type.isSelectOptGroup,c=a.key,u=a.props,f=u.children,d=Kt(u,f7);return t||!o?m7(n):ee(ee({key:"__RC_SELECT_GRP__".concat(c===null?r:c,"__"),label:c},d),{},{options:LM(f)})}).filter(function(n){return n})}var h7=function(t,n,r,a,o){return s.useMemo(function(){var c=t,u=!t;u&&(c=LM(n));var f=new Map,d=new Map,h=function(b,x,C){C&&typeof C=="string"&&b.set(x[C],x)},v=function g(b){for(var x=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,C=0;C0?nt(ct.options):ct.options}):ct})},Be=s.useMemo(function(){return $?Oe(Pe):Pe},[Pe,$,ve]),$e=s.useMemo(function(){return TF(Be,{fieldNames:ae,childrenAsData:Q})},[Be,ae,Q]),Te=function(Ue){var qe=le(Ue);if(je(qe),G&&(qe.length!==we.length||qe.some(function(Dt,Jt){var ut;return((ut=we[Jt])===null||ut===void 0?void 0:ut.value)!==Dt?.value}))){var ct=q?qe:qe.map(function(Dt){return Dt.value}),Tt=qe.map(function(Dt){return mx(Fe(Dt.value))});G(Y?ct:ct[0],Y?Tt:Tt[0])}},be=s.useState(null),ye=ce(be,2),Re=ye[0],Ge=ye[1],ft=s.useState(0),$t=ce(ft,2),Qe=$t[0],at=$t[1],mt=D!==void 0?D:r!=="combobox",st=s.useCallback(function(nt,Ue){var qe=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},ct=qe.source,Tt=ct===void 0?"keyboard":ct;at(Ue),c&&r==="combobox"&&nt!==null&&Tt==="keyboard"&&Ge(String(nt))},[c,r]),bt=function(Ue,qe,ct){var Tt=function(){var rn,Sn=Fe(Ue);return[q?{label:Sn?.[ae.label],value:Ue,key:(rn=Sn?.key)!==null&&rn!==void 0?rn:Ue}:Ue,mx(Sn)]};if(qe&&b){var Dt=Tt(),Jt=ce(Dt,2),ut=Jt[0],ot=Jt[1];b(ut,ot)}else if(!qe&&x&&ct!=="clear"){var Lt=Tt(),tn=ce(Lt,2),vn=tn[0],cn=tn[1];x(vn,cn)}},qt=nO(function(nt,Ue){var qe,ct=Y?Ue.selected:!0;ct?qe=Y?[].concat(ke(we),[nt]):[nt]:qe=we.filter(function(Tt){return Tt.value!==nt}),Te(qe),bt(nt,ct),r==="combobox"?Ge(""):(!hx||g)&&(ue(""),Ge(""))}),Gt=function(Ue,qe){Te(Ue);var ct=qe.type,Tt=qe.values;(ct==="remove"||ct==="clear")&&Tt.forEach(function(Dt){bt(Dt.value,!1,ct)})},vt=function(Ue,qe){if(ue(Ue),Ge(null),qe.source==="submit"){var ct=(Ue||"").trim();if(ct){var Tt=Array.from(new Set([].concat(ke(it),[ct])));Te(Tt),bt(ct,!0),ue("")}return}qe.source!=="blur"&&(r==="combobox"&&Te(Ue),h?.(Ue))},It=function(Ue){var qe=Ue;r!=="tags"&&(qe=Ue.map(function(Tt){var Dt=fe.get(Tt);return Dt?.value}).filter(function(Tt){return Tt!==void 0}));var ct=Array.from(new Set([].concat(ke(it),ke(qe))));Te(ct),ct.forEach(function(Tt){bt(Tt,!0)})},Et=s.useMemo(function(){var nt=P!==!1&&y!==!1;return ee(ee({},oe),{},{flattenOptions:$e,onActiveValue:st,defaultActiveFirstOption:mt,onSelect:qt,menuItemSelectedIcon:N,rawValues:it,fieldNames:ae,virtual:nt,direction:A,listHeight:H,listItemHeight:L,childrenAsData:Q,maxCount:B,optionRender:j})},[B,oe,$e,st,mt,qt,N,it,ae,P,y,A,H,L,Q,j]);return s.createElement(HS.Provider,{value:Et},s.createElement(zF,Me({},U,{id:K,prefixCls:o,ref:t,omitDomProps:g7,mode:r,displayValues:He,onDisplayValuesChange:Gt,direction:A,searchValue:ve,onSearch:vt,autoClearSearchValue:g,onSearchSplit:It,dropdownMatchSelectWidth:y,OptionList:i7,emptyOptions:!$e.length,activeValue:Re,activeDescendantId:"".concat(K,"_list_").concat(Qe)})))}),VS=b7;VS.Option=FS;VS.OptGroup=BS;function Hl(e,t,n){return se({[`${e}-status-success`]:t==="success",[`${e}-status-warning`]:t==="warning",[`${e}-status-error`]:t==="error",[`${e}-status-validating`]:t==="validating",[`${e}-has-feedback`]:n})}const Ps=(e,t)=>t||e,y7=()=>{const[,e]=Ta(),[t]=ho("Empty"),r=new Pn(e.colorBgBase).toHsl().l<.5?{opacity:.65}:{};return s.createElement("svg",{style:r,width:"184",height:"152",viewBox:"0 0 184 152",xmlns:"http://www.w3.org/2000/svg"},s.createElement("title",null,t?.description||"Empty"),s.createElement("g",{fill:"none",fillRule:"evenodd"},s.createElement("g",{transform:"translate(24 31.67)"},s.createElement("ellipse",{fillOpacity:".8",fill:"#F5F5F7",cx:"67.797",cy:"106.89",rx:"67.797",ry:"12.668"}),s.createElement("path",{d:"M122.034 69.674L98.109 40.229c-1.148-1.386-2.826-2.225-4.593-2.225h-51.44c-1.766 0-3.444.839-4.592 2.225L13.56 69.674v15.383h108.475V69.674z",fill:"#AEB8C2"}),s.createElement("path",{d:"M101.537 86.214L80.63 61.102c-1.001-1.207-2.507-1.867-4.048-1.867H31.724c-1.54 0-3.047.66-4.048 1.867L6.769 86.214v13.792h94.768V86.214z",fill:"url(#linearGradient-1)",transform:"translate(13.56)"}),s.createElement("path",{d:"M33.83 0h67.933a4 4 0 0 1 4 4v93.344a4 4 0 0 1-4 4H33.83a4 4 0 0 1-4-4V4a4 4 0 0 1 4-4z",fill:"#F5F5F7"}),s.createElement("path",{d:"M42.678 9.953h50.237a2 2 0 0 1 2 2V36.91a2 2 0 0 1-2 2H42.678a2 2 0 0 1-2-2V11.953a2 2 0 0 1 2-2zM42.94 49.767h49.713a2.262 2.262 0 1 1 0 4.524H42.94a2.262 2.262 0 0 1 0-4.524zM42.94 61.53h49.713a2.262 2.262 0 1 1 0 4.525H42.94a2.262 2.262 0 0 1 0-4.525zM121.813 105.032c-.775 3.071-3.497 5.36-6.735 5.36H20.515c-3.238 0-5.96-2.29-6.734-5.36a7.309 7.309 0 0 1-.222-1.79V69.675h26.318c2.907 0 5.25 2.448 5.25 5.42v.04c0 2.971 2.37 5.37 5.277 5.37h34.785c2.907 0 5.277-2.421 5.277-5.393V75.1c0-2.972 2.343-5.426 5.25-5.426h26.318v33.569c0 .617-.077 1.216-.221 1.789z",fill:"#DCE0E6"})),s.createElement("path",{d:"M149.121 33.292l-6.83 2.65a1 1 0 0 1-1.317-1.23l1.937-6.207c-2.589-2.944-4.109-6.534-4.109-10.408C138.802 8.102 148.92 0 161.402 0 173.881 0 184 8.102 184 18.097c0 9.995-10.118 18.097-22.599 18.097-4.528 0-8.744-1.066-12.28-2.902z",fill:"#DCE0E6"}),s.createElement("g",{transform:"translate(149.65 15.383)",fill:"#FFF"},s.createElement("ellipse",{cx:"20.654",cy:"3.167",rx:"2.849",ry:"2.815"}),s.createElement("path",{d:"M5.698 5.63H0L2.898.704zM9.259.704h4.985V5.63H9.259z"}))))},x7=()=>{const[,e]=Ta(),[t]=ho("Empty"),{colorFill:n,colorFillTertiary:r,colorFillQuaternary:a,colorBgContainer:o}=e,{borderColor:c,shadowColor:u,contentColor:f}=s.useMemo(()=>({borderColor:new Pn(n).onBackground(o).toHexString(),shadowColor:new Pn(r).onBackground(o).toHexString(),contentColor:new Pn(a).onBackground(o).toHexString()}),[n,r,a,o]);return s.createElement("svg",{width:"64",height:"41",viewBox:"0 0 64 41",xmlns:"http://www.w3.org/2000/svg"},s.createElement("title",null,t?.description||"Empty"),s.createElement("g",{transform:"translate(0 1)",fill:"none",fillRule:"evenodd"},s.createElement("ellipse",{fill:u,cx:"32",cy:"33",rx:"32",ry:"7"}),s.createElement("g",{fillRule:"nonzero",stroke:c},s.createElement("path",{d:"M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z"}),s.createElement("path",{d:"M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z",fill:f}))))},S7=e=>{const{componentCls:t,margin:n,marginXS:r,marginXL:a,fontSize:o,lineHeight:c}=e;return{[t]:{marginInline:r,fontSize:o,lineHeight:c,textAlign:"center",[`${t}-image`]:{height:e.emptyImgHeight,marginBottom:r,opacity:e.opacityImage,img:{height:"100%"},svg:{maxWidth:"100%",height:"100%",margin:"auto"}},[`${t}-description`]:{color:e.colorTextDescription},[`${t}-footer`]:{marginTop:n},"&-normal":{marginBlock:a,color:e.colorTextDescription,[`${t}-description`]:{color:e.colorTextDescription},[`${t}-image`]:{height:e.emptyImgHeightMD}},"&-small":{marginBlock:r,color:e.colorTextDescription,[`${t}-image`]:{height:e.emptyImgHeightSM}}}}},C7=Kn("Empty",e=>{const{componentCls:t,controlHeightLG:n,calc:r}=e,a=xn(e,{emptyImgCls:`${t}-img`,emptyImgHeight:r(n).mul(2.5).equal(),emptyImgHeightMD:n,emptyImgHeightSM:r(n).mul(.875).equal()});return S7(a)});var w7=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,r=Object.getOwnPropertySymbols(e);a{var t;const{className:n,rootClassName:r,prefixCls:a,image:o,description:c,children:u,imageStyle:f,style:d,classNames:h,styles:v}=e,g=w7(e,["className","rootClassName","prefixCls","image","description","children","imageStyle","style","classNames","styles"]),{getPrefixCls:b,direction:x,className:C,style:y,classNames:w,styles:$,image:E}=ga("empty"),O=b("empty",a),[I,j,M]=C7(O),[D]=ho("Empty"),N=typeof c<"u"?c:D?.description,P=typeof N=="string"?N:"empty",A=(t=o??E)!==null&&t!==void 0?t:HM;let F=null;return typeof A=="string"?F=s.createElement("img",{draggable:!1,alt:P,src:A}):F=A,I(s.createElement("div",Object.assign({className:se(j,M,O,C,{[`${O}-normal`]:A===BM,[`${O}-rtl`]:x==="rtl"},n,r,w.root,h?.root),style:Object.assign(Object.assign(Object.assign(Object.assign({},$.root),y),v?.root),d)},g),s.createElement("div",{className:se(`${O}-image`,w.image,h?.image),style:Object.assign(Object.assign(Object.assign({},f),$.image),v?.image)},F),N&&s.createElement("div",{className:se(`${O}-description`,w.description,h?.description),style:Object.assign(Object.assign({},$.description),v?.description)},N),u&&s.createElement("div",{className:se(`${O}-footer`,w.footer,h?.footer),style:Object.assign(Object.assign({},$.footer),v?.footer)},u)))};Ao.PRESENTED_IMAGE_DEFAULT=HM;Ao.PRESENTED_IMAGE_SIMPLE=BM;const KS=e=>{const{componentName:t}=e,{getPrefixCls:n}=s.useContext(Wt),r=n("empty");switch(t){case"Table":case"List":return Se.createElement(Ao,{image:Ao.PRESENTED_IMAGE_SIMPLE});case"Select":case"TreeSelect":case"Cascader":case"Transfer":case"Mentions":return Se.createElement(Ao,{image:Ao.PRESENTED_IMAGE_SIMPLE,className:`${r}-small`});case"Table.filter":return null;default:return Se.createElement(Ao,null)}},ks=(e,t,n=void 0)=>{var r,a;const{variant:o,[e]:c}=s.useContext(Wt),u=s.useContext(_M),f=c?.variant;let d;typeof t<"u"?d=t:n===!1?d="borderless":d=(a=(r=u??f)!==null&&r!==void 0?r:o)!==null&&a!==void 0?a:"outlined";const h=GA.includes(d);return[d,h]},$7=e=>{const n={overflow:{adjustX:!0,adjustY:!0,shiftY:!0},htmlRegion:e==="scroll"?"scroll":"visible",dynamicInset:!0};return{bottomLeft:Object.assign(Object.assign({},n),{points:["tl","bl"],offset:[0,4]}),bottomRight:Object.assign(Object.assign({},n),{points:["tr","br"],offset:[0,4]}),topLeft:Object.assign(Object.assign({},n),{points:["bl","tl"],offset:[0,-4]}),topRight:Object.assign(Object.assign({},n),{points:["br","tr"],offset:[0,-4]})}};function E7(e,t){return e||$7(t)}const rO=e=>{const{optionHeight:t,optionFontSize:n,optionLineHeight:r,optionPadding:a}=e;return{position:"relative",display:"block",minHeight:t,padding:a,color:e.colorText,fontWeight:"normal",fontSize:n,lineHeight:r,boxSizing:"border-box"}},_7=e=>{const{antCls:t,componentCls:n}=e,r=`${n}-item`,a=`&${t}-slide-up-enter${t}-slide-up-enter-active`,o=`&${t}-slide-up-appear${t}-slide-up-appear-active`,c=`&${t}-slide-up-leave${t}-slide-up-leave-active`,u=`${n}-dropdown-placement-`,f=`${r}-option-selected`;return[{[`${n}-dropdown`]:Object.assign(Object.assign({},zn(e)),{position:"absolute",top:-9999,zIndex:e.zIndexPopup,boxSizing:"border-box",padding:e.paddingXXS,overflow:"hidden",fontSize:e.fontSize,fontVariant:"initial",backgroundColor:e.colorBgElevated,borderRadius:e.borderRadiusLG,outline:"none",boxShadow:e.boxShadowSecondary,[` + ${a}${u}bottomLeft, + ${o}${u}bottomLeft + `]:{animationName:Gv},[` + ${a}${u}topLeft, + ${o}${u}topLeft, + ${a}${u}topRight, + ${o}${u}topRight + `]:{animationName:Qv},[`${c}${u}bottomLeft`]:{animationName:Xv},[` + ${c}${u}topLeft, + ${c}${u}topRight + `]:{animationName:Zv},"&-hidden":{display:"none"},[r]:Object.assign(Object.assign({},rO(e)),{cursor:"pointer",transition:`background ${e.motionDurationSlow} ease`,borderRadius:e.borderRadiusSM,"&-group":{color:e.colorTextDescription,fontSize:e.fontSizeSM,cursor:"default"},"&-option":{display:"flex","&-content":Object.assign({flex:"auto"},Bi),"&-state":{flex:"none",display:"flex",alignItems:"center"},[`&-active:not(${r}-option-disabled)`]:{backgroundColor:e.optionActiveBg},[`&-selected:not(${r}-option-disabled)`]:{color:e.optionSelectedColor,fontWeight:e.optionSelectedFontWeight,backgroundColor:e.optionSelectedBg,[`${r}-option-state`]:{color:e.colorPrimary}},"&-disabled":{[`&${r}-option-selected`]:{backgroundColor:e.colorBgContainerDisabled},color:e.colorTextDisabled,cursor:"not-allowed"},"&-grouped":{paddingInlineStart:e.calc(e.controlPaddingHorizontal).mul(2).equal()}},"&-empty":Object.assign(Object.assign({},rO(e)),{color:e.colorTextDisabled})}),[`${f}:has(+ ${f})`]:{borderEndStartRadius:0,borderEndEndRadius:0,[`& + ${f}`]:{borderStartStartRadius:0,borderStartEndRadius:0}},"&-rtl":{direction:"rtl"}})},co(e,"slide-up"),co(e,"slide-down"),au(e,"move-up"),au(e,"move-down")]},FM=e=>{const{multipleSelectItemHeight:t,paddingXXS:n,lineWidth:r,INTERNAL_FIXED_ITEM_MARGIN:a}=e,o=e.max(e.calc(n).sub(r).equal(),0),c=e.max(e.calc(o).sub(a).equal(),0);return{basePadding:o,containerPadding:c,itemHeight:te(t),itemLineHeight:te(e.calc(t).sub(e.calc(e.lineWidth).mul(2)).equal())}},O7=e=>{const{multipleSelectItemHeight:t,selectHeight:n,lineWidth:r}=e;return e.calc(n).sub(t).div(2).sub(r).equal()},VM=e=>{const{componentCls:t,iconCls:n,borderRadiusSM:r,motionDurationSlow:a,paddingXS:o,multipleItemColorDisabled:c,multipleItemBorderColorDisabled:u,colorIcon:f,colorIconHover:d,INTERNAL_FIXED_ITEM_MARGIN:h}=e;return{[`${t}-selection-overflow`]:{position:"relative",display:"flex",flex:"auto",flexWrap:"wrap",maxWidth:"100%","&-item":{flex:"none",alignSelf:"center",maxWidth:"calc(100% - 4px)",display:"inline-flex"},[`${t}-selection-item`]:{display:"flex",alignSelf:"center",flex:"none",boxSizing:"border-box",maxWidth:"100%",marginBlock:h,borderRadius:r,cursor:"default",transition:`font-size ${a}, line-height ${a}, height ${a}`,marginInlineEnd:e.calc(h).mul(2).equal(),paddingInlineStart:o,paddingInlineEnd:e.calc(o).div(2).equal(),[`${t}-disabled&`]:{color:c,borderColor:u,cursor:"not-allowed"},"&-content":{display:"inline-block",marginInlineEnd:e.calc(o).div(2).equal(),overflow:"hidden",whiteSpace:"pre",textOverflow:"ellipsis"},"&-remove":Object.assign(Object.assign({},lu()),{display:"inline-flex",alignItems:"center",color:f,fontWeight:"bold",fontSize:10,lineHeight:"inherit",cursor:"pointer",[`> ${n}`]:{verticalAlign:"-0.2em"},"&:hover":{color:d}})}}}},I7=(e,t)=>{const{componentCls:n,INTERNAL_FIXED_ITEM_MARGIN:r}=e,a=`${n}-selection-overflow`,o=e.multipleSelectItemHeight,c=O7(e),u=t?`${n}-${t}`:"",f=FM(e);return{[`${n}-multiple${u}`]:Object.assign(Object.assign({},VM(e)),{[`${n}-selector`]:{display:"flex",alignItems:"center",width:"100%",height:"100%",paddingInline:f.basePadding,paddingBlock:f.containerPadding,borderRadius:e.borderRadius,[`${n}-disabled&`]:{background:e.multipleSelectorBgDisabled,cursor:"not-allowed"},"&:after":{display:"inline-block",width:0,margin:`${te(r)} 0`,lineHeight:te(o),visibility:"hidden",content:'"\\a0"'}},[`${n}-selection-item`]:{height:f.itemHeight,lineHeight:te(f.itemLineHeight)},[`${n}-selection-wrap`]:{alignSelf:"flex-start","&:after":{lineHeight:te(o),marginBlock:r}},[`${n}-prefix`]:{marginInlineStart:e.calc(e.inputPaddingHorizontalBase).sub(f.basePadding).equal()},[`${a}-item + ${a}-item, + ${n}-prefix + ${n}-selection-wrap + `]:{[`${n}-selection-search`]:{marginInlineStart:0},[`${n}-selection-placeholder`]:{insetInlineStart:0}},[`${a}-item-suffix`]:{minHeight:f.itemHeight,marginBlock:r},[`${n}-selection-search`]:{display:"inline-flex",position:"relative",maxWidth:"100%",marginInlineStart:e.calc(e.inputPaddingHorizontalBase).sub(c).equal(),"\n &-input,\n &-mirror\n ":{height:o,fontFamily:e.fontFamily,lineHeight:te(o),transition:`all ${e.motionDurationSlow}`},"&-input":{width:"100%",minWidth:4.1},"&-mirror":{position:"absolute",top:0,insetInlineStart:0,insetInlineEnd:"auto",zIndex:999,whiteSpace:"pre",visibility:"hidden"}},[`${n}-selection-placeholder`]:{position:"absolute",top:"50%",insetInlineStart:e.calc(e.inputPaddingHorizontalBase).sub(f.basePadding).equal(),insetInlineEnd:e.inputPaddingHorizontalBase,transform:"translateY(-50%)",transition:`all ${e.motionDurationSlow}`}})}};function Oy(e,t){const{componentCls:n}=e,r=t?`${n}-${t}`:"",a={[`${n}-multiple${r}`]:{fontSize:e.fontSize,[`${n}-selector`]:{[`${n}-show-search&`]:{cursor:"text"}},[` + &${n}-show-arrow ${n}-selector, + &${n}-allow-clear ${n}-selector + `]:{paddingInlineEnd:e.calc(e.fontSizeIcon).add(e.controlPaddingHorizontal).equal()}}};return[I7(e,t),a]}const R7=e=>{const{componentCls:t}=e,n=xn(e,{selectHeight:e.controlHeightSM,multipleSelectItemHeight:e.multipleItemHeightSM,borderRadius:e.borderRadiusSM,borderRadiusSM:e.borderRadiusXS}),r=xn(e,{fontSize:e.fontSizeLG,selectHeight:e.controlHeightLG,multipleSelectItemHeight:e.multipleItemHeightLG,borderRadius:e.borderRadiusLG,borderRadiusSM:e.borderRadius});return[Oy(e),Oy(n,"sm"),{[`${t}-multiple${t}-sm`]:{[`${t}-selection-placeholder`]:{insetInline:e.calc(e.controlPaddingHorizontalSM).sub(e.lineWidth).equal()},[`${t}-selection-search`]:{marginInlineStart:2}}},Oy(r,"lg")]};function Iy(e,t){const{componentCls:n,inputPaddingHorizontalBase:r,borderRadius:a}=e,o=e.calc(e.controlHeight).sub(e.calc(e.lineWidth).mul(2)).equal(),c=t?`${n}-${t}`:"";return{[`${n}-single${c}`]:{fontSize:e.fontSize,height:e.controlHeight,[`${n}-selector`]:Object.assign(Object.assign({},zn(e,!0)),{display:"flex",borderRadius:a,flex:"1 1 auto",[`${n}-selection-wrap:after`]:{lineHeight:te(o)},[`${n}-selection-search`]:{position:"absolute",inset:0,width:"100%","&-input":{width:"100%",WebkitAppearance:"textfield"}},[` + ${n}-selection-item, + ${n}-selection-placeholder + `]:{display:"block",padding:0,lineHeight:te(o),transition:`all ${e.motionDurationSlow}, visibility 0s`,alignSelf:"center"},[`${n}-selection-placeholder`]:{transition:"none",pointerEvents:"none"},[["&:after",`${n}-selection-item:empty:after`,`${n}-selection-placeholder:empty:after`].join(",")]:{display:"inline-block",width:0,visibility:"hidden",content:'"\\a0"'}}),[` + &${n}-show-arrow ${n}-selection-item, + &${n}-show-arrow ${n}-selection-search, + &${n}-show-arrow ${n}-selection-placeholder + `]:{paddingInlineEnd:e.showArrowPaddingInlineEnd},[`&${n}-open ${n}-selection-item`]:{color:e.colorTextPlaceholder},[`&:not(${n}-customize-input)`]:{[`${n}-selector`]:{width:"100%",height:"100%",alignItems:"center",padding:`0 ${te(r)}`,[`${n}-selection-search-input`]:{height:o,fontSize:e.fontSize},"&:after":{lineHeight:te(o)}}},[`&${n}-customize-input`]:{[`${n}-selector`]:{"&:after":{display:"none"},[`${n}-selection-search`]:{position:"static",width:"100%"},[`${n}-selection-placeholder`]:{position:"absolute",insetInlineStart:0,insetInlineEnd:0,padding:`0 ${te(r)}`,"&:after":{display:"none"}}}}}}}function N7(e){const{componentCls:t}=e,n=e.calc(e.controlPaddingHorizontalSM).sub(e.lineWidth).equal();return[Iy(e),Iy(xn(e,{controlHeight:e.controlHeightSM,borderRadius:e.borderRadiusSM}),"sm"),{[`${t}-single${t}-sm`]:{[`&:not(${t}-customize-input)`]:{[`${t}-selector`]:{padding:`0 ${te(n)}`},[`&${t}-show-arrow ${t}-selection-search`]:{insetInlineEnd:e.calc(n).add(e.calc(e.fontSize).mul(1.5)).equal()},[` + &${t}-show-arrow ${t}-selection-item, + &${t}-show-arrow ${t}-selection-placeholder + `]:{paddingInlineEnd:e.calc(e.fontSize).mul(1.5).equal()}}}},Iy(xn(e,{controlHeight:e.singleItemHeightLG,fontSize:e.fontSizeLG,borderRadius:e.borderRadiusLG}),"lg")]}const M7=e=>{const{fontSize:t,lineHeight:n,lineWidth:r,controlHeight:a,controlHeightSM:o,controlHeightLG:c,paddingXXS:u,controlPaddingHorizontal:f,zIndexPopupBase:d,colorText:h,fontWeightStrong:v,controlItemBgActive:g,controlItemBgHover:b,colorBgContainer:x,colorFillSecondary:C,colorBgContainerDisabled:y,colorTextDisabled:w,colorPrimaryHover:$,colorPrimary:E,controlOutline:O}=e,I=u*2,j=r*2,M=Math.min(a-I,a-j),D=Math.min(o-I,o-j),N=Math.min(c-I,c-j);return{INTERNAL_FIXED_ITEM_MARGIN:Math.floor(u/2),zIndexPopup:d+50,optionSelectedColor:h,optionSelectedFontWeight:v,optionSelectedBg:g,optionActiveBg:b,optionPadding:`${(a-t*n)/2}px ${f}px`,optionFontSize:t,optionLineHeight:n,optionHeight:a,selectorBg:x,clearBg:x,singleItemHeightLG:c,multipleItemBg:C,multipleItemBorderColor:"transparent",multipleItemHeight:M,multipleItemHeightSM:D,multipleItemHeightLG:N,multipleSelectorBgDisabled:y,multipleItemColorDisabled:w,multipleItemBorderColorDisabled:"transparent",showArrowPaddingInlineEnd:Math.ceil(e.fontSize*1.25),hoverBorderColor:$,activeBorderColor:E,activeOutlineColor:O,selectAffixPadding:u}},KM=(e,t)=>{const{componentCls:n,antCls:r,controlOutlineWidth:a}=e;return{[`&:not(${n}-customize-input) ${n}-selector`]:{border:`${te(e.lineWidth)} ${e.lineType} ${t.borderColor}`,background:e.selectorBg},[`&:not(${n}-disabled):not(${n}-customize-input):not(${r}-pagination-size-changer)`]:{[`&:hover ${n}-selector`]:{borderColor:t.hoverBorderHover},[`${n}-focused& ${n}-selector`]:{borderColor:t.activeBorderColor,boxShadow:`0 0 0 ${te(a)} ${t.activeOutlineColor}`,outline:0},[`${n}-prefix`]:{color:t.color}}}},aO=(e,t)=>({[`&${e.componentCls}-status-${t.status}`]:Object.assign({},KM(e,t))}),j7=e=>({"&-outlined":Object.assign(Object.assign(Object.assign(Object.assign({},KM(e,{borderColor:e.colorBorder,hoverBorderHover:e.hoverBorderColor,activeBorderColor:e.activeBorderColor,activeOutlineColor:e.activeOutlineColor,color:e.colorText})),aO(e,{status:"error",borderColor:e.colorError,hoverBorderHover:e.colorErrorHover,activeBorderColor:e.colorError,activeOutlineColor:e.colorErrorOutline,color:e.colorError})),aO(e,{status:"warning",borderColor:e.colorWarning,hoverBorderHover:e.colorWarningHover,activeBorderColor:e.colorWarning,activeOutlineColor:e.colorWarningOutline,color:e.colorWarning})),{[`&${e.componentCls}-disabled`]:{[`&:not(${e.componentCls}-customize-input) ${e.componentCls}-selector`]:{background:e.colorBgContainerDisabled,color:e.colorTextDisabled}},[`&${e.componentCls}-multiple ${e.componentCls}-selection-item`]:{background:e.multipleItemBg,border:`${te(e.lineWidth)} ${e.lineType} ${e.multipleItemBorderColor}`}})}),UM=(e,t)=>{const{componentCls:n,antCls:r}=e;return{[`&:not(${n}-customize-input) ${n}-selector`]:{background:t.bg,border:`${te(e.lineWidth)} ${e.lineType} transparent`,color:t.color},[`&:not(${n}-disabled):not(${n}-customize-input):not(${r}-pagination-size-changer)`]:{[`&:hover ${n}-selector`]:{background:t.hoverBg},[`${n}-focused& ${n}-selector`]:{background:e.selectorBg,borderColor:t.activeBorderColor,outline:0}}}},iO=(e,t)=>({[`&${e.componentCls}-status-${t.status}`]:Object.assign({},UM(e,t))}),T7=e=>({"&-filled":Object.assign(Object.assign(Object.assign(Object.assign({},UM(e,{bg:e.colorFillTertiary,hoverBg:e.colorFillSecondary,activeBorderColor:e.activeBorderColor,color:e.colorText})),iO(e,{status:"error",bg:e.colorErrorBg,hoverBg:e.colorErrorBgHover,activeBorderColor:e.colorError,color:e.colorError})),iO(e,{status:"warning",bg:e.colorWarningBg,hoverBg:e.colorWarningBgHover,activeBorderColor:e.colorWarning,color:e.colorWarning})),{[`&${e.componentCls}-disabled`]:{[`&:not(${e.componentCls}-customize-input) ${e.componentCls}-selector`]:{borderColor:e.colorBorder,background:e.colorBgContainerDisabled,color:e.colorTextDisabled}},[`&${e.componentCls}-multiple ${e.componentCls}-selection-item`]:{background:e.colorBgContainer,border:`${te(e.lineWidth)} ${e.lineType} ${e.colorSplit}`}})}),D7=e=>({"&-borderless":{[`${e.componentCls}-selector`]:{background:"transparent",border:`${te(e.lineWidth)} ${e.lineType} transparent`},[`&${e.componentCls}-disabled`]:{[`&:not(${e.componentCls}-customize-input) ${e.componentCls}-selector`]:{color:e.colorTextDisabled}},[`&${e.componentCls}-multiple ${e.componentCls}-selection-item`]:{background:e.multipleItemBg,border:`${te(e.lineWidth)} ${e.lineType} ${e.multipleItemBorderColor}`},[`&${e.componentCls}-status-error`]:{[`${e.componentCls}-prefix, ${e.componentCls}-selection-item`]:{color:e.colorError}},[`&${e.componentCls}-status-warning`]:{[`${e.componentCls}-prefix, ${e.componentCls}-selection-item`]:{color:e.colorWarning}}}}),WM=(e,t)=>{const{componentCls:n,antCls:r}=e;return{[`&:not(${n}-customize-input) ${n}-selector`]:{borderWidth:`0 0 ${te(e.lineWidth)} 0`,borderStyle:`none none ${e.lineType} none`,borderColor:t.borderColor,background:e.selectorBg,borderRadius:0},[`&:not(${n}-disabled):not(${n}-customize-input):not(${r}-pagination-size-changer)`]:{[`&:hover ${n}-selector`]:{borderColor:t.hoverBorderHover},[`${n}-focused& ${n}-selector`]:{borderColor:t.activeBorderColor,outline:0},[`${n}-prefix`]:{color:t.color}}}},oO=(e,t)=>({[`&${e.componentCls}-status-${t.status}`]:Object.assign({},WM(e,t))}),P7=e=>({"&-underlined":Object.assign(Object.assign(Object.assign(Object.assign({},WM(e,{borderColor:e.colorBorder,hoverBorderHover:e.hoverBorderColor,activeBorderColor:e.activeBorderColor,activeOutlineColor:e.activeOutlineColor,color:e.colorText})),oO(e,{status:"error",borderColor:e.colorError,hoverBorderHover:e.colorErrorHover,activeBorderColor:e.colorError,activeOutlineColor:e.colorErrorOutline,color:e.colorError})),oO(e,{status:"warning",borderColor:e.colorWarning,hoverBorderHover:e.colorWarningHover,activeBorderColor:e.colorWarning,activeOutlineColor:e.colorWarningOutline,color:e.colorWarning})),{[`&${e.componentCls}-disabled`]:{[`&:not(${e.componentCls}-customize-input) ${e.componentCls}-selector`]:{color:e.colorTextDisabled}},[`&${e.componentCls}-multiple ${e.componentCls}-selection-item`]:{background:e.multipleItemBg,border:`${te(e.lineWidth)} ${e.lineType} ${e.multipleItemBorderColor}`}})}),k7=e=>({[e.componentCls]:Object.assign(Object.assign(Object.assign(Object.assign({},j7(e)),T7(e)),D7(e)),P7(e))}),A7=e=>{const{componentCls:t}=e;return{position:"relative",transition:`all ${e.motionDurationMid} ${e.motionEaseInOut}`,input:{cursor:"pointer"},[`${t}-show-search&`]:{cursor:"text",input:{cursor:"auto",color:"inherit",height:"100%"}},[`${t}-disabled&`]:{cursor:"not-allowed",input:{cursor:"not-allowed"}}}},z7=e=>{const{componentCls:t}=e;return{[`${t}-selection-search-input`]:{margin:0,padding:0,background:"transparent",border:"none",outline:"none",appearance:"none",fontFamily:"inherit","&::-webkit-search-cancel-button":{display:"none",appearance:"none"}}}},L7=e=>{const{antCls:t,componentCls:n,inputPaddingHorizontalBase:r,iconCls:a}=e,o={[`${n}-clear`]:{opacity:1,background:e.colorBgBase,borderRadius:"50%"}};return{[n]:Object.assign(Object.assign({},zn(e)),{position:"relative",display:"inline-flex",cursor:"pointer",[`&:not(${n}-customize-input) ${n}-selector`]:Object.assign(Object.assign({},A7(e)),z7(e)),[`${n}-selection-item`]:Object.assign(Object.assign({flex:1,fontWeight:"normal",position:"relative",userSelect:"none"},Bi),{[`> ${t}-typography`]:{display:"inline"}}),[`${n}-selection-placeholder`]:Object.assign(Object.assign({},Bi),{flex:1,color:e.colorTextPlaceholder,pointerEvents:"none"}),[`${n}-arrow`]:Object.assign(Object.assign({},lu()),{position:"absolute",top:"50%",insetInlineStart:"auto",insetInlineEnd:r,height:e.fontSizeIcon,marginTop:e.calc(e.fontSizeIcon).mul(-1).div(2).equal(),color:e.colorTextQuaternary,fontSize:e.fontSizeIcon,lineHeight:1,textAlign:"center",pointerEvents:"none",display:"flex",alignItems:"center",transition:`opacity ${e.motionDurationSlow} ease`,[a]:{verticalAlign:"top",transition:`transform ${e.motionDurationSlow}`,"> svg":{verticalAlign:"top"},[`&:not(${n}-suffix)`]:{pointerEvents:"auto"}},[`${n}-disabled &`]:{cursor:"not-allowed"},"> *:not(:last-child)":{marginInlineEnd:8}}),[`${n}-selection-wrap`]:{display:"flex",width:"100%",position:"relative",minWidth:0,"&:after":{content:'"\\a0"',width:0,overflow:"hidden"}},[`${n}-prefix`]:{flex:"none",marginInlineEnd:e.selectAffixPadding},[`${n}-clear`]:{position:"absolute",top:"50%",insetInlineStart:"auto",insetInlineEnd:r,zIndex:1,display:"inline-block",width:e.fontSizeIcon,height:e.fontSizeIcon,marginTop:e.calc(e.fontSizeIcon).mul(-1).div(2).equal(),color:e.colorTextQuaternary,fontSize:e.fontSizeIcon,fontStyle:"normal",lineHeight:1,textAlign:"center",textTransform:"none",cursor:"pointer",opacity:0,transition:`color ${e.motionDurationMid} ease, opacity ${e.motionDurationSlow} ease`,textRendering:"auto",transform:"translateZ(0)","&:before":{display:"block"},"&:hover":{color:e.colorIcon}},"@media(hover:none)":o,"&:hover":o}),[`${n}-status`]:{"&-error, &-warning, &-success, &-validating":{[`&${n}-has-feedback`]:{[`${n}-clear`]:{insetInlineEnd:e.calc(r).add(e.fontSize).add(e.paddingXS).equal()}}}}}},H7=e=>{const{componentCls:t}=e;return[{[t]:{[`&${t}-in-form-item`]:{width:"100%"}}},L7(e),N7(e),R7(e),_7(e),{[`${t}-rtl`]:{direction:"rtl"}},Tf(e,{borderElCls:`${t}-selector`,focusElCls:`${t}-focused`})]},B7=Kn("Select",(e,{rootPrefixCls:t})=>{const n=xn(e,{rootPrefixCls:t,inputPaddingHorizontalBase:e.calc(e.paddingSM).sub(1).equal(),multipleSelectItemHeight:e.multipleItemHeight,selectHeight:e.controlHeight});return[H7(n),k7(n)]},M7,{unitless:{optionLineHeight:!0,optionSelectedFontWeight:!0}});var F7={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M912 190h-69.9c-9.8 0-19.1 4.5-25.1 12.2L404.7 724.5 207 474a32 32 0 00-25.1-12.2H112c-6.7 0-10.4 7.7-6.3 12.9l273.9 347c12.8 16.2 37.4 16.2 50.3 0l488.4-618.9c4.1-5.1.4-12.8-6.3-12.8z"}}]},name:"check",theme:"outlined"},V7=function(t,n){return s.createElement($n,Me({},t,{ref:n,icon:F7}))},US=s.forwardRef(V7),K7={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"}}]},name:"down",theme:"outlined"},U7=function(t,n){return s.createElement($n,Me({},t,{ref:n,icon:K7}))},WS=s.forwardRef(U7),qM={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M909.6 854.5L649.9 594.8C690.2 542.7 712 479 712 412c0-80.2-31.3-155.4-87.9-212.1-56.6-56.7-132-87.9-212.1-87.9s-155.5 31.3-212.1 87.9C143.2 256.5 112 331.8 112 412c0 80.1 31.3 155.5 87.9 212.1C256.5 680.8 331.8 712 412 712c67 0 130.6-21.8 182.7-62l259.7 259.6a8.2 8.2 0 0011.6 0l43.6-43.5a8.2 8.2 0 000-11.6zM570.4 570.4C528 612.7 471.8 636 412 636s-116-23.3-158.4-65.6C211.3 528 188 471.8 188 412s23.3-116.1 65.6-158.4C296 211.3 352.2 188 412 188s116.1 23.2 158.4 65.6S636 352.2 636 412s-23.3 116.1-65.6 158.4z"}}]},name:"search",theme:"outlined"},W7=function(t,n){return s.createElement($n,Me({},t,{ref:n,icon:qM}))},qS=s.forwardRef(W7);function YM({suffixIcon:e,clearIcon:t,menuItemSelectedIcon:n,removeIcon:r,loading:a,multiple:o,hasFeedback:c,prefixCls:u,showSuffixIcon:f,feedbackIcon:d,showArrow:h,componentName:v}){const g=t??s.createElement(cu,null),b=w=>e===null&&!c&&!h?null:s.createElement(s.Fragment,null,f!==!1&&w,c&&d);let x=null;if(e!==void 0)x=b(e);else if(a)x=b(s.createElement(qo,{spin:!0}));else{const w=`${u}-suffix`;x=({open:$,showSearch:E})=>b($&&E?s.createElement(qS,{className:w}):s.createElement(WS,{className:w}))}let C=null;n!==void 0?C=n:o?C=s.createElement(US,null):C=null;let y=null;return r!==void 0?y=r:y=s.createElement(uu,null),{clearIcon:g,suffixIcon:x,itemIcon:C,removeIcon:y}}function q7(e){return Se.useMemo(()=>{if(e)return(...t)=>Se.createElement(Go,{space:!0},e.apply(void 0,t))},[e])}function Y7(e,t){return t!==void 0?t:e!==null}var G7=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,r=Object.getOwnPropertySymbols(e);a{var n,r,a,o,c;const{prefixCls:u,bordered:f,className:d,rootClassName:h,getPopupContainer:v,popupClassName:g,dropdownClassName:b,listHeight:x=256,placement:C,listItemHeight:y,size:w,disabled:$,notFoundContent:E,status:O,builtinPlacements:I,dropdownMatchSelectWidth:j,popupMatchSelectWidth:M,direction:D,style:N,allowClear:P,variant:A,dropdownStyle:F,transitionName:H,tagRender:k,maxCount:L,prefix:T,dropdownRender:z,popupRender:V,onDropdownVisibleChange:q,onOpenChange:G,styles:B,classNames:U}=e,K=G7(e,["prefixCls","bordered","className","rootClassName","getPopupContainer","popupClassName","dropdownClassName","listHeight","placement","listItemHeight","size","disabled","notFoundContent","status","builtinPlacements","dropdownMatchSelectWidth","popupMatchSelectWidth","direction","style","allowClear","variant","dropdownStyle","transitionName","tagRender","maxCount","prefix","dropdownRender","popupRender","onDropdownVisibleChange","onOpenChange","styles","classNames"]),{getPopupContainer:Y,getPrefixCls:Q,renderEmpty:Z,direction:ae,virtual:re,popupMatchSelectWidth:ie,popupOverflow:ve}=s.useContext(Wt),{showSearch:ue,style:oe,styles:he,className:fe,classNames:me}=ga("select"),[,le]=Ta(),pe=y??le?.controlHeight,Ce=Q("select",u),De=Q(),je=D??ae,{compactSize:ge,compactItemClassnames:Ie}=Zo(Ce,je),[Ee,we]=ks("select",A,f),Fe=oa(Ce),[He,it,Ze]=B7(Ce,Fe),Ye=s.useMemo(()=>{const{mode:ct}=e;if(ct!=="combobox")return ct===GM?"combobox":ct},[e.mode]),et=Ye==="multiple"||Ye==="tags",Pe=Y7(e.suffixIcon,e.showArrow),Oe=(n=M??j)!==null&&n!==void 0?n:ie,Be=((r=B?.popup)===null||r===void 0?void 0:r.root)||((a=he.popup)===null||a===void 0?void 0:a.root)||F,$e=q7(V||z),Te=G||q,{status:be,hasFeedback:ye,isFormItemInput:Re,feedbackIcon:Ge}=s.useContext(ia),ft=Ps(be,O);let $t;E!==void 0?$t=E:Ye==="combobox"?$t=null:$t=Z?.("Select")||s.createElement(KS,{componentName:"Select"});const{suffixIcon:Qe,itemIcon:at,removeIcon:mt,clearIcon:st}=YM(Object.assign(Object.assign({},K),{multiple:et,hasFeedback:ye,feedbackIcon:Ge,showSuffixIcon:Pe,prefixCls:Ce,componentName:"Select"})),bt=P===!0?{clearIcon:st}:P,qt=lr(K,["suffixIcon","itemIcon"]),Gt=se(((o=U?.popup)===null||o===void 0?void 0:o.root)||((c=me?.popup)===null||c===void 0?void 0:c.root)||g||b,{[`${Ce}-dropdown-${je}`]:je==="rtl"},h,me.root,U?.root,Ze,Fe,it),vt=la(ct=>{var Tt;return(Tt=w??ge)!==null&&Tt!==void 0?Tt:ct}),It=s.useContext(ja),Et=$??It,nt=se({[`${Ce}-lg`]:vt==="large",[`${Ce}-sm`]:vt==="small",[`${Ce}-rtl`]:je==="rtl",[`${Ce}-${Ee}`]:we,[`${Ce}-in-form-item`]:Re},Hl(Ce,ft,ye),Ie,fe,d,me.root,U?.root,h,Ze,Fe,it),Ue=s.useMemo(()=>C!==void 0?C:je==="rtl"?"bottomRight":"bottomLeft",[C,je]),[qe]=du("SelectLike",Be?.zIndex);return He(s.createElement(VS,Object.assign({ref:t,virtual:re,showSearch:ue},qt,{style:Object.assign(Object.assign(Object.assign(Object.assign({},he.root),B?.root),oe),N),dropdownMatchSelectWidth:Oe,transitionName:MS(De,"slide-up",H),builtinPlacements:E7(I,ve),listHeight:x,listItemHeight:pe,mode:Ye,prefixCls:Ce,placement:Ue,direction:je,prefix:T,suffixIcon:Qe,menuItemSelectedIcon:at,removeIcon:mt,allowClear:bt,notFoundContent:$t,className:nt,getPopupContainer:v||Y,dropdownClassName:Gt,disabled:Et,dropdownStyle:Object.assign(Object.assign({},Be),{zIndex:qe}),maxCount:et?L:void 0,tagRender:et?k:void 0,dropdownRender:$e,onDropdownVisibleChange:Te})))},Rt=s.forwardRef(X7),Q7=lg(Rt,"dropdownAlign");Rt.SECRET_COMBOBOX_MODE_DO_NOT_USE=GM;Rt.Option=FS;Rt.OptGroup=BS;Rt._InternalPanelDoNotUseOrYouWillBeFired=Q7;const XM=(e,t)=>{typeof e?.addEventListener<"u"?e.addEventListener("change",t):typeof e?.addListener<"u"&&e.addListener(t)},QM=(e,t)=>{typeof e?.removeEventListener<"u"?e.removeEventListener("change",t):typeof e?.removeListener<"u"&&e.removeListener(t)},Ms=["xxl","xl","lg","md","sm","xs"],Z7=e=>({xs:`(max-width: ${e.screenXSMax}px)`,sm:`(min-width: ${e.screenSM}px)`,md:`(min-width: ${e.screenMD}px)`,lg:`(min-width: ${e.screenLG}px)`,xl:`(min-width: ${e.screenXL}px)`,xxl:`(min-width: ${e.screenXXL}px)`}),J7=e=>{const t=e,n=[].concat(Ms).reverse();return n.forEach((r,a)=>{const o=r.toUpperCase(),c=`screen${o}Min`,u=`screen${o}`;if(!(t[c]<=t[u]))throw new Error(`${c}<=${u} fails : !(${t[c]}<=${t[u]})`);if(a{const[,e]=Ta(),t=Z7(J7(e));return Se.useMemo(()=>{const n=new Map;let r=-1,a={};return{responsiveMap:t,matchHandlers:{},dispatch(o){return a=o,n.forEach(c=>c(a)),n.size>=1},subscribe(o){return n.size||this.register(),r+=1,n.set(r,o),o(a),r},unsubscribe(o){n.delete(o),n.size||this.unregister()},register(){Object.entries(t).forEach(([o,c])=>{const u=({matches:d})=>{this.dispatch(Object.assign(Object.assign({},a),{[o]:d}))},f=window.matchMedia(c);XM(f,u),this.matchHandlers[c]={mql:f,listener:u},u(f)})},unregister(){Object.values(t).forEach(o=>{const c=this.matchHandlers[o];QM(c?.mql,c?.listener)}),n.clear()}}},[e])};function YS(){const[,e]=s.useReducer(t=>t+1,0);return e}function dg(e=!0,t={}){const n=s.useRef(t),r=YS(),a=e9();return fn(()=>{const o=a.subscribe(c=>{n.current=c,e&&r()});return()=>a.unsubscribe(o)},[]),n.current}function ZM(e){var t=e.children,n=e.prefixCls,r=e.id,a=e.overlayInnerStyle,o=e.bodyClassName,c=e.className,u=e.style;return s.createElement("div",{className:se("".concat(n,"-content"),c),style:u},s.createElement("div",{className:se("".concat(n,"-inner"),o),id:r,role:"tooltip",style:a},typeof t=="function"?t():t))}var Oc={shiftX:64,adjustY:1},Ic={adjustX:1,shiftY:!0},bi=[0,0],t9={left:{points:["cr","cl"],overflow:Ic,offset:[-4,0],targetOffset:bi},right:{points:["cl","cr"],overflow:Ic,offset:[4,0],targetOffset:bi},top:{points:["bc","tc"],overflow:Oc,offset:[0,-4],targetOffset:bi},bottom:{points:["tc","bc"],overflow:Oc,offset:[0,4],targetOffset:bi},topLeft:{points:["bl","tl"],overflow:Oc,offset:[0,-4],targetOffset:bi},leftTop:{points:["tr","tl"],overflow:Ic,offset:[-4,0],targetOffset:bi},topRight:{points:["br","tr"],overflow:Oc,offset:[0,-4],targetOffset:bi},rightTop:{points:["tl","tr"],overflow:Ic,offset:[4,0],targetOffset:bi},bottomRight:{points:["tr","br"],overflow:Oc,offset:[0,4],targetOffset:bi},rightBottom:{points:["bl","br"],overflow:Ic,offset:[4,0],targetOffset:bi},bottomLeft:{points:["tl","bl"],overflow:Oc,offset:[0,4],targetOffset:bi},leftBottom:{points:["br","bl"],overflow:Ic,offset:[-4,0],targetOffset:bi}},n9=["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","children","onVisibleChange","afterVisibleChange","transitionName","animation","motion","placement","align","destroyTooltipOnHide","defaultVisible","getTooltipContainer","overlayInnerStyle","arrowContent","overlay","id","showArrow","classNames","styles"],r9=function(t,n){var r=t.overlayClassName,a=t.trigger,o=a===void 0?["hover"]:a,c=t.mouseEnterDelay,u=c===void 0?0:c,f=t.mouseLeaveDelay,d=f===void 0?.1:f,h=t.overlayStyle,v=t.prefixCls,g=v===void 0?"rc-tooltip":v,b=t.children,x=t.onVisibleChange,C=t.afterVisibleChange,y=t.transitionName,w=t.animation,$=t.motion,E=t.placement,O=E===void 0?"right":E,I=t.align,j=I===void 0?{}:I,M=t.destroyTooltipOnHide,D=M===void 0?!1:M,N=t.defaultVisible,P=t.getTooltipContainer,A=t.overlayInnerStyle;t.arrowContent;var F=t.overlay,H=t.id,k=t.showArrow,L=k===void 0?!0:k,T=t.classNames,z=t.styles,V=Kt(t,n9),q=PS(H),G=s.useRef(null);s.useImperativeHandle(n,function(){return G.current});var B=ee({},V);"visible"in t&&(B.popupVisible=t.visible);var U=function(){return s.createElement(ZM,{key:"content",prefixCls:g,id:q,bodyClassName:T?.body,overlayInnerStyle:ee(ee({},A),z?.body)},F)},K=function(){var Q=s.Children.only(b),Z=Q?.props||{},ae=ee(ee({},Z),{},{"aria-describedby":F?q:null});return s.cloneElement(b,ae)};return s.createElement(kf,Me({popupClassName:se(r,T?.root),prefixCls:g,popup:U,action:o,builtinPlacements:t9,popupPlacement:O,ref:G,popupAlign:j,getPopupContainer:P,onPopupVisibleChange:x,afterPopupVisibleChange:C,popupTransitionName:y,popupAnimation:w,popupMotion:$,defaultPopupVisible:N,autoDestroy:D,mouseLeaveDelay:d,popupStyle:ee(ee({},h),z?.root),mouseEnterDelay:u,arrow:L},B),K())};const a9=s.forwardRef(r9);function GS(e){const{sizePopupArrow:t,borderRadiusXS:n,borderRadiusOuter:r}=e,a=t/2,o=0,c=a,u=r*1/Math.sqrt(2),f=a-r*(1-1/Math.sqrt(2)),d=a-n*(1/Math.sqrt(2)),h=r*(Math.sqrt(2)-1)+n*(1/Math.sqrt(2)),v=2*a-d,g=h,b=2*a-u,x=f,C=2*a-o,y=c,w=a*Math.sqrt(2)+r*(Math.sqrt(2)-2),$=r*(Math.sqrt(2)-1),E=`polygon(${$}px 100%, 50% ${$}px, ${2*a-$}px 100%, ${$}px 100%)`,O=`path('M ${o} ${c} A ${r} ${r} 0 0 0 ${u} ${f} L ${d} ${h} A ${n} ${n} 0 0 1 ${v} ${g} L ${b} ${x} A ${r} ${r} 0 0 0 ${C} ${y} Z')`;return{arrowShadowWidth:w,arrowPath:O,arrowPolygon:E}}const JM=(e,t,n)=>{const{sizePopupArrow:r,arrowPolygon:a,arrowPath:o,arrowShadowWidth:c,borderRadiusXS:u,calc:f}=e;return{pointerEvents:"none",width:r,height:r,overflow:"hidden","&::before":{position:"absolute",bottom:0,insetInlineStart:0,width:r,height:f(r).div(2).equal(),background:t,clipPath:{_multi_value_:!0,value:[a,o]},content:'""'},"&::after":{content:'""',position:"absolute",width:c,height:c,bottom:0,insetInline:0,margin:"auto",borderRadius:{_skip_check_:!0,value:`0 0 ${te(u)} 0`},transform:"translateY(50%) rotate(-135deg)",boxShadow:n,zIndex:0,background:"transparent"}}},ej=8;function XS(e){const{contentRadius:t,limitVerticalRadius:n}=e,r=t>12?t+2:12;return{arrowOffsetHorizontal:r,arrowOffsetVertical:n?ej:r}}function gh(e,t){return e?t:{}}function tj(e,t,n){const{componentCls:r,boxShadowPopoverArrow:a,arrowOffsetVertical:o,arrowOffsetHorizontal:c}=e,{arrowDistance:u=0,arrowPlacement:f={left:!0,right:!0,top:!0,bottom:!0}}=n||{};return{[r]:Object.assign(Object.assign(Object.assign(Object.assign({[`${r}-arrow`]:[Object.assign(Object.assign({position:"absolute",zIndex:1,display:"block"},JM(e,t,a)),{"&:before":{background:t}})]},gh(!!f.top,{[[`&-placement-top > ${r}-arrow`,`&-placement-topLeft > ${r}-arrow`,`&-placement-topRight > ${r}-arrow`].join(",")]:{bottom:u,transform:"translateY(100%) rotate(180deg)"},[`&-placement-top > ${r}-arrow`]:{left:{_skip_check_:!0,value:"50%"},transform:"translateX(-50%) translateY(100%) rotate(180deg)"},"&-placement-topLeft":{"--arrow-offset-horizontal":c,[`> ${r}-arrow`]:{left:{_skip_check_:!0,value:c}}},"&-placement-topRight":{"--arrow-offset-horizontal":`calc(100% - ${te(c)})`,[`> ${r}-arrow`]:{right:{_skip_check_:!0,value:c}}}})),gh(!!f.bottom,{[[`&-placement-bottom > ${r}-arrow`,`&-placement-bottomLeft > ${r}-arrow`,`&-placement-bottomRight > ${r}-arrow`].join(",")]:{top:u,transform:"translateY(-100%)"},[`&-placement-bottom > ${r}-arrow`]:{left:{_skip_check_:!0,value:"50%"},transform:"translateX(-50%) translateY(-100%)"},"&-placement-bottomLeft":{"--arrow-offset-horizontal":c,[`> ${r}-arrow`]:{left:{_skip_check_:!0,value:c}}},"&-placement-bottomRight":{"--arrow-offset-horizontal":`calc(100% - ${te(c)})`,[`> ${r}-arrow`]:{right:{_skip_check_:!0,value:c}}}})),gh(!!f.left,{[[`&-placement-left > ${r}-arrow`,`&-placement-leftTop > ${r}-arrow`,`&-placement-leftBottom > ${r}-arrow`].join(",")]:{right:{_skip_check_:!0,value:u},transform:"translateX(100%) rotate(90deg)"},[`&-placement-left > ${r}-arrow`]:{top:{_skip_check_:!0,value:"50%"},transform:"translateY(-50%) translateX(100%) rotate(90deg)"},[`&-placement-leftTop > ${r}-arrow`]:{top:o},[`&-placement-leftBottom > ${r}-arrow`]:{bottom:o}})),gh(!!f.right,{[[`&-placement-right > ${r}-arrow`,`&-placement-rightTop > ${r}-arrow`,`&-placement-rightBottom > ${r}-arrow`].join(",")]:{left:{_skip_check_:!0,value:u},transform:"translateX(-100%) rotate(-90deg)"},[`&-placement-right > ${r}-arrow`]:{top:{_skip_check_:!0,value:"50%"},transform:"translateY(-50%) translateX(-100%) rotate(-90deg)"},[`&-placement-rightTop > ${r}-arrow`]:{top:o},[`&-placement-rightBottom > ${r}-arrow`]:{bottom:o}}))}}function i9(e,t,n,r){if(r===!1)return{adjustX:!1,adjustY:!1};const a=r&&typeof r=="object"?r:{},o={};switch(e){case"top":case"bottom":o.shiftX=t.arrowOffsetHorizontal*2+n,o.shiftY=!0,o.adjustY=!0;break;case"left":case"right":o.shiftY=t.arrowOffsetVertical*2+n,o.shiftX=!0,o.adjustX=!0;break}const c=Object.assign(Object.assign({},o),a);return c.shiftX||(c.adjustX=!0),c.shiftY||(c.adjustY=!0),c}const lO={left:{points:["cr","cl"]},right:{points:["cl","cr"]},top:{points:["bc","tc"]},bottom:{points:["tc","bc"]},topLeft:{points:["bl","tl"]},leftTop:{points:["tr","tl"]},topRight:{points:["br","tr"]},rightTop:{points:["tl","tr"]},bottomRight:{points:["tr","br"]},rightBottom:{points:["bl","br"]},bottomLeft:{points:["tl","bl"]},leftBottom:{points:["br","bl"]}},o9={topLeft:{points:["bl","tc"]},leftTop:{points:["tr","cl"]},topRight:{points:["br","tc"]},rightTop:{points:["tl","cr"]},bottomRight:{points:["tr","bc"]},rightBottom:{points:["bl","cr"]},bottomLeft:{points:["tl","bc"]},leftBottom:{points:["br","cl"]}},l9=new Set(["topLeft","topRight","bottomLeft","bottomRight","leftTop","leftBottom","rightTop","rightBottom"]);function nj(e){const{arrowWidth:t,autoAdjustOverflow:n,arrowPointAtCenter:r,offset:a,borderRadius:o,visibleFirst:c}=e,u=t/2,f={},d=XS({contentRadius:o,limitVerticalRadius:!0});return Object.keys(lO).forEach(h=>{const v=r&&o9[h]||lO[h],g=Object.assign(Object.assign({},v),{offset:[0,0],dynamicInset:!0});switch(f[h]=g,l9.has(h)&&(g.autoArrow=!1),h){case"top":case"topLeft":case"topRight":g.offset[1]=-u-a;break;case"bottom":case"bottomLeft":case"bottomRight":g.offset[1]=u+a;break;case"left":case"leftTop":case"leftBottom":g.offset[0]=-u-a;break;case"right":case"rightTop":case"rightBottom":g.offset[0]=u+a;break}if(r)switch(h){case"topLeft":case"bottomLeft":g.offset[0]=-d.arrowOffsetHorizontal-u;break;case"topRight":case"bottomRight":g.offset[0]=d.arrowOffsetHorizontal+u;break;case"leftTop":case"rightTop":g.offset[1]=-d.arrowOffsetHorizontal*2+u;break;case"leftBottom":case"rightBottom":g.offset[1]=d.arrowOffsetHorizontal*2-u;break}g.overflow=i9(h,d,t,n),c&&(g.htmlRegion="visibleFirst")}),f}const s9=e=>{const{calc:t,componentCls:n,tooltipMaxWidth:r,tooltipColor:a,tooltipBg:o,tooltipBorderRadius:c,zIndexPopup:u,controlHeight:f,boxShadowSecondary:d,paddingSM:h,paddingXS:v,arrowOffsetHorizontal:g,sizePopupArrow:b}=e,x=t(c).add(b).add(g).equal(),C=t(c).mul(2).add(b).equal();return[{[n]:Object.assign(Object.assign(Object.assign(Object.assign({},zn(e)),{position:"absolute",zIndex:u,display:"block",width:"max-content",maxWidth:r,visibility:"visible","--valid-offset-x":"var(--arrow-offset-horizontal, var(--arrow-x))",transformOrigin:["var(--valid-offset-x, 50%)","var(--arrow-y, 50%)"].join(" "),"&-hidden":{display:"none"},"--antd-arrow-background-color":o,[`${n}-inner`]:{minWidth:C,minHeight:f,padding:`${te(e.calc(h).div(2).equal())} ${te(v)}`,color:`var(--ant-tooltip-color, ${a})`,textAlign:"start",textDecoration:"none",wordWrap:"break-word",backgroundColor:o,borderRadius:c,boxShadow:d,boxSizing:"border-box"},[["&-placement-topLeft","&-placement-topRight","&-placement-bottomLeft","&-placement-bottomRight"].join(",")]:{minWidth:x},[["&-placement-left","&-placement-leftTop","&-placement-leftBottom","&-placement-right","&-placement-rightTop","&-placement-rightBottom"].join(",")]:{[`${n}-inner`]:{borderRadius:e.min(c,ej)}},[`${n}-content`]:{position:"relative"}}),IN(e,(y,{darkColor:w})=>({[`&${n}-${y}`]:{[`${n}-inner`]:{backgroundColor:w},[`${n}-arrow`]:{"--antd-arrow-background-color":w}}}))),{"&-rtl":{direction:"rtl"}})},tj(e,"var(--antd-arrow-background-color)"),{[`${n}-pure`]:{position:"relative",maxWidth:"none",margin:e.sizePopupArrow}}]},c9=e=>Object.assign(Object.assign({zIndexPopup:e.zIndexPopupBase+70},XS({contentRadius:e.borderRadius,limitVerticalRadius:!0})),GS(xn(e,{borderRadiusOuter:Math.min(e.borderRadiusOuter,4)}))),rj=(e,t=!0)=>Kn("Tooltip",r=>{const{borderRadius:a,colorTextLightSolid:o,colorBgSpotlight:c}=r,u=xn(r,{tooltipMaxWidth:250,tooltipColor:o,tooltipBorderRadius:a,tooltipBg:c});return[s9(u),TS(r,"zoom-big-fast")]},c9,{resetStyle:!1,injectStyle:t})(e),u9=Rs.map(e=>`${e}-inverse`),d9=["success","processing","error","default","warning"];function aj(e,t=!0){return t?[].concat(ke(u9),ke(Rs)).includes(e):Rs.includes(e)}function f9(e){return d9.includes(e)}function ij(e,t){const n=aj(t),r=se({[`${e}-${t}`]:t&&n}),a={},o={},c=TL(t).toRgb(),f=(.299*c.r+.587*c.g+.114*c.b)/255<.5?"#FFF":"#000";return t&&!n&&(a.background=t,a["--ant-tooltip-color"]=f,o["--antd-arrow-background-color"]=t),{className:r,overlayStyle:a,arrowStyle:o}}const m9=e=>{const{prefixCls:t,className:n,placement:r="top",title:a,color:o,overlayInnerStyle:c}=e,{getPrefixCls:u}=s.useContext(Wt),f=u("tooltip",t),[d,h,v]=rj(f),g=ij(f,o),b=g.arrowStyle,x=Object.assign(Object.assign({},c),g.overlayStyle),C=se(h,v,f,`${f}-pure`,`${f}-placement-${r}`,n,g.className);return d(s.createElement("div",{className:C,style:b},s.createElement("div",{className:`${f}-arrow`}),s.createElement(ZM,Object.assign({},e,{className:h,prefixCls:f,overlayInnerStyle:x}),a)))};var h9=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,r=Object.getOwnPropertySymbols(e);a{var n,r;const{prefixCls:a,openClassName:o,getTooltipContainer:c,color:u,overlayInnerStyle:f,children:d,afterOpenChange:h,afterVisibleChange:v,destroyTooltipOnHide:g,destroyOnHidden:b,arrow:x=!0,title:C,overlay:y,builtinPlacements:w,arrowPointAtCenter:$=!1,autoAdjustOverflow:E=!0,motion:O,getPopupContainer:I,placement:j="top",mouseEnterDelay:M=.1,mouseLeaveDelay:D=.1,overlayStyle:N,rootClassName:P,overlayClassName:A,styles:F,classNames:H}=e,k=h9(e,["prefixCls","openClassName","getTooltipContainer","color","overlayInnerStyle","children","afterOpenChange","afterVisibleChange","destroyTooltipOnHide","destroyOnHidden","arrow","title","overlay","builtinPlacements","arrowPointAtCenter","autoAdjustOverflow","motion","getPopupContainer","placement","mouseEnterDelay","mouseLeaveDelay","overlayStyle","rootClassName","overlayClassName","styles","classNames"]),L=!!x,[,T]=Ta(),{getPopupContainer:z,getPrefixCls:V,direction:q,className:G,style:B,classNames:U,styles:K}=ga("tooltip"),Y=Kl(),Q=s.useRef(null),Z=()=>{var Pe;(Pe=Q.current)===null||Pe===void 0||Pe.forceAlign()};s.useImperativeHandle(t,()=>{var Pe,Oe;return{forceAlign:Z,forcePopupAlign:()=>{Y.deprecated(!1,"forcePopupAlign","forceAlign"),Z()},nativeElement:(Pe=Q.current)===null||Pe===void 0?void 0:Pe.nativeElement,popupElement:(Oe=Q.current)===null||Oe===void 0?void 0:Oe.popupElement}});const[ae,re]=Wn(!1,{value:(n=e.open)!==null&&n!==void 0?n:e.visible,defaultValue:(r=e.defaultOpen)!==null&&r!==void 0?r:e.defaultVisible}),ie=!C&&!y&&C!==0,ve=Pe=>{var Oe,Be;re(ie?!1:Pe),ie||((Oe=e.onOpenChange)===null||Oe===void 0||Oe.call(e,Pe),(Be=e.onVisibleChange)===null||Be===void 0||Be.call(e,Pe))},ue=s.useMemo(()=>{var Pe,Oe;let Be=$;return typeof x=="object"&&(Be=(Oe=(Pe=x.pointAtCenter)!==null&&Pe!==void 0?Pe:x.arrowPointAtCenter)!==null&&Oe!==void 0?Oe:$),w||nj({arrowPointAtCenter:Be,autoAdjustOverflow:E,arrowWidth:L?T.sizePopupArrow:0,borderRadius:T.borderRadius,offset:T.marginXXS,visibleFirst:!0})},[$,x,w,T]),oe=s.useMemo(()=>C===0?C:y||C||"",[y,C]),he=s.createElement(Go,{space:!0},typeof oe=="function"?oe():oe),fe=V("tooltip",a),me=V(),le=e["data-popover-inject"];let pe=ae;!("open"in e)&&!("visible"in e)&&ie&&(pe=!1);const Ce=s.isValidElement(d)&&!qN(d)?d:s.createElement("span",null,d),De=Ce.props,je=!De.className||typeof De.className=="string"?se(De.className,o||`${fe}-open`):De.className,[ge,Ie,Ee]=rj(fe,!le),we=ij(fe,u),Fe=we.arrowStyle,He=se(A,{[`${fe}-rtl`]:q==="rtl"},we.className,P,Ie,Ee,G,U.root,H?.root),it=se(U.body,H?.body),[Ze,Ye]=du("Tooltip",k.zIndex),et=s.createElement(a9,Object.assign({},k,{zIndex:Ze,showArrow:L,placement:j,mouseEnterDelay:M,mouseLeaveDelay:D,prefixCls:fe,classNames:{root:He,body:it},styles:{root:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},Fe),K.root),B),N),F?.root),body:Object.assign(Object.assign(Object.assign(Object.assign({},K.body),f),F?.body),we.overlayStyle)},getTooltipContainer:I||c||z,ref:Q,builtinPlacements:ue,overlay:he,visible:pe,onVisibleChange:ve,afterVisibleChange:h??v,arrowContent:s.createElement("span",{className:`${fe}-arrow-content`}),motion:{motionName:MS(me,"zoom-big-fast",e.transitionName),motionDeadline:1e3},destroyTooltipOnHide:b??!!g}),pe?$a(Ce,{className:je}):Ce);return ge(s.createElement(IS.Provider,{value:Ye},et))}),Ei=v9;Ei._InternalPanelDoNotUseOrYouWillBeFired=m9;var g9={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M724 218.3V141c0-6.7-7.7-10.4-12.9-6.3L260.3 486.8a31.86 31.86 0 000 50.3l450.8 352.1c5.3 4.1 12.9.4 12.9-6.3v-77.3c0-4.9-2.3-9.6-6.1-12.6l-360-281 360-281.1c3.8-3 6.1-7.7 6.1-12.6z"}}]},name:"left",theme:"outlined"},p9=function(t,n){return s.createElement($n,Me({},t,{ref:n,icon:g9}))},bf=s.forwardRef(p9),b9=Mt.ESC,y9=Mt.TAB;function x9(e){var t=e.visible,n=e.triggerRef,r=e.onVisibleChange,a=e.autoFocus,o=e.overlayRef,c=s.useRef(!1),u=function(){if(t){var v,g;(v=n.current)===null||v===void 0||(g=v.focus)===null||g===void 0||g.call(v),r?.(!1)}},f=function(){var v;return(v=o.current)!==null&&v!==void 0&&v.focus?(o.current.focus(),c.current=!0,!0):!1},d=function(v){switch(v.keyCode){case b9:u();break;case y9:{var g=!1;c.current||(g=f()),g?v.preventDefault():u();break}}};s.useEffect(function(){return t?(window.addEventListener("keydown",d),a&&hn(f,3),function(){window.removeEventListener("keydown",d),c.current=!1}):function(){c.current=!1}},[t])}var S9=s.forwardRef(function(e,t){var n=e.overlay,r=e.arrow,a=e.prefixCls,o=s.useMemo(function(){var u;return typeof n=="function"?u=n():u=n,u},[n]),c=Ea(t,Vl(o));return Se.createElement(Se.Fragment,null,r&&Se.createElement("div",{className:"".concat(a,"-arrow")}),Se.cloneElement(o,{ref:Hi(o)?c:void 0}))}),Rc={adjustX:1,adjustY:1},Nc=[0,0],C9={topLeft:{points:["bl","tl"],overflow:Rc,offset:[0,-4],targetOffset:Nc},top:{points:["bc","tc"],overflow:Rc,offset:[0,-4],targetOffset:Nc},topRight:{points:["br","tr"],overflow:Rc,offset:[0,-4],targetOffset:Nc},bottomLeft:{points:["tl","bl"],overflow:Rc,offset:[0,4],targetOffset:Nc},bottom:{points:["tc","bc"],overflow:Rc,offset:[0,4],targetOffset:Nc},bottomRight:{points:["tr","br"],overflow:Rc,offset:[0,4],targetOffset:Nc}},w9=["arrow","prefixCls","transitionName","animation","align","placement","placements","getPopupContainer","showAction","hideAction","overlayClassName","overlayStyle","visible","trigger","autoFocus","overlay","children","onVisibleChange"];function $9(e,t){var n,r=e.arrow,a=r===void 0?!1:r,o=e.prefixCls,c=o===void 0?"rc-dropdown":o,u=e.transitionName,f=e.animation,d=e.align,h=e.placement,v=h===void 0?"bottomLeft":h,g=e.placements,b=g===void 0?C9:g,x=e.getPopupContainer,C=e.showAction,y=e.hideAction,w=e.overlayClassName,$=e.overlayStyle,E=e.visible,O=e.trigger,I=O===void 0?["hover"]:O,j=e.autoFocus,M=e.overlay,D=e.children,N=e.onVisibleChange,P=Kt(e,w9),A=Se.useState(),F=ce(A,2),H=F[0],k=F[1],L="visible"in e?E:H,T=Se.useRef(null),z=Se.useRef(null),V=Se.useRef(null);Se.useImperativeHandle(t,function(){return T.current});var q=function(re){k(re),N?.(re)};x9({visible:L,triggerRef:V,onVisibleChange:q,autoFocus:j,overlayRef:z});var G=function(re){var ie=e.onOverlayClick;k(!1),ie&&ie(re)},B=function(){return Se.createElement(S9,{ref:z,overlay:M,prefixCls:c,arrow:a})},U=function(){return typeof M=="function"?B:B()},K=function(){var re=e.minOverlayWidthMatchTrigger,ie=e.alignPoint;return"minOverlayWidthMatchTrigger"in e?re:!ie},Y=function(){var re=e.openClassName;return re!==void 0?re:"".concat(c,"-open")},Q=Se.cloneElement(D,{className:se((n=D.props)===null||n===void 0?void 0:n.className,L&&Y()),ref:Hi(D)?Ea(V,Vl(D)):void 0}),Z=y;return!Z&&I.indexOf("contextMenu")!==-1&&(Z=["click"]),Se.createElement(kf,Me({builtinPlacements:b},P,{prefixCls:c,ref:T,popupClassName:se(w,X({},"".concat(c,"-show-arrow"),a)),popupStyle:$,action:I,showAction:C,hideAction:Z,popupPlacement:v,popupAlign:d,popupTransitionName:u,popupAnimation:f,popupVisible:L,stretch:K()?"minWidth":"",popup:U(),onPopupVisibleChange:q,onPopupClick:G,getPopupContainer:x}),Q)}const oj=Se.forwardRef($9),E9=e=>typeof e!="object"&&typeof e!="function"||e===null;var lj=s.createContext(null);function sj(e,t){return e===void 0?null:"".concat(e,"-").concat(t)}function cj(e){var t=s.useContext(lj);return sj(t,e)}var _9=["children","locked"],Fi=s.createContext(null);function O9(e,t){var n=ee({},e);return Object.keys(t).forEach(function(r){var a=t[r];a!==void 0&&(n[r]=a)}),n}function yf(e){var t=e.children,n=e.locked,r=Kt(e,_9),a=s.useContext(Fi),o=Ds(function(){return O9(a,r)},[a,r],function(c,u){return!n&&(c[0]!==u[0]||!oo(c[1],u[1],!0))});return s.createElement(Fi.Provider,{value:o},t)}var I9=[],uj=s.createContext(null);function fg(){return s.useContext(uj)}var dj=s.createContext(I9);function gu(e){var t=s.useContext(dj);return s.useMemo(function(){return e!==void 0?[].concat(ke(t),[e]):t},[t,e])}var fj=s.createContext(null),QS=s.createContext({});function sO(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(fu(e)){var n=e.nodeName.toLowerCase(),r=["input","select","textarea","button"].includes(n)||e.isContentEditable||n==="a"&&!!e.getAttribute("href"),a=e.getAttribute("tabindex"),o=Number(a),c=null;return a&&!Number.isNaN(o)?c=o:r&&c===null&&(c=0),r&&e.disabled&&(c=null),c!==null&&(c>=0||t&&c<0)}return!1}function R9(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=ke(e.querySelectorAll("*")).filter(function(r){return sO(r,t)});return sO(e,t)&&n.unshift(e),n}var gx=Mt.LEFT,px=Mt.RIGHT,bx=Mt.UP,Uh=Mt.DOWN,Wh=Mt.ENTER,mj=Mt.ESC,wd=Mt.HOME,$d=Mt.END,cO=[bx,Uh,gx,px];function N9(e,t,n,r){var a,o="prev",c="next",u="children",f="parent";if(e==="inline"&&r===Wh)return{inlineTrigger:!0};var d=X(X({},bx,o),Uh,c),h=X(X(X(X({},gx,n?c:o),px,n?o:c),Uh,u),Wh,u),v=X(X(X(X(X(X({},bx,o),Uh,c),Wh,u),mj,f),gx,n?u:f),px,n?f:u),g={inline:d,horizontal:h,vertical:v,inlineSub:d,horizontalSub:v,verticalSub:v},b=(a=g["".concat(e).concat(t?"":"Sub")])===null||a===void 0?void 0:a[r];switch(b){case o:return{offset:-1,sibling:!0};case c:return{offset:1,sibling:!0};case f:return{offset:-1,sibling:!1};case u:return{offset:1,sibling:!1};default:return null}}function M9(e){for(var t=e;t;){if(t.getAttribute("data-menu-list"))return t;t=t.parentElement}return null}function j9(e,t){for(var n=e||document.activeElement;n;){if(t.has(n))return n;n=n.parentElement}return null}function ZS(e,t){var n=R9(e,!0);return n.filter(function(r){return t.has(r)})}function uO(e,t,n){var r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:1;if(!e)return null;var a=ZS(e,t),o=a.length,c=a.findIndex(function(u){return n===u});return r<0?c===-1?c=o-1:c-=1:r>0&&(c+=1),c=(c+o)%o,a[c]}var yx=function(t,n){var r=new Set,a=new Map,o=new Map;return t.forEach(function(c){var u=document.querySelector("[data-menu-id='".concat(sj(n,c),"']"));u&&(r.add(u),o.set(u,c),a.set(c,u))}),{elements:r,key2element:a,element2key:o}};function T9(e,t,n,r,a,o,c,u,f,d){var h=s.useRef(),v=s.useRef();v.current=t;var g=function(){hn.cancel(h.current)};return s.useEffect(function(){return function(){g()}},[]),function(b){var x=b.which;if([].concat(cO,[Wh,mj,wd,$d]).includes(x)){var C=o(),y=yx(C,r),w=y,$=w.elements,E=w.key2element,O=w.element2key,I=E.get(t),j=j9(I,$),M=O.get(j),D=N9(e,c(M,!0).length===1,n,x);if(!D&&x!==wd&&x!==$d)return;(cO.includes(x)||[wd,$d].includes(x))&&b.preventDefault();var N=function(z){if(z){var V=z,q=z.querySelector("a");q!=null&&q.getAttribute("href")&&(V=q);var G=O.get(z);u(G),g(),h.current=hn(function(){v.current===G&&V.focus()})}};if([wd,$d].includes(x)||D.sibling||!j){var P;!j||e==="inline"?P=a.current:P=M9(j);var A,F=ZS(P,$);x===wd?A=F[0]:x===$d?A=F[F.length-1]:A=uO(P,$,j,D.offset),N(A)}else if(D.inlineTrigger)f(M);else if(D.offset>0)f(M,!0),g(),h.current=hn(function(){y=yx(C,r);var T=j.getAttribute("aria-controls"),z=document.getElementById(T),V=uO(z,y.elements);N(V)},5);else if(D.offset<0){var H=c(M,!0),k=H[H.length-2],L=E.get(k);f(k,!1),N(L)}}d?.(b)}}function D9(e){Promise.resolve().then(e)}var JS="__RC_UTIL_PATH_SPLIT__",dO=function(t){return t.join(JS)},P9=function(t){return t.split(JS)},xx="rc-menu-more";function k9(){var e=s.useState({}),t=ce(e,2),n=t[1],r=s.useRef(new Map),a=s.useRef(new Map),o=s.useState([]),c=ce(o,2),u=c[0],f=c[1],d=s.useRef(0),h=s.useRef(!1),v=function(){h.current||n({})},g=s.useCallback(function(E,O){var I=dO(O);a.current.set(I,E),r.current.set(E,I),d.current+=1;var j=d.current;D9(function(){j===d.current&&v()})},[]),b=s.useCallback(function(E,O){var I=dO(O);a.current.delete(I),r.current.delete(E)},[]),x=s.useCallback(function(E){f(E)},[]),C=s.useCallback(function(E,O){var I=r.current.get(E)||"",j=P9(I);return O&&u.includes(j[0])&&j.unshift(xx),j},[u]),y=s.useCallback(function(E,O){return E.filter(function(I){return I!==void 0}).some(function(I){var j=C(I,!0);return j.includes(O)})},[C]),w=function(){var O=ke(r.current.keys());return u.length&&O.push(xx),O},$=s.useCallback(function(E){var O="".concat(r.current.get(E)).concat(JS),I=new Set;return ke(a.current.keys()).forEach(function(j){j.startsWith(O)&&I.add(a.current.get(j))}),I},[]);return s.useEffect(function(){return function(){h.current=!0}},[]),{registerPath:g,unregisterPath:b,refreshOverflowKeys:x,isSubPathKey:y,getKeyPath:C,getKeys:w,getSubPathKeys:$}}function Ad(e){var t=s.useRef(e);t.current=e;var n=s.useCallback(function(){for(var r,a=arguments.length,o=new Array(a),c=0;c1&&($.motionAppear=!1);var E=$.onVisibleChanged;return $.onVisibleChanged=function(O){return!g.current&&!O&&y(!0),E?.(O)},C?null:s.createElement(yf,{mode:o,locked:!g.current},s.createElement(Oi,Me({visible:w},$,{forceRender:f,removeOnLeave:!1,leavedClassName:"".concat(u,"-hidden")}),function(O){var I=O.className,j=O.style;return s.createElement(eC,{id:t,className:I,style:j},a)}))}var J9=["style","className","title","eventKey","warnKey","disabled","internalPopupClose","children","itemIcon","expandIcon","popupClassName","popupOffset","popupStyle","onClick","onMouseEnter","onMouseLeave","onTitleClick","onTitleMouseEnter","onTitleMouseLeave"],eV=["active"],tV=s.forwardRef(function(e,t){var n=e.style,r=e.className,a=e.title,o=e.eventKey;e.warnKey;var c=e.disabled,u=e.internalPopupClose,f=e.children,d=e.itemIcon,h=e.expandIcon,v=e.popupClassName,g=e.popupOffset,b=e.popupStyle,x=e.onClick,C=e.onMouseEnter,y=e.onMouseLeave,w=e.onTitleClick,$=e.onTitleMouseEnter,E=e.onTitleMouseLeave,O=Kt(e,J9),I=cj(o),j=s.useContext(Fi),M=j.prefixCls,D=j.mode,N=j.openKeys,P=j.disabled,A=j.overflowDisabled,F=j.activeKey,H=j.selectedKeys,k=j.itemIcon,L=j.expandIcon,T=j.onItemClick,z=j.onOpenChange,V=j.onActive,q=s.useContext(QS),G=q._internalRenderSubMenuItem,B=s.useContext(fj),U=B.isSubPathKey,K=gu(),Y="".concat(M,"-submenu"),Q=P||c,Z=s.useRef(),ae=s.useRef(),re=d??k,ie=h??L,ve=N.includes(o),ue=!A&&ve,oe=U(H,o),he=hj(o,Q,$,E),fe=he.active,me=Kt(he,eV),le=s.useState(!1),pe=ce(le,2),Ce=pe[0],De=pe[1],je=function(be){Q||De(be)},ge=function(be){je(!0),C?.({key:o,domEvent:be})},Ie=function(be){je(!1),y?.({key:o,domEvent:be})},Ee=s.useMemo(function(){return fe||(D!=="inline"?Ce||U([F],o):!1)},[D,fe,F,Ce,o,U]),we=vj(K.length),Fe=function(be){Q||(w?.({key:o,domEvent:be}),D==="inline"&&z(o,!ve))},He=Ad(function(Te){x?.(yv(Te)),T(Te)}),it=function(be){D!=="inline"&&z(o,be)},Ze=function(){V(o)},Ye=I&&"".concat(I,"-popup"),et=s.useMemo(function(){return s.createElement(gj,{icon:D!=="horizontal"?ie:void 0,props:ee(ee({},e),{},{isOpen:ue,isSubMenu:!0})},s.createElement("i",{className:"".concat(Y,"-arrow")}))},[D,ie,e,ue,Y]),Pe=s.createElement("div",Me({role:"menuitem",style:we,className:"".concat(Y,"-title"),tabIndex:Q?null:-1,ref:Z,title:typeof a=="string"?a:null,"data-menu-id":A&&I?null:I,"aria-expanded":ue,"aria-haspopup":!0,"aria-controls":Ye,"aria-disabled":Q,onClick:Fe,onFocus:Ze},me),a,et),Oe=s.useRef(D);if(D!=="inline"&&K.length>1?Oe.current="vertical":Oe.current=D,!A){var Be=Oe.current;Pe=s.createElement(Q9,{mode:Be,prefixCls:Y,visible:!u&&ue&&D!=="inline",popupClassName:v,popupOffset:g,popupStyle:b,popup:s.createElement(yf,{mode:Be==="horizontal"?"vertical":Be},s.createElement(eC,{id:Ye,ref:ae},f)),disabled:Q,onVisibleChange:it},Pe)}var $e=s.createElement(zi.Item,Me({ref:t,role:"none"},O,{component:"li",style:n,className:se(Y,"".concat(Y,"-").concat(D),r,X(X(X(X({},"".concat(Y,"-open"),ue),"".concat(Y,"-active"),Ee),"".concat(Y,"-selected"),oe),"".concat(Y,"-disabled"),Q)),onMouseEnter:ge,onMouseLeave:Ie}),Pe,!A&&s.createElement(Z9,{id:Ye,open:ue,keyPath:K},f));return G&&($e=G($e,e,{selected:oe,active:Ee,open:ue,disabled:Q})),s.createElement(yf,{onItemClick:He,mode:D==="horizontal"?"vertical":D,itemIcon:re,expandIcon:ie},$e)}),mg=s.forwardRef(function(e,t){var n=e.eventKey,r=e.children,a=gu(n),o=tC(r,a),c=fg();s.useEffect(function(){if(c)return c.registerPath(n,a),function(){c.unregisterPath(n,a)}},[a]);var u;return c?u=o:u=s.createElement(tV,Me({ref:t},e),o),s.createElement(dj.Provider,{value:a},u)});function nC(e){var t=e.className,n=e.style,r=s.useContext(Fi),a=r.prefixCls,o=fg();return o?null:s.createElement("li",{role:"separator",className:se("".concat(a,"-item-divider"),t),style:n})}var nV=["className","title","eventKey","children"],rV=s.forwardRef(function(e,t){var n=e.className,r=e.title;e.eventKey;var a=e.children,o=Kt(e,nV),c=s.useContext(Fi),u=c.prefixCls,f="".concat(u,"-item-group");return s.createElement("li",Me({ref:t,role:"presentation"},o,{onClick:function(h){return h.stopPropagation()},className:se(f,n)}),s.createElement("div",{role:"presentation",className:"".concat(f,"-title"),title:typeof r=="string"?r:void 0},r),s.createElement("ul",{role:"group",className:"".concat(f,"-list")},a))}),rC=s.forwardRef(function(e,t){var n=e.eventKey,r=e.children,a=gu(n),o=tC(r,a),c=fg();return c?o:s.createElement(rV,Me({ref:t},lr(e,["warnKey"])),o)}),aV=["label","children","key","type","extra"];function Sx(e,t,n){var r=t.item,a=t.group,o=t.submenu,c=t.divider;return(e||[]).map(function(u,f){if(u&&jt(u)==="object"){var d=u,h=d.label,v=d.children,g=d.key,b=d.type,x=d.extra,C=Kt(d,aV),y=g??"tmp-".concat(f);return v||b==="group"?b==="group"?s.createElement(a,Me({key:y},C,{title:h}),Sx(v,t,n)):s.createElement(o,Me({key:y},C,{title:h}),Sx(v,t,n)):b==="divider"?s.createElement(c,Me({key:y},C)):s.createElement(r,Me({key:y},C,{extra:x}),h,(!!x||x===0)&&s.createElement("span",{className:"".concat(n,"-item-extra")},x))}return null}).filter(function(u){return u})}function mO(e,t,n,r,a){var o=e,c=ee({divider:nC,item:Af,group:rC,submenu:mg},r);return t&&(o=Sx(t,c,a)),tC(o,n)}var iV=["prefixCls","rootClassName","style","className","tabIndex","items","children","direction","id","mode","inlineCollapsed","disabled","disabledOverflow","subMenuOpenDelay","subMenuCloseDelay","forceSubMenuRender","defaultOpenKeys","openKeys","activeKey","defaultActiveFirst","selectable","multiple","defaultSelectedKeys","selectedKeys","onSelect","onDeselect","inlineIndent","motion","defaultMotions","triggerSubMenuAction","builtinPlacements","itemIcon","expandIcon","overflowedIndicator","overflowedIndicatorPopupClassName","getPopupContainer","onClick","onOpenChange","onKeyDown","openAnimation","openTransitionName","_internalRenderMenuItem","_internalRenderSubMenuItem","_internalComponents"],fs=[],oV=s.forwardRef(function(e,t){var n,r=e,a=r.prefixCls,o=a===void 0?"rc-menu":a,c=r.rootClassName,u=r.style,f=r.className,d=r.tabIndex,h=d===void 0?0:d,v=r.items,g=r.children,b=r.direction,x=r.id,C=r.mode,y=C===void 0?"vertical":C,w=r.inlineCollapsed,$=r.disabled,E=r.disabledOverflow,O=r.subMenuOpenDelay,I=O===void 0?.1:O,j=r.subMenuCloseDelay,M=j===void 0?.1:j,D=r.forceSubMenuRender,N=r.defaultOpenKeys,P=r.openKeys,A=r.activeKey,F=r.defaultActiveFirst,H=r.selectable,k=H===void 0?!0:H,L=r.multiple,T=L===void 0?!1:L,z=r.defaultSelectedKeys,V=r.selectedKeys,q=r.onSelect,G=r.onDeselect,B=r.inlineIndent,U=B===void 0?24:B,K=r.motion,Y=r.defaultMotions,Q=r.triggerSubMenuAction,Z=Q===void 0?"hover":Q,ae=r.builtinPlacements,re=r.itemIcon,ie=r.expandIcon,ve=r.overflowedIndicator,ue=ve===void 0?"...":ve,oe=r.overflowedIndicatorPopupClassName,he=r.getPopupContainer,fe=r.onClick,me=r.onOpenChange,le=r.onKeyDown;r.openAnimation,r.openTransitionName;var pe=r._internalRenderMenuItem,Ce=r._internalRenderSubMenuItem,De=r._internalComponents,je=Kt(r,iV),ge=s.useMemo(function(){return[mO(g,v,fs,De,o),mO(g,v,fs,{},o)]},[g,v,De]),Ie=ce(ge,2),Ee=Ie[0],we=Ie[1],Fe=s.useState(!1),He=ce(Fe,2),it=He[0],Ze=He[1],Ye=s.useRef(),et=z9(x),Pe=b==="rtl",Oe=Wn(N,{value:P,postState:function(At){return At||fs}}),Be=ce(Oe,2),$e=Be[0],Te=Be[1],be=function(At){var zt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;function un(){Te(At),me?.(At)}zt?Li.flushSync(un):un()},ye=s.useState($e),Re=ce(ye,2),Ge=Re[0],ft=Re[1],$t=s.useRef(!1),Qe=s.useMemo(function(){return(y==="inline"||y==="vertical")&&w?["vertical",w]:[y,!1]},[y,w]),at=ce(Qe,2),mt=at[0],st=at[1],bt=mt==="inline",qt=s.useState(mt),Gt=ce(qt,2),vt=Gt[0],It=Gt[1],Et=s.useState(st),nt=ce(Et,2),Ue=nt[0],qe=nt[1];s.useEffect(function(){It(mt),qe(st),$t.current&&(bt?Te(Ge):be(fs))},[mt,st]);var ct=s.useState(0),Tt=ce(ct,2),Dt=Tt[0],Jt=Tt[1],ut=Dt>=Ee.length-1||vt!=="horizontal"||E;s.useEffect(function(){bt&&ft($e)},[$e]),s.useEffect(function(){return $t.current=!0,function(){$t.current=!1}},[]);var ot=k9(),Lt=ot.registerPath,tn=ot.unregisterPath,vn=ot.refreshOverflowKeys,cn=ot.isSubPathKey,En=ot.getKeyPath,rn=ot.getKeys,Sn=ot.getSubPathKeys,lt=s.useMemo(function(){return{registerPath:Lt,unregisterPath:tn}},[Lt,tn]),xt=s.useMemo(function(){return{isSubPathKey:cn}},[cn]);s.useEffect(function(){vn(ut?fs:Ee.slice(Dt+1).map(function(On){return On.key}))},[Dt,ut]);var Bt=Wn(A||F&&((n=Ee[0])===null||n===void 0?void 0:n.key),{value:A}),kt=ce(Bt,2),gt=kt[0],_t=kt[1],Zt=Ad(function(On){_t(On)}),on=Ad(function(){_t(void 0)});s.useImperativeHandle(t,function(){return{list:Ye.current,focus:function(At){var zt,un=rn(),Nt=yx(un,et),Pt=Nt.elements,yn=Nt.key2element,Ln=Nt.element2key,sr=ZS(Ye.current,Pt),Pr=gt??(sr[0]?Ln.get(sr[0]):(zt=Ee.find(function(gn){return!gn.props.disabled}))===null||zt===void 0?void 0:zt.key),cr=yn.get(Pr);if(Pr&&cr){var kr;cr==null||(kr=cr.focus)===null||kr===void 0||kr.call(cr,At)}}}});var yt=Wn(z||[],{value:V,postState:function(At){return Array.isArray(At)?At:At==null?fs:[At]}}),Ht=ce(yt,2),nn=Ht[0],Xn=Ht[1],br=function(At){if(k){var zt=At.key,un=nn.includes(zt),Nt;T?un?Nt=nn.filter(function(yn){return yn!==zt}):Nt=[].concat(ke(nn),[zt]):Nt=[zt],Xn(Nt);var Pt=ee(ee({},At),{},{selectedKeys:Nt});un?G?.(Pt):q?.(Pt)}!T&&$e.length&&vt!=="inline"&&be(fs)},wr=Ad(function(On){fe?.(yv(On)),br(On)}),$r=Ad(function(On,At){var zt=$e.filter(function(Nt){return Nt!==On});if(At)zt.push(On);else if(vt!=="inline"){var un=Sn(On);zt=zt.filter(function(Nt){return!un.has(Nt)})}oo($e,zt,!0)||be(zt,!0)}),Yn=function(At,zt){var un=zt??!$e.includes(At);$r(At,un)},Gn=T9(vt,gt,Pe,et,Ye,rn,En,_t,Yn,le);s.useEffect(function(){Ze(!0)},[]);var Dr=s.useMemo(function(){return{_internalRenderMenuItem:pe,_internalRenderSubMenuItem:Ce}},[pe,Ce]),Hr=vt!=="horizontal"||E?Ee:Ee.map(function(On,At){return s.createElement(yf,{key:On.key,overflowDisabled:At>Dt},On)}),Nr=s.createElement(zi,Me({id:x,ref:Ye,prefixCls:"".concat(o,"-overflow"),component:"ul",itemComponent:Af,className:se(o,"".concat(o,"-root"),"".concat(o,"-").concat(vt),f,X(X({},"".concat(o,"-inline-collapsed"),Ue),"".concat(o,"-rtl"),Pe),c),dir:b,style:u,role:"menu",tabIndex:h,data:Hr,renderRawItem:function(At){return At},renderRawRest:function(At){var zt=At.length,un=zt?Ee.slice(-zt):null;return s.createElement(mg,{eventKey:xx,title:ue,disabled:ut,internalPopupClose:zt===0,popupClassName:oe},un)},maxCount:vt!=="horizontal"||E?zi.INVALIDATE:zi.RESPONSIVE,ssr:"full","data-menu-list":!0,onVisibleChange:function(At){Jt(At)},onKeyDown:Gn},je));return s.createElement(QS.Provider,{value:Dr},s.createElement(lj.Provider,{value:et},s.createElement(yf,{prefixCls:o,rootClassName:c,mode:vt,openKeys:$e,rtl:Pe,disabled:$,motion:it?K:null,defaultMotions:it?Y:null,activeKey:gt,onActive:Zt,onInactive:on,selectedKeys:nn,inlineIndent:U,subMenuOpenDelay:I,subMenuCloseDelay:M,forceSubMenuRender:D,builtinPlacements:ae,triggerSubMenuAction:Z,getPopupContainer:he,itemIcon:re,expandIcon:ie,onItemClick:wr,onOpenChange:$r},s.createElement(fj.Provider,{value:xt},Nr),s.createElement("div",{style:{display:"none"},"aria-hidden":!0},s.createElement(uj.Provider,{value:lt},we)))))}),pu=oV;pu.Item=Af;pu.SubMenu=mg;pu.ItemGroup=rC;pu.Divider=nC;var lV={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M912 192H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 284H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 284H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM104 228a56 56 0 10112 0 56 56 0 10-112 0zm0 284a56 56 0 10112 0 56 56 0 10-112 0zm0 284a56 56 0 10112 0 56 56 0 10-112 0z"}}]},name:"bars",theme:"outlined"},sV=function(t,n){return s.createElement($n,Me({},t,{ref:n,icon:lV}))},cV=s.forwardRef(sV);const bj=s.createContext({siderHook:{addSider:()=>null,removeSider:()=>null}}),uV=e=>{const{antCls:t,componentCls:n,colorText:r,footerBg:a,headerHeight:o,headerPadding:c,headerColor:u,footerPadding:f,fontSize:d,bodyBg:h,headerBg:v}=e;return{[n]:{display:"flex",flex:"auto",flexDirection:"column",minHeight:0,background:h,"&, *":{boxSizing:"border-box"},[`&${n}-has-sider`]:{flexDirection:"row",[`> ${n}, > ${n}-content`]:{width:0}},[`${n}-header, &${n}-footer`]:{flex:"0 0 auto"},"&-rtl":{direction:"rtl"}},[`${n}-header`]:{height:o,padding:c,color:u,lineHeight:te(o),background:v,[`${t}-menu`]:{lineHeight:"inherit"}},[`${n}-footer`]:{padding:f,color:r,fontSize:d,background:a},[`${n}-content`]:{flex:"auto",color:r,minHeight:0}}},yj=e=>{const{colorBgLayout:t,controlHeight:n,controlHeightLG:r,colorText:a,controlHeightSM:o,marginXXS:c,colorTextLightSolid:u,colorBgContainer:f}=e,d=r*1.25;return{colorBgHeader:"#001529",colorBgBody:t,colorBgTrigger:"#002140",bodyBg:t,headerBg:"#001529",headerHeight:n*2,headerPadding:`0 ${d}px`,headerColor:a,footerPadding:`${o}px ${d}px`,footerBg:t,siderBg:"#001529",triggerHeight:r+c*2,triggerBg:"#002140",triggerColor:u,zeroTriggerWidth:r,zeroTriggerHeight:r,lightSiderBg:f,lightTriggerBg:f,lightTriggerColor:a}},xj=[["colorBgBody","bodyBg"],["colorBgHeader","headerBg"],["colorBgTrigger","triggerBg"]],Sj=Kn("Layout",uV,yj,{deprecatedTokens:xj}),dV=e=>{const{componentCls:t,siderBg:n,motionDurationMid:r,motionDurationSlow:a,antCls:o,triggerHeight:c,triggerColor:u,triggerBg:f,headerHeight:d,zeroTriggerWidth:h,zeroTriggerHeight:v,borderRadiusLG:g,lightSiderBg:b,lightTriggerColor:x,lightTriggerBg:C,bodyBg:y}=e;return{[t]:{position:"relative",minWidth:0,background:n,transition:`all ${r}, background 0s`,"&-has-trigger":{paddingBottom:c},"&-right":{order:1},[`${t}-children`]:{height:"100%",marginTop:-.1,paddingTop:.1,[`${o}-menu${o}-menu-inline-collapsed`]:{width:"auto"}},[`&-zero-width ${t}-children`]:{overflow:"hidden"},[`${t}-trigger`]:{position:"fixed",bottom:0,zIndex:1,height:c,color:u,lineHeight:te(c),textAlign:"center",background:f,cursor:"pointer",transition:`all ${r}`},[`${t}-zero-width-trigger`]:{position:"absolute",top:d,insetInlineEnd:e.calc(h).mul(-1).equal(),zIndex:1,width:h,height:v,color:u,fontSize:e.fontSizeXL,display:"flex",alignItems:"center",justifyContent:"center",background:n,borderRadius:`0 ${te(g)} ${te(g)} 0`,cursor:"pointer",transition:`background ${a} ease`,"&::after":{position:"absolute",inset:0,background:"transparent",transition:`all ${a}`,content:'""'},"&:hover::after":{background:"rgba(255, 255, 255, 0.2)"},"&-right":{insetInlineStart:e.calc(h).mul(-1).equal(),borderRadius:`${te(g)} 0 0 ${te(g)}`}},"&-light":{background:b,[`${t}-trigger`]:{color:x,background:C},[`${t}-zero-width-trigger`]:{color:x,background:C,border:`1px solid ${y}`,borderInlineStart:0}}}}},fV=Kn(["Layout","Sider"],dV,yj,{deprecatedTokens:xj});var mV=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,r=Object.getOwnPropertySymbols(e);a!Number.isNaN(Number.parseFloat(e))&&Number.isFinite(Number(e)),hg=s.createContext({}),vV=(()=>{let e=0;return(t="")=>(e+=1,`${t}${e}`)})(),Cj=s.forwardRef((e,t)=>{const{prefixCls:n,className:r,trigger:a,children:o,defaultCollapsed:c=!1,theme:u="dark",style:f={},collapsible:d=!1,reverseArrow:h=!1,width:v=200,collapsedWidth:g=80,zeroWidthTriggerStyle:b,breakpoint:x,onCollapse:C,onBreakpoint:y}=e,w=mV(e,["prefixCls","className","trigger","children","defaultCollapsed","theme","style","collapsible","reverseArrow","width","collapsedWidth","zeroWidthTriggerStyle","breakpoint","onCollapse","onBreakpoint"]),{siderHook:$}=s.useContext(bj),[E,O]=s.useState("collapsed"in e?e.collapsed:c),[I,j]=s.useState(!1);s.useEffect(()=>{"collapsed"in e&&O(e.collapsed)},[e.collapsed]);const M=(re,ie)=>{"collapsed"in e||O(re),C?.(re,ie)},{getPrefixCls:D,direction:N}=s.useContext(Wt),P=D("layout-sider",n),[A,F,H]=fV(P),k=s.useRef(null);k.current=re=>{j(re.matches),y?.(re.matches),E!==re.matches&&M(re.matches,"responsive")},s.useEffect(()=>{function re(ve){var ue;return(ue=k.current)===null||ue===void 0?void 0:ue.call(k,ve)}let ie;return typeof window?.matchMedia<"u"&&x&&x in hO&&(ie=window.matchMedia(`screen and (max-width: ${hO[x]})`),XM(ie,re),re(ie)),()=>{QM(ie,re)}},[x]),s.useEffect(()=>{const re=vV("ant-sider-");return $.addSider(re),()=>$.removeSider(re)},[]);const L=()=>{M(!E,"clickTrigger")},T=lr(w,["collapsed"]),z=E?g:v,V=hV(z)?`${z}px`:String(z),q=Number.parseFloat(String(g||0))===0?s.createElement("span",{onClick:L,className:se(`${P}-zero-width-trigger`,`${P}-zero-width-trigger-${h?"right":"left"}`),style:b},a||s.createElement(cV,null)):null,G=N==="rtl"==!h,K={expanded:G?s.createElement(hf,null):s.createElement(bf,null),collapsed:G?s.createElement(bf,null):s.createElement(hf,null)}[E?"collapsed":"expanded"],Y=a!==null?q||s.createElement("div",{className:`${P}-trigger`,onClick:L,style:{width:V}},a||K):null,Q=Object.assign(Object.assign({},f),{flex:`0 0 ${V}`,maxWidth:V,minWidth:V,width:V}),Z=se(P,`${P}-${u}`,{[`${P}-collapsed`]:!!E,[`${P}-has-trigger`]:d&&a!==null&&!q,[`${P}-below`]:!!I,[`${P}-zero-width`]:Number.parseFloat(V)===0},r,F,H),ae=s.useMemo(()=>({siderCollapsed:E}),[E]);return A(s.createElement(hg.Provider,{value:ae},s.createElement("aside",Object.assign({className:Z},T,{style:Q,ref:t}),s.createElement("div",{className:`${P}-children`},o),d||I&&q?Y:null)))});var gV={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M176 511a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0z"}}]},name:"ellipsis",theme:"outlined"},pV=function(t,n){return s.createElement($n,Me({},t,{ref:n,icon:gV}))},aC=s.forwardRef(pV);const xv=s.createContext({prefixCls:"",firstLevel:!0,inlineCollapsed:!1});var bV=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,r=Object.getOwnPropertySymbols(e);a{const{prefixCls:t,className:n,dashed:r}=e,a=bV(e,["prefixCls","className","dashed"]),{getPrefixCls:o}=s.useContext(Wt),c=o("menu",t),u=se({[`${c}-item-divider-dashed`]:!!r},n);return s.createElement(nC,Object.assign({className:u},a))},$j=e=>{var t;const{className:n,children:r,icon:a,title:o,danger:c,extra:u}=e,{prefixCls:f,firstLevel:d,direction:h,disableMenuItemTitleTooltip:v,inlineCollapsed:g}=s.useContext(xv),b=E=>{const O=r?.[0],I=s.createElement("span",{className:se(`${f}-title-content`,{[`${f}-title-content-with-extra`]:!!u||u===0})},r);return(!a||s.isValidElement(r)&&r.type==="span")&&r&&E&&d&&typeof O=="string"?s.createElement("div",{className:`${f}-inline-collapsed-noicon`},O.charAt(0)):I},{siderCollapsed:x}=s.useContext(hg);let C=o;typeof o>"u"?C=d?r:"":o===!1&&(C="");const y={title:C};!x&&!g&&(y.title=null,y.open=!1);const w=Ma(r).length;let $=s.createElement(Af,Object.assign({},lr(e,["title","icon","danger"]),{className:se({[`${f}-item-danger`]:c,[`${f}-item-only-child`]:(a?w+1:w)===1},n),title:typeof o=="string"?o:void 0}),$a(a,{className:se(s.isValidElement(a)?(t=a.props)===null||t===void 0?void 0:t.className:void 0,`${f}-item-icon`)}),b(g));return v||($=s.createElement(Ei,Object.assign({},y,{placement:h==="rtl"?"left":"right",classNames:{root:`${f}-inline-collapsed-tooltip`}}),$)),$};var yV=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,r=Object.getOwnPropertySymbols(e);a{const{children:n}=e,r=yV(e,["children"]),a=s.useContext(Sv),o=s.useMemo(()=>Object.assign(Object.assign({},a),r),[a,r.prefixCls,r.mode,r.selectable,r.rootClassName]),c=W6(n),u=Fl(t,c?Vl(n):null);return s.createElement(Sv.Provider,{value:o},s.createElement(Go,{space:!0},c?s.cloneElement(n,{ref:u}):n))}),xV=e=>{const{componentCls:t,motionDurationSlow:n,horizontalLineHeight:r,colorSplit:a,lineWidth:o,lineType:c,itemPaddingInline:u}=e;return{[`${t}-horizontal`]:{lineHeight:r,border:0,borderBottom:`${te(o)} ${c} ${a}`,boxShadow:"none","&::after":{display:"block",clear:"both",height:0,content:'"\\20"'},[`${t}-item, ${t}-submenu`]:{position:"relative",display:"inline-block",verticalAlign:"bottom",paddingInline:u},[`> ${t}-item:hover, + > ${t}-item-active, + > ${t}-submenu ${t}-submenu-title:hover`]:{backgroundColor:"transparent"},[`${t}-item, ${t}-submenu-title`]:{transition:[`border-color ${n}`,`background ${n}`].join(",")},[`${t}-submenu-arrow`]:{display:"none"}}}},SV=({componentCls:e,menuArrowOffset:t,calc:n})=>({[`${e}-rtl`]:{direction:"rtl"},[`${e}-submenu-rtl`]:{transformOrigin:"100% 0"},[`${e}-rtl${e}-vertical, + ${e}-submenu-rtl ${e}-vertical`]:{[`${e}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateY(${te(n(t).mul(-1).equal())})`},"&::after":{transform:`rotate(45deg) translateY(${te(t)})`}}}}),vO=e=>so(e),gO=(e,t)=>{const{componentCls:n,itemColor:r,itemSelectedColor:a,subMenuItemSelectedColor:o,groupTitleColor:c,itemBg:u,subMenuItemBg:f,itemSelectedBg:d,activeBarHeight:h,activeBarWidth:v,activeBarBorderWidth:g,motionDurationSlow:b,motionEaseInOut:x,motionEaseOut:C,itemPaddingInline:y,motionDurationMid:w,itemHoverColor:$,lineType:E,colorSplit:O,itemDisabledColor:I,dangerItemColor:j,dangerItemHoverColor:M,dangerItemSelectedColor:D,dangerItemActiveBg:N,dangerItemSelectedBg:P,popupBg:A,itemHoverBg:F,itemActiveBg:H,menuSubMenuBg:k,horizontalItemSelectedColor:L,horizontalItemSelectedBg:T,horizontalItemBorderRadius:z,horizontalItemHoverBg:V}=e;return{[`${n}-${t}, ${n}-${t} > ${n}`]:{color:r,background:u,[`&${n}-root:focus-visible`]:Object.assign({},vO(e)),[`${n}-item`]:{"&-group-title, &-extra":{color:c}},[`${n}-submenu-selected > ${n}-submenu-title`]:{color:o},[`${n}-item, ${n}-submenu-title`]:{color:r,[`&:not(${n}-item-disabled):focus-visible`]:Object.assign({},vO(e))},[`${n}-item-disabled, ${n}-submenu-disabled`]:{color:`${I} !important`},[`${n}-item:not(${n}-item-selected):not(${n}-submenu-selected)`]:{[`&:hover, > ${n}-submenu-title:hover`]:{color:$}},[`&:not(${n}-horizontal)`]:{[`${n}-item:not(${n}-item-selected)`]:{"&:hover":{backgroundColor:F},"&:active":{backgroundColor:H}},[`${n}-submenu-title`]:{"&:hover":{backgroundColor:F},"&:active":{backgroundColor:H}}},[`${n}-item-danger`]:{color:j,[`&${n}-item:hover`]:{[`&:not(${n}-item-selected):not(${n}-submenu-selected)`]:{color:M}},[`&${n}-item:active`]:{background:N}},[`${n}-item a`]:{"&, &:hover":{color:"inherit"}},[`${n}-item-selected`]:{color:a,[`&${n}-item-danger`]:{color:D},"a, a:hover":{color:"inherit"}},[`& ${n}-item-selected`]:{backgroundColor:d,[`&${n}-item-danger`]:{backgroundColor:P}},[`&${n}-submenu > ${n}`]:{backgroundColor:k},[`&${n}-popup > ${n}`]:{backgroundColor:A},[`&${n}-submenu-popup > ${n}`]:{backgroundColor:A},[`&${n}-horizontal`]:Object.assign(Object.assign({},t==="dark"?{borderBottom:0}:{}),{[`> ${n}-item, > ${n}-submenu`]:{top:g,marginTop:e.calc(g).mul(-1).equal(),marginBottom:0,borderRadius:z,"&::after":{position:"absolute",insetInline:y,bottom:0,borderBottom:`${te(h)} solid transparent`,transition:`border-color ${b} ${x}`,content:'""'},"&:hover, &-active, &-open":{background:V,"&::after":{borderBottomWidth:h,borderBottomColor:L}},"&-selected":{color:L,backgroundColor:T,"&:hover":{backgroundColor:T},"&::after":{borderBottomWidth:h,borderBottomColor:L}}}}),[`&${n}-root`]:{[`&${n}-inline, &${n}-vertical`]:{borderInlineEnd:`${te(g)} ${E} ${O}`}},[`&${n}-inline`]:{[`${n}-sub${n}-inline`]:{background:f},[`${n}-item`]:{position:"relative","&::after":{position:"absolute",insetBlock:0,insetInlineEnd:0,borderInlineEnd:`${te(v)} solid ${a}`,transform:"scaleY(0.0001)",opacity:0,transition:[`transform ${w} ${C}`,`opacity ${w} ${C}`].join(","),content:'""'},[`&${n}-item-danger`]:{"&::after":{borderInlineEndColor:D}}},[`${n}-selected, ${n}-item-selected`]:{"&::after":{transform:"scaleY(1)",opacity:1,transition:[`transform ${w} ${x}`,`opacity ${w} ${x}`].join(",")}}}}}},pO=e=>{const{componentCls:t,itemHeight:n,itemMarginInline:r,padding:a,menuArrowSize:o,marginXS:c,itemMarginBlock:u,itemWidth:f,itemPaddingInline:d}=e,h=e.calc(o).add(a).add(c).equal();return{[`${t}-item`]:{position:"relative",overflow:"hidden"},[`${t}-item, ${t}-submenu-title`]:{height:n,lineHeight:te(n),paddingInline:d,overflow:"hidden",textOverflow:"ellipsis",marginInline:r,marginBlock:u,width:f},[`> ${t}-item, + > ${t}-submenu > ${t}-submenu-title`]:{height:n,lineHeight:te(n)},[`${t}-item-group-list ${t}-submenu-title, + ${t}-submenu-title`]:{paddingInlineEnd:h}}},CV=e=>{const{componentCls:t,iconCls:n,itemHeight:r,colorTextLightSolid:a,dropdownWidth:o,controlHeightLG:c,motionEaseOut:u,paddingXL:f,itemMarginInline:d,fontSizeLG:h,motionDurationFast:v,motionDurationSlow:g,paddingXS:b,boxShadowSecondary:x,collapsedWidth:C,collapsedIconSize:y}=e,w={height:r,lineHeight:te(r),listStylePosition:"inside",listStyleType:"disc"};return[{[t]:{"&-inline, &-vertical":Object.assign({[`&${t}-root`]:{boxShadow:"none"}},pO(e))},[`${t}-submenu-popup`]:{[`${t}-vertical`]:Object.assign(Object.assign({},pO(e)),{boxShadow:x})}},{[`${t}-submenu-popup ${t}-vertical${t}-sub`]:{minWidth:o,maxHeight:`calc(100vh - ${te(e.calc(c).mul(2.5).equal())})`,padding:"0",overflow:"hidden",borderInlineEnd:0,"&:not([class*='-active'])":{overflowX:"hidden",overflowY:"auto"}}},{[`${t}-inline`]:{width:"100%",[`&${t}-root`]:{[`${t}-item, ${t}-submenu-title`]:{display:"flex",alignItems:"center",transition:[`border-color ${g}`,`background ${g}`,`padding ${v} ${u}`].join(","),[`> ${t}-title-content`]:{flex:"auto",minWidth:0,overflow:"hidden",textOverflow:"ellipsis"},"> *":{flex:"none"}}},[`${t}-sub${t}-inline`]:{padding:0,border:0,borderRadius:0,boxShadow:"none",[`& > ${t}-submenu > ${t}-submenu-title`]:w,[`& ${t}-item-group-title`]:{paddingInlineStart:f}},[`${t}-item`]:w}},{[`${t}-inline-collapsed`]:{width:C,[`&${t}-root`]:{[`${t}-item, ${t}-submenu ${t}-submenu-title`]:{[`> ${t}-inline-collapsed-noicon`]:{fontSize:h,textAlign:"center"}}},[`> ${t}-item, + > ${t}-item-group > ${t}-item-group-list > ${t}-item, + > ${t}-item-group > ${t}-item-group-list > ${t}-submenu > ${t}-submenu-title, + > ${t}-submenu > ${t}-submenu-title`]:{insetInlineStart:0,paddingInline:`calc(50% - ${te(e.calc(y).div(2).equal())} - ${te(d)})`,textOverflow:"clip",[` + ${t}-submenu-arrow, + ${t}-submenu-expand-icon + `]:{opacity:0},[`${t}-item-icon, ${n}`]:{margin:0,fontSize:y,lineHeight:te(r),"+ span":{display:"inline-block",opacity:0}}},[`${t}-item-icon, ${n}`]:{display:"inline-block"},"&-tooltip":{pointerEvents:"none",[`${t}-item-icon, ${n}`]:{display:"none"},"a, a:hover":{color:a}},[`${t}-item-group-title`]:Object.assign(Object.assign({},Bi),{paddingInline:b})}}]},bO=e=>{const{componentCls:t,motionDurationSlow:n,motionDurationMid:r,motionEaseInOut:a,motionEaseOut:o,iconCls:c,iconSize:u,iconMarginInlineEnd:f}=e;return{[`${t}-item, ${t}-submenu-title`]:{position:"relative",display:"block",margin:0,whiteSpace:"nowrap",cursor:"pointer",transition:[`border-color ${n}`,`background ${n}`,`padding calc(${n} + 0.1s) ${a}`].join(","),[`${t}-item-icon, ${c}`]:{minWidth:u,fontSize:u,transition:[`font-size ${r} ${o}`,`margin ${n} ${a}`,`color ${n}`].join(","),"+ span":{marginInlineStart:f,opacity:1,transition:[`opacity ${n} ${a}`,`margin ${n}`,`color ${n}`].join(",")}},[`${t}-item-icon`]:Object.assign({},lu()),[`&${t}-item-only-child`]:{[`> ${c}, > ${t}-item-icon`]:{marginInlineEnd:0}}},[`${t}-item-disabled, ${t}-submenu-disabled`]:{background:"none !important",cursor:"not-allowed","&::after":{borderColor:"transparent !important"},a:{color:"inherit !important",cursor:"not-allowed",pointerEvents:"none"},[`> ${t}-submenu-title`]:{color:"inherit !important",cursor:"not-allowed"}}}},yO=e=>{const{componentCls:t,motionDurationSlow:n,motionEaseInOut:r,borderRadius:a,menuArrowSize:o,menuArrowOffset:c}=e;return{[`${t}-submenu`]:{"&-expand-icon, &-arrow":{position:"absolute",top:"50%",insetInlineEnd:e.margin,width:o,color:"currentcolor",transform:"translateY(-50%)",transition:`transform ${n} ${r}, opacity ${n}`},"&-arrow":{"&::before, &::after":{position:"absolute",width:e.calc(o).mul(.6).equal(),height:e.calc(o).mul(.15).equal(),backgroundColor:"currentcolor",borderRadius:a,transition:[`background ${n} ${r}`,`transform ${n} ${r}`,`top ${n} ${r}`,`color ${n} ${r}`].join(","),content:'""'},"&::before":{transform:`rotate(45deg) translateY(${te(e.calc(c).mul(-1).equal())})`},"&::after":{transform:`rotate(-45deg) translateY(${te(c)})`}}}}},wV=e=>{const{antCls:t,componentCls:n,fontSize:r,motionDurationSlow:a,motionDurationMid:o,motionEaseInOut:c,paddingXS:u,padding:f,colorSplit:d,lineWidth:h,zIndexPopup:v,borderRadiusLG:g,subMenuItemBorderRadius:b,menuArrowSize:x,menuArrowOffset:C,lineType:y,groupTitleLineHeight:w,groupTitleFontSize:$}=e;return[{"":{[n]:Object.assign(Object.assign({},Uo()),{"&-hidden":{display:"none"}})},[`${n}-submenu-hidden`]:{display:"none"}},{[n]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},zn(e)),Uo()),{marginBottom:0,paddingInlineStart:0,fontSize:r,lineHeight:0,listStyle:"none",outline:"none",transition:`width ${a} cubic-bezier(0.2, 0, 0, 1) 0s`,"ul, ol":{margin:0,padding:0,listStyle:"none"},"&-overflow":{display:"flex",[`${n}-item`]:{flex:"none"}},[`${n}-item, ${n}-submenu, ${n}-submenu-title`]:{borderRadius:e.itemBorderRadius},[`${n}-item-group-title`]:{padding:`${te(u)} ${te(f)}`,fontSize:$,lineHeight:w,transition:`all ${a}`},[`&-horizontal ${n}-submenu`]:{transition:[`border-color ${a} ${c}`,`background ${a} ${c}`].join(",")},[`${n}-submenu, ${n}-submenu-inline`]:{transition:[`border-color ${a} ${c}`,`background ${a} ${c}`,`padding ${o} ${c}`].join(",")},[`${n}-submenu ${n}-sub`]:{cursor:"initial",transition:[`background ${a} ${c}`,`padding ${a} ${c}`].join(",")},[`${n}-title-content`]:{transition:`color ${a}`,"&-with-extra":{display:"inline-flex",alignItems:"center",width:"100%"},[`> ${t}-typography-ellipsis-single-line`]:{display:"inline",verticalAlign:"unset"},[`${n}-item-extra`]:{marginInlineStart:"auto",paddingInlineStart:e.padding}},[`${n}-item a`]:{"&::before":{position:"absolute",inset:0,backgroundColor:"transparent",content:'""'}},[`${n}-item-divider`]:{overflow:"hidden",lineHeight:0,borderColor:d,borderStyle:y,borderWidth:0,borderTopWidth:h,marginBlock:h,padding:0,"&-dashed":{borderStyle:"dashed"}}}),bO(e)),{[`${n}-item-group`]:{[`${n}-item-group-list`]:{margin:0,padding:0,[`${n}-item, ${n}-submenu-title`]:{paddingInline:`${te(e.calc(r).mul(2).equal())} ${te(f)}`}}},"&-submenu":{"&-popup":{position:"absolute",zIndex:v,borderRadius:g,boxShadow:"none",transformOrigin:"0 0",[`&${n}-submenu`]:{background:"transparent"},"&::before":{position:"absolute",inset:0,zIndex:-1,width:"100%",height:"100%",opacity:0,content:'""'},[`> ${n}`]:Object.assign(Object.assign(Object.assign({borderRadius:g},bO(e)),yO(e)),{[`${n}-item, ${n}-submenu > ${n}-submenu-title`]:{borderRadius:b},[`${n}-submenu-title::after`]:{transition:`transform ${a} ${c}`}})},"\n &-placement-leftTop,\n &-placement-bottomRight,\n ":{transformOrigin:"100% 0"},"\n &-placement-leftBottom,\n &-placement-topRight,\n ":{transformOrigin:"100% 100%"},"\n &-placement-rightBottom,\n &-placement-topLeft,\n ":{transformOrigin:"0 100%"},"\n &-placement-bottomLeft,\n &-placement-rightTop,\n ":{transformOrigin:"0 0"},"\n &-placement-leftTop,\n &-placement-leftBottom\n ":{paddingInlineEnd:e.paddingXS},"\n &-placement-rightTop,\n &-placement-rightBottom\n ":{paddingInlineStart:e.paddingXS},"\n &-placement-topRight,\n &-placement-topLeft\n ":{paddingBottom:e.paddingXS},"\n &-placement-bottomRight,\n &-placement-bottomLeft\n ":{paddingTop:e.paddingXS}}}),yO(e)),{[`&-inline-collapsed ${n}-submenu-arrow, + &-inline ${n}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateX(${te(C)})`},"&::after":{transform:`rotate(45deg) translateX(${te(e.calc(C).mul(-1).equal())})`}},[`${n}-submenu-open${n}-submenu-inline > ${n}-submenu-title > ${n}-submenu-arrow`]:{transform:`translateY(${te(e.calc(x).mul(.2).mul(-1).equal())})`,"&::after":{transform:`rotate(-45deg) translateX(${te(e.calc(C).mul(-1).equal())})`},"&::before":{transform:`rotate(45deg) translateX(${te(C)})`}}})},{[`${t}-layout-header`]:{[n]:{lineHeight:"inherit"}}}]},$V=e=>{var t,n,r;const{colorPrimary:a,colorError:o,colorTextDisabled:c,colorErrorBg:u,colorText:f,colorTextDescription:d,colorBgContainer:h,colorFillAlter:v,colorFillContent:g,lineWidth:b,lineWidthBold:x,controlItemBgActive:C,colorBgTextHover:y,controlHeightLG:w,lineHeight:$,colorBgElevated:E,marginXXS:O,padding:I,fontSize:j,controlHeightSM:M,fontSizeLG:D,colorTextLightSolid:N,colorErrorHover:P}=e,A=(t=e.activeBarWidth)!==null&&t!==void 0?t:0,F=(n=e.activeBarBorderWidth)!==null&&n!==void 0?n:b,H=(r=e.itemMarginInline)!==null&&r!==void 0?r:e.marginXXS,k=new Pn(N).setA(.65).toRgbString();return{dropdownWidth:160,zIndexPopup:e.zIndexPopupBase+50,radiusItem:e.borderRadiusLG,itemBorderRadius:e.borderRadiusLG,radiusSubMenuItem:e.borderRadiusSM,subMenuItemBorderRadius:e.borderRadiusSM,colorItemText:f,itemColor:f,colorItemTextHover:f,itemHoverColor:f,colorItemTextHoverHorizontal:a,horizontalItemHoverColor:a,colorGroupTitle:d,groupTitleColor:d,colorItemTextSelected:a,itemSelectedColor:a,subMenuItemSelectedColor:a,colorItemTextSelectedHorizontal:a,horizontalItemSelectedColor:a,colorItemBg:h,itemBg:h,colorItemBgHover:y,itemHoverBg:y,colorItemBgActive:g,itemActiveBg:C,colorSubItemBg:v,subMenuItemBg:v,colorItemBgSelected:C,itemSelectedBg:C,colorItemBgSelectedHorizontal:"transparent",horizontalItemSelectedBg:"transparent",colorActiveBarWidth:0,activeBarWidth:A,colorActiveBarHeight:x,activeBarHeight:x,colorActiveBarBorderSize:b,activeBarBorderWidth:F,colorItemTextDisabled:c,itemDisabledColor:c,colorDangerItemText:o,dangerItemColor:o,colorDangerItemTextHover:o,dangerItemHoverColor:o,colorDangerItemTextSelected:o,dangerItemSelectedColor:o,colorDangerItemBgActive:u,dangerItemActiveBg:u,colorDangerItemBgSelected:u,dangerItemSelectedBg:u,itemMarginInline:H,horizontalItemBorderRadius:0,horizontalItemHoverBg:"transparent",itemHeight:w,groupTitleLineHeight:$,collapsedWidth:w*2,popupBg:E,itemMarginBlock:O,itemPaddingInline:I,horizontalLineHeight:`${w*1.15}px`,iconSize:j,iconMarginInlineEnd:M-j,collapsedIconSize:D,groupTitleFontSize:j,darkItemDisabledColor:new Pn(N).setA(.25).toRgbString(),darkItemColor:k,darkDangerItemColor:o,darkItemBg:"#001529",darkPopupBg:"#001529",darkSubMenuItemBg:"#000c17",darkItemSelectedColor:N,darkItemSelectedBg:a,darkDangerItemSelectedBg:o,darkItemHoverBg:"transparent",darkGroupTitleColor:k,darkItemHoverColor:N,darkDangerItemHoverColor:P,darkDangerItemSelectedColor:N,darkDangerItemActiveBg:o,itemWidth:A?`calc(100% + ${F}px)`:`calc(100% - ${H*2}px)`}},EV=(e,t=e,n=!0)=>Kn("Menu",a=>{const{colorBgElevated:o,controlHeightLG:c,fontSize:u,darkItemColor:f,darkDangerItemColor:d,darkItemBg:h,darkSubMenuItemBg:v,darkItemSelectedColor:g,darkItemSelectedBg:b,darkDangerItemSelectedBg:x,darkItemHoverBg:C,darkGroupTitleColor:y,darkItemHoverColor:w,darkItemDisabledColor:$,darkDangerItemHoverColor:E,darkDangerItemSelectedColor:O,darkDangerItemActiveBg:I,popupBg:j,darkPopupBg:M}=a,D=a.calc(u).div(7).mul(5).equal(),N=xn(a,{menuArrowSize:D,menuHorizontalHeight:a.calc(c).mul(1.15).equal(),menuArrowOffset:a.calc(D).mul(.25).equal(),menuSubMenuBg:o,calc:a.calc,popupBg:j}),P=xn(N,{itemColor:f,itemHoverColor:w,groupTitleColor:y,itemSelectedColor:g,subMenuItemSelectedColor:g,itemBg:h,popupBg:M,subMenuItemBg:v,itemActiveBg:"transparent",itemSelectedBg:b,activeBarHeight:0,activeBarBorderWidth:0,itemHoverBg:C,itemDisabledColor:$,dangerItemColor:d,dangerItemHoverColor:E,dangerItemSelectedColor:O,dangerItemActiveBg:I,dangerItemSelectedBg:x,menuSubMenuBg:v,horizontalItemSelectedColor:g,horizontalItemSelectedBg:b});return[wV(N),xV(N),CV(N),gO(N,"light"),gO(P,"dark"),SV(N),qv(N),co(N,"slide-up"),co(N,"slide-down"),TS(N,"zoom-big")]},$V,{deprecatedTokens:[["colorGroupTitle","groupTitleColor"],["radiusItem","itemBorderRadius"],["radiusSubMenuItem","subMenuItemBorderRadius"],["colorItemText","itemColor"],["colorItemTextHover","itemHoverColor"],["colorItemTextHoverHorizontal","horizontalItemHoverColor"],["colorItemTextSelected","itemSelectedColor"],["colorItemTextSelectedHorizontal","horizontalItemSelectedColor"],["colorItemTextDisabled","itemDisabledColor"],["colorDangerItemText","dangerItemColor"],["colorDangerItemTextHover","dangerItemHoverColor"],["colorDangerItemTextSelected","dangerItemSelectedColor"],["colorDangerItemBgActive","dangerItemActiveBg"],["colorDangerItemBgSelected","dangerItemSelectedBg"],["colorItemBg","itemBg"],["colorItemBgHover","itemHoverBg"],["colorSubItemBg","subMenuItemBg"],["colorItemBgActive","itemActiveBg"],["colorItemBgSelectedHorizontal","horizontalItemSelectedBg"],["colorActiveBarWidth","activeBarWidth"],["colorActiveBarHeight","activeBarHeight"],["colorActiveBarBorderSize","activeBarBorderWidth"],["colorItemBgSelected","itemSelectedBg"]],injectStyle:n,unitless:{groupTitleLineHeight:!0}})(e,t),_j=e=>{var t;const{popupClassName:n,icon:r,title:a,theme:o}=e,c=s.useContext(xv),{prefixCls:u,inlineCollapsed:f,theme:d}=c,h=gu();let v;if(!r)v=f&&!h.length&&a&&typeof a=="string"?s.createElement("div",{className:`${u}-inline-collapsed-noicon`},a.charAt(0)):s.createElement("span",{className:`${u}-title-content`},a);else{const x=s.isValidElement(a)&&a.type==="span";v=s.createElement(s.Fragment,null,$a(r,{className:se(s.isValidElement(r)?(t=r.props)===null||t===void 0?void 0:t.className:void 0,`${u}-item-icon`)}),x?a:s.createElement("span",{className:`${u}-title-content`},a))}const g=s.useMemo(()=>Object.assign(Object.assign({},c),{firstLevel:!1}),[c]),[b]=du("Menu");return s.createElement(xv.Provider,{value:g},s.createElement(mg,Object.assign({},lr(e,["icon"]),{title:v,popupClassName:se(u,n,`${u}-${o||d}`),popupStyle:Object.assign({zIndex:b},e.popupStyle)})))};var _V=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,r=Object.getOwnPropertySymbols(e);a{var n;const r=s.useContext(Sv),a=r||{},{getPrefixCls:o,getPopupContainer:c,direction:u,menu:f}=s.useContext(Wt),d=o(),{prefixCls:h,className:v,style:g,theme:b="light",expandIcon:x,_internalDisableMenuItemTitleTooltip:C,inlineCollapsed:y,siderCollapsed:w,rootClassName:$,mode:E,selectable:O,onClick:I,overflowedIndicatorPopupClassName:j}=e,M=_V(e,["prefixCls","className","style","theme","expandIcon","_internalDisableMenuItemTitleTooltip","inlineCollapsed","siderCollapsed","rootClassName","mode","selectable","onClick","overflowedIndicatorPopupClassName"]),D=lr(M,["collapsedWidth"]);(n=a.validator)===null||n===void 0||n.call(a,{mode:E});const N=pn((...U)=>{var K;I?.apply(void 0,U),(K=a.onClick)===null||K===void 0||K.call(a)}),P=a.mode||E,A=O??a.selectable,F=y??w,H={horizontal:{motionName:`${d}-slide-up`},inline:ff(d),other:{motionName:`${d}-zoom-big`}},k=o("menu",h||a.prefixCls),L=oa(k),[T,z,V]=EV(k,L,!r),q=se(`${k}-${b}`,f?.className,v),G=s.useMemo(()=>{var U,K;if(typeof x=="function"||Ry(x))return x||null;if(typeof a.expandIcon=="function"||Ry(a.expandIcon))return a.expandIcon||null;if(typeof f?.expandIcon=="function"||Ry(f?.expandIcon))return f?.expandIcon||null;const Y=(U=x??a?.expandIcon)!==null&&U!==void 0?U:f?.expandIcon;return $a(Y,{className:se(`${k}-submenu-expand-icon`,s.isValidElement(Y)?(K=Y.props)===null||K===void 0?void 0:K.className:void 0)})},[x,a?.expandIcon,f?.expandIcon,k]),B=s.useMemo(()=>({prefixCls:k,inlineCollapsed:F||!1,direction:u,firstLevel:!0,theme:b,mode:P,disableMenuItemTitleTooltip:C}),[k,F,u,C,b]);return T(s.createElement(Sv.Provider,{value:null},s.createElement(xv.Provider,{value:B},s.createElement(pu,Object.assign({getPopupContainer:c,overflowedIndicator:s.createElement(aC,null),overflowedIndicatorPopupClassName:se(k,`${k}-${b}`,j),mode:P,selectable:A,onClick:N},D,{inlineCollapsed:F,style:Object.assign(Object.assign({},f?.style),g),className:q,prefixCls:k,direction:u,defaultMotions:H,expandIcon:G,ref:t,rootClassName:se($,z,a.rootClassName,V,L),_internalComponents:OV})))))}),As=s.forwardRef((e,t)=>{const n=s.useRef(null),r=s.useContext(hg);return s.useImperativeHandle(t,()=>({menu:n.current,focus:a=>{var o;(o=n.current)===null||o===void 0||o.focus(a)}})),s.createElement(IV,Object.assign({ref:n},e,r))});As.Item=$j;As.SubMenu=_j;As.Divider=wj;As.ItemGroup=rC;const RV=e=>{const{componentCls:t,menuCls:n,colorError:r,colorTextLightSolid:a}=e,o=`${n}-item`;return{[`${t}, ${t}-menu-submenu`]:{[`${n} ${o}`]:{[`&${o}-danger:not(${o}-disabled)`]:{color:r,"&:hover":{color:a,backgroundColor:r}}}}}},NV=e=>{const{componentCls:t,menuCls:n,zIndexPopup:r,dropdownArrowDistance:a,sizePopupArrow:o,antCls:c,iconCls:u,motionDurationMid:f,paddingBlock:d,fontSize:h,dropdownEdgeChildPadding:v,colorTextDisabled:g,fontSizeIcon:b,controlPaddingHorizontal:x,colorBgElevated:C}=e;return[{[t]:{position:"absolute",top:-9999,left:{_skip_check_:!0,value:-9999},zIndex:r,display:"block","&::before":{position:"absolute",insetBlock:e.calc(o).div(2).sub(a).equal(),zIndex:-9999,opacity:1e-4,content:'""'},"&-menu-vertical":{maxHeight:"100vh",overflowY:"auto"},[`&-trigger${c}-btn`]:{[`& > ${u}-down, & > ${c}-btn-icon > ${u}-down`]:{fontSize:b}},[`${t}-wrap`]:{position:"relative",[`${c}-btn > ${u}-down`]:{fontSize:b},[`${u}-down::before`]:{transition:`transform ${f}`}},[`${t}-wrap-open`]:{[`${u}-down::before`]:{transform:"rotate(180deg)"}},"\n &-hidden,\n &-menu-hidden,\n &-menu-submenu-hidden\n ":{display:"none"},[`&${c}-slide-down-enter${c}-slide-down-enter-active${t}-placement-bottomLeft, + &${c}-slide-down-appear${c}-slide-down-appear-active${t}-placement-bottomLeft, + &${c}-slide-down-enter${c}-slide-down-enter-active${t}-placement-bottom, + &${c}-slide-down-appear${c}-slide-down-appear-active${t}-placement-bottom, + &${c}-slide-down-enter${c}-slide-down-enter-active${t}-placement-bottomRight, + &${c}-slide-down-appear${c}-slide-down-appear-active${t}-placement-bottomRight`]:{animationName:Gv},[`&${c}-slide-up-enter${c}-slide-up-enter-active${t}-placement-topLeft, + &${c}-slide-up-appear${c}-slide-up-appear-active${t}-placement-topLeft, + &${c}-slide-up-enter${c}-slide-up-enter-active${t}-placement-top, + &${c}-slide-up-appear${c}-slide-up-appear-active${t}-placement-top, + &${c}-slide-up-enter${c}-slide-up-enter-active${t}-placement-topRight, + &${c}-slide-up-appear${c}-slide-up-appear-active${t}-placement-topRight`]:{animationName:Qv},[`&${c}-slide-down-leave${c}-slide-down-leave-active${t}-placement-bottomLeft, + &${c}-slide-down-leave${c}-slide-down-leave-active${t}-placement-bottom, + &${c}-slide-down-leave${c}-slide-down-leave-active${t}-placement-bottomRight`]:{animationName:Xv},[`&${c}-slide-up-leave${c}-slide-up-leave-active${t}-placement-topLeft, + &${c}-slide-up-leave${c}-slide-up-leave-active${t}-placement-top, + &${c}-slide-up-leave${c}-slide-up-leave-active${t}-placement-topRight`]:{animationName:Zv}}},tj(e,C,{arrowPlacement:{top:!0,bottom:!0}}),{[`${t} ${n}`]:{position:"relative",margin:0},[`${n}-submenu-popup`]:{position:"absolute",zIndex:r,background:"transparent",boxShadow:"none",transformOrigin:"0 0","ul, li":{listStyle:"none",margin:0}},[`${t}, ${t}-menu-submenu`]:Object.assign(Object.assign({},zn(e)),{[n]:Object.assign(Object.assign({padding:v,listStyleType:"none",backgroundColor:C,backgroundClip:"padding-box",borderRadius:e.borderRadiusLG,outline:"none",boxShadow:e.boxShadowSecondary},Wo(e)),{"&:empty":{padding:0,boxShadow:"none"},[`${n}-item-group-title`]:{padding:`${te(d)} ${te(x)}`,color:e.colorTextDescription,transition:`all ${f}`},[`${n}-item`]:{position:"relative",display:"flex",alignItems:"center"},[`${n}-item-icon`]:{minWidth:h,marginInlineEnd:e.marginXS,fontSize:e.fontSizeSM},[`${n}-title-content`]:{flex:"auto","&-with-extra":{display:"inline-flex",alignItems:"center",width:"100%"},"> a":{color:"inherit",transition:`all ${f}`,"&:hover":{color:"inherit"},"&::after":{position:"absolute",inset:0,content:'""'}},[`${n}-item-extra`]:{paddingInlineStart:e.padding,marginInlineStart:"auto",fontSize:e.fontSizeSM,color:e.colorTextDescription}},[`${n}-item, ${n}-submenu-title`]:Object.assign(Object.assign({display:"flex",margin:0,padding:`${te(d)} ${te(x)}`,color:e.colorText,fontWeight:"normal",fontSize:h,lineHeight:e.lineHeight,cursor:"pointer",transition:`all ${f}`,borderRadius:e.borderRadiusSM,"&:hover, &-active":{backgroundColor:e.controlItemBgHover}},Wo(e)),{"&-selected":{color:e.colorPrimary,backgroundColor:e.controlItemBgActive,"&:hover, &-active":{backgroundColor:e.controlItemBgActiveHover}},"&-disabled":{color:g,cursor:"not-allowed","&:hover":{color:g,backgroundColor:C,cursor:"not-allowed"},a:{pointerEvents:"none"}},"&-divider":{height:1,margin:`${te(e.marginXXS)} 0`,overflow:"hidden",lineHeight:0,backgroundColor:e.colorSplit},[`${t}-menu-submenu-expand-icon`]:{position:"absolute",insetInlineEnd:e.paddingXS,[`${t}-menu-submenu-arrow-icon`]:{marginInlineEnd:"0 !important",color:e.colorIcon,fontSize:b,fontStyle:"normal"}}}),[`${n}-item-group-list`]:{margin:`0 ${te(e.marginXS)}`,padding:0,listStyle:"none"},[`${n}-submenu-title`]:{paddingInlineEnd:e.calc(x).add(e.fontSizeSM).equal()},[`${n}-submenu-vertical`]:{position:"relative"},[`${n}-submenu${n}-submenu-disabled ${t}-menu-submenu-title`]:{[`&, ${t}-menu-submenu-arrow-icon`]:{color:g,backgroundColor:C,cursor:"not-allowed"}},[`${n}-submenu-selected ${t}-menu-submenu-title`]:{color:e.colorPrimary}})})},[co(e,"slide-up"),co(e,"slide-down"),au(e,"move-up"),au(e,"move-down"),TS(e,"zoom-big")]]},MV=e=>Object.assign(Object.assign({zIndexPopup:e.zIndexPopupBase+50,paddingBlock:(e.controlHeight-e.fontSize*e.lineHeight)/2},XS({contentRadius:e.borderRadiusLG,limitVerticalRadius:!0})),GS(e)),jV=Kn("Dropdown",e=>{const{marginXXS:t,sizePopupArrow:n,paddingXXS:r,componentCls:a}=e,o=xn(e,{menuCls:`${a}-menu`,dropdownArrowDistance:e.calc(n).div(2).add(t).equal(),dropdownEdgeChildPadding:r});return[NV(o),RV(o)]},MV,{resetStyle:!1}),vg=e=>{var t;const{menu:n,arrow:r,prefixCls:a,children:o,trigger:c,disabled:u,dropdownRender:f,popupRender:d,getPopupContainer:h,overlayClassName:v,rootClassName:g,overlayStyle:b,open:x,onOpenChange:C,visible:y,onVisibleChange:w,mouseEnterDelay:$=.15,mouseLeaveDelay:E=.1,autoAdjustOverflow:O=!0,placement:I="",overlay:j,transitionName:M,destroyOnHidden:D,destroyPopupOnHide:N}=e,{getPopupContainer:P,getPrefixCls:A,direction:F,dropdown:H}=s.useContext(Wt),k=d||f;Kl();const L=s.useMemo(()=>{const pe=A();return M!==void 0?M:I.includes("top")?`${pe}-slide-down`:`${pe}-slide-up`},[A,I,M]),T=s.useMemo(()=>I?I.includes("Center")?I.slice(0,I.indexOf("Center")):I:F==="rtl"?"bottomRight":"bottomLeft",[I,F]),z=A("dropdown",a),V=oa(z),[q,G,B]=jV(z,V),[,U]=Ta(),K=s.Children.only(E9(o)?s.createElement("span",null,o):o),Y=$a(K,{className:se(`${z}-trigger`,{[`${z}-rtl`]:F==="rtl"},K.props.className),disabled:(t=K.props.disabled)!==null&&t!==void 0?t:u}),Q=u?[]:c,Z=!!Q?.includes("contextMenu"),[ae,re]=Wn(!1,{value:x??y}),ie=pn(pe=>{C?.(pe,{source:"trigger"}),w?.(pe),re(pe)}),ve=se(v,g,G,B,V,H?.className,{[`${z}-rtl`]:F==="rtl"}),ue=nj({arrowPointAtCenter:typeof r=="object"&&r.pointAtCenter,autoAdjustOverflow:O,offset:U.marginXXS,arrowWidth:r?U.sizePopupArrow:0,borderRadius:U.borderRadius}),oe=pn(()=>{n?.selectable&&n?.multiple||(C?.(!1,{source:"menu"}),re(!1))}),he=()=>{let pe;return n?.items?pe=s.createElement(As,Object.assign({},n)):typeof j=="function"?pe=j():pe=j,k&&(pe=k(pe)),pe=s.Children.only(typeof pe=="string"?s.createElement("span",null,pe):pe),s.createElement(Ej,{prefixCls:`${z}-menu`,rootClassName:se(B,V),expandIcon:s.createElement("span",{className:`${z}-menu-submenu-arrow`},F==="rtl"?s.createElement(bf,{className:`${z}-menu-submenu-arrow-icon`}):s.createElement(hf,{className:`${z}-menu-submenu-arrow-icon`})),mode:"vertical",selectable:!1,onClick:oe,validator:({mode:Ce})=>{}},pe)},[fe,me]=du("Dropdown",b?.zIndex);let le=s.createElement(oj,Object.assign({alignPoint:Z},lr(e,["rootClassName"]),{mouseEnterDelay:$,mouseLeaveDelay:E,visible:ae,builtinPlacements:ue,arrow:!!r,overlayClassName:ve,prefixCls:z,getPopupContainer:h||P,transitionName:L,trigger:Q,overlay:he,placement:T,onVisibleChange:ie,overlayStyle:Object.assign(Object.assign(Object.assign({},H?.style),b),{zIndex:fe}),autoDestroy:D??N}),Y);return fe&&(le=s.createElement(IS.Provider,{value:me},le)),q(le)},TV=lg(vg,"align",void 0,"dropdown",e=>e),DV=e=>s.createElement(TV,Object.assign({},e),s.createElement("span",null));vg._InternalPanelDoNotUseOrYouWillBeFired=DV;var qh={exports:{}},PV=qh.exports,xO;function kV(){return xO||(xO=1,(function(e,t){(function(n,r){e.exports=r()})(PV,(function(){var n=1e3,r=6e4,a=36e5,o="millisecond",c="second",u="minute",f="hour",d="day",h="week",v="month",g="quarter",b="year",x="date",C="Invalid Date",y=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,w=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,$={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(k){var L=["th","st","nd","rd"],T=k%100;return"["+k+(L[(T-20)%10]||L[T]||L[0])+"]"}},E=function(k,L,T){var z=String(k);return!z||z.length>=L?k:""+Array(L+1-z.length).join(T)+k},O={s:E,z:function(k){var L=-k.utcOffset(),T=Math.abs(L),z=Math.floor(T/60),V=T%60;return(L<=0?"+":"-")+E(z,2,"0")+":"+E(V,2,"0")},m:function k(L,T){if(L.date()1)return k(G[0])}else{var B=L.name;j[B]=L,V=B}return!z&&V&&(I=V),V||!z&&I},P=function(k,L){if(D(k))return k.clone();var T=typeof L=="object"?L:{};return T.date=k,T.args=arguments,new F(T)},A=O;A.l=N,A.i=D,A.w=function(k,L){return P(k,{locale:L.$L,utc:L.$u,x:L.$x,$offset:L.$offset})};var F=(function(){function k(T){this.$L=N(T.locale,null,!0),this.parse(T),this.$x=this.$x||T.x||{},this[M]=!0}var L=k.prototype;return L.parse=function(T){this.$d=(function(z){var V=z.date,q=z.utc;if(V===null)return new Date(NaN);if(A.u(V))return new Date;if(V instanceof Date)return new Date(V);if(typeof V=="string"&&!/Z$/i.test(V)){var G=V.match(y);if(G){var B=G[2]-1||0,U=(G[7]||"0").substring(0,3);return q?new Date(Date.UTC(G[1],B,G[3]||1,G[4]||0,G[5]||0,G[6]||0,U)):new Date(G[1],B,G[3]||1,G[4]||0,G[5]||0,G[6]||0,U)}}return new Date(V)})(T),this.init()},L.init=function(){var T=this.$d;this.$y=T.getFullYear(),this.$M=T.getMonth(),this.$D=T.getDate(),this.$W=T.getDay(),this.$H=T.getHours(),this.$m=T.getMinutes(),this.$s=T.getSeconds(),this.$ms=T.getMilliseconds()},L.$utils=function(){return A},L.isValid=function(){return this.$d.toString()!==C},L.isSame=function(T,z){var V=P(T);return this.startOf(z)<=V&&V<=this.endOf(z)},L.isAfter=function(T,z){return P(T)25){var h=c(this).startOf(r).add(1,r).date(d),v=c(this).endOf(n);if(h.isBefore(v))return 1}var g=c(this).startOf(r).date(d).startOf(n).subtract(1,"millisecond"),b=this.diff(g,n,!0);return b<0?c(this).startOf("week").week():Math.ceil(b)},u.weeks=function(f){return f===void 0&&(f=null),this.week(f)}}}))})(Xh)),Xh.exports}var YV=qV();const GV=Wi(YV);var Qh={exports:{}},XV=Qh.exports,$O;function QV(){return $O||($O=1,(function(e,t){(function(n,r){e.exports=r()})(XV,(function(){return function(n,r){r.prototype.weekYear=function(){var a=this.month(),o=this.week(),c=this.year();return o===1&&a===11?c+1:a===0&&o>=52?c-1:c}}}))})(Qh)),Qh.exports}var ZV=QV();const JV=Wi(ZV);var Zh={exports:{}},eK=Zh.exports,EO;function tK(){return EO||(EO=1,(function(e,t){(function(n,r){e.exports=r()})(eK,(function(){return function(n,r){var a=r.prototype,o=a.format;a.format=function(c){var u=this,f=this.$locale();if(!this.isValid())return o.bind(this)(c);var d=this.$utils(),h=(c||"YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,(function(v){switch(v){case"Q":return Math.ceil((u.$M+1)/3);case"Do":return f.ordinal(u.$D);case"gggg":return u.weekYear();case"GGGG":return u.isoWeekYear();case"wo":return f.ordinal(u.week(),"W");case"w":case"ww":return d.s(u.week(),v==="w"?1:2,"0");case"W":case"WW":return d.s(u.isoWeek(),v==="W"?1:2,"0");case"k":case"kk":return d.s(String(u.$H===0?24:u.$H),v==="k"?1:2,"0");case"X":return Math.floor(u.$d.getTime()/1e3);case"x":return u.$d.getTime();case"z":return"["+u.offsetName()+"]";case"zzz":return"["+u.offsetName("long")+"]";default:return v}}));return o.bind(this)(h)}}}))})(Zh)),Zh.exports}var nK=tK();const rK=Wi(nK);var Jh={exports:{}},aK=Jh.exports,_O;function iK(){return _O||(_O=1,(function(e,t){(function(n,r){e.exports=r()})(aK,(function(){var n={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},r=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,a=/\d/,o=/\d\d/,c=/\d\d?/,u=/\d*[^-_:/,()\s\d]+/,f={},d=function(y){return(y=+y)+(y>68?1900:2e3)},h=function(y){return function(w){this[y]=+w}},v=[/[+-]\d\d:?(\d\d)?|Z/,function(y){(this.zone||(this.zone={})).offset=(function(w){if(!w||w==="Z")return 0;var $=w.match(/([+-]|\d\d)/g),E=60*$[1]+(+$[2]||0);return E===0?0:$[0]==="+"?-E:E})(y)}],g=function(y){var w=f[y];return w&&(w.indexOf?w:w.s.concat(w.f))},b=function(y,w){var $,E=f.meridiem;if(E){for(var O=1;O<=24;O+=1)if(y.indexOf(E(O,0,w))>-1){$=O>12;break}}else $=y===(w?"pm":"PM");return $},x={A:[u,function(y){this.afternoon=b(y,!1)}],a:[u,function(y){this.afternoon=b(y,!0)}],Q:[a,function(y){this.month=3*(y-1)+1}],S:[a,function(y){this.milliseconds=100*+y}],SS:[o,function(y){this.milliseconds=10*+y}],SSS:[/\d{3}/,function(y){this.milliseconds=+y}],s:[c,h("seconds")],ss:[c,h("seconds")],m:[c,h("minutes")],mm:[c,h("minutes")],H:[c,h("hours")],h:[c,h("hours")],HH:[c,h("hours")],hh:[c,h("hours")],D:[c,h("day")],DD:[o,h("day")],Do:[u,function(y){var w=f.ordinal,$=y.match(/\d+/);if(this.day=$[0],w)for(var E=1;E<=31;E+=1)w(E).replace(/\[|\]/g,"")===y&&(this.day=E)}],w:[c,h("week")],ww:[o,h("week")],M:[c,h("month")],MM:[o,h("month")],MMM:[u,function(y){var w=g("months"),$=(g("monthsShort")||w.map((function(E){return E.slice(0,3)}))).indexOf(y)+1;if($<1)throw new Error;this.month=$%12||$}],MMMM:[u,function(y){var w=g("months").indexOf(y)+1;if(w<1)throw new Error;this.month=w%12||w}],Y:[/[+-]?\d+/,h("year")],YY:[o,function(y){this.year=d(y)}],YYYY:[/\d{4}/,h("year")],Z:v,ZZ:v};function C(y){var w,$;w=y,$=f&&f.formats;for(var E=(y=w.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(P,A,F){var H=F&&F.toUpperCase();return A||$[F]||n[F]||$[H].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(k,L,T){return L||T.slice(1)}))}))).match(r),O=E.length,I=0;I-1)return new Date((V==="X"?1e3:1)*z);var B=C(V)(z),U=B.year,K=B.month,Y=B.day,Q=B.hours,Z=B.minutes,ae=B.seconds,re=B.milliseconds,ie=B.zone,ve=B.week,ue=new Date,oe=Y||(U||K?1:ue.getDate()),he=U||ue.getFullYear(),fe=0;U&&!K||(fe=K>0?K-1:ue.getMonth());var me,le=Q||0,pe=Z||0,Ce=ae||0,De=re||0;return ie?new Date(Date.UTC(he,fe,oe,le,pe,Ce,De+60*ie.offset*1e3)):q?new Date(Date.UTC(he,fe,oe,le,pe,Ce,De)):(me=new Date(he,fe,oe,le,pe,Ce,De),ve&&(me=G(me).week(ve).toDate()),me)}catch{return new Date("")}})(j,N,M,$),this.init(),H&&H!==!0&&(this.$L=this.locale(H).$L),F&&j!=this.format(N)&&(this.$d=new Date("")),f={}}else if(N instanceof Array)for(var k=N.length,L=1;L<=k;L+=1){D[1]=N[L-1];var T=$.apply(this,D);if(T.isValid()){this.$d=T.$d,this.$L=T.$L,this.init();break}L===k&&(this.$d=new Date(""))}else O.call(this,I)}}}))})(Jh)),Jh.exports}var oK=iK();const lK=Wi(oK);Wa.extend(lK);Wa.extend(rK);Wa.extend(BV);Wa.extend(UV);Wa.extend(GV);Wa.extend(JV);Wa.extend(function(e,t){var n=t.prototype,r=n.format;n.format=function(o){var c=(o||"").replace("Wo","wo");return r.bind(this)(c)}});var sK={bn_BD:"bn-bd",by_BY:"be",en_GB:"en-gb",en_US:"en",fr_BE:"fr",fr_CA:"fr-ca",hy_AM:"hy-am",kmr_IQ:"ku",nl_BE:"nl-be",pt_BR:"pt-br",zh_CN:"zh-cn",zh_HK:"zh-hk",zh_TW:"zh-tw"},ms=function(t){var n=sK[t];return n||t.split("_")[0]},cK={getNow:function(){var t=Wa();return typeof t.tz=="function"?t.tz():t},getFixedDate:function(t){return Wa(t,["YYYY-M-DD","YYYY-MM-DD"])},getEndDate:function(t){return t.endOf("month")},getWeekDay:function(t){var n=t.locale("en");return n.weekday()+n.localeData().firstDayOfWeek()},getYear:function(t){return t.year()},getMonth:function(t){return t.month()},getDate:function(t){return t.date()},getHour:function(t){return t.hour()},getMinute:function(t){return t.minute()},getSecond:function(t){return t.second()},getMillisecond:function(t){return t.millisecond()},addYear:function(t,n){return t.add(n,"year")},addMonth:function(t,n){return t.add(n,"month")},addDate:function(t,n){return t.add(n,"day")},setYear:function(t,n){return t.year(n)},setMonth:function(t,n){return t.month(n)},setDate:function(t,n){return t.date(n)},setHour:function(t,n){return t.hour(n)},setMinute:function(t,n){return t.minute(n)},setSecond:function(t,n){return t.second(n)},setMillisecond:function(t,n){return t.millisecond(n)},isAfter:function(t,n){return t.isAfter(n)},isValidate:function(t){return t.isValid()},locale:{getWeekFirstDay:function(t){return Wa().locale(ms(t)).localeData().firstDayOfWeek()},getWeekFirstDate:function(t,n){return n.locale(ms(t)).weekday(0)},getWeek:function(t,n){return n.locale(ms(t)).week()},getShortWeekDays:function(t){return Wa().locale(ms(t)).localeData().weekdaysMin()},getShortMonths:function(t){return Wa().locale(ms(t)).localeData().monthsShort()},format:function(t,n,r){return n.locale(ms(t)).format(r)},parse:function(t,n,r){for(var a=ms(t),o=0;o2&&arguments[2]!==void 0?arguments[2]:"0",r=String(e);r.length2&&arguments[2]!==void 0?arguments[2]:[],r=s.useState([!1,!1]),a=ce(r,2),o=a[0],c=a[1],u=function(h,v){c(function(g){return Wd(g,v,h)})},f=s.useMemo(function(){return o.map(function(d,h){if(d)return!0;var v=e[h];return v?!!(!n[h]&&!v||v&&t(v,{activeIndex:h})):!1})},[e,o,t,n]);return[f,u]}function jj(e,t,n,r,a){var o="",c=[];return e&&c.push(a?"hh":"HH"),t&&c.push("mm"),n&&c.push("ss"),o=c.join(":"),r&&(o+=".SSS"),a&&(o+=" A"),o}function fK(e,t,n,r,a,o){var c=e.fieldDateTimeFormat,u=e.fieldDateFormat,f=e.fieldTimeFormat,d=e.fieldMonthFormat,h=e.fieldYearFormat,v=e.fieldWeekFormat,g=e.fieldQuarterFormat,b=e.yearFormat,x=e.cellYearFormat,C=e.cellQuarterFormat,y=e.dayFormat,w=e.cellDateFormat,$=jj(t,n,r,a,o);return ee(ee({},e),{},{fieldDateTimeFormat:c||"YYYY-MM-DD ".concat($),fieldDateFormat:u||"YYYY-MM-DD",fieldTimeFormat:f||$,fieldMonthFormat:d||"YYYY-MM",fieldYearFormat:h||"YYYY",fieldWeekFormat:v||"gggg-wo",fieldQuarterFormat:g||"YYYY-[Q]Q",yearFormat:b||"YYYY",cellYearFormat:x||"YYYY",cellQuarterFormat:C||"[Q]Q",cellDateFormat:w||y||"D"})}function Tj(e,t){var n=t.showHour,r=t.showMinute,a=t.showSecond,o=t.showMillisecond,c=t.use12Hours;return Se.useMemo(function(){return fK(e,n,r,a,o,c)},[e,n,r,a,o,c])}function Ed(e,t,n){return n??t.some(function(r){return e.includes(r)})}var mK=["showNow","showHour","showMinute","showSecond","showMillisecond","use12Hours","hourStep","minuteStep","secondStep","millisecondStep","hideDisabledOptions","defaultValue","disabledHours","disabledMinutes","disabledSeconds","disabledMilliseconds","disabledTime","changeOnScroll","defaultOpenValue"];function hK(e){var t=gg(e,mK),n=e.format,r=e.picker,a=null;return n&&(a=n,Array.isArray(a)&&(a=a[0]),a=jt(a)==="object"?a.format:a),r==="time"&&(t.format=a),[t,a]}function vK(e){return e&&typeof e=="string"}function Dj(e,t,n,r){return[e,t,n,r].some(function(a){return a!==void 0})}function Pj(e,t,n,r,a){var o=t,c=n,u=r;if(!e&&!o&&!c&&!u&&!a)o=!0,c=!0,u=!0;else if(e){var f,d,h,v=[o,c,u].some(function(x){return x===!1}),g=[o,c,u].some(function(x){return x===!0}),b=v?!0:!g;o=(f=o)!==null&&f!==void 0?f:b,c=(d=c)!==null&&d!==void 0?d:b,u=(h=u)!==null&&h!==void 0?h:b}return[o,c,u,a]}function kj(e){var t=e.showTime,n=hK(e),r=ce(n,2),a=r[0],o=r[1],c=t&&jt(t)==="object"?t:{},u=ee(ee({defaultOpenValue:c.defaultOpenValue||c.defaultValue},a),c),f=u.showMillisecond,d=u.showHour,h=u.showMinute,v=u.showSecond,g=Dj(d,h,v,f),b=Pj(g,d,h,v,f),x=ce(b,3);return d=x[0],h=x[1],v=x[2],[u,ee(ee({},u),{},{showHour:d,showMinute:h,showSecond:v,showMillisecond:f}),u.format,o]}function Aj(e,t,n,r,a){var o=e==="time";if(e==="datetime"||o){for(var c=r,u=Ij(e,a,null),f=u,d=[t,n],h=0;h1&&(c=t.addDate(c,-7)),c}function na(e,t){var n=t.generateConfig,r=t.locale,a=t.format;return e?typeof a=="function"?a(e):n.locale.format(r.locale,e,a):""}function Cv(e,t,n){var r=t,a=["getHour","getMinute","getSecond","getMillisecond"],o=["setHour","setMinute","setSecond","setMillisecond"];return o.forEach(function(c,u){n?r=e[c](r,e[a[u]](n)):r=e[c](r,0)}),r}function yK(e,t,n,r,a){var o=pn(function(c,u){return!!(n&&n(c,u)||r&&e.isAfter(r,c)&&!Ra(e,t,r,c,u.type)||a&&e.isAfter(c,a)&&!Ra(e,t,a,c,u.type))});return o}function xK(e,t,n){return s.useMemo(function(){var r=Ij(e,t,n),a=zs(r),o=a[0],c=jt(o)==="object"&&o.type==="mask"?o.format:null;return[a.map(function(u){return typeof u=="string"||typeof u=="function"?u:u.format}),c]},[e,t,n])}function SK(e,t,n){return typeof e[0]=="function"||n?!0:t}function CK(e,t,n,r){var a=pn(function(o,c){var u=ee({type:t},c);if(delete u.activeIndex,!e.isValidate(o)||n&&n(o,u))return!0;if((t==="date"||t==="time")&&r){var f,d=c&&c.activeIndex===1?"end":"start",h=((f=r.disabledTime)===null||f===void 0?void 0:f.call(r,o,d,{from:u.from}))||{},v=h.disabledHours,g=h.disabledMinutes,b=h.disabledSeconds,x=h.disabledMilliseconds,C=r.disabledHours,y=r.disabledMinutes,w=r.disabledSeconds,$=v||C,E=g||y,O=b||w,I=e.getHour(o),j=e.getMinute(o),M=e.getSecond(o),D=e.getMillisecond(o);if($&&$().includes(I)||E&&E(I).includes(j)||O&&O(I,j).includes(M)||x&&x(I,j,M).includes(D))return!0}return!1});return a}function bh(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=s.useMemo(function(){var r=e&&zs(e);return t&&r&&(r[1]=r[1]||r[0]),r},[e,t]);return n}function Hj(e,t){var n=e.generateConfig,r=e.locale,a=e.picker,o=a===void 0?"date":a,c=e.prefixCls,u=c===void 0?"rc-picker":c,f=e.styles,d=f===void 0?{}:f,h=e.classNames,v=h===void 0?{}:h,g=e.order,b=g===void 0?!0:g,x=e.components,C=x===void 0?{}:x,y=e.inputRender,w=e.allowClear,$=e.clearIcon,E=e.needConfirm,O=e.multiple,I=e.format,j=e.inputReadOnly,M=e.disabledDate,D=e.minDate,N=e.maxDate,P=e.showTime,A=e.value,F=e.defaultValue,H=e.pickerValue,k=e.defaultPickerValue,L=bh(A),T=bh(F),z=bh(H),V=bh(k),q=o==="date"&&P?"datetime":o,G=q==="time"||q==="datetime",B=G||O,U=E??G,K=kj(e),Y=ce(K,4),Q=Y[0],Z=Y[1],ae=Y[2],re=Y[3],ie=Tj(r,Z),ve=s.useMemo(function(){return Aj(q,ae,re,Q,ie)},[q,ae,re,Q,ie]),ue=s.useMemo(function(){return ee(ee({},e),{},{prefixCls:u,locale:ie,picker:o,styles:d,classNames:v,order:b,components:ee({input:y},C),clearIcon:gK(u,w,$),showTime:ve,value:L,defaultValue:T,pickerValue:z,defaultPickerValue:V},t?.())},[e]),oe=xK(q,ie,I),he=ce(oe,2),fe=he[0],me=he[1],le=SK(fe,j,O),pe=yK(n,r,M,D,N),Ce=CK(n,o,pe,ve),De=s.useMemo(function(){return ee(ee({},ue),{},{needConfirm:U,inputReadOnly:le,disabledDate:pe})},[ue,U,le,pe]);return[De,q,B,fe,me,Ce]}function wK(e,t,n){var r=Wn(t,{value:e}),a=ce(r,2),o=a[0],c=a[1],u=Se.useRef(e),f=Se.useRef(),d=function(){hn.cancel(f.current)},h=pn(function(){c(u.current),n&&o!==u.current&&n(u.current)}),v=pn(function(g,b){d(),u.current=g,g||b?h():f.current=hn(h)});return Se.useEffect(function(){return d},[]),[o,v]}function Bj(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[],r=arguments.length>3?arguments[3]:void 0,a=n.every(function(h){return h})?!1:e,o=wK(a,t||!1,r),c=ce(o,2),u=c[0],f=c[1];function d(h){var v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};(!v.inherit||u)&&f(h,v.force)}return[u,d]}function Fj(e){var t=s.useRef();return s.useImperativeHandle(e,function(){var n;return{nativeElement:(n=t.current)===null||n===void 0?void 0:n.nativeElement,focus:function(a){var o;(o=t.current)===null||o===void 0||o.focus(a)},blur:function(){var a;(a=t.current)===null||a===void 0||a.blur()}}}),t}function Vj(e,t){return s.useMemo(function(){return e||(t?(xr(!1,"`ranges` is deprecated. Please use `presets` instead."),Object.entries(t).map(function(n){var r=ce(n,2),a=r[0],o=r[1];return{label:a,value:o}})):[])},[e,t])}function cC(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,r=s.useRef(t);r.current=t,ws(function(){if(e)r.current(e);else{var a=hn(function(){r.current(e)},n);return function(){hn.cancel(a)}}},[e])}function Kj(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,r=s.useState(0),a=ce(r,2),o=a[0],c=a[1],u=s.useState(!1),f=ce(u,2),d=f[0],h=f[1],v=s.useRef([]),g=s.useRef(null),b=s.useRef(null),x=function(O){g.current=O},C=function(O){return g.current===O},y=function(O){h(O)},w=function(O){return O&&(b.current=O),b.current},$=function(O){var I=v.current,j=new Set(I.filter(function(D){return O[D]||t[D]})),M=I[I.length-1]===0?1:0;return j.size>=2||e[M]?null:M};return cC(d||n,function(){d||(v.current=[],x(null))}),s.useEffect(function(){d&&v.current.push(o)},[d,o]),[d,y,w,o,c,$,v.current,x,C]}function $K(e,t,n,r,a,o){var c=n[n.length-1],u=function(d,h){var v=ce(e,2),g=v[0],b=v[1],x=ee(ee({},h),{},{from:Rj(e,n)});return c===1&&t[0]&&g&&!Ra(r,a,g,d,x.type)&&r.isAfter(g,d)||c===0&&t[1]&&b&&!Ra(r,a,b,d,x.type)&&r.isAfter(d,b)?!0:o?.(d,x)};return u}function Ld(e,t,n,r){switch(t){case"date":case"week":return e.addMonth(n,r);case"month":case"quarter":return e.addYear(n,r);case"year":return e.addYear(n,r*10);case"decade":return e.addYear(n,r*100);default:return n}}var My=[];function Uj(e,t,n,r,a,o,c,u){var f=arguments.length>8&&arguments[8]!==void 0?arguments[8]:My,d=arguments.length>9&&arguments[9]!==void 0?arguments[9]:My,h=arguments.length>10&&arguments[10]!==void 0?arguments[10]:My,v=arguments.length>11?arguments[11]:void 0,g=arguments.length>12?arguments[12]:void 0,b=arguments.length>13?arguments[13]:void 0,x=c==="time",C=o||0,y=function(z){var V=e.getNow();return x&&(V=Cv(e,V)),f[z]||n[z]||V},w=ce(d,2),$=w[0],E=w[1],O=Wn(function(){return y(0)},{value:$}),I=ce(O,2),j=I[0],M=I[1],D=Wn(function(){return y(1)},{value:E}),N=ce(D,2),P=N[0],A=N[1],F=s.useMemo(function(){var T=[j,P][C];return x?T:Cv(e,T,h[C])},[x,j,P,C,e,h]),H=function(z){var V=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"panel",q=[M,A][C];q(z);var G=[j,P];G[C]=z,v&&(!Ra(e,t,j,G[0],c)||!Ra(e,t,P,G[1],c))&&v(G,{source:V,range:C===1?"end":"start",mode:r})},k=function(z,V){if(u){var q={date:"month",week:"month",month:"year",quarter:"year"},G=q[c];if(G&&!Ra(e,t,z,V,G))return Ld(e,c,V,-1);if(c==="year"&&z){var B=Math.floor(e.getYear(z)/10),U=Math.floor(e.getYear(V)/10);if(B!==U)return Ld(e,c,V,-1)}}return V},L=s.useRef(null);return fn(function(){if(a&&!f[C]){var T=x?null:e.getNow();if(L.current!==null&&L.current!==C?T=[j,P][C^1]:n[C]?T=C===0?n[0]:k(n[0],n[1]):n[C^1]&&(T=n[C^1]),T){g&&e.isAfter(g,T)&&(T=g);var z=u?Ld(e,c,T,1):T;b&&e.isAfter(z,b)&&(T=u?Ld(e,c,b,-1):b),H(T,"reset")}}},[a,C,n[C]]),s.useEffect(function(){a?L.current=C:L.current=null},[a,C]),fn(function(){a&&f&&f[C]&&H(f[C],"reset")},[a,C]),[F,H]}function Wj(e,t){var n=s.useRef(e),r=s.useState({}),a=ce(r,2),o=a[1],c=function(d){return d&&t!==void 0?t:n.current},u=function(d){n.current=d,o({})};return[c,u,c(!0)]}var EK=[];function qj(e,t,n){var r=function(c){return c.map(function(u){return na(u,{generateConfig:e,locale:t,format:n[0]})})},a=function(c,u){for(var f=Math.max(c.length,u.length),d=-1,h=0;h2&&arguments[2]!==void 0?arguments[2]:1,r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:[],o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:2,c=[],u=n>=1?n|0:1,f=e;f<=t;f+=u){var d=a.includes(f);(!d||!r)&&c.push({label:iC(f,o),value:f,disabled:d})}return c}function uC(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0,r=t||{},a=r.use12Hours,o=r.hourStep,c=o===void 0?1:o,u=r.minuteStep,f=u===void 0?1:u,d=r.secondStep,h=d===void 0?1:d,v=r.millisecondStep,g=v===void 0?100:v,b=r.hideDisabledOptions,x=r.disabledTime,C=r.disabledHours,y=r.disabledMinutes,w=r.disabledSeconds,$=s.useMemo(function(){return n||e.getNow()},[n,e]),E=s.useCallback(function(V){var q=x?.(V)||{};return[q.disabledHours||C||yh,q.disabledMinutes||y||yh,q.disabledSeconds||w||yh,q.disabledMilliseconds||yh]},[x,C,y,w]),O=s.useMemo(function(){return E($)},[$,E]),I=ce(O,4),j=I[0],M=I[1],D=I[2],N=I[3],P=s.useCallback(function(V,q,G,B){var U=xh(0,23,c,b,V()),K=a?U.map(function(ae){return ee(ee({},ae),{},{label:iC(ae.value%12||12,2)})}):U,Y=function(re){return xh(0,59,f,b,q(re))},Q=function(re,ie){return xh(0,59,h,b,G(re,ie))},Z=function(re,ie,ve){return xh(0,999,g,b,B(re,ie,ve),3)};return[K,Y,Q,Z]},[b,c,a,g,f,h]),A=s.useMemo(function(){return P(j,M,D,N)},[P,j,M,D,N]),F=ce(A,4),H=F[0],k=F[1],L=F[2],T=F[3],z=function(q,G){var B=function(){return H},U=k,K=L,Y=T;if(G){var Q=E(G),Z=ce(Q,4),ae=Z[0],re=Z[1],ie=Z[2],ve=Z[3],ue=P(ae,re,ie,ve),oe=ce(ue,4),he=oe[0],fe=oe[1],me=oe[2],le=oe[3];B=function(){return he},U=fe,K=me,Y=le}var pe=OK(q,B,U,K,Y,e);return pe};return[z,H,k,L,T]}function IK(e){var t=e.mode,n=e.internalMode,r=e.renderExtraFooter,a=e.showNow,o=e.showTime,c=e.onSubmit,u=e.onNow,f=e.invalid,d=e.needConfirm,h=e.generateConfig,v=e.disabledDate,g=s.useContext(qi),b=g.prefixCls,x=g.locale,C=g.button,y=C===void 0?"button":C,w=h.getNow(),$=uC(h,o,w),E=ce($,1),O=E[0],I=r?.(t),j=v(w,{type:t}),M=function(){if(!j){var k=O(w);u(k)}},D="".concat(b,"-now"),N="".concat(D,"-btn"),P=a&&s.createElement("li",{className:D},s.createElement("a",{className:se(N,j&&"".concat(N,"-disabled")),"aria-disabled":j,onClick:M},n==="date"?x.today:x.now)),A=d&&s.createElement("li",{className:"".concat(b,"-ok")},s.createElement(y,{disabled:f,onClick:c},x.ok)),F=(P||A)&&s.createElement("ul",{className:"".concat(b,"-ranges")},P,A);return!I&&!F?null:s.createElement("div",{className:"".concat(b,"-footer")},I&&s.createElement("div",{className:"".concat(b,"-footer-extra")},I),F)}function Zj(e,t,n){function r(a,o){var c=a.findIndex(function(f){return Ra(e,t,f,o,n)});if(c===-1)return[].concat(ke(a),[o]);var u=ke(a);return u.splice(c,1),u}return r}var Ls=s.createContext(null);function bg(){return s.useContext(Ls)}function bu(e,t){var n=e.prefixCls,r=e.generateConfig,a=e.locale,o=e.disabledDate,c=e.minDate,u=e.maxDate,f=e.cellRender,d=e.hoverValue,h=e.hoverRangeValue,v=e.onHover,g=e.values,b=e.pickerValue,x=e.onSelect,C=e.prevIcon,y=e.nextIcon,w=e.superPrevIcon,$=e.superNextIcon,E=r.getNow(),O={now:E,values:g,pickerValue:b,prefixCls:n,disabledDate:o,minDate:c,maxDate:u,cellRender:f,hoverValue:d,hoverRangeValue:h,onHover:v,locale:a,generateConfig:r,onSelect:x,panelType:t,prevIcon:C,nextIcon:y,superPrevIcon:w,superNextIcon:$};return[O,E]}var Al=s.createContext({});function zf(e){for(var t=e.rowNum,n=e.colNum,r=e.baseDate,a=e.getCellDate,o=e.prefixColumn,c=e.rowClassName,u=e.titleFormat,f=e.getCellText,d=e.getCellClassName,h=e.headerCells,v=e.cellSelection,g=v===void 0?!0:v,b=e.disabledDate,x=bg(),C=x.prefixCls,y=x.panelType,w=x.now,$=x.disabledDate,E=x.cellRender,O=x.onHover,I=x.hoverValue,j=x.hoverRangeValue,M=x.generateConfig,D=x.values,N=x.locale,P=x.onSelect,A=b||$,F="".concat(C,"-cell"),H=s.useContext(Al),k=H.onCellDblClick,L=function(K){return D.some(function(Y){return Y&&Ra(M,N,K,Y,y)})},T=[],z=0;z1&&arguments[1]!==void 0?arguments[1]:!1;Ie(Te),y?.(Te),be&&Ee(Te)},Fe=function(Te,be){ie(Te),be&&we(be),Ee(be,Te)},He=function(Te){if(Ce(Te),we(Te),re!==O){var be=["decade","year"],ye=[].concat(be,["month"]),Re={quarter:[].concat(be,["quarter"]),week:[].concat(ke(ye),["week"]),date:[].concat(ke(ye),["date"])},Ge=Re[O]||ye,ft=Ge.indexOf(re),$t=Ge[ft+1];$t&&Fe($t,Te)}},it=s.useMemo(function(){var $e,Te;if(Array.isArray(M)){var be=ce(M,2);$e=be[0],Te=be[1]}else $e=M;return!$e&&!Te?null:($e=$e||Te,Te=Te||$e,a.isAfter($e,Te)?[Te,$e]:[$e,Te])},[M,a]),Ze=oC(D,N,P),Ye=F[ve]||HK[ve]||yg,et=s.useContext(Al),Pe=s.useMemo(function(){return ee(ee({},et),{},{hideHeader:H})},[et,H]),Oe="".concat(k,"-panel"),Be=gg(e,["showWeek","prevIcon","nextIcon","superPrevIcon","superNextIcon","disabledDate","minDate","maxDate","onHover"]);return s.createElement(Al.Provider,{value:Pe},s.createElement("div",{ref:L,tabIndex:f,className:se(Oe,X({},"".concat(Oe,"-rtl"),o==="rtl"))},s.createElement(Ye,Me({},Be,{showTime:Y,prefixCls:k,locale:U,generateConfig:a,onModeChange:Fe,pickerValue:ge,onPickerValueChange:function(Te){we(Te,!0)},value:le[0],onSelect:He,values:le,cellRender:Ze,hoverRangeValue:it,hoverValue:j}))))}var jy=s.memo(s.forwardRef(BK));function FK(e){var t=e.picker,n=e.multiplePanel,r=e.pickerValue,a=e.onPickerValueChange,o=e.needConfirm,c=e.onSubmit,u=e.range,f=e.hoverValue,d=s.useContext(qi),h=d.prefixCls,v=d.generateConfig,g=s.useCallback(function($,E){return Ld(v,t,$,E)},[v,t]),b=s.useMemo(function(){return g(r,1)},[r,g]),x=function(E){a(g(E,-1))},C={onCellDblClick:function(){o&&c()}},y=t==="time",w=ee(ee({},e),{},{hoverValue:null,hoverRangeValue:null,hideHeader:y});return u?w.hoverRangeValue=f:w.hoverValue=f,n?s.createElement("div",{className:"".concat(h,"-panels")},s.createElement(Al.Provider,{value:ee(ee({},C),{},{hideNext:!0})},s.createElement(jy,w)),s.createElement(Al.Provider,{value:ee(ee({},C),{},{hidePrev:!0})},s.createElement(jy,Me({},w,{pickerValue:b,onPickerValueChange:x})))):s.createElement(Al.Provider,{value:ee({},C)},s.createElement(jy,w))}function IO(e){return typeof e=="function"?e():e}function VK(e){var t=e.prefixCls,n=e.presets,r=e.onClick,a=e.onHover;return n.length?s.createElement("div",{className:"".concat(t,"-presets")},s.createElement("ul",null,n.map(function(o,c){var u=o.label,f=o.value;return s.createElement("li",{key:c,onClick:function(){r(IO(f))},onMouseEnter:function(){a(IO(f))},onMouseLeave:function(){a(null)}},u)}))):null}function eT(e){var t=e.panelRender,n=e.internalMode,r=e.picker,a=e.showNow,o=e.range,c=e.multiple,u=e.activeInfo,f=u===void 0?[0,0,0]:u,d=e.presets,h=e.onPresetHover,v=e.onPresetSubmit,g=e.onFocus,b=e.onBlur,x=e.onPanelMouseDown,C=e.direction,y=e.value,w=e.onSelect,$=e.isInvalid,E=e.defaultOpenValue,O=e.onOk,I=e.onSubmit,j=s.useContext(qi),M=j.prefixCls,D="".concat(M,"-panel"),N=C==="rtl",P=s.useRef(null),A=s.useRef(null),F=s.useState(0),H=ce(F,2),k=H[0],L=H[1],T=s.useState(0),z=ce(T,2),V=z[0],q=z[1],G=s.useState(0),B=ce(G,2),U=B[0],K=B[1],Y=function(He){He.width&&L(He.width)},Q=ce(f,3),Z=Q[0],ae=Q[1],re=Q[2],ie=s.useState(0),ve=ce(ie,2),ue=ve[0],oe=ve[1];s.useEffect(function(){oe(10)},[Z]),s.useEffect(function(){if(o&&A.current){var Fe,He=((Fe=P.current)===null||Fe===void 0?void 0:Fe.offsetWidth)||0,it=A.current.getBoundingClientRect();if(!it.height||it.right<0){oe(function(Pe){return Math.max(0,Pe-1)});return}var Ze=(N?ae-He:Z)-it.left;if(K(Ze),k&&k=u&&n<=f)return o;var d=Math.min(Math.abs(n-u),Math.abs(n-f));d0?qt:Gt));var nt=Et+mt,Ue=Gt-qt+1;return String(qt+(Ue+nt-qt)%Ue)};switch(Te){case"Backspace":case"Delete":be="",ye=Ge;break;case"ArrowLeft":be="",ft(-1);break;case"ArrowRight":be="",ft(1);break;case"ArrowUp":be="",ye=$t(1);break;case"ArrowDown":be="",ye=$t(-1);break;default:isNaN(Number(Te))||(be=B+Te,ye=be);break}if(be!==null&&(U(be),be.length>=Re&&(ft(1),U(""))),ye!==null){var Qe=ue.slice(0,pe)+iC(ye,Re)+ue.slice(Ce);je(Qe.slice(0,c.length))}ve({})},Pe=s.useRef();fn(function(){if(!(!H||!c||Ee.current)){if(!fe.match(ue)){je(c);return}return he.current.setSelectionRange(pe,Ce),Pe.current=hn(function(){he.current.setSelectionRange(pe,Ce)}),function(){hn.cancel(Pe.current)}}},[fe,c,H,ue,Q,pe,Ce,ie,je]);var Oe=c?{onFocus:He,onBlur:Ze,onKeyDown:et,onMouseDown:we,onMouseUp:Fe,onPaste:Ie}:{};return s.createElement("div",{ref:oe,className:se(P,X(X({},"".concat(P,"-active"),n&&a),"".concat(P,"-placeholder"),d))},s.createElement(N,Me({ref:he,"aria-invalid":C,autoComplete:"off"},w,{onKeyDown:Ye,onBlur:it},Oe,{value:ue,onChange:ge})),s.createElement(xg,{type:"suffix",icon:o}),y)}),XK=["id","prefix","clearIcon","suffixIcon","separator","activeIndex","activeHelp","allHelp","focused","onFocus","onBlur","onKeyDown","locale","generateConfig","placeholder","className","style","onClick","onClear","value","onChange","onSubmit","onInputChange","format","maskFormat","preserveInvalidOnBlur","onInvalid","disabled","invalid","inputReadOnly","direction","onOpenChange","onActiveInfo","placement","onMouseDown","required","aria-required","autoFocus","tabIndex"],QK=["index"];function ZK(e,t){var n=e.id,r=e.prefix,a=e.clearIcon,o=e.suffixIcon,c=e.separator,u=c===void 0?"~":c,f=e.activeIndex;e.activeHelp,e.allHelp;var d=e.focused;e.onFocus,e.onBlur,e.onKeyDown,e.locale,e.generateConfig;var h=e.placeholder,v=e.className,g=e.style,b=e.onClick,x=e.onClear,C=e.value;e.onChange,e.onSubmit,e.onInputChange,e.format,e.maskFormat,e.preserveInvalidOnBlur,e.onInvalid;var y=e.disabled,w=e.invalid;e.inputReadOnly;var $=e.direction;e.onOpenChange;var E=e.onActiveInfo;e.placement;var O=e.onMouseDown;e.required,e["aria-required"];var I=e.autoFocus,j=e.tabIndex,M=Kt(e,XK),D=$==="rtl",N=s.useContext(qi),P=N.prefixCls,A=s.useMemo(function(){if(typeof n=="string")return[n];var ie=n||{};return[ie.start,ie.end]},[n]),F=s.useRef(),H=s.useRef(),k=s.useRef(),L=function(ve){var ue;return(ue=[H,k][ve])===null||ue===void 0?void 0:ue.current};s.useImperativeHandle(t,function(){return{nativeElement:F.current,focus:function(ve){if(jt(ve)==="object"){var ue,oe=ve||{},he=oe.index,fe=he===void 0?0:he,me=Kt(oe,QK);(ue=L(fe))===null||ue===void 0||ue.focus(me)}else{var le;(le=L(ve??0))===null||le===void 0||le.focus()}},blur:function(){var ve,ue;(ve=L(0))===null||ve===void 0||ve.blur(),(ue=L(1))===null||ue===void 0||ue.blur()}}});var T=nT(M),z=s.useMemo(function(){return Array.isArray(h)?h:[h,h]},[h]),V=tT(ee(ee({},e),{},{id:A,placeholder:z})),q=ce(V,1),G=q[0],B=s.useState({position:"absolute",width:0}),U=ce(B,2),K=U[0],Y=U[1],Q=pn(function(){var ie=L(f);if(ie){var ve=ie.nativeElement.getBoundingClientRect(),ue=F.current.getBoundingClientRect(),oe=ve.left-ue.left;Y(function(he){return ee(ee({},he),{},{width:ve.width,left:oe})}),E([ve.left,ve.right,ue.width])}});s.useEffect(function(){Q()},[f]);var Z=a&&(C[0]&&!y[0]||C[1]&&!y[1]),ae=I&&!y[0],re=I&&!ae&&!y[1];return s.createElement(Ca,{onResize:Q},s.createElement("div",Me({},T,{className:se(P,"".concat(P,"-range"),X(X(X(X({},"".concat(P,"-focused"),d),"".concat(P,"-disabled"),y.every(function(ie){return ie})),"".concat(P,"-invalid"),w.some(function(ie){return ie})),"".concat(P,"-rtl"),D),v),style:g,ref:F,onClick:b,onMouseDown:function(ve){var ue=ve.target;ue!==H.current.inputElement&&ue!==k.current.inputElement&&ve.preventDefault(),O?.(ve)}}),r&&s.createElement("div",{className:"".concat(P,"-prefix")},r),s.createElement($x,Me({ref:H},G(0),{autoFocus:ae,tabIndex:j,"date-range":"start"})),s.createElement("div",{className:"".concat(P,"-range-separator")},u),s.createElement($x,Me({ref:k},G(1),{autoFocus:re,tabIndex:j,"date-range":"end"})),s.createElement("div",{className:"".concat(P,"-active-bar"),style:K}),s.createElement(xg,{type:"suffix",icon:o}),Z&&s.createElement(wx,{icon:a,onClear:x})))}var JK=s.forwardRef(ZK);function NO(e,t){var n=e??t;return Array.isArray(n)?n:[n,n]}function Ch(e){return e===1?"end":"start"}function eU(e,t){var n=Hj(e,function(){var gn=e.disabled,dt=e.allowEmpty,Ot=NO(gn,!1),bn=NO(dt,!1);return{disabled:Ot,allowEmpty:bn}}),r=ce(n,6),a=r[0],o=r[1],c=r[2],u=r[3],f=r[4],d=r[5],h=a.prefixCls,v=a.styles,g=a.classNames,b=a.defaultValue,x=a.value,C=a.needConfirm,y=a.onKeyDown,w=a.disabled,$=a.allowEmpty,E=a.disabledDate,O=a.minDate,I=a.maxDate,j=a.defaultOpen,M=a.open,D=a.onOpenChange,N=a.locale,P=a.generateConfig,A=a.picker,F=a.showNow,H=a.showToday,k=a.showTime,L=a.mode,T=a.onPanelChange,z=a.onCalendarChange,V=a.onOk,q=a.defaultPickerValue,G=a.pickerValue,B=a.onPickerValueChange,U=a.inputReadOnly,K=a.suffixIcon,Y=a.onFocus,Q=a.onBlur,Z=a.presets,ae=a.ranges,re=a.components,ie=a.cellRender,ve=a.dateRender,ue=a.monthCellRender,oe=a.onClick,he=Fj(t),fe=Bj(M,j,w,D),me=ce(fe,2),le=me[0],pe=me[1],Ce=function(dt,Ot){(w.some(function(bn){return!bn})||!dt)&&pe(dt,Ot)},De=Gj(P,N,u,!0,!1,b,x,z,V),je=ce(De,5),ge=je[0],Ie=je[1],Ee=je[2],we=je[3],Fe=je[4],He=Ee(),it=Kj(w,$,le),Ze=ce(it,9),Ye=Ze[0],et=Ze[1],Pe=Ze[2],Oe=Ze[3],Be=Ze[4],$e=Ze[5],Te=Ze[6],be=Ze[7],ye=Ze[8],Re=function(dt,Ot){et(!0),Y?.(dt,{range:Ch(Ot??Oe)})},Ge=function(dt,Ot){et(!1),Q?.(dt,{range:Ch(Ot??Oe)})},ft=s.useMemo(function(){if(!k)return null;var gn=k.disabledTime,dt=gn?function(Ot){var bn=Ch(Oe),Cn=Rj(He,Te,Oe);return gn(Ot,bn,{from:Cn})}:void 0;return ee(ee({},k),{},{disabledTime:dt})},[k,Oe,He,Te]),$t=Wn([A,A],{value:L}),Qe=ce($t,2),at=Qe[0],mt=Qe[1],st=at[Oe]||A,bt=st==="date"&&ft?"datetime":st,qt=bt===A&&bt!=="time",Gt=Qj(A,st,F,H,!0),vt=Xj(a,ge,Ie,Ee,we,w,u,Ye,le,d),It=ce(vt,2),Et=It[0],nt=It[1],Ue=$K(He,w,Te,P,N,E),qe=Mj(He,d,$),ct=ce(qe,2),Tt=ct[0],Dt=ct[1],Jt=Uj(P,N,He,at,le,Oe,o,qt,q,G,ft?.defaultOpenValue,B,O,I),ut=ce(Jt,2),ot=ut[0],Lt=ut[1],tn=pn(function(gn,dt,Ot){var bn=Wd(at,Oe,dt);if((bn[0]!==at[0]||bn[1]!==at[1])&&mt(bn),T&&Ot!==!1){var Cn=ke(He);gn&&(Cn[Oe]=gn),T(Cn,bn)}}),vn=function(dt,Ot){return Wd(He,Ot,dt)},cn=function(dt,Ot){var bn=He;dt&&(bn=vn(dt,Oe)),be(Oe);var Cn=$e(bn);we(bn),Et(Oe,Cn===null),Cn===null?Ce(!1,{force:!0}):Ot||he.current.focus({index:Cn})},En=function(dt){var Ot,bn=dt.target.getRootNode();if(!he.current.nativeElement.contains((Ot=bn.activeElement)!==null&&Ot!==void 0?Ot:document.activeElement)){var Cn=w.findIndex(function(rr){return!rr});Cn>=0&&he.current.focus({index:Cn})}Ce(!0),oe?.(dt)},rn=function(){nt(null),Ce(!1,{force:!0})},Sn=s.useState(null),lt=ce(Sn,2),xt=lt[0],Bt=lt[1],kt=s.useState(null),gt=ce(kt,2),_t=gt[0],Zt=gt[1],on=s.useMemo(function(){return _t||He},[He,_t]);s.useEffect(function(){le||Zt(null)},[le]);var yt=s.useState([0,0,0]),Ht=ce(yt,2),nn=Ht[0],Xn=Ht[1],br=Vj(Z,ae),wr=function(dt){Zt(dt),Bt("preset")},$r=function(dt){var Ot=nt(dt);Ot&&Ce(!1,{force:!0})},Yn=function(dt){cn(dt)},Gn=function(dt){Zt(dt?vn(dt,Oe):null),Bt("cell")},Dr=function(dt){Ce(!0),Re(dt)},Hr=function(){Pe("panel")},Nr=function(dt){var Ot=Wd(He,Oe,dt);we(Ot),!C&&!c&&o===bt&&cn(dt)},On=function(){Ce(!1)},At=oC(ie,ve,ue,Ch(Oe)),zt=He[Oe]||null,un=pn(function(gn){return d(gn,{activeIndex:Oe})}),Nt=s.useMemo(function(){var gn=ma(a,!1),dt=lr(a,[].concat(ke(Object.keys(gn)),["onChange","onCalendarChange","style","className","onPanelChange","disabledTime"]));return dt},[a]),Pt=s.createElement(eT,Me({},Nt,{showNow:Gt,showTime:ft,range:!0,multiplePanel:qt,activeInfo:nn,disabledDate:Ue,onFocus:Dr,onBlur:Ge,onPanelMouseDown:Hr,picker:A,mode:st,internalMode:bt,onPanelChange:tn,format:f,value:zt,isInvalid:un,onChange:null,onSelect:Nr,pickerValue:ot,defaultOpenValue:zs(k?.defaultOpenValue)[Oe],onPickerValueChange:Lt,hoverValue:on,onHover:Gn,needConfirm:C,onSubmit:cn,onOk:Fe,presets:br,onPresetHover:wr,onPresetSubmit:$r,onNow:Yn,cellRender:At})),yn=function(dt,Ot){var bn=vn(dt,Ot);we(bn)},Ln=function(){Pe("input")},sr=function(dt,Ot){var bn=Te.length,Cn=Te[bn-1];if(bn&&Cn!==Ot&&C&&!$[Cn]&&!ye(Cn)&&He[Cn]){he.current.focus({index:Cn});return}Pe("input"),Ce(!0,{inherit:!0}),Oe!==Ot&&le&&!C&&c&&cn(null,!0),Be(Ot),Re(dt,Ot)},Pr=function(dt,Ot){if(Ce(!1),!C&&Pe()==="input"){var bn=$e(He);Et(Oe,bn===null)}Ge(dt,Ot)},cr=function(dt,Ot){dt.key==="Tab"&&cn(null,!0),y?.(dt,Ot)},kr=s.useMemo(function(){return{prefixCls:h,locale:N,generateConfig:P,button:re.button,input:re.input}},[h,N,P,re.button,re.input]);return fn(function(){le&&Oe!==void 0&&tn(null,A,!1)},[le,Oe,A]),fn(function(){var gn=Pe();!le&&gn==="input"&&(Ce(!1),cn(null,!0)),!le&&c&&!C&&gn==="panel"&&(Ce(!0),cn())},[le]),s.createElement(qi.Provider,{value:kr},s.createElement(Oj,Me({},Nj(a),{popupElement:Pt,popupStyle:v.popup,popupClassName:g.popup,visible:le,onClose:On,range:!0}),s.createElement(JK,Me({},a,{ref:he,suffixIcon:K,activeIndex:Ye||le?Oe:null,activeHelp:!!_t,allHelp:!!_t&&xt==="preset",focused:Ye,onFocus:sr,onBlur:Pr,onKeyDown:cr,onSubmit:cn,value:on,maskFormat:f,onChange:yn,onInputChange:Ln,format:u,inputReadOnly:U,disabled:w,open:le,onOpenChange:Ce,onClick:En,onClear:rn,invalid:Tt,onInvalid:Dt,onActiveInfo:Xn}))))}var tU=s.forwardRef(eU);function nU(e){var t=e.prefixCls,n=e.value,r=e.onRemove,a=e.removeIcon,o=a===void 0?"×":a,c=e.formatDate,u=e.disabled,f=e.maxTagCount,d=e.placeholder,h="".concat(t,"-selector"),v="".concat(t,"-selection"),g="".concat(v,"-overflow");function b(y,w){return s.createElement("span",{className:se("".concat(v,"-item")),title:typeof y=="string"?y:null},s.createElement("span",{className:"".concat(v,"-item-content")},y),!u&&w&&s.createElement("span",{onMouseDown:function(E){E.preventDefault()},onClick:w,className:"".concat(v,"-item-remove")},o))}function x(y){var w=c(y),$=function(O){O&&O.stopPropagation(),r(y)};return b(w,$)}function C(y){var w="+ ".concat(y.length," ...");return b(w)}return s.createElement("div",{className:h},s.createElement(zi,{prefixCls:g,data:n,renderItem:x,renderRest:C,itemKey:function(w){return c(w)},maxCount:f}),!n.length&&s.createElement("span",{className:"".concat(t,"-selection-placeholder")},d))}var rU=["id","open","prefix","clearIcon","suffixIcon","activeHelp","allHelp","focused","onFocus","onBlur","onKeyDown","locale","generateConfig","placeholder","className","style","onClick","onClear","internalPicker","value","onChange","onSubmit","onInputChange","multiple","maxTagCount","format","maskFormat","preserveInvalidOnBlur","onInvalid","disabled","invalid","inputReadOnly","direction","onOpenChange","onMouseDown","required","aria-required","autoFocus","tabIndex","removeIcon"];function aU(e,t){e.id;var n=e.open,r=e.prefix,a=e.clearIcon,o=e.suffixIcon;e.activeHelp,e.allHelp;var c=e.focused;e.onFocus,e.onBlur,e.onKeyDown;var u=e.locale,f=e.generateConfig,d=e.placeholder,h=e.className,v=e.style,g=e.onClick,b=e.onClear,x=e.internalPicker,C=e.value,y=e.onChange,w=e.onSubmit;e.onInputChange;var $=e.multiple,E=e.maxTagCount;e.format,e.maskFormat,e.preserveInvalidOnBlur,e.onInvalid;var O=e.disabled,I=e.invalid;e.inputReadOnly;var j=e.direction;e.onOpenChange;var M=e.onMouseDown;e.required,e["aria-required"];var D=e.autoFocus,N=e.tabIndex,P=e.removeIcon,A=Kt(e,rU),F=j==="rtl",H=s.useContext(qi),k=H.prefixCls,L=s.useRef(),T=s.useRef();s.useImperativeHandle(t,function(){return{nativeElement:L.current,focus:function(ae){var re;(re=T.current)===null||re===void 0||re.focus(ae)},blur:function(){var ae;(ae=T.current)===null||ae===void 0||ae.blur()}}});var z=nT(A),V=function(ae){y([ae])},q=function(ae){var re=C.filter(function(ie){return ie&&!Ra(f,u,ie,ae,x)});y(re),n||w()},G=tT(ee(ee({},e),{},{onChange:V}),function(Z){var ae=Z.valueTexts;return{value:ae[0]||"",active:c}}),B=ce(G,2),U=B[0],K=B[1],Y=!!(a&&C.length&&!O),Q=$?s.createElement(s.Fragment,null,s.createElement(nU,{prefixCls:k,value:C,onRemove:q,formatDate:K,maxTagCount:E,disabled:O,removeIcon:P,placeholder:d}),s.createElement("input",{className:"".concat(k,"-multiple-input"),value:C.map(K).join(","),ref:T,readOnly:!0,autoFocus:D,tabIndex:N}),s.createElement(xg,{type:"suffix",icon:o}),Y&&s.createElement(wx,{icon:a,onClear:b})):s.createElement($x,Me({ref:T},U(),{autoFocus:D,tabIndex:N,suffixIcon:o,clearIcon:Y&&s.createElement(wx,{icon:a,onClear:b}),showActiveCls:!1}));return s.createElement("div",Me({},z,{className:se(k,X(X(X(X(X({},"".concat(k,"-multiple"),$),"".concat(k,"-focused"),c),"".concat(k,"-disabled"),O),"".concat(k,"-invalid"),I),"".concat(k,"-rtl"),F),h),style:v,ref:L,onClick:g,onMouseDown:function(ae){var re,ie=ae.target;ie!==((re=T.current)===null||re===void 0?void 0:re.inputElement)&&ae.preventDefault(),M?.(ae)}}),r&&s.createElement("div",{className:"".concat(k,"-prefix")},r),Q)}var iU=s.forwardRef(aU);function oU(e,t){var n=Hj(e),r=ce(n,6),a=r[0],o=r[1],c=r[2],u=r[3],f=r[4],d=r[5],h=a,v=h.prefixCls,g=h.styles,b=h.classNames,x=h.order,C=h.defaultValue,y=h.value,w=h.needConfirm,$=h.onChange,E=h.onKeyDown,O=h.disabled,I=h.disabledDate,j=h.minDate,M=h.maxDate,D=h.defaultOpen,N=h.open,P=h.onOpenChange,A=h.locale,F=h.generateConfig,H=h.picker,k=h.showNow,L=h.showToday,T=h.showTime,z=h.mode,V=h.onPanelChange,q=h.onCalendarChange,G=h.onOk,B=h.multiple,U=h.defaultPickerValue,K=h.pickerValue,Y=h.onPickerValueChange,Q=h.inputReadOnly,Z=h.suffixIcon,ae=h.removeIcon,re=h.onFocus,ie=h.onBlur,ve=h.presets,ue=h.components,oe=h.cellRender,he=h.dateRender,fe=h.monthCellRender,me=h.onClick,le=Fj(t);function pe(Nt){return Nt===null?null:B?Nt:Nt[0]}var Ce=Zj(F,A,o),De=Bj(N,D,[O],P),je=ce(De,2),ge=je[0],Ie=je[1],Ee=function(Pt,yn,Ln){if(q){var sr=ee({},Ln);delete sr.range,q(pe(Pt),pe(yn),sr)}},we=function(Pt){G?.(pe(Pt))},Fe=Gj(F,A,u,!1,x,C,y,Ee,we),He=ce(Fe,5),it=He[0],Ze=He[1],Ye=He[2],et=He[3],Pe=He[4],Oe=Ye(),Be=Kj([O]),$e=ce(Be,4),Te=$e[0],be=$e[1],ye=$e[2],Re=$e[3],Ge=function(Pt){be(!0),re?.(Pt,{})},ft=function(Pt){be(!1),ie?.(Pt,{})},$t=Wn(H,{value:z}),Qe=ce($t,2),at=Qe[0],mt=Qe[1],st=at==="date"&&T?"datetime":at,bt=Qj(H,at,k,L),qt=$&&function(Nt,Pt){$(pe(Nt),pe(Pt))},Gt=Xj(ee(ee({},a),{},{onChange:qt}),it,Ze,Ye,et,[],u,Te,ge,d),vt=ce(Gt,2),It=vt[1],Et=Mj(Oe,d),nt=ce(Et,2),Ue=nt[0],qe=nt[1],ct=s.useMemo(function(){return Ue.some(function(Nt){return Nt})},[Ue]),Tt=function(Pt,yn){if(Y){var Ln=ee(ee({},yn),{},{mode:yn.mode[0]});delete Ln.range,Y(Pt[0],Ln)}},Dt=Uj(F,A,Oe,[at],ge,Re,o,!1,U,K,zs(T?.defaultOpenValue),Tt,j,M),Jt=ce(Dt,2),ut=Jt[0],ot=Jt[1],Lt=pn(function(Nt,Pt,yn){if(mt(Pt),V&&yn!==!1){var Ln=Nt||Oe[Oe.length-1];V(Ln,Pt)}}),tn=function(){It(Ye()),Ie(!1,{force:!0})},vn=function(Pt){!O&&!le.current.nativeElement.contains(document.activeElement)&&le.current.focus(),Ie(!0),me?.(Pt)},cn=function(){It(null),Ie(!1,{force:!0})},En=s.useState(null),rn=ce(En,2),Sn=rn[0],lt=rn[1],xt=s.useState(null),Bt=ce(xt,2),kt=Bt[0],gt=Bt[1],_t=s.useMemo(function(){var Nt=[kt].concat(ke(Oe)).filter(function(Pt){return Pt});return B?Nt:Nt.slice(0,1)},[Oe,kt,B]),Zt=s.useMemo(function(){return!B&&kt?[kt]:Oe.filter(function(Nt){return Nt})},[Oe,kt,B]);s.useEffect(function(){ge||gt(null)},[ge]);var on=Vj(ve),yt=function(Pt){gt(Pt),lt("preset")},Ht=function(Pt){var yn=B?Ce(Ye(),Pt):[Pt],Ln=It(yn);Ln&&!B&&Ie(!1,{force:!0})},nn=function(Pt){Ht(Pt)},Xn=function(Pt){gt(Pt),lt("cell")},br=function(Pt){Ie(!0),Ge(Pt)},wr=function(Pt){if(ye("panel"),!(B&&st!==H)){var yn=B?Ce(Ye(),Pt):[Pt];et(yn),!w&&!c&&o===st&&tn()}},$r=function(){Ie(!1)},Yn=oC(oe,he,fe),Gn=s.useMemo(function(){var Nt=ma(a,!1),Pt=lr(a,[].concat(ke(Object.keys(Nt)),["onChange","onCalendarChange","style","className","onPanelChange"]));return ee(ee({},Pt),{},{multiple:a.multiple})},[a]),Dr=s.createElement(eT,Me({},Gn,{showNow:bt,showTime:T,disabledDate:I,onFocus:br,onBlur:ft,picker:H,mode:at,internalMode:st,onPanelChange:Lt,format:f,value:Oe,isInvalid:d,onChange:null,onSelect:wr,pickerValue:ut,defaultOpenValue:T?.defaultOpenValue,onPickerValueChange:ot,hoverValue:_t,onHover:Xn,needConfirm:w,onSubmit:tn,onOk:Pe,presets:on,onPresetHover:yt,onPresetSubmit:Ht,onNow:nn,cellRender:Yn})),Hr=function(Pt){et(Pt)},Nr=function(){ye("input")},On=function(Pt){ye("input"),Ie(!0,{inherit:!0}),Ge(Pt)},At=function(Pt){Ie(!1),ft(Pt)},zt=function(Pt,yn){Pt.key==="Tab"&&tn(),E?.(Pt,yn)},un=s.useMemo(function(){return{prefixCls:v,locale:A,generateConfig:F,button:ue.button,input:ue.input}},[v,A,F,ue.button,ue.input]);return fn(function(){ge&&Re!==void 0&&Lt(null,H,!1)},[ge,Re,H]),fn(function(){var Nt=ye();!ge&&Nt==="input"&&(Ie(!1),tn()),!ge&&c&&!w&&Nt==="panel"&&tn()},[ge]),s.createElement(qi.Provider,{value:un},s.createElement(Oj,Me({},Nj(a),{popupElement:Dr,popupStyle:g.popup,popupClassName:b.popup,visible:ge,onClose:$r}),s.createElement(iU,Me({},a,{ref:le,suffixIcon:Z,removeIcon:ae,activeHelp:!!kt,allHelp:!!kt&&Sn==="preset",focused:Te,onFocus:On,onBlur:At,onKeyDown:zt,onSubmit:tn,value:Zt,maskFormat:f,onChange:Hr,onInputChange:Nr,internalPicker:o,format:u,inputReadOnly:Q,disabled:O,open:ge,onOpenChange:Ie,onClick:vn,onClear:cn,invalid:ct,onInvalid:function(Pt){qe(Pt,0)}}))))}var lU=s.forwardRef(oU);const rT=s.createContext(null),sU=rT.Provider,aT=s.createContext(null),cU=aT.Provider;var uU=["prefixCls","className","style","checked","disabled","defaultChecked","type","title","onChange"],iT=s.forwardRef(function(e,t){var n=e.prefixCls,r=n===void 0?"rc-checkbox":n,a=e.className,o=e.style,c=e.checked,u=e.disabled,f=e.defaultChecked,d=f===void 0?!1:f,h=e.type,v=h===void 0?"checkbox":h,g=e.title,b=e.onChange,x=Kt(e,uU),C=s.useRef(null),y=s.useRef(null),w=Wn(d,{value:c}),$=ce(w,2),E=$[0],O=$[1];s.useImperativeHandle(t,function(){return{focus:function(D){var N;(N=C.current)===null||N===void 0||N.focus(D)},blur:function(){var D;(D=C.current)===null||D===void 0||D.blur()},input:C.current,nativeElement:y.current}});var I=se(r,a,X(X({},"".concat(r,"-checked"),E),"".concat(r,"-disabled"),u)),j=function(D){u||("checked"in e||O(D.target.checked),b?.({target:ee(ee({},e),{},{type:v,checked:D.target.checked}),stopPropagation:function(){D.stopPropagation()},preventDefault:function(){D.preventDefault()},nativeEvent:D.nativeEvent}))};return s.createElement("span",{className:I,title:g,style:o,ref:y},s.createElement("input",Me({},x,{className:"".concat(r,"-input"),ref:C,onChange:j,disabled:u,checked:!!E,type:v})),s.createElement("span",{className:"".concat(r,"-inner")}))});function oT(e){const t=Se.useRef(null),n=()=>{hn.cancel(t.current),t.current=null};return[()=>{n(),t.current=hn(()=>{t.current=null})},o=>{t.current&&(o.stopPropagation(),n()),e?.(o)}]}const dU=e=>{const{componentCls:t,antCls:n}=e,r=`${t}-group`;return{[r]:Object.assign(Object.assign({},zn(e)),{display:"inline-block",fontSize:0,[`&${r}-rtl`]:{direction:"rtl"},[`&${r}-block`]:{display:"flex"},[`${n}-badge ${n}-badge-count`]:{zIndex:1},[`> ${n}-badge:not(:first-child) > ${n}-button-wrapper`]:{borderInlineStart:"none"}})}},fU=e=>{const{componentCls:t,wrapperMarginInlineEnd:n,colorPrimary:r,radioSize:a,motionDurationSlow:o,motionDurationMid:c,motionEaseInOutCirc:u,colorBgContainer:f,colorBorder:d,lineWidth:h,colorBgContainerDisabled:v,colorTextDisabled:g,paddingXS:b,dotColorDisabled:x,lineType:C,radioColor:y,radioBgColor:w,calc:$}=e,E=`${t}-inner`,I=$(a).sub($(4).mul(2)),j=$(1).mul(a).equal({unit:!0});return{[`${t}-wrapper`]:Object.assign(Object.assign({},zn(e)),{display:"inline-flex",alignItems:"baseline",marginInlineStart:0,marginInlineEnd:n,cursor:"pointer","&:last-child":{marginInlineEnd:0},[`&${t}-wrapper-rtl`]:{direction:"rtl"},"&-disabled":{cursor:"not-allowed",color:e.colorTextDisabled},"&::after":{display:"inline-block",width:0,overflow:"hidden",content:'"\\a0"'},"&-block":{flex:1,justifyContent:"center"},[`${t}-checked::after`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,width:"100%",height:"100%",border:`${te(h)} ${C} ${r}`,borderRadius:"50%",visibility:"hidden",opacity:0,content:'""'},[t]:Object.assign(Object.assign({},zn(e)),{position:"relative",display:"inline-block",outline:"none",cursor:"pointer",alignSelf:"center",borderRadius:"50%"}),[`${t}-wrapper:hover &, + &:hover ${E}`]:{borderColor:r},[`${t}-input:focus-visible + ${E}`]:so(e),[`${t}:hover::after, ${t}-wrapper:hover &::after`]:{visibility:"visible"},[`${t}-inner`]:{"&::after":{boxSizing:"border-box",position:"absolute",insetBlockStart:"50%",insetInlineStart:"50%",display:"block",width:j,height:j,marginBlockStart:$(1).mul(a).div(-2).equal({unit:!0}),marginInlineStart:$(1).mul(a).div(-2).equal({unit:!0}),backgroundColor:y,borderBlockStart:0,borderInlineStart:0,borderRadius:j,transform:"scale(0)",opacity:0,transition:`all ${o} ${u}`,content:'""'},boxSizing:"border-box",position:"relative",insetBlockStart:0,insetInlineStart:0,display:"block",width:j,height:j,backgroundColor:f,borderColor:d,borderStyle:"solid",borderWidth:h,borderRadius:"50%",transition:`all ${c}`},[`${t}-input`]:{position:"absolute",inset:0,zIndex:1,cursor:"pointer",opacity:0},[`${t}-checked`]:{[E]:{borderColor:r,backgroundColor:w,"&::after":{transform:`scale(${e.calc(e.dotSize).div(a).equal()})`,opacity:1,transition:`all ${o} ${u}`}}},[`${t}-disabled`]:{cursor:"not-allowed",[E]:{backgroundColor:v,borderColor:d,cursor:"not-allowed","&::after":{backgroundColor:x}},[`${t}-input`]:{cursor:"not-allowed"},[`${t}-disabled + span`]:{color:g,cursor:"not-allowed"},[`&${t}-checked`]:{[E]:{"&::after":{transform:`scale(${$(I).div(a).equal()})`}}}},[`span${t} + *`]:{paddingInlineStart:b,paddingInlineEnd:b}})}},mU=e=>{const{buttonColor:t,controlHeight:n,componentCls:r,lineWidth:a,lineType:o,colorBorder:c,motionDurationMid:u,buttonPaddingInline:f,fontSize:d,buttonBg:h,fontSizeLG:v,controlHeightLG:g,controlHeightSM:b,paddingXS:x,borderRadius:C,borderRadiusSM:y,borderRadiusLG:w,buttonCheckedBg:$,buttonSolidCheckedColor:E,colorTextDisabled:O,colorBgContainerDisabled:I,buttonCheckedBgDisabled:j,buttonCheckedColorDisabled:M,colorPrimary:D,colorPrimaryHover:N,colorPrimaryActive:P,buttonSolidCheckedBg:A,buttonSolidCheckedHoverBg:F,buttonSolidCheckedActiveBg:H,calc:k}=e;return{[`${r}-button-wrapper`]:{position:"relative",display:"inline-block",height:n,margin:0,paddingInline:f,paddingBlock:0,color:t,fontSize:d,lineHeight:te(k(n).sub(k(a).mul(2)).equal()),background:h,border:`${te(a)} ${o} ${c}`,borderBlockStartWidth:k(a).add(.02).equal(),borderInlineEndWidth:a,cursor:"pointer",transition:[`color ${u}`,`background ${u}`,`box-shadow ${u}`].join(","),a:{color:t},[`> ${r}-button`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,zIndex:-1,width:"100%",height:"100%"},"&:not(:last-child)":{marginInlineEnd:k(a).mul(-1).equal()},"&:first-child":{borderInlineStart:`${te(a)} ${o} ${c}`,borderStartStartRadius:C,borderEndStartRadius:C},"&:last-child":{borderStartEndRadius:C,borderEndEndRadius:C},"&:first-child:last-child":{borderRadius:C},[`${r}-group-large &`]:{height:g,fontSize:v,lineHeight:te(k(g).sub(k(a).mul(2)).equal()),"&:first-child":{borderStartStartRadius:w,borderEndStartRadius:w},"&:last-child":{borderStartEndRadius:w,borderEndEndRadius:w}},[`${r}-group-small &`]:{height:b,paddingInline:k(x).sub(a).equal(),paddingBlock:0,lineHeight:te(k(b).sub(k(a).mul(2)).equal()),"&:first-child":{borderStartStartRadius:y,borderEndStartRadius:y},"&:last-child":{borderStartEndRadius:y,borderEndEndRadius:y}},"&:hover":{position:"relative",color:D},"&:has(:focus-visible)":so(e),[`${r}-inner, input[type='checkbox'], input[type='radio']`]:{width:0,height:0,opacity:0,pointerEvents:"none"},[`&-checked:not(${r}-button-wrapper-disabled)`]:{zIndex:1,color:D,background:$,borderColor:D,"&::before":{backgroundColor:D},"&:first-child":{borderColor:D},"&:hover":{color:N,borderColor:N,"&::before":{backgroundColor:N}},"&:active":{color:P,borderColor:P,"&::before":{backgroundColor:P}}},[`${r}-group-solid &-checked:not(${r}-button-wrapper-disabled)`]:{color:E,background:A,borderColor:A,"&:hover":{color:E,background:F,borderColor:F},"&:active":{color:E,background:H,borderColor:H}},"&-disabled":{color:O,backgroundColor:I,borderColor:c,cursor:"not-allowed","&:first-child, &:hover":{color:O,backgroundColor:I,borderColor:c}},[`&-disabled${r}-button-wrapper-checked`]:{color:M,backgroundColor:j,borderColor:c,boxShadow:"none"},"&-block":{flex:1,textAlign:"center"}}}},hU=e=>{const{wireframe:t,padding:n,marginXS:r,lineWidth:a,fontSizeLG:o,colorText:c,colorBgContainer:u,colorTextDisabled:f,controlItemBgActiveDisabled:d,colorTextLightSolid:h,colorPrimary:v,colorPrimaryHover:g,colorPrimaryActive:b,colorWhite:x}=e,C=4,y=o,w=t?y-C*2:y-(C+a)*2;return{radioSize:y,dotSize:w,dotColorDisabled:f,buttonSolidCheckedColor:h,buttonSolidCheckedBg:v,buttonSolidCheckedHoverBg:g,buttonSolidCheckedActiveBg:b,buttonBg:u,buttonCheckedBg:u,buttonColor:c,buttonCheckedBgDisabled:d,buttonCheckedColorDisabled:f,buttonPaddingInline:n-a,wrapperMarginInlineEnd:r,radioColor:t?v:x,radioBgColor:t?u:v}},lT=Kn("Radio",e=>{const{controlOutline:t,controlOutlineWidth:n}=e,r=`0 0 0 ${te(n)} ${t}`,o=xn(e,{radioFocusShadow:r,radioButtonFocusShadow:r});return[dU(o),fU(o),mU(o)]},hU,{unitless:{radioSize:!0,dotSize:!0}});var vU=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,r=Object.getOwnPropertySymbols(e);a{var n,r;const a=s.useContext(rT),o=s.useContext(aT),{getPrefixCls:c,direction:u,radio:f}=s.useContext(Wt),d=s.useRef(null),h=Ea(t,d),{isFormItemInput:v}=s.useContext(ia),g=T=>{var z,V;(z=e.onChange)===null||z===void 0||z.call(e,T),(V=a?.onChange)===null||V===void 0||V.call(a,T)},{prefixCls:b,className:x,rootClassName:C,children:y,style:w,title:$}=e,E=vU(e,["prefixCls","className","rootClassName","children","style","title"]),O=c("radio",b),I=(a?.optionType||o)==="button",j=I?`${O}-button`:O,M=oa(O),[D,N,P]=lT(O,M),A=Object.assign({},E),F=s.useContext(ja);a&&(A.name=a.name,A.onChange=g,A.checked=e.value===a.value,A.disabled=(n=A.disabled)!==null&&n!==void 0?n:a.disabled),A.disabled=(r=A.disabled)!==null&&r!==void 0?r:F;const H=se(`${j}-wrapper`,{[`${j}-wrapper-checked`]:A.checked,[`${j}-wrapper-disabled`]:A.disabled,[`${j}-wrapper-rtl`]:u==="rtl",[`${j}-wrapper-in-form-item`]:v,[`${j}-wrapper-block`]:!!a?.block},f?.className,x,C,N,P,M),[k,L]=oT(A.onClick);return D(s.createElement(jf,{component:"Radio",disabled:A.disabled},s.createElement("label",{className:H,style:Object.assign(Object.assign({},f?.style),w),onMouseEnter:e.onMouseEnter,onMouseLeave:e.onMouseLeave,title:$,onClick:k},s.createElement(iT,Object.assign({},A,{className:se(A.className,{[Uv]:!I}),type:"radio",prefixCls:j,ref:h,onClick:L})),y!==void 0?s.createElement("span",{className:`${j}-label`},y):null)))},wv=s.forwardRef(gU),pU=["parentNode"],bU="form_item";function qd(e){return e===void 0||e===!1?[]:Array.isArray(e)?e:[e]}function sT(e,t){if(!e.length)return;const n=e.join("_");return t?`${t}_${n}`:pU.includes(n)?`${bU}_${n}`:n}function cT(e,t,n,r,a,o){let c=r;return o!==void 0?c=o:n.validating?c="validating":e.length?c="error":t.length?c="warning":(n.touched||a&&n.validated)&&(c="success"),c}var yU=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,r=Object.getOwnPropertySymbols(e);ae??Object.assign(Object.assign({},t),{__INTERNAL__:{itemRef:a=>o=>{const c=Ex(a);o?n.current[c]=o:delete n.current[c]}},scrollToField:(a,o={})=>{const{focus:c}=o,u=yU(o,["focus"]),f=MO(a,r);f&&(L5(f,Object.assign({scrollMode:"if-needed",block:"nearest"},u)),c&&r.focusField(a))},focusField:a=>{var o,c;const u=r.getFieldInstance(a);typeof u?.focus=="function"?u.focus():(c=(o=MO(a,r))===null||o===void 0?void 0:o.focus)===null||c===void 0||c.call(o)},getFieldInstance:a=>{const o=Ex(a);return n.current[o]}}),[e,t]);return[r]}const xU=s.forwardRef((e,t)=>{const{getPrefixCls:n,direction:r}=s.useContext(Wt),{name:a}=s.useContext(ia),o=PS(Ex(a)),{prefixCls:c,className:u,rootClassName:f,options:d,buttonStyle:h="outline",disabled:v,children:g,size:b,style:x,id:C,optionType:y,name:w=o,defaultValue:$,value:E,block:O=!1,onChange:I,onMouseEnter:j,onMouseLeave:M,onFocus:D,onBlur:N}=e,[P,A]=Wn($,{value:E}),F=s.useCallback(K=>{const Y=P,Q=K.target.value;"value"in e||A(Q),Q!==Y&&I?.(K)},[P,A,I]),H=n("radio",c),k=`${H}-group`,L=oa(H),[T,z,V]=lT(H,L);let q=g;d&&d.length>0&&(q=d.map(K=>typeof K=="string"||typeof K=="number"?s.createElement(wv,{key:K.toString(),prefixCls:H,disabled:v,value:K,checked:P===K},K):s.createElement(wv,{key:`radio-group-value-options-${K.value}`,prefixCls:H,disabled:K.disabled||v,value:K.value,checked:P===K.value,title:K.title,style:K.style,className:K.className,id:K.id,required:K.required},K.label)));const G=la(b),B=se(k,`${k}-${h}`,{[`${k}-${G}`]:G,[`${k}-rtl`]:r==="rtl",[`${k}-block`]:O},u,f,z,V,L),U=s.useMemo(()=>({onChange:F,value:P,disabled:v,name:w,optionType:y,block:O}),[F,P,v,w,y,O]);return T(s.createElement("div",Object.assign({},ma(e,{aria:!0,data:!0}),{className:B,style:x,onMouseEnter:j,onMouseLeave:M,onFocus:D,onBlur:N,id:C,ref:t}),s.createElement(sU,{value:U},q)))}),SU=s.memo(xU);var CU=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,r=Object.getOwnPropertySymbols(e);a{const{getPrefixCls:n}=s.useContext(Wt),{prefixCls:r}=e,a=CU(e,["prefixCls"]),o=n("radio",r);return s.createElement(cU,{value:"button"},s.createElement(wv,Object.assign({prefixCls:o},a,{type:"radio",ref:t})))},$U=s.forwardRef(wU),Sa=wv;Sa.Button=$U;Sa.Group=SU;Sa.__ANT_RADIO=!0;function Hs(e){return xn(e,{inputAffixPadding:e.paddingXXS})}const Bs=e=>{const{controlHeight:t,fontSize:n,lineHeight:r,lineWidth:a,controlHeightSM:o,controlHeightLG:c,fontSizeLG:u,lineHeightLG:f,paddingSM:d,controlPaddingHorizontalSM:h,controlPaddingHorizontal:v,colorFillAlter:g,colorPrimaryHover:b,colorPrimary:x,controlOutlineWidth:C,controlOutline:y,colorErrorOutline:w,colorWarningOutline:$,colorBgContainer:E,inputFontSize:O,inputFontSizeLG:I,inputFontSizeSM:j}=e,M=O||n,D=j||M,N=I||u,P=Math.round((t-M*r)/2*10)/10-a,A=Math.round((o-D*r)/2*10)/10-a,F=Math.ceil((c-N*f)/2*10)/10-a;return{paddingBlock:Math.max(P,0),paddingBlockSM:Math.max(A,0),paddingBlockLG:Math.max(F,0),paddingInline:d-a,paddingInlineSM:h-a,paddingInlineLG:v-a,addonBg:g,activeBorderColor:x,hoverBorderColor:b,activeShadow:`0 0 0 ${C}px ${y}`,errorActiveShadow:`0 0 0 ${C}px ${w}`,warningActiveShadow:`0 0 0 ${C}px ${$}`,hoverBg:E,activeBg:E,inputFontSize:M,inputFontSizeLG:N,inputFontSizeSM:D}},EU=e=>({borderColor:e.hoverBorderColor,backgroundColor:e.hoverBg}),Sg=e=>({color:e.colorTextDisabled,backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder,boxShadow:"none",cursor:"not-allowed",opacity:1,"input[disabled], textarea[disabled]":{cursor:"not-allowed"},"&:hover:not([disabled])":Object.assign({},EU(xn(e,{hoverBorderColor:e.colorBorder,hoverBg:e.colorBgContainerDisabled})))}),dC=(e,t)=>({background:e.colorBgContainer,borderWidth:e.lineWidth,borderStyle:e.lineType,borderColor:t.borderColor,"&:hover":{borderColor:t.hoverBorderColor,backgroundColor:e.hoverBg},"&:focus, &:focus-within":{borderColor:t.activeBorderColor,boxShadow:t.activeShadow,outline:0,backgroundColor:e.activeBg}}),jO=(e,t)=>({[`&${e.componentCls}-status-${t.status}:not(${e.componentCls}-disabled)`]:Object.assign(Object.assign({},dC(e,t)),{[`${e.componentCls}-prefix, ${e.componentCls}-suffix`]:{color:t.affixColor}}),[`&${e.componentCls}-status-${t.status}${e.componentCls}-disabled`]:{borderColor:t.borderColor}}),fC=(e,t)=>({"&-outlined":Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},dC(e,{borderColor:e.colorBorder,hoverBorderColor:e.hoverBorderColor,activeBorderColor:e.activeBorderColor,activeShadow:e.activeShadow})),{[`&${e.componentCls}-disabled, &[disabled]`]:Object.assign({},Sg(e))}),jO(e,{status:"error",borderColor:e.colorError,hoverBorderColor:e.colorErrorBorderHover,activeBorderColor:e.colorError,activeShadow:e.errorActiveShadow,affixColor:e.colorError})),jO(e,{status:"warning",borderColor:e.colorWarning,hoverBorderColor:e.colorWarningBorderHover,activeBorderColor:e.colorWarning,activeShadow:e.warningActiveShadow,affixColor:e.colorWarning})),t)}),TO=(e,t)=>({[`&${e.componentCls}-group-wrapper-status-${t.status}`]:{[`${e.componentCls}-group-addon`]:{borderColor:t.addonBorderColor,color:t.addonColor}}}),dT=e=>({"&-outlined":Object.assign(Object.assign(Object.assign({[`${e.componentCls}-group`]:{"&-addon":{background:e.addonBg,border:`${te(e.lineWidth)} ${e.lineType} ${e.colorBorder}`},"&-addon:first-child":{borderInlineEnd:0},"&-addon:last-child":{borderInlineStart:0}}},TO(e,{status:"error",addonBorderColor:e.colorError,addonColor:e.colorErrorText})),TO(e,{status:"warning",addonBorderColor:e.colorWarning,addonColor:e.colorWarningText})),{[`&${e.componentCls}-group-wrapper-disabled`]:{[`${e.componentCls}-group-addon`]:Object.assign({},Sg(e))}})}),mC=(e,t)=>{const{componentCls:n}=e;return{"&-borderless":Object.assign({background:"transparent",border:"none","&:focus, &:focus-within":{outline:"none"},[`&${n}-disabled, &[disabled]`]:{color:e.colorTextDisabled,cursor:"not-allowed"},[`&${n}-status-error`]:{"&, & input, & textarea":{color:e.colorError}},[`&${n}-status-warning`]:{"&, & input, & textarea":{color:e.colorWarning}}},t)}},fT=(e,t)=>{var n;return{background:t.bg,borderWidth:e.lineWidth,borderStyle:e.lineType,borderColor:"transparent","input&, & input, textarea&, & textarea":{color:(n=t?.inputColor)!==null&&n!==void 0?n:"unset"},"&:hover":{background:t.hoverBg},"&:focus, &:focus-within":{outline:0,borderColor:t.activeBorderColor,backgroundColor:e.activeBg}}},DO=(e,t)=>({[`&${e.componentCls}-status-${t.status}:not(${e.componentCls}-disabled)`]:Object.assign(Object.assign({},fT(e,t)),{[`${e.componentCls}-prefix, ${e.componentCls}-suffix`]:{color:t.affixColor}})}),hC=(e,t)=>({"&-filled":Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},fT(e,{bg:e.colorFillTertiary,hoverBg:e.colorFillSecondary,activeBorderColor:e.activeBorderColor})),{[`&${e.componentCls}-disabled, &[disabled]`]:Object.assign({},Sg(e))}),DO(e,{status:"error",bg:e.colorErrorBg,hoverBg:e.colorErrorBgHover,activeBorderColor:e.colorError,inputColor:e.colorErrorText,affixColor:e.colorError})),DO(e,{status:"warning",bg:e.colorWarningBg,hoverBg:e.colorWarningBgHover,activeBorderColor:e.colorWarning,inputColor:e.colorWarningText,affixColor:e.colorWarning})),t)}),PO=(e,t)=>({[`&${e.componentCls}-group-wrapper-status-${t.status}`]:{[`${e.componentCls}-group-addon`]:{background:t.addonBg,color:t.addonColor}}}),mT=e=>({"&-filled":Object.assign(Object.assign(Object.assign({[`${e.componentCls}-group-addon`]:{background:e.colorFillTertiary,"&:last-child":{position:"static"}}},PO(e,{status:"error",addonBg:e.colorErrorBg,addonColor:e.colorErrorText})),PO(e,{status:"warning",addonBg:e.colorWarningBg,addonColor:e.colorWarningText})),{[`&${e.componentCls}-group-wrapper-disabled`]:{[`${e.componentCls}-group`]:{"&-addon":{background:e.colorFillTertiary,color:e.colorTextDisabled},"&-addon:first-child":{borderInlineStart:`${te(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderTop:`${te(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderBottom:`${te(e.lineWidth)} ${e.lineType} ${e.colorBorder}`},"&-addon:last-child":{borderInlineEnd:`${te(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderTop:`${te(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderBottom:`${te(e.lineWidth)} ${e.lineType} ${e.colorBorder}`}}}})}),hT=(e,t)=>({background:e.colorBgContainer,borderWidth:`${te(e.lineWidth)} 0`,borderStyle:`${e.lineType} none`,borderColor:`transparent transparent ${t.borderColor} transparent`,borderRadius:0,"&:hover":{borderColor:`transparent transparent ${t.borderColor} transparent`,backgroundColor:e.hoverBg},"&:focus, &:focus-within":{borderColor:`transparent transparent ${t.activeBorderColor} transparent`,outline:0,backgroundColor:e.activeBg}}),kO=(e,t)=>({[`&${e.componentCls}-status-${t.status}:not(${e.componentCls}-disabled)`]:Object.assign(Object.assign({},hT(e,t)),{[`${e.componentCls}-prefix, ${e.componentCls}-suffix`]:{color:t.affixColor}}),[`&${e.componentCls}-status-${t.status}${e.componentCls}-disabled`]:{borderColor:`transparent transparent ${t.borderColor} transparent`}}),vC=(e,t)=>({"&-underlined":Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},hT(e,{borderColor:e.colorBorder,hoverBorderColor:e.hoverBorderColor,activeBorderColor:e.activeBorderColor,activeShadow:e.activeShadow})),{[`&${e.componentCls}-disabled, &[disabled]`]:{color:e.colorTextDisabled,boxShadow:"none",cursor:"not-allowed","&:hover":{borderColor:`transparent transparent ${e.colorBorder} transparent`}},"input[disabled], textarea[disabled]":{cursor:"not-allowed"}}),kO(e,{status:"error",borderColor:e.colorError,hoverBorderColor:e.colorErrorBorderHover,activeBorderColor:e.colorError,activeShadow:e.errorActiveShadow,affixColor:e.colorError})),kO(e,{status:"warning",borderColor:e.colorWarning,hoverBorderColor:e.colorWarningBorderHover,activeBorderColor:e.colorWarning,activeShadow:e.warningActiveShadow,affixColor:e.colorWarning})),t)}),gC=e=>({"&::-moz-placeholder":{opacity:1},"&::placeholder":{color:e,userSelect:"none"},"&:placeholder-shown":{textOverflow:"ellipsis"}}),vT=e=>{const{paddingBlockLG:t,lineHeightLG:n,borderRadiusLG:r,paddingInlineLG:a}=e;return{padding:`${te(t)} ${te(a)}`,fontSize:e.inputFontSizeLG,lineHeight:n,borderRadius:r}},pC=e=>({padding:`${te(e.paddingBlockSM)} ${te(e.paddingInlineSM)}`,fontSize:e.inputFontSizeSM,borderRadius:e.borderRadiusSM}),Lf=e=>Object.assign(Object.assign({position:"relative",display:"inline-block",width:"100%",minWidth:0,padding:`${te(e.paddingBlock)} ${te(e.paddingInline)}`,color:e.colorText,fontSize:e.inputFontSize,lineHeight:e.lineHeight,borderRadius:e.borderRadius,transition:`all ${e.motionDurationMid}`},gC(e.colorTextPlaceholder)),{"&-lg":Object.assign({},vT(e)),"&-sm":Object.assign({},pC(e)),"&-rtl, &-textarea-rtl":{direction:"rtl"}}),gT=e=>{const{componentCls:t,antCls:n}=e;return{position:"relative",display:"table",width:"100%",borderCollapse:"separate",borderSpacing:0,"&[class*='col-']":{paddingInlineEnd:e.paddingXS,"&:last-child":{paddingInlineEnd:0}},[`&-lg ${t}, &-lg > ${t}-group-addon`]:Object.assign({},vT(e)),[`&-sm ${t}, &-sm > ${t}-group-addon`]:Object.assign({},pC(e)),[`&-lg ${n}-select-single ${n}-select-selector`]:{height:e.controlHeightLG},[`&-sm ${n}-select-single ${n}-select-selector`]:{height:e.controlHeightSM},[`> ${t}`]:{display:"table-cell","&:not(:first-child):not(:last-child)":{borderRadius:0}},[`${t}-group`]:{"&-addon, &-wrap":{display:"table-cell",width:1,whiteSpace:"nowrap",verticalAlign:"middle","&:not(:first-child):not(:last-child)":{borderRadius:0}},"&-wrap > *":{display:"block !important"},"&-addon":{position:"relative",padding:`0 ${te(e.paddingInline)}`,color:e.colorText,fontWeight:"normal",fontSize:e.inputFontSize,textAlign:"center",borderRadius:e.borderRadius,transition:`all ${e.motionDurationSlow}`,lineHeight:1,[`${n}-select`]:{margin:`${te(e.calc(e.paddingBlock).add(1).mul(-1).equal())} ${te(e.calc(e.paddingInline).mul(-1).equal())}`,[`&${n}-select-single:not(${n}-select-customize-input):not(${n}-pagination-size-changer)`]:{[`${n}-select-selector`]:{backgroundColor:"inherit",border:`${te(e.lineWidth)} ${e.lineType} transparent`,boxShadow:"none"}}},[`${n}-cascader-picker`]:{margin:`-9px ${te(e.calc(e.paddingInline).mul(-1).equal())}`,backgroundColor:"transparent",[`${n}-cascader-input`]:{textAlign:"start",border:0,boxShadow:"none"}}}},[t]:{width:"100%",marginBottom:0,textAlign:"inherit","&:focus":{zIndex:1,borderInlineEndWidth:1},"&:hover":{zIndex:1,borderInlineEndWidth:1,[`${t}-search-with-button &`]:{zIndex:0}}},[`> ${t}:first-child, ${t}-group-addon:first-child`]:{borderStartEndRadius:0,borderEndEndRadius:0,[`${n}-select ${n}-select-selector`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${t}-affix-wrapper`]:{[`&:not(:first-child) ${t}`]:{borderStartStartRadius:0,borderEndStartRadius:0},[`&:not(:last-child) ${t}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${t}:last-child, ${t}-group-addon:last-child`]:{borderStartStartRadius:0,borderEndStartRadius:0,[`${n}-select ${n}-select-selector`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`${t}-affix-wrapper`]:{"&:not(:last-child)":{borderStartEndRadius:0,borderEndEndRadius:0,[`${t}-search &`]:{borderStartStartRadius:e.borderRadius,borderEndStartRadius:e.borderRadius}},[`&:not(:first-child), ${t}-search &:not(:first-child)`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`&${t}-group-compact`]:Object.assign(Object.assign({display:"block"},Uo()),{[`${t}-group-addon, ${t}-group-wrap, > ${t}`]:{"&:not(:first-child):not(:last-child)":{borderInlineEndWidth:e.lineWidth,"&:hover, &:focus":{zIndex:1}}},"& > *":{display:"inline-flex",float:"none",verticalAlign:"top",borderRadius:0},[` + & > ${t}-affix-wrapper, + & > ${t}-number-affix-wrapper, + & > ${n}-picker-range + `]:{display:"inline-flex"},"& > *:not(:last-child)":{marginInlineEnd:e.calc(e.lineWidth).mul(-1).equal(),borderInlineEndWidth:e.lineWidth},[t]:{float:"none"},[`& > ${n}-select > ${n}-select-selector, + & > ${n}-select-auto-complete ${t}, + & > ${n}-cascader-picker ${t}, + & > ${t}-group-wrapper ${t}`]:{borderInlineEndWidth:e.lineWidth,borderRadius:0,"&:hover, &:focus":{zIndex:1}},[`& > ${n}-select-focused`]:{zIndex:1},[`& > ${n}-select > ${n}-select-arrow`]:{zIndex:1},[`& > *:first-child, + & > ${n}-select:first-child > ${n}-select-selector, + & > ${n}-select-auto-complete:first-child ${t}, + & > ${n}-cascader-picker:first-child ${t}`]:{borderStartStartRadius:e.borderRadius,borderEndStartRadius:e.borderRadius},[`& > *:last-child, + & > ${n}-select:last-child > ${n}-select-selector, + & > ${n}-cascader-picker:last-child ${t}, + & > ${n}-cascader-picker-focused:last-child ${t}`]:{borderInlineEndWidth:e.lineWidth,borderStartEndRadius:e.borderRadius,borderEndEndRadius:e.borderRadius},[`& > ${n}-select-auto-complete ${t}`]:{verticalAlign:"top"},[`${t}-group-wrapper + ${t}-group-wrapper`]:{marginInlineStart:e.calc(e.lineWidth).mul(-1).equal(),[`${t}-affix-wrapper`]:{borderRadius:0}},[`${t}-group-wrapper:not(:last-child)`]:{[`&${t}-search > ${t}-group`]:{[`& > ${t}-group-addon > ${t}-search-button`]:{borderRadius:0},[`& > ${t}`]:{borderStartStartRadius:e.borderRadius,borderStartEndRadius:0,borderEndEndRadius:0,borderEndStartRadius:e.borderRadius}}}})}},_U=e=>{const{componentCls:t,controlHeightSM:n,lineWidth:r,calc:a}=e,c=a(n).sub(a(r).mul(2)).sub(16).div(2).equal();return{[t]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},zn(e)),Lf(e)),fC(e)),hC(e)),mC(e)),vC(e)),{'&[type="color"]':{height:e.controlHeight,[`&${t}-lg`]:{height:e.controlHeightLG},[`&${t}-sm`]:{height:n,paddingTop:c,paddingBottom:c}},'&[type="search"]::-webkit-search-cancel-button, &[type="search"]::-webkit-search-decoration':{appearance:"none"}})}},OU=e=>{const{componentCls:t}=e;return{[`${t}-clear-icon`]:{margin:0,padding:0,lineHeight:0,color:e.colorTextQuaternary,fontSize:e.fontSizeIcon,verticalAlign:-1,cursor:"pointer",transition:`color ${e.motionDurationSlow}`,border:"none",outline:"none",backgroundColor:"transparent","&:hover":{color:e.colorIcon},"&:active":{color:e.colorText},"&-hidden":{visibility:"hidden"},"&-has-suffix":{margin:`0 ${te(e.inputAffixPadding)}`}}}},IU=e=>{const{componentCls:t,inputAffixPadding:n,colorTextDescription:r,motionDurationSlow:a,colorIcon:o,colorIconHover:c,iconCls:u}=e,f=`${t}-affix-wrapper`,d=`${t}-affix-wrapper-disabled`;return{[f]:Object.assign(Object.assign(Object.assign(Object.assign({},Lf(e)),{display:"inline-flex",[`&:not(${t}-disabled):hover`]:{zIndex:1,[`${t}-search-with-button &`]:{zIndex:0}},"&-focused, &:focus":{zIndex:1},[`> input${t}`]:{padding:0},[`> input${t}, > textarea${t}`]:{fontSize:"inherit",border:"none",borderRadius:0,outline:"none",background:"transparent",color:"inherit","&::-ms-reveal":{display:"none"},"&:focus":{boxShadow:"none !important"}},"&::before":{display:"inline-block",width:0,visibility:"hidden",content:'"\\a0"'},[t]:{"&-prefix, &-suffix":{display:"flex",flex:"none",alignItems:"center","> *:not(:last-child)":{marginInlineEnd:e.paddingXS}},"&-show-count-suffix":{color:r,direction:"ltr"},"&-show-count-has-suffix":{marginInlineEnd:e.paddingXXS},"&-prefix":{marginInlineEnd:n},"&-suffix":{marginInlineStart:n}}}),OU(e)),{[`${u}${t}-password-icon`]:{color:o,cursor:"pointer",transition:`all ${a}`,"&:hover":{color:c}}}),[`${t}-underlined`]:{borderRadius:0},[d]:{[`${u}${t}-password-icon`]:{color:o,cursor:"not-allowed","&:hover":{color:o}}}}},RU=e=>{const{componentCls:t,borderRadiusLG:n,borderRadiusSM:r}=e;return{[`${t}-group`]:Object.assign(Object.assign(Object.assign({},zn(e)),gT(e)),{"&-rtl":{direction:"rtl"},"&-wrapper":Object.assign(Object.assign(Object.assign({display:"inline-block",width:"100%",textAlign:"start",verticalAlign:"top","&-rtl":{direction:"rtl"},"&-lg":{[`${t}-group-addon`]:{borderRadius:n,fontSize:e.inputFontSizeLG}},"&-sm":{[`${t}-group-addon`]:{borderRadius:r}}},dT(e)),mT(e)),{[`&:not(${t}-compact-first-item):not(${t}-compact-last-item)${t}-compact-item`]:{[`${t}, ${t}-group-addon`]:{borderRadius:0}},[`&:not(${t}-compact-last-item)${t}-compact-first-item`]:{[`${t}, ${t}-group-addon`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&:not(${t}-compact-first-item)${t}-compact-last-item`]:{[`${t}, ${t}-group-addon`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`&:not(${t}-compact-last-item)${t}-compact-item`]:{[`${t}-affix-wrapper`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&:not(${t}-compact-first-item)${t}-compact-item`]:{[`${t}-affix-wrapper`]:{borderStartStartRadius:0,borderEndStartRadius:0}}})})}},NU=e=>{const{componentCls:t,antCls:n}=e,r=`${t}-search`;return{[r]:{[t]:{"&:not([disabled]):hover, &:not([disabled]):focus":{[`+ ${t}-group-addon ${r}-button:not(${n}-btn-color-primary):not(${n}-btn-variant-text)`]:{borderInlineStartColor:e.colorPrimaryHover}}},[`${t}-affix-wrapper`]:{height:e.controlHeight,borderRadius:0},[`${t}-lg`]:{lineHeight:e.calc(e.lineHeightLG).sub(2e-4).equal()},[`> ${t}-group`]:{[`> ${t}-group-addon:last-child`]:{insetInlineStart:-1,padding:0,border:0,[`${r}-button`]:{marginInlineEnd:-1,borderStartStartRadius:0,borderEndStartRadius:0,boxShadow:"none"},[`${r}-button:not(${n}-btn-color-primary)`]:{color:e.colorTextDescription,"&:not([disabled]):hover":{color:e.colorPrimaryHover},"&:active":{color:e.colorPrimaryActive},[`&${n}-btn-loading::before`]:{inset:0}}}},[`${r}-button`]:{height:e.controlHeight,"&:hover, &:focus":{zIndex:1}},"&-large":{[`${t}-affix-wrapper, ${r}-button`]:{height:e.controlHeightLG}},"&-small":{[`${t}-affix-wrapper, ${r}-button`]:{height:e.controlHeightSM}},"&-rtl":{direction:"rtl"},[`&${t}-compact-item`]:{[`&:not(${t}-compact-last-item)`]:{[`${t}-group-addon`]:{[`${t}-search-button`]:{marginInlineEnd:e.calc(e.lineWidth).mul(-1).equal(),borderRadius:0}}},[`&:not(${t}-compact-first-item)`]:{[`${t},${t}-affix-wrapper`]:{borderRadius:0}},[`> ${t}-group-addon ${t}-search-button, + > ${t}, + ${t}-affix-wrapper`]:{"&:hover, &:focus, &:active":{zIndex:2}},[`> ${t}-affix-wrapper-focused`]:{zIndex:2}}}}},MU=e=>{const{componentCls:t}=e;return{[`${t}-out-of-range`]:{[`&, & input, & textarea, ${t}-show-count-suffix, ${t}-data-count`]:{color:e.colorError}}}},pT=Kn(["Input","Shared"],e=>{const t=xn(e,Hs(e));return[_U(t),IU(t)]},Bs,{resetFont:!1}),bT=Kn(["Input","Component"],e=>{const t=xn(e,Hs(e));return[RU(t),NU(t),MU(t),Tf(t)]},Bs,{resetFont:!1}),Dy=(e,t)=>{const{componentCls:n,controlHeight:r}=e,a=t?`${n}-${t}`:"",o=FM(e);return[{[`${n}-multiple${a}`]:{paddingBlock:o.containerPadding,paddingInlineStart:o.basePadding,minHeight:r,[`${n}-selection-item`]:{height:o.itemHeight,lineHeight:te(o.itemLineHeight)}}}]},jU=e=>{const{componentCls:t,calc:n,lineWidth:r}=e,a=xn(e,{fontHeight:e.fontSize,selectHeight:e.controlHeightSM,multipleSelectItemHeight:e.multipleItemHeightSM,borderRadius:e.borderRadiusSM,borderRadiusSM:e.borderRadiusXS,controlHeight:e.controlHeightSM}),o=xn(e,{fontHeight:n(e.multipleItemHeightLG).sub(n(r).mul(2).equal()).equal(),fontSize:e.fontSizeLG,selectHeight:e.controlHeightLG,multipleSelectItemHeight:e.multipleItemHeightLG,borderRadius:e.borderRadiusLG,borderRadiusSM:e.borderRadius,controlHeight:e.controlHeightLG});return[Dy(a,"small"),Dy(e),Dy(o,"large"),{[`${t}${t}-multiple`]:Object.assign(Object.assign({width:"100%",cursor:"text",[`${t}-selector`]:{flex:"auto",padding:0,position:"relative","&:after":{margin:0},[`${t}-selection-placeholder`]:{position:"absolute",top:"50%",insetInlineStart:e.inputPaddingHorizontalBase,insetInlineEnd:0,transform:"translateY(-50%)",transition:`all ${e.motionDurationSlow}`,overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",flex:1,color:e.colorTextPlaceholder,pointerEvents:"none"}}},VM(e)),{[`${t}-multiple-input`]:{width:0,height:0,border:0,visibility:"hidden",position:"absolute",zIndex:-1}})}]},TU=e=>{const{pickerCellCls:t,pickerCellInnerCls:n,cellHeight:r,borderRadiusSM:a,motionDurationMid:o,cellHoverBg:c,lineWidth:u,lineType:f,colorPrimary:d,cellActiveWithRangeBg:h,colorTextLightSolid:v,colorTextDisabled:g,cellBgDisabled:b,colorFillSecondary:x}=e;return{"&::before":{position:"absolute",top:"50%",insetInlineStart:0,insetInlineEnd:0,zIndex:1,height:r,transform:"translateY(-50%)",content:'""',pointerEvents:"none"},[n]:{position:"relative",zIndex:2,display:"inline-block",minWidth:r,height:r,lineHeight:te(r),borderRadius:a,transition:`background ${o}`},[`&:hover:not(${t}-in-view):not(${t}-disabled), + &:hover:not(${t}-selected):not(${t}-range-start):not(${t}-range-end):not(${t}-disabled)`]:{[n]:{background:c}},[`&-in-view${t}-today ${n}`]:{"&::before":{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,zIndex:1,border:`${te(u)} ${f} ${d}`,borderRadius:a,content:'""'}},[`&-in-view${t}-in-range, + &-in-view${t}-range-start, + &-in-view${t}-range-end`]:{position:"relative",[`&:not(${t}-disabled):before`]:{background:h}},[`&-in-view${t}-selected, + &-in-view${t}-range-start, + &-in-view${t}-range-end`]:{[`&:not(${t}-disabled) ${n}`]:{color:v,background:d},[`&${t}-disabled ${n}`]:{background:x}},[`&-in-view${t}-range-start:not(${t}-disabled):before`]:{insetInlineStart:"50%"},[`&-in-view${t}-range-end:not(${t}-disabled):before`]:{insetInlineEnd:"50%"},[`&-in-view${t}-range-start:not(${t}-range-end) ${n}`]:{borderStartStartRadius:a,borderEndStartRadius:a,borderStartEndRadius:0,borderEndEndRadius:0},[`&-in-view${t}-range-end:not(${t}-range-start) ${n}`]:{borderStartStartRadius:0,borderEndStartRadius:0,borderStartEndRadius:a,borderEndEndRadius:a},"&-disabled":{color:g,cursor:"not-allowed",[n]:{background:"transparent"},"&::before":{background:b}},[`&-disabled${t}-today ${n}::before`]:{borderColor:g}}},DU=e=>{const{componentCls:t,pickerCellCls:n,pickerCellInnerCls:r,pickerYearMonthCellWidth:a,pickerControlIconSize:o,cellWidth:c,paddingSM:u,paddingXS:f,paddingXXS:d,colorBgContainer:h,lineWidth:v,lineType:g,borderRadiusLG:b,colorPrimary:x,colorTextHeading:C,colorSplit:y,pickerControlIconBorderWidth:w,colorIcon:$,textHeight:E,motionDurationMid:O,colorIconHover:I,fontWeightStrong:j,cellHeight:M,pickerCellPaddingVertical:D,colorTextDisabled:N,colorText:P,fontSize:A,motionDurationSlow:F,withoutTimeCellHeight:H,pickerQuarterPanelContentHeight:k,borderRadiusSM:L,colorTextLightSolid:T,cellHoverBg:z,timeColumnHeight:V,timeColumnWidth:q,timeCellHeight:G,controlItemBgActive:B,marginXXS:U,pickerDatePanelPaddingHorizontal:K,pickerControlIconMargin:Y}=e,Q=e.calc(c).mul(7).add(e.calc(K).mul(2)).equal();return{[t]:{"&-panel":{display:"inline-flex",flexDirection:"column",textAlign:"center",background:h,borderRadius:b,outline:"none","&-focused":{borderColor:x},"&-rtl":{[`${t}-prev-icon, + ${t}-super-prev-icon`]:{transform:"rotate(45deg)"},[`${t}-next-icon, + ${t}-super-next-icon`]:{transform:"rotate(-135deg)"},[`${t}-time-panel`]:{[`${t}-content`]:{direction:"ltr","> *":{direction:"rtl"}}}}},"&-decade-panel,\n &-year-panel,\n &-quarter-panel,\n &-month-panel,\n &-week-panel,\n &-date-panel,\n &-time-panel":{display:"flex",flexDirection:"column",width:Q},"&-header":{display:"flex",padding:`0 ${te(f)}`,color:C,borderBottom:`${te(v)} ${g} ${y}`,"> *":{flex:"none"},button:{padding:0,color:$,lineHeight:te(E),background:"transparent",border:0,cursor:"pointer",transition:`color ${O}`,fontSize:"inherit",display:"inline-flex",alignItems:"center",justifyContent:"center","&:empty":{display:"none"}},"> button":{minWidth:"1.6em",fontSize:A,"&:hover":{color:I},"&:disabled":{opacity:.25,pointerEvents:"none"}},"&-view":{flex:"auto",fontWeight:j,lineHeight:te(E),"> button":{color:"inherit",fontWeight:"inherit",verticalAlign:"top","&:not(:first-child)":{marginInlineStart:f},"&:hover":{color:x}}}},"&-prev-icon,\n &-next-icon,\n &-super-prev-icon,\n &-super-next-icon":{position:"relative",width:o,height:o,"&::before":{position:"absolute",top:0,insetInlineStart:0,width:o,height:o,border:"0 solid currentcolor",borderBlockStartWidth:w,borderInlineStartWidth:w,content:'""'}},"&-super-prev-icon,\n &-super-next-icon":{"&::after":{position:"absolute",top:Y,insetInlineStart:Y,display:"inline-block",width:o,height:o,border:"0 solid currentcolor",borderBlockStartWidth:w,borderInlineStartWidth:w,content:'""'}},"&-prev-icon, &-super-prev-icon":{transform:"rotate(-45deg)"},"&-next-icon, &-super-next-icon":{transform:"rotate(135deg)"},"&-content":{width:"100%",tableLayout:"fixed",borderCollapse:"collapse","th, td":{position:"relative",minWidth:M,fontWeight:"normal"},th:{height:e.calc(M).add(e.calc(D).mul(2)).equal(),color:P,verticalAlign:"middle"}},"&-cell":Object.assign({padding:`${te(D)} 0`,color:N,cursor:"pointer","&-in-view":{color:P}},TU(e)),"&-decade-panel,\n &-year-panel,\n &-quarter-panel,\n &-month-panel":{[`${t}-content`]:{height:e.calc(H).mul(4).equal()},[r]:{padding:`0 ${te(f)}`}},"&-quarter-panel":{[`${t}-content`]:{height:k}},"&-decade-panel":{[r]:{padding:`0 ${te(e.calc(f).div(2).equal())}`},[`${t}-cell::before`]:{display:"none"}},"&-year-panel,\n &-quarter-panel,\n &-month-panel":{[`${t}-body`]:{padding:`0 ${te(f)}`},[r]:{width:a}},"&-date-panel":{[`${t}-body`]:{padding:`${te(f)} ${te(K)}`},[`${t}-content th`]:{boxSizing:"border-box",padding:0}},"&-week-panel-row":{td:{"&:before":{transition:`background ${O}`},"&:first-child:before":{borderStartStartRadius:L,borderEndStartRadius:L},"&:last-child:before":{borderStartEndRadius:L,borderEndEndRadius:L}},"&:hover td:before":{background:z},"&-range-start td, &-range-end td, &-selected td, &-hover td":{[`&${n}`]:{"&:before":{background:x},[`&${t}-cell-week`]:{color:new Pn(T).setA(.5).toHexString()},[r]:{color:T}}},"&-range-hover td:before":{background:B}},"&-week-panel, &-date-panel-show-week":{[`${t}-body`]:{padding:`${te(f)} ${te(u)}`},[`${t}-content th`]:{width:"auto"}},"&-datetime-panel":{display:"flex",[`${t}-time-panel`]:{borderInlineStart:`${te(v)} ${g} ${y}`},[`${t}-date-panel, + ${t}-time-panel`]:{transition:`opacity ${F}`},"&-active":{[`${t}-date-panel, + ${t}-time-panel`]:{opacity:.3,"&-active":{opacity:1}}}},"&-time-panel":{width:"auto",minWidth:"auto",[`${t}-content`]:{display:"flex",flex:"auto",height:V},"&-column":{flex:"1 0 auto",width:q,margin:`${te(d)} 0`,padding:0,overflowY:"hidden",textAlign:"start",listStyle:"none",transition:`background ${O}`,overflowX:"hidden","&::-webkit-scrollbar":{width:8,backgroundColor:"transparent"},"&::-webkit-scrollbar-thumb":{backgroundColor:e.colorTextTertiary,borderRadius:e.borderRadiusSM},"&":{scrollbarWidth:"thin",scrollbarColor:`${e.colorTextTertiary} transparent`},"&::after":{display:"block",height:`calc(100% - ${te(G)})`,content:'""'},"&:not(:first-child)":{borderInlineStart:`${te(v)} ${g} ${y}`},"&-active":{background:new Pn(B).setA(.2).toHexString()},"&:hover":{overflowY:"auto"},"> li":{margin:0,padding:0,[`&${t}-time-panel-cell`]:{marginInline:U,[`${t}-time-panel-cell-inner`]:{display:"block",width:e.calc(q).sub(e.calc(U).mul(2)).equal(),height:G,margin:0,paddingBlock:0,paddingInlineEnd:0,paddingInlineStart:e.calc(q).sub(G).div(2).equal(),color:P,lineHeight:te(G),borderRadius:L,cursor:"pointer",transition:`background ${O}`,"&:hover":{background:z}},"&-selected":{[`${t}-time-panel-cell-inner`]:{background:B}},"&-disabled":{[`${t}-time-panel-cell-inner`]:{color:N,background:"transparent",cursor:"not-allowed"}}}}}}}}},PU=e=>{const{componentCls:t,textHeight:n,lineWidth:r,paddingSM:a,antCls:o,colorPrimary:c,cellActiveWithRangeBg:u,colorPrimaryBorder:f,lineType:d,colorSplit:h}=e;return{[`${t}-dropdown`]:{[`${t}-footer`]:{borderTop:`${te(r)} ${d} ${h}`,"&-extra":{padding:`0 ${te(a)}`,lineHeight:te(e.calc(n).sub(e.calc(r).mul(2)).equal()),textAlign:"start","&:not(:last-child)":{borderBottom:`${te(r)} ${d} ${h}`}}},[`${t}-panels + ${t}-footer ${t}-ranges`]:{justifyContent:"space-between"},[`${t}-ranges`]:{marginBlock:0,paddingInline:te(a),overflow:"hidden",textAlign:"start",listStyle:"none",display:"flex",justifyContent:"center",alignItems:"center","> li":{lineHeight:te(e.calc(n).sub(e.calc(r).mul(2)).equal()),display:"inline-block"},[`${t}-now-btn-disabled`]:{pointerEvents:"none",color:e.colorTextDisabled},[`${t}-preset > ${o}-tag-blue`]:{color:c,background:u,borderColor:f,cursor:"pointer"},[`${t}-ok`]:{paddingBlock:e.calc(r).mul(2).equal(),marginInlineStart:"auto"}}}}},kU=e=>{const{componentCls:t,controlHeightLG:n,paddingXXS:r,padding:a}=e;return{pickerCellCls:`${t}-cell`,pickerCellInnerCls:`${t}-cell-inner`,pickerYearMonthCellWidth:e.calc(n).mul(1.5).equal(),pickerQuarterPanelContentHeight:e.calc(n).mul(1.4).equal(),pickerCellPaddingVertical:e.calc(r).add(e.calc(r).div(2)).equal(),pickerCellBorderGap:2,pickerControlIconSize:7,pickerControlIconMargin:4,pickerControlIconBorderWidth:1.5,pickerDatePanelPaddingHorizontal:e.calc(a).add(e.calc(r).div(2)).equal()}},AU=e=>{const{colorBgContainerDisabled:t,controlHeight:n,controlHeightSM:r,controlHeightLG:a,paddingXXS:o,lineWidth:c}=e,u=o*2,f=c*2,d=Math.min(n-u,n-f),h=Math.min(r-u,r-f),v=Math.min(a-u,a-f);return{INTERNAL_FIXED_ITEM_MARGIN:Math.floor(o/2),cellHoverBg:e.controlItemBgHover,cellActiveWithRangeBg:e.controlItemBgActive,cellHoverWithRangeBg:new Pn(e.colorPrimary).lighten(35).toHexString(),cellRangeBorderColor:new Pn(e.colorPrimary).lighten(20).toHexString(),cellBgDisabled:t,timeColumnWidth:a*1.4,timeColumnHeight:224,timeCellHeight:28,cellWidth:r*1.5,cellHeight:r,textHeight:a,withoutTimeCellHeight:a*1.65,multipleItemBg:e.colorFillSecondary,multipleItemBorderColor:"transparent",multipleItemHeight:d,multipleItemHeightSM:h,multipleItemHeightLG:v,multipleSelectorBgDisabled:t,multipleItemColorDisabled:e.colorTextDisabled,multipleItemBorderColorDisabled:"transparent"}},zU=e=>Object.assign(Object.assign(Object.assign(Object.assign({},Bs(e)),AU(e)),GS(e)),{presetsWidth:120,presetsMaxWidth:200,zIndexPopup:e.zIndexPopupBase+50}),LU=e=>{const{componentCls:t}=e;return{[t]:[Object.assign(Object.assign(Object.assign(Object.assign({},fC(e)),vC(e)),hC(e)),mC(e)),{"&-outlined":{[`&${t}-multiple ${t}-selection-item`]:{background:e.multipleItemBg,border:`${te(e.lineWidth)} ${e.lineType} ${e.multipleItemBorderColor}`}},"&-filled":{[`&${t}-multiple ${t}-selection-item`]:{background:e.colorBgContainer,border:`${te(e.lineWidth)} ${e.lineType} ${e.colorSplit}`}},"&-borderless":{[`&${t}-multiple ${t}-selection-item`]:{background:e.multipleItemBg,border:`${te(e.lineWidth)} ${e.lineType} ${e.multipleItemBorderColor}`}},"&-underlined":{[`&${t}-multiple ${t}-selection-item`]:{background:e.multipleItemBg,border:`${te(e.lineWidth)} ${e.lineType} ${e.multipleItemBorderColor}`}}}]}},Py=(e,t)=>({padding:`${te(e)} ${te(t)}`}),HU=e=>{const{componentCls:t,colorError:n,colorWarning:r}=e;return{[`${t}:not(${t}-disabled):not([disabled])`]:{[`&${t}-status-error`]:{[`${t}-active-bar`]:{background:n}},[`&${t}-status-warning`]:{[`${t}-active-bar`]:{background:r}}}}},BU=e=>{var t;const{componentCls:n,antCls:r,paddingInline:a,lineWidth:o,lineType:c,colorBorder:u,borderRadius:f,motionDurationMid:d,colorTextDisabled:h,colorTextPlaceholder:v,colorTextQuaternary:g,fontSizeLG:b,inputFontSizeLG:x,fontSizeSM:C,inputFontSizeSM:y,controlHeightSM:w,paddingInlineSM:$,paddingXS:E,marginXS:O,colorIcon:I,lineWidthBold:j,colorPrimary:M,motionDurationSlow:D,zIndexPopup:N,paddingXXS:P,sizePopupArrow:A,colorBgElevated:F,borderRadiusLG:H,boxShadowSecondary:k,borderRadiusSM:L,colorSplit:T,cellHoverBg:z,presetsWidth:V,presetsMaxWidth:q,boxShadowPopoverArrow:G,fontHeight:B,lineHeightLG:U}=e;return[{[n]:Object.assign(Object.assign(Object.assign({},zn(e)),Py(e.paddingBlock,e.paddingInline)),{position:"relative",display:"inline-flex",alignItems:"center",lineHeight:1,borderRadius:f,transition:`border ${d}, box-shadow ${d}, background ${d}`,[`${n}-prefix`]:{flex:"0 0 auto",marginInlineEnd:e.inputAffixPadding},[`${n}-input`]:{position:"relative",display:"inline-flex",alignItems:"center",width:"100%","> input":Object.assign(Object.assign({position:"relative",display:"inline-block",width:"100%",color:"inherit",fontSize:(t=e.inputFontSize)!==null&&t!==void 0?t:e.fontSize,lineHeight:e.lineHeight,transition:`all ${d}`},gC(v)),{flex:"auto",minWidth:1,height:"auto",padding:0,background:"transparent",border:0,fontFamily:"inherit","&:focus":{boxShadow:"none",outline:0},"&[disabled]":{background:"transparent",color:h,cursor:"not-allowed"}}),"&-placeholder":{"> input":{color:v}}},"&-large":Object.assign(Object.assign({},Py(e.paddingBlockLG,e.paddingInlineLG)),{[`${n}-input > input`]:{fontSize:x??b,lineHeight:U}}),"&-small":Object.assign(Object.assign({},Py(e.paddingBlockSM,e.paddingInlineSM)),{[`${n}-input > input`]:{fontSize:y??C}}),[`${n}-suffix`]:{display:"flex",flex:"none",alignSelf:"center",marginInlineStart:e.calc(E).div(2).equal(),color:g,lineHeight:1,pointerEvents:"none",transition:`opacity ${d}, color ${d}`,"> *":{verticalAlign:"top","&:not(:last-child)":{marginInlineEnd:O}}},[`${n}-clear`]:{position:"absolute",top:"50%",insetInlineEnd:0,color:g,lineHeight:1,transform:"translateY(-50%)",cursor:"pointer",opacity:0,transition:`opacity ${d}, color ${d}`,"> *":{verticalAlign:"top"},"&:hover":{color:I}},"&:hover":{[`${n}-clear`]:{opacity:1},[`${n}-suffix:not(:last-child)`]:{opacity:0}},[`${n}-separator`]:{position:"relative",display:"inline-block",width:"1em",height:b,color:g,fontSize:b,verticalAlign:"top",cursor:"default",[`${n}-focused &`]:{color:I},[`${n}-range-separator &`]:{[`${n}-disabled &`]:{cursor:"not-allowed"}}},"&-range":{position:"relative",display:"inline-flex",[`${n}-active-bar`]:{bottom:e.calc(o).mul(-1).equal(),height:j,background:M,opacity:0,transition:`all ${D} ease-out`,pointerEvents:"none"},[`&${n}-focused`]:{[`${n}-active-bar`]:{opacity:1}},[`${n}-range-separator`]:{alignItems:"center",padding:`0 ${te(E)}`,lineHeight:1}},"&-range, &-multiple":{[`${n}-clear`]:{insetInlineEnd:a},[`&${n}-small`]:{[`${n}-clear`]:{insetInlineEnd:$}}},"&-dropdown":Object.assign(Object.assign(Object.assign({},zn(e)),DU(e)),{pointerEvents:"none",position:"absolute",top:-9999,left:{_skip_check_:!0,value:-9999},zIndex:N,[`&${n}-dropdown-hidden`]:{display:"none"},"&-rtl":{direction:"rtl"},[`&${n}-dropdown-placement-bottomLeft, + &${n}-dropdown-placement-bottomRight`]:{[`${n}-range-arrow`]:{top:0,display:"block",transform:"translateY(-100%)"}},[`&${n}-dropdown-placement-topLeft, + &${n}-dropdown-placement-topRight`]:{[`${n}-range-arrow`]:{bottom:0,display:"block",transform:"translateY(100%) rotate(180deg)"}},[`&${r}-slide-up-appear, &${r}-slide-up-enter`]:{[`${n}-range-arrow${n}-range-arrow`]:{transition:"none"}},[`&${r}-slide-up-enter${r}-slide-up-enter-active${n}-dropdown-placement-topLeft, + &${r}-slide-up-enter${r}-slide-up-enter-active${n}-dropdown-placement-topRight, + &${r}-slide-up-appear${r}-slide-up-appear-active${n}-dropdown-placement-topLeft, + &${r}-slide-up-appear${r}-slide-up-appear-active${n}-dropdown-placement-topRight`]:{animationName:Qv},[`&${r}-slide-up-enter${r}-slide-up-enter-active${n}-dropdown-placement-bottomLeft, + &${r}-slide-up-enter${r}-slide-up-enter-active${n}-dropdown-placement-bottomRight, + &${r}-slide-up-appear${r}-slide-up-appear-active${n}-dropdown-placement-bottomLeft, + &${r}-slide-up-appear${r}-slide-up-appear-active${n}-dropdown-placement-bottomRight`]:{animationName:Gv},[`&${r}-slide-up-leave ${n}-panel-container`]:{pointerEvents:"none"},[`&${r}-slide-up-leave${r}-slide-up-leave-active${n}-dropdown-placement-topLeft, + &${r}-slide-up-leave${r}-slide-up-leave-active${n}-dropdown-placement-topRight`]:{animationName:Zv},[`&${r}-slide-up-leave${r}-slide-up-leave-active${n}-dropdown-placement-bottomLeft, + &${r}-slide-up-leave${r}-slide-up-leave-active${n}-dropdown-placement-bottomRight`]:{animationName:Xv},[`${n}-panel > ${n}-time-panel`]:{paddingTop:P},[`${n}-range-wrapper`]:{display:"flex",position:"relative"},[`${n}-range-arrow`]:Object.assign(Object.assign({position:"absolute",zIndex:1,display:"none",paddingInline:e.calc(a).mul(1.5).equal(),boxSizing:"content-box",transition:`all ${D} ease-out`},JM(e,F,G)),{"&:before":{insetInlineStart:e.calc(a).mul(1.5).equal()}}),[`${n}-panel-container`]:{overflow:"hidden",verticalAlign:"top",background:F,borderRadius:H,boxShadow:k,transition:`margin ${D}`,display:"inline-block",pointerEvents:"auto",[`${n}-panel-layout`]:{display:"flex",flexWrap:"nowrap",alignItems:"stretch"},[`${n}-presets`]:{display:"flex",flexDirection:"column",minWidth:V,maxWidth:q,ul:{height:0,flex:"auto",listStyle:"none",overflow:"auto",margin:0,padding:E,borderInlineEnd:`${te(o)} ${c} ${T}`,li:Object.assign(Object.assign({},Bi),{borderRadius:L,paddingInline:E,paddingBlock:e.calc(w).sub(B).div(2).equal(),cursor:"pointer",transition:`all ${D}`,"+ li":{marginTop:O},"&:hover":{background:z}})}},[`${n}-panels`]:{display:"inline-flex",flexWrap:"nowrap","&:last-child":{[`${n}-panel`]:{borderWidth:0}}},[`${n}-panel`]:{verticalAlign:"top",background:"transparent",borderRadius:0,borderWidth:0,[`${n}-content, table`]:{textAlign:"center"},"&-focused":{borderColor:u}}}}),"&-dropdown-range":{padding:`${te(e.calc(A).mul(2).div(3).equal())} 0`,"&-hidden":{display:"none"}},"&-rtl":{direction:"rtl",[`${n}-separator`]:{transform:"scale(-1, 1)"},[`${n}-footer`]:{"&-extra":{direction:"rtl"}}}})},co(e,"slide-up"),co(e,"slide-down"),au(e,"move-up"),au(e,"move-down")]},yT=Kn("DatePicker",e=>{const t=xn(Hs(e),kU(e),{inputPaddingHorizontalBase:e.calc(e.paddingSM).sub(1).equal(),multipleSelectItemHeight:e.multipleItemHeight,selectHeight:e.controlHeight});return[PU(t),BU(t),LU(t),HU(t),jU(t),Tf(e,{focusElCls:`${e.componentCls}-focused`})]},zU);var FU={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M482 152h60q8 0 8 8v704q0 8-8 8h-60q-8 0-8-8V160q0-8 8-8z"}},{tag:"path",attrs:{d:"M192 474h672q8 0 8 8v60q0 8-8 8H160q-8 0-8-8v-60q0-8 8-8z"}}]},name:"plus",theme:"outlined"},VU=function(t,n){return s.createElement($n,Me({},t,{ref:n,icon:FU}))},KU=s.forwardRef(VU);const Cg=s.createContext(null);var UU=function(t){var n=t.activeTabOffset,r=t.horizontal,a=t.rtl,o=t.indicator,c=o===void 0?{}:o,u=c.size,f=c.align,d=f===void 0?"center":f,h=s.useState(),v=ce(h,2),g=v[0],b=v[1],x=s.useRef(),C=Se.useCallback(function(w){return typeof u=="function"?u(w):typeof u=="number"?u:w},[u]);function y(){hn.cancel(x.current)}return s.useEffect(function(){var w={};if(n)if(r){w.width=C(n.width);var $=a?"right":"left";d==="start"&&(w[$]=n[$]),d==="center"&&(w[$]=n[$]+n.width/2,w.transform=a?"translateX(50%)":"translateX(-50%)"),d==="end"&&(w[$]=n[$]+n.width,w.transform="translateX(-100%)")}else w.height=C(n.height),d==="start"&&(w.top=n.top),d==="center"&&(w.top=n.top+n.height/2,w.transform="translateY(-50%)"),d==="end"&&(w.top=n.top+n.height,w.transform="translateY(-100%)");return y(),x.current=hn(function(){var E=g&&w&&Object.keys(w).every(function(O){var I=w[O],j=g[O];return typeof I=="number"&&typeof j=="number"?Math.round(I)===Math.round(j):I===j});E||b(w)}),y},[JSON.stringify(n),r,a,d,C]),{style:g}},AO={width:0,height:0,left:0,top:0};function WU(e,t,n){return s.useMemo(function(){for(var r,a=new Map,o=t.get((r=e[0])===null||r===void 0?void 0:r.key)||AO,c=o.left+o.width,u=0;uk?(F=P,j.current="x"):(F=A,j.current="y"),t(-F,-F)&&N.preventDefault()}var D=s.useRef(null);D.current={onTouchStart:E,onTouchMove:O,onTouchEnd:I,onWheel:M},s.useEffect(function(){function N(H){D.current.onTouchStart(H)}function P(H){D.current.onTouchMove(H)}function A(H){D.current.onTouchEnd(H)}function F(H){D.current.onWheel(H)}return document.addEventListener("touchmove",P,{passive:!1}),document.addEventListener("touchend",A,{passive:!0}),e.current.addEventListener("touchstart",N,{passive:!0}),e.current.addEventListener("wheel",F,{passive:!1}),function(){document.removeEventListener("touchmove",P),document.removeEventListener("touchend",A)}},[])}function xT(e){var t=s.useState(0),n=ce(t,2),r=n[0],a=n[1],o=s.useRef(0),c=s.useRef();return c.current=e,ws(function(){var u;(u=c.current)===null||u===void 0||u.call(c)},[r]),function(){o.current===r&&(o.current+=1,a(o.current))}}function GU(e){var t=s.useRef([]),n=s.useState({}),r=ce(n,2),a=r[1],o=s.useRef(typeof e=="function"?e():e),c=xT(function(){var f=o.current;t.current.forEach(function(d){f=d(f)}),t.current=[],o.current=f,a({})});function u(f){t.current.push(f),c()}return[o.current,u]}var BO={width:0,height:0,left:0,top:0,right:0};function XU(e,t,n,r,a,o,c){var u=c.tabs,f=c.tabPosition,d=c.rtl,h,v,g;return["top","bottom"].includes(f)?(h="width",v=d?"right":"left",g=Math.abs(n)):(h="height",v="top",g=-n),s.useMemo(function(){if(!u.length)return[0,0];for(var b=u.length,x=b,C=0;CMath.floor(g+t)){x=C-1;break}}for(var w=0,$=b-1;$>=0;$-=1){var E=e.get(u[$].key)||BO;if(E[v]x?[0,-1]:[w,x]},[e,t,r,a,o,g,f,u.map(function(b){return b.key}).join("_"),d])}function FO(e){var t;return e instanceof Map?(t={},e.forEach(function(n,r){t[r]=n})):t=e,JSON.stringify(t)}var QU="TABS_DQ";function ST(e){return String(e).replace(/"/g,QU)}function bC(e,t,n,r){return!(!n||r||e===!1||e===void 0&&(t===!1||t===null))}var CT=s.forwardRef(function(e,t){var n=e.prefixCls,r=e.editable,a=e.locale,o=e.style;return!r||r.showAdd===!1?null:s.createElement("button",{ref:t,type:"button",className:"".concat(n,"-nav-add"),style:o,"aria-label":a?.addAriaLabel||"Add tab",onClick:function(u){r.onEdit("add",{event:u})}},r.addIcon||"+")}),VO=s.forwardRef(function(e,t){var n=e.position,r=e.prefixCls,a=e.extra;if(!a)return null;var o,c={};return jt(a)==="object"&&!s.isValidElement(a)?c=a:c.right=a,n==="right"&&(o=c.right),n==="left"&&(o=c.left),o?s.createElement("div",{className:"".concat(r,"-extra-content"),ref:t},o):null}),ZU=s.forwardRef(function(e,t){var n=e.prefixCls,r=e.id,a=e.tabs,o=e.locale,c=e.mobile,u=e.more,f=u===void 0?{}:u,d=e.style,h=e.className,v=e.editable,g=e.tabBarGutter,b=e.rtl,x=e.removeAriaLabel,C=e.onTabClick,y=e.getPopupContainer,w=e.popupClassName,$=s.useState(!1),E=ce($,2),O=E[0],I=E[1],j=s.useState(null),M=ce(j,2),D=M[0],N=M[1],P=f.icon,A=P===void 0?"More":P,F="".concat(r,"-more-popup"),H="".concat(n,"-dropdown"),k=D!==null?"".concat(F,"-").concat(D):null,L=o?.dropdownAriaLabel;function T(K,Y){K.preventDefault(),K.stopPropagation(),v.onEdit("remove",{key:Y,event:K})}var z=s.createElement(pu,{onClick:function(Y){var Q=Y.key,Z=Y.domEvent;C(Q,Z),I(!1)},prefixCls:"".concat(H,"-menu"),id:F,tabIndex:-1,role:"listbox","aria-activedescendant":k,selectedKeys:[D],"aria-label":L!==void 0?L:"expanded dropdown"},a.map(function(K){var Y=K.closable,Q=K.disabled,Z=K.closeIcon,ae=K.key,re=K.label,ie=bC(Y,Z,v,Q);return s.createElement(Af,{key:ae,id:"".concat(F,"-").concat(ae),role:"option","aria-controls":r&&"".concat(r,"-panel-").concat(ae),disabled:Q},s.createElement("span",null,re),ie&&s.createElement("button",{type:"button","aria-label":x||"remove",tabIndex:0,className:"".concat(H,"-menu-item-remove"),onClick:function(ue){ue.stopPropagation(),T(ue,ae)}},Z||v.removeIcon||"×"))}));function V(K){for(var Y=a.filter(function(ie){return!ie.disabled}),Q=Y.findIndex(function(ie){return ie.key===D})||0,Z=Y.length,ae=0;ae_t?"left":"right"})}),H=ce(F,2),k=H[0],L=H[1],T=zO(0,function(gt,_t){!A&&C&&C({direction:gt>_t?"top":"bottom"})}),z=ce(T,2),V=z[0],q=z[1],G=s.useState([0,0]),B=ce(G,2),U=B[0],K=B[1],Y=s.useState([0,0]),Q=ce(Y,2),Z=Q[0],ae=Q[1],re=s.useState([0,0]),ie=ce(re,2),ve=ie[0],ue=ie[1],oe=s.useState([0,0]),he=ce(oe,2),fe=he[0],me=he[1],le=GU(new Map),pe=ce(le,2),Ce=pe[0],De=pe[1],je=WU(E,Ce,Z[0]),ge=wh(U,A),Ie=wh(Z,A),Ee=wh(ve,A),we=wh(fe,A),Fe=Math.floor(ge)Ye?Ye:gt}var Pe=s.useRef(null),Oe=s.useState(),Be=ce(Oe,2),$e=Be[0],Te=Be[1];function be(){Te(Date.now())}function ye(){Pe.current&&clearTimeout(Pe.current)}YU(M,function(gt,_t){function Zt(on,yt){on(function(Ht){var nn=et(Ht+yt);return nn})}return Fe?(A?Zt(L,gt):Zt(q,_t),ye(),be(),!0):!1}),s.useEffect(function(){return ye(),$e&&(Pe.current=setTimeout(function(){Te(0)},100)),ye},[$e]);var Re=XU(je,He,A?k:V,Ie,Ee,we,ee(ee({},e),{},{tabs:E})),Ge=ce(Re,2),ft=Ge[0],$t=Ge[1],Qe=pn(function(){var gt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:c,_t=je.get(gt)||{width:0,height:0,left:0,right:0,top:0};if(A){var Zt=k;u?_t.rightk+He&&(Zt=_t.right+_t.width-He):_t.left<-k?Zt=-_t.left:_t.left+_t.width>-k+He&&(Zt=-(_t.left+_t.width-He)),q(0),L(et(Zt))}else{var on=V;_t.top<-V?on=-_t.top:_t.top+_t.height>-V+He&&(on=-(_t.top+_t.height-He)),L(0),q(et(on))}}),at=s.useState(),mt=ce(at,2),st=mt[0],bt=mt[1],qt=s.useState(!1),Gt=ce(qt,2),vt=Gt[0],It=Gt[1],Et=E.filter(function(gt){return!gt.disabled}).map(function(gt){return gt.key}),nt=function(_t){var Zt=Et.indexOf(st||c),on=Et.length,yt=(Zt+_t+on)%on,Ht=Et[yt];bt(Ht)},Ue=function(_t,Zt){var on=Et.indexOf(_t),yt=E.find(function(nn){return nn.key===_t}),Ht=bC(yt?.closable,yt?.closeIcon,d,yt?.disabled);Ht&&(Zt.preventDefault(),Zt.stopPropagation(),d.onEdit("remove",{key:_t,event:Zt}),on===Et.length-1?nt(-1):nt(1))},qe=function(_t,Zt){It(!0),Zt.button===1&&Ue(_t,Zt)},ct=function(_t){var Zt=_t.code,on=u&&A,yt=Et[0],Ht=Et[Et.length-1];switch(Zt){case"ArrowLeft":{A&&nt(on?1:-1);break}case"ArrowRight":{A&&nt(on?-1:1);break}case"ArrowUp":{_t.preventDefault(),A||nt(-1);break}case"ArrowDown":{_t.preventDefault(),A||nt(1);break}case"Home":{_t.preventDefault(),bt(yt);break}case"End":{_t.preventDefault(),bt(Ht);break}case"Enter":case"Space":{_t.preventDefault(),x(st??c,_t);break}case"Backspace":case"Delete":{Ue(st,_t);break}}},Tt={};A?Tt[u?"marginRight":"marginLeft"]=g:Tt.marginTop=g;var Dt=E.map(function(gt,_t){var Zt=gt.key;return s.createElement(eW,{id:a,prefixCls:$,key:Zt,tab:gt,style:_t===0?void 0:Tt,closable:gt.closable,editable:d,active:Zt===c,focus:Zt===st,renderWrapper:b,removeAriaLabel:h?.removeAriaLabel,tabCount:Et.length,currentPosition:_t+1,onClick:function(yt){x(Zt,yt)},onKeyDown:ct,onFocus:function(){vt||bt(Zt),Qe(Zt),be(),M.current&&(u||(M.current.scrollLeft=0),M.current.scrollTop=0)},onBlur:function(){bt(void 0)},onMouseDown:function(yt){return qe(Zt,yt)},onMouseUp:function(){It(!1)}})}),Jt=function(){return De(function(){var _t,Zt=new Map,on=(_t=D.current)===null||_t===void 0?void 0:_t.getBoundingClientRect();return E.forEach(function(yt){var Ht,nn=yt.key,Xn=(Ht=D.current)===null||Ht===void 0?void 0:Ht.querySelector('[data-node-key="'.concat(ST(nn),'"]'));if(Xn){var br=tW(Xn,on),wr=ce(br,4),$r=wr[0],Yn=wr[1],Gn=wr[2],Dr=wr[3];Zt.set(nn,{width:$r,height:Yn,left:Gn,top:Dr})}}),Zt})};s.useEffect(function(){Jt()},[E.map(function(gt){return gt.key}).join("_")]);var ut=xT(function(){var gt=Mc(O),_t=Mc(I),Zt=Mc(j);K([gt[0]-_t[0]-Zt[0],gt[1]-_t[1]-Zt[1]]);var on=Mc(P);ue(on);var yt=Mc(N);me(yt);var Ht=Mc(D);ae([Ht[0]-on[0],Ht[1]-on[1]]),Jt()}),ot=E.slice(0,ft),Lt=E.slice($t+1),tn=[].concat(ke(ot),ke(Lt)),vn=je.get(c),cn=UU({activeTabOffset:vn,horizontal:A,indicator:y,rtl:u}),En=cn.style;s.useEffect(function(){Qe()},[c,Ze,Ye,FO(vn),FO(je),A]),s.useEffect(function(){ut()},[u]);var rn=!!tn.length,Sn="".concat($,"-nav-wrap"),lt,xt,Bt,kt;return A?u?(xt=k>0,lt=k!==Ye):(lt=k<0,xt=k!==Ze):(Bt=V<0,kt=V!==Ze),s.createElement(Ca,{onResize:ut},s.createElement("div",{ref:Fl(t,O),role:"tablist","aria-orientation":A?"horizontal":"vertical",className:se("".concat($,"-nav"),n),style:r,onKeyDown:function(){be()}},s.createElement(VO,{ref:I,position:"left",extra:f,prefixCls:$}),s.createElement(Ca,{onResize:ut},s.createElement("div",{className:se(Sn,X(X(X(X({},"".concat(Sn,"-ping-left"),lt),"".concat(Sn,"-ping-right"),xt),"".concat(Sn,"-ping-top"),Bt),"".concat(Sn,"-ping-bottom"),kt)),ref:M},s.createElement(Ca,{onResize:ut},s.createElement("div",{ref:D,className:"".concat($,"-nav-list"),style:{transform:"translate(".concat(k,"px, ").concat(V,"px)"),transition:$e?"none":void 0}},Dt,s.createElement(CT,{ref:P,prefixCls:$,locale:h,editable:d,style:ee(ee({},Dt.length===0?void 0:Tt),{},{visibility:rn?"hidden":null})}),s.createElement("div",{className:se("".concat($,"-ink-bar"),X({},"".concat($,"-ink-bar-animated"),o.inkBar)),style:En}))))),s.createElement(JU,Me({},e,{removeAriaLabel:h?.removeAriaLabel,ref:N,prefixCls:$,tabs:tn,className:!rn&&it,tabMoving:!!$e})),s.createElement(VO,{ref:j,position:"right",extra:f,prefixCls:$})))}),wT=s.forwardRef(function(e,t){var n=e.prefixCls,r=e.className,a=e.style,o=e.id,c=e.active,u=e.tabKey,f=e.children;return s.createElement("div",{id:o&&"".concat(o,"-panel-").concat(u),role:"tabpanel",tabIndex:c?0:-1,"aria-labelledby":o&&"".concat(o,"-tab-").concat(u),"aria-hidden":!c,style:a,className:se(n,c&&"".concat(n,"-active"),r),ref:t},f)}),nW=["renderTabBar"],rW=["label","key"],aW=function(t){var n=t.renderTabBar,r=Kt(t,nW),a=s.useContext(Cg),o=a.tabs;if(n){var c=ee(ee({},r),{},{panes:o.map(function(u){var f=u.label,d=u.key,h=Kt(u,rW);return s.createElement(wT,Me({tab:f,key:d,tabKey:d},h))})});return n(c,KO)}return s.createElement(KO,r)},iW=["key","forceRender","style","className","destroyInactiveTabPane"],oW=function(t){var n=t.id,r=t.activeKey,a=t.animated,o=t.tabPosition,c=t.destroyInactiveTabPane,u=s.useContext(Cg),f=u.prefixCls,d=u.tabs,h=a.tabPane,v="".concat(f,"-tabpane");return s.createElement("div",{className:se("".concat(f,"-content-holder"))},s.createElement("div",{className:se("".concat(f,"-content"),"".concat(f,"-content-").concat(o),X({},"".concat(f,"-content-animated"),h))},d.map(function(g){var b=g.key,x=g.forceRender,C=g.style,y=g.className,w=g.destroyInactiveTabPane,$=Kt(g,iW),E=b===r;return s.createElement(Oi,Me({key:b,visible:E,forceRender:x,removeOnLeave:!!(c||w),leavedClassName:"".concat(v,"-hidden")},a.tabPaneMotion),function(O,I){var j=O.style,M=O.className;return s.createElement(wT,Me({},$,{prefixCls:v,id:n,tabKey:b,animated:h,active:E,style:ee(ee({},C),j),className:se(y,M),ref:I}))})})))};function lW(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{inkBar:!0,tabPane:!1},t;return e===!1?t={inkBar:!1,tabPane:!1}:e===!0?t={inkBar:!0,tabPane:!1}:t=ee({inkBar:!0},jt(e)==="object"?e:{}),t.tabPaneMotion&&t.tabPane===void 0&&(t.tabPane=!0),!t.tabPaneMotion&&t.tabPane&&(t.tabPane=!1),t}var sW=["id","prefixCls","className","items","direction","activeKey","defaultActiveKey","editable","animated","tabPosition","tabBarGutter","tabBarStyle","tabBarExtraContent","locale","more","destroyInactiveTabPane","renderTabBar","onChange","onTabClick","onTabScroll","getPopupContainer","popupClassName","indicator"],UO=0,cW=s.forwardRef(function(e,t){var n=e.id,r=e.prefixCls,a=r===void 0?"rc-tabs":r,o=e.className,c=e.items,u=e.direction,f=e.activeKey,d=e.defaultActiveKey,h=e.editable,v=e.animated,g=e.tabPosition,b=g===void 0?"top":g,x=e.tabBarGutter,C=e.tabBarStyle,y=e.tabBarExtraContent,w=e.locale,$=e.more,E=e.destroyInactiveTabPane,O=e.renderTabBar,I=e.onChange,j=e.onTabClick,M=e.onTabScroll,D=e.getPopupContainer,N=e.popupClassName,P=e.indicator,A=Kt(e,sW),F=s.useMemo(function(){return(c||[]).filter(function(fe){return fe&&jt(fe)==="object"&&"key"in fe})},[c]),H=u==="rtl",k=lW(v),L=s.useState(!1),T=ce(L,2),z=T[0],V=T[1];s.useEffect(function(){V(sg())},[]);var q=Wn(function(){var fe;return(fe=F[0])===null||fe===void 0?void 0:fe.key},{value:f,defaultValue:d}),G=ce(q,2),B=G[0],U=G[1],K=s.useState(function(){return F.findIndex(function(fe){return fe.key===B})}),Y=ce(K,2),Q=Y[0],Z=Y[1];s.useEffect(function(){var fe=F.findIndex(function(le){return le.key===B});if(fe===-1){var me;fe=Math.max(0,Math.min(Q,F.length-1)),U((me=F[fe])===null||me===void 0?void 0:me.key)}Z(fe)},[F.map(function(fe){return fe.key}).join("_"),B,Q]);var ae=Wn(null,{value:n}),re=ce(ae,2),ie=re[0],ve=re[1];s.useEffect(function(){n||(ve("rc-tabs-".concat(UO)),UO+=1)},[]);function ue(fe,me){j?.(fe,me);var le=fe!==B;U(fe),le&&I?.(fe)}var oe={id:ie,activeKey:B,animated:k,tabPosition:b,rtl:H,mobile:z},he=ee(ee({},oe),{},{editable:h,locale:w,more:$,tabBarGutter:x,onTabClick:ue,onTabScroll:M,extra:y,style:C,panes:null,getPopupContainer:D,popupClassName:N,indicator:P});return s.createElement(Cg.Provider,{value:{tabs:F,prefixCls:a}},s.createElement("div",Me({ref:t,id:n,className:se(a,"".concat(a,"-").concat(b),X(X(X({},"".concat(a,"-mobile"),z),"".concat(a,"-editable"),h),"".concat(a,"-rtl"),H),o)},A),s.createElement(aW,Me({},he,{renderTabBar:O})),s.createElement(oW,Me({destroyInactiveTabPane:E},oe,{animated:k}))))});const uW={motionAppear:!1,motionEnter:!0,motionLeave:!0};function dW(e,t={inkBar:!0,tabPane:!1}){let n;return t===!1?n={inkBar:!1,tabPane:!1}:t===!0?n={inkBar:!0,tabPane:!0}:n=Object.assign({inkBar:!0},typeof t=="object"?t:{}),n.tabPane&&(n.tabPaneMotion=Object.assign(Object.assign({},uW),{motionName:MS(e,"switch")})),n}var fW=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,r=Object.getOwnPropertySymbols(e);at)}function hW(e,t){if(e)return e.map(r=>{var a;const o=(a=r.destroyOnHidden)!==null&&a!==void 0?a:r.destroyInactiveTabPane;return Object.assign(Object.assign({},r),{destroyInactiveTabPane:o})});const n=Ma(t).map(r=>{if(s.isValidElement(r)){const{key:a,props:o}=r,c=o||{},{tab:u}=c,f=fW(c,["tab"]);return Object.assign(Object.assign({key:String(a)},f),{label:u})}return null});return mW(n)}const vW=e=>{const{componentCls:t,motionDurationSlow:n}=e;return[{[t]:{[`${t}-switch`]:{"&-appear, &-enter":{transition:"none","&-start":{opacity:0},"&-active":{opacity:1,transition:`opacity ${n}`}},"&-leave":{position:"absolute",transition:"none",inset:0,"&-start":{opacity:1},"&-active":{opacity:0,transition:`opacity ${n}`}}}}},[co(e,"slide-up"),co(e,"slide-down")]]},gW=e=>{const{componentCls:t,tabsCardPadding:n,cardBg:r,cardGutter:a,colorBorderSecondary:o,itemSelectedColor:c}=e;return{[`${t}-card`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab`]:{margin:0,padding:n,background:r,border:`${te(e.lineWidth)} ${e.lineType} ${o}`,transition:`all ${e.motionDurationSlow} ${e.motionEaseInOut}`},[`${t}-tab-active`]:{color:c,background:e.colorBgContainer},[`${t}-tab-focus:has(${t}-tab-btn:focus-visible)`]:so(e,-3),[`& ${t}-tab${t}-tab-focus ${t}-tab-btn:focus-visible`]:{outline:"none"},[`${t}-ink-bar`]:{visibility:"hidden"}},[`&${t}-top, &${t}-bottom`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab + ${t}-tab`]:{marginLeft:{_skip_check_:!0,value:te(a)}}}},[`&${t}-top`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab`]:{borderRadius:`${te(e.borderRadiusLG)} ${te(e.borderRadiusLG)} 0 0`},[`${t}-tab-active`]:{borderBottomColor:e.colorBgContainer}}},[`&${t}-bottom`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab`]:{borderRadius:`0 0 ${te(e.borderRadiusLG)} ${te(e.borderRadiusLG)}`},[`${t}-tab-active`]:{borderTopColor:e.colorBgContainer}}},[`&${t}-left, &${t}-right`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab + ${t}-tab`]:{marginTop:te(a)}}},[`&${t}-left`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab`]:{borderRadius:{_skip_check_:!0,value:`${te(e.borderRadiusLG)} 0 0 ${te(e.borderRadiusLG)}`}},[`${t}-tab-active`]:{borderRightColor:{_skip_check_:!0,value:e.colorBgContainer}}}},[`&${t}-right`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab`]:{borderRadius:{_skip_check_:!0,value:`0 ${te(e.borderRadiusLG)} ${te(e.borderRadiusLG)} 0`}},[`${t}-tab-active`]:{borderLeftColor:{_skip_check_:!0,value:e.colorBgContainer}}}}}}},pW=e=>{const{componentCls:t,itemHoverColor:n,dropdownEdgeChildVerticalPadding:r}=e;return{[`${t}-dropdown`]:Object.assign(Object.assign({},zn(e)),{position:"absolute",top:-9999,left:{_skip_check_:!0,value:-9999},zIndex:e.zIndexPopup,display:"block","&-hidden":{display:"none"},[`${t}-dropdown-menu`]:{maxHeight:e.tabsDropdownHeight,margin:0,padding:`${te(r)} 0`,overflowX:"hidden",overflowY:"auto",textAlign:{_skip_check_:!0,value:"left"},listStyleType:"none",backgroundColor:e.colorBgContainer,backgroundClip:"padding-box",borderRadius:e.borderRadiusLG,outline:"none",boxShadow:e.boxShadowSecondary,"&-item":Object.assign(Object.assign({},Bi),{display:"flex",alignItems:"center",minWidth:e.tabsDropdownWidth,margin:0,padding:`${te(e.paddingXXS)} ${te(e.paddingSM)}`,color:e.colorText,fontWeight:"normal",fontSize:e.fontSize,lineHeight:e.lineHeight,cursor:"pointer",transition:`all ${e.motionDurationSlow}`,"> span":{flex:1,whiteSpace:"nowrap"},"&-remove":{flex:"none",marginLeft:{_skip_check_:!0,value:e.marginSM},color:e.colorIcon,fontSize:e.fontSizeSM,background:"transparent",border:0,cursor:"pointer","&:hover":{color:n}},"&:hover":{background:e.controlItemBgHover},"&-disabled":{"&, &:hover":{color:e.colorTextDisabled,background:"transparent",cursor:"not-allowed"}}})}})}},bW=e=>{const{componentCls:t,margin:n,colorBorderSecondary:r,horizontalMargin:a,verticalItemPadding:o,verticalItemMargin:c,calc:u}=e;return{[`${t}-top, ${t}-bottom`]:{flexDirection:"column",[`> ${t}-nav, > div > ${t}-nav`]:{margin:a,"&::before":{position:"absolute",right:{_skip_check_:!0,value:0},left:{_skip_check_:!0,value:0},borderBottom:`${te(e.lineWidth)} ${e.lineType} ${r}`,content:"''"},[`${t}-ink-bar`]:{height:e.lineWidthBold,"&-animated":{transition:`width ${e.motionDurationSlow}, left ${e.motionDurationSlow}, + right ${e.motionDurationSlow}`}},[`${t}-nav-wrap`]:{"&::before, &::after":{top:0,bottom:0,width:e.controlHeight},"&::before":{left:{_skip_check_:!0,value:0},boxShadow:e.boxShadowTabsOverflowLeft},"&::after":{right:{_skip_check_:!0,value:0},boxShadow:e.boxShadowTabsOverflowRight},[`&${t}-nav-wrap-ping-left::before`]:{opacity:1},[`&${t}-nav-wrap-ping-right::after`]:{opacity:1}}}},[`${t}-top`]:{[`> ${t}-nav, + > div > ${t}-nav`]:{"&::before":{bottom:0},[`${t}-ink-bar`]:{bottom:0}}},[`${t}-bottom`]:{[`> ${t}-nav, > div > ${t}-nav`]:{order:1,marginTop:n,marginBottom:0,"&::before":{top:0},[`${t}-ink-bar`]:{top:0}},[`> ${t}-content-holder, > div > ${t}-content-holder`]:{order:0}},[`${t}-left, ${t}-right`]:{[`> ${t}-nav, > div > ${t}-nav`]:{flexDirection:"column",minWidth:u(e.controlHeight).mul(1.25).equal(),[`${t}-tab`]:{padding:o,textAlign:"center"},[`${t}-tab + ${t}-tab`]:{margin:c},[`${t}-nav-wrap`]:{flexDirection:"column","&::before, &::after":{right:{_skip_check_:!0,value:0},left:{_skip_check_:!0,value:0},height:e.controlHeight},"&::before":{top:0,boxShadow:e.boxShadowTabsOverflowTop},"&::after":{bottom:0,boxShadow:e.boxShadowTabsOverflowBottom},[`&${t}-nav-wrap-ping-top::before`]:{opacity:1},[`&${t}-nav-wrap-ping-bottom::after`]:{opacity:1}},[`${t}-ink-bar`]:{width:e.lineWidthBold,"&-animated":{transition:`height ${e.motionDurationSlow}, top ${e.motionDurationSlow}`}},[`${t}-nav-list, ${t}-nav-operations`]:{flex:"1 0 auto",flexDirection:"column"}}},[`${t}-left`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-ink-bar`]:{right:{_skip_check_:!0,value:0}}},[`> ${t}-content-holder, > div > ${t}-content-holder`]:{marginLeft:{_skip_check_:!0,value:te(u(e.lineWidth).mul(-1).equal())},borderLeft:{_skip_check_:!0,value:`${te(e.lineWidth)} ${e.lineType} ${e.colorBorder}`},[`> ${t}-content > ${t}-tabpane`]:{paddingLeft:{_skip_check_:!0,value:e.paddingLG}}}},[`${t}-right`]:{[`> ${t}-nav, > div > ${t}-nav`]:{order:1,[`${t}-ink-bar`]:{left:{_skip_check_:!0,value:0}}},[`> ${t}-content-holder, > div > ${t}-content-holder`]:{order:0,marginRight:{_skip_check_:!0,value:u(e.lineWidth).mul(-1).equal()},borderRight:{_skip_check_:!0,value:`${te(e.lineWidth)} ${e.lineType} ${e.colorBorder}`},[`> ${t}-content > ${t}-tabpane`]:{paddingRight:{_skip_check_:!0,value:e.paddingLG}}}}}},yW=e=>{const{componentCls:t,cardPaddingSM:n,cardPaddingLG:r,cardHeightSM:a,cardHeightLG:o,horizontalItemPaddingSM:c,horizontalItemPaddingLG:u}=e;return{[t]:{"&-small":{[`> ${t}-nav`]:{[`${t}-tab`]:{padding:c,fontSize:e.titleFontSizeSM}}},"&-large":{[`> ${t}-nav`]:{[`${t}-tab`]:{padding:u,fontSize:e.titleFontSizeLG,lineHeight:e.lineHeightLG}}}},[`${t}-card`]:{[`&${t}-small`]:{[`> ${t}-nav`]:{[`${t}-tab`]:{padding:n},[`${t}-nav-add`]:{minWidth:a,minHeight:a}},[`&${t}-bottom`]:{[`> ${t}-nav ${t}-tab`]:{borderRadius:`0 0 ${te(e.borderRadius)} ${te(e.borderRadius)}`}},[`&${t}-top`]:{[`> ${t}-nav ${t}-tab`]:{borderRadius:`${te(e.borderRadius)} ${te(e.borderRadius)} 0 0`}},[`&${t}-right`]:{[`> ${t}-nav ${t}-tab`]:{borderRadius:{_skip_check_:!0,value:`0 ${te(e.borderRadius)} ${te(e.borderRadius)} 0`}}},[`&${t}-left`]:{[`> ${t}-nav ${t}-tab`]:{borderRadius:{_skip_check_:!0,value:`${te(e.borderRadius)} 0 0 ${te(e.borderRadius)}`}}}},[`&${t}-large`]:{[`> ${t}-nav`]:{[`${t}-tab`]:{padding:r},[`${t}-nav-add`]:{minWidth:o,minHeight:o}}}}}},xW=e=>{const{componentCls:t,itemActiveColor:n,itemHoverColor:r,iconCls:a,tabsHorizontalItemMargin:o,horizontalItemPadding:c,itemSelectedColor:u,itemColor:f}=e,d=`${t}-tab`;return{[d]:{position:"relative",WebkitTouchCallout:"none",WebkitTapHighlightColor:"transparent",display:"inline-flex",alignItems:"center",padding:c,fontSize:e.titleFontSize,background:"transparent",border:0,outline:"none",cursor:"pointer",color:f,"&-btn, &-remove":{"&:focus:not(:focus-visible), &:active":{color:n}},"&-btn":{outline:"none",transition:`all ${e.motionDurationSlow}`,[`${d}-icon:not(:last-child)`]:{marginInlineEnd:e.marginSM}},"&-remove":Object.assign({flex:"none",lineHeight:1,marginRight:{_skip_check_:!0,value:e.calc(e.marginXXS).mul(-1).equal()},marginLeft:{_skip_check_:!0,value:e.marginXS},color:e.colorIcon,fontSize:e.fontSizeSM,background:"transparent",border:"none",outline:"none",cursor:"pointer",transition:`all ${e.motionDurationSlow}`,"&:hover":{color:e.colorTextHeading}},Wo(e)),"&:hover":{color:r},[`&${d}-active ${d}-btn`]:{color:u,textShadow:e.tabsActiveTextShadow},[`&${d}-focus ${d}-btn:focus-visible`]:so(e),[`&${d}-disabled`]:{color:e.colorTextDisabled,cursor:"not-allowed"},[`&${d}-disabled ${d}-btn, &${d}-disabled ${t}-remove`]:{"&:focus, &:active":{color:e.colorTextDisabled}},[`& ${d}-remove ${a}`]:{margin:0,verticalAlign:"middle"},[`${a}:not(:last-child)`]:{marginRight:{_skip_check_:!0,value:e.marginSM}}},[`${d} + ${d}`]:{margin:{_skip_check_:!0,value:o}}}},SW=e=>{const{componentCls:t,tabsHorizontalItemMarginRTL:n,iconCls:r,cardGutter:a,calc:o}=e;return{[`${t}-rtl`]:{direction:"rtl",[`${t}-nav`]:{[`${t}-tab`]:{margin:{_skip_check_:!0,value:n},[`${t}-tab:last-of-type`]:{marginLeft:{_skip_check_:!0,value:0}},[r]:{marginRight:{_skip_check_:!0,value:0},marginLeft:{_skip_check_:!0,value:te(e.marginSM)}},[`${t}-tab-remove`]:{marginRight:{_skip_check_:!0,value:te(e.marginXS)},marginLeft:{_skip_check_:!0,value:te(o(e.marginXXS).mul(-1).equal())},[r]:{margin:0}}}},[`&${t}-left`]:{[`> ${t}-nav`]:{order:1},[`> ${t}-content-holder`]:{order:0}},[`&${t}-right`]:{[`> ${t}-nav`]:{order:0},[`> ${t}-content-holder`]:{order:1}},[`&${t}-card${t}-top, &${t}-card${t}-bottom`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab + ${t}-tab`]:{marginRight:{_skip_check_:!0,value:a},marginLeft:{_skip_check_:!0,value:0}}}}},[`${t}-dropdown-rtl`]:{direction:"rtl"},[`${t}-menu-item`]:{[`${t}-dropdown-rtl`]:{textAlign:{_skip_check_:!0,value:"right"}}}}},CW=e=>{const{componentCls:t,tabsCardPadding:n,cardHeight:r,cardGutter:a,itemHoverColor:o,itemActiveColor:c,colorBorderSecondary:u}=e;return{[t]:Object.assign(Object.assign(Object.assign(Object.assign({},zn(e)),{display:"flex",[`> ${t}-nav, > div > ${t}-nav`]:{position:"relative",display:"flex",flex:"none",alignItems:"center",[`${t}-nav-wrap`]:{position:"relative",display:"flex",flex:"auto",alignSelf:"stretch",overflow:"hidden",whiteSpace:"nowrap",transform:"translate(0)","&::before, &::after":{position:"absolute",zIndex:1,opacity:0,transition:`opacity ${e.motionDurationSlow}`,content:"''",pointerEvents:"none"}},[`${t}-nav-list`]:{position:"relative",display:"flex",transition:`opacity ${e.motionDurationSlow}`},[`${t}-nav-operations`]:{display:"flex",alignSelf:"stretch"},[`${t}-nav-operations-hidden`]:{position:"absolute",visibility:"hidden",pointerEvents:"none"},[`${t}-nav-more`]:{position:"relative",padding:n,background:"transparent",border:0,color:e.colorText,"&::after":{position:"absolute",right:{_skip_check_:!0,value:0},bottom:0,left:{_skip_check_:!0,value:0},height:e.calc(e.controlHeightLG).div(8).equal(),transform:"translateY(100%)",content:"''"}},[`${t}-nav-add`]:Object.assign({minWidth:r,minHeight:r,marginLeft:{_skip_check_:!0,value:a},background:"transparent",border:`${te(e.lineWidth)} ${e.lineType} ${u}`,borderRadius:`${te(e.borderRadiusLG)} ${te(e.borderRadiusLG)} 0 0`,outline:"none",cursor:"pointer",color:e.colorText,transition:`all ${e.motionDurationSlow} ${e.motionEaseInOut}`,"&:hover":{color:o},"&:active, &:focus:not(:focus-visible)":{color:c}},Wo(e,-3))},[`${t}-extra-content`]:{flex:"none"},[`${t}-ink-bar`]:{position:"absolute",background:e.inkBarColor,pointerEvents:"none"}}),xW(e)),{[`${t}-content`]:{position:"relative",width:"100%"},[`${t}-content-holder`]:{flex:"auto",minWidth:0,minHeight:0},[`${t}-tabpane`]:Object.assign(Object.assign({},Wo(e)),{"&-hidden":{display:"none"}})}),[`${t}-centered`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-nav-wrap`]:{[`&:not([class*='${t}-nav-wrap-ping']) > ${t}-nav-list`]:{margin:"auto"}}}}}},wW=e=>{const{cardHeight:t,cardHeightSM:n,cardHeightLG:r,controlHeight:a,controlHeightLG:o}=e,c=t||o,u=n||a,f=r||o+8;return{zIndexPopup:e.zIndexPopupBase+50,cardBg:e.colorFillAlter,cardHeight:c,cardHeightSM:u,cardHeightLG:f,cardPadding:`${(c-e.fontHeight)/2-e.lineWidth}px ${e.padding}px`,cardPaddingSM:`${(u-e.fontHeight)/2-e.lineWidth}px ${e.paddingXS}px`,cardPaddingLG:`${(f-e.fontHeightLG)/2-e.lineWidth}px ${e.padding}px`,titleFontSize:e.fontSize,titleFontSizeLG:e.fontSizeLG,titleFontSizeSM:e.fontSize,inkBarColor:e.colorPrimary,horizontalMargin:`0 0 ${e.margin}px 0`,horizontalItemGutter:32,horizontalItemMargin:"",horizontalItemMarginRTL:"",horizontalItemPadding:`${e.paddingSM}px 0`,horizontalItemPaddingSM:`${e.paddingXS}px 0`,horizontalItemPaddingLG:`${e.padding}px 0`,verticalItemPadding:`${e.paddingXS}px ${e.paddingLG}px`,verticalItemMargin:`${e.margin}px 0 0 0`,itemColor:e.colorText,itemSelectedColor:e.colorPrimary,itemHoverColor:e.colorPrimaryHover,itemActiveColor:e.colorPrimaryActive,cardGutter:e.marginXXS/2}},$W=Kn("Tabs",e=>{const t=xn(e,{tabsCardPadding:e.cardPadding,dropdownEdgeChildVerticalPadding:e.paddingXXS,tabsActiveTextShadow:"0 0 0.25px currentcolor",tabsDropdownHeight:200,tabsDropdownWidth:120,tabsHorizontalItemMargin:`0 0 0 ${te(e.horizontalItemGutter)}`,tabsHorizontalItemMarginRTL:`0 0 0 ${te(e.horizontalItemGutter)}`});return[yW(t),SW(t),bW(t),pW(t),gW(t),CW(t),vW(t)]},wW),EW=()=>null;var _W=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,r=Object.getOwnPropertySymbols(e);a{var n,r,a,o,c,u,f,d,h,v,g;const{type:b,className:x,rootClassName:C,size:y,onEdit:w,hideAdd:$,centered:E,addIcon:O,removeIcon:I,moreIcon:j,more:M,popupClassName:D,children:N,items:P,animated:A,style:F,indicatorSize:H,indicator:k,destroyInactiveTabPane:L,destroyOnHidden:T}=e,z=_W(e,["type","className","rootClassName","size","onEdit","hideAdd","centered","addIcon","removeIcon","moreIcon","more","popupClassName","children","items","animated","style","indicatorSize","indicator","destroyInactiveTabPane","destroyOnHidden"]),{prefixCls:V}=z,{direction:q,tabs:G,getPrefixCls:B,getPopupContainer:U}=s.useContext(Wt),K=B("tabs",V),Y=oa(K),[Q,Z,ae]=$W(K,Y),re=s.useRef(null);s.useImperativeHandle(t,()=>({nativeElement:re.current}));let ie;b==="editable-card"&&(ie={onEdit:(le,{key:pe,event:Ce})=>{w?.(le==="add"?Ce:pe,le)},removeIcon:(n=I??G?.removeIcon)!==null&&n!==void 0?n:s.createElement(uu,null),addIcon:(O??G?.addIcon)||s.createElement(KU,null),showAdd:$!==!0});const ve=B(),ue=la(y),oe=hW(P,N),he=dW(K,A),fe=Object.assign(Object.assign({},G?.style),F),me={align:(r=k?.align)!==null&&r!==void 0?r:(a=G?.indicator)===null||a===void 0?void 0:a.align,size:(f=(c=(o=k?.size)!==null&&o!==void 0?o:H)!==null&&c!==void 0?c:(u=G?.indicator)===null||u===void 0?void 0:u.size)!==null&&f!==void 0?f:G?.indicatorSize};return Q(s.createElement(cW,Object.assign({ref:re,direction:q,getPopupContainer:U},z,{items:oe,className:se({[`${K}-${ue}`]:ue,[`${K}-card`]:["card","editable-card"].includes(b),[`${K}-editable-card`]:b==="editable-card",[`${K}-centered`]:E},G?.className,x,C,Z,ae,Y),popupClassName:se(D,Z,ae,Y),style:fe,editable:ie,more:Object.assign({icon:(g=(v=(h=(d=G?.more)===null||d===void 0?void 0:d.icon)!==null&&h!==void 0?h:G?.moreIcon)!==null&&v!==void 0?v:j)!==null&&g!==void 0?g:s.createElement(aC,null),transitionName:`${ve}-slide-up`},M),prefixCls:K,animated:he,indicator:me,destroyInactiveTabPane:T??L})))}),$T=OW;$T.TabPane=EW;var IW=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,r=Object.getOwnPropertySymbols(e);a{var{prefixCls:t,className:n,hoverable:r=!0}=e,a=IW(e,["prefixCls","className","hoverable"]);const{getPrefixCls:o}=s.useContext(Wt),c=o("card",t),u=se(`${c}-grid`,n,{[`${c}-grid-hoverable`]:r});return s.createElement("div",Object.assign({},a,{className:u}))},RW=e=>{const{antCls:t,componentCls:n,headerHeight:r,headerPadding:a,tabsMarginBottom:o}=e;return Object.assign(Object.assign({display:"flex",justifyContent:"center",flexDirection:"column",minHeight:r,marginBottom:-1,padding:`0 ${te(a)}`,color:e.colorTextHeading,fontWeight:e.fontWeightStrong,fontSize:e.headerFontSize,background:e.headerBg,borderBottom:`${te(e.lineWidth)} ${e.lineType} ${e.colorBorderSecondary}`,borderRadius:`${te(e.borderRadiusLG)} ${te(e.borderRadiusLG)} 0 0`},Uo()),{"&-wrapper":{width:"100%",display:"flex",alignItems:"center"},"&-title":Object.assign(Object.assign({display:"inline-block",flex:1},Bi),{[` + > ${n}-typography, + > ${n}-typography-edit-content + `]:{insetInlineStart:0,marginTop:0,marginBottom:0}}),[`${t}-tabs-top`]:{clear:"both",marginBottom:o,color:e.colorText,fontWeight:"normal",fontSize:e.fontSize,"&-bar":{borderBottom:`${te(e.lineWidth)} ${e.lineType} ${e.colorBorderSecondary}`}}})},NW=e=>{const{cardPaddingBase:t,colorBorderSecondary:n,cardShadow:r,lineWidth:a}=e;return{width:"33.33%",padding:t,border:0,borderRadius:0,boxShadow:` + ${te(a)} 0 0 0 ${n}, + 0 ${te(a)} 0 0 ${n}, + ${te(a)} ${te(a)} 0 0 ${n}, + ${te(a)} 0 0 0 ${n} inset, + 0 ${te(a)} 0 0 ${n} inset; + `,transition:`all ${e.motionDurationMid}`,"&-hoverable:hover":{position:"relative",zIndex:1,boxShadow:r}}},MW=e=>{const{componentCls:t,iconCls:n,actionsLiMargin:r,cardActionsIconSize:a,colorBorderSecondary:o,actionsBg:c}=e;return Object.assign(Object.assign({margin:0,padding:0,listStyle:"none",background:c,borderTop:`${te(e.lineWidth)} ${e.lineType} ${o}`,display:"flex",borderRadius:`0 0 ${te(e.borderRadiusLG)} ${te(e.borderRadiusLG)}`},Uo()),{"& > li":{margin:r,color:e.colorTextDescription,textAlign:"center","> span":{position:"relative",display:"block",minWidth:e.calc(e.cardActionsIconSize).mul(2).equal(),fontSize:e.fontSize,lineHeight:e.lineHeight,cursor:"pointer","&:hover":{color:e.colorPrimary,transition:`color ${e.motionDurationMid}`},[`a:not(${t}-btn), > ${n}`]:{display:"inline-block",width:"100%",color:e.colorIcon,lineHeight:te(e.fontHeight),transition:`color ${e.motionDurationMid}`,"&:hover":{color:e.colorPrimary}},[`> ${n}`]:{fontSize:a,lineHeight:te(e.calc(a).mul(e.lineHeight).equal())}},"&:not(:last-child)":{borderInlineEnd:`${te(e.lineWidth)} ${e.lineType} ${o}`}}})},jW=e=>Object.assign(Object.assign({margin:`${te(e.calc(e.marginXXS).mul(-1).equal())} 0`,display:"flex"},Uo()),{"&-avatar":{paddingInlineEnd:e.padding},"&-detail":{overflow:"hidden",flex:1,"> div:not(:last-child)":{marginBottom:e.marginXS}},"&-title":Object.assign({color:e.colorTextHeading,fontWeight:e.fontWeightStrong,fontSize:e.fontSizeLG},Bi),"&-description":{color:e.colorTextDescription}}),TW=e=>{const{componentCls:t,colorFillAlter:n,headerPadding:r,bodyPadding:a}=e;return{[`${t}-head`]:{padding:`0 ${te(r)}`,background:n,"&-title":{fontSize:e.fontSize}},[`${t}-body`]:{padding:`${te(e.padding)} ${te(a)}`}}},DW=e=>{const{componentCls:t}=e;return{overflow:"hidden",[`${t}-body`]:{userSelect:"none"}}},PW=e=>{const{componentCls:t,cardShadow:n,cardHeadPadding:r,colorBorderSecondary:a,boxShadowTertiary:o,bodyPadding:c,extraColor:u}=e;return{[t]:Object.assign(Object.assign({},zn(e)),{position:"relative",background:e.colorBgContainer,borderRadius:e.borderRadiusLG,[`&:not(${t}-bordered)`]:{boxShadow:o},[`${t}-head`]:RW(e),[`${t}-extra`]:{marginInlineStart:"auto",color:u,fontWeight:"normal",fontSize:e.fontSize},[`${t}-body`]:{padding:c,borderRadius:`0 0 ${te(e.borderRadiusLG)} ${te(e.borderRadiusLG)}`},[`${t}-grid`]:NW(e),[`${t}-cover`]:{"> *":{display:"block",width:"100%",borderRadius:`${te(e.borderRadiusLG)} ${te(e.borderRadiusLG)} 0 0`}},[`${t}-actions`]:MW(e),[`${t}-meta`]:jW(e)}),[`${t}-bordered`]:{border:`${te(e.lineWidth)} ${e.lineType} ${a}`,[`${t}-cover`]:{marginTop:-1,marginInlineStart:-1,marginInlineEnd:-1}},[`${t}-hoverable`]:{cursor:"pointer",transition:`box-shadow ${e.motionDurationMid}, border-color ${e.motionDurationMid}`,"&:hover":{borderColor:"transparent",boxShadow:n}},[`${t}-contain-grid`]:{borderRadius:`${te(e.borderRadiusLG)} ${te(e.borderRadiusLG)} 0 0 `,[`${t}-body`]:{display:"flex",flexWrap:"wrap"},[`&:not(${t}-loading) ${t}-body`]:{marginBlockStart:e.calc(e.lineWidth).mul(-1).equal(),marginInlineStart:e.calc(e.lineWidth).mul(-1).equal(),padding:0}},[`${t}-contain-tabs`]:{[`> div${t}-head`]:{minHeight:0,[`${t}-head-title, ${t}-extra`]:{paddingTop:r}}},[`${t}-type-inner`]:TW(e),[`${t}-loading`]:DW(e),[`${t}-rtl`]:{direction:"rtl"}}},kW=e=>{const{componentCls:t,bodyPaddingSM:n,headerPaddingSM:r,headerHeightSM:a,headerFontSizeSM:o}=e;return{[`${t}-small`]:{[`> ${t}-head`]:{minHeight:a,padding:`0 ${te(r)}`,fontSize:o,[`> ${t}-head-wrapper`]:{[`> ${t}-extra`]:{fontSize:e.fontSize}}},[`> ${t}-body`]:{padding:n}},[`${t}-small${t}-contain-tabs`]:{[`> ${t}-head`]:{[`${t}-head-title, ${t}-extra`]:{paddingTop:0,display:"flex",alignItems:"center"}}}}},AW=e=>{var t,n;return{headerBg:"transparent",headerFontSize:e.fontSizeLG,headerFontSizeSM:e.fontSize,headerHeight:e.fontSizeLG*e.lineHeightLG+e.padding*2,headerHeightSM:e.fontSize*e.lineHeight+e.paddingXS*2,actionsBg:e.colorBgContainer,actionsLiMargin:`${e.paddingSM}px 0`,tabsMarginBottom:-e.padding-e.lineWidth,extraColor:e.colorText,bodyPaddingSM:12,headerPaddingSM:12,bodyPadding:(t=e.bodyPadding)!==null&&t!==void 0?t:e.paddingLG,headerPadding:(n=e.headerPadding)!==null&&n!==void 0?n:e.paddingLG}},zW=Kn("Card",e=>{const t=xn(e,{cardShadow:e.boxShadowCard,cardHeadPadding:e.padding,cardPaddingBase:e.paddingLG,cardActionsIconSize:e.fontSize});return[PW(t),kW(t)]},AW);var WO=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,r=Object.getOwnPropertySymbols(e);a{const{actionClasses:t,actions:n=[],actionStyle:r}=e;return s.createElement("ul",{className:t,style:r},n.map((a,o)=>{const c=`action-${o}`;return s.createElement("li",{style:{width:`${100/n.length}%`},key:c},s.createElement("span",null,a))}))},HW=s.forwardRef((e,t)=>{const{prefixCls:n,className:r,rootClassName:a,style:o,extra:c,headStyle:u={},bodyStyle:f={},title:d,loading:h,bordered:v,variant:g,size:b,type:x,cover:C,actions:y,tabList:w,children:$,activeTabKey:E,defaultActiveTabKey:O,tabBarExtraContent:I,hoverable:j,tabProps:M={},classNames:D,styles:N}=e,P=WO(e,["prefixCls","className","rootClassName","style","extra","headStyle","bodyStyle","title","loading","bordered","variant","size","type","cover","actions","tabList","children","activeTabKey","defaultActiveTabKey","tabBarExtraContent","hoverable","tabProps","classNames","styles"]),{getPrefixCls:A,direction:F,card:H}=s.useContext(Wt),[k]=ks("card",g,v),L=je=>{var ge;(ge=e.onTabChange)===null||ge===void 0||ge.call(e,je)},T=je=>{var ge;return se((ge=H?.classNames)===null||ge===void 0?void 0:ge[je],D?.[je])},z=je=>{var ge;return Object.assign(Object.assign({},(ge=H?.styles)===null||ge===void 0?void 0:ge[je]),N?.[je])},V=s.useMemo(()=>{let je=!1;return s.Children.forEach($,ge=>{ge?.type===ET&&(je=!0)}),je},[$]),q=A("card",n),[G,B,U]=zW(q),K=s.createElement(vu,{loading:!0,active:!0,paragraph:{rows:4},title:!1},$),Y=E!==void 0,Q=Object.assign(Object.assign({},M),{[Y?"activeKey":"defaultActiveKey"]:Y?E:O,tabBarExtraContent:I});let Z;const ae=la(b),re=!ae||ae==="default"?"large":ae,ie=w?s.createElement($T,Object.assign({size:re},Q,{className:`${q}-head-tabs`,onChange:L,items:w.map(je=>{var{tab:ge}=je,Ie=WO(je,["tab"]);return Object.assign({label:ge},Ie)})})):null;if(d||c||ie){const je=se(`${q}-head`,T("header")),ge=se(`${q}-head-title`,T("title")),Ie=se(`${q}-extra`,T("extra")),Ee=Object.assign(Object.assign({},u),z("header"));Z=s.createElement("div",{className:je,style:Ee},s.createElement("div",{className:`${q}-head-wrapper`},d&&s.createElement("div",{className:ge,style:z("title")},d),c&&s.createElement("div",{className:Ie,style:z("extra")},c)),ie)}const ve=se(`${q}-cover`,T("cover")),ue=C?s.createElement("div",{className:ve,style:z("cover")},C):null,oe=se(`${q}-body`,T("body")),he=Object.assign(Object.assign({},f),z("body")),fe=s.createElement("div",{className:oe,style:he},h?K:$),me=se(`${q}-actions`,T("actions")),le=y?.length?s.createElement(LW,{actionClasses:me,actionStyle:z("actions"),actions:y}):null,pe=lr(P,["onTabChange"]),Ce=se(q,H?.className,{[`${q}-loading`]:h,[`${q}-bordered`]:k!=="borderless",[`${q}-hoverable`]:j,[`${q}-contain-grid`]:V,[`${q}-contain-tabs`]:w?.length,[`${q}-${ae}`]:ae,[`${q}-type-${x}`]:!!x,[`${q}-rtl`]:F==="rtl"},r,a,B,U),De=Object.assign(Object.assign({},H?.style),o);return G(s.createElement("div",Object.assign({ref:t},pe,{className:Ce,style:De}),Z,ue,fe,le))});var BW=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,r=Object.getOwnPropertySymbols(e);a{const{prefixCls:t,className:n,avatar:r,title:a,description:o}=e,c=BW(e,["prefixCls","className","avatar","title","description"]),{getPrefixCls:u}=s.useContext(Wt),f=u("card",t),d=se(`${f}-meta`,n),h=r?s.createElement("div",{className:`${f}-meta-avatar`},r):null,v=a?s.createElement("div",{className:`${f}-meta-title`},a):null,g=o?s.createElement("div",{className:`${f}-meta-description`},o):null,b=v||g?s.createElement("div",{className:`${f}-meta-detail`},v,g):null;return s.createElement("div",Object.assign({},c,{className:d}),h,b)},Je=HW;Je.Grid=ET;Je.Meta=FW;function VW(e,t,n){var r=n||{},a=r.noTrailing,o=a===void 0?!1:a,c=r.noLeading,u=c===void 0?!1:c,f=r.debounceMode,d=f===void 0?void 0:f,h,v=!1,g=0;function b(){h&&clearTimeout(h)}function x(y){var w=y||{},$=w.upcomingOnly,E=$===void 0?!1:$;b(),v=!E}function C(){for(var y=arguments.length,w=new Array(y),$=0;$e?u?(g=Date.now(),o||(h=setTimeout(d?j:I,e))):I():o!==!0&&(h=setTimeout(d?j:I,d===void 0?e-O:e))}return C.cancel=x,C}function KW(e,t,n){var r={},a=r.atBegin,o=a===void 0?!1:a;return VW(e,t,{debounceMode:o!==!1})}function qa(e,t){return e[t]}var UW=["children"];function _T(e,t){return"".concat(e,"-").concat(t)}function WW(e){return e&&e.type&&e.type.isTreeNode}function Hf(e,t){return e??t}function iu(e){var t=e||{},n=t.title,r=t._title,a=t.key,o=t.children,c=n||"title";return{title:c,_title:r||[c],key:a||"key",children:o||"children"}}function OT(e){function t(n){var r=Ma(n);return r.map(function(a){if(!WW(a))return xr(!a,"Tree/TreeNode can only accept TreeNode as children."),null;var o=a.key,c=a.props,u=c.children,f=Kt(c,UW),d=ee({key:o},f),h=t(u);return h.length&&(d.children=h),d}).filter(function(a){return a})}return t(e)}function ky(e,t,n){var r=iu(n),a=r._title,o=r.key,c=r.children,u=new Set(t===!0?[]:t),f=[];function d(h){var v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return h.map(function(g,b){for(var x=_T(v?v.pos:"0",b),C=Hf(g[o],x),y,w=0;w1&&arguments[1]!==void 0?arguments[1]:{},n=t.initWrapper,r=t.processEntity,a=t.onProcessFinished,o=t.externalGetKey,c=t.childrenPropName,u=t.fieldNames,f=arguments.length>2?arguments[2]:void 0,d=o||f,h={},v={},g={posEntities:h,keyEntities:v};return n&&(g=n(g)||g),qW(e,function(b){var x=b.node,C=b.index,y=b.pos,w=b.key,$=b.parentPos,E=b.level,O=b.nodes,I={node:x,nodes:O,index:C,key:w,pos:y,level:E},j=Hf(w,y);h[y]=I,v[j]=I,I.parent=h[$],I.parent&&(I.parent.children=I.parent.children||[],I.parent.children.push(I)),r&&r(I,g)},{externalGetKey:d,childrenPropName:c,fieldNames:u}),a&&a(g),g}function Yd(e,t){var n=t.expandedKeys,r=t.selectedKeys,a=t.loadedKeys,o=t.loadingKeys,c=t.checkedKeys,u=t.halfCheckedKeys,f=t.dragOverNodeKey,d=t.dropPosition,h=t.keyEntities,v=qa(h,e),g={eventKey:e,expanded:n.indexOf(e)!==-1,selected:r.indexOf(e)!==-1,loaded:a.indexOf(e)!==-1,loading:o.indexOf(e)!==-1,checked:c.indexOf(e)!==-1,halfChecked:u.indexOf(e)!==-1,pos:String(v?v.pos:""),dragOver:f===e&&d===0,dragOverGapTop:f===e&&d===-1,dragOverGapBottom:f===e&&d===1};return g}function Jr(e){var t=e.data,n=e.expanded,r=e.selected,a=e.checked,o=e.loaded,c=e.loading,u=e.halfChecked,f=e.dragOver,d=e.dragOverGapTop,h=e.dragOverGapBottom,v=e.pos,g=e.active,b=e.eventKey,x=ee(ee({},t),{},{expanded:n,selected:r,checked:a,loaded:o,loading:c,halfChecked:u,dragOver:f,dragOverGapTop:d,dragOverGapBottom:h,pos:v,active:g,key:b});return"props"in x||Object.defineProperty(x,"props",{get:function(){return xr(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),e}}),x}function IT(e,t){var n=new Set;return e.forEach(function(r){t.has(r)||n.add(r)}),n}function YW(e){var t=e||{},n=t.disabled,r=t.disableCheckbox,a=t.checkable;return!!(n||r)||a===!1}function GW(e,t,n,r){for(var a=new Set(e),o=new Set,c=0;c<=n;c+=1){var u=t.get(c)||new Set;u.forEach(function(v){var g=v.key,b=v.node,x=v.children,C=x===void 0?[]:x;a.has(g)&&!r(b)&&C.filter(function(y){return!r(y.node)}).forEach(function(y){a.add(y.key)})})}for(var f=new Set,d=n;d>=0;d-=1){var h=t.get(d)||new Set;h.forEach(function(v){var g=v.parent,b=v.node;if(!(r(b)||!v.parent||f.has(v.parent.key))){if(r(v.parent.node)){f.add(g.key);return}var x=!0,C=!1;(g.children||[]).filter(function(y){return!r(y.node)}).forEach(function(y){var w=y.key,$=a.has(w);x&&!$&&(x=!1),!C&&($||o.has(w))&&(C=!0)}),x&&a.add(g.key),C&&o.add(g.key),f.add(g.key)}})}return{checkedKeys:Array.from(a),halfCheckedKeys:Array.from(IT(o,a))}}function XW(e,t,n,r,a){for(var o=new Set(e),c=new Set(t),u=0;u<=r;u+=1){var f=n.get(u)||new Set;f.forEach(function(g){var b=g.key,x=g.node,C=g.children,y=C===void 0?[]:C;!o.has(b)&&!c.has(b)&&!a(x)&&y.filter(function(w){return!a(w.node)}).forEach(function(w){o.delete(w.key)})})}c=new Set;for(var d=new Set,h=r;h>=0;h-=1){var v=n.get(h)||new Set;v.forEach(function(g){var b=g.parent,x=g.node;if(!(a(x)||!g.parent||d.has(g.parent.key))){if(a(g.parent.node)){d.add(b.key);return}var C=!0,y=!1;(b.children||[]).filter(function(w){return!a(w.node)}).forEach(function(w){var $=w.key,E=o.has($);C&&!E&&(C=!1),!y&&(E||c.has($))&&(y=!0)}),C||o.delete(b.key),y&&c.add(b.key),d.add(b.key)}})}return{checkedKeys:Array.from(o),halfCheckedKeys:Array.from(IT(c,o))}}function Wc(e,t,n,r){var a=[],o;r?o=r:o=YW;var c=new Set(e.filter(function(h){var v=!!qa(n,h);return v||a.push(h),v})),u=new Map,f=0;Object.keys(n).forEach(function(h){var v=n[h],g=v.level,b=u.get(g);b||(b=new Set,u.set(g,b)),b.add(v),f=Math.max(f,g)}),xr(!a.length,"Tree missing follow keys: ".concat(a.slice(0,100).map(function(h){return"'".concat(h,"'")}).join(", ")));var d;return t===!0?d=GW(c,u,f,o):d=XW(c,t.halfCheckedKeys,u,f,o),d}const QW=e=>{const{checkboxCls:t}=e,n=`${t}-wrapper`;return[{[`${t}-group`]:Object.assign(Object.assign({},zn(e)),{display:"inline-flex",flexWrap:"wrap",columnGap:e.marginXS,[`> ${e.antCls}-row`]:{flex:1}}),[n]:Object.assign(Object.assign({},zn(e)),{display:"inline-flex",alignItems:"baseline",cursor:"pointer","&:after":{display:"inline-block",width:0,overflow:"hidden",content:"'\\a0'"},[`& + ${n}`]:{marginInlineStart:0},[`&${n}-in-form-item`]:{'input[type="checkbox"]':{width:14,height:14}}}),[t]:Object.assign(Object.assign({},zn(e)),{position:"relative",whiteSpace:"nowrap",lineHeight:1,cursor:"pointer",borderRadius:e.borderRadiusSM,alignSelf:"center",[`${t}-input`]:{position:"absolute",inset:0,zIndex:1,cursor:"pointer",opacity:0,margin:0,[`&:focus-visible + ${t}-inner`]:so(e)},[`${t}-inner`]:{boxSizing:"border-box",display:"block",width:e.checkboxSize,height:e.checkboxSize,direction:"ltr",backgroundColor:e.colorBgContainer,border:`${te(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadiusSM,borderCollapse:"separate",transition:`all ${e.motionDurationSlow}`,"&:after":{boxSizing:"border-box",position:"absolute",top:"50%",insetInlineStart:"25%",display:"table",width:e.calc(e.checkboxSize).div(14).mul(5).equal(),height:e.calc(e.checkboxSize).div(14).mul(8).equal(),border:`${te(e.lineWidthBold)} solid ${e.colorWhite}`,borderTop:0,borderInlineStart:0,transform:"rotate(45deg) scale(0) translate(-50%,-50%)",opacity:0,content:'""',transition:`all ${e.motionDurationFast} ${e.motionEaseInBack}, opacity ${e.motionDurationFast}`}},"& + span":{paddingInlineStart:e.paddingXS,paddingInlineEnd:e.paddingXS}})},{[` + ${n}:not(${n}-disabled), + ${t}:not(${t}-disabled) + `]:{[`&:hover ${t}-inner`]:{borderColor:e.colorPrimary}},[`${n}:not(${n}-disabled)`]:{[`&:hover ${t}-checked:not(${t}-disabled) ${t}-inner`]:{backgroundColor:e.colorPrimaryHover,borderColor:"transparent"},[`&:hover ${t}-checked:not(${t}-disabled):after`]:{borderColor:e.colorPrimaryHover}}},{[`${t}-checked`]:{[`${t}-inner`]:{backgroundColor:e.colorPrimary,borderColor:e.colorPrimary,"&:after":{opacity:1,transform:"rotate(45deg) scale(1) translate(-50%,-50%)",transition:`all ${e.motionDurationMid} ${e.motionEaseOutBack} ${e.motionDurationFast}`}}},[` + ${n}-checked:not(${n}-disabled), + ${t}-checked:not(${t}-disabled) + `]:{[`&:hover ${t}-inner`]:{backgroundColor:e.colorPrimaryHover,borderColor:"transparent"}}},{[t]:{"&-indeterminate":{"&":{[`${t}-inner`]:{backgroundColor:`${e.colorBgContainer}`,borderColor:`${e.colorBorder}`,"&:after":{top:"50%",insetInlineStart:"50%",width:e.calc(e.fontSizeLG).div(2).equal(),height:e.calc(e.fontSizeLG).div(2).equal(),backgroundColor:e.colorPrimary,border:0,transform:"translate(-50%, -50%) scale(1)",opacity:1,content:'""'}},[`&:hover ${t}-inner`]:{backgroundColor:`${e.colorBgContainer}`,borderColor:`${e.colorPrimary}`}}}}},{[`${n}-disabled`]:{cursor:"not-allowed"},[`${t}-disabled`]:{[`&, ${t}-input`]:{cursor:"not-allowed",pointerEvents:"none"},[`${t}-inner`]:{background:e.colorBgContainerDisabled,borderColor:e.colorBorder,"&:after":{borderColor:e.colorTextDisabled}},"&:after":{display:"none"},"& + span":{color:e.colorTextDisabled},[`&${t}-indeterminate ${t}-inner::after`]:{background:e.colorTextDisabled}}}]};function RT(e,t){const n=xn(t,{checkboxCls:`.${e}`,checkboxSize:t.controlInteractiveSize});return QW(n)}const NT=Kn("Checkbox",(e,{prefixCls:t})=>[RT(t,e)]),MT=Se.createContext(null);var ZW=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,r=Object.getOwnPropertySymbols(e);a{var n;const{prefixCls:r,className:a,rootClassName:o,children:c,indeterminate:u=!1,style:f,onMouseEnter:d,onMouseLeave:h,skipGroup:v=!1,disabled:g}=e,b=ZW(e,["prefixCls","className","rootClassName","children","indeterminate","style","onMouseEnter","onMouseLeave","skipGroup","disabled"]),{getPrefixCls:x,direction:C,checkbox:y}=s.useContext(Wt),w=s.useContext(MT),{isFormItemInput:$}=s.useContext(ia),E=s.useContext(ja),O=(n=w?.disabled||g)!==null&&n!==void 0?n:E,I=s.useRef(b.value),j=s.useRef(null),M=Ea(t,j);s.useEffect(()=>{w?.registerValue(b.value)},[]),s.useEffect(()=>{if(!v)return b.value!==I.current&&(w?.cancelValue(I.current),w?.registerValue(b.value),I.current=b.value),()=>w?.cancelValue(b.value)},[b.value]),s.useEffect(()=>{var V;!((V=j.current)===null||V===void 0)&&V.input&&(j.current.input.indeterminate=u)},[u]);const D=x("checkbox",r),N=oa(D),[P,A,F]=NT(D,N),H=Object.assign({},b);w&&!v&&(H.onChange=(...V)=>{b.onChange&&b.onChange.apply(b,V),w.toggleOption&&w.toggleOption({label:c,value:b.value})},H.name=w.name,H.checked=w.value.includes(b.value));const k=se(`${D}-wrapper`,{[`${D}-rtl`]:C==="rtl",[`${D}-wrapper-checked`]:H.checked,[`${D}-wrapper-disabled`]:O,[`${D}-wrapper-in-form-item`]:$},y?.className,a,o,F,N,A),L=se({[`${D}-indeterminate`]:u},Uv,A),[T,z]=oT(H.onClick);return P(s.createElement(jf,{component:"Checkbox",disabled:O},s.createElement("label",{className:k,style:Object.assign(Object.assign({},y?.style),f),onMouseEnter:d,onMouseLeave:h,onClick:T},s.createElement(iT,Object.assign({},H,{onClick:z,prefixCls:D,className:L,disabled:O,ref:M})),c!=null&&s.createElement("span",{className:`${D}-label`},c))))},jT=s.forwardRef(JW);var eq=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,r=Object.getOwnPropertySymbols(e);a{const{defaultValue:n,children:r,options:a=[],prefixCls:o,className:c,rootClassName:u,style:f,onChange:d}=e,h=eq(e,["defaultValue","children","options","prefixCls","className","rootClassName","style","onChange"]),{getPrefixCls:v,direction:g}=s.useContext(Wt),[b,x]=s.useState(h.value||n||[]),[C,y]=s.useState([]);s.useEffect(()=>{"value"in h&&x(h.value||[])},[h.value]);const w=s.useMemo(()=>a.map(L=>typeof L=="string"||typeof L=="number"?{label:L,value:L}:L),[a]),$=L=>{y(T=>T.filter(z=>z!==L))},E=L=>{y(T=>[].concat(ke(T),[L]))},O=L=>{const T=b.indexOf(L.value),z=ke(b);T===-1?z.push(L.value):z.splice(T,1),"value"in h||x(z),d?.(z.filter(V=>C.includes(V)).sort((V,q)=>{const G=w.findIndex(U=>U.value===V),B=w.findIndex(U=>U.value===q);return G-B}))},I=v("checkbox",o),j=`${I}-group`,M=oa(I),[D,N,P]=NT(I,M),A=lr(h,["value","disabled"]),F=a.length?w.map(L=>s.createElement(jT,{prefixCls:I,key:L.value.toString(),disabled:"disabled"in L?L.disabled:h.disabled,value:L.value,checked:b.includes(L.value),onChange:L.onChange,className:se(`${j}-item`,L.className),style:L.style,title:L.title,id:L.id,required:L.required},L.label)):r,H=s.useMemo(()=>({toggleOption:O,value:b,disabled:h.disabled,name:h.name,registerValue:E,cancelValue:$}),[O,b,h.disabled,h.name,E,$]),k=se(j,{[`${j}-rtl`]:g==="rtl"},c,u,P,M,N);return D(s.createElement("div",Object.assign({className:k,style:f},A,{ref:t}),s.createElement(MT.Provider,{value:H},F)))}),qr=jT;qr.Group=tq;qr.__ANT_CHECKBOX=!0;const TT=s.createContext({});var nq=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,r=Object.getOwnPropertySymbols(e);a{const{getPrefixCls:n,direction:r}=s.useContext(Wt),{gutter:a,wrap:o}=s.useContext(TT),{prefixCls:c,span:u,order:f,offset:d,push:h,pull:v,className:g,children:b,flex:x,style:C}=e,y=nq(e,["prefixCls","span","order","offset","push","pull","className","children","flex","style"]),w=n("col",c),[$,E,O]=zB(w),I={};let j={};rq.forEach(N=>{let P={};const A=e[N];typeof A=="number"?P.span=A:typeof A=="object"&&(P=A||{}),delete y[N],j=Object.assign(Object.assign({},j),{[`${w}-${N}-${P.span}`]:P.span!==void 0,[`${w}-${N}-order-${P.order}`]:P.order||P.order===0,[`${w}-${N}-offset-${P.offset}`]:P.offset||P.offset===0,[`${w}-${N}-push-${P.push}`]:P.push||P.push===0,[`${w}-${N}-pull-${P.pull}`]:P.pull||P.pull===0,[`${w}-rtl`]:r==="rtl"}),P.flex&&(j[`${w}-${N}-flex`]=!0,I[`--${w}-${N}-flex`]=qO(P.flex))});const M=se(w,{[`${w}-${u}`]:u!==void 0,[`${w}-order-${f}`]:f,[`${w}-offset-${d}`]:d,[`${w}-push-${h}`]:h,[`${w}-pull-${v}`]:v},g,j,E,O),D={};if(a&&a[0]>0){const N=a[0]/2;D.paddingLeft=N,D.paddingRight=N}return x&&(D.flex=qO(x),o===!1&&!D.minWidth&&(D.minWidth=0)),$(s.createElement("div",Object.assign({},y,{style:Object.assign(Object.assign(Object.assign({},D),C),I),className:M,ref:t}),b))});function aq(e,t){const n=[void 0,void 0],r=Array.isArray(e)?e:[e,void 0],a=t||{xs:!0,sm:!0,md:!0,lg:!0,xl:!0,xxl:!0};return r.forEach((o,c)=>{if(typeof o=="object"&&o!==null)for(let u=0;u{if(typeof e=="string"&&r(e),typeof e=="object")for(let o=0;o{a()},[JSON.stringify(e),t]),n}const DT=s.forwardRef((e,t)=>{const{prefixCls:n,justify:r,align:a,className:o,style:c,children:u,gutter:f=0,wrap:d}=e,h=iq(e,["prefixCls","justify","align","className","style","children","gutter","wrap"]),{getPrefixCls:v,direction:g}=s.useContext(Wt),b=dg(!0,null),x=YO(a,b),C=YO(r,b),y=v("row",n),[w,$,E]=kB(y),O=aq(f,b),I=se(y,{[`${y}-no-wrap`]:d===!1,[`${y}-${C}`]:C,[`${y}-${x}`]:x,[`${y}-rtl`]:g==="rtl"},o,$,E),j={},M=O[0]!=null&&O[0]>0?O[0]/-2:void 0;M&&(j.marginLeft=M,j.marginRight=M);const[D,N]=O;j.rowGap=N;const P=s.useMemo(()=>({gutter:[D,N],wrap:d}),[D,N,d]);return w(s.createElement(TT.Provider,{value:P},s.createElement("div",Object.assign({},h,{className:I,style:Object.assign(Object.assign({},j),c),ref:t}),u)))}),oq=e=>{const{componentCls:t}=e;return{[t]:{"&-horizontal":{[`&${t}`]:{"&-sm":{marginBlock:e.marginXS},"&-md":{marginBlock:e.margin}}}}}},lq=e=>{const{componentCls:t,sizePaddingEdgeHorizontal:n,colorSplit:r,lineWidth:a,textPaddingInline:o,orientationMargin:c,verticalMarginInline:u}=e;return{[t]:Object.assign(Object.assign({},zn(e)),{borderBlockStart:`${te(a)} solid ${r}`,"&-vertical":{position:"relative",top:"-0.06em",display:"inline-block",height:"0.9em",marginInline:u,marginBlock:0,verticalAlign:"middle",borderTop:0,borderInlineStart:`${te(a)} solid ${r}`},"&-horizontal":{display:"flex",clear:"both",width:"100%",minWidth:"100%",margin:`${te(e.marginLG)} 0`},[`&-horizontal${t}-with-text`]:{display:"flex",alignItems:"center",margin:`${te(e.dividerHorizontalWithTextGutterMargin)} 0`,color:e.colorTextHeading,fontWeight:500,fontSize:e.fontSizeLG,whiteSpace:"nowrap",textAlign:"center",borderBlockStart:`0 ${r}`,"&::before, &::after":{position:"relative",width:"50%",borderBlockStart:`${te(a)} solid transparent`,borderBlockStartColor:"inherit",borderBlockEnd:0,transform:"translateY(50%)",content:"''"}},[`&-horizontal${t}-with-text-start`]:{"&::before":{width:`calc(${c} * 100%)`},"&::after":{width:`calc(100% - ${c} * 100%)`}},[`&-horizontal${t}-with-text-end`]:{"&::before":{width:`calc(100% - ${c} * 100%)`},"&::after":{width:`calc(${c} * 100%)`}},[`${t}-inner-text`]:{display:"inline-block",paddingBlock:0,paddingInline:o},"&-dashed":{background:"none",borderColor:r,borderStyle:"dashed",borderWidth:`${te(a)} 0 0`},[`&-horizontal${t}-with-text${t}-dashed`]:{"&::before, &::after":{borderStyle:"dashed none none"}},[`&-vertical${t}-dashed`]:{borderInlineStartWidth:a,borderInlineEnd:0,borderBlockStart:0,borderBlockEnd:0},"&-dotted":{background:"none",borderColor:r,borderStyle:"dotted",borderWidth:`${te(a)} 0 0`},[`&-horizontal${t}-with-text${t}-dotted`]:{"&::before, &::after":{borderStyle:"dotted none none"}},[`&-vertical${t}-dotted`]:{borderInlineStartWidth:a,borderInlineEnd:0,borderBlockStart:0,borderBlockEnd:0},[`&-plain${t}-with-text`]:{color:e.colorText,fontWeight:"normal",fontSize:e.fontSize},[`&-horizontal${t}-with-text-start${t}-no-default-orientation-margin-start`]:{"&::before":{width:0},"&::after":{width:"100%"},[`${t}-inner-text`]:{paddingInlineStart:n}},[`&-horizontal${t}-with-text-end${t}-no-default-orientation-margin-end`]:{"&::before":{width:"100%"},"&::after":{width:0},[`${t}-inner-text`]:{paddingInlineEnd:n}}})}},sq=e=>({textPaddingInline:"1em",orientationMargin:.05,verticalMarginInline:e.marginXS}),cq=Kn("Divider",e=>{const t=xn(e,{dividerHorizontalWithTextGutterMargin:e.margin,sizePaddingEdgeHorizontal:0});return[lq(t),oq(t)]},sq,{unitless:{orientationMargin:!0}});var uq=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,r=Object.getOwnPropertySymbols(e);a{const{getPrefixCls:t,direction:n,className:r,style:a}=ga("divider"),{prefixCls:o,type:c="horizontal",orientation:u="center",orientationMargin:f,className:d,rootClassName:h,children:v,dashed:g,variant:b="solid",plain:x,style:C,size:y}=e,w=uq(e,["prefixCls","type","orientation","orientationMargin","className","rootClassName","children","dashed","variant","plain","style","size"]),$=t("divider",o),[E,O,I]=cq($),j=la(y),M=dq[j],D=!!v,N=s.useMemo(()=>u==="left"?n==="rtl"?"end":"start":u==="right"?n==="rtl"?"start":"end":u,[n,u]),P=N==="start"&&f!=null,A=N==="end"&&f!=null,F=se($,r,O,I,`${$}-${c}`,{[`${$}-with-text`]:D,[`${$}-with-text-${N}`]:D,[`${$}-dashed`]:!!g,[`${$}-${b}`]:b!=="solid",[`${$}-plain`]:!!x,[`${$}-rtl`]:n==="rtl",[`${$}-no-default-orientation-margin-start`]:P,[`${$}-no-default-orientation-margin-end`]:A,[`${$}-${M}`]:!!M},d,h),H=s.useMemo(()=>typeof f=="number"?f:/^\d+$/.test(f)?Number(f):f,[f]),k={marginInlineStart:P?H:void 0,marginInlineEnd:A?H:void 0};return E(s.createElement("div",Object.assign({className:F,style:Object.assign(Object.assign({},a),C)},w,{role:"separator"}),v&&c!=="vertical"&&s.createElement("span",{className:`${$}-inner-text`,style:k},v)))};var mq={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M890.5 755.3L537.9 269.2c-12.8-17.6-39-17.6-51.7 0L133.5 755.3A8 8 0 00140 768h75c5.1 0 9.9-2.5 12.9-6.6L512 369.8l284.1 391.6c3 4.1 7.8 6.6 12.9 6.6h75c6.5 0 10.3-7.4 6.5-12.7z"}}]},name:"up",theme:"outlined"},hq=function(t,n){return s.createElement($n,Me({},t,{ref:n,icon:mq}))},vq=s.forwardRef(hq);function _x(){return typeof BigInt=="function"}function PT(e){return!e&&e!==0&&!Number.isNaN(e)||!String(e).trim()}function Es(e){var t=e.trim(),n=t.startsWith("-");n&&(t=t.slice(1)),t=t.replace(/(\.\d*[^0])0*$/,"$1").replace(/\.0*$/,"").replace(/^0+/,""),t.startsWith(".")&&(t="0".concat(t));var r=t||"0",a=r.split("."),o=a[0]||"0",c=a[1]||"0";o==="0"&&c==="0"&&(n=!1);var u=n?"-":"";return{negative:n,negativeStr:u,trimStr:r,integerStr:o,decimalStr:c,fullStr:"".concat(u).concat(r)}}function SC(e){var t=String(e);return!Number.isNaN(Number(t))&&t.includes("e")}function xs(e){var t=String(e);if(SC(e)){var n=Number(t.slice(t.indexOf("e-")+2)),r=t.match(/\.(\d+)/);return r!=null&&r[1]&&(n+=r[1].length),n}return t.includes(".")&&CC(t)?t.length-t.indexOf(".")-1:0}function wg(e){var t=String(e);if(SC(e)){if(e>Number.MAX_SAFE_INTEGER)return String(_x()?BigInt(e).toString():Number.MAX_SAFE_INTEGER);if(e0&&arguments[0]!==void 0?arguments[0]:!0;return n?this.isInvalidate()?"":Es("".concat(this.getMark()).concat(this.getIntegerStr(),".").concat(this.getDecimalStr())).fullStr:this.origin}}]),e})(),pq=(function(){function e(t){if(Sr(this,e),X(this,"origin",""),X(this,"number",void 0),X(this,"empty",void 0),PT(t)){this.empty=!0;return}this.origin=String(t),this.number=Number(t)}return Cr(e,[{key:"negate",value:function(){return new e(-this.toNumber())}},{key:"add",value:function(n){if(this.isInvalidate())return new e(n);var r=Number(n);if(Number.isNaN(r))return this;var a=this.number+r;if(a>Number.MAX_SAFE_INTEGER)return new e(Number.MAX_SAFE_INTEGER);if(aNumber.MAX_SAFE_INTEGER)return new e(Number.MAX_SAFE_INTEGER);if(a0&&arguments[0]!==void 0?arguments[0]:!0;return n?this.isInvalidate()?"":wg(this.number):this.origin}}]),e})();function Ti(e){return _x()?new gq(e):new pq(e)}function tv(e,t,n){var r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(e==="")return"";var a=Es(e),o=a.negativeStr,c=a.integerStr,u=a.decimalStr,f="".concat(t).concat(u),d="".concat(o).concat(c);if(n>=0){var h=Number(u[n]);if(h>=5&&!r){var v=Ti(e).add("".concat(o,"0.").concat("0".repeat(n)).concat(10-h));return tv(v.toString(),t,n,r)}return n===0?d:"".concat(d).concat(t).concat(u.padEnd(n,"0").slice(0,n))}return f===".0"?d:"".concat(d).concat(f)}function bq(e){return!!(e.addonBefore||e.addonAfter)}function yq(e){return!!(e.prefix||e.suffix||e.allowClear)}function GO(e,t,n){var r=t.cloneNode(!0),a=Object.create(e,{target:{value:r},currentTarget:{value:r}});return r.value=n,typeof t.selectionStart=="number"&&typeof t.selectionEnd=="number"&&(r.selectionStart=t.selectionStart,r.selectionEnd=t.selectionEnd),r.setSelectionRange=function(){t.setSelectionRange.apply(t,arguments)},a}function $v(e,t,n,r){if(n){var a=t;if(t.type==="click"){a=GO(t,e,""),n(a);return}if(e.type!=="file"&&r!==void 0){a=GO(t,e,r),n(a);return}n(a)}}function wC(e,t){if(e){e.focus(t);var n=t||{},r=n.cursor;if(r){var a=e.value.length;switch(r){case"start":e.setSelectionRange(0,0);break;case"end":e.setSelectionRange(a,a);break;default:e.setSelectionRange(0,a)}}}}var $C=Se.forwardRef(function(e,t){var n,r,a,o=e.inputElement,c=e.children,u=e.prefixCls,f=e.prefix,d=e.suffix,h=e.addonBefore,v=e.addonAfter,g=e.className,b=e.style,x=e.disabled,C=e.readOnly,y=e.focused,w=e.triggerFocus,$=e.allowClear,E=e.value,O=e.handleReset,I=e.hidden,j=e.classes,M=e.classNames,D=e.dataAttrs,N=e.styles,P=e.components,A=e.onClear,F=c??o,H=P?.affixWrapper||"span",k=P?.groupWrapper||"span",L=P?.wrapper||"span",T=P?.groupAddon||"span",z=s.useRef(null),V=function(me){var le;(le=z.current)!==null&&le!==void 0&&le.contains(me.target)&&w?.()},q=yq(e),G=s.cloneElement(F,{value:E,className:se((n=F.props)===null||n===void 0?void 0:n.className,!q&&M?.variant)||null}),B=s.useRef(null);if(Se.useImperativeHandle(t,function(){return{nativeElement:B.current||z.current}}),q){var U=null;if($){var K=!x&&!C&&E,Y="".concat(u,"-clear-icon"),Q=jt($)==="object"&&$!==null&&$!==void 0&&$.clearIcon?$.clearIcon:"✖";U=Se.createElement("button",{type:"button",tabIndex:-1,onClick:function(me){O?.(me),A?.()},onMouseDown:function(me){return me.preventDefault()},className:se(Y,X(X({},"".concat(Y,"-hidden"),!K),"".concat(Y,"-has-suffix"),!!d))},Q)}var Z="".concat(u,"-affix-wrapper"),ae=se(Z,X(X(X(X(X({},"".concat(u,"-disabled"),x),"".concat(Z,"-disabled"),x),"".concat(Z,"-focused"),y),"".concat(Z,"-readonly"),C),"".concat(Z,"-input-with-clear-btn"),d&&$&&E),j?.affixWrapper,M?.affixWrapper,M?.variant),re=(d||$)&&Se.createElement("span",{className:se("".concat(u,"-suffix"),M?.suffix),style:N?.suffix},U,d);G=Se.createElement(H,Me({className:ae,style:N?.affixWrapper,onClick:V},D?.affixWrapper,{ref:z}),f&&Se.createElement("span",{className:se("".concat(u,"-prefix"),M?.prefix),style:N?.prefix},f),G,re)}if(bq(e)){var ie="".concat(u,"-group"),ve="".concat(ie,"-addon"),ue="".concat(ie,"-wrapper"),oe=se("".concat(u,"-wrapper"),ie,j?.wrapper,M?.wrapper),he=se(ue,X({},"".concat(ue,"-disabled"),x),j?.group,M?.groupWrapper);G=Se.createElement(k,{className:he,ref:B},Se.createElement(L,{className:oe},h&&Se.createElement(T,{className:ve},h),G,v&&Se.createElement(T,{className:ve},v)))}return Se.cloneElement(G,{className:se((r=G.props)===null||r===void 0?void 0:r.className,g)||null,style:ee(ee({},(a=G.props)===null||a===void 0?void 0:a.style),b),hidden:I})}),xq=["show"];function kT(e,t){return s.useMemo(function(){var n={};t&&(n.show=jt(t)==="object"&&t.formatter?t.formatter:!!t),n=ee(ee({},n),e);var r=n,a=r.show,o=Kt(r,xq);return ee(ee({},o),{},{show:!!a,showFormatter:typeof a=="function"?a:void 0,strategy:o.strategy||function(c){return c.length}})},[e,t])}var Sq=["autoComplete","onChange","onFocus","onBlur","onPressEnter","onKeyDown","onKeyUp","prefixCls","disabled","htmlSize","className","maxLength","suffix","showCount","count","type","classes","classNames","styles","onCompositionStart","onCompositionEnd"],Cq=s.forwardRef(function(e,t){var n=e.autoComplete,r=e.onChange,a=e.onFocus,o=e.onBlur,c=e.onPressEnter,u=e.onKeyDown,f=e.onKeyUp,d=e.prefixCls,h=d===void 0?"rc-input":d,v=e.disabled,g=e.htmlSize,b=e.className,x=e.maxLength,C=e.suffix,y=e.showCount,w=e.count,$=e.type,E=$===void 0?"text":$,O=e.classes,I=e.classNames,j=e.styles,M=e.onCompositionStart,D=e.onCompositionEnd,N=Kt(e,Sq),P=s.useState(!1),A=ce(P,2),F=A[0],H=A[1],k=s.useRef(!1),L=s.useRef(!1),T=s.useRef(null),z=s.useRef(null),V=function(we){T.current&&wC(T.current,we)},q=Wn(e.defaultValue,{value:e.value}),G=ce(q,2),B=G[0],U=G[1],K=B==null?"":String(B),Y=s.useState(null),Q=ce(Y,2),Z=Q[0],ae=Q[1],re=kT(w,y),ie=re.max||x,ve=re.strategy(K),ue=!!ie&&ve>ie;s.useImperativeHandle(t,function(){var Ee;return{focus:V,blur:function(){var Fe;(Fe=T.current)===null||Fe===void 0||Fe.blur()},setSelectionRange:function(Fe,He,it){var Ze;(Ze=T.current)===null||Ze===void 0||Ze.setSelectionRange(Fe,He,it)},select:function(){var Fe;(Fe=T.current)===null||Fe===void 0||Fe.select()},input:T.current,nativeElement:((Ee=z.current)===null||Ee===void 0?void 0:Ee.nativeElement)||T.current}}),s.useEffect(function(){L.current&&(L.current=!1),H(function(Ee){return Ee&&v?!1:Ee})},[v]);var oe=function(we,Fe,He){var it=Fe;if(!k.current&&re.exceedFormatter&&re.max&&re.strategy(Fe)>re.max){if(it=re.exceedFormatter(Fe,{max:re.max}),Fe!==it){var Ze,Ye;ae([((Ze=T.current)===null||Ze===void 0?void 0:Ze.selectionStart)||0,((Ye=T.current)===null||Ye===void 0?void 0:Ye.selectionEnd)||0])}}else if(He.source==="compositionEnd")return;U(it),T.current&&$v(T.current,we,r,it)};s.useEffect(function(){if(Z){var Ee;(Ee=T.current)===null||Ee===void 0||Ee.setSelectionRange.apply(Ee,ke(Z))}},[Z]);var he=function(we){oe(we,we.target.value,{source:"change"})},fe=function(we){k.current=!1,oe(we,we.currentTarget.value,{source:"compositionEnd"}),D?.(we)},me=function(we){c&&we.key==="Enter"&&!L.current&&(L.current=!0,c(we)),u?.(we)},le=function(we){we.key==="Enter"&&(L.current=!1),f?.(we)},pe=function(we){H(!0),a?.(we)},Ce=function(we){L.current&&(L.current=!1),H(!1),o?.(we)},De=function(we){U(""),V(),T.current&&$v(T.current,we,r)},je=ue&&"".concat(h,"-out-of-range"),ge=function(){var we=lr(e,["prefixCls","onPressEnter","addonBefore","addonAfter","prefix","suffix","allowClear","defaultValue","showCount","count","classes","htmlSize","styles","classNames","onClear"]);return Se.createElement("input",Me({autoComplete:n},we,{onChange:he,onFocus:pe,onBlur:Ce,onKeyDown:me,onKeyUp:le,className:se(h,X({},"".concat(h,"-disabled"),v),I?.input),style:j?.input,ref:T,size:g,type:E,onCompositionStart:function(He){k.current=!0,M?.(He)},onCompositionEnd:fe}))},Ie=function(){var we=Number(ie)>0;if(C||re.show){var Fe=re.showFormatter?re.showFormatter({value:K,count:ve,maxLength:ie}):"".concat(ve).concat(we?" / ".concat(ie):"");return Se.createElement(Se.Fragment,null,re.show&&Se.createElement("span",{className:se("".concat(h,"-show-count-suffix"),X({},"".concat(h,"-show-count-has-suffix"),!!C),I?.count),style:ee({},j?.count)},Fe),C)}return null};return Se.createElement($C,Me({},N,{prefixCls:h,className:se(b,je),handleReset:De,value:K,focused:F,triggerFocus:V,suffix:Ie(),disabled:v,classes:O,classNames:I,styles:j,ref:z}),ge())});function wq(e,t){return typeof Proxy<"u"&&e?new Proxy(e,{get:function(r,a){if(t[a])return t[a];var o=r[a];return typeof o=="function"?o.bind(r):o}}):e}function $q(e,t){var n=s.useRef(null);function r(){try{var o=e.selectionStart,c=e.selectionEnd,u=e.value,f=u.substring(0,o),d=u.substring(c);n.current={start:o,end:c,value:u,beforeTxt:f,afterTxt:d}}catch{}}function a(){if(e&&n.current&&t)try{var o=e.value,c=n.current,u=c.beforeTxt,f=c.afterTxt,d=c.start,h=o.length;if(o.startsWith(u))h=u.length;else if(o.endsWith(f))h=o.length-n.current.afterTxt.length;else{var v=u[d-1],g=o.indexOf(v,d-1);g!==-1&&(h=g+1)}e.setSelectionRange(h,h)}catch(b){xr(!1,"Something warning of cursor restore. Please fire issue about this: ".concat(b.message))}}return[r,a]}var Eq=function(){var t=s.useState(!1),n=ce(t,2),r=n[0],a=n[1];return fn(function(){a(sg())},[]),r},_q=200,Oq=600;function Iq(e){var t=e.prefixCls,n=e.upNode,r=e.downNode,a=e.upDisabled,o=e.downDisabled,c=e.onStep,u=s.useRef(),f=s.useRef([]),d=s.useRef();d.current=c;var h=function(){clearTimeout(u.current)},v=function(E,O){E.preventDefault(),h(),d.current(O);function I(){d.current(O),u.current=setTimeout(I,_q)}u.current=setTimeout(I,Oq)};s.useEffect(function(){return function(){h(),f.current.forEach(function($){return hn.cancel($)})}},[]);var g=Eq();if(g)return null;var b="".concat(t,"-handler"),x=se(b,"".concat(b,"-up"),X({},"".concat(b,"-up-disabled"),a)),C=se(b,"".concat(b,"-down"),X({},"".concat(b,"-down-disabled"),o)),y=function(){return f.current.push(hn(h))},w={unselectable:"on",role:"button",onMouseUp:y,onMouseLeave:y};return s.createElement("div",{className:"".concat(b,"-wrap")},s.createElement("span",Me({},w,{onMouseDown:function(E){v(E,!0)},"aria-label":"Increase Value","aria-disabled":a,className:x}),n||s.createElement("span",{unselectable:"on",className:"".concat(t,"-handler-up-inner")})),s.createElement("span",Me({},w,{onMouseDown:function(E){v(E,!1)},"aria-label":"Decrease Value","aria-disabled":o,className:C}),r||s.createElement("span",{unselectable:"on",className:"".concat(t,"-handler-down-inner")})))}function XO(e){var t=typeof e=="number"?wg(e):Es(e).fullStr,n=t.includes(".");return n?Es(t.replace(/(\d)\.(\d)/g,"$1$2.")).fullStr:e+"0"}const Rq=(function(){var e=s.useRef(0),t=function(){hn.cancel(e.current)};return s.useEffect(function(){return t},[]),function(n){t(),e.current=hn(function(){n()})}});var Nq=["prefixCls","className","style","min","max","step","defaultValue","value","disabled","readOnly","upHandler","downHandler","keyboard","changeOnWheel","controls","classNames","stringMode","parser","formatter","precision","decimalSeparator","onChange","onInput","onPressEnter","onStep","changeOnBlur","domRef"],Mq=["disabled","style","prefixCls","value","prefix","suffix","addonBefore","addonAfter","className","classNames"],QO=function(t,n){return t||n.isEmpty()?n.toString():n.toNumber()},ZO=function(t){var n=Ti(t);return n.isInvalidate()?null:n},jq=s.forwardRef(function(e,t){var n=e.prefixCls,r=e.className,a=e.style,o=e.min,c=e.max,u=e.step,f=u===void 0?1:u,d=e.defaultValue,h=e.value,v=e.disabled,g=e.readOnly,b=e.upHandler,x=e.downHandler,C=e.keyboard,y=e.changeOnWheel,w=y===void 0?!1:y,$=e.controls,E=$===void 0?!0:$;e.classNames;var O=e.stringMode,I=e.parser,j=e.formatter,M=e.precision,D=e.decimalSeparator,N=e.onChange,P=e.onInput,A=e.onPressEnter,F=e.onStep,H=e.changeOnBlur,k=H===void 0?!0:H,L=e.domRef,T=Kt(e,Nq),z="".concat(n,"-input"),V=s.useRef(null),q=s.useState(!1),G=ce(q,2),B=G[0],U=G[1],K=s.useRef(!1),Y=s.useRef(!1),Q=s.useRef(!1),Z=s.useState(function(){return Ti(h??d)}),ae=ce(Z,2),re=ae[0],ie=ae[1];function ve(Qe){h===void 0&&ie(Qe)}var ue=s.useCallback(function(Qe,at){if(!at)return M>=0?M:Math.max(xs(Qe),xs(f))},[M,f]),oe=s.useCallback(function(Qe){var at=String(Qe);if(I)return I(at);var mt=at;return D&&(mt=mt.replace(D,".")),mt.replace(/[^\w.-]+/g,"")},[I,D]),he=s.useRef(""),fe=s.useCallback(function(Qe,at){if(j)return j(Qe,{userTyping:at,input:String(he.current)});var mt=typeof Qe=="number"?wg(Qe):Qe;if(!at){var st=ue(mt,at);if(CC(mt)&&(D||st>=0)){var bt=D||".";mt=tv(mt,bt,st)}}return mt},[j,ue,D]),me=s.useState(function(){var Qe=d??h;return re.isInvalidate()&&["string","number"].includes(jt(Qe))?Number.isNaN(Qe)?"":Qe:fe(re.toString(),!1)}),le=ce(me,2),pe=le[0],Ce=le[1];he.current=pe;function De(Qe,at){Ce(fe(Qe.isInvalidate()?Qe.toString(!1):Qe.toString(!at),at))}var je=s.useMemo(function(){return ZO(c)},[c,M]),ge=s.useMemo(function(){return ZO(o)},[o,M]),Ie=s.useMemo(function(){return!je||!re||re.isInvalidate()?!1:je.lessEquals(re)},[je,re]),Ee=s.useMemo(function(){return!ge||!re||re.isInvalidate()?!1:re.lessEquals(ge)},[ge,re]),we=$q(V.current,B),Fe=ce(we,2),He=Fe[0],it=Fe[1],Ze=function(at){return je&&!at.lessEquals(je)?je:ge&&!ge.lessEquals(at)?ge:null},Ye=function(at){return!Ze(at)},et=function(at,mt){var st=at,bt=Ye(st)||st.isEmpty();if(!st.isEmpty()&&!mt&&(st=Ze(st)||st,bt=!0),!g&&!v&&bt){var qt=st.toString(),Gt=ue(qt,mt);return Gt>=0&&(st=Ti(tv(qt,".",Gt)),Ye(st)||(st=Ti(tv(qt,".",Gt,!0)))),st.equals(re)||(ve(st),N?.(st.isEmpty()?null:QO(O,st)),h===void 0&&De(st,mt)),st}return re},Pe=Rq(),Oe=function Qe(at){if(He(),he.current=at,Ce(at),!Y.current){var mt=oe(at),st=Ti(mt);st.isNaN()||et(st,!0)}P?.(at),Pe(function(){var bt=at;I||(bt=at.replace(/。/g,".")),bt!==at&&Qe(bt)})},Be=function(){Y.current=!0},$e=function(){Y.current=!1,Oe(V.current.value)},Te=function(at){Oe(at.target.value)},be=function(at){var mt;if(!(at&&Ie||!at&&Ee)){K.current=!1;var st=Ti(Q.current?XO(f):f);at||(st=st.negate());var bt=(re||Ti(0)).add(st.toString()),qt=et(bt,!1);F?.(QO(O,qt),{offset:Q.current?XO(f):f,type:at?"up":"down"}),(mt=V.current)===null||mt===void 0||mt.focus()}},ye=function(at){var mt=Ti(oe(pe)),st;mt.isNaN()?st=et(re,at):st=et(mt,at),h!==void 0?De(re,!1):st.isNaN()||De(st,!1)},Re=function(){K.current=!0},Ge=function(at){var mt=at.key,st=at.shiftKey;K.current=!0,Q.current=st,mt==="Enter"&&(Y.current||(K.current=!1),ye(!1),A?.(at)),C!==!1&&!Y.current&&["Up","ArrowUp","Down","ArrowDown"].includes(mt)&&(be(mt==="Up"||mt==="ArrowUp"),at.preventDefault())},ft=function(){K.current=!1,Q.current=!1};s.useEffect(function(){if(w&&B){var Qe=function(st){be(st.deltaY<0),st.preventDefault()},at=V.current;if(at)return at.addEventListener("wheel",Qe,{passive:!1}),function(){return at.removeEventListener("wheel",Qe)}}});var $t=function(){k&&ye(!1),U(!1),K.current=!1};return ws(function(){re.isInvalidate()||De(re,!1)},[M,j]),ws(function(){var Qe=Ti(h);ie(Qe);var at=Ti(oe(pe));(!Qe.equals(at)||!K.current||j)&&De(Qe,K.current)},[h]),ws(function(){j&&it()},[pe]),s.createElement("div",{ref:L,className:se(n,r,X(X(X(X(X({},"".concat(n,"-focused"),B),"".concat(n,"-disabled"),v),"".concat(n,"-readonly"),g),"".concat(n,"-not-a-number"),re.isNaN()),"".concat(n,"-out-of-range"),!re.isInvalidate()&&!Ye(re))),style:a,onFocus:function(){U(!0)},onBlur:$t,onKeyDown:Ge,onKeyUp:ft,onCompositionStart:Be,onCompositionEnd:$e,onBeforeInput:Re},E&&s.createElement(Iq,{prefixCls:n,upNode:b,downNode:x,upDisabled:Ie,downDisabled:Ee,onStep:be}),s.createElement("div",{className:"".concat(z,"-wrap")},s.createElement("input",Me({autoComplete:"off",role:"spinbutton","aria-valuemin":o,"aria-valuemax":c,"aria-valuenow":re.isInvalidate()?null:re.toString(),step:f},T,{ref:Ea(V,t),className:z,value:pe,onChange:Te,disabled:v,readOnly:g}))))}),Tq=s.forwardRef(function(e,t){var n=e.disabled,r=e.style,a=e.prefixCls,o=a===void 0?"rc-input-number":a,c=e.value,u=e.prefix,f=e.suffix,d=e.addonBefore,h=e.addonAfter,v=e.className,g=e.classNames,b=Kt(e,Mq),x=s.useRef(null),C=s.useRef(null),y=s.useRef(null),w=function(E){y.current&&wC(y.current,E)};return s.useImperativeHandle(t,function(){return wq(y.current,{focus:w,nativeElement:x.current.nativeElement||C.current})}),s.createElement($C,{className:v,triggerFocus:w,prefixCls:o,value:c,disabled:n,style:r,prefix:u,suffix:f,addonAfter:h,addonBefore:d,classNames:g,components:{affixWrapper:"div",groupWrapper:"div",wrapper:"div",groupAddon:"div"},ref:x},s.createElement(jq,Me({prefixCls:o,disabled:n,ref:y,domRef:C,className:g?.input},b)))});const Dq=e=>{var t;const n=(t=e.handleVisible)!==null&&t!==void 0?t:"auto",r=e.controlHeightSM-e.lineWidth*2;return Object.assign(Object.assign({},Bs(e)),{controlWidth:90,handleWidth:r,handleFontSize:e.fontSize/2,handleVisible:n,handleActiveBg:e.colorFillAlter,handleBg:e.colorBgContainer,filledHandleBg:new Pn(e.colorFillSecondary).onBackground(e.colorBgContainer).toHexString(),handleHoverColor:e.colorPrimary,handleBorderColor:e.colorBorder,handleOpacity:n===!0?1:0,handleVisibleWidth:n===!0?r:0})},JO=({componentCls:e,borderRadiusSM:t,borderRadiusLG:n},r)=>{const a=r==="lg"?n:t;return{[`&-${r}`]:{[`${e}-handler-wrap`]:{borderStartEndRadius:a,borderEndEndRadius:a},[`${e}-handler-up`]:{borderStartEndRadius:a},[`${e}-handler-down`]:{borderEndEndRadius:a}}}},Pq=e=>{const{componentCls:t,lineWidth:n,lineType:r,borderRadius:a,inputFontSizeSM:o,inputFontSizeLG:c,controlHeightLG:u,controlHeightSM:f,colorError:d,paddingInlineSM:h,paddingBlockSM:v,paddingBlockLG:g,paddingInlineLG:b,colorIcon:x,motionDurationMid:C,handleHoverColor:y,handleOpacity:w,paddingInline:$,paddingBlock:E,handleBg:O,handleActiveBg:I,colorTextDisabled:j,borderRadiusSM:M,borderRadiusLG:D,controlWidth:N,handleBorderColor:P,filledHandleBg:A,lineHeightLG:F,calc:H}=e;return[{[t]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},zn(e)),Lf(e)),{display:"inline-block",width:N,margin:0,padding:0,borderRadius:a}),fC(e,{[`${t}-handler-wrap`]:{background:O,[`${t}-handler-down`]:{borderBlockStart:`${te(n)} ${r} ${P}`}}})),hC(e,{[`${t}-handler-wrap`]:{background:A,[`${t}-handler-down`]:{borderBlockStart:`${te(n)} ${r} ${P}`}},"&:focus-within":{[`${t}-handler-wrap`]:{background:O}}})),vC(e,{[`${t}-handler-wrap`]:{background:O,[`${t}-handler-down`]:{borderBlockStart:`${te(n)} ${r} ${P}`}}})),mC(e)),{"&-rtl":{direction:"rtl",[`${t}-input`]:{direction:"rtl"}},"&-lg":{padding:0,fontSize:c,lineHeight:F,borderRadius:D,[`input${t}-input`]:{height:H(u).sub(H(n).mul(2)).equal(),padding:`${te(g)} ${te(b)}`}},"&-sm":{padding:0,fontSize:o,borderRadius:M,[`input${t}-input`]:{height:H(f).sub(H(n).mul(2)).equal(),padding:`${te(v)} ${te(h)}`}},"&-out-of-range":{[`${t}-input-wrap`]:{input:{color:d}}},"&-group":Object.assign(Object.assign(Object.assign({},zn(e)),gT(e)),{"&-wrapper":Object.assign(Object.assign(Object.assign({display:"inline-block",textAlign:"start",verticalAlign:"top",[`${t}-affix-wrapper`]:{width:"100%"},"&-lg":{[`${t}-group-addon`]:{borderRadius:D,fontSize:e.fontSizeLG}},"&-sm":{[`${t}-group-addon`]:{borderRadius:M}}},dT(e)),mT(e)),{[`&:not(${t}-compact-first-item):not(${t}-compact-last-item)${t}-compact-item`]:{[`${t}, ${t}-group-addon`]:{borderRadius:0}},[`&:not(${t}-compact-last-item)${t}-compact-first-item`]:{[`${t}, ${t}-group-addon`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&:not(${t}-compact-first-item)${t}-compact-last-item`]:{[`${t}, ${t}-group-addon`]:{borderStartStartRadius:0,borderEndStartRadius:0}}})}),[`&-disabled ${t}-input`]:{cursor:"not-allowed"},[t]:{"&-input":Object.assign(Object.assign(Object.assign(Object.assign({},zn(e)),{width:"100%",padding:`${te(E)} ${te($)}`,textAlign:"start",backgroundColor:"transparent",border:0,borderRadius:a,outline:0,transition:`all ${C} linear`,appearance:"textfield",fontSize:"inherit"}),gC(e.colorTextPlaceholder)),{'&[type="number"]::-webkit-inner-spin-button, &[type="number"]::-webkit-outer-spin-button':{margin:0,appearance:"none"}})},[`&:hover ${t}-handler-wrap, &-focused ${t}-handler-wrap`]:{width:e.handleWidth,opacity:1}})},{[t]:Object.assign(Object.assign(Object.assign({[`${t}-handler-wrap`]:{position:"absolute",insetBlockStart:0,insetInlineEnd:0,width:e.handleVisibleWidth,opacity:w,height:"100%",borderStartStartRadius:0,borderStartEndRadius:a,borderEndEndRadius:a,borderEndStartRadius:0,display:"flex",flexDirection:"column",alignItems:"stretch",transition:`all ${C}`,overflow:"hidden",[`${t}-handler`]:{display:"flex",alignItems:"center",justifyContent:"center",flex:"auto",height:"40%",[` + ${t}-handler-up-inner, + ${t}-handler-down-inner + `]:{marginInlineEnd:0,fontSize:e.handleFontSize}}},[`${t}-handler`]:{height:"50%",overflow:"hidden",color:x,fontWeight:"bold",lineHeight:0,textAlign:"center",cursor:"pointer",borderInlineStart:`${te(n)} ${r} ${P}`,transition:`all ${C} linear`,"&:active":{background:I},"&:hover":{height:"60%",[` + ${t}-handler-up-inner, + ${t}-handler-down-inner + `]:{color:y}},"&-up-inner, &-down-inner":Object.assign(Object.assign({},lu()),{color:x,transition:`all ${C} linear`,userSelect:"none"})},[`${t}-handler-up`]:{borderStartEndRadius:a},[`${t}-handler-down`]:{borderEndEndRadius:a}},JO(e,"lg")),JO(e,"sm")),{"&-disabled, &-readonly":{[`${t}-handler-wrap`]:{display:"none"},[`${t}-input`]:{color:"inherit"}},[` + ${t}-handler-up-disabled, + ${t}-handler-down-disabled + `]:{cursor:"not-allowed"},[` + ${t}-handler-up-disabled:hover &-handler-up-inner, + ${t}-handler-down-disabled:hover &-handler-down-inner + `]:{color:j}})}]},kq=e=>{const{componentCls:t,paddingBlock:n,paddingInline:r,inputAffixPadding:a,controlWidth:o,borderRadiusLG:c,borderRadiusSM:u,paddingInlineLG:f,paddingInlineSM:d,paddingBlockLG:h,paddingBlockSM:v,motionDurationMid:g}=e;return{[`${t}-affix-wrapper`]:Object.assign(Object.assign({[`input${t}-input`]:{padding:`${te(n)} 0`}},Lf(e)),{position:"relative",display:"inline-flex",alignItems:"center",width:o,padding:0,paddingInlineStart:r,"&-lg":{borderRadius:c,paddingInlineStart:f,[`input${t}-input`]:{padding:`${te(h)} 0`}},"&-sm":{borderRadius:u,paddingInlineStart:d,[`input${t}-input`]:{padding:`${te(v)} 0`}},[`&:not(${t}-disabled):hover`]:{zIndex:1},"&-focused, &:focus":{zIndex:1},[`&-disabled > ${t}-disabled`]:{background:"transparent"},[`> div${t}`]:{width:"100%",border:"none",outline:"none",[`&${t}-focused`]:{boxShadow:"none !important"}},"&::before":{display:"inline-block",width:0,visibility:"hidden",content:'"\\a0"'},[`${t}-handler-wrap`]:{zIndex:2},[t]:{position:"static",color:"inherit","&-prefix, &-suffix":{display:"flex",flex:"none",alignItems:"center",pointerEvents:"none"},"&-prefix":{marginInlineEnd:a},"&-suffix":{insetBlockStart:0,insetInlineEnd:0,height:"100%",marginInlineEnd:r,marginInlineStart:a,transition:`margin ${g}`}},[`&:hover ${t}-handler-wrap, &-focused ${t}-handler-wrap`]:{width:e.handleWidth,opacity:1},[`&:not(${t}-affix-wrapper-without-controls):hover ${t}-suffix`]:{marginInlineEnd:e.calc(e.handleWidth).add(r).equal()}}),[`${t}-underlined`]:{borderRadius:0}}},Aq=Kn("InputNumber",e=>{const t=xn(e,Hs(e));return[Pq(t),kq(t),Tf(t)]},Dq,{unitless:{handleOpacity:!0},resetFont:!1});var zq=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,r=Object.getOwnPropertySymbols(e);a{const{getPrefixCls:n,direction:r}=s.useContext(Wt),a=s.useRef(null);s.useImperativeHandle(t,()=>a.current);const{className:o,rootClassName:c,size:u,disabled:f,prefixCls:d,addonBefore:h,addonAfter:v,prefix:g,suffix:b,bordered:x,readOnly:C,status:y,controls:w,variant:$}=e,E=zq(e,["className","rootClassName","size","disabled","prefixCls","addonBefore","addonAfter","prefix","suffix","bordered","readOnly","status","controls","variant"]),O=n("input-number",d),I=oa(O),[j,M,D]=Aq(O,I),{compactSize:N,compactItemClassnames:P}=Zo(O,r);let A=s.createElement(vq,{className:`${O}-handler-up-inner`}),F=s.createElement(WS,{className:`${O}-handler-down-inner`});const H=typeof w=="boolean"?w:void 0;typeof w=="object"&&(A=typeof w.upIcon>"u"?A:s.createElement("span",{className:`${O}-handler-up-inner`},w.upIcon),F=typeof w.downIcon>"u"?F:s.createElement("span",{className:`${O}-handler-down-inner`},w.downIcon));const{hasFeedback:k,status:L,isFormItemInput:T,feedbackIcon:z}=s.useContext(ia),V=Ps(L,y),q=la(re=>{var ie;return(ie=u??N)!==null&&ie!==void 0?ie:re}),G=s.useContext(ja),B=f??G,[U,K]=ks("inputNumber",$,x),Y=k&&s.createElement(s.Fragment,null,z),Q=se({[`${O}-lg`]:q==="large",[`${O}-sm`]:q==="small",[`${O}-rtl`]:r==="rtl",[`${O}-in-form-item`]:T},M),Z=`${O}-group`,ae=s.createElement(Tq,Object.assign({ref:a,disabled:B,className:se(D,I,o,c,P),upHandler:A,downHandler:F,prefixCls:O,readOnly:C,controls:H,prefix:g,suffix:Y||b,addonBefore:h&&s.createElement(Go,{form:!0,space:!0},h),addonAfter:v&&s.createElement(Go,{form:!0,space:!0},v),classNames:{input:Q,variant:se({[`${O}-${U}`]:K},Hl(O,V,k)),affixWrapper:se({[`${O}-affix-wrapper-sm`]:q==="small",[`${O}-affix-wrapper-lg`]:q==="large",[`${O}-affix-wrapper-rtl`]:r==="rtl",[`${O}-affix-wrapper-without-controls`]:w===!1||B||C},M),wrapper:se({[`${Z}-rtl`]:r==="rtl"},M),groupWrapper:se({[`${O}-group-wrapper-sm`]:q==="small",[`${O}-group-wrapper-lg`]:q==="large",[`${O}-group-wrapper-rtl`]:r==="rtl",[`${O}-group-wrapper-${U}`]:K},Hl(`${O}-group-wrapper`,V,k),M)}},E));return j(ae)}),EC=AT,Lq=e=>s.createElement(vo,{theme:{components:{InputNumber:{handleVisible:!0}}}},s.createElement(AT,Object.assign({},e)));EC._InternalPanelDoNotUseOrYouWillBeFired=Lq;const zT=e=>{let t;return typeof e=="object"&&e?.clearIcon?t=e:e&&(t={clearIcon:Se.createElement(cu,null)}),t};function LT(e,t){const n=s.useRef([]),r=()=>{n.current.push(setTimeout(()=>{var a,o,c,u;!((a=e.current)===null||a===void 0)&&a.input&&((o=e.current)===null||o===void 0?void 0:o.input.getAttribute("type"))==="password"&&(!((c=e.current)===null||c===void 0)&&c.input.hasAttribute("value"))&&((u=e.current)===null||u===void 0||u.input.removeAttribute("value"))}))};return s.useEffect(()=>(t&&r(),()=>n.current.forEach(a=>{a&&clearTimeout(a)})),[]),r}function Hq(e){return!!(e.prefix||e.suffix||e.allowClear||e.showCount)}var Bq=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,r=Object.getOwnPropertySymbols(e);a{const{prefixCls:n,bordered:r=!0,status:a,size:o,disabled:c,onBlur:u,onFocus:f,suffix:d,allowClear:h,addonAfter:v,addonBefore:g,className:b,style:x,styles:C,rootClassName:y,onChange:w,classNames:$,variant:E}=e,O=Bq(e,["prefixCls","bordered","status","size","disabled","onBlur","onFocus","suffix","allowClear","addonAfter","addonBefore","className","style","styles","rootClassName","onChange","classNames","variant"]),{getPrefixCls:I,direction:j,allowClear:M,autoComplete:D,className:N,style:P,classNames:A,styles:F}=ga("input"),H=I("input",n),k=s.useRef(null),L=oa(H),[T,z,V]=pT(H,y),[q]=bT(H,L),{compactSize:G,compactItemClassnames:B}=Zo(H,j),U=la(Ce=>{var De;return(De=o??G)!==null&&De!==void 0?De:Ce}),K=Se.useContext(ja),Y=c??K,{status:Q,hasFeedback:Z,feedbackIcon:ae}=s.useContext(ia),re=Ps(Q,a),ie=Hq(e)||!!Z;s.useRef(ie);const ve=LT(k,!0),ue=Ce=>{ve(),u?.(Ce)},oe=Ce=>{ve(),f?.(Ce)},he=Ce=>{ve(),w?.(Ce)},fe=(Z||d)&&Se.createElement(Se.Fragment,null,d,Z&&ae),me=zT(h??M),[le,pe]=ks("input",E,r);return T(q(Se.createElement(Cq,Object.assign({ref:Ea(t,k),prefixCls:H,autoComplete:D},O,{disabled:Y,onBlur:ue,onFocus:oe,style:Object.assign(Object.assign({},P),x),styles:Object.assign(Object.assign({},F),C),suffix:fe,allowClear:me,className:se(b,y,V,L,B,N),onChange:he,addonBefore:g&&Se.createElement(Go,{form:!0,space:!0},g),addonAfter:v&&Se.createElement(Go,{form:!0,space:!0},v),classNames:Object.assign(Object.assign(Object.assign({},$),A),{input:se({[`${H}-sm`]:U==="small",[`${H}-lg`]:U==="large",[`${H}-rtl`]:j==="rtl"},$?.input,A.input,z),variant:se({[`${H}-${le}`]:pe},Hl(H,re)),affixWrapper:se({[`${H}-affix-wrapper-sm`]:U==="small",[`${H}-affix-wrapper-lg`]:U==="large",[`${H}-affix-wrapper-rtl`]:j==="rtl"},z),wrapper:se({[`${H}-group-rtl`]:j==="rtl"},z),groupWrapper:se({[`${H}-group-wrapper-sm`]:U==="small",[`${H}-group-wrapper-lg`]:U==="large",[`${H}-group-wrapper-rtl`]:j==="rtl",[`${H}-group-wrapper-${le}`]:pe},Hl(`${H}-group-wrapper`,re,Z),z)})}))))});var Fq={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M880 184H712v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H384v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H144c-17.7 0-32 14.3-32 32v664c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V216c0-17.7-14.3-32-32-32zm-40 656H184V460h656v380zM184 392V256h128v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h256v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h128v136H184z"}}]},name:"calendar",theme:"outlined"},Vq=function(t,n){return s.createElement($n,Me({},t,{ref:n,icon:Fq}))},HT=s.forwardRef(Vq),Kq={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M686.7 638.6L544.1 535.5V288c0-4.4-3.6-8-8-8H488c-4.4 0-8 3.6-8 8v275.4c0 2.6 1.2 5 3.3 6.5l165.4 120.6c3.6 2.6 8.6 1.8 11.2-1.7l28.6-39c2.6-3.7 1.8-8.7-1.8-11.2z"}}]},name:"clock-circle",theme:"outlined"},Uq=function(t,n){return s.createElement($n,Me({},t,{ref:n,icon:Kq}))},BT=s.forwardRef(Uq),Wq={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M873.1 596.2l-164-208A32 32 0 00684 376h-64.8c-6.7 0-10.4 7.7-6.3 13l144.3 183H152c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h695.9c26.8 0 41.7-30.8 25.2-51.8z"}}]},name:"swap-right",theme:"outlined"},qq=function(t,n){return s.createElement($n,Me({},t,{ref:n,icon:Wq}))},Yq=s.forwardRef(qq);function Gq(e,t,n){return n!==void 0?n:t==="year"&&e.lang.yearPlaceholder?e.lang.yearPlaceholder:t==="quarter"&&e.lang.quarterPlaceholder?e.lang.quarterPlaceholder:t==="month"&&e.lang.monthPlaceholder?e.lang.monthPlaceholder:t==="week"&&e.lang.weekPlaceholder?e.lang.weekPlaceholder:t==="time"&&e.timePickerLocale.placeholder?e.timePickerLocale.placeholder:e.lang.placeholder}function Xq(e,t,n){return n!==void 0?n:t==="year"&&e.lang.yearPlaceholder?e.lang.rangeYearPlaceholder:t==="quarter"&&e.lang.quarterPlaceholder?e.lang.rangeQuarterPlaceholder:t==="month"&&e.lang.monthPlaceholder?e.lang.rangeMonthPlaceholder:t==="week"&&e.lang.weekPlaceholder?e.lang.rangeWeekPlaceholder:t==="time"&&e.timePickerLocale.placeholder?e.timePickerLocale.rangePlaceholder:e.lang.rangePlaceholder}function FT(e,t){const{allowClear:n=!0}=e,{clearIcon:r,removeIcon:a}=YM(Object.assign(Object.assign({},e),{prefixCls:t,componentName:"DatePicker"}));return[s.useMemo(()=>n===!1?!1:Object.assign({clearIcon:r},n===!0?{}:n),[n,r]),a]}const[Qq,Zq]=["week","WeekPicker"],[Jq,eY]=["month","MonthPicker"],[tY,nY]=["year","YearPicker"],[rY,aY]=["quarter","QuarterPicker"],[Ox,eI]=["time","TimePicker"],iY=e=>s.createElement(dn,Object.assign({size:"small",type:"primary"},e));function VT(e){return s.useMemo(()=>Object.assign({button:iY},e),[e])}function KT(e,...t){const n=e||{};return t.reduce((r,a)=>(Object.keys(a||{}).forEach(o=>{const c=n[o],u=a[o];if(c&&typeof c=="object")if(u&&typeof u=="object")r[o]=KT(c,r[o],u);else{const{_default:f}=c;f&&(r[o]=r[o]||{},r[o][f]=se(r[o][f],u))}else r[o]=se(r[o],u)}),r),{})}function oY(e,...t){return s.useMemo(()=>KT.apply(void 0,[e].concat(t)),[t,e])}function lY(...e){return s.useMemo(()=>e.reduce((t,n={})=>(Object.keys(n).forEach(r=>{t[r]=Object.assign(Object.assign({},t[r]),n[r])}),t),{}),[e])}function Ix(e,t){const n=Object.assign({},e);return Object.keys(t).forEach(r=>{if(r!=="_default"){const a=t[r],o=n[r]||{};n[r]=a?Ix(o,a):o}}),n}function sY(e,t,n){const r=oY.apply(void 0,[n].concat(ke(e))),a=lY.apply(void 0,ke(t));return s.useMemo(()=>[Ix(r,n),Ix(a,n)],[r,a,n])}const UT=(e,t,n,r,a)=>{const{classNames:o,styles:c}=ga(e),[u,f]=sY([o,t],[c,n],{popup:{_default:"root"}});return s.useMemo(()=>{var d,h;const v=Object.assign(Object.assign({},u),{popup:Object.assign(Object.assign({},u.popup),{root:se((d=u.popup)===null||d===void 0?void 0:d.root,r)})}),g=Object.assign(Object.assign({},f),{popup:Object.assign(Object.assign({},f.popup),{root:Object.assign(Object.assign({},(h=f.popup)===null||h===void 0?void 0:h.root),a)})});return[v,g]},[u,f,r,a])};var cY=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,r=Object.getOwnPropertySymbols(e);as.forwardRef((n,r)=>{var a;const{prefixCls:o,getPopupContainer:c,components:u,className:f,style:d,placement:h,size:v,disabled:g,bordered:b=!0,placeholder:x,popupStyle:C,popupClassName:y,dropdownClassName:w,status:$,rootClassName:E,variant:O,picker:I,styles:j,classNames:M}=n,D=cY(n,["prefixCls","getPopupContainer","components","className","style","placement","size","disabled","bordered","placeholder","popupStyle","popupClassName","dropdownClassName","status","rootClassName","variant","picker","styles","classNames"]),N=I===Ox?"timePicker":"datePicker",P=s.useRef(null),{getPrefixCls:A,direction:F,getPopupContainer:H,rangePicker:k}=s.useContext(Wt),L=A("picker",o),{compactSize:T,compactItemClassnames:z}=Zo(L,F),V=A(),[q,G]=ks("rangePicker",O,b),B=oa(L),[U,K,Y]=yT(L,B),[Q,Z]=UT(N,M,j,y||w,C),[ae]=FT(n,L),re=VT(u),ie=la(je=>{var ge;return(ge=v??T)!==null&&ge!==void 0?ge:je}),ve=s.useContext(ja),ue=g??ve,oe=s.useContext(ia),{hasFeedback:he,status:fe,feedbackIcon:me}=oe,le=s.createElement(s.Fragment,null,I===Ox?s.createElement(BT,null):s.createElement(HT,null),he&&me);s.useImperativeHandle(r,()=>P.current);const[pe]=ho("Calendar",fv),Ce=Object.assign(Object.assign({},pe),n.locale),[De]=du("DatePicker",(a=Z.popup.root)===null||a===void 0?void 0:a.zIndex);return U(s.createElement(Go,{space:!0},s.createElement(tU,Object.assign({separator:s.createElement("span",{"aria-label":"to",className:`${L}-separator`},s.createElement(Yq,null)),disabled:ue,ref:P,placement:h,placeholder:Xq(Ce,I,x),suffixIcon:le,prevIcon:s.createElement("span",{className:`${L}-prev-icon`}),nextIcon:s.createElement("span",{className:`${L}-next-icon`}),superPrevIcon:s.createElement("span",{className:`${L}-super-prev-icon`}),superNextIcon:s.createElement("span",{className:`${L}-super-next-icon`}),transitionName:`${V}-slide-up`,picker:I},D,{className:se({[`${L}-${ie}`]:ie,[`${L}-${q}`]:G},Hl(L,Ps(fe,$),he),K,z,f,k?.className,Y,B,E,Q.root),style:Object.assign(Object.assign(Object.assign({},k?.style),d),Z.root),locale:Ce.lang,prefixCls:L,getPopupContainer:c||H,generateConfig:e,components:re,direction:F,classNames:{popup:se(K,Y,B,E,Q.popup.root)},styles:{popup:Object.assign(Object.assign({},Z.popup.root),{zIndex:De})},allowClear:ae}))))});var dY=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,r=Object.getOwnPropertySymbols(e);a{const t=(f,d)=>{const h=d===eI?"timePicker":"datePicker";return s.forwardRef((g,b)=>{var x;const{prefixCls:C,getPopupContainer:y,components:w,style:$,className:E,rootClassName:O,size:I,bordered:j,placement:M,placeholder:D,popupStyle:N,popupClassName:P,dropdownClassName:A,disabled:F,status:H,variant:k,onCalendarChange:L,styles:T,classNames:z}=g,V=dY(g,["prefixCls","getPopupContainer","components","style","className","rootClassName","size","bordered","placement","placeholder","popupStyle","popupClassName","dropdownClassName","disabled","status","variant","onCalendarChange","styles","classNames"]),{getPrefixCls:q,direction:G,getPopupContainer:B,[h]:U}=s.useContext(Wt),K=q("picker",C),{compactSize:Y,compactItemClassnames:Q}=Zo(K,G),Z=s.useRef(null),[ae,re]=ks("datePicker",k,j),ie=oa(K),[ve,ue,oe]=yT(K,ie);s.useImperativeHandle(b,()=>Z.current);const he={showToday:!0},fe=f||g.picker,me=q(),{onSelect:le,multiple:pe}=V,Ce=le&&f==="time"&&!pe,De=(be,ye,Re)=>{L?.(be,ye,Re),Ce&&le(be)},[je,ge]=UT(h,z,T,P||A,N),[Ie,Ee]=FT(g,K),we=VT(w),Fe=la(be=>{var ye;return(ye=I??Y)!==null&&ye!==void 0?ye:be}),He=s.useContext(ja),it=F??He,Ze=s.useContext(ia),{hasFeedback:Ye,status:et,feedbackIcon:Pe}=Ze,Oe=s.createElement(s.Fragment,null,fe==="time"?s.createElement(BT,null):s.createElement(HT,null),Ye&&Pe),[Be]=ho("DatePicker",fv),$e=Object.assign(Object.assign({},Be),g.locale),[Te]=du("DatePicker",(x=ge.popup.root)===null||x===void 0?void 0:x.zIndex);return ve(s.createElement(Go,{space:!0},s.createElement(lU,Object.assign({ref:Z,placeholder:Gq($e,fe,D),suffixIcon:Oe,placement:M,prevIcon:s.createElement("span",{className:`${K}-prev-icon`}),nextIcon:s.createElement("span",{className:`${K}-next-icon`}),superPrevIcon:s.createElement("span",{className:`${K}-super-prev-icon`}),superNextIcon:s.createElement("span",{className:`${K}-super-next-icon`}),transitionName:`${me}-slide-up`,picker:f,onCalendarChange:De},he,V,{locale:$e.lang,className:se({[`${K}-${Fe}`]:Fe,[`${K}-${ae}`]:re},Hl(K,Ps(et,H),Ye),ue,Q,U?.className,E,oe,ie,O,je.root),style:Object.assign(Object.assign(Object.assign({},U?.style),$),ge.root),prefixCls:K,getPopupContainer:y||B,generateConfig:e,components:we,direction:G,disabled:it,classNames:{popup:se(ue,oe,ie,O,je.popup.root)},styles:{popup:Object.assign(Object.assign({},ge.popup.root),{zIndex:Te})},allowClear:Ie,removeIcon:Ee}))))})},n=t(),r=t(Qq,Zq),a=t(Jq,eY),o=t(tY,nY),c=t(rY,aY),u=t(Ox,eI);return{DatePicker:n,WeekPicker:r,MonthPicker:a,YearPicker:o,TimePicker:u,QuarterPicker:c}},WT=e=>{const{DatePicker:t,WeekPicker:n,MonthPicker:r,YearPicker:a,TimePicker:o,QuarterPicker:c}=fY(e),u=uY(e),f=t;return f.WeekPicker=n,f.MonthPicker=r,f.YearPicker=a,f.RangePicker=u,f.TimePicker=o,f.QuarterPicker=c,f},Fs=WT(cK),mY=lg(Fs,"popupAlign",void 0,"picker");Fs._InternalPanelDoNotUseOrYouWillBeFired=mY;const hY=lg(Fs.RangePicker,"popupAlign",void 0,"picker");Fs._InternalRangePanelDoNotUseOrYouWillBeFired=hY;Fs.generatePicker=WT;function tI(e){return["small","middle","large"].includes(e)}function nI(e){return e?typeof e=="number"&&!Number.isNaN(e):!1}const qT=Se.createContext({latestIndex:0}),vY=qT.Provider,gY=({className:e,index:t,children:n,split:r,style:a})=>{const{latestIndex:o}=s.useContext(qT);return n==null?null:s.createElement(s.Fragment,null,s.createElement("div",{className:e,style:a},n),t{var n;const{getPrefixCls:r,direction:a,size:o,className:c,style:u,classNames:f,styles:d}=ga("space"),{size:h=o??"small",align:v,className:g,rootClassName:b,children:x,direction:C="horizontal",prefixCls:y,split:w,style:$,wrap:E=!1,classNames:O,styles:I}=e,j=pY(e,["size","align","className","rootClassName","children","direction","prefixCls","split","style","wrap","classNames","styles"]),[M,D]=Array.isArray(h)?h:[h,h],N=tI(D),P=tI(M),A=nI(D),F=nI(M),H=Ma(x,{keepEmpty:!0}),k=v===void 0&&C==="horizontal"?"center":v,L=r("space",y),[T,z,V]=iM(L),q=se(L,c,z,`${L}-${C}`,{[`${L}-rtl`]:a==="rtl",[`${L}-align-${k}`]:k,[`${L}-gap-row-${D}`]:N,[`${L}-gap-col-${M}`]:P},g,b,V),G=se(`${L}-item`,(n=O?.item)!==null&&n!==void 0?n:f.item);let B=0;const U=H.map((Q,Z)=>{var ae;Q!=null&&(B=Z);const re=Q?.key||`${G}-${Z}`;return s.createElement(gY,{className:G,key:re,index:Z,split:w,style:(ae=I?.item)!==null&&ae!==void 0?ae:d.item},Q)}),K=s.useMemo(()=>({latestIndex:B}),[B]);if(H.length===0)return null;const Y={};return E&&(Y.flexWrap="wrap"),!P&&F&&(Y.columnGap=M),!N&&A&&(Y.rowGap=D),T(s.createElement("div",Object.assign({ref:t,className:q,style:Object.assign(Object.assign(Object.assign({},Y),u),$)},j),s.createElement(vY,{value:K},U)))}),Tn=bY;Tn.Compact=V8;var yY=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,r=Object.getOwnPropertySymbols(e);a{const{getPopupContainer:t,getPrefixCls:n,direction:r}=s.useContext(Wt),{prefixCls:a,type:o="default",danger:c,disabled:u,loading:f,onClick:d,htmlType:h,children:v,className:g,menu:b,arrow:x,autoFocus:C,overlay:y,trigger:w,align:$,open:E,onOpenChange:O,placement:I,getPopupContainer:j,href:M,icon:D=s.createElement(aC,null),title:N,buttonsRender:P=ue=>ue,mouseEnterDelay:A,mouseLeaveDelay:F,overlayClassName:H,overlayStyle:k,destroyOnHidden:L,destroyPopupOnHide:T,dropdownRender:z,popupRender:V}=e,q=yY(e,["prefixCls","type","danger","disabled","loading","onClick","htmlType","children","className","menu","arrow","autoFocus","overlay","trigger","align","open","onOpenChange","placement","getPopupContainer","href","icon","title","buttonsRender","mouseEnterDelay","mouseLeaveDelay","overlayClassName","overlayStyle","destroyOnHidden","destroyPopupOnHide","dropdownRender","popupRender"]),G=n("dropdown",a),B=`${G}-button`,K={menu:b,arrow:x,autoFocus:C,align:$,disabled:u,trigger:u?[]:w,onOpenChange:O,getPopupContainer:j||t,mouseEnterDelay:A,mouseLeaveDelay:F,overlayClassName:H,overlayStyle:k,destroyOnHidden:L,popupRender:V||z},{compactSize:Y,compactItemClassnames:Q}=Zo(G,r),Z=se(B,Q,g);"destroyPopupOnHide"in e&&(K.destroyPopupOnHide=T),"overlay"in e&&(K.overlay=y),"open"in e&&(K.open=E),"placement"in e?K.placement=I:K.placement=r==="rtl"?"bottomLeft":"bottomRight";const ae=s.createElement(dn,{type:o,danger:c,disabled:u,loading:f,onClick:d,htmlType:h,href:M,title:N},v),re=s.createElement(dn,{type:o,danger:c,icon:D}),[ie,ve]=P([ae,re]);return s.createElement(Tn.Compact,Object.assign({className:Z,size:Y,block:!0},q),ie,s.createElement(vg,Object.assign({},K),ve))};YT.__ANT_BUTTON=!0;const _C=vg;_C.Button=YT;function xY(e){return e==null?null:typeof e=="object"&&!s.isValidElement(e)?e:{title:e}}function Ev(e){const[t,n]=s.useState(e);return s.useEffect(()=>{const r=setTimeout(()=>{n(e)},e.length?0:10);return()=>{clearTimeout(r)}},[e]),t}const SY=e=>{const{componentCls:t}=e,n=`${t}-show-help`,r=`${t}-show-help-item`;return{[n]:{transition:`opacity ${e.motionDurationFast} ${e.motionEaseInOut}`,"&-appear, &-enter":{opacity:0,"&-active":{opacity:1}},"&-leave":{opacity:1,"&-active":{opacity:0}},[r]:{overflow:"hidden",transition:`height ${e.motionDurationFast} ${e.motionEaseInOut}, + opacity ${e.motionDurationFast} ${e.motionEaseInOut}, + transform ${e.motionDurationFast} ${e.motionEaseInOut} !important`,[`&${r}-appear, &${r}-enter`]:{transform:"translateY(-5px)",opacity:0,"&-active":{transform:"translateY(0)",opacity:1}},[`&${r}-leave-active`]:{transform:"translateY(-5px)"}}}}},CY=e=>({legend:{display:"block",width:"100%",marginBottom:e.marginLG,padding:0,color:e.colorTextDescription,fontSize:e.fontSizeLG,lineHeight:"inherit",border:0,borderBottom:`${te(e.lineWidth)} ${e.lineType} ${e.colorBorder}`},'input[type="search"]':{boxSizing:"border-box"},'input[type="radio"], input[type="checkbox"]':{lineHeight:"normal"},'input[type="file"]':{display:"block"},'input[type="range"]':{display:"block",width:"100%"},"select[multiple], select[size]":{height:"auto"},"input[type='file']:focus,\n input[type='radio']:focus,\n input[type='checkbox']:focus":{outline:0,boxShadow:`0 0 0 ${te(e.controlOutlineWidth)} ${e.controlOutline}`},output:{display:"block",paddingTop:15,color:e.colorText,fontSize:e.fontSize,lineHeight:e.lineHeight}}),rI=(e,t)=>{const{formItemCls:n}=e;return{[n]:{[`${n}-label > label`]:{height:t},[`${n}-control-input`]:{minHeight:t}}}},wY=e=>{const{componentCls:t}=e;return{[e.componentCls]:Object.assign(Object.assign(Object.assign({},zn(e)),CY(e)),{[`${t}-text`]:{display:"inline-block",paddingInlineEnd:e.paddingSM},"&-small":Object.assign({},rI(e,e.controlHeightSM)),"&-large":Object.assign({},rI(e,e.controlHeightLG))})}},$Y=e=>{const{formItemCls:t,iconCls:n,rootPrefixCls:r,antCls:a,labelRequiredMarkColor:o,labelColor:c,labelFontSize:u,labelHeight:f,labelColonMarginInlineStart:d,labelColonMarginInlineEnd:h,itemMarginBottom:v}=e;return{[t]:Object.assign(Object.assign({},zn(e)),{marginBottom:v,verticalAlign:"top","&-with-help":{transition:"none"},[`&-hidden, + &-hidden${a}-row`]:{display:"none"},"&-has-warning":{[`${t}-split`]:{color:e.colorError}},"&-has-error":{[`${t}-split`]:{color:e.colorWarning}},[`${t}-label`]:{flexGrow:0,overflow:"hidden",whiteSpace:"nowrap",textAlign:"end",verticalAlign:"middle","&-left":{textAlign:"start"},"&-wrap":{overflow:"unset",lineHeight:e.lineHeight,whiteSpace:"unset","> label":{verticalAlign:"middle",textWrap:"balance"}},"> label":{position:"relative",display:"inline-flex",alignItems:"center",maxWidth:"100%",height:f,color:c,fontSize:u,[`> ${n}`]:{fontSize:e.fontSize,verticalAlign:"top"},[`&${t}-required`]:{"&::before":{display:"inline-block",marginInlineEnd:e.marginXXS,color:o,fontSize:e.fontSize,fontFamily:"SimSun, sans-serif",lineHeight:1,content:'"*"'},[`&${t}-required-mark-hidden, &${t}-required-mark-optional`]:{"&::before":{display:"none"}}},[`${t}-optional`]:{display:"inline-block",marginInlineStart:e.marginXXS,color:e.colorTextDescription,[`&${t}-required-mark-hidden`]:{display:"none"}},[`${t}-tooltip`]:{color:e.colorTextDescription,cursor:"help",writingMode:"horizontal-tb",marginInlineStart:e.marginXXS},"&::after":{content:'":"',position:"relative",marginBlock:0,marginInlineStart:d,marginInlineEnd:h},[`&${t}-no-colon::after`]:{content:'"\\a0"'}}},[`${t}-control`]:{"--ant-display":"flex",flexDirection:"column",flexGrow:1,[`&:first-child:not([class^="'${r}-col-'"]):not([class*="' ${r}-col-'"])`]:{width:"100%"},"&-input":{position:"relative",display:"flex",alignItems:"center",minHeight:e.controlHeight,"&-content":{flex:"auto",maxWidth:"100%",[`&:has(> ${a}-switch:only-child, > ${a}-rate:only-child)`]:{display:"flex",alignItems:"center"}}}},[t]:{"&-additional":{display:"flex",flexDirection:"column"},"&-explain, &-extra":{clear:"both",color:e.colorTextDescription,fontSize:e.fontSize,lineHeight:e.lineHeight},"&-explain-connected":{width:"100%"},"&-extra":{minHeight:e.controlHeightSM,transition:`color ${e.motionDurationMid} ${e.motionEaseOut}`},"&-explain":{"&-error":{color:e.colorError},"&-warning":{color:e.colorWarning}}},[`&-with-help ${t}-explain`]:{height:"auto",opacity:1},[`${t}-feedback-icon`]:{fontSize:e.fontSize,textAlign:"center",visibility:"visible",animationName:jS,animationDuration:e.motionDurationMid,animationTimingFunction:e.motionEaseOutBack,pointerEvents:"none","&-success":{color:e.colorSuccess},"&-error":{color:e.colorError},"&-warning":{color:e.colorWarning},"&-validating":{color:e.colorPrimary}}})}},bs=e=>({padding:e.verticalLabelPadding,margin:e.verticalLabelMargin,whiteSpace:"initial",textAlign:"start","> label":{margin:0,"&::after":{visibility:"hidden"}}}),EY=e=>{const{antCls:t,formItemCls:n}=e;return{[`${n}-horizontal`]:{[`${n}-label`]:{flexGrow:0},[`${n}-control`]:{flex:"1 1 0",minWidth:0},[`${n}-label[class$='-24'], ${n}-label[class*='-24 ']`]:{[`& + ${n}-control`]:{minWidth:"unset"}},[`${t}-col-24${n}-label, + ${t}-col-xl-24${n}-label`]:bs(e)}}},_Y=e=>{const{componentCls:t,formItemCls:n,inlineItemMarginBottom:r}=e;return{[`${t}-inline`]:{display:"flex",flexWrap:"wrap",[`${n}-inline`]:{flex:"none",marginInlineEnd:e.margin,marginBottom:r,"&-row":{flexWrap:"nowrap"},[`> ${n}-label, + > ${n}-control`]:{display:"inline-block",verticalAlign:"top"},[`> ${n}-label`]:{flex:"none"},[`${t}-text`]:{display:"inline-block"},[`${n}-has-feedback`]:{display:"inline-block"}}}}},OY=e=>{const{componentCls:t,formItemCls:n,rootPrefixCls:r}=e;return{[`${n} ${n}-label`]:bs(e),[`${t}:not(${t}-inline)`]:{[n]:{flexWrap:"wrap",[`${n}-label, ${n}-control`]:{[`&:not([class*=" ${r}-col-xs"])`]:{flex:"0 0 100%",maxWidth:"100%"}}}}}},IY=e=>{const{componentCls:t,formItemCls:n,antCls:r}=e;return{[`${n}-vertical`]:{[`${n}-row`]:{flexDirection:"column"},[`${n}-label > label`]:{height:"auto"},[`${n}-control`]:{width:"100%"},[`${n}-label, + ${r}-col-24${n}-label, + ${r}-col-xl-24${n}-label`]:bs(e)},[`@media (max-width: ${te(e.screenXSMax)})`]:[OY(e),{[t]:{[`${n}:not(${n}-horizontal)`]:{[`${r}-col-xs-24${n}-label`]:bs(e)}}}],[`@media (max-width: ${te(e.screenSMMax)})`]:{[t]:{[`${n}:not(${n}-horizontal)`]:{[`${r}-col-sm-24${n}-label`]:bs(e)}}},[`@media (max-width: ${te(e.screenMDMax)})`]:{[t]:{[`${n}:not(${n}-horizontal)`]:{[`${r}-col-md-24${n}-label`]:bs(e)}}},[`@media (max-width: ${te(e.screenLGMax)})`]:{[t]:{[`${n}:not(${n}-horizontal)`]:{[`${r}-col-lg-24${n}-label`]:bs(e)}}}}},RY=e=>({labelRequiredMarkColor:e.colorError,labelColor:e.colorTextHeading,labelFontSize:e.fontSize,labelHeight:e.controlHeight,labelColonMarginInlineStart:e.marginXXS/2,labelColonMarginInlineEnd:e.marginXS,itemMarginBottom:e.marginLG,verticalLabelPadding:`0 0 ${e.paddingXS}px`,verticalLabelMargin:0,inlineItemMarginBottom:0}),GT=(e,t)=>xn(e,{formItemCls:`${e.componentCls}-item`,rootPrefixCls:t}),OC=Kn("Form",(e,{rootPrefixCls:t})=>{const n=GT(e,t);return[wY(n),$Y(n),SY(n),EY(n),_Y(n),IY(n),qv(n),jS]},RY,{order:-1e3}),aI=[];function Ay(e,t,n,r=0){return{key:typeof e=="string"?e:`${t}-${r}`,error:e,errorStatus:n}}const XT=({help:e,helpStatus:t,errors:n=aI,warnings:r=aI,className:a,fieldId:o,onVisibleChanged:c})=>{const{prefixCls:u}=s.useContext(LS),f=`${u}-item-explain`,d=oa(u),[h,v,g]=OC(u,d),b=s.useMemo(()=>ff(u),[u]),x=Ev(n),C=Ev(r),y=s.useMemo(()=>e!=null?[Ay(e,"help",t)]:[].concat(ke(x.map((E,O)=>Ay(E,"error","error",O))),ke(C.map((E,O)=>Ay(E,"warning","warning",O)))),[e,t,x,C]),w=s.useMemo(()=>{const E={};return y.forEach(({key:O})=>{E[O]=(E[O]||0)+1}),y.map((O,I)=>Object.assign(Object.assign({},O),{key:E[O.key]>1?`${O.key}-fallback-${I}`:O.key}))},[y]),$={};return o&&($.id=`${o}_help`),h(s.createElement(Oi,{motionDeadline:b.motionDeadline,motionName:`${u}-show-help`,visible:!!w.length,onVisibleChanged:c},E=>{const{className:O,style:I}=E;return s.createElement("div",Object.assign({},$,{className:se(f,O,g,d,a,v),style:I}),s.createElement(ES,Object.assign({keys:w},ff(u),{motionName:`${u}-show-help-item`,component:!1}),j=>{const{key:M,error:D,errorStatus:N,className:P,style:A}=j;return s.createElement("div",{key:M,className:se(P,{[`${f}-${N}`]:N}),style:A},D)}))}))};var NY=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,r=Object.getOwnPropertySymbols(e);a{const n=s.useContext(ja),{getPrefixCls:r,direction:a,requiredMark:o,colon:c,scrollToFirstError:u,className:f,style:d}=ga("form"),{prefixCls:h,className:v,rootClassName:g,size:b,disabled:x=n,form:C,colon:y,labelAlign:w,labelWrap:$,labelCol:E,wrapperCol:O,hideRequiredMark:I,layout:j="horizontal",scrollToFirstError:M,requiredMark:D,onFinishFailed:N,name:P,style:A,feedbackIcons:F,variant:H}=e,k=NY(e,["prefixCls","className","rootClassName","size","disabled","form","colon","labelAlign","labelWrap","labelCol","wrapperCol","hideRequiredMark","layout","scrollToFirstError","requiredMark","onFinishFailed","name","style","feedbackIcons","variant"]),L=la(b),T=s.useContext(dN),z=s.useMemo(()=>D!==void 0?D:I?!1:o!==void 0?o:!0,[I,D,o]),V=y??c,q=r("form",h),G=oa(q),[B,U,K]=OC(q,G),Y=se(q,`${q}-${j}`,{[`${q}-hide-required-mark`]:z===!1,[`${q}-rtl`]:a==="rtl",[`${q}-${L}`]:L},K,G,U,f,v,g),[Q]=uT(C),{__INTERNAL__:Z}=Q;Z.name=P;const ae=s.useMemo(()=>({name:P,labelAlign:w,labelCol:E,labelWrap:$,wrapperCol:O,layout:j,colon:V,requiredMark:z,itemRef:Z.itemRef,form:Q,feedbackIcons:F}),[P,w,E,O,j,V,z,Q,F]),re=s.useRef(null);s.useImperativeHandle(t,()=>{var ue;return Object.assign(Object.assign({},Q),{nativeElement:(ue=re.current)===null||ue===void 0?void 0:ue.nativeElement})});const ie=(ue,oe)=>{if(ue){let he={block:"nearest"};typeof ue=="object"&&(he=Object.assign(Object.assign({},he),ue)),Q.scrollToField(oe,he)}},ve=ue=>{if(N?.(ue),ue.errorFields.length){const oe=ue.errorFields[0].name;if(M!==void 0){ie(M,oe);return}u!==void 0&&ie(u,oe)}};return B(s.createElement(_M.Provider,{value:H},s.createElement(xN,{disabled:x},s.createElement(Is.Provider,{value:L},s.createElement($M,{validateMessages:T},s.createElement(Yo.Provider,{value:ae},s.createElement(EM,{status:!0},s.createElement(mu,Object.assign({id:P},k,{name:P,onFinishFailed:ve,form:Q,ref:re,style:Object.assign(Object.assign({},d),A),className:Y})))))))))},jY=s.forwardRef(MY);function TY(e){if(typeof e=="function")return e;const t=Ma(e);return t.length<=1?t[0]:t}const QT=()=>{const{status:e,errors:t=[],warnings:n=[]}=s.useContext(ia);return{status:e,errors:t,warnings:n}};QT.Context=ia;function DY(e){const[t,n]=s.useState(e),r=s.useRef(null),a=s.useRef([]),o=s.useRef(!1);s.useEffect(()=>(o.current=!1,()=>{o.current=!0,hn.cancel(r.current),r.current=null}),[]);function c(u){o.current||(r.current===null&&(a.current=[],r.current=hn(()=>{r.current=null,n(f=>{let d=f;return a.current.forEach(h=>{d=h(d)}),d})})),a.current.push(u))}return[t,c]}function PY(){const{itemRef:e}=s.useContext(Yo),t=s.useRef({});function n(r,a){const o=a&&typeof a=="object"&&Vl(a),c=r.join("_");return(t.current.name!==c||t.current.originRef!==o)&&(t.current.name=c,t.current.originRef=o,t.current.ref=Ea(e(r),o)),t.current.ref}return n}const kY=e=>{const{formItemCls:t}=e;return{"@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none)":{[`${t}-control`]:{display:"flex"}}}},AY=Nf(["Form","item-item"],(e,{rootPrefixCls:t})=>{const n=GT(e,t);return kY(n)});var zY=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,r=Object.getOwnPropertySymbols(e);a{const{prefixCls:t,status:n,labelCol:r,wrapperCol:a,children:o,errors:c,warnings:u,_internalItemRender:f,extra:d,help:h,fieldId:v,marginBottom:g,onErrorVisibleChanged:b,label:x}=e,C=`${t}-item`,y=s.useContext(Yo),w=s.useMemo(()=>{let k=Object.assign({},a||y.wrapperCol||{});return x===null&&!r&&!a&&y.labelCol&&[void 0,"xs","sm","md","lg","xl","xxl"].forEach(T=>{const z=T?[T]:[],V=Aa(y.labelCol,z),q=typeof V=="object"?V:{},G=Aa(k,z),B=typeof G=="object"?G:{};"span"in q&&!("offset"in B)&&q.span{const{labelCol:k,wrapperCol:L}=y;return zY(y,["labelCol","wrapperCol"])},[y]),O=s.useRef(null),[I,j]=s.useState(0);fn(()=>{d&&O.current?j(O.current.clientHeight):j(0)},[d]);const M=s.createElement("div",{className:`${C}-control-input`},s.createElement("div",{className:`${C}-control-input-content`},o)),D=s.useMemo(()=>({prefixCls:t,status:n}),[t,n]),N=g!==null||c.length||u.length?s.createElement(LS.Provider,{value:D},s.createElement(XT,{fieldId:v,errors:c,warnings:u,help:h,helpStatus:n,className:`${C}-explain-connected`,onVisibleChanged:b})):null,P={};v&&(P.id=`${v}_extra`);const A=d?s.createElement("div",Object.assign({},P,{className:`${C}-extra`,ref:O}),d):null,F=N||A?s.createElement("div",{className:`${C}-additional`,style:g?{minHeight:g+I}:{}},N,A):null,H=f&&f.mark==="pro_table_render"&&f.render?f.render(e,{input:M,errorList:N,extra:A}):s.createElement(s.Fragment,null,M,F);return s.createElement(Yo.Provider,{value:E},s.createElement(xC,Object.assign({},w,{className:$}),H),s.createElement(AY,{prefixCls:t}))};var BY={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M623.6 316.7C593.6 290.4 554 276 512 276s-81.6 14.5-111.6 40.7C369.2 344 352 380.7 352 420v7.6c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V420c0-44.1 43.1-80 96-80s96 35.9 96 80c0 31.1-22 59.6-56.1 72.7-21.2 8.1-39.2 22.3-52.1 40.9-13.1 19-19.9 41.8-19.9 64.9V620c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8v-22.7a48.3 48.3 0 0130.9-44.8c59-22.7 97.1-74.7 97.1-132.5.1-39.3-17.1-76-48.3-103.3zM472 732a40 40 0 1080 0 40 40 0 10-80 0z"}}]},name:"question-circle",theme:"outlined"},FY=function(t,n){return s.createElement($n,Me({},t,{ref:n,icon:BY}))},VY=s.forwardRef(FY),KY=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,r=Object.getOwnPropertySymbols(e);a{var h;const[v]=ho("Form"),{labelAlign:g,labelCol:b,labelWrap:x,colon:C}=s.useContext(Yo);if(!t)return null;const y=r||b||{},w=a||g,$=`${e}-item-label`,E=se($,w==="left"&&`${$}-left`,y.className,{[`${$}-wrap`]:!!x});let O=t;const I=o===!0||C!==!1&&o!==!1;I&&!d&&typeof t=="string"&&t.trim()&&(O=t.replace(/[:|:]\s*$/,""));const M=xY(f);if(M){const{icon:H=s.createElement(VY,null)}=M,k=KY(M,["icon"]),L=s.createElement(Ei,Object.assign({},k),s.cloneElement(H,{className:`${e}-item-tooltip`,title:"",onClick:T=>{T.preventDefault()},tabIndex:null}));O=s.createElement(s.Fragment,null,O,L)}const D=u==="optional",N=typeof u=="function",P=u===!1;N?O=u(O,{required:!!c}):D&&!c&&(O=s.createElement(s.Fragment,null,O,s.createElement("span",{className:`${e}-item-optional`,title:""},v?.optional||((h=lo.Form)===null||h===void 0?void 0:h.optional))));let A;P?A="hidden":(D||N)&&(A="optional");const F=se({[`${e}-item-required`]:c,[`${e}-item-required-mark-${A}`]:A,[`${e}-item-no-colon`]:!I});return s.createElement(xC,Object.assign({},y,{className:E}),s.createElement("label",{htmlFor:n,className:F,title:typeof t=="string"?t:""},O))},WY={success:Vv,warning:_S,error:cu,validating:qo};function ZT({children:e,errors:t,warnings:n,hasFeedback:r,validateStatus:a,prefixCls:o,meta:c,noStyle:u,name:f}){const d=`${o}-item`,{feedbackIcons:h}=s.useContext(Yo),v=cT(t,n,c,null,!!r,a),{isFormItemInput:g,status:b,hasFeedback:x,feedbackIcon:C,name:y}=s.useContext(ia),w=s.useMemo(()=>{var $;let E;if(r){const I=r!==!0&&r.icons||h,j=v&&(($=I?.({status:v,errors:t,warnings:n}))===null||$===void 0?void 0:$[v]),M=v?WY[v]:null;E=j!==!1&&M?s.createElement("span",{className:se(`${d}-feedback-icon`,`${d}-feedback-icon-${v}`)},j||s.createElement(M,null)):null}const O={status:v||"",errors:t,warnings:n,hasFeedback:!!r,feedbackIcon:E,isFormItemInput:!0,name:f};return u&&(O.status=(v??b)||"",O.isFormItemInput=g,O.hasFeedback=!!(r??x),O.feedbackIcon=r!==void 0?O.feedbackIcon:C,O.name=f??y),O},[v,r,u,g,b]);return s.createElement(ia.Provider,{value:w},e)}var qY=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,r=Object.getOwnPropertySymbols(e);a{if(H&&N.current){const B=getComputedStyle(N.current);T(Number.parseInt(B.marginBottom,10))}},[H,k]);const z=B=>{B||T(null)},q=((B=!1)=>{const U=B?P:d.errors,K=B?A:d.warnings;return cT(U,K,d,"",!!h,f)})(),G=se(O,n,r,{[`${O}-with-help`]:F||P.length||A.length,[`${O}-has-feedback`]:q&&h,[`${O}-has-success`]:q==="success",[`${O}-has-warning`]:q==="warning",[`${O}-has-error`]:q==="error",[`${O}-is-validating`]:q==="validating",[`${O}-hidden`]:v,[`${O}-${M}`]:M});return s.createElement("div",{className:G,style:a,ref:N},s.createElement(DT,Object.assign({className:`${O}-row`},lr(E,["_internalItemRender","colon","dependencies","extra","fieldKey","getValueFromEvent","getValueProps","htmlFor","id","initialValue","isListField","label","labelAlign","labelCol","labelWrap","messageVariables","name","normalize","noStyle","preserve","requiredMark","rules","shouldUpdate","trigger","tooltip","validateFirst","validateTrigger","valuePropName","wrapperCol","validateDebounce"])),s.createElement(UY,Object.assign({htmlFor:b},e,{requiredMark:I,required:x??C,prefixCls:t,vertical:D})),s.createElement(HY,Object.assign({},e,d,{errors:P,warnings:A,prefixCls:t,status:q,help:o,marginBottom:L,onErrorVisibleChanged:z}),s.createElement(wM.Provider,{value:y},s.createElement(ZT,{prefixCls:t,meta:d,errors:d.errors,warnings:d.warnings,hasFeedback:h,validateStatus:q,name:$},g)))),!!L&&s.createElement("div",{className:`${O}-margin-offset`,style:{marginBottom:-L}}))}const GY="__SPLIT__";function XY(e,t){const n=Object.keys(e),r=Object.keys(t);return n.length===r.length&&n.every(a=>{const o=e[a],c=t[a];return o===c||typeof o=="function"||typeof c=="function"})}const QY=s.memo(({children:e})=>e,(e,t)=>XY(e.control,t.control)&&e.update===t.update&&e.childProps.length===t.childProps.length&&e.childProps.every((n,r)=>n===t.childProps[r]));function iI(){return{errors:[],warnings:[],touched:!1,validating:!1,name:[],validated:!1}}function ZY(e){const{name:t,noStyle:n,className:r,dependencies:a,prefixCls:o,shouldUpdate:c,rules:u,children:f,required:d,label:h,messageVariables:v,trigger:g="onChange",validateTrigger:b,hidden:x,help:C,layout:y}=e,{getPrefixCls:w}=s.useContext(Wt),{name:$}=s.useContext(Yo),E=TY(f),O=typeof E=="function",I=s.useContext(wM),{validateTrigger:j}=s.useContext(Ns),M=b!==void 0?b:j,D=t!=null,N=w("form",o),P=oa(N),[A,F,H]=OC(N,P);Kl();const k=s.useContext(vf),L=s.useRef(null),[T,z]=DY({}),[V,q]=ru(()=>iI()),G=ae=>{const re=k?.getKey(ae.name);if(q(ae.destroy?iI():ae,!0),n&&C!==!1&&I){let ie=ae.name;if(ae.destroy)ie=L.current||ie;else if(re!==void 0){const[ve,ue]=re;ie=[ve].concat(ke(ue)),L.current=ie}I(ae,ie)}},B=(ae,re)=>{z(ie=>{const ve=Object.assign({},ie),oe=[].concat(ke(ae.name.slice(0,-1)),ke(re)).join(GY);return ae.destroy?delete ve[oe]:ve[oe]=ae,ve})},[U,K]=s.useMemo(()=>{const ae=ke(V.errors),re=ke(V.warnings);return Object.values(T).forEach(ie=>{ae.push.apply(ae,ke(ie.errors||[])),re.push.apply(re,ke(ie.warnings||[]))}),[ae,re]},[T,V.errors,V.warnings]),Y=PY();function Q(ae,re,ie){return n&&!x?s.createElement(ZT,{prefixCls:N,hasFeedback:e.hasFeedback,validateStatus:e.validateStatus,meta:V,errors:U,warnings:K,noStyle:!0,name:t},ae):s.createElement(YY,Object.assign({key:"row"},e,{className:se(r,H,P,F),prefixCls:N,fieldId:re,isRequired:ie,errors:U,warnings:K,meta:V,onSubItemMetaChange:B,layout:y,name:t}),ae)}if(!D&&!O&&!a)return A(Q(E));let Z={};return typeof h=="string"?Z.label=h:t&&(Z.label=String(t)),v&&(Z=Object.assign(Object.assign({},Z),v)),A(s.createElement(AS,Object.assign({},e,{messageVariables:Z,trigger:g,validateTrigger:M,onMetaChange:G}),(ae,re,ie)=>{const ve=qd(t).length&&re?re.name:[],ue=sT(ve,$),oe=d!==void 0?d:!!u?.some(me=>{if(me&&typeof me=="object"&&me.required&&!me.warningOnly)return!0;if(typeof me=="function"){const le=me(ie);return le?.required&&!le?.warningOnly}return!1}),he=Object.assign({},ae);let fe=null;if(Array.isArray(E)&&D)fe=E;else if(!(O&&(!(c||a)||D))){if(!(a&&!O&&!D))if(s.isValidElement(E)){const me=Object.assign(Object.assign({},E.props),he);if(me.id||(me.id=ue),C||U.length>0||K.length>0||e.extra){const Ce=[];(C||U.length>0)&&Ce.push(`${ue}_help`),e.extra&&Ce.push(`${ue}_extra`),me["aria-describedby"]=Ce.join(" ")}U.length>0&&(me["aria-invalid"]="true"),oe&&(me["aria-required"]="true"),Hi(E)&&(me.ref=Y(ve,E)),new Set([].concat(ke(qd(g)),ke(qd(M)))).forEach(Ce=>{me[Ce]=(...De)=>{var je,ge,Ie,Ee,we;(Ie=he[Ce])===null||Ie===void 0||(je=Ie).call.apply(je,[he].concat(De)),(we=(Ee=E.props)[Ce])===null||we===void 0||(ge=we).call.apply(ge,[Ee].concat(De))}});const pe=[me["aria-required"],me["aria-invalid"],me["aria-describedby"]];fe=s.createElement(QY,{control:he,update:E,childProps:pe},$a(E,me))}else O&&(c||a)&&!D?fe=E(ie):fe=E}return Q(fe,ue,oe)}))}const JT=ZY;JT.useStatus=QT;var JY=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,r=Object.getOwnPropertySymbols(e);a{var{prefixCls:t,children:n}=e,r=JY(e,["prefixCls","children"]);const{getPrefixCls:a}=s.useContext(Wt),o=a("form",t),c=s.useMemo(()=>({prefixCls:o,status:"error"}),[o]);return s.createElement(yM,Object.assign({},r),(u,f,d)=>s.createElement(LS.Provider,{value:c},n(u.map(h=>Object.assign(Object.assign({},h),{fieldKey:h.key})),f,{errors:d.errors,warnings:d.warnings})))};function tG(){const{form:e}=s.useContext(Yo);return e}const de=jY;de.Item=JT;de.List=eG;de.ErrorList=XT;de.useForm=uT;de.useFormInstance=tG;de.useWatch=CM;de.Provider=$M;de.create=()=>{};var nG={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M942.2 486.2C847.4 286.5 704.1 186 512 186c-192.2 0-335.4 100.5-430.2 300.3a60.3 60.3 0 000 51.5C176.6 737.5 319.9 838 512 838c192.2 0 335.4-100.5 430.2-300.3 7.7-16.2 7.7-35 0-51.5zM512 766c-161.3 0-279.4-81.8-362.7-254C232.6 339.8 350.7 258 512 258c161.3 0 279.4 81.8 362.7 254C791.5 684.2 673.4 766 512 766zm-4-430c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm0 288c-61.9 0-112-50.1-112-112s50.1-112 112-112 112 50.1 112 112-50.1 112-112 112z"}}]},name:"eye",theme:"outlined"},rG=function(t,n){return s.createElement($n,Me({},t,{ref:n,icon:nG}))},eD=s.forwardRef(rG);function oI(e,t,n,r){var a=ef.unstable_batchedUpdates?function(c){ef.unstable_batchedUpdates(n,c)}:n;return e!=null&&e.addEventListener&&e.addEventListener(t,a,r),{remove:function(){e!=null&&e.removeEventListener&&e.removeEventListener(t,a,r)}}}const aG=e=>{const{getPrefixCls:t,direction:n}=s.useContext(Wt),{prefixCls:r,className:a}=e,o=t("input-group",r),c=t("input"),[u,f,d]=bT(c),h=se(o,d,{[`${o}-lg`]:e.size==="large",[`${o}-sm`]:e.size==="small",[`${o}-compact`]:e.compact,[`${o}-rtl`]:n==="rtl"},f,a),v=s.useContext(ia),g=s.useMemo(()=>Object.assign(Object.assign({},v),{isFormItemInput:!1}),[v]);return u(s.createElement("span",{className:h,style:e.style,onMouseEnter:e.onMouseEnter,onMouseLeave:e.onMouseLeave,onFocus:e.onFocus,onBlur:e.onBlur},s.createElement(ia.Provider,{value:g},e.children)))},iG=e=>{const{componentCls:t,paddingXS:n}=e;return{[t]:{display:"inline-flex",alignItems:"center",flexWrap:"nowrap",columnGap:n,[`${t}-input-wrapper`]:{position:"relative",[`${t}-mask-icon`]:{position:"absolute",zIndex:"1",top:"50%",right:"50%",transform:"translate(50%, -50%)",pointerEvents:"none"},[`${t}-mask-input`]:{color:"transparent",caretColor:e.colorText},[`${t}-mask-input[type=number]::-webkit-inner-spin-button`]:{"-webkit-appearance":"none",margin:0},[`${t}-mask-input[type=number]`]:{"-moz-appearance":"textfield"}},"&-rtl":{direction:"rtl"},[`${t}-input`]:{textAlign:"center",paddingInline:e.paddingXXS},[`&${t}-sm ${t}-input`]:{paddingInline:e.calc(e.paddingXXS).div(2).equal()},[`&${t}-lg ${t}-input`]:{paddingInline:e.paddingXS}}}},oG=Kn(["Input","OTP"],e=>{const t=xn(e,Hs(e));return iG(t)},Bs);var lG=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,r=Object.getOwnPropertySymbols(e);a{const{className:n,value:r,onChange:a,onActiveChange:o,index:c,mask:u}=e,f=lG(e,["className","value","onChange","onActiveChange","index","mask"]),{getPrefixCls:d}=s.useContext(Wt),h=d("otp"),v=typeof u=="string"?u:r,g=s.useRef(null);s.useImperativeHandle(t,()=>g.current);const b=y=>{a(c,y.target.value)},x=()=>{hn(()=>{var y;const w=(y=g.current)===null||y===void 0?void 0:y.input;document.activeElement===w&&w&&w.select()})},C=y=>{const{key:w,ctrlKey:$,metaKey:E}=y;w==="ArrowLeft"?o(c-1):w==="ArrowRight"?o(c+1):w==="z"&&($||E)?y.preventDefault():w==="Backspace"&&!r&&o(c-1),x()};return s.createElement("span",{className:`${h}-input-wrapper`,role:"presentation"},u&&r!==""&&r!==void 0&&s.createElement("span",{className:`${h}-mask-icon`,"aria-hidden":"true"},v),s.createElement(Bf,Object.assign({"aria-label":`OTP Input ${c+1}`,type:u===!0?"password":"text"},f,{ref:g,value:r,onInput:b,onFocus:x,onKeyDown:C,onMouseDown:x,onMouseUp:x,className:se(n,{[`${h}-mask-input`]:u})})))});var cG=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,r=Object.getOwnPropertySymbols(e);a{const{index:t,prefixCls:n,separator:r}=e,a=typeof r=="function"?r(t):r;return a?s.createElement("span",{className:`${n}-separator`},a):null},dG=s.forwardRef((e,t)=>{const{prefixCls:n,length:r=6,size:a,defaultValue:o,value:c,onChange:u,formatter:f,separator:d,variant:h,disabled:v,status:g,autoFocus:b,mask:x,type:C,onInput:y,inputMode:w}=e,$=cG(e,["prefixCls","length","size","defaultValue","value","onChange","formatter","separator","variant","disabled","status","autoFocus","mask","type","onInput","inputMode"]),{getPrefixCls:E,direction:O}=s.useContext(Wt),I=E("otp",n),j=ma($,{aria:!0,data:!0,attr:!0}),[M,D,N]=oG(I),P=la(Y=>a??Y),A=s.useContext(ia),F=Ps(A.status,g),H=s.useMemo(()=>Object.assign(Object.assign({},A),{status:F,hasFeedback:!1,feedbackIcon:null}),[A,F]),k=s.useRef(null),L=s.useRef({});s.useImperativeHandle(t,()=>({focus:()=>{var Y;(Y=L.current[0])===null||Y===void 0||Y.focus()},blur:()=>{var Y;for(let Q=0;Qf?f(Y):Y,[z,V]=s.useState(()=>$h(T(o||"")));s.useEffect(()=>{c!==void 0&&V($h(c))},[c]);const q=pn(Y=>{V(Y),y&&y(Y),u&&Y.length===r&&Y.every(Q=>Q)&&Y.some((Q,Z)=>z[Z]!==Q)&&u(Y.join(""))}),G=pn((Y,Q)=>{let Z=ke(z);for(let re=0;re=0&&!Z[re];re-=1)Z.pop();const ae=T(Z.map(re=>re||" ").join(""));return Z=$h(ae).map((re,ie)=>re===" "&&!Z[ie]?Z[ie]:re),Z}),B=(Y,Q)=>{var Z;const ae=G(Y,Q),re=Math.min(Y+Q.length,r-1);re!==Y&&ae[Y]!==void 0&&((Z=L.current[re])===null||Z===void 0||Z.focus()),q(ae)},U=Y=>{var Q;(Q=L.current[Y])===null||Q===void 0||Q.focus()},K={variant:h,disabled:v,status:F,mask:x,type:C,inputMode:w};return M(s.createElement("div",Object.assign({},j,{ref:k,className:se(I,{[`${I}-sm`]:P==="small",[`${I}-lg`]:P==="large",[`${I}-rtl`]:O==="rtl"},N,D),role:"group"}),s.createElement(ia.Provider,{value:H},Array.from({length:r}).map((Y,Q)=>{const Z=`otp-${Q}`,ae=z[Q]||"";return s.createElement(s.Fragment,{key:Z},s.createElement(sG,Object.assign({ref:re=>{L.current[Q]=re},index:Q,size:P,htmlSize:1,className:`${I}-input`,onChange:B,value:ae,onActiveChange:U,autoFocus:Q===0&&b},K)),Qe?s.createElement(eD,null):s.createElement(hG,null),pG={click:"onClick",hover:"onMouseOver"},bG=s.forwardRef((e,t)=>{const{disabled:n,action:r="click",visibilityToggle:a=!0,iconRender:o=gG,suffix:c}=e,u=s.useContext(ja),f=n??u,d=typeof a=="object"&&a.visible!==void 0,[h,v]=s.useState(()=>d?a.visible:!1),g=s.useRef(null);s.useEffect(()=>{d&&v(a.visible)},[d,a]);const b=LT(g),x=()=>{var A;if(f)return;h&&b();const F=!h;v(F),typeof a=="object"&&((A=a.onVisibleChange)===null||A===void 0||A.call(a,F))},C=A=>{const F=pG[r]||"",H=o(h),k={[F]:x,className:`${A}-icon`,key:"passwordIcon",onMouseDown:L=>{L.preventDefault()},onMouseUp:L=>{L.preventDefault()}};return s.cloneElement(s.isValidElement(H)?H:s.createElement("span",null,H),k)},{className:y,prefixCls:w,inputPrefixCls:$,size:E}=e,O=vG(e,["className","prefixCls","inputPrefixCls","size"]),{getPrefixCls:I}=s.useContext(Wt),j=I("input",$),M=I("input-password",w),D=a&&C(M),N=se(M,y,{[`${M}-${E}`]:!!E}),P=Object.assign(Object.assign({},lr(O,["suffix","iconRender","visibilityToggle"])),{type:h?"text":"password",className:N,prefixCls:j,suffix:s.createElement(s.Fragment,null,D,c)});return E&&(P.size=E),s.createElement(Bf,Object.assign({ref:Ea(t,g)},P))});var yG=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,r=Object.getOwnPropertySymbols(e);a{const{prefixCls:n,inputPrefixCls:r,className:a,size:o,suffix:c,enterButton:u=!1,addonAfter:f,loading:d,disabled:h,onSearch:v,onChange:g,onCompositionStart:b,onCompositionEnd:x,variant:C,onPressEnter:y}=e,w=yG(e,["prefixCls","inputPrefixCls","className","size","suffix","enterButton","addonAfter","loading","disabled","onSearch","onChange","onCompositionStart","onCompositionEnd","variant","onPressEnter"]),{getPrefixCls:$,direction:E}=s.useContext(Wt),O=s.useRef(!1),I=$("input-search",n),j=$("input",r),{compactSize:M}=Zo(I,E),D=la(K=>{var Y;return(Y=o??M)!==null&&Y!==void 0?Y:K}),N=s.useRef(null),P=K=>{K?.target&&K.type==="click"&&v&&v(K.target.value,K,{source:"clear"}),g?.(K)},A=K=>{var Y;document.activeElement===((Y=N.current)===null||Y===void 0?void 0:Y.input)&&K.preventDefault()},F=K=>{var Y,Q;v&&v((Q=(Y=N.current)===null||Y===void 0?void 0:Y.input)===null||Q===void 0?void 0:Q.value,K,{source:"input"})},H=K=>{O.current||d||(y?.(K),F(K))},k=typeof u=="boolean"?s.createElement(qS,null):null,L=`${I}-button`;let T;const z=u||{},V=z.type&&z.type.__ANT_BUTTON===!0;V||z.type==="button"?T=$a(z,Object.assign({onMouseDown:A,onClick:K=>{var Y,Q;(Q=(Y=z?.props)===null||Y===void 0?void 0:Y.onClick)===null||Q===void 0||Q.call(Y,K),F(K)},key:"enterButton"},V?{className:L,size:D}:{})):T=s.createElement(dn,{className:L,color:u?"primary":"default",size:D,disabled:h,key:"enterButton",onMouseDown:A,onClick:F,loading:d,icon:k,variant:C==="borderless"||C==="filled"||C==="underlined"?"text":u?"solid":void 0},u),f&&(T=[T,$a(f,{key:"addonAfter"})]);const q=se(I,{[`${I}-rtl`]:E==="rtl",[`${I}-${D}`]:!!D,[`${I}-with-button`]:!!u},a),G=K=>{O.current=!0,b?.(K)},B=K=>{O.current=!1,x?.(K)},U=Object.assign(Object.assign({},w),{className:q,prefixCls:j,type:"search",size:D,variant:C,onPressEnter:H,onCompositionStart:G,onCompositionEnd:B,addonAfter:T,suffix:c,onChange:P,disabled:h});return s.createElement(Bf,Object.assign({ref:Ea(N,t)},U))});var SG=` + min-height:0 !important; + max-height:none !important; + height:0 !important; + visibility:hidden !important; + overflow:hidden !important; + position:absolute !important; + z-index:-1000 !important; + top:0 !important; + right:0 !important; + pointer-events: none !important; +`,CG=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","font-variant","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing","word-break","white-space"],zy={},ri;function wG(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=e.getAttribute("id")||e.getAttribute("data-reactid")||e.getAttribute("name");if(t&&zy[n])return zy[n];var r=window.getComputedStyle(e),a=r.getPropertyValue("box-sizing")||r.getPropertyValue("-moz-box-sizing")||r.getPropertyValue("-webkit-box-sizing"),o=parseFloat(r.getPropertyValue("padding-bottom"))+parseFloat(r.getPropertyValue("padding-top")),c=parseFloat(r.getPropertyValue("border-bottom-width"))+parseFloat(r.getPropertyValue("border-top-width")),u=CG.map(function(d){return"".concat(d,":").concat(r.getPropertyValue(d))}).join(";"),f={sizingStyle:u,paddingSize:o,borderSize:c,boxSizing:a};return t&&n&&(zy[n]=f),f}function $G(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;ri||(ri=document.createElement("textarea"),ri.setAttribute("tab-index","-1"),ri.setAttribute("aria-hidden","true"),ri.setAttribute("name","hiddenTextarea"),document.body.appendChild(ri)),e.getAttribute("wrap")?ri.setAttribute("wrap",e.getAttribute("wrap")):ri.removeAttribute("wrap");var a=wG(e,t),o=a.paddingSize,c=a.borderSize,u=a.boxSizing,f=a.sizingStyle;ri.setAttribute("style","".concat(f,";").concat(SG)),ri.value=e.value||e.placeholder||"";var d=void 0,h=void 0,v,g=ri.scrollHeight;if(u==="border-box"?g+=c:u==="content-box"&&(g-=o),n!==null||r!==null){ri.value=" ";var b=ri.scrollHeight-o;n!==null&&(d=b*n,u==="border-box"&&(d=d+o+c),g=Math.max(d,g)),r!==null&&(h=b*r,u==="border-box"&&(h=h+o+c),v=g>h?"":"hidden",g=Math.min(h,g))}var x={height:g,overflowY:v,resize:"none"};return d&&(x.minHeight=d),h&&(x.maxHeight=h),x}var EG=["prefixCls","defaultValue","value","autoSize","onResize","className","style","disabled","onChange","onInternalAutoSize"],Ly=0,Hy=1,By=2,_G=s.forwardRef(function(e,t){var n=e,r=n.prefixCls,a=n.defaultValue,o=n.value,c=n.autoSize,u=n.onResize,f=n.className,d=n.style,h=n.disabled,v=n.onChange;n.onInternalAutoSize;var g=Kt(n,EG),b=Wn(a,{value:o,postState:function(K){return K??""}}),x=ce(b,2),C=x[0],y=x[1],w=function(K){y(K.target.value),v?.(K)},$=s.useRef();s.useImperativeHandle(t,function(){return{textArea:$.current}});var E=s.useMemo(function(){return c&&jt(c)==="object"?[c.minRows,c.maxRows]:[]},[c]),O=ce(E,2),I=O[0],j=O[1],M=!!c,D=s.useState(By),N=ce(D,2),P=N[0],A=N[1],F=s.useState(),H=ce(F,2),k=H[0],L=H[1],T=function(){A(Ly)};fn(function(){M&&T()},[o,I,j,M]),fn(function(){if(P===Ly)A(Hy);else if(P===Hy){var U=$G($.current,!1,I,j);A(By),L(U)}},[P]);var z=s.useRef(),V=function(){hn.cancel(z.current)},q=function(K){P===By&&(u?.(K),c&&(V(),z.current=hn(function(){T()})))};s.useEffect(function(){return V},[]);var G=M?k:null,B=ee(ee({},d),G);return(P===Ly||P===Hy)&&(B.overflowY="hidden",B.overflowX="hidden"),s.createElement(Ca,{onResize:q,disabled:!(c||u)},s.createElement("textarea",Me({},g,{ref:$,style:B,className:se(r,f,X({},"".concat(r,"-disabled"),h)),disabled:h,value:C,onChange:w})))}),OG=["defaultValue","value","onFocus","onBlur","onChange","allowClear","maxLength","onCompositionStart","onCompositionEnd","suffix","prefixCls","showCount","count","className","style","disabled","hidden","classNames","styles","onResize","onClear","onPressEnter","readOnly","autoSize","onKeyDown"],IG=Se.forwardRef(function(e,t){var n,r=e.defaultValue,a=e.value,o=e.onFocus,c=e.onBlur,u=e.onChange,f=e.allowClear,d=e.maxLength,h=e.onCompositionStart,v=e.onCompositionEnd,g=e.suffix,b=e.prefixCls,x=b===void 0?"rc-textarea":b,C=e.showCount,y=e.count,w=e.className,$=e.style,E=e.disabled,O=e.hidden,I=e.classNames,j=e.styles,M=e.onResize,D=e.onClear,N=e.onPressEnter,P=e.readOnly,A=e.autoSize,F=e.onKeyDown,H=Kt(e,OG),k=Wn(r,{value:a,defaultValue:r}),L=ce(k,2),T=L[0],z=L[1],V=T==null?"":String(T),q=Se.useState(!1),G=ce(q,2),B=G[0],U=G[1],K=Se.useRef(!1),Y=Se.useState(null),Q=ce(Y,2),Z=Q[0],ae=Q[1],re=s.useRef(null),ie=s.useRef(null),ve=function(){var $e;return($e=ie.current)===null||$e===void 0?void 0:$e.textArea},ue=function(){ve().focus()};s.useImperativeHandle(t,function(){var Be;return{resizableTextArea:ie.current,focus:ue,blur:function(){ve().blur()},nativeElement:((Be=re.current)===null||Be===void 0?void 0:Be.nativeElement)||ve()}}),s.useEffect(function(){U(function(Be){return!E&&Be})},[E]);var oe=Se.useState(null),he=ce(oe,2),fe=he[0],me=he[1];Se.useEffect(function(){if(fe){var Be;(Be=ve()).setSelectionRange.apply(Be,ke(fe))}},[fe]);var le=kT(y,C),pe=(n=le.max)!==null&&n!==void 0?n:d,Ce=Number(pe)>0,De=le.strategy(V),je=!!pe&&De>pe,ge=function($e,Te){var be=Te;!K.current&&le.exceedFormatter&&le.max&&le.strategy(Te)>le.max&&(be=le.exceedFormatter(Te,{max:le.max}),Te!==be&&me([ve().selectionStart||0,ve().selectionEnd||0])),z(be),$v($e.currentTarget,$e,u,be)},Ie=function($e){K.current=!0,h?.($e)},Ee=function($e){K.current=!1,ge($e,$e.currentTarget.value),v?.($e)},we=function($e){ge($e,$e.target.value)},Fe=function($e){$e.key==="Enter"&&N&&N($e),F?.($e)},He=function($e){U(!0),o?.($e)},it=function($e){U(!1),c?.($e)},Ze=function($e){z(""),ue(),$v(ve(),$e,u)},Ye=g,et;le.show&&(le.showFormatter?et=le.showFormatter({value:V,count:De,maxLength:pe}):et="".concat(De).concat(Ce?" / ".concat(pe):""),Ye=Se.createElement(Se.Fragment,null,Ye,Se.createElement("span",{className:se("".concat(x,"-data-count"),I?.count),style:j?.count},et)));var Pe=function($e){var Te;M?.($e),(Te=ve())!==null&&Te!==void 0&&Te.style.height&&ae(!0)},Oe=!A&&!C&&!f;return Se.createElement($C,{ref:re,value:V,allowClear:f,handleReset:Ze,suffix:Ye,prefixCls:x,classNames:ee(ee({},I),{},{affixWrapper:se(I?.affixWrapper,X(X({},"".concat(x,"-show-count"),C),"".concat(x,"-textarea-allow-clear"),f))}),disabled:E,focused:B,className:se(w,je&&"".concat(x,"-out-of-range")),style:ee(ee({},$),Z&&!Oe?{height:"auto"}:{}),dataAttrs:{affixWrapper:{"data-count":typeof et=="string"?et:void 0}},hidden:O,readOnly:P,onClear:D},Se.createElement(_G,Me({},H,{autoSize:A,maxLength:d,onKeyDown:Fe,onChange:we,onFocus:He,onBlur:it,onCompositionStart:Ie,onCompositionEnd:Ee,className:se(I?.textarea),style:ee(ee({},j?.textarea),{},{resize:$?.resize}),disabled:E,prefixCls:x,onResize:Pe,ref:ie,readOnly:P})))});const RG=e=>{const{componentCls:t,paddingLG:n}=e,r=`${t}-textarea`;return{[`textarea${t}`]:{maxWidth:"100%",height:"auto",minHeight:e.controlHeight,lineHeight:e.lineHeight,verticalAlign:"bottom",transition:`all ${e.motionDurationSlow}`,resize:"vertical",[`&${t}-mouse-active`]:{transition:`all ${e.motionDurationSlow}, height 0s, width 0s`}},[`${t}-textarea-affix-wrapper-resize-dirty`]:{width:"auto"},[r]:{position:"relative","&-show-count":{[`${t}-data-count`]:{position:"absolute",bottom:e.calc(e.fontSize).mul(e.lineHeight).mul(-1).equal(),insetInlineEnd:0,color:e.colorTextDescription,whiteSpace:"nowrap",pointerEvents:"none"}},[` + &-allow-clear > ${t}, + &-affix-wrapper${r}-has-feedback ${t} + `]:{paddingInlineEnd:n},[`&-affix-wrapper${t}-affix-wrapper`]:{padding:0,[`> textarea${t}`]:{fontSize:"inherit",border:"none",outline:"none",background:"transparent",minHeight:e.calc(e.controlHeight).sub(e.calc(e.lineWidth).mul(2)).equal(),"&:focus":{boxShadow:"none !important"}},[`${t}-suffix`]:{margin:0,"> *:not(:last-child)":{marginInline:0},[`${t}-clear-icon`]:{position:"absolute",insetInlineEnd:e.paddingInline,insetBlockStart:e.paddingXS},[`${r}-suffix`]:{position:"absolute",top:0,insetInlineEnd:e.paddingInline,bottom:0,zIndex:1,display:"inline-flex",alignItems:"center",margin:"auto",pointerEvents:"none"}}},[`&-affix-wrapper${t}-affix-wrapper-rtl`]:{[`${t}-suffix`]:{[`${t}-data-count`]:{direction:"ltr",insetInlineStart:0}}},[`&-affix-wrapper${t}-affix-wrapper-sm`]:{[`${t}-suffix`]:{[`${t}-clear-icon`]:{insetInlineEnd:e.paddingInlineSM}}}}}},NG=Kn(["Input","TextArea"],e=>{const t=xn(e,Hs(e));return RG(t)},Bs,{resetFont:!1});var MG=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,r=Object.getOwnPropertySymbols(e);a{var n;const{prefixCls:r,bordered:a=!0,size:o,disabled:c,status:u,allowClear:f,classNames:d,rootClassName:h,className:v,style:g,styles:b,variant:x,showCount:C,onMouseDown:y,onResize:w}=e,$=MG(e,["prefixCls","bordered","size","disabled","status","allowClear","classNames","rootClassName","className","style","styles","variant","showCount","onMouseDown","onResize"]),{getPrefixCls:E,direction:O,allowClear:I,autoComplete:j,className:M,style:D,classNames:N,styles:P}=ga("textArea"),A=s.useContext(ja),F=c??A,{status:H,hasFeedback:k,feedbackIcon:L}=s.useContext(ia),T=Ps(H,u),z=s.useRef(null);s.useImperativeHandle(t,()=>{var le;return{resizableTextArea:(le=z.current)===null||le===void 0?void 0:le.resizableTextArea,focus:pe=>{var Ce,De;wC((De=(Ce=z.current)===null||Ce===void 0?void 0:Ce.resizableTextArea)===null||De===void 0?void 0:De.textArea,pe)},blur:()=>{var pe;return(pe=z.current)===null||pe===void 0?void 0:pe.blur()}}});const V=E("input",r),q=oa(V),[G,B,U]=pT(V,h),[K]=NG(V,q),{compactSize:Y,compactItemClassnames:Q}=Zo(V,O),Z=la(le=>{var pe;return(pe=o??Y)!==null&&pe!==void 0?pe:le}),[ae,re]=ks("textArea",x,a),ie=zT(f??I),[ve,ue]=s.useState(!1),[oe,he]=s.useState(!1),fe=le=>{ue(!0),y?.(le);const pe=()=>{ue(!1),document.removeEventListener("mouseup",pe)};document.addEventListener("mouseup",pe)},me=le=>{var pe,Ce;if(w?.(le),ve&&typeof getComputedStyle=="function"){const De=(Ce=(pe=z.current)===null||pe===void 0?void 0:pe.nativeElement)===null||Ce===void 0?void 0:Ce.querySelector("textarea");De&&getComputedStyle(De).resize==="both"&&he(!0)}};return G(K(s.createElement(IG,Object.assign({autoComplete:j},$,{style:Object.assign(Object.assign({},D),g),styles:Object.assign(Object.assign({},P),b),disabled:F,allowClear:ie,className:se(U,q,v,h,Q,M,oe&&`${V}-textarea-affix-wrapper-resize-dirty`),classNames:Object.assign(Object.assign(Object.assign({},d),N),{textarea:se({[`${V}-sm`]:Z==="small",[`${V}-lg`]:Z==="large"},B,d?.textarea,N.textarea,ve&&`${V}-mouse-active`),variant:se({[`${V}-${ae}`]:re},Hl(V,T)),affixWrapper:se(`${V}-textarea-affix-wrapper`,{[`${V}-affix-wrapper-rtl`]:O==="rtl",[`${V}-affix-wrapper-sm`]:Z==="small",[`${V}-affix-wrapper-lg`]:Z==="large",[`${V}-textarea-show-count`]:C||((n=e.count)===null||n===void 0?void 0:n.show)},B)}),prefixCls:V,suffix:k&&s.createElement("span",{className:`${V}-textarea-suffix`},L),showCount:C,ref:z,onResize:me,onMouseDown:fe}))))}),ht=Bf;ht.Group=aG;ht.Search=xG;ht.TextArea=tD;ht.Password=bG;ht.OTP=dG;function jG(e,t,n){return typeof n=="boolean"?n:e.length?!0:Ma(t).some(a=>a.type===Cj)}var nD=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,r=Object.getOwnPropertySymbols(e);as.forwardRef((o,c)=>s.createElement(r,Object.assign({ref:c,suffixCls:e,tagName:t},o)))}const IC=s.forwardRef((e,t)=>{const{prefixCls:n,suffixCls:r,className:a,tagName:o}=e,c=nD(e,["prefixCls","suffixCls","className","tagName"]),{getPrefixCls:u}=s.useContext(Wt),f=u("layout",n),[d,h,v]=Sj(f),g=r?`${f}-${r}`:f;return d(s.createElement(o,Object.assign({className:se(n||g,a,h,v),ref:t},c)))}),TG=s.forwardRef((e,t)=>{const{direction:n}=s.useContext(Wt),[r,a]=s.useState([]),{prefixCls:o,className:c,rootClassName:u,children:f,hasSider:d,tagName:h,style:v}=e,g=nD(e,["prefixCls","className","rootClassName","children","hasSider","tagName","style"]),b=lr(g,["suffixCls"]),{getPrefixCls:x,className:C,style:y}=ga("layout"),w=x("layout",o),$=jG(r,f,d),[E,O,I]=Sj(w),j=se(w,{[`${w}-has-sider`]:$,[`${w}-rtl`]:n==="rtl"},C,c,u,O,I),M=s.useMemo(()=>({siderHook:{addSider:D=>{a(N=>[].concat(ke(N),[D]))},removeSider:D=>{a(N=>N.filter(P=>P!==D))}}}),[]);return E(s.createElement(bj.Provider,{value:M},s.createElement(h,Object.assign({ref:t,className:j,style:Object.assign(Object.assign({},y),v)},b),f)))}),DG=$g({tagName:"div",displayName:"Layout"})(TG),PG=$g({suffixCls:"header",tagName:"header",displayName:"Header"})(IC),kG=$g({suffixCls:"footer",tagName:"footer",displayName:"Footer"})(IC),AG=$g({suffixCls:"content",tagName:"main",displayName:"Content"})(IC),wi=DG;wi.Header=PG;wi.Footer=kG;wi.Content=AG;wi.Sider=Cj;wi._InternalSiderContext=hg;var zG={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M272.9 512l265.4-339.1c4.1-5.2.4-12.9-6.3-12.9h-77.3c-4.9 0-9.6 2.3-12.6 6.1L186.8 492.3a31.99 31.99 0 000 39.5l255.3 326.1c3 3.9 7.7 6.1 12.6 6.1H532c6.7 0 10.4-7.7 6.3-12.9L272.9 512zm304 0l265.4-339.1c4.1-5.2.4-12.9-6.3-12.9h-77.3c-4.9 0-9.6 2.3-12.6 6.1L490.8 492.3a31.99 31.99 0 000 39.5l255.3 326.1c3 3.9 7.7 6.1 12.6 6.1H836c6.7 0 10.4-7.7 6.3-12.9L576.9 512z"}}]},name:"double-left",theme:"outlined"},LG=function(t,n){return s.createElement($n,Me({},t,{ref:n,icon:zG}))},lI=s.forwardRef(LG),HG={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M533.2 492.3L277.9 166.1c-3-3.9-7.7-6.1-12.6-6.1H188c-6.7 0-10.4 7.7-6.3 12.9L447.1 512 181.7 851.1A7.98 7.98 0 00188 864h77.3c4.9 0 9.6-2.3 12.6-6.1l255.3-326.1c9.1-11.7 9.1-27.9 0-39.5zm304 0L581.9 166.1c-3-3.9-7.7-6.1-12.6-6.1H492c-6.7 0-10.4 7.7-6.3 12.9L751.1 512 485.7 851.1A7.98 7.98 0 00492 864h77.3c4.9 0 9.6-2.3 12.6-6.1l255.3-326.1c9.1-11.7 9.1-27.9 0-39.5z"}}]},name:"double-right",theme:"outlined"},BG=function(t,n){return s.createElement($n,Me({},t,{ref:n,icon:HG}))},sI=s.forwardRef(BG),FG={items_per_page:"条/页",jump_to:"跳至",jump_to_confirm:"确定",page:"页",prev_page:"上一页",next_page:"下一页",prev_5:"向前 5 页",next_5:"向后 5 页",prev_3:"向前 3 页",next_3:"向后 3 页",page_size:"页码"},VG=[10,20,50,100],KG=function(t){var n=t.pageSizeOptions,r=n===void 0?VG:n,a=t.locale,o=t.changeSize,c=t.pageSize,u=t.goButton,f=t.quickGo,d=t.rootPrefixCls,h=t.disabled,v=t.buildOptionText,g=t.showSizeChanger,b=t.sizeChangerRender,x=Se.useState(""),C=ce(x,2),y=C[0],w=C[1],$=function(){return!y||Number.isNaN(y)?void 0:Number(y)},E=typeof v=="function"?v:function(F){return"".concat(F," ").concat(a.items_per_page)},O=function(H){w(H.target.value)},I=function(H){u||y===""||(w(""),!(H.relatedTarget&&(H.relatedTarget.className.indexOf("".concat(d,"-item-link"))>=0||H.relatedTarget.className.indexOf("".concat(d,"-item"))>=0))&&f?.($()))},j=function(H){y!==""&&(H.keyCode===Mt.ENTER||H.type==="click")&&(w(""),f?.($()))},M=function(){return r.some(function(H){return H.toString()===c.toString()})?r:r.concat([c]).sort(function(H,k){var L=Number.isNaN(Number(H))?0:Number(H),T=Number.isNaN(Number(k))?0:Number(k);return L-T})},D="".concat(d,"-options");if(!g&&!f)return null;var N=null,P=null,A=null;return g&&b&&(N=b({disabled:h,size:c,onSizeChange:function(H){o?.(Number(H))},"aria-label":a.page_size,className:"".concat(D,"-size-changer"),options:M().map(function(F){return{label:E(F),value:F}})})),f&&(u&&(A=typeof u=="boolean"?Se.createElement("button",{type:"button",onClick:j,onKeyUp:j,disabled:h,className:"".concat(D,"-quick-jumper-button")},a.jump_to_confirm):Se.createElement("span",{onClick:j,onKeyUp:j},u)),P=Se.createElement("div",{className:"".concat(D,"-quick-jumper")},a.jump_to,Se.createElement("input",{disabled:h,type:"text",value:y,onChange:O,onKeyUp:j,onBlur:I,"aria-label":a.page}),a.page,A)),Se.createElement("li",{className:D},N,P)},Od=function(t){var n=t.rootPrefixCls,r=t.page,a=t.active,o=t.className,c=t.showTitle,u=t.onClick,f=t.onKeyPress,d=t.itemRender,h="".concat(n,"-item"),v=se(h,"".concat(h,"-").concat(r),X(X({},"".concat(h,"-active"),a),"".concat(h,"-disabled"),!r),o),g=function(){u(r)},b=function(y){f(y,u,r)},x=d(r,"page",Se.createElement("a",{rel:"nofollow"},r));return x?Se.createElement("li",{title:c?String(r):null,className:v,onClick:g,onKeyDown:b,tabIndex:0},x):null},UG=function(t,n,r){return r};function cI(){}function uI(e){var t=Number(e);return typeof t=="number"&&!Number.isNaN(t)&&isFinite(t)&&Math.floor(t)===t}function hs(e,t,n){var r=typeof e>"u"?t:e;return Math.floor((n-1)/r)+1}var WG=function(t){var n=t.prefixCls,r=n===void 0?"rc-pagination":n,a=t.selectPrefixCls,o=a===void 0?"rc-select":a,c=t.className,u=t.current,f=t.defaultCurrent,d=f===void 0?1:f,h=t.total,v=h===void 0?0:h,g=t.pageSize,b=t.defaultPageSize,x=b===void 0?10:b,C=t.onChange,y=C===void 0?cI:C,w=t.hideOnSinglePage,$=t.align,E=t.showPrevNextJumpers,O=E===void 0?!0:E,I=t.showQuickJumper,j=t.showLessItems,M=t.showTitle,D=M===void 0?!0:M,N=t.onShowSizeChange,P=N===void 0?cI:N,A=t.locale,F=A===void 0?FG:A,H=t.style,k=t.totalBoundaryShowSizeChanger,L=k===void 0?50:k,T=t.disabled,z=t.simple,V=t.showTotal,q=t.showSizeChanger,G=q===void 0?v>L:q,B=t.sizeChangerRender,U=t.pageSizeOptions,K=t.itemRender,Y=K===void 0?UG:K,Q=t.jumpPrevIcon,Z=t.jumpNextIcon,ae=t.prevIcon,re=t.nextIcon,ie=Se.useRef(null),ve=Wn(10,{value:g,defaultValue:x}),ue=ce(ve,2),oe=ue[0],he=ue[1],fe=Wn(1,{value:u,defaultValue:d,postState:function(Ht){return Math.max(1,Math.min(Ht,hs(void 0,oe,v)))}}),me=ce(fe,2),le=me[0],pe=me[1],Ce=Se.useState(le),De=ce(Ce,2),je=De[0],ge=De[1];s.useEffect(function(){ge(le)},[le]);var Ie=Math.max(1,le-(j?3:5)),Ee=Math.min(hs(void 0,oe,v),le+(j?3:5));function we(yt,Ht){var nn=yt||Se.createElement("button",{type:"button","aria-label":Ht,className:"".concat(r,"-item-link")});return typeof yt=="function"&&(nn=Se.createElement(yt,ee({},t))),nn}function Fe(yt){var Ht=yt.target.value,nn=hs(void 0,oe,v),Xn;return Ht===""?Xn=Ht:Number.isNaN(Number(Ht))?Xn=je:Ht>=nn?Xn=nn:Xn=Number(Ht),Xn}function He(yt){return uI(yt)&&yt!==le&&uI(v)&&v>0}var it=v>oe?I:!1;function Ze(yt){(yt.keyCode===Mt.UP||yt.keyCode===Mt.DOWN)&&yt.preventDefault()}function Ye(yt){var Ht=Fe(yt);switch(Ht!==je&&ge(Ht),yt.keyCode){case Mt.ENTER:Oe(Ht);break;case Mt.UP:Oe(Ht-1);break;case Mt.DOWN:Oe(Ht+1);break}}function et(yt){Oe(Fe(yt))}function Pe(yt){var Ht=hs(yt,oe,v),nn=le>Ht&&Ht!==0?Ht:le;he(yt),ge(nn),P?.(le,yt),pe(nn),y?.(nn,yt)}function Oe(yt){if(He(yt)&&!T){var Ht=hs(void 0,oe,v),nn=yt;return yt>Ht?nn=Ht:yt<1&&(nn=1),nn!==je&&ge(nn),pe(nn),y?.(nn,oe),nn}return le}var Be=le>1,$e=le2?nn-2:0),br=2;brv?v:le*oe])),It=null,Et=hs(void 0,oe,v);if(w&&v<=oe)return null;var nt=[],Ue={rootPrefixCls:r,onClick:Oe,onKeyPress:Ge,showTitle:D,itemRender:Y,page:-1},qe=le-1>0?le-1:0,ct=le+1=ot*2&&le!==3&&(nt[0]=Se.cloneElement(nt[0],{className:se("".concat(r,"-item-after-jump-prev"),nt[0].props.className)}),nt.unshift(qt)),Et-le>=ot*2&&le!==Et-2){var xt=nt[nt.length-1];nt[nt.length-1]=Se.cloneElement(xt,{className:se("".concat(r,"-item-before-jump-next"),xt.props.className)}),nt.push(It)}rn!==1&&nt.unshift(Se.createElement(Od,Me({},Ue,{key:1,page:1}))),Sn!==Et&&nt.push(Se.createElement(Od,Me({},Ue,{key:Et,page:Et})))}var Bt=mt(qe);if(Bt){var kt=!Be||!Et;Bt=Se.createElement("li",{title:D?F.prev_page:null,onClick:Te,tabIndex:kt?null:0,onKeyDown:ft,className:se("".concat(r,"-prev"),X({},"".concat(r,"-disabled"),kt)),"aria-disabled":kt},Bt)}var gt=st(ct);if(gt){var _t,Zt;z?(_t=!$e,Zt=Be?0:null):(_t=!$e||!Et,Zt=_t?null:0),gt=Se.createElement("li",{title:D?F.next_page:null,onClick:be,tabIndex:Zt,onKeyDown:$t,className:se("".concat(r,"-next"),X({},"".concat(r,"-disabled"),_t)),"aria-disabled":_t},gt)}var on=se(r,c,X(X(X(X(X({},"".concat(r,"-start"),$==="start"),"".concat(r,"-center"),$==="center"),"".concat(r,"-end"),$==="end"),"".concat(r,"-simple"),z),"".concat(r,"-disabled"),T));return Se.createElement("ul",Me({className:on,style:H,ref:ie},Gt),vt,Bt,z?ut:nt,gt,Se.createElement(KG,{locale:F,rootPrefixCls:r,disabled:T,selectPrefixCls:o,changeSize:Pe,pageSize:oe,pageSizeOptions:U,quickGo:it?Oe:null,goButton:Jt,showSizeChanger:G,sizeChangerRender:B}))};const qG=e=>{const{componentCls:t}=e;return{[`${t}-disabled`]:{"&, &:hover":{cursor:"not-allowed",[`${t}-item-link`]:{color:e.colorTextDisabled,cursor:"not-allowed"}},"&:focus-visible":{cursor:"not-allowed",[`${t}-item-link`]:{color:e.colorTextDisabled,cursor:"not-allowed"}}},[`&${t}-disabled`]:{cursor:"not-allowed",[`${t}-item`]:{cursor:"not-allowed",backgroundColor:"transparent","&:hover, &:active":{backgroundColor:"transparent"},a:{color:e.colorTextDisabled,backgroundColor:"transparent",border:"none",cursor:"not-allowed"},"&-active":{borderColor:e.colorBorder,backgroundColor:e.itemActiveBgDisabled,"&:hover, &:active":{backgroundColor:e.itemActiveBgDisabled},a:{color:e.itemActiveColorDisabled}}},[`${t}-item-link`]:{color:e.colorTextDisabled,cursor:"not-allowed","&:hover, &:active":{backgroundColor:"transparent"},[`${t}-simple&`]:{backgroundColor:"transparent","&:hover, &:active":{backgroundColor:"transparent"}}},[`${t}-simple-pager`]:{color:e.colorTextDisabled},[`${t}-jump-prev, ${t}-jump-next`]:{[`${t}-item-link-icon`]:{opacity:0},[`${t}-item-ellipsis`]:{opacity:1}}}}},YG=e=>{const{componentCls:t}=e;return{[`&${t}-mini ${t}-total-text, &${t}-mini ${t}-simple-pager`]:{height:e.itemSizeSM,lineHeight:te(e.itemSizeSM)},[`&${t}-mini ${t}-item`]:{minWidth:e.itemSizeSM,height:e.itemSizeSM,margin:0,lineHeight:te(e.calc(e.itemSizeSM).sub(2).equal())},[`&${t}-mini ${t}-prev, &${t}-mini ${t}-next`]:{minWidth:e.itemSizeSM,height:e.itemSizeSM,margin:0,lineHeight:te(e.itemSizeSM)},[`&${t}-mini:not(${t}-disabled)`]:{[`${t}-prev, ${t}-next`]:{[`&:hover ${t}-item-link`]:{backgroundColor:e.colorBgTextHover},[`&:active ${t}-item-link`]:{backgroundColor:e.colorBgTextActive},[`&${t}-disabled:hover ${t}-item-link`]:{backgroundColor:"transparent"}}},[` + &${t}-mini ${t}-prev ${t}-item-link, + &${t}-mini ${t}-next ${t}-item-link + `]:{backgroundColor:"transparent",borderColor:"transparent","&::after":{height:e.itemSizeSM,lineHeight:te(e.itemSizeSM)}},[`&${t}-mini ${t}-jump-prev, &${t}-mini ${t}-jump-next`]:{height:e.itemSizeSM,marginInlineEnd:0,lineHeight:te(e.itemSizeSM)},[`&${t}-mini ${t}-options`]:{marginInlineStart:e.paginationMiniOptionsMarginInlineStart,"&-size-changer":{top:e.miniOptionsSizeChangerTop},"&-quick-jumper":{height:e.itemSizeSM,lineHeight:te(e.itemSizeSM),input:Object.assign(Object.assign({},pC(e)),{width:e.paginationMiniQuickJumperInputWidth,height:e.controlHeightSM})}}}},GG=e=>{const{componentCls:t}=e;return{[`&${t}-simple`]:{[`${t}-prev, ${t}-next`]:{height:e.itemSize,lineHeight:te(e.itemSize),verticalAlign:"top",[`${t}-item-link`]:{height:e.itemSize,backgroundColor:"transparent",border:0,"&:hover":{backgroundColor:e.colorBgTextHover},"&:active":{backgroundColor:e.colorBgTextActive},"&::after":{height:e.itemSize,lineHeight:te(e.itemSize)}}},[`${t}-simple-pager`]:{display:"inline-flex",alignItems:"center",height:e.itemSize,marginInlineEnd:e.marginXS,input:{boxSizing:"border-box",height:"100%",width:e.quickJumperInputWidth,padding:`0 ${te(e.paginationItemPaddingInline)}`,textAlign:"center",backgroundColor:e.itemInputBg,border:`${te(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadius,outline:"none",transition:`border-color ${e.motionDurationMid}`,color:"inherit","&:hover":{borderColor:e.colorPrimary},"&:focus":{borderColor:e.colorPrimaryHover,boxShadow:`${te(e.inputOutlineOffset)} 0 ${te(e.controlOutlineWidth)} ${e.controlOutline}`},"&[disabled]":{color:e.colorTextDisabled,backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder,cursor:"not-allowed"}}},[`&${t}-disabled`]:{[`${t}-prev, ${t}-next`]:{[`${t}-item-link`]:{"&:hover, &:active":{backgroundColor:"transparent"}}}},[`&${t}-mini`]:{[`${t}-prev, ${t}-next`]:{height:e.itemSizeSM,lineHeight:te(e.itemSizeSM),[`${t}-item-link`]:{height:e.itemSizeSM,"&::after":{height:e.itemSizeSM,lineHeight:te(e.itemSizeSM)}}},[`${t}-simple-pager`]:{height:e.itemSizeSM,input:{width:e.paginationMiniQuickJumperInputWidth}}}}}},XG=e=>{const{componentCls:t}=e;return{[`${t}-jump-prev, ${t}-jump-next`]:{outline:0,[`${t}-item-container`]:{position:"relative",[`${t}-item-link-icon`]:{color:e.colorPrimary,fontSize:e.fontSizeSM,opacity:0,transition:`all ${e.motionDurationMid}`,"&-svg":{top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,margin:"auto"}},[`${t}-item-ellipsis`]:{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,display:"block",margin:"auto",color:e.colorTextDisabled,letterSpacing:e.paginationEllipsisLetterSpacing,textAlign:"center",textIndent:e.paginationEllipsisTextIndent,opacity:1,transition:`all ${e.motionDurationMid}`}},"&:hover":{[`${t}-item-link-icon`]:{opacity:1},[`${t}-item-ellipsis`]:{opacity:0}}},[` + ${t}-prev, + ${t}-jump-prev, + ${t}-jump-next + `]:{marginInlineEnd:e.marginXS},[` + ${t}-prev, + ${t}-next, + ${t}-jump-prev, + ${t}-jump-next + `]:{display:"inline-block",minWidth:e.itemSize,height:e.itemSize,color:e.colorText,fontFamily:e.fontFamily,lineHeight:te(e.itemSize),textAlign:"center",verticalAlign:"middle",listStyle:"none",borderRadius:e.borderRadius,cursor:"pointer",transition:`all ${e.motionDurationMid}`},[`${t}-prev, ${t}-next`]:{outline:0,button:{color:e.colorText,cursor:"pointer",userSelect:"none"},[`${t}-item-link`]:{display:"block",width:"100%",height:"100%",padding:0,fontSize:e.fontSizeSM,textAlign:"center",backgroundColor:"transparent",border:`${te(e.lineWidth)} ${e.lineType} transparent`,borderRadius:e.borderRadius,outline:"none",transition:`all ${e.motionDurationMid}`},[`&:hover ${t}-item-link`]:{backgroundColor:e.colorBgTextHover},[`&:active ${t}-item-link`]:{backgroundColor:e.colorBgTextActive},[`&${t}-disabled:hover`]:{[`${t}-item-link`]:{backgroundColor:"transparent"}}},[`${t}-slash`]:{marginInlineEnd:e.paginationSlashMarginInlineEnd,marginInlineStart:e.paginationSlashMarginInlineStart},[`${t}-options`]:{display:"inline-block",marginInlineStart:e.margin,verticalAlign:"middle","&-size-changer":{display:"inline-block",width:"auto"},"&-quick-jumper":{display:"inline-block",height:e.controlHeight,marginInlineStart:e.marginXS,lineHeight:te(e.controlHeight),verticalAlign:"top",input:Object.assign(Object.assign(Object.assign({},Lf(e)),dC(e,{borderColor:e.colorBorder,hoverBorderColor:e.colorPrimaryHover,activeBorderColor:e.colorPrimary,activeShadow:e.activeShadow})),{"&[disabled]":Object.assign({},Sg(e)),width:e.quickJumperInputWidth,height:e.controlHeight,boxSizing:"border-box",margin:0,marginInlineStart:e.marginXS,marginInlineEnd:e.marginXS})}}}},QG=e=>{const{componentCls:t}=e;return{[`${t}-item`]:{display:"inline-block",minWidth:e.itemSize,height:e.itemSize,marginInlineEnd:e.marginXS,fontFamily:e.fontFamily,lineHeight:te(e.calc(e.itemSize).sub(2).equal()),textAlign:"center",verticalAlign:"middle",listStyle:"none",backgroundColor:e.itemBg,border:`${te(e.lineWidth)} ${e.lineType} transparent`,borderRadius:e.borderRadius,outline:0,cursor:"pointer",userSelect:"none",a:{display:"block",padding:`0 ${te(e.paginationItemPaddingInline)}`,color:e.colorText,"&:hover":{textDecoration:"none"}},[`&:not(${t}-item-active)`]:{"&:hover":{transition:`all ${e.motionDurationMid}`,backgroundColor:e.colorBgTextHover},"&:active":{backgroundColor:e.colorBgTextActive}},"&-active":{fontWeight:e.fontWeightStrong,backgroundColor:e.itemActiveBg,borderColor:e.colorPrimary,a:{color:e.colorPrimary},"&:hover":{borderColor:e.colorPrimaryHover},"&:hover a":{color:e.colorPrimaryHover}}}}},ZG=e=>{const{componentCls:t}=e;return{[t]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},zn(e)),{display:"flex",flexWrap:"wrap",rowGap:e.paddingXS,"&-start":{justifyContent:"start"},"&-center":{justifyContent:"center"},"&-end":{justifyContent:"end"},"ul, ol":{margin:0,padding:0,listStyle:"none"},"&::after":{display:"block",clear:"both",height:0,overflow:"hidden",visibility:"hidden",content:'""'},[`${t}-total-text`]:{display:"inline-block",height:e.itemSize,marginInlineEnd:e.marginXS,lineHeight:te(e.calc(e.itemSize).sub(2).equal()),verticalAlign:"middle"}}),QG(e)),XG(e)),GG(e)),YG(e)),qG(e)),{[`@media only screen and (max-width: ${e.screenLG}px)`]:{[`${t}-item`]:{"&-after-jump-prev, &-before-jump-next":{display:"none"}}},[`@media only screen and (max-width: ${e.screenSM}px)`]:{[`${t}-options`]:{display:"none"}}}),[`&${e.componentCls}-rtl`]:{direction:"rtl"}}},JG=e=>{const{componentCls:t}=e;return{[`${t}:not(${t}-disabled)`]:{[`${t}-item`]:Object.assign({},Wo(e)),[`${t}-jump-prev, ${t}-jump-next`]:{"&:focus-visible":Object.assign({[`${t}-item-link-icon`]:{opacity:1},[`${t}-item-ellipsis`]:{opacity:0}},so(e))},[`${t}-prev, ${t}-next`]:{[`&:focus-visible ${t}-item-link`]:so(e)}}}},rD=e=>Object.assign({itemBg:e.colorBgContainer,itemSize:e.controlHeight,itemSizeSM:e.controlHeightSM,itemActiveBg:e.colorBgContainer,itemLinkBg:e.colorBgContainer,itemActiveColorDisabled:e.colorTextDisabled,itemActiveBgDisabled:e.controlItemBgActiveDisabled,itemInputBg:e.colorBgContainer,miniOptionsSizeChangerTop:0},Bs(e)),aD=e=>xn(e,{inputOutlineOffset:0,quickJumperInputWidth:e.calc(e.controlHeightLG).mul(1.25).equal(),paginationMiniOptionsMarginInlineStart:e.calc(e.marginXXS).div(2).equal(),paginationMiniQuickJumperInputWidth:e.calc(e.controlHeightLG).mul(1.1).equal(),paginationItemPaddingInline:e.calc(e.marginXXS).mul(1.5).equal(),paginationEllipsisLetterSpacing:e.calc(e.marginXXS).div(2).equal(),paginationSlashMarginInlineStart:e.marginSM,paginationSlashMarginInlineEnd:e.marginSM,paginationEllipsisTextIndent:"0.13em"},Hs(e)),eX=Kn("Pagination",e=>{const t=aD(e);return[ZG(t),JG(t)]},rD),tX=e=>{const{componentCls:t}=e;return{[`${t}${t}-bordered${t}-disabled:not(${t}-mini)`]:{"&, &:hover":{[`${t}-item-link`]:{borderColor:e.colorBorder}},"&:focus-visible":{[`${t}-item-link`]:{borderColor:e.colorBorder}},[`${t}-item, ${t}-item-link`]:{backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder,[`&:hover:not(${t}-item-active)`]:{backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder,a:{color:e.colorTextDisabled}},[`&${t}-item-active`]:{backgroundColor:e.itemActiveBgDisabled}},[`${t}-prev, ${t}-next`]:{"&:hover button":{backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder,color:e.colorTextDisabled},[`${t}-item-link`]:{backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder}}},[`${t}${t}-bordered:not(${t}-mini)`]:{[`${t}-prev, ${t}-next`]:{"&:hover button":{borderColor:e.colorPrimaryHover,backgroundColor:e.itemBg},[`${t}-item-link`]:{backgroundColor:e.itemLinkBg,borderColor:e.colorBorder},[`&:hover ${t}-item-link`]:{borderColor:e.colorPrimary,backgroundColor:e.itemBg,color:e.colorPrimary},[`&${t}-disabled`]:{[`${t}-item-link`]:{borderColor:e.colorBorder,color:e.colorTextDisabled}}},[`${t}-item`]:{backgroundColor:e.itemBg,border:`${te(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,[`&:hover:not(${t}-item-active)`]:{borderColor:e.colorPrimary,backgroundColor:e.itemBg,a:{color:e.colorPrimary}},"&-active":{borderColor:e.colorPrimary}}}}},nX=Nf(["Pagination","bordered"],e=>{const t=aD(e);return tX(t)},rD);function dI(e){return s.useMemo(()=>typeof e=="boolean"?[e,{}]:e&&typeof e=="object"?[!0,e]:[void 0,void 0],[e])}var rX=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,r=Object.getOwnPropertySymbols(e);a{const{align:t,prefixCls:n,selectPrefixCls:r,className:a,rootClassName:o,style:c,size:u,locale:f,responsive:d,showSizeChanger:h,selectComponentClass:v,pageSizeOptions:g}=e,b=rX(e,["align","prefixCls","selectPrefixCls","className","rootClassName","style","size","locale","responsive","showSizeChanger","selectComponentClass","pageSizeOptions"]),{xs:x}=dg(d),[,C]=Ta(),{getPrefixCls:y,direction:w,showSizeChanger:$,className:E,style:O}=ga("pagination"),I=y("pagination",n),[j,M,D]=eX(I),N=la(u),P=N==="small"||!!(x&&!N&&d),[A]=ho("Pagination",fN),F=Object.assign(Object.assign({},A),f),[H,k]=dI(h),[L,T]=dI($),z=H??L,V=k??T,q=v||Rt,G=s.useMemo(()=>g?g.map(Z=>Number(Z)):void 0,[g]),B=Z=>{var ae;const{disabled:re,size:ie,onSizeChange:ve,"aria-label":ue,className:oe,options:he}=Z,{className:fe,onChange:me}=V||{},le=(ae=he.find(pe=>String(pe.value)===String(ie)))===null||ae===void 0?void 0:ae.value;return s.createElement(q,Object.assign({disabled:re,showSearch:!0,popupMatchSelectWidth:!1,getPopupContainer:pe=>pe.parentNode,"aria-label":ue,options:he},V,{value:le,onChange:(pe,Ce)=>{ve?.(pe),me?.(pe,Ce)},size:P?"small":"middle",className:se(oe,fe)}))},U=s.useMemo(()=>{const Z=s.createElement("span",{className:`${I}-item-ellipsis`},"•••"),ae=s.createElement("button",{className:`${I}-item-link`,type:"button",tabIndex:-1},w==="rtl"?s.createElement(hf,null):s.createElement(bf,null)),re=s.createElement("button",{className:`${I}-item-link`,type:"button",tabIndex:-1},w==="rtl"?s.createElement(bf,null):s.createElement(hf,null)),ie=s.createElement("a",{className:`${I}-item-link`},s.createElement("div",{className:`${I}-item-container`},w==="rtl"?s.createElement(sI,{className:`${I}-item-link-icon`}):s.createElement(lI,{className:`${I}-item-link-icon`}),Z)),ve=s.createElement("a",{className:`${I}-item-link`},s.createElement("div",{className:`${I}-item-container`},w==="rtl"?s.createElement(lI,{className:`${I}-item-link-icon`}):s.createElement(sI,{className:`${I}-item-link-icon`}),Z));return{prevIcon:ae,nextIcon:re,jumpPrevIcon:ie,jumpNextIcon:ve}},[w,I]),K=y("select",r),Y=se({[`${I}-${t}`]:!!t,[`${I}-mini`]:P,[`${I}-rtl`]:w==="rtl",[`${I}-bordered`]:C.wireframe},E,a,o,M,D),Q=Object.assign(Object.assign({},O),c);return j(s.createElement(s.Fragment,null,C.wireframe&&s.createElement(nX,{prefixCls:I}),s.createElement(WG,Object.assign({},U,b,{style:Q,prefixCls:I,selectPrefixCls:K,className:Y,locale:F,pageSizeOptions:G,showSizeChanger:z,sizeChangerRender:B}))))},_v=100,oD=_v/5,lD=_v/2-oD/2,Fy=lD*2*Math.PI,fI=50,mI=e=>{const{dotClassName:t,style:n,hasCircleCls:r}=e;return s.createElement("circle",{className:se(`${t}-circle`,{[`${t}-circle-bg`]:r}),r:lD,cx:fI,cy:fI,strokeWidth:oD,style:n})},aX=({percent:e,prefixCls:t})=>{const n=`${t}-dot`,r=`${n}-holder`,a=`${r}-hidden`,[o,c]=s.useState(!1);fn(()=>{e!==0&&c(!0)},[e!==0]);const u=Math.max(Math.min(e,100),0);if(!o)return null;const f={strokeDashoffset:`${Fy/4}`,strokeDasharray:`${Fy*u/100} ${Fy*(100-u)/100}`};return s.createElement("span",{className:se(r,`${n}-progress`,u<=0&&a)},s.createElement("svg",{viewBox:`0 0 ${_v} ${_v}`,role:"progressbar","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":u},s.createElement(mI,{dotClassName:n,hasCircleCls:!0}),s.createElement(mI,{dotClassName:n,style:f})))};function iX(e){const{prefixCls:t,percent:n=0}=e,r=`${t}-dot`,a=`${r}-holder`,o=`${a}-hidden`;return s.createElement(s.Fragment,null,s.createElement("span",{className:se(a,n>0&&o)},s.createElement("span",{className:se(r,`${t}-dot-spin`)},[1,2,3,4].map(c=>s.createElement("i",{className:`${t}-dot-item`,key:c})))),s.createElement(aX,{prefixCls:t,percent:n}))}function oX(e){var t;const{prefixCls:n,indicator:r,percent:a}=e,o=`${n}-dot`;return r&&s.isValidElement(r)?$a(r,{className:se((t=r.props)===null||t===void 0?void 0:t.className,o),percent:a}):s.createElement(iX,{prefixCls:n,percent:a})}const lX=new jn("antSpinMove",{to:{opacity:1}}),sX=new jn("antRotate",{to:{transform:"rotate(405deg)"}}),cX=e=>{const{componentCls:t,calc:n}=e;return{[t]:Object.assign(Object.assign({},zn(e)),{position:"absolute",display:"none",color:e.colorPrimary,fontSize:0,textAlign:"center",verticalAlign:"middle",opacity:0,transition:`transform ${e.motionDurationSlow} ${e.motionEaseInOutCirc}`,"&-spinning":{position:"relative",display:"inline-block",opacity:1},[`${t}-text`]:{fontSize:e.fontSize,paddingTop:n(n(e.dotSize).sub(e.fontSize)).div(2).add(2).equal()},"&-fullscreen":{position:"fixed",width:"100vw",height:"100vh",backgroundColor:e.colorBgMask,zIndex:e.zIndexPopupBase,inset:0,display:"flex",alignItems:"center",flexDirection:"column",justifyContent:"center",opacity:0,visibility:"hidden",transition:`all ${e.motionDurationMid}`,"&-show":{opacity:1,visibility:"visible"},[t]:{[`${t}-dot-holder`]:{color:e.colorWhite},[`${t}-text`]:{color:e.colorTextLightSolid}}},"&-nested-loading":{position:"relative",[`> div > ${t}`]:{position:"absolute",top:0,insetInlineStart:0,zIndex:4,display:"block",width:"100%",height:"100%",maxHeight:e.contentHeight,[`${t}-dot`]:{position:"absolute",top:"50%",insetInlineStart:"50%",margin:n(e.dotSize).mul(-1).div(2).equal()},[`${t}-text`]:{position:"absolute",top:"50%",width:"100%",textShadow:`0 1px 2px ${e.colorBgContainer}`},[`&${t}-show-text ${t}-dot`]:{marginTop:n(e.dotSize).div(2).mul(-1).sub(10).equal()},"&-sm":{[`${t}-dot`]:{margin:n(e.dotSizeSM).mul(-1).div(2).equal()},[`${t}-text`]:{paddingTop:n(n(e.dotSizeSM).sub(e.fontSize)).div(2).add(2).equal()},[`&${t}-show-text ${t}-dot`]:{marginTop:n(e.dotSizeSM).div(2).mul(-1).sub(10).equal()}},"&-lg":{[`${t}-dot`]:{margin:n(e.dotSizeLG).mul(-1).div(2).equal()},[`${t}-text`]:{paddingTop:n(n(e.dotSizeLG).sub(e.fontSize)).div(2).add(2).equal()},[`&${t}-show-text ${t}-dot`]:{marginTop:n(e.dotSizeLG).div(2).mul(-1).sub(10).equal()}}},[`${t}-container`]:{position:"relative",transition:`opacity ${e.motionDurationSlow}`,"&::after":{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,zIndex:10,width:"100%",height:"100%",background:e.colorBgContainer,opacity:0,transition:`all ${e.motionDurationSlow}`,content:'""',pointerEvents:"none"}},[`${t}-blur`]:{clear:"both",opacity:.5,userSelect:"none",pointerEvents:"none","&::after":{opacity:.4,pointerEvents:"auto"}}},"&-tip":{color:e.spinDotDefault},[`${t}-dot-holder`]:{width:"1em",height:"1em",fontSize:e.dotSize,display:"inline-block",transition:`transform ${e.motionDurationSlow} ease, opacity ${e.motionDurationSlow} ease`,transformOrigin:"50% 50%",lineHeight:1,color:e.colorPrimary,"&-hidden":{transform:"scale(0.3)",opacity:0}},[`${t}-dot-progress`]:{position:"absolute",inset:0},[`${t}-dot`]:{position:"relative",display:"inline-block",fontSize:e.dotSize,width:"1em",height:"1em","&-item":{position:"absolute",display:"block",width:n(e.dotSize).sub(n(e.marginXXS).div(2)).div(2).equal(),height:n(e.dotSize).sub(n(e.marginXXS).div(2)).div(2).equal(),background:"currentColor",borderRadius:"100%",transform:"scale(0.75)",transformOrigin:"50% 50%",opacity:.3,animationName:lX,animationDuration:"1s",animationIterationCount:"infinite",animationTimingFunction:"linear",animationDirection:"alternate","&:nth-child(1)":{top:0,insetInlineStart:0,animationDelay:"0s"},"&:nth-child(2)":{top:0,insetInlineEnd:0,animationDelay:"0.4s"},"&:nth-child(3)":{insetInlineEnd:0,bottom:0,animationDelay:"0.8s"},"&:nth-child(4)":{bottom:0,insetInlineStart:0,animationDelay:"1.2s"}},"&-spin":{transform:"rotate(45deg)",animationName:sX,animationDuration:"1.2s",animationIterationCount:"infinite",animationTimingFunction:"linear"},"&-circle":{strokeLinecap:"round",transition:["stroke-dashoffset","stroke-dasharray","stroke","stroke-width","opacity"].map(r=>`${r} ${e.motionDurationSlow} ease`).join(","),fillOpacity:0,stroke:"currentcolor"},"&-circle-bg":{stroke:e.colorFillSecondary}},[`&-sm ${t}-dot`]:{"&, &-holder":{fontSize:e.dotSizeSM}},[`&-sm ${t}-dot-holder`]:{i:{width:n(n(e.dotSizeSM).sub(n(e.marginXXS).div(2))).div(2).equal(),height:n(n(e.dotSizeSM).sub(n(e.marginXXS).div(2))).div(2).equal()}},[`&-lg ${t}-dot`]:{"&, &-holder":{fontSize:e.dotSizeLG}},[`&-lg ${t}-dot-holder`]:{i:{width:n(n(e.dotSizeLG).sub(e.marginXXS)).div(2).equal(),height:n(n(e.dotSizeLG).sub(e.marginXXS)).div(2).equal()}},[`&${t}-show-text ${t}-text`]:{display:"block"}})}},uX=e=>{const{controlHeightLG:t,controlHeight:n}=e;return{contentHeight:400,dotSize:t/2,dotSizeSM:t*.35,dotSizeLG:n}},dX=Kn("Spin",e=>{const t=xn(e,{spinDotDefault:e.colorTextDescription});return cX(t)},uX),fX=200,hI=[[30,.05],[70,.03],[96,.01]];function mX(e,t){const[n,r]=s.useState(0),a=s.useRef(null),o=t==="auto";return s.useEffect(()=>(o&&e&&(r(0),a.current=setInterval(()=>{r(c=>{const u=100-c;for(let f=0;f{a.current&&(clearInterval(a.current),a.current=null)}),[o,e]),o?n:t}var hX=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,r=Object.getOwnPropertySymbols(e);a{var t;const{prefixCls:n,spinning:r=!0,delay:a=0,className:o,rootClassName:c,size:u="default",tip:f,wrapperClassName:d,style:h,children:v,fullscreen:g=!1,indicator:b,percent:x}=e,C=hX(e,["prefixCls","spinning","delay","className","rootClassName","size","tip","wrapperClassName","style","children","fullscreen","indicator","percent"]),{getPrefixCls:y,direction:w,className:$,style:E,indicator:O}=ga("spin"),I=y("spin",n),[j,M,D]=dX(I),[N,P]=s.useState(()=>r&&!vX(r,a)),A=mX(N,x);s.useEffect(()=>{if(r){const V=KW(a,()=>{P(!0)});return V(),()=>{var q;(q=V?.cancel)===null||q===void 0||q.call(V)}}P(!1)},[a,r]);const F=s.useMemo(()=>typeof v<"u"&&!g,[v,g]),H=se(I,$,{[`${I}-sm`]:u==="small",[`${I}-lg`]:u==="large",[`${I}-spinning`]:N,[`${I}-show-text`]:!!f,[`${I}-rtl`]:w==="rtl"},o,!g&&c,M,D),k=se(`${I}-container`,{[`${I}-blur`]:N}),L=(t=b??O)!==null&&t!==void 0?t:sD,T=Object.assign(Object.assign({},E),h),z=s.createElement("div",Object.assign({},C,{style:T,className:H,"aria-live":"polite","aria-busy":N}),s.createElement(oX,{prefixCls:I,indicator:L,percent:A}),f&&(F||g)?s.createElement("div",{className:`${I}-text`},f):null);return j(F?s.createElement("div",Object.assign({},C,{className:se(`${I}-nested-loading`,d,M,D)}),N&&s.createElement("div",{key:"loading"},z),s.createElement("div",{className:k,key:"container"},v)):g?s.createElement("div",{className:se(`${I}-fullscreen`,{[`${I}-fullscreen-show`]:N},c,M,D)},z):z)};Ff.setDefaultIndicator=e=>{sD=e};const RC=Se.createContext({});RC.Consumer;var cD=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,r=Object.getOwnPropertySymbols(e);a{var{prefixCls:t,className:n,avatar:r,title:a,description:o}=e,c=cD(e,["prefixCls","className","avatar","title","description"]);const{getPrefixCls:u}=s.useContext(Wt),f=u("list",t),d=se(`${f}-item-meta`,n),h=Se.createElement("div",{className:`${f}-item-meta-content`},a&&Se.createElement("h4",{className:`${f}-item-meta-title`},a),o&&Se.createElement("div",{className:`${f}-item-meta-description`},o));return Se.createElement("div",Object.assign({},c,{className:d}),r&&Se.createElement("div",{className:`${f}-item-meta-avatar`},r),(a||o)&&h)},pX=Se.forwardRef((e,t)=>{const{prefixCls:n,children:r,actions:a,extra:o,styles:c,className:u,classNames:f,colStyle:d}=e,h=cD(e,["prefixCls","children","actions","extra","styles","className","classNames","colStyle"]),{grid:v,itemLayout:g}=s.useContext(RC),{getPrefixCls:b,list:x}=s.useContext(Wt),C=M=>{var D,N;return se((N=(D=x?.item)===null||D===void 0?void 0:D.classNames)===null||N===void 0?void 0:N[M],f?.[M])},y=M=>{var D,N;return Object.assign(Object.assign({},(N=(D=x?.item)===null||D===void 0?void 0:D.styles)===null||N===void 0?void 0:N[M]),c?.[M])},w=()=>{let M=!1;return s.Children.forEach(r,D=>{typeof D=="string"&&(M=!0)}),M&&s.Children.count(r)>1},$=()=>g==="vertical"?!!o:!w(),E=b("list",n),O=a&&a.length>0&&Se.createElement("ul",{className:se(`${E}-item-action`,C("actions")),key:"actions",style:y("actions")},a.map((M,D)=>Se.createElement("li",{key:`${E}-item-action-${D}`},M,D!==a.length-1&&Se.createElement("em",{className:`${E}-item-action-split`})))),I=v?"div":"li",j=Se.createElement(I,Object.assign({},h,v?{}:{ref:t},{className:se(`${E}-item`,{[`${E}-item-no-flex`]:!$()},u)}),g==="vertical"&&o?[Se.createElement("div",{className:`${E}-item-main`,key:"content"},r,O),Se.createElement("div",{className:se(`${E}-item-extra`,C("extra")),key:"extra",style:y("extra")},o)]:[r,O,$a(o,{key:"extra"})]);return v?Se.createElement(xC,{ref:t,flex:1,style:d},j):j}),uD=pX;uD.Meta=gX;const bX=e=>{const{listBorderedCls:t,componentCls:n,paddingLG:r,margin:a,itemPaddingSM:o,itemPaddingLG:c,marginLG:u,borderRadiusLG:f}=e,d=te(e.calc(f).sub(e.lineWidth).equal());return{[t]:{border:`${te(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderRadius:f,[`${n}-header`]:{borderRadius:`${d} ${d} 0 0`},[`${n}-footer`]:{borderRadius:`0 0 ${d} ${d}`},[`${n}-header,${n}-footer,${n}-item`]:{paddingInline:r},[`${n}-pagination`]:{margin:`${te(a)} ${te(u)}`}},[`${t}${n}-sm`]:{[`${n}-item,${n}-header,${n}-footer`]:{padding:o}},[`${t}${n}-lg`]:{[`${n}-item,${n}-header,${n}-footer`]:{padding:c}}}},yX=e=>{const{componentCls:t,screenSM:n,screenMD:r,marginLG:a,marginSM:o,margin:c}=e;return{[`@media screen and (max-width:${r}px)`]:{[t]:{[`${t}-item`]:{[`${t}-item-action`]:{marginInlineStart:a}}},[`${t}-vertical`]:{[`${t}-item`]:{[`${t}-item-extra`]:{marginInlineStart:a}}}},[`@media screen and (max-width: ${n}px)`]:{[t]:{[`${t}-item`]:{flexWrap:"wrap",[`${t}-action`]:{marginInlineStart:o}}},[`${t}-vertical`]:{[`${t}-item`]:{flexWrap:"wrap-reverse",[`${t}-item-main`]:{minWidth:e.contentWidth},[`${t}-item-extra`]:{margin:`auto auto ${te(c)}`}}}}}},xX=e=>{const{componentCls:t,antCls:n,controlHeight:r,minHeight:a,paddingSM:o,marginLG:c,padding:u,itemPadding:f,colorPrimary:d,itemPaddingSM:h,itemPaddingLG:v,paddingXS:g,margin:b,colorText:x,colorTextDescription:C,motionDurationSlow:y,lineWidth:w,headerBg:$,footerBg:E,emptyTextPadding:O,metaMarginBottom:I,avatarMarginRight:j,titleMarginBottom:M,descriptionFontSize:D}=e;return{[t]:Object.assign(Object.assign({},zn(e)),{position:"relative","--rc-virtual-list-scrollbar-bg":e.colorSplit,"*":{outline:"none"},[`${t}-header`]:{background:$},[`${t}-footer`]:{background:E},[`${t}-header, ${t}-footer`]:{paddingBlock:o},[`${t}-pagination`]:{marginBlockStart:c,[`${n}-pagination-options`]:{textAlign:"start"}},[`${t}-spin`]:{minHeight:a,textAlign:"center"},[`${t}-items`]:{margin:0,padding:0,listStyle:"none"},[`${t}-item`]:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:f,color:x,[`${t}-item-meta`]:{display:"flex",flex:1,alignItems:"flex-start",maxWidth:"100%",[`${t}-item-meta-avatar`]:{marginInlineEnd:j},[`${t}-item-meta-content`]:{flex:"1 0",width:0,color:x},[`${t}-item-meta-title`]:{margin:`0 0 ${te(e.marginXXS)} 0`,color:x,fontSize:e.fontSize,lineHeight:e.lineHeight,"> a":{color:x,transition:`all ${y}`,"&:hover":{color:d}}},[`${t}-item-meta-description`]:{color:C,fontSize:D,lineHeight:e.lineHeight}},[`${t}-item-action`]:{flex:"0 0 auto",marginInlineStart:e.marginXXL,padding:0,fontSize:0,listStyle:"none","& > li":{position:"relative",display:"inline-block",padding:`0 ${te(g)}`,color:C,fontSize:e.fontSize,lineHeight:e.lineHeight,textAlign:"center","&:first-child":{paddingInlineStart:0}},[`${t}-item-action-split`]:{position:"absolute",insetBlockStart:"50%",insetInlineEnd:0,width:w,height:e.calc(e.fontHeight).sub(e.calc(e.marginXXS).mul(2)).equal(),transform:"translateY(-50%)",backgroundColor:e.colorSplit}}},[`${t}-empty`]:{padding:`${te(u)} 0`,color:C,fontSize:e.fontSizeSM,textAlign:"center"},[`${t}-empty-text`]:{padding:O,color:e.colorTextDisabled,fontSize:e.fontSize,textAlign:"center"},[`${t}-item-no-flex`]:{display:"block"}}),[`${t}-grid ${n}-col > ${t}-item`]:{display:"block",maxWidth:"100%",marginBlockEnd:b,paddingBlock:0,borderBlockEnd:"none"},[`${t}-vertical ${t}-item`]:{alignItems:"initial",[`${t}-item-main`]:{display:"block",flex:1},[`${t}-item-extra`]:{marginInlineStart:c},[`${t}-item-meta`]:{marginBlockEnd:I,[`${t}-item-meta-title`]:{marginBlockStart:0,marginBlockEnd:M,color:x,fontSize:e.fontSizeLG,lineHeight:e.lineHeightLG}},[`${t}-item-action`]:{marginBlockStart:u,marginInlineStart:"auto","> li":{padding:`0 ${te(u)}`,"&:first-child":{paddingInlineStart:0}}}},[`${t}-split ${t}-item`]:{borderBlockEnd:`${te(e.lineWidth)} ${e.lineType} ${e.colorSplit}`,"&:last-child":{borderBlockEnd:"none"}},[`${t}-split ${t}-header`]:{borderBlockEnd:`${te(e.lineWidth)} ${e.lineType} ${e.colorSplit}`},[`${t}-split${t}-empty ${t}-footer`]:{borderTop:`${te(e.lineWidth)} ${e.lineType} ${e.colorSplit}`},[`${t}-loading ${t}-spin-nested-loading`]:{minHeight:r},[`${t}-split${t}-something-after-last-item ${n}-spin-container > ${t}-items > ${t}-item:last-child`]:{borderBlockEnd:`${te(e.lineWidth)} ${e.lineType} ${e.colorSplit}`},[`${t}-lg ${t}-item`]:{padding:v},[`${t}-sm ${t}-item`]:{padding:h},[`${t}:not(${t}-vertical)`]:{[`${t}-item-no-flex`]:{[`${t}-item-action`]:{float:"right"}}}}},SX=e=>({contentWidth:220,itemPadding:`${te(e.paddingContentVertical)} 0`,itemPaddingSM:`${te(e.paddingContentVerticalSM)} ${te(e.paddingContentHorizontal)}`,itemPaddingLG:`${te(e.paddingContentVerticalLG)} ${te(e.paddingContentHorizontalLG)}`,headerBg:"transparent",footerBg:"transparent",emptyTextPadding:e.padding,metaMarginBottom:e.padding,avatarMarginRight:e.padding,titleMarginBottom:e.paddingSM,descriptionFontSize:e.fontSize}),CX=Kn("List",e=>{const t=xn(e,{listBorderedCls:`${e.componentCls}-bordered`,minHeight:e.controlHeightLG});return[xX(t),bX(t),yX(t)]},SX);var wX=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,r=Object.getOwnPropertySymbols(e);a(Ee,we)=>{var Fe;D(Ee),P(we),n&&((Fe=n?.[Ie])===null||Fe===void 0||Fe.call(n,Ee,we))},V=z("onChange"),q=z("onShowSizeChange"),G=(Ie,Ee)=>{if(!E)return null;let we;return typeof $=="function"?we=$(Ie):$?we=Ie[$]:we=Ie.key,we||(we=`list-item-${Ee}`),s.createElement(s.Fragment,{key:we},E(Ie,Ee))},B=!!(v||n||y),U=A("list",r),[K,Y,Q]=CX(U);let Z=w;typeof Z=="boolean"&&(Z={spinning:Z});const ae=!!Z?.spinning,re=la(x);let ie="";switch(re){case"large":ie="lg";break;case"small":ie="sm";break}const ve=se(U,{[`${U}-vertical`]:h==="vertical",[`${U}-${ie}`]:ie,[`${U}-split`]:o,[`${U}-bordered`]:a,[`${U}-loading`]:ae,[`${U}-grid`]:!!g,[`${U}-something-after-last-item`]:B,[`${U}-rtl`]:F==="rtl"},H,c,u,Y,Q),ue=gf(T,{total:b.length,current:M,pageSize:N},n||{}),oe=Math.ceil(ue.total/ue.pageSize);ue.current=Math.min(ue.current,oe);const he=n&&s.createElement("div",{className:se(`${U}-pagination`)},s.createElement(iD,Object.assign({align:"end"},ue,{onChange:V,onShowSizeChange:q})));let fe=ke(b);n&&b.length>(ue.current-1)*ue.pageSize&&(fe=ke(b).splice((ue.current-1)*ue.pageSize,ue.pageSize));const me=Object.keys(g||{}).some(Ie=>["xs","sm","md","lg","xl","xxl"].includes(Ie)),le=dg(me),pe=s.useMemo(()=>{for(let Ie=0;Ie{if(!g)return;const Ie=pe&&g[pe]?g[pe]:g.column;if(Ie)return{width:`${100/Ie}%`,maxWidth:`${100/Ie}%`}},[JSON.stringify(g),pe]);let De=ae&&s.createElement("div",{style:{minHeight:53}});if(fe.length>0){const Ie=fe.map(G);De=g?s.createElement(DT,{gutter:g.gutter},s.Children.map(Ie,Ee=>s.createElement("div",{key:Ee?.key,style:Ce},Ee))):s.createElement("ul",{className:`${U}-items`},Ie)}else!d&&!ae&&(De=s.createElement("div",{className:`${U}-empty-text`},O?.emptyText||L?.("List")||s.createElement(KS,{componentName:"List"})));const je=ue.position,ge=s.useMemo(()=>({grid:g,itemLayout:h}),[JSON.stringify(g),h]);return K(s.createElement(RC.Provider,{value:ge},s.createElement("div",Object.assign({ref:t,style:Object.assign(Object.assign({},k),f),className:ve},I),(je==="top"||je==="both")&&he,C&&s.createElement("div",{className:`${U}-header`},C),s.createElement(Ff,Object.assign({},Z),De,d),y&&s.createElement("div",{className:`${U}-footer`},y),v||(je==="bottom"||je==="both")&&he)))}const EX=s.forwardRef($X),Rx=EX;Rx.Item=uD;const _X=(e,t=!1)=>t&&e==null?[]:Array.isArray(e)?e:[e];let yi=null,Ss=e=>e(),xf=[],Sf={};function vI(){const{getContainer:e,duration:t,rtl:n,maxCount:r,top:a}=Sf,o=e?.()||document.body;return{getContainer:()=>o,duration:t,rtl:n,maxCount:r,top:a}}const OX=Se.forwardRef((e,t)=>{const{messageConfig:n,sync:r}=e,{getPrefixCls:a}=s.useContext(Wt),o=Sf.prefixCls||a("message"),c=s.useContext(LB),[u,f]=tM(Object.assign(Object.assign(Object.assign({},n),{prefixCls:o}),c.message));return Se.useImperativeHandle(t,()=>{const d=Object.assign({},u);return Object.keys(d).forEach(h=>{d[h]=(...v)=>(r(),u[h].apply(u,v))}),{instance:d,sync:r}}),f}),IX=Se.forwardRef((e,t)=>{const[n,r]=Se.useState(vI),a=()=>{r(vI)};Se.useEffect(a,[]);const o=e5(),c=o.getRootPrefixCls(),u=o.getIconPrefixCls(),f=o.getTheme(),d=Se.createElement(OX,{ref:t,sync:a,messageConfig:n});return Se.createElement(vo,{prefixCls:c,iconPrefixCls:u,theme:f},o.holderRender?o.holderRender(d):d)}),Eg=()=>{if(!yi){const e=document.createDocumentFragment(),t={fragment:e};yi=t,Ss(()=>{aM()(Se.createElement(IX,{ref:r=>{const{instance:a,sync:o}=r||{};Promise.resolve().then(()=>{!t.instance&&a&&(t.instance=a,t.sync=o,Eg())})}}),e)});return}yi.instance&&(xf.forEach(e=>{const{type:t,skipped:n}=e;if(!n)switch(t){case"open":{Ss(()=>{const r=yi.instance.open(Object.assign(Object.assign({},Sf),e.config));r?.then(e.resolve),e.setCloseFn(r)});break}case"destroy":Ss(()=>{yi?.instance.destroy(e.key)});break;default:Ss(()=>{var r;const a=(r=yi.instance)[t].apply(r,ke(e.args));a?.then(e.resolve),e.setCloseFn(a)})}}),xf=[])};function RX(e){Sf=Object.assign(Object.assign({},Sf),e),Ss(()=>{var t;(t=yi?.sync)===null||t===void 0||t.call(yi)})}function NX(e){const t=RS(n=>{let r;const a={type:"open",config:e,resolve:n,setCloseFn:o=>{r=o}};return xf.push(a),()=>{r?Ss(()=>{r()}):a.skipped=!0}});return Eg(),t}function MX(e,t){const n=RS(r=>{let a;const o={type:e,args:t,resolve:r,setCloseFn:c=>{a=c}};return xf.push(o),()=>{a?Ss(()=>{a()}):o.skipped=!0}});return Eg(),n}const jX=e=>{xf.push({type:"destroy",key:e}),Eg()},TX=["success","info","warning","error","loading"],DX={open:NX,destroy:jX,config:RX,useMessage:g8,_InternalPanelDoNotUseOrYouWillBeFired:s8},NC=DX;TX.forEach(e=>{NC[e]=(...t)=>MX(e,t)});var PX={percent:0,prefixCls:"rc-progress",strokeColor:"#2db7f5",strokeLinecap:"round",strokeWidth:1,trailColor:"#D9D9D9",trailWidth:1,gapPosition:"bottom"},kX=function(){var t=s.useRef([]),n=s.useRef(null);return s.useEffect(function(){var r=Date.now(),a=!1;t.current.forEach(function(o){if(o){a=!0;var c=o.style;c.transitionDuration=".3s, .3s, .3s, .06s",n.current&&r-n.current<100&&(c.transitionDuration="0s, 0s")}}),a&&(n.current=Date.now())}),t.current},gI=0,AX=wa();function zX(){var e;return AX?(e=gI,gI+=1):e="TEST_OR_SSR",e}const LX=(function(e){var t=s.useState(),n=ce(t,2),r=n[0],a=n[1];return s.useEffect(function(){a("rc_progress_".concat(zX()))},[]),e||r});var pI=function(t){var n=t.bg,r=t.children;return s.createElement("div",{style:{width:"100%",height:"100%",background:n}},r)};function bI(e,t){return Object.keys(e).map(function(n){var r=parseFloat(n),a="".concat(Math.floor(r*t),"%");return"".concat(e[n]," ").concat(a)})}var HX=s.forwardRef(function(e,t){var n=e.prefixCls,r=e.color,a=e.gradientId,o=e.radius,c=e.style,u=e.ptg,f=e.strokeLinecap,d=e.strokeWidth,h=e.size,v=e.gapDegree,g=r&&jt(r)==="object",b=g?"#FFF":void 0,x=h/2,C=s.createElement("circle",{className:"".concat(n,"-circle-path"),r:o,cx:x,cy:x,stroke:b,strokeLinecap:f,strokeWidth:d,opacity:u===0?0:1,style:c,ref:t});if(!g)return C;var y="".concat(a,"-conic"),w=v?"".concat(180+v/2,"deg"):"0deg",$=bI(r,(360-v)/360),E=bI(r,1),O="conic-gradient(from ".concat(w,", ").concat($.join(", "),")"),I="linear-gradient(to ".concat(v?"bottom":"top",", ").concat(E.join(", "),")");return s.createElement(s.Fragment,null,s.createElement("mask",{id:y},C),s.createElement("foreignObject",{x:0,y:0,width:h,height:h,mask:"url(#".concat(y,")")},s.createElement(pI,{bg:I},s.createElement(pI,{bg:O}))))}),Hd=100,Vy=function(t,n,r,a,o,c,u,f,d,h){var v=arguments.length>10&&arguments[10]!==void 0?arguments[10]:0,g=r/100*360*((360-c)/360),b=c===0?0:{bottom:0,top:180,left:90,right:-90}[u],x=(100-a)/100*n;d==="round"&&a!==100&&(x+=h/2,x>=n&&(x=n-.01));var C=Hd/2;return{stroke:typeof f=="string"?f:void 0,strokeDasharray:"".concat(n,"px ").concat(t),strokeDashoffset:x+v,transform:"rotate(".concat(o+g+b,"deg)"),transformOrigin:"".concat(C,"px ").concat(C,"px"),transition:"stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s, opacity .3s ease 0s",fillOpacity:0}},BX=["id","prefixCls","steps","strokeWidth","trailWidth","gapDegree","gapPosition","trailColor","strokeLinecap","style","className","strokeColor","percent"];function yI(e){var t=e??[];return Array.isArray(t)?t:[t]}var FX=function(t){var n=ee(ee({},PX),t),r=n.id,a=n.prefixCls,o=n.steps,c=n.strokeWidth,u=n.trailWidth,f=n.gapDegree,d=f===void 0?0:f,h=n.gapPosition,v=n.trailColor,g=n.strokeLinecap,b=n.style,x=n.className,C=n.strokeColor,y=n.percent,w=Kt(n,BX),$=Hd/2,E=LX(r),O="".concat(E,"-gradient"),I=$-c/2,j=Math.PI*2*I,M=d>0?90+d/2:-90,D=j*((360-d)/360),N=jt(o)==="object"?o:{count:o,gap:2},P=N.count,A=N.gap,F=yI(y),H=yI(C),k=H.find(function(B){return B&&jt(B)==="object"}),L=k&&jt(k)==="object",T=L?"butt":g,z=Vy(j,D,0,100,M,d,h,v,T,c),V=kX(),q=function(){var U=0;return F.map(function(K,Y){var Q=H[Y]||H[H.length-1],Z=Vy(j,D,U,K,M,d,h,Q,T,c);return U+=K,s.createElement(HX,{key:Y,color:Q,ptg:K,radius:I,prefixCls:a,gradientId:O,style:Z,strokeLinecap:T,strokeWidth:c,gapDegree:d,ref:function(re){V[Y]=re},size:Hd})}).reverse()},G=function(){var U=Math.round(P*(F[0]/100)),K=100/P,Y=0;return new Array(P).fill(null).map(function(Q,Z){var ae=Z<=U-1?H[0]:v,re=ae&&jt(ae)==="object"?"url(#".concat(O,")"):void 0,ie=Vy(j,D,Y,K,M,d,h,ae,"butt",c,A);return Y+=(D-ie.strokeDashoffset+A)*100/D,s.createElement("circle",{key:Z,className:"".concat(a,"-circle-path"),r:I,cx:$,cy:$,stroke:re,strokeWidth:c,opacity:1,style:ie,ref:function(ue){V[Z]=ue}})})};return s.createElement("svg",Me({className:se("".concat(a,"-circle"),x),viewBox:"0 0 ".concat(Hd," ").concat(Hd),style:b,id:r,role:"presentation"},w),!P&&s.createElement("circle",{className:"".concat(a,"-circle-trail"),r:I,cx:$,cy:$,stroke:v,strokeLinecap:T,strokeWidth:u||c,style:z}),P?G():q())};function zl(e){return!e||e<0?0:e>100?100:e}function Ov({success:e,successPercent:t}){let n=t;return e&&"progress"in e&&(n=e.progress),e&&"percent"in e&&(n=e.percent),n}const VX=({percent:e,success:t,successPercent:n})=>{const r=zl(Ov({success:t,successPercent:n}));return[r,zl(zl(e)-r)]},KX=({success:e={},strokeColor:t})=>{const{strokeColor:n}=e;return[n||Vc.green,t||null]},_g=(e,t,n)=>{var r,a,o,c;let u=-1,f=-1;if(t==="step"){const d=n.steps,h=n.strokeWidth;typeof e=="string"||typeof e>"u"?(u=e==="small"?2:14,f=h??8):typeof e=="number"?[u,f]=[e,e]:[u=14,f=8]=Array.isArray(e)?e:[e.width,e.height],u*=d}else if(t==="line"){const d=n?.strokeWidth;typeof e=="string"||typeof e>"u"?f=d||(e==="small"?6:8):typeof e=="number"?[u,f]=[e,e]:[u=-1,f=8]=Array.isArray(e)?e:[e.width,e.height]}else(t==="circle"||t==="dashboard")&&(typeof e=="string"||typeof e>"u"?[u,f]=e==="small"?[60,60]:[120,120]:typeof e=="number"?[u,f]=[e,e]:Array.isArray(e)&&(u=(a=(r=e[0])!==null&&r!==void 0?r:e[1])!==null&&a!==void 0?a:120,f=(c=(o=e[0])!==null&&o!==void 0?o:e[1])!==null&&c!==void 0?c:120));return[u,f]},UX=3,WX=e=>UX/e*100,qX=e=>{const{prefixCls:t,trailColor:n=null,strokeLinecap:r="round",gapPosition:a,gapDegree:o,width:c=120,type:u,children:f,success:d,size:h=c,steps:v}=e,[g,b]=_g(h,"circle");let{strokeWidth:x}=e;x===void 0&&(x=Math.max(WX(g),6));const C={width:g,height:b,fontSize:g*.15+6},y=s.useMemo(()=>{if(o||o===0)return o;if(u==="dashboard")return 75},[o,u]),w=VX(e),$=a||u==="dashboard"&&"bottom"||void 0,E=Object.prototype.toString.call(e.strokeColor)==="[object Object]",O=KX({success:d,strokeColor:e.strokeColor}),I=se(`${t}-inner`,{[`${t}-circle-gradient`]:E}),j=s.createElement(FX,{steps:v,percent:v?w[1]:w,strokeWidth:x,trailWidth:x,strokeColor:v?O[1]:O,strokeLinecap:r,trailColor:n,prefixCls:t,gapDegree:y,gapPosition:$}),M=g<=20,D=s.createElement("div",{className:I,style:C},j,!M&&f);return M?s.createElement(Ei,{title:f},D):D},Iv="--progress-line-stroke-color",dD="--progress-percent",xI=e=>{const t=e?"100%":"-100%";return new jn(`antProgress${e?"RTL":"LTR"}Active`,{"0%":{transform:`translateX(${t}) scaleX(0)`,opacity:.1},"20%":{transform:`translateX(${t}) scaleX(0)`,opacity:.5},to:{transform:"translateX(0) scaleX(1)",opacity:0}})},YX=e=>{const{componentCls:t,iconCls:n}=e;return{[t]:Object.assign(Object.assign({},zn(e)),{display:"inline-block","&-rtl":{direction:"rtl"},"&-line":{position:"relative",width:"100%",fontSize:e.fontSize},[`${t}-outer`]:{display:"inline-flex",alignItems:"center",width:"100%"},[`${t}-inner`]:{position:"relative",display:"inline-block",width:"100%",flex:1,overflow:"hidden",verticalAlign:"middle",backgroundColor:e.remainingColor,borderRadius:e.lineBorderRadius},[`${t}-inner:not(${t}-circle-gradient)`]:{[`${t}-circle-path`]:{stroke:e.defaultColor}},[`${t}-success-bg, ${t}-bg`]:{position:"relative",background:e.defaultColor,borderRadius:e.lineBorderRadius,transition:`all ${e.motionDurationSlow} ${e.motionEaseInOutCirc}`},[`${t}-layout-bottom`]:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",[`${t}-text`]:{width:"max-content",marginInlineStart:0,marginTop:e.marginXXS}},[`${t}-bg`]:{overflow:"hidden","&::after":{content:'""',background:{_multi_value_:!0,value:["inherit",`var(${Iv})`]},height:"100%",width:`calc(1 / var(${dD}) * 100%)`,display:"block"},[`&${t}-bg-inner`]:{minWidth:"max-content","&::after":{content:"none"},[`${t}-text-inner`]:{color:e.colorWhite,[`&${t}-text-bright`]:{color:"rgba(0, 0, 0, 0.45)"}}}},[`${t}-success-bg`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,backgroundColor:e.colorSuccess},[`${t}-text`]:{display:"inline-block",marginInlineStart:e.marginXS,color:e.colorText,lineHeight:1,width:"2em",whiteSpace:"nowrap",textAlign:"start",verticalAlign:"middle",wordBreak:"normal",[n]:{fontSize:e.fontSize},[`&${t}-text-outer`]:{width:"max-content"},[`&${t}-text-outer${t}-text-start`]:{width:"max-content",marginInlineStart:0,marginInlineEnd:e.marginXS}},[`${t}-text-inner`]:{display:"flex",justifyContent:"center",alignItems:"center",width:"100%",height:"100%",marginInlineStart:0,padding:`0 ${te(e.paddingXXS)}`,[`&${t}-text-start`]:{justifyContent:"start"},[`&${t}-text-end`]:{justifyContent:"end"}},[`&${t}-status-active`]:{[`${t}-bg::before`]:{position:"absolute",inset:0,backgroundColor:e.colorBgContainer,borderRadius:e.lineBorderRadius,opacity:0,animationName:xI(),animationDuration:e.progressActiveMotionDuration,animationTimingFunction:e.motionEaseOutQuint,animationIterationCount:"infinite",content:'""'}},[`&${t}-rtl${t}-status-active`]:{[`${t}-bg::before`]:{animationName:xI(!0)}},[`&${t}-status-exception`]:{[`${t}-bg`]:{backgroundColor:e.colorError},[`${t}-text`]:{color:e.colorError}},[`&${t}-status-exception ${t}-inner:not(${t}-circle-gradient)`]:{[`${t}-circle-path`]:{stroke:e.colorError}},[`&${t}-status-success`]:{[`${t}-bg`]:{backgroundColor:e.colorSuccess},[`${t}-text`]:{color:e.colorSuccess}},[`&${t}-status-success ${t}-inner:not(${t}-circle-gradient)`]:{[`${t}-circle-path`]:{stroke:e.colorSuccess}}})}},GX=e=>{const{componentCls:t,iconCls:n}=e;return{[t]:{[`${t}-circle-trail`]:{stroke:e.remainingColor},[`&${t}-circle ${t}-inner`]:{position:"relative",lineHeight:1,backgroundColor:"transparent"},[`&${t}-circle ${t}-text`]:{position:"absolute",insetBlockStart:"50%",insetInlineStart:0,width:"100%",margin:0,padding:0,color:e.circleTextColor,fontSize:e.circleTextFontSize,lineHeight:1,whiteSpace:"normal",textAlign:"center",transform:"translateY(-50%)",[n]:{fontSize:e.circleIconFontSize}},[`${t}-circle&-status-exception`]:{[`${t}-text`]:{color:e.colorError}},[`${t}-circle&-status-success`]:{[`${t}-text`]:{color:e.colorSuccess}}},[`${t}-inline-circle`]:{lineHeight:1,[`${t}-inner`]:{verticalAlign:"bottom"}}}},XX=e=>{const{componentCls:t}=e;return{[t]:{[`${t}-steps`]:{display:"inline-block","&-outer":{display:"flex",flexDirection:"row",alignItems:"center"},"&-item":{flexShrink:0,minWidth:e.progressStepMinWidth,marginInlineEnd:e.progressStepMarginInlineEnd,backgroundColor:e.remainingColor,transition:`all ${e.motionDurationSlow}`,"&-active":{backgroundColor:e.defaultColor}}}}}},QX=e=>{const{componentCls:t,iconCls:n}=e;return{[t]:{[`${t}-small&-line, ${t}-small&-line ${t}-text ${n}`]:{fontSize:e.fontSizeSM}}}},ZX=e=>({circleTextColor:e.colorText,defaultColor:e.colorInfo,remainingColor:e.colorFillSecondary,lineBorderRadius:100,circleTextFontSize:"1em",circleIconFontSize:`${e.fontSize/e.fontSizeSM}em`}),JX=Kn("Progress",e=>{const t=e.calc(e.marginXXS).div(2).equal(),n=xn(e,{progressStepMarginInlineEnd:t,progressStepMinWidth:t,progressActiveMotionDuration:"2.4s"});return[YX(n),GX(n),XX(n),QX(n)]},ZX);var eQ=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,r=Object.getOwnPropertySymbols(e);a{let t=[];return Object.keys(e).forEach(n=>{const r=Number.parseFloat(n.replace(/%/g,""));Number.isNaN(r)||t.push({key:r,value:e[n]})}),t=t.sort((n,r)=>n.key-r.key),t.map(({key:n,value:r})=>`${r} ${n}%`).join(", ")},nQ=(e,t)=>{const{from:n=Vc.blue,to:r=Vc.blue,direction:a=t==="rtl"?"to left":"to right"}=e,o=eQ(e,["from","to","direction"]);if(Object.keys(o).length!==0){const u=tQ(o),f=`linear-gradient(${a}, ${u})`;return{background:f,[Iv]:f}}const c=`linear-gradient(${a}, ${n}, ${r})`;return{background:c,[Iv]:c}},rQ=e=>{const{prefixCls:t,direction:n,percent:r,size:a,strokeWidth:o,strokeColor:c,strokeLinecap:u="round",children:f,trailColor:d=null,percentPosition:h,success:v}=e,{align:g,type:b}=h,x=c&&typeof c!="string"?nQ(c,n):{[Iv]:c,background:c},C=u==="square"||u==="butt"?0:void 0,y=a??[-1,o||(a==="small"?6:8)],[w,$]=_g(y,"line",{strokeWidth:o}),E={backgroundColor:d||void 0,borderRadius:C},O=Object.assign(Object.assign({width:`${zl(r)}%`,height:$,borderRadius:C},x),{[dD]:zl(r)/100}),I=Ov(e),j={width:`${zl(I)}%`,height:$,borderRadius:C,backgroundColor:v?.strokeColor},M={width:w<0?"100%":w},D=s.createElement("div",{className:`${t}-inner`,style:E},s.createElement("div",{className:se(`${t}-bg`,`${t}-bg-${b}`),style:O},b==="inner"&&f),I!==void 0&&s.createElement("div",{className:`${t}-success-bg`,style:j})),N=b==="outer"&&g==="start",P=b==="outer"&&g==="end";return b==="outer"&&g==="center"?s.createElement("div",{className:`${t}-layout-bottom`},D,f):s.createElement("div",{className:`${t}-outer`,style:M},N&&f,D,P&&f)},aQ=e=>{const{size:t,steps:n,rounding:r=Math.round,percent:a=0,strokeWidth:o=8,strokeColor:c,trailColor:u=null,prefixCls:f,children:d}=e,h=r(n*(a/100)),g=t??[t==="small"?2:14,o],[b,x]=_g(g,"step",{steps:n,strokeWidth:o}),C=b/n,y=Array.from({length:n});for(let w=0;w{const{prefixCls:n,className:r,rootClassName:a,steps:o,strokeColor:c,percent:u=0,size:f="default",showInfo:d=!0,type:h="line",status:v,format:g,style:b,percentPosition:x={}}=e,C=iQ(e,["prefixCls","className","rootClassName","steps","strokeColor","percent","size","showInfo","type","status","format","style","percentPosition"]),{align:y="end",type:w="outer"}=x,$=Array.isArray(c)?c[0]:c,E=typeof c=="string"||Array.isArray(c)?c:void 0,O=s.useMemo(()=>{if($){const q=typeof $=="string"?$:Object.values($)[0];return new Pn(q).isLight()}return!1},[c]),I=s.useMemo(()=>{var q,G;const B=Ov(e);return Number.parseInt(B!==void 0?(q=B??0)===null||q===void 0?void 0:q.toString():(G=u??0)===null||G===void 0?void 0:G.toString(),10)},[u,e.success,e.successPercent]),j=s.useMemo(()=>!oQ.includes(v)&&I>=100?"success":v||"normal",[v,I]),{getPrefixCls:M,direction:D,progress:N}=s.useContext(Wt),P=M("progress",n),[A,F,H]=JX(P),k=h==="line",L=k&&!o,T=s.useMemo(()=>{if(!d)return null;const q=Ov(e);let G;const B=g||(K=>`${K}%`),U=k&&O&&w==="inner";return w==="inner"||g||j!=="exception"&&j!=="success"?G=B(zl(u),zl(q)):j==="exception"?G=k?s.createElement(cu,null):s.createElement(uu,null):j==="success"&&(G=k?s.createElement(Vv,null):s.createElement(US,null)),s.createElement("span",{className:se(`${P}-text`,{[`${P}-text-bright`]:U,[`${P}-text-${y}`]:L,[`${P}-text-${w}`]:L}),title:typeof G=="string"?G:void 0},G)},[d,u,I,j,h,P,g]);let z;h==="line"?z=o?s.createElement(aQ,Object.assign({},e,{strokeColor:E,prefixCls:P,steps:typeof o=="object"?o.count:o}),T):s.createElement(rQ,Object.assign({},e,{strokeColor:$,prefixCls:P,direction:D,percentPosition:{align:y,type:w}}),T):(h==="circle"||h==="dashboard")&&(z=s.createElement(qX,Object.assign({},e,{strokeColor:$,prefixCls:P,progressStatus:j}),T));const V=se(P,`${P}-status-${j}`,{[`${P}-${h==="dashboard"&&"circle"||h}`]:h!=="line",[`${P}-inline-circle`]:h==="circle"&&_g(f,"circle")[0]<=20,[`${P}-line`]:L,[`${P}-line-align-${y}`]:L,[`${P}-line-position-${w}`]:L,[`${P}-steps`]:o,[`${P}-show-info`]:d,[`${P}-${f}`]:typeof f=="string",[`${P}-rtl`]:D==="rtl"},N?.className,r,a,F,H);return A(s.createElement("div",Object.assign({ref:t,style:Object.assign(Object.assign({},N?.style),b),className:V,role:"progressbar","aria-valuenow":I,"aria-valuemin":0,"aria-valuemax":100},lr(C,["trailColor","strokeWidth","width","gapDegree","gapPosition","strokeLinecap","success","successPercent"])),z))});var sQ={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M955.7 856l-416-720c-6.2-10.7-16.9-16-27.7-16s-21.6 5.3-27.7 16l-416 720C56 877.4 71.4 904 96 904h832c24.6 0 40-26.6 27.7-48zM480 416c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v184c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V416zm32 352a48.01 48.01 0 010-96 48.01 48.01 0 010 96z"}}]},name:"warning",theme:"filled"},cQ=["prefixCls","className","checked","defaultChecked","disabled","loadingIcon","checkedChildren","unCheckedChildren","onClick","onChange","onKeyDown"],fD=s.forwardRef(function(e,t){var n,r=e.prefixCls,a=r===void 0?"rc-switch":r,o=e.className,c=e.checked,u=e.defaultChecked,f=e.disabled,d=e.loadingIcon,h=e.checkedChildren,v=e.unCheckedChildren,g=e.onClick,b=e.onChange,x=e.onKeyDown,C=Kt(e,cQ),y=Wn(!1,{value:c,defaultValue:u}),w=ce(y,2),$=w[0],E=w[1];function O(D,N){var P=$;return f||(P=D,E(P),b?.(P,N)),P}function I(D){D.which===Mt.LEFT?O(!1,D):D.which===Mt.RIGHT&&O(!0,D),x?.(D)}function j(D){var N=O(!$,D);g?.(N,D)}var M=se(a,o,(n={},X(n,"".concat(a,"-checked"),$),X(n,"".concat(a,"-disabled"),f),n));return s.createElement("button",Me({},C,{type:"button",role:"switch","aria-checked":$,disabled:f,className:M,ref:t,onKeyDown:I,onClick:j}),d,s.createElement("span",{className:"".concat(a,"-inner")},s.createElement("span",{className:"".concat(a,"-inner-checked")},h),s.createElement("span",{className:"".concat(a,"-inner-unchecked")},v)))});fD.displayName="Switch";const uQ=e=>{const{componentCls:t,trackHeightSM:n,trackPadding:r,trackMinWidthSM:a,innerMinMarginSM:o,innerMaxMarginSM:c,handleSizeSM:u,calc:f}=e,d=`${t}-inner`,h=te(f(u).add(f(r).mul(2)).equal()),v=te(f(c).mul(2).equal());return{[t]:{[`&${t}-small`]:{minWidth:a,height:n,lineHeight:te(n),[`${t}-inner`]:{paddingInlineStart:c,paddingInlineEnd:o,[`${d}-checked, ${d}-unchecked`]:{minHeight:n},[`${d}-checked`]:{marginInlineStart:`calc(-100% + ${h} - ${v})`,marginInlineEnd:`calc(100% - ${h} + ${v})`},[`${d}-unchecked`]:{marginTop:f(n).mul(-1).equal(),marginInlineStart:0,marginInlineEnd:0}},[`${t}-handle`]:{width:u,height:u},[`${t}-loading-icon`]:{top:f(f(u).sub(e.switchLoadingIconSize)).div(2).equal(),fontSize:e.switchLoadingIconSize},[`&${t}-checked`]:{[`${t}-inner`]:{paddingInlineStart:o,paddingInlineEnd:c,[`${d}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${d}-unchecked`]:{marginInlineStart:`calc(100% - ${h} + ${v})`,marginInlineEnd:`calc(-100% + ${h} - ${v})`}},[`${t}-handle`]:{insetInlineStart:`calc(100% - ${te(f(u).add(r).equal())})`}},[`&:not(${t}-disabled):active`]:{[`&:not(${t}-checked) ${d}`]:{[`${d}-unchecked`]:{marginInlineStart:f(e.marginXXS).div(2).equal(),marginInlineEnd:f(e.marginXXS).mul(-1).div(2).equal()}},[`&${t}-checked ${d}`]:{[`${d}-checked`]:{marginInlineStart:f(e.marginXXS).mul(-1).div(2).equal(),marginInlineEnd:f(e.marginXXS).div(2).equal()}}}}}}},dQ=e=>{const{componentCls:t,handleSize:n,calc:r}=e;return{[t]:{[`${t}-loading-icon${e.iconCls}`]:{position:"relative",top:r(r(n).sub(e.fontSize)).div(2).equal(),color:e.switchLoadingIconColor,verticalAlign:"top"},[`&${t}-checked ${t}-loading-icon`]:{color:e.switchColor}}}},fQ=e=>{const{componentCls:t,trackPadding:n,handleBg:r,handleShadow:a,handleSize:o,calc:c}=e,u=`${t}-handle`;return{[t]:{[u]:{position:"absolute",top:n,insetInlineStart:n,width:o,height:o,transition:`all ${e.switchDuration} ease-in-out`,"&::before":{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,backgroundColor:r,borderRadius:c(o).div(2).equal(),boxShadow:a,transition:`all ${e.switchDuration} ease-in-out`,content:'""'}},[`&${t}-checked ${u}`]:{insetInlineStart:`calc(100% - ${te(c(o).add(n).equal())})`},[`&:not(${t}-disabled):active`]:{[`${u}::before`]:{insetInlineEnd:e.switchHandleActiveInset,insetInlineStart:0},[`&${t}-checked ${u}::before`]:{insetInlineEnd:0,insetInlineStart:e.switchHandleActiveInset}}}}},mQ=e=>{const{componentCls:t,trackHeight:n,trackPadding:r,innerMinMargin:a,innerMaxMargin:o,handleSize:c,calc:u}=e,f=`${t}-inner`,d=te(u(c).add(u(r).mul(2)).equal()),h=te(u(o).mul(2).equal());return{[t]:{[f]:{display:"block",overflow:"hidden",borderRadius:100,height:"100%",paddingInlineStart:o,paddingInlineEnd:a,transition:`padding-inline-start ${e.switchDuration} ease-in-out, padding-inline-end ${e.switchDuration} ease-in-out`,[`${f}-checked, ${f}-unchecked`]:{display:"block",color:e.colorTextLightSolid,fontSize:e.fontSizeSM,transition:`margin-inline-start ${e.switchDuration} ease-in-out, margin-inline-end ${e.switchDuration} ease-in-out`,pointerEvents:"none",minHeight:n},[`${f}-checked`]:{marginInlineStart:`calc(-100% + ${d} - ${h})`,marginInlineEnd:`calc(100% - ${d} + ${h})`},[`${f}-unchecked`]:{marginTop:u(n).mul(-1).equal(),marginInlineStart:0,marginInlineEnd:0}},[`&${t}-checked ${f}`]:{paddingInlineStart:a,paddingInlineEnd:o,[`${f}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${f}-unchecked`]:{marginInlineStart:`calc(100% - ${d} + ${h})`,marginInlineEnd:`calc(-100% + ${d} - ${h})`}},[`&:not(${t}-disabled):active`]:{[`&:not(${t}-checked) ${f}`]:{[`${f}-unchecked`]:{marginInlineStart:u(r).mul(2).equal(),marginInlineEnd:u(r).mul(-1).mul(2).equal()}},[`&${t}-checked ${f}`]:{[`${f}-checked`]:{marginInlineStart:u(r).mul(-1).mul(2).equal(),marginInlineEnd:u(r).mul(2).equal()}}}}}},hQ=e=>{const{componentCls:t,trackHeight:n,trackMinWidth:r}=e;return{[t]:Object.assign(Object.assign(Object.assign(Object.assign({},zn(e)),{position:"relative",display:"inline-block",boxSizing:"border-box",minWidth:r,height:n,lineHeight:te(n),verticalAlign:"middle",background:e.colorTextQuaternary,border:"0",borderRadius:100,cursor:"pointer",transition:`all ${e.motionDurationMid}`,userSelect:"none",[`&:hover:not(${t}-disabled)`]:{background:e.colorTextTertiary}}),Wo(e)),{[`&${t}-checked`]:{background:e.switchColor,[`&:hover:not(${t}-disabled)`]:{background:e.colorPrimaryHover}},[`&${t}-loading, &${t}-disabled`]:{cursor:"not-allowed",opacity:e.switchDisabledOpacity,"*":{boxShadow:"none",cursor:"not-allowed"}},[`&${t}-rtl`]:{direction:"rtl"}})}},vQ=e=>{const{fontSize:t,lineHeight:n,controlHeight:r,colorWhite:a}=e,o=t*n,c=r/2,u=2,f=o-u*2,d=c-u*2;return{trackHeight:o,trackHeightSM:c,trackMinWidth:f*2+u*4,trackMinWidthSM:d*2+u*2,trackPadding:u,handleBg:a,handleSize:f,handleSizeSM:d,handleShadow:`0 2px 4px 0 ${new Pn("#00230b").setA(.2).toRgbString()}`,innerMinMargin:f/2,innerMaxMargin:f+u+u*2,innerMinMarginSM:d/2,innerMaxMarginSM:d+u+u*2}},gQ=Kn("Switch",e=>{const t=xn(e,{switchDuration:e.motionDurationMid,switchColor:e.colorPrimary,switchDisabledOpacity:e.opacityLoading,switchLoadingIconSize:e.calc(e.fontSizeIcon).mul(.75).equal(),switchLoadingIconColor:`rgba(0, 0, 0, ${e.opacityLoading})`,switchHandleActiveInset:"-30%"});return[hQ(t),mQ(t),fQ(t),dQ(t),uQ(t)]},vQ);var pQ=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,r=Object.getOwnPropertySymbols(e);a{const{prefixCls:n,size:r,disabled:a,loading:o,className:c,rootClassName:u,style:f,checked:d,value:h,defaultChecked:v,defaultValue:g,onChange:b}=e,x=pQ(e,["prefixCls","size","disabled","loading","className","rootClassName","style","checked","value","defaultChecked","defaultValue","onChange"]),[C,y]=Wn(!1,{value:d??h,defaultValue:v??g}),{getPrefixCls:w,direction:$,switch:E}=s.useContext(Wt),O=s.useContext(ja),I=(a??O)||o,j=w("switch",n),M=s.createElement("div",{className:`${j}-handle`},o&&s.createElement(qo,{className:`${j}-loading-icon`})),[D,N,P]=gQ(j),A=la(r),F=se(E?.className,{[`${j}-small`]:A==="small",[`${j}-loading`]:o,[`${j}-rtl`]:$==="rtl"},c,u,N,P),H=Object.assign(Object.assign({},E?.style),f),k=(...L)=>{y(L[0]),b?.apply(void 0,L)};return D(s.createElement(jf,{component:"Switch",disabled:I},s.createElement(fD,Object.assign({},x,{checked:C,onChange:k,prefixCls:j,className:F,style:H,disabled:I,ref:t,loadingIcon:M}))))}),mD=bQ;mD.__ANT_SWITCH=!0;var Ml={},Vf="rc-table-internal-hook";function MC(e){var t=s.createContext(void 0),n=function(a){var o=a.value,c=a.children,u=s.useRef(o);u.current=o;var f=s.useState(function(){return{getValue:function(){return u.current},listeners:new Set}}),d=ce(f,1),h=d[0];return fn(function(){Li.unstable_batchedUpdates(function(){h.listeners.forEach(function(v){v(o)})})},[o]),s.createElement(t.Provider,{value:h},c)};return{Context:t,Provider:n,defaultValue:e}}function ha(e,t){var n=pn(typeof t=="function"?t:function(v){if(t===void 0)return v;if(!Array.isArray(t))return v[t];var g={};return t.forEach(function(b){g[b]=v[b]}),g}),r=s.useContext(e?.Context),a=r||{},o=a.listeners,c=a.getValue,u=s.useRef();u.current=n(r?c():e?.defaultValue);var f=s.useState({}),d=ce(f,2),h=d[1];return fn(function(){if(!r)return;function v(g){var b=n(g);oo(u.current,b,!0)||h({})}return o.add(v),function(){o.delete(v)}},[r]),u.current}function yQ(){var e=s.createContext(null);function t(){return s.useContext(e)}function n(a,o){var c=Hi(a),u=function(d,h){var v=c?{ref:h}:{},g=s.useRef(0),b=s.useRef(d),x=t();return x!==null?s.createElement(a,Me({},d,v)):((!o||o(b.current,d))&&(g.current+=1),b.current=d,s.createElement(e.Provider,{value:g.current},s.createElement(a,Me({},d,v))))};return c?s.forwardRef(u):u}function r(a,o){var c=Hi(a),u=function(d,h){var v=c?{ref:h}:{};return t(),s.createElement(a,Me({},d,v))};return c?s.memo(s.forwardRef(u),o):s.memo(u,o)}return{makeImmutable:n,responseImmutable:r,useImmutableMark:t}}var jC=yQ(),hD=jC.makeImmutable,xu=jC.responseImmutable,xQ=jC.useImmutableMark,Da=MC(),vD=s.createContext({renderWithProps:!1}),SQ="RC_TABLE_KEY";function CQ(e){return e==null?[]:Array.isArray(e)?e:[e]}function Og(e){var t=[],n={};return e.forEach(function(r){for(var a=r||{},o=a.key,c=a.dataIndex,u=o||CQ(c).join("-")||SQ;n[u];)u="".concat(u,"_next");n[u]=!0,t.push(u)}),t}function Nx(e){return e!=null}function wQ(e){return typeof e=="number"&&!Number.isNaN(e)}function $Q(e){return e&&jt(e)==="object"&&!Array.isArray(e)&&!s.isValidElement(e)}function EQ(e,t,n,r,a,o){var c=s.useContext(vD),u=xQ(),f=Ds(function(){if(Nx(r))return[r];var d=t==null||t===""?[]:Array.isArray(t)?t:[t],h=Aa(e,d),v=h,g=void 0;if(a){var b=a(h,e,n);$Q(b)?(v=b.children,g=b.props,c.renderWithProps=!0):v=b}return[v,g]},[u,e,r,t,a,n],function(d,h){if(o){var v=ce(d,2),g=v[1],b=ce(h,2),x=b[1];return o(x,g)}return c.renderWithProps?!0:!oo(d,h,!0)});return f}function _Q(e,t,n,r){var a=e+t-1;return e<=r&&a>=n}function OQ(e,t){return ha(Da,function(n){var r=_Q(e,t||1,n.hoverStartRow,n.hoverEndRow);return[r,n.onHover]})}var IQ=function(t){var n=t.ellipsis,r=t.rowType,a=t.children,o,c=n===!0?{showTitle:!0}:n;return c&&(c.showTitle||r==="header")&&(typeof a=="string"||typeof a=="number"?o=a.toString():s.isValidElement(a)&&typeof a.props.children=="string"&&(o=a.props.children)),o};function RQ(e){var t,n,r,a,o,c,u,f,d=e.component,h=e.children,v=e.ellipsis,g=e.scope,b=e.prefixCls,x=e.className,C=e.align,y=e.record,w=e.render,$=e.dataIndex,E=e.renderIndex,O=e.shouldCellUpdate,I=e.index,j=e.rowType,M=e.colSpan,D=e.rowSpan,N=e.fixLeft,P=e.fixRight,A=e.firstFixLeft,F=e.lastFixLeft,H=e.firstFixRight,k=e.lastFixRight,L=e.appendNode,T=e.additionalProps,z=T===void 0?{}:T,V=e.isSticky,q="".concat(b,"-cell"),G=ha(Da,["supportSticky","allColumnsFixedLeft","rowHoverable"]),B=G.supportSticky,U=G.allColumnsFixedLeft,K=G.rowHoverable,Y=EQ(y,$,E,h,w,O),Q=ce(Y,2),Z=Q[0],ae=Q[1],re={},ie=typeof N=="number"&&B,ve=typeof P=="number"&&B;ie&&(re.position="sticky",re.left=N),ve&&(re.position="sticky",re.right=P);var ue=(t=(n=(r=ae?.colSpan)!==null&&r!==void 0?r:z.colSpan)!==null&&n!==void 0?n:M)!==null&&t!==void 0?t:1,oe=(a=(o=(c=ae?.rowSpan)!==null&&c!==void 0?c:z.rowSpan)!==null&&o!==void 0?o:D)!==null&&a!==void 0?a:1,he=OQ(I,oe),fe=ce(he,2),me=fe[0],le=fe[1],pe=pn(function(we){var Fe;y&&le(I,I+oe-1),z==null||(Fe=z.onMouseEnter)===null||Fe===void 0||Fe.call(z,we)}),Ce=pn(function(we){var Fe;y&&le(-1,-1),z==null||(Fe=z.onMouseLeave)===null||Fe===void 0||Fe.call(z,we)});if(ue===0||oe===0)return null;var De=(u=z.title)!==null&&u!==void 0?u:IQ({rowType:j,ellipsis:v,children:Z}),je=se(q,x,(f={},X(X(X(X(X(X(X(X(X(X(f,"".concat(q,"-fix-left"),ie&&B),"".concat(q,"-fix-left-first"),A&&B),"".concat(q,"-fix-left-last"),F&&B),"".concat(q,"-fix-left-all"),F&&U&&B),"".concat(q,"-fix-right"),ve&&B),"".concat(q,"-fix-right-first"),H&&B),"".concat(q,"-fix-right-last"),k&&B),"".concat(q,"-ellipsis"),v),"".concat(q,"-with-append"),L),"".concat(q,"-fix-sticky"),(ie||ve)&&V&&B),X(f,"".concat(q,"-row-hover"),!ae&&me)),z.className,ae?.className),ge={};C&&(ge.textAlign=C);var Ie=ee(ee(ee(ee({},ae?.style),re),ge),z.style),Ee=Z;return jt(Ee)==="object"&&!Array.isArray(Ee)&&!s.isValidElement(Ee)&&(Ee=null),v&&(F||H)&&(Ee=s.createElement("span",{className:"".concat(q,"-content")},Ee)),s.createElement(d,Me({},ae,z,{className:je,style:Ie,title:De,scope:g,onMouseEnter:K?pe:void 0,onMouseLeave:K?Ce:void 0,colSpan:ue!==1?ue:null,rowSpan:oe!==1?oe:null}),L,Ee)}const Su=s.memo(RQ);function TC(e,t,n,r,a){var o=n[e]||{},c=n[t]||{},u,f;o.fixed==="left"?u=r.left[a==="rtl"?t:e]:c.fixed==="right"&&(f=r.right[a==="rtl"?e:t]);var d=!1,h=!1,v=!1,g=!1,b=n[t+1],x=n[e-1],C=b&&!b.fixed||x&&!x.fixed||n.every(function(O){return O.fixed==="left"});if(a==="rtl"){if(u!==void 0){var y=x&&x.fixed==="left";g=!y&&C}else if(f!==void 0){var w=b&&b.fixed==="right";v=!w&&C}}else if(u!==void 0){var $=b&&b.fixed==="left";d=!$&&C}else if(f!==void 0){var E=x&&x.fixed==="right";h=!E&&C}return{fixLeft:u,fixRight:f,lastFixLeft:d,firstFixRight:h,lastFixRight:v,firstFixLeft:g,isSticky:r.isSticky}}var gD=s.createContext({});function NQ(e){var t=e.className,n=e.index,r=e.children,a=e.colSpan,o=a===void 0?1:a,c=e.rowSpan,u=e.align,f=ha(Da,["prefixCls","direction"]),d=f.prefixCls,h=f.direction,v=s.useContext(gD),g=v.scrollColumnIndex,b=v.stickyOffsets,x=v.flattenColumns,C=n+o-1,y=C+1===g?o+1:o,w=TC(n,n+y-1,x,b,h);return s.createElement(Su,Me({className:t,index:n,component:"td",prefixCls:d,record:null,dataIndex:null,align:u,colSpan:y,rowSpan:c,render:function(){return r}},w))}var MQ=["children"];function jQ(e){var t=e.children,n=Kt(e,MQ);return s.createElement("tr",n,t)}function Ig(e){var t=e.children;return t}Ig.Row=jQ;Ig.Cell=NQ;function TQ(e){var t=e.children,n=e.stickyOffsets,r=e.flattenColumns,a=ha(Da,"prefixCls"),o=r.length-1,c=r[o],u=s.useMemo(function(){return{stickyOffsets:n,flattenColumns:r,scrollColumnIndex:c!=null&&c.scrollbar?o:null}},[c,r,o,n]);return s.createElement(gD.Provider,{value:u},s.createElement("tfoot",{className:"".concat(a,"-summary")},t))}const Eh=xu(TQ);var pD=Ig;function DQ(e){return null}function PQ(e){return null}function bD(e,t,n,r,a,o,c){var u=o(t,c);e.push({record:t,indent:n,index:c,rowKey:u});var f=a?.has(u);if(t&&Array.isArray(t[r])&&f)for(var d=0;d1?A-1:0),H=1;H5&&arguments[5]!==void 0?arguments[5]:[],u=arguments.length>6&&arguments[6]!==void 0?arguments[6]:0,f=e.record,d=e.prefixCls,h=e.columnsKey,v=e.fixedInfoList,g=e.expandIconColumnIndex,b=e.nestExpandable,x=e.indentSize,C=e.expandIcon,y=e.expanded,w=e.hasNestChildren,$=e.onTriggerExpand,E=e.expandable,O=e.expandedKeys,I=h[n],j=v[n],M;n===(g||0)&&b&&(M=s.createElement(s.Fragment,null,s.createElement("span",{style:{paddingLeft:"".concat(x*r,"px")},className:"".concat(d,"-row-indent indent-level-").concat(r)}),C({prefixCls:d,expanded:y,expandable:w,record:f,onExpand:$})));var D=((o=t.onCell)===null||o===void 0?void 0:o.call(t,f,a))||{};if(u){var N=D.rowSpan,P=N===void 0?1:N;if(E&&P&&n=1)),style:ee(ee({},n),E?.style)}),y.map(function(A,F){var H=A.render,k=A.dataIndex,L=A.className,T=wD(x,A,F,d,a,u,b?.offset),z=T.key,V=T.fixedInfo,q=T.appendCellNode,G=T.additionalCellProps;return s.createElement(Su,Me({className:L,ellipsis:A.ellipsis,align:A.align,scope:A.rowScope,component:A.rowScope?g:v,prefixCls:C,key:z,record:r,index:a,renderIndex:o,dataIndex:k,render:H,shouldCellUpdate:A.shouldCellUpdate},V,{appendNode:q,additionalProps:G}))})),N;if(I&&(j.current||O)){var P=$(r,a,d+1,O);N=s.createElement(SD,{expanded:O,className:se("".concat(C,"-expanded-row"),"".concat(C,"-expanded-row-level-").concat(d+1),M),prefixCls:C,component:h,cellComponent:v,colSpan:b?b.colSpan:y.length,stickyOffset:b?.sticky,isEmpty:!1},P)}return s.createElement(s.Fragment,null,D,N)}const LQ=xu(zQ);function HQ(e){var t=e.columnKey,n=e.onColumnResize,r=e.prefixCls,a=e.title,o=s.useRef();return fn(function(){o.current&&n(t,o.current.offsetWidth)},[]),s.createElement(Ca,{data:t},s.createElement("th",{ref:o,className:"".concat(r,"-measure-cell")},s.createElement("div",{className:"".concat(r,"-measure-cell-content")},a||" ")))}function BQ(e){var t=e.prefixCls,n=e.columnsKey,r=e.onColumnResize,a=e.columns,o=s.useRef(null),c=ha(Da,["measureRowRender"]),u=c.measureRowRender,f=s.createElement("tr",{"aria-hidden":"true",className:"".concat(t,"-measure-row"),ref:o,tabIndex:-1},s.createElement(Ca.Collection,{onBatchResize:function(h){fu(o.current)&&h.forEach(function(v){var g=v.data,b=v.size;r(g,b.offsetWidth)})}},n.map(function(d){var h=a.find(function(b){return b.key===d}),v=h?.title,g=s.isValidElement(v)?s.cloneElement(v,{ref:null}):v;return s.createElement(HQ,{prefixCls:t,key:d,columnKey:d,onColumnResize:r,title:g})})));return u?u(f):f}function FQ(e){var t=e.data,n=e.measureColumnWidth,r=ha(Da,["prefixCls","getComponent","onColumnResize","flattenColumns","getRowKey","expandedKeys","childrenColumnName","emptyNode","expandedRowOffset","fixedInfoList","colWidths"]),a=r.prefixCls,o=r.getComponent,c=r.onColumnResize,u=r.flattenColumns,f=r.getRowKey,d=r.expandedKeys,h=r.childrenColumnName,v=r.emptyNode,g=r.expandedRowOffset,b=g===void 0?0:g,x=r.colWidths,C=yD(t,h,d,f),y=s.useMemo(function(){return C.map(function(N){return N.rowKey})},[C]),w=s.useRef({renderWithProps:!1}),$=s.useMemo(function(){for(var N=u.length-b,P=0,A=0;A=0;d-=1){var h=t[d],v=n&&n[d],g=void 0,b=void 0;if(v&&(g=v[Gd],o==="auto"&&(b=v.minWidth)),h||b||g||f){var x=g||{};x.columnType;var C=Kt(x,WQ);c.unshift(s.createElement("col",Me({key:d,style:{width:h,minWidth:b}},C))),f=!0}}return c.length>0?s.createElement("colgroup",null,c):null}var qQ=["className","noData","columns","flattenColumns","colWidths","colGroup","columCount","stickyOffsets","direction","fixHeader","stickyTopOffset","stickyBottomOffset","stickyClassName","scrollX","tableLayout","onScroll","children"];function YQ(e,t){return s.useMemo(function(){for(var n=[],r=0;r1?"colgroup":"col":null,ellipsis:y.ellipsis,align:y.align,component:c,prefixCls:h,key:b[C]},w,{additionalProps:$,rowType:"header"}))}))};function QQ(e){var t=[];function n(c,u){var f=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;t[f]=t[f]||[];var d=u,h=c.filter(Boolean).map(function(v){var g={key:v.key,className:v.className||"",children:v.title,column:v,colStart:d},b=1,x=v.children;return x&&x.length>0&&(b=n(x,d,f+1).reduce(function(C,y){return C+y},0),g.hasSubColumns=!0),"colSpan"in v&&(b=v.colSpan),"rowSpan"in v&&(g.rowSpan=v.rowSpan),g.colSpan=b,g.colEnd=g.colStart+b-1,t[f].push(g),d+=b,b});return h}n(e,0);for(var r=t.length,a=function(u){t[u].forEach(function(f){!("rowSpan"in f)&&!f.hasSubColumns&&(f.rowSpan=r-u)})},o=0;o1&&arguments[1]!==void 0?arguments[1]:"";return typeof t=="number"?t:t.endsWith("%")?e*parseFloat(t)/100:null}function JQ(e,t,n){return s.useMemo(function(){if(t&&t>0){var r=0,a=0;e.forEach(function(g){var b=wI(t,g.width);b?r+=b:a+=1});var o=Math.max(t,n),c=Math.max(o-r,a),u=a,f=c/a,d=0,h=e.map(function(g){var b=ee({},g),x=wI(t,b.width);if(x)b.width=x;else{var C=Math.floor(f);b.width=u===1?c:C,c-=C,u-=1}return d+=b.width,b});if(d0?ee(ee({},t),{},{children:ED(n)}):t})}function Mx(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"key";return e.filter(function(n){return n&&jt(n)==="object"}).reduce(function(n,r,a){var o=r.fixed,c=o===!0?"left":o,u="".concat(t,"-").concat(a),f=r.children;return f&&f.length>0?[].concat(ke(n),ke(Mx(f,u).map(function(d){var h;return ee(ee({},d),{},{fixed:(h=d.fixed)!==null&&h!==void 0?h:c})}))):[].concat(ke(n),[ee(ee({key:u},r),{},{fixed:c})])},[])}function nZ(e){return e.map(function(t){var n=t.fixed,r=Kt(t,tZ),a=n;return n==="left"?a="right":n==="right"&&(a="left"),ee({fixed:a},r)})}function rZ(e,t){var n=e.prefixCls,r=e.columns,a=e.children,o=e.expandable,c=e.expandedKeys,u=e.columnTitle,f=e.getRowKey,d=e.onTriggerExpand,h=e.expandIcon,v=e.rowExpandable,g=e.expandIconColumnIndex,b=e.expandedRowOffset,x=b===void 0?0:b,C=e.direction,y=e.expandRowByClick,w=e.columnWidth,$=e.fixed,E=e.scrollWidth,O=e.clientWidth,I=s.useMemo(function(){var k=r||DC(a)||[];return ED(k.slice())},[r,a]),j=s.useMemo(function(){if(o){var k=I.slice();if(!k.includes(Ml)){var L=g||0,T=L===0&&$==="right"?I.length:L;T>=0&&k.splice(T,0,Ml)}var z=k.indexOf(Ml);k=k.filter(function(B,U){return B!==Ml||U===z});var V=I[z],q;$?q=$:q=V?V.fixed:null;var G=X(X(X(X(X(X({},Gd,{className:"".concat(n,"-expand-icon-col"),columnType:"EXPAND_COLUMN"}),"title",u),"fixed",q),"className","".concat(n,"-row-expand-icon-cell")),"width",w),"render",function(U,K,Y){var Q=f(K,Y),Z=c.has(Q),ae=v?v(K):!0,re=h({prefixCls:n,expanded:Z,expandable:ae,record:K,onExpand:d});return y?s.createElement("span",{onClick:function(ve){return ve.stopPropagation()}},re):re});return k.map(function(B,U){var K=B===Ml?G:B;return U=0;L-=1){var T=D[L].fixed;if(T==="left"||T===!0){k=L;break}}if(k>=0)for(var z=0;z<=k;z+=1){var V=D[z].fixed;if(V!=="left"&&V!==!0)return!0}var q=D.findIndex(function(U){var K=U.fixed;return K==="right"});if(q>=0)for(var G=q;G=z-u})})}})},H=function(L){$(function(T){return ee(ee({},T),{},{scrollLeft:v?L/v*g:0})})};return s.useImperativeHandle(n,function(){return{setScrollLeft:H,checkScrollBarVisible:F}}),s.useEffect(function(){var k=oI(document.body,"mouseup",N,!1),L=oI(document.body,"mousemove",A,!1);return F(),function(){k.remove(),L.remove()}},[b,j]),s.useEffect(function(){if(o.current){for(var k=[],L=If(o.current);L;)k.push(L),L=L.parentElement;return k.forEach(function(T){return T.addEventListener("scroll",F,!1)}),window.addEventListener("resize",F,!1),window.addEventListener("scroll",F,!1),f.addEventListener("scroll",F,!1),function(){k.forEach(function(T){return T.removeEventListener("scroll",F)}),window.removeEventListener("resize",F),window.removeEventListener("scroll",F),f.removeEventListener("scroll",F)}}},[f]),s.useEffect(function(){w.isHiddenScrollBar||$(function(k){var L=o.current;return L?ee(ee({},k),{},{scrollLeft:L.scrollLeft/L.scrollWidth*L.clientWidth}):k})},[w.isHiddenScrollBar]),v<=g||!b||w.isHiddenScrollBar?null:s.createElement("div",{style:{height:x2(),width:g,bottom:u},className:"".concat(h,"-sticky-scroll")},s.createElement("div",{onMouseDown:P,ref:x,className:se("".concat(h,"-sticky-scroll-bar"),X({},"".concat(h,"-sticky-scroll-bar-active"),j)),style:{width:"".concat(b,"px"),transform:"translate3d(".concat(w.scrollLeft,"px, 0, 0)")}}))};const fZ=s.forwardRef(dZ);var _D="rc-table",mZ=[],hZ={};function vZ(){return"No Data"}function gZ(e,t){var n=ee({rowKey:"key",prefixCls:_D,emptyText:vZ},e),r=n.prefixCls,a=n.className,o=n.rowClassName,c=n.style,u=n.data,f=n.rowKey,d=n.scroll,h=n.tableLayout,v=n.direction,g=n.title,b=n.footer,x=n.summary,C=n.caption,y=n.id,w=n.showHeader,$=n.components,E=n.emptyText,O=n.onRow,I=n.onHeaderRow,j=n.measureRowRender,M=n.onScroll,D=n.internalHooks,N=n.transformColumns,P=n.internalRefs,A=n.tailor,F=n.getContainerWidth,H=n.sticky,k=n.rowHoverable,L=k===void 0?!0:k,T=u||mZ,z=!!T.length,V=D===Vf,q=s.useCallback(function(dt,Ot){return Aa($,dt)||Ot},[$]),G=s.useMemo(function(){return typeof f=="function"?f:function(dt){var Ot=dt&&dt[f];return Ot}},[f]),B=q(["body"]),U=sZ(),K=ce(U,3),Y=K[0],Q=K[1],Z=K[2],ae=aZ(n,T,G),re=ce(ae,6),ie=re[0],ve=re[1],ue=re[2],oe=re[3],he=re[4],fe=re[5],me=d?.x,le=s.useState(0),pe=ce(le,2),Ce=pe[0],De=pe[1],je=rZ(ee(ee(ee({},n),ie),{},{expandable:!!ie.expandedRowRender,columnTitle:ie.columnTitle,expandedKeys:ue,getRowKey:G,onTriggerExpand:fe,expandIcon:oe,expandIconColumnIndex:ie.expandIconColumnIndex,direction:v,scrollWidth:V&&A&&typeof me=="number"?me:null,clientWidth:Ce}),V?N:null),ge=ce(je,4),Ie=ge[0],Ee=ge[1],we=ge[2],Fe=ge[3],He=we??me,it=s.useMemo(function(){return{columns:Ie,flattenColumns:Ee}},[Ie,Ee]),Ze=s.useRef(),Ye=s.useRef(),et=s.useRef(),Pe=s.useRef();s.useImperativeHandle(t,function(){return{nativeElement:Ze.current,scrollTo:function(Ot){var bn;if(et.current instanceof HTMLElement){var Cn=Ot.index,rr=Ot.top,Ar=Ot.key;if(wQ(rr)){var Br;(Br=et.current)===null||Br===void 0||Br.scrollTo({top:rr})}else{var Yr,sa=Ar??G(T[Cn]);(Yr=et.current.querySelector('[data-row-key="'.concat(sa,'"]')))===null||Yr===void 0||Yr.scrollIntoView()}}else(bn=et.current)!==null&&bn!==void 0&&bn.scrollTo&&et.current.scrollTo(Ot)}}});var Oe=s.useRef(),Be=s.useState(!1),$e=ce(Be,2),Te=$e[0],be=$e[1],ye=s.useState(!1),Re=ce(ye,2),Ge=Re[0],ft=Re[1],$t=s.useState(new Map),Qe=ce($t,2),at=Qe[0],mt=Qe[1],st=Og(Ee),bt=st.map(function(dt){return at.get(dt)}),qt=s.useMemo(function(){return bt},[bt.join("_")]),Gt=uZ(qt,Ee,v),vt=d&&Nx(d.y),It=d&&Nx(He)||!!ie.fixed,Et=It&&Ee.some(function(dt){var Ot=dt.fixed;return Ot}),nt=s.useRef(),Ue=cZ(H,r),qe=Ue.isSticky,ct=Ue.offsetHeader,Tt=Ue.offsetSummary,Dt=Ue.offsetScroll,Jt=Ue.stickyClassName,ut=Ue.container,ot=s.useMemo(function(){return x?.(T)},[x,T]),Lt=(vt||qe)&&s.isValidElement(ot)&&ot.type===Ig&&ot.props.fixed,tn,vn,cn;vt&&(vn={overflowY:z?"scroll":"auto",maxHeight:d.y}),It&&(tn={overflowX:"auto"},vt||(vn={overflowY:"hidden"}),cn={width:He===!0?"auto":He,minWidth:"100%"});var En=s.useCallback(function(dt,Ot){mt(function(bn){if(bn.get(dt)!==Ot){var Cn=new Map(bn);return Cn.set(dt,Ot),Cn}return bn})},[]),rn=lZ(),Sn=ce(rn,2),lt=Sn[0],xt=Sn[1];function Bt(dt,Ot){Ot&&(typeof Ot=="function"?Ot(dt):Ot.scrollLeft!==dt&&(Ot.scrollLeft=dt,Ot.scrollLeft!==dt&&setTimeout(function(){Ot.scrollLeft=dt},0)))}var kt=pn(function(dt){var Ot=dt.currentTarget,bn=dt.scrollLeft,Cn=v==="rtl",rr=typeof bn=="number"?bn:Ot.scrollLeft,Ar=Ot||hZ;if(!xt()||xt()===Ar){var Br;lt(Ar),Bt(rr,Ye.current),Bt(rr,et.current),Bt(rr,Oe.current),Bt(rr,(Br=nt.current)===null||Br===void 0?void 0:Br.setScrollLeft)}var Yr=Ot||Ye.current;if(Yr){var sa=V&&A&&typeof He=="number"?He:Yr.scrollWidth,Pa=Yr.clientWidth;if(sa===Pa){be(!1),ft(!1);return}Cn?(be(-rr0)):(be(rr>0),ft(rr1?y-k:0,T=ee(ee(ee({},D),d),{},{flex:"0 0 ".concat(k,"px"),width:"".concat(k,"px"),marginRight:L,pointerEvents:"auto"}),z=s.useMemo(function(){return v?F<=1:P===0||F===0||F>1},[F,P,v]);z?T.visibility="hidden":v&&(T.height=g?.(F));var V=z?function(){return null}:b,q={};return(F===0||P===0)&&(q.rowSpan=1,q.colSpan=1),s.createElement(Su,Me({className:se(C,h),ellipsis:n.ellipsis,align:n.align,scope:n.rowScope,component:c,prefixCls:t.prefixCls,key:O,record:f,index:o,renderIndex:u,dataIndex:x,render:V,shouldCellUpdate:n.shouldCellUpdate},I,{appendNode:j,additionalProps:ee(ee({},M),{},{style:T},q)}))}var xZ=["data","index","className","rowKey","style","extra","getHeight"],SZ=s.forwardRef(function(e,t){var n=e.data,r=e.index,a=e.className,o=e.rowKey,c=e.style,u=e.extra,f=e.getHeight,d=Kt(e,xZ),h=n.record,v=n.indent,g=n.index,b=ha(Da,["prefixCls","flattenColumns","fixColumn","componentWidth","scrollX"]),x=b.scrollX,C=b.flattenColumns,y=b.prefixCls,w=b.fixColumn,$=b.componentWidth,E=ha(PC,["getComponent"]),O=E.getComponent,I=xD(h,o,r,v),j=O(["body","row"],"div"),M=O(["body","cell"],"div"),D=I.rowSupportExpand,N=I.expanded,P=I.rowProps,A=I.expandedRowRender,F=I.expandedRowClassName,H;if(D&&N){var k=A(h,r,v+1,N),L=CD(F,h,r,v),T={};w&&(T={style:X({},"--virtual-width","".concat($,"px"))});var z="".concat(y,"-expanded-row-cell");H=s.createElement(j,{className:se("".concat(y,"-expanded-row"),"".concat(y,"-expanded-row-level-").concat(v+1),L)},s.createElement(Su,{component:M,prefixCls:y,className:se(z,X({},"".concat(z,"-fixed"),w)),additionalProps:T},k))}var V=ee(ee({},c),{},{width:x});u&&(V.position="absolute",V.pointerEvents="none");var q=s.createElement(j,Me({},P,d,{"data-row-key":o,ref:D?null:t,className:se(a,"".concat(y,"-row"),P?.className,X({},"".concat(y,"-row-extra"),u)),style:ee(ee({},V),P?.style)}),C.map(function(G,B){return s.createElement(yZ,{key:B,component:M,rowInfo:I,column:G,colIndex:B,indent:v,index:r,renderIndex:g,record:h,inverse:u,getHeight:f})}));return D?s.createElement("div",{ref:t},q,H):q}),OI=xu(SZ),CZ=s.forwardRef(function(e,t){var n=e.data,r=e.onScroll,a=ha(Da,["flattenColumns","onColumnResize","getRowKey","prefixCls","expandedKeys","childrenColumnName","scrollX","direction"]),o=a.flattenColumns,c=a.onColumnResize,u=a.getRowKey,f=a.expandedKeys,d=a.prefixCls,h=a.childrenColumnName,v=a.scrollX,g=a.direction,b=ha(PC),x=b.sticky,C=b.scrollY,y=b.listItemHeight,w=b.getComponent,$=b.onScroll,E=s.useRef(),O=yD(n,h,f,u),I=s.useMemo(function(){var H=0;return o.map(function(k){var L=k.width,T=k.minWidth,z=k.key,V=Math.max(L||0,T||0);return H+=V,[z,V,H]})},[o]),j=s.useMemo(function(){return I.map(function(H){return H[2]})},[I]);s.useEffect(function(){I.forEach(function(H){var k=ce(H,2),L=k[0],T=k[1];c(L,T)})},[I]),s.useImperativeHandle(t,function(){var H,k={scrollTo:function(T){var z;(z=E.current)===null||z===void 0||z.scrollTo(T)},nativeElement:(H=E.current)===null||H===void 0?void 0:H.nativeElement};return Object.defineProperty(k,"scrollLeft",{get:function(){var T;return((T=E.current)===null||T===void 0?void 0:T.getScrollInfo().x)||0},set:function(T){var z;(z=E.current)===null||z===void 0||z.scrollTo({left:T})}}),Object.defineProperty(k,"scrollTop",{get:function(){var T;return((T=E.current)===null||T===void 0?void 0:T.getScrollInfo().y)||0},set:function(T){var z;(z=E.current)===null||z===void 0||z.scrollTo({top:T})}}),k});var M=function(k,L){var T,z=(T=O[L])===null||T===void 0?void 0:T.record,V=k.onCell;if(V){var q,G=V(z,L);return(q=G?.rowSpan)!==null&&q!==void 0?q:1}return 1},D=function(k){var L=k.start,T=k.end,z=k.getSize,V=k.offsetY;if(T<0)return null;for(var q=o.filter(function(ue){return M(ue,L)===0}),G=L,B=function(oe){if(q=q.filter(function(he){return M(he,oe)===0}),!q.length)return G=oe,1},U=L;U>=0&&!B(U);U-=1);for(var K=o.filter(function(ue){return M(ue,T)!==1}),Y=T,Q=function(oe){if(K=K.filter(function(he){return M(he,oe)!==1}),!K.length)return Y=Math.max(oe-1,T),1},Z=T;Z1})&&ae.push(oe)},ie=G;ie<=Y;ie+=1)re(ie);var ve=ae.map(function(ue){var oe=O[ue],he=u(oe.record,ue),fe=function(pe){var Ce=ue+pe-1,De=u(O[Ce].record,Ce),je=z(he,De);return je.bottom-je.top},me=z(he);return s.createElement(OI,{key:ue,data:oe,rowKey:he,index:ue,style:{top:-V+me.top},extra:!0,getHeight:fe})});return ve},N=s.useMemo(function(){return{columnsOffset:j}},[j]),P="".concat(d,"-tbody"),A=w(["body","wrapper"]),F={};return x&&(F.position="sticky",F.bottom=0,jt(x)==="object"&&x.offsetScroll&&(F.bottom=x.offsetScroll)),s.createElement(ID.Provider,{value:N},s.createElement(ug,{fullHeight:!1,ref:E,prefixCls:"".concat(P,"-virtual"),styles:{horizontalScrollBar:F},className:P,height:C,itemHeight:y||24,data:O,itemKey:function(k){return u(k.record)},component:A,scrollWidth:v,direction:g,onVirtualScroll:function(k){var L,T=k.x;r({currentTarget:(L=E.current)===null||L===void 0?void 0:L.nativeElement,scrollLeft:T})},onScroll:$,extraRender:D},function(H,k,L){var T=u(H.record,k);return s.createElement(OI,{data:H,rowKey:T,index:k,style:L.style})}))}),wZ=xu(CZ),$Z=function(t,n){var r=n.ref,a=n.onScroll;return s.createElement(wZ,{ref:r,data:t,onScroll:a})};function EZ(e,t){var n=e.data,r=e.columns,a=e.scroll,o=e.sticky,c=e.prefixCls,u=c===void 0?_D:c,f=e.className,d=e.listItemHeight,h=e.components,v=e.onScroll,g=a||{},b=g.x,x=g.y;typeof b!="number"&&(b=1),typeof x!="number"&&(x=500);var C=pn(function($,E){return Aa(h,$)||E}),y=pn(v),w=s.useMemo(function(){return{sticky:o,scrollY:x,listItemHeight:d,getComponent:C,onScroll:y}},[o,x,d,C,y]);return s.createElement(PC.Provider,{value:w},s.createElement(Cu,Me({},e,{className:se(f,"".concat(u,"-virtual")),scroll:ee(ee({},a),{},{x:b}),components:ee(ee({},h),{},{body:n!=null&&n.length?$Z:void 0}),columns:r,internalHooks:Vf,tailor:!0,ref:t})))}var _Z=s.forwardRef(EZ);function RD(e){return hD(_Z,e)}RD();const OZ=e=>null,IZ=e=>null;var kC=s.createContext(null),RZ=s.createContext({}),NZ=function(t){for(var n=t.prefixCls,r=t.level,a=t.isStart,o=t.isEnd,c="".concat(n,"-indent-unit"),u=[],f=0;f=0&&n.splice(r,1),n}function Po(e,t){var n=(e||[]).slice();return n.indexOf(t)===-1&&n.push(t),n}function AC(e){return e.split("-")}function DZ(e,t){var n=[],r=qa(t,e);function a(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];o.forEach(function(c){var u=c.key,f=c.children;n.push(u),a(f)})}return a(r.children),n}function PZ(e){if(e.parent){var t=AC(e.pos);return Number(t[t.length-1])===e.parent.children.length-1}return!1}function kZ(e){var t=AC(e.pos);return Number(t[t.length-1])===0}function NI(e,t,n,r,a,o,c,u,f,d){var h,v=e.clientX,g=e.clientY,b=e.target.getBoundingClientRect(),x=b.top,C=b.height,y=(d==="rtl"?-1:1)*((a?.x||0)-v),w=(y-12)/r,$=f.filter(function(T){var z;return(z=u[T])===null||z===void 0||(z=z.children)===null||z===void 0?void 0:z.length}),E=qa(u,n.eventKey);if(g-1.5?o({dragNode:H,dropNode:k,dropPosition:1})?P=1:L=!1:o({dragNode:H,dropNode:k,dropPosition:0})?P=0:o({dragNode:H,dropNode:k,dropPosition:1})?P=1:L=!1:o({dragNode:H,dropNode:k,dropPosition:1})?P=1:L=!1,{dropPosition:P,dropLevelOffset:A,dropTargetKey:E.key,dropTargetPos:E.pos,dragOverNodeKey:N,dropContainerKey:P===0?null:((h=E.parent)===null||h===void 0?void 0:h.key)||null,dropAllowed:L}}function MI(e,t){if(e){var n=t.multiple;return n?e.slice():e.length?[e[0]]:e}}function Ky(e){if(!e)return null;var t;if(Array.isArray(e))t={checkedKeys:e,halfCheckedKeys:void 0};else if(jt(e)==="object")t={checkedKeys:e.checked||void 0,halfCheckedKeys:e.halfChecked||void 0};else return xr(!1,"`checkedKeys` is not an array or an object"),null;return t}function jx(e,t){var n=new Set;function r(a){if(!n.has(a)){var o=qa(t,a);if(o){n.add(a);var c=o.parent,u=o.node;u.disabled||c&&r(c.key)}}}return(e||[]).forEach(function(a){r(a)}),ke(n)}function AZ(e){const[t,n]=s.useState(null);return[s.useCallback((o,c,u)=>{const f=t??o,d=Math.min(f||0,o),h=Math.max(f||0,o),v=c.slice(d,h+1).map(x=>e(x)),g=v.some(x=>!u.has(x)),b=[];return v.forEach(x=>{g?(u.has(x)||b.push(x),u.add(x)):(u.delete(x),b.push(x))}),n(g?h:null),b},[t]),o=>{n(o)}]}const Nl={},Tx="SELECT_ALL",Dx="SELECT_INVERT",Px="SELECT_NONE",jI=[],ND=(e,t,n=[])=>((t||[]).forEach(r=>{n.push(r),r&&typeof r=="object"&&e in r&&ND(e,r[e],n)}),n),zZ=(e,t)=>{const{preserveSelectedRowKeys:n,selectedRowKeys:r,defaultSelectedRowKeys:a,getCheckboxProps:o,getTitleCheckboxProps:c,onChange:u,onSelect:f,onSelectAll:d,onSelectInvert:h,onSelectNone:v,onSelectMultiple:g,columnWidth:b,type:x,selections:C,fixed:y,renderCell:w,hideSelectAll:$,checkStrictly:E=!0}=t||{},{prefixCls:O,data:I,pageData:j,getRecordByKey:M,getRowKey:D,expandType:N,childrenColumnName:P,locale:A,getPopupContainer:F}=e,H=Kl(),[k,L]=AZ(oe=>oe),[T,z]=Wn(r||a||jI,{value:r}),V=s.useRef(new Map),q=s.useCallback(oe=>{if(n){const he=new Map;oe.forEach(fe=>{let me=M(fe);!me&&V.current.has(fe)&&(me=V.current.get(fe)),he.set(fe,me)}),V.current=he}},[M,n]);s.useEffect(()=>{q(T)},[T]);const G=s.useMemo(()=>ND(P,j),[P,j]),{keyEntities:B}=s.useMemo(()=>{if(E)return{keyEntities:null};let oe=I;if(n){const he=new Set(G.map((me,le)=>D(me,le))),fe=Array.from(V.current).reduce((me,[le,pe])=>he.has(le)?me:me.concat(pe),[]);oe=[].concat(ke(oe),ke(fe))}return yC(oe,{externalGetKey:D,childrenPropName:P})},[I,D,E,P,n,G]),U=s.useMemo(()=>{const oe=new Map;return G.forEach((he,fe)=>{const me=D(he,fe),le=(o?o(he):null)||{};oe.set(me,le)}),oe},[G,D,o]),K=s.useCallback(oe=>{const he=D(oe);let fe;return U.has(he)?fe=U.get(D(oe)):fe=o?o(oe):void 0,!!fe?.disabled},[U,D]),[Y,Q]=s.useMemo(()=>{if(E)return[T||[],[]];const{checkedKeys:oe,halfCheckedKeys:he}=Wc(T,!0,B,K);return[oe||[],he]},[T,E,B,K]),Z=s.useMemo(()=>{const oe=x==="radio"?Y.slice(0,1):Y;return new Set(oe)},[Y,x]),ae=s.useMemo(()=>x==="radio"?new Set:new Set(Q),[Q,x]);s.useEffect(()=>{t||z(jI)},[!!t]);const re=s.useCallback((oe,he)=>{let fe,me;q(oe),n?(fe=oe,me=oe.map(le=>V.current.get(le))):(fe=[],me=[],oe.forEach(le=>{const pe=M(le);pe!==void 0&&(fe.push(le),me.push(pe))})),z(fe),u?.(fe,me,{type:he})},[z,M,u,n]),ie=s.useCallback((oe,he,fe,me)=>{if(f){const le=fe.map(pe=>M(pe));f(M(oe),he,le,me)}re(fe,"single")},[f,M,re]),ve=s.useMemo(()=>!C||$?null:(C===!0?[Tx,Dx,Px]:C).map(he=>he===Tx?{key:"all",text:A.selectionAll,onSelect(){re(I.map((fe,me)=>D(fe,me)).filter(fe=>{const me=U.get(fe);return!me?.disabled||Z.has(fe)}),"all")}}:he===Dx?{key:"invert",text:A.selectInvert,onSelect(){const fe=new Set(Z);j.forEach((le,pe)=>{const Ce=D(le,pe),De=U.get(Ce);De?.disabled||(fe.has(Ce)?fe.delete(Ce):fe.add(Ce))});const me=Array.from(fe);h&&(H.deprecated(!1,"onSelectInvert","onChange"),h(me)),re(me,"invert")}}:he===Px?{key:"none",text:A.selectNone,onSelect(){v?.(),re(Array.from(Z).filter(fe=>{const me=U.get(fe);return me?.disabled}),"none")}}:he).map(he=>Object.assign(Object.assign({},he),{onSelect:(...fe)=>{var me,le;(le=he.onSelect)===null||le===void 0||(me=le).call.apply(me,[he].concat(fe)),L(null)}})),[C,Z,j,D,h,re]);return[s.useCallback(oe=>{var he;if(!t)return oe.filter(Pe=>Pe!==Nl);let fe=ke(oe);const me=new Set(Z),le=G.map(D).filter(Pe=>!U.get(Pe).disabled),pe=le.every(Pe=>me.has(Pe)),Ce=le.some(Pe=>me.has(Pe)),De=()=>{const Pe=[];pe?le.forEach(Be=>{me.delete(Be),Pe.push(Be)}):le.forEach(Be=>{me.has(Be)||(me.add(Be),Pe.push(Be))});const Oe=Array.from(me);d?.(!pe,Oe.map(Be=>M(Be)),Pe.map(Be=>M(Be))),re(Oe,"all"),L(null)};let je,ge;if(x!=="radio"){let Pe;if(ve){const Ge={getPopupContainer:F,items:ve.map((ft,$t)=>{const{key:Qe,text:at,onSelect:mt}=ft;return{key:Qe??$t,onClick:()=>{mt?.(le)},label:at}})};Pe=s.createElement("div",{className:`${O}-selection-extra`},s.createElement(_C,{menu:Ge,getPopupContainer:F},s.createElement("span",null,s.createElement(WS,null))))}const Oe=G.map((Ge,ft)=>{const $t=D(Ge,ft),Qe=U.get($t)||{};return Object.assign({checked:me.has($t)},Qe)}).filter(({disabled:Ge})=>Ge),Be=!!Oe.length&&Oe.length===G.length,$e=Be&&Oe.every(({checked:Ge})=>Ge),Te=Be&&Oe.some(({checked:Ge})=>Ge),be=c?.()||{},{onChange:ye,disabled:Re}=be;ge=s.createElement(qr,Object.assign({"aria-label":Pe?"Custom selection":"Select all"},be,{checked:Be?$e:!!G.length&&pe,indeterminate:Be?!$e&&Te:!pe&&Ce,onChange:Ge=>{De(),ye?.(Ge)},disabled:Re??(G.length===0||Be),skipGroup:!0})),je=!$&&s.createElement("div",{className:`${O}-selection`},ge,Pe)}let Ie;x==="radio"?Ie=(Pe,Oe,Be)=>{const $e=D(Oe,Be),Te=me.has($e),be=U.get($e);return{node:s.createElement(Sa,Object.assign({},be,{checked:Te,onClick:ye=>{var Re;ye.stopPropagation(),(Re=be?.onClick)===null||Re===void 0||Re.call(be,ye)},onChange:ye=>{var Re;me.has($e)||ie($e,!0,[$e],ye.nativeEvent),(Re=be?.onChange)===null||Re===void 0||Re.call(be,ye)}})),checked:Te}}:Ie=(Pe,Oe,Be)=>{var $e;const Te=D(Oe,Be),be=me.has(Te),ye=ae.has(Te),Re=U.get(Te);let Ge;return N==="nest"?Ge=ye:Ge=($e=Re?.indeterminate)!==null&&$e!==void 0?$e:ye,{node:s.createElement(qr,Object.assign({},Re,{indeterminate:Ge,checked:be,skipGroup:!0,onClick:ft=>{var $t;ft.stopPropagation(),($t=Re?.onClick)===null||$t===void 0||$t.call(Re,ft)},onChange:ft=>{var $t;const{nativeEvent:Qe}=ft,{shiftKey:at}=Qe,mt=le.indexOf(Te),st=Y.some(bt=>le.includes(bt));if(at&&E&&st){const bt=k(mt,le,me),qt=Array.from(me);g?.(!be,qt.map(Gt=>M(Gt)),bt.map(Gt=>M(Gt))),re(qt,"multiple")}else{const bt=Y;if(E){const qt=be?ro(bt,Te):Po(bt,Te);ie(Te,!be,qt,Qe)}else{const qt=Wc([].concat(ke(bt),[Te]),!0,B,K),{checkedKeys:Gt,halfCheckedKeys:vt}=qt;let It=Gt;if(be){const Et=new Set(Gt);Et.delete(Te),It=Wc(Array.from(Et),{halfCheckedKeys:vt},B,K).checkedKeys}ie(Te,!be,It,Qe)}}L(be?null:mt),($t=Re?.onChange)===null||$t===void 0||$t.call(Re,ft)}})),checked:be}};const Ee=(Pe,Oe,Be)=>{const{node:$e,checked:Te}=Ie(Pe,Oe,Be);return w?w(Te,Oe,Be,$e):$e};if(!fe.includes(Nl))if(fe.findIndex(Pe=>{var Oe;return((Oe=Pe[Gd])===null||Oe===void 0?void 0:Oe.columnType)==="EXPAND_COLUMN"})===0){const[Pe,...Oe]=fe;fe=[Pe,Nl].concat(ke(Oe))}else fe=[Nl].concat(ke(fe));const we=fe.indexOf(Nl);fe=fe.filter((Pe,Oe)=>Pe!==Nl||Oe===we);const Fe=fe[we-1],He=fe[we+1];let it=y;it===void 0&&(He?.fixed!==void 0?it=He.fixed:Fe?.fixed!==void 0&&(it=Fe.fixed)),it&&Fe&&((he=Fe[Gd])===null||he===void 0?void 0:he.columnType)==="EXPAND_COLUMN"&&Fe.fixed===void 0&&(Fe.fixed=it);const Ze=se(`${O}-selection-col`,{[`${O}-selection-col-with-dropdown`]:C&&x==="checkbox"}),Ye=()=>t?.columnTitle?typeof t.columnTitle=="function"?t.columnTitle(ge):t.columnTitle:je,et={fixed:it,width:b,className:`${O}-selection-column`,title:Ye(),render:Ee,onCell:t.onCell,align:t.align,[Gd]:{className:Ze}};return fe.map(Pe=>Pe===Nl?et:Pe)},[D,G,t,Y,Z,ae,b,ve,N,U,g,ie,K]),Z]};function LZ(e,t){return e._antProxy=e._antProxy||{},Object.keys(t).forEach(n=>{if(!(n in e._antProxy)){const r=e[n];e._antProxy[n]=r,e[n]=t[n]}}),e}function HZ(e,t){return s.useImperativeHandle(e,()=>{const n=t(),{nativeElement:r}=n;return typeof Proxy<"u"?new Proxy(r,{get(a,o){return n[o]?n[o]:Reflect.get(a,o)}}):LZ(r,n)})}function BZ(e){return t=>{const{prefixCls:n,onExpand:r,record:a,expanded:o,expandable:c}=t,u=`${n}-row-expand-icon`;return s.createElement("button",{type:"button",onClick:f=>{r(a,f),f.stopPropagation()},className:se(u,{[`${u}-spaced`]:!c,[`${u}-expanded`]:c&&o,[`${u}-collapsed`]:c&&!o}),"aria-label":o?e.collapse:e.expand,"aria-expanded":o})}}function FZ(e){return(n,r)=>{const a=n.querySelector(`.${e}-container`);let o=r;if(a){const c=getComputedStyle(a),u=Number.parseInt(c.borderLeftWidth,10),f=Number.parseInt(c.borderRightWidth,10);o=r-u-f}return o}}const Bl=(e,t)=>"key"in e&&e.key!==void 0&&e.key!==null?e.key:e.dataIndex?Array.isArray(e.dataIndex)?e.dataIndex.join("."):e.dataIndex:t;function wu(e,t){return t?`${t}-${e}`:`${e}`}const Rg=(e,t)=>typeof e=="function"?e(t):e,VZ=(e,t)=>{const n=Rg(e,t);return Object.prototype.toString.call(n)==="[object Object]"?"":n};var KZ={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M349 838c0 17.7 14.2 32 31.8 32h262.4c17.6 0 31.8-14.3 31.8-32V642H349v196zm531.1-684H143.9c-24.5 0-39.8 26.7-27.5 48l221.3 376h348.8l221.3-376c12.1-21.3-3.2-48-27.7-48z"}}]},name:"filter",theme:"filled"},UZ=function(t,n){return s.createElement($n,Me({},t,{ref:n,icon:KZ}))},WZ=s.forwardRef(UZ);function qZ(e){const t=s.useRef(e),n=YS();return[()=>t.current,r=>{t.current=r,n()}]}var YZ=function(t){var n=t.dropPosition,r=t.dropLevelOffset,a=t.indent,o={pointerEvents:"none",position:"absolute",right:0,backgroundColor:"red",height:2};switch(n){case-1:o.top=0,o.left=-r*a;break;case 1:o.bottom=0,o.left=-r*a;break;case 0:o.bottom=0,o.left=a;break}return Se.createElement("div",{style:o})};function MD(e){if(e==null)throw new TypeError("Cannot destructure "+e)}function GZ(e,t){var n=s.useState(!1),r=ce(n,2),a=r[0],o=r[1];fn(function(){if(a)return e(),function(){t()}},[a]),fn(function(){return o(!0),function(){o(!1)}},[])}var XZ=["className","style","motion","motionNodes","motionType","onMotionStart","onMotionEnd","active","treeNodeRequiredProps"],QZ=s.forwardRef(function(e,t){var n=e.className,r=e.style,a=e.motion,o=e.motionNodes,c=e.motionType,u=e.onMotionStart,f=e.onMotionEnd,d=e.active,h=e.treeNodeRequiredProps,v=Kt(e,XZ),g=s.useState(!0),b=ce(g,2),x=b[0],C=b[1],y=s.useContext(kC),w=y.prefixCls,$=o&&c!=="hide";fn(function(){o&&$!==x&&C($)},[o]);var E=function(){o&&u()},O=s.useRef(!1),I=function(){o&&!O.current&&(O.current=!0,f())};GZ(E,I);var j=function(D){$===D&&I()};return o?s.createElement(Oi,Me({ref:t,visible:x},a,{motionAppear:c==="show",onVisibleChanged:j}),function(M,D){var N=M.className,P=M.style;return s.createElement("div",{ref:D,className:se("".concat(w,"-treenode-motion"),N),style:P},o.map(function(A){var F=Object.assign({},(MD(A.data),A.data)),H=A.title,k=A.key,L=A.isStart,T=A.isEnd;delete F.children;var z=Yd(k,h);return s.createElement(Cf,Me({},F,z,{title:H,active:d,data:A.data,key:k,isStart:L,isEnd:T}))}))}):s.createElement(Cf,Me({domRef:t,className:n,style:r},v,{active:d}))});function ZZ(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],n=e.length,r=t.length;if(Math.abs(n-r)!==1)return{add:!1,key:null};function a(o,c){var u=new Map;o.forEach(function(d){u.set(d,!0)});var f=c.filter(function(d){return!u.has(d)});return f.length===1?f[0]:null}return n ").concat(t);return t}var nJ=s.forwardRef(function(e,t){var n=e.prefixCls,r=e.data;e.selectable,e.checkable;var a=e.expandedKeys,o=e.selectedKeys,c=e.checkedKeys,u=e.loadedKeys,f=e.loadingKeys,d=e.halfCheckedKeys,h=e.keyEntities,v=e.disabled,g=e.dragging,b=e.dragOverNodeKey,x=e.dropPosition,C=e.motion,y=e.height,w=e.itemHeight,$=e.virtual,E=e.scrollWidth,O=e.focusable,I=e.activeItem,j=e.focused,M=e.tabIndex,D=e.onKeyDown,N=e.onFocus,P=e.onBlur,A=e.onActiveChange,F=e.onListChangeStart,H=e.onListChangeEnd,k=Kt(e,JZ),L=s.useRef(null),T=s.useRef(null);s.useImperativeHandle(t,function(){return{scrollTo:function(Ie){L.current.scrollTo(Ie)},getIndentWidth:function(){return T.current.offsetWidth}}});var z=s.useState(a),V=ce(z,2),q=V[0],G=V[1],B=s.useState(r),U=ce(B,2),K=U[0],Y=U[1],Q=s.useState(r),Z=ce(Q,2),ae=Z[0],re=Z[1],ie=s.useState([]),ve=ce(ie,2),ue=ve[0],oe=ve[1],he=s.useState(null),fe=ce(he,2),me=fe[0],le=fe[1],pe=s.useRef(r);pe.current=r;function Ce(){var ge=pe.current;Y(ge),re(ge),oe([]),le(null),H()}fn(function(){G(a);var ge=ZZ(q,a);if(ge.key!==null)if(ge.add){var Ie=K.findIndex(function(Ze){var Ye=Ze.key;return Ye===ge.key}),Ee=kI(TI(K,r,ge.key),$,y,w),we=K.slice();we.splice(Ie+1,0,PI),re(we),oe(Ee),le("show")}else{var Fe=r.findIndex(function(Ze){var Ye=Ze.key;return Ye===ge.key}),He=kI(TI(r,K,ge.key),$,y,w),it=r.slice();it.splice(Fe+1,0,PI),re(it),oe(He),le("hide")}else K!==r&&(Y(r),re(r))},[a,r]),s.useEffect(function(){g||Ce()},[g]);var De=C?ae:r,je={expandedKeys:a,selectedKeys:o,loadedKeys:u,loadingKeys:f,checkedKeys:c,halfCheckedKeys:d,dragOverNodeKey:b,dropPosition:x,keyEntities:h};return s.createElement(s.Fragment,null,j&&I&&s.createElement("span",{style:DI,"aria-live":"assertive"},tJ(I)),s.createElement("div",null,s.createElement("input",{style:DI,disabled:O===!1||v,tabIndex:O!==!1?M:null,onKeyDown:D,onFocus:N,onBlur:P,value:"",onChange:eJ,"aria-label":"for screen reader"})),s.createElement("div",{className:"".concat(n,"-treenode"),"aria-hidden":!0,style:{position:"absolute",pointerEvents:"none",visibility:"hidden",height:0,overflow:"hidden",border:0,padding:0}},s.createElement("div",{className:"".concat(n,"-indent")},s.createElement("div",{ref:T,className:"".concat(n,"-indent-unit")}))),s.createElement(ug,Me({},k,{data:De,itemKey:AI,height:y,fullHeight:!1,virtual:$,itemHeight:w,scrollWidth:E,prefixCls:"".concat(n,"-list"),ref:L,role:"tree",onVisibleChange:function(Ie){Ie.every(function(Ee){return AI(Ee)!==Ts})&&Ce()}}),function(ge){var Ie=ge.pos,Ee=Object.assign({},(MD(ge.data),ge.data)),we=ge.title,Fe=ge.key,He=ge.isStart,it=ge.isEnd,Ze=Hf(Fe,Ie);delete Ee.key,delete Ee.children;var Ye=Yd(Ze,je);return s.createElement(QZ,Me({},Ee,Ye,{title:we,active:!!I&&Fe===I.key,pos:Ie,data:ge.data,isStart:He,isEnd:it,motion:C,motionNodes:Fe===Ts?ue:null,motionType:me,onMotionStart:F,onMotionEnd:Ce,treeNodeRequiredProps:je,onMouseMove:function(){A(null)}}))}))}),rJ=10,zC=(function(e){oi(n,e);var t=_i(n);function n(){var r;Sr(this,n);for(var a=arguments.length,o=new Array(a),c=0;c2&&arguments[2]!==void 0?arguments[2]:!1,v=r.state,g=v.dragChildrenKeys,b=v.dropPosition,x=v.dropTargetKey,C=v.dropTargetPos,y=v.dropAllowed;if(y){var w=r.props.onDrop;if(r.setState({dragOverNodeKey:null}),r.cleanDragState(),x!==null){var $=ee(ee({},Yd(x,r.getTreeNodeRequiredProps())),{},{active:((d=r.getActiveItem())===null||d===void 0?void 0:d.key)===x,data:qa(r.state.keyEntities,x).node}),E=g.includes(x);xr(!E,"Can not drop to dragNode's children node. This is a bug of rc-tree. Please report an issue.");var O=AC(C),I={event:u,node:Jr($),dragNode:r.dragNodeProps?Jr(r.dragNodeProps):null,dragNodesKeys:[r.dragNodeProps.eventKey].concat(g),dropToGap:b!==0,dropPosition:b+Number(O[O.length-1])};h||w?.(I),r.dragNodeProps=null}}}),X(St(r),"cleanDragState",function(){var u=r.state.draggingNodeKey;u!==null&&r.setState({draggingNodeKey:null,dropPosition:null,dropContainerKey:null,dropTargetKey:null,dropLevelOffset:null,dropAllowed:!0,dragOverNodeKey:null}),r.dragStartMousePosition=null,r.currentMouseOverDroppableNodeKey=null}),X(St(r),"triggerExpandActionExpand",function(u,f){var d=r.state,h=d.expandedKeys,v=d.flattenNodes,g=f.expanded,b=f.key,x=f.isLeaf;if(!(x||u.shiftKey||u.metaKey||u.ctrlKey)){var C=v.filter(function(w){return w.key===b})[0],y=Jr(ee(ee({},Yd(b,r.getTreeNodeRequiredProps())),{},{data:C.data}));r.setExpandedKeys(g?ro(h,b):Po(h,b)),r.onNodeExpand(u,y)}}),X(St(r),"onNodeClick",function(u,f){var d=r.props,h=d.onClick,v=d.expandAction;v==="click"&&r.triggerExpandActionExpand(u,f),h?.(u,f)}),X(St(r),"onNodeDoubleClick",function(u,f){var d=r.props,h=d.onDoubleClick,v=d.expandAction;v==="doubleClick"&&r.triggerExpandActionExpand(u,f),h?.(u,f)}),X(St(r),"onNodeSelect",function(u,f){var d=r.state.selectedKeys,h=r.state,v=h.keyEntities,g=h.fieldNames,b=r.props,x=b.onSelect,C=b.multiple,y=f.selected,w=f[g.key],$=!y;$?C?d=Po(d,w):d=[w]:d=ro(d,w);var E=d.map(function(O){var I=qa(v,O);return I?I.node:null}).filter(Boolean);r.setUncontrolledState({selectedKeys:d}),x?.(d,{event:"select",selected:$,node:f,selectedNodes:E,nativeEvent:u.nativeEvent})}),X(St(r),"onNodeCheck",function(u,f,d){var h=r.state,v=h.keyEntities,g=h.checkedKeys,b=h.halfCheckedKeys,x=r.props,C=x.checkStrictly,y=x.onCheck,w=f.key,$,E={event:"check",node:f,checked:d,nativeEvent:u.nativeEvent};if(C){var O=d?Po(g,w):ro(g,w),I=ro(b,w);$={checked:O,halfChecked:I},E.checkedNodes=O.map(function(A){return qa(v,A)}).filter(Boolean).map(function(A){return A.node}),r.setUncontrolledState({checkedKeys:O})}else{var j=Wc([].concat(ke(g),[w]),!0,v),M=j.checkedKeys,D=j.halfCheckedKeys;if(!d){var N=new Set(M);N.delete(w);var P=Wc(Array.from(N),{halfCheckedKeys:D},v);M=P.checkedKeys,D=P.halfCheckedKeys}$=M,E.checkedNodes=[],E.checkedNodesPositions=[],E.halfCheckedKeys=D,M.forEach(function(A){var F=qa(v,A);if(F){var H=F.node,k=F.pos;E.checkedNodes.push(H),E.checkedNodesPositions.push({node:H,pos:k})}}),r.setUncontrolledState({checkedKeys:M},!1,{halfCheckedKeys:D})}y?.($,E)}),X(St(r),"onNodeLoad",function(u){var f,d=u.key,h=r.state.keyEntities,v=qa(h,d);if(!(v!=null&&(f=v.children)!==null&&f!==void 0&&f.length)){var g=new Promise(function(b,x){r.setState(function(C){var y=C.loadedKeys,w=y===void 0?[]:y,$=C.loadingKeys,E=$===void 0?[]:$,O=r.props,I=O.loadData,j=O.onLoad;if(!I||w.includes(d)||E.includes(d))return null;var M=I(u);return M.then(function(){var D=r.state.loadedKeys,N=Po(D,d);j?.(N,{event:"load",node:u}),r.setUncontrolledState({loadedKeys:N}),r.setState(function(P){return{loadingKeys:ro(P.loadingKeys,d)}}),b()}).catch(function(D){if(r.setState(function(P){return{loadingKeys:ro(P.loadingKeys,d)}}),r.loadingRetryTimes[d]=(r.loadingRetryTimes[d]||0)+1,r.loadingRetryTimes[d]>=rJ){var N=r.state.loadedKeys;xr(!1,"Retry for `loadData` many times but still failed. No more retry."),r.setUncontrolledState({loadedKeys:Po(N,d)}),b()}x(D)}),{loadingKeys:Po(E,d)}})});return g.catch(function(){}),g}}),X(St(r),"onNodeMouseEnter",function(u,f){var d=r.props.onMouseEnter;d?.({event:u,node:f})}),X(St(r),"onNodeMouseLeave",function(u,f){var d=r.props.onMouseLeave;d?.({event:u,node:f})}),X(St(r),"onNodeContextMenu",function(u,f){var d=r.props.onRightClick;d&&(u.preventDefault(),d({event:u,node:f}))}),X(St(r),"onFocus",function(){var u=r.props.onFocus;r.setState({focused:!0});for(var f=arguments.length,d=new Array(f),h=0;h1&&arguments[1]!==void 0?arguments[1]:!1,d=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;if(!r.destroyed){var h=!1,v=!0,g={};Object.keys(u).forEach(function(b){if(r.props.hasOwnProperty(b)){v=!1;return}h=!0,g[b]=u[b]}),h&&(!f||v)&&r.setState(ee(ee({},g),d))}}),X(St(r),"scrollTo",function(u){r.listRef.current.scrollTo(u)}),r}return Cr(n,[{key:"componentDidMount",value:function(){this.destroyed=!1,this.onUpdated()}},{key:"componentDidUpdate",value:function(){this.onUpdated()}},{key:"onUpdated",value:function(){var a=this.props,o=a.activeKey,c=a.itemScrollOffset,u=c===void 0?0:c;o!==void 0&&o!==this.state.activeKey&&(this.setState({activeKey:o}),o!==null&&this.scrollTo({key:o,offset:u}))}},{key:"componentWillUnmount",value:function(){window.removeEventListener("dragend",this.onWindowDragEnd),this.destroyed=!0}},{key:"resetDragState",value:function(){this.setState({dragOverNodeKey:null,dropPosition:null,dropLevelOffset:null,dropTargetKey:null,dropContainerKey:null,dropTargetPos:null,dropAllowed:!1})}},{key:"render",value:function(){var a=this.state,o=a.focused,c=a.flattenNodes,u=a.keyEntities,f=a.draggingNodeKey,d=a.activeKey,h=a.dropLevelOffset,v=a.dropContainerKey,g=a.dropTargetKey,b=a.dropPosition,x=a.dragOverNodeKey,C=a.indent,y=this.props,w=y.prefixCls,$=y.className,E=y.style,O=y.showLine,I=y.focusable,j=y.tabIndex,M=j===void 0?0:j,D=y.selectable,N=y.showIcon,P=y.icon,A=y.switcherIcon,F=y.draggable,H=y.checkable,k=y.checkStrictly,L=y.disabled,T=y.motion,z=y.loadData,V=y.filterTreeNode,q=y.height,G=y.itemHeight,B=y.scrollWidth,U=y.virtual,K=y.titleRender,Y=y.dropIndicatorRender,Q=y.onContextMenu,Z=y.onScroll,ae=y.direction,re=y.rootClassName,ie=y.rootStyle,ve=ma(this.props,{aria:!0,data:!0}),ue;F&&(jt(F)==="object"?ue=F:typeof F=="function"?ue={nodeDraggable:F}:ue={});var oe={prefixCls:w,selectable:D,showIcon:N,icon:P,switcherIcon:A,draggable:ue,draggingNodeKey:f,checkable:H,checkStrictly:k,disabled:L,keyEntities:u,dropLevelOffset:h,dropContainerKey:v,dropTargetKey:g,dropPosition:b,dragOverNodeKey:x,indent:C,direction:ae,dropIndicatorRender:Y,loadData:z,filterTreeNode:V,titleRender:K,onNodeClick:this.onNodeClick,onNodeDoubleClick:this.onNodeDoubleClick,onNodeExpand:this.onNodeExpand,onNodeSelect:this.onNodeSelect,onNodeCheck:this.onNodeCheck,onNodeLoad:this.onNodeLoad,onNodeMouseEnter:this.onNodeMouseEnter,onNodeMouseLeave:this.onNodeMouseLeave,onNodeContextMenu:this.onNodeContextMenu,onNodeDragStart:this.onNodeDragStart,onNodeDragEnter:this.onNodeDragEnter,onNodeDragOver:this.onNodeDragOver,onNodeDragLeave:this.onNodeDragLeave,onNodeDragEnd:this.onNodeDragEnd,onNodeDrop:this.onNodeDrop};return s.createElement(kC.Provider,{value:oe},s.createElement("div",{className:se(w,$,re,X(X(X({},"".concat(w,"-show-line"),O),"".concat(w,"-focused"),o),"".concat(w,"-active-focused"),d!==null)),style:ie},s.createElement(nJ,Me({ref:this.listRef,prefixCls:w,style:E,data:c,disabled:L,selectable:D,checkable:!!H,motion:T,dragging:f!==null,height:q,itemHeight:G,virtual:U,focusable:I,focused:o,tabIndex:M,activeItem:this.getActiveItem(),onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.onKeyDown,onActiveChange:this.onActiveChange,onListChangeStart:this.onListChangeStart,onListChangeEnd:this.onListChangeEnd,onContextMenu:Q,onScroll:Z,scrollWidth:B},this.getTreeNodeRequiredProps(),ve))))}}],[{key:"getDerivedStateFromProps",value:function(a,o){var c=o.prevProps,u={prevProps:a};function f(M){return!c&&a.hasOwnProperty(M)||c&&c[M]!==a[M]}var d,h=o.fieldNames;if(f("fieldNames")&&(h=iu(a.fieldNames),u.fieldNames=h),f("treeData")?d=a.treeData:f("children")&&(xr(!1,"`children` of Tree is deprecated. Please use `treeData` instead."),d=OT(a.children)),d){u.treeData=d;var v=yC(d,{fieldNames:h});u.keyEntities=ee(X({},Ts,jD),v.keyEntities)}var g=u.keyEntities||o.keyEntities;if(f("expandedKeys")||c&&f("autoExpandParent"))u.expandedKeys=a.autoExpandParent||!c&&a.defaultExpandParent?jx(a.expandedKeys,g):a.expandedKeys;else if(!c&&a.defaultExpandAll){var b=ee({},g);delete b[Ts];var x=[];Object.keys(b).forEach(function(M){var D=b[M];D.children&&D.children.length&&x.push(D.key)}),u.expandedKeys=x}else!c&&a.defaultExpandedKeys&&(u.expandedKeys=a.autoExpandParent||a.defaultExpandParent?jx(a.defaultExpandedKeys,g):a.defaultExpandedKeys);if(u.expandedKeys||delete u.expandedKeys,d||u.expandedKeys){var C=ky(d||o.treeData,u.expandedKeys||o.expandedKeys,h);u.flattenNodes=C}if(a.selectable&&(f("selectedKeys")?u.selectedKeys=MI(a.selectedKeys,a):!c&&a.defaultSelectedKeys&&(u.selectedKeys=MI(a.defaultSelectedKeys,a))),a.checkable){var y;if(f("checkedKeys")?y=Ky(a.checkedKeys)||{}:!c&&a.defaultCheckedKeys?y=Ky(a.defaultCheckedKeys)||{}:d&&(y=Ky(a.checkedKeys)||{checkedKeys:o.checkedKeys,halfCheckedKeys:o.halfCheckedKeys}),y){var w=y,$=w.checkedKeys,E=$===void 0?[]:$,O=w.halfCheckedKeys,I=O===void 0?[]:O;if(!a.checkStrictly){var j=Wc(E,!0,g);E=j.checkedKeys,I=j.halfCheckedKeys}u.checkedKeys=E,u.halfCheckedKeys=I}}return f("loadedKeys")&&(u.loadedKeys=a.loadedKeys),u}}]),n})(s.Component);X(zC,"defaultProps",{prefixCls:"rc-tree",showLine:!1,showIcon:!0,selectable:!0,multiple:!1,checkable:!1,disabled:!1,checkStrictly:!1,draggable:!1,defaultExpandParent:!0,autoExpandParent:!1,defaultExpandAll:!1,defaultExpandedKeys:[],defaultCheckedKeys:[],defaultSelectedKeys:[],dropIndicatorRender:YZ,allowDrop:function(){return!0},expandAction:!1});X(zC,"TreeNode",Cf);var aJ={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494z"}}]},name:"file",theme:"outlined"},iJ=function(t,n){return s.createElement($n,Me({},t,{ref:n,icon:aJ}))},TD=s.forwardRef(iJ),oJ={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M928 444H820V330.4c0-17.7-14.3-32-32-32H473L355.7 186.2a8.15 8.15 0 00-5.5-2.2H96c-17.7 0-32 14.3-32 32v592c0 17.7 14.3 32 32 32h698c13 0 24.8-7.9 29.7-20l134-332c1.5-3.8 2.3-7.9 2.3-12 0-17.7-14.3-32-32-32zM136 256h188.5l119.6 114.4H748V444H238c-13 0-24.8 7.9-29.7 20L136 643.2V256zm635.3 512H159l103.3-256h612.4L771.3 768z"}}]},name:"folder-open",theme:"outlined"},lJ=function(t,n){return s.createElement($n,Me({},t,{ref:n,icon:oJ}))},sJ=s.forwardRef(lJ),cJ={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M880 298.4H521L403.7 186.2a8.15 8.15 0 00-5.5-2.2H144c-17.7 0-32 14.3-32 32v592c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V330.4c0-17.7-14.3-32-32-32zM840 768H184V256h188.5l119.6 114.4H840V768z"}}]},name:"folder",theme:"outlined"},uJ=function(t,n){return s.createElement($n,Me({},t,{ref:n,icon:cJ}))},dJ=s.forwardRef(uJ),fJ={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M300 276.5a56 56 0 1056-97 56 56 0 00-56 97zm0 284a56 56 0 1056-97 56 56 0 00-56 97zM640 228a56 56 0 10112 0 56 56 0 00-112 0zm0 284a56 56 0 10112 0 56 56 0 00-112 0zM300 844.5a56 56 0 1056-97 56 56 0 00-56 97zM640 796a56 56 0 10112 0 56 56 0 00-112 0z"}}]},name:"holder",theme:"outlined"},mJ=function(t,n){return s.createElement($n,Me({},t,{ref:n,icon:fJ}))},hJ=s.forwardRef(mJ);const vJ=({treeCls:e,treeNodeCls:t,directoryNodeSelectedBg:n,directoryNodeSelectedColor:r,motionDurationMid:a,borderRadius:o,controlItemBgHover:c})=>({[`${e}${e}-directory ${t}`]:{[`${e}-node-content-wrapper`]:{position:"static",[`&:has(${e}-drop-indicator)`]:{position:"relative"},[`> *:not(${e}-drop-indicator)`]:{position:"relative"},"&:hover":{background:"transparent"},"&:before":{position:"absolute",inset:0,transition:`background-color ${a}`,content:'""',borderRadius:o},"&:hover:before":{background:c}},[`${e}-switcher, ${e}-checkbox, ${e}-draggable-icon`]:{zIndex:1},"&-selected":{background:n,borderRadius:o,[`${e}-switcher, ${e}-draggable-icon`]:{color:r},[`${e}-node-content-wrapper`]:{color:r,background:"transparent","&, &:hover":{color:r},"&:before, &:hover:before":{background:n}}}}}),gJ=new jn("ant-tree-node-fx-do-not-use",{"0%":{opacity:0},"100%":{opacity:1}}),pJ=(e,t)=>({[`.${e}-switcher-icon`]:{display:"inline-block",fontSize:10,verticalAlign:"baseline",svg:{transition:`transform ${t.motionDurationSlow}`}}}),bJ=(e,t)=>({[`.${e}-drop-indicator`]:{position:"absolute",zIndex:1,height:2,backgroundColor:t.colorPrimary,borderRadius:1,pointerEvents:"none","&:after":{position:"absolute",top:-3,insetInlineStart:-6,width:8,height:8,backgroundColor:"transparent",border:`${te(t.lineWidthBold)} solid ${t.colorPrimary}`,borderRadius:"50%",content:'""'}}}),yJ=(e,t)=>{const{treeCls:n,treeNodeCls:r,treeNodePadding:a,titleHeight:o,indentSize:c,nodeSelectedBg:u,nodeHoverBg:f,colorTextQuaternary:d,controlItemBgActiveDisabled:h}=t;return{[n]:Object.assign(Object.assign({},zn(t)),{"--rc-virtual-list-scrollbar-bg":t.colorSplit,background:t.colorBgContainer,borderRadius:t.borderRadius,transition:`background-color ${t.motionDurationSlow}`,"&-rtl":{direction:"rtl"},[`&${n}-rtl ${n}-switcher_close ${n}-switcher-icon svg`]:{transform:"rotate(90deg)"},[`&-focused:not(:hover):not(${n}-active-focused)`]:so(t),[`${n}-list-holder-inner`]:{alignItems:"flex-start"},[`&${n}-block-node`]:{[`${n}-list-holder-inner`]:{alignItems:"stretch",[`${n}-node-content-wrapper`]:{flex:"auto"},[`${r}.dragging:after`]:{position:"absolute",inset:0,border:`1px solid ${t.colorPrimary}`,opacity:0,animationName:gJ,animationDuration:t.motionDurationSlow,animationPlayState:"running",animationFillMode:"forwards",content:'""',pointerEvents:"none",borderRadius:t.borderRadius}}},[r]:{display:"flex",alignItems:"flex-start",marginBottom:a,lineHeight:te(o),position:"relative","&:before":{content:'""',position:"absolute",zIndex:1,insetInlineStart:0,width:"100%",top:"100%",height:a},[`&-disabled ${n}-node-content-wrapper`]:{color:t.colorTextDisabled,cursor:"not-allowed","&:hover":{background:"transparent"}},[`${n}-checkbox-disabled + ${n}-node-selected,&${r}-disabled${r}-selected ${n}-node-content-wrapper`]:{backgroundColor:h},[`${n}-checkbox-disabled`]:{pointerEvents:"unset"},[`&:not(${r}-disabled)`]:{[`${n}-node-content-wrapper`]:{"&:hover":{color:t.nodeHoverColor}}},[`&-active ${n}-node-content-wrapper`]:{background:t.controlItemBgHover},[`&:not(${r}-disabled).filter-node ${n}-title`]:{color:t.colorPrimary,fontWeight:t.fontWeightStrong},"&-draggable":{cursor:"grab",[`${n}-draggable-icon`]:{flexShrink:0,width:o,textAlign:"center",visibility:"visible",color:d},[`&${r}-disabled ${n}-draggable-icon`]:{visibility:"hidden"}}},[`${n}-indent`]:{alignSelf:"stretch",whiteSpace:"nowrap",userSelect:"none","&-unit":{display:"inline-block",width:c}},[`${n}-draggable-icon`]:{visibility:"hidden"},[`${n}-switcher, ${n}-checkbox`]:{marginInlineEnd:t.calc(t.calc(o).sub(t.controlInteractiveSize)).div(2).equal()},[`${n}-switcher`]:Object.assign(Object.assign({},pJ(e,t)),{position:"relative",flex:"none",alignSelf:"stretch",width:o,textAlign:"center",cursor:"pointer",userSelect:"none",transition:`all ${t.motionDurationSlow}`,"&-noop":{cursor:"unset"},"&:before":{pointerEvents:"none",content:'""',width:o,height:o,position:"absolute",left:{_skip_check_:!0,value:0},top:0,borderRadius:t.borderRadius,transition:`all ${t.motionDurationSlow}`},[`&:not(${n}-switcher-noop):hover:before`]:{backgroundColor:t.colorBgTextHover},[`&_close ${n}-switcher-icon svg`]:{transform:"rotate(-90deg)"},"&-loading-icon":{color:t.colorPrimary},"&-leaf-line":{position:"relative",zIndex:1,display:"inline-block",width:"100%",height:"100%","&:before":{position:"absolute",top:0,insetInlineEnd:t.calc(o).div(2).equal(),bottom:t.calc(a).mul(-1).equal(),marginInlineStart:-1,borderInlineEnd:`1px solid ${t.colorBorder}`,content:'""'},"&:after":{position:"absolute",width:t.calc(t.calc(o).div(2).equal()).mul(.8).equal(),height:t.calc(o).div(2).equal(),borderBottom:`1px solid ${t.colorBorder}`,content:'""'}}}),[`${n}-node-content-wrapper`]:Object.assign(Object.assign({position:"relative",minHeight:o,paddingBlock:0,paddingInline:t.paddingXS,background:"transparent",borderRadius:t.borderRadius,cursor:"pointer",transition:`all ${t.motionDurationMid}, border 0s, line-height 0s, box-shadow 0s`},bJ(e,t)),{"&:hover":{backgroundColor:f},[`&${n}-node-selected`]:{color:t.nodeSelectedColor,backgroundColor:u},[`${n}-iconEle`]:{display:"inline-block",width:o,height:o,textAlign:"center",verticalAlign:"top","&:empty":{display:"none"}}}),[`${n}-unselectable ${n}-node-content-wrapper:hover`]:{backgroundColor:"transparent"},[`${r}.drop-container > [draggable]`]:{boxShadow:`0 0 0 2px ${t.colorPrimary}`},"&-show-line":{[`${n}-indent-unit`]:{position:"relative",height:"100%","&:before":{position:"absolute",top:0,insetInlineEnd:t.calc(o).div(2).equal(),bottom:t.calc(a).mul(-1).equal(),borderInlineEnd:`1px solid ${t.colorBorder}`,content:'""'},"&-end:before":{display:"none"}},[`${n}-switcher`]:{background:"transparent","&-line-icon":{verticalAlign:"-0.15em"}}},[`${r}-leaf-last ${n}-switcher-leaf-line:before`]:{top:"auto !important",bottom:"auto !important",height:`${te(t.calc(o).div(2).equal())} !important`}})}},xJ=(e,t,n=!0)=>{const r=`.${e}`,a=`${r}-treenode`,o=t.calc(t.paddingXS).div(2).equal(),c=xn(t,{treeCls:r,treeNodeCls:a,treeNodePadding:o});return[yJ(e,c),n&&vJ(c)].filter(Boolean)},SJ=e=>{const{controlHeightSM:t,controlItemBgHover:n,controlItemBgActive:r}=e,a=t;return{titleHeight:a,indentSize:a,nodeHoverBg:n,nodeHoverColor:e.colorText,nodeSelectedBg:r,nodeSelectedColor:e.colorText}},CJ=e=>{const{colorTextLightSolid:t,colorPrimary:n}=e;return Object.assign(Object.assign({},SJ(e)),{directoryNodeSelectedColor:t,directoryNodeSelectedBg:n})},wJ=Kn("Tree",(e,{prefixCls:t})=>[{[e.componentCls]:RT(`${t}-checkbox`,e)},xJ(t,e),qv(e)],CJ),zI=4;function $J(e){const{dropPosition:t,dropLevelOffset:n,prefixCls:r,indent:a,direction:o="ltr"}=e,c=o==="ltr"?"left":"right",u=o==="ltr"?"right":"left",f={[c]:-n*a+zI,[u]:0};switch(t){case-1:f.top=-3;break;case 1:f.bottom=-3;break;default:f.bottom=-3,f[c]=a+zI;break}return Se.createElement("div",{style:f,className:`${r}-drop-indicator`})}var EJ={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M840.4 300H183.6c-19.7 0-30.7 20.8-18.5 35l328.4 380.8c9.4 10.9 27.5 10.9 37 0L858.9 335c12.2-14.2 1.2-35-18.5-35z"}}]},name:"caret-down",theme:"filled"},_J=function(t,n){return s.createElement($n,Me({},t,{ref:n,icon:EJ}))},OJ=s.forwardRef(_J),IJ={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M328 544h368c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8z"}},{tag:"path",attrs:{d:"M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z"}}]},name:"minus-square",theme:"outlined"},RJ=function(t,n){return s.createElement($n,Me({},t,{ref:n,icon:IJ}))},NJ=s.forwardRef(RJ),MJ={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M328 544h152v152c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V544h152c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H544V328c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v152H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8z"}},{tag:"path",attrs:{d:"M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z"}}]},name:"plus-square",theme:"outlined"},jJ=function(t,n){return s.createElement($n,Me({},t,{ref:n,icon:MJ}))},TJ=s.forwardRef(jJ);const DJ=e=>{var t,n;const{prefixCls:r,switcherIcon:a,treeNodeProps:o,showLine:c,switcherLoadingIcon:u}=e,{isLeaf:f,expanded:d,loading:h}=o;if(h)return s.isValidElement(u)?u:s.createElement(qo,{className:`${r}-switcher-loading-icon`});let v;if(c&&typeof c=="object"&&(v=c.showLeafIcon),f){if(!c)return null;if(typeof v!="boolean"&&v){const x=typeof v=="function"?v(o):v,C=`${r}-switcher-line-custom-icon`;return s.isValidElement(x)?$a(x,{className:se((t=x.props)===null||t===void 0?void 0:t.className,C)}):x}return v?s.createElement(TD,{className:`${r}-switcher-line-icon`}):s.createElement("span",{className:`${r}-switcher-leaf-line`})}const g=`${r}-switcher-icon`,b=typeof a=="function"?a(o):a;return s.isValidElement(b)?$a(b,{className:se((n=b.props)===null||n===void 0?void 0:n.className,g)}):b!==void 0?b:c?d?s.createElement(NJ,{className:`${r}-switcher-line-icon`}):s.createElement(TJ,{className:`${r}-switcher-line-icon`}):s.createElement(OJ,{className:g})},DD=Se.forwardRef((e,t)=>{var n;const{getPrefixCls:r,direction:a,virtual:o,tree:c}=Se.useContext(Wt),{prefixCls:u,className:f,showIcon:d=!1,showLine:h,switcherIcon:v,switcherLoadingIcon:g,blockNode:b=!1,children:x,checkable:C=!1,selectable:y=!0,draggable:w,motion:$,style:E}=e,O=r("tree",u),I=r(),j=$??Object.assign(Object.assign({},ff(I)),{motionAppear:!1}),M=Object.assign(Object.assign({},e),{checkable:C,selectable:y,showIcon:d,motion:j,blockNode:b,showLine:!!h,dropIndicatorRender:$J}),[D,N,P]=wJ(O),[,A]=Ta(),F=A.paddingXS/2+(((n=A.Tree)===null||n===void 0?void 0:n.titleHeight)||A.controlHeightSM),H=Se.useMemo(()=>{if(!w)return!1;let L={};switch(typeof w){case"function":L.nodeDraggable=w;break;case"object":L=Object.assign({},w);break}return L.icon!==!1&&(L.icon=L.icon||Se.createElement(hJ,null)),L},[w]),k=L=>Se.createElement(DJ,{prefixCls:O,switcherIcon:v,switcherLoadingIcon:g,treeNodeProps:L,showLine:h});return D(Se.createElement(zC,Object.assign({itemHeight:F,ref:t,virtual:o},M,{style:Object.assign(Object.assign({},c?.style),E),prefixCls:O,className:se({[`${O}-icon-hide`]:!d,[`${O}-block-node`]:b,[`${O}-unselectable`]:!y,[`${O}-rtl`]:a==="rtl"},c?.className,f,N,P),direction:a,checkable:C&&Se.createElement("span",{className:`${O}-checkbox-inner`}),selectable:y,switcherIcon:k,draggable:H}),x))}),LI=0,Uy=1,HI=2;function LC(e,t,n){const{key:r,children:a}=n;function o(c){const u=c[r],f=c[a];t(u,c)!==!1&&LC(f||[],t,n)}e.forEach(o)}function PJ({treeData:e,expandedKeys:t,startKey:n,endKey:r,fieldNames:a}){const o=[];let c=LI;if(n&&n===r)return[n];if(!n||!r)return[];function u(f){return f===n||f===r}return LC(e,f=>{if(c===HI)return!1;if(u(f)){if(o.push(f),c===LI)c=Uy;else if(c===Uy)return c=HI,!1}else c===Uy&&o.push(f);return t.includes(f)},iu(a)),o}function Wy(e,t,n){const r=ke(t),a=[];return LC(e,(o,c)=>{const u=r.indexOf(o);return u!==-1&&(a.push(c),r.splice(u,1)),!!r.length},iu(n)),a}var BI=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,r=Object.getOwnPropertySymbols(e);a{var{defaultExpandAll:n,defaultExpandParent:r,defaultExpandedKeys:a}=e,o=BI(e,["defaultExpandAll","defaultExpandParent","defaultExpandedKeys"]);const c=s.useRef(null),u=s.useRef(null),f=()=>{const{keyEntities:D}=yC(FI(o));let N;return n?N=Object.keys(D):r?N=jx(o.expandedKeys||a||[],D):N=o.expandedKeys||a||[],N},[d,h]=s.useState(o.selectedKeys||o.defaultSelectedKeys||[]),[v,g]=s.useState(()=>f());s.useEffect(()=>{"selectedKeys"in o&&h(o.selectedKeys)},[o.selectedKeys]),s.useEffect(()=>{"expandedKeys"in o&&g(o.expandedKeys)},[o.expandedKeys]);const b=(D,N)=>{var P;return"expandedKeys"in o||g(D),(P=o.onExpand)===null||P===void 0?void 0:P.call(o,D,N)},x=(D,N)=>{var P;const{multiple:A,fieldNames:F}=o,{node:H,nativeEvent:k}=N,{key:L=""}=H,T=FI(o),z=Object.assign(Object.assign({},N),{selected:!0}),V=k?.ctrlKey||k?.metaKey,q=k?.shiftKey;let G;A&&V?(G=D,c.current=L,u.current=G,z.selectedNodes=Wy(T,G,F)):A&&q?(G=Array.from(new Set([].concat(ke(u.current||[]),ke(PJ({treeData:T,expandedKeys:v,startKey:L,endKey:c.current,fieldNames:F}))))),z.selectedNodes=Wy(T,G,F)):(G=[L],c.current=L,u.current=G,z.selectedNodes=Wy(T,G,F)),(P=o.onSelect)===null||P===void 0||P.call(o,G,z),"selectedKeys"in o||h(G)},{getPrefixCls:C,direction:y}=s.useContext(Wt),{prefixCls:w,className:$,showIcon:E=!0,expandAction:O="click"}=o,I=BI(o,["prefixCls","className","showIcon","expandAction"]),j=C("tree",w),M=se(`${j}-directory`,{[`${j}-directory-rtl`]:y==="rtl"},$);return s.createElement(DD,Object.assign({icon:kJ,ref:t,blockNode:!0},I,{showIcon:E,expandAction:O,prefixCls:j,className:M,expandedKeys:v,selectedKeys:d,onSelect:x,onExpand:b}))},zJ=s.forwardRef(AJ),HC=DD;HC.DirectoryTree=zJ;HC.TreeNode=Cf;const VI=e=>{const{value:t,filterSearch:n,tablePrefixCls:r,locale:a,onChange:o}=e;return n?s.createElement("div",{className:`${r}-filter-dropdown-search`},s.createElement(Bf,{prefix:s.createElement(qS,null),placeholder:a.filterSearchPlaceholder,onChange:o,value:t,htmlSize:1,className:`${r}-filter-dropdown-search-input`})):null},LJ=e=>{const{keyCode:t}=e;t===Mt.ENTER&&e.stopPropagation()},HJ=s.forwardRef((e,t)=>s.createElement("div",{className:e.className,onClick:n=>n.stopPropagation(),onKeyDown:LJ,ref:t},e.children));function qc(e){let t=[];return(e||[]).forEach(({value:n,children:r})=>{t.push(n),r&&(t=[].concat(ke(t),ke(qc(r))))}),t}function BJ(e){return e.some(({children:t})=>t)}function PD(e,t){return typeof t=="string"||typeof t=="number"?t?.toString().toLowerCase().includes(e.trim().toLowerCase()):!1}function kD({filters:e,prefixCls:t,filteredKeys:n,filterMultiple:r,searchValue:a,filterSearch:o}){return e.map((c,u)=>{const f=String(c.value);if(c.children)return{key:f||u,label:c.text,popupClassName:`${t}-dropdown-submenu`,children:kD({filters:c.children,prefixCls:t,filteredKeys:n,filterMultiple:r,searchValue:a,filterSearch:o})};const d=r?qr:Sa,h={key:c.value!==void 0?f:u,label:s.createElement(s.Fragment,null,s.createElement(d,{checked:n.includes(f)}),s.createElement("span",null,c.text))};return a.trim()?typeof o=="function"?o(a,c)?h:null:PD(a,c.text)?h:null:h})}function qy(e){return e||[]}const FJ=e=>{var t,n,r,a;const{tablePrefixCls:o,prefixCls:c,column:u,dropdownPrefixCls:f,columnKey:d,filterOnClose:h,filterMultiple:v,filterMode:g="menu",filterSearch:b=!1,filterState:x,triggerFilter:C,locale:y,children:w,getPopupContainer:$,rootClassName:E}=e,{filterResetToDefaultFilteredValue:O,defaultFilteredValue:I,filterDropdownProps:j={},filterDropdownOpen:M,filterDropdownVisible:D,onFilterDropdownVisibleChange:N,onFilterDropdownOpenChange:P}=u,[A,F]=s.useState(!1),H=!!(x&&(!((t=x.filteredKeys)===null||t===void 0)&&t.length||x.forceFiltered)),k=ge=>{var Ie;F(ge),(Ie=j.onOpenChange)===null||Ie===void 0||Ie.call(j,ge),P?.(ge),N?.(ge)},L=(a=(r=(n=j.open)!==null&&n!==void 0?n:M)!==null&&r!==void 0?r:D)!==null&&a!==void 0?a:A,T=x?.filteredKeys,[z,V]=qZ(qy(T)),q=({selectedKeys:ge})=>{V(ge)},G=(ge,{node:Ie,checked:Ee})=>{q(v?{selectedKeys:ge}:{selectedKeys:Ee&&Ie.key?[Ie.key]:[]})};s.useEffect(()=>{A&&q({selectedKeys:qy(T)})},[T]);const[B,U]=s.useState([]),K=ge=>{U(ge)},[Y,Q]=s.useState(""),Z=ge=>{const{value:Ie}=ge.target;Q(Ie)};s.useEffect(()=>{A||Q("")},[A]);const ae=ge=>{const Ie=ge?.length?ge:null;if(Ie===null&&(!x||!x.filteredKeys)||oo(Ie,x?.filteredKeys,!0))return null;C({column:u,key:d,filteredKeys:Ie})},re=()=>{k(!1),ae(z())},ie=({confirm:ge,closeDropdown:Ie}={confirm:!1,closeDropdown:!1})=>{ge&&ae([]),Ie&&k(!1),Q(""),V(O?(I||[]).map(Ee=>String(Ee)):[])},ve=({closeDropdown:ge}={closeDropdown:!0})=>{ge&&k(!1),ae(z())},ue=(ge,Ie)=>{Ie.source==="trigger"&&(ge&&T!==void 0&&V(qy(T)),k(ge),!ge&&!u.filterDropdown&&h&&re())},oe=se({[`${f}-menu-without-submenu`]:!BJ(u.filters||[])}),he=ge=>{if(ge.target.checked){const Ie=qc(u?.filters).map(Ee=>String(Ee));V(Ie)}else V([])},fe=({filters:ge})=>(ge||[]).map((Ie,Ee)=>{const we=String(Ie.value),Fe={title:Ie.text,key:Ie.value!==void 0?we:String(Ee)};return Ie.children&&(Fe.children=fe({filters:Ie.children})),Fe}),me=ge=>{var Ie;return Object.assign(Object.assign({},ge),{text:ge.title,value:ge.key,children:((Ie=ge.children)===null||Ie===void 0?void 0:Ie.map(Ee=>me(Ee)))||[]})};let le;const{direction:pe,renderEmpty:Ce}=s.useContext(Wt);if(typeof u.filterDropdown=="function")le=u.filterDropdown({prefixCls:`${f}-custom`,setSelectedKeys:ge=>q({selectedKeys:ge}),selectedKeys:z(),confirm:ve,clearFilters:ie,filters:u.filters,visible:L,close:()=>{k(!1)}});else if(u.filterDropdown)le=u.filterDropdown;else{const ge=z()||[],Ie=()=>{var we,Fe;const He=(we=Ce?.("Table.filter"))!==null&&we!==void 0?we:s.createElement(Ao,{image:Ao.PRESENTED_IMAGE_SIMPLE,description:y.filterEmptyText,styles:{image:{height:24}},style:{margin:0,padding:"16px 0"}});if((u.filters||[]).length===0)return He;if(g==="tree")return s.createElement(s.Fragment,null,s.createElement(VI,{filterSearch:b,value:Y,onChange:Z,tablePrefixCls:o,locale:y}),s.createElement("div",{className:`${o}-filter-dropdown-tree`},v?s.createElement(qr,{checked:ge.length===qc(u.filters).length,indeterminate:ge.length>0&&ge.lengthtypeof b=="function"?b(Y,me(Ye)):PD(Y,Ye.title):void 0})));const it=kD({filters:u.filters||[],filterSearch:b,prefixCls:c,filteredKeys:z(),filterMultiple:v,searchValue:Y}),Ze=it.every(Ye=>Ye===null);return s.createElement(s.Fragment,null,s.createElement(VI,{filterSearch:b,value:Y,onChange:Z,tablePrefixCls:o,locale:y}),Ze?He:s.createElement(As,{selectable:!0,multiple:v,prefixCls:`${f}-menu`,className:oe,onSelect:q,onDeselect:q,selectedKeys:ge,getPopupContainer:$,openKeys:B,onOpenChange:K,items:it}))},Ee=()=>O?oo((I||[]).map(we=>String(we)),ge,!0):ge.length===0;le=s.createElement(s.Fragment,null,Ie(),s.createElement("div",{className:`${c}-dropdown-btns`},s.createElement(dn,{type:"link",size:"small",disabled:Ee(),onClick:()=>ie()},y.filterReset),s.createElement(dn,{type:"primary",size:"small",onClick:re},y.filterConfirm)))}u.filterDropdown&&(le=s.createElement(Ej,{selectable:void 0},le)),le=s.createElement(HJ,{className:`${c}-dropdown`},le);const je=gf({trigger:["click"],placement:pe==="rtl"?"bottomLeft":"bottomRight",children:(()=>{let ge;return typeof u.filterIcon=="function"?ge=u.filterIcon(H):u.filterIcon?ge=u.filterIcon:ge=s.createElement(WZ,null),s.createElement("span",{role:"button",tabIndex:-1,className:se(`${c}-trigger`,{active:H}),onClick:Ie=>{Ie.stopPropagation()}},ge)})(),getPopupContainer:$},Object.assign(Object.assign({},j),{rootClassName:se(E,j.rootClassName),open:L,onOpenChange:ue,popupRender:()=>typeof j?.dropdownRender=="function"?j.dropdownRender(le):le}));return s.createElement("div",{className:`${c}-column`},s.createElement("span",{className:`${o}-column-title`},w),s.createElement(_C,Object.assign({},je)))},Ax=(e,t,n)=>{let r=[];return(e||[]).forEach((a,o)=>{var c;const u=wu(o,n),f=a.filterDropdown!==void 0;if(a.filters||f||"onFilter"in a)if("filteredValue"in a){let d=a.filteredValue;f||(d=(c=d?.map(String))!==null&&c!==void 0?c:d),r.push({column:a,key:Bl(a,u),filteredKeys:d,forceFiltered:a.filtered})}else r.push({column:a,key:Bl(a,u),filteredKeys:t&&a.defaultFilteredValue?a.defaultFilteredValue:void 0,forceFiltered:a.filtered});"children"in a&&(r=[].concat(ke(r),ke(Ax(a.children,t,u))))}),r};function AD(e,t,n,r,a,o,c,u,f){return n.map((d,h)=>{const v=wu(h,u),{filterOnClose:g=!0,filterMultiple:b=!0,filterMode:x,filterSearch:C}=d;let y=d;if(y.filters||y.filterDropdown){const w=Bl(y,v),$=r.find(({key:E})=>w===E);y=Object.assign(Object.assign({},y),{title:E=>s.createElement(FJ,{tablePrefixCls:e,prefixCls:`${e}-filter`,dropdownPrefixCls:t,column:y,columnKey:w,filterState:$,filterOnClose:g,filterMultiple:b,filterMode:x,filterSearch:C,triggerFilter:o,locale:a,getPopupContainer:c,rootClassName:f},Rg(d.title,E))})}return"children"in y&&(y=Object.assign(Object.assign({},y),{children:AD(e,t,y.children,r,a,o,c,v,f)})),y})}const KI=e=>{const t={};return e.forEach(({key:n,filteredKeys:r,column:a})=>{const o=n,{filters:c,filterDropdown:u}=a;if(u)t[o]=r||null;else if(Array.isArray(r)){const f=qc(c);t[o]=f.filter(d=>r.includes(String(d)))}else t[o]=null}),t},zx=(e,t,n)=>t.reduce((a,o)=>{const{column:{onFilter:c,filters:u},filteredKeys:f}=o;return c&&f&&f.length?a.map(d=>Object.assign({},d)).filter(d=>f.some(h=>{const v=qc(u),g=v.findIndex(x=>String(x)===String(h)),b=g!==-1?v[g]:h;return d[n]&&(d[n]=zx(d[n],t,n)),c(b,d)})):a},e),zD=e=>e.flatMap(t=>"children"in t?[t].concat(ke(zD(t.children||[]))):[t]),VJ=e=>{const{prefixCls:t,dropdownPrefixCls:n,mergedColumns:r,onFilterChange:a,getPopupContainer:o,locale:c,rootClassName:u}=e;Kl();const f=s.useMemo(()=>zD(r||[]),[r]),[d,h]=s.useState(()=>Ax(f,!0)),v=s.useMemo(()=>{const C=Ax(f,!1);if(C.length===0)return C;let y=!0;if(C.forEach(({filteredKeys:w})=>{w!==void 0&&(y=!1)}),y){const w=(f||[]).map(($,E)=>Bl($,wu(E)));return d.filter(({key:$})=>w.includes($)).map($=>{const E=f[w.indexOf($.key)];return Object.assign(Object.assign({},$),{column:Object.assign(Object.assign({},$.column),E),forceFiltered:E.filtered})})}return C},[f,d]),g=s.useMemo(()=>KI(v),[v]),b=C=>{const y=v.filter(({key:w})=>w!==C.key);y.push(C),h(y),a(KI(y),y)};return[C=>AD(t,n,C,v,c,b,o,void 0,u),v,g]},KJ=(e,t,n)=>{const r=s.useRef({});function a(o){var c;if(!r.current||r.current.data!==e||r.current.childrenColumnName!==t||r.current.getRowKey!==n){let f=function(d){d.forEach((h,v)=>{const g=n(h,v);u.set(g,h),h&&typeof h=="object"&&t in h&&f(h[t]||[])})};const u=new Map;f(e),r.current={data:e,childrenColumnName:t,kvMap:u,getRowKey:n}}return(c=r.current.kvMap)===null||c===void 0?void 0:c.get(o)}return[a]};var UJ=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,r=Object.getOwnPropertySymbols(e);a{const o=e[a];typeof o!="function"&&(n[a]=o)}),n}function qJ(e,t,n){const r=n&&typeof n=="object"?n:{},{total:a=0}=r,o=UJ(r,["total"]),[c,u]=s.useState(()=>({current:"defaultCurrent"in o?o.defaultCurrent:1,pageSize:"defaultPageSize"in o?o.defaultPageSize:LD})),f=gf(c,o,{total:a>0?a:e}),d=Math.ceil((a||e)/f.pageSize);f.current>d&&(f.current=d||1);const h=(g,b)=>{u({current:g??1,pageSize:b||f.pageSize})},v=(g,b)=>{var x;n&&((x=n.onChange)===null||x===void 0||x.call(n,g,b)),h(g,b),t(g,b||f?.pageSize)};return n===!1?[{},()=>{}]:[Object.assign(Object.assign({},f),{onChange:v}),h]}var YJ={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M840.4 300H183.6c-19.7 0-30.7 20.8-18.5 35l328.4 380.8c9.4 10.9 27.5 10.9 37 0L858.9 335c12.2-14.2 1.2-35-18.5-35z"}}]},name:"caret-down",theme:"outlined"},GJ=function(t,n){return s.createElement($n,Me({},t,{ref:n,icon:YJ}))},XJ=s.forwardRef(GJ),QJ={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M858.9 689L530.5 308.2c-9.4-10.9-27.5-10.9-37 0L165.1 689c-12.2 14.2-1.2 35 18.5 35h656.8c19.7 0 30.7-20.8 18.5-35z"}}]},name:"caret-up",theme:"outlined"},ZJ=function(t,n){return s.createElement($n,Me({},t,{ref:n,icon:QJ}))},JJ=s.forwardRef(ZJ);const nv="ascend",Yy="descend",Rv=e=>typeof e.sorter=="object"&&typeof e.sorter.multiple=="number"?e.sorter.multiple:!1,UI=e=>typeof e=="function"?e:e&&typeof e=="object"&&e.compare?e.compare:!1,eee=(e,t)=>t?e[e.indexOf(t)+1]:e[0],Lx=(e,t,n)=>{let r=[];const a=(o,c)=>{r.push({column:o,key:Bl(o,c),multiplePriority:Rv(o),sortOrder:o.sortOrder})};return(e||[]).forEach((o,c)=>{const u=wu(c,n);o.children?("sortOrder"in o&&a(o,u),r=[].concat(ke(r),ke(Lx(o.children,t,u)))):o.sorter&&("sortOrder"in o?a(o,u):t&&o.defaultSortOrder&&r.push({column:o,key:Bl(o,u),multiplePriority:Rv(o),sortOrder:o.defaultSortOrder}))}),r},HD=(e,t,n,r,a,o,c,u)=>(t||[]).map((d,h)=>{const v=wu(h,u);let g=d;if(g.sorter){const b=g.sortDirections||a,x=g.showSorterTooltip===void 0?c:g.showSorterTooltip,C=Bl(g,v),y=n.find(({key:N})=>N===C),w=y?y.sortOrder:null,$=eee(b,w);let E;if(d.sortIcon)E=d.sortIcon({sortOrder:w});else{const N=b.includes(nv)&&s.createElement(JJ,{className:se(`${e}-column-sorter-up`,{active:w===nv})}),P=b.includes(Yy)&&s.createElement(XJ,{className:se(`${e}-column-sorter-down`,{active:w===Yy})});E=s.createElement("span",{className:se(`${e}-column-sorter`,{[`${e}-column-sorter-full`]:!!(N&&P)})},s.createElement("span",{className:`${e}-column-sorter-inner`,"aria-hidden":"true"},N,P))}const{cancelSort:O,triggerAsc:I,triggerDesc:j}=o||{};let M=O;$===Yy?M=j:$===nv&&(M=I);const D=typeof x=="object"?Object.assign({title:M},x):{title:M};g=Object.assign(Object.assign({},g),{className:se(g.className,{[`${e}-column-sort`]:w}),title:N=>{const P=`${e}-column-sorters`,A=s.createElement("span",{className:`${e}-column-title`},Rg(d.title,N)),F=s.createElement("div",{className:P},A,E);return x?typeof x!="boolean"&&x?.target==="sorter-icon"?s.createElement("div",{className:`${P} ${e}-column-sorters-tooltip-target-sorter`},A,s.createElement(Ei,Object.assign({},D),E)):s.createElement(Ei,Object.assign({},D),F):F},onHeaderCell:N=>{var P;const A=((P=d.onHeaderCell)===null||P===void 0?void 0:P.call(d,N))||{},F=A.onClick,H=A.onKeyDown;A.onClick=T=>{r({column:d,key:C,sortOrder:$,multiplePriority:Rv(d)}),F?.(T)},A.onKeyDown=T=>{T.keyCode===Mt.ENTER&&(r({column:d,key:C,sortOrder:$,multiplePriority:Rv(d)}),H?.(T))};const k=VZ(d.title,{}),L=k?.toString();return w&&(A["aria-sort"]=w==="ascend"?"ascending":"descending"),A["aria-label"]=L||"",A.className=se(A.className,`${e}-column-has-sorters`),A.tabIndex=0,d.ellipsis&&(A.title=(k??"").toString()),A}})}return"children"in g&&(g=Object.assign(Object.assign({},g),{children:HD(e,g.children,n,r,a,o,c,v)})),g}),WI=e=>{const{column:t,sortOrder:n}=e;return{column:t,order:n,field:t.dataIndex,columnKey:t.key}},qI=e=>{const t=e.filter(({sortOrder:n})=>n).map(WI);if(t.length===0&&e.length){const n=e.length-1;return Object.assign(Object.assign({},WI(e[n])),{column:void 0,order:void 0,field:void 0,columnKey:void 0})}return t.length<=1?t[0]||{}:t},Hx=(e,t,n)=>{const r=t.slice().sort((c,u)=>u.multiplePriority-c.multiplePriority),a=e.slice(),o=r.filter(({column:{sorter:c},sortOrder:u})=>UI(c)&&u);return o.length?a.sort((c,u)=>{for(let f=0;f{const u=c[n];return u?Object.assign(Object.assign({},c),{[n]:Hx(u,t,n)}):c}):a},tee=e=>{const{prefixCls:t,mergedColumns:n,sortDirections:r,tableLocale:a,showSorterTooltip:o,onSorterChange:c}=e,[u,f]=s.useState(()=>Lx(n,!0)),d=(C,y)=>{const w=[];return C.forEach(($,E)=>{const O=wu(E,y);if(w.push(Bl($,O)),Array.isArray($.children)){const I=d($.children,O);w.push.apply(w,ke(I))}}),w},h=s.useMemo(()=>{let C=!0;const y=Lx(n,!1);if(!y.length){const O=d(n);return u.filter(({key:I})=>O.includes(I))}const w=[];function $(O){C?w.push(O):w.push(Object.assign(Object.assign({},O),{sortOrder:null}))}let E=null;return y.forEach(O=>{E===null?($(O),O.sortOrder&&(O.multiplePriority===!1?C=!1:E=!0)):(E&&O.multiplePriority!==!1||(C=!1),$(O))}),w},[n,u]),v=s.useMemo(()=>{var C,y;const w=h.map(({column:$,sortOrder:E})=>({column:$,order:E}));return{sortColumns:w,sortColumn:(C=w[0])===null||C===void 0?void 0:C.column,sortOrder:(y=w[0])===null||y===void 0?void 0:y.order}},[h]),g=C=>{let y;C.multiplePriority===!1||!h.length||h[0].multiplePriority===!1?y=[C]:y=[].concat(ke(h.filter(({key:w})=>w!==C.key)),[C]),f(y),c(qI(y),y)};return[C=>HD(t,C,h,g,r,a,o),h,v,()=>qI(h)]},BD=(e,t)=>e.map(r=>{const a=Object.assign({},r);return a.title=Rg(r.title,t),"children"in a&&(a.children=BD(a.children,t)),a}),nee=e=>[s.useCallback(n=>BD(n,e),[e])],ree=OD((e,t)=>{const{_renderTimes:n}=e,{_renderTimes:r}=t;return n!==r}),aee=RD((e,t)=>{const{_renderTimes:n}=e,{_renderTimes:r}=t;return n!==r}),iee=e=>{const{componentCls:t,lineWidth:n,lineType:r,tableBorderColor:a,tableHeaderBg:o,tablePaddingVertical:c,tablePaddingHorizontal:u,calc:f}=e,d=`${te(n)} ${r} ${a}`,h=(v,g,b)=>({[`&${t}-${v}`]:{[`> ${t}-container`]:{[`> ${t}-content, > ${t}-body`]:{"\n > table > tbody > tr > th,\n > table > tbody > tr > td\n ":{[`> ${t}-expanded-row-fixed`]:{margin:`${te(f(g).mul(-1).equal())} + ${te(f(f(b).add(n)).mul(-1).equal())}`}}}}}});return{[`${t}-wrapper`]:{[`${t}${t}-bordered`]:Object.assign(Object.assign(Object.assign({[`> ${t}-title`]:{border:d,borderBottom:0},[`> ${t}-container`]:{borderInlineStart:d,borderTop:d,[` + > ${t}-content, + > ${t}-header, + > ${t}-body, + > ${t}-summary + `]:{"> table":{"\n > thead > tr > th,\n > thead > tr > td,\n > tbody > tr > th,\n > tbody > tr > td,\n > tfoot > tr > th,\n > tfoot > tr > td\n ":{borderInlineEnd:d},"> thead":{"> tr:not(:last-child) > th":{borderBottom:d},"> tr > th::before":{backgroundColor:"transparent !important"}},"\n > thead > tr,\n > tbody > tr,\n > tfoot > tr\n ":{[`> ${t}-cell-fix-right-first::after`]:{borderInlineEnd:d}},"\n > tbody > tr > th,\n > tbody > tr > td\n ":{[`> ${t}-expanded-row-fixed`]:{margin:`${te(f(c).mul(-1).equal())} ${te(f(f(u).add(n)).mul(-1).equal())}`,"&::after":{position:"absolute",top:0,insetInlineEnd:n,bottom:0,borderInlineEnd:d,content:'""'}}}}}},[`&${t}-scroll-horizontal`]:{[`> ${t}-container > ${t}-body`]:{"> table > tbody":{[` + > tr${t}-expanded-row, + > tr${t}-placeholder + `]:{"> th, > td":{borderInlineEnd:0}}}}}},h("middle",e.tablePaddingVerticalMiddle,e.tablePaddingHorizontalMiddle)),h("small",e.tablePaddingVerticalSmall,e.tablePaddingHorizontalSmall)),{[`> ${t}-footer`]:{border:d,borderTop:0}}),[`${t}-cell`]:{[`${t}-container:first-child`]:{borderTop:0},"&-scrollbar:not([rowspan])":{boxShadow:`0 ${te(n)} 0 ${te(n)} ${o}`}},[`${t}-bordered ${t}-cell-scrollbar`]:{borderInlineEnd:d}}}},oee=e=>{const{componentCls:t}=e;return{[`${t}-wrapper`]:{[`${t}-cell-ellipsis`]:Object.assign(Object.assign({},Bi),{wordBreak:"keep-all",[` + &${t}-cell-fix-left-last, + &${t}-cell-fix-right-first + `]:{overflow:"visible",[`${t}-cell-content`]:{display:"block",overflow:"hidden",textOverflow:"ellipsis"}},[`${t}-column-title`]:{overflow:"hidden",textOverflow:"ellipsis",wordBreak:"keep-all"}})}}},lee=e=>{const{componentCls:t}=e;return{[`${t}-wrapper`]:{[`${t}-tbody > tr${t}-placeholder`]:{textAlign:"center",color:e.colorTextDisabled,"\n &:hover > th,\n &:hover > td,\n ":{background:e.colorBgContainer}}}}},see=e=>{const{componentCls:t,antCls:n,motionDurationSlow:r,lineWidth:a,paddingXS:o,lineType:c,tableBorderColor:u,tableExpandIconBg:f,tableExpandColumnWidth:d,borderRadius:h,tablePaddingVertical:v,tablePaddingHorizontal:g,tableExpandedRowBg:b,paddingXXS:x,expandIconMarginTop:C,expandIconSize:y,expandIconHalfInner:w,expandIconScale:$,calc:E}=e,O=`${te(a)} ${c} ${u}`,I=E(x).sub(a).equal();return{[`${t}-wrapper`]:{[`${t}-expand-icon-col`]:{width:d},[`${t}-row-expand-icon-cell`]:{textAlign:"center",[`${t}-row-expand-icon`]:{display:"inline-flex",float:"none",verticalAlign:"sub"}},[`${t}-row-indent`]:{height:1,float:"left"},[`${t}-row-expand-icon`]:Object.assign(Object.assign({},wS(e)),{position:"relative",float:"left",width:y,height:y,color:"inherit",lineHeight:te(y),background:f,border:O,borderRadius:h,transform:`scale(${$})`,"&:focus, &:hover, &:active":{borderColor:"currentcolor"},"&::before, &::after":{position:"absolute",background:"currentcolor",transition:`transform ${r} ease-out`,content:'""'},"&::before":{top:w,insetInlineEnd:I,insetInlineStart:I,height:a},"&::after":{top:I,bottom:I,insetInlineStart:w,width:a,transform:"rotate(90deg)"},"&-collapsed::before":{transform:"rotate(-180deg)"},"&-collapsed::after":{transform:"rotate(0deg)"},"&-spaced":{"&::before, &::after":{display:"none",content:"none"},background:"transparent",border:0,visibility:"hidden"}}),[`${t}-row-indent + ${t}-row-expand-icon`]:{marginTop:C,marginInlineEnd:o},[`tr${t}-expanded-row`]:{"&, &:hover":{"> th, > td":{background:b}},[`${n}-descriptions-view`]:{display:"flex",table:{flex:"auto",width:"100%"}}},[`${t}-expanded-row-fixed`]:{position:"relative",margin:`${te(E(v).mul(-1).equal())} ${te(E(g).mul(-1).equal())}`,padding:`${te(v)} ${te(g)}`}}}},cee=e=>{const{componentCls:t,antCls:n,iconCls:r,tableFilterDropdownWidth:a,tableFilterDropdownSearchWidth:o,paddingXXS:c,paddingXS:u,colorText:f,lineWidth:d,lineType:h,tableBorderColor:v,headerIconColor:g,fontSizeSM:b,tablePaddingHorizontal:x,borderRadius:C,motionDurationSlow:y,colorIcon:w,colorPrimary:$,tableHeaderFilterActiveBg:E,colorTextDisabled:O,tableFilterDropdownBg:I,tableFilterDropdownHeight:j,controlItemBgHover:M,controlItemBgActive:D,boxShadowSecondary:N,filterDropdownMenuBg:P,calc:A}=e,F=`${n}-dropdown`,H=`${t}-filter-dropdown`,k=`${n}-tree`,L=`${te(d)} ${h} ${v}`;return[{[`${t}-wrapper`]:{[`${t}-filter-column`]:{display:"flex",justifyContent:"space-between"},[`${t}-filter-trigger`]:{position:"relative",display:"flex",alignItems:"center",marginBlock:A(c).mul(-1).equal(),marginInline:`${te(c)} ${te(A(x).div(2).mul(-1).equal())}`,padding:`0 ${te(c)}`,color:g,fontSize:b,borderRadius:C,cursor:"pointer",transition:`all ${y}`,"&:hover":{color:w,background:E},"&.active":{color:$}}}},{[`${n}-dropdown`]:{[H]:Object.assign(Object.assign({},zn(e)),{minWidth:a,backgroundColor:I,borderRadius:C,boxShadow:N,overflow:"hidden",[`${F}-menu`]:{maxHeight:j,overflowX:"hidden",border:0,boxShadow:"none",borderRadius:"unset",backgroundColor:P,"&:empty::after":{display:"block",padding:`${te(u)} 0`,color:O,fontSize:b,textAlign:"center",content:'"Not Found"'}},[`${H}-tree`]:{paddingBlock:`${te(u)} 0`,paddingInline:u,[k]:{padding:0},[`${k}-treenode ${k}-node-content-wrapper:hover`]:{backgroundColor:M},[`${k}-treenode-checkbox-checked ${k}-node-content-wrapper`]:{"&, &:hover":{backgroundColor:D}}},[`${H}-search`]:{padding:u,borderBottom:L,"&-input":{input:{minWidth:o},[r]:{color:O}}},[`${H}-checkall`]:{width:"100%",marginBottom:c,marginInlineStart:c},[`${H}-btns`]:{display:"flex",justifyContent:"space-between",padding:`${te(A(u).sub(d).equal())} ${te(u)}`,overflow:"hidden",borderTop:L}})}},{[`${n}-dropdown ${H}, ${H}-submenu`]:{[`${n}-checkbox-wrapper + span`]:{paddingInlineStart:u,color:f},"> ul":{maxHeight:"calc(100vh - 130px)",overflowX:"hidden",overflowY:"auto"}}}]},uee=e=>{const{componentCls:t,lineWidth:n,colorSplit:r,motionDurationSlow:a,zIndexTableFixed:o,tableBg:c,zIndexTableSticky:u,calc:f}=e,d=r;return{[`${t}-wrapper`]:{[` + ${t}-cell-fix-left, + ${t}-cell-fix-right + `]:{position:"sticky !important",zIndex:o,background:c},[` + ${t}-cell-fix-left-first::after, + ${t}-cell-fix-left-last::after + `]:{position:"absolute",top:0,right:{_skip_check_:!0,value:0},bottom:f(n).mul(-1).equal(),width:30,transform:"translateX(100%)",transition:`box-shadow ${a}`,content:'""',pointerEvents:"none",willChange:"transform"},[`${t}-cell-fix-left-all::after`]:{display:"none"},[` + ${t}-cell-fix-right-first::after, + ${t}-cell-fix-right-last::after + `]:{position:"absolute",top:0,bottom:f(n).mul(-1).equal(),left:{_skip_check_:!0,value:0},width:30,transform:"translateX(-100%)",transition:`box-shadow ${a}`,content:'""',pointerEvents:"none"},[`${t}-container`]:{position:"relative","&::before, &::after":{position:"absolute",top:0,bottom:0,zIndex:f(u).add(1).equal({unit:!1}),width:30,transition:`box-shadow ${a}`,content:'""',pointerEvents:"none"},"&::before":{insetInlineStart:0},"&::after":{insetInlineEnd:0}},[`${t}-ping-left`]:{[`&:not(${t}-has-fix-left) ${t}-container::before`]:{boxShadow:`inset 10px 0 8px -8px ${d}`},[` + ${t}-cell-fix-left-first::after, + ${t}-cell-fix-left-last::after + `]:{boxShadow:`inset 10px 0 8px -8px ${d}`},[`${t}-cell-fix-left-last::before`]:{backgroundColor:"transparent !important"}},[`${t}-ping-right`]:{[`&:not(${t}-has-fix-right) ${t}-container::after`]:{boxShadow:`inset -10px 0 8px -8px ${d}`},[` + ${t}-cell-fix-right-first::after, + ${t}-cell-fix-right-last::after + `]:{boxShadow:`inset -10px 0 8px -8px ${d}`}},[`${t}-fixed-column-gapped`]:{[` + ${t}-cell-fix-left-first::after, + ${t}-cell-fix-left-last::after, + ${t}-cell-fix-right-first::after, + ${t}-cell-fix-right-last::after + `]:{boxShadow:"none"}}}}},dee=e=>{const{componentCls:t,antCls:n,margin:r}=e;return{[`${t}-wrapper ${t}-pagination${n}-pagination`]:{margin:`${te(r)} 0`}}},fee=e=>{const{componentCls:t,tableRadius:n}=e;return{[`${t}-wrapper`]:{[t]:{[`${t}-title, ${t}-header`]:{borderRadius:`${te(n)} ${te(n)} 0 0`},[`${t}-title + ${t}-container`]:{borderStartStartRadius:0,borderStartEndRadius:0,[`${t}-header, table`]:{borderRadius:0},"table > thead > tr:first-child":{"th:first-child, th:last-child, td:first-child, td:last-child":{borderRadius:0}}},"&-container":{borderStartStartRadius:n,borderStartEndRadius:n,"table > thead > tr:first-child":{"> *:first-child":{borderStartStartRadius:n},"> *:last-child":{borderStartEndRadius:n}}},"&-footer":{borderRadius:`0 0 ${te(n)} ${te(n)}`}}}}},mee=e=>{const{componentCls:t}=e;return{[`${t}-wrapper-rtl`]:{direction:"rtl",table:{direction:"rtl"},[`${t}-pagination-left`]:{justifyContent:"flex-end"},[`${t}-pagination-right`]:{justifyContent:"flex-start"},[`${t}-row-expand-icon`]:{float:"right","&::after":{transform:"rotate(-90deg)"},"&-collapsed::before":{transform:"rotate(180deg)"},"&-collapsed::after":{transform:"rotate(0deg)"}},[`${t}-container`]:{"&::before":{insetInlineStart:"unset",insetInlineEnd:0},"&::after":{insetInlineStart:0,insetInlineEnd:"unset"},[`${t}-row-indent`]:{float:"right"}}}}},hee=e=>{const{componentCls:t,antCls:n,iconCls:r,fontSizeIcon:a,padding:o,paddingXS:c,headerIconColor:u,headerIconHoverColor:f,tableSelectionColumnWidth:d,tableSelectedRowBg:h,tableSelectedRowHoverBg:v,tableRowHoverBg:g,tablePaddingHorizontal:b,calc:x}=e;return{[`${t}-wrapper`]:{[`${t}-selection-col`]:{width:d,[`&${t}-selection-col-with-dropdown`]:{width:x(d).add(a).add(x(o).div(4)).equal()}},[`${t}-bordered ${t}-selection-col`]:{width:x(d).add(x(c).mul(2)).equal(),[`&${t}-selection-col-with-dropdown`]:{width:x(d).add(a).add(x(o).div(4)).add(x(c).mul(2)).equal()}},[` + table tr th${t}-selection-column, + table tr td${t}-selection-column, + ${t}-selection-column + `]:{paddingInlineEnd:e.paddingXS,paddingInlineStart:e.paddingXS,textAlign:"center",[`${n}-radio-wrapper`]:{marginInlineEnd:0}},[`table tr th${t}-selection-column${t}-cell-fix-left`]:{zIndex:x(e.zIndexTableFixed).add(1).equal({unit:!1})},[`table tr th${t}-selection-column::after`]:{backgroundColor:"transparent !important"},[`${t}-selection`]:{position:"relative",display:"inline-flex",flexDirection:"column"},[`${t}-selection-extra`]:{position:"absolute",top:0,zIndex:1,cursor:"pointer",transition:`all ${e.motionDurationSlow}`,marginInlineStart:"100%",paddingInlineStart:te(x(b).div(4).equal()),[r]:{color:u,fontSize:a,verticalAlign:"baseline","&:hover":{color:f}}},[`${t}-tbody`]:{[`${t}-row`]:{[`&${t}-row-selected`]:{[`> ${t}-cell`]:{background:h,"&-row-hover":{background:v}}},[`> ${t}-cell-row-hover`]:{background:g}}}}}},vee=e=>{const{componentCls:t,tableExpandColumnWidth:n,calc:r}=e,a=(o,c,u,f)=>({[`${t}${t}-${o}`]:{fontSize:f,[` + ${t}-title, + ${t}-footer, + ${t}-cell, + ${t}-thead > tr > th, + ${t}-tbody > tr > th, + ${t}-tbody > tr > td, + tfoot > tr > th, + tfoot > tr > td + `]:{padding:`${te(c)} ${te(u)}`},[`${t}-filter-trigger`]:{marginInlineEnd:te(r(u).div(2).mul(-1).equal())},[`${t}-expanded-row-fixed`]:{margin:`${te(r(c).mul(-1).equal())} ${te(r(u).mul(-1).equal())}`},[`${t}-tbody`]:{[`${t}-wrapper:only-child ${t}`]:{marginBlock:te(r(c).mul(-1).equal()),marginInline:`${te(r(n).sub(u).equal())} ${te(r(u).mul(-1).equal())}`}},[`${t}-selection-extra`]:{paddingInlineStart:te(r(u).div(4).equal())}}});return{[`${t}-wrapper`]:Object.assign(Object.assign({},a("middle",e.tablePaddingVerticalMiddle,e.tablePaddingHorizontalMiddle,e.tableFontSizeMiddle)),a("small",e.tablePaddingVerticalSmall,e.tablePaddingHorizontalSmall,e.tableFontSizeSmall))}},gee=e=>{const{componentCls:t,marginXXS:n,fontSizeIcon:r,headerIconColor:a,headerIconHoverColor:o}=e;return{[`${t}-wrapper`]:{[`${t}-thead th${t}-column-has-sorters`]:{outline:"none",cursor:"pointer",transition:`all ${e.motionDurationSlow}, left 0s`,"&:hover":{background:e.tableHeaderSortHoverBg,"&::before":{backgroundColor:"transparent !important"}},"&:focus-visible":{color:e.colorPrimary},[` + &${t}-cell-fix-left:hover, + &${t}-cell-fix-right:hover + `]:{background:e.tableFixedHeaderSortActiveBg}},[`${t}-thead th${t}-column-sort`]:{background:e.tableHeaderSortBg,"&::before":{backgroundColor:"transparent !important"}},[`td${t}-column-sort`]:{background:e.tableBodySortBg},[`${t}-column-title`]:{position:"relative",zIndex:1,flex:1,minWidth:0},[`${t}-column-sorters`]:{display:"flex",flex:"auto",alignItems:"center",justifyContent:"space-between","&::after":{position:"absolute",inset:0,width:"100%",height:"100%",content:'""'}},[`${t}-column-sorters-tooltip-target-sorter`]:{"&::after":{content:"none"}},[`${t}-column-sorter`]:{marginInlineStart:n,color:a,fontSize:0,transition:`color ${e.motionDurationSlow}`,"&-inner":{display:"inline-flex",flexDirection:"column",alignItems:"center"},"&-up, &-down":{fontSize:r,"&.active":{color:e.colorPrimary}},[`${t}-column-sorter-up + ${t}-column-sorter-down`]:{marginTop:"-0.3em"}},[`${t}-column-sorters:hover ${t}-column-sorter`]:{color:o}}}},pee=e=>{const{componentCls:t,opacityLoading:n,tableScrollThumbBg:r,tableScrollThumbBgHover:a,tableScrollThumbSize:o,tableScrollBg:c,zIndexTableSticky:u,stickyScrollBarBorderRadius:f,lineWidth:d,lineType:h,tableBorderColor:v}=e,g=`${te(d)} ${h} ${v}`;return{[`${t}-wrapper`]:{[`${t}-sticky`]:{"&-holder":{position:"sticky",zIndex:u,background:e.colorBgContainer},"&-scroll":{position:"sticky",bottom:0,height:`${te(o)} !important`,zIndex:u,display:"flex",alignItems:"center",background:c,borderTop:g,opacity:n,"&:hover":{transformOrigin:"center bottom"},"&-bar":{height:o,backgroundColor:r,borderRadius:f,transition:`all ${e.motionDurationSlow}, transform 0s`,position:"absolute",bottom:0,"&:hover, &-active":{backgroundColor:a}}}}}}},YI=e=>{const{componentCls:t,lineWidth:n,tableBorderColor:r,calc:a}=e,o=`${te(n)} ${e.lineType} ${r}`;return{[`${t}-wrapper`]:{[`${t}-summary`]:{position:"relative",zIndex:e.zIndexTableFixed,background:e.tableBg,"> tr":{"> th, > td":{borderBottom:o}}},[`div${t}-summary`]:{boxShadow:`0 ${te(a(n).mul(-1).equal())} 0 ${r}`}}}},bee=e=>{const{componentCls:t,motionDurationMid:n,lineWidth:r,lineType:a,tableBorderColor:o,calc:c}=e,u=`${te(r)} ${a} ${o}`,f=`${t}-expanded-row-cell`;return{[`${t}-wrapper`]:{[`${t}-tbody-virtual`]:{[`${t}-tbody-virtual-holder-inner`]:{[` + & > ${t}-row, + & > div:not(${t}-row) > ${t}-row + `]:{display:"flex",boxSizing:"border-box",width:"100%"}},[`${t}-cell`]:{borderBottom:u,transition:`background ${n}`},[`${t}-expanded-row`]:{[`${f}${f}-fixed`]:{position:"sticky",insetInlineStart:0,overflow:"hidden",width:`calc(var(--virtual-width) - ${te(r)})`,borderInlineEnd:"none"}}},[`${t}-bordered`]:{[`${t}-tbody-virtual`]:{"&:after":{content:'""',insetInline:0,bottom:0,borderBottom:u,position:"absolute"},[`${t}-cell`]:{borderInlineEnd:u,[`&${t}-cell-fix-right-first:before`]:{content:'""',position:"absolute",insetBlock:0,insetInlineStart:c(r).mul(-1).equal(),borderInlineStart:u}}},[`&${t}-virtual`]:{[`${t}-placeholder ${t}-cell`]:{borderInlineEnd:u,borderBottom:u}}}}}},yee=e=>{const{componentCls:t,fontWeightStrong:n,tablePaddingVertical:r,tablePaddingHorizontal:a,tableExpandColumnWidth:o,lineWidth:c,lineType:u,tableBorderColor:f,tableFontSize:d,tableBg:h,tableRadius:v,tableHeaderTextColor:g,motionDurationMid:b,tableHeaderBg:x,tableHeaderCellSplitColor:C,tableFooterTextColor:y,tableFooterBg:w,calc:$}=e,E=`${te(c)} ${u} ${f}`;return{[`${t}-wrapper`]:Object.assign(Object.assign({clear:"both",maxWidth:"100%","--rc-virtual-list-scrollbar-bg":e.tableScrollBg},Uo()),{[t]:Object.assign(Object.assign({},zn(e)),{fontSize:d,background:h,borderRadius:`${te(v)} ${te(v)} 0 0`,scrollbarColor:`${e.tableScrollThumbBg} ${e.tableScrollBg}`}),table:{width:"100%",textAlign:"start",borderRadius:`${te(v)} ${te(v)} 0 0`,borderCollapse:"separate",borderSpacing:0},[` + ${t}-cell, + ${t}-thead > tr > th, + ${t}-tbody > tr > th, + ${t}-tbody > tr > td, + tfoot > tr > th, + tfoot > tr > td + `]:{position:"relative",padding:`${te(r)} ${te(a)}`,overflowWrap:"break-word"},[`${t}-title`]:{padding:`${te(r)} ${te(a)}`},[`${t}-thead`]:{"\n > tr > th,\n > tr > td\n ":{position:"relative",color:g,fontWeight:n,textAlign:"start",background:x,borderBottom:E,transition:`background ${b} ease`,"&[colspan]:not([colspan='1'])":{textAlign:"center"},[`&:not(:last-child):not(${t}-selection-column):not(${t}-row-expand-icon-cell):not([colspan])::before`]:{position:"absolute",top:"50%",insetInlineEnd:0,width:1,height:"1.6em",backgroundColor:C,transform:"translateY(-50%)",transition:`background-color ${b}`,content:'""'}},"> tr:not(:last-child) > th[colspan]":{borderBottom:0}},[`${t}-tbody`]:{"> tr":{"> th, > td":{transition:`background ${b}, border-color ${b}`,borderBottom:E,[` + > ${t}-wrapper:only-child, + > ${t}-expanded-row-fixed > ${t}-wrapper:only-child + `]:{[t]:{marginBlock:te($(r).mul(-1).equal()),marginInline:`${te($(o).sub(a).equal())} + ${te($(a).mul(-1).equal())}`,[`${t}-tbody > tr:last-child > td`]:{borderBottomWidth:0,"&:first-child, &:last-child":{borderRadius:0}}}}},"> th":{position:"relative",color:g,fontWeight:n,textAlign:"start",background:x,borderBottom:E,transition:`background ${b} ease`},[`& > ${t}-measure-cell`]:{paddingBlock:"0 !important",borderBlock:"0 !important",[`${t}-measure-cell-content`]:{height:0,overflow:"hidden",pointerEvents:"none"}}}},[`${t}-footer`]:{padding:`${te(r)} ${te(a)}`,color:y,background:w}})}},xee=e=>{const{colorFillAlter:t,colorBgContainer:n,colorTextHeading:r,colorFillSecondary:a,colorFillContent:o,controlItemBgActive:c,controlItemBgActiveHover:u,padding:f,paddingSM:d,paddingXS:h,colorBorderSecondary:v,borderRadiusLG:g,controlHeight:b,colorTextPlaceholder:x,fontSize:C,fontSizeSM:y,lineHeight:w,lineWidth:$,colorIcon:E,colorIconHover:O,opacityLoading:I,controlInteractiveSize:j}=e,M=new Pn(a).onBackground(n).toHexString(),D=new Pn(o).onBackground(n).toHexString(),N=new Pn(t).onBackground(n).toHexString(),P=new Pn(E),A=new Pn(O),F=j/2-$,H=F*2+$*3;return{headerBg:N,headerColor:r,headerSortActiveBg:M,headerSortHoverBg:D,bodySortBg:N,rowHoverBg:N,rowSelectedBg:c,rowSelectedHoverBg:u,rowExpandedBg:t,cellPaddingBlock:f,cellPaddingInline:f,cellPaddingBlockMD:d,cellPaddingInlineMD:h,cellPaddingBlockSM:h,cellPaddingInlineSM:h,borderColor:v,headerBorderRadius:g,footerBg:N,footerColor:r,cellFontSize:C,cellFontSizeMD:C,cellFontSizeSM:C,headerSplitColor:v,fixedHeaderSortActiveBg:M,headerFilterHoverBg:o,filterDropdownMenuBg:n,filterDropdownBg:n,expandIconBg:n,selectionColumnWidth:b,stickyScrollBarBg:x,stickyScrollBarBorderRadius:100,expandIconMarginTop:(C*w-$*3)/2-Math.ceil((y*1.4-$*3)/2),headerIconColor:P.clone().setA(P.a*I).toRgbString(),headerIconHoverColor:A.clone().setA(A.a*I).toRgbString(),expandIconHalfInner:F,expandIconSize:H,expandIconScale:j/H}},GI=2,See=Kn("Table",e=>{const{colorTextHeading:t,colorSplit:n,colorBgContainer:r,controlInteractiveSize:a,headerBg:o,headerColor:c,headerSortActiveBg:u,headerSortHoverBg:f,bodySortBg:d,rowHoverBg:h,rowSelectedBg:v,rowSelectedHoverBg:g,rowExpandedBg:b,cellPaddingBlock:x,cellPaddingInline:C,cellPaddingBlockMD:y,cellPaddingInlineMD:w,cellPaddingBlockSM:$,cellPaddingInlineSM:E,borderColor:O,footerBg:I,footerColor:j,headerBorderRadius:M,cellFontSize:D,cellFontSizeMD:N,cellFontSizeSM:P,headerSplitColor:A,fixedHeaderSortActiveBg:F,headerFilterHoverBg:H,filterDropdownBg:k,expandIconBg:L,selectionColumnWidth:T,stickyScrollBarBg:z,calc:V}=e,q=xn(e,{tableFontSize:D,tableBg:r,tableRadius:M,tablePaddingVertical:x,tablePaddingHorizontal:C,tablePaddingVerticalMiddle:y,tablePaddingHorizontalMiddle:w,tablePaddingVerticalSmall:$,tablePaddingHorizontalSmall:E,tableBorderColor:O,tableHeaderTextColor:c,tableHeaderBg:o,tableFooterTextColor:j,tableFooterBg:I,tableHeaderCellSplitColor:A,tableHeaderSortBg:u,tableHeaderSortHoverBg:f,tableBodySortBg:d,tableFixedHeaderSortActiveBg:F,tableHeaderFilterActiveBg:H,tableFilterDropdownBg:k,tableRowHoverBg:h,tableSelectedRowBg:v,tableSelectedRowHoverBg:g,zIndexTableFixed:GI,zIndexTableSticky:V(GI).add(1).equal({unit:!1}),tableFontSizeMiddle:N,tableFontSizeSmall:P,tableSelectionColumnWidth:T,tableExpandIconBg:L,tableExpandColumnWidth:V(a).add(V(e.padding).mul(2)).equal(),tableExpandedRowBg:b,tableFilterDropdownWidth:120,tableFilterDropdownHeight:264,tableFilterDropdownSearchWidth:140,tableScrollThumbSize:8,tableScrollThumbBg:z,tableScrollThumbBgHover:t,tableScrollBg:n});return[yee(q),dee(q),YI(q),gee(q),cee(q),iee(q),fee(q),see(q),YI(q),lee(q),hee(q),uee(q),pee(q),oee(q),vee(q),mee(q),bee(q)]},xee,{unitless:{expandIconScale:!0}}),XI=[],Cee=(e,t)=>{var n,r;const{prefixCls:a,className:o,rootClassName:c,style:u,size:f,bordered:d,dropdownPrefixCls:h,dataSource:v,pagination:g,rowSelection:b,rowKey:x="key",rowClassName:C,columns:y,children:w,childrenColumnName:$,onChange:E,getPopupContainer:O,loading:I,expandIcon:j,expandable:M,expandedRowRender:D,expandIconColumnIndex:N,indentSize:P,scroll:A,sortDirections:F,locale:H,showSorterTooltip:k={target:"full-header"},virtual:L}=e;Kl();const T=s.useMemo(()=>y||DC(w),[y,w]),z=s.useMemo(()=>T.some(ut=>ut.responsive),[T]),V=dg(z),q=s.useMemo(()=>{const ut=new Set(Object.keys(V).filter(ot=>V[ot]));return T.filter(ot=>!ot.responsive||ot.responsive.some(Lt=>ut.has(Lt)))},[T,V]),G=lr(e,["className","style","columns"]),{locale:B=lo,direction:U,table:K,renderEmpty:Y,getPrefixCls:Q,getPopupContainer:Z}=s.useContext(Wt),ae=la(f),re=Object.assign(Object.assign({},B.Table),H),ie=v||XI,ve=Q("table",a),ue=Q("dropdown",h),[,oe]=Ta(),he=oa(ve),[fe,me,le]=See(ve,he),pe=Object.assign(Object.assign({childrenColumnName:$,expandIconColumnIndex:N},M),{expandIcon:(n=M?.expandIcon)!==null&&n!==void 0?n:(r=K?.expandable)===null||r===void 0?void 0:r.expandIcon}),{childrenColumnName:Ce="children"}=pe,De=s.useMemo(()=>ie.some(ut=>ut?.[Ce])?"nest":D||M?.expandedRowRender?"row":null,[ie]),je={body:s.useRef(null)},ge=FZ(ve),Ie=s.useRef(null),Ee=s.useRef(null);HZ(t,()=>Object.assign(Object.assign({},Ee.current),{nativeElement:Ie.current}));const we=s.useMemo(()=>typeof x=="function"?x:ut=>ut?.[x],[x]),[Fe]=KJ(ie,Ce,we),He={},it=(ut,ot,Lt=!1)=>{var tn,vn,cn,En;const rn=Object.assign(Object.assign({},He),ut);Lt&&((tn=He.resetPagination)===null||tn===void 0||tn.call(He),!((vn=rn.pagination)===null||vn===void 0)&&vn.current&&(rn.pagination.current=1),g&&((cn=g.onChange)===null||cn===void 0||cn.call(g,1,(En=rn.pagination)===null||En===void 0?void 0:En.pageSize))),A&&A.scrollToFirstRowOnChange!==!1&&je.body.current&&F5(0,{getContainer:()=>je.body.current}),E?.(rn.pagination,rn.filters,rn.sorter,{currentDataSource:zx(Hx(ie,rn.sorterStates,Ce),rn.filterStates,Ce),action:ot})},Ze=(ut,ot)=>{it({sorter:ut,sorterStates:ot},"sort",!1)},[Ye,et,Pe,Oe]=tee({prefixCls:ve,mergedColumns:q,onSorterChange:Ze,sortDirections:F||["ascend","descend"],tableLocale:re,showSorterTooltip:k}),Be=s.useMemo(()=>Hx(ie,et,Ce),[ie,et]);He.sorter=Oe(),He.sorterStates=et;const $e=(ut,ot)=>{it({filters:ut,filterStates:ot},"filter",!0)},[Te,be,ye]=VJ({prefixCls:ve,locale:re,dropdownPrefixCls:ue,mergedColumns:q,onFilterChange:$e,getPopupContainer:O||Z,rootClassName:se(c,he)}),Re=zx(Be,be,Ce);He.filters=ye,He.filterStates=be;const Ge=s.useMemo(()=>{const ut={};return Object.keys(ye).forEach(ot=>{ye[ot]!==null&&(ut[ot]=ye[ot])}),Object.assign(Object.assign({},Pe),{filters:ut})},[Pe,ye]),[ft]=nee(Ge),$t=(ut,ot)=>{it({pagination:Object.assign(Object.assign({},He.pagination),{current:ut,pageSize:ot})},"paginate")},[Qe,at]=qJ(Re.length,$t,g);He.pagination=g===!1?{}:WJ(Qe,g),He.resetPagination=at;const mt=s.useMemo(()=>{if(g===!1||!Qe.pageSize)return Re;const{current:ut=1,total:ot,pageSize:Lt=LD}=Qe;return Re.lengthLt?Re.slice((ut-1)*Lt,ut*Lt):Re:Re.slice((ut-1)*Lt,ut*Lt)},[!!g,Re,Qe?.current,Qe?.pageSize,Qe?.total]),[st,bt]=zZ({prefixCls:ve,data:Re,pageData:mt,getRowKey:we,getRecordByKey:Fe,expandType:De,childrenColumnName:Ce,locale:re,getPopupContainer:O||Z},b),qt=(ut,ot,Lt)=>{let tn;return typeof C=="function"?tn=se(C(ut,ot,Lt)):tn=se(C),se({[`${ve}-row-selected`]:bt.has(we(ut,ot))},tn)};pe.__PARENT_RENDER_ICON__=pe.expandIcon,pe.expandIcon=pe.expandIcon||j||BZ(re),De==="nest"&&pe.expandIconColumnIndex===void 0?pe.expandIconColumnIndex=b?1:0:pe.expandIconColumnIndex>0&&b&&(pe.expandIconColumnIndex-=1),typeof pe.indentSize!="number"&&(pe.indentSize=typeof P=="number"?P:15);const Gt=s.useCallback(ut=>ft(st(Te(Ye(ut)))),[Ye,Te,st]),vt=()=>{if(g===!1||!Qe?.total)return{};const ut=()=>Qe.size||(ae==="small"||ae==="middle"?"small":void 0),ot=kt=>{const gt=kt==="left"?"start":kt==="right"?"end":kt;return s.createElement(iD,Object.assign({},Qe,{align:Qe.align||gt,className:se(`${ve}-pagination`,Qe.className),size:ut()}))},Lt=U==="rtl"?"left":"right",tn=Qe.position;if(tn===null||!Array.isArray(tn))return{bottom:ot(Lt)};const vn=tn.find(kt=>typeof kt=="string"&&kt.toLowerCase().includes("top")),cn=tn.find(kt=>typeof kt=="string"&&kt.toLowerCase().includes("bottom")),En=tn.every(kt=>`${kt}`=="none"),rn=vn?vn.toLowerCase().replace("top",""):"",Sn=cn?cn.toLowerCase().replace("bottom",""):"",lt=!vn&&!cn&&!En,xt=()=>rn?ot(rn):void 0,Bt=()=>{if(Sn)return ot(Sn);if(lt)return ot(Lt)};return{top:xt(),bottom:Bt()}},It=s.useMemo(()=>typeof I=="boolean"?{spinning:I}:typeof I=="object"&&I!==null?Object.assign({spinning:!0},I):void 0,[I]),Et=se(le,he,`${ve}-wrapper`,K?.className,{[`${ve}-wrapper-rtl`]:U==="rtl"},o,c,me),nt=Object.assign(Object.assign({},K?.style),u),Ue=s.useMemo(()=>It?.spinning&&ie===XI?null:typeof H?.emptyText<"u"?H.emptyText:Y?.("Table")||s.createElement(KS,{componentName:"Table"}),[It?.spinning,ie,H?.emptyText,Y]),qe=L?aee:ree,ct={},Tt=s.useMemo(()=>{const{fontSize:ut,lineHeight:ot,lineWidth:Lt,padding:tn,paddingXS:vn,paddingSM:cn}=oe,En=Math.floor(ut*ot);switch(ae){case"middle":return cn*2+En+Lt;case"small":return vn*2+En+Lt;default:return tn*2+En+Lt}},[oe,ae]);L&&(ct.listItemHeight=Tt);const{top:Dt,bottom:Jt}=vt();return fe(s.createElement("div",{ref:Ie,className:Et,style:nt},s.createElement(Ff,Object.assign({spinning:!1},It),Dt,s.createElement(qe,Object.assign({},ct,G,{ref:Ee,columns:q,direction:U,expandable:pe,prefixCls:ve,className:se({[`${ve}-middle`]:ae==="middle",[`${ve}-small`]:ae==="small",[`${ve}-bordered`]:d,[`${ve}-empty`]:ie.length===0},le,he,me),data:mt,rowKey:we,rowClassName:qt,emptyText:Ue,internalHooks:Vf,internalRefs:je,transformColumns:Gt,getContainerWidth:ge,measureRowRender:ut=>s.createElement(vo,{getPopupContainer:ot=>ot},ut)})),Jt)))},wee=s.forwardRef(Cee),$ee=(e,t)=>{const n=s.useRef(0);return n.current+=1,s.createElement(wee,Object.assign({},e,{ref:t,_renderTimes:n.current}))},Yi=s.forwardRef($ee);Yi.SELECTION_COLUMN=Nl;Yi.EXPAND_COLUMN=Ml;Yi.SELECTION_ALL=Tx;Yi.SELECTION_INVERT=Dx;Yi.SELECTION_NONE=Px;Yi.Column=OZ;Yi.ColumnGroup=IZ;Yi.Summary=pD;const Eee=e=>{const{paddingXXS:t,lineWidth:n,tagPaddingHorizontal:r,componentCls:a,calc:o}=e,c=o(r).sub(n).equal(),u=o(t).sub(n).equal();return{[a]:Object.assign(Object.assign({},zn(e)),{display:"inline-block",height:"auto",marginInlineEnd:e.marginXS,paddingInline:c,fontSize:e.tagFontSize,lineHeight:e.tagLineHeight,whiteSpace:"nowrap",background:e.defaultBg,border:`${te(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadiusSM,opacity:1,transition:`all ${e.motionDurationMid}`,textAlign:"start",position:"relative",[`&${a}-rtl`]:{direction:"rtl"},"&, a, a:hover":{color:e.defaultColor},[`${a}-close-icon`]:{marginInlineStart:u,fontSize:e.tagIconSize,color:e.colorIcon,cursor:"pointer",transition:`all ${e.motionDurationMid}`,"&:hover":{color:e.colorTextHeading}},[`&${a}-has-color`]:{borderColor:"transparent",[`&, a, a:hover, ${e.iconCls}-close, ${e.iconCls}-close:hover`]:{color:e.colorTextLightSolid}},"&-checkable":{backgroundColor:"transparent",borderColor:"transparent",cursor:"pointer",[`&:not(${a}-checkable-checked):hover`]:{color:e.colorPrimary,backgroundColor:e.colorFillSecondary},"&:active, &-checked":{color:e.colorTextLightSolid},"&-checked":{backgroundColor:e.colorPrimary,"&:hover":{backgroundColor:e.colorPrimaryHover}},"&:active":{backgroundColor:e.colorPrimaryActive}},"&-hidden":{display:"none"},[`> ${e.iconCls} + span, > span + ${e.iconCls}`]:{marginInlineStart:c}}),[`${a}-borderless`]:{borderColor:"transparent",background:e.tagBorderlessBg}}},BC=e=>{const{lineWidth:t,fontSizeIcon:n,calc:r}=e,a=e.fontSizeSM;return xn(e,{tagFontSize:a,tagLineHeight:te(r(e.lineHeightSM).mul(a).equal()),tagIconSize:r(n).sub(r(t).mul(2)).equal(),tagPaddingHorizontal:8,tagBorderlessBg:e.defaultBg})},FC=e=>({defaultBg:new Pn(e.colorFillQuaternary).onBackground(e.colorBgContainer).toHexString(),defaultColor:e.colorText}),FD=Kn("Tag",e=>{const t=BC(e);return Eee(t)},FC);var _ee=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,r=Object.getOwnPropertySymbols(e);a{const{prefixCls:n,style:r,className:a,checked:o,children:c,icon:u,onChange:f,onClick:d}=e,h=_ee(e,["prefixCls","style","className","checked","children","icon","onChange","onClick"]),{getPrefixCls:v,tag:g}=s.useContext(Wt),b=E=>{f?.(!o),d?.(E)},x=v("tag",n),[C,y,w]=FD(x),$=se(x,`${x}-checkable`,{[`${x}-checkable-checked`]:o},g?.className,a,y,w);return C(s.createElement("span",Object.assign({},h,{ref:t,style:Object.assign(Object.assign({},r),g?.style),className:$,onClick:b}),u,s.createElement("span",null,c)))}),Iee=e=>IN(e,(t,{textColor:n,lightBorderColor:r,lightColor:a,darkColor:o})=>({[`${e.componentCls}${e.componentCls}-${t}`]:{color:n,background:a,borderColor:r,"&-inverse":{color:e.colorTextLightSolid,background:o,borderColor:o},[`&${e.componentCls}-borderless`]:{borderColor:"transparent"}}})),Ree=Nf(["Tag","preset"],e=>{const t=BC(e);return Iee(t)},FC);function Nee(e){return typeof e!="string"?e:e.charAt(0).toUpperCase()+e.slice(1)}const _h=(e,t,n)=>{const r=Nee(n);return{[`${e.componentCls}${e.componentCls}-${t}`]:{color:e[`color${n}`],background:e[`color${r}Bg`],borderColor:e[`color${r}Border`],[`&${e.componentCls}-borderless`]:{borderColor:"transparent"}}}},Mee=Nf(["Tag","status"],e=>{const t=BC(e);return[_h(t,"success","Success"),_h(t,"processing","Info"),_h(t,"error","Error"),_h(t,"warning","Warning")]},FC);var jee=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,r=Object.getOwnPropertySymbols(e);a{const{prefixCls:n,className:r,rootClassName:a,style:o,children:c,icon:u,color:f,onClose:d,bordered:h=!0,visible:v}=e,g=jee(e,["prefixCls","className","rootClassName","style","children","icon","color","onClose","bordered","visible"]),{getPrefixCls:b,direction:x,tag:C}=s.useContext(Wt),[y,w]=s.useState(!0),$=lr(g,["closeIcon","closable"]);s.useEffect(()=>{v!==void 0&&w(v)},[v]);const E=aj(f),O=f9(f),I=E||O,j=Object.assign(Object.assign({backgroundColor:f&&!I?f:void 0},C?.style),o),M=b("tag",n),[D,N,P]=FD(M),A=se(M,C?.className,{[`${M}-${f}`]:I,[`${M}-has-color`]:f&&!I,[`${M}-hidden`]:!y,[`${M}-rtl`]:x==="rtl",[`${M}-borderless`]:!h},r,a,N,P),F=V=>{V.stopPropagation(),d?.(V),!V.defaultPrevented&&w(!1)},[,H]=sB(P2(e),P2(C),{closable:!1,closeIconRender:V=>{const q=s.createElement("span",{className:`${M}-close-icon`,onClick:F},V);return OS(V,q,G=>({onClick:B=>{var U;(U=G?.onClick)===null||U===void 0||U.call(G,B),F(B)},className:se(G?.className,`${M}-close-icon`)}))}}),k=typeof g.onClick=="function"||c&&c.type==="a",L=u||null,T=L?s.createElement(s.Fragment,null,L,c&&s.createElement("span",null,c)):c,z=s.createElement("span",Object.assign({},$,{ref:t,className:A,style:j}),T,H,E&&s.createElement(Ree,{key:"preset",prefixCls:M}),O&&s.createElement(Mee,{key:"status",prefixCls:M}));return D(k?s.createElement(jf,{component:"Tag"},z):z)}),Si=Tee;Si.CheckableTag=Oee;const Dee={defaultSeed:uf.token,defaultConfig:uf};var Pee={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z"}}]},name:"delete",theme:"outlined"},kee=function(t,n){return s.createElement($n,Me({},t,{ref:n,icon:Pee}))},Aee=s.forwardRef(kee),zee={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M257.7 752c2 0 4-.2 6-.5L431.9 722c2-.4 3.9-1.3 5.3-2.8l423.9-423.9a9.96 9.96 0 000-14.1L694.9 114.9c-1.9-1.9-4.4-2.9-7.1-2.9s-5.2 1-7.1 2.9L256.8 538.8c-1.5 1.5-2.4 3.3-2.8 5.3l-29.5 168.2a33.5 33.5 0 009.4 29.8c6.6 6.4 14.9 9.9 23.8 9.9zm67.4-174.4L687.8 215l73.3 73.3-362.7 362.6-88.9 15.7 15.6-89zM880 836H144c-17.7 0-32 14.3-32 32v36c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-36c0-17.7-14.3-32-32-32z"}}]},name:"edit",theme:"outlined"},Lee=function(t,n){return s.createElement($n,Me({},t,{ref:n,icon:zee}))},Hee=s.forwardRef(Lee),Bee={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M864 170h-60c-4.4 0-8 3.6-8 8v518H310v-73c0-6.7-7.8-10.5-13-6.3l-141.9 112a8 8 0 000 12.6l141.9 112c5.3 4.2 13 .4 13-6.3v-75h498c35.3 0 64-28.7 64-64V178c0-4.4-3.6-8-8-8z"}}]},name:"enter",theme:"outlined"},Fee=function(t,n){return s.createElement($n,Me({},t,{ref:n,icon:Bee}))},Vee=s.forwardRef(Fee);const Kee=(e,t,n,r)=>{const{titleMarginBottom:a,fontWeightStrong:o}=r;return{marginBottom:a,color:n,fontWeight:o,fontSize:e,lineHeight:t}},Uee=e=>{const t=[1,2,3,4,5],n={};return t.forEach(r=>{n[` + h${r}&, + div&-h${r}, + div&-h${r} > textarea, + h${r} + `]=Kee(e[`fontSizeHeading${r}`],e[`lineHeightHeading${r}`],e.colorTextHeading,e)}),n},Wee=e=>{const{componentCls:t}=e;return{"a&, a":Object.assign(Object.assign({},wS(e)),{userSelect:"text",[`&[disabled], &${t}-disabled`]:{color:e.colorTextDisabled,cursor:"not-allowed","&:active, &:hover":{color:e.colorTextDisabled},"&:active":{pointerEvents:"none"}}})}},qee=e=>({code:{margin:"0 0.2em",paddingInline:"0.4em",paddingBlock:"0.2em 0.1em",fontSize:"85%",fontFamily:e.fontFamilyCode,background:"rgba(150, 150, 150, 0.1)",border:"1px solid rgba(100, 100, 100, 0.2)",borderRadius:3},kbd:{margin:"0 0.2em",paddingInline:"0.4em",paddingBlock:"0.15em 0.1em",fontSize:"90%",fontFamily:e.fontFamilyCode,background:"rgba(150, 150, 150, 0.06)",border:"1px solid rgba(100, 100, 100, 0.2)",borderBottomWidth:2,borderRadius:3},mark:{padding:0,backgroundColor:mv[2]},"u, ins":{textDecoration:"underline",textDecorationSkipInk:"auto"},"s, del":{textDecoration:"line-through"},strong:{fontWeight:e.fontWeightStrong},"ul, ol":{marginInline:0,marginBlock:"0 1em",padding:0,li:{marginInline:"20px 0",marginBlock:0,paddingInline:"4px 0",paddingBlock:0}},ul:{listStyleType:"circle",ul:{listStyleType:"disc"}},ol:{listStyleType:"decimal"},"pre, blockquote":{margin:"1em 0"},pre:{padding:"0.4em 0.6em",whiteSpace:"pre-wrap",wordWrap:"break-word",background:"rgba(150, 150, 150, 0.1)",border:"1px solid rgba(100, 100, 100, 0.2)",borderRadius:3,fontFamily:e.fontFamilyCode,code:{display:"inline",margin:0,padding:0,fontSize:"inherit",fontFamily:"inherit",background:"transparent",border:0}},blockquote:{paddingInline:"0.6em 0",paddingBlock:0,borderInlineStart:"4px solid rgba(100, 100, 100, 0.2)",opacity:.85}}),Yee=e=>{const{componentCls:t,paddingSM:n}=e,r=n;return{"&-edit-content":{position:"relative","div&":{insetInlineStart:e.calc(e.paddingSM).mul(-1).equal(),insetBlockStart:e.calc(r).div(-2).add(1).equal(),marginBottom:e.calc(r).div(2).sub(2).equal()},[`${t}-edit-content-confirm`]:{position:"absolute",insetInlineEnd:e.calc(e.marginXS).add(2).equal(),insetBlockEnd:e.marginXS,color:e.colorIcon,fontWeight:"normal",fontSize:e.fontSize,fontStyle:"normal",pointerEvents:"none"},textarea:{margin:"0!important",MozTransition:"none",height:"1em"}}}},Gee=e=>({[`${e.componentCls}-copy-success`]:{"\n &,\n &:hover,\n &:focus":{color:e.colorSuccess}},[`${e.componentCls}-copy-icon-only`]:{marginInlineStart:0}}),Xee=()=>({"\n a&-ellipsis,\n span&-ellipsis\n ":{display:"inline-block",maxWidth:"100%"},"&-ellipsis-single-line":{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis","a&, span&":{verticalAlign:"bottom"},"> code":{paddingBlock:0,maxWidth:"calc(100% - 1.2em)",display:"inline-block",overflow:"hidden",textOverflow:"ellipsis",verticalAlign:"bottom",boxSizing:"content-box"}},"&-ellipsis-multiple-line":{display:"-webkit-box",overflow:"hidden",WebkitLineClamp:3,WebkitBoxOrient:"vertical"}}),Qee=e=>{const{componentCls:t,titleMarginTop:n}=e;return{[t]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({color:e.colorText,wordBreak:"break-word",lineHeight:e.lineHeight,[`&${t}-secondary`]:{color:e.colorTextDescription},[`&${t}-success`]:{color:e.colorSuccessText},[`&${t}-warning`]:{color:e.colorWarningText},[`&${t}-danger`]:{color:e.colorErrorText,"a&:active, a&:focus":{color:e.colorErrorTextActive},"a&:hover":{color:e.colorErrorTextHover}},[`&${t}-disabled`]:{color:e.colorTextDisabled,cursor:"not-allowed",userSelect:"none"},"\n div&,\n p\n ":{marginBottom:"1em"}},Uee(e)),{[` + & + h1${t}, + & + h2${t}, + & + h3${t}, + & + h4${t}, + & + h5${t} + `]:{marginTop:n},"\n div,\n ul,\n li,\n p,\n h1,\n h2,\n h3,\n h4,\n h5":{"\n + h1,\n + h2,\n + h3,\n + h4,\n + h5\n ":{marginTop:n}}}),qee(e)),Wee(e)),{[` + ${t}-expand, + ${t}-collapse, + ${t}-edit, + ${t}-copy + `]:Object.assign(Object.assign({},wS(e)),{marginInlineStart:e.marginXXS})}),Yee(e)),Gee(e)),Xee()),{"&-rtl":{direction:"rtl"}})}},Zee=()=>({titleMarginTop:"1.2em",titleMarginBottom:"0.5em"}),VD=Kn("Typography",Qee,Zee),Jee=e=>{const{prefixCls:t,"aria-label":n,className:r,style:a,direction:o,maxLength:c,autoSize:u=!0,value:f,onSave:d,onCancel:h,onEnd:v,component:g,enterIcon:b=s.createElement(Vee,null)}=e,x=s.useRef(null),C=s.useRef(!1),y=s.useRef(null),[w,$]=s.useState(f);s.useEffect(()=>{$(f)},[f]),s.useEffect(()=>{var k;if(!((k=x.current)===null||k===void 0)&&k.resizableTextArea){const{textArea:L}=x.current.resizableTextArea;L.focus();const{length:T}=L.value;L.setSelectionRange(T,T)}},[]);const E=({target:k})=>{$(k.value.replace(/[\n\r]/g,""))},O=()=>{C.current=!0},I=()=>{C.current=!1},j=({keyCode:k})=>{C.current||(y.current=k)},M=()=>{d(w.trim())},D=({keyCode:k,ctrlKey:L,altKey:T,metaKey:z,shiftKey:V})=>{y.current!==k||C.current||L||T||z||V||(k===Mt.ENTER?(M(),v?.()):k===Mt.ESC&&h())},N=()=>{M()},[P,A,F]=VD(t),H=se(t,`${t}-edit-content`,{[`${t}-rtl`]:o==="rtl",[`${t}-${g}`]:!!g},r,A,F);return P(s.createElement("div",{className:H,style:a},s.createElement(tD,{ref:x,maxLength:c,value:w,onChange:E,onKeyDown:j,onKeyUp:D,onCompositionStart:O,onCompositionEnd:I,onBlur:N,"aria-label":n,rows:1,autoSize:u}),b!==null?$a(b,{className:`${t}-edit-content-confirm`}):null))};var Gy,QI;function ete(){return QI||(QI=1,Gy=function(){var e=document.getSelection();if(!e.rangeCount)return function(){};for(var t=document.activeElement,n=[],r=0;r"u"){u&&console.warn("unable to use e.clipboardData"),u&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var y=t[c.format]||t.default;window.clipboardData.setData(y,o)}else C.clipboardData.clearData(),C.clipboardData.setData(c.format,o);c.onCopy&&(C.preventDefault(),c.onCopy(C.clipboardData))}),document.body.appendChild(g),h.selectNodeContents(g),v.addRange(h);var x=document.execCommand("copy");if(!x)throw new Error("copy command was unsuccessful");b=!0}catch(C){u&&console.error("unable to copy using execCommand: ",C),u&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(c.format||"text",o),c.onCopy&&c.onCopy(window.clipboardData),b=!0}catch(y){u&&console.error("unable to copy using clipboardData: ",y),u&&console.error("falling back to prompt"),f=r("message"in c?c.message:n),window.prompt(f,o)}}finally{v&&(typeof v.removeRange=="function"?v.removeRange(h):v.removeAllRanges()),g&&document.body.removeChild(g),d()}return b}return Xy=a,Xy}var nte=tte();const rte=Wi(nte);var ate=function(e,t,n,r){function a(o){return o instanceof n?o:new n(function(c){c(o)})}return new(n||(n=Promise))(function(o,c){function u(h){try{d(r.next(h))}catch(v){c(v)}}function f(h){try{d(r.throw(h))}catch(v){c(v)}}function d(h){h.done?o(h.value):a(h.value).then(u,f)}d((r=r.apply(e,t||[])).next())})};const ite=({copyConfig:e,children:t})=>{const[n,r]=s.useState(!1),[a,o]=s.useState(!1),c=s.useRef(null),u=()=>{c.current&&clearTimeout(c.current)},f={};e.format&&(f.format=e.format),s.useEffect(()=>u,[]);const d=pn(h=>ate(void 0,void 0,void 0,function*(){var v;h?.preventDefault(),h?.stopPropagation(),o(!0);try{const g=typeof e.text=="function"?yield e.text():e.text;rte(g||_X(t,!0).join("")||"",f),o(!1),r(!0),u(),c.current=setTimeout(()=>{r(!1)},3e3),(v=e.onCopy)===null||v===void 0||v.call(e,h)}catch(g){throw o(!1),g}}));return{copied:n,copyLoading:a,onClick:d}};function Qy(e,t){return s.useMemo(()=>{const n=!!e;return[n,Object.assign(Object.assign({},t),n&&typeof e=="object"?e:null)]},[e])}const ote=e=>{const t=s.useRef(void 0);return s.useEffect(()=>{t.current=e}),t.current},lte=(e,t,n)=>s.useMemo(()=>e===!0?{title:t??n}:s.isValidElement(e)?{title:e}:typeof e=="object"?Object.assign({title:t??n},e):{title:e},[e,t,n]);var ste=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,r=Object.getOwnPropertySymbols(e);a{const{prefixCls:n,component:r="article",className:a,rootClassName:o,setContentRef:c,children:u,direction:f,style:d}=e,h=ste(e,["prefixCls","component","className","rootClassName","setContentRef","children","direction","style"]),{getPrefixCls:v,direction:g,className:b,style:x}=ga("typography"),C=f??g,y=c?Ea(t,c):t,w=v("typography",n),[$,E,O]=VD(w),I=se(w,b,{[`${w}-rtl`]:C==="rtl"},a,o,E,O),j=Object.assign(Object.assign({},x),d);return $(s.createElement(r,Object.assign({className:I,style:j,ref:y},h),u))});var UD={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z"}}]},name:"copy",theme:"outlined"},cte=function(t,n){return s.createElement($n,Me({},t,{ref:n,icon:UD}))},ute=s.forwardRef(cte);function JI(e){return e===!1?[!1,!1]:Array.isArray(e)?e:[e]}function Zy(e,t,n){return e===!0||e===void 0?t:e||n&&t}function dte(e){const t=document.createElement("em");e.appendChild(t);const n=e.getBoundingClientRect(),r=t.getBoundingClientRect();return e.removeChild(t),n.left>r.left||r.right>n.right||n.top>r.top||r.bottom>n.bottom}const VC=e=>["string","number"].includes(typeof e),fte=({prefixCls:e,copied:t,locale:n,iconOnly:r,tooltips:a,icon:o,tabIndex:c,onCopy:u,loading:f})=>{const d=JI(a),h=JI(o),{copied:v,copy:g}=n??{},b=t?v:g,x=Zy(d[t?1:0],b),C=typeof x=="string"?x:b;return s.createElement(Ei,{title:x},s.createElement("button",{type:"button",className:se(`${e}-copy`,{[`${e}-copy-success`]:t,[`${e}-copy-icon-only`]:r}),onClick:u,"aria-label":C,tabIndex:c},t?Zy(h[1],s.createElement(US,null),!0):Zy(h[0],f?s.createElement(qo,null):s.createElement(ute,null),!0)))},Oh=s.forwardRef(({style:e,children:t},n)=>{const r=s.useRef(null);return s.useImperativeHandle(n,()=>({isExceed:()=>{const a=r.current;return a.scrollHeight>a.clientHeight},getHeight:()=>r.current.clientHeight})),s.createElement("span",{"aria-hidden":!0,ref:r,style:Object.assign({position:"fixed",display:"block",left:0,top:0,pointerEvents:"none",backgroundColor:"rgba(255, 0, 0, 0.65)"},e)},t)}),mte=e=>e.reduce((t,n)=>t+(VC(n)?String(n).length:1),0);function eR(e,t){let n=0;const r=[];for(let a=0;at){const d=t-n;return r.push(String(o).slice(0,d)),r}r.push(o),n=f}return e}const Jy=0,e0=1,t0=2,n0=3,tR=4,Ih={display:"-webkit-box",overflow:"hidden",WebkitBoxOrient:"vertical"};function hte(e){const{enableMeasure:t,width:n,text:r,children:a,rows:o,expanded:c,miscDeps:u,onEllipsis:f}=e,d=s.useMemo(()=>Ma(r),[r]),h=s.useMemo(()=>mte(d),[r]),v=s.useMemo(()=>a(d,!1),[r]),[g,b]=s.useState(null),x=s.useRef(null),C=s.useRef(null),y=s.useRef(null),w=s.useRef(null),$=s.useRef(null),[E,O]=s.useState(!1),[I,j]=s.useState(Jy),[M,D]=s.useState(0),[N,P]=s.useState(null);fn(()=>{j(t&&n&&h?e0:Jy)},[n,r,o,t,d]),fn(()=>{var k,L,T,z;if(I===e0){j(t0);const V=C.current&&getComputedStyle(C.current).whiteSpace;P(V)}else if(I===t0){const V=!!(!((k=y.current)===null||k===void 0)&&k.isExceed());j(V?n0:tR),b(V?[0,h]:null),O(V);const q=((L=y.current)===null||L===void 0?void 0:L.getHeight())||0,G=o===1?0:((T=w.current)===null||T===void 0?void 0:T.getHeight())||0,B=((z=$.current)===null||z===void 0?void 0:z.getHeight())||0,U=Math.max(q,G+B);D(U+1),f(V)}},[I]);const A=g?Math.ceil((g[0]+g[1])/2):0;fn(()=>{var k;const[L,T]=g||[0,0];if(L!==T){const V=(((k=x.current)===null||k===void 0?void 0:k.getHeight())||0)>M;let q=A;T-L===1&&(q=V?L:T),b(V?[L,q]:[q,T])}},[g,A]);const F=s.useMemo(()=>{if(!t)return a(d,!1);if(I!==n0||!g||g[0]!==g[1]){const k=a(d,!1);return[tR,Jy].includes(I)?k:s.createElement("span",{style:Object.assign(Object.assign({},Ih),{WebkitLineClamp:o})},k)}return a(c?d:eR(d,g[0]),E)},[c,I,g,d].concat(ke(u))),H={width:n,margin:0,padding:0,whiteSpace:N==="nowrap"?"normal":"inherit"};return s.createElement(s.Fragment,null,F,I===t0&&s.createElement(s.Fragment,null,s.createElement(Oh,{style:Object.assign(Object.assign(Object.assign({},H),Ih),{WebkitLineClamp:o}),ref:y},v),s.createElement(Oh,{style:Object.assign(Object.assign(Object.assign({},H),Ih),{WebkitLineClamp:o-1}),ref:w},v),s.createElement(Oh,{style:Object.assign(Object.assign(Object.assign({},H),Ih),{WebkitLineClamp:1}),ref:$},a([],!0))),I===n0&&g&&g[0]!==g[1]&&s.createElement(Oh,{style:Object.assign(Object.assign({},H),{top:400}),ref:x},a(eR(d,A),!0)),I===e0&&s.createElement("span",{style:{whiteSpace:"inherit"},ref:C}))}const vte=({enableEllipsis:e,isEllipsis:t,children:n,tooltipProps:r})=>!r?.title||!e?n:s.createElement(Ei,Object.assign({open:t?void 0:!1},r),n);var gte=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,r=Object.getOwnPropertySymbols(e);a{var n;const{prefixCls:r,className:a,style:o,type:c,disabled:u,children:f,ellipsis:d,editable:h,copyable:v,component:g,title:b}=e,x=gte(e,["prefixCls","className","style","type","disabled","children","ellipsis","editable","copyable","component","title"]),{getPrefixCls:C,direction:y}=s.useContext(Wt),[w]=ho("Text"),$=s.useRef(null),E=s.useRef(null),O=C("typography",r),I=lr(x,nR),[j,M]=Qy(h),[D,N]=Wn(!1,{value:M.editing}),{triggerType:P=["icon"]}=M,A=be=>{var ye;be&&((ye=M.onStart)===null||ye===void 0||ye.call(M)),N(be)},F=ote(D);fn(()=>{var be;!D&&F&&((be=E.current)===null||be===void 0||be.focus())},[D]);const H=be=>{be?.preventDefault(),A(!0)},k=be=>{var ye;(ye=M.onChange)===null||ye===void 0||ye.call(M,be),A(!1)},L=()=>{var be;(be=M.onCancel)===null||be===void 0||be.call(M),A(!1)},[T,z]=Qy(v),{copied:V,copyLoading:q,onClick:G}=ite({copyConfig:z,children:f}),[B,U]=s.useState(!1),[K,Y]=s.useState(!1),[Q,Z]=s.useState(!1),[ae,re]=s.useState(!1),[ie,ve]=s.useState(!0),[ue,oe]=Qy(d,{expandable:!1,symbol:be=>be?w?.collapse:w?.expand}),[he,fe]=Wn(oe.defaultExpanded||!1,{value:oe.expanded}),me=ue&&(!he||oe.expandable==="collapsible"),{rows:le=1}=oe,pe=s.useMemo(()=>me&&(oe.suffix!==void 0||oe.onEllipsis||oe.expandable||j||T),[me,oe,j,T]);fn(()=>{ue&&!pe&&(U(cx("webkitLineClamp")),Y(cx("textOverflow")))},[pe,ue]);const[Ce,De]=s.useState(me),je=s.useMemo(()=>pe?!1:le===1?K:B,[pe,K,B]);fn(()=>{De(je&&me)},[je,me]);const ge=me&&(Ce?ae:Q),Ie=me&&le===1&&Ce,Ee=me&&le>1&&Ce,we=(be,ye)=>{var Re;fe(ye.expanded),(Re=oe.onExpand)===null||Re===void 0||Re.call(oe,be,ye)},[Fe,He]=s.useState(0),it=({offsetWidth:be})=>{He(be)},Ze=be=>{var ye;Z(be),Q!==be&&((ye=oe.onEllipsis)===null||ye===void 0||ye.call(oe,be))};s.useEffect(()=>{const be=$.current;if(ue&&Ce&&be){const ye=dte(be);ae!==ye&&re(ye)}},[ue,Ce,f,Ee,ie,Fe]),s.useEffect(()=>{const be=$.current;if(typeof IntersectionObserver>"u"||!be||!Ce||!me)return;const ye=new IntersectionObserver(()=>{ve(!!be.offsetParent)});return ye.observe(be),()=>{ye.disconnect()}},[Ce,me]);const Ye=lte(oe.tooltip,M.text,f),et=s.useMemo(()=>{if(!(!ue||Ce))return[M.text,f,b,Ye.title].find(VC)},[ue,Ce,b,Ye.title,ge]);if(D)return s.createElement(Jee,{value:(n=M.text)!==null&&n!==void 0?n:typeof f=="string"?f:"",onSave:k,onCancel:L,onEnd:M.onEnd,prefixCls:O,className:a,style:o,direction:y,component:g,maxLength:M.maxLength,autoSize:M.autoSize,enterIcon:M.enterIcon});const Pe=()=>{const{expandable:be,symbol:ye}=oe;return be?s.createElement("button",{type:"button",key:"expand",className:`${O}-${he?"collapse":"expand"}`,onClick:Re=>we(Re,{expanded:!he}),"aria-label":he?w.collapse:w?.expand},typeof ye=="function"?ye(he):ye):null},Oe=()=>{if(!j)return;const{icon:be,tooltip:ye,tabIndex:Re}=M,Ge=Ma(ye)[0]||w?.edit,ft=typeof Ge=="string"?Ge:"";return P.includes("icon")?s.createElement(Ei,{key:"edit",title:ye===!1?"":Ge},s.createElement("button",{type:"button",ref:E,className:`${O}-edit`,onClick:H,"aria-label":ft,tabIndex:Re},be||s.createElement(Hee,{role:"button"}))):null},Be=()=>T?s.createElement(fte,Object.assign({key:"copy"},z,{prefixCls:O,copied:V,locale:w,onCopy:G,loading:q,iconOnly:f==null})):null,$e=be=>[be&&Pe(),Oe(),Be()],Te=be=>[be&&!he&&s.createElement("span",{"aria-hidden":!0,key:"ellipsis"},bte),oe.suffix,$e(be)];return s.createElement(Ca,{onResize:it,disabled:!me},be=>s.createElement(vte,{tooltipProps:Ye,enableEllipsis:me,isEllipsis:ge},s.createElement(KD,Object.assign({className:se({[`${O}-${c}`]:c,[`${O}-disabled`]:u,[`${O}-ellipsis`]:ue,[`${O}-ellipsis-single-line`]:Ie,[`${O}-ellipsis-multiple-line`]:Ee},a),prefixCls:r,style:Object.assign(Object.assign({},o),{WebkitLineClamp:Ee?le:void 0}),component:g,ref:Ea(be,$,t),direction:y,onClick:P.includes("text")?H:void 0,"aria-label":et?.toString(),title:b},I),s.createElement(hte,{enableMeasure:me&&!Ce,text:f,rows:le,width:Fe,onEllipsis:Ze,expanded:he,miscDeps:[V,he,q,j,T,w].concat(ke(nR.map(ye=>e[ye])))},(ye,Re)=>pte(e,s.createElement(s.Fragment,null,ye.length>0&&Re&&!he&&et?s.createElement("span",{key:"show-content","aria-hidden":!0},ye):ye,Te(Re)))))))});var yte=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,r=Object.getOwnPropertySymbols(e);a{var{ellipsis:n,rel:r}=e,a=yte(e,["ellipsis","rel"]);const o=Object.assign(Object.assign({},a),{rel:r===void 0&&a.target==="_blank"?"noopener noreferrer":r});return delete o.navigate,s.createElement(Ng,Object.assign({},o,{ref:t,ellipsis:!!n,component:"a"}))}),Ste=s.forwardRef((e,t)=>s.createElement(Ng,Object.assign({ref:t},e,{component:"div"})));var Cte=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,r=Object.getOwnPropertySymbols(e);a{var{ellipsis:n}=e,r=Cte(e,["ellipsis"]);const a=s.useMemo(()=>n&&typeof n=="object"?lr(n,["expandable","rows"]):n,[n]);return s.createElement(Ng,Object.assign({ref:t},r,{ellipsis:a,component:"span"}))},$te=s.forwardRef(wte);var Ete=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,r=Object.getOwnPropertySymbols(e);a{const{level:n=1}=e,r=Ete(e,["level"]),a=_te.includes(n)?`h${n}`:"h1";return s.createElement(Ng,Object.assign({ref:t},r,{component:a}))}),Wl=KD;Wl.Text=$te;Wl.Link=xte;Wl.Title=Ote;Wl.Paragraph=Ste;const r0=(function(e,t){if(e&&t){var n=Array.isArray(t)?t:t.split(","),r=e.name||"",a=e.type||"",o=a.replace(/\/.*$/,"");return n.some(function(c){var u=c.trim();if(/^\*(\/\*)?$/.test(c))return!0;if(u.charAt(0)==="."){var f=r.toLowerCase(),d=u.toLowerCase(),h=[d];return(d===".jpg"||d===".jpeg")&&(h=[".jpg",".jpeg"]),h.some(function(v){return f.endsWith(v)})}return/\/\*$/.test(u)?o===u.replace(/\/.*$/,""):a===u?!0:/^\w+$/.test(u)?(xr(!1,"Upload takes an invalidate 'accept' type '".concat(u,"'.Skip for check.")),!0):!1})}return!0});function Ite(e,t){var n="cannot ".concat(e.method," ").concat(e.action," ").concat(t.status,"'"),r=new Error(n);return r.status=t.status,r.method=e.method,r.url=e.action,r}function rR(e){var t=e.responseText||e.response;if(!t)return t;try{return JSON.parse(t)}catch{return t}}function Rte(e){var t=new XMLHttpRequest;e.onProgress&&t.upload&&(t.upload.onprogress=function(o){o.total>0&&(o.percent=o.loaded/o.total*100),e.onProgress(o)});var n=new FormData;e.data&&Object.keys(e.data).forEach(function(a){var o=e.data[a];if(Array.isArray(o)){o.forEach(function(c){n.append("".concat(a,"[]"),c)});return}n.append(a,o)}),e.file instanceof Blob?n.append(e.filename,e.file,e.file.name):n.append(e.filename,e.file),t.onerror=function(o){e.onError(o)},t.onload=function(){return t.status<200||t.status>=300?e.onError(Ite(e,t),rR(t)):e.onSuccess(rR(t),t)},t.open(e.method,e.action,!0),e.withCredentials&&"withCredentials"in t&&(t.withCredentials=!0);var r=e.headers||{};return r["X-Requested-With"]!==null&&t.setRequestHeader("X-Requested-With","XMLHttpRequest"),Object.keys(r).forEach(function(a){r[a]!==null&&t.setRequestHeader(a,r[a])}),t.send(n),{abort:function(){t.abort()}}}var Nte=(function(){var e=za(Jn().mark(function t(n,r){var a,o,c,u,f,d,h,v;return Jn().wrap(function(b){for(;;)switch(b.prev=b.next){case 0:d=function(){return d=za(Jn().mark(function C(y){return Jn().wrap(function($){for(;;)switch($.prev=$.next){case 0:return $.abrupt("return",new Promise(function(E){y.file(function(O){r(O)?(y.fullPath&&!O.webkitRelativePath&&(Object.defineProperties(O,{webkitRelativePath:{writable:!0}}),O.webkitRelativePath=y.fullPath.replace(/^\//,""),Object.defineProperties(O,{webkitRelativePath:{writable:!1}})),E(O)):E(null)})}));case 1:case"end":return $.stop()}},C)})),d.apply(this,arguments)},f=function(C){return d.apply(this,arguments)},u=function(){return u=za(Jn().mark(function C(y){var w,$,E,O,I;return Jn().wrap(function(M){for(;;)switch(M.prev=M.next){case 0:w=y.createReader(),$=[];case 2:return M.next=5,new Promise(function(D){w.readEntries(D,function(){return D([])})});case 5:if(E=M.sent,O=E.length,O){M.next=9;break}return M.abrupt("break",12);case 9:for(I=0;I0||C.some(function(O){return O.kind==="file"}))&&h?.(),!x){E.next=11;break}return E.next=7,Nte(Array.prototype.slice.call(C),function(O){return r0(O,r.props.accept)});case 7:y=E.sent,r.uploadFiles(y),E.next=14;break;case 11:w=ke(y).filter(function(O){return r0(O,b)}),g===!1&&(w=y.slice(0,1)),r.uploadFiles(w);case 14:case"end":return E.stop()}},f)}));return function(f,d){return u.apply(this,arguments)}})()),X(St(r),"onFilePaste",(function(){var u=za(Jn().mark(function f(d){var h,v;return Jn().wrap(function(b){for(;;)switch(b.prev=b.next){case 0:if(h=r.props.pastable,h){b.next=3;break}return b.abrupt("return");case 3:if(d.type!=="paste"){b.next=6;break}return v=d.clipboardData,b.abrupt("return",r.onDataTransferFiles(v,function(){d.preventDefault()}));case 6:case"end":return b.stop()}},f)}));return function(f){return u.apply(this,arguments)}})()),X(St(r),"onFileDragOver",function(u){u.preventDefault()}),X(St(r),"onFileDrop",(function(){var u=za(Jn().mark(function f(d){var h;return Jn().wrap(function(g){for(;;)switch(g.prev=g.next){case 0:if(d.preventDefault(),d.type!=="drop"){g.next=4;break}return h=d.dataTransfer,g.abrupt("return",r.onDataTransferFiles(h));case 4:case"end":return g.stop()}},f)}));return function(f){return u.apply(this,arguments)}})()),X(St(r),"uploadFiles",function(u){var f=ke(u),d=f.map(function(h){return h.uid=a0(),r.processFile(h,f)});Promise.all(d).then(function(h){var v=r.props.onBatchStart;v?.(h.map(function(g){var b=g.origin,x=g.parsedFile;return{file:b,parsedFile:x}})),h.filter(function(g){return g.parsedFile!==null}).forEach(function(g){r.post(g)})})}),X(St(r),"processFile",(function(){var u=za(Jn().mark(function f(d,h){var v,g,b,x,C,y,w,$,E;return Jn().wrap(function(I){for(;;)switch(I.prev=I.next){case 0:if(v=r.props.beforeUpload,g=d,!v){I.next=14;break}return I.prev=3,I.next=6,v(d,h);case 6:g=I.sent,I.next=12;break;case 9:I.prev=9,I.t0=I.catch(3),g=!1;case 12:if(g!==!1){I.next=14;break}return I.abrupt("return",{origin:d,parsedFile:null,action:null,data:null});case 14:if(b=r.props.action,typeof b!="function"){I.next=21;break}return I.next=18,b(d);case 18:x=I.sent,I.next=22;break;case 21:x=b;case 22:if(C=r.props.data,typeof C!="function"){I.next=29;break}return I.next=26,C(d);case 26:y=I.sent,I.next=30;break;case 29:y=C;case 30:return w=(jt(g)==="object"||typeof g=="string")&&g?g:d,w instanceof File?$=w:$=new File([w],d.name,{type:d.type}),E=$,E.uid=d.uid,I.abrupt("return",{origin:d,data:y,parsedFile:E,action:x});case 35:case"end":return I.stop()}},f,null,[[3,9]])}));return function(f,d){return u.apply(this,arguments)}})()),X(St(r),"saveFileInput",function(u){r.fileInput=u}),r}return Cr(n,[{key:"componentDidMount",value:function(){this._isMounted=!0;var a=this.props.pastable;a&&document.addEventListener("paste",this.onFilePaste)}},{key:"componentWillUnmount",value:function(){this._isMounted=!1,this.abort(),document.removeEventListener("paste",this.onFilePaste)}},{key:"componentDidUpdate",value:function(a){var o=this.props.pastable;o&&!a.pastable?document.addEventListener("paste",this.onFilePaste):!o&&a.pastable&&document.removeEventListener("paste",this.onFilePaste)}},{key:"post",value:function(a){var o=this,c=a.data,u=a.origin,f=a.action,d=a.parsedFile;if(this._isMounted){var h=this.props,v=h.onStart,g=h.customRequest,b=h.name,x=h.headers,C=h.withCredentials,y=h.method,w=u.uid,$=g||Rte,E={action:f,filename:b,data:c,file:d,headers:x,withCredentials:C,method:y||"post",onProgress:function(I){var j=o.props.onProgress;j?.(I,d)},onSuccess:function(I,j){var M=o.props.onSuccess;M?.(I,d,j),delete o.reqs[w]},onError:function(I,j){var M=o.props.onError;M?.(I,j,d),delete o.reqs[w]}};v(u),this.reqs[w]=$(E)}}},{key:"reset",value:function(){this.setState({uid:a0()})}},{key:"abort",value:function(a){var o=this.reqs;if(a){var c=a.uid?a.uid:a;o[c]&&o[c].abort&&o[c].abort(),delete o[c]}else Object.keys(o).forEach(function(u){o[u]&&o[u].abort&&o[u].abort(),delete o[u]})}},{key:"render",value:function(){var a=this.props,o=a.component,c=a.prefixCls,u=a.className,f=a.classNames,d=f===void 0?{}:f,h=a.disabled,v=a.id,g=a.name,b=a.style,x=a.styles,C=x===void 0?{}:x,y=a.multiple,w=a.accept,$=a.capture,E=a.children,O=a.directory,I=a.openFileDialogOnClick,j=a.onMouseEnter,M=a.onMouseLeave,D=a.hasControlInside,N=Kt(a,Tte),P=se(X(X(X({},c,!0),"".concat(c,"-disabled"),h),u,u)),A=O?{directory:"directory",webkitdirectory:"webkitdirectory"}:{},F=h?{}:{onClick:I?this.onClick:function(){},onKeyDown:I?this.onKeyDown:function(){},onMouseEnter:j,onMouseLeave:M,onDrop:this.onFileDrop,onDragOver:this.onFileDragOver,tabIndex:D?void 0:"0"};return Se.createElement(o,Me({},F,{className:P,role:D?void 0:"button",style:b}),Se.createElement("input",Me({},ma(N,{aria:!0,data:!0}),{id:v,name:g,disabled:h,type:"file",ref:this.saveFileInput,onClick:function(k){return k.stopPropagation()},key:this.state.uid,style:ee({display:"none"},C.input),className:d.input,accept:w},A,{multiple:y,onChange:this.onChange},$!=null?{capture:$}:{})),E)}}]),n})(s.Component);function i0(){}var Bx=(function(e){oi(n,e);var t=_i(n);function n(){var r;Sr(this,n);for(var a=arguments.length,o=new Array(a),c=0;c{const{componentCls:t,iconCls:n}=e;return{[`${t}-wrapper`]:{[`${t}-drag`]:{position:"relative",width:"100%",height:"100%",textAlign:"center",background:e.colorFillAlter,border:`${te(e.lineWidth)} dashed ${e.colorBorder}`,borderRadius:e.borderRadiusLG,cursor:"pointer",transition:`border-color ${e.motionDurationSlow}`,[t]:{padding:e.padding},[`${t}-btn`]:{display:"table",width:"100%",height:"100%",outline:"none",borderRadius:e.borderRadiusLG,"&:focus-visible":{outline:`${te(e.lineWidthFocus)} solid ${e.colorPrimaryBorder}`}},[`${t}-drag-container`]:{display:"table-cell",verticalAlign:"middle"},[` + &:not(${t}-disabled):hover, + &-hover:not(${t}-disabled) + `]:{borderColor:e.colorPrimaryHover},[`p${t}-drag-icon`]:{marginBottom:e.margin,[n]:{color:e.colorPrimary,fontSize:e.uploadThumbnailSize}},[`p${t}-text`]:{margin:`0 0 ${te(e.marginXXS)}`,color:e.colorTextHeading,fontSize:e.fontSizeLG},[`p${t}-hint`]:{color:e.colorTextDescription,fontSize:e.fontSize},[`&${t}-disabled`]:{[`p${t}-drag-icon ${n}, + p${t}-text, + p${t}-hint + `]:{color:e.colorTextDisabled}}}}}},kte=e=>{const{componentCls:t,iconCls:n,fontSize:r,lineHeight:a,calc:o}=e,c=`${t}-list-item`,u=`${c}-actions`,f=`${c}-action`;return{[`${t}-wrapper`]:{[`${t}-list`]:Object.assign(Object.assign({},Uo()),{lineHeight:e.lineHeight,[c]:{position:"relative",height:o(e.lineHeight).mul(r).equal(),marginTop:e.marginXS,fontSize:r,display:"flex",alignItems:"center",transition:`background-color ${e.motionDurationSlow}`,borderRadius:e.borderRadiusSM,"&:hover":{backgroundColor:e.controlItemBgHover},[`${c}-name`]:Object.assign(Object.assign({},Bi),{padding:`0 ${te(e.paddingXS)}`,lineHeight:a,flex:"auto",transition:`all ${e.motionDurationSlow}`}),[u]:{whiteSpace:"nowrap",[f]:{opacity:0},[n]:{color:e.actionsColor,transition:`all ${e.motionDurationSlow}`},[` + ${f}:focus-visible, + &.picture ${f} + `]:{opacity:1}},[`${t}-icon ${n}`]:{color:e.colorIcon,fontSize:r},[`${c}-progress`]:{position:"absolute",bottom:e.calc(e.uploadProgressOffset).mul(-1).equal(),width:"100%",paddingInlineStart:o(r).add(e.paddingXS).equal(),fontSize:r,lineHeight:0,pointerEvents:"none","> div":{margin:0}}},[`${c}:hover ${f}`]:{opacity:1},[`${c}-error`]:{color:e.colorError,[`${c}-name, ${t}-icon ${n}`]:{color:e.colorError},[u]:{[`${n}, ${n}:hover`]:{color:e.colorError},[f]:{opacity:1}}},[`${t}-list-item-container`]:{transition:`opacity ${e.motionDurationSlow}, height ${e.motionDurationSlow}`,"&::before":{display:"table",width:0,height:0,content:'""'}}})}}},Ate=e=>{const{componentCls:t}=e,n=new jn("uploadAnimateInlineIn",{from:{width:0,height:0,padding:0,opacity:0,margin:e.calc(e.marginXS).div(-2).equal()}}),r=new jn("uploadAnimateInlineOut",{to:{width:0,height:0,padding:0,opacity:0,margin:e.calc(e.marginXS).div(-2).equal()}}),a=`${t}-animate-inline`;return[{[`${t}-wrapper`]:{[`${a}-appear, ${a}-enter, ${a}-leave`]:{animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseInOutCirc,animationFillMode:"forwards"},[`${a}-appear, ${a}-enter`]:{animationName:n},[`${a}-leave`]:{animationName:r}}},{[`${t}-wrapper`]:sL(e)},n,r]},zte=e=>{const{componentCls:t,iconCls:n,uploadThumbnailSize:r,uploadProgressOffset:a,calc:o}=e,c=`${t}-list`,u=`${c}-item`;return{[`${t}-wrapper`]:{[` + ${c}${c}-picture, + ${c}${c}-picture-card, + ${c}${c}-picture-circle + `]:{[u]:{position:"relative",height:o(r).add(o(e.lineWidth).mul(2)).add(o(e.paddingXS).mul(2)).equal(),padding:e.paddingXS,border:`${te(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadiusLG,"&:hover":{background:"transparent"},[`${u}-thumbnail`]:Object.assign(Object.assign({},Bi),{width:r,height:r,lineHeight:te(o(r).add(e.paddingSM).equal()),textAlign:"center",flex:"none",[n]:{fontSize:e.fontSizeHeading2,color:e.colorPrimary},img:{display:"block",width:"100%",height:"100%",overflow:"hidden"}}),[`${u}-progress`]:{bottom:a,width:`calc(100% - ${te(o(e.paddingSM).mul(2).equal())})`,marginTop:0,paddingInlineStart:o(r).add(e.paddingXS).equal()}},[`${u}-error`]:{borderColor:e.colorError,[`${u}-thumbnail ${n}`]:{[`svg path[fill='${nu[0]}']`]:{fill:e.colorErrorBg},[`svg path[fill='${nu.primary}']`]:{fill:e.colorError}}},[`${u}-uploading`]:{borderStyle:"dashed",[`${u}-name`]:{marginBottom:a}}},[`${c}${c}-picture-circle ${u}`]:{[`&, &::before, ${u}-thumbnail`]:{borderRadius:"50%"}}}}},Lte=e=>{const{componentCls:t,iconCls:n,fontSizeLG:r,colorTextLightSolid:a,calc:o}=e,c=`${t}-list`,u=`${c}-item`,f=e.uploadPicCardSize;return{[` + ${t}-wrapper${t}-picture-card-wrapper, + ${t}-wrapper${t}-picture-circle-wrapper + `]:Object.assign(Object.assign({},Uo()),{display:"block",[`${t}${t}-select`]:{width:f,height:f,textAlign:"center",verticalAlign:"top",backgroundColor:e.colorFillAlter,border:`${te(e.lineWidth)} dashed ${e.colorBorder}`,borderRadius:e.borderRadiusLG,cursor:"pointer",transition:`border-color ${e.motionDurationSlow}`,[`> ${t}`]:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%",textAlign:"center"},[`&:not(${t}-disabled):hover`]:{borderColor:e.colorPrimary}},[`${c}${c}-picture-card, ${c}${c}-picture-circle`]:{display:"flex",flexWrap:"wrap","@supports not (gap: 1px)":{"& > *":{marginBlockEnd:e.marginXS,marginInlineEnd:e.marginXS}},"@supports (gap: 1px)":{gap:e.marginXS},[`${c}-item-container`]:{display:"inline-block",width:f,height:f,verticalAlign:"top"},"&::after":{display:"none"},"&::before":{display:"none"},[u]:{height:"100%",margin:0,"&::before":{position:"absolute",zIndex:1,width:`calc(100% - ${te(o(e.paddingXS).mul(2).equal())})`,height:`calc(100% - ${te(o(e.paddingXS).mul(2).equal())})`,backgroundColor:e.colorBgMask,opacity:0,transition:`all ${e.motionDurationSlow}`,content:'" "'}},[`${u}:hover`]:{[`&::before, ${u}-actions`]:{opacity:1}},[`${u}-actions`]:{position:"absolute",insetInlineStart:0,zIndex:10,width:"100%",whiteSpace:"nowrap",textAlign:"center",opacity:0,transition:`all ${e.motionDurationSlow}`,[` + ${n}-eye, + ${n}-download, + ${n}-delete + `]:{zIndex:10,width:r,margin:`0 ${te(e.marginXXS)}`,fontSize:r,cursor:"pointer",transition:`all ${e.motionDurationSlow}`,color:a,"&:hover":{color:a},svg:{verticalAlign:"baseline"}}},[`${u}-thumbnail, ${u}-thumbnail img`]:{position:"static",display:"block",width:"100%",height:"100%",objectFit:"contain"},[`${u}-name`]:{display:"none",textAlign:"center"},[`${u}-file + ${u}-name`]:{position:"absolute",bottom:e.margin,display:"block",width:`calc(100% - ${te(o(e.paddingXS).mul(2).equal())})`},[`${u}-uploading`]:{[`&${u}`]:{backgroundColor:e.colorFillAlter},[`&::before, ${n}-eye, ${n}-download, ${n}-delete`]:{display:"none"}},[`${u}-progress`]:{bottom:e.marginXL,width:`calc(100% - ${te(o(e.paddingXS).mul(2).equal())})`,paddingInlineStart:0}}}),[`${t}-wrapper${t}-picture-circle-wrapper`]:{[`${t}${t}-select`]:{borderRadius:"50%"}}}},Hte=e=>{const{componentCls:t}=e;return{[`${t}-rtl`]:{direction:"rtl"}}},Bte=e=>{const{componentCls:t,colorTextDisabled:n}=e;return{[`${t}-wrapper`]:Object.assign(Object.assign({},zn(e)),{[t]:{outline:0,"input[type='file']":{cursor:"pointer"}},[`${t}-select`]:{display:"inline-block"},[`${t}-hidden`]:{display:"none"},[`${t}-disabled`]:{color:n,cursor:"not-allowed"}})}},Fte=e=>({actionsColor:e.colorIcon}),Vte=Kn("Upload",e=>{const{fontSizeHeading3:t,fontHeight:n,lineWidth:r,controlHeightLG:a,calc:o}=e,c=xn(e,{uploadThumbnailSize:o(t).mul(2).equal(),uploadProgressOffset:o(o(n).div(2)).add(r).equal(),uploadPicCardSize:o(a).mul(2.55).equal()});return[Bte(c),Pte(c),zte(c),Lte(c),kte(c),Ate(c),Hte(c),qv(c)]},Fte);var Kte={icon:function(t,n){return{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M534 352V136H232v752h560V394H576a42 42 0 01-42-42z",fill:n}},{tag:"path",attrs:{d:"M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM602 137.8L790.2 326H602V137.8zM792 888H232V136h302v216a42 42 0 0042 42h216v494z",fill:t}}]}},name:"file",theme:"twotone"},Ute=function(t,n){return s.createElement($n,Me({},t,{ref:n,icon:Kte}))},Wte=s.forwardRef(Ute),qte={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M779.3 196.6c-94.2-94.2-247.6-94.2-341.7 0l-261 260.8c-1.7 1.7-2.6 4-2.6 6.4s.9 4.7 2.6 6.4l36.9 36.9a9 9 0 0012.7 0l261-260.8c32.4-32.4 75.5-50.2 121.3-50.2s88.9 17.8 121.2 50.2c32.4 32.4 50.2 75.5 50.2 121.2 0 45.8-17.8 88.8-50.2 121.2l-266 265.9-43.1 43.1c-40.3 40.3-105.8 40.3-146.1 0-19.5-19.5-30.2-45.4-30.2-73s10.7-53.5 30.2-73l263.9-263.8c6.7-6.6 15.5-10.3 24.9-10.3h.1c9.4 0 18.1 3.7 24.7 10.3 6.7 6.7 10.3 15.5 10.3 24.9 0 9.3-3.7 18.1-10.3 24.7L372.4 653c-1.7 1.7-2.6 4-2.6 6.4s.9 4.7 2.6 6.4l36.9 36.9a9 9 0 0012.7 0l215.6-215.6c19.9-19.9 30.8-46.3 30.8-74.4s-11-54.6-30.8-74.4c-41.1-41.1-107.9-41-149 0L463 364 224.8 602.1A172.22 172.22 0 00174 724.8c0 46.3 18.1 89.8 50.8 122.5 33.9 33.8 78.3 50.7 122.7 50.7 44.4 0 88.8-16.9 122.6-50.7l309.2-309C824.8 492.7 850 432 850 367.5c.1-64.6-25.1-125.3-70.7-170.9z"}}]},name:"paper-clip",theme:"outlined"},Yte=function(t,n){return s.createElement($n,Me({},t,{ref:n,icon:qte}))},Gte=s.forwardRef(Yte),Xte={icon:function(t,n){return{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M928 160H96c-17.7 0-32 14.3-32 32v640c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32zm-40 632H136v-39.9l138.5-164.3 150.1 178L658.1 489 888 761.6V792zm0-129.8L664.2 396.8c-3.2-3.8-9-3.8-12.2 0L424.6 666.4l-144-170.7c-3.2-3.8-9-3.8-12.2 0L136 652.7V232h752v430.2z",fill:t}},{tag:"path",attrs:{d:"M424.6 765.8l-150.1-178L136 752.1V792h752v-30.4L658.1 489z",fill:n}},{tag:"path",attrs:{d:"M136 652.7l132.4-157c3.2-3.8 9-3.8 12.2 0l144 170.7L652 396.8c3.2-3.8 9-3.8 12.2 0L888 662.2V232H136v420.7zM304 280a88 88 0 110 176 88 88 0 010-176z",fill:n}},{tag:"path",attrs:{d:"M276 368a28 28 0 1056 0 28 28 0 10-56 0z",fill:n}},{tag:"path",attrs:{d:"M304 456a88 88 0 100-176 88 88 0 000 176zm0-116c15.5 0 28 12.5 28 28s-12.5 28-28 28-28-12.5-28-28 12.5-28 28-28z",fill:t}}]}},name:"picture",theme:"twotone"},Qte=function(t,n){return s.createElement($n,Me({},t,{ref:n,icon:Xte}))},Zte=s.forwardRef(Qte);function Rh(e){return Object.assign(Object.assign({},e),{lastModified:e.lastModified,lastModifiedDate:e.lastModifiedDate,name:e.name,size:e.size,type:e.type,uid:e.uid,percent:0,originFileObj:e})}function Nh(e,t){const n=ke(t),r=n.findIndex(({uid:a})=>a===e.uid);return r===-1?n.push(e):n[r]=e,n}function o0(e,t){const n=e.uid!==void 0?"uid":"name";return t.filter(r=>r[n]===e[n])[0]}function Jte(e,t){const n=e.uid!==void 0?"uid":"name",r=t.filter(a=>a[n]!==e[n]);return r.length===t.length?null:r}const ene=(e="")=>{const t=e.split("/"),r=t[t.length-1].split(/#|\?/)[0];return(/\.[^./\\]*$/.exec(r)||[""])[0]},WD=e=>e.indexOf("image/")===0,tne=e=>{if(e.type&&!e.thumbUrl)return WD(e.type);const t=e.thumbUrl||e.url||"",n=ene(t);return/^data:image\//.test(t)||/(webp|svg|png|gif|jpg|jpeg|jfif|bmp|dpg|ico|heic|heif)$/i.test(n)?!0:!(/^data:/.test(t)||n)},Ol=200;function nne(e){return new Promise(t=>{if(!e.type||!WD(e.type)){t("");return}const n=document.createElement("canvas");n.width=Ol,n.height=Ol,n.style.cssText=`position: fixed; left: 0; top: 0; width: ${Ol}px; height: ${Ol}px; z-index: 9999; display: none;`,document.body.appendChild(n);const r=n.getContext("2d"),a=new Image;if(a.onload=()=>{const{width:o,height:c}=a;let u=Ol,f=Ol,d=0,h=0;o>c?(f=c*(Ol/o),h=-(f-u)/2):(u=o*(Ol/c),d=-(u-f)/2),r.drawImage(a,d,h,u,f);const v=n.toDataURL();document.body.removeChild(n),window.URL.revokeObjectURL(a.src),t(v)},a.crossOrigin="anonymous",e.type.startsWith("image/svg+xml")){const o=new FileReader;o.onload=()=>{o.result&&typeof o.result=="string"&&(a.src=o.result)},o.readAsDataURL(e)}else if(e.type.startsWith("image/gif")){const o=new FileReader;o.onload=()=>{o.result&&t(o.result)},o.readAsDataURL(e)}else a.src=window.URL.createObjectURL(e)})}var rne={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M505.7 661a8 8 0 0012.6 0l112-141.7c4.1-5.2.4-12.9-6.3-12.9h-74.1V168c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v338.3H400c-6.7 0-10.4 7.7-6.3 12.9l112 141.8zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z"}}]},name:"download",theme:"outlined"},ane=function(t,n){return s.createElement($n,Me({},t,{ref:n,icon:rne}))},ine=s.forwardRef(ane);const one=s.forwardRef(({prefixCls:e,className:t,style:n,locale:r,listType:a,file:o,items:c,progress:u,iconRender:f,actionIconRender:d,itemRender:h,isImgUrl:v,showPreviewIcon:g,showRemoveIcon:b,showDownloadIcon:x,previewIcon:C,removeIcon:y,downloadIcon:w,extra:$,onPreview:E,onDownload:O,onClose:I},j)=>{var M,D;const{status:N}=o,[P,A]=s.useState(N);s.useEffect(()=>{N!=="removed"&&A(N)},[N]);const[F,H]=s.useState(!1);s.useEffect(()=>{const oe=setTimeout(()=>{H(!0)},300);return()=>{clearTimeout(oe)}},[]);const k=f(o);let L=s.createElement("div",{className:`${e}-icon`},k);if(a==="picture"||a==="picture-card"||a==="picture-circle")if(P==="uploading"||!o.thumbUrl&&!o.url){const oe=se(`${e}-list-item-thumbnail`,{[`${e}-list-item-file`]:P!=="uploading"});L=s.createElement("div",{className:oe},k)}else{const oe=v?.(o)?s.createElement("img",{src:o.thumbUrl||o.url,alt:o.name,className:`${e}-list-item-image`,crossOrigin:o.crossOrigin}):k,he=se(`${e}-list-item-thumbnail`,{[`${e}-list-item-file`]:v&&!v(o)});L=s.createElement("a",{className:he,onClick:fe=>E(o,fe),href:o.url||o.thumbUrl,target:"_blank",rel:"noopener noreferrer"},oe)}const T=se(`${e}-list-item`,`${e}-list-item-${P}`),z=typeof o.linkProps=="string"?JSON.parse(o.linkProps):o.linkProps,V=(typeof b=="function"?b(o):b)?d((typeof y=="function"?y(o):y)||s.createElement(Aee,null),()=>I(o),e,r.removeFile,!0):null,q=(typeof x=="function"?x(o):x)&&P==="done"?d((typeof w=="function"?w(o):w)||s.createElement(ine,null),()=>O(o),e,r.downloadFile):null,G=a!=="picture-card"&&a!=="picture-circle"&&s.createElement("span",{key:"download-delete",className:se(`${e}-list-item-actions`,{picture:a==="picture"})},q,V),B=typeof $=="function"?$(o):$,U=B&&s.createElement("span",{className:`${e}-list-item-extra`},B),K=se(`${e}-list-item-name`),Y=o.url?s.createElement("a",Object.assign({key:"view",target:"_blank",rel:"noopener noreferrer",className:K,title:o.name},z,{href:o.url,onClick:oe=>E(o,oe)}),o.name,U):s.createElement("span",{key:"view",className:K,onClick:oe=>E(o,oe),title:o.name},o.name,U),Q=(typeof g=="function"?g(o):g)&&(o.url||o.thumbUrl)?s.createElement("a",{href:o.url||o.thumbUrl,target:"_blank",rel:"noopener noreferrer",onClick:oe=>E(o,oe),title:r.previewFile},typeof C=="function"?C(o):C||s.createElement(eD,null)):null,Z=(a==="picture-card"||a==="picture-circle")&&P!=="uploading"&&s.createElement("span",{className:`${e}-list-item-actions`},Q,P==="done"&&q,V),{getPrefixCls:ae}=s.useContext(Wt),re=ae(),ie=s.createElement("div",{className:T},L,Y,G,Z,F&&s.createElement(Oi,{motionName:`${re}-fade`,visible:P==="uploading",motionDeadline:2e3},({className:oe})=>{const he="percent"in o?s.createElement(lQ,Object.assign({type:"line",percent:o.percent,"aria-label":o["aria-label"],"aria-labelledby":o["aria-labelledby"]},u)):null;return s.createElement("div",{className:se(`${e}-list-item-progress`,oe)},he)})),ve=o.response&&typeof o.response=="string"?o.response:((M=o.error)===null||M===void 0?void 0:M.statusText)||((D=o.error)===null||D===void 0?void 0:D.message)||r.uploadError,ue=P==="error"?s.createElement(Ei,{title:ve,getPopupContainer:oe=>oe.parentNode},ie):ie;return s.createElement("div",{className:se(`${e}-list-item-container`,t),style:n,ref:j},h?h(ue,o,c,{download:O.bind(null,o),preview:E.bind(null,o),remove:I.bind(null,o)}):ue)}),lne=(e,t)=>{const{listType:n="text",previewFile:r=nne,onPreview:a,onDownload:o,onRemove:c,locale:u,iconRender:f,isImageUrl:d=tne,prefixCls:h,items:v=[],showPreviewIcon:g=!0,showRemoveIcon:b=!0,showDownloadIcon:x=!1,removeIcon:C,previewIcon:y,downloadIcon:w,extra:$,progress:E={size:[-1,2],showInfo:!1},appendAction:O,appendActionVisible:I=!0,itemRender:j,disabled:M}=e,D=YS(),[N,P]=s.useState(!1),A=["picture-card","picture-circle"].includes(n);s.useEffect(()=>{n.startsWith("picture")&&(v||[]).forEach(K=>{!(K.originFileObj instanceof File||K.originFileObj instanceof Blob)||K.thumbUrl!==void 0||(K.thumbUrl="",r?.(K.originFileObj).then(Y=>{K.thumbUrl=Y||"",D()}))})},[n,v,r]),s.useEffect(()=>{P(!0)},[]);const F=(K,Y)=>{if(a)return Y?.preventDefault(),a(K)},H=K=>{typeof o=="function"?o(K):K.url&&window.open(K.url)},k=K=>{c?.(K)},L=K=>{if(f)return f(K,n);const Y=K.status==="uploading";if(n.startsWith("picture")){const Q=n==="picture"?s.createElement(qo,null):u.uploading,Z=d?.(K)?s.createElement(Zte,null):s.createElement(Wte,null);return Y?Q:Z}return Y?s.createElement(qo,null):s.createElement(Gte,null)},T=(K,Y,Q,Z,ae)=>{const re={type:"text",size:"small",title:Z,onClick:ie=>{var ve,ue;Y(),s.isValidElement(K)&&((ue=(ve=K.props).onClick)===null||ue===void 0||ue.call(ve,ie))},className:`${Q}-list-item-action`,disabled:ae?M:!1};return s.isValidElement(K)?s.createElement(dn,Object.assign({},re,{icon:$a(K,Object.assign(Object.assign({},K.props),{onClick:()=>{}}))})):s.createElement(dn,Object.assign({},re),s.createElement("span",null,K))};s.useImperativeHandle(t,()=>({handlePreview:F,handleDownload:H}));const{getPrefixCls:z}=s.useContext(Wt),V=z("upload",h),q=z(),G=se(`${V}-list`,`${V}-list-${n}`),B=s.useMemo(()=>lr(ff(q),["onAppearEnd","onEnterEnd","onLeaveEnd"]),[q]),U=Object.assign(Object.assign({},A?{}:B),{motionDeadline:2e3,motionName:`${V}-${A?"animate-inline":"animate"}`,keys:ke(v.map(K=>({key:K.uid,file:K}))),motionAppear:N});return s.createElement("div",{className:G},s.createElement(ES,Object.assign({},U,{component:!1}),({key:K,file:Y,className:Q,style:Z})=>s.createElement(one,{key:K,locale:u,prefixCls:V,className:Q,style:Z,file:Y,items:v,progress:E,listType:n,isImgUrl:d,showPreviewIcon:g,showRemoveIcon:b,showDownloadIcon:x,removeIcon:C,previewIcon:y,downloadIcon:w,extra:$,iconRender:L,actionIconRender:T,itemRender:j,onPreview:F,onDownload:H,onClose:k})),O&&s.createElement(Oi,Object.assign({},U,{visible:I,forceRender:!0}),({className:K,style:Y})=>$a(O,Q=>({className:se(Q.className,K),style:Object.assign(Object.assign(Object.assign({},Y),{pointerEvents:K?"none":void 0}),Q.style)}))))},sne=s.forwardRef(lne);var cne=function(e,t,n,r){function a(o){return o instanceof n?o:new n(function(c){c(o)})}return new(n||(n=Promise))(function(o,c){function u(h){try{d(r.next(h))}catch(v){c(v)}}function f(h){try{d(r.throw(h))}catch(v){c(v)}}function d(h){h.done?o(h.value):a(h.value).then(u,f)}d((r=r.apply(e,[])).next())})};const Bd=`__LIST_IGNORE_${Date.now()}__`,une=(e,t)=>{const n=ga("upload"),{fileList:r,defaultFileList:a,onRemove:o,showUploadList:c=!0,listType:u="text",onPreview:f,onDownload:d,onChange:h,onDrop:v,previewFile:g,disabled:b,locale:x,iconRender:C,isImageUrl:y,progress:w,prefixCls:$,className:E,type:O="select",children:I,style:j,itemRender:M,maxCount:D,data:N={},multiple:P=!1,hasControlInside:A=!0,action:F="",accept:H="",supportServerRender:k=!0,rootClassName:L}=e,T=s.useContext(ja),z=b??T,V=e.customRequest||n.customRequest,[q,G]=Wn(a||[],{value:r,postState:be=>be??[]}),[B,U]=s.useState("drop"),K=s.useRef(null),Y=s.useRef(null);s.useMemo(()=>{const be=Date.now();(r||[]).forEach((ye,Re)=>{!ye.uid&&!Object.isFrozen(ye)&&(ye.uid=`__AUTO__${be}_${Re}__`)})},[r]);const Q=(be,ye,Re)=>{let Ge=ke(ye),ft=!1;D===1?Ge=Ge.slice(-1):D&&(ft=Ge.length>D,Ge=Ge.slice(0,D)),Li.flushSync(()=>{G(Ge)});const $t={file:be,fileList:Ge};Re&&($t.event=Re),(!ft||be.status==="removed"||Ge.some(Qe=>Qe.uid===be.uid))&&Li.flushSync(()=>{h?.($t)})},Z=(be,ye)=>cne(void 0,void 0,void 0,function*(){const{beforeUpload:Re,transformFile:Ge}=e;let ft=be;if(Re){const $t=yield Re(be,ye);if($t===!1)return!1;if(delete be[Bd],$t===Bd)return Object.defineProperty(be,Bd,{value:!0,configurable:!0}),!1;typeof $t=="object"&&$t&&(ft=$t)}return Ge&&(ft=yield Ge(ft)),ft}),ae=be=>{const ye=be.filter(ft=>!ft.file[Bd]);if(!ye.length)return;const Re=ye.map(ft=>Rh(ft.file));let Ge=ke(q);Re.forEach(ft=>{Ge=Nh(ft,Ge)}),Re.forEach((ft,$t)=>{let Qe=ft;if(ye[$t].parsedFile)ft.status="uploading";else{const{originFileObj:at}=ft;let mt;try{mt=new File([at],at.name,{type:at.type})}catch{mt=new Blob([at],{type:at.type}),mt.name=at.name,mt.lastModifiedDate=new Date,mt.lastModified=new Date().getTime()}mt.uid=ft.uid,Qe=mt}Q(Qe,Ge)})},re=(be,ye,Re)=>{try{typeof be=="string"&&(be=JSON.parse(be))}catch{}if(!o0(ye,q))return;const Ge=Rh(ye);Ge.status="done",Ge.percent=100,Ge.response=be,Ge.xhr=Re;const ft=Nh(Ge,q);Q(Ge,ft)},ie=(be,ye)=>{if(!o0(ye,q))return;const Re=Rh(ye);Re.status="uploading",Re.percent=be.percent;const Ge=Nh(Re,q);Q(Re,Ge,be)},ve=(be,ye,Re)=>{if(!o0(Re,q))return;const Ge=Rh(Re);Ge.error=be,Ge.response=ye,Ge.status="error";const ft=Nh(Ge,q);Q(Ge,ft)},ue=be=>{let ye;Promise.resolve(typeof o=="function"?o(be):o).then(Re=>{var Ge;if(Re===!1)return;const ft=Jte(be,q);ft&&(ye=Object.assign(Object.assign({},be),{status:"removed"}),q?.forEach($t=>{const Qe=ye.uid!==void 0?"uid":"name";$t[Qe]===ye[Qe]&&!Object.isFrozen($t)&&($t.status="removed")}),(Ge=K.current)===null||Ge===void 0||Ge.abort(ye),Q(ye,ft))})},oe=be=>{U(be.type),be.type==="drop"&&v?.(be)};s.useImperativeHandle(t,()=>({onBatchStart:ae,onSuccess:re,onProgress:ie,onError:ve,fileList:q,upload:K.current,nativeElement:Y.current}));const{getPrefixCls:he,direction:fe,upload:me}=s.useContext(Wt),le=he("upload",$),pe=Object.assign(Object.assign({onBatchStart:ae,onError:ve,onProgress:ie,onSuccess:re},e),{customRequest:V,data:N,multiple:P,action:F,accept:H,supportServerRender:k,prefixCls:le,disabled:z,beforeUpload:Z,onChange:void 0,hasControlInside:A});delete pe.className,delete pe.style,(!I||z)&&delete pe.id;const Ce=`${le}-wrapper`,[De,je,ge]=Vte(le,Ce),[Ie]=ho("Upload",lo.Upload),{showRemoveIcon:Ee,showPreviewIcon:we,showDownloadIcon:Fe,removeIcon:He,previewIcon:it,downloadIcon:Ze,extra:Ye}=typeof c=="boolean"?{}:c,et=typeof Ee>"u"?!z:Ee,Pe=(be,ye)=>c?s.createElement(sne,{prefixCls:le,listType:u,items:q,previewFile:g,onPreview:f,onDownload:d,onRemove:ue,showRemoveIcon:et,showPreviewIcon:we,showDownloadIcon:Fe,removeIcon:He,previewIcon:it,downloadIcon:Ze,iconRender:C,extra:Ye,locale:Object.assign(Object.assign({},Ie),x),isImageUrl:y,progress:w,appendAction:be,appendActionVisible:ye,itemRender:M,disabled:z}):be,Oe=se(Ce,E,L,je,ge,me?.className,{[`${le}-rtl`]:fe==="rtl",[`${le}-picture-card-wrapper`]:u==="picture-card",[`${le}-picture-circle-wrapper`]:u==="picture-circle"}),Be=Object.assign(Object.assign({},me?.style),j);if(O==="drag"){const be=se(je,le,`${le}-drag`,{[`${le}-drag-uploading`]:q.some(ye=>ye.status==="uploading"),[`${le}-drag-hover`]:B==="dragover",[`${le}-disabled`]:z,[`${le}-rtl`]:fe==="rtl"});return De(s.createElement("span",{className:Oe,ref:Y},s.createElement("div",{className:be,style:Be,onDrop:oe,onDragOver:oe,onDragLeave:oe},s.createElement(Bx,Object.assign({},pe,{ref:K,className:`${le}-btn`}),s.createElement("div",{className:`${le}-drag-container`},I))),Pe()))}const $e=se(le,`${le}-select`,{[`${le}-disabled`]:z,[`${le}-hidden`]:!I}),Te=s.createElement("div",{className:$e,style:Be},s.createElement(Bx,Object.assign({},pe,{ref:K})));return De(u==="picture-card"||u==="picture-circle"?s.createElement("span",{className:Oe,ref:Y},Pe(Te,!!I)):s.createElement("span",{className:Oe,ref:Y},Te,Pe()))},qD=s.forwardRef(une);var dne=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,r=Object.getOwnPropertySymbols(e);a{var{style:n,height:r,hasControlInside:a=!1}=e,o=dne(e,["style","height","hasControlInside"]);return s.createElement(qD,Object.assign({ref:t,hasControlInside:a},o,{type:"drag",style:Object.assign(Object.assign({},n),{height:r})}))}),va=qD;va.Dragger=fne;va.LIST_IGNORE=Bd;/** + * react-router v7.9.4 + * + * Copyright (c) Remix Software Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */var aR="popstate";function mne(e={}){function t(r,a){let{pathname:o,search:c,hash:u}=r.location;return Fx("",{pathname:o,search:c,hash:u},a.state&&a.state.usr||null,a.state&&a.state.key||"default")}function n(r,a){return typeof a=="string"?a:wf(a)}return vne(t,n,null,e)}function Tr(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Vi(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function hne(){return Math.random().toString(36).substring(2,10)}function iR(e,t){return{usr:e.state,key:e.key,idx:t}}function Fx(e,t,n=null,r){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?$u(t):t,state:n,key:t&&t.key||r||hne()}}function wf({pathname:e="/",search:t="",hash:n=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),n&&n!=="#"&&(e+=n.charAt(0)==="#"?n:"#"+n),e}function $u(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function vne(e,t,n,r={}){let{window:a=document.defaultView,v5Compat:o=!1}=r,c=a.history,u="POP",f=null,d=h();d==null&&(d=0,c.replaceState({...c.state,idx:d},""));function h(){return(c.state||{idx:null}).idx}function v(){u="POP";let y=h(),w=y==null?null:y-d;d=y,f&&f({action:u,location:C.location,delta:w})}function g(y,w){u="PUSH";let $=Fx(C.location,y,w);d=h()+1;let E=iR($,d),O=C.createHref($);try{c.pushState(E,"",O)}catch(I){if(I instanceof DOMException&&I.name==="DataCloneError")throw I;a.location.assign(O)}o&&f&&f({action:u,location:C.location,delta:1})}function b(y,w){u="REPLACE";let $=Fx(C.location,y,w);d=h();let E=iR($,d),O=C.createHref($);c.replaceState(E,"",O),o&&f&&f({action:u,location:C.location,delta:0})}function x(y){return gne(y)}let C={get action(){return u},get location(){return e(a,c)},listen(y){if(f)throw new Error("A history only accepts one active listener");return a.addEventListener(aR,v),f=y,()=>{a.removeEventListener(aR,v),f=null}},createHref(y){return t(a,y)},createURL:x,encodeLocation(y){let w=x(y);return{pathname:w.pathname,search:w.search,hash:w.hash}},push:g,replace:b,go(y){return c.go(y)}};return C}function gne(e,t=!1){let n="http://localhost";typeof window<"u"&&(n=window.location.origin!=="null"?window.location.origin:window.location.href),Tr(n,"No window.location.(origin|href) available to create URL");let r=typeof e=="string"?e:wf(e);return r=r.replace(/ $/,"%20"),!t&&r.startsWith("//")&&(r=n+r),new URL(r,n)}function YD(e,t,n="/"){return pne(e,t,n,!1)}function pne(e,t,n,r){let a=typeof t=="string"?$u(t):t,o=Xo(a.pathname||"/",n);if(o==null)return null;let c=GD(e);bne(c);let u=null;for(let f=0;u==null&&f{let h={relativePath:d===void 0?c.path||"":d,caseSensitive:c.caseSensitive===!0,childrenIndex:u,route:c};if(h.relativePath.startsWith("/")){if(!h.relativePath.startsWith(r)&&f)return;Tr(h.relativePath.startsWith(r),`Absolute route path "${h.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),h.relativePath=h.relativePath.slice(r.length)}let v=Fo([r,h.relativePath]),g=n.concat(h);c.children&&c.children.length>0&&(Tr(c.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${v}".`),GD(c.children,t,g,v,f)),!(c.path==null&&!c.index)&&t.push({path:v,score:Ene(v,c.index),routesMeta:g})};return e.forEach((c,u)=>{if(c.path===""||!c.path?.includes("?"))o(c,u);else for(let f of XD(c.path))o(c,u,!0,f)}),t}function XD(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,a=n.endsWith("?"),o=n.replace(/\?$/,"");if(r.length===0)return a?[o,""]:[o];let c=XD(r.join("/")),u=[];return u.push(...c.map(f=>f===""?o:[o,f].join("/"))),a&&u.push(...c),u.map(f=>e.startsWith("/")&&f===""?"/":f)}function bne(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:_ne(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}var yne=/^:[\w-]+$/,xne=3,Sne=2,Cne=1,wne=10,$ne=-2,oR=e=>e==="*";function Ene(e,t){let n=e.split("/"),r=n.length;return n.some(oR)&&(r+=$ne),t&&(r+=Sne),n.filter(a=>!oR(a)).reduce((a,o)=>a+(yne.test(o)?xne:o===""?Cne:wne),r)}function _ne(e,t){return e.length===t.length&&e.slice(0,-1).every((r,a)=>r===t[a])?e[e.length-1]-t[t.length-1]:0}function One(e,t,n=!1){let{routesMeta:r}=e,a={},o="/",c=[];for(let u=0;u{if(h==="*"){let x=u[g]||"";c=o.slice(0,o.length-x.length).replace(/(.)\/+$/,"$1")}const b=u[g];return v&&!b?d[h]=void 0:d[h]=(b||"").replace(/%2F/g,"/"),d},{}),pathname:o,pathnameBase:c,pattern:e}}function Ine(e,t=!1,n=!0){Vi(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let r=[],a="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(c,u,f)=>(r.push({paramName:u,isOptional:f!=null}),f?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(r.push({paramName:"*"}),a+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?a+="\\/*$":e!==""&&e!=="/"&&(a+="(?:(?=\\/|$))"),[new RegExp(a,t?void 0:"i"),r]}function Rne(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Vi(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function Xo(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}function Nne(e,t="/"){let{pathname:n,search:r="",hash:a=""}=typeof e=="string"?$u(e):e;return{pathname:n?n.startsWith("/")?n:Mne(n,t):t,search:Dne(r),hash:Pne(a)}}function Mne(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(a=>{a===".."?n.length>1&&n.pop():a!=="."&&n.push(a)}),n.length>1?n.join("/"):"/"}function l0(e,t,n,r){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in and the router will parse it for you.`}function jne(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function KC(e){let t=jne(e);return t.map((n,r)=>r===t.length-1?n.pathname:n.pathnameBase)}function UC(e,t,n,r=!1){let a;typeof e=="string"?a=$u(e):(a={...e},Tr(!a.pathname||!a.pathname.includes("?"),l0("?","pathname","search",a)),Tr(!a.pathname||!a.pathname.includes("#"),l0("#","pathname","hash",a)),Tr(!a.search||!a.search.includes("#"),l0("#","search","hash",a)));let o=e===""||a.pathname==="",c=o?"/":a.pathname,u;if(c==null)u=n;else{let v=t.length-1;if(!r&&c.startsWith("..")){let g=c.split("/");for(;g[0]==="..";)g.shift(),v-=1;a.pathname=g.join("/")}u=v>=0?t[v]:"/"}let f=Nne(a,u),d=c&&c!=="/"&&c.endsWith("/"),h=(o||c===".")&&n.endsWith("/");return!f.pathname.endsWith("/")&&(d||h)&&(f.pathname+="/"),f}var Fo=e=>e.join("/").replace(/\/\/+/g,"/"),Tne=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Dne=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,Pne=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function kne(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}var QD=["POST","PUT","PATCH","DELETE"];new Set(QD);var Ane=["GET",...QD];new Set(Ane);var Eu=s.createContext(null);Eu.displayName="DataRouter";var Mg=s.createContext(null);Mg.displayName="DataRouterState";s.createContext(!1);var ZD=s.createContext({isTransitioning:!1});ZD.displayName="ViewTransition";var zne=s.createContext(new Map);zne.displayName="Fetchers";var Lne=s.createContext(null);Lne.displayName="Await";var Gi=s.createContext(null);Gi.displayName="Navigation";var Kf=s.createContext(null);Kf.displayName="Location";var Xi=s.createContext({outlet:null,matches:[],isDataRoute:!1});Xi.displayName="Route";var WC=s.createContext(null);WC.displayName="RouteError";function Hne(e,{relative:t}={}){Tr(_u(),"useHref() may be used only in the context of a component.");let{basename:n,navigator:r}=s.useContext(Gi),{hash:a,pathname:o,search:c}=Uf(e,{relative:t}),u=o;return n!=="/"&&(u=o==="/"?n:Fo([n,o])),r.createHref({pathname:u,search:c,hash:a})}function _u(){return s.useContext(Kf)!=null}function ql(){return Tr(_u(),"useLocation() may be used only in the context of a component."),s.useContext(Kf).location}var JD="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function eP(e){s.useContext(Gi).static||s.useLayoutEffect(e)}function jg(){let{isDataRoute:e}=s.useContext(Xi);return e?tre():Bne()}function Bne(){Tr(_u(),"useNavigate() may be used only in the context of a component.");let e=s.useContext(Eu),{basename:t,navigator:n}=s.useContext(Gi),{matches:r}=s.useContext(Xi),{pathname:a}=ql(),o=JSON.stringify(KC(r)),c=s.useRef(!1);return eP(()=>{c.current=!0}),s.useCallback((f,d={})=>{if(Vi(c.current,JD),!c.current)return;if(typeof f=="number"){n.go(f);return}let h=UC(f,JSON.parse(o),a,d.relative==="path");e==null&&t!=="/"&&(h.pathname=h.pathname==="/"?t:Fo([t,h.pathname])),(d.replace?n.replace:n.push)(h,d.state,d)},[t,n,o,a,e])}var Fne=s.createContext(null);function Vne(e){let t=s.useContext(Xi).outlet;return s.useMemo(()=>t&&s.createElement(Fne.Provider,{value:e},t),[t,e])}function Uf(e,{relative:t}={}){let{matches:n}=s.useContext(Xi),{pathname:r}=ql(),a=JSON.stringify(KC(n));return s.useMemo(()=>UC(e,JSON.parse(a),r,t==="path"),[e,a,r,t])}function Kne(e,t){return tP(e,t)}function tP(e,t,n,r,a){Tr(_u(),"useRoutes() may be used only in the context of a component.");let{navigator:o}=s.useContext(Gi),{matches:c}=s.useContext(Xi),u=c[c.length-1],f=u?u.params:{},d=u?u.pathname:"/",h=u?u.pathnameBase:"/",v=u&&u.route;{let $=v&&v.path||"";nP(d,!v||$.endsWith("*")||$.endsWith("*?"),`You rendered descendant (or called \`useRoutes()\`) at "${d}" (under ) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render. + +<<<<<<<< HEAD:crate/server/ui/dist/assets/index-DXExgd0C.js +Please change the parent to .`)}let g=ql(),b;if(t){let $=typeof t=="string"?$u(t):t;Tr(h==="/"||$.pathname?.startsWith(h),`When overriding the location using \`\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${h}" but pathname "${$.pathname}" was given in the \`location\` prop.`),b=$}else b=g;let x=b.pathname||"/",C=x;if(h!=="/"){let $=h.replace(/^\//,"").split("/");C="/"+x.replace(/^\//,"").split("/").slice($.length).join("/")}let y=YD(e,{pathname:C});Vi(v||y!=null,`No routes matched location "${b.pathname}${b.search}${b.hash}" `),Vi(y==null||y[y.length-1].route.element!==void 0||y[y.length-1].route.Component!==void 0||y[y.length-1].route.lazy!==void 0,`Matched leaf route at location "${b.pathname}${b.search}${b.hash}" does not have an element or Component. This means it will render an with a null value by default resulting in an "empty" page.`);let w=Gne(y&&y.map($=>Object.assign({},$,{params:Object.assign({},f,$.params),pathname:Fo([h,o.encodeLocation?o.encodeLocation($.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:$.pathname]),pathnameBase:$.pathnameBase==="/"?h:Fo([h,o.encodeLocation?o.encodeLocation($.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:$.pathnameBase])})),c,n,r,a);return t&&w?s.createElement(Kf.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...b},navigationType:"POP"}},w):w}function Une(){let e=ere(),t=kne(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r="rgba(200,200,200, 0.5)",a={padding:"0.5rem",backgroundColor:r},o={padding:"2px 4px",backgroundColor:r},c=null;return console.error("Error handled by React Router default ErrorBoundary:",e),c=s.createElement(s.Fragment,null,s.createElement("p",null,"💿 Hey developer 👋"),s.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",s.createElement("code",{style:o},"ErrorBoundary")," or"," ",s.createElement("code",{style:o},"errorElement")," prop on your route.")),s.createElement(s.Fragment,null,s.createElement("h2",null,"Unexpected Application Error!"),s.createElement("h3",{style:{fontStyle:"italic"}},t),n?s.createElement("pre",{style:a},n):null,c)}var Wne=s.createElement(Une,null),qne=class extends s.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.unstable_onError?this.props.unstable_onError(e,t):console.error("React Router caught the following error during render",e)}render(){return this.state.error!==void 0?s.createElement(Xi.Provider,{value:this.props.routeContext},s.createElement(WC.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function Yne({routeContext:e,match:t,children:n}){let r=s.useContext(Eu);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),s.createElement(Xi.Provider,{value:e},n)}function Gne(e,t=[],n=null,r=null,a=null){if(e==null){if(!n)return null;if(n.errors)e=n.matches;else if(t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let o=e,c=n?.errors;if(c!=null){let d=o.findIndex(h=>h.route.id&&c?.[h.route.id]!==void 0);Tr(d>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(c).join(",")}`),o=o.slice(0,Math.min(o.length,d+1))}let u=!1,f=-1;if(n)for(let d=0;d=0?o=o.slice(0,f+1):o=[o[0]];break}}}return o.reduceRight((d,h,v)=>{let g,b=!1,x=null,C=null;n&&(g=c&&h.route.id?c[h.route.id]:void 0,x=h.route.errorElement||Wne,u&&(f<0&&v===0?(nP("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),b=!0,C=null):f===v&&(b=!0,C=h.route.hydrateFallbackElement||null)));let y=t.concat(o.slice(0,v+1)),w=()=>{let $;return g?$=x:b?$=C:h.route.Component?$=s.createElement(h.route.Component,null):h.route.element?$=h.route.element:$=d,s.createElement(Yne,{match:h,routeContext:{outlet:d,matches:y,isDataRoute:n!=null},children:$})};return n&&(h.route.ErrorBoundary||h.route.errorElement||v===0)?s.createElement(qne,{location:n.location,revalidation:n.revalidation,component:x,error:g,children:w(),routeContext:{outlet:null,matches:y,isDataRoute:!0},unstable_onError:r}):w()},null)}function qC(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Xne(e){let t=s.useContext(Eu);return Tr(t,qC(e)),t}function Qne(e){let t=s.useContext(Mg);return Tr(t,qC(e)),t}function Zne(e){let t=s.useContext(Xi);return Tr(t,qC(e)),t}function YC(e){let t=Zne(e),n=t.matches[t.matches.length-1];return Tr(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function Jne(){return YC("useRouteId")}function ere(){let e=s.useContext(WC),t=Qne("useRouteError"),n=YC("useRouteError");return e!==void 0?e:t.errors?.[n]}function tre(){let{router:e}=Xne("useNavigate"),t=YC("useNavigate"),n=s.useRef(!1);return eP(()=>{n.current=!0}),s.useCallback(async(a,o={})=>{Vi(n.current,JD),n.current&&(typeof a=="number"?e.navigate(a):await e.navigate(a,{fromRouteId:t,...o}))},[e,t])}var lR={};function nP(e,t,n){!t&&!lR[e]&&(lR[e]=!0,Vi(!1,n))}s.memo(nre);function nre({routes:e,future:t,state:n,unstable_onError:r}){return tP(e,void 0,n,r,t)}function rre({to:e,replace:t,state:n,relative:r}){Tr(_u()," may be used only in the context of a component.");let{static:a}=s.useContext(Gi);Vi(!a," must not be used on the initial render in a . This is a no-op, but you should modify your code so the is only ever rendered in response to some user interaction or state change.");let{matches:o}=s.useContext(Xi),{pathname:c}=ql(),u=jg(),f=UC(e,KC(o),c,r==="path"),d=JSON.stringify(f);return s.useEffect(()=>{u(JSON.parse(d),{replace:t,state:n,relative:r})},[u,d,r,t,n]),null}function are(e){return Vne(e.context)}function Ut(e){Tr(!1,"A is only ever to be used as the child of element, never rendered directly. Please wrap your in a .")}function ire({basename:e="/",children:t=null,location:n,navigationType:r="POP",navigator:a,static:o=!1}){Tr(!_u(),"You cannot render a inside another . You should never have more than one in your app.");let c=e.replace(/^\/*/,"/"),u=s.useMemo(()=>({basename:c,navigator:a,static:o,future:{}}),[c,a,o]);typeof n=="string"&&(n=$u(n));let{pathname:f="/",search:d="",hash:h="",state:v=null,key:g="default"}=n,b=s.useMemo(()=>{let x=Xo(f,c);return x==null?null:{location:{pathname:x,search:d,hash:h,state:v,key:g},navigationType:r}},[c,f,d,h,v,g,r]);return Vi(b!=null,` is not able to match the URL "${f}${d}${h}" because it does not start with the basename, so the won't render anything.`),b==null?null:s.createElement(Gi.Provider,{value:u},s.createElement(Kf.Provider,{children:t,value:b}))}function ore({children:e,location:t}){return Kne(Vx(e),t)}function Vx(e,t=[]){let n=[];return s.Children.forEach(e,(r,a)=>{if(!s.isValidElement(r))return;let o=[...t,a];if(r.type===s.Fragment){n.push.apply(n,Vx(r.props.children,o));return}Tr(r.type===Ut,`[${typeof r.type=="string"?r.type:r.type.name}] is not a component. All component children of must be a or `),Tr(!r.props.index||!r.props.children,"An index route cannot have child routes.");let c={id:r.props.id||o.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,middleware:r.props.middleware,loader:r.props.loader,action:r.props.action,hydrateFallbackElement:r.props.hydrateFallbackElement,HydrateFallback:r.props.HydrateFallback,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.hasErrorBoundary===!0||r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(c.children=Vx(r.props.children,o)),n.push(c)}),n}var rv="get",av="application/x-www-form-urlencoded";function Tg(e){return e!=null&&typeof e.tagName=="string"}function lre(e){return Tg(e)&&e.tagName.toLowerCase()==="button"}function sre(e){return Tg(e)&&e.tagName.toLowerCase()==="form"}function cre(e){return Tg(e)&&e.tagName.toLowerCase()==="input"}function ure(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function dre(e,t){return e.button===0&&(!t||t==="_self")&&!ure(e)}var Mh=null;function fre(){if(Mh===null)try{new FormData(document.createElement("form"),0),Mh=!1}catch{Mh=!0}return Mh}var mre=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function s0(e){return e!=null&&!mre.has(e)?(Vi(!1,`"${e}" is not a valid \`encType\` for \`

\`/\`\` and will default to "${av}"`),null):e}function hre(e,t){let n,r,a,o,c;if(sre(e)){let u=e.getAttribute("action");r=u?Xo(u,t):null,n=e.getAttribute("method")||rv,a=s0(e.getAttribute("enctype"))||av,o=new FormData(e)}else if(lre(e)||cre(e)&&(e.type==="submit"||e.type==="image")){let u=e.form;if(u==null)throw new Error('Cannot submit a