diff --git a/.circleci/config.yml b/.circleci/config.yml index a24ae1d8eb9..5f3ed20ac10 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -45,6 +45,8 @@ jobs: pip install "asyncio==3.4.3" pip install "apscheduler==3.10.4" pip install "PyGithub==1.59.1" + pip install argon2-cffi + pip install python-multipart - save_cache: paths: - ./venv @@ -88,6 +90,32 @@ jobs: - store_test_results: path: test-results + installing_litellm_on_python: + docker: + - image: circleci/python:3.8 + working_directory: ~/project + + steps: + - checkout + - run: + name: Install Dependencies + command: | + python -m pip install --upgrade pip + pip install python-dotenv + pip install pytest + pip install tiktoken + pip install aiohttp + pip install click + pip install jinja2 + pip install tokenizers + pip install openai + - run: + name: Run tests + command: | + pwd + ls + python -m pytest -vv litellm/tests/test_python_38.py + build_and_test: machine: image: ubuntu-2204:2023.10.1 @@ -130,6 +158,7 @@ jobs: pip install "langfuse>=2.0.0" pip install numpydoc pip install prisma + pip install fastapi pip install "httpx==0.24.1" pip install "gunicorn==21.2.0" pip install "anyio==3.7.1" @@ -275,6 +304,12 @@ workflows: only: - main - /litellm_.*/ + - installing_litellm_on_python: + filters: + branches: + only: + - main + - /litellm_.*/ - publish_to_pypi: requires: - local_testing diff --git a/.github/workflows/ghcr_deploy.yml b/.github/workflows/ghcr_deploy.yml index 5f6cacce487..fe7f096bf87 100644 --- a/.github/workflows/ghcr_deploy.yml +++ b/.github/workflows/ghcr_deploy.yml @@ -201,14 +201,40 @@ jobs: } catch (error) { core.setFailed(error.message); } - - name: Github Releases To Discord - uses: SethCohen/github-releases-to-discord@v1.13.1 + - name: Fetch Release Notes + id: release-notes + uses: actions/github-script@v6 with: - webhook_url: ${{ secrets.WEBHOOK_URL }} - color: "2105893" - username: "Release Changelog" - avatar_url: "https://cdn.discordapp.com/avatars/487431320314576937/bd64361e4ba6313d561d54e78c9e7171.png" - content: "||@everyone||" - footer_title: "Changelog" - footer_icon_url: "https://cdn.discordapp.com/avatars/487431320314576937/bd64361e4ba6313d561d54e78c9e7171.png" - footer_timestamp: true + github-token: "${{ secrets.GITHUB_TOKEN }}" + script: | + try { + const response = await github.rest.repos.getRelease({ + owner: context.repo.owner, + repo: context.repo.repo, + release_id: process.env.RELEASE_ID, + }); + return response.data.body; + } catch (error) { + core.setFailed(error.message); + } + env: + RELEASE_ID: ${{ env.RELEASE_ID }} + - name: Github Releases To Discord + env: + WEBHOOK_URL: ${{ secrets.WEBHOOK_URL }} + REALEASE_TAG: ${{ env.RELEASE_TAG }} + RELEASE_NOTES: ${{ steps.release-notes.outputs.result }} + run: | + curl -H "Content-Type: application/json" -X POST -d '{ + "content": "||@everyone||", + "username": "Release Changelog", + "avatar_url": "https://cdn.discordapp.com/avatars/487431320314576937/bd64361e4ba6313d561d54e78c9e7171.png", + "embeds": [ + { + "title": "Changelog for ${RELEASE_TAG}", + "description": "${RELEASE_NOTES}", + "color": 2105893 + } + ] + }' $WEBHOOK_URL + diff --git a/.gitignore b/.gitignore index de1c7598f60..b03bc895bf9 100644 --- a/.gitignore +++ b/.gitignore @@ -44,3 +44,4 @@ deploy/charts/litellm/*.tgz deploy/charts/litellm/charts/* deploy/charts/*.tgz litellm/proxy/vertex_key.json +**/.vim/ diff --git a/Dockerfile b/Dockerfile index bcb4ee69255..24c11c51363 100644 --- a/Dockerfile +++ b/Dockerfile @@ -61,4 +61,7 @@ RUN chmod +x entrypoint.sh EXPOSE 4000/tcp ENTRYPOINT ["litellm"] -CMD ["--port", "4000", "--config", "./proxy_server_config.yaml", "--detailed_debug", "--run_gunicorn"] \ No newline at end of file + +# Append "--detailed_debug" to the end of CMD to view detailed debug logs +# CMD ["--port", "4000", "--config", "./proxy_server_config.yaml", "--run_gunicorn", "--detailed_debug"] +CMD ["--port", "4000", "--config", "./proxy_server_config.yaml", "--run_gunicorn"] \ No newline at end of file diff --git a/Dockerfile.database b/Dockerfile.database index 1206aba882b..9e2d1637b02 100644 --- a/Dockerfile.database +++ b/Dockerfile.database @@ -65,4 +65,7 @@ EXPOSE 4000/tcp # # Set your entrypoint and command ENTRYPOINT ["litellm"] + +# Append "--detailed_debug" to the end of CMD to view detailed debug logs +# CMD ["--port", "4000","--run_gunicorn", "--detailed_debug"] CMD ["--port", "4000", "--run_gunicorn"] diff --git a/README.md b/README.md index f26f382da37..d32372b6c56 100644 --- a/README.md +++ b/README.md @@ -68,6 +68,8 @@ response = completion(model="command-nightly", messages=messages) print(response) ``` +Call any model supported by a provider, with `model=/`. There might be provider-specific details here, so refer to [provider docs for more information](https://docs.litellm.ai/docs/providers) + ## Async ([Docs](https://docs.litellm.ai/docs/completion/stream#async-completion)) ```python @@ -100,7 +102,7 @@ for part in response: ``` ## Logging Observability ([Docs](https://docs.litellm.ai/docs/observability/callbacks)) -LiteLLM exposes pre defined callbacks to send data to Langfuse, DynamoDB, s3 Buckets, LLMonitor, Helicone, Promptlayer, Traceloop, Slack +LiteLLM exposes pre defined callbacks to send data to Langfuse, DynamoDB, s3 Buckets, LLMonitor, Helicone, Promptlayer, Traceloop, Athina, Slack ```python from litellm import completion @@ -108,11 +110,12 @@ from litellm import completion os.environ["LANGFUSE_PUBLIC_KEY"] = "" os.environ["LANGFUSE_SECRET_KEY"] = "" os.environ["LLMONITOR_APP_ID"] = "your-llmonitor-app-id" +os.environ["ATHINA_API_KEY"] = "your-athina-api-key" os.environ["OPENAI_API_KEY"] # set callbacks -litellm.success_callback = ["langfuse", "llmonitor"] # log input/output to langfuse, llmonitor, supabase +litellm.success_callback = ["langfuse", "llmonitor", "athina"] # log input/output to langfuse, llmonitor, supabase, athina etc #openai call response = completion(model="gpt-3.5-turbo", messages=[{"role": "user", "content": "Hi 👋 - i'm openai"}]) @@ -120,7 +123,7 @@ response = completion(model="gpt-3.5-turbo", messages=[{"role": "user", "content # OpenAI Proxy - ([Docs](https://docs.litellm.ai/docs/simple_proxy)) -Track spend across multiple projects/people +Set Budgets & Rate limits across multiple projects The proxy provides: 1. [Hooks for auth](https://docs.litellm.ai/docs/proxy/virtual_keys#custom-auth) @@ -140,13 +143,13 @@ pip install 'litellm[proxy]' ```shell $ litellm --model huggingface/bigcode/starcoder -#INFO: Proxy running on http://0.0.0.0:8000 +#INFO: Proxy running on http://0.0.0.0:4000 ``` ### Step 2: Make ChatCompletions Request to Proxy ```python import openai # openai v1.0.0+ -client = openai.OpenAI(api_key="anything",base_url="http://0.0.0.0:8000") # set proxy to base_url +client = openai.OpenAI(api_key="anything",base_url="http://0.0.0.0:4000") # set proxy to base_url # request sent to model set on litellm proxy, `litellm --model` response = client.chat.completions.create(model="gpt-3.5-turbo", messages = [ { @@ -162,12 +165,12 @@ print(response) UI on `/ui` on your proxy server ![ui_3](https://github.com/BerriAI/litellm/assets/29436595/47c97d5e-b9be-4839-b28c-43d7f4f10033) -Track Spend, Set budgets and create virtual keys for the proxy +Set budgets and rate limits across multiple projects `POST /key/generate` ### Request ```shell -curl 'http://0.0.0.0:8000/key/generate' \ +curl 'http://0.0.0.0:4000/key/generate' \ --header 'Authorization: Bearer sk-1234' \ --header 'Content-Type: application/json' \ --data-raw '{"models": ["gpt-3.5-turbo", "gpt-4", "claude-2"], "duration": "20m","metadata": {"user": "ishaan@berri.ai", "team": "core-infra"}}' @@ -208,6 +211,7 @@ curl 'http://0.0.0.0:8000/key/generate' \ | [ollama](https://docs.litellm.ai/docs/providers/ollama) | ✅ | ✅ | ✅ | ✅ | | [deepinfra](https://docs.litellm.ai/docs/providers/deepinfra) | ✅ | ✅ | ✅ | ✅ | | [perplexity-ai](https://docs.litellm.ai/docs/providers/perplexity) | ✅ | ✅ | ✅ | ✅ | +| [Groq AI](https://docs.litellm.ai/docs/providers/groq) | ✅ | ✅ | ✅ | ✅ | | [anyscale](https://docs.litellm.ai/docs/providers/anyscale) | ✅ | ✅ | ✅ | ✅ | | [voyage ai](https://docs.litellm.ai/docs/providers/voyage) | | | | | ✅ | | [xinference [Xorbits Inference]](https://docs.litellm.ai/docs/providers/xinference) | | | | | ✅ | @@ -241,6 +245,19 @@ Step 4: Submit a PR with your changes! 🚀 - push your fork to your GitHub repo - submit a PR from there +# Enterprise +For companies that need better security, user management and professional support + +[Talk to founders](https://calendly.com/d/4mp-gd3-k5k/litellm-1-1-onboarding-chat) + +This covers: +- ✅ **Features under the [LiteLLM Commercial License](https://docs.litellm.ai/docs/proxy/enterprise):** +- ✅ **Feature Prioritization** +- ✅ **Custom Integrations** +- ✅ **Professional Support - Dedicated discord + slack** +- ✅ **Custom SLAs** +- ✅ **Secure access with Single Sign-On** + # Support / talk with founders - [Schedule Demo 👋](https://calendly.com/d/4mp-gd3-k5k/berriai-1-1-onboarding-litellm-hosted-version) - [Community Discord 💭](https://discord.gg/wuPM9dRgDw) diff --git a/cookbook/litellm_router_load_test/memory_usage/router_endpoint.py b/cookbook/litellm_router_load_test/memory_usage/router_endpoint.py new file mode 100644 index 00000000000..78704e3a7d1 --- /dev/null +++ b/cookbook/litellm_router_load_test/memory_usage/router_endpoint.py @@ -0,0 +1,70 @@ +from fastapi import FastAPI +import uvicorn +from memory_profiler import profile, memory_usage +import os +import traceback +import asyncio +import pytest +import litellm +from litellm import Router +from concurrent.futures import ThreadPoolExecutor +from collections import defaultdict +from dotenv import load_dotenv +import uuid + +load_dotenv() + +model_list = [ + { + "model_name": "gpt-3.5-turbo", + "litellm_params": { + "model": "azure/chatgpt-v-2", + "api_key": os.getenv("AZURE_API_KEY"), + "api_version": os.getenv("AZURE_API_VERSION"), + "api_base": os.getenv("AZURE_API_BASE"), + }, + "tpm": 240000, + "rpm": 1800, + }, + { + "model_name": "text-embedding-ada-002", + "litellm_params": { + "model": "azure/azure-embedding-model", + "api_key": os.getenv("AZURE_API_KEY"), + "api_base": os.getenv("AZURE_API_BASE"), + }, + "tpm": 100000, + "rpm": 10000, + }, +] + +litellm.set_verbose = True +litellm.cache = litellm.Cache( + type="s3", s3_bucket_name="litellm-my-test-bucket-2", s3_region_name="us-east-1" +) +router = Router(model_list=model_list, set_verbose=True) + +app = FastAPI() + + +@app.get("/") +async def read_root(): + return {"message": "Welcome to the FastAPI endpoint!"} + + +@profile +@app.post("/router_acompletion") +async def router_acompletion(): + question = f"This is a test: {uuid.uuid4()}" * 100 + resp = await router.aembedding(model="text-embedding-ada-002", input=question) + print("embedding-resp", resp) + + response = await router.acompletion( + model="gpt-3.5-turbo", messages=[{"role": "user", "content": question}] + ) + print("completion-resp", response) + return response + + +if __name__ == "__main__": + uvicorn.run(app, host="0.0.0.0", port=8000) diff --git a/cookbook/litellm_router_load_test/memory_usage/router_memory_usage copy.py b/cookbook/litellm_router_load_test/memory_usage/router_memory_usage copy.py new file mode 100644 index 00000000000..f6d549e72f7 --- /dev/null +++ b/cookbook/litellm_router_load_test/memory_usage/router_memory_usage copy.py @@ -0,0 +1,92 @@ +#### What this tests #### + +from memory_profiler import profile, memory_usage +import sys, os, time +import traceback, asyncio +import pytest + +sys.path.insert( + 0, os.path.abspath("../..") +) # Adds the parent directory to the system path +import litellm +from litellm import Router +from concurrent.futures import ThreadPoolExecutor +from collections import defaultdict +from dotenv import load_dotenv +import uuid + +load_dotenv() + + +model_list = [ + { + "model_name": "gpt-3.5-turbo", # openai model name + "litellm_params": { # params for litellm completion/embedding call + "model": "azure/chatgpt-v-2", + "api_key": os.getenv("AZURE_API_KEY"), + "api_version": os.getenv("AZURE_API_VERSION"), + "api_base": os.getenv("AZURE_API_BASE"), + }, + "tpm": 240000, + "rpm": 1800, + }, + { + "model_name": "text-embedding-ada-002", + "litellm_params": { + "model": "azure/azure-embedding-model", + "api_key": os.environ["AZURE_API_KEY"], + "api_base": os.environ["AZURE_API_BASE"], + }, + "tpm": 100000, + "rpm": 10000, + }, +] +litellm.set_verbose = True +litellm.cache = litellm.Cache( + type="s3", s3_bucket_name="litellm-my-test-bucket-2", s3_region_name="us-east-1" +) +router = Router( + model_list=model_list, + set_verbose=True, +) # type: ignore + + +@profile +async def router_acompletion(): + # embedding call + question = f"This is a test: {uuid.uuid4()}" * 100 + resp = await router.aembedding(model="text-embedding-ada-002", input=question) + print("embedding-resp", resp) + + response = await router.acompletion( + model="gpt-3.5-turbo", messages=[{"role": "user", "content": question}] + ) + print("completion-resp", response) + return response + + +async def main(): + for i in range(1): + start = time.time() + n = 50 # Number of concurrent tasks + tasks = [router_acompletion() for _ in range(n)] + + chat_completions = await asyncio.gather(*tasks) + + successful_completions = [c for c in chat_completions if c is not None] + + # Write errors to error_log.txt + with open("error_log.txt", "a") as error_log: + for completion in chat_completions: + if isinstance(completion, str): + error_log.write(completion + "\n") + + print(n, time.time() - start, len(successful_completions)) + time.sleep(10) + + +if __name__ == "__main__": + # Blank out contents of error_log.txt + open("error_log.txt", "w").close() + + asyncio.run(main()) diff --git a/cookbook/litellm_router_load_test/memory_usage/router_memory_usage.py b/cookbook/litellm_router_load_test/memory_usage/router_memory_usage.py new file mode 100644 index 00000000000..f6d549e72f7 --- /dev/null +++ b/cookbook/litellm_router_load_test/memory_usage/router_memory_usage.py @@ -0,0 +1,92 @@ +#### What this tests #### + +from memory_profiler import profile, memory_usage +import sys, os, time +import traceback, asyncio +import pytest + +sys.path.insert( + 0, os.path.abspath("../..") +) # Adds the parent directory to the system path +import litellm +from litellm import Router +from concurrent.futures import ThreadPoolExecutor +from collections import defaultdict +from dotenv import load_dotenv +import uuid + +load_dotenv() + + +model_list = [ + { + "model_name": "gpt-3.5-turbo", # openai model name + "litellm_params": { # params for litellm completion/embedding call + "model": "azure/chatgpt-v-2", + "api_key": os.getenv("AZURE_API_KEY"), + "api_version": os.getenv("AZURE_API_VERSION"), + "api_base": os.getenv("AZURE_API_BASE"), + }, + "tpm": 240000, + "rpm": 1800, + }, + { + "model_name": "text-embedding-ada-002", + "litellm_params": { + "model": "azure/azure-embedding-model", + "api_key": os.environ["AZURE_API_KEY"], + "api_base": os.environ["AZURE_API_BASE"], + }, + "tpm": 100000, + "rpm": 10000, + }, +] +litellm.set_verbose = True +litellm.cache = litellm.Cache( + type="s3", s3_bucket_name="litellm-my-test-bucket-2", s3_region_name="us-east-1" +) +router = Router( + model_list=model_list, + set_verbose=True, +) # type: ignore + + +@profile +async def router_acompletion(): + # embedding call + question = f"This is a test: {uuid.uuid4()}" * 100 + resp = await router.aembedding(model="text-embedding-ada-002", input=question) + print("embedding-resp", resp) + + response = await router.acompletion( + model="gpt-3.5-turbo", messages=[{"role": "user", "content": question}] + ) + print("completion-resp", response) + return response + + +async def main(): + for i in range(1): + start = time.time() + n = 50 # Number of concurrent tasks + tasks = [router_acompletion() for _ in range(n)] + + chat_completions = await asyncio.gather(*tasks) + + successful_completions = [c for c in chat_completions if c is not None] + + # Write errors to error_log.txt + with open("error_log.txt", "a") as error_log: + for completion in chat_completions: + if isinstance(completion, str): + error_log.write(completion + "\n") + + print(n, time.time() - start, len(successful_completions)) + time.sleep(10) + + +if __name__ == "__main__": + # Blank out contents of error_log.txt + open("error_log.txt", "w").close() + + asyncio.run(main()) diff --git a/cookbook/litellm_router_load_test/memory_usage/send_request.py b/cookbook/litellm_router_load_test/memory_usage/send_request.py new file mode 100644 index 00000000000..6a3473e230f --- /dev/null +++ b/cookbook/litellm_router_load_test/memory_usage/send_request.py @@ -0,0 +1,28 @@ +import requests +from concurrent.futures import ThreadPoolExecutor + +# Replace the URL with your actual endpoint +url = "http://localhost:8000/router_acompletion" + + +def make_request(session): + headers = {"Content-Type": "application/json"} + data = {} # Replace with your JSON payload if needed + + response = session.post(url, headers=headers, json=data) + print(f"Status code: {response.status_code}") + + +# Number of concurrent requests +num_requests = 20 + +# Create a session to reuse the underlying TCP connection +with requests.Session() as session: + # Use ThreadPoolExecutor for concurrent requests + with ThreadPoolExecutor(max_workers=num_requests) as executor: + # Use list comprehension to submit tasks + futures = [executor.submit(make_request, session) for _ in range(num_requests)] + + # Wait for all futures to complete + for future in futures: + future.result() diff --git a/cookbook/misc/clickhouse.py b/cookbook/misc/clickhouse.py new file mode 100644 index 00000000000..b40a9346bfa --- /dev/null +++ b/cookbook/misc/clickhouse.py @@ -0,0 +1,72 @@ +import clickhouse_connect +import datetime as datetime +import os + +client = clickhouse_connect.get_client( + host=os.getenv("CLICKHOUSE_HOST"), + port=int(os.getenv("CLICKHOUSE_PORT")), + username=os.getenv("CLICKHOUSE_USERNAME"), + password=os.getenv("CLICKHOUSE_PASSWORD"), +) +import clickhouse_connect + +row1 = [ + "ishaan", # request_id + "GET", # call_type + "api_key_123", # api_key + 50.00, # spend + 1000, # total_tokens + 800, # prompt_tokens + 200, # completion_tokens + datetime.datetime.now(), # startTime (replace with the actual timestamp) + datetime.datetime.now(), # endTime (replace with the actual timestamp) + "gpt-3.5", # model + "user123", # user + '{"key": "value"}', # metadata (replace with valid JSON) + "True", # cache_hit + "cache_key_123", # cache_key + "tag1,tag2", # request_tags +] + +row2 = [ + "jaffer", # request_id + "POST", # call_type + "api_key_456", # api_key + 30.50, # spend + 800, # total_tokens + 600, # prompt_tokens + 200, # completion_tokens + datetime.datetime.now(), # startTime (replace with the actual timestamp) + datetime.datetime.now(), # endTime (replace with the actual timestamp) + "gpt-4.0", # model + "user456", # user + '{"key": "value"}', # metadata (replace with valid JSON) + "False", # cache_hit + "cache_key_789", # cache_key + "tag3,tag4", # request_tags +] + +data = [row1, row2] +resp = client.insert( + "spend_logs", + data, + column_names=[ + "request_id", + "call_type", + "api_key", + "spend", + "total_tokens", + "prompt_tokens", + "completion_tokens", + "startTime", + "endTime", + "model", + "user", + "metadata", + "cache_hit", + "cache_key", + "request_tags", + ], +) + +print(resp) diff --git a/cookbook/misc/clickhouse_insert_logs.py b/cookbook/misc/clickhouse_insert_logs.py new file mode 100644 index 00000000000..cd1615c9380 --- /dev/null +++ b/cookbook/misc/clickhouse_insert_logs.py @@ -0,0 +1,39 @@ +# insert data into clickhouse +# response = client.command( +# """ +# CREATE TEMPORARY TABLE temp_spend_logs AS ( +# SELECT +# generateUUIDv4() AS request_id, +# arrayElement(['TypeA', 'TypeB', 'TypeC'], rand() % 3 + 1) AS call_type, +# 'ishaan' as api_key, +# rand() * 1000 AS spend, +# rand() * 100 AS total_tokens, +# rand() * 50 AS prompt_tokens, +# rand() * 50 AS completion_tokens, +# toDate('2024-02-01') + toIntervalDay(rand()%27) AS startTime, +# now() AS endTime, +# arrayElement(['azure/gpt-4', 'gpt-3.5', 'vertexai/gemini-pro', 'mistral/mistral-small', 'ollama/llama2'], rand() % 3 + 1) AS model, +# 'ishaan-insert-rand' as user, +# 'data' as metadata, +# 'true'AS cache_hit, +# 'ishaan' as cache_key, +# '{"tag1": "value1", "tag2": "value2"}' AS request_tags +# FROM numbers(1, 1000000) +# ); +# """ +# ) + +# client.command( +# """ +# -- Insert data into spend_logs table +# INSERT INTO spend_logs +# SELECT * FROM temp_spend_logs; +# """ +# ) + + +# client.command( +# """ +# DROP TABLE IF EXISTS temp_spend_logs; +# """ +# ) diff --git a/cookbook/proxy-server/readme.md b/cookbook/proxy-server/readme.md index df74355d468..4b296831bc2 100644 --- a/cookbook/proxy-server/readme.md +++ b/cookbook/proxy-server/readme.md @@ -33,7 +33,7 @@ - Call all models using the OpenAI format - `completion(model, messages)` - Text responses will always be available at `['choices'][0]['message']['content']` - **Error Handling** Using Model Fallbacks (if `GPT-4` fails, try `llama2`) -- **Logging** - Log Requests, Responses and Errors to `Supabase`, `Posthog`, `Mixpanel`, `Sentry`, `LLMonitor,` `Helicone` (Any of the supported providers here: https://litellm.readthedocs.io/en/latest/advanced/ +- **Logging** - Log Requests, Responses and Errors to `Supabase`, `Posthog`, `Mixpanel`, `Sentry`, `LLMonitor`,`Athina`, `Helicone` (Any of the supported providers here: https://litellm.readthedocs.io/en/latest/advanced/ **Example: Logs sent to Supabase** Screenshot 2023-08-11 at 4 02 46 PM diff --git a/deploy/charts/litellm/Chart.lock b/deploy/charts/litellm/Chart.lock index 7b6ed69d9ad..f13578d8d35 100644 --- a/deploy/charts/litellm/Chart.lock +++ b/deploy/charts/litellm/Chart.lock @@ -1,6 +1,9 @@ dependencies: - name: postgresql repository: oci://registry-1.docker.io/bitnamicharts - version: 13.3.1 -digest: sha256:f5c129150f0d38dd06752ab37f3c8e143d7c14d30379af058767bcd9f4ba83dd -generated: "2024-01-19T11:32:56.694808861+11:00" + version: 14.3.1 +- name: redis + repository: oci://registry-1.docker.io/bitnamicharts + version: 18.19.1 +digest: sha256:8660fe6287f9941d08c0902f3f13731079b8cecd2a5da2fbc54e5b7aae4a6f62 +generated: "2024-03-10T02:28:52.275022+05:30" diff --git a/deploy/charts/litellm/Chart.yaml b/deploy/charts/litellm/Chart.yaml index 6ecdebb506a..cc08a9921e4 100644 --- a/deploy/charts/litellm/Chart.yaml +++ b/deploy/charts/litellm/Chart.yaml @@ -31,3 +31,7 @@ dependencies: version: ">=13.3.0" repository: oci://registry-1.docker.io/bitnamicharts condition: db.deployStandalone + - name: redis + version: ">=18.0.0" + repository: oci://registry-1.docker.io/bitnamicharts + condition: redis.enabled diff --git a/deploy/charts/litellm/README.md b/deploy/charts/litellm/README.md index daba8aa6893..817781ed04e 100644 --- a/deploy/charts/litellm/README.md +++ b/deploy/charts/litellm/README.md @@ -28,7 +28,7 @@ If `db.useStackgresOperator` is used (not yet implemented): | `imagePullSecrets` | Registry credentials for the LiteLLM and initContainer images. | `[]` | | `serviceAccount.create` | Whether or not to create a Kubernetes Service Account for this deployment. The default is `false` because LiteLLM has no need to access the Kubernetes API. | `false` | | `service.type` | Kubernetes Service type (e.g. `LoadBalancer`, `ClusterIP`, etc.) | `ClusterIP` | -| `service.port` | TCP port that the Kubernetes Service will listen on. Also the TCP port within the Pod that the proxy will listen on. | `8000` | +| `service.port` | TCP port that the Kubernetes Service will listen on. Also the TCP port within the Pod that the proxy will listen on. | `4000` | | `ingress.*` | See [values.yaml](./values.yaml) for example settings | N/A | | `proxy_config.*` | See [values.yaml](./values.yaml) for default settings. See [example_config_yaml](../../../litellm/proxy/example_config_yaml/) for configuration examples. | N/A | @@ -76,7 +76,7 @@ When browsing to the URL published per the settings in `ingress.*`, you will be prompted for **Admin Configuration**. The **Proxy Endpoint** is the internal (from the `litellm` pod's perspective) URL published by the `-litellm` Kubernetes Service. If the deployment uses the default settings for this -service, the **Proxy Endpoint** should be set to `http://-litellm:8000`. +service, the **Proxy Endpoint** should be set to `http://-litellm:4000`. The **Proxy Key** is the value specified for `masterkey` or, if a `masterkey` was not provided to the helm command line, the `masterkey` is a randomly diff --git a/deploy/charts/litellm/templates/_helpers.tpl b/deploy/charts/litellm/templates/_helpers.tpl index b8893d07c16..a1eda28c679 100644 --- a/deploy/charts/litellm/templates/_helpers.tpl +++ b/deploy/charts/litellm/templates/_helpers.tpl @@ -60,3 +60,25 @@ Create the name of the service account to use {{- default "default" .Values.serviceAccount.name }} {{- end }} {{- end }} + +{{/* +Get redis service name +*/}} +{{- define "litellm.redis.serviceName" -}} +{{- if and (eq .Values.redis.architecture "standalone") .Values.redis.sentinel.enabled -}} +{{- printf "%s-%s" .Release.Name (default "redis" .Values.redis.nameOverride | trunc 63 | trimSuffix "-") -}} +{{- else -}} +{{- printf "%s-%s-master" .Release.Name (default "redis" .Values.redis.nameOverride | trunc 63 | trimSuffix "-") -}} +{{- end -}} +{{- end -}} + +{{/* +Get redis service port +*/}} +{{- define "litellm.redis.port" -}} +{{- if .Values.redis.sentinel.enabled -}} +{{ .Values.redis.sentinel.service.ports.sentinel }} +{{- else -}} +{{ .Values.redis.master.service.ports.redis }} +{{- end -}} +{{- end -}} diff --git a/deploy/charts/litellm/templates/deployment.yaml b/deploy/charts/litellm/templates/deployment.yaml index e1f722a92c2..07e617581ed 100644 --- a/deploy/charts/litellm/templates/deployment.yaml +++ b/deploy/charts/litellm/templates/deployment.yaml @@ -142,6 +142,17 @@ spec: secretKeyRef: name: {{ include "litellm.fullname" . }}-masterkey key: masterkey + {{- if .Values.redis.enabled }} + - name: REDIS_HOST + value: {{ include "litellm.redis.serviceName" . }} + - name: REDIS_PORT + value: {{ include "litellm.redis.port" . | quote }} + - name: REDIS_PASSWORD + valueFrom: + secretKeyRef: + name: {{ include "redis.secretName" .Subcharts.redis }} + key: {{include "redis.secretPasswordKey" .Subcharts.redis }} + {{- end }} envFrom: {{- range .Values.environmentSecrets }} - secretRef: diff --git a/deploy/charts/litellm/values.yaml b/deploy/charts/litellm/values.yaml index 1b83fe801a4..cc53fc59c9e 100644 --- a/deploy/charts/litellm/values.yaml +++ b/deploy/charts/litellm/values.yaml @@ -55,7 +55,7 @@ environmentSecrets: [] service: type: ClusterIP - port: 8000 + port: 4000 ingress: enabled: false @@ -87,6 +87,8 @@ proxy_config: api_key: eXaMpLeOnLy general_settings: master_key: os.environ/PROXY_MASTER_KEY +# litellm_settings: +# cache: true resources: {} # We usually recommend not to specify default resources and to leave this as a conscious @@ -166,3 +168,10 @@ postgresql: # existingSecret: "" # secretKeys: # userPasswordKey: password + +# requires cache: true in config file +# either enable this or pass a secret for REDIS_HOST, REDIS_PORT, REDIS_PASSWORD or REDIS_URL +# with cache: true to use existing redis instance +redis: + enabled: false + architecture: standalone diff --git a/docker-compose.yml b/docker-compose.yml index 8146777359f..ac9f5adc7d9 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -8,6 +8,3 @@ services: - "4000:4000" environment: - AZURE_API_KEY=sk-123 - - - diff --git a/docs/my-website/docs/audio_transcription.md b/docs/my-website/docs/audio_transcription.md new file mode 100644 index 00000000000..09fa1a1b96c --- /dev/null +++ b/docs/my-website/docs/audio_transcription.md @@ -0,0 +1,85 @@ +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +# Audio Transcription + +Use this to loadbalance across Azure + OpenAI. + +## Quick Start + +```python +from litellm import transcription +import os + +# set api keys +os.environ["OPENAI_API_KEY"] = "" +audio_file = open("/path/to/audio.mp3", "rb") + +response = transcription(model="whisper", file=audio_file) + +print(f"response: {response}") +``` + +## Proxy Usage + +### Add model to config + + + + + +```yaml +model_list: +- model_name: whisper + litellm_params: + model: whisper-1 + api_key: os.environ/OPENAI_API_KEY + model_info: + mode: audio_transcription + +general_settings: + master_key: sk-1234 +``` + + + +```yaml +model_list: +- model_name: whisper + litellm_params: + model: whisper-1 + api_key: os.environ/OPENAI_API_KEY + model_info: + mode: audio_transcription +- model_name: whisper + litellm_params: + model: azure/azure-whisper + api_version: 2024-02-15-preview + api_base: os.environ/AZURE_EUROPE_API_BASE + api_key: os.environ/AZURE_EUROPE_API_KEY + model_info: + mode: audio_transcription + +general_settings: + master_key: sk-1234 +``` + + + + +### Start proxy + +```bash +litellm --config /path/to/config.yaml + +# RUNNING on http://0.0.0.0:8000 +``` + +### Test + +```bash +curl --location 'http://0.0.0.0:4000/v1/audio/transcriptions' \ +--header 'Authorization: Bearer sk-1234' \ +--form 'file=@"/Users/krrishdholakia/Downloads/gettysburg.wav"' \ +--form 'model="whisper"' +``` diff --git a/docs/my-website/docs/caching/redis_cache.md b/docs/my-website/docs/caching/redis_cache.md index b54ad2d0c11..b00a118c124 100644 --- a/docs/my-website/docs/caching/redis_cache.md +++ b/docs/my-website/docs/caching/redis_cache.md @@ -248,6 +248,27 @@ cache.get_cache_key = custom_get_cache_key # set get_cache_key function for your litellm.cache = cache # set litellm.cache to your cache +``` +## How to write custom add/get cache functions +### 1. Init Cache +```python +from litellm.caching import Cache +cache = Cache() +``` + +### 2. Define custom add/get cache functions +```python +def add_cache(self, result, *args, **kwargs): + your logic + +def get_cache(self, *args, **kwargs): + your logic +``` + +### 3. Point cache add/get functions to your add/get functions +```python +cache.add_cache = add_cache +cache.get_cache = get_cache ``` ## Cache Initialization Parameters diff --git a/docs/my-website/docs/completion/function_call.md b/docs/my-website/docs/completion/function_call.md index 8004a55d12b..5daccf72321 100644 --- a/docs/my-website/docs/completion/function_call.md +++ b/docs/my-website/docs/completion/function_call.md @@ -1,18 +1,25 @@ # Function Calling -Function calling is supported with the following models on OpenAI, Azure OpenAI -- gpt-4 -- gpt-4-1106-preview -- gpt-4-0613 -- gpt-3.5-turbo -- gpt-3.5-turbo-1106 -- gpt-3.5-turbo-0613 -- Non OpenAI LLMs (litellm adds the function call to the prompt for these llms) +## Checking if a model supports function calling -In addition, parallel function calls is supported on the following models: -- gpt-4-1106-preview -- gpt-3.5-turbo-1106 +Use `litellm.supports_function_calling(model="")` -> returns `True` if model supports Function calling, `False` if not +```python +assert litellm.supports_function_calling(model="gpt-3.5-turbo") == True +assert litellm.supports_function_calling(model="azure/gpt-4-1106-preview") == True +assert litellm.supports_function_calling(model="palm/chat-bison") == False +assert litellm.supports_function_calling(model="ollama/llama2") == False +``` + + +## Checking if a model supports parallel function calling + +Use `litellm.supports_parallel_function_calling(model="")` -> returns `True` if model supports parallel function calling, `False` if not + +```python +assert litellm.supports_parallel_function_calling(model="gpt-4-turbo-preview") == True +assert litellm.supports_parallel_function_calling(model="gpt-4") == False +``` ## Parallel Function calling Parallel function calling is the model's ability to perform multiple function calls together, allowing the effects and results of these function calls to be resolved in parallel diff --git a/docs/my-website/docs/completion/input.md b/docs/my-website/docs/completion/input.md index 676e4d23265..fd55946108a 100644 --- a/docs/my-website/docs/completion/input.md +++ b/docs/my-website/docs/completion/input.md @@ -24,15 +24,26 @@ print(response) ``` ### Translated OpenAI params + +Use this function to get an up-to-date list of supported openai params for any model + provider. + +```python +from litellm import get_supported_openai_params + +response = get_supported_openai_params(model="anthropic.claude-3", custom_llm_provider="bedrock") + +print(response) # ["max_tokens", "tools", "tool_choice", "stream"] +``` + This is a list of openai params we translate across providers. This list is constantly being updated. -| Provider | temperature | max_tokens | top_p | stream | stop | n | presence_penalty | frequency_penalty | functions | function_call | logit_bias | user | response_format | seed | tools | tool_choice | logprobs | top_logprobs | -|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---| +| Provider | temperature | max_tokens | top_p | stream | stop | n | presence_penalty | frequency_penalty | functions | function_call | logit_bias | user | response_format | seed | tools | tool_choice | logprobs | top_logprobs | extra_headers | +|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|--| |Anthropic| ✅ | ✅ | ✅ | ✅ | ✅ | | | | | | -|OpenAI| ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |✅ | ✅ | ✅ | ✅ |✅ | ✅ | ✅ | ✅ | -|Azure OpenAI| ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |✅ | ✅ | ✅ | ✅ |✅ | ✅ | | | +|OpenAI| ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |✅ | ✅ | ✅ | ✅ |✅ | ✅ | ✅ | ✅ | ✅ | +|Azure OpenAI| ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |✅ | ✅ | ✅ | ✅ |✅ | ✅ | | | ✅ | |Replicate | ✅ | ✅ | ✅ | ✅ | ✅ | | | | | | |Anyscale | ✅ | ✅ | ✅ | ✅ | |Cohere| ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | | | @@ -42,7 +53,7 @@ This list is constantly being updated. |VertexAI| ✅ | ✅ | | ✅ | | | | | | | |Bedrock| ✅ | ✅ | ✅ | ✅ | ✅ | | | | | | |Sagemaker| ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | | | | | -|TogetherAI| ✅ | ✅ | ✅ | ✅ | ✅ | | | | | | +|TogetherAI| ✅ | ✅ | ✅ | ✅ | ✅ | | | | | | ✅ | |AlephAlpha| ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | | | | | |Palm| ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | | | | | |NLP Cloud| ✅ | ✅ | ✅ | ✅ | ✅ | | | | | | diff --git a/docs/my-website/docs/contributing.md b/docs/my-website/docs/contributing.md new file mode 100644 index 00000000000..da5783d9c04 --- /dev/null +++ b/docs/my-website/docs/contributing.md @@ -0,0 +1,43 @@ +# Contributing - UI + +Here's how to run the LiteLLM UI locally for making changes: + +## 1. Clone the repo +```bash +git clone https://github.com/BerriAI/litellm.git +``` + +## 2. Start the UI + Proxy + +**2.1 Start the proxy on port 4000** + +Tell the proxy where the UI is located +```bash +export PROXY_BASE_URL="http://localhost:3000/" +``` + +```bash +cd litellm/litellm/proxy +python3 proxy_cli.py --config /path/to/config.yaml --port 4000 +``` + +**2.2 Start the UI** + +Set the mode as development (this will assume the proxy is running on localhost:4000) +```bash +export NODE_ENV="development" +``` + +```bash +cd litellm/ui/litellm-dashboard + +npm run dev + +# starts on http://0.0.0.0:3000/ui +``` + +## 3. Go to local UI + +``` +http://0.0.0.0:3000/ui +``` \ No newline at end of file diff --git a/docs/my-website/docs/embedding/supported_embedding.md b/docs/my-website/docs/embedding/supported_embedding.md index d864c5796c0..7e2374d16df 100644 --- a/docs/my-website/docs/embedding/supported_embedding.md +++ b/docs/my-website/docs/embedding/supported_embedding.md @@ -1,3 +1,6 @@ +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + # Embedding Models ## Quick Start @@ -7,8 +10,81 @@ import os os.environ['OPENAI_API_KEY'] = "" response = embedding(model='text-embedding-ada-002', input=["good morning from litellm"]) ``` +## Proxy Usage -### Input Params for `litellm.embedding()` +**NOTE** +For `vertex_ai`, +```bash +export GOOGLE_APPLICATION_CREDENTIALS="absolute/path/to/service_account.json" +``` + +### Add model to config + +```yaml +model_list: +- model_name: textembedding-gecko + litellm_params: + model: vertex_ai/textembedding-gecko + +general_settings: + master_key: sk-1234 +``` + +### Start proxy + +```bash +litellm --config /path/to/config.yaml + +# RUNNING on http://0.0.0.0:4000 +``` + +### Test + + + + +```bash +curl --location 'http://0.0.0.0:4000/embeddings' \ +--header 'Authorization: Bearer sk-1234' \ +--header 'Content-Type: application/json' \ +--data '{"input": ["Academia.edu uses"], "model": "textembedding-gecko", "encoding_format": "base64"}' +``` + + + + +```python +from openai import OpenAI +client = OpenAI( + api_key="sk-1234", + base_url="http://0.0.0.0:4000" +) + +client.embeddings.create( + model="textembedding-gecko", + input="The food was delicious and the waiter...", + encoding_format="float" +) +``` + + + +```python +from langchain_openai import OpenAIEmbeddings + +embeddings = OpenAIEmbeddings(model="textembedding-gecko", openai_api_base="http://0.0.0.0:4000", openai_api_key="sk-1234") + +text = "This is a test document." + +query_result = embeddings.embed_query(text) + +print(f"VERTEX AI EMBEDDINGS") +print(query_result[:5]) +``` + + + +## Input Params for `litellm.embedding()` ### Required Fields - `model`: *string* - ID of the model to use. `model='text-embedding-ada-002'` @@ -124,7 +200,7 @@ Use this for calling `/embedding` endpoints on OpenAI Compatible Servers, exampl from litellm import embedding response = embedding( model = "openai/", # add `openai/` prefix to model so litellm knows to route to OpenAI - api_base="http://0.0.0.0:8000/" # set API Base of your Custom OpenAI Endpoint + api_base="http://0.0.0.0:4000/" # set API Base of your Custom OpenAI Endpoint input=["good morning from litellm"] ) ``` @@ -235,6 +311,35 @@ print(response) | mistral-embed | `embedding(model="mistral/mistral-embed", input)` | +## Vertex AI Embedding Models + +### Usage - Embedding +```python +import litellm +from litellm import embedding +litellm.vertex_project = "hardy-device-38811" # Your Project ID +litellm.vertex_location = "us-central1" # proj location + + +os.environ['VOYAGE_API_KEY'] = "" +response = embedding( + model="vertex_ai/textembedding-gecko", + input=["good morning from litellm"], +) +print(response) +``` + +## Supported Models +All models listed [here](https://github.com/BerriAI/litellm/blob/57f37f743886a0249f630a6792d49dffc2c5d9b7/model_prices_and_context_window.json#L835) are supported + +| Model Name | Function Call | +|--------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| textembedding-gecko | `embedding(model="vertex_ai/textembedding-gecko", input)` | +| textembedding-gecko-multilingual | `embedding(model="vertex_ai/textembedding-gecko-multilingual", input)` | +| textembedding-gecko-multilingual@001 | `embedding(model="vertex_ai/textembedding-gecko-multilingual@001", input)` | +| textembedding-gecko@001 | `embedding(model="vertex_ai/textembedding-gecko@001", input)` | +| textembedding-gecko@003 | `embedding(model="vertex_ai/textembedding-gecko@003", input)` | + ## Voyage AI Embedding Models ### Usage - Embedding diff --git a/docs/my-website/docs/enterprise.md b/docs/my-website/docs/enterprise.md index d530568d76c..ac88d08227d 100644 --- a/docs/my-website/docs/enterprise.md +++ b/docs/my-website/docs/enterprise.md @@ -1,15 +1,29 @@ # Enterprise - -LiteLLM offers dedicated enterprise support. - -This covers: -- **Feature Prioritization** -- **Custom Integrations** -- **Professional Support - Dedicated discord + slack** -- **Custom SLAs** +For companies that need better security, user management and professional support :::info [Talk to founders](https://calendly.com/d/4mp-gd3-k5k/litellm-1-1-onboarding-chat) -::: \ No newline at end of file +::: + +This covers: +- ✅ **Features under the [LiteLLM Commercial License](https://docs.litellm.ai/docs/proxy/enterprise):** +- ✅ **Feature Prioritization** +- ✅ **Custom Integrations** +- ✅ **Professional Support - Dedicated discord + slack** +- ✅ **Custom SLAs** +- ✅ **Secure access with Single Sign-On** + + +## Frequently Asked Questions + +### What topics does Professional support cover and what SLAs do you offer? + +Professional Support can assist with LLM/Provider integrations, deployment, upgrade management, and LLM Provider troubleshooting. We can’t solve your own infrastructure-related issues but we will guide you to fix them. + +We offer custom SLAs based on your needs and the severity of the issue. The standard SLA is 6 hours for Sev0-Sev1 severity and 24h for Sev2-Sev3 between 7am – 7pm PT (Monday through Saturday). + +### What’s the cost of the Self-Managed Enterprise edition? + +Self-Managed Enterprise deployments require our team to understand your exact needs. [Get in touch with us to learn more](https://calendly.com/d/4mp-gd3-k5k/litellm-1-1-onboarding-chat) diff --git a/docs/my-website/docs/index.md b/docs/my-website/docs/index.md index d7ed1401950..18331ba3b86 100644 --- a/docs/my-website/docs/index.md +++ b/docs/my-website/docs/index.md @@ -13,7 +13,14 @@ https://github.com/BerriAI/litellm - Retry/fallback logic across multiple deployments (e.g. Azure/OpenAI) - [Router](https://docs.litellm.ai/docs/routing) - Track spend & set budgets per project [OpenAI Proxy Server](https://docs.litellm.ai/docs/simple_proxy) -## Basic usage +## How to use LiteLLM +You can use litellm through either: +1. [OpenAI proxy Server](#openai-proxy) - Server to call 100+ LLMs, load balance, cost tracking across projects +2. [LiteLLM python SDK](#basic-usage) - Python Client to call 100+ LLMs, load balance, cost tracking + +## LiteLLM Python SDK + +### Basic usage Open In Colab @@ -144,7 +151,7 @@ response = completion( -## Streaming +### Streaming Set `stream=True` in the `completion` args. @@ -276,7 +283,7 @@ response = completion( -## Exception handling +### Exception handling LiteLLM maps exceptions across all supported providers to the OpenAI exceptions. All our exceptions inherit from OpenAI's exception types, so any error-handling you have for that, should work out of the box with LiteLLM. @@ -292,7 +299,7 @@ except OpenAIError as e: print(e) ``` -## Logging Observability - Log LLM Input/Output ([Docs](https://docs.litellm.ai/docs/observability/callbacks)) +### Logging Observability - Log LLM Input/Output ([Docs](https://docs.litellm.ai/docs/observability/callbacks)) LiteLLM exposes pre defined callbacks to send data to Langfuse, LLMonitor, Helicone, Promptlayer, Traceloop, Slack ```python from litellm import completion @@ -311,7 +318,7 @@ litellm.success_callback = ["langfuse", "llmonitor"] # log input/output to langf response = completion(model="gpt-3.5-turbo", messages=[{"role": "user", "content": "Hi 👋 - i'm openai"}]) ``` -## Track Costs, Usage, Latency for streaming +### Track Costs, Usage, Latency for streaming Use a callback function for this - more info on custom callbacks: https://docs.litellm.ai/docs/observability/custom_callback ```python @@ -368,13 +375,13 @@ pip install 'litellm[proxy]' ```shell $ litellm --model huggingface/bigcode/starcoder -#INFO: Proxy running on http://0.0.0.0:8000 +#INFO: Proxy running on http://0.0.0.0:4000 ``` #### Step 2: Make ChatCompletions Request to Proxy ```python import openai # openai v1.0.0+ -client = openai.OpenAI(api_key="anything",base_url="http://0.0.0.0:8000") # set proxy to base_url +client = openai.OpenAI(api_key="anything",base_url="http://0.0.0.0:4000") # set proxy to base_url # request sent to model set on litellm proxy, `litellm --model` response = client.chat.completions.create(model="gpt-3.5-turbo", messages = [ { diff --git a/docs/my-website/docs/load_test.md b/docs/my-website/docs/load_test.md index f568b56961b..f85ff912255 100644 --- a/docs/my-website/docs/load_test.md +++ b/docs/my-website/docs/load_test.md @@ -1,5 +1,84 @@ +import Image from '@theme/IdealImage'; + # 🔥 Load Test LiteLLM +## Load Test LiteLLM Proxy - 1500+ req/s + +## 1500+ concurrent requests/s + +LiteLLM proxy has been load tested to handle 1500+ concurrent req/s + +```python +import time, asyncio +from openai import AsyncOpenAI, AsyncAzureOpenAI +import uuid +import traceback + +# base_url - litellm proxy endpoint +# api_key - litellm proxy api-key, is created proxy with auth +litellm_client = AsyncOpenAI(base_url="http://0.0.0.0:4000", api_key="sk-1234") + + +async def litellm_completion(): + # Your existing code for litellm_completion goes here + try: + response = await litellm_client.chat.completions.create( + model="azure-gpt-3.5", + messages=[{"role": "user", "content": f"This is a test: {uuid.uuid4()}"}], + ) + print(response) + return response + + except Exception as e: + # If there's an exception, log the error message + with open("error_log.txt", "a") as error_log: + error_log.write(f"Error during completion: {str(e)}\n") + pass + + +async def main(): + for i in range(1): + start = time.time() + n = 1500 # Number of concurrent tasks + tasks = [litellm_completion() for _ in range(n)] + + chat_completions = await asyncio.gather(*tasks) + + successful_completions = [c for c in chat_completions if c is not None] + + # Write errors to error_log.txt + with open("error_log.txt", "a") as error_log: + for completion in chat_completions: + if isinstance(completion, str): + error_log.write(completion + "\n") + + print(n, time.time() - start, len(successful_completions)) + time.sleep(10) + + +if __name__ == "__main__": + # Blank out contents of error_log.txt + open("error_log.txt", "w").close() + + asyncio.run(main()) + +``` + +### Throughput - 30% Increase +LiteLLM proxy + Load Balancer gives **30% increase** in throughput compared to Raw OpenAI API + + +### Latency Added - 0.00325 seconds +LiteLLM proxy adds **0.00325 seconds** latency as compared to using the Raw OpenAI API + + + +### Testing LiteLLM Proxy with Locust +- 1 LiteLLM container can handle ~140 requests/second with 0.4 failures + + + +## Load Test LiteLLM SDK vs OpenAI Here is a script to load test LiteLLM vs OpenAI ```python @@ -11,7 +90,7 @@ import time, asyncio, litellm #### LITELLM PROXY #### litellm_client = AsyncOpenAI( api_key="sk-1234", # [CHANGE THIS] - base_url="http://0.0.0.0:8000" + base_url="http://0.0.0.0:4000" ) #### AZURE OPENAI CLIENT #### @@ -84,4 +163,5 @@ async def loadtest_fn(): # Run the event loop to execute the async function asyncio.run(loadtest_fn()) -``` \ No newline at end of file +``` + diff --git a/docs/my-website/docs/observability/athina_integration.md b/docs/my-website/docs/observability/athina_integration.md new file mode 100644 index 00000000000..47545550123 --- /dev/null +++ b/docs/my-website/docs/observability/athina_integration.md @@ -0,0 +1,50 @@ +import Image from '@theme/IdealImage'; + +# Athina + +[Athina](https://athina.ai/) is an evaluation framework and production monitoring platform for your LLM-powered app. Athina is designed to enhance the performance and reliability of AI applications through real-time monitoring, granular analytics, and plug-and-play evaluations. + + + +## Getting Started + +Use Athina to log requests across all LLM Providers (OpenAI, Azure, Anthropic, Cohere, Replicate, PaLM) + +liteLLM provides `callbacks`, making it easy for you to log data depending on the status of your responses. + +## Using Callbacks + +First, sign up to get an API_KEY on the [Athina dashboard](https://app.athina.ai). + +Use just 1 line of code, to instantly log your responses **across all providers** with Athina: + +```python +litellm.success_callback = ["athina"] +``` + +### Complete code + +```python +from litellm import completion + +## set env variables +os.environ["ATHINA_API_KEY"] = "your-athina-api-key" +os.environ["OPENAI_API_KEY"]= "" + +# set callback +litellm.success_callback = ["athina"] + +#openai call +response = completion( + model="gpt-3.5-turbo", + messages=[{"role": "user", "content": "Hi 👋 - i'm openai"}] +) +``` + +## Support & Talk with Athina Team + +- [Schedule Demo 👋](https://cal.com/shiv-athina/30min) +- [Website 💻](https://athina.ai/?utm_source=litellm&utm_medium=website) +- [Docs 📖](https://docs.athina.ai/?utm_source=litellm&utm_medium=website) +- [Demo Video 📺](https://www.loom.com/share/d9ef2c62e91b46769a39c42bb6669834?sid=711df413-0adb-4267-9708-5f29cef929e3) +- Our emails ✉️ shiv@athina.ai, akshat@athina.ai, vivek@athina.ai diff --git a/docs/my-website/docs/observability/callbacks.md b/docs/my-website/docs/observability/callbacks.md index 892be932262..3b3d4eef328 100644 --- a/docs/my-website/docs/observability/callbacks.md +++ b/docs/my-website/docs/observability/callbacks.md @@ -10,6 +10,7 @@ liteLLM supports: - [LLMonitor](https://llmonitor.com/docs) - [Helicone](https://docs.helicone.ai/introduction) - [Traceloop](https://traceloop.com/docs) +- [Athina](https://docs.athina.ai/) - [Sentry](https://docs.sentry.io/platforms/python/) - [PostHog](https://posthog.com/docs/libraries/python) - [Slack](https://slack.dev/bolt-python/concepts) @@ -21,7 +22,7 @@ from litellm import completion # set callbacks litellm.input_callback=["sentry"] # for sentry breadcrumbing - logs the input being sent to the api -litellm.success_callback=["posthog", "helicone", "llmonitor"] +litellm.success_callback=["posthog", "helicone", "llmonitor", "athina"] litellm.failure_callback=["sentry", "llmonitor"] ## set env variables @@ -30,6 +31,7 @@ os.environ['POSTHOG_API_KEY'], os.environ['POSTHOG_API_URL'] = "api-key", "api-u os.environ["HELICONE_API_KEY"] = "" os.environ["TRACELOOP_API_KEY"] = "" os.environ["LLMONITOR_APP_ID"] = "" +os.environ["ATHINA_API_KEY"] = "" response = completion(model="gpt-3.5-turbo", messages=messages) -``` +``` \ No newline at end of file diff --git a/docs/my-website/docs/providers/anthropic.md b/docs/my-website/docs/providers/anthropic.md index cfa14cd3257..1a7a5fa4137 100644 --- a/docs/my-website/docs/providers/anthropic.md +++ b/docs/my-website/docs/providers/anthropic.md @@ -1,9 +1,12 @@ +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + # Anthropic LiteLLM supports +- `claude-3` (`claude-3-opus-20240229`, `claude-3-sonnet-20240229`) - `claude-2` - `claude-2.1` -- `claude-instant-1` - `claude-instant-1.2` ## API Keys @@ -24,11 +27,217 @@ from litellm import completion os.environ["ANTHROPIC_API_KEY"] = "your-api-key" messages = [{"role": "user", "content": "Hey! how's it going?"}] -response = completion(model="claude-instant-1", messages=messages) +response = completion(model="claude-3-opus-20240229", messages=messages) print(response) ``` -## Usage - "Assistant Pre-fill" + +## Usage - Streaming +Just set `stream=True` when calling completion. + +```python +import os +from litellm import completion + +# set env +os.environ["ANTHROPIC_API_KEY"] = "your-api-key" + +messages = [{"role": "user", "content": "Hey! how's it going?"}] +response = completion(model="claude-3-opus-20240229", messages=messages, stream=True) +for chunk in response: + print(chunk["choices"][0]["delta"]["content"]) # same as openai format +``` + +## OpenAI Proxy Usage + +Here's how to call Anthropic with the LiteLLM Proxy Server + +### 1. Save key in your environment + +```bash +export ANTHROPIC_API_KEY="your-api-key" +``` + +### 2. Start the proxy + +```bash +$ litellm --model claude-3-opus-20240229 + +# Server running on http://0.0.0.0:4000 +``` + +### 3. Test it + + + + + +```shell +curl --location 'http://0.0.0.0:4000/chat/completions' \ +--header 'Content-Type: application/json' \ +--data ' { + "model": "gpt-3.5-turbo", + "messages": [ + { + "role": "user", + "content": "what llm are you" + } + ] + } +' +``` + + + +```python +import openai +client = openai.OpenAI( + api_key="anything", + base_url="http://0.0.0.0:4000" +) + +# request sent to model set on litellm proxy, `litellm --model` +response = client.chat.completions.create(model="gpt-3.5-turbo", messages = [ + { + "role": "user", + "content": "this is a test request, write a short poem" + } +]) + +print(response) + +``` + + + +```python +from langchain.chat_models import ChatOpenAI +from langchain.prompts.chat import ( + ChatPromptTemplate, + HumanMessagePromptTemplate, + SystemMessagePromptTemplate, +) +from langchain.schema import HumanMessage, SystemMessage + +chat = ChatOpenAI( + openai_api_base="http://0.0.0.0:4000", # set openai_api_base to the LiteLLM Proxy + model = "gpt-3.5-turbo", + temperature=0.1 +) + +messages = [ + SystemMessage( + content="You are a helpful assistant that im using to make a test request to." + ), + HumanMessage( + content="test from litellm. tell me why it's amazing in 1 sentence" + ), +] +response = chat(messages) + +print(response) +``` + + + +## Supported Models + +| Model Name | Function Call | +|------------------|--------------------------------------------| +| claude-3-opus | `completion('claude-3-opus-20240229', messages)` | `os.environ['ANTHROPIC_API_KEY']` | +| claude-3-sonnet | `completion('claude-3-sonnet-20240229', messages)` | `os.environ['ANTHROPIC_API_KEY']` | +| claude-2.1 | `completion('claude-2.1', messages)` | `os.environ['ANTHROPIC_API_KEY']` | +| claude-2 | `completion('claude-2', messages)` | `os.environ['ANTHROPIC_API_KEY']` | +| claude-instant-1.2 | `completion('claude-instant-1.2', messages)` | `os.environ['ANTHROPIC_API_KEY']` | +| claude-instant-1 | `completion('claude-instant-1', messages)` | `os.environ['ANTHROPIC_API_KEY']` | + +## Advanced + +## Usage - Function Calling + +```python +from litellm import completion + +# set env +os.environ["ANTHROPIC_API_KEY"] = "your-api-key" + +tools = [ + { + "type": "function", + "function": { + "name": "get_current_weather", + "description": "Get the current weather in a given location", + "parameters": { + "type": "object", + "properties": { + "location": { + "type": "string", + "description": "The city and state, e.g. San Francisco, CA", + }, + "unit": {"type": "string", "enum": ["celsius", "fahrenheit"]}, + }, + "required": ["location"], + }, + }, + } +] +messages = [{"role": "user", "content": "What's the weather like in Boston today?"}] + +response = completion( + model="anthropic/claude-3-opus-20240229", + messages=messages, + tools=tools, + tool_choice="auto", +) +# Add any assertions, here to check response args +print(response) +assert isinstance(response.choices[0].message.tool_calls[0].function.name, str) +assert isinstance( + response.choices[0].message.tool_calls[0].function.arguments, str +) + +``` + + +## Usage - Vision + +```python +from litellm import completion + +# set env +os.environ["ANTHROPIC_API_KEY"] = "your-api-key" + +def encode_image(image_path): + import base64 + + with open(image_path, "rb") as image_file: + return base64.b64encode(image_file.read()).decode("utf-8") + + +image_path = "../proxy/cached_logo.jpg" +# Getting the base64 string +base64_image = encode_image(image_path) +resp = litellm.completion( + model="anthropic/claude-3-opus-20240229", + messages=[ + { + "role": "user", + "content": [ + {"type": "text", "text": "Whats in this image?"}, + { + "type": "image_url", + "image_url": { + "url": "data:image/jpeg;base64," + base64_image + }, + }, + ], + } + ], +) +print(f"\nResponse: {resp}") +``` + +### Usage - "Assistant Pre-fill" You can "put words in Claude's mouth" by including an `assistant` role message as the last item in the `messages` array. @@ -50,7 +259,7 @@ response = completion(model="claude-2.1", messages=messages) print(response) ``` -### Example prompt sent to Claude +#### Example prompt sent to Claude ``` @@ -61,7 +270,7 @@ Human: How do you say 'Hello' in German? Return your answer as a JSON object, li Assistant: { ``` -## Usage - "System" messages +### Usage - "System" messages If you're using Anthropic's Claude 2.1 with Bedrock, `system` role messages are properly formatted for you. ```python @@ -78,7 +287,7 @@ messages = [ response = completion(model="claude-2.1", messages=messages) ``` -### Example prompt sent to Claude +#### Example prompt sent to Claude ``` You are a snarky assistant. @@ -88,28 +297,3 @@ Human: How do I boil water? Assistant: ``` -## Streaming -Just set `stream=True` when calling completion. - -```python -import os -from litellm import completion - -# set env -os.environ["ANTHROPIC_API_KEY"] = "your-api-key" - -messages = [{"role": "user", "content": "Hey! how's it going?"}] -response = completion(model="claude-instant-1", messages=messages, stream=True) -for chunk in response: - print(chunk["choices"][0]["delta"]["content"]) # same as openai format -``` - - -### Model Details - -| Model Name | Function Call | Required OS Variables | -|------------------|--------------------------------------------|--------------------------------------| -| claude-2.1 | `completion('claude-2.1', messages)` | `os.environ['ANTHROPIC_API_KEY']` | -| claude-2 | `completion('claude-2', messages)` | `os.environ['ANTHROPIC_API_KEY']` | -| claude-instant-1 | `completion('claude-instant-1', messages)` | `os.environ['ANTHROPIC_API_KEY']` | -| claude-instant-1.2 | `completion('claude-instant-1.2', messages)` | `os.environ['ANTHROPIC_API_KEY']` | diff --git a/docs/my-website/docs/providers/azure.md b/docs/my-website/docs/providers/azure.md index bc141810cef..dda7384c099 100644 --- a/docs/my-website/docs/providers/azure.md +++ b/docs/my-website/docs/providers/azure.md @@ -3,9 +3,9 @@ api_key, api_base, api_version etc can be passed directly to `litellm.completion` - see here or set as `litellm.api_key` params see here ```python import os -os.environ["AZURE_API_KEY"] = "" -os.environ["AZURE_API_BASE"] = "" -os.environ["AZURE_API_VERSION"] = "" +os.environ["AZURE_API_KEY"] = "" # "my-azure-api-key" +os.environ["AZURE_API_BASE"] = "" # "https://example-endpoint.openai.azure.com" +os.environ["AZURE_API_VERSION"] = "" # "2023-05-15" # optional os.environ["AZURE_AD_TOKEN"] = "" @@ -168,6 +168,13 @@ response = completion( ) ``` +## Azure Instruct Models + +| Model Name | Function Call | +|---------------------|----------------------------------------------------| +| gpt-3.5-turbo-instruct | `response = completion(model="azure/", messages=messages)` | +| gpt-3.5-turbo-instruct-0914 | `response = completion(model="azure/", messages=messages)` | + ## Advanced ### Azure API Load-Balancing diff --git a/docs/my-website/docs/providers/azure_ai.md b/docs/my-website/docs/providers/azure_ai.md new file mode 100644 index 00000000000..71776e0fb7a --- /dev/null +++ b/docs/my-website/docs/providers/azure_ai.md @@ -0,0 +1,55 @@ +# Azure AI Studio + +## Using Mistral models deployed on Azure AI Studio + +### Sample Usage - setting env vars + +Set `MISTRAL_AZURE_API_KEY` and `MISTRAL_AZURE_API_BASE` in your env + +```shell +MISTRAL_AZURE_API_KEY = "zE************"" +MISTRAL_AZURE_API_BASE = "https://Mistral-large-nmefg-serverless.eastus2.inference.ai.azure.com" +``` + +```python +from litellm import completion +import os + +response = completion( + model="mistral/Mistral-large-dfgfj", + messages=[ + {"role": "user", "content": "hello from litellm"} + ], +) +print(response) +``` + +### Sample Usage - passing `api_base` and `api_key` to `litellm.completion` +```python +from litellm import completion +import os + +response = completion( + model="mistral/Mistral-large-dfgfj", + api_base="https://Mistral-large-dfgfj-serverless.eastus2.inference.ai.azure.com", + api_key = "JGbKodRcTp****" + messages=[ + {"role": "user", "content": "hello from litellm"} + ], +) +print(response) +``` + +### [LiteLLM Proxy] Using Mistral Models + +Set this on your litellm proxy config.yaml +```yaml +model_list: + - model_name: mistral + litellm_params: + model: mistral/Mistral-large-dfgfj + api_base: https://Mistral-large-dfgfj-serverless.eastus2.inference.ai.azure.com + api_key: JGbKodRcTp**** +``` + + diff --git a/docs/my-website/docs/providers/bedrock.md b/docs/my-website/docs/providers/bedrock.md index 691e1f29d46..8c6926885b5 100644 --- a/docs/my-website/docs/providers/bedrock.md +++ b/docs/my-website/docs/providers/bedrock.md @@ -1,3 +1,6 @@ +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + # AWS Bedrock Anthropic, Amazon Titan, A121 LLMs are Supported on Bedrock @@ -29,11 +32,193 @@ os.environ["AWS_SECRET_ACCESS_KEY"] = "" os.environ["AWS_REGION_NAME"] = "" response = completion( - model="bedrock/anthropic.claude-instant-v1", + model="bedrock/anthropic.claude-3-sonnet-20240229-v1:0", messages=[{ "content": "Hello, how are you?","role": "user"}] ) ``` +## OpenAI Proxy Usage + +Here's how to call Anthropic with the LiteLLM Proxy Server + +### 1. Save key in your environment + +```bash +export AWS_ACCESS_KEY_ID="" +export AWS_SECRET_ACCESS_KEY="" +export AWS_REGION_NAME="" +``` + +### 2. Start the proxy + +```bash +$ litellm --model anthropic.claude-3-sonnet-20240229-v1:0 + +# Server running on http://0.0.0.0:4000 +``` + +### 3. Test it + + + + + +```shell +curl --location 'http://0.0.0.0:4000/chat/completions' \ +--header 'Content-Type: application/json' \ +--data ' { + "model": "gpt-3.5-turbo", + "messages": [ + { + "role": "user", + "content": "what llm are you" + } + ] + } +' +``` + + + +```python +import openai +client = openai.OpenAI( + api_key="anything", + base_url="http://0.0.0.0:4000" +) + +# request sent to model set on litellm proxy, `litellm --model` +response = client.chat.completions.create(model="gpt-3.5-turbo", messages = [ + { + "role": "user", + "content": "this is a test request, write a short poem" + } +]) + +print(response) + +``` + + + +```python +from langchain.chat_models import ChatOpenAI +from langchain.prompts.chat import ( + ChatPromptTemplate, + HumanMessagePromptTemplate, + SystemMessagePromptTemplate, +) +from langchain.schema import HumanMessage, SystemMessage + +chat = ChatOpenAI( + openai_api_base="http://0.0.0.0:4000", # set openai_api_base to the LiteLLM Proxy + model = "gpt-3.5-turbo", + temperature=0.1 +) + +messages = [ + SystemMessage( + content="You are a helpful assistant that im using to make a test request to." + ), + HumanMessage( + content="test from litellm. tell me why it's amazing in 1 sentence" + ), +] +response = chat(messages) + +print(response) +``` + + + +## Usage - Function Calling + +```python +from litellm import completion + +# set env +os.environ["AWS_ACCESS_KEY_ID"] = "" +os.environ["AWS_SECRET_ACCESS_KEY"] = "" +os.environ["AWS_REGION_NAME"] = "" + +tools = [ + { + "type": "function", + "function": { + "name": "get_current_weather", + "description": "Get the current weather in a given location", + "parameters": { + "type": "object", + "properties": { + "location": { + "type": "string", + "description": "The city and state, e.g. San Francisco, CA", + }, + "unit": {"type": "string", "enum": ["celsius", "fahrenheit"]}, + }, + "required": ["location"], + }, + }, + } +] +messages = [{"role": "user", "content": "What's the weather like in Boston today?"}] + +response = completion( + model="bedrock/anthropic.claude-3-sonnet-20240229-v1:0", + messages=messages, + tools=tools, + tool_choice="auto", +) +# Add any assertions, here to check response args +print(response) +assert isinstance(response.choices[0].message.tool_calls[0].function.name, str) +assert isinstance( + response.choices[0].message.tool_calls[0].function.arguments, str +) +``` + + +## Usage - Vision + +```python +from litellm import completion + +# set env +os.environ["AWS_ACCESS_KEY_ID"] = "" +os.environ["AWS_SECRET_ACCESS_KEY"] = "" +os.environ["AWS_REGION_NAME"] = "" + + +def encode_image(image_path): + import base64 + + with open(image_path, "rb") as image_file: + return base64.b64encode(image_file.read()).decode("utf-8") + + +image_path = "../proxy/cached_logo.jpg" +# Getting the base64 string +base64_image = encode_image(image_path) +resp = litellm.completion( + model="bedrock/anthropic.claude-3-sonnet-20240229-v1:0", + messages=[ + { + "role": "user", + "content": [ + {"type": "text", "text": "Whats in this image?"}, + { + "type": "image_url", + "image_url": { + "url": "data:image/jpeg;base64," + base64_image + }, + }, + ], + } + ], +) +print(f"\nResponse: {resp}") +``` + ## Usage - "Assistant Pre-fill" If you're using Anthropic's Claude with Bedrock, you can "put words in Claude's mouth" by including an `assistant` role message as the last item in the `messages` array. @@ -286,19 +471,21 @@ response = litellm.embedding( ## Supported AWS Bedrock Models Here's an example of using a bedrock model with LiteLLM -| Model Name | Command | -|--------------------------|------------------------------------------------------------------| +| Model Name | Command | +|----------------------------|------------------------------------------------------------------| +| Anthropic Claude-V3 | `completion(model='bedrock/anthropic.claude-3-sonnet-20240229-v1:0', messages=messages)` | `os.environ['ANTHROPIC_ACCESS_KEY_ID']`, `os.environ['ANTHROPIC_SECRET_ACCESS_KEY']` | | Anthropic Claude-V2.1 | `completion(model='bedrock/anthropic.claude-v2:1', messages=messages)` | `os.environ['ANTHROPIC_ACCESS_KEY_ID']`, `os.environ['ANTHROPIC_SECRET_ACCESS_KEY']` | -| Anthropic Claude-V2 | `completion(model='bedrock/anthropic.claude-v2', messages=messages)` | `os.environ['ANTHROPIC_ACCESS_KEY_ID']`, `os.environ['ANTHROPIC_SECRET_ACCESS_KEY']` | +| Anthropic Claude-V2 | `completion(model='bedrock/anthropic.claude-v2', messages=messages)` | `os.environ['ANTHROPIC_ACCESS_KEY_ID']`, `os.environ['ANTHROPIC_SECRET_ACCESS_KEY']` | | Anthropic Claude-Instant V1 | `completion(model='bedrock/anthropic.claude-instant-v1', messages=messages)` | `os.environ['ANTHROPIC_ACCESS_KEY_ID']`, `os.environ['ANTHROPIC_SECRET_ACCESS_KEY']` | -| Anthropic Claude-V1 | `completion(model='bedrock/anthropic.claude-v1', messages=messages)` | `os.environ['ANTHROPIC_ACCESS_KEY_ID']`, `os.environ['ANTHROPIC_SECRET_ACCESS_KEY']` | -| Amazon Titan Lite | `completion(model='bedrock/amazon.titan-text-lite-v1', messages=messages)` | `os.environ['AWS_ACCESS_KEY_ID']`, `os.environ['AWS_SECRET_ACCESS_KEY']`, `os.environ['AWS_REGION_NAME']` | -| Amazon Titan Express | `completion(model='bedrock/amazon.titan-text-express-v1', messages=messages)` | `os.environ['AWS_ACCESS_KEY_ID']`, `os.environ['AWS_SECRET_ACCESS_KEY']`, `os.environ['AWS_REGION_NAME']` | -| Cohere Command | `completion(model='bedrock/cohere.command-text-v14', messages=messages)` | `os.environ['AWS_ACCESS_KEY_ID']`, `os.environ['AWS_SECRET_ACCESS_KEY']`, `os.environ['AWS_REGION_NAME']` | -| AI21 J2-Mid | `completion(model='bedrock/ai21.j2-mid-v1', messages=messages)` | `os.environ['AWS_ACCESS_KEY_ID']`, `os.environ['AWS_SECRET_ACCESS_KEY']`, `os.environ['AWS_REGION_NAME']` | +| Amazon Titan Lite | `completion(model='bedrock/amazon.titan-text-lite-v1', messages=messages)` | `os.environ['AWS_ACCESS_KEY_ID']`, `os.environ['AWS_SECRET_ACCESS_KEY']`, `os.environ['AWS_REGION_NAME']` | +| Amazon Titan Express | `completion(model='bedrock/amazon.titan-text-express-v1', messages=messages)` | `os.environ['AWS_ACCESS_KEY_ID']`, `os.environ['AWS_SECRET_ACCESS_KEY']`, `os.environ['AWS_REGION_NAME']` | +| Cohere Command | `completion(model='bedrock/cohere.command-text-v14', messages=messages)` | `os.environ['AWS_ACCESS_KEY_ID']`, `os.environ['AWS_SECRET_ACCESS_KEY']`, `os.environ['AWS_REGION_NAME']` | +| AI21 J2-Mid | `completion(model='bedrock/ai21.j2-mid-v1', messages=messages)` | `os.environ['AWS_ACCESS_KEY_ID']`, `os.environ['AWS_SECRET_ACCESS_KEY']`, `os.environ['AWS_REGION_NAME']` | | AI21 J2-Ultra | `completion(model='bedrock/ai21.j2-ultra-v1', messages=messages)` | `os.environ['AWS_ACCESS_KEY_ID']`, `os.environ['AWS_SECRET_ACCESS_KEY']`, `os.environ['AWS_REGION_NAME']` | -| Meta Llama 2 Chat 13b | `completion(model='bedrock/meta.llama2-13b-chat-v1', messages=messages)` | `os.environ['AWS_ACCESS_KEY_ID']`, `os.environ['AWS_SECRET_ACCESS_KEY']`, `os.environ['AWS_REGION_NAME']` | -| Meta Llama 2 Chat 70b | `completion(model='bedrock/meta.llama2-70b-chat-v1', messages=messages)` | `os.environ['AWS_ACCESS_KEY_ID']`, `os.environ['AWS_SECRET_ACCESS_KEY']`, `os.environ['AWS_REGION_NAME']` | +| Meta Llama 2 Chat 13b | `completion(model='bedrock/meta.llama2-13b-chat-v1', messages=messages)` | `os.environ['AWS_ACCESS_KEY_ID']`, `os.environ['AWS_SECRET_ACCESS_KEY']`, `os.environ['AWS_REGION_NAME']` | +| Meta Llama 2 Chat 70b | `completion(model='bedrock/meta.llama2-70b-chat-v1', messages=messages)` | `os.environ['AWS_ACCESS_KEY_ID']`, `os.environ['AWS_SECRET_ACCESS_KEY']`, `os.environ['AWS_REGION_NAME']` | +| Mistral 7B Instruct | `completion(model='bedrock/mistral.mistral-7b-instruct-v0:2', messages=messages)` | `os.environ['AWS_ACCESS_KEY_ID']`, `os.environ['AWS_SECRET_ACCESS_KEY']`, `os.environ['AWS_REGION_NAME']` | +| Mixtral 8x7B Instruct | `completion(model='bedrock/mistral.mixtral-8x7b-instruct-v0:1', messages=messages)` | `os.environ['AWS_ACCESS_KEY_ID']`, `os.environ['AWS_SECRET_ACCESS_KEY']`, `os.environ['AWS_REGION_NAME']` | ## Bedrock Embedding diff --git a/docs/my-website/docs/providers/gemini.md b/docs/my-website/docs/providers/gemini.md index 44d744866cb..b089576d706 100644 --- a/docs/my-website/docs/providers/gemini.md +++ b/docs/my-website/docs/providers/gemini.md @@ -97,4 +97,6 @@ print(content) | Model Name | Function Call | Required OS Variables | |------------------|--------------------------------------|-------------------------| | gemini-pro | `completion('gemini/gemini-pro', messages)` | `os.environ['GEMINI_API_KEY']` | +| gemini-1.5-pro | `completion('gemini/gemini-pro', messages)` | `os.environ['GEMINI_API_KEY']` | | gemini-pro-vision | `completion('gemini/gemini-pro-vision', messages)` | `os.environ['GEMINI_API_KEY']` | +| gemini-1.5-pro-vision | `completion('gemini/gemini-pro-vision', messages)` | `os.environ['GEMINI_API_KEY']` | diff --git a/docs/my-website/docs/providers/groq.md b/docs/my-website/docs/providers/groq.md new file mode 100644 index 00000000000..e09cf9f8a47 --- /dev/null +++ b/docs/my-website/docs/providers/groq.md @@ -0,0 +1,52 @@ +# Groq +https://groq.com/ + +**We support ALL Groq models, just set `groq/` as a prefix when sending completion requests** + +## API Key +```python +# env variable +os.environ['GROQ_API_KEY'] +``` + +## Sample Usage +```python +from litellm import completion +import os + +os.environ['GROQ_API_KEY'] = "" +response = completion( + model="groq/llama2-70b-4096", + messages=[ + {"role": "user", "content": "hello from litellm"} + ], +) +print(response) +``` + +## Sample Usage - Streaming +```python +from litellm import completion +import os + +os.environ['GROQ_API_KEY'] = "" +response = completion( + model="groq/llama2-70b-4096", + messages=[ + {"role": "user", "content": "hello from litellm"} + ], + stream=True +) + +for chunk in response: + print(chunk) +``` + + +## Supported Models - ALL Groq Models Supported! +We support ALL Groq models, just set `groq/` as a prefix when sending completion requests + +| Model Name | Function Call | +|--------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| llama2-70b-4096 | `completion(model="groq/llama2-70b-4096", messages)` | +| mixtral-8x7b-32768 | `completion(model="groq/mixtral-8x7b-32768", messages)` | diff --git a/docs/my-website/docs/providers/mistral.md b/docs/my-website/docs/providers/mistral.md index a6a55419b3c..257ab2e93b7 100644 --- a/docs/my-website/docs/providers/mistral.md +++ b/docs/my-website/docs/providers/mistral.md @@ -49,7 +49,7 @@ All models listed here https://docs.mistral.ai/platform/endpoints are supported. | mistral-tiny | `completion(model="mistral/mistral-tiny", messages)` | | mistral-small | `completion(model="mistral/mistral-small", messages)` | | mistral-medium | `completion(model="mistral/mistral-medium", messages)` | - +| mistral-large-latest | `completion(model="mistral/mistral-large-latest", messages)` | ## Sample Usage - Embedding diff --git a/docs/my-website/docs/providers/ollama.md b/docs/my-website/docs/providers/ollama.md index 51d91ccb6fb..ec2a231e117 100644 --- a/docs/my-website/docs/providers/ollama.md +++ b/docs/my-website/docs/providers/ollama.md @@ -5,6 +5,12 @@ LiteLLM supports all models from [Ollama](https://github.com/jmorganca/ollama) Open In Colab +:::info + +We recommend using [ollama_chat](#using-ollama-apichat) for better responses. + +::: + ## Pre-requisites Ensure you have your ollama server running @@ -177,7 +183,7 @@ On the docker container run the `test.py` file using `python3 test.py` ```python import openai -api_base = f"http://0.0.0.0:8000" # base url for server +api_base = f"http://0.0.0.0:4000" # base url for server openai.api_base = api_base openai.api_key = "temp-key" diff --git a/docs/my-website/docs/providers/openai.md b/docs/my-website/docs/providers/openai.md index dd026661d88..aa42847b14f 100644 --- a/docs/my-website/docs/providers/openai.md +++ b/docs/my-website/docs/providers/openai.md @@ -93,6 +93,7 @@ response = completion( | Model Name | Function Call | |---------------------|----------------------------------------------------| | gpt-3.5-turbo-instruct | `response = completion(model="gpt-3.5-turbo-instruct", messages=messages)` | +| gpt-3.5-turbo-instruct-0914 | `response = completion(model="gpt-3.5-turbo-instruct-091", messages=messages)` | | text-davinci-003 | `response = completion(model="text-davinci-003", messages=messages)` | | ada-001 | `response = completion(model="ada-001", messages=messages)` | | curie-001 | `response = completion(model="curie-001", messages=messages)` | @@ -156,6 +157,19 @@ response_message = response.choices[0].message tool_calls = response.choices[0].message.tool_calls ``` +### Setting `extra_headers` for completion calls +```python +import os +from litellm import completion + +os.environ["OPENAI_API_KEY"] = "your-api-key" + +response = completion( + model = "gpt-3.5-turbo", + messages=[{ "content": "Hello, how are you?","role": "user"}], + extra_headers={"AI-Resource Group": "ishaan-resource"} +) +``` ### Setting Organization-ID for completion calls This can be set in one of the following ways: diff --git a/docs/my-website/docs/providers/openai_compatible.md b/docs/my-website/docs/providers/openai_compatible.md index ff68d7a000e..f86544c285d 100644 --- a/docs/my-website/docs/providers/openai_compatible.md +++ b/docs/my-website/docs/providers/openai_compatible.md @@ -6,42 +6,37 @@ To call models hosted behind an openai proxy, make 2 changes: 2. **Do NOT** add anything additional to the base url e.g. `/v1/embedding`. LiteLLM uses the openai-client to make these calls, and that automatically adds the relevant endpoints. -## Usage + +## Usage - completion +```python +import litellm +import os + +response = litellm.completion( + model="openai/mistral, # add `openai/` prefix to model so litellm knows to route to OpenAI + api_key="sk-1234", # api key to your openai compatible endpoint + api_base="http://0.0.0.0:4000", # set API Base of your Custom OpenAI Endpoint + messages=[ + { + "role": "user", + "content": "Hey, how's it going?", + } + ], +) +print(response) +``` + +## Usage - embedding ```python import litellm -from litellm import embedding -litellm.set_verbose = True import os - -litellm_proxy_endpoint = "http://0.0.0.0:8000" -bearer_token = "sk-1234" - -CHOSEN_LITE_LLM_EMBEDDING_MODEL = "openai/GPT-J 6B - Sagemaker Text Embedding (Internal)" - -litellm.set_verbose = False - -print(litellm_proxy_endpoint) - - - -response = embedding( - - model = CHOSEN_LITE_LLM_EMBEDDING_MODEL, # add `openai/` prefix to model so litellm knows to route to OpenAI - - api_key=bearer_token, - - api_base=litellm_proxy_endpoint, # set API Base of your Custom OpenAI Endpoint - - input=["good morning from litellm"], - - api_version='2023-07-01-preview' - +response = litellm.embedding( + model="openai/GPT-J", # add `openai/` prefix to model so litellm knows to route to OpenAI + api_key="sk-1234", # api key to your openai compatible endpoint + api_base="http://0.0.0.0:4000", # set API Base of your Custom OpenAI Endpoint + input=["good morning from litellm"] ) - -print('================================================') - -print(len(response.data[0]['embedding'])) - +print(response) ``` \ No newline at end of file diff --git a/docs/my-website/docs/providers/openrouter.md b/docs/my-website/docs/providers/openrouter.md index 4f966b5c9d9..09669c9f9ef 100644 --- a/docs/my-website/docs/providers/openrouter.md +++ b/docs/my-website/docs/providers/openrouter.md @@ -22,6 +22,8 @@ response = completion( ## OpenRouter Completion Models +🚨 LiteLLM supports ALL OpenRouter models, send `model=openrouter/` to send it to open router. See all openrouter models [here](https://openrouter.ai/models) + | Model Name | Function Call | |---------------------------|-----------------------------------------------------| | openrouter/openai/gpt-3.5-turbo | `completion('openrouter/openai/gpt-3.5-turbo', messages)` | `os.environ['OR_SITE_URL']`,`os.environ['OR_APP_NAME']`,`os.environ['OPENROUTER_API_KEY']` | diff --git a/docs/my-website/docs/providers/vertex.md b/docs/my-website/docs/providers/vertex.md index d44410ffc8c..fa18525ee19 100644 --- a/docs/my-website/docs/providers/vertex.md +++ b/docs/my-website/docs/providers/vertex.md @@ -1,3 +1,6 @@ +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + # VertexAI - Google [Gemini, Model Garden] @@ -22,8 +25,36 @@ response = litellm.completion(model="gemini-pro", messages=[{"role": "user", "co ## OpenAI Proxy Usage +Here's how to use Vertex AI with the LiteLLM Proxy Server + 1. Modify the config.yaml + + + + +Use this when you need to set a different location for each vertex model + +```yaml +model_list: + - model_name: gemini-vision + litellm_params: + model: vertex_ai/gemini-1.0-pro-vision-001 + vertex_project: "project-id" + vertex_location: "us-central1" + - model_name: gemini-vision + litellm_params: + model: vertex_ai/gemini-1.0-pro-vision-001 + vertex_project: "project-id2" + vertex_location: "us-east" +``` + + + + + +Use this when you have one vertex location for all models + ```yaml litellm_settings: vertex_project: "hardy-device-38811" # Your Project ID @@ -35,6 +66,10 @@ model_list: model: gemini-pro ``` + + + + 2. Start the proxy ```bash @@ -93,11 +128,19 @@ response = completion( |------------------|--------------------------------------| | gemini-pro | `completion('gemini-pro', messages)`, `completion('vertex_ai/gemini-pro', messages)` | +| Model Name | Function Call | +|------------------|--------------------------------------| +| gemini-1.5-pro | `completion('gemini-1.5-pro', messages)`, `completion('vertex_ai/gemini-pro', messages)` | + ## Gemini Pro Vision | Model Name | Function Call | |------------------|--------------------------------------| | gemini-pro-vision | `completion('gemini-pro-vision', messages)`, `completion('vertex_ai/gemini-pro-vision', messages)`| +| Model Name | Function Call | +|------------------|--------------------------------------| +| gemini-1.5-pro-vision | `completion('gemini-pro-vision', messages)`, `completion('vertex_ai/gemini-pro-vision', messages)`| + @@ -109,8 +152,14 @@ LiteLLM Supports the following image types passed in `url` - Images with Cloud Storage URIs - gs://cloud-samples-data/generative-ai/image/boats.jpeg - Images with direct links - https://storage.googleapis.com/github-repo/img/gemini/intro/landmark3.jpg - Videos with Cloud Storage URIs - https://storage.googleapis.com/github-repo/img/gemini/multimodality_usecases_overview/pixel8.mp4 +- Base64 Encoded Local Images + +**Example Request - image url** + + + + -**Example Request** ```python import litellm @@ -136,6 +185,43 @@ response = litellm.completion( ) print(response) ``` + + + + +```python +import litellm + +def encode_image(image_path): + import base64 + + with open(image_path, "rb") as image_file: + return base64.b64encode(image_file.read()).decode("utf-8") + +image_path = "cached_logo.jpg" +# Getting the base64 string +base64_image = encode_image(image_path) +response = litellm.completion( + model="vertex_ai/gemini-pro-vision", + messages=[ + { + "role": "user", + "content": [ + {"type": "text", "text": "Whats in this image?"}, + { + "type": "image_url", + "image_url": { + "url": "data:image/jpeg;base64," + base64_image + }, + }, + ], + } + ], +) +print(response) +``` + + ## Chat Models diff --git a/docs/my-website/docs/proxy/alerting.md b/docs/my-website/docs/proxy/alerting.md index e99f435248a..feb54babd2e 100644 --- a/docs/my-website/docs/proxy/alerting.md +++ b/docs/my-website/docs/proxy/alerting.md @@ -33,12 +33,16 @@ general_settings: alerting: ["slack"] alerting_threshold: 300 # sends alerts if requests hang for 5min+ and responses take 5min+ -environment_variables: - SLACK_WEBHOOK_URL: "https://hooks.slack.com/services/<>/<>/<>" +``` + +Set `SLACK_WEBHOOK_URL` in your proxy env + +```shell +SLACK_WEBHOOK_URL: "https://hooks.slack.com/services/<>/<>/<>" ``` ### Step 3: Start proxy ```bash -$ litellm /path/to/config.yaml +$ litellm --config /path/to/config.yaml ``` \ No newline at end of file diff --git a/docs/my-website/docs/proxy/budget_alerts.md b/docs/my-website/docs/proxy/budget_alerts.md new file mode 100644 index 00000000000..659cd6d597e --- /dev/null +++ b/docs/my-website/docs/proxy/budget_alerts.md @@ -0,0 +1,61 @@ +import Image from '@theme/IdealImage'; + +# 🚨 Budget Alerting + +**Alerts when a project will exceed it’s planned limit** + + + +## Quick Start + +### 1. Setup Slack Alerting on your Proxy Config.yaml + +**Add Slack Webhook to your env** +Get a slack webhook url from https://api.slack.com/messaging/webhooks + + +Set `SLACK_WEBHOOK_URL` in your proxy env + +```shell +export SLACK_WEBHOOK_URL="https://hooks.slack.com/services/<>/<>/<>" +``` + +**Update proxy config.yaml with slack alerting** + +Add `general_settings:alerting` +```yaml +model_list: + model_name: "azure-model" + litellm_params: + model: "azure/gpt-35-turbo" + +general_settings: + alerting: ["slack"] +``` + + + +Start proxy +```bash +$ litellm --config /path/to/config.yaml +``` + + +### 2. Create API Key on Proxy Admin UI +The Admin UI is found on `your-litellm-proxy-endpoint/ui`, example `http://localhost:4000/ui/` + +- Set a key name +- Set a Soft Budget on when to get alerted + + + + +### 3. Test Slack Alerting on Admin UI +After creating a key on the Admin UI, click on "Test Slack Alert" to send a test alert to your Slack channel + + +### 4. Check Slack + +When the test alert works, you should expect to see this on your alerts slack channel + + \ No newline at end of file diff --git a/docs/my-website/docs/proxy/caching.md b/docs/my-website/docs/proxy/caching.md index ee4874caf5e..4f1ce18f343 100644 --- a/docs/my-website/docs/proxy/caching.md +++ b/docs/my-website/docs/proxy/caching.md @@ -145,7 +145,7 @@ $ litellm --config /path/to/config.yaml Send the same request twice: ```shell -curl http://0.0.0.0:8000/v1/chat/completions \ +curl http://0.0.0.0:4000/v1/chat/completions \ -H "Content-Type: application/json" \ -d '{ "model": "gpt-3.5-turbo", @@ -153,7 +153,7 @@ curl http://0.0.0.0:8000/v1/chat/completions \ "temperature": 0.7 }' -curl http://0.0.0.0:8000/v1/chat/completions \ +curl http://0.0.0.0:4000/v1/chat/completions \ -H "Content-Type: application/json" \ -d '{ "model": "gpt-3.5-turbo", @@ -166,14 +166,14 @@ curl http://0.0.0.0:8000/v1/chat/completions \ Send the same request twice: ```shell -curl --location 'http://0.0.0.0:8000/embeddings' \ +curl --location 'http://0.0.0.0:4000/embeddings' \ --header 'Content-Type: application/json' \ --data ' { "model": "text-embedding-ada-002", "input": ["write a litellm poem"] }' -curl --location 'http://0.0.0.0:8000/embeddings' \ +curl --location 'http://0.0.0.0:4000/embeddings' \ --header 'Content-Type: application/json' \ --data ' { "model": "text-embedding-ada-002", @@ -227,7 +227,7 @@ from openai import OpenAI client = OpenAI( # This is the default and can be omitted api_key=os.environ.get("OPENAI_API_KEY"), - base_url="http://0.0.0.0:8000" + base_url="http://0.0.0.0:4000" ) chat_completion = client.chat.completions.create( @@ -255,7 +255,7 @@ from openai import OpenAI client = OpenAI( # This is the default and can be omitted api_key=os.environ.get("OPENAI_API_KEY"), - base_url="http://0.0.0.0:8000" + base_url="http://0.0.0.0:4000" ) chat_completion = client.chat.completions.create( @@ -281,7 +281,7 @@ from openai import OpenAI client = OpenAI( # This is the default and can be omitted api_key=os.environ.get("OPENAI_API_KEY"), - base_url="http://0.0.0.0:8000" + base_url="http://0.0.0.0:4000" ) chat_completion = client.chat.completions.create( diff --git a/docs/my-website/docs/proxy/call_hooks.md b/docs/my-website/docs/proxy/call_hooks.md index b00f4e30179..9d4d1112e5d 100644 --- a/docs/my-website/docs/proxy/call_hooks.md +++ b/docs/my-website/docs/proxy/call_hooks.md @@ -63,7 +63,7 @@ litellm_settings: $ litellm /path/to/config.yaml ``` ```shell -curl --location 'http://0.0.0.0:8000/chat/completions' \ +curl --location 'http://0.0.0.0:4000/chat/completions' \ --data ' { "model": "gpt-3.5-turbo", "messages": [ @@ -162,7 +162,7 @@ litellm_settings: $ litellm /path/to/config.yaml ``` ```shell -curl --location 'http://0.0.0.0:8000/chat/completions' \ +curl --location 'http://0.0.0.0:4000/chat/completions' \ --data ' { "model": "gpt-3.5-turbo", "messages": [ diff --git a/docs/my-website/docs/proxy/cli.md b/docs/my-website/docs/proxy/cli.md index d366f1f6be7..28b210b16ad 100644 --- a/docs/my-website/docs/proxy/cli.md +++ b/docs/my-website/docs/proxy/cli.md @@ -15,7 +15,7 @@ Cli arguments, --host, --port, --num_workers ``` ## --port - - **Default:** `8000` + - **Default:** `4000` - The port to bind the server to. - **Usage:** ```shell diff --git a/docs/my-website/docs/proxy/configs.md b/docs/my-website/docs/proxy/configs.md index e9fd4cda4be..68b49502d64 100644 --- a/docs/my-website/docs/proxy/configs.md +++ b/docs/my-website/docs/proxy/configs.md @@ -13,7 +13,7 @@ Set model list, `api_base`, `api_key`, `temperature` & proxy server settings (`m | `general_settings` | Server settings, example setting `master_key: sk-my_special_key` | | `environment_variables` | Environment Variables example, `REDIS_HOST`, `REDIS_PORT` | -**Complete List:** Check the Swagger UI docs on `/#/config.yaml` (e.g. http://0.0.0.0:8000/#/config.yaml), for everything you can pass in the config.yaml. +**Complete List:** Check the Swagger UI docs on `/#/config.yaml` (e.g. http://0.0.0.0:4000/#/config.yaml), for everything you can pass in the config.yaml. ## Quick Start @@ -49,13 +49,13 @@ model_list: rpm: 6 - model_name: anthropic-claude litellm_params: - model="bedrock/anthropic.claude-instant-v1" + model: bedrock/anthropic.claude-instant-v1 ### [OPTIONAL] SET AWS REGION ### - aws_region_name="us-east-1" + aws_region_name: us-east-1 - model_name: vllm-models litellm_params: model: openai/facebook/opt-125m # the `openai/` prefix tells litellm it's openai compatible - api_base: http://0.0.0.0:8000 + api_base: http://0.0.0.0:4000 rpm: 1440 model_info: version: 2 @@ -91,7 +91,7 @@ Sends request to model where `model_name=gpt-3.5-turbo` on config.yaml. If multiple with `model_name=gpt-3.5-turbo` does [Load Balancing](https://docs.litellm.ai/docs/proxy/load_balancing) ```shell -curl --location 'http://0.0.0.0:8000/chat/completions' \ +curl --location 'http://0.0.0.0:4000/chat/completions' \ --header 'Content-Type: application/json' \ --data ' { "model": "gpt-3.5-turbo", @@ -111,7 +111,7 @@ curl --location 'http://0.0.0.0:8000/chat/completions' \ Sends this request to model where `model_name=bedrock-claude-v1` on config.yaml ```shell -curl --location 'http://0.0.0.0:8000/chat/completions' \ +curl --location 'http://0.0.0.0:4000/chat/completions' \ --header 'Content-Type: application/json' \ --data ' { "model": "bedrock-claude-v1", @@ -131,7 +131,7 @@ curl --location 'http://0.0.0.0:8000/chat/completions' \ import openai client = openai.OpenAI( api_key="anything", - base_url="http://0.0.0.0:8000" + base_url="http://0.0.0.0:4000" ) # Sends request to model where `model_name=gpt-3.5-turbo` on config.yaml. @@ -179,7 +179,7 @@ messages = [ # Sends request to model where `model_name=gpt-3.5-turbo` on config.yaml. chat = ChatOpenAI( - openai_api_base="http://0.0.0.0:8000", # set openai base to the proxy + openai_api_base="http://0.0.0.0:4000", # set openai base to the proxy model = "gpt-3.5-turbo", temperature=0.1 ) @@ -189,7 +189,7 @@ print(response) # Sends request to model where `model_name=bedrock-claude-v1` on config.yaml. claude_chat = ChatOpenAI( - openai_api_base="http://0.0.0.0:8000", # set openai base to the proxy + openai_api_base="http://0.0.0.0:4000", # set openai base to the proxy model = "bedrock-claude-v1", temperature=0.1 ) @@ -202,7 +202,7 @@ print(response) -## Save Model-specific params (API Base, API Keys, Temperature, Max Tokens, Seed, Organization, Headers etc.) +## Save Model-specific params (API Base, Keys, Temperature, Max Tokens, Organization, Headers etc.) You can use the config to save model-specific information like api_base, api_key, temperature, max_tokens, etc. [**All input params**](https://docs.litellm.ai/docs/completion/input#input-params-1) @@ -227,6 +227,7 @@ model_list: - model_name: openai-gpt-3.5 litellm_params: model: openai/gpt-3.5-turbo + extra_headers: {"AI-Resource Group": "ishaan-resource"} api_key: sk-123 organization: org-ikDc4ex8NB temperature: 0.2 @@ -234,10 +235,6 @@ model_list: litellm_params: model: ollama/mistral api_base: your_ollama_api_base - headers: { - "HTTP-Referer": "litellm.ai", - "X-Title": "LiteLLM Server" - } ``` **Step 2**: Start server with config @@ -247,6 +244,68 @@ $ litellm --config /path/to/config.yaml ``` +## Load Balancing + +Use this to call multiple instances of the same model and configure things like [routing strategy](../routing.md#advanced). + +For optimal performance: +- Set `tpm/rpm` per model deployment. Weighted picks are then based on the established tpm/rpm. +- Select your optimal routing strategy in `router_settings:routing_strategy`. + +LiteLLM supports +```python +["simple-shuffle", "least-busy", "usage-based-routing","latency-based-routing"], default="simple-shuffle"` +``` + +When `tpm/rpm` is set + `routing_strategy==simple-shuffle` litellm will use a weighted pick based on set tpm/rpm. **In our load tests setting tpm/rpm for all deployments + `routing_strategy==simple-shuffle` maximized throughput** +- When using multiple LiteLLM Servers / Kubernetes set redis settings `router_settings:redis_host` etc + +```yaml +model_list: + - model_name: zephyr-beta + litellm_params: + model: huggingface/HuggingFaceH4/zephyr-7b-beta + api_base: http://0.0.0.0:8001 + rpm: 60 # Optional[int]: When rpm/tpm set - litellm uses weighted pick for load balancing. rpm = Rate limit for this deployment: in requests per minute (rpm). + tpm: 1000 # Optional[int]: tpm = Tokens Per Minute + - model_name: zephyr-beta + litellm_params: + model: huggingface/HuggingFaceH4/zephyr-7b-beta + api_base: http://0.0.0.0:8002 + rpm: 600 + - model_name: zephyr-beta + litellm_params: + model: huggingface/HuggingFaceH4/zephyr-7b-beta + api_base: http://0.0.0.0:8003 + rpm: 60000 + - model_name: gpt-3.5-turbo + litellm_params: + model: gpt-3.5-turbo + api_key: + rpm: 200 + - model_name: gpt-3.5-turbo-16k + litellm_params: + model: gpt-3.5-turbo-16k + api_key: + rpm: 100 + +litellm_settings: + num_retries: 3 # retry call 3 times on each model_name (e.g. zephyr-beta) + request_timeout: 10 # raise Timeout error if call takes longer than 10s. Sets litellm.request_timeout + fallbacks: [{"zephyr-beta": ["gpt-3.5-turbo"]}] # fallback to gpt-3.5-turbo if call fails num_retries + context_window_fallbacks: [{"zephyr-beta": ["gpt-3.5-turbo-16k"]}, {"gpt-3.5-turbo": ["gpt-3.5-turbo-16k"]}] # fallback to gpt-3.5-turbo-16k if context window error + allowed_fails: 3 # cooldown model if it fails > 1 call in a minute. + +router_settings: # router_settings are optional + routing_strategy: simple-shuffle # Literal["simple-shuffle", "least-busy", "usage-based-routing","latency-based-routing"], default="simple-shuffle" + model_group_alias: {"gpt-4": "gpt-3.5-turbo"} # all requests with `gpt-4` will be routed to models with `gpt-3.5-turbo` + num_retries: 2 + timeout: 30 # 30 seconds + redis_host: # set this when using multiple litellm proxy deployments, load balancing state stored in redis + redis_password: + redis_port: 1992 +``` + ## Set Azure `base_model` for cost tracking **Problem**: Azure returns `gpt-4` in the response when `azure/gpt-4-1106-preview` is used. This leads to inaccurate cost tracking @@ -501,7 +560,7 @@ litellm --config config.yaml Sends Request to `bedrock-cohere` ```shell -curl --location 'http://0.0.0.0:8000/chat/completions' \ +curl --location 'http://0.0.0.0:4000/chat/completions' \ --header 'Content-Type: application/json' \ --data ' { "model": "bedrock-cohere", @@ -515,30 +574,6 @@ curl --location 'http://0.0.0.0:8000/chat/completions' \ ``` -## Router Settings - -Use this to configure things like routing strategy. - -```yaml -router_settings: - routing_strategy: "least-busy" - -model_list: # will route requests to the least busy ollama model - - model_name: ollama-models - litellm_params: - model: "ollama/mistral" - api_base: "http://127.0.0.1:8001" - - model_name: ollama-models - litellm_params: - model: "ollama/codellama" - api_base: "http://127.0.0.1:8002" - - model_name: ollama-models - litellm_params: - model: "ollama/llama2" - api_base: "http://127.0.0.1:8003" -``` - - ## Configure DB Pool Limits + Connection Timeouts ```yaml diff --git a/docs/my-website/docs/proxy/deploy.md b/docs/my-website/docs/proxy/deploy.md index 7ad7d8387db..175806d274c 100644 --- a/docs/my-website/docs/proxy/deploy.md +++ b/docs/my-website/docs/proxy/deploy.md @@ -28,7 +28,7 @@ docker run ghcr.io/berriai/litellm:main-latest -### Run with LiteLLM CLI args +#### Run with LiteLLM CLI args See all supported CLI args [here](https://docs.litellm.ai/docs/proxy/cli): @@ -68,8 +68,87 @@ CMD ["--port", "4000", "--config", "config.yaml", "--detailed_debug", "--run_gun + + +Deploying a config file based litellm instance just requires a simple deployment that loads +the config.yaml file via a config map. Also it would be a good practice to use the env var +declaration for api keys, and attach the env vars with the api key values as an opaque secret. + +```yaml +apiVersion: v1 +kind: ConfigMap +metadata: + name: litellm-config-file +data: + config.yaml: | + model_list: + - model_name: gpt-3.5-turbo + litellm_params: + model: azure/gpt-turbo-small-ca + api_base: https://my-endpoint-canada-berri992.openai.azure.com/ + api_key: os.environ/CA_AZURE_OPENAI_API_KEY +--- +apiVersion: v1 +kind: Secret +type: Opaque +metadata: + name: litellm-secrets +data: + CA_AZURE_OPENAI_API_KEY: bWVvd19pbV9hX2NhdA== # your api key in base64 +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: litellm-deployment + labels: + app: litellm +spec: + selector: + matchLabels: + app: litellm + template: + metadata: + labels: + app: litellm + spec: + containers: + - name: litellm + image: ghcr.io/berriai/litellm:main-latest # it is recommended to fix a version generally + ports: + - containerPort: 4000 + volumeMounts: + - name: config-volume + mountPath: /app/proxy_server_config.yaml + subPath: config.yaml + envFrom: + - secretRef: + name: litellm-secrets + volumes: + - name: config-volume + configMap: + name: litellm-config-file +``` + +:::info +To avoid issues with predictability, difficulties in rollback, and inconsistent environments, use versioning or SHA digests (for example, `litellm:main-v1.30.3` or `litellm@sha256:12345abcdef...`) instead of `litellm:main-latest`. +::: + + + +**That's it ! That's the quick start to deploy litellm** + +## Options to deploy LiteLLM + +| Docs | When to Use | +| --- | --- | +| [Quick Start](#quick-start) | call 100+ LLMs + Load Balancing | +| [Deploy with Database](#deploy-with-database) | + use Virtual Keys + Track Spend | +| [LiteLLM container + Redis](#litellm-container--redis) | + load balance across multiple litellm containers | +| [LiteLLM Database container + PostgresDB + Redis](#litellm-database-container--postgresdb--redis) | + use Virtual Keys + Track Spend + load balance across multiple litellm containers | + + ## Deploy with Database We maintain a [seperate Dockerfile](https://github.com/BerriAI/litellm/pkgs/container/litellm-database) for reducing build time when running LiteLLM proxy with a connected Postgres Database @@ -93,7 +172,7 @@ Your OpenAI proxy server is now running on `http://0.0.0.0:4000`. -### Step 1. Create deployment.yaml +#### Step 1. Create deployment.yaml ```yaml apiVersion: apps/v1 @@ -122,7 +201,7 @@ Your OpenAI proxy server is now running on `http://0.0.0.0:4000`. kubectl apply -f /path/to/deployment.yaml ``` -### Step 2. Create service.yaml +#### Step 2. Create service.yaml ```yaml apiVersion: v1 @@ -143,7 +222,7 @@ spec: kubectl apply -f /path/to/service.yaml ``` -### Step 3. Start server +#### Step 3. Start server ``` kubectl port-forward service/litellm-service 4000:4000 @@ -154,13 +233,13 @@ Your OpenAI proxy server is now running on `http://0.0.0.0:4000`. -### Step 1. Clone the repository +#### Step 1. Clone the repository ```bash git clone https://github.com/BerriAI/litellm.git ``` -### Step 2. Deploy with Helm +#### Step 2. Deploy with Helm ```bash helm install \ @@ -169,20 +248,91 @@ helm install \ deploy/charts/litellm ``` -### Step 3. Expose the service to localhost +#### Step 3. Expose the service to localhost ```bash kubectl \ port-forward \ service/mydeploy-litellm \ - 8000:8000 + 4000:4000 ``` -Your OpenAI proxy server is now running on `http://127.0.0.1:8000`. +Your OpenAI proxy server is now running on `http://127.0.0.1:4000`. +## LiteLLM container + Redis +Use Redis when you need litellm to load balance across multiple litellm containers + +The only change required is setting Redis on your `config.yaml` +LiteLLM Proxy supports sharing rpm/tpm shared across multiple litellm instances, pass `redis_host`, `redis_password` and `redis_port` to enable this. (LiteLLM will use Redis to track rpm/tpm usage ) + +```yaml +model_list: + - model_name: gpt-3.5-turbo + litellm_params: + model: azure/ + api_base: + api_key: + rpm: 6 # Rate limit for this deployment: in requests per minute (rpm) + - model_name: gpt-3.5-turbo + litellm_params: + model: azure/gpt-turbo-small-ca + api_base: https://my-endpoint-canada-berri992.openai.azure.com/ + api_key: + rpm: 6 +router_settings: + redis_host: + redis_password: + redis_port: 1992 +``` + +Start docker container with config + +```shell +docker run ghcr.io/berriai/litellm:main-latest --config your_config.yaml +``` + +## LiteLLM Database container + PostgresDB + Redis + +The only change required is setting Redis on your `config.yaml` +LiteLLM Proxy supports sharing rpm/tpm shared across multiple litellm instances, pass `redis_host`, `redis_password` and `redis_port` to enable this. (LiteLLM will use Redis to track rpm/tpm usage ) + + +```yaml +model_list: + - model_name: gpt-3.5-turbo + litellm_params: + model: azure/ + api_base: + api_key: + rpm: 6 # Rate limit for this deployment: in requests per minute (rpm) + - model_name: gpt-3.5-turbo + litellm_params: + model: azure/gpt-turbo-small-ca + api_base: https://my-endpoint-canada-berri992.openai.azure.com/ + api_key: + rpm: 6 +router_settings: + redis_host: + redis_password: + redis_port: 1992 +``` + +Start `litellm-database`docker container with config + +```shell +docker run --name litellm-proxy \ +-e DATABASE_URL=postgresql://:@:/ \ +-p 4000:4000 \ +ghcr.io/berriai/litellm-database:main-latest --config your_config.yaml +``` + +## Best Practices for Deploying to Production +### 1. Switch of debug logs in production +don't use [`--detailed-debug`, `--debug`](https://docs.litellm.ai/docs/proxy/debugging#detailed-debug) or `litellm.set_verbose=True`. We found using debug logs can add 5-10% latency per LLM API call + ## Advanced Deployment Settings ### Customization of the server root path @@ -214,8 +364,49 @@ Provide an ssl certificate when starting litellm proxy server ## Platform-specific Guide - + + + +### AWS Cloud Formation Stack +LiteLLM AWS Cloudformation Stack - **Get the best LiteLLM AutoScaling Policy and Provision the DB for LiteLLM Proxy** + +This will provision: +- LiteLLMServer - EC2 Instance +- LiteLLMServerAutoScalingGroup +- LiteLLMServerScalingPolicy (autoscaling policy) +- LiteLLMDB - RDS::DBInstance + +#### Using AWS Cloud Formation Stack +**LiteLLM Cloudformation stack is located [here - litellm.yaml](https://github.com/BerriAI/litellm/blob/main/enterprise/cloudformation_stack/litellm.yaml)** + +#### 1. Create the CloudFormation Stack: +In the AWS Management Console, navigate to the CloudFormation service, and click on "Create Stack." + +On the "Create Stack" page, select "Upload a template file" and choose the litellm.yaml file + +Now monitor the stack was created successfully. + +#### 2. Get the Database URL: +Once the stack is created, get the DatabaseURL of the Database resource, copy this value + +#### 3. Connect to the EC2 Instance and deploy litellm on the EC2 container +From the EC2 console, connect to the instance created by the stack (e.g., using SSH). + +Run the following command, replacing with the value you copied in step 2 + +```shell +docker run --name litellm-proxy \ + -e DATABASE_URL= \ + -p 4000:4000 \ + ghcr.io/berriai/litellm-database:main-latest +``` + +#### 4. Access the Application: + +Once the container is running, you can access the application by going to `http://:4000` in your browser. + + ### Deploy on Google Cloud Run @@ -269,9 +460,7 @@ curl https://litellm-7yjrj3ha2q-uc.a.run.app/v1/chat/completions \ **Step 1** -- (Recommended) Use the example file `docker-compose.example.yml` given in the project root. e.g. https://github.com/BerriAI/litellm/blob/main/docker-compose.example.yml - -- Rename the file `docker-compose.example.yml` to `docker-compose.yml`. +- (Recommended) Use the example file `docker-compose.yml` given in the project root. e.g. https://github.com/BerriAI/litellm/blob/main/docker-compose.yml Here's an example `docker-compose.yml` file ```yaml @@ -284,11 +473,11 @@ services: target: runtime image: ghcr.io/berriai/litellm:main-latest ports: - - "8000:8000" # Map the container port to the host, change the host port if necessary + - "4000:4000" # Map the container port to the host, change the host port if necessary volumes: - ./litellm-config.yaml:/app/config.yaml # Mount the local configuration file # You can change the port or number of workers as per your requirements or pass any new supported CLI augument. Make sure the port passed here matches with the container port defined above in `ports` value - command: [ "--config", "/app/config.yaml", "--port", "8000", "--num_workers", "8" ] + command: [ "--config", "/app/config.yaml", "--port", "4000", "--num_workers", "8" ] # ...rest of your docker-compose config if any ``` @@ -306,18 +495,4 @@ Run the command `docker-compose up` or `docker compose up` as per your docker in > Use `-d` flag to run the container in detached mode (background) e.g. `docker compose up -d` -Your LiteLLM container should be running now on the defined port e.g. `8000`. - - - -## LiteLLM Proxy Performance - -LiteLLM proxy has been load tested to handle 1500 req/s. - -### Throughput - 30% Increase -LiteLLM proxy + Load Balancer gives **30% increase** in throughput compared to Raw OpenAI API - - -### Latency Added - 0.00325 seconds -LiteLLM proxy adds **0.00325 seconds** latency as compared to using the Raw OpenAI API - +Your LiteLLM container should be running now on the defined port e.g. `4000`. diff --git a/docs/my-website/docs/proxy/embedding.md b/docs/my-website/docs/proxy/embedding.md index 0f3a01a9043..2adaaa24735 100644 --- a/docs/my-website/docs/proxy/embedding.md +++ b/docs/my-website/docs/proxy/embedding.md @@ -38,7 +38,7 @@ $ litellm --config /path/to/config.yaml 3. Test the embedding call ```shell -curl --location 'http://0.0.0.0:8000/v1/embeddings' \ +curl --location 'http://0.0.0.0:4000/v1/embeddings' \ --header 'Authorization: Bearer sk-1234' \ --header 'Content-Type: application/json' \ --data '{ diff --git a/docs/my-website/docs/proxy/enterprise.md b/docs/my-website/docs/proxy/enterprise.md index 0ce1b8800c8..93786eff428 100644 --- a/docs/my-website/docs/proxy/enterprise.md +++ b/docs/my-website/docs/proxy/enterprise.md @@ -1,7 +1,7 @@ import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; -# ✨ Enterprise Features - Content Moderation +# ✨ Enterprise Features - End-user Opt-out, Content Mod Features here are behind a commercial license in our `/enterprise` folder. [**See Code**](https://github.com/BerriAI/litellm/tree/main/enterprise) @@ -12,12 +12,16 @@ Features here are behind a commercial license in our `/enterprise` folder. [**Se ::: Features: -- [ ] Content Moderation with LlamaGuard -- [ ] Content Moderation with Google Text Moderations -- [ ] Content Moderation with LLM Guard -- [ ] Tracking Spend for Custom Tags +- ✅ Content Moderation with LlamaGuard +- ✅ Content Moderation with Google Text Moderations +- ✅ Content Moderation with LLM Guard +- ✅ Reject calls from Blocked User list +- ✅ Reject calls (incoming / outgoing) with Banned Keywords (e.g. competitors) +- ✅ Don't log/store specific requests (eg confidential LLM requests) +- ✅ Tracking Spend for Custom Tags -## Content Moderation with LlamaGuard +## Content Moderation +### Content Moderation with LlamaGuard Currently works with Sagemaker's LlamaGuard endpoint. @@ -37,7 +41,7 @@ os.environ["AWS_SECRET_ACCESS_KEY"] = "" os.environ["AWS_REGION_NAME"] = "" ``` -### Customize LlamaGuard prompt +#### Customize LlamaGuard prompt To modify the unsafe categories llama guard evaluates against, just create your own version of [this category list](https://github.com/BerriAI/litellm/blob/main/litellm/proxy/llamaguard_prompt.txt) @@ -49,12 +53,12 @@ callbacks: ["llamaguard_moderations"] llamaguard_unsafe_content_categories: /path/to/llamaguard_prompt.txt ``` -## Content Moderation with LLM Guard +### Content Moderation with LLM Guard Set the LLM Guard API Base in your environment ```env -LLM_GUARD_API_BASE = "http://0.0.0.0:8000" +LLM_GUARD_API_BASE = "http://0.0.0.0:4000" ``` Add `llmguard_moderations` as a callback @@ -76,7 +80,7 @@ Expected results: LLM Guard: Received response - {"sanitized_prompt": "hello world", "is_valid": true, "scanners": { "Regex": 0.0 }} ``` -## Content Moderation with Google Text Moderation +### Content Moderation with Google Text Moderation Requires your GOOGLE_APPLICATION_CREDENTIALS to be set in your .env (same as VertexAI). @@ -87,7 +91,7 @@ litellm_settings: callbacks: ["google_text_moderation"] ``` -### Set custom confidence thresholds +#### Set custom confidence thresholds Google Moderations checks the test against several categories. [Source](https://cloud.google.com/natural-language/docs/moderating-text#safety_attribute_confidence_scores) @@ -131,7 +135,114 @@ Here are the category specific values: | "legal" | legal_threshold: 0.1 | +## Incognito Requests - Don't log anything +When `no-log=True`, the request will **not be logged on any callbacks** and there will be **no server logs on litellm** + +```python +import openai +client = openai.OpenAI( + api_key="anything", # proxy api-key + base_url="http://0.0.0.0:4000" # litellm proxy +) + +response = client.chat.completions.create( + model="gpt-3.5-turbo", + messages = [ + { + "role": "user", + "content": "this is a test request, write a short poem" + } + ], + extra_body={ + "no-log": True + } +) + +print(response) +``` + + +## Enable Blocked User Lists +If any call is made to proxy with this user id, it'll be rejected - use this if you want to let users opt-out of ai features + +```yaml +litellm_settings: + callbacks: ["blocked_user_check"] + blocked_user_id_list: ["user_id_1", "user_id_2", ...] # can also be a .txt filepath e.g. `/relative/path/blocked_list.txt` +``` + +### How to test + +```bash +curl --location 'http://0.0.0.0:4000/chat/completions' \ +--header 'Content-Type: application/json' \ +--data ' { + "model": "gpt-3.5-turbo", + "messages": [ + { + "role": "user", + "content": "what llm are you" + } + ], + "user_id": "user_id_1" # this is also an openai supported param + } +' +``` + +:::info + +[Suggest a way to improve this](https://github.com/BerriAI/litellm/issues/new/choose) + +::: + +### Using via API + + +**Block all calls for a user id** + +``` +curl -X POST "http://0.0.0.0:4000/user/block" \ +-H "Authorization: Bearer sk-1234" \ +-D '{ +"user_ids": [, ...] +}' +``` + +**Unblock calls for a user id** + +``` +curl -X POST "http://0.0.0.0:4000/user/unblock" \ +-H "Authorization: Bearer sk-1234" \ +-D '{ +"user_ids": [, ...] +}' +``` + +## Enable Banned Keywords List + +```yaml +litellm_settings: + callbacks: ["banned_keywords"] + banned_keywords_list: ["hello"] # can also be a .txt file - e.g.: `/relative/path/keywords.txt` +``` + +### Test this + +```bash +curl --location 'http://0.0.0.0:4000/chat/completions' \ +--header 'Content-Type: application/json' \ +--data ' { + "model": "gpt-3.5-turbo", + "messages": [ + { + "role": "user", + "content": "Hello world!" + } + ] + } +' +``` ## Tracking Spend for Custom Tags Requirements: @@ -152,7 +263,7 @@ Set `extra_body={"metadata": { }}` to `metadata` you want to pass import openai client = openai.OpenAI( api_key="anything", - base_url="http://0.0.0.0:8000" + base_url="http://0.0.0.0:4000" ) # request sent to model set on litellm proxy, `litellm --model` @@ -180,7 +291,7 @@ print(response) Pass `metadata` as part of the request body ```shell -curl --location 'http://0.0.0.0:8000/chat/completions' \ +curl --location 'http://0.0.0.0:4000/chat/completions' \ --header 'Content-Type: application/json' \ --data '{ "model": "gpt-3.5-turbo", @@ -206,7 +317,7 @@ from langchain.prompts.chat import ( from langchain.schema import HumanMessage, SystemMessage chat = ChatOpenAI( - openai_api_base="http://0.0.0.0:8000", + openai_api_base="http://0.0.0.0:4000", model = "gpt-3.5-turbo", temperature=0.1, extra_body={ diff --git a/docs/my-website/docs/proxy/health.md b/docs/my-website/docs/proxy/health.md index 4cd119e484a..03dd917315c 100644 --- a/docs/my-website/docs/proxy/health.md +++ b/docs/my-website/docs/proxy/health.md @@ -12,10 +12,10 @@ The proxy exposes: #### Request Make a GET Request to `/health` on the proxy ```shell -curl --location 'http://0.0.0.0:8000/health' +curl --location 'http://0.0.0.0:4000/health' -H "Authorization: Bearer sk-1234" ``` -You can also run `litellm -health` it makes a `get` request to `http://0.0.0.0:8000/health` for you +You can also run `litellm -health` it makes a `get` request to `http://0.0.0.0:4000/health` for you ``` litellm --health ``` @@ -60,7 +60,7 @@ $ litellm /path/to/config.yaml 3. Query health endpoint: ``` -curl --location 'http://0.0.0.0:8000/health' +curl --location 'http://0.0.0.0:4000/health' ``` ### Embedding Models @@ -119,7 +119,7 @@ Unprotected endpoint for checking if proxy is ready to accept requests Example Request: ```bash -curl --location 'http://0.0.0.0:8000/health/readiness' +curl --location 'http://0.0.0.0:4000/health/readiness' ``` Example Response: @@ -153,7 +153,7 @@ Example Request: ``` curl -X 'GET' \ - 'http://0.0.0.0:8000/health/liveliness' \ + 'http://0.0.0.0:4000/health/liveliness' \ -H 'accept: application/json' ``` diff --git a/docs/my-website/docs/proxy/load_balancing.md b/docs/my-website/docs/proxy/load_balancing.md index bc40ff2c775..691592cb65b 100644 --- a/docs/my-website/docs/proxy/load_balancing.md +++ b/docs/my-website/docs/proxy/load_balancing.md @@ -1,7 +1,15 @@ -# Multiple Instances of 1 model +# Load Balancing - Config Setup Load balance multiple instances of the same model The proxy will handle routing requests (using LiteLLM's Router). **Set `rpm` in the config if you want maximize throughput** + + +:::info + +For more details on routing strategies / params, see [Routing](../routing.md) + +::: + ## Quick Start - Load Balancing ### Step 1 - Set deployments on config @@ -37,7 +45,7 @@ $ litellm --config /path/to/config.yaml ### Step 3: Use proxy - Call a model group [Load Balancing] Curl Command ```shell -curl --location 'http://0.0.0.0:8000/chat/completions' \ +curl --location 'http://0.0.0.0:4000/chat/completions' \ --header 'Content-Type: application/json' \ --data ' { "model": "gpt-3.5-turbo", @@ -57,7 +65,7 @@ If you want to call a specific model defined in the `config.yaml`, you can call In this example it will call `azure/gpt-turbo-small-ca`. Defined in the config on Step 1 ```bash -curl --location 'http://0.0.0.0:8000/chat/completions' \ +curl --location 'http://0.0.0.0:4000/chat/completions' \ --header 'Content-Type: application/json' \ --data ' { "model": "azure/gpt-turbo-small-ca", @@ -71,6 +79,32 @@ curl --location 'http://0.0.0.0:8000/chat/completions' \ ' ``` +## Load Balancing using multiple litellm instances (Kubernetes, Auto Scaling) + +LiteLLM Proxy supports sharing rpm/tpm shared across multiple litellm instances, pass `redis_host`, `redis_password` and `redis_port` to enable this. (LiteLLM will use Redis to track rpm/tpm usage ) + +Example config + +```yaml +model_list: + - model_name: gpt-3.5-turbo + litellm_params: + model: azure/ + api_base: + api_key: + rpm: 6 # Rate limit for this deployment: in requests per minute (rpm) + - model_name: gpt-3.5-turbo + litellm_params: + model: azure/gpt-turbo-small-ca + api_base: https://my-endpoint-canada-berri992.openai.azure.com/ + api_key: + rpm: 6 +router_settings: + redis_host: + redis_password: + redis_port: 1992 +``` + ## Router settings on config - routing_strategy, model_group_alias litellm.Router() settings can be set under `router_settings`. You can set `model_group_alias`, `routing_strategy`, `num_retries`,`timeout` . See all Router supported params [here](https://github.com/BerriAI/litellm/blob/1b942568897a48f014fa44618ec3ce54d7570a46/litellm/router.py#L64) @@ -95,4 +129,7 @@ router_settings: routing_strategy: least-busy # Literal["simple-shuffle", "least-busy", "usage-based-routing", "latency-based-routing"] num_retries: 2 timeout: 30 # 30 seconds + redis_host: + redis_password: + redis_port: 1992 ``` \ No newline at end of file diff --git a/docs/my-website/docs/proxy/logging.md b/docs/my-website/docs/proxy/logging.md index 3f5596fc9e6..589199a07f4 100644 --- a/docs/my-website/docs/proxy/logging.md +++ b/docs/my-website/docs/proxy/logging.md @@ -3,17 +3,19 @@ import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; -# 🔎 Logging - Custom Callbacks, Langfuse, s3 Bucket, Sentry, OpenTelemetry +# 🔎 Logging - Custom Callbacks, Langfuse, ClickHouse, s3 Bucket, Sentry, OpenTelemetry, Athina Log Proxy Input, Output, Exceptions using Custom Callbacks, Langfuse, OpenTelemetry, LangFuse, DynamoDB, s3 Bucket - [Async Custom Callbacks](#custom-callback-class-async) - [Async Custom Callback APIs](#custom-callback-apis-async) +- [Logging to ClickHouse](#logging-proxy-inputoutput---clickhouse) - [Logging to Langfuse](#logging-proxy-inputoutput---langfuse) - [Logging to s3 Buckets](#logging-proxy-inputoutput---s3-buckets) - [Logging to DynamoDB](#logging-proxy-inputoutput---dynamodb) - [Logging to Sentry](#logging-proxy-inputoutput---sentry) -- [Logging to Traceloop (OpenTelemetry)](#opentelemetry---traceloop) +- [Logging to Traceloop (OpenTelemetry)](#logging-proxy-inputoutput-traceloop-opentelemetry) +- [Logging to Athina](#logging-proxy-inputoutput-athina) ## Custom Callback Class [Async] Use this when you want to run custom callbacks in `python` @@ -148,7 +150,7 @@ litellm --config proxy_config.yaml ``` ```shell -curl --location 'http://0.0.0.0:8000/chat/completions' \ +curl --location 'http://0.0.0.0:4000/chat/completions' \ --header 'Authorization: Bearer sk-1234' \ --data ' { "model": "gpt-3.5-turbo", @@ -172,7 +174,7 @@ On Success Usage: {'completion_tokens': 10, 'prompt_tokens': 11, 'total_tokens': 21}, Cost: 3.65e-05, Response: {'id': 'chatcmpl-8S8avKJ1aVBg941y5xzGMSKrYCMvN', 'choices': [{'finish_reason': 'stop', 'index': 0, 'message': {'content': 'Good morning! How can I assist you today?', 'role': 'assistant'}}], 'created': 1701716913, 'model': 'gpt-3.5-turbo-0613', 'object': 'chat.completion', 'system_fingerprint': None, 'usage': {'completion_tokens': 10, 'prompt_tokens': 11, 'total_tokens': 21}} - Proxy Metadata: {'user_api_key': None, 'headers': Headers({'host': '0.0.0.0:8000', 'user-agent': 'curl/7.88.1', 'accept': '*/*', 'authorization': 'Bearer sk-1234', 'content-length': '199', 'content-type': 'application/x-www-form-urlencoded'}), 'model_group': 'gpt-3.5-turbo', 'deployment': 'gpt-3.5-turbo-ModelID-gpt-3.5-turbo'} + Proxy Metadata: {'user_api_key': None, 'headers': Headers({'host': '0.0.0.0:4000', 'user-agent': 'curl/7.88.1', 'accept': '*/*', 'authorization': 'Bearer sk-1234', 'content-length': '199', 'content-type': 'application/x-www-form-urlencoded'}), 'model_group': 'gpt-3.5-turbo', 'deployment': 'gpt-3.5-turbo-ModelID-gpt-3.5-turbo'} ``` #### Logging Proxy Request Object, Header, Url @@ -372,7 +374,7 @@ async def log_event(request: Request): if __name__ == "__main__": import uvicorn - uvicorn.run(app, host="127.0.0.1", port=8000) + uvicorn.run(app, host="127.0.0.1", port=4000) ``` @@ -381,7 +383,7 @@ if __name__ == "__main__": #### Step 2. Set your `GENERIC_LOGGER_ENDPOINT` to the endpoint + route we should send callback logs to ```shell -os.environ["GENERIC_LOGGER_ENDPOINT"] = "http://localhost:8000/log-event" +os.environ["GENERIC_LOGGER_ENDPOINT"] = "http://localhost:4000/log-event" ``` #### Step 3. Create a `config.yaml` file and set `litellm_settings`: `success_callback` = ["generic"] @@ -443,7 +445,7 @@ Expected output on Langfuse Pass `metadata` as part of the request body ```shell -curl --location 'http://0.0.0.0:8000/chat/completions' \ +curl --location 'http://0.0.0.0:4000/chat/completions' \ --header 'Content-Type: application/json' \ --data '{ "model": "gpt-3.5-turbo", @@ -470,7 +472,7 @@ Set `extra_body={"metadata": { }}` to `metadata` you want to pass import openai client = openai.OpenAI( api_key="anything", - base_url="http://0.0.0.0:8000" + base_url="http://0.0.0.0:4000" ) # request sent to model set on litellm proxy, `litellm --model` @@ -507,7 +509,7 @@ from langchain.prompts.chat import ( from langchain.schema import HumanMessage, SystemMessage chat = ChatOpenAI( - openai_api_base="http://0.0.0.0:8000", + openai_api_base="http://0.0.0.0:4000", model = "gpt-3.5-turbo", temperature=0.1, extra_body={ @@ -537,6 +539,90 @@ print(response) +## Logging Proxy Input/Output - Clickhouse +We will use the `--config` to set `litellm.success_callback = ["clickhouse"]` this will log all successfull LLM calls to ClickHouse DB + +### [Optional] - Docker Compose - LiteLLM Proxy + Self Hosted Clickhouse DB +Use this docker compose yaml to start LiteLLM Proxy + Clickhouse DB +```yaml +version: "3.9" +services: + litellm: + image: ghcr.io/berriai/litellm:main-latest + volumes: + - ./proxy_server_config.yaml:/app/proxy_server_config.yaml # mount your litellm config.yaml + ports: + - "4000:4000" + environment: + - AZURE_API_KEY=sk-123 + clickhouse: + image: clickhouse/clickhouse-server + environment: + - CLICKHOUSE_DB=litellm-test + - CLICKHOUSE_USER=admin + - CLICKHOUSE_DEFAULT_ACCESS_MANAGEMENT=1 + - CLICKHOUSE_PASSWORD=admin + ports: + - "8123:8123" +``` + +**Step 1**: Create a `config.yaml` file and set `litellm_settings`: `success_callback` +```yaml +model_list: + - model_name: gpt-3.5-turbo + litellm_params: + model: gpt-3.5-turbo +litellm_settings: + success_callback: ["clickhouse"] +``` + +**Step 2**: Set Required env variables for clickhouse + + + + +Env Variables for self hosted click house +```shell +CLICKHOUSE_HOST = "localhost" +CLICKHOUSE_PORT = "8123" +CLICKHOUSE_USERNAME = "admin" +CLICKHOUSE_PASSWORD = "admin" +``` + + + + + + + +Env Variables for cloud click house + +```shell +CLICKHOUSE_HOST = "hjs1z7j37j.us-east1.gcp.clickhouse.cloud" +CLICKHOUSE_PORT = "8443" +CLICKHOUSE_USERNAME = "default" +CLICKHOUSE_PASSWORD = "M~PimRs~c3Z6b" +``` + + + + + + + +**Step 3**: Start the proxy, make a test request + +Start proxy +```shell +litellm --config config.yaml --debug +``` + +Test Request +``` +litellm --test +``` + + ## Logging Proxy Input/Output - s3 Buckets We will use the `--config` to set @@ -577,7 +663,7 @@ litellm --config config.yaml --debug Test Request ```shell -curl --location 'http://0.0.0.0:8000/chat/completions' \ +curl --location 'http://0.0.0.0:4000/chat/completions' \ --header 'Content-Type: application/json' \ --data ' { "model": "Azure OpenAI GPT-4 East", @@ -612,7 +698,7 @@ litellm_settings: Now, when you [generate keys](./virtual_keys.md) for this team-id ```bash -curl -X POST 'http://0.0.0.0:8000/key/generate' \ +curl -X POST 'http://0.0.0.0:4000/key/generate' \ -H 'Authorization: Bearer sk-1234' \ -H 'Content-Type: application/json' \ -D '{"team_id": "ishaans-secret-project"}' @@ -656,7 +742,7 @@ litellm --config config.yaml --debug Test Request ```shell -curl --location 'http://0.0.0.0:8000/chat/completions' \ +curl --location 'http://0.0.0.0:4000/chat/completions' \ --header 'Content-Type: application/json' \ --data ' { "model": "Azure OpenAI GPT-4 East", @@ -817,7 +903,7 @@ litellm --config config.yaml --debug Test Request ``` -curl --location 'http://0.0.0.0:8000/chat/completions' \ +curl --location 'http://0.0.0.0:4000/chat/completions' \ --header 'Content-Type: application/json' \ --data ' { "model": "gpt-3.5-turbo", @@ -830,4 +916,46 @@ curl --location 'http://0.0.0.0:8000/chat/completions' \ }' ``` +## Logging Proxy Input/Output Athina +[Athina](https://athina.ai/) allows you to log LLM Input/Output for monitoring, analytics, and observability. + +We will use the `--config` to set `litellm.success_callback = ["athina"]` this will log all successfull LLM calls to athina + +**Step 1** Set Athina API key + +```shell +ATHINA_API_KEY = "your-athina-api-key" +``` + +**Step 2**: Create a `config.yaml` file and set `litellm_settings`: `success_callback` +```yaml +model_list: + - model_name: gpt-3.5-turbo + litellm_params: + model: gpt-3.5-turbo +litellm_settings: + success_callback: ["athina"] +``` + +**Step 3**: Start the proxy, make a test request + +Start proxy +```shell +litellm --config config.yaml --debug +``` + +Test Request +``` +curl --location 'http://0.0.0.0:4000/chat/completions' \ + --header 'Content-Type: application/json' \ + --data ' { + "model": "gpt-3.5-turbo", + "messages": [ + { + "role": "user", + "content": "which llm are you" + } + ] + }' +``` \ No newline at end of file diff --git a/docs/my-website/docs/proxy/metrics.md b/docs/my-website/docs/proxy/metrics.md new file mode 100644 index 00000000000..bf5ebe2858e --- /dev/null +++ b/docs/my-website/docs/proxy/metrics.md @@ -0,0 +1,44 @@ +# 💸 GET Daily Spend, Usage Metrics + +## Request Format +```shell +curl -X GET "http://0.0.0.0:4000/daily_metrics" -H "Authorization: Bearer sk-1234" +``` + +## Response format +```json +[ + daily_spend = [ + { + "daily_spend": 7.9261938052047e+16, + "day": "2024-02-01T00:00:00", + "spend_per_model": {"azure/gpt-4": 7.9261938052047e+16}, + "spend_per_api_key": { + "76": 914495704992000.0, + "12": 905726697912000.0, + "71": 866312628003000.0, + "28": 865461799332000.0, + "13": 859151538396000.0 + } + }, + { + "daily_spend": 7.938489251309491e+16, + "day": "2024-02-02T00:00:00", + "spend_per_model": {"gpt-3.5": 7.938489251309491e+16}, + "spend_per_api_key": { + "91": 896805036036000.0, + "78": 889692646082000.0, + "49": 885386687861000.0, + "28": 873869890984000.0, + "56": 867398637692000.0 + } + } + + ], + total_spend = 200, + top_models = {"gpt4": 0.2, "vertexai/gemini-pro":10}, + top_api_keys = {"899922": 0.9, "838hcjd999seerr88": 20} + +] + +``` \ No newline at end of file diff --git a/docs/my-website/docs/proxy/model_management.md b/docs/my-website/docs/proxy/model_management.md index 8160e2aa7cb..0a236185f98 100644 --- a/docs/my-website/docs/proxy/model_management.md +++ b/docs/my-website/docs/proxy/model_management.md @@ -24,7 +24,7 @@ Retrieve detailed information about each model listed in the `/models` endpoint, ```bash -curl -X GET "http://0.0.0.0:8000/model/info" \ +curl -X GET "http://0.0.0.0:4000/model/info" \ -H "accept: application/json" \ ``` @@ -42,7 +42,7 @@ Add a new model to the list in the `config.yaml` by providing the model paramete ```bash -curl -X POST "http://0.0.0.0:8000/model/new" \ +curl -X POST "http://0.0.0.0:4000/model/new" \ -H "accept: application/json" \ -H "Content-Type: application/json" \ -d '{ "model_name": "azure-gpt-turbo", "litellm_params": {"model": "azure/gpt-3.5-turbo", "api_key": "os.environ/AZURE_API_KEY", "api_base": "my-azure-api-base"} }' diff --git a/docs/my-website/docs/proxy/pii_masking.md b/docs/my-website/docs/proxy/pii_masking.md index 0d559d9107f..a95a6d7712b 100644 --- a/docs/my-website/docs/proxy/pii_masking.md +++ b/docs/my-website/docs/proxy/pii_masking.md @@ -96,7 +96,7 @@ Turn off PII masking for a given key. Do this by setting `permissions: {"pii": false}`, when generating a key. ```shell -curl --location 'http://0.0.0.0:8000/key/generate' \ +curl --location 'http://0.0.0.0:4000/key/generate' \ --header 'Authorization: Bearer sk-1234' \ --header 'Content-Type: application/json' \ --data '{ @@ -119,7 +119,7 @@ The proxy support 2 request-level PII controls: Set `allow_pii_controls` to true for a given key. This will allow the user to set request-level PII controls. ```bash -curl --location 'http://0.0.0.0:8000/key/generate' \ +curl --location 'http://0.0.0.0:4000/key/generate' \ --header 'Authorization: Bearer my-master-key' \ --header 'Content-Type: application/json' \ --data '{ @@ -136,7 +136,7 @@ from openai import OpenAI client = OpenAI( # This is the default and can be omitted api_key=os.environ.get("OPENAI_API_KEY"), - base_url="http://0.0.0.0:8000" + base_url="http://0.0.0.0:4000" ) chat_completion = client.chat.completions.create( diff --git a/docs/my-website/docs/proxy/quick_start.md b/docs/my-website/docs/proxy/quick_start.md index 4f508ee5929..d44970348db 100644 --- a/docs/my-website/docs/proxy/quick_start.md +++ b/docs/my-website/docs/proxy/quick_start.md @@ -21,7 +21,7 @@ Run the following command to start the litellm proxy ```shell $ litellm --model huggingface/bigcode/starcoder -#INFO: Proxy running on http://0.0.0.0:8000 +#INFO: Proxy running on http://0.0.0.0:4000 ``` ### Test @@ -250,7 +250,7 @@ litellm --config your_config.yaml ```shell -curl --location 'http://0.0.0.0:8000/chat/completions' \ +curl --location 'http://0.0.0.0:4000/chat/completions' \ --header 'Content-Type: application/json' \ --data ' { "model": "gpt-3.5-turbo", @@ -270,7 +270,7 @@ curl --location 'http://0.0.0.0:8000/chat/completions' \ import openai client = openai.OpenAI( api_key="anything", - base_url="http://0.0.0.0:8000" + base_url="http://0.0.0.0:4000" ) # request sent to model set on litellm proxy, `litellm --model` @@ -297,7 +297,7 @@ from langchain.prompts.chat import ( from langchain.schema import HumanMessage, SystemMessage chat = ChatOpenAI( - openai_api_base="http://0.0.0.0:8000", # set openai_api_base to the LiteLLM Proxy + openai_api_base="http://0.0.0.0:4000", # set openai_api_base to the LiteLLM Proxy model = "gpt-3.5-turbo", temperature=0.1 ) @@ -321,7 +321,7 @@ print(response) ```python from langchain.embeddings import OpenAIEmbeddings -embeddings = OpenAIEmbeddings(model="sagemaker-embeddings", openai_api_base="http://0.0.0.0:8000", openai_api_key="temp-key") +embeddings = OpenAIEmbeddings(model="sagemaker-embeddings", openai_api_base="http://0.0.0.0:4000", openai_api_key="temp-key") text = "This is a test document." @@ -331,7 +331,7 @@ query_result = embeddings.embed_query(text) print(f"SAGEMAKER EMBEDDINGS") print(query_result[:5]) -embeddings = OpenAIEmbeddings(model="bedrock-embeddings", openai_api_base="http://0.0.0.0:8000", openai_api_key="temp-key") +embeddings = OpenAIEmbeddings(model="bedrock-embeddings", openai_api_base="http://0.0.0.0:4000", openai_api_key="temp-key") text = "This is a test document." @@ -340,7 +340,7 @@ query_result = embeddings.embed_query(text) print(f"BEDROCK EMBEDDINGS") print(query_result[:5]) -embeddings = OpenAIEmbeddings(model="bedrock-titan-embeddings", openai_api_base="http://0.0.0.0:8000", openai_api_key="temp-key") +embeddings = OpenAIEmbeddings(model="bedrock-titan-embeddings", openai_api_base="http://0.0.0.0:4000", openai_api_key="temp-key") text = "This is a test document." @@ -407,11 +407,11 @@ services: litellm: image: ghcr.io/berriai/litellm:main ports: - - "8000:8000" # Map the container port to the host, change the host port if necessary + - "4000:4000" # Map the container port to the host, change the host port if necessary volumes: - ./litellm-config.yaml:/app/config.yaml # Mount the local configuration file # You can change the port or number of workers as per your requirements or pass any new supported CLI augument. Make sure the port passed here matches with the container port defined above in `ports` value - command: [ "--config", "/app/config.yaml", "--port", "8000", "--num_workers", "8" ] + command: [ "--config", "/app/config.yaml", "--port", "4000", "--num_workers", "8" ] # ...rest of your docker-compose config if any ``` @@ -429,7 +429,7 @@ Run the command `docker-compose up` or `docker compose up` as per your docker in > Use `-d` flag to run the container in detached mode (background) e.g. `docker compose up -d` -Your LiteLLM container should be running now on the defined port e.g. `8000`. +Your LiteLLM container should be running now on the defined port e.g. `4000`. ## Using with OpenAI compatible projects @@ -442,7 +442,7 @@ Set `base_url` to the LiteLLM Proxy server import openai client = openai.OpenAI( api_key="anything", - base_url="http://0.0.0.0:8000" + base_url="http://0.0.0.0:4000" ) # request sent to model set on litellm proxy, `litellm --model` @@ -463,7 +463,7 @@ print(response) ```shell litellm --model gpt-3.5-turbo -#INFO: Proxy running on http://0.0.0.0:8000 +#INFO: Proxy running on http://0.0.0.0:4000 ``` #### 1. Clone the repo @@ -474,9 +474,9 @@ git clone https://github.com/danny-avila/LibreChat.git #### 2. Modify Librechat's `docker-compose.yml` -LiteLLM Proxy is running on port `8000`, set `8000` as the proxy below +LiteLLM Proxy is running on port `4000`, set `4000` as the proxy below ```yaml -OPENAI_REVERSE_PROXY=http://host.docker.internal:8000/v1/chat/completions +OPENAI_REVERSE_PROXY=http://host.docker.internal:4000/v1/chat/completions ``` #### 3. Save fake OpenAI key in Librechat's `.env` @@ -502,7 +502,7 @@ In the [config.py](https://continue.dev/docs/reference/Models/openai) set this a api_key="IGNORED", model="fake-model-name", context_length=2048, # customize if needed for your model - api_base="http://localhost:8000" # your proxy server url + api_base="http://localhost:4000" # your proxy server url ), ``` @@ -514,7 +514,7 @@ Credits [@vividfog](https://github.com/jmorganca/ollama/issues/305#issuecomment- ```shell $ pip install aider -$ aider --openai-api-base http://0.0.0.0:8000 --openai-api-key fake-key +$ aider --openai-api-base http://0.0.0.0:4000 --openai-api-key fake-key ``` @@ -528,7 +528,7 @@ from autogen import AssistantAgent, UserProxyAgent, oai config_list=[ { "model": "my-fake-model", - "api_base": "http://localhost:8000", #litellm compatible endpoint + "api_base": "http://localhost:4000", #litellm compatible endpoint "api_type": "open_ai", "api_key": "NULL", # just a placeholder } @@ -566,7 +566,7 @@ import guidance # set api_base to your proxy # set api_key to anything -gpt4 = guidance.llms.OpenAI("gpt-4", api_base="http://0.0.0.0:8000", api_key="anything") +gpt4 = guidance.llms.OpenAI("gpt-4", api_base="http://0.0.0.0:4000", api_key="anything") experts = guidance(''' {{#system~}} diff --git a/docs/my-website/docs/proxy/reliability.md b/docs/my-website/docs/proxy/reliability.md index f241e4ec050..7527a3d5b13 100644 --- a/docs/my-website/docs/proxy/reliability.md +++ b/docs/my-website/docs/proxy/reliability.md @@ -45,7 +45,7 @@ litellm_settings: **Set dynamically** ```bash -curl --location 'http://0.0.0.0:8000/chat/completions' \ +curl --location 'http://0.0.0.0:4000/chat/completions' \ --header 'Content-Type: application/json' \ --data ' { "model": "zephyr-beta", @@ -101,7 +101,7 @@ LiteLLM Proxy supports setting a `timeout` per request ```shell -curl --location 'http://0.0.0.0:8000/chat/completions' \ +curl --location 'http://0.0.0.0:4000/chat/completions' \ --header 'Content-Type: application/json' \ --data-raw '{ "model": "gpt-3.5-turbo", @@ -121,7 +121,7 @@ import openai client = openai.OpenAI( api_key="anything", - base_url="http://0.0.0.0:8000" + base_url="http://0.0.0.0:4000" ) response = client.chat.completions.create( diff --git a/docs/my-website/docs/proxy/rules.md b/docs/my-website/docs/proxy/rules.md index 415607b61ce..60e990d91b4 100644 --- a/docs/my-website/docs/proxy/rules.md +++ b/docs/my-website/docs/proxy/rules.md @@ -30,7 +30,7 @@ $ litellm /path/to/config.yaml ``` ```bash -curl --location 'http://0.0.0.0:8000/v1/chat/completions' \ +curl --location 'http://0.0.0.0:4000/v1/chat/completions' \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer sk-1234' \ --data '{ diff --git a/docs/my-website/docs/proxy/streaming_logging.md b/docs/my-website/docs/proxy/streaming_logging.md index 6bc5882d1f0..3fa89646720 100644 --- a/docs/my-website/docs/proxy/streaming_logging.md +++ b/docs/my-website/docs/proxy/streaming_logging.md @@ -65,7 +65,7 @@ litellm --config proxy_config.yaml ``` ```shell -curl --location 'http://0.0.0.0:8000/chat/completions' \ +curl --location 'http://0.0.0.0:4000/chat/completions' \ --header 'Authorization: Bearer sk-1234' \ --data ' { "model": "gpt-3.5-turbo", diff --git a/docs/my-website/docs/proxy/team_based_routing.md b/docs/my-website/docs/proxy/team_based_routing.md new file mode 100644 index 00000000000..4b057cdf382 --- /dev/null +++ b/docs/my-website/docs/proxy/team_based_routing.md @@ -0,0 +1,71 @@ +# 👥 Team-based Routing + +Route calls to different model groups based on the team-id + +## Config with model group + +Create a config.yaml with 2 model groups + connected postgres db + +```yaml +model_list: + - model_name: gpt-3.5-turbo-eu # 👈 Model Group 1 + litellm_params: + model: azure/chatgpt-v-2 + api_base: os.environ/AZURE_API_BASE_EU + api_key: os.environ/AZURE_API_KEY_EU + api_version: "2023-07-01-preview" + - model_name: gpt-3.5-turbo-worldwide # 👈 Model Group 2 + litellm_params: + model: azure/chatgpt-v-2 + api_base: os.environ/AZURE_API_BASE + api_key: os.environ/AZURE_API_KEY + api_version: "2023-07-01-preview" + +general_settings: + master_key: sk-1234 + database_url: "postgresql://..." # 👈 Connect proxy to DB +``` + +Start proxy + +```bash +litellm --config /path/to/config.yaml +``` + +## Create Team with Model Alias + +```bash +curl --location 'http://0.0.0.0:4000/team/new' \ +--header 'Authorization: Bearer sk-1234' \ # 👈 Master Key +--header 'Content-Type: application/json' \ +--data '{ + "team_alias": "my-new-team_4", + "model_aliases": {"gpt-3.5-turbo": "gpt-3.5-turbo-eu"} +}' + +# Returns team_id: my-team-id +``` + +## Create Team Key + +```bash +curl --location 'http://localhost:4000/key/generate' \ +--header 'Authorization: Bearer sk-1234' \ +--header 'Content-Type: application/json' \ +--data '{ + "team_id": "my-team-id", # 👈 YOUR TEAM ID +}' +``` + +## Call Model with alias + +```bash +curl --location 'http://0.0.0.0:4000/v1/chat/completions' \ +--header 'Content-Type: application/json' \ +--header 'Authorization: Bearer sk-A1L0C3Px2LJl53sF_kTF9A' \ +--data '{ + "model": "gpt-3.5-turbo", # 👈 MODEL + "messages": [{"role": "system", "content": "You'\''re an expert at writing poems"}, {"role": "user", "content": "Write me a poem"}, {"role": "user", "content": "What'\''s your name?"}], + "user": "usha" +}' +``` \ No newline at end of file diff --git a/docs/my-website/docs/proxy/ui.md b/docs/my-website/docs/proxy/ui.md index 1f98bc07786..cca9d443401 100644 --- a/docs/my-website/docs/proxy/ui.md +++ b/docs/my-website/docs/proxy/ui.md @@ -2,7 +2,7 @@ import Image from '@theme/IdealImage'; import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; -# 🔑 [BETA] Proxy UI +# [BETA] Proxy UI ### **Create + delete keys through a UI** [Let users create their own keys](#setup-ssoauth-for-ui) @@ -28,12 +28,12 @@ Follow [setup](./virtual_keys.md#setup) ```bash litellm --config /path/to/config.yaml -#INFO: Proxy running on http://0.0.0.0:8000 +#INFO: Proxy running on http://0.0.0.0:4000 ``` ### 2. Go to UI ```bash -http://0.0.0.0:8000/ui # /ui +http://0.0.0.0:4000/ui # /ui ``` @@ -152,7 +152,14 @@ GENERIC_SCOPE = "openid profile email" # default scope openid is sometimes not e -#### Step 3. Test flow +#### Step 3. Set `PROXY_BASE_URL` in your .env + +Set this in your .env (so the proxy can set the correct redirect url) +```shell +PROXY_BASE_URL=https://litellm-api.up.railway.app/ +``` + +#### Step 4. Test flow ### Set Admin view w/ SSO @@ -179,6 +186,20 @@ If you don't see all your keys this could be due to a cached token. So just re-l ::: +### Restrict UI Access + +You can restrict UI Access to just admins - includes you (proxy_admin) and people you give view only access to (proxy_admin_viewer) for seeing global spend. + +**Step 1. Set 'admin_only' access** +```yaml +general_settings: + ui_access_mode: "admin_only" +``` + +**Step 2. Invite view-only users** + + + ### Custom Branding Admin UI Use your companies custom branding on the LiteLLM Admin UI diff --git a/docs/my-website/docs/proxy/user_keys.md b/docs/my-website/docs/proxy/user_keys.md index fcccffaa001..d86d3ae095e 100644 --- a/docs/my-website/docs/proxy/user_keys.md +++ b/docs/my-website/docs/proxy/user_keys.md @@ -26,7 +26,7 @@ Set `extra_body={"metadata": { }}` to `metadata` you want to pass import openai client = openai.OpenAI( api_key="anything", - base_url="http://0.0.0.0:8000" + base_url="http://0.0.0.0:4000" ) # request sent to model set on litellm proxy, `litellm --model` @@ -92,7 +92,7 @@ print(response) Pass `metadata` as part of the request body ```shell -curl --location 'http://0.0.0.0:8000/chat/completions' \ +curl --location 'http://0.0.0.0:4000/chat/completions' \ --header 'Content-Type: application/json' \ --data '{ "model": "gpt-3.5-turbo", @@ -123,7 +123,7 @@ from langchain.prompts.chat import ( from langchain.schema import HumanMessage, SystemMessage chat = ChatOpenAI( - openai_api_base="http://0.0.0.0:8000", + openai_api_base="http://0.0.0.0:4000", model = "gpt-3.5-turbo", temperature=0.1, extra_body={ @@ -195,7 +195,7 @@ from openai import OpenAI # set base_url to your proxy server # set api_key to send to proxy server -client = OpenAI(api_key="", base_url="http://0.0.0.0:8000") +client = OpenAI(api_key="", base_url="http://0.0.0.0:4000") response = client.embeddings.create( input=["hello from litellm"], @@ -209,7 +209,7 @@ print(response) ```shell -curl --location 'http://0.0.0.0:8000/embeddings' \ +curl --location 'http://0.0.0.0:4000/embeddings' \ --header 'Content-Type: application/json' \ --data ' { "model": "text-embedding-ada-002", @@ -223,7 +223,7 @@ curl --location 'http://0.0.0.0:8000/embeddings' \ ```python from langchain.embeddings import OpenAIEmbeddings -embeddings = OpenAIEmbeddings(model="sagemaker-embeddings", openai_api_base="http://0.0.0.0:8000", openai_api_key="temp-key") +embeddings = OpenAIEmbeddings(model="sagemaker-embeddings", openai_api_base="http://0.0.0.0:4000", openai_api_key="temp-key") text = "This is a test document." @@ -233,7 +233,7 @@ query_result = embeddings.embed_query(text) print(f"SAGEMAKER EMBEDDINGS") print(query_result[:5]) -embeddings = OpenAIEmbeddings(model="bedrock-embeddings", openai_api_base="http://0.0.0.0:8000", openai_api_key="temp-key") +embeddings = OpenAIEmbeddings(model="bedrock-embeddings", openai_api_base="http://0.0.0.0:4000", openai_api_key="temp-key") text = "This is a test document." @@ -242,7 +242,7 @@ query_result = embeddings.embed_query(text) print(f"BEDROCK EMBEDDINGS") print(query_result[:5]) -embeddings = OpenAIEmbeddings(model="bedrock-titan-embeddings", openai_api_base="http://0.0.0.0:8000", openai_api_key="temp-key") +embeddings = OpenAIEmbeddings(model="bedrock-titan-embeddings", openai_api_base="http://0.0.0.0:4000", openai_api_key="temp-key") text = "This is a test document." @@ -296,7 +296,7 @@ from openai import OpenAI # set base_url to your proxy server # set api_key to send to proxy server -client = OpenAI(api_key="", base_url="http://0.0.0.0:8000") +client = OpenAI(api_key="", base_url="http://0.0.0.0:4000") response = client.moderations.create( input="hello from litellm", @@ -310,7 +310,7 @@ print(response) ```shell -curl --location 'http://0.0.0.0:8000/moderations' \ +curl --location 'http://0.0.0.0:4000/moderations' \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer sk-1234' \ --data '{"input": "Sample text goes here", "model": "text-moderation-stable"}' @@ -421,7 +421,7 @@ user_config = { import openai client = openai.OpenAI( api_key="sk-1234", - base_url="http://0.0.0.0:8000" + base_url="http://0.0.0.0:4000" ) # send request to `user-azure-instance` @@ -489,7 +489,7 @@ const { OpenAI } = require('openai'); const openai = new OpenAI({ apiKey: "sk-1234", - baseURL: "http://0.0.0.0:8000" + baseURL: "http://0.0.0.0:4000" }); async function main() { @@ -516,7 +516,7 @@ Here's how to do it: import openai client = openai.OpenAI( api_key="sk-1234", - base_url="http://0.0.0.0:8000" + base_url="http://0.0.0.0:4000" ) # request sent to model set on litellm proxy, `litellm --model` @@ -541,7 +541,7 @@ Pass in the litellm_params (E.g. api_key, api_base, etc.) via the `extra_body` p import openai client = openai.OpenAI( api_key="sk-1234", - base_url="http://0.0.0.0:8000" + base_url="http://0.0.0.0:4000" ) # request sent to model set on litellm proxy, `litellm --model` @@ -571,7 +571,7 @@ const { OpenAI } = require('openai'); const openai = new OpenAI({ apiKey: "sk-1234", - baseURL: "http://0.0.0.0:8000" + baseURL: "http://0.0.0.0:4000" }); async function main() { diff --git a/docs/my-website/docs/proxy/users.md b/docs/my-website/docs/proxy/users.md index 3eb0cb808b2..12cbda9d0cf 100644 --- a/docs/my-website/docs/proxy/users.md +++ b/docs/my-website/docs/proxy/users.md @@ -44,7 +44,7 @@ litellm /path/to/config.yaml **Step 3. Send test call** ```bash -curl --location 'http://0.0.0.0:8000/chat/completions' \ +curl --location 'http://0.0.0.0:4000/chat/completions' \ --header 'Autherization: Bearer sk-1234' \ --header 'Content-Type: application/json' \ --data '{ @@ -72,7 +72,7 @@ By default the `max_budget` is set to `null` and is not checked for keys #### **Add budgets to users** ```shell -curl --location 'http://localhost:8000/user/new' \ +curl --location 'http://localhost:4000/user/new' \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data-raw '{"models": ["azure-models"], "max_budget": 0, "user_id": "krrish3@berri.ai"}' @@ -96,7 +96,7 @@ curl --location 'http://localhost:8000/user/new' \ `budget_duration`: Budget is reset at the end of specified duration. If not set, budget is never reset. You can set duration as seconds ("30s"), minutes ("30m"), hours ("30h"), days ("30d"). ``` -curl 'http://0.0.0.0:8000/user/new' \ +curl 'http://0.0.0.0:4000/user/new' \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data-raw '{ @@ -113,12 +113,57 @@ Now you can just call `/key/generate` with that user_id (i.e. krrish3@berri.ai) - **Spend Tracking**: spend for this key will update krrish3@berri.ai's spend as well ```bash -curl --location 'http://0.0.0.0:8000/key/generate' \ +curl --location 'http://0.0.0.0:4000/key/generate' \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data '{"models": ["azure-models"], "user_id": "krrish3@berri.ai"}' ``` + + +You can: +- Add budgets to Teams + + +#### **Add budgets to users** +```shell +curl --location 'http://localhost:4000/team/new' \ +--header 'Authorization: Bearer ' \ +--header 'Content-Type: application/json' \ +--data-raw '{ + "team_alias": "my-new-team_4", + "members_with_roles": [{"role": "admin", "user_id": "5c4a0aa3-a1e1-43dc-bd87-3c2da8382a3a"}], + "rpm_limit": 99 +}' +``` + +[**See Swagger**](https://litellm-api.up.railway.app/#/team%20management/new_team_team_new_post) + +**Sample Response** + +```shell +{ + "team_alias": "my-new-team_4", + "team_id": "13e83b19-f851-43fe-8e93-f96e21033100", + "admins": [], + "members": [], + "members_with_roles": [ + { + "role": "admin", + "user_id": "5c4a0aa3-a1e1-43dc-bd87-3c2da8382a3a" + } + ], + "metadata": {}, + "tpm_limit": null, + "rpm_limit": 99, + "max_budget": null, + "models": [], + "spend": 0.0, + "max_parallel_requests": null, + "budget_duration": null, + "budget_reset_at": null +} +``` @@ -193,7 +238,7 @@ By default the `max_budget` is set to `null` and is not checked for keys #### **Add budgets to keys** ```bash -curl 'http://0.0.0.0:8000/key/generate' \ +curl 'http://0.0.0.0:4000/key/generate' \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data-raw '{ @@ -205,7 +250,7 @@ curl 'http://0.0.0.0:8000/key/generate' \ Example Request to `/chat/completions` when key has crossed budget ```shell -curl --location 'http://0.0.0.0:8000/chat/completions' \ +curl --location 'http://0.0.0.0:4000/chat/completions' \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer ' \ --data ' { @@ -233,7 +278,7 @@ Expected Response from `/chat/completions` when key has crossed budget `budget_duration`: Budget is reset at the end of specified duration. If not set, budget is never reset. You can set duration as seconds ("30s"), minutes ("30m"), hours ("30h"), days ("30d"). ``` -curl 'http://0.0.0.0:8000/key/generate' \ +curl 'http://0.0.0.0:4000/key/generate' \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data-raw '{ @@ -265,7 +310,7 @@ By default the `model_max_budget` is set to `{}` and is not checked for keys #### **Add model specific budgets to keys** ```bash -curl 'http://0.0.0.0:8000/key/generate' \ +curl 'http://0.0.0.0:4000/key/generate' \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data-raw '{ @@ -279,9 +324,9 @@ curl 'http://0.0.0.0:8000/key/generate' \ ## Set Rate Limits You can set: +- tpm limits (tokens per minute) +- rpm limits (requests per minute) - max parallel requests -- tpm limits -- rpm limits @@ -290,7 +335,7 @@ Use `/user/new`, to persist rate limits across multiple keys. ```shell -curl --location 'http://0.0.0.0:8000/user/new' \ +curl --location 'http://0.0.0.0:4000/user/new' \ --header 'Authorization: Bearer sk-1234' \ --header 'Content-Type: application/json' \ --data '{"user_id": "krrish@berri.ai", "max_parallel_requests": 10, "tpm_limit": 20, "rpm_limit": 4}' @@ -314,7 +359,7 @@ curl --location 'http://0.0.0.0:8000/user/new' \ Use `/key/generate`, if you want them for just that key. ```shell -curl --location 'http://0.0.0.0:8000/key/generate' \ +curl --location 'http://0.0.0.0:4000/key/generate' \ --header 'Authorization: Bearer sk-1234' \ --header 'Content-Type: application/json' \ --data '{"max_parallel_requests": 10, "tpm_limit": 20, "rpm_limit": 4}' @@ -356,7 +401,7 @@ model_list: **Step 2. Create key with access group** ```bash -curl --location 'http://localhost:8000/user/new' \ +curl --location 'http://localhost:4000/user/new' \ -H 'Authorization: Bearer ' \ -H 'Content-Type: application/json' \ -d '{"models": ["beta-models"], # 👈 Model Access Group @@ -369,7 +414,7 @@ curl --location 'http://localhost:8000/user/new' \ Just include user_id in the `/key/generate` request. ```bash -curl --location 'http://0.0.0.0:8000/key/generate' \ +curl --location 'http://0.0.0.0:4000/key/generate' \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data '{"models": ["azure-models"], "user_id": "krrish@berri.ai"}' diff --git a/docs/my-website/docs/proxy/virtual_keys.md b/docs/my-website/docs/proxy/virtual_keys.md index 83994701c49..e84b3c16f40 100644 --- a/docs/my-website/docs/proxy/virtual_keys.md +++ b/docs/my-website/docs/proxy/virtual_keys.md @@ -1,4 +1,4 @@ -# Virtual Keys, Users +# 🔑 Virtual Keys, Users Track Spend, Set budgets and create virtual keys for the proxy Grant other's temporary access to your proxy, with keys that expire after a set duration. @@ -59,7 +59,7 @@ litellm --config /path/to/config.yaml **Step 3: Generate temporary keys** ```shell -curl 'http://0.0.0.0:8000/key/generate' \ +curl 'http://0.0.0.0:4000/key/generate' \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data-raw '{"models": ["gpt-3.5-turbo", "gpt-4", "claude-2"], "duration": "20m","metadata": {"user": "ishaan@berri.ai"}}' @@ -70,7 +70,7 @@ curl 'http://0.0.0.0:8000/key/generate' \ ### Request ```shell -curl 'http://0.0.0.0:8000/key/generate' \ +curl 'http://0.0.0.0:4000/key/generate' \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data-raw '{ @@ -79,6 +79,7 @@ curl 'http://0.0.0.0:8000/key/generate' \ "metadata": {"user": "ishaan@berri.ai"}, "team_id": "core-infra", "max_budget": 10, + "soft_budget": 5, }' ``` @@ -93,6 +94,7 @@ Request Params: - `config`: *Optional[dict]* - any key-specific configs, overrides config in config.yaml - `spend`: *Optional[int]* - Amount spent by key. Default is 0. Will be updated by proxy whenever key is used. https://docs.litellm.ai/docs/proxy/virtual_keys#managing-auth---tracking-spend - `max_budget`: *Optional[float]* - Specify max budget for a given key. +- `soft_budget`: *Optional[float]* - Specify soft limit budget for a given key. Get Alerts when key hits its soft budget - `model_max_budget`: *Optional[dict[str, float]]* - Specify max budget for each model, `model_max_budget={"gpt4": 0.5, "gpt-5": 0.01}` - `max_parallel_requests`: *Optional[int]* - Rate limit a user based on the number of parallel requests. Raises 429 error, if user's parallel requests > x. - `metadata`: *Optional[dict]* - Metadata for key, store information for key. Example metadata = {"team": "core-infra", "app": "app2", "email": "ishaan@berri.ai" } @@ -103,7 +105,7 @@ Request Params: ```python { "key": "sk-kdEXbIqZRwEeEiHwdg7sFA", # Bearer token - "expires": "2023-11-19T01:38:25.838000+00:00" # datetime object + "expires": "2023-11-19T01:38:25.834000+00:00" # datetime object "key_name": "sk-...7sFA" # abbreviated key string, ONLY stored in db if `allow_user_auth: true` set - [see](./ui.md) ... } @@ -145,7 +147,7 @@ model_list: **Step 2: Generate a user key - enabling them access to specific models, custom model aliases, etc.** ```bash -curl -X POST "https://0.0.0.0:8000/key/generate" \ +curl -X POST "https://0.0.0.0:4000/key/generate" \ -H "Authorization: Bearer " \ -H "Content-Type: application/json" \ -d '{ @@ -180,7 +182,7 @@ model_list: **Step 2. Create key with access group** ```bash -curl --location 'http://localhost:8000/key/generate' \ +curl --location 'http://localhost:4000/key/generate' \ -H 'Authorization: Bearer ' \ -H 'Content-Type: application/json' \ -d '{"models": ["beta-models"], # 👈 Model Access Group @@ -192,7 +194,7 @@ curl --location 'http://localhost:8000/key/generate' \ ### Request ```shell -curl -X GET "http://0.0.0.0:8000/key/info?key=sk-02Wr4IAlN3NvPXvL5JVvDA" \ +curl -X GET "http://0.0.0.0:4000/key/info?key=sk-02Wr4IAlN3NvPXvL5JVvDA" \ -H "Authorization: Bearer sk-1234" ``` @@ -226,7 +228,7 @@ Request Params: ### Request ```shell -curl 'http://0.0.0.0:8000/key/update' \ +curl 'http://0.0.0.0:4000/key/update' \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data-raw '{ @@ -264,7 +266,7 @@ Request Params: ### Request ```shell -curl 'http://0.0.0.0:8000/key/delete' \ +curl 'http://0.0.0.0:4000/key/delete' \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data-raw '{ @@ -343,18 +345,83 @@ A key will be generated for the new user created "key_name": null, "expires": null } - ``` -Request Params: -- keys: List[str] - List of keys to delete + +## /user/info + +### Request + +#### View all Users +If you're trying to view all users, we recommend using pagination with the following args +- `view_all=true` +- `page=0` Optional(int) min = 0, default=0 +- `page_size=25` Optional(int) min = 1, default = 25 +```shell +curl -X GET "http://0.0.0.0:4000/user/info?view_all=true&page=0&page_size=25" -H "Authorization: Bearer sk-1234" +``` + +#### View specific user_id +```shell +curl -X GET "http://0.0.0.0:4000/user/info?user_id=228da235-eef0-4c30-bf53-5d6ac0d278c2" -H "Authorization: Bearer sk-1234" +``` ### Response +View user spend, budget, models, keys and teams ```json { - "deleted_keys": ["sk-kdEXbIqZRwEeEiHwdg7sFA"] + "user_id": "228da235-eef0-4c30-bf53-5d6ac0d278c2", + "user_info": { + "user_id": "228da235-eef0-4c30-bf53-5d6ac0d278c2", + "team_id": null, + "teams": [], + "user_role": "app_user", + "max_budget": null, + "spend": 200000.0, + "user_email": null, + "models": [], + "max_parallel_requests": null, + "tpm_limit": null, + "rpm_limit": null, + "budget_duration": null, + "budget_reset_at": null, + "allowed_cache_controls": [], + "model_spend": { + "chatgpt-v-2": 200000 + }, + "model_max_budget": {} + }, + "keys": [ + { + "token": "16c337f9df00a0e6472627e39a2ed02e67bc9a8a760c983c4e9b8cad7954f3c0", + "key_name": null, + "key_alias": null, + "spend": 200000.0, + "expires": null, + "models": [], + "aliases": {}, + "config": {}, + "user_id": "228da235-eef0-4c30-bf53-5d6ac0d278c2", + "team_id": null, + "permissions": {}, + "max_parallel_requests": null, + "metadata": {}, + "tpm_limit": null, + "rpm_limit": null, + "max_budget": null, + "budget_duration": null, + "budget_reset_at": null, + "allowed_cache_controls": [], + "model_spend": { + "chatgpt-v-2": 200000 + }, + "model_max_budget": {} + } + ], + "teams": [] } + ``` ## Advanced @@ -433,7 +500,7 @@ curl --location 'http://0.0.0.0:4000/chat/completions' \ Set `max_budget` in (USD $) param in the `key/generate` request. By default the `max_budget` is set to `null` and is not checked for keys ```shell -curl 'http://0.0.0.0:8000/key/generate' \ +curl 'http://0.0.0.0:4000/key/generate' \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data-raw '{ @@ -450,7 +517,7 @@ curl 'http://0.0.0.0:8000/key/generate' \ Example Request to `/chat/completions` when key has crossed budget ```shell -curl --location 'http://0.0.0.0:8000/chat/completions' \ +curl --location 'http://0.0.0.0:4000/chat/completions' \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer sk-ULl_IKCVFy2EZRzQB16RUA' \ --data ' { @@ -478,10 +545,10 @@ Expected Response from `/chat/completions` when key has crossed budget LiteLLM exposes a `/user/new` endpoint to create budgets for users, that persist across multiple keys. -This is documented in the swagger (live on your server root endpoint - e.g. `http://0.0.0.0:8000/`). Here's an example request. +This is documented in the swagger (live on your server root endpoint - e.g. `http://0.0.0.0:4000/`). Here's an example request. ```shell -curl --location 'http://localhost:8000/user/new' \ +curl --location 'http://localhost:4000/user/new' \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data-raw '{"models": ["azure-models"], "max_budget": 0, "user_id": "krrish3@berri.ai"}' @@ -504,7 +571,7 @@ The request is a normal `/key/generate` request body + a `max_budget` field. You can get spend for a key by using the `/key/info` endpoint. ```bash -curl 'http://0.0.0.0:8000/key/info?key=' \ +curl 'http://0.0.0.0:4000/key/info?key=' \ -X GET \ -H 'Authorization: Bearer ' ``` @@ -704,7 +771,7 @@ general_settings: #### Step 3. Generate Key ```bash -curl --location 'http://0.0.0.0:8000/key/generate' \ +curl --location 'http://0.0.0.0:4000/key/generate' \ --header 'Authorization: Bearer sk-1234' \ --header 'Content-Type: application/json' \ --data '{"models": ["azure-models"], "aliases": {"mistral-7b": "gpt-3.5-turbo"}, "duration": null}' diff --git a/docs/my-website/docs/routing.md b/docs/my-website/docs/routing.md index 4760058401c..9735b539e00 100644 --- a/docs/my-website/docs/routing.md +++ b/docs/my-website/docs/routing.md @@ -29,7 +29,7 @@ If you want a server to load balance across different LLM APIs, use our [OpenAI from litellm import Router model_list = [{ # list of model deployments - "model_name": "gpt-3.5-turbo", # model alias + "model_name": "gpt-3.5-turbo", # model alias -> loadbalance between models with same `model_name` "litellm_params": { # params for litellm completion/embedding call "model": "azure/chatgpt-v-2", # actual model name "api_key": os.getenv("AZURE_API_KEY"), @@ -50,14 +50,38 @@ model_list = [{ # list of model deployments "model": "gpt-3.5-turbo", "api_key": os.getenv("OPENAI_API_KEY"), } -}] +}, { + "model_name": "gpt-4", + "litellm_params": { # params for litellm completion/embedding call + "model": "azure/gpt-4", + "api_key": os.getenv("AZURE_API_KEY"), + "api_base": os.getenv("AZURE_API_BASE"), + "api_version": os.getenv("AZURE_API_VERSION"), + } +}, { + "model_name": "gpt-4", + "litellm_params": { # params for litellm completion/embedding call + "model": "gpt-4", + "api_key": os.getenv("OPENAI_API_KEY"), + } +}, + +] router = Router(model_list=model_list) # openai.ChatCompletion.create replacement +# requests with model="gpt-3.5-turbo" will pick a deployment where model_name="gpt-3.5-turbo" response = await router.acompletion(model="gpt-3.5-turbo", messages=[{"role": "user", "content": "Hey, how's it going?"}]) +print(response) + +# openai.ChatCompletion.create replacement +# requests with model="gpt-4" will pick a deployment where model_name="gpt-4" +response = await router.acompletion(model="gpt-4", + messages=[{"role": "user", "content": "Hey, how's it going?"}]) + print(response) ``` diff --git a/docs/my-website/docs/simple_proxy_old_doc.md b/docs/my-website/docs/simple_proxy_old_doc.md index 01c8a5754b2..9dcb2779726 100644 --- a/docs/my-website/docs/simple_proxy_old_doc.md +++ b/docs/my-website/docs/simple_proxy_old_doc.md @@ -22,7 +22,7 @@ $ pip install 'litellm[proxy]' ```shell $ litellm --model huggingface/bigcode/starcoder -#INFO: Proxy running on http://0.0.0.0:8000 +#INFO: Proxy running on http://0.0.0.0:4000 ``` ### Test @@ -39,7 +39,7 @@ This will now automatically route any requests for gpt-3.5-turbo to bigcode star ```shell -curl --location 'http://0.0.0.0:8000/chat/completions' \ +curl --location 'http://0.0.0.0:4000/chat/completions' \ --header 'Content-Type: application/json' \ --data ' { "model": "gpt-3.5-turbo", @@ -59,7 +59,7 @@ curl --location 'http://0.0.0.0:8000/chat/completions' \ import openai client = openai.OpenAI( api_key="anything", - base_url="http://0.0.0.0:8000" + base_url="http://0.0.0.0:4000" ) # request sent to model set on litellm proxy, `litellm --model` @@ -246,7 +246,7 @@ Set `base_url` to the LiteLLM Proxy server import openai client = openai.OpenAI( api_key="anything", - base_url="http://0.0.0.0:8000" + base_url="http://0.0.0.0:4000" ) # request sent to model set on litellm proxy, `litellm --model` @@ -267,7 +267,7 @@ print(response) ```shell litellm --model gpt-3.5-turbo -#INFO: Proxy running on http://0.0.0.0:8000 +#INFO: Proxy running on http://0.0.0.0:4000 ``` #### 1. Clone the repo @@ -278,9 +278,9 @@ git clone https://github.com/danny-avila/LibreChat.git #### 2. Modify Librechat's `docker-compose.yml` -LiteLLM Proxy is running on port `8000`, set `8000` as the proxy below +LiteLLM Proxy is running on port `4000`, set `4000` as the proxy below ```yaml -OPENAI_REVERSE_PROXY=http://host.docker.internal:8000/v1/chat/completions +OPENAI_REVERSE_PROXY=http://host.docker.internal:4000/v1/chat/completions ``` #### 3. Save fake OpenAI key in Librechat's `.env` @@ -306,7 +306,7 @@ In the [config.py](https://continue.dev/docs/reference/Models/openai) set this a api_key="IGNORED", model="fake-model-name", context_length=2048, # customize if needed for your model - api_base="http://localhost:8000" # your proxy server url + api_base="http://localhost:4000" # your proxy server url ), ``` @@ -318,7 +318,7 @@ Credits [@vividfog](https://github.com/jmorganca/ollama/issues/305#issuecomment- ```shell $ pip install aider -$ aider --openai-api-base http://0.0.0.0:8000 --openai-api-key fake-key +$ aider --openai-api-base http://0.0.0.0:4000 --openai-api-key fake-key ``` @@ -332,7 +332,7 @@ from autogen import AssistantAgent, UserProxyAgent, oai config_list=[ { "model": "my-fake-model", - "api_base": "http://localhost:8000", #litellm compatible endpoint + "api_base": "http://localhost:4000", #litellm compatible endpoint "api_type": "open_ai", "api_key": "NULL", # just a placeholder } @@ -370,7 +370,7 @@ import guidance # set api_base to your proxy # set api_key to anything -gpt4 = guidance.llms.OpenAI("gpt-4", api_base="http://0.0.0.0:8000", api_key="anything") +gpt4 = guidance.llms.OpenAI("gpt-4", api_base="http://0.0.0.0:4000", api_key="anything") experts = guidance(''' {{#system~}} @@ -479,7 +479,7 @@ $ litellm --config /path/to/config.yaml #### Step 3: Use proxy Curl Command ```shell -curl --location 'http://0.0.0.0:8000/chat/completions' \ +curl --location 'http://0.0.0.0:4000/chat/completions' \ --header 'Content-Type: application/json' \ --data ' { "model": "zephyr-alpha", @@ -529,7 +529,7 @@ $ litellm --config /path/to/config.yaml #### Step 3: Use proxy Curl Command ```shell -curl --location 'http://0.0.0.0:8000/chat/completions' \ +curl --location 'http://0.0.0.0:4000/chat/completions' \ --header 'Content-Type: application/json' \ --data ' { "model": "gpt-3.5-turbo", @@ -586,7 +586,7 @@ litellm_settings: **Set dynamically** ```bash -curl --location 'http://0.0.0.0:8000/chat/completions' \ +curl --location 'http://0.0.0.0:4000/chat/completions' \ --header 'Content-Type: application/json' \ --data ' { "model": "zephyr-beta", @@ -615,7 +615,7 @@ model_list: - model_name: custom_embedding_model litellm_params: model: openai/custom_embedding # the `openai/` prefix tells litellm it's openai compatible - api_base: http://0.0.0.0:8000/ + api_base: http://0.0.0.0:4000/ - model_name: custom_embedding_model litellm_params: model: openai/custom_embedding # the `openai/` prefix tells litellm it's openai compatible @@ -665,7 +665,7 @@ litellm --config /path/to/config.yaml **Step 3: Generate temporary keys** ```shell -curl 'http://0.0.0.0:8000/key/generate' \ +curl 'http://0.0.0.0:4000/key/generate' \ --h 'Authorization: Bearer sk-1234' \ --d '{"models": ["gpt-3.5-turbo", "gpt-4", "claude-2"], "duration": "20m"}' ``` @@ -719,7 +719,7 @@ model_list: **Step 2: Generate a user key - enabling them access to specific models, custom model aliases, etc.** ```bash -curl -X POST "https://0.0.0.0:8000/key/generate" \ +curl -X POST "https://0.0.0.0:4000/key/generate" \ -H "Authorization: Bearer sk-1234" \ -H "Content-Type: application/json" \ -d '{ @@ -737,7 +737,7 @@ curl -X POST "https://0.0.0.0:8000/key/generate" \ You can get spend for a key by using the `/key/info` endpoint. ```bash -curl 'http://0.0.0.0:8000/key/info?key=' \ +curl 'http://0.0.0.0:4000/key/info?key=' \ -X GET \ -H 'Authorization: Bearer ' ``` @@ -787,10 +787,6 @@ model_list: litellm_params: model: ollama/mistral api_base: your_ollama_api_base - headers: { - "HTTP-Referer": "litellm.ai", - "X-Title": "LiteLLM Server" - } ``` **Step 2**: Start server with config @@ -872,7 +868,7 @@ $ litellm --config /path/to/config.yaml #### Using Caching Send the same request twice: ```shell -curl http://0.0.0.0:8000/v1/chat/completions \ +curl http://0.0.0.0:4000/v1/chat/completions \ -H "Content-Type: application/json" \ -d '{ "model": "gpt-3.5-turbo", @@ -880,7 +876,7 @@ curl http://0.0.0.0:8000/v1/chat/completions \ "temperature": 0.7 }' -curl http://0.0.0.0:8000/v1/chat/completions \ +curl http://0.0.0.0:4000/v1/chat/completions \ -H "Content-Type: application/json" \ -d '{ "model": "gpt-3.5-turbo", @@ -893,7 +889,7 @@ curl http://0.0.0.0:8000/v1/chat/completions \ Caching can be switched on/off per `/chat/completions` request - Caching **on** for completion - pass `caching=True`: ```shell - curl http://0.0.0.0:8000/v1/chat/completions \ + curl http://0.0.0.0:4000/v1/chat/completions \ -H "Content-Type: application/json" \ -d '{ "model": "gpt-3.5-turbo", @@ -904,7 +900,7 @@ Caching can be switched on/off per `/chat/completions` request ``` - Caching **off** for completion - pass `caching=False`: ```shell - curl http://0.0.0.0:8000/v1/chat/completions \ + curl http://0.0.0.0:4000/v1/chat/completions \ -H "Content-Type: application/json" \ -d '{ "model": "gpt-3.5-turbo", @@ -967,10 +963,10 @@ https://api.openai.com/v1/chat/completions \ Use this to health check all LLMs defined in your config.yaml #### Request ```shell -curl --location 'http://0.0.0.0:8000/health' +curl --location 'http://0.0.0.0:4000/health' ``` -You can also run `litellm -health` it makes a `get` request to `http://0.0.0.0:8000/health` for you +You can also run `litellm -health` it makes a `get` request to `http://0.0.0.0:4000/health` for you ``` litellm --health ``` @@ -1091,7 +1087,7 @@ litellm -config config.yaml #### Run a test request to Proxy ```shell -curl --location 'http://0.0.0.0:8000/chat/completions' \ +curl --location 'http://0.0.0.0:4000/chat/completions' \ --header 'Authorization: Bearer sk-1244' \ --data ' { "model": "gpt-3.5-turbo", @@ -1217,7 +1213,7 @@ LiteLLM proxy adds **0.00325 seconds** latency as compared to using the Raw Open ``` #### --port - - **Default:** `8000` + - **Default:** `4000` - The port to bind the server to. - **Usage:** ```shell diff --git a/docs/my-website/img/admin_ui_viewer.png b/docs/my-website/img/admin_ui_viewer.png new file mode 100644 index 00000000000..3880d007b70 Binary files /dev/null and b/docs/my-website/img/admin_ui_viewer.png differ diff --git a/docs/my-website/img/athina_dashboard.png b/docs/my-website/img/athina_dashboard.png new file mode 100644 index 00000000000..05694aab96b Binary files /dev/null and b/docs/my-website/img/athina_dashboard.png differ diff --git a/docs/my-website/img/budget_alerts.png b/docs/my-website/img/budget_alerts.png new file mode 100644 index 00000000000..82d80b90ede Binary files /dev/null and b/docs/my-website/img/budget_alerts.png differ diff --git a/docs/my-website/img/create_key.png b/docs/my-website/img/create_key.png new file mode 100644 index 00000000000..b3b0532982e Binary files /dev/null and b/docs/my-website/img/create_key.png differ diff --git a/docs/my-website/img/locust.png b/docs/my-website/img/locust.png new file mode 100644 index 00000000000..1bcedf1d04b Binary files /dev/null and b/docs/my-website/img/locust.png differ diff --git a/docs/my-website/img/test_alert.png b/docs/my-website/img/test_alert.png new file mode 100644 index 00000000000..ba253da83a1 Binary files /dev/null and b/docs/my-website/img/test_alert.png differ diff --git a/docs/my-website/sidebars.js b/docs/my-website/sidebars.js index 2955aa6ed82..62a2d384245 100644 --- a/docs/my-website/sidebars.js +++ b/docs/my-website/sidebars.js @@ -39,11 +39,9 @@ const sidebars = { "proxy/user_keys", "proxy/virtual_keys", "proxy/users", + "proxy/team_based_routing", "proxy/ui", - "proxy/model_management", - "proxy/health", - "proxy/debugging", - "proxy/pii_masking", + "proxy/budget_alerts", { "type": "category", "label": "🔥 Load Balancing", @@ -52,6 +50,10 @@ const sidebars = { "proxy/reliability", ] }, + "proxy/model_management", + "proxy/health", + "proxy/debugging", + "proxy/pii_masking", "proxy/caching", { "type": "category", @@ -99,12 +101,13 @@ const sidebars = { }, { type: "category", - label: "Embedding(), Moderation(), Image Generation()", + label: "Embedding(), Moderation(), Image Generation(), Audio Transcriptions()", items: [ "embedding/supported_embedding", "embedding/async_embedding", "embedding/moderation", - "image_generation" + "image_generation", + "audio_transcription" ], }, { @@ -120,8 +123,7 @@ const sidebars = { "providers/openai", "providers/openai_compatible", "providers/azure", - "providers/huggingface", - "providers/ollama", + "providers/azure_ai", "providers/vertex", "providers/palm", "providers/gemini", @@ -130,7 +132,10 @@ const sidebars = { "providers/aws_sagemaker", "providers/bedrock", "providers/anyscale", + "providers/huggingface", + "providers/ollama", "providers/perplexity", + "providers/groq", "providers/vllm", "providers/xinference", "providers/cloudflare_workers", @@ -153,6 +158,7 @@ const sidebars = { "rules", "set_keys", "budget_manager", + "contributing", "secret", "completion/token_usage", "load_test", @@ -170,6 +176,7 @@ const sidebars = { "observability/langsmith_integration", "observability/slack_integration", "observability/traceloop_integration", + "observability/athina_integration", "observability/llmonitor_integration", "observability/helicone_integration", "observability/supabase_integration", diff --git a/enterprise/cloudformation_stack/litellm.yaml b/enterprise/cloudformation_stack/litellm.yaml new file mode 100644 index 00000000000..c30956b9451 --- /dev/null +++ b/enterprise/cloudformation_stack/litellm.yaml @@ -0,0 +1,44 @@ +Resources: + LiteLLMServer: + Type: AWS::EC2::Instance + Properties: + AvailabilityZone: us-east-1a + ImageId: ami-0f403e3180720dd7e + InstanceType: t2.micro + + LiteLLMServerAutoScalingGroup: + Type: AWS::AutoScaling::AutoScalingGroup + Properties: + AvailabilityZones: + - us-east-1a + LaunchConfigurationName: !Ref LiteLLMServerLaunchConfig + MinSize: 1 + MaxSize: 3 + DesiredCapacity: 1 + HealthCheckGracePeriod: 300 + + LiteLLMServerLaunchConfig: + Type: AWS::AutoScaling::LaunchConfiguration + Properties: + ImageId: ami-0f403e3180720dd7e # Replace with your desired AMI ID + InstanceType: t2.micro + + LiteLLMServerScalingPolicy: + Type: AWS::AutoScaling::ScalingPolicy + Properties: + AutoScalingGroupName: !Ref LiteLLMServerAutoScalingGroup + PolicyType: TargetTrackingScaling + TargetTrackingConfiguration: + PredefinedMetricSpecification: + PredefinedMetricType: ASGAverageCPUUtilization + TargetValue: 60.0 + + LiteLLMDB: + Type: AWS::RDS::DBInstance + Properties: + AllocatedStorage: 20 + Engine: postgres + MasterUsername: litellmAdmin + MasterUserPassword: litellmPassword + DBInstanceClass: db.t3.micro + AvailabilityZone: us-east-1a \ No newline at end of file diff --git a/enterprise/enterprise_hooks/banned_keywords.py b/enterprise/enterprise_hooks/banned_keywords.py new file mode 100644 index 00000000000..acd390d7985 --- /dev/null +++ b/enterprise/enterprise_hooks/banned_keywords.py @@ -0,0 +1,103 @@ +# +------------------------------+ +# +# Banned Keywords +# +# +------------------------------+ +# Thank you users! We ❤️ you! - Krrish & Ishaan +## Reject a call / response if it contains certain keywords + + +from typing import Optional, Literal +import litellm +from litellm.caching import DualCache +from litellm.proxy._types import UserAPIKeyAuth +from litellm.integrations.custom_logger import CustomLogger +from litellm._logging import verbose_proxy_logger +from fastapi import HTTPException +import json, traceback + + +class _ENTERPRISE_BannedKeywords(CustomLogger): + # Class variables or attributes + def __init__(self): + banned_keywords_list = litellm.banned_keywords_list + + if banned_keywords_list is None: + raise Exception( + "`banned_keywords_list` can either be a list or filepath. None set." + ) + + if isinstance(banned_keywords_list, list): + self.banned_keywords_list = banned_keywords_list + + if isinstance(banned_keywords_list, str): # assume it's a filepath + try: + with open(banned_keywords_list, "r") as file: + data = file.read() + self.banned_keywords_list = data.split("\n") + except FileNotFoundError: + raise Exception( + f"File not found. banned_keywords_list={banned_keywords_list}" + ) + except Exception as e: + raise Exception( + f"An error occurred: {str(e)}, banned_keywords_list={banned_keywords_list}" + ) + + def print_verbose(self, print_statement, level: Literal["INFO", "DEBUG"] = "DEBUG"): + if level == "INFO": + verbose_proxy_logger.info(print_statement) + elif level == "DEBUG": + verbose_proxy_logger.debug(print_statement) + + if litellm.set_verbose is True: + print(print_statement) # noqa + + def test_violation(self, test_str: str): + for word in self.banned_keywords_list: + if word in test_str.lower(): + raise HTTPException( + status_code=400, + detail={"error": f"Keyword banned. Keyword={word}"}, + ) + + async def async_pre_call_hook( + self, + user_api_key_dict: UserAPIKeyAuth, + cache: DualCache, + data: dict, + call_type: str, # "completion", "embeddings", "image_generation", "moderation" + ): + try: + """ + - check if user id part of call + - check if user id part of blocked list + """ + self.print_verbose(f"Inside Banned Keyword List Pre-Call Hook") + if call_type == "completion" and "messages" in data: + for m in data["messages"]: + if "content" in m and isinstance(m["content"], str): + self.test_violation(test_str=m["content"]) + + except HTTPException as e: + raise e + except Exception as e: + traceback.print_exc() + + async def async_post_call_success_hook( + self, + user_api_key_dict: UserAPIKeyAuth, + response, + ): + if isinstance(response, litellm.ModelResponse) and isinstance( + response.choices[0], litellm.utils.Choices + ): + for word in self.banned_keywords_list: + self.test_violation(test_str=response.choices[0].message.content) + + async def async_post_call_streaming_hook( + self, + user_api_key_dict: UserAPIKeyAuth, + response: str, + ): + self.test_violation(test_str=response) diff --git a/enterprise/enterprise_hooks/blocked_user_list.py b/enterprise/enterprise_hooks/blocked_user_list.py new file mode 100644 index 00000000000..26a1bd9f78f --- /dev/null +++ b/enterprise/enterprise_hooks/blocked_user_list.py @@ -0,0 +1,80 @@ +# +------------------------------+ +# +# Blocked User List +# +# +------------------------------+ +# Thank you users! We ❤️ you! - Krrish & Ishaan +## This accepts a list of user id's for whom calls will be rejected + + +from typing import Optional, Literal +import litellm +from litellm.caching import DualCache +from litellm.proxy._types import UserAPIKeyAuth +from litellm.integrations.custom_logger import CustomLogger +from litellm._logging import verbose_proxy_logger +from fastapi import HTTPException +import json, traceback + + +class _ENTERPRISE_BlockedUserList(CustomLogger): + # Class variables or attributes + def __init__(self): + blocked_user_list = litellm.blocked_user_list + + if blocked_user_list is None: + raise Exception( + "`blocked_user_list` can either be a list or filepath. None set." + ) + + if isinstance(blocked_user_list, list): + self.blocked_user_list = blocked_user_list + + if isinstance(blocked_user_list, str): # assume it's a filepath + try: + with open(blocked_user_list, "r") as file: + data = file.read() + self.blocked_user_list = data.split("\n") + except FileNotFoundError: + raise Exception( + f"File not found. blocked_user_list={blocked_user_list}" + ) + except Exception as e: + raise Exception( + f"An error occurred: {str(e)}, blocked_user_list={blocked_user_list}" + ) + + def print_verbose(self, print_statement, level: Literal["INFO", "DEBUG"] = "DEBUG"): + if level == "INFO": + verbose_proxy_logger.info(print_statement) + elif level == "DEBUG": + verbose_proxy_logger.debug(print_statement) + + if litellm.set_verbose is True: + print(print_statement) # noqa + + async def async_pre_call_hook( + self, + user_api_key_dict: UserAPIKeyAuth, + cache: DualCache, + data: dict, + call_type: str, + ): + try: + """ + - check if user id part of call + - check if user id part of blocked list + """ + self.print_verbose(f"Inside Blocked User List Pre-Call Hook") + if "user_id" in data: + if data["user_id"] in self.blocked_user_list: + raise HTTPException( + status_code=400, + detail={ + "error": f"User blocked from making LLM API Calls. User={data['user_id']}" + }, + ) + except HTTPException as e: + raise e + except Exception as e: + traceback.print_exc() diff --git a/enterprise/utils.py b/enterprise/utils.py index 61a621f8669..d762cd56cfc 100644 --- a/enterprise/utils.py +++ b/enterprise/utils.py @@ -1,4 +1,5 @@ # Enterprise Proxy Util Endpoints +from litellm._logging import verbose_logger async def get_spend_by_tags(start_date=None, end_date=None, prisma_client=None): @@ -14,3 +15,333 @@ async def get_spend_by_tags(start_date=None, end_date=None, prisma_client=None): ) return response + + +async def view_spend_logs_from_clickhouse( + api_key=None, user_id=None, request_id=None, start_date=None, end_date=None +): + verbose_logger.debug("Reading logs from Clickhouse") + import os + + # if user has setup clickhouse + # TODO: Move this to be a helper function + # querying clickhouse for this data + import clickhouse_connect + from datetime import datetime + + port = os.getenv("CLICKHOUSE_PORT") + if port is not None and isinstance(port, str): + port = int(port) + + client = clickhouse_connect.get_client( + host=os.getenv("CLICKHOUSE_HOST"), + port=port, + username=os.getenv("CLICKHOUSE_USERNAME", ""), + password=os.getenv("CLICKHOUSE_PASSWORD", ""), + ) + if ( + start_date is not None + and isinstance(start_date, str) + and end_date is not None + and isinstance(end_date, str) + ): + # Convert the date strings to datetime objects + start_date_obj = datetime.strptime(start_date, "%Y-%m-%d") + end_date_obj = datetime.strptime(end_date, "%Y-%m-%d") + + # get top spend per day + response = client.query( + f""" + SELECT + toDate(startTime) AS day, + sum(spend) AS total_spend + FROM + spend_logs + WHERE + toDate(startTime) BETWEEN toDate('2024-02-01') AND toDate('2024-02-29') + GROUP BY + day + ORDER BY + total_spend + """ + ) + + results = [] + result_rows = list(response.result_rows) + for response in result_rows: + current_row = {} + current_row["users"] = {"example": 0.0} + current_row["models"] = {} + + current_row["spend"] = float(response[1]) + current_row["startTime"] = str(response[0]) + + # stubbed api_key + current_row[""] = 0.0 # type: ignore + results.append(current_row) + + return results + else: + # check if spend logs exist, if it does then return last 10 logs, sorted in descending order of startTime + response = client.query( + """ + SELECT + * + FROM + default.spend_logs + ORDER BY + startTime DESC + LIMIT + 10 + """ + ) + + # get size of spend logs + num_rows = client.query("SELECT count(*) FROM default.spend_logs") + num_rows = num_rows.result_rows[0][0] + + # safely access num_rows.result_rows[0][0] + if num_rows is None: + num_rows = 0 + + raw_rows = list(response.result_rows) + response_data = { + "logs": raw_rows, + "log_count": num_rows, + } + return response_data + + +def _create_clickhouse_material_views(client=None, table_names=[]): + # Create Materialized Views if they don't exist + # Materialized Views send new inserted rows to the aggregate tables + + verbose_logger.debug("Clickhouse: Creating Materialized Views") + if "daily_aggregated_spend_per_model_mv" not in table_names: + verbose_logger.debug("Clickhouse: Creating daily_aggregated_spend_per_model_mv") + client.command( + """ + CREATE MATERIALIZED VIEW daily_aggregated_spend_per_model_mv + TO daily_aggregated_spend_per_model + AS + SELECT + toDate(startTime) as day, + sumState(spend) AS DailySpend, + model as model + FROM spend_logs + GROUP BY + day, model + """ + ) + if "daily_aggregated_spend_per_api_key_mv" not in table_names: + verbose_logger.debug( + "Clickhouse: Creating daily_aggregated_spend_per_api_key_mv" + ) + client.command( + """ + CREATE MATERIALIZED VIEW daily_aggregated_spend_per_api_key_mv + TO daily_aggregated_spend_per_api_key + AS + SELECT + toDate(startTime) as day, + sumState(spend) AS DailySpend, + api_key as api_key + FROM spend_logs + GROUP BY + day, api_key + """ + ) + if "daily_aggregated_spend_per_user_mv" not in table_names: + verbose_logger.debug("Clickhouse: Creating daily_aggregated_spend_per_user_mv") + client.command( + """ + CREATE MATERIALIZED VIEW daily_aggregated_spend_per_user_mv + TO daily_aggregated_spend_per_user + AS + SELECT + toDate(startTime) as day, + sumState(spend) AS DailySpend, + user as user + FROM spend_logs + GROUP BY + day, user + """ + ) + if "daily_aggregated_spend_mv" not in table_names: + verbose_logger.debug("Clickhouse: Creating daily_aggregated_spend_mv") + client.command( + """ + CREATE MATERIALIZED VIEW daily_aggregated_spend_mv + TO daily_aggregated_spend + AS + SELECT + toDate(startTime) as day, + sumState(spend) AS DailySpend + FROM spend_logs + GROUP BY + day + """ + ) + + +def _create_clickhouse_aggregate_tables(client=None, table_names=[]): + # Basic Logging works without this - this is only used for low latency reporting apis + verbose_logger.debug("Clickhouse: Creating Aggregate Tables") + + # Create Aggregeate Tables if they don't exist + if "daily_aggregated_spend_per_model" not in table_names: + verbose_logger.debug("Clickhouse: Creating daily_aggregated_spend_per_model") + client.command( + """ + CREATE TABLE daily_aggregated_spend_per_model + ( + `day` Date, + `DailySpend` AggregateFunction(sum, Float64), + `model` String + ) + ENGINE = SummingMergeTree() + ORDER BY (day, model); + """ + ) + if "daily_aggregated_spend_per_api_key" not in table_names: + verbose_logger.debug("Clickhouse: Creating daily_aggregated_spend_per_api_key") + client.command( + """ + CREATE TABLE daily_aggregated_spend_per_api_key + ( + `day` Date, + `DailySpend` AggregateFunction(sum, Float64), + `api_key` String + ) + ENGINE = SummingMergeTree() + ORDER BY (day, api_key); + """ + ) + if "daily_aggregated_spend_per_user" not in table_names: + verbose_logger.debug("Clickhouse: Creating daily_aggregated_spend_per_user") + client.command( + """ + CREATE TABLE daily_aggregated_spend_per_user + ( + `day` Date, + `DailySpend` AggregateFunction(sum, Float64), + `user` String + ) + ENGINE = SummingMergeTree() + ORDER BY (day, user); + """ + ) + if "daily_aggregated_spend" not in table_names: + verbose_logger.debug("Clickhouse: Creating daily_aggregated_spend") + client.command( + """ + CREATE TABLE daily_aggregated_spend + ( + `day` Date, + `DailySpend` AggregateFunction(sum, Float64), + ) + ENGINE = SummingMergeTree() + ORDER BY (day); + """ + ) + return + + +def _forecast_daily_cost(data: list): + import requests + from datetime import datetime, timedelta + + first_entry = data[0] + last_entry = data[-1] + + # get the date today + today_date = datetime.today().date() + + today_day_month = today_date.month + + # Parse the date from the first entry + first_entry_date = datetime.strptime(first_entry["date"], "%Y-%m-%d").date() + last_entry_date = datetime.strptime(last_entry["date"], "%Y-%m-%d") + + print("last entry date", last_entry_date) + + # Assuming today_date is a datetime object + today_date = datetime.now() + + # Calculate the last day of the month + last_day_of_todays_month = datetime( + today_date.year, today_date.month % 12 + 1, 1 + ) - timedelta(days=1) + + # Calculate the remaining days in the month + remaining_days = (last_day_of_todays_month - last_entry_date).days + + current_spend_this_month = 0 + series = {} + for entry in data: + date = entry["date"] + spend = entry["spend"] + series[date] = spend + + # check if the date is in this month + if datetime.strptime(date, "%Y-%m-%d").month == today_day_month: + current_spend_this_month += spend + + if len(series) < 10: + num_items_to_fill = 11 - len(series) + + # avg spend for all days in series + avg_spend = sum(series.values()) / len(series) + for i in range(num_items_to_fill): + # go backwards from the first entry + date = first_entry_date - timedelta(days=i) + series[date.strftime("%Y-%m-%d")] = avg_spend + series[date.strftime("%Y-%m-%d")] = avg_spend + + payload = {"series": series, "count": remaining_days} + print("Prediction Data:", payload) + + headers = { + "Content-Type": "application/json", + } + + response = requests.post( + url="https://trend-api-production.up.railway.app/forecast", + json=payload, + headers=headers, + ) + # check the status code + response.raise_for_status() + + json_response = response.json() + forecast_data = json_response["forecast"] + + # print("Forecast Data:", forecast_data) + + response_data = [] + total_predicted_spend = current_spend_this_month + for date in forecast_data: + spend = forecast_data[date] + entry = { + "date": date, + "predicted_spend": spend, + } + total_predicted_spend += spend + response_data.append(entry) + + # get month as a string, Jan, Feb, etc. + today_month = today_date.strftime("%B") + predicted_spend = ( + f"Predicted Spend for { today_month } 2024, ${total_predicted_spend}" + ) + return {"response": response_data, "predicted_spend": predicted_spend} + + # print(f"Date: {entry['date']}, Spend: {entry['spend']}, Response: {response.text}") + + +# _forecast_daily_cost( +# [ +# {"date": "2022-01-01", "spend": 100}, + +# ] +# ) diff --git a/litellm/__init__.py b/litellm/__init__.py index 83bd98c463e..04c2d23c79b 100644 --- a/litellm/__init__.py +++ b/litellm/__init__.py @@ -60,6 +60,8 @@ llamaguard_model_name: Optional[str] = None presidio_ad_hoc_recognizers: Optional[str] = None google_moderation_confidence_threshold: Optional[float] = None llamaguard_unsafe_content_categories: Optional[str] = None +blocked_user_list: Optional[Union[str, List]] = None +banned_keywords_list: Optional[Union[str, List]] = None ################## logging: bool = True caching: bool = ( @@ -77,6 +79,9 @@ max_budget: float = 0.0 # set the max budget across all providers budget_duration: Optional[str] = ( None # proxy only - resets budget after fixed duration. You can set duration as seconds ("30s"), minutes ("30m"), hours ("30h"), days ("30d"). ) +default_soft_budget: float = ( + 50.0 # by default all litellm proxy keys have a soft budget of 50.0 +) _openai_finish_reasons = ["stop", "length", "function_call", "content_filter", "null"] _openai_completion_params = [ "functions", @@ -163,6 +168,7 @@ s3_callback_params: Optional[Dict] = None generic_logger_headers: Optional[Dict] = None default_key_generate_params: Optional[Dict] = None upperbound_key_generate_params: Optional[Dict] = None +default_user_params: Optional[Dict] = None default_team_settings: Optional[List] = None max_user_budget: Optional[float] = None #### RELIABILITY #### @@ -305,6 +311,7 @@ openai_compatible_endpoints: List = [ "api.endpoints.anyscale.com/v1", "api.deepinfra.com/v1/openai", "api.mistral.ai/v1", + "api.groq.com/openai/v1", "api.together.xyz/v1", ] @@ -312,6 +319,7 @@ openai_compatible_endpoints: List = [ openai_compatible_providers: List = [ "anyscale", "mistral", + "groq", "deepinfra", "perplexity", "xinference", @@ -459,6 +467,7 @@ provider_list: List = [ "perplexity", "anyscale", "mistral", + "groq", "maritalk", "voyage", "cloudflare", @@ -543,6 +552,8 @@ from .utils import ( token_counter, cost_per_token, completion_cost, + supports_function_calling, + supports_parallel_function_calling, get_litellm_params, Logging, acreate, @@ -559,9 +570,11 @@ from .utils import ( _calculate_retry_after, _should_retry, get_secret, + get_supported_openai_params, ) from .llms.huggingface_restapi import HuggingfaceConfig from .llms.anthropic import AnthropicConfig +from .llms.anthropic_text import AnthropicTextConfig from .llms.replicate import ReplicateConfig from .llms.cohere import CohereConfig from .llms.ai21 import AI21Config @@ -575,14 +588,17 @@ from .llms.petals import PetalsConfig from .llms.vertex_ai import VertexAIConfig from .llms.sagemaker import SagemakerConfig from .llms.ollama import OllamaConfig +from .llms.ollama_chat import OllamaChatConfig from .llms.maritalk import MaritTalkConfig from .llms.bedrock import ( AmazonTitanConfig, AmazonAI21Config, AmazonAnthropicConfig, + AmazonAnthropicClaude3Config, AmazonCohereConfig, AmazonLlamaConfig, AmazonStabilityConfig, + AmazonMistralConfig, ) from .llms.openai import OpenAIConfig, OpenAITextCompletionConfig from .llms.azure import AzureOpenAIConfig, AzureOpenAIError diff --git a/litellm/_logging.py b/litellm/_logging.py index 438fa9743de..26693c15ecd 100644 --- a/litellm/_logging.py +++ b/litellm/_logging.py @@ -31,6 +31,18 @@ def _turn_on_debug(): verbose_proxy_logger.setLevel(level=logging.DEBUG) # set proxy logs to debug +def _disable_debugging(): + verbose_logger.disabled = True + verbose_router_logger.disabled = True + verbose_proxy_logger.disabled = True + + +def _enable_debugging(): + verbose_logger.disabled = False + verbose_router_logger.disabled = False + verbose_proxy_logger.disabled = False + + def print_verbose(print_statement): try: if set_verbose: diff --git a/litellm/caching.py b/litellm/caching.py index ac9d559dc0d..833da1238a0 100644 --- a/litellm/caching.py +++ b/litellm/caching.py @@ -10,7 +10,7 @@ import litellm import time, logging, asyncio import json, traceback, ast, hashlib -from typing import Optional, Literal, List, Union, Any +from typing import Optional, Literal, List, Union, Any, BinaryIO from openai._models import BaseModel as OpenAIObject from litellm._logging import verbose_logger @@ -48,6 +48,7 @@ class InMemoryCache(BaseCache): self.ttl_dict = {} def set_cache(self, key, value, **kwargs): + print_verbose("InMemoryCache: set_cache") self.cache_dict[key] = value if "ttl" in kwargs: self.ttl_dict[key] = time.time() + kwargs["ttl"] @@ -572,6 +573,7 @@ class S3Cache(BaseCache): self.bucket_name = s3_bucket_name self.key_prefix = s3_path.rstrip("/") + "/" if s3_path else "" # Create an S3 client with custom endpoint URL + self.s3_client = boto3.client( "s3", region_name=s3_region_name, @@ -763,8 +765,24 @@ class Cache: password: Optional[str] = None, similarity_threshold: Optional[float] = None, supported_call_types: Optional[ - List[Literal["completion", "acompletion", "embedding", "aembedding"]] - ] = ["completion", "acompletion", "embedding", "aembedding"], + List[ + Literal[ + "completion", + "acompletion", + "embedding", + "aembedding", + "atranscription", + "transcription", + ] + ] + ] = [ + "completion", + "acompletion", + "embedding", + "aembedding", + "atranscription", + "transcription", + ], # s3 Bucket, boto3 configuration s3_bucket_name: Optional[str] = None, s3_region_name: Optional[str] = None, @@ -776,6 +794,7 @@ class Cache: s3_aws_secret_access_key: Optional[str] = None, s3_aws_session_token: Optional[str] = None, s3_config: Optional[Any] = None, + s3_path: Optional[str] = None, redis_semantic_cache_use_async=False, redis_semantic_cache_embedding_model="text-embedding-ada-002", **kwargs, @@ -825,6 +844,7 @@ class Cache: s3_aws_secret_access_key=s3_aws_secret_access_key, s3_aws_session_token=s3_aws_session_token, s3_config=s3_config, + s3_path=s3_path, **kwargs, ) if "cache" not in litellm.input_callback: @@ -877,9 +897,14 @@ class Cache: "input", "encoding_format", ] # embedding kwargs = model, input, user, encoding_format. Model, user are checked in completion_kwargs - + transcription_only_kwargs = [ + "file", + "language", + ] # combined_kwargs - NEEDS to be ordered across get_cache_key(). Do not use a set() - combined_kwargs = completion_kwargs + embedding_only_kwargs + combined_kwargs = ( + completion_kwargs + embedding_only_kwargs + transcription_only_kwargs + ) for param in combined_kwargs: # ignore litellm params here if param in kwargs: @@ -911,6 +936,17 @@ class Cache: param_value = ( caching_group or model_group or kwargs[param] ) # use caching_group, if set then model_group if it exists, else use kwargs["model"] + elif param == "file": + metadata_file_name = kwargs.get("metadata", {}).get( + "file_name", None + ) + litellm_params_file_name = kwargs.get("litellm_params", {}).get( + "file_name", None + ) + if metadata_file_name is not None: + param_value = metadata_file_name + elif litellm_params_file_name is not None: + param_value = litellm_params_file_name else: if kwargs[param] is None: continue # ignore None params @@ -1140,8 +1176,24 @@ def enable_cache( port: Optional[str] = None, password: Optional[str] = None, supported_call_types: Optional[ - List[Literal["completion", "acompletion", "embedding", "aembedding"]] - ] = ["completion", "acompletion", "embedding", "aembedding"], + List[ + Literal[ + "completion", + "acompletion", + "embedding", + "aembedding", + "atranscription", + "transcription", + ] + ] + ] = [ + "completion", + "acompletion", + "embedding", + "aembedding", + "atranscription", + "transcription", + ], **kwargs, ): """ @@ -1189,8 +1241,24 @@ def update_cache( port: Optional[str] = None, password: Optional[str] = None, supported_call_types: Optional[ - List[Literal["completion", "acompletion", "embedding", "aembedding"]] - ] = ["completion", "acompletion", "embedding", "aembedding"], + List[ + Literal[ + "completion", + "acompletion", + "embedding", + "aembedding", + "atranscription", + "transcription", + ] + ] + ] = [ + "completion", + "acompletion", + "embedding", + "aembedding", + "atranscription", + "transcription", + ], **kwargs, ): """ diff --git a/litellm/integrations/athina.py b/litellm/integrations/athina.py new file mode 100644 index 00000000000..f957384ea6d --- /dev/null +++ b/litellm/integrations/athina.py @@ -0,0 +1,56 @@ +import datetime + + +class AthinaLogger: + def __init__(self): + import os + self.athina_api_key = os.getenv("ATHINA_API_KEY") + self.headers = { + "athina-api-key": self.athina_api_key, + "Content-Type": "application/json" + } + self.athina_logging_url = "https://log.athina.ai/api/v1/log/inference" + self.additional_keys = ["environment", "prompt_slug", "customer_id", "customer_user_id", "session_id", "external_reference_id", "context", "expected_response"] + + def log_event(self, kwargs, response_obj, start_time, end_time, print_verbose): + import requests + import json + import traceback + try: + response_json = response_obj.model_dump() if response_obj else {} + data = { + "language_model_id": kwargs.get("model"), + "request": kwargs, + "response": response_json, + "prompt_tokens": response_json.get("usage", {}).get("prompt_tokens"), + "completion_tokens": response_json.get("usage", {}).get("completion_tokens"), + "total_tokens": response_json.get("usage", {}).get("total_tokens"), + } + + if type(end_time) == datetime.datetime and type(start_time) == datetime.datetime: + data["response_time"] = int((end_time - start_time).total_seconds() * 1000) + + if "messages" in kwargs: + data["prompt"] = kwargs.get("messages", None) + if kwargs.get("messages") and len(kwargs.get("messages")) > 0: + data["user_query"] = kwargs.get("messages")[0].get("content", None) + + # Directly add tools or functions if present + optional_params = kwargs.get("optional_params", {}) + data.update((k, v) for k, v in optional_params.items() if k in ["tools", "functions"]) + + # Add additional metadata keys + metadata = kwargs.get("litellm_params", {}).get("metadata", {}) + if metadata: + for key in self.additional_keys: + if key in metadata: + data[key] = metadata[key] + + response = requests.post(self.athina_logging_url, headers=self.headers, data=json.dumps(data, default=str)) + if response.status_code != 200: + print_verbose(f"Athina Logger Error - {response.text}, {response.status_code}") + else: + print_verbose(f"Athina Logger Succeeded - {response.text}") + except Exception as e: + print_verbose(f"Athina Logger Error - {e}, Stack trace: {traceback.format_exc()}") + pass \ No newline at end of file diff --git a/litellm/integrations/clickhouse.py b/litellm/integrations/clickhouse.py new file mode 100644 index 00000000000..d5000e5c467 --- /dev/null +++ b/litellm/integrations/clickhouse.py @@ -0,0 +1,307 @@ +# callback to make a request to an API endpoint + +#### What this does #### +# On success, logs events to Promptlayer +import dotenv, os +import requests + +from litellm.proxy._types import UserAPIKeyAuth +from litellm.caching import DualCache + +from typing import Literal, Union + +dotenv.load_dotenv() # Loading env variables using dotenv +import traceback + + +#### What this does #### +# On success + failure, log events to Supabase + +import dotenv, os +import requests + +dotenv.load_dotenv() # Loading env variables using dotenv +import traceback +import datetime, subprocess, sys +import litellm, uuid +from litellm._logging import print_verbose, verbose_logger + + +def create_client(): + try: + import clickhouse_connect + + port = os.getenv("CLICKHOUSE_PORT") + clickhouse_host = os.getenv("CLICKHOUSE_HOST") + if clickhouse_host is not None: + verbose_logger.debug("setting up clickhouse") + if port is not None and isinstance(port, str): + port = int(port) + + client = clickhouse_connect.get_client( + host=os.getenv("CLICKHOUSE_HOST"), + port=port, + username=os.getenv("CLICKHOUSE_USERNAME"), + password=os.getenv("CLICKHOUSE_PASSWORD"), + ) + return client + else: + raise Exception("Clickhouse: Clickhouse host not set") + except Exception as e: + raise ValueError(f"Clickhouse: {e}") + + +def build_daily_metrics(): + click_house_client = create_client() + + # get daily spend + daily_spend = click_house_client.query_df( + """ + SELECT sumMerge(DailySpend) as daily_spend, day FROM daily_aggregated_spend GROUP BY day + """ + ) + + # get daily spend per model + daily_spend_per_model = click_house_client.query_df( + """ + SELECT sumMerge(DailySpend) as daily_spend, day, model FROM daily_aggregated_spend_per_model GROUP BY day, model + """ + ) + new_df = daily_spend_per_model.to_dict(orient="records") + import pandas as pd + + df = pd.DataFrame(new_df) + # Group by 'day' and create a dictionary for each group + result_dict = {} + for day, group in df.groupby("day"): + models = group["model"].tolist() + spend = group["daily_spend"].tolist() + spend_per_model = {model: spend for model, spend in zip(models, spend)} + result_dict[day] = spend_per_model + + # Display the resulting dictionary + + # get daily spend per API key + daily_spend_per_api_key = click_house_client.query_df( + """ + SELECT + daily_spend, + day, + api_key + FROM ( + SELECT + sumMerge(DailySpend) as daily_spend, + day, + api_key, + RANK() OVER (PARTITION BY day ORDER BY sumMerge(DailySpend) DESC) as spend_rank + FROM + daily_aggregated_spend_per_api_key + GROUP BY + day, + api_key + ) AS ranked_api_keys + WHERE + spend_rank <= 5 + AND day IS NOT NULL + ORDER BY + day, + daily_spend DESC + """ + ) + new_df = daily_spend_per_api_key.to_dict(orient="records") + import pandas as pd + + df = pd.DataFrame(new_df) + # Group by 'day' and create a dictionary for each group + api_key_result_dict = {} + for day, group in df.groupby("day"): + api_keys = group["api_key"].tolist() + spend = group["daily_spend"].tolist() + spend_per_api_key = {api_key: spend for api_key, spend in zip(api_keys, spend)} + api_key_result_dict[day] = spend_per_api_key + + # Display the resulting dictionary + + # Calculate total spend across all days + total_spend = daily_spend["daily_spend"].sum() + + # Identify top models and top API keys with the highest spend across all days + top_models = {} + top_api_keys = {} + + for day, spend_per_model in result_dict.items(): + for model, model_spend in spend_per_model.items(): + if model not in top_models or model_spend > top_models[model]: + top_models[model] = model_spend + + for day, spend_per_api_key in api_key_result_dict.items(): + for api_key, api_key_spend in spend_per_api_key.items(): + if api_key not in top_api_keys or api_key_spend > top_api_keys[api_key]: + top_api_keys[api_key] = api_key_spend + + # for each day in daily spend, look up the day in result_dict and api_key_result_dict + # Assuming daily_spend DataFrame has 'day' column + result = [] + for index, row in daily_spend.iterrows(): + day = row["day"] + data_day = row.to_dict() + + # Look up in result_dict + if day in result_dict: + spend_per_model = result_dict[day] + # Assuming there is a column named 'model' in daily_spend + data_day["spend_per_model"] = spend_per_model # Assign 0 if model not found + + # Look up in api_key_result_dict + if day in api_key_result_dict: + spend_per_api_key = api_key_result_dict[day] + # Assuming there is a column named 'api_key' in daily_spend + data_day["spend_per_api_key"] = spend_per_api_key + + result.append(data_day) + + data_to_return = {} + data_to_return["daily_spend"] = result + + data_to_return["total_spend"] = total_spend + data_to_return["top_models"] = top_models + data_to_return["top_api_keys"] = top_api_keys + return data_to_return + + +# build_daily_metrics() + + +def _start_clickhouse(): + import clickhouse_connect + + port = os.getenv("CLICKHOUSE_PORT") + clickhouse_host = os.getenv("CLICKHOUSE_HOST") + if clickhouse_host is not None: + verbose_logger.debug("setting up clickhouse") + if port is not None and isinstance(port, str): + port = int(port) + + client = clickhouse_connect.get_client( + host=os.getenv("CLICKHOUSE_HOST"), + port=port, + username=os.getenv("CLICKHOUSE_USERNAME"), + password=os.getenv("CLICKHOUSE_PASSWORD"), + ) + # view all tables in DB + response = client.query("SHOW TABLES") + verbose_logger.debug( + f"checking if litellm spend logs exists, all tables={response.result_rows}" + ) + # all tables is returned like this: all tables = [('new_table',), ('spend_logs',)] + # check if spend_logs in all tables + table_names = [all_tables[0] for all_tables in response.result_rows] + + if "spend_logs" not in table_names: + verbose_logger.debug( + "Clickhouse: spend logs table does not exist... creating it" + ) + + response = client.command( + """ + CREATE TABLE default.spend_logs + ( + `request_id` String, + `call_type` String, + `api_key` String, + `spend` Float64, + `total_tokens` Int256, + `prompt_tokens` Int256, + `completion_tokens` Int256, + `startTime` DateTime, + `endTime` DateTime, + `model` String, + `user` String, + `metadata` String, + `cache_hit` String, + `cache_key` String, + `request_tags` String + ) + ENGINE = MergeTree + ORDER BY tuple(); + """ + ) + else: + # check if spend logs exist, if it does then return the schema + response = client.query("DESCRIBE default.spend_logs") + verbose_logger.debug(f"spend logs schema ={response.result_rows}") + + # RUN Enterprise Clickhouse Setup + # TLDR: For Enterprise - we create views / aggregate tables for low latency reporting APIs + from litellm.proxy.enterprise.utils import _create_clickhouse_aggregate_tables + from litellm.proxy.enterprise.utils import _create_clickhouse_material_views + + _create_clickhouse_aggregate_tables(client=client, table_names=table_names) + _create_clickhouse_material_views(client=client, table_names=table_names) + + +class ClickhouseLogger: + # Class variables or attributes + def __init__(self, endpoint=None, headers=None): + import clickhouse_connect + + _start_clickhouse() + + verbose_logger.debug( + f"ClickhouseLogger init, host {os.getenv('CLICKHOUSE_HOST')}, port {os.getenv('CLICKHOUSE_PORT')}, username {os.getenv('CLICKHOUSE_USERNAME')}" + ) + + port = os.getenv("CLICKHOUSE_PORT") + if port is not None and isinstance(port, str): + port = int(port) + + client = clickhouse_connect.get_client( + host=os.getenv("CLICKHOUSE_HOST"), + port=port, + username=os.getenv("CLICKHOUSE_USERNAME"), + password=os.getenv("CLICKHOUSE_PASSWORD"), + ) + self.client = client + + # This is sync, because we run this in a separate thread. Running in a sepearate thread ensures it will never block an LLM API call + # Experience with s3, Langfuse shows that async logging events are complicated and can block LLM calls + def log_event( + self, kwargs, response_obj, start_time, end_time, user_id, print_verbose + ): + try: + verbose_logger.debug( + f"ClickhouseLogger Logging - Enters logging function for model {kwargs}" + ) + # follows the same params as langfuse.py + from litellm.proxy.utils import get_logging_payload + + payload = get_logging_payload( + kwargs=kwargs, + response_obj=response_obj, + start_time=start_time, + end_time=end_time, + ) + metadata = payload.get("metadata", "") or "" + request_tags = payload.get("request_tags", "") or "" + payload["metadata"] = str(metadata) + payload["request_tags"] = str(request_tags) + # Build the initial payload + + verbose_logger.debug(f"\nClickhouse Logger - Logging payload = {payload}") + + # just get the payload items in one array and payload keys in 2nd array + values = [] + keys = [] + for key, value in payload.items(): + keys.append(key) + values.append(value) + data = [values] + + response = self.client.insert("default.spend_logs", data, column_names=keys) + + # make request to endpoint with payload + verbose_logger.debug(f"Clickhouse Logger - final response = {response}") + except Exception as e: + traceback.print_exc() + verbose_logger.debug(f"Clickhouse - {str(e)}\n{traceback.format_exc()}") + pass diff --git a/litellm/integrations/custom_logger.py b/litellm/integrations/custom_logger.py index 40242f5c031..0556ceebb9d 100644 --- a/litellm/integrations/custom_logger.py +++ b/litellm/integrations/custom_logger.py @@ -124,7 +124,6 @@ class CustomLogger: # https://docs.litellm.ai/docs/observability/custom_callbac start_time, end_time, ) - print_verbose(f"Custom Logger - final response object: {response_obj}") except: # traceback.print_exc() print_verbose(f"Custom Logger Error - {traceback.format_exc()}") @@ -142,7 +141,6 @@ class CustomLogger: # https://docs.litellm.ai/docs/observability/custom_callbac start_time, end_time, ) - print_verbose(f"Custom Logger - final response object: {response_obj}") except: # traceback.print_exc() print_verbose(f"Custom Logger Error - {traceback.format_exc()}") diff --git a/litellm/integrations/langfuse.py b/litellm/integrations/langfuse.py index f7f2634de3c..efb5b29fe3b 100644 --- a/litellm/integrations/langfuse.py +++ b/litellm/integrations/langfuse.py @@ -235,6 +235,9 @@ class LangFuseLogger: supports_tags = Version(langfuse.version.__version__) >= Version("2.6.3") supports_prompt = Version(langfuse.version.__version__) >= Version("2.7.3") supports_costs = Version(langfuse.version.__version__) >= Version("2.7.3") + supports_completion_start_time = Version( + langfuse.version.__version__ + ) >= Version("2.7.3") print_verbose(f"Langfuse Layer Logging - logging to langfuse v2 ") @@ -262,8 +265,14 @@ class LangFuseLogger: cost = kwargs.get("response_cost", None) print_verbose(f"trace: {cost}") - if supports_tags: + + # Clean Metadata before logging - never log raw metadata + # the raw metadata can contain circular references which leads to infinite recursion + # we clean out all extra litellm metadata params before logging + clean_metadata = {} + if isinstance(metadata, dict): for key, value in metadata.items(): + # generate langfuse tags if key in [ "user_api_key", "user_api_key_user_id", @@ -271,6 +280,19 @@ class LangFuseLogger: "semantic-similarity", ]: tags.append(f"{key}:{value}") + + # clean litellm metadata before logging + if key in [ + "headers", + "endpoint", + "caching_groups", + "previous_models", + ]: + continue + else: + clean_metadata[key] = value + + if supports_tags: if "cache_hit" in kwargs: if kwargs["cache_hit"] is None: kwargs["cache_hit"] = False @@ -298,7 +320,7 @@ class LangFuseLogger: "input": input, "output": output, "usage": usage, - "metadata": metadata, + "metadata": clean_metadata, "level": level, } @@ -308,6 +330,11 @@ class LangFuseLogger: if output is not None and isinstance(output, str) and level == "ERROR": generation_params["statusMessage"] = output + if supports_completion_start_time: + generation_params["completion_start_time"] = kwargs.get( + "completion_start_time", None + ) + trace.generation(**generation_params) except Exception as e: print(f"Langfuse Layer Error - {traceback.format_exc()}") diff --git a/litellm/integrations/s3.py b/litellm/integrations/s3.py index e25b39777c8..dc35430bc10 100644 --- a/litellm/integrations/s3.py +++ b/litellm/integrations/s3.py @@ -104,6 +104,23 @@ class S3Logger: usage = response_obj["usage"] id = response_obj.get("id", str(uuid.uuid4())) + # Clean Metadata before logging - never log raw metadata + # the raw metadata can contain circular references which leads to infinite recursion + # we clean out all extra litellm metadata params before logging + clean_metadata = {} + if isinstance(metadata, dict): + for key, value in metadata.items(): + # clean litellm metadata before logging + if key in [ + "headers", + "endpoint", + "caching_groups", + "previous_models", + ]: + continue + else: + clean_metadata[key] = value + # Build the initial payload payload = { "id": id, @@ -117,7 +134,7 @@ class S3Logger: "messages": messages, "response": response_obj, "usage": usage, - "metadata": metadata, + "metadata": clean_metadata, } # Ensure everything in the payload is converted to str diff --git a/litellm/llms/aleph_alpha.py b/litellm/llms/aleph_alpha.py index 7168e7369cc..3c1bd5dde07 100644 --- a/litellm/llms/aleph_alpha.py +++ b/litellm/llms/aleph_alpha.py @@ -77,9 +77,9 @@ class AlephAlphaConfig: - `control_log_additive` (boolean; default value: true): Method of applying control to attention scores. """ - maximum_tokens: Optional[ - int - ] = litellm.max_tokens # aleph alpha requires max tokens + maximum_tokens: Optional[int] = ( + litellm.max_tokens + ) # aleph alpha requires max tokens minimum_tokens: Optional[int] = None echo: Optional[bool] = None temperature: Optional[int] = None @@ -285,7 +285,10 @@ def completion( ## CALCULATING USAGE - baseten charges on time, not tokens - have some mapping of cost here. prompt_tokens = len(encoding.encode(prompt)) completion_tokens = len( - encoding.encode(model_response["choices"][0]["message"]["content"]) + encoding.encode( + model_response["choices"][0]["message"]["content"], + disallowed_special=(), + ) ) model_response["created"] = int(time.time()) diff --git a/litellm/llms/anthropic.py b/litellm/llms/anthropic.py index 150ae0e0761..becbcc32820 100644 --- a/litellm/llms/anthropic.py +++ b/litellm/llms/anthropic.py @@ -1,12 +1,18 @@ import os, types import json from enum import Enum -import requests -import time +import requests, copy +import time, uuid from typing import Callable, Optional -from litellm.utils import ModelResponse, Usage +from litellm.utils import ModelResponse, Usage, map_finish_reason import litellm -from .prompt_templates.factory import prompt_factory, custom_prompt +from .prompt_templates.factory import ( + prompt_factory, + custom_prompt, + construct_tool_use_system_prompt, + extract_between_tags, + parse_xml_params, +) import httpx @@ -20,7 +26,7 @@ class AnthropicError(Exception): self.status_code = status_code self.message = message self.request = httpx.Request( - method="POST", url="https://api.anthropic.com/v1/complete" + method="POST", url="https://api.anthropic.com/v1/messages" ) self.response = httpx.Response(status_code=status_code, request=self.request) super().__init__( @@ -35,23 +41,23 @@ class AnthropicConfig: to pass metadata to anthropic, it's {"user_id": "any-relevant-information"} """ - max_tokens_to_sample: Optional[ - int - ] = litellm.max_tokens # anthropic requires a default + max_tokens: Optional[int] = litellm.max_tokens # anthropic requires a default stop_sequences: Optional[list] = None temperature: Optional[int] = None top_p: Optional[int] = None top_k: Optional[int] = None metadata: Optional[dict] = None + system: Optional[str] = None def __init__( self, - max_tokens_to_sample: Optional[int] = 256, # anthropic requires a default + max_tokens: Optional[int] = 256, # anthropic requires a default stop_sequences: Optional[list] = None, temperature: Optional[int] = None, top_p: Optional[int] = None, top_k: Optional[int] = None, metadata: Optional[dict] = None, + system: Optional[str] = None, ) -> None: locals_ = locals() for key, value in locals_.items(): @@ -110,6 +116,8 @@ def completion( headers={}, ): headers = validate_environment(api_key, headers) + _is_function_call = False + messages = copy.deepcopy(messages) if model in custom_prompt_dict: # check if the model has a registered custom prompt model_prompt_details = custom_prompt_dict[model] @@ -120,7 +128,17 @@ def completion( messages=messages, ) else: - prompt = prompt_factory( + # Separate system prompt from rest of message + system_prompt_idx: Optional[int] = None + for idx, message in enumerate(messages): + if message["role"] == "system": + optional_params["system"] = message["content"] + system_prompt_idx = idx + break + if system_prompt_idx is not None: + messages.pop(system_prompt_idx) + # Format rest of message according to anthropic guidelines + messages = prompt_factory( model=model, messages=messages, custom_llm_provider="anthropic" ) @@ -132,15 +150,26 @@ def completion( ): # completion(top_k=3) > anthropic_config(top_k=3) <- allows for dynamic variables to be passed in optional_params[k] = v + ## Handle Tool Calling + if "tools" in optional_params: + _is_function_call = True + tool_calling_system_prompt = construct_tool_use_system_prompt( + tools=optional_params["tools"] + ) + optional_params["system"] = ( + optional_params.get("system", "\n") + tool_calling_system_prompt + ) # add the anthropic tool calling prompt to the system prompt + optional_params.pop("tools") + data = { "model": model, - "prompt": prompt, + "messages": messages, **optional_params, } ## LOGGING logging_obj.pre_call( - input=prompt, + input=messages, api_key=api_key, additional_args={ "complete_input_dict": data, @@ -173,7 +202,7 @@ def completion( ## LOGGING logging_obj.post_call( - input=prompt, + input=messages, api_key=api_key, original_response=response.text, additional_args={"complete_input_dict": data}, @@ -191,20 +220,45 @@ def completion( message=str(completion_response["error"]), status_code=response.status_code, ) + elif len(completion_response["content"]) == 0: + raise AnthropicError( + message="No content in response", + status_code=response.status_code, + ) else: - if len(completion_response["completion"]) > 0: - model_response["choices"][0]["message"][ - "content" - ] = completion_response["completion"] - model_response.choices[0].finish_reason = completion_response["stop_reason"] + text_content = completion_response["content"][0].get("text", None) + ## TOOL CALLING - OUTPUT PARSE + if text_content is not None and "invoke" in text_content: + function_name = extract_between_tags("tool_name", text_content)[0] + function_arguments_str = extract_between_tags("invoke", text_content)[ + 0 + ].strip() + function_arguments_str = f"{function_arguments_str}" + function_arguments = parse_xml_params(function_arguments_str) + _message = litellm.Message( + tool_calls=[ + { + "id": f"call_{uuid.uuid4()}", + "type": "function", + "function": { + "name": function_name, + "arguments": json.dumps(function_arguments), + }, + } + ], + content=None, + ) + model_response.choices[0].message = _message # type: ignore + else: + model_response.choices[0].message.content = text_content # type: ignore + model_response.choices[0].finish_reason = map_finish_reason( + completion_response["stop_reason"] + ) ## CALCULATING USAGE - prompt_tokens = len( - encoding.encode(prompt) - ) ##[TODO] use the anthropic tokenizer here - completion_tokens = len( - encoding.encode(model_response["choices"][0]["message"].get("content", "")) - ) ##[TODO] use the anthropic tokenizer here + prompt_tokens = completion_response["usage"]["input_tokens"] + completion_tokens = completion_response["usage"]["output_tokens"] + total_tokens = prompt_tokens + completion_tokens model_response["created"] = int(time.time()) model_response["model"] = model diff --git a/litellm/llms/anthropic_text.py b/litellm/llms/anthropic_text.py new file mode 100644 index 00000000000..bccc8c769cf --- /dev/null +++ b/litellm/llms/anthropic_text.py @@ -0,0 +1,222 @@ +import os, types +import json +from enum import Enum +import requests +import time +from typing import Callable, Optional +from litellm.utils import ModelResponse, Usage +import litellm +from .prompt_templates.factory import prompt_factory, custom_prompt +import httpx + + +class AnthropicConstants(Enum): + HUMAN_PROMPT = "\n\nHuman: " + AI_PROMPT = "\n\nAssistant: " + + +class AnthropicError(Exception): + def __init__(self, status_code, message): + self.status_code = status_code + self.message = message + self.request = httpx.Request( + method="POST", url="https://api.anthropic.com/v1/complete" + ) + self.response = httpx.Response(status_code=status_code, request=self.request) + super().__init__( + self.message + ) # Call the base class constructor with the parameters it needs + + +class AnthropicTextConfig: + """ + Reference: https://docs.anthropic.com/claude/reference/complete_post + + to pass metadata to anthropic, it's {"user_id": "any-relevant-information"} + """ + + max_tokens_to_sample: Optional[int] = ( + litellm.max_tokens + ) # anthropic requires a default + stop_sequences: Optional[list] = None + temperature: Optional[int] = None + top_p: Optional[int] = None + top_k: Optional[int] = None + metadata: Optional[dict] = None + + def __init__( + self, + max_tokens_to_sample: Optional[int] = 256, # anthropic requires a default + stop_sequences: Optional[list] = None, + temperature: Optional[int] = None, + top_p: Optional[int] = None, + top_k: Optional[int] = None, + metadata: Optional[dict] = None, + ) -> None: + locals_ = locals() + for key, value in locals_.items(): + if key != "self" and value is not None: + setattr(self.__class__, key, value) + + @classmethod + def get_config(cls): + return { + k: v + for k, v in cls.__dict__.items() + if not k.startswith("__") + and not isinstance( + v, + ( + types.FunctionType, + types.BuiltinFunctionType, + classmethod, + staticmethod, + ), + ) + and v is not None + } + + +# makes headers for API call +def validate_environment(api_key, user_headers): + if api_key is None: + raise ValueError( + "Missing Anthropic API Key - A call is being made to anthropic but no key is set either in the environment variables or via params" + ) + headers = { + "accept": "application/json", + "anthropic-version": "2023-06-01", + "content-type": "application/json", + "x-api-key": api_key, + } + if user_headers is not None and isinstance(user_headers, dict): + headers = {**headers, **user_headers} + return headers + + +def completion( + model: str, + messages: list, + api_base: str, + custom_prompt_dict: dict, + model_response: ModelResponse, + print_verbose: Callable, + encoding, + api_key, + logging_obj, + optional_params=None, + litellm_params=None, + logger_fn=None, + headers={}, +): + headers = validate_environment(api_key, headers) + if model in custom_prompt_dict: + # check if the model has a registered custom prompt + model_prompt_details = custom_prompt_dict[model] + prompt = custom_prompt( + role_dict=model_prompt_details["roles"], + initial_prompt_value=model_prompt_details["initial_prompt_value"], + final_prompt_value=model_prompt_details["final_prompt_value"], + messages=messages, + ) + else: + prompt = prompt_factory( + model=model, messages=messages, custom_llm_provider="anthropic" + ) + + ## Load Config + config = litellm.AnthropicTextConfig.get_config() + for k, v in config.items(): + if ( + k not in optional_params + ): # completion(top_k=3) > anthropic_config(top_k=3) <- allows for dynamic variables to be passed in + optional_params[k] = v + + data = { + "model": model, + "prompt": prompt, + **optional_params, + } + + ## LOGGING + logging_obj.pre_call( + input=prompt, + api_key=api_key, + additional_args={ + "complete_input_dict": data, + "api_base": api_base, + "headers": headers, + }, + ) + + ## COMPLETION CALL + if "stream" in optional_params and optional_params["stream"] == True: + response = requests.post( + api_base, + headers=headers, + data=json.dumps(data), + stream=optional_params["stream"], + ) + + if response.status_code != 200: + raise AnthropicError( + status_code=response.status_code, message=response.text + ) + + return response.iter_lines() + else: + response = requests.post(api_base, headers=headers, data=json.dumps(data)) + if response.status_code != 200: + raise AnthropicError( + status_code=response.status_code, message=response.text + ) + + ## LOGGING + logging_obj.post_call( + input=prompt, + api_key=api_key, + original_response=response.text, + additional_args={"complete_input_dict": data}, + ) + print_verbose(f"raw model_response: {response.text}") + ## RESPONSE OBJECT + try: + completion_response = response.json() + except: + raise AnthropicError( + message=response.text, status_code=response.status_code + ) + if "error" in completion_response: + raise AnthropicError( + message=str(completion_response["error"]), + status_code=response.status_code, + ) + else: + if len(completion_response["completion"]) > 0: + model_response["choices"][0]["message"]["content"] = ( + completion_response["completion"] + ) + model_response.choices[0].finish_reason = completion_response["stop_reason"] + + ## CALCULATING USAGE + prompt_tokens = len( + encoding.encode(prompt) + ) ##[TODO] use the anthropic tokenizer here + completion_tokens = len( + encoding.encode(model_response["choices"][0]["message"].get("content", "")) + ) ##[TODO] use the anthropic tokenizer here + + model_response["created"] = int(time.time()) + model_response["model"] = model + usage = Usage( + prompt_tokens=prompt_tokens, + completion_tokens=completion_tokens, + total_tokens=prompt_tokens + completion_tokens, + ) + model_response.usage = usage + return model_response + + +def embedding(): + # logic for parsing in - calling - parsing out model embedding calls + pass diff --git a/litellm/llms/azure.py b/litellm/llms/azure.py index 01b54987b2d..0c8c7f18446 100644 --- a/litellm/llms/azure.py +++ b/litellm/llms/azure.py @@ -7,13 +7,15 @@ from litellm.utils import ( Message, CustomStreamWrapper, convert_to_model_response_object, + TranscriptionResponse, ) -from typing import Callable, Optional +from typing import Callable, Optional, BinaryIO from litellm import OpenAIConfig import litellm, json import httpx from .custom_httpx.azure_dall_e_2 import CustomHTTPTransport, AsyncCustomHTTPTransport from openai import AzureOpenAI, AsyncAzureOpenAI +import uuid class AzureOpenAIError(Exception): @@ -270,6 +272,14 @@ class AzureChatCompletion(BaseLLM): azure_client = AzureOpenAI(**azure_client_params) else: azure_client = client + if api_version is not None and isinstance( + azure_client._custom_query, dict + ): + # set api_version to version passed by user + azure_client._custom_query.setdefault( + "api-version", api_version + ) + response = azure_client.chat.completions.create(**data, timeout=timeout) # type: ignore stringified_response = response.model_dump() ## LOGGING @@ -333,10 +343,17 @@ class AzureChatCompletion(BaseLLM): azure_client_params["api_key"] = api_key elif azure_ad_token is not None: azure_client_params["azure_ad_token"] = azure_ad_token + + # setting Azure client if client is None: azure_client = AsyncAzureOpenAI(**azure_client_params) else: azure_client = client + if api_version is not None and isinstance( + azure_client._custom_query, dict + ): + # set api_version to version passed by user + azure_client._custom_query.setdefault("api-version", api_version) ## LOGGING logging_obj.pre_call( input=data["messages"], @@ -401,6 +418,9 @@ class AzureChatCompletion(BaseLLM): azure_client = AzureOpenAI(**azure_client_params) else: azure_client = client + if api_version is not None and isinstance(azure_client._custom_query, dict): + # set api_version to version passed by user + azure_client._custom_query.setdefault("api-version", api_version) ## LOGGING logging_obj.pre_call( input=data["messages"], @@ -454,6 +474,11 @@ class AzureChatCompletion(BaseLLM): azure_client = AsyncAzureOpenAI(**azure_client_params) else: azure_client = client + if api_version is not None and isinstance( + azure_client._custom_query, dict + ): + # set api_version to version passed by user + azure_client._custom_query.setdefault("api-version", api_version) ## LOGGING logging_obj.pre_call( input=data["messages"], @@ -757,6 +782,158 @@ class AzureChatCompletion(BaseLLM): else: raise AzureOpenAIError(status_code=500, message=str(e)) + def audio_transcriptions( + self, + model: str, + audio_file: BinaryIO, + optional_params: dict, + model_response: TranscriptionResponse, + timeout: float, + api_key: Optional[str] = None, + api_base: Optional[str] = None, + api_version: Optional[str] = None, + client=None, + azure_ad_token: Optional[str] = None, + logging_obj=None, + atranscription: bool = False, + ): + data = {"model": model, "file": audio_file, **optional_params} + + # init AzureOpenAI Client + azure_client_params = { + "api_version": api_version, + "azure_endpoint": api_base, + "azure_deployment": model, + "timeout": timeout, + } + + max_retries = optional_params.pop("max_retries", None) + + azure_client_params = select_azure_base_url_or_endpoint( + azure_client_params=azure_client_params + ) + if api_key is not None: + azure_client_params["api_key"] = api_key + elif azure_ad_token is not None: + azure_client_params["azure_ad_token"] = azure_ad_token + + if max_retries is not None: + azure_client_params["max_retries"] = max_retries + + if atranscription == True: + return self.async_audio_transcriptions( + audio_file=audio_file, + data=data, + model_response=model_response, + timeout=timeout, + api_key=api_key, + api_base=api_base, + client=client, + azure_client_params=azure_client_params, + max_retries=max_retries, + logging_obj=logging_obj, + ) + if client is None: + azure_client = AzureOpenAI(http_client=litellm.client_session, **azure_client_params) # type: ignore + else: + azure_client = client + + ## LOGGING + logging_obj.pre_call( + input=f"audio_file_{uuid.uuid4()}", + api_key=azure_client.api_key, + additional_args={ + "headers": {"Authorization": f"Bearer {azure_client.api_key}"}, + "api_base": azure_client._base_url._uri_reference, + "atranscription": True, + "complete_input_dict": data, + }, + ) + + response = azure_client.audio.transcriptions.create( + **data, timeout=timeout # type: ignore + ) + stringified_response = response.model_dump() + ## LOGGING + logging_obj.post_call( + input=audio_file.name, + api_key=api_key, + additional_args={"complete_input_dict": data}, + original_response=stringified_response, + ) + hidden_params = {"model": "whisper-1", "custom_llm_provider": "azure"} + final_response = convert_to_model_response_object(response_object=stringified_response, model_response_object=model_response, hidden_params=hidden_params, response_type="audio_transcription") # type: ignore + return final_response + + async def async_audio_transcriptions( + self, + audio_file: BinaryIO, + data: dict, + model_response: TranscriptionResponse, + timeout: float, + api_key: Optional[str] = None, + api_base: Optional[str] = None, + client=None, + azure_client_params=None, + max_retries=None, + logging_obj=None, + ): + response = None + try: + if client is None: + async_azure_client = AsyncAzureOpenAI( + **azure_client_params, + http_client=litellm.aclient_session, + ) + else: + async_azure_client = client + + ## LOGGING + logging_obj.pre_call( + input=f"audio_file_{uuid.uuid4()}", + api_key=async_azure_client.api_key, + additional_args={ + "headers": { + "Authorization": f"Bearer {async_azure_client.api_key}" + }, + "api_base": async_azure_client._base_url._uri_reference, + "atranscription": True, + "complete_input_dict": data, + }, + ) + + response = await async_azure_client.audio.transcriptions.create( + **data, timeout=timeout + ) # type: ignore + + stringified_response = response.model_dump() + + ## LOGGING + logging_obj.post_call( + input=audio_file.name, + api_key=api_key, + additional_args={ + "headers": { + "Authorization": f"Bearer {async_azure_client.api_key}" + }, + "api_base": async_azure_client._base_url._uri_reference, + "atranscription": True, + "complete_input_dict": data, + }, + original_response=stringified_response, + ) + hidden_params = {"model": "whisper-1", "custom_llm_provider": "azure"} + response = convert_to_model_response_object(response_object=stringified_response, model_response_object=model_response, hidden_params=hidden_params, response_type="audio_transcription") # type: ignore + return response + except Exception as e: + ## LOGGING + logging_obj.post_call( + input=input, + api_key=api_key, + original_response=str(e), + ) + raise e + async def ahealth_check( self, model: Optional[str], diff --git a/litellm/llms/bedrock.py b/litellm/llms/bedrock.py index b7f1c502368..4aa27b3c9d8 100644 --- a/litellm/llms/bedrock.py +++ b/litellm/llms/bedrock.py @@ -1,11 +1,17 @@ import json, copy, types import os from enum import Enum -import time +import time, uuid from typing import Callable, Optional, Any, Union, List import litellm from litellm.utils import ModelResponse, get_secret, Usage, ImageResponse -from .prompt_templates.factory import prompt_factory, custom_prompt +from .prompt_templates.factory import ( + prompt_factory, + custom_prompt, + construct_tool_use_system_prompt, + extract_between_tags, + parse_xml_params, +) import httpx @@ -70,6 +76,61 @@ class AmazonTitanConfig: } +class AmazonAnthropicClaude3Config: + """ + Reference: https://us-west-2.console.aws.amazon.com/bedrock/home?region=us-west-2#/providers?model=claude + + Supported Params for the Amazon / Anthropic Claude 3 models: + + - `max_tokens` (integer) max tokens, + - `anthropic_version` (string) version of anthropic for bedrock - e.g. "bedrock-2023-05-31" + """ + + max_tokens: Optional[int] = litellm.max_tokens + anthropic_version: Optional[str] = "bedrock-2023-05-31" + + def __init__( + self, + max_tokens: Optional[int] = None, + anthropic_version: Optional[str] = None, + ) -> None: + locals_ = locals() + for key, value in locals_.items(): + if key != "self" and value is not None: + setattr(self.__class__, key, value) + + @classmethod + def get_config(cls): + return { + k: v + for k, v in cls.__dict__.items() + if not k.startswith("__") + and not isinstance( + v, + ( + types.FunctionType, + types.BuiltinFunctionType, + classmethod, + staticmethod, + ), + ) + and v is not None + } + + def get_supported_openai_params(self): + return ["max_tokens", "tools", "tool_choice", "stream"] + + def map_openai_params(self, non_default_params: dict, optional_params: dict): + for param, value in non_default_params.items(): + if param == "max_tokens": + optional_params["max_tokens"] = value + if param == "tools": + optional_params["tools"] = value + if param == "stream": + optional_params["stream"] = value + return optional_params + + class AmazonAnthropicConfig: """ Reference: https://us-west-2.console.aws.amazon.com/bedrock/home?region=us-west-2#/providers?model=claude @@ -123,6 +184,25 @@ class AmazonAnthropicConfig: and v is not None } + def get_supported_openai_params( + self, + ): + return ["max_tokens", "temperature", "stop", "top_p", "stream"] + + def map_openai_params(self, non_default_params: dict, optional_params: dict): + for param, value in non_default_params.items(): + if param == "max_tokens": + optional_params["max_tokens_to_sample"] = value + if param == "temperature": + optional_params["temperature"] = value + if param == "top_p": + optional_params["top_p"] = value + if param == "stop": + optional_params["stop_sequences"] = value + if param == "stream" and value == True: + optional_params["stream"] = value + return optional_params + class AmazonCohereConfig: """ @@ -282,6 +362,56 @@ class AmazonLlamaConfig: } +class AmazonMistralConfig: + """ + Reference: https://docs.aws.amazon.com/bedrock/latest/userguide/model-parameters-mistral.html + Supported Params for the Amazon / Mistral models: + + - `max_tokens` (integer) max tokens, + - `temperature` (float) temperature for model, + - `top_p` (float) top p for model + - `stop` [string] A list of stop sequences that if generated by the model, stops the model from generating further output. + - `top_k` (float) top k for model + """ + + max_tokens: Optional[int] = None + temperature: Optional[float] = None + top_p: Optional[float] = None + top_k: Optional[float] = None + stop: Optional[List[str]] = None + + def __init__( + self, + max_tokens: Optional[int] = None, + temperature: Optional[float] = None, + top_p: Optional[int] = None, + top_k: Optional[float] = None, + stop: Optional[List[str]] = None, + ) -> None: + locals_ = locals() + for key, value in locals_.items(): + if key != "self" and value is not None: + setattr(self.__class__, key, value) + + @classmethod + def get_config(cls): + return { + k: v + for k, v in cls.__dict__.items() + if not k.startswith("__") + and not isinstance( + v, + ( + types.FunctionType, + types.BuiltinFunctionType, + classmethod, + staticmethod, + ), + ) + and v is not None + } + + class AmazonStabilityConfig: """ Reference: https://us-west-2.console.aws.amazon.com/bedrock/home?region=us-west-2#/providers?model=stability.stable-diffusion-xl-v0 @@ -492,6 +622,10 @@ def convert_messages_to_prompt(model, messages, provider, custom_prompt_dict): prompt = prompt_factory( model=model, messages=messages, custom_llm_provider="bedrock" ) + elif provider == "mistral": + prompt = prompt_factory( + model=model, messages=messages, custom_llm_provider="bedrock" + ) else: prompt = "" for message in messages: @@ -568,14 +702,47 @@ def completion( inference_params = copy.deepcopy(optional_params) stream = inference_params.pop("stream", False) if provider == "anthropic": - ## LOAD CONFIG - config = litellm.AmazonAnthropicConfig.get_config() - for k, v in config.items(): - if ( - k not in inference_params - ): # completion(top_k=3) > anthropic_config(top_k=3) <- allows for dynamic variables to be passed in - inference_params[k] = v - data = json.dumps({"prompt": prompt, **inference_params}) + if model.startswith("anthropic.claude-3"): + # Separate system prompt from rest of message + system_prompt_idx: Optional[int] = None + for idx, message in enumerate(messages): + if message["role"] == "system": + inference_params["system"] = message["content"] + system_prompt_idx = idx + break + if system_prompt_idx is not None: + messages.pop(system_prompt_idx) + # Format rest of message according to anthropic guidelines + messages = prompt_factory( + model=model, messages=messages, custom_llm_provider="anthropic" + ) + ## LOAD CONFIG + config = litellm.AmazonAnthropicClaude3Config.get_config() + for k, v in config.items(): + if ( + k not in inference_params + ): # completion(top_k=3) > anthropic_config(top_k=3) <- allows for dynamic variables to be passed in + inference_params[k] = v + ## Handle Tool Calling + if "tools" in inference_params: + tool_calling_system_prompt = construct_tool_use_system_prompt( + tools=inference_params["tools"] + ) + inference_params["system"] = ( + inference_params.get("system", "\n") + + tool_calling_system_prompt + ) # add the anthropic tool calling prompt to the system prompt + inference_params.pop("tools") + data = json.dumps({"messages": messages, **inference_params}) + else: + ## LOAD CONFIG + config = litellm.AmazonAnthropicConfig.get_config() + for k, v in config.items(): + if ( + k not in inference_params + ): # completion(top_k=3) > anthropic_config(top_k=3) <- allows for dynamic variables to be passed in + inference_params[k] = v + data = json.dumps({"prompt": prompt, **inference_params}) elif provider == "ai21": ## LOAD CONFIG config = litellm.AmazonAI21Config.get_config() @@ -595,9 +762,9 @@ def completion( ): # completion(top_k=3) > anthropic_config(top_k=3) <- allows for dynamic variables to be passed in inference_params[k] = v if optional_params.get("stream", False) == True: - inference_params[ - "stream" - ] = True # cohere requires stream = True in inference params + inference_params["stream"] = ( + True # cohere requires stream = True in inference params + ) data = json.dumps({"prompt": prompt, **inference_params}) elif provider == "meta": ## LOAD CONFIG @@ -623,7 +790,16 @@ def completion( "textGenerationConfig": inference_params, } ) + elif provider == "mistral": + ## LOAD CONFIG + config = litellm.AmazonMistralConfig.get_config() + for k, v in config.items(): + if ( + k not in inference_params + ): # completion(top_k=3) > amazon_config(top_k=3) <- allows for dynamic variables to be passed in + inference_params[k] = v + data = json.dumps({"prompt": prompt, **inference_params}) else: data = json.dumps({}) @@ -723,12 +899,49 @@ def completion( if provider == "ai21": outputText = response_body.get("completions")[0].get("data").get("text") elif provider == "anthropic": - outputText = response_body["completion"] - model_response["finish_reason"] = response_body["stop_reason"] + if model.startswith("anthropic.claude-3"): + outputText = response_body.get("content")[0].get("text", None) + if "" in outputText: # OUTPUT PARSE FUNCTION CALL + function_name = extract_between_tags("tool_name", outputText)[0] + function_arguments_str = extract_between_tags("invoke", outputText)[ + 0 + ].strip() + function_arguments_str = ( + f"{function_arguments_str}" + ) + function_arguments = parse_xml_params(function_arguments_str) + _message = litellm.Message( + tool_calls=[ + { + "id": f"call_{uuid.uuid4()}", + "type": "function", + "function": { + "name": function_name, + "arguments": json.dumps(function_arguments), + }, + } + ], + content=None, + ) + model_response.choices[0].message = _message # type: ignore + model_response["finish_reason"] = response_body["stop_reason"] + _usage = litellm.Usage( + prompt_tokens=response_body["usage"]["input_tokens"], + completion_tokens=response_body["usage"]["output_tokens"], + total_tokens=response_body["usage"]["input_tokens"] + + response_body["usage"]["output_tokens"], + ) + model_response.usage = _usage + else: + outputText = response_body["completion"] + model_response["finish_reason"] = response_body["stop_reason"] elif provider == "cohere": outputText = response_body["generations"][0]["text"] elif provider == "meta": outputText = response_body["generation"] + elif provider == "mistral": + outputText = response_body["outputs"][0]["text"] + model_response["finish_reason"] = response_body["outputs"][0]["stop_reason"] else: # amazon titan outputText = response_body.get("results")[0].get("outputText") @@ -740,8 +953,19 @@ def completion( ) else: try: - if len(outputText) > 0: + if ( + len(outputText) > 0 + and hasattr(model_response.choices[0], "message") + and getattr(model_response.choices[0].message, "tool_calls", None) + is None + ): model_response["choices"][0]["message"]["content"] = outputText + elif ( + hasattr(model_response.choices[0], "message") + and getattr(model_response.choices[0].message, "tool_calls", None) + is not None + ): + pass else: raise Exception() except: @@ -751,26 +975,28 @@ def completion( ) ## CALCULATING USAGE - baseten charges on time, not tokens - have some mapping of cost here. - prompt_tokens = response_metadata.get( - "x-amzn-bedrock-input-token-count", len(encoding.encode(prompt)) - ) - completion_tokens = response_metadata.get( - "x-amzn-bedrock-output-token-count", - len( - encoding.encode( - model_response["choices"][0]["message"].get("content", "") - ) - ), - ) + if getattr(model_response.usage, "total_tokens", None) is None: + prompt_tokens = response_metadata.get( + "x-amzn-bedrock-input-token-count", len(encoding.encode(prompt)) + ) + completion_tokens = response_metadata.get( + "x-amzn-bedrock-output-token-count", + len( + encoding.encode( + model_response["choices"][0]["message"].get("content", "") + ) + ), + ) + usage = Usage( + prompt_tokens=prompt_tokens, + completion_tokens=completion_tokens, + total_tokens=prompt_tokens + completion_tokens, + ) + model_response.usage = usage model_response["created"] = int(time.time()) model_response["model"] = model - usage = Usage( - prompt_tokens=prompt_tokens, - completion_tokens=completion_tokens, - total_tokens=prompt_tokens + completion_tokens, - ) - model_response.usage = usage + model_response._hidden_params["region_name"] = client.meta.region_name print_verbose(f"model_response._hidden_params: {model_response._hidden_params}") return model_response diff --git a/litellm/llms/huggingface_restapi.py b/litellm/llms/huggingface_restapi.py index 123b8ecbc4e..29377328908 100644 --- a/litellm/llms/huggingface_restapi.py +++ b/litellm/llms/huggingface_restapi.py @@ -575,12 +575,20 @@ class Huggingface(BaseLLM): response = await client.post(url=api_base, json=data, headers=headers) response_json = response.json() if response.status_code != 200: - raise HuggingfaceError( - status_code=response.status_code, - message=response.text, - request=response.request, - response=response, - ) + if "error" in response_json: + raise HuggingfaceError( + status_code=response.status_code, + message=response_json["error"], + request=response.request, + response=response, + ) + else: + raise HuggingfaceError( + status_code=response.status_code, + message=response.text, + request=response.request, + response=response, + ) ## RESPONSE OBJECT return self.convert_to_model_response_object( @@ -595,6 +603,8 @@ class Huggingface(BaseLLM): except Exception as e: if isinstance(e, httpx.TimeoutException): raise HuggingfaceError(status_code=500, message="Request Timeout Error") + elif isinstance(e, HuggingfaceError): + raise e elif response is not None and hasattr(response, "text"): raise HuggingfaceError( status_code=500, @@ -624,8 +634,43 @@ class Huggingface(BaseLLM): status_code=r.status_code, message=str(text), ) + """ + Check first chunk for error message. + If error message, raise error. + If not - add back to stream + """ + # Async iterator over the lines in the response body + response_iterator = r.aiter_lines() + + # Attempt to get the first line/chunk from the response + try: + first_chunk = await response_iterator.__anext__() + except StopAsyncIteration: + # Handle the case where there are no lines to read (empty response) + first_chunk = "" + + # Check the first chunk for an error message + if ( + "error" in first_chunk.lower() + ): # Adjust this condition based on how error messages are structured + raise HuggingfaceError( + status_code=400, + message=first_chunk, + ) + + # Create a new async generator that begins with the first_chunk and includes the remaining items + async def custom_stream_with_first_chunk(): + yield first_chunk # Yield back the first chunk + async for ( + chunk + ) in response_iterator: # Continue yielding the rest of the chunks + yield chunk + + # Creating a new completion stream that starts with the first chunk + completion_stream = custom_stream_with_first_chunk() + streamwrapper = CustomStreamWrapper( - completion_stream=r.aiter_lines(), + completion_stream=completion_stream, model=model, custom_llm_provider="huggingface", logging_obj=logging_obj, diff --git a/litellm/llms/ollama.py b/litellm/llms/ollama.py index 9339deb78d7..3611ccd8be8 100644 --- a/litellm/llms/ollama.py +++ b/litellm/llms/ollama.py @@ -147,6 +147,7 @@ def get_ollama_response( stream = optional_params.pop("stream", False) format = optional_params.pop("format", None) + images = optional_params.pop("images", None) data = { "model": model, "prompt": prompt, @@ -155,6 +156,8 @@ def get_ollama_response( } if format is not None: data["format"] = format + if images is not None: + data["images"] = images ## LOGGING logging_obj.pre_call( diff --git a/litellm/llms/ollama_chat.py b/litellm/llms/ollama_chat.py index c9d6654c7c3..8378a95ff02 100644 --- a/litellm/llms/ollama_chat.py +++ b/litellm/llms/ollama_chat.py @@ -18,7 +18,7 @@ class OllamaError(Exception): ) # Call the base class constructor with the parameters it needs -class OllamaConfig: +class OllamaChatConfig: """ Reference: https://github.com/jmorganca/ollama/blob/main/docs/api.md#parameters @@ -68,9 +68,9 @@ class OllamaConfig: repeat_last_n: Optional[int] = None repeat_penalty: Optional[float] = None temperature: Optional[float] = None - stop: Optional[ - list - ] = None # stop is a list based on this - https://github.com/jmorganca/ollama/pull/442 + stop: Optional[list] = ( + None # stop is a list based on this - https://github.com/jmorganca/ollama/pull/442 + ) tfs_z: Optional[float] = None num_predict: Optional[int] = None top_k: Optional[int] = None @@ -108,6 +108,7 @@ class OllamaConfig: k: v for k, v in cls.__dict__.items() if not k.startswith("__") + and k != "function_name" # special param for function calling and not isinstance( v, ( @@ -120,6 +121,61 @@ class OllamaConfig: and v is not None } + def get_supported_openai_params( + self, + ): + return [ + "max_tokens", + "stream", + "top_p", + "temperature", + "frequency_penalty", + "stop", + "tools", + "tool_choice", + "functions", + ] + + def map_openai_params(self, non_default_params: dict, optional_params: dict): + for param, value in non_default_params.items(): + if param == "max_tokens": + optional_params["num_predict"] = value + if param == "stream": + optional_params["stream"] = value + if param == "temperature": + optional_params["temperature"] = value + if param == "top_p": + optional_params["top_p"] = value + if param == "frequency_penalty": + optional_params["repeat_penalty"] = param + if param == "stop": + optional_params["stop"] = value + ### FUNCTION CALLING LOGIC ### + if param == "tools": + # ollama actually supports json output + optional_params["format"] = "json" + litellm.add_function_to_prompt = ( + True # so that main.py adds the function call to the prompt + ) + optional_params["functions_unsupported_model"] = value + + if len(optional_params["functions_unsupported_model"]) == 1: + optional_params["function_name"] = optional_params[ + "functions_unsupported_model" + ][0]["function"]["name"] + + if param == "functions": + # ollama actually supports json output + optional_params["format"] = "json" + litellm.add_function_to_prompt = ( + True # so that main.py adds the function call to the prompt + ) + optional_params["functions_unsupported_model"] = non_default_params.pop( + "functions" + ) + non_default_params.pop("tool_choice", None) # causes ollama requests to hang + return optional_params + # ollama implementation def get_ollama_response( @@ -138,7 +194,7 @@ def get_ollama_response( url = f"{api_base}/api/chat" ## Load Config - config = litellm.OllamaConfig.get_config() + config = litellm.OllamaChatConfig.get_config() for k, v in config.items(): if ( k not in optional_params @@ -147,6 +203,12 @@ def get_ollama_response( stream = optional_params.pop("stream", False) format = optional_params.pop("format", None) + function_name = optional_params.pop("function_name", None) + + for m in messages: + if "role" in m and m["role"] == "tool": + m["role"] = "assistant" + data = { "model": model, "messages": messages, @@ -182,6 +244,7 @@ def get_ollama_response( model_response=model_response, encoding=encoding, logging_obj=logging_obj, + function_name=function_name, ) return response elif stream == True: @@ -285,7 +348,9 @@ async def ollama_async_streaming(url, data, model_response, encoding, logging_ob traceback.print_exc() -async def ollama_acompletion(url, data, model_response, encoding, logging_obj): +async def ollama_acompletion( + url, data, model_response, encoding, logging_obj, function_name +): data["stream"] = False try: timeout = aiohttp.ClientTimeout(total=litellm.request_timeout) # 10 minutes @@ -319,7 +384,7 @@ async def ollama_acompletion(url, data, model_response, encoding, logging_obj): "id": f"call_{str(uuid.uuid4())}", "function": { "arguments": response_json["message"]["content"], - "name": "", + "name": function_name or "", }, "type": "function", } diff --git a/litellm/llms/openai.py b/litellm/llms/openai.py index 1ca7e1710f7..f65d96b1139 100644 --- a/litellm/llms/openai.py +++ b/litellm/llms/openai.py @@ -1,4 +1,4 @@ -from typing import Optional, Union, Any +from typing import Optional, Union, Any, BinaryIO import types, time, json, traceback import httpx from .base import BaseLLM @@ -9,6 +9,7 @@ from litellm.utils import ( CustomStreamWrapper, convert_to_model_response_object, Usage, + TranscriptionResponse, ) from typing import Callable, Optional import aiohttp, requests @@ -237,14 +238,22 @@ class OpenAIChatCompletion(BaseLLM): status_code=422, message=f"Timeout needs to be a float" ) - if custom_llm_provider == "mistral": - # check if message content passed in as list, and not string - messages = prompt_factory( - model=model, - messages=messages, - custom_llm_provider=custom_llm_provider, - ) - + if custom_llm_provider != "openai": + # process all OpenAI compatible provider logic here + if custom_llm_provider == "mistral": + # check if message content passed in as list, and not string + messages = prompt_factory( + model=model, + messages=messages, + custom_llm_provider=custom_llm_provider, + ) + if custom_llm_provider == "perplexity" and messages is not None: + # check if messages.name is passed + supported, if not supported remove + messages = prompt_factory( + model=model, + messages=messages, + custom_llm_provider=custom_llm_provider, + ) for _ in range( 2 ): # if call fails due to alternating messages, retry with reformatted message @@ -334,10 +343,14 @@ class OpenAIChatCompletion(BaseLLM): model_response_object=model_response, ) except Exception as e: + if print_verbose is not None: + print_verbose(f"openai.py: Received openai error - {str(e)}") if ( "Conversation roles must alternate user/assistant" in str(e) or "user and assistant roles should be alternating" in str(e) ) and messages is not None: + if print_verbose is not None: + print_verbose("openai.py: REFORMATS THE MESSAGE!") # reformat messages to ensure user/assistant are alternating, if there's either 2 consecutive 'user' messages or 2 consecutive 'assistant' message, add a blank 'user' or 'assistant' message to ensure compatibility new_messages = [] for i in range(len(messages) - 1): # type: ignore @@ -740,6 +753,7 @@ class OpenAIChatCompletion(BaseLLM): # return response return convert_to_model_response_object(response_object=response, model_response_object=model_response, response_type="image_generation") # type: ignore except OpenAIError as e: + exception_mapping_worked = True ## LOGGING logging_obj.post_call( @@ -762,6 +776,105 @@ class OpenAIChatCompletion(BaseLLM): else: raise OpenAIError(status_code=500, message=str(e)) + def audio_transcriptions( + self, + model: str, + audio_file: BinaryIO, + optional_params: dict, + model_response: TranscriptionResponse, + timeout: float, + api_key: Optional[str] = None, + api_base: Optional[str] = None, + client=None, + max_retries=None, + logging_obj=None, + atranscription: bool = False, + ): + data = {"model": model, "file": audio_file, **optional_params} + if atranscription == True: + return self.async_audio_transcriptions( + audio_file=audio_file, + data=data, + model_response=model_response, + timeout=timeout, + api_key=api_key, + api_base=api_base, + client=client, + max_retries=max_retries, + logging_obj=logging_obj, + ) + if client is None: + openai_client = OpenAI( + api_key=api_key, + base_url=api_base, + http_client=litellm.client_session, + timeout=timeout, + max_retries=max_retries, + ) + else: + openai_client = client + response = openai_client.audio.transcriptions.create( + **data, timeout=timeout # type: ignore + ) + + stringified_response = response.model_dump() + ## LOGGING + logging_obj.post_call( + input=audio_file.name, + api_key=api_key, + additional_args={"complete_input_dict": data}, + original_response=stringified_response, + ) + hidden_params = {"model": "whisper-1", "custom_llm_provider": "openai"} + final_response = convert_to_model_response_object(response_object=stringified_response, model_response_object=model_response, hidden_params=hidden_params, response_type="audio_transcription") # type: ignore + return final_response + + async def async_audio_transcriptions( + self, + audio_file: BinaryIO, + data: dict, + model_response: TranscriptionResponse, + timeout: float, + api_key: Optional[str] = None, + api_base: Optional[str] = None, + client=None, + max_retries=None, + logging_obj=None, + ): + response = None + try: + if client is None: + openai_aclient = AsyncOpenAI( + api_key=api_key, + base_url=api_base, + http_client=litellm.aclient_session, + timeout=timeout, + max_retries=max_retries, + ) + else: + openai_aclient = client + response = await openai_aclient.audio.transcriptions.create( + **data, timeout=timeout + ) # type: ignore + stringified_response = response.model_dump() + ## LOGGING + logging_obj.post_call( + input=audio_file.name, + api_key=api_key, + additional_args={"complete_input_dict": data}, + original_response=stringified_response, + ) + hidden_params = {"model": "whisper-1", "custom_llm_provider": "openai"} + return convert_to_model_response_object(response_object=stringified_response, model_response_object=model_response, hidden_params=hidden_params, response_type="audio_transcription") # type: ignore + except Exception as e: + ## LOGGING + logging_obj.post_call( + input=input, + api_key=api_key, + original_response=str(e), + ) + raise e + async def ahealth_check( self, model: Optional[str], @@ -772,9 +885,13 @@ class OpenAIChatCompletion(BaseLLM): input: Optional[list] = None, prompt: Optional[str] = None, organization: Optional[str] = None, + api_base: Optional[str] = None, ): client = AsyncOpenAI( - api_key=api_key, timeout=timeout, organization=organization + api_key=api_key, + timeout=timeout, + organization=organization, + base_url=api_base, ) if model is None and mode != "image_generation": raise Exception("model is not set") @@ -870,9 +987,9 @@ class OpenAITextCompletion(BaseLLM): if "model" in response_object: model_response_object.model = response_object["model"] - model_response_object._hidden_params[ - "original_response" - ] = response_object # track original response, if users make a litellm.text_completion() request, we can return the original response + model_response_object._hidden_params["original_response"] = ( + response_object # track original response, if users make a litellm.text_completion() request, we can return the original response + ) return model_response_object except Exception as e: raise e diff --git a/litellm/llms/prompt_templates/factory.py b/litellm/llms/prompt_templates/factory.py index 4ed4d9295de..dc4207a0510 100644 --- a/litellm/llms/prompt_templates/factory.py +++ b/litellm/llms/prompt_templates/factory.py @@ -1,8 +1,10 @@ from enum import Enum import requests, traceback -import json +import json, re, xml.etree.ElementTree as ET from jinja2 import Template, exceptions, Environment, meta from typing import Optional, Any +import imghdr, base64 +from typing import List def default_pt(messages): @@ -110,9 +112,9 @@ def mistral_instruct_pt(messages): "post_message": " [/INST]\n", }, "user": {"pre_message": "[INST] ", "post_message": " [/INST]\n"}, - "assistant": {"pre_message": " ", "post_message": " "}, + "assistant": {"pre_message": " ", "post_message": " "}, }, - final_prompt_value="", + final_prompt_value="", messages=messages, ) return prompt @@ -390,7 +392,7 @@ def format_prompt_togetherai(messages, prompt_format, chat_template): return prompt -### +### ANTHROPIC ### def anthropic_pt( @@ -424,6 +426,232 @@ def anthropic_pt( return prompt +def construct_format_parameters_prompt(parameters: dict): + parameter_str = "\n" + for k, v in parameters.items(): + parameter_str += f"<{k}>" + parameter_str += f"{v}" + parameter_str += f"" + parameter_str += "\n" + return parameter_str + + +def construct_format_tool_for_claude_prompt(name, description, parameters): + constructed_prompt = ( + "\n" + f"{name}\n" + "\n" + f"{description}\n" + "\n" + "\n" + f"{construct_format_parameters_prompt(parameters)}\n" + "\n" + "" + ) + return constructed_prompt + + +def construct_tool_use_system_prompt( + tools, +): # from https://github.com/anthropics/anthropic-cookbook/blob/main/function_calling/function_calling.ipynb + tool_str_list = [] + for tool in tools: + tool_str = construct_format_tool_for_claude_prompt( + tool["function"]["name"], + tool["function"].get("description", ""), + tool["function"].get("parameters", {}), + ) + tool_str_list.append(tool_str) + tool_use_system_prompt = ( + "In this environment you have access to a set of tools you can use to answer the user's question.\n" + "\n" + "You may call them like this:\n" + "\n" + "\n" + "$TOOL_NAME\n" + "\n" + "<$PARAMETER_NAME>$PARAMETER_VALUE\n" + "...\n" + "\n" + "\n" + "\n" + "\n" + "Here are the tools available:\n" + "\n" + "\n".join([tool_str for tool_str in tool_str_list]) + "\n" + ) + return tool_use_system_prompt + + +def convert_url_to_base64(url): + import requests + import base64 + + for _ in range(3): + try: + response = requests.get(url) + break + except: + pass + if response.status_code == 200: + image_bytes = response.content + base64_image = base64.b64encode(image_bytes).decode("utf-8") + + img_type = url.split(".")[-1].lower() + if img_type == "jpg" or img_type == "jpeg": + img_type = "image/jpeg" + elif img_type == "png": + img_type = "image/png" + elif img_type == "gif": + img_type = "image/gif" + elif img_type == "webp": + img_type = "image/webp" + else: + raise Exception( + f"Error: Unsupported image format. Format={img_type}. Supported types = ['image/jpeg', 'image/png', 'image/gif', 'image/webp']" + ) + + return f"data:{img_type};base64,{base64_image}" + else: + raise Exception(f"Error: Unable to fetch image from URL. url={url}") + + +def convert_to_anthropic_image_obj(openai_image_url: str): + """ + Input: + "image_url": "data:image/jpeg;base64,{base64_image}", + + Return: + "source": { + "type": "base64", + "media_type": "image/jpeg", + "data": {base64_image}, + } + """ + try: + if openai_image_url.startswith("http"): + openai_image_url = convert_url_to_base64(url=openai_image_url) + # Extract the base64 image data + base64_data = openai_image_url.split("data:image/")[1].split(";base64,")[1] + + # Infer image format from the URL + image_format = openai_image_url.split("data:image/")[1].split(";base64,")[0] + + return { + "type": "base64", + "media_type": f"image/{image_format}", + "data": base64_data, + } + except Exception as e: + if "Error: Unable to fetch image from URL" in str(e): + raise e + raise Exception( + """Image url not in expected format. Example Expected input - "image_url": "data:image/jpeg;base64,{base64_image}". Supported formats - ['image/jpeg', 'image/png', 'image/gif', 'image/webp'] """ + ) + + +def anthropic_messages_pt(messages: list): + """ + format messages for anthropic + 1. Anthropic supports roles like "user" and "assistant", (here litellm translates system-> assistant) + 2. The first message always needs to be of role "user" + 3. Each message must alternate between "user" and "assistant" (this is not addressed as now by litellm) + 4. final assistant content cannot end with trailing whitespace (anthropic raises an error otherwise) + 5. System messages are a separate param to the Messages API (used for tool calling) + 6. Ensure we only accept role, content. (message.name is not supported) + """ + ## Ensure final assistant message has no trailing whitespace + last_assistant_message_idx: Optional[int] = None + # reformat messages to ensure user/assistant are alternating, if there's either 2 consecutive 'user' messages or 2 consecutive 'assistant' message, add a blank 'user' or 'assistant' message to ensure compatibility + new_messages = [] + if len(messages) == 1: + # check if the message is a user message + if messages[0]["role"] == "assistant": + new_messages.append({"role": "user", "content": ""}) + + # check if content is a list (vision) + if isinstance(messages[0]["content"], list): # vision input + new_content = [] + for m in messages[0]["content"]: + if m.get("type", "") == "image_url": + new_content.append( + { + "type": "image", + "source": convert_to_anthropic_image_obj( + m["image_url"]["url"] + ), + } + ) + elif m.get("type", "") == "text": + new_content.append({"type": "text", "text": m["text"]}) + new_messages.append({"role": messages[0]["role"], "content": new_content}) # type: ignore + else: + new_messages.append( + {"role": messages[0]["role"], "content": messages[0]["content"]} + ) + + return new_messages + + for i in range(len(messages) - 1): # type: ignore + if i == 0 and messages[i]["role"] == "assistant": + new_messages.append({"role": "user", "content": ""}) + if isinstance(messages[i]["content"], list): # vision input + new_content = [] + for m in messages[i]["content"]: + if m.get("type", "") == "image_url": + new_content.append( + { + "type": "image", + "source": convert_to_anthropic_image_obj( + m["image_url"]["url"] + ), + } + ) + elif m.get("type", "") == "text": + new_content.append({"type": "text", "content": m["text"]}) + new_messages.append({"role": messages[i]["role"], "content": new_content}) # type: ignore + else: + new_messages.append( + {"role": messages[i]["role"], "content": messages[i]["content"]} + ) + + if messages[i]["role"] == messages[i + 1]["role"]: + if messages[i]["role"] == "user": + new_messages.append({"role": "assistant", "content": ""}) + else: + new_messages.append({"role": "user", "content": ""}) + + if messages[i]["role"] == "assistant": + last_assistant_message_idx = i + + new_messages.append(messages[-1]) + if last_assistant_message_idx is not None: + new_messages[last_assistant_message_idx]["content"] = new_messages[ + last_assistant_message_idx + ][ + "content" + ].strip() # no trailing whitespace for final assistant message + + return new_messages + + +def extract_between_tags(tag: str, string: str, strip: bool = False) -> List[str]: + ext_list = re.findall(f"<{tag}>(.+?)", string, re.DOTALL) + if strip: + ext_list = [e.strip() for e in ext_list] + return ext_list + + +def parse_xml_params(xml_content): + root = ET.fromstring(xml_content) + params = {} + for child in root.findall(".//parameters/*"): + params[child.tag] = child.text + return params + + +### + + def amazon_titan_pt( messages: list, ): # format - https://github.com/BerriAI/litellm/issues/1896 @@ -650,10 +878,9 @@ def prompt_factory( if custom_llm_provider == "ollama": return ollama_pt(model=model, messages=messages) elif custom_llm_provider == "anthropic": - if any(_ in model for _ in ["claude-2.1", "claude-v2:1"]): - return claude_2_1_pt(messages=messages) - else: + if model == "claude-instant-1" or model == "claude-2": return anthropic_pt(messages=messages) + return anthropic_messages_pt(messages=messages) elif custom_llm_provider == "together_ai": prompt_format, chat_template = get_model_info(token=api_key, model=model) return format_prompt_togetherai( @@ -674,6 +901,12 @@ def prompt_factory( return claude_2_1_pt(messages=messages) else: return anthropic_pt(messages=messages) + elif "mistral." in model: + return mistral_instruct_pt(messages=messages) + elif custom_llm_provider == "perplexity": + for message in messages: + message.pop("name", None) + return messages try: if "meta-llama/llama-2" in model and "chat" in model: return llama_2_chat_pt(messages=messages) diff --git a/litellm/llms/replicate.py b/litellm/llms/replicate.py index bc296bfd08a..2e1f1b607be 100644 --- a/litellm/llms/replicate.py +++ b/litellm/llms/replicate.py @@ -104,7 +104,8 @@ def start_prediction( version_id = version_id.replace("deployments/", "") base_url = f"https://api.replicate.com/v1/deployments/{version_id}" print_verbose(f"Deployment base URL: {base_url}\n") - + else: # assume it's a model + base_url = f"https://api.replicate.com/v1/models/{version_id}" headers = { "Authorization": f"Token {api_token}", "Content-Type": "application/json", @@ -306,9 +307,9 @@ def completion( result, logs = handle_prediction_response( prediction_url, api_key, print_verbose ) - model_response[ - "ended" - ] = time.time() # for pricing this must remain right after calling api + model_response["ended"] = ( + time.time() + ) # for pricing this must remain right after calling api ## LOGGING logging_obj.post_call( input=prompt, diff --git a/litellm/llms/vertex_ai.py b/litellm/llms/vertex_ai.py index 603bd3c22b8..0a7980fda2f 100644 --- a/litellm/llms/vertex_ai.py +++ b/litellm/llms/vertex_ai.py @@ -225,6 +225,24 @@ def _gemini_vision_convert_messages(messages: list): part_mime = "video/mp4" google_clooud_part = Part.from_uri(img, mime_type=part_mime) processed_images.append(google_clooud_part) + elif "base64" in img: + # Case 4: Images with base64 encoding + import base64, re + + # base 64 is passed as data:image/jpeg;base64, + image_metadata, img_without_base_64 = img.split(",") + + # read mime_type from img_without_base_64=data:image/jpeg;base64 + # Extract MIME type using regular expression + mime_type_match = re.match(r"data:(.*?);base64", image_metadata) + + if mime_type_match: + mime_type = mime_type_match.group(1) + else: + mime_type = "image/jpeg" + decoded_img = base64.b64decode(img_without_base_64) + processed_image = Part.from_data(data=decoded_img, mime_type=mime_type) + processed_images.append(processed_image) return prompt, processed_images except Exception as e: raise e @@ -278,7 +296,13 @@ def completion( import google.auth ## Load credentials with the correct quota project ref: https://github.com/googleapis/python-aiplatform/issues/2557#issuecomment-1709284744 + print_verbose( + f"VERTEX AI: vertex_project={vertex_project}; vertex_location={vertex_location}" + ) creds, _ = google.auth.default(quota_project_id=vertex_project) + print_verbose( + f"VERTEX AI: creds={creds}; google application credentials: {os.getenv('GOOGLE_APPLICATION_CREDENTIALS')}" + ) vertexai.init( project=vertex_project, location=vertex_location, credentials=creds ) @@ -559,8 +583,7 @@ def completion( f"llm_model.predict(endpoint={endpoint_path}, instances={instances})\n" ) response = llm_model.predict( - endpoint=endpoint_path, - instances=instances + endpoint=endpoint_path, instances=instances ).predictions completion_response = response[0] @@ -585,12 +608,8 @@ def completion( "request_str": request_str, }, ) - request_str += ( - f"llm_model.predict(instances={instances})\n" - ) - response = llm_model.predict( - instances=instances - ).predictions + request_str += f"llm_model.predict(instances={instances})\n" + response = llm_model.predict(instances=instances).predictions completion_response = response[0] if ( @@ -614,7 +633,6 @@ def completion( model_response["choices"][0]["message"]["content"] = str( completion_response ) - model_response["choices"][0]["message"]["content"] = str(completion_response) model_response["created"] = int(time.time()) model_response["model"] = model ## CALCULATING USAGE @@ -766,6 +784,7 @@ async def async_completion( Vertex AI Model Garden """ from google.cloud import aiplatform + ## LOGGING logging_obj.pre_call( input=prompt, @@ -797,11 +816,9 @@ async def async_completion( and "\nOutput:\n" in completion_response ): completion_response = completion_response.split("\nOutput:\n", 1)[1] - + elif mode == "private": - request_str += ( - f"llm_model.predict_async(instances={instances})\n" - ) + request_str += f"llm_model.predict_async(instances={instances})\n" response_obj = await llm_model.predict_async( instances=instances, ) @@ -826,7 +843,6 @@ async def async_completion( model_response["choices"][0]["message"]["content"] = str( completion_response ) - model_response["choices"][0]["message"]["content"] = str(completion_response) model_response["created"] = int(time.time()) model_response["model"] = model ## CALCULATING USAGE @@ -954,6 +970,7 @@ async def async_streaming( response = llm_model.predict_streaming_async(prompt, **optional_params) elif mode == "custom": from google.cloud import aiplatform + stream = optional_params.pop("stream", None) ## LOGGING @@ -972,7 +989,9 @@ async def async_streaming( endpoint_path = llm_model.endpoint_path( project=vertex_project, location=vertex_location, endpoint=model ) - request_str += f"client.predict(endpoint={endpoint_path}, instances={instances})\n" + request_str += ( + f"client.predict(endpoint={endpoint_path}, instances={instances})\n" + ) response_obj = await llm_model.predict( endpoint=endpoint_path, instances=instances, @@ -1005,12 +1024,15 @@ async def async_streaming( if stream: response = TextStreamer(completion_response) + logging_obj.post_call(input=prompt, api_key=None, original_response=response) + streamwrapper = CustomStreamWrapper( completion_stream=response, model=model, custom_llm_provider="vertex_ai", logging_obj=logging_obj, ) + return streamwrapper @@ -1025,6 +1047,7 @@ def embedding( vertex_project=None, vertex_location=None, aembedding=False, + print_verbose=None, ): # logic for parsing in - calling - parsing out model embedding calls try: @@ -1040,7 +1063,13 @@ def embedding( ## Load credentials with the correct quota project ref: https://github.com/googleapis/python-aiplatform/issues/2557#issuecomment-1709284744 try: + print_verbose( + f"VERTEX AI: vertex_project={vertex_project}; vertex_location={vertex_location}" + ) creds, _ = google.auth.default(quota_project_id=vertex_project) + print_verbose( + f"VERTEX AI: creds={creds}; google application credentials: {os.getenv('GOOGLE_APPLICATION_CREDENTIALS')}" + ) vertexai.init( project=vertex_project, location=vertex_location, credentials=creds ) diff --git a/litellm/main.py b/litellm/main.py index 13661106617..114b469488e 100644 --- a/litellm/main.py +++ b/litellm/main.py @@ -8,11 +8,10 @@ # Thank you ! We ❤️ you! - Krrish & Ishaan import os, openai, sys, json, inspect, uuid, datetime, threading -from typing import Any, Literal, Union +from typing import Any, Literal, Union, BinaryIO from functools import partial import dotenv, traceback, random, asyncio, time, contextvars from copy import deepcopy - import httpx import litellm from ._logging import verbose_logger @@ -40,6 +39,7 @@ from litellm.utils import ( ) from .llms import ( anthropic, + anthropic_text, together_ai, ai21, sagemaker, @@ -88,6 +88,7 @@ from litellm.utils import ( read_config_args, Choices, Message, + TranscriptionResponse, ) ####### ENVIRONMENT VARIABLES ################### @@ -259,6 +260,7 @@ async def acompletion( or custom_llm_provider == "openrouter" or custom_llm_provider == "deepinfra" or custom_llm_provider == "perplexity" + or custom_llm_provider == "groq" or custom_llm_provider == "text-completion-openai" or custom_llm_provider == "huggingface" or custom_llm_provider == "ollama" @@ -399,6 +401,7 @@ def completion( logprobs: Optional[bool] = None, top_logprobs: Optional[int] = None, deployment_id=None, + extra_headers: Optional[dict] = None, # soon to be deprecated params by OpenAI functions: Optional[List] = None, function_call: Optional[str] = None, @@ -436,6 +439,7 @@ def completion( api_version (str, optional): API version (default is None). api_key (str, optional): API key (default is None). model_list (list, optional): List of api base, version, keys + extra_headers (dict, optional): Additional headers to include in the request. LITELLM Specific Params mock_response (str, optional): If provided, return a mock completion response for testing or debugging purposes (default is None). @@ -484,6 +488,8 @@ def completion( ### ASYNC CALLS ### acompletion = kwargs.get("acompletion", False) client = kwargs.get("client", None) + ### Admin Controls ### + no_log = kwargs.get("no-log", False) ######## end of unpacking kwargs ########### openai_params = [ "functions", @@ -515,6 +521,7 @@ def completion( "max_retries", "logprobs", "top_logprobs", + "extra_headers", ] litellm_params = [ "metadata", @@ -559,6 +566,7 @@ def completion( "caching_groups", "ttl", "cache", + "no-log", ] default_params = openai_params + litellm_params non_default_params = { @@ -692,6 +700,7 @@ def completion( max_retries=max_retries, logprobs=logprobs, top_logprobs=top_logprobs, + extra_headers=extra_headers, **non_default_params, ) @@ -721,6 +730,7 @@ def completion( model_info=model_info, proxy_server_request=proxy_server_request, preset_cache_key=preset_cache_key, + no_log=no_log, ) logging.update_environment_variables( model=model, @@ -807,6 +817,7 @@ def completion( or custom_llm_provider == "custom_openai" or custom_llm_provider == "deepinfra" or custom_llm_provider == "perplexity" + or custom_llm_provider == "groq" or custom_llm_provider == "anyscale" or custom_llm_provider == "mistral" or custom_llm_provider == "openai" @@ -816,7 +827,7 @@ def completion( # note: if a user sets a custom base - we should ensure this works # allow for the setting of dynamic and stateful api-bases api_base = ( - api_base # for deepinfra/perplexity/anyscale we check in get_llm_provider and pass in the api base from there + api_base # for deepinfra/perplexity/anyscale/groq we check in get_llm_provider and pass in the api base from there or litellm.api_base or get_secret("OPENAI_API_BASE") or "https://api.openai.com/v1" @@ -1013,28 +1024,55 @@ def completion( or litellm.api_key or os.environ.get("ANTHROPIC_API_KEY") ) - api_base = ( - api_base - or litellm.api_base - or get_secret("ANTHROPIC_API_BASE") - or "https://api.anthropic.com/v1/complete" - ) custom_prompt_dict = custom_prompt_dict or litellm.custom_prompt_dict - response = anthropic.completion( - model=model, - messages=messages, - api_base=api_base, - custom_prompt_dict=litellm.custom_prompt_dict, - model_response=model_response, - print_verbose=print_verbose, - optional_params=optional_params, - litellm_params=litellm_params, - logger_fn=logger_fn, - encoding=encoding, # for calculating input/output tokens - api_key=api_key, - logging_obj=logging, - headers=headers, - ) + + if (model == "claude-2") or (model == "claude-instant-1"): + # call anthropic /completion, only use this route for claude-2, claude-instant-1 + api_base = ( + api_base + or litellm.api_base + or get_secret("ANTHROPIC_API_BASE") + or "https://api.anthropic.com/v1/complete" + ) + response = anthropic_text.completion( + model=model, + messages=messages, + api_base=api_base, + custom_prompt_dict=litellm.custom_prompt_dict, + model_response=model_response, + print_verbose=print_verbose, + optional_params=optional_params, + litellm_params=litellm_params, + logger_fn=logger_fn, + encoding=encoding, # for calculating input/output tokens + api_key=api_key, + logging_obj=logging, + headers=headers, + ) + else: + # call /messages + # default route for all anthropic models + api_base = ( + api_base + or litellm.api_base + or get_secret("ANTHROPIC_API_BASE") + or "https://api.anthropic.com/v1/messages" + ) + response = anthropic.completion( + model=model, + messages=messages, + api_base=api_base, + custom_prompt_dict=litellm.custom_prompt_dict, + model_response=model_response, + print_verbose=print_verbose, + optional_params=optional_params, + litellm_params=litellm_params, + logger_fn=logger_fn, + encoding=encoding, # for calculating input/output tokens + api_key=api_key, + logging_obj=logging, + headers=headers, + ) if "stream" in optional_params and optional_params["stream"] == True: # don't try to access stream object, response = CustomStreamWrapper( @@ -1461,12 +1499,14 @@ def completion( response = model_response elif custom_llm_provider == "vertex_ai": vertex_ai_project = ( - optional_params.pop("vertex_ai_project", None) + optional_params.pop("vertex_project", None) + or optional_params.pop("vertex_ai_project", None) or litellm.vertex_project or get_secret("VERTEXAI_PROJECT") ) vertex_ai_location = ( - optional_params.pop("vertex_ai_location", None) + optional_params.pop("vertex_location", None) + or optional_params.pop("vertex_ai_location", None) or litellm.vertex_location or get_secret("VERTEXAI_LOCATION") ) @@ -2238,6 +2278,7 @@ async def aembedding(*args, **kwargs): or custom_llm_provider == "openrouter" or custom_llm_provider == "deepinfra" or custom_llm_provider == "perplexity" + or custom_llm_provider == "groq" or custom_llm_provider == "ollama" or custom_llm_provider == "vertex_ai" ): # currently implemented aiohttp calls for just azure and openai, soon all. @@ -2381,6 +2422,7 @@ def embedding( "caching_groups", "ttl", "cache", + "no-log", ] default_params = openai_params + litellm_params non_default_params = { @@ -2559,12 +2601,14 @@ def embedding( ) elif custom_llm_provider == "vertex_ai": vertex_ai_project = ( - optional_params.pop("vertex_ai_project", None) + optional_params.pop("vertex_project", None) + or optional_params.pop("vertex_ai_project", None) or litellm.vertex_project or get_secret("VERTEXAI_PROJECT") ) vertex_ai_location = ( - optional_params.pop("vertex_ai_location", None) + optional_params.pop("vertex_location", None) + or optional_params.pop("vertex_ai_location", None) or litellm.vertex_location or get_secret("VERTEXAI_LOCATION") ) @@ -2579,6 +2623,7 @@ def embedding( vertex_project=vertex_ai_project, vertex_location=vertex_ai_location, aembedding=aembedding, + print_verbose=print_verbose, ) elif custom_llm_provider == "oobabooga": response = oobabooga.embedding( @@ -2732,6 +2777,7 @@ async def atext_completion(*args, **kwargs): or custom_llm_provider == "openrouter" or custom_llm_provider == "deepinfra" or custom_llm_provider == "perplexity" + or custom_llm_provider == "groq" or custom_llm_provider == "text-completion-openai" or custom_llm_provider == "huggingface" or custom_llm_provider == "ollama" @@ -3003,7 +3049,6 @@ def moderation( return response -##### Moderation ####################### @client async def amoderation(input: str, model: str, api_key: Optional[str] = None, **kwargs): # only supports open ai for now @@ -3026,11 +3071,11 @@ async def aimage_generation(*args, **kwargs): Asynchronously calls the `image_generation` function with the given arguments and keyword arguments. Parameters: - - `args` (tuple): Positional arguments to be passed to the `embedding` function. - - `kwargs` (dict): Keyword arguments to be passed to the `embedding` function. + - `args` (tuple): Positional arguments to be passed to the `image_generation` function. + - `kwargs` (dict): Keyword arguments to be passed to the `image_generation` function. Returns: - - `response` (Any): The response returned by the `embedding` function. + - `response` (Any): The response returned by the `image_generation` function. """ loop = asyncio.get_event_loop() model = args[0] if len(args) > 0 else kwargs["model"] @@ -3052,7 +3097,7 @@ async def aimage_generation(*args, **kwargs): # Await normally init_response = await loop.run_in_executor(None, func_with_context) if isinstance(init_response, dict) or isinstance( - init_response, ModelResponse + init_response, ImageResponse ): ## CACHING SCENARIO response = init_response elif asyncio.iscoroutine(init_response): @@ -3270,6 +3315,144 @@ def image_generation( ) +##### Transcription ####################### + + +@client +async def atranscription(*args, **kwargs): + """ + Calls openai + azure whisper endpoints. + + Allows router to load balance between them + """ + loop = asyncio.get_event_loop() + model = args[0] if len(args) > 0 else kwargs["model"] + ### PASS ARGS TO Image Generation ### + kwargs["atranscription"] = True + custom_llm_provider = None + try: + # Use a partial function to pass your keyword arguments + func = partial(transcription, *args, **kwargs) + + # Add the context to the function + ctx = contextvars.copy_context() + func_with_context = partial(ctx.run, func) + + _, custom_llm_provider, _, _ = get_llm_provider( + model=model, api_base=kwargs.get("api_base", None) + ) + + # Await normally + init_response = await loop.run_in_executor(None, func_with_context) + if isinstance(init_response, dict) or isinstance( + init_response, TranscriptionResponse + ): ## CACHING SCENARIO + response = init_response + elif asyncio.iscoroutine(init_response): + response = await init_response + else: + # Call the synchronous function using run_in_executor + response = await loop.run_in_executor(None, func_with_context) + return response + except Exception as e: + custom_llm_provider = custom_llm_provider or "openai" + raise exception_type( + model=model, + custom_llm_provider=custom_llm_provider, + original_exception=e, + completion_kwargs=args, + ) + + +@client +def transcription( + model: str, + file: BinaryIO, + ## OPTIONAL OPENAI PARAMS ## + language: Optional[str] = None, + prompt: Optional[str] = None, + response_format: Optional[ + Literal["json", "text", "srt", "verbose_json", "vtt"] + ] = None, + temperature: Optional[int] = None, # openai defaults this to 0 + ## LITELLM PARAMS ## + user: Optional[str] = None, + timeout=600, # default to 10 minutes + api_key: Optional[str] = None, + api_base: Optional[str] = None, + api_version: Optional[str] = None, + litellm_logging_obj=None, + custom_llm_provider=None, + **kwargs, +): + """ + Calls openai + azure whisper endpoints. + + Allows router to load balance between them + """ + atranscription = kwargs.get("atranscription", False) + litellm_call_id = kwargs.get("litellm_call_id", None) + logger_fn = kwargs.get("logger_fn", None) + proxy_server_request = kwargs.get("proxy_server_request", None) + model_info = kwargs.get("model_info", None) + metadata = kwargs.get("metadata", {}) + + model_response = litellm.utils.TranscriptionResponse() + + model, custom_llm_provider, dynamic_api_key, api_base = get_llm_provider(model=model, custom_llm_provider=custom_llm_provider, api_base=api_base) # type: ignore + + optional_params = { + "language": language, + "prompt": prompt, + "response_format": response_format, + "temperature": None, # openai defaults this to 0 + } + + if custom_llm_provider == "azure": + # azure configs + api_base = api_base or litellm.api_base or get_secret("AZURE_API_BASE") + + api_version = ( + api_version or litellm.api_version or get_secret("AZURE_API_VERSION") + ) + + azure_ad_token = kwargs.pop("azure_ad_token", None) or get_secret( + "AZURE_AD_TOKEN" + ) + + api_key = ( + api_key + or litellm.api_key + or litellm.azure_key + or get_secret("AZURE_API_KEY") + ) + + response = azure_chat_completions.audio_transcriptions( + model=model, + audio_file=file, + optional_params=optional_params, + model_response=model_response, + atranscription=atranscription, + timeout=timeout, + logging_obj=litellm_logging_obj, + api_base=api_base, + api_key=api_key, + api_version=api_version, + azure_ad_token=azure_ad_token, + ) + elif custom_llm_provider == "openai": + response = openai_chat_completions.audio_transcriptions( + model=model, + audio_file=file, + optional_params=optional_params, + model_response=model_response, + atranscription=atranscription, + timeout=timeout, + logging_obj=litellm_logging_obj, + ) + return response + + ##### Health Endpoints ####################### @@ -3351,12 +3534,15 @@ async def ahealth_check( or default_timeout ) + api_base = model_params.get("api_base") or get_secret("OPENAI_API_BASE") + response = await openai_chat_completions.ahealth_check( model=model, messages=model_params.get( "messages", None ), # Replace with your actual messages list api_key=api_key, + api_base=api_base, timeout=timeout, mode=mode, prompt=prompt, @@ -3667,6 +3853,7 @@ def stream_chunk_builder( response["usage"]["total_tokens"] = ( response["usage"]["prompt_tokens"] + response["usage"]["completion_tokens"] ) + return convert_to_model_response_object( response_object=response, model_response_object=model_response, diff --git a/litellm/model_prices_and_context_window_backup.json b/litellm/model_prices_and_context_window_backup.json index 897e9c3b264..18c4b0d9a0f 100644 --- a/litellm/model_prices_and_context_window_backup.json +++ b/litellm/model_prices_and_context_window_backup.json @@ -6,7 +6,8 @@ "input_cost_per_token": 0.00003, "output_cost_per_token": 0.00006, "litellm_provider": "openai", - "mode": "chat" + "mode": "chat", + "supports_function_calling": true }, "gpt-4-turbo-preview": { "max_tokens": 8192, @@ -15,7 +16,9 @@ "input_cost_per_token": 0.00001, "output_cost_per_token": 0.00003, "litellm_provider": "openai", - "mode": "chat" + "mode": "chat", + "supports_function_calling": true, + "supports_parallel_function_calling": true }, "gpt-4-0314": { "max_tokens": 8192, @@ -33,7 +36,8 @@ "input_cost_per_token": 0.00003, "output_cost_per_token": 0.00006, "litellm_provider": "openai", - "mode": "chat" + "mode": "chat", + "supports_function_calling": true }, "gpt-4-32k": { "max_tokens": 32768, @@ -69,7 +73,9 @@ "input_cost_per_token": 0.00001, "output_cost_per_token": 0.00003, "litellm_provider": "openai", - "mode": "chat" + "mode": "chat", + "supports_function_calling": true, + "supports_parallel_function_calling": true }, "gpt-4-0125-preview": { "max_tokens": 128000, @@ -78,7 +84,9 @@ "input_cost_per_token": 0.00001, "output_cost_per_token": 0.00003, "litellm_provider": "openai", - "mode": "chat" + "mode": "chat", + "supports_function_calling": true, + "supports_parallel_function_calling": true }, "gpt-4-vision-preview": { "max_tokens": 128000, @@ -100,12 +108,13 @@ }, "gpt-3.5-turbo": { "max_tokens": 4097, - "max_input_tokens": 4097, + "max_input_tokens": 16385, "max_output_tokens": 4096, "input_cost_per_token": 0.0000015, "output_cost_per_token": 0.000002, "litellm_provider": "openai", - "mode": "chat" + "mode": "chat", + "supports_function_calling": true }, "gpt-3.5-turbo-0301": { "max_tokens": 4097, @@ -123,7 +132,8 @@ "input_cost_per_token": 0.0000015, "output_cost_per_token": 0.000002, "litellm_provider": "openai", - "mode": "chat" + "mode": "chat", + "supports_function_calling": true }, "gpt-3.5-turbo-1106": { "max_tokens": 16385, @@ -132,7 +142,9 @@ "input_cost_per_token": 0.0000010, "output_cost_per_token": 0.0000020, "litellm_provider": "openai", - "mode": "chat" + "mode": "chat", + "supports_function_calling": true, + "supports_parallel_function_calling": true }, "gpt-3.5-turbo-0125": { "max_tokens": 16385, @@ -141,7 +153,9 @@ "input_cost_per_token": 0.0000005, "output_cost_per_token": 0.0000015, "litellm_provider": "openai", - "mode": "chat" + "mode": "chat", + "supports_function_calling": true, + "supports_parallel_function_calling": true }, "gpt-3.5-turbo-16k": { "max_tokens": 16385, @@ -279,6 +293,18 @@ "output_cost_per_pixel": 0.0, "litellm_provider": "openai" }, + "whisper-1": { + "mode": "audio_transcription", + "input_cost_per_second": 0, + "output_cost_per_second": 0.0001, + "litellm_provider": "openai" + }, + "azure/whisper-1": { + "mode": "audio_transcription", + "input_cost_per_second": 0, + "output_cost_per_second": 0.0001, + "litellm_provider": "azure" + }, "azure/gpt-4-0125-preview": { "max_tokens": 128000, "max_input_tokens": 128000, @@ -286,7 +312,9 @@ "input_cost_per_token": 0.00001, "output_cost_per_token": 0.00003, "litellm_provider": "azure", - "mode": "chat" + "mode": "chat", + "supports_function_calling": true, + "supports_parallel_function_calling": true }, "azure/gpt-4-1106-preview": { "max_tokens": 128000, @@ -295,7 +323,9 @@ "input_cost_per_token": 0.00001, "output_cost_per_token": 0.00003, "litellm_provider": "azure", - "mode": "chat" + "mode": "chat", + "supports_function_calling": true, + "supports_parallel_function_calling": true }, "azure/gpt-4-0613": { "max_tokens": 8192, @@ -304,7 +334,8 @@ "input_cost_per_token": 0.00003, "output_cost_per_token": 0.00006, "litellm_provider": "azure", - "mode": "chat" + "mode": "chat", + "supports_function_calling": true }, "azure/gpt-4-32k-0613": { "max_tokens": 32768, @@ -331,7 +362,8 @@ "input_cost_per_token": 0.00003, "output_cost_per_token": 0.00006, "litellm_provider": "azure", - "mode": "chat" + "mode": "chat", + "supports_function_calling": true }, "azure/gpt-4-turbo": { "max_tokens": 128000, @@ -340,7 +372,9 @@ "input_cost_per_token": 0.00001, "output_cost_per_token": 0.00003, "litellm_provider": "azure", - "mode": "chat" + "mode": "chat", + "supports_function_calling": true, + "supports_parallel_function_calling": true }, "azure/gpt-4-turbo-vision-preview": { "max_tokens": 128000, @@ -358,7 +392,8 @@ "input_cost_per_token": 0.000003, "output_cost_per_token": 0.000004, "litellm_provider": "azure", - "mode": "chat" + "mode": "chat", + "supports_function_calling": true }, "azure/gpt-35-turbo-1106": { "max_tokens": 16384, @@ -367,7 +402,20 @@ "input_cost_per_token": 0.0000015, "output_cost_per_token": 0.000002, "litellm_provider": "azure", - "mode": "chat" + "mode": "chat", + "supports_function_calling": true, + "supports_parallel_function_calling": true + }, + "azure/gpt-35-turbo-0125": { + "max_tokens": 16384, + "max_input_tokens": 16384, + "max_output_tokens": 4096, + "input_cost_per_token": 0.0000005, + "output_cost_per_token": 0.0000015, + "litellm_provider": "azure", + "mode": "chat", + "supports_function_calling": true, + "supports_parallel_function_calling": true }, "azure/gpt-35-turbo-16k": { "max_tokens": 16385, @@ -385,7 +433,41 @@ "input_cost_per_token": 0.0000015, "output_cost_per_token": 0.000002, "litellm_provider": "azure", - "mode": "chat" + "mode": "chat", + "supports_function_calling": true + }, + "azure/gpt-3.5-turbo-instruct-0914": { + "max_tokens": 4097, + + "input_cost_per_token": 0.0000015, + "output_cost_per_token": 0.000002, + "litellm_provider": "text-completion-openai", + "mode": "completion" + + }, + "azure/gpt-35-turbo-instruct": { + "max_tokens": 4097, + "input_cost_per_token": 0.0000015, + "output_cost_per_token": 0.000002, + "litellm_provider": "text-completion-openai", + "mode": "completion" + + }, + "azure/mistral-large-latest": { + "max_tokens": 32000, + "input_cost_per_token": 0.000008, + "output_cost_per_token": 0.000024, + "litellm_provider": "azure", + "mode": "chat", + "supports_function_calling": true + }, + "azure/mistral-large-2402": { + "max_tokens": 32000, + "input_cost_per_token": 0.000008, + "output_cost_per_token": 0.000024, + "litellm_provider": "azure", + "mode": "chat", + "supports_function_calling": true }, "azure/ada": { "max_tokens": 8191, @@ -401,6 +483,20 @@ "litellm_provider": "azure", "mode": "embedding" }, + "azure/text-embedding-3-large": { + "max_tokens": 8191, + "input_cost_per_token": 0.00000013, + "output_cost_per_token": 0.000000, + "litellm_provider": "azure", + "mode": "embedding" + }, + "azure/text-embedding-3-small": { + "max_tokens": 8191, + "input_cost_per_token": 0.00000002, + "output_cost_per_token": 0.000000, + "litellm_provider": "azure", + "mode": "embedding" + }, "azure/standard/1024-x-1024/dall-e-3": { "input_cost_per_pixel": 0.0000000381469, "output_cost_per_token": 0.0, @@ -470,6 +566,14 @@ "litellm_provider": "text-completion-openai", "mode": "completion" }, + "gpt-3.5-turbo-instruct-0914": { + "max_tokens": 4097, + "input_cost_per_token": 0.0000015, + "output_cost_per_token": 0.000002, + "litellm_provider": "text-completion-openai", + "mode": "completion" + + }, "claude-instant-1": { "max_tokens": 100000, "max_output_tokens": 8191, @@ -499,12 +603,34 @@ "litellm_provider": "mistral", "mode": "chat" }, + "mistral/mistral-large-latest": { + "max_tokens": 32000, + "input_cost_per_token": 0.000008, + "output_cost_per_token": 0.000024, + "litellm_provider": "mistral", + "mode": "chat", + "supports_function_calling": true + }, "mistral/mistral-embed": { "max_tokens": 8192, "input_cost_per_token": 0.000000111, "litellm_provider": "mistral", "mode": "embedding" }, + "groq/llama2-70b-4096": { + "max_tokens": 4096, + "input_cost_per_token": 0.00000070, + "output_cost_per_token": 0.00000080, + "litellm_provider": "groq", + "mode": "chat" + }, + "groq/mixtral-8x7b-32768": { + "max_tokens": 32768, + "input_cost_per_token": 0.00000027, + "output_cost_per_token": 0.00000027, + "litellm_provider": "groq", + "mode": "chat" + }, "claude-instant-1.2": { "max_tokens": 100000, "max_output_tokens": 8191, @@ -529,6 +655,22 @@ "litellm_provider": "anthropic", "mode": "chat" }, + "claude-3-opus-20240229": { + "max_tokens": 200000, + "max_output_tokens": 4096, + "input_cost_per_token": 0.000015, + "output_cost_per_token": 0.000075, + "litellm_provider": "anthropic", + "mode": "chat" + }, + "claude-3-sonnet-20240229": { + "max_tokens": 200000, + "max_output_tokens": 4096, + "input_cost_per_token": 0.000003, + "output_cost_per_token": 0.000015, + "litellm_provider": "anthropic", + "mode": "chat" + }, "text-bison": { "max_tokens": 8192, "input_cost_per_token": 0.000000125, @@ -655,6 +797,25 @@ "input_cost_per_token": 0.00000025, "output_cost_per_token": 0.0000005, "litellm_provider": "vertex_ai-language-models", + "mode": "chat", + "supports_function_calling": true + }, + "gemini-1.5-pro": { + "max_tokens": 8192, + "max_input_tokens": 1000000, + "max_output_tokens": 8192, + "input_cost_per_token": 0, + "output_cost_per_token": 0, + "litellm_provider": "vertex_ai-language-models", + "mode": "chat" + }, + "gemini-1.5-pro-preview-0215": { + "max_tokens": 8192, + "max_input_tokens": 1000000, + "max_output_tokens": 8192, + "input_cost_per_token": 0, + "output_cost_per_token": 0, + "litellm_provider": "vertex_ai-language-models", "mode": "chat" }, "gemini-pro-vision": { @@ -676,6 +837,29 @@ "litellm_provider": "vertex_ai-vision-models", "mode": "chat" }, + "gemini-1.0-pro-vision-001": { + "max_tokens": 16384, + "max_output_tokens": 2048, + "max_images_per_prompt": 16, + "max_videos_per_prompt": 1, + "max_video_length": 2, + "input_cost_per_token": 0.00000025, + "output_cost_per_token": 0.0000005, + "litellm_provider": "vertex_ai-vision-models", + "mode": "chat" + }, + "gemini-1.5-pro-vision": { + "max_tokens": 8192, + "max_input_tokens": 1000000, + "max_output_tokens": 8192, + "max_images_per_prompt": 16, + "max_videos_per_prompt": 1, + "max_video_length": 2, + "input_cost_per_token": 0, + "output_cost_per_token": 0, + "litellm_provider": "vertex_ai-vision-models", + "mode": "chat" + }, "textembedding-gecko": { "max_tokens": 3072, "max_input_tokens": 3072, @@ -771,6 +955,15 @@ "litellm_provider": "gemini", "mode": "chat" }, + "gemini/gemini-1.5-pro": { + "max_tokens": 8192, + "max_input_tokens": 1000000, + "max_output_tokens": 8192, + "input_cost_per_token": 0, + "output_cost_per_token": 0, + "litellm_provider": "gemini", + "mode": "chat" + }, "gemini/gemini-pro-vision": { "max_tokens": 30720, "max_output_tokens": 2048, @@ -778,6 +971,15 @@ "output_cost_per_token": 0.0, "litellm_provider": "gemini", "mode": "chat" + }, + "gemini/gemini-1.5-pro-vision": { + "max_tokens": 8192, + "max_input_tokens": 1000000, + "max_output_tokens": 8192, + "input_cost_per_token": 0, + "output_cost_per_token": 0, + "litellm_provider": "gemini", + "mode": "chat" }, "command-nightly": { "max_tokens": 4096, @@ -1062,6 +1264,29 @@ "litellm_provider": "bedrock", "mode": "embedding" }, + "bedrock/us-west-2/mistral.mixtral-8x7b-instruct": { + "max_tokens": 32000, + "input_cost_per_token": 0.00000045, + "output_cost_per_token": 0.0000007, + "litellm_provider": "bedrock", + "mode": "completion" + }, + "bedrock/us-west-2/mistral.mistral-7b-instruct": { + "max_tokens": 32000, + "input_cost_per_token": 0.00000015, + "output_cost_per_token": 0.0000002, + "litellm_provider": "bedrock", + "mode": "completion" + }, + "anthropic.claude-3-sonnet-20240229-v1:0": { + "max_tokens": 200000, + "max_input_tokens": 200000, + "max_output_tokens": 4096, + "input_cost_per_token": 0.000003, + "output_cost_per_token": 0.000015, + "litellm_provider": "bedrock", + "mode": "chat" + }, "anthropic.claude-v1": { "max_tokens": 100000, "max_output_tokens": 8191, @@ -1658,6 +1883,23 @@ "output_cost_per_token": 0.0000009, "litellm_provider": "together_ai" }, + "together_ai/mistralai/Mixtral-8x7B-Instruct-v0.1": { + "input_cost_per_token": 0.0000006, + "output_cost_per_token": 0.0000006, + "litellm_provider": "together_ai", + "supports_function_calling": true, + "supports_parallel_function_calling": true + }, + "together_ai/mistralai/Mistral-7B-Instruct-v0.1": { + "litellm_provider": "together_ai", + "supports_function_calling": true, + "supports_parallel_function_calling": true + }, + "together_ai/togethercomputer/CodeLlama-34b-Instruct": { + "litellm_provider": "together_ai", + "supports_function_calling": true, + "supports_parallel_function_calling": true + }, "ollama/llama2": { "max_tokens": 4096, "input_cost_per_token": 0.0, @@ -1904,13 +2146,52 @@ "output_cost_per_token": 0.00000028, "litellm_provider": "perplexity", "mode": "chat" + }, + "perplexity/sonar-small-chat": { + "max_tokens": 16384, + "input_cost_per_token": 0.00000007, + "output_cost_per_token": 0.00000028, + "litellm_provider": "perplexity", + "mode": "chat" + }, + "perplexity/sonar-small-online": { + "max_tokens": 12000, + "input_cost_per_token": 0, + "output_cost_per_token": 0.00000028, + "input_cost_per_request": 0.005, + "litellm_provider": "perplexity", + "mode": "chat" + }, + "perplexity/sonar-medium-chat": { + "max_tokens": 16384, + "input_cost_per_token": 0.0000006, + "output_cost_per_token": 0.0000018, + "litellm_provider": "perplexity", + "mode": "chat" + }, + "perplexity/sonar-medium-online": { + "max_tokens": 12000, + "input_cost_per_token": 0, + "output_cost_per_token": 0.0000018, + "input_cost_per_request": 0.005, + "litellm_provider": "perplexity", + "mode": "chat" }, "anyscale/mistralai/Mistral-7B-Instruct-v0.1": { "max_tokens": 16384, "input_cost_per_token": 0.00000015, "output_cost_per_token": 0.00000015, "litellm_provider": "anyscale", - "mode": "chat" + "mode": "chat", + "supports_function_calling": true + }, + "anyscale/Mixtral-8x7B-Instruct-v0.1": { + "max_tokens": 16384, + "input_cost_per_token": 0.00000015, + "output_cost_per_token": 0.00000015, + "litellm_provider": "anyscale", + "mode": "chat", + "supports_function_calling": true }, "anyscale/HuggingFaceH4/zephyr-7b-beta": { "max_tokens": 16384, diff --git a/litellm/proxy/_experimental/out/404.html b/litellm/proxy/_experimental/out/404.html index 89a7a52ffe3..eb5cf4286b8 100644 --- a/litellm/proxy/_experimental/out/404.html +++ b/litellm/proxy/_experimental/out/404.html @@ -1 +1 @@ -404: This page could not be found.🚅 LiteLLM

404

This page could not be found.

\ No newline at end of file +404: This page could not be found.🚅 LiteLLM

404

This page could not be found.

\ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/qiuqcCJAvN0BfxnYr9J0N/_buildManifest.js b/litellm/proxy/_experimental/out/_next/static/ZF-EluyKCEJoZptE3dOXT/_buildManifest.js similarity index 100% rename from litellm/proxy/_experimental/out/_next/static/qiuqcCJAvN0BfxnYr9J0N/_buildManifest.js rename to litellm/proxy/_experimental/out/_next/static/ZF-EluyKCEJoZptE3dOXT/_buildManifest.js diff --git a/litellm/proxy/_experimental/out/_next/static/qiuqcCJAvN0BfxnYr9J0N/_ssgManifest.js b/litellm/proxy/_experimental/out/_next/static/ZF-EluyKCEJoZptE3dOXT/_ssgManifest.js similarity index 100% rename from litellm/proxy/_experimental/out/_next/static/qiuqcCJAvN0BfxnYr9J0N/_ssgManifest.js rename to litellm/proxy/_experimental/out/_next/static/ZF-EluyKCEJoZptE3dOXT/_ssgManifest.js diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/321-87f0fad233104594.js b/litellm/proxy/_experimental/out/_next/static/chunks/321-87f0fad233104594.js deleted file mode 100644 index 253134c745b..00000000000 --- a/litellm/proxy/_experimental/out/_next/static/chunks/321-87f0fad233104594.js +++ /dev/null @@ -1,32 +0,0 @@ -"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[321],{12215:function(e,t,n){n.d(t,{iN:function(){return g},R_:function(){return d}});var r=n(41785),o=n(76991),a=[{index:7,opacity:.15},{index:6,opacity:.25},{index:5,opacity:.3},{index:5,opacity:.45},{index:5,opacity:.65},{index:5,opacity:.85},{index:4,opacity:.9},{index:3,opacity:.95},{index:2,opacity:.97},{index:1,opacity:.98}];function i(e){var t=e.r,n=e.g,o=e.b,a=(0,r.py)(t,n,o);return{h:360*a.h,s:a.s,v:a.v}}function s(e){var t=e.r,n=e.g,o=e.b;return"#".concat((0,r.vq)(t,n,o,!1))}function l(e,t,n){var r;return(r=Math.round(e.h)>=60&&240>=Math.round(e.h)?n?Math.round(e.h)-2*t:Math.round(e.h)+2*t:n?Math.round(e.h)+2*t:Math.round(e.h)-2*t)<0?r+=360:r>=360&&(r-=360),r}function c(e,t,n){var r;return 0===e.h&&0===e.s?e.s:((r=n?e.s-.16*t:4===t?e.s+.16:e.s+.05*t)>1&&(r=1),n&&5===t&&r>.1&&(r=.1),r<.06&&(r=.06),Number(r.toFixed(2)))}function u(e,t,n){var r;return(r=n?e.v+.05*t:e.v-.15*t)>1&&(r=1),Number(r.toFixed(2))}function d(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=[],r=(0,o.uA)(e),d=5;d>0;d-=1){var p=i(r),f=s((0,o.uA)({h:l(p,d,!0),s:c(p,d,!0),v:u(p,d,!0)}));n.push(f)}n.push(s(r));for(var m=1;m<=4;m+=1){var g=i(r),h=s((0,o.uA)({h:l(g,m),s:c(g,m),v:u(g,m)}));n.push(h)}return"dark"===t.theme?a.map(function(e){var r,a,i,l=e.index,c=e.opacity;return s((r=(0,o.uA)(t.backgroundColor||"#141414"),a=(0,o.uA)(n[l]),i=100*c/100,{r:(a.r-r.r)*i+r.r,g:(a.g-r.g)*i+r.g,b:(a.b-r.b)*i+r.b}))}):n}var p={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"},f={},m={};Object.keys(p).forEach(function(e){f[e]=d(p[e]),f[e].primary=f[e][5],m[e]=d(p[e],{theme:"dark",backgroundColor:"#141414"}),m[e].primary=m[e][5]}),f.red,f.volcano,f.gold,f.orange,f.yellow,f.lime,f.green,f.cyan;var g=f.blue;f.geekblue,f.purple,f.magenta,f.grey,f.grey},8985:function(e,t,n){n.d(t,{E4:function(){return ej},jG:function(){return k},ks:function(){return U},bf:function(){return F},CI:function(){return eD},fp:function(){return X},xy:function(){return eM}});var r,o,a=n(50833),i=n(80406),s=n(63787),l=n(5239),c=function(e){for(var t,n=0,r=0,o=e.length;o>=4;++r,o-=4)t=(65535&(t=255&e.charCodeAt(r)|(255&e.charCodeAt(++r))<<8|(255&e.charCodeAt(++r))<<16|(255&e.charCodeAt(++r))<<24))*1540483477+((t>>>16)*59797<<16),t^=t>>>24,n=(65535&t)*1540483477+((t>>>16)*59797<<16)^(65535&n)*1540483477+((n>>>16)*59797<<16);switch(o){case 3:n^=(255&e.charCodeAt(r+2))<<16;case 2:n^=(255&e.charCodeAt(r+1))<<8;case 1:n^=255&e.charCodeAt(r),n=(65535&n)*1540483477+((n>>>16)*59797<<16)}return n^=n>>>13,(((n=(65535&n)*1540483477+((n>>>16)*59797<<16))^n>>>15)>>>0).toString(36)},u=n(24050),d=n(64090),p=n.t(d,2);n(61475),n(92536);var f=n(47365),m=n(65127);function g(e){return e.join("%")}var h=function(){function e(t){(0,f.Z)(this,e),(0,a.Z)(this,"instanceId",void 0),(0,a.Z)(this,"cache",new Map),this.instanceId=t}return(0,m.Z)(e,[{key:"get",value:function(e){return this.opGet(g(e))}},{key:"opGet",value:function(e){return this.cache.get(e)||null}},{key:"update",value:function(e,t){return this.opUpdate(g(e),t)}},{key:"opUpdate",value:function(e,t){var n=t(this.cache.get(e));null===n?this.cache.delete(e):this.cache.set(e,n)}}]),e}(),b="data-token-hash",y="data-css-hash",v="__cssinjs_instance__",E=d.createContext({hashPriority:"low",cache:function(){var e=Math.random().toString(12).slice(2);if("undefined"!=typeof document&&document.head&&document.body){var t=document.body.querySelectorAll("style[".concat(y,"]"))||[],n=document.head.firstChild;Array.from(t).forEach(function(t){t[v]=t[v]||e,t[v]===e&&document.head.insertBefore(t,n)});var r={};Array.from(document.querySelectorAll("style[".concat(y,"]"))).forEach(function(t){var n,o=t.getAttribute(y);r[o]?t[v]===e&&(null===(n=t.parentNode)||void 0===n||n.removeChild(t)):r[o]=!0})}return new h(e)}(),defaultCache:!0}),S=n(6976),w=n(22127),x=function(){function e(){(0,f.Z)(this,e),(0,a.Z)(this,"cache",void 0),(0,a.Z)(this,"keys",void 0),(0,a.Z)(this,"cacheCallTimes",void 0),this.cache=new Map,this.keys=[],this.cacheCallTimes=0}return(0,m.Z)(e,[{key:"size",value:function(){return this.keys.length}},{key:"internalGet",value:function(e){var t,n,r=arguments.length>1&&void 0!==arguments[1]&&arguments[1],o={map:this.cache};return e.forEach(function(e){if(o){var t;o=null===(t=o)||void 0===t||null===(t=t.map)||void 0===t?void 0:t.get(e)}else o=void 0}),null!==(t=o)&&void 0!==t&&t.value&&r&&(o.value[1]=this.cacheCallTimes++),null===(n=o)||void 0===n?void 0:n.value}},{key:"get",value:function(e){var t;return null===(t=this.internalGet(e,!0))||void 0===t?void 0:t[0]}},{key:"has",value:function(e){return!!this.internalGet(e)}},{key:"set",value:function(t,n){var r=this;if(!this.has(t)){if(this.size()+1>e.MAX_CACHE_SIZE+e.MAX_CACHE_OFFSET){var o=this.keys.reduce(function(e,t){var n=(0,i.Z)(e,2)[1];return r.internalGet(t)[1]0,"[Ant Design CSS-in-JS] Theme should have at least one derivative function."),A+=1}return(0,m.Z)(e,[{key:"getDerivativeToken",value:function(e){return this.derivatives.reduce(function(t,n){return n(e,t)},void 0)}}]),e}(),C=new x;function k(e){var t=Array.isArray(e)?e:[e];return C.has(t)||C.set(t,new T(t)),C.get(t)}var I=new WeakMap,N={},_=new WeakMap;function R(e){var t=_.get(e)||"";return t||(Object.keys(e).forEach(function(n){var r=e[n];t+=n,r instanceof T?t+=r.id:r&&"object"===(0,S.Z)(r)?t+=R(r):t+=r}),_.set(e,t)),t}function P(e,t){return c("".concat(t,"_").concat(R(e)))}var M="random-".concat(Date.now(),"-").concat(Math.random()).replace(/\./g,""),L="_bAmBoO_",D=void 0,j=(0,w.Z)();function F(e){return"number"==typeof e?"".concat(e,"px"):e}function B(e,t,n){var r,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=arguments.length>4&&void 0!==arguments[4]&&arguments[4];if(i)return e;var s=(0,l.Z)((0,l.Z)({},o),{},(r={},(0,a.Z)(r,b,t),(0,a.Z)(r,y,n),r)),c=Object.keys(s).map(function(e){var t=s[e];return t?"".concat(e,'="').concat(t,'"'):null}).filter(function(e){return e}).join(" ");return"")}var U=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return"--".concat(t?"".concat(t,"-"):"").concat(e).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()},Z=function(e,t,n){var r,o={},a={};return Object.entries(e).forEach(function(e){var t=(0,i.Z)(e,2),r=t[0],s=t[1];if(null!=n&&null!==(l=n.preserve)&&void 0!==l&&l[r])a[r]=s;else if(("string"==typeof s||"number"==typeof s)&&!(null!=n&&null!==(c=n.ignore)&&void 0!==c&&c[r])){var l,c,u,d=U(r,null==n?void 0:n.prefix);o[d]="number"!=typeof s||null!=n&&null!==(u=n.unitless)&&void 0!==u&&u[r]?String(s):"".concat(s,"px"),a[r]="var(".concat(d,")")}}),[a,(r={scope:null==n?void 0:n.scope},Object.keys(o).length?".".concat(t).concat(null!=r&&r.scope?".".concat(r.scope):"","{").concat(Object.entries(o).map(function(e){var t=(0,i.Z)(e,2),n=t[0],r=t[1];return"".concat(n,":").concat(r,";")}).join(""),"}"):"")]},z=n(24800),H=(0,l.Z)({},p).useInsertionEffect,G=H?function(e,t,n){return H(function(){return e(),t()},n)}:function(e,t,n){d.useMemo(e,n),(0,z.Z)(function(){return t(!0)},n)},$=void 0!==(0,l.Z)({},p).useInsertionEffect?function(e){var t=[],n=!1;return d.useEffect(function(){return n=!1,function(){n=!0,t.length&&t.forEach(function(e){return e()})}},e),function(e){n||t.push(e)}}:function(){return function(e){e()}};function W(e,t,n,r,o){var a=d.useContext(E).cache,l=g([e].concat((0,s.Z)(t))),c=$([l]),u=function(e){a.opUpdate(l,function(t){var r=(0,i.Z)(t||[void 0,void 0],2),o=r[0],a=[void 0===o?0:o,r[1]||n()];return e?e(a):a})};d.useMemo(function(){u()},[l]);var p=a.opGet(l)[1];return G(function(){null==o||o(p)},function(e){return u(function(t){var n=(0,i.Z)(t,2),r=n[0],a=n[1];return e&&0===r&&(null==o||o(p)),[r+1,a]}),function(){a.opUpdate(l,function(t){var n=(0,i.Z)(t||[],2),o=n[0],s=void 0===o?0:o,u=n[1];return 0==s-1?(c(function(){(e||!a.opGet(l))&&(null==r||r(u,!1))}),null):[s-1,u]})}},[l]),p}var V={},q=new Map,Y=function(e,t,n,r){var o=n.getDerivativeToken(e),a=(0,l.Z)((0,l.Z)({},o),t);return r&&(a=r(a)),a},K="token";function X(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=(0,d.useContext)(E),o=r.cache.instanceId,a=r.container,p=n.salt,f=void 0===p?"":p,m=n.override,g=void 0===m?V:m,h=n.formatToken,S=n.getComputedToken,w=n.cssVar,x=function(e,t){for(var n=I,r=0;r=(q.get(e)||0)}),n.length-r.length>0&&r.forEach(function(e){"undefined"!=typeof document&&document.querySelectorAll("style[".concat(b,'="').concat(e,'"]')).forEach(function(e){if(e[v]===o){var t;null===(t=e.parentNode)||void 0===t||t.removeChild(e)}}),q.delete(e)})},function(e){var t=(0,i.Z)(e,4),n=t[0],r=t[3];if(w&&r){var s=(0,u.hq)(r,c("css-variables-".concat(n._themeKey)),{mark:y,prepend:"queue",attachTo:a,priority:-999});s[v]=o,s.setAttribute(b,n._themeKey)}})}var Q=n(14749),J={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},ee="comm",et="rule",en="decl",er=Math.abs,eo=String.fromCharCode;function ea(e,t,n){return e.replace(t,n)}function ei(e,t){return 0|e.charCodeAt(t)}function es(e,t,n){return e.slice(t,n)}function el(e){return e.length}function ec(e,t){return t.push(e),e}function eu(e,t){for(var n="",r=0;r0?f[y]+" "+v:ea(v,/&\f/g,f[y])).trim())&&(l[b++]=E);return ey(e,t,n,0===o?et:s,l,c,u,d)}function eO(e,t,n,r,o){return ey(e,t,n,en,es(e,0,r),es(e,r+1,-1),r,o)}var eA="data-ant-cssinjs-cache-path",eT="_FILE_STYLE__",eC=!0,ek="_multi_value_";function eI(e){var t,n,r;return eu((r=function e(t,n,r,o,a,i,s,l,c){for(var u,d,p,f=0,m=0,g=s,h=0,b=0,y=0,v=1,E=1,S=1,w=0,x="",O=a,A=i,T=o,C=x;E;)switch(y=w,w=ev()){case 40:if(108!=y&&58==ei(C,g-1)){-1!=(d=C+=ea(ew(w),"&","&\f"),p=er(f?l[f-1]:0),d.indexOf("&\f",p))&&(S=-1);break}case 34:case 39:case 91:C+=ew(w);break;case 9:case 10:case 13:case 32:C+=function(e){for(;eh=eE();)if(eh<33)ev();else break;return eS(e)>2||eS(eh)>3?"":" "}(y);break;case 92:C+=function(e,t){for(var n;--t&&ev()&&!(eh<48)&&!(eh>102)&&(!(eh>57)||!(eh<65))&&(!(eh>70)||!(eh<97)););return n=eg+(t<6&&32==eE()&&32==ev()),es(eb,e,n)}(eg-1,7);continue;case 47:switch(eE()){case 42:case 47:ec(ey(u=function(e,t){for(;ev();)if(e+eh===57)break;else if(e+eh===84&&47===eE())break;return"/*"+es(eb,t,eg-1)+"*"+eo(47===e?e:ev())}(ev(),eg),n,r,ee,eo(eh),es(u,2,-2),0,c),c);break;default:C+="/"}break;case 123*v:l[f++]=el(C)*S;case 125*v:case 59:case 0:switch(w){case 0:case 125:E=0;case 59+m:-1==S&&(C=ea(C,/\f/g,"")),b>0&&el(C)-g&&ec(b>32?eO(C+";",o,r,g-1,c):eO(ea(C," ","")+";",o,r,g-2,c),c);break;case 59:C+=";";default:if(ec(T=ex(C,n,r,f,m,a,l,x,O=[],A=[],g,i),i),123===w){if(0===m)e(C,n,T,T,O,i,g,l,A);else switch(99===h&&110===ei(C,3)?100:h){case 100:case 108:case 109:case 115:e(t,T,T,o&&ec(ex(t,T,T,0,0,a,l,x,a,O=[],g,A),A),a,A,g,l,o?O:A);break;default:e(C,T,T,T,[""],A,0,l,A)}}}f=m=b=0,v=S=1,x=C="",g=s;break;case 58:g=1+el(C),b=y;default:if(v<1){if(123==w)--v;else if(125==w&&0==v++&&125==(eh=eg>0?ei(eb,--eg):0,ef--,10===eh&&(ef=1,ep--),eh))continue}switch(C+=eo(w),w*v){case 38:S=m>0?1:(C+="\f",-1);break;case 44:l[f++]=(el(C)-1)*S,S=1;break;case 64:45===eE()&&(C+=ew(ev())),h=eE(),m=g=el(x=C+=function(e){for(;!eS(eE());)ev();return es(eb,e,eg)}(eg)),w++;break;case 45:45===y&&2==el(C)&&(v=0)}}return i}("",null,null,null,[""],(n=t=e,ep=ef=1,em=el(eb=n),eg=0,t=[]),0,[0],t),eb="",r),ed).replace(/\{%%%\:[^;];}/g,";")}var eN=function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{root:!0,parentSelectors:[]},o=r.root,a=r.injectHash,c=r.parentSelectors,d=n.hashId,p=n.layer,f=(n.path,n.hashPriority),m=n.transformers,g=void 0===m?[]:m;n.linters;var h="",b={};function y(t){var r=t.getName(d);if(!b[r]){var o=e(t.style,n,{root:!1,parentSelectors:c}),a=(0,i.Z)(o,1)[0];b[r]="@keyframes ".concat(t.getName(d)).concat(a)}}if((function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return t.forEach(function(t){Array.isArray(t)?e(t,n):t&&n.push(t)}),n})(Array.isArray(t)?t:[t]).forEach(function(t){var r="string"!=typeof t||o?t:{};if("string"==typeof r)h+="".concat(r,"\n");else if(r._keyframe)y(r);else{var u=g.reduce(function(e,t){var n;return(null==t||null===(n=t.visit)||void 0===n?void 0:n.call(t,e))||e},r);Object.keys(u).forEach(function(t){var r=u[t];if("object"!==(0,S.Z)(r)||!r||"animationName"===t&&r._keyframe||"object"===(0,S.Z)(r)&&r&&("_skip_check_"in r||ek in r)){function p(e,t){var n=e.replace(/[A-Z]/g,function(e){return"-".concat(e.toLowerCase())}),r=t;J[e]||"number"!=typeof r||0===r||(r="".concat(r,"px")),"animationName"===e&&null!=t&&t._keyframe&&(y(t),r=t.getName(d)),h+="".concat(n,":").concat(r,";")}var m,g=null!==(m=null==r?void 0:r.value)&&void 0!==m?m:r;"object"===(0,S.Z)(r)&&null!=r&&r[ek]&&Array.isArray(g)?g.forEach(function(e){p(t,e)}):p(t,g)}else{var v=!1,E=t.trim(),w=!1;(o||a)&&d?E.startsWith("@")?v=!0:E=function(e,t,n){if(!t)return e;var r=".".concat(t),o="low"===n?":where(".concat(r,")"):r;return e.split(",").map(function(e){var t,n=e.trim().split(/\s+/),r=n[0]||"",a=(null===(t=r.match(/^\w+/))||void 0===t?void 0:t[0])||"";return[r="".concat(a).concat(o).concat(r.slice(a.length))].concat((0,s.Z)(n.slice(1))).join(" ")}).join(",")}(t,d,f):o&&!d&&("&"===E||""===E)&&(E="",w=!0);var x=e(r,n,{root:w,injectHash:v,parentSelectors:[].concat((0,s.Z)(c),[E])}),O=(0,i.Z)(x,2),A=O[0],T=O[1];b=(0,l.Z)((0,l.Z)({},b),T),h+="".concat(E).concat(A)}})}}),o){if(p&&(void 0===D&&(D=function(e,t,n){if((0,w.Z)()){(0,u.hq)(e,M);var r,o,a=document.createElement("div");a.style.position="fixed",a.style.left="0",a.style.top="0",null==t||t(a),document.body.appendChild(a);var i=n?n(a):null===(r=getComputedStyle(a).content)||void 0===r?void 0:r.includes(L);return null===(o=a.parentNode)||void 0===o||o.removeChild(a),(0,u.jL)(M),i}return!1}("@layer ".concat(M," { .").concat(M,' { content: "').concat(L,'"!important; } }'),function(e){e.className=M})),D)){var v=p.split(","),E=v[v.length-1].trim();h="@layer ".concat(E," {").concat(h,"}"),v.length>1&&(h="@layer ".concat(p,"{%%%:%}").concat(h))}}else h="{".concat(h,"}");return[h,b]};function e_(e,t){return c("".concat(e.join("%")).concat(t))}function eR(){return null}var eP="style";function eM(e,t){var n=e.token,o=e.path,l=e.hashId,c=e.layer,p=e.nonce,f=e.clientOnly,m=e.order,g=void 0===m?0:m,h=d.useContext(E),S=h.autoClear,x=(h.mock,h.defaultCache),O=h.hashPriority,A=h.container,T=h.ssrInline,C=h.transformers,k=h.linters,I=h.cache,N=n._tokenKey,_=[N].concat((0,s.Z)(o)),R=W(eP,_,function(){var e=_.join("|");if(!function(){if(!r&&(r={},(0,w.Z)())){var e,t=document.createElement("div");t.className=eA,t.style.position="fixed",t.style.visibility="hidden",t.style.top="-9999px",document.body.appendChild(t);var n=getComputedStyle(t).content||"";(n=n.replace(/^"/,"").replace(/"$/,"")).split(";").forEach(function(e){var t=e.split(":"),n=(0,i.Z)(t,2),o=n[0],a=n[1];r[o]=a});var o=document.querySelector("style[".concat(eA,"]"));o&&(eC=!1,null===(e=o.parentNode)||void 0===e||e.removeChild(o)),document.body.removeChild(t)}}(),r[e]){var n=function(e){var t=r[e],n=null;if(t&&(0,w.Z)()){if(eC)n=eT;else{var o=document.querySelector("style[".concat(y,'="').concat(r[e],'"]'));o?n=o.innerHTML:delete r[e]}}return[n,t]}(e),a=(0,i.Z)(n,2),s=a[0],u=a[1];if(s)return[s,N,u,{},f,g]}var d=eN(t(),{hashId:l,hashPriority:O,layer:c,path:o.join("-"),transformers:C,linters:k}),p=(0,i.Z)(d,2),m=p[0],h=p[1],b=eI(m),v=e_(_,b);return[b,N,v,h,f,g]},function(e,t){var n=(0,i.Z)(e,3)[2];(t||S)&&j&&(0,u.jL)(n,{mark:y})},function(e){var t=(0,i.Z)(e,4),n=t[0],r=(t[1],t[2]),o=t[3];if(j&&n!==eT){var a={mark:y,prepend:"queue",attachTo:A,priority:g},s="function"==typeof p?p():p;s&&(a.csp={nonce:s});var l=(0,u.hq)(n,r,a);l[v]=I.instanceId,l.setAttribute(b,N),Object.keys(o).forEach(function(e){(0,u.hq)(eI(o[e]),"_effect-".concat(e),a)})}}),P=(0,i.Z)(R,3),M=P[0],L=P[1],D=P[2];return function(e){var t,n;return t=T&&!j&&x?d.createElement("style",(0,Q.Z)({},(n={},(0,a.Z)(n,b,L),(0,a.Z)(n,y,D),n),{dangerouslySetInnerHTML:{__html:M}})):d.createElement(eR,null),d.createElement(d.Fragment,null,t,e)}}var eL="cssVar",eD=function(e,t){var n=e.key,r=e.prefix,o=e.unitless,a=e.ignore,l=e.token,c=e.scope,p=void 0===c?"":c,f=(0,d.useContext)(E),m=f.cache.instanceId,g=f.container,h=l._tokenKey,S=[].concat((0,s.Z)(e.path),[n,p,h]);return W(eL,S,function(){var e=Z(t(),n,{prefix:r,unitless:o,ignore:a,scope:p}),s=(0,i.Z)(e,2),l=s[0],c=s[1],u=e_(S,c);return[l,c,u,n]},function(e){var t=(0,i.Z)(e,3)[2];j&&(0,u.jL)(t,{mark:y})},function(e){var t=(0,i.Z)(e,3),r=t[1],o=t[2];if(r){var a=(0,u.hq)(r,o,{mark:y,prepend:"queue",attachTo:g,priority:-999});a[v]=m,a.setAttribute(b,n)}})};o={},(0,a.Z)(o,eP,function(e,t,n){var r=(0,i.Z)(e,6),o=r[0],a=r[1],s=r[2],l=r[3],c=r[4],u=r[5],d=(n||{}).plain;if(c)return null;var p=o,f={"data-rc-order":"prependQueue","data-rc-priority":"".concat(u)};return p=B(o,a,s,f,d),l&&Object.keys(l).forEach(function(e){if(!t[e]){t[e]=!0;var n=eI(l[e]);p+=B(n,a,"_effect-".concat(e),f,d)}}),[u,s,p]}),(0,a.Z)(o,K,function(e,t,n){var r=(0,i.Z)(e,5),o=r[2],a=r[3],s=r[4],l=(n||{}).plain;if(!a)return null;var c=o._tokenKey,u=B(a,s,c,{"data-rc-order":"prependQueue","data-rc-priority":"".concat(-999)},l);return[-999,c,u]}),(0,a.Z)(o,eL,function(e,t,n){var r=(0,i.Z)(e,4),o=r[1],a=r[2],s=r[3],l=(n||{}).plain;if(!o)return null;var c=B(o,s,a,{"data-rc-order":"prependQueue","data-rc-priority":"".concat(-999)},l);return[-999,a,c]});var ej=function(){function e(t,n){(0,f.Z)(this,e),(0,a.Z)(this,"name",void 0),(0,a.Z)(this,"style",void 0),(0,a.Z)(this,"_keyframe",!0),this.name=t,this.style=n}return(0,m.Z)(e,[{key:"getName",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return e?"".concat(e,"-").concat(this.name):this.name}}]),e}();function eF(e){return e.notSplit=!0,e}eF(["borderTop","borderBottom"]),eF(["borderTop"]),eF(["borderBottom"]),eF(["borderLeft","borderRight"]),eF(["borderLeft"]),eF(["borderRight"])},60688:function(e,t,n){n.d(t,{Z:function(){return k}});var r=n(14749),o=n(80406),a=n(50833),i=n(6787),s=n(64090),l=n(16480),c=n.n(l),u=n(12215),d=n(67689),p=n(5239),f=n(6976),m=n(24050),g=n(74687),h=n(53850);function b(e){return"object"===(0,f.Z)(e)&&"string"==typeof e.name&&"string"==typeof e.theme&&("object"===(0,f.Z)(e.icon)||"function"==typeof e.icon)}function y(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object.keys(e).reduce(function(t,n){var r=e[n];return"class"===n?(t.className=r,delete t.class):(delete t[n],t[n.replace(/-(.)/g,function(e,t){return t.toUpperCase()})]=r),t},{})}function v(e){return(0,u.R_)(e)[0]}function E(e){return e?Array.isArray(e)?e:[e]:[]}var S=function(e){var t=(0,s.useContext)(d.Z),n=t.csp,r=t.prefixCls,o="\n.anticon {\n display: inline-block;\n color: inherit;\n font-style: normal;\n line-height: 0;\n text-align: center;\n text-transform: none;\n vertical-align: -0.125em;\n text-rendering: optimizeLegibility;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n\n.anticon > * {\n line-height: 1;\n}\n\n.anticon svg {\n display: inline-block;\n}\n\n.anticon::before {\n display: none;\n}\n\n.anticon .anticon-icon {\n display: block;\n}\n\n.anticon[tabindex] {\n cursor: pointer;\n}\n\n.anticon-spin::before,\n.anticon-spin {\n display: inline-block;\n -webkit-animation: loadingCircle 1s infinite linear;\n animation: loadingCircle 1s infinite linear;\n}\n\n@-webkit-keyframes loadingCircle {\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n\n@keyframes loadingCircle {\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n";r&&(o=o.replace(/anticon/g,r)),(0,s.useEffect)(function(){var t=e.current,r=(0,g.A)(t);(0,m.hq)(o,"@ant-design-icons",{prepend:!0,csp:n,attachTo:r})},[])},w=["icon","className","onClick","style","primaryColor","secondaryColor"],x={primaryColor:"#333",secondaryColor:"#E6E6E6",calculated:!1},O=function(e){var t,n,r=e.icon,o=e.className,a=e.onClick,l=e.style,c=e.primaryColor,u=e.secondaryColor,d=(0,i.Z)(e,w),f=s.useRef(),m=x;if(c&&(m={primaryColor:c,secondaryColor:u||v(c)}),S(f),t=b(r),n="icon should be icon definiton, but got ".concat(r),(0,h.ZP)(t,"[@ant-design/icons] ".concat(n)),!b(r))return null;var g=r;return g&&"function"==typeof g.icon&&(g=(0,p.Z)((0,p.Z)({},g),{},{icon:g.icon(m.primaryColor,m.secondaryColor)})),function e(t,n,r){return r?s.createElement(t.tag,(0,p.Z)((0,p.Z)({key:n},y(t.attrs)),r),(t.children||[]).map(function(r,o){return e(r,"".concat(n,"-").concat(t.tag,"-").concat(o))})):s.createElement(t.tag,(0,p.Z)({key:n},y(t.attrs)),(t.children||[]).map(function(r,o){return e(r,"".concat(n,"-").concat(t.tag,"-").concat(o))}))}(g.icon,"svg-".concat(g.name),(0,p.Z)((0,p.Z)({className:o,onClick:a,style:l,"data-icon":g.name,width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},d),{},{ref:f}))};function A(e){var t=E(e),n=(0,o.Z)(t,2),r=n[0],a=n[1];return O.setTwoToneColors({primaryColor:r,secondaryColor:a})}O.displayName="IconReact",O.getTwoToneColors=function(){return(0,p.Z)({},x)},O.setTwoToneColors=function(e){var t=e.primaryColor,n=e.secondaryColor;x.primaryColor=t,x.secondaryColor=n||v(t),x.calculated=!!n};var T=["className","icon","spin","rotate","tabIndex","onClick","twoToneColor"];A(u.iN.primary);var C=s.forwardRef(function(e,t){var n,l=e.className,u=e.icon,p=e.spin,f=e.rotate,m=e.tabIndex,g=e.onClick,h=e.twoToneColor,b=(0,i.Z)(e,T),y=s.useContext(d.Z),v=y.prefixCls,S=void 0===v?"anticon":v,w=y.rootClassName,x=c()(w,S,(n={},(0,a.Z)(n,"".concat(S,"-").concat(u.name),!!u.name),(0,a.Z)(n,"".concat(S,"-spin"),!!p||"loading"===u.name),n),l),A=m;void 0===A&&g&&(A=-1);var C=E(h),k=(0,o.Z)(C,2),I=k[0],N=k[1];return s.createElement("span",(0,r.Z)({role:"img","aria-label":u.name},b,{ref:t,tabIndex:A,onClick:g,className:x}),s.createElement(O,{icon:u,primaryColor:I,secondaryColor:N,style:f?{msTransform:"rotate(".concat(f,"deg)"),transform:"rotate(".concat(f,"deg)")}:void 0}))});C.displayName="AntdIcon",C.getTwoToneColor=function(){var e=O.getTwoToneColors();return e.calculated?[e.primaryColor,e.secondaryColor]:e.primaryColor},C.setTwoToneColor=A;var k=C},67689:function(e,t,n){var r=(0,n(64090).createContext)({});t.Z=r},99537:function(e,t,n){n.d(t,{Z:function(){return s}});var r=n(14749),o=n(64090),a={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"},i=n(60688),s=o.forwardRef(function(e,t){return o.createElement(i.Z,(0,r.Z)({},e,{ref:t,icon:a}))})},77136:function(e,t,n){n.d(t,{Z:function(){return s}});var r=n(14749),o=n(64090),a={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"},i=n(60688),s=o.forwardRef(function(e,t){return o.createElement(i.Z,(0,r.Z)({},e,{ref:t,icon:a}))})},81303:function(e,t,n){n.d(t,{Z:function(){return s}});var r=n(14749),o=n(64090),a={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"},i=n(60688),s=o.forwardRef(function(e,t){return o.createElement(i.Z,(0,r.Z)({},e,{ref:t,icon:a}))})},20383:function(e,t,n){n.d(t,{Z:function(){return s}});var r=n(14749),o=n(64090),a={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"},i=n(60688),s=o.forwardRef(function(e,t){return o.createElement(i.Z,(0,r.Z)({},e,{ref:t,icon:a}))})},20653:function(e,t,n){n.d(t,{Z:function(){return s}});var r=n(14749),o=n(64090),a={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"},i=n(60688),s=o.forwardRef(function(e,t){return o.createElement(i.Z,(0,r.Z)({},e,{ref:t,icon:a}))})},40388:function(e,t,n){n.d(t,{Z:function(){return s}});var r=n(14749),o=n(64090),a={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"},i=n(60688),s=o.forwardRef(function(e,t){return o.createElement(i.Z,(0,r.Z)({},e,{ref:t,icon:a}))})},66155:function(e,t,n){n.d(t,{Z:function(){return s}});var r=n(14749),o=n(64090),a={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"},i=n(60688),s=o.forwardRef(function(e,t){return o.createElement(i.Z,(0,r.Z)({},e,{ref:t,icon:a}))})},96871:function(e,t,n){n.d(t,{Z:function(){return s}});var r=n(14749),o=n(64090),a={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"},i=n(60688),s=o.forwardRef(function(e,t){return o.createElement(i.Z,(0,r.Z)({},e,{ref:t,icon:a}))})},41785:function(e,t,n){n.d(t,{T6:function(){return p},VD:function(){return f},WE:function(){return c},Yt:function(){return m},lC:function(){return a},py:function(){return l},rW:function(){return o},s:function(){return d},ve:function(){return s},vq:function(){return u}});var r=n(27974);function o(e,t,n){return{r:255*(0,r.sh)(e,255),g:255*(0,r.sh)(t,255),b:255*(0,r.sh)(n,255)}}function a(e,t,n){var o=Math.max(e=(0,r.sh)(e,255),t=(0,r.sh)(t,255),n=(0,r.sh)(n,255)),a=Math.min(e,t,n),i=0,s=0,l=(o+a)/2;if(o===a)s=0,i=0;else{var c=o-a;switch(s=l>.5?c/(2-o-a):c/(o+a),o){case e:i=(t-n)/c+(t1&&(n-=1),n<1/6)?e+6*n*(t-e):n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function s(e,t,n){if(e=(0,r.sh)(e,360),t=(0,r.sh)(t,100),n=(0,r.sh)(n,100),0===t)a=n,s=n,o=n;else{var o,a,s,l=n<.5?n*(1+t):n+t-n*t,c=2*n-l;o=i(c,l,e+1/3),a=i(c,l,e),s=i(c,l,e-1/3)}return{r:255*o,g:255*a,b:255*s}}function l(e,t,n){var o=Math.max(e=(0,r.sh)(e,255),t=(0,r.sh)(t,255),n=(0,r.sh)(n,255)),a=Math.min(e,t,n),i=0,s=o-a;if(o===a)i=0;else{switch(o){case e:i=(t-n)/s+(t>16,g:(65280&e)>>8,b:255&e}}},6564:function(e,t,n){n.d(t,{R:function(){return r}});var r={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"}},76991:function(e,t,n){n.d(t,{uA:function(){return i}});var r=n(41785),o=n(6564),a=n(27974);function i(e){var t={r:0,g:0,b:0},n=1,i=null,s=null,l=null,c=!1,p=!1;return"string"==typeof e&&(e=function(e){if(0===(e=e.trim().toLowerCase()).length)return!1;var t=!1;if(o.R[e])e=o.R[e],t=!0;else if("transparent"===e)return{r:0,g:0,b:0,a:0,format:"name"};var n=u.rgb.exec(e);return n?{r:n[1],g:n[2],b:n[3]}:(n=u.rgba.exec(e))?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=u.hsl.exec(e))?{h:n[1],s:n[2],l:n[3]}:(n=u.hsla.exec(e))?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=u.hsv.exec(e))?{h:n[1],s:n[2],v:n[3]}:(n=u.hsva.exec(e))?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=u.hex8.exec(e))?{r:(0,r.VD)(n[1]),g:(0,r.VD)(n[2]),b:(0,r.VD)(n[3]),a:(0,r.T6)(n[4]),format:t?"name":"hex8"}:(n=u.hex6.exec(e))?{r:(0,r.VD)(n[1]),g:(0,r.VD)(n[2]),b:(0,r.VD)(n[3]),format:t?"name":"hex"}:(n=u.hex4.exec(e))?{r:(0,r.VD)(n[1]+n[1]),g:(0,r.VD)(n[2]+n[2]),b:(0,r.VD)(n[3]+n[3]),a:(0,r.T6)(n[4]+n[4]),format:t?"name":"hex8"}:!!(n=u.hex3.exec(e))&&{r:(0,r.VD)(n[1]+n[1]),g:(0,r.VD)(n[2]+n[2]),b:(0,r.VD)(n[3]+n[3]),format:t?"name":"hex"}}(e)),"object"==typeof e&&(d(e.r)&&d(e.g)&&d(e.b)?(t=(0,r.rW)(e.r,e.g,e.b),c=!0,p="%"===String(e.r).substr(-1)?"prgb":"rgb"):d(e.h)&&d(e.s)&&d(e.v)?(i=(0,a.JX)(e.s),s=(0,a.JX)(e.v),t=(0,r.WE)(e.h,i,s),c=!0,p="hsv"):d(e.h)&&d(e.s)&&d(e.l)&&(i=(0,a.JX)(e.s),l=(0,a.JX)(e.l),t=(0,r.ve)(e.h,i,l),c=!0,p="hsl"),Object.prototype.hasOwnProperty.call(e,"a")&&(n=e.a)),n=(0,a.Yq)(n),{ok:c,format:e.format||p,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:n}}var s="(?:".concat("[-\\+]?\\d*\\.\\d+%?",")|(?:").concat("[-\\+]?\\d+%?",")"),l="[\\s|\\(]+(".concat(s,")[,|\\s]+(").concat(s,")[,|\\s]+(").concat(s,")\\s*\\)?"),c="[\\s|\\(]+(".concat(s,")[,|\\s]+(").concat(s,")[,|\\s]+(").concat(s,")[,|\\s]+(").concat(s,")\\s*\\)?"),u={CSS_UNIT:new RegExp(s),rgb:RegExp("rgb"+l),rgba:RegExp("rgba"+c),hsl:RegExp("hsl"+l),hsla:RegExp("hsla"+c),hsv:RegExp("hsv"+l),hsva:RegExp("hsva"+c),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function d(e){return!!u.CSS_UNIT.exec(String(e))}},6336:function(e,t,n){n.d(t,{C:function(){return s}});var r=n(41785),o=n(6564),a=n(76991),i=n(27974),s=function(){function e(t,n){if(void 0===t&&(t=""),void 0===n&&(n={}),t instanceof e)return t;"number"==typeof t&&(t=(0,r.Yt)(t)),this.originalInput=t;var o,i=(0,a.uA)(t);this.originalInput=t,this.r=i.r,this.g=i.g,this.b=i.b,this.a=i.a,this.roundA=Math.round(100*this.a)/100,this.format=null!==(o=n.format)&&void 0!==o?o:i.format,this.gradientType=n.gradientType,this.r<1&&(this.r=Math.round(this.r)),this.g<1&&(this.g=Math.round(this.g)),this.b<1&&(this.b=Math.round(this.b)),this.isValid=i.ok}return e.prototype.isDark=function(){return 128>this.getBrightness()},e.prototype.isLight=function(){return!this.isDark()},e.prototype.getBrightness=function(){var e=this.toRgb();return(299*e.r+587*e.g+114*e.b)/1e3},e.prototype.getLuminance=function(){var e=this.toRgb(),t=e.r/255,n=e.g/255,r=e.b/255;return .2126*(t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4))+.7152*(n<=.03928?n/12.92:Math.pow((n+.055)/1.055,2.4))+.0722*(r<=.03928?r/12.92:Math.pow((r+.055)/1.055,2.4))},e.prototype.getAlpha=function(){return this.a},e.prototype.setAlpha=function(e){return this.a=(0,i.Yq)(e),this.roundA=Math.round(100*this.a)/100,this},e.prototype.isMonochrome=function(){return 0===this.toHsl().s},e.prototype.toHsv=function(){var e=(0,r.py)(this.r,this.g,this.b);return{h:360*e.h,s:e.s,v:e.v,a:this.a}},e.prototype.toHsvString=function(){var e=(0,r.py)(this.r,this.g,this.b),t=Math.round(360*e.h),n=Math.round(100*e.s),o=Math.round(100*e.v);return 1===this.a?"hsv(".concat(t,", ").concat(n,"%, ").concat(o,"%)"):"hsva(".concat(t,", ").concat(n,"%, ").concat(o,"%, ").concat(this.roundA,")")},e.prototype.toHsl=function(){var e=(0,r.lC)(this.r,this.g,this.b);return{h:360*e.h,s:e.s,l:e.l,a:this.a}},e.prototype.toHslString=function(){var e=(0,r.lC)(this.r,this.g,this.b),t=Math.round(360*e.h),n=Math.round(100*e.s),o=Math.round(100*e.l);return 1===this.a?"hsl(".concat(t,", ").concat(n,"%, ").concat(o,"%)"):"hsla(".concat(t,", ").concat(n,"%, ").concat(o,"%, ").concat(this.roundA,")")},e.prototype.toHex=function(e){return void 0===e&&(e=!1),(0,r.vq)(this.r,this.g,this.b,e)},e.prototype.toHexString=function(e){return void 0===e&&(e=!1),"#"+this.toHex(e)},e.prototype.toHex8=function(e){return void 0===e&&(e=!1),(0,r.s)(this.r,this.g,this.b,this.a,e)},e.prototype.toHex8String=function(e){return void 0===e&&(e=!1),"#"+this.toHex8(e)},e.prototype.toHexShortString=function(e){return void 0===e&&(e=!1),1===this.a?this.toHexString(e):this.toHex8String(e)},e.prototype.toRgb=function(){return{r:Math.round(this.r),g:Math.round(this.g),b:Math.round(this.b),a:this.a}},e.prototype.toRgbString=function(){var e=Math.round(this.r),t=Math.round(this.g),n=Math.round(this.b);return 1===this.a?"rgb(".concat(e,", ").concat(t,", ").concat(n,")"):"rgba(".concat(e,", ").concat(t,", ").concat(n,", ").concat(this.roundA,")")},e.prototype.toPercentageRgb=function(){var e=function(e){return"".concat(Math.round(100*(0,i.sh)(e,255)),"%")};return{r:e(this.r),g:e(this.g),b:e(this.b),a:this.a}},e.prototype.toPercentageRgbString=function(){var e=function(e){return Math.round(100*(0,i.sh)(e,255))};return 1===this.a?"rgb(".concat(e(this.r),"%, ").concat(e(this.g),"%, ").concat(e(this.b),"%)"):"rgba(".concat(e(this.r),"%, ").concat(e(this.g),"%, ").concat(e(this.b),"%, ").concat(this.roundA,")")},e.prototype.toName=function(){if(0===this.a)return"transparent";if(this.a<1)return!1;for(var e="#"+(0,r.vq)(this.r,this.g,this.b,!1),t=0,n=Object.entries(o.R);t=0;return!t&&r&&(e.startsWith("hex")||"name"===e)?"name"===e&&0===this.a?this.toName():this.toRgbString():("rgb"===e&&(n=this.toRgbString()),"prgb"===e&&(n=this.toPercentageRgbString()),("hex"===e||"hex6"===e)&&(n=this.toHexString()),"hex3"===e&&(n=this.toHexString(!0)),"hex4"===e&&(n=this.toHex8String(!0)),"hex8"===e&&(n=this.toHex8String()),"name"===e&&(n=this.toName()),"hsl"===e&&(n=this.toHslString()),"hsv"===e&&(n=this.toHsvString()),n||this.toHexString())},e.prototype.toNumber=function(){return(Math.round(this.r)<<16)+(Math.round(this.g)<<8)+Math.round(this.b)},e.prototype.clone=function(){return new e(this.toString())},e.prototype.lighten=function(t){void 0===t&&(t=10);var n=this.toHsl();return n.l+=t/100,n.l=(0,i.V2)(n.l),new e(n)},e.prototype.brighten=function(t){void 0===t&&(t=10);var n=this.toRgb();return n.r=Math.max(0,Math.min(255,n.r-Math.round(-(t/100*255)))),n.g=Math.max(0,Math.min(255,n.g-Math.round(-(t/100*255)))),n.b=Math.max(0,Math.min(255,n.b-Math.round(-(t/100*255)))),new e(n)},e.prototype.darken=function(t){void 0===t&&(t=10);var n=this.toHsl();return n.l-=t/100,n.l=(0,i.V2)(n.l),new e(n)},e.prototype.tint=function(e){return void 0===e&&(e=10),this.mix("white",e)},e.prototype.shade=function(e){return void 0===e&&(e=10),this.mix("black",e)},e.prototype.desaturate=function(t){void 0===t&&(t=10);var n=this.toHsl();return n.s-=t/100,n.s=(0,i.V2)(n.s),new e(n)},e.prototype.saturate=function(t){void 0===t&&(t=10);var n=this.toHsl();return n.s+=t/100,n.s=(0,i.V2)(n.s),new e(n)},e.prototype.greyscale=function(){return this.desaturate(100)},e.prototype.spin=function(t){var n=this.toHsl(),r=(n.h+t)%360;return n.h=r<0?360+r:r,new e(n)},e.prototype.mix=function(t,n){void 0===n&&(n=50);var r=this.toRgb(),o=new e(t).toRgb(),a=n/100;return new e({r:(o.r-r.r)*a+r.r,g:(o.g-r.g)*a+r.g,b:(o.b-r.b)*a+r.b,a:(o.a-r.a)*a+r.a})},e.prototype.analogous=function(t,n){void 0===t&&(t=6),void 0===n&&(n=30);var r=this.toHsl(),o=360/n,a=[this];for(r.h=(r.h-(o*t>>1)+720)%360;--t;)r.h=(r.h+o)%360,a.push(new e(r));return a},e.prototype.complement=function(){var t=this.toHsl();return t.h=(t.h+180)%360,new e(t)},e.prototype.monochromatic=function(t){void 0===t&&(t=6);for(var n=this.toHsv(),r=n.h,o=n.s,a=n.v,i=[],s=1/t;t--;)i.push(new e({h:r,s:o,v:a})),a=(a+s)%1;return i},e.prototype.splitcomplement=function(){var t=this.toHsl(),n=t.h;return[this,new e({h:(n+72)%360,s:t.s,l:t.l}),new e({h:(n+216)%360,s:t.s,l:t.l})]},e.prototype.onBackground=function(t){var n=this.toRgb(),r=new e(t).toRgb(),o=n.a+r.a*(1-n.a);return new e({r:(n.r*n.a+r.r*r.a*(1-n.a))/o,g:(n.g*n.a+r.g*r.a*(1-n.a))/o,b:(n.b*n.a+r.b*r.a*(1-n.a))/o,a:o})},e.prototype.triad=function(){return this.polyad(3)},e.prototype.tetrad=function(){return this.polyad(4)},e.prototype.polyad=function(t){for(var n=this.toHsl(),r=n.h,o=[this],a=360/t,i=1;iMath.abs(e-t))?1:e=360===t?(e<0?e%t+t:e%t)/parseFloat(String(t)):e%t/parseFloat(String(t))}function o(e){return Math.min(1,Math.max(0,e))}function a(e){return(isNaN(e=parseFloat(e))||e<0||e>1)&&(e=1),e}function i(e){return e<=1?"".concat(100*Number(e),"%"):e}function s(e){return 1===e.length?"0"+e:String(e)}n.d(t,{FZ:function(){return s},JX:function(){return i},V2:function(){return o},Yq:function(){return a},sh:function(){return r}})},88804:function(e,t,n){n.d(t,{Z:function(){return v}});var r,o=n(80406),a=n(64090),i=n(89542),s=n(22127);n(53850);var l=n(74084),c=a.createContext(null),u=n(63787),d=n(24800),p=[],f=n(24050);function m(e){var t=e.match(/^(.*)px$/),n=Number(null==t?void 0:t[1]);return Number.isNaN(n)?function(e){if("undefined"==typeof document)return 0;if(void 0===r){var t=document.createElement("div");t.style.width="100%",t.style.height="200px";var n=document.createElement("div"),o=n.style;o.position="absolute",o.top="0",o.left="0",o.pointerEvents="none",o.visibility="hidden",o.width="200px",o.height="150px",o.overflow="hidden",n.appendChild(t),document.body.appendChild(n);var a=t.offsetWidth;n.style.overflow="scroll";var i=t.offsetWidth;a===i&&(i=n.clientWidth),document.body.removeChild(n),r=a-i}return r}():n}var g="rc-util-locker-".concat(Date.now()),h=0,b=!1,y=function(e){return!1!==e&&((0,s.Z)()&&e?"string"==typeof e?document.querySelector(e):"function"==typeof e?e():e:null)},v=a.forwardRef(function(e,t){var n,r,v,E,S=e.open,w=e.autoLock,x=e.getContainer,O=(e.debug,e.autoDestroy),A=void 0===O||O,T=e.children,C=a.useState(S),k=(0,o.Z)(C,2),I=k[0],N=k[1],_=I||S;a.useEffect(function(){(A||S)&&N(S)},[S,A]);var R=a.useState(function(){return y(x)}),P=(0,o.Z)(R,2),M=P[0],L=P[1];a.useEffect(function(){var e=y(x);L(null!=e?e:null)});var D=function(e,t){var n=a.useState(function(){return(0,s.Z)()?document.createElement("div"):null}),r=(0,o.Z)(n,1)[0],i=a.useRef(!1),l=a.useContext(c),f=a.useState(p),m=(0,o.Z)(f,2),g=m[0],h=m[1],b=l||(i.current?void 0:function(e){h(function(t){return[e].concat((0,u.Z)(t))})});function y(){r.parentElement||document.body.appendChild(r),i.current=!0}function v(){var e;null===(e=r.parentElement)||void 0===e||e.removeChild(r),i.current=!1}return(0,d.Z)(function(){return e?l?l(y):y():v(),v},[e]),(0,d.Z)(function(){g.length&&(g.forEach(function(e){return e()}),h(p))},[g]),[r,b]}(_&&!M,0),j=(0,o.Z)(D,2),F=j[0],B=j[1],U=null!=M?M:F;n=!!(w&&S&&(0,s.Z)()&&(U===F||U===document.body)),r=a.useState(function(){return h+=1,"".concat(g,"_").concat(h)}),v=(0,o.Z)(r,1)[0],(0,d.Z)(function(){if(n){var e=function(e){if("undefined"==typeof document||!e||!(e instanceof Element))return{width:0,height:0};var t=getComputedStyle(e,"::-webkit-scrollbar"),n=t.width,r=t.height;return{width:m(n),height:m(r)}}(document.body).width,t=document.body.scrollHeight>(window.innerHeight||document.documentElement.clientHeight)&&window.innerWidth>document.body.offsetWidth;(0,f.hq)("\nhtml body {\n overflow-y: hidden;\n ".concat(t?"width: calc(100% - ".concat(e,"px);"):"","\n}"),v)}else(0,f.jL)(v);return function(){(0,f.jL)(v)}},[n,v]);var Z=null;T&&(0,l.Yr)(T)&&t&&(Z=T.ref);var z=(0,l.x1)(Z,t);if(!_||!(0,s.Z)()||void 0===M)return null;var H=!1===U||("boolean"==typeof E&&(b=E),b),G=T;return t&&(G=a.cloneElement(T,{ref:z})),a.createElement(c.Provider,{value:B},H?G:(0,i.createPortal)(G,U))})},44101:function(e,t,n){n.d(t,{Z:function(){return z}});var r=n(5239),o=n(80406),a=n(6787),i=n(88804),s=n(16480),l=n.n(s),c=n(46505),u=n(97472),d=n(74687),p=n(54811),f=n(91010),m=n(24800),g=n(76158),h=n(64090),b=n(14749),y=n(49367),v=n(74084);function E(e){var t=e.prefixCls,n=e.align,r=e.arrow,o=e.arrowPos,a=r||{},i=a.className,s=a.content,c=o.x,u=o.y,d=h.useRef();if(!n||!n.points)return null;var p={position:"absolute"};if(!1!==n.autoArrow){var f=n.points[0],m=n.points[1],g=f[0],b=f[1],y=m[0],v=m[1];g!==y&&["t","b"].includes(g)?"t"===g?p.top=0:p.bottom=0:p.top=void 0===u?0:u,b!==v&&["l","r"].includes(b)?"l"===b?p.left=0:p.right=0:p.left=void 0===c?0:c}return h.createElement("div",{ref:d,className:l()("".concat(t,"-arrow"),i),style:p},s)}function S(e){var t=e.prefixCls,n=e.open,r=e.zIndex,o=e.mask,a=e.motion;return o?h.createElement(y.ZP,(0,b.Z)({},a,{motionAppear:!0,visible:n,removeOnLeave:!0}),function(e){var n=e.className;return h.createElement("div",{style:{zIndex:r},className:l()("".concat(t,"-mask"),n)})}):null}var w=h.memo(function(e){return e.children},function(e,t){return t.cache}),x=h.forwardRef(function(e,t){var n=e.popup,a=e.className,i=e.prefixCls,s=e.style,u=e.target,d=e.onVisibleChanged,p=e.open,f=e.keepDom,g=e.fresh,x=e.onClick,O=e.mask,A=e.arrow,T=e.arrowPos,C=e.align,k=e.motion,I=e.maskMotion,N=e.forceRender,_=e.getPopupContainer,R=e.autoDestroy,P=e.portal,M=e.zIndex,L=e.onMouseEnter,D=e.onMouseLeave,j=e.onPointerEnter,F=e.ready,B=e.offsetX,U=e.offsetY,Z=e.offsetR,z=e.offsetB,H=e.onAlign,G=e.onPrepare,$=e.stretch,W=e.targetWidth,V=e.targetHeight,q="function"==typeof n?n():n,Y=p||f,K=(null==_?void 0:_.length)>0,X=h.useState(!_||!K),Q=(0,o.Z)(X,2),J=Q[0],ee=Q[1];if((0,m.Z)(function(){!J&&K&&u&&ee(!0)},[J,K,u]),!J)return null;var et="auto",en={left:"-1000vw",top:"-1000vh",right:et,bottom:et};if(F||!p){var er,eo=C.points,ea=C.dynamicInset||(null===(er=C._experimental)||void 0===er?void 0:er.dynamicInset),ei=ea&&"r"===eo[0][1],es=ea&&"b"===eo[0][0];ei?(en.right=Z,en.left=et):(en.left=B,en.right=et),es?(en.bottom=z,en.top=et):(en.top=U,en.bottom=et)}var el={};return $&&($.includes("height")&&V?el.height=V:$.includes("minHeight")&&V&&(el.minHeight=V),$.includes("width")&&W?el.width=W:$.includes("minWidth")&&W&&(el.minWidth=W)),p||(el.pointerEvents="none"),h.createElement(P,{open:N||Y,getContainer:_&&function(){return _(u)},autoDestroy:R},h.createElement(S,{prefixCls:i,open:p,zIndex:M,mask:O,motion:I}),h.createElement(c.Z,{onResize:H,disabled:!p},function(e){return h.createElement(y.ZP,(0,b.Z)({motionAppear:!0,motionEnter:!0,motionLeave:!0,removeOnLeave:!1,forceRender:N,leavedClassName:"".concat(i,"-hidden")},k,{onAppearPrepare:G,onEnterPrepare:G,visible:p,onVisibleChanged:function(e){var t;null==k||null===(t=k.onVisibleChanged)||void 0===t||t.call(k,e),d(e)}}),function(n,o){var c=n.className,u=n.style,d=l()(i,c,a);return h.createElement("div",{ref:(0,v.sQ)(e,t,o),className:d,style:(0,r.Z)((0,r.Z)((0,r.Z)((0,r.Z)({"--arrow-x":"".concat(T.x||0,"px"),"--arrow-y":"".concat(T.y||0,"px")},en),el),u),{},{boxSizing:"border-box",zIndex:M},s),onMouseEnter:L,onMouseLeave:D,onPointerEnter:j,onClick:x},A&&h.createElement(E,{prefixCls:i,arrow:A,arrowPos:T,align:C}),h.createElement(w,{cache:!p&&!g},q))})}))}),O=h.forwardRef(function(e,t){var n=e.children,r=e.getTriggerDOMNode,o=(0,v.Yr)(n),a=h.useCallback(function(e){(0,v.mH)(t,r?r(e):e)},[r]),i=(0,v.x1)(a,n.ref);return o?h.cloneElement(n,{ref:i}):n}),A=h.createContext(null);function T(e){return e?Array.isArray(e)?e:[e]:[]}var C=n(73193);function k(e,t,n,r){return t||(n?{motionName:"".concat(e,"-").concat(n)}:r?{motionName:r}:null)}function I(e){return e.ownerDocument.defaultView}function N(e){for(var t=[],n=null==e?void 0:e.parentElement,r=["hidden","scroll","clip","auto"];n;){var o=I(n).getComputedStyle(n);[o.overflowX,o.overflowY,o.overflow].some(function(e){return r.includes(e)})&&t.push(n),n=n.parentElement}return t}function _(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return Number.isNaN(e)?t:e}function R(e){return _(parseFloat(e),0)}function P(e,t){var n=(0,r.Z)({},e);return(t||[]).forEach(function(e){if(!(e instanceof HTMLBodyElement||e instanceof HTMLHtmlElement)){var t=I(e).getComputedStyle(e),r=t.overflow,o=t.overflowClipMargin,a=t.borderTopWidth,i=t.borderBottomWidth,s=t.borderLeftWidth,l=t.borderRightWidth,c=e.getBoundingClientRect(),u=e.offsetHeight,d=e.clientHeight,p=e.offsetWidth,f=e.clientWidth,m=R(a),g=R(i),h=R(s),b=R(l),y=_(Math.round(c.width/p*1e3)/1e3),v=_(Math.round(c.height/u*1e3)/1e3),E=m*v,S=h*y,w=0,x=0;if("clip"===r){var O=R(o);w=O*y,x=O*v}var A=c.x+S-w,T=c.y+E-x,C=A+c.width+2*w-S-b*y-(p-f-h-b)*y,k=T+c.height+2*x-E-g*v-(u-d-m-g)*v;n.left=Math.max(n.left,A),n.top=Math.max(n.top,T),n.right=Math.min(n.right,C),n.bottom=Math.min(n.bottom,k)}}),n}function M(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n="".concat(t),r=n.match(/^(.*)\%$/);return r?parseFloat(r[1])/100*e:parseFloat(n)}function L(e,t){var n=(0,o.Z)(t||[],2),r=n[0],a=n[1];return[M(e.width,r),M(e.height,a)]}function D(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return[e[0],e[1]]}function j(e,t){var n,r=t[0],o=t[1];return n="t"===r?e.y:"b"===r?e.y+e.height:e.y+e.height/2,{x:"l"===o?e.x:"r"===o?e.x+e.width:e.x+e.width/2,y:n}}function F(e,t){var n={t:"b",b:"t",l:"r",r:"l"};return e.map(function(e,r){return r===t?n[e]||"c":e}).join("")}var B=n(63787);n(53850);var U=n(19223),Z=["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"],z=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:i.Z;return h.forwardRef(function(t,n){var i,s,b,y,v,E,S,w,R,M,z,H,G,$,W,V,q,Y=t.prefixCls,K=void 0===Y?"rc-trigger-popup":Y,X=t.children,Q=t.action,J=t.showAction,ee=t.hideAction,et=t.popupVisible,en=t.defaultPopupVisible,er=t.onPopupVisibleChange,eo=t.afterPopupVisibleChange,ea=t.mouseEnterDelay,ei=t.mouseLeaveDelay,es=void 0===ei?.1:ei,el=t.focusDelay,ec=t.blurDelay,eu=t.mask,ed=t.maskClosable,ep=t.getPopupContainer,ef=t.forceRender,em=t.autoDestroy,eg=t.destroyPopupOnHide,eh=t.popup,eb=t.popupClassName,ey=t.popupStyle,ev=t.popupPlacement,eE=t.builtinPlacements,eS=void 0===eE?{}:eE,ew=t.popupAlign,ex=t.zIndex,eO=t.stretch,eA=t.getPopupClassNameFromAlign,eT=t.fresh,eC=t.alignPoint,ek=t.onPopupClick,eI=t.onPopupAlign,eN=t.arrow,e_=t.popupMotion,eR=t.maskMotion,eP=t.popupTransitionName,eM=t.popupAnimation,eL=t.maskTransitionName,eD=t.maskAnimation,ej=t.className,eF=t.getTriggerDOMNode,eB=(0,a.Z)(t,Z),eU=h.useState(!1),eZ=(0,o.Z)(eU,2),ez=eZ[0],eH=eZ[1];(0,m.Z)(function(){eH((0,g.Z)())},[]);var eG=h.useRef({}),e$=h.useContext(A),eW=h.useMemo(function(){return{registerSubPopup:function(e,t){eG.current[e]=t,null==e$||e$.registerSubPopup(e,t)}}},[e$]),eV=(0,f.Z)(),eq=h.useState(null),eY=(0,o.Z)(eq,2),eK=eY[0],eX=eY[1],eQ=(0,p.Z)(function(e){(0,u.S)(e)&&eK!==e&&eX(e),null==e$||e$.registerSubPopup(eV,e)}),eJ=h.useState(null),e0=(0,o.Z)(eJ,2),e1=e0[0],e2=e0[1],e4=h.useRef(null),e3=(0,p.Z)(function(e){(0,u.S)(e)&&e1!==e&&(e2(e),e4.current=e)}),e6=h.Children.only(X),e5=(null==e6?void 0:e6.props)||{},e8={},e9=(0,p.Z)(function(e){var t,n;return(null==e1?void 0:e1.contains(e))||(null===(t=(0,d.A)(e1))||void 0===t?void 0:t.host)===e||e===e1||(null==eK?void 0:eK.contains(e))||(null===(n=(0,d.A)(eK))||void 0===n?void 0:n.host)===e||e===eK||Object.values(eG.current).some(function(t){return(null==t?void 0:t.contains(e))||e===t})}),e7=k(K,e_,eM,eP),te=k(K,eR,eD,eL),tt=h.useState(en||!1),tn=(0,o.Z)(tt,2),tr=tn[0],to=tn[1],ta=null!=et?et:tr,ti=(0,p.Z)(function(e){void 0===et&&to(e)});(0,m.Z)(function(){to(et||!1)},[et]);var ts=h.useRef(ta);ts.current=ta;var tl=h.useRef([]);tl.current=[];var tc=(0,p.Z)(function(e){var t;ti(e),(null!==(t=tl.current[tl.current.length-1])&&void 0!==t?t:ta)!==e&&(tl.current.push(e),null==er||er(e))}),tu=h.useRef(),td=function(){clearTimeout(tu.current)},tp=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;td(),0===t?tc(e):tu.current=setTimeout(function(){tc(e)},1e3*t)};h.useEffect(function(){return td},[]);var tf=h.useState(!1),tm=(0,o.Z)(tf,2),tg=tm[0],th=tm[1];(0,m.Z)(function(e){(!e||ta)&&th(!0)},[ta]);var tb=h.useState(null),ty=(0,o.Z)(tb,2),tv=ty[0],tE=ty[1],tS=h.useState([0,0]),tw=(0,o.Z)(tS,2),tx=tw[0],tO=tw[1],tA=function(e){tO([e.clientX,e.clientY])},tT=(i=eC?tx:e1,s=h.useState({ready:!1,offsetX:0,offsetY:0,offsetR:0,offsetB:0,arrowX:0,arrowY:0,scaleX:1,scaleY:1,align:eS[ev]||{}}),y=(b=(0,o.Z)(s,2))[0],v=b[1],E=h.useRef(0),S=h.useMemo(function(){return eK?N(eK):[]},[eK]),w=h.useRef({}),ta||(w.current={}),R=(0,p.Z)(function(){if(eK&&i&&ta){var e,t,n,a,s,l,c,d=eK.ownerDocument,p=I(eK).getComputedStyle(eK),f=p.width,m=p.height,g=p.position,h=eK.style.left,b=eK.style.top,y=eK.style.right,E=eK.style.bottom,x=eK.style.overflow,O=(0,r.Z)((0,r.Z)({},eS[ev]),ew),A=d.createElement("div");if(null===(e=eK.parentElement)||void 0===e||e.appendChild(A),A.style.left="".concat(eK.offsetLeft,"px"),A.style.top="".concat(eK.offsetTop,"px"),A.style.position=g,A.style.height="".concat(eK.offsetHeight,"px"),A.style.width="".concat(eK.offsetWidth,"px"),eK.style.left="0",eK.style.top="0",eK.style.right="auto",eK.style.bottom="auto",eK.style.overflow="hidden",Array.isArray(i))n={x:i[0],y:i[1],width:0,height:0};else{var T=i.getBoundingClientRect();n={x:T.x,y:T.y,width:T.width,height:T.height}}var k=eK.getBoundingClientRect(),N=d.documentElement,R=N.clientWidth,M=N.clientHeight,B=N.scrollWidth,U=N.scrollHeight,Z=N.scrollTop,z=N.scrollLeft,H=k.height,G=k.width,$=n.height,W=n.width,V=O.htmlRegion,q="visible",Y="visibleFirst";"scroll"!==V&&V!==Y&&(V=q);var K=V===Y,X=P({left:-z,top:-Z,right:B-z,bottom:U-Z},S),Q=P({left:0,top:0,right:R,bottom:M},S),J=V===q?Q:X,ee=K?Q:J;eK.style.left="auto",eK.style.top="auto",eK.style.right="0",eK.style.bottom="0";var et=eK.getBoundingClientRect();eK.style.left=h,eK.style.top=b,eK.style.right=y,eK.style.bottom=E,eK.style.overflow=x,null===(t=eK.parentElement)||void 0===t||t.removeChild(A);var en=_(Math.round(G/parseFloat(f)*1e3)/1e3),er=_(Math.round(H/parseFloat(m)*1e3)/1e3);if(!(0===en||0===er||(0,u.S)(i)&&!(0,C.Z)(i))){var eo=O.offset,ea=O.targetOffset,ei=L(k,eo),es=(0,o.Z)(ei,2),el=es[0],ec=es[1],eu=L(n,ea),ed=(0,o.Z)(eu,2),ep=ed[0],ef=ed[1];n.x-=ep,n.y-=ef;var em=O.points||[],eg=(0,o.Z)(em,2),eh=eg[0],eb=D(eg[1]),ey=D(eh),eE=j(n,eb),ex=j(k,ey),eO=(0,r.Z)({},O),eA=eE.x-ex.x+el,eT=eE.y-ex.y+ec,eC=tt(eA,eT),ek=tt(eA,eT,Q),eN=j(n,["t","l"]),e_=j(k,["t","l"]),eR=j(n,["b","r"]),eP=j(k,["b","r"]),eM=O.overflow||{},eL=eM.adjustX,eD=eM.adjustY,ej=eM.shiftX,eF=eM.shiftY,eB=function(e){return"boolean"==typeof e?e:e>=0};tn();var eU=eB(eD),eZ=ey[0]===eb[0];if(eU&&"t"===ey[0]&&(s>ee.bottom||w.current.bt)){var ez=eT;eZ?ez-=H-$:ez=eN.y-eP.y-ec;var eH=tt(eA,ez),eG=tt(eA,ez,Q);eH>eC||eH===eC&&(!K||eG>=ek)?(w.current.bt=!0,eT=ez,ec=-ec,eO.points=[F(ey,0),F(eb,0)]):w.current.bt=!1}if(eU&&"b"===ey[0]&&(aeC||eW===eC&&(!K||eV>=ek)?(w.current.tb=!0,eT=e$,ec=-ec,eO.points=[F(ey,0),F(eb,0)]):w.current.tb=!1}var eq=eB(eL),eY=ey[1]===eb[1];if(eq&&"l"===ey[1]&&(c>ee.right||w.current.rl)){var eX=eA;eY?eX-=G-W:eX=eN.x-eP.x-el;var eQ=tt(eX,eT),eJ=tt(eX,eT,Q);eQ>eC||eQ===eC&&(!K||eJ>=ek)?(w.current.rl=!0,eA=eX,el=-el,eO.points=[F(ey,1),F(eb,1)]):w.current.rl=!1}if(eq&&"r"===ey[1]&&(leC||e1===eC&&(!K||e2>=ek)?(w.current.lr=!0,eA=e0,el=-el,eO.points=[F(ey,1),F(eb,1)]):w.current.lr=!1}tn();var e4=!0===ej?0:ej;"number"==typeof e4&&(lQ.right&&(eA-=c-Q.right-el,n.x>Q.right-e4&&(eA+=n.x-Q.right+e4)));var e3=!0===eF?0:eF;"number"==typeof e3&&(aQ.bottom&&(eT-=s-Q.bottom-ec,n.y>Q.bottom-e3&&(eT+=n.y-Q.bottom+e3)));var e6=k.x+eA,e5=k.y+eT,e8=n.x,e9=n.y;null==eI||eI(eK,eO);var e7=et.right-k.x-(eA+k.width),te=et.bottom-k.y-(eT+k.height);v({ready:!0,offsetX:eA/en,offsetY:eT/er,offsetR:e7/en,offsetB:te/er,arrowX:((Math.max(e6,e8)+Math.min(e6+G,e8+W))/2-e6)/en,arrowY:((Math.max(e5,e9)+Math.min(e5+H,e9+$))/2-e5)/er,scaleX:en,scaleY:er,align:eO})}function tt(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:J,r=k.x+e,o=k.y+t,a=Math.max(r,n.left),i=Math.max(o,n.top);return Math.max(0,(Math.min(r+G,n.right)-a)*(Math.min(o+H,n.bottom)-i))}function tn(){s=(a=k.y+eT)+H,c=(l=k.x+eA)+G}}}),M=function(){v(function(e){return(0,r.Z)((0,r.Z)({},e),{},{ready:!1})})},(0,m.Z)(M,[ev]),(0,m.Z)(function(){ta||M()},[ta]),[y.ready,y.offsetX,y.offsetY,y.offsetR,y.offsetB,y.arrowX,y.arrowY,y.scaleX,y.scaleY,y.align,function(){E.current+=1;var e=E.current;Promise.resolve().then(function(){E.current===e&&R()})}]),tC=(0,o.Z)(tT,11),tk=tC[0],tI=tC[1],tN=tC[2],t_=tC[3],tR=tC[4],tP=tC[5],tM=tC[6],tL=tC[7],tD=tC[8],tj=tC[9],tF=tC[10],tB=(z=void 0===Q?"hover":Q,h.useMemo(function(){var e=T(null!=J?J:z),t=T(null!=ee?ee:z),n=new Set(e),r=new Set(t);return ez&&(n.has("hover")&&(n.delete("hover"),n.add("click")),r.has("hover")&&(r.delete("hover"),r.add("click"))),[n,r]},[ez,z,J,ee])),tU=(0,o.Z)(tB,2),tZ=tU[0],tz=tU[1],tH=tZ.has("click"),tG=tz.has("click")||tz.has("contextMenu"),t$=(0,p.Z)(function(){tg||tF()});H=function(){ts.current&&eC&&tG&&tp(!1)},(0,m.Z)(function(){if(ta&&e1&&eK){var e=N(e1),t=N(eK),n=I(eK),r=new Set([n].concat((0,B.Z)(e),(0,B.Z)(t)));function o(){t$(),H()}return r.forEach(function(e){e.addEventListener("scroll",o,{passive:!0})}),n.addEventListener("resize",o,{passive:!0}),t$(),function(){r.forEach(function(e){e.removeEventListener("scroll",o),n.removeEventListener("resize",o)})}}},[ta,e1,eK]),(0,m.Z)(function(){t$()},[tx,ev]),(0,m.Z)(function(){ta&&!(null!=eS&&eS[ev])&&t$()},[JSON.stringify(ew)]);var tW=h.useMemo(function(){var e=function(e,t,n,r){for(var o=n.points,a=Object.keys(e),i=0;i0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2?arguments[2]:void 0;return n?e[0]===t[0]:e[0]===t[0]&&e[1]===t[1]}(null===(s=e[l])||void 0===s?void 0:s.points,o,r))return"".concat(t,"-placement-").concat(l)}return""}(eS,K,tj,eC);return l()(e,null==eA?void 0:eA(tj))},[tj,eA,eS,K,eC]);h.useImperativeHandle(n,function(){return{nativeElement:e4.current,forceAlign:t$}});var tV=h.useState(0),tq=(0,o.Z)(tV,2),tY=tq[0],tK=tq[1],tX=h.useState(0),tQ=(0,o.Z)(tX,2),tJ=tQ[0],t0=tQ[1],t1=function(){if(eO&&e1){var e=e1.getBoundingClientRect();tK(e.width),t0(e.height)}};function t2(e,t,n,r){e8[e]=function(o){var a;null==r||r(o),tp(t,n);for(var i=arguments.length,s=Array(i>1?i-1:0),l=1;l1?n-1:0),o=1;o1?n-1:0),o=1;oaG(t,e()).base(t.base()),or.apply(t,arguments),t}},scaleOrdinal:function(){return oc},scalePoint:function(){return od},scalePow:function(){return ip},scaleQuantile:function(){return function e(){var t,n=[],r=[],o=[];function a(){var e=0,t=Math.max(1,r.length);for(o=Array(t-1);++e2&&void 0!==arguments[2]?arguments[2]:o4;if(!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return+n(e[0],0,e);if(t>=1)return+n(e[r-1],r-1,e);var r,o=(r-1)*t,a=Math.floor(o),i=+n(e[a],a,e);return i+(+n(e[a+1],a+1,e)-i)*(o-a)}}(n,e/t);return i}function i(e){return null==e||isNaN(e=+e)?t:r[o6(o,e)]}return i.invertExtent=function(e){var t=r.indexOf(e);return t<0?[NaN,NaN]:[t>0?o[t-1]:n[0],t=o?[a[o-1],r]:[a[t-1],a[t]]},s.unknown=function(e){return arguments.length&&(t=e),s},s.thresholds=function(){return a.slice()},s.copy=function(){return e().domain([n,r]).range(i).unknown(t)},or.apply(a3(s),arguments)}},scaleRadial:function(){return function e(){var t,n=aW(),r=[0,1],o=!1;function a(e){var r,a=Math.sign(r=n(e))*Math.sqrt(Math.abs(r));return isNaN(a)?t:o?Math.round(a):a}return a.invert=function(e){return n.invert(ig(e))},a.domain=function(e){return arguments.length?(n.domain(e),a):n.domain()},a.range=function(e){return arguments.length?(n.range((r=Array.from(e,aF)).map(ig)),a):r.slice()},a.rangeRound=function(e){return a.range(e).round(!0)},a.round=function(e){return arguments.length?(o=!!e,a):o},a.clamp=function(e){return arguments.length?(n.clamp(e),a):n.clamp()},a.unknown=function(e){return arguments.length?(t=e,a):t},a.copy=function(){return e(n.domain(),r).round(o).clamp(n.clamp()).unknown(t)},or.apply(a,arguments),a3(a)}},scaleSequential:function(){return function e(){var t=a3(ll()(aU));return t.copy=function(){return lc(t,e())},oo.apply(t,arguments)}},scaleSequentialLog:function(){return function e(){var t=io(ll()).domain([1,10]);return t.copy=function(){return lc(t,e()).base(t.base())},oo.apply(t,arguments)}},scaleSequentialPow:function(){return lu},scaleSequentialQuantile:function(){return function e(){var t=[],n=aU;function r(e){if(null!=e&&!isNaN(e=+e))return n((o6(t,e,1)-1)/(t.length-1))}return r.domain=function(e){if(!arguments.length)return t.slice();for(let n of(t=[],e))null==n||isNaN(n=+n)||t.push(n);return t.sort(oJ),r},r.interpolator=function(e){return arguments.length?(n=e,r):n},r.range=function(){return t.map((e,r)=>n(r/(t.length-1)))},r.quantiles=function(e){return Array.from({length:e+1},(n,r)=>(function(e,t,n){if(!(!(r=(e=Float64Array.from(function*(e,t){if(void 0===t)for(let t of e)null!=t&&(t=+t)>=t&&(yield t);else{let n=-1;for(let r of e)null!=(r=t(r,++n,e))&&(r=+r)>=r&&(yield r)}}(e,void 0))).length)||isNaN(t=+t))){if(t<=0||r<2)return ib(e);if(t>=1)return ih(e);var r,o=(r-1)*t,a=Math.floor(o),i=ih((function e(t,n){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1/0,a=arguments.length>4?arguments[4]:void 0;if(n=Math.floor(n),r=Math.floor(Math.max(0,r)),o=Math.floor(Math.min(t.length-1,o)),!(r<=n&&n<=o))return t;for(a=void 0===a?iy:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:oJ;if(e===oJ)return iy;if("function"!=typeof e)throw TypeError("compare is not a function");return(t,n)=>{let r=e(t,n);return r||0===r?r:(0===e(n,n))-(0===e(t,t))}}(a);o>r;){if(o-r>600){let i=o-r+1,s=n-r+1,l=Math.log(i),c=.5*Math.exp(2*l/3),u=.5*Math.sqrt(l*c*(i-c)/i)*(s-i/2<0?-1:1),d=Math.max(r,Math.floor(n-s*c/i+u)),p=Math.min(o,Math.floor(n+(i-s)*c/i+u));e(t,n,d,p,a)}let i=t[n],s=r,l=o;for(iv(t,r,n),a(t[o],i)>0&&iv(t,r,o);sa(t[s],i);)++s;for(;a(t[l],i)>0;)--l}0===a(t[r],i)?iv(t,r,l):iv(t,++l,o),l<=n&&(r=l+1),n<=l&&(o=l-1)}return t})(e,a).subarray(0,a+1));return i+(ib(e.subarray(a+1))-i)*(o-a)}})(t,r/e))},r.copy=function(){return e(n).domain(t)},oo.apply(r,arguments)}},scaleSequentialSqrt:function(){return ld},scaleSequentialSymlog:function(){return function e(){var t=is(ll());return t.copy=function(){return lc(t,e()).constant(t.constant())},oo.apply(t,arguments)}},scaleSqrt:function(){return im},scaleSymlog:function(){return function e(){var t=is(a$());return t.copy=function(){return aG(t,e()).constant(t.constant())},or.apply(t,arguments)}},scaleThreshold:function(){return function e(){var t,n=[.5],r=[0,1],o=1;function a(e){return null!=e&&e<=e?r[o6(n,e,0,o)]:t}return a.domain=function(e){return arguments.length?(o=Math.min((n=Array.from(e)).length,r.length-1),a):n.slice()},a.range=function(e){return arguments.length?(r=Array.from(e),o=Math.min(n.length,r.length-1),a):r.slice()},a.invertExtent=function(e){var t=r.indexOf(e);return[n[t-1],n[t]]},a.unknown=function(e){return arguments.length?(t=e,a):t},a.copy=function(){return e().domain(n).range(r).unknown(t)},or.apply(a,arguments)}},scaleTime:function(){return li},scaleUtc:function(){return ls},tickFormat:function(){return a4}});var A=n(69703),T=n(54942),C=n(2898),k=n(99250),I=n(65492),N=n(64090),_=function(){for(var e,t,n=0,r="",o=arguments.length;n0?1:-1},G=function(e){return D()(e)&&e.indexOf("%")===e.length-1},$=function(e){return z()(e)&&!F()(e)},W=function(e){return $(e)||D()(e)},V=0,q=function(e){var t=++V;return"".concat(e||"").concat(t)},Y=function(e,t){var n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,o=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(!$(e)&&!D()(e))return r;if(G(e)){var a=e.indexOf("%");n=t*parseFloat(e.slice(0,a))/100}else n=+e;return F()(n)&&(n=r),o&&n>t&&(n=t),n},K=function(e){if(!e)return null;var t=Object.keys(e);return t&&t.length?e[t[0]]:null},X=function(e){if(!Array.isArray(e))return!1;for(var t=e.length,n={},r=0;r2?n-2:0),o=2;o=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var ey={click:"onClick",mousedown:"onMouseDown",mouseup:"onMouseUp",mouseover:"onMouseOver",mousemove:"onMouseMove",mouseout:"onMouseOut",mouseenter:"onMouseEnter",mouseleave:"onMouseLeave",touchcancel:"onTouchCancel",touchend:"onTouchEnd",touchmove:"onTouchMove",touchstart:"onTouchStart"},ev=function(e){return"string"==typeof e?e:e?e.displayName||e.name||"Component":""},eE=null,eS=null,ew=function e(t){if(t===eE&&Array.isArray(eS))return eS;var n=[];return N.Children.forEach(t,function(t){en()(t)||((0,M.isFragment)(t)?n=n.concat(e(t.props.children)):n.push(t))}),eS=n,eE=t,n};function ex(e,t){var n=[],r=[];return r=Array.isArray(t)?t.map(function(e){return ev(e)}):[ev(t)],ew(e).forEach(function(e){var t=U()(e,"type.displayName")||U()(e,"type.name");-1!==r.indexOf(t)&&n.push(e)}),n}function eO(e,t){var n=ex(e,t);return n&&n[0]}var eA=function(e){if(!e||!e.props)return!1;var t=e.props,n=t.width,r=t.height;return!!$(n)&&!(n<=0)&&!!$(r)&&!(r<=0)},eT=["a","altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","ellipse","feBlend","feColormatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-url","foreignObject","g","glyph","glyphRef","hkern","image","line","lineGradient","marker","mask","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","radialGradient","rect","script","set","stop","style","svg","switch","symbol","text","textPath","title","tref","tspan","use","view","vkern"],eC=function(e,t,n,r){var o,a=null!==(o=null==ed?void 0:ed[r])&&void 0!==o?o:[];return!eo()(e)&&(r&&a.includes(t)||ec.includes(t))||n&&ep.includes(t)},ek=function(e,t,n){if(!e||"function"==typeof e||"boolean"==typeof e)return null;var r=e;if((0,N.isValidElement)(e)&&(r=e.props),!ei()(r))return null;var o={};return Object.keys(r).forEach(function(e){var a;eC(null===(a=r)||void 0===a?void 0:a[e],e,t,n)&&(o[e]=r[e])}),o},eI=function e(t,n){if(t===n)return!0;var r=N.Children.count(t);if(r!==N.Children.count(n))return!1;if(0===r)return!0;if(1===r)return eN(Array.isArray(t)?t[0]:t,Array.isArray(n)?n[0]:n);for(var o=0;o=0)n.push(e);else if(e){var a=ev(e.type),i=t[a]||{},s=i.handler,l=i.once;if(s&&(!l||!r[a])){var c=s(e,a,o);n.push(c),r[a]=!0}}}),n},eR=function(e){var t=e&&e.type;return t&&ey[t]?ey[t]:null};function eP(e){return(eP="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function eM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function eL(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=Array(t);n0&&(e=P()(e,h,{trailing:!0,leading:!1}));var t=new ResizeObserver(e),n=S.current.getBoundingClientRect();return T(n.width,n.height),t.observe(S.current),function(){t.disconnect()}},[T,h]);var C=(0,N.useMemo)(function(){var e=O.containerWidth,t=O.containerHeight;if(e<0||t<0)return null;ee(G(s)||G(c),"The width(%s) and height(%s) are both fixed numbers,\n maybe you don't need to use a ResponsiveContainer.",s,c),ee(!r||r>0,"The aspect(%s) must be greater than zero.",r);var n=G(s)?e:s,o=G(c)?t:c;r&&r>0&&(n?o=n/r:o&&(n=o*r),f&&o>f&&(o=f)),ee(n>0||o>0,"The width(%s) and height(%s) of chart should be greater than 0,\n please check the style of container, or the props width(%s) and height(%s),\n or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the\n height and width.",n,o,s,c,d,p,r);var a=!Array.isArray(m)&&(0,M.isElement)(m)&&ev(m.type).endsWith("Chart");return N.Children.map(m,function(e){return(0,M.isElement)(e)?(0,N.cloneElement)(e,eL({width:n,height:o},a?{style:eL({height:"100%",width:"100%",maxHeight:o,maxWidth:n},e.props.style)}:{})):e})},[r,m,c,f,p,d,O,s]);return N.createElement("div",{id:b?"".concat(b):void 0,className:_("recharts-responsive-container",y),style:eL(eL({},void 0===E?{}:E),{},{width:s,height:c,minWidth:d,minHeight:p,maxHeight:f}),ref:S},C)}),eF=n(1646),eB=n.n(eF),eU=n(97572),eZ=n.n(eU),ez=n(209),eH=n.n(ez),eG=n(72986),e$=n.n(eG);function eW(e,t){if(!e)throw Error("Invariant failed")}var eV=["children","width","height","viewBox","className","style","title","desc"];function eq(){return(eq=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,eV),u=o||{width:n,height:r,x:0,y:0},d=_("recharts-surface",a);return N.createElement("svg",eq({},ek(c,!0,"svg"),{className:d,width:n,height:r,style:i,viewBox:"".concat(u.x," ").concat(u.y," ").concat(u.width," ").concat(u.height)}),N.createElement("title",null,s),N.createElement("desc",null,l),t)}var eK=["children","className"];function eX(){return(eX=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,eK),a=_("recharts-layer",r);return N.createElement("g",eX({className:a},ek(o,!0),{ref:t}),n)});function eJ(e){return(eJ="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function e0(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n0;)if(!n.equals(e[r],t[r],r,r,e,t,n))return!1;return!0}function tc(e,t){return to(e.getTime(),t.getTime())}function tu(e,t,n){if(e.size!==t.size)return!1;for(var r,o,a={},i=e.entries(),s=0;(r=i.next())&&!r.done;){for(var l=t.entries(),c=!1,u=0;(o=l.next())&&!o.done;){var d=r.value,p=d[0],f=d[1],m=o.value,g=m[0],h=m[1];!c&&!a[u]&&(c=n.equals(p,g,s,u,e,t,n)&&n.equals(f,h,p,g,e,t,n))&&(a[u]=!0),u++}if(!c)return!1;s++}return!0}function td(e,t,n){var r,o=ts(e),a=o.length;if(ts(t).length!==a)return!1;for(;a-- >0;)if((r=o[a])===ta&&(e.$$typeof||t.$$typeof)&&e.$$typeof!==t.$$typeof||!tr(t,r)||!n.equals(e[r],t[r],r,r,e,t,n))return!1;return!0}function tp(e,t,n){var r,o,a,i=tn(e),s=i.length;if(tn(t).length!==s)return!1;for(;s-- >0;)if((r=i[s])===ta&&(e.$$typeof||t.$$typeof)&&e.$$typeof!==t.$$typeof||!tr(t,r)||!n.equals(e[r],t[r],r,r,e,t,n)||(o=ti(e,r),a=ti(t,r),(o||a)&&(!o||!a||o.configurable!==a.configurable||o.enumerable!==a.enumerable||o.writable!==a.writable)))return!1;return!0}function tf(e,t){return to(e.valueOf(),t.valueOf())}function tm(e,t){return e.source===t.source&&e.flags===t.flags}function tg(e,t,n){if(e.size!==t.size)return!1;for(var r,o,a={},i=e.values();(r=i.next())&&!r.done;){for(var s=t.values(),l=!1,c=0;(o=s.next())&&!o.done;)!l&&!a[c]&&(l=n.equals(r.value,o.value,r.value,o.value,e,t,n))&&(a[c]=!0),c++;if(!l)return!1}return!0}function th(e,t){var n=e.length;if(t.length!==n)return!1;for(;n-- >0;)if(e[n]!==t[n])return!1;return!0}var tb=Array.isArray,ty="function"==typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView:null,tv=Object.assign,tE=Object.prototype.toString.call.bind(Object.prototype.toString),tS=tw();function tw(e){void 0===e&&(e={});var t,n,r,o,a,i,s,l,c,u=e.circular,d=e.createInternalComparator,p=e.createState,f=e.strict,m=(n=(t=function(e){var t=e.circular,n=e.createCustomConfig,r=e.strict,o={areArraysEqual:r?tp:tl,areDatesEqual:tc,areMapsEqual:r?te(tu,tp):tu,areObjectsEqual:r?tp:td,arePrimitiveWrappersEqual:tf,areRegExpsEqual:tm,areSetsEqual:r?te(tg,tp):tg,areTypedArraysEqual:r?tp:th};if(n&&(o=tv({},o,n(o))),t){var a=tt(o.areArraysEqual),i=tt(o.areMapsEqual),s=tt(o.areObjectsEqual),l=tt(o.areSetsEqual);o=tv({},o,{areArraysEqual:a,areMapsEqual:i,areObjectsEqual:s,areSetsEqual:l})}return o}(e)).areArraysEqual,r=t.areDatesEqual,o=t.areMapsEqual,a=t.areObjectsEqual,i=t.arePrimitiveWrappersEqual,s=t.areRegExpsEqual,l=t.areSetsEqual,c=t.areTypedArraysEqual,function(e,t,u){if(e===t)return!0;if(null==e||null==t||"object"!=typeof e||"object"!=typeof t)return e!=e&&t!=t;var d=e.constructor;if(d!==t.constructor)return!1;if(d===Object)return a(e,t,u);if(tb(e))return n(e,t,u);if(null!=ty&&ty(e))return c(e,t,u);if(d===Date)return r(e,t,u);if(d===RegExp)return s(e,t,u);if(d===Map)return o(e,t,u);if(d===Set)return l(e,t,u);var p=tE(e);return"[object Date]"===p?r(e,t,u):"[object RegExp]"===p?s(e,t,u):"[object Map]"===p?o(e,t,u):"[object Set]"===p?l(e,t,u):"[object Object]"===p?"function"!=typeof e.then&&"function"!=typeof t.then&&a(e,t,u):"[object Arguments]"===p?a(e,t,u):("[object Boolean]"===p||"[object Number]"===p||"[object String]"===p)&&i(e,t,u)}),g=d?d(m):function(e,t,n,r,o,a,i){return m(e,t,i)};return function(e){var t=e.circular,n=e.comparator,r=e.createState,o=e.equals,a=e.strict;if(r)return function(e,i){var s=r(),l=s.cache;return n(e,i,{cache:void 0===l?t?new WeakMap:void 0:l,equals:o,meta:s.meta,strict:a})};if(t)return function(e,t){return n(e,t,{cache:new WeakMap,equals:o,meta:void 0,strict:a})};var i={cache:void 0,equals:o,meta:void 0,strict:a};return function(e,t){return n(e,t,i)}}({circular:void 0!==u&&u,comparator:m,createState:p,equals:g,strict:void 0!==f&&f})}function tx(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=-1;requestAnimationFrame(function r(o){if(n<0&&(n=o),o-n>t)e(o),n=-1;else{var a;a=r,"undefined"!=typeof requestAnimationFrame&&requestAnimationFrame(a)}})}function tO(e){return(tO="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function tA(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);n=0&&e<=1}),"[configBezier]: arguments should be x1, y1, x2, y2 of [0, 1] instead received %s",r);var p=tH(a,s),f=tH(i,l),m=(e=a,t=s,function(n){var r;return tz([].concat(function(e){if(Array.isArray(e))return tU(e)}(r=tZ(e,t).map(function(e,t){return e*t}).slice(1))||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(r)||tB(r)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),[0]),n)}),g=function(e){for(var t=e>1?1:e,n=t,r=0;r<8;++r){var o,a=p(n)-t,i=m(n);if(1e-4>Math.abs(a-t)||i<1e-4)break;n=(o=n-a/i)>1?1:o<0?0:o}return f(n)};return g.isStepper=!1,g},t$=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.stiff,n=void 0===t?100:t,r=e.damping,o=void 0===r?8:r,a=e.dt,i=void 0===a?17:a,s=function(e,t,r){var a=r+(-(e-t)*n-r*o)*i/1e3,s=r*i/1e3+e;return 1e-4>Math.abs(s-t)&&1e-4>Math.abs(a)?[t,0]:[s,a]};return s.isStepper=!0,s.dt=i,s},tW=function(){for(var e=arguments.length,t=Array(e),n=0;ne.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);n0?n[o-1]:r,p=c||Object.keys(l);if("function"==typeof s||"spring"===s)return[].concat(t6(e),[t.runJSAnimation.bind(t,{from:d.style,to:l,duration:a,easing:s}),a]);var f=tj(p,a,s),m=t9(t9(t9({},d.style),l),{},{transition:f});return[].concat(t6(e),[m,a,u]).filter(tP)},[i,Math.max(void 0===s?0:s,r)])),[e.onAnimationEnd]))}},{key:"runAnimation",value:function(e){if(!this.manager){var t,n,r;this.manager=(t=function(){return null},n=!1,r=function e(r){if(!n){if(Array.isArray(r)){if(!r.length)return;var o=function(e){if(Array.isArray(e))return e}(r)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(r)||function(e,t){if(e){if("string"==typeof e)return tA(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return tA(e,t)}}(r)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),a=o[0],i=o.slice(1);if("number"==typeof a){tx(e.bind(null,i),a);return}e(a),tx(e.bind(null,i));return}"object"===tO(r)&&t(r),"function"==typeof r&&r()}},{stop:function(){n=!0},start:function(e){n=!1,r(e)},subscribe:function(e){return t=e,function(){t=function(){return null}}}})}var o=e.begin,a=e.duration,i=e.attributeName,s=e.to,l=e.easing,c=e.onAnimationStart,u=e.onAnimationEnd,d=e.steps,p=e.children,f=this.manager;if(this.unSubscribe=f.subscribe(this.handleStyleChange),"function"==typeof l||"function"==typeof p||"spring"===l){this.runJSAnimation(e);return}if(d.length>1){this.runStepAnimation(e);return}var m=i?t7({},i,s):s,g=tj(Object.keys(m),a,l);f.start([c,o,t9(t9({},m),{},{transition:g}),a,u])}},{key:"render",value:function(){var e=this.props,t=e.children,n=(e.begin,e.duration),r=(e.attributeName,e.easing,e.isActive),o=(e.steps,e.from,e.to,e.canBegin,e.onAnimationEnd,e.shouldReAnimate,e.onAnimationReStart,function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,t3)),a=N.Children.count(t),i=tD(this.state.style);if("function"==typeof t)return t(i);if(!r||0===a||n<=0)return t;var s=function(e){var t=e.props,n=t.style,r=t.className;return(0,N.cloneElement)(e,t9(t9({},o),{},{style:t9(t9({},void 0===n?{}:n),i),className:r}))};return 1===a?s(N.Children.only(t)):N.createElement("div",null,N.Children.map(t,function(e){return s(e)}))}}],ne(a.prototype,n),r&&ne(a,r),Object.defineProperty(a,"prototype",{writable:!1}),a}(N.PureComponent);ni.displayName="Animate",ni.defaultProps={begin:0,duration:1e3,from:"",to:"",attributeName:"",easing:"ease",isActive:!0,canBegin:!0,steps:[],onAnimationEnd:function(){},onAnimationStart:function(){}},ni.propTypes={from:e5().oneOfType([e5().object,e5().string]),to:e5().oneOfType([e5().object,e5().string]),attributeName:e5().string,duration:e5().number,begin:e5().number,easing:e5().oneOfType([e5().string,e5().func]),steps:e5().arrayOf(e5().shape({duration:e5().number.isRequired,style:e5().object.isRequired,easing:e5().oneOfType([e5().oneOf(["ease","ease-in","ease-out","ease-in-out","linear"]),e5().func]),properties:e5().arrayOf("string"),onAnimationEnd:e5().func})),children:e5().oneOfType([e5().node,e5().func]),isActive:e5().bool,canBegin:e5().bool,onAnimationEnd:e5().func,shouldReAnimate:e5().bool,onAnimationStart:e5().func,onAnimationReStart:e5().func};var ns=n(42859),nl=["children","appearOptions","enterOptions","leaveOptions"];function nc(e){return(nc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function nu(){return(nu=Object.assign?Object.assign.bind():function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{},t=e.steps,n=e.duration;return t&&t.length?t.reduce(function(e,t){return e+(Number.isFinite(t.duration)&&t.duration>0?t.duration:0)},0):Number.isFinite(n)?n:0},nE=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&nm(e,t)}(a,e);var t,n,r,o=(t=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}(),function(){var e,n=nh(a);if(t){var r=nh(this).constructor;e=Reflect.construct(n,arguments,r)}else e=n.apply(this,arguments);return function(e,t){if(t&&("object"===nc(t)||"function"==typeof t))return t;if(void 0!==t)throw TypeError("Derived constructors may only return object or undefined");return ng(e)}(this,e)});function a(){var e;return!function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,a),nb(ng(e=o.call(this)),"handleEnter",function(t,n){var r=e.props,o=r.appearOptions,a=r.enterOptions;e.handleStyleActive(n?o:a)}),nb(ng(e),"handleExit",function(){var t=e.props.leaveOptions;e.handleStyleActive(t)}),e.state={isActive:!1},e}return n=[{key:"handleStyleActive",value:function(e){if(e){var t=e.onAnimationEnd?function(){e.onAnimationEnd()}:null;this.setState(np(np({},e),{},{onAnimationEnd:t,isActive:!0}))}}},{key:"parseTimeout",value:function(){var e=this.props,t=e.appearOptions,n=e.enterOptions,r=e.leaveOptions;return nv(t)+nv(n)+nv(r)}},{key:"render",value:function(){var e=this,t=this.props,n=t.children,r=(t.appearOptions,t.enterOptions,t.leaveOptions,function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(t,nl));return N.createElement(ns.Transition,nu({},r,{onEnter:this.handleEnter,onExit:this.handleExit,timeout:this.parseTimeout()}),function(){return N.createElement(ni,e.state,N.Children.only(n))})}}],nf(a.prototype,n),r&&nf(a,r),Object.defineProperty(a,"prototype",{writable:!1}),a}(N.Component);function nS(e){var t=e.component,n=e.children,r=e.appear,o=e.enter,a=e.leave;return N.createElement(ns.TransitionGroup,{component:t},N.Children.map(n,function(e,t){return N.createElement(nE,{appearOptions:r,enterOptions:o,leaveOptions:a,key:"child-".concat(t)},e)}))}function nw(e){return(nw="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function nx(e,t,n){var r;return(r=function(e,t){if("object"!==nw(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==nw(r))return r;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(t,"string"),(t="symbol"===nw(r)?r:String(r))in e)?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}nE.propTypes={appearOptions:e5().object,enterOptions:e5().object,leaveOptions:e5().object,children:e5().element},nS.propTypes={appear:e5().object,enter:e5().object,leave:e5().object,children:e5().oneOfType([e5().array,e5().element]),component:e5().any},nS.defaultProps={component:"span"};var nO="recharts-tooltip-wrapper",nA={visibility:"hidden"};function nT(e){var t=e.allowEscapeViewBox,n=e.coordinate,r=e.key,o=e.offsetTopLeft,a=e.position,i=e.reverseDirection,s=e.tooltipDimension,l=e.viewBox,c=e.viewBoxDimension;if(a&&$(a[r]))return a[r];var u=n[r]-s-o,d=n[r]+o;return t[r]?i[r]?u:d:i[r]?ul[r]+c?Math.max(u,l[r]):Math.max(d,l[r])}function nC(e){return(nC="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function nk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function nI(e){for(var t=1;t1||Math.abs(e.height-this.lastBoundingBox.height)>1)&&(this.lastBoundingBox.width=e.width,this.lastBoundingBox.height=e.height)}else(-1!==this.lastBoundingBox.width||-1!==this.lastBoundingBox.height)&&(this.lastBoundingBox.width=-1,this.lastBoundingBox.height=-1)}},{key:"componentDidMount",value:function(){document.addEventListener("keydown",this.handleKeyDown),this.updateBBox()}},{key:"componentWillUnmount",value:function(){document.removeEventListener("keydown",this.handleKeyDown)}},{key:"componentDidUpdate",value:function(){var e,t;this.props.active&&this.updateBBox(),this.state.dismissed&&((null===(e=this.props.coordinate)||void 0===e?void 0:e.x)!==this.state.dismissedAtCoordinate.x||(null===(t=this.props.coordinate)||void 0===t?void 0:t.y)!==this.state.dismissedAtCoordinate.y)&&(this.state.dismissed=!1)}},{key:"render",value:function(){var e,t,n,r,o,a,i,s,l,c,u,d,p,f,m,g,h,b,y,v,E=this,S=this.props,w=S.active,x=S.allowEscapeViewBox,O=S.animationDuration,A=S.animationEasing,T=S.children,C=S.coordinate,k=S.hasPayload,I=S.isAnimationActive,R=S.offset,P=S.position,M=S.reverseDirection,L=S.useTranslate3d,D=S.viewBox,j=S.wrapperStyle,F=(p=(e={allowEscapeViewBox:x,coordinate:C,offsetTopLeft:R,position:P,reverseDirection:M,tooltipBox:{height:this.lastBoundingBox.height,width:this.lastBoundingBox.width},useTranslate3d:L,viewBox:D}).allowEscapeViewBox,f=e.coordinate,m=e.offsetTopLeft,g=e.position,h=e.reverseDirection,b=e.tooltipBox,y=e.useTranslate3d,v=e.viewBox,b.height>0&&b.width>0&&f?(n=(t={translateX:u=nT({allowEscapeViewBox:p,coordinate:f,key:"x",offsetTopLeft:m,position:g,reverseDirection:h,tooltipDimension:b.width,viewBox:v,viewBoxDimension:v.width}),translateY:d=nT({allowEscapeViewBox:p,coordinate:f,key:"y",offsetTopLeft:m,position:g,reverseDirection:h,tooltipDimension:b.height,viewBox:v,viewBoxDimension:v.height}),useTranslate3d:y}).translateX,r=t.translateY,c=tD({transform:t.useTranslate3d?"translate3d(".concat(n,"px, ").concat(r,"px, 0)"):"translate(".concat(n,"px, ").concat(r,"px)")})):c=nA,{cssProperties:c,cssClasses:(i=(o={translateX:u,translateY:d,coordinate:f}).coordinate,s=o.translateX,l=o.translateY,_(nO,(nx(a={},"".concat(nO,"-right"),$(s)&&i&&$(i.x)&&s>=i.x),nx(a,"".concat(nO,"-left"),$(s)&&i&&$(i.x)&&s=i.y),nx(a,"".concat(nO,"-top"),$(l)&&i&&$(i.y)&&l0;return N.createElement(nD,{allowEscapeViewBox:o,animationDuration:a,animationEasing:i,isAnimationActive:u,active:r,coordinate:l,hasPayload:E,offset:d,position:m,reverseDirection:g,useTranslate3d:h,viewBox:b,wrapperStyle:y},(e=nH(nH({},this.props),{},{payload:v}),N.isValidElement(s)?N.cloneElement(s,e):"function"==typeof s?N.createElement(s,e):N.createElement(e3,e)))}}],nG(a.prototype,n),r&&nG(a,r),Object.defineProperty(a,"prototype",{writable:!1}),a}(N.PureComponent);nV(nK,"displayName","Tooltip"),nV(nK,"defaultProps",{allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!nj.isSsr,itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:" : ",trigger:"hover",useTranslate3d:!1,viewBox:{x:0,y:0,height:0,width:0},wrapperStyle:{}});var nX=n(9332),nQ=n.n(nX);let nJ=Math.cos,n0=Math.sin,n1=Math.sqrt,n2=Math.PI,n4=2*n2;var n3={draw(e,t){let n=n1(t/n2);e.moveTo(n,0),e.arc(0,0,n,0,n4)}};let n6=n1(1/3),n5=2*n6,n8=n0(n2/10)/n0(7*n2/10),n9=n0(n4/10)*n8,n7=-nJ(n4/10)*n8,re=n1(3),rt=n1(3)/2,rn=1/n1(12),rr=(rn/2+1)*3;function ro(e){return function(){return e}}function ra(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function ri(){let e=ra(["M",",",""]);return ri=function(){return e},e}function rs(){let e=ra(["Z"]);return rs=function(){return e},e}function rl(){let e=ra(["L",",",""]);return rl=function(){return e},e}function rc(){let e=ra(["Q",",",",",",",""]);return rc=function(){return e},e}function ru(){let e=ra(["C",",",",",",",",",",",""]);return ru=function(){return e},e}function rd(){let e=ra(["M",",",""]);return rd=function(){return e},e}function rp(){let e=ra(["L",",",""]);return rp=function(){return e},e}function rf(){let e=ra(["L",",",""]);return rf=function(){return e},e}function rm(){let e=ra(["A",",",",0,0,",",",",",""]);return rm=function(){return e},e}function rg(){let e=ra(["M",",",""]);return rg=function(){return e},e}function rh(){let e=ra(["L",",",""]);return rh=function(){return e},e}function rb(){let e=ra(["A",",",",0,1,",",",",","A",",",",0,1,",",",",",""]);return rb=function(){return e},e}function ry(){let e=ra(["A",",",",0,",",",",",",",""]);return ry=function(){return e},e}function rv(){let e=ra(["M",",","h","v","h","Z"]);return rv=function(){return e},e}let rE=Math.PI,rS=2*rE,rw=rS-1e-6;function rx(e){this._+=e[0];for(let t=1,n=e.length;t1e-6){if(Math.abs(u*s-l*c)>1e-6&&o){let p=n-a,f=r-i,m=s*s+l*l,g=Math.sqrt(m),h=Math.sqrt(d),b=o*Math.tan((rE-Math.acos((m+d-(p*p+f*f))/(2*g*h)))/2),y=b/h,v=b/g;Math.abs(y-1)>1e-6&&this._append(rf(),e+y*c,t+y*u),this._append(rm(),o,o,+(u*p>c*f),this._x1=e+v*s,this._y1=t+v*l)}else this._append(rp(),this._x1=e,this._y1=t)}}arc(e,t,n,r,o,a){if(e=+e,t=+t,a=!!a,(n=+n)<0)throw Error("negative radius: ".concat(n));let i=n*Math.cos(r),s=n*Math.sin(r),l=e+i,c=t+s,u=1^a,d=a?r-o:o-r;null===this._x1?this._append(rg(),l,c):(Math.abs(this._x1-l)>1e-6||Math.abs(this._y1-c)>1e-6)&&this._append(rh(),l,c),n&&(d<0&&(d=d%rS+rS),d>rw?this._append(rb(),n,n,u,e-i,t-s,n,n,u,this._x1=l,this._y1=c):d>1e-6&&this._append(ry(),n,n,+(d>=rE),u,this._x1=e+n*Math.cos(o),this._y1=t+n*Math.sin(o)))}rect(e,t,n,r){this._append(rv(),this._x0=this._x1=+e,this._y0=this._y1=+t,n=+n,+r,-n)}toString(){return this._}constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=null==e?rx:function(e){let t=Math.floor(e);if(!(t>=0))throw Error("invalid digits: ".concat(e));if(t>15)return rx;let n=10**t;return function(e){this._+=e[0];for(let t=1,r=e.length;t=0))throw RangeError("invalid digits: ".concat(n));t=e}return e},()=>new rO(t)}function rT(e){return(rT="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}rO.prototype,n1(3),n1(3);var rC=["type","size","sizeType"];function rk(){return(rk=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,rC)),{},{type:r,size:a,sizeType:s}),c=l.className,u=l.cx,d=l.cy,p=ek(l,!0);return u===+u&&d===+d&&a===+a?N.createElement("path",rk({},p,{className:_("recharts-symbols",c),transform:"translate(".concat(u,", ").concat(d,")"),d:(t=r_["symbol".concat(nQ()(r))]||n3,(function(e,t){let n=null,r=rA(o);function o(){let o;if(n||(n=o=r()),e.apply(this,arguments).draw(n,+t.apply(this,arguments)),o)return n=null,o+""||null}return e="function"==typeof e?e:ro(e||n3),t="function"==typeof t?t:ro(void 0===t?64:+t),o.type=function(t){return arguments.length?(e="function"==typeof t?t:ro(t),o):e},o.size=function(e){return arguments.length?(t="function"==typeof e?e:ro(+e),o):t},o.context=function(e){return arguments.length?(n=null==e?null:e,o):n},o})().type(t).size(rP(a,s,r))())})):null};function rL(e){return(rL="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function rD(){return(rD=Object.assign?Object.assign.bind():function(e){for(var t=1;t');var f=t.inactive?i:t.color;return N.createElement("li",rD({className:d,style:l,key:"legend-item-".concat(n)},em(e.props,t,n)),N.createElement(eY,{width:r,height:r,viewBox:s,style:c},e.renderIcon(t)),N.createElement("span",{className:"recharts-legend-item-text",style:{color:f}},u?u(p,t,n):p))})}},{key:"render",value:function(){var e=this.props,t=e.payload,n=e.layout,r=e.align;return t&&t.length?N.createElement("ul",{className:"recharts-default-legend",style:{padding:0,margin:0,textAlign:"horizontal"===n?r:"left"}},this.renderItems()):null}}],rF(a.prototype,n),r&&rF(a,r),Object.defineProperty(a,"prototype",{writable:!1}),a}(N.PureComponent);function rG(e){return(rG="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}rZ(rH,"displayName","Legend"),rZ(rH,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var r$=["ref"];function rW(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function rV(e){for(var t=1;t1||Math.abs(t.height-this.lastBoundingBox.height)>1)&&(this.lastBoundingBox.width=t.width,this.lastBoundingBox.height=t.height,e&&e(t))}else(-1!==this.lastBoundingBox.width||-1!==this.lastBoundingBox.height)&&(this.lastBoundingBox.width=-1,this.lastBoundingBox.height=-1,e&&e(null))}},{key:"getBBoxSnapshot",value:function(){return this.lastBoundingBox.width>=0&&this.lastBoundingBox.height>=0?rV({},this.lastBoundingBox):{width:0,height:0}}},{key:"getDefaultPosition",value:function(e){var t,n,r=this.props,o=r.layout,a=r.align,i=r.verticalAlign,s=r.margin,l=r.chartWidth,c=r.chartHeight;return e&&(void 0!==e.left&&null!==e.left||void 0!==e.right&&null!==e.right)||(t="center"===a&&"vertical"===o?{left:((l||0)-this.getBBoxSnapshot().width)/2}:"right"===a?{right:s&&s.right||0}:{left:s&&s.left||0}),e&&(void 0!==e.top&&null!==e.top||void 0!==e.bottom&&null!==e.bottom)||(n="middle"===i?{top:((c||0)-this.getBBoxSnapshot().height)/2}:"bottom"===i?{bottom:s&&s.bottom||0}:{top:s&&s.top||0}),rV(rV({},t),n)}},{key:"render",value:function(){var e=this,t=this.props,n=t.content,r=t.width,o=t.height,a=t.wrapperStyle,i=t.payloadUniqBy,s=t.payload,l=rV(rV({position:"absolute",width:r||"auto",height:o||"auto"},this.getDefaultPosition(a)),a);return N.createElement("div",{className:"recharts-legend-wrapper",style:l,ref:function(t){e.wrapperNode=t}},function(e,t){if(N.isValidElement(e))return N.cloneElement(e,t);if("function"==typeof e)return N.createElement(e,t);t.ref;var n=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(t,r$);return N.createElement(rH,n)}(n,rV(rV({},this.props),{},{payload:nU(s,i,r0)})))}}],r=[{key:"getWithHeight",value:function(e,t){var n=e.props.layout;return"vertical"===n&&$(e.props.height)?{height:e.props.height}:"horizontal"===n?{width:e.props.width||t}:null}}],n&&rq(a.prototype,n),r&&rq(a,r),Object.defineProperty(a,"prototype",{writable:!1}),a}(N.PureComponent);function r2(){return(r2=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=Array(t);n=0?1:-1,l=n>=0?1:-1,c=r>=0&&n>=0||r<0&&n<0?1:0;if(i>0&&o instanceof Array){for(var u=[0,0,0,0],d=0;d<4;d++)u[d]=o[d]>i?i:o[d];a="M".concat(e,",").concat(t+s*u[0]),u[0]>0&&(a+="A ".concat(u[0],",").concat(u[0],",0,0,").concat(c,",").concat(e+l*u[0],",").concat(t)),a+="L ".concat(e+n-l*u[1],",").concat(t),u[1]>0&&(a+="A ".concat(u[1],",").concat(u[1],",0,0,").concat(c,",\n ").concat(e+n,",").concat(t+s*u[1])),a+="L ".concat(e+n,",").concat(t+r-s*u[2]),u[2]>0&&(a+="A ".concat(u[2],",").concat(u[2],",0,0,").concat(c,",\n ").concat(e+n-l*u[2],",").concat(t+r)),a+="L ".concat(e+l*u[3],",").concat(t+r),u[3]>0&&(a+="A ".concat(u[3],",").concat(u[3],",0,0,").concat(c,",\n ").concat(e,",").concat(t+r-s*u[3])),a+="Z"}else if(i>0&&o===+o&&o>0){var p=Math.min(i,o);a="M ".concat(e,",").concat(t+s*p,"\n A ").concat(p,",").concat(p,",0,0,").concat(c,",").concat(e+l*p,",").concat(t,"\n L ").concat(e+n-l*p,",").concat(t,"\n A ").concat(p,",").concat(p,",0,0,").concat(c,",").concat(e+n,",").concat(t+s*p,"\n L ").concat(e+n,",").concat(t+r-s*p,"\n A ").concat(p,",").concat(p,",0,0,").concat(c,",").concat(e+n-l*p,",").concat(t+r,"\n L ").concat(e+l*p,",").concat(t+r,"\n A ").concat(p,",").concat(p,",0,0,").concat(c,",").concat(e,",").concat(t+r-s*p," Z")}else a="M ".concat(e,",").concat(t," h ").concat(n," v ").concat(r," h ").concat(-n," Z");return a},oe=function(e,t){if(!e||!t)return!1;var n=e.x,r=e.y,o=t.x,a=t.y,i=t.width,s=t.height;return!!(Math.abs(i)>0&&Math.abs(s)>0)&&n>=Math.min(o,o+i)&&n<=Math.max(o,o+i)&&r>=Math.min(a,a+s)&&r<=Math.max(a,a+s)},ot={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},on=function(e){var t,n=r9(r9({},ot),e),r=(0,N.useRef)(),o=function(e){if(Array.isArray(e))return e}(t=(0,N.useState)(-1))||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a,i,s=[],l=!0,c=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(c)throw o}}return s}}(t,2)||function(e,t){if(e){if("string"==typeof e)return r5(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return r5(e,t)}}(t,2)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),a=o[0],i=o[1];(0,N.useEffect)(function(){if(r.current&&r.current.getTotalLength)try{var e=r.current.getTotalLength();e&&i(e)}catch(e){}},[]);var s=n.x,l=n.y,c=n.width,u=n.height,d=n.radius,p=n.className,f=n.animationEasing,m=n.animationDuration,g=n.animationBegin,h=n.isAnimationActive,b=n.isUpdateAnimationActive;if(s!==+s||l!==+l||c!==+c||u!==+u||0===c||0===u)return null;var y=_("recharts-rectangle",p);return b?N.createElement(ni,{canBegin:a>0,from:{width:c,height:u,x:s,y:l},to:{width:c,height:u,x:s,y:l},duration:m,animationEasing:f,isActive:b},function(e){var t=e.width,o=e.height,i=e.x,s=e.y;return N.createElement(ni,{canBegin:a>0,from:"0px ".concat(-1===a?1:a,"px"),to:"".concat(a,"px 0px"),attributeName:"strokeDasharray",begin:g,duration:m,isActive:h,easing:f},N.createElement("path",r6({},ek(n,!0),{className:y,d:r7(i,s,t,o,d),ref:r})))}):N.createElement("path",r6({},ek(n,!0),{className:y,d:r7(s,l,c,u,d)}))};function or(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e)}return this}function oo(e,t){switch(arguments.length){case 0:break;case 1:"function"==typeof e?this.interpolator(e):this.range(e);break;default:this.domain(e),"function"==typeof t?this.interpolator(t):this.range(t)}return this}class oa extends Map{get(e){return super.get(oi(this,e))}has(e){return super.has(oi(this,e))}set(e,t){return super.set(function(e,t){let{_intern:n,_key:r}=e,o=r(t);return n.has(o)?n.get(o):(n.set(o,t),t)}(this,e),t)}delete(e){return super.delete(function(e,t){let{_intern:n,_key:r}=e,o=r(t);return n.has(o)&&(t=n.get(o),n.delete(o)),t}(this,e))}constructor(e,t=os){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:t}}),null!=e)for(let[t,n]of e)this.set(t,n)}}function oi(e,t){let{_intern:n,_key:r}=e,o=r(t);return n.has(o)?n.get(o):t}function os(e){return null!==e&&"object"==typeof e?e.valueOf():e}let ol=Symbol("implicit");function oc(){var e=new oa,t=[],n=[],r=ol;function o(o){let a=e.get(o);if(void 0===a){if(r!==ol)return r;e.set(o,a=t.push(o)-1)}return n[a%n.length]}return o.domain=function(n){if(!arguments.length)return t.slice();for(let r of(t=[],e=new oa,n))e.has(r)||e.set(r,t.push(r)-1);return o},o.range=function(e){return arguments.length?(n=Array.from(e),o):n.slice()},o.unknown=function(e){return arguments.length?(r=e,o):r},o.copy=function(){return oc(t,n).unknown(r)},or.apply(o,arguments),o}function ou(){var e,t,n=oc().unknown(void 0),r=n.domain,o=n.range,a=0,i=1,s=!1,l=0,c=0,u=.5;function d(){var n=r().length,d=i1&&void 0!==arguments[1]?arguments[1]:{};if(null==e||nj.isSsr)return{width:0,height:0};var r=(Object.keys(t=om({},n)).forEach(function(e){t[e]||delete t[e]}),t),o=JSON.stringify({text:e,copyStyle:r});if(og.widthCache[o])return og.widthCache[o];try{var a=document.getElementById(ob);a||((a=document.createElement("span")).setAttribute("id",ob),a.setAttribute("aria-hidden","true"),document.body.appendChild(a));var i=om(om({},oh),r);Object.assign(a.style,i),a.textContent="".concat(e);var s=a.getBoundingClientRect(),l={width:s.width,height:s.height};return og.widthCache[o]=l,++og.cacheCount>2e3&&(og.cacheCount=0,og.widthCache={}),l}catch(e){return{width:0,height:0}}};function ov(e){return(ov="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function oE(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a,i,s=[],l=!0,c=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(c)throw o}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return oS(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return oS(e,t)}}(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function oS(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function oj(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a,i,s=[],l=!0,c=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(c)throw o}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return oF(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return oF(e,t)}}(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function oF(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n0&&void 0!==arguments[0]?arguments[0]:[];return e.reduce(function(e,t){var a=t.word,i=t.width,s=e[e.length-1];return s&&(null==r||o||s.width+i+ni||t.reduce(function(e,t){return e.width>t.width?e:t}).width>Number(r),t]},m=0,g=s.length-1,h=0;m<=g&&h<=s.length-1;){var b=Math.floor((m+g)/2),y=oj(f(b-1),2),v=y[0],E=y[1],S=oj(f(b),1)[0];if(v||S||(m=b+1),v&&S&&(g=b-1),!v&&S){a=E;break}h++}return a||p},oz=function(e){return[{words:en()(e)?[]:e.toString().split(oB)}]},oH=function(e){var t=e.width,n=e.scaleToFit,r=e.children,o=e.style,a=e.breakAll,i=e.maxLines;if((t||n)&&!nj.isSsr){var s=oU({breakAll:a,children:r,style:o});return s?oZ({breakAll:a,children:r,maxLines:i,style:o},s.wordsWithComputedWidth,s.spaceWidth,t,n):oz(r)}return oz(r)},oG="#808080",o$=function(e){var t,n=e.x,r=void 0===n?0:n,o=e.y,a=void 0===o?0:o,i=e.lineHeight,s=void 0===i?"1em":i,l=e.capHeight,c=void 0===l?"0.71em":l,u=e.scaleToFit,d=void 0!==u&&u,p=e.textAnchor,f=e.verticalAnchor,m=e.fill,g=void 0===m?oG:m,h=oD(e,oP),b=(0,N.useMemo)(function(){return oH({breakAll:h.breakAll,children:h.children,maxLines:h.maxLines,scaleToFit:d,style:h.style,width:h.width})},[h.breakAll,h.children,h.maxLines,d,h.style,h.width]),y=h.dx,v=h.dy,E=h.angle,S=h.className,w=h.breakAll,x=oD(h,oM);if(!W(r)||!W(a))return null;var O=r+($(y)?y:0),A=a+($(v)?v:0);switch(void 0===f?"end":f){case"start":t=oR("calc(".concat(c,")"));break;case"middle":t=oR("calc(".concat((b.length-1)/2," * -").concat(s," + (").concat(c," / 2))"));break;default:t=oR("calc(".concat(b.length-1," * -").concat(s,")"))}var T=[];if(d){var C=b[0].width,k=h.width;T.push("scale(".concat(($(k)?k/C:1)/C,")"))}return E&&T.push("rotate(".concat(E,", ").concat(O,", ").concat(A,")")),T.length&&(x.transform=T.join(" ")),N.createElement("text",oL({},ek(x,!0),{x:O,y:A,className:_("recharts-text",S),textAnchor:void 0===p?"start":p,fill:g.includes("url")?oG:g}),b.map(function(e,n){var r=e.words.join(w?"":" ");return N.createElement("tspan",{x:O,dy:0===n?t:s,key:r},r)}))};let oW=Math.sqrt(50),oV=Math.sqrt(10),oq=Math.sqrt(2);function oY(e,t,n){let r,o,a;let i=(t-e)/Math.max(0,n),s=Math.floor(Math.log10(i)),l=i/Math.pow(10,s),c=l>=oW?10:l>=oV?5:l>=oq?2:1;return(s<0?(r=Math.round(e*(a=Math.pow(10,-s)/c)),o=Math.round(t*a),r/at&&--o,a=-a):(r=Math.round(e/(a=Math.pow(10,s)*c)),o=Math.round(t/a),r*at&&--o),o0))return[];if(e===t)return[e];let r=t=o))return[];let s=a-o+1,l=Array(s);if(r){if(i<0)for(let e=0;et?1:e>=t?0:NaN}function o0(e,t){return null==e||null==t?NaN:te?1:t>=e?0:NaN}function o1(e){let t,n,r;function o(e,r){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:e.length;if(o>>1;0>n(e[t],r)?o=t+1:a=t}while(ooJ(e(t),n),r=(t,n)=>e(t)-n):(t=e===oJ||e===o0?e:o2,n=e,r=e),{left:o,center:function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:e.length,i=o(e,t,n,a-1);return i>n&&r(e[i-1],t)>-r(e[i],t)?i-1:i},right:function(e,r){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:e.length;if(o>>1;0>=n(e[t],r)?o=t+1:a=t}while(o>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?am(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?am(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=ar.exec(e))?new ah(t[1],t[2],t[3],1):(t=ao.exec(e))?new ah(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=aa.exec(e))?am(t[1],t[2],t[3],t[4]):(t=ai.exec(e))?am(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=as.exec(e))?aw(t[1],t[2]/100,t[3]/100,1):(t=al.exec(e))?aw(t[1],t[2]/100,t[3]/100,t[4]):ac.hasOwnProperty(e)?af(ac[e]):"transparent"===e?new ah(NaN,NaN,NaN,0):null}function af(e){return new ah(e>>16&255,e>>8&255,255&e,1)}function am(e,t,n,r){return r<=0&&(e=t=n=NaN),new ah(e,t,n,r)}function ag(e,t,n,r){var o;return 1==arguments.length?((o=e)instanceof o9||(o=ap(o)),o)?new ah((o=o.rgb()).r,o.g,o.b,o.opacity):new ah:new ah(e,t,n,null==r?1:r)}function ah(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function ab(){return"#".concat(aS(this.r)).concat(aS(this.g)).concat(aS(this.b))}function ay(){let e=av(this.opacity);return"".concat(1===e?"rgb(":"rgba(").concat(aE(this.r),", ").concat(aE(this.g),", ").concat(aE(this.b)).concat(1===e?")":", ".concat(e,")"))}function av(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function aE(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function aS(e){return((e=aE(e))<16?"0":"")+e.toString(16)}function aw(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new aO(e,t,n,r)}function ax(e){if(e instanceof aO)return new aO(e.h,e.s,e.l,e.opacity);if(e instanceof o9||(e=ap(e)),!e)return new aO;if(e instanceof aO)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,o=Math.min(t,n,r),a=Math.max(t,n,r),i=NaN,s=a-o,l=(a+o)/2;return s?(i=t===a?(n-r)/s+(n0&&l<1?0:i,new aO(i,s,l,e.opacity)}function aO(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function aA(e){return(e=(e||0)%360)<0?e+360:e}function aT(e){return Math.max(0,Math.min(1,e||0))}function aC(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}function ak(e,t,n,r,o){var a=e*e,i=a*e;return((1-3*e+3*a-i)*t+(4-6*a+3*i)*n+(1+3*e+3*a-3*i)*r+i*o)/6}o5(o9,ap,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:au,formatHex:au,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return ax(this).formatHsl()},formatRgb:ad,toString:ad}),o5(ah,ag,o8(o9,{brighter(e){return e=null==e?1.4285714285714286:Math.pow(1.4285714285714286,e),new ah(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?.7:Math.pow(.7,e),new ah(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new ah(aE(this.r),aE(this.g),aE(this.b),av(this.opacity))},displayable(){return -.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:ab,formatHex:ab,formatHex8:function(){return"#".concat(aS(this.r)).concat(aS(this.g)).concat(aS(this.b)).concat(aS((isNaN(this.opacity)?1:this.opacity)*255))},formatRgb:ay,toString:ay})),o5(aO,function(e,t,n,r){return 1==arguments.length?ax(e):new aO(e,t,n,null==r?1:r)},o8(o9,{brighter(e){return e=null==e?1.4285714285714286:Math.pow(1.4285714285714286,e),new aO(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?.7:Math.pow(.7,e),new aO(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,o=2*n-r;return new ah(aC(e>=240?e-240:e+120,o,r),aC(e,o,r),aC(e<120?e+240:e-120,o,r),this.opacity)},clamp(){return new aO(aA(this.h),aT(this.s),aT(this.l),av(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){let e=av(this.opacity);return"".concat(1===e?"hsl(":"hsla(").concat(aA(this.h),", ").concat(100*aT(this.s),"%, ").concat(100*aT(this.l),"%").concat(1===e?")":", ".concat(e,")"))}}));var aI=e=>()=>e;function aN(e,t){var n=t-e;return n?function(t){return e+t*n}:aI(isNaN(e)?t:e)}var a_=function e(t){var n,r=1==(n=+(n=t))?aN:function(e,t){var r,o,a;return t-e?(r=e,o=t,r=Math.pow(r,a=n),o=Math.pow(o,a)-r,a=1/a,function(e){return Math.pow(r+e*o,a)}):aI(isNaN(e)?t:e)};function o(e,t){var n=r((e=ag(e)).r,(t=ag(t)).r),o=r(e.g,t.g),a=r(e.b,t.b),i=aN(e.opacity,t.opacity);return function(t){return e.r=n(t),e.g=o(t),e.b=a(t),e.opacity=i(t),e+""}}return o.gamma=e,o}(1);function aR(e){return function(t){var n,r,o=t.length,a=Array(o),i=Array(o),s=Array(o);for(n=0;n=1?(n=1,t-1):Math.floor(n*t),o=e[r],a=e[r+1],i=r>0?e[r-1]:2*o-a,s=rs&&(i=t.slice(s,i),c[l]?c[l]+=i:c[++l]=i),(o=o[0])===(a=a[0])?c[l]?c[l]+=a:c[++l]=a:(c[++l]=null,u.push({i:l,x:aP(o,a)})),s=aL.lastIndex;return st&&(n=e,e=t,t=n),c=function(n){return Math.max(e,Math.min(t,n))}),r=l>2?aH:az,o=a=null,d}function d(t){return null==t||isNaN(t=+t)?n:(o||(o=r(i.map(e),s,l)))(e(c(t)))}return d.invert=function(n){return c(t((a||(a=r(s,i.map(e),aP)))(n)))},d.domain=function(e){return arguments.length?(i=Array.from(e,aF),u()):i.slice()},d.range=function(e){return arguments.length?(s=Array.from(e),u()):s.slice()},d.rangeRound=function(e){return s=Array.from(e),l=aj,u()},d.clamp=function(e){return arguments.length?(c=!!e||aU,u()):c!==aU},d.interpolate=function(e){return arguments.length?(l=e,u()):l},d.unknown=function(e){return arguments.length?(n=e,d):n},function(n,r){return e=n,t=r,u()}}function aW(){return a$()(aU,aU)}var aV=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function aq(e){var t;if(!(t=aV.exec(e)))throw Error("invalid format: "+e);return new aY({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}function aY(e){this.fill=void 0===e.fill?" ":e.fill+"",this.align=void 0===e.align?">":e.align+"",this.sign=void 0===e.sign?"-":e.sign+"",this.symbol=void 0===e.symbol?"":e.symbol+"",this.zero=!!e.zero,this.width=void 0===e.width?void 0:+e.width,this.comma=!!e.comma,this.precision=void 0===e.precision?void 0:+e.precision,this.trim=!!e.trim,this.type=void 0===e.type?"":e.type+""}function aK(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function aX(e){return(e=aK(Math.abs(e)))?e[1]:NaN}function aQ(e,t){var n=aK(e,t);if(!n)return e+"";var r=n[0],o=n[1];return o<0?"0."+Array(-o).join("0")+r:r.length>o+1?r.slice(0,o+1)+"."+r.slice(o+1):r+Array(o-r.length+2).join("0")}aq.prototype=aY.prototype,aY.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var aJ={"%":(e,t)=>(100*e).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:function(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)},e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>aQ(100*e,t),r:aQ,s:function(e,t){var n=aK(e,t);if(!n)return e+"";var r=n[0],o=n[1],a=o-(b=3*Math.max(-8,Math.min(8,Math.floor(o/3))))+1,i=r.length;return a===i?r:a>i?r+Array(a-i+1).join("0"):a>0?r.slice(0,a)+"."+r.slice(a):"0."+Array(1-a).join("0")+aK(e,Math.max(0,t+a-1))[0]},X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function a0(e){return e}var a1=Array.prototype.map,a2=["y","z","a","f","p","n","\xb5","m","","k","M","G","T","P","E","Z","Y"];function a4(e,t,n,r){var o,a,i=oQ(e,t,n);switch((r=aq(null==r?",f":r)).type){case"s":var s=Math.max(Math.abs(e),Math.abs(t));return null!=r.precision||isNaN(a=Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(aX(s)/3)))-aX(Math.abs(i))))||(r.precision=a),E(r,s);case"":case"e":case"g":case"p":case"r":null!=r.precision||isNaN(a=Math.max(0,aX(Math.abs(Math.max(Math.abs(e),Math.abs(t)))-(o=Math.abs(o=i)))-aX(o))+1)||(r.precision=a-("e"===r.type));break;case"f":case"%":null!=r.precision||isNaN(a=Math.max(0,-aX(Math.abs(i))))||(r.precision=a-("%"===r.type)*2)}return v(r)}function a3(e){var t=e.domain;return e.ticks=function(e){var n=t();return oK(n[0],n[n.length-1],null==e?10:e)},e.tickFormat=function(e,n){var r=t();return a4(r[0],r[r.length-1],null==e?10:e,n)},e.nice=function(n){null==n&&(n=10);var r,o,a=t(),i=0,s=a.length-1,l=a[i],c=a[s],u=10;for(c0;){if((o=oX(l,c,n))===r)return a[i]=l,a[s]=c,t(a);if(o>0)l=Math.floor(l/o)*o,c=Math.ceil(c/o)*o;else if(o<0)l=Math.ceil(l*o)/o,c=Math.floor(c*o)/o;else break;r=o}return e},e}function a6(){var e=aW();return e.copy=function(){return aG(e,a6())},or.apply(e,arguments),a3(e)}function a5(e,t){e=e.slice();var n,r=0,o=e.length-1,a=e[r],i=e[o];return i-e(-t,n)}function io(e){let t,n;let r=e(a8,a9),o=r.domain,a=10;function i(){var i,s;return t=(i=a)===Math.E?Math.log:10===i&&Math.log10||2===i&&Math.log2||(i=Math.log(i),e=>Math.log(e)/i),n=10===(s=a)?it:s===Math.E?Math.exp:e=>Math.pow(s,e),o()[0]<0?(t=ir(t),n=ir(n),e(a7,ie)):e(a8,a9),r}return r.base=function(e){return arguments.length?(a=+e,i()):a},r.domain=function(e){return arguments.length?(o(e),i()):o()},r.ticks=e=>{let r,i;let s=o(),l=s[0],c=s[s.length-1],u=c0){for(;d<=p;++d)for(r=1;rc)break;m.push(i)}}else for(;d<=p;++d)for(r=a-1;r>=1;--r)if(!((i=d>0?r/n(-d):r*n(d))c)break;m.push(i)}2*m.length{if(null==e&&(e=10),null==o&&(o=10===a?"s":","),"function"!=typeof o&&(a%1||null!=(o=aq(o)).precision||(o.trim=!0),o=v(o)),e===1/0)return o;let i=Math.max(1,a*e/r.ticks().length);return e=>{let r=e/n(Math.round(t(e)));return r*ao(a5(o(),{floor:e=>n(Math.floor(t(e))),ceil:e=>n(Math.ceil(t(e)))})),r}function ia(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function ii(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function is(e){var t=1,n=e(ia(1),ii(t));return n.constant=function(n){return arguments.length?e(ia(t=+n),ii(t)):t},a3(n)}function il(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function ic(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function iu(e){return e<0?-e*e:e*e}function id(e){var t=e(aU,aU),n=1;return t.exponent=function(t){return arguments.length?1==(n=+t)?e(aU,aU):.5===n?e(ic,iu):e(il(n),il(1/n)):n},a3(t)}function ip(){var e=id(a$());return e.copy=function(){return aG(e,ip()).exponent(e.exponent())},or.apply(e,arguments),e}function im(){return ip.apply(null,arguments).exponent(.5)}function ig(e){return Math.sign(e)*e*e}function ih(e,t){let n;if(void 0===t)for(let t of e)null!=t&&(n=t)&&(n=t);else{let r=-1;for(let o of e)null!=(o=t(o,++r,e))&&(n=o)&&(n=o)}return n}function ib(e,t){let n;if(void 0===t)for(let t of e)null!=t&&(n>t||void 0===n&&t>=t)&&(n=t);else{let r=-1;for(let o of e)null!=(o=t(o,++r,e))&&(n>o||void 0===n&&o>=o)&&(n=o)}return n}function iy(e,t){return(null==e||!(e>=e))-(null==t||!(t>=t))||(et?1:0)}function iv(e,t,n){let r=e[t];e[t]=e[n],e[n]=r}v=(y=function(e){var t,n,r,o=void 0===e.grouping||void 0===e.thousands?a0:(t=a1.call(e.grouping,Number),n=e.thousands+"",function(e,r){for(var o=e.length,a=[],i=0,s=t[0],l=0;o>0&&s>0&&(l+s+1>r&&(s=Math.max(1,r-l)),a.push(e.substring(o-=s,o+s)),!((l+=s+1)>r));)s=t[i=(i+1)%t.length];return a.reverse().join(n)}),a=void 0===e.currency?"":e.currency[0]+"",i=void 0===e.currency?"":e.currency[1]+"",s=void 0===e.decimal?".":e.decimal+"",l=void 0===e.numerals?a0:(r=a1.call(e.numerals,String),function(e){return e.replace(/[0-9]/g,function(e){return r[+e]})}),c=void 0===e.percent?"%":e.percent+"",u=void 0===e.minus?"−":e.minus+"",d=void 0===e.nan?"NaN":e.nan+"";function p(e){var t=(e=aq(e)).fill,n=e.align,r=e.sign,p=e.symbol,f=e.zero,m=e.width,g=e.comma,h=e.precision,y=e.trim,v=e.type;"n"===v?(g=!0,v="g"):aJ[v]||(void 0===h&&(h=12),y=!0,v="g"),(f||"0"===t&&"="===n)&&(f=!0,t="0",n="=");var E="$"===p?a:"#"===p&&/[boxX]/.test(v)?"0"+v.toLowerCase():"",S="$"===p?i:/[%p]/.test(v)?c:"",w=aJ[v],x=/[defgprs%]/.test(v);function O(e){var a,i,c,p=E,O=S;if("c"===v)O=w(e)+O,e="";else{var A=(e=+e)<0||1/e<0;if(e=isNaN(e)?d:w(Math.abs(e),h),y&&(e=function(e){e:for(var t,n=e.length,r=1,o=-1;r0&&(o=0)}return o>0?e.slice(0,o)+e.slice(t+1):e}(e)),A&&0==+e&&"+"!==r&&(A=!1),p=(A?"("===r?r:u:"-"===r||"("===r?"":r)+p,O=("s"===v?a2[8+b/3]:"")+O+(A&&"("===r?")":""),x){for(a=-1,i=e.length;++a(c=e.charCodeAt(a))||c>57){O=(46===c?s+e.slice(a+1):e.slice(a))+O,e=e.slice(0,a);break}}}g&&!f&&(e=o(e,1/0));var T=p.length+e.length+O.length,C=T>1)+p+e+O+C.slice(T);break;default:e=C+p+e+O}return l(e)}return h=void 0===h?6:/[gprs]/.test(v)?Math.max(1,Math.min(21,h)):Math.max(0,Math.min(20,h)),O.toString=function(){return e+""},O}return{format:p,formatPrefix:function(e,t){var n=p(((e=aq(e)).type="f",e)),r=3*Math.max(-8,Math.min(8,Math.floor(aX(t)/3))),o=Math.pow(10,-r),a=a2[8+r/3];return function(e){return n(o*e)+a}}}}({thousands:",",grouping:[3],currency:["$",""]})).format,E=y.formatPrefix;let iE=new Date,iS=new Date;function iw(e,t,n,r){function o(t){return e(t=0==arguments.length?new Date:new Date(+t)),t}return o.floor=t=>(e(t=new Date(+t)),t),o.ceil=n=>(e(n=new Date(n-1)),t(n,1),e(n),n),o.round=e=>{let t=o(e),n=o.ceil(e);return e-t(t(e=new Date(+e),null==n?1:Math.floor(n)),e),o.range=(n,r,a)=>{let i;let s=[];if(n=o.ceil(n),a=null==a?1:Math.floor(a),!(n0))return s;do s.push(i=new Date(+n)),t(n,a),e(n);while(iiw(t=>{if(t>=t)for(;e(t),!n(t);)t.setTime(t-1)},(e,r)=>{if(e>=e){if(r<0)for(;++r<=0;)for(;t(e,-1),!n(e););else for(;--r>=0;)for(;t(e,1),!n(e););}}),n&&(o.count=(t,r)=>(iE.setTime(+t),iS.setTime(+r),e(iE),e(iS),Math.floor(n(iE,iS))),o.every=e=>isFinite(e=Math.floor(e))&&e>0?e>1?o.filter(r?t=>r(t)%e==0:t=>o.count(0,t)%e==0):o:null),o}let ix=iw(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);ix.every=e=>isFinite(e=Math.floor(e))&&e>0?e>1?iw(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):ix:null,ix.range;let iO=iw(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+1e3*t)},(e,t)=>(t-e)/1e3,e=>e.getUTCSeconds());iO.range;let iA=iw(e=>{e.setTime(e-e.getMilliseconds()-1e3*e.getSeconds())},(e,t)=>{e.setTime(+e+6e4*t)},(e,t)=>(t-e)/6e4,e=>e.getMinutes());iA.range;let iT=iw(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+6e4*t)},(e,t)=>(t-e)/6e4,e=>e.getUTCMinutes());iT.range;let iC=iw(e=>{e.setTime(e-e.getMilliseconds()-1e3*e.getSeconds()-6e4*e.getMinutes())},(e,t)=>{e.setTime(+e+36e5*t)},(e,t)=>(t-e)/36e5,e=>e.getHours());iC.range;let ik=iw(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+36e5*t)},(e,t)=>(t-e)/36e5,e=>e.getUTCHours());ik.range;let iI=iw(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*6e4)/864e5,e=>e.getDate()-1);iI.range;let iN=iw(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/864e5,e=>e.getUTCDate()-1);iN.range;let i_=iw(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/864e5,e=>Math.floor(e/864e5));function iR(e){return iw(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(e,t)=>{e.setDate(e.getDate()+7*t)},(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*6e4)/6048e5)}i_.range;let iP=iR(0),iM=iR(1),iL=iR(2),iD=iR(3),ij=iR(4),iF=iR(5),iB=iR(6);function iU(e){return iw(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+7*t)},(e,t)=>(t-e)/6048e5)}iP.range,iM.range,iL.range,iD.range,ij.range,iF.range,iB.range;let iZ=iU(0),iz=iU(1),iH=iU(2),iG=iU(3),i$=iU(4),iW=iU(5),iV=iU(6);iZ.range,iz.range,iH.range,iG.range,i$.range,iW.range,iV.range;let iq=iw(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth());iq.range;let iY=iw(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());iY.range;let iK=iw(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());iK.every=e=>isFinite(e=Math.floor(e))&&e>0?iw(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,n)=>{t.setFullYear(t.getFullYear()+n*e)}):null,iK.range;let iX=iw(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());function iQ(e,t,n,r,o,a){let i=[[iO,1,1e3],[iO,5,5e3],[iO,15,15e3],[iO,30,3e4],[a,1,6e4],[a,5,3e5],[a,15,9e5],[a,30,18e5],[o,1,36e5],[o,3,108e5],[o,6,216e5],[o,12,432e5],[r,1,864e5],[r,2,1728e5],[n,1,6048e5],[t,1,2592e6],[t,3,7776e6],[e,1,31536e6]];function s(t,n,r){let o=Math.abs(n-t)/r,a=o1(e=>{let[,,t]=e;return t}).right(i,o);if(a===i.length)return e.every(oQ(t/31536e6,n/31536e6,r));if(0===a)return ix.every(Math.max(oQ(t,n,r),1));let[s,l]=i[o/i[a-1][2]isFinite(e=Math.floor(e))&&e>0?iw(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)}):null,iX.range;let[iJ,i0]=iQ(iX,iY,iZ,i_,ik,iT),[i1,i2]=iQ(iK,iq,iP,iI,iC,iA);function i4(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function i3(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function i6(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}var i5={"-":"",_:" ",0:"0"},i8=/^\s*\d+/,i9=/^%/,i7=/[\\^$*+?|[\]().{}]/g;function se(e,t,n){var r=e<0?"-":"",o=(r?-e:e)+"",a=o.length;return r+(a[e.toLowerCase(),t]))}function so(e,t,n){var r=i8.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function sa(e,t,n){var r=i8.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function si(e,t,n){var r=i8.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function ss(e,t,n){var r=i8.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function sl(e,t,n){var r=i8.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function sc(e,t,n){var r=i8.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function su(e,t,n){var r=i8.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function sd(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function sp(e,t,n){var r=i8.exec(t.slice(n,n+1));return r?(e.q=3*r[0]-3,n+r[0].length):-1}function sf(e,t,n){var r=i8.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function sm(e,t,n){var r=i8.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function sg(e,t,n){var r=i8.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function sh(e,t,n){var r=i8.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function sb(e,t,n){var r=i8.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function sy(e,t,n){var r=i8.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function sv(e,t,n){var r=i8.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function sE(e,t,n){var r=i8.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function sS(e,t,n){var r=i9.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function sw(e,t,n){var r=i8.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function sx(e,t,n){var r=i8.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function sO(e,t){return se(e.getDate(),t,2)}function sA(e,t){return se(e.getHours(),t,2)}function sT(e,t){return se(e.getHours()%12||12,t,2)}function sC(e,t){return se(1+iI.count(iK(e),e),t,3)}function sk(e,t){return se(e.getMilliseconds(),t,3)}function sI(e,t){return sk(e,t)+"000"}function sN(e,t){return se(e.getMonth()+1,t,2)}function s_(e,t){return se(e.getMinutes(),t,2)}function sR(e,t){return se(e.getSeconds(),t,2)}function sP(e){var t=e.getDay();return 0===t?7:t}function sM(e,t){return se(iP.count(iK(e)-1,e),t,2)}function sL(e){var t=e.getDay();return t>=4||0===t?ij(e):ij.ceil(e)}function sD(e,t){return e=sL(e),se(ij.count(iK(e),e)+(4===iK(e).getDay()),t,2)}function sj(e){return e.getDay()}function sF(e,t){return se(iM.count(iK(e)-1,e),t,2)}function sB(e,t){return se(e.getFullYear()%100,t,2)}function sU(e,t){return se((e=sL(e)).getFullYear()%100,t,2)}function sZ(e,t){return se(e.getFullYear()%1e4,t,4)}function sz(e,t){var n=e.getDay();return se((e=n>=4||0===n?ij(e):ij.ceil(e)).getFullYear()%1e4,t,4)}function sH(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+se(t/60|0,"0",2)+se(t%60,"0",2)}function sG(e,t){return se(e.getUTCDate(),t,2)}function s$(e,t){return se(e.getUTCHours(),t,2)}function sW(e,t){return se(e.getUTCHours()%12||12,t,2)}function sV(e,t){return se(1+iN.count(iX(e),e),t,3)}function sq(e,t){return se(e.getUTCMilliseconds(),t,3)}function sY(e,t){return sq(e,t)+"000"}function sK(e,t){return se(e.getUTCMonth()+1,t,2)}function sX(e,t){return se(e.getUTCMinutes(),t,2)}function sQ(e,t){return se(e.getUTCSeconds(),t,2)}function sJ(e){var t=e.getUTCDay();return 0===t?7:t}function s0(e,t){return se(iZ.count(iX(e)-1,e),t,2)}function s1(e){var t=e.getUTCDay();return t>=4||0===t?i$(e):i$.ceil(e)}function s2(e,t){return e=s1(e),se(i$.count(iX(e),e)+(4===iX(e).getUTCDay()),t,2)}function s4(e){return e.getUTCDay()}function s3(e,t){return se(iz.count(iX(e)-1,e),t,2)}function s6(e,t){return se(e.getUTCFullYear()%100,t,2)}function s5(e,t){return se((e=s1(e)).getUTCFullYear()%100,t,2)}function s8(e,t){return se(e.getUTCFullYear()%1e4,t,4)}function s9(e,t){var n=e.getUTCDay();return se((e=n>=4||0===n?i$(e):i$.ceil(e)).getUTCFullYear()%1e4,t,4)}function s7(){return"+0000"}function le(){return"%"}function lt(e){return+e}function ln(e){return Math.floor(+e/1e3)}function lr(e){return new Date(e)}function lo(e){return e instanceof Date?+e:+new Date(+e)}function la(e,t,n,r,o,a,i,s,l,c){var u=aW(),d=u.invert,p=u.domain,f=c(".%L"),m=c(":%S"),g=c("%I:%M"),h=c("%I %p"),b=c("%a %d"),y=c("%b %d"),v=c("%B"),E=c("%Y");function S(e){return(l(e)1)for(var n,r,o,a=1,i=e[t[0]],s=i.length;a=0;)n[t]=t;return n}function ly(e,t){return e[t]}function lv(e){let t=[];return t.key=e,t}w=(S=function(e){var t=e.dateTime,n=e.date,r=e.time,o=e.periods,a=e.days,i=e.shortDays,s=e.months,l=e.shortMonths,c=sn(o),u=sr(o),d=sn(a),p=sr(a),f=sn(i),m=sr(i),g=sn(s),h=sr(s),b=sn(l),y=sr(l),v={a:function(e){return i[e.getDay()]},A:function(e){return a[e.getDay()]},b:function(e){return l[e.getMonth()]},B:function(e){return s[e.getMonth()]},c:null,d:sO,e:sO,f:sI,g:sU,G:sz,H:sA,I:sT,j:sC,L:sk,m:sN,M:s_,p:function(e){return o[+(e.getHours()>=12)]},q:function(e){return 1+~~(e.getMonth()/3)},Q:lt,s:ln,S:sR,u:sP,U:sM,V:sD,w:sj,W:sF,x:null,X:null,y:sB,Y:sZ,Z:sH,"%":le},E={a:function(e){return i[e.getUTCDay()]},A:function(e){return a[e.getUTCDay()]},b:function(e){return l[e.getUTCMonth()]},B:function(e){return s[e.getUTCMonth()]},c:null,d:sG,e:sG,f:sY,g:s5,G:s9,H:s$,I:sW,j:sV,L:sq,m:sK,M:sX,p:function(e){return o[+(e.getUTCHours()>=12)]},q:function(e){return 1+~~(e.getUTCMonth()/3)},Q:lt,s:ln,S:sQ,u:sJ,U:s0,V:s2,w:s4,W:s3,x:null,X:null,y:s6,Y:s8,Z:s7,"%":le},S={a:function(e,t,n){var r=f.exec(t.slice(n));return r?(e.w=m.get(r[0].toLowerCase()),n+r[0].length):-1},A:function(e,t,n){var r=d.exec(t.slice(n));return r?(e.w=p.get(r[0].toLowerCase()),n+r[0].length):-1},b:function(e,t,n){var r=b.exec(t.slice(n));return r?(e.m=y.get(r[0].toLowerCase()),n+r[0].length):-1},B:function(e,t,n){var r=g.exec(t.slice(n));return r?(e.m=h.get(r[0].toLowerCase()),n+r[0].length):-1},c:function(e,n,r){return O(e,t,n,r)},d:sm,e:sm,f:sE,g:su,G:sc,H:sh,I:sh,j:sg,L:sv,m:sf,M:sb,p:function(e,t,n){var r=c.exec(t.slice(n));return r?(e.p=u.get(r[0].toLowerCase()),n+r[0].length):-1},q:sp,Q:sw,s:sx,S:sy,u:sa,U:si,V:ss,w:so,W:sl,x:function(e,t,r){return O(e,n,t,r)},X:function(e,t,n){return O(e,r,t,n)},y:su,Y:sc,Z:sd,"%":sS};function w(e,t){return function(n){var r,o,a,i=[],s=-1,l=0,c=e.length;for(n instanceof Date||(n=new Date(+n));++s53)return null;"w"in a||(a.w=1),"Z"in a?(r=(o=(r=i3(i6(a.y,0,1))).getUTCDay())>4||0===o?iz.ceil(r):iz(r),r=iN.offset(r,(a.V-1)*7),a.y=r.getUTCFullYear(),a.m=r.getUTCMonth(),a.d=r.getUTCDate()+(a.w+6)%7):(r=(o=(r=i4(i6(a.y,0,1))).getDay())>4||0===o?iM.ceil(r):iM(r),r=iI.offset(r,(a.V-1)*7),a.y=r.getFullYear(),a.m=r.getMonth(),a.d=r.getDate()+(a.w+6)%7)}else("W"in a||"U"in a)&&("w"in a||(a.w="u"in a?a.u%7:"W"in a?1:0),o="Z"in a?i3(i6(a.y,0,1)).getUTCDay():i4(i6(a.y,0,1)).getDay(),a.m=0,a.d="W"in a?(a.w+6)%7+7*a.W-(o+5)%7:a.w+7*a.U-(o+6)%7);return"Z"in a?(a.H+=a.Z/100|0,a.M+=a.Z%100,i3(a)):i4(a)}}function O(e,t,n,r){for(var o,a,i=0,s=t.length,l=n.length;i=l)return -1;if(37===(o=t.charCodeAt(i++))){if(!(a=S[(o=t.charAt(i++))in i5?t.charAt(i++):o])||(r=a(e,n,r))<0)return -1}else if(o!=n.charCodeAt(r++))return -1}return r}return v.x=w(n,v),v.X=w(r,v),v.c=w(t,v),E.x=w(n,E),E.X=w(r,E),E.c=w(t,E),{format:function(e){var t=w(e+="",v);return t.toString=function(){return e},t},parse:function(e){var t=x(e+="",!1);return t.toString=function(){return e},t},utcFormat:function(e){var t=w(e+="",E);return t.toString=function(){return e},t},utcParse:function(e){var t=x(e+="",!0);return t.toString=function(){return e},t}}}({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]})).format,S.parse,x=S.utcFormat,S.utcParse,Array.prototype.slice;var lE=n(5037),lS=n.n(lE),lw=n(30264),lx=n.n(lw),lO=n(20734),lA=n.n(lO),lT=n(93574),lC=n.n(lT),lk=n(6122),lI=n.n(lk);function lN(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n=t?n.apply(void 0,o):e(t-i,lM(function(){for(var e=arguments.length,t=Array(e),r=0;re.length)&&(t=e.length);for(var n=0,r=Array(t);nr&&(o=r,a=n),[o,a]}function lV(e,t,n){if(e.lte(0))return new(lI())(0);var r=lZ.getDigitCount(e.toNumber()),o=new(lI())(10).pow(r),a=e.div(o),i=1!==r?.05:.1,s=new(lI())(Math.ceil(a.div(i).toNumber())).add(n).mul(i).mul(o);return t?s:new(lI())(Math.ceil(s))}function lq(e,t,n){var r=1,o=new(lI())(e);if(!o.isint()&&n){var a=Math.abs(e);a<1?(r=new(lI())(10).pow(lZ.getDigitCount(e)-1),o=new(lI())(Math.floor(o.div(r).toNumber())).mul(r)):a>1&&(o=new(lI())(Math.floor(e)))}else 0===e?o=new(lI())(Math.floor((t-1)/2)):n||(o=new(lI())(Math.floor(e)));var i=Math.floor((t-1)/2);return lF(lj(function(e){return o.add(new(lI())(e-i).mul(r)).toNumber()}),lD)(0,t)}var lY=lU(function(e){var t=lH(e,2),n=t[0],r=t[1],o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:6,a=!(arguments.length>2)||void 0===arguments[2]||arguments[2],i=Math.max(o,2),s=lH(lW([n,r]),2),l=s[0],c=s[1];if(l===-1/0||c===1/0){var u=c===1/0?[l].concat(lz(lD(0,o-1).map(function(){return 1/0}))):[].concat(lz(lD(0,o-1).map(function(){return-1/0})),[c]);return n>r?lB(u):u}if(l===c)return lq(l,o,a);var d=function e(t,n,r,o){var a,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0;if(!Number.isFinite((n-t)/(r-1)))return{step:new(lI())(0),tickMin:new(lI())(0),tickMax:new(lI())(0)};var s=lV(new(lI())(n).sub(t).div(r-1),o,i),l=Math.ceil((a=t<=0&&n>=0?new(lI())(0):(a=new(lI())(t).add(n).div(2)).sub(new(lI())(a).mod(s))).sub(t).div(s).toNumber()),c=Math.ceil(new(lI())(n).sub(a).div(s).toNumber()),u=l+c+1;return u>r?e(t,n,r,o,i+1):(u0?c+(r-u):c,l=n>0?l:l+(r-u)),{step:s,tickMin:a.sub(new(lI())(l).mul(s)),tickMax:a.add(new(lI())(c).mul(s))})}(l,c,i,a),p=d.step,f=d.tickMin,m=d.tickMax,g=lZ.rangeStep(f,m.add(new(lI())(.1).mul(p)),p);return n>r?lB(g):g});lU(function(e){var t=lH(e,2),n=t[0],r=t[1],o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:6,a=!(arguments.length>2)||void 0===arguments[2]||arguments[2],i=Math.max(o,2),s=lH(lW([n,r]),2),l=s[0],c=s[1];if(l===-1/0||c===1/0)return[n,r];if(l===c)return lq(l,o,a);var u=lV(new(lI())(c).sub(l).div(i-1),a,0),d=lF(lj(function(e){return new(lI())(l).add(new(lI())(e).mul(u)).toNumber()}),lD)(0,i).filter(function(e){return e>=l&&e<=c});return n>r?lB(d):d});var lK=lU(function(e,t){var n=lH(e,2),r=n[0],o=n[1],a=!(arguments.length>2)||void 0===arguments[2]||arguments[2],i=lH(lW([r,o]),2),s=i[0],l=i[1];if(s===-1/0||l===1/0)return[r,o];if(s===l)return[s];var c=lV(new(lI())(l).sub(s).div(Math.max(t,2)-1),a,0),u=[].concat(lz(lZ.rangeStep(new(lI())(s),new(lI())(l).sub(new(lI())(.99).mul(c)),c)),[l]);return r>o?lB(u):u}),lX=["offset","layout","width","dataKey","data","dataPointFormatter","xAxis","yAxis"];function lQ(){return(lQ=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=Array(t);n=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,lX),!1);"x"===e.direction&&"number"!==s.type&&eW(!1);var u=a.map(function(e){var a,u,d=i(e,o),p=d.x,f=d.y,m=d.value,g=d.errorVal;if(!g)return null;var h=[];if(Array.isArray(g)){var b=function(e){if(Array.isArray(e))return e}(g)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a,i,s=[],l=!0,c=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(c)throw o}}return s}}(g,2)||function(e,t){if(e){if("string"==typeof e)return lJ(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return lJ(e,t)}}(g,2)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}();a=b[0],u=b[1]}else a=u=g;if("vertical"===n){var y=s.scale,v=f+t,E=v+r,S=v-r,w=y(m-a),x=y(m+u);h.push({x1:x,y1:E,x2:x,y2:S}),h.push({x1:w,y1:v,x2:x,y2:v}),h.push({x1:w,y1:E,x2:w,y2:S})}else if("horizontal"===n){var O=l.scale,A=p+t,T=A-r,C=A+r,k=O(m-a),I=O(m+u);h.push({x1:T,y1:I,x2:C,y2:I}),h.push({x1:A,y1:k,x2:A,y2:I}),h.push({x1:T,y1:k,x2:C,y2:k})}return N.createElement(eQ,lQ({className:"recharts-errorBar",key:"bar-".concat(h.map(function(e){return"".concat(e.x1,"-").concat(e.x2,"-").concat(e.y1,"-").concat(e.y2)}))},c),h.map(function(e){return N.createElement("line",lQ({},e,{key:"line-".concat(e.x1,"-").concat(e.x2,"-").concat(e.y1,"-").concat(e.y2)}))}))});return N.createElement(eQ,{className:"recharts-errorBars"},u)}function l1(e){return(l1="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function l2(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function l4(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=Array(t);n1&&void 0!==arguments[1]?arguments[1]:[],r=arguments.length>2?arguments[2]:void 0,o=arguments.length>3?arguments[3]:void 0,a=-1,i=null!==(t=null==n?void 0:n.length)&&void 0!==t?t:0;if(i<=1)return 0;if(o&&"angleAxis"===o.axisType&&1e-6>=Math.abs(Math.abs(o.range[1]-o.range[0])-360))for(var s=o.range,l=0;l0?r[l-1].coordinate:r[i-1].coordinate,u=r[l].coordinate,d=l>=i-1?r[0].coordinate:r[l+1].coordinate,p=void 0;if(H(u-c)!==H(d-u)){var f=[];if(H(d-u)===H(s[1]-s[0])){p=d;var m=u+s[1]-s[0];f[0]=Math.min(m,(m+c)/2),f[1]=Math.max(m,(m+c)/2)}else{p=c;var g=d+s[1]-s[0];f[0]=Math.min(u,(g+u)/2),f[1]=Math.max(u,(g+u)/2)}var h=[Math.min(u,(p+u)/2),Math.max(u,(p+u)/2)];if(e>h[0]&&e<=h[1]||e>=f[0]&&e<=f[1]){a=r[l].index;break}}else{var b=Math.min(c,d),y=Math.max(c,d);if(e>(b+u)/2&&e<=(y+u)/2){a=r[l].index;break}}}else for(var v=0;v0&&v(n[v].coordinate+n[v-1].coordinate)/2&&e<=(n[v].coordinate+n[v+1].coordinate)/2||v===i-1&&e>(n[v].coordinate+n[v-1].coordinate)/2){a=n[v].index;break}return a},co=function(e){var t,n=e.type.displayName,r=e.props,o=r.stroke,a=r.fill;switch(n){case"Line":t=o;break;case"Area":case"Radar":t=o&&"none"!==o?o:a;break;default:t=a}return t},ca=function(e){var t=e.barSize,n=e.stackGroups,r=void 0===n?{}:n;if(!r)return{};for(var o={},a=Object.keys(r),i=0,s=a.length;i=0});if(g&&g.length){var h=g[0].props.barSize,b=g[0].props[m];o[b]||(o[b]=[]),o[b].push({item:g[0],stackList:g.slice(1),barSize:en()(h)?t:h})}}return o},ci=function(e){var t,n=e.barGap,r=e.barCategoryGap,o=e.bandSize,a=e.sizeList,i=void 0===a?[]:a,s=e.maxBarSize,l=i.length;if(l<1)return null;var c=Y(n,o,0,!0),u=[];if(i[0].barSize===+i[0].barSize){var d=!1,p=o/l,f=i.reduce(function(e,t){return e+t.barSize||0},0);(f+=(l-1)*c)>=o&&(f-=(l-1)*c,c=0),f>=o&&p>0&&(d=!0,p*=.9,f=l*p);var m={offset:((o-f)/2>>0)-c,size:0};t=i.reduce(function(e,t){var n={item:t.item,position:{offset:m.offset+m.size+c,size:d?p:t.barSize}},r=[].concat(l7(e),[n]);return m=r[r.length-1].position,t.stackList&&t.stackList.length&&t.stackList.forEach(function(e){r.push({item:e,position:m})}),r},u)}else{var g=Y(r,o,0,!0);o-2*g-(l-1)*c<=0&&(c=0);var h=(o-2*g-(l-1)*c)/l;h>1&&(h>>=0);var b=s===+s?Math.min(h,s):h;t=i.reduce(function(e,t,n){var r=[].concat(l7(e),[{item:t.item,position:{offset:g+(h+c)*n+(h-b)/2,size:b}}]);return t.stackList&&t.stackList.length&&t.stackList.forEach(function(e){r.push({item:e,position:r[r.length-1].position})}),r},u)}return t},cs=function(e,t,n,r){var o=n.children,a=n.width,i=n.margin,s=l3({children:o,legendWidth:a-(i.left||0)-(i.right||0)});if(s){var l=r||{},c=l.width,u=l.height,d=s.align,p=s.verticalAlign,f=s.layout;if(("vertical"===f||"horizontal"===f&&"middle"===p)&&"center"!==d&&$(e[d]))return l8(l8({},e),{},l9({},d,e[d]+(c||0)));if(("horizontal"===f||"vertical"===f&&"center"===d)&&"middle"!==p&&$(e[p]))return l8(l8({},e),{},l9({},p,e[p]+(u||0)))}return e},cl=function(e,t,n,r,o){var a=ex(t.props.children,l0).filter(function(e){var t;return t=e.props.direction,!!en()(o)||("horizontal"===r?"yAxis"===o:"vertical"===r||"x"===t?"xAxis"===o:"y"!==t||"yAxis"===o)});if(a&&a.length){var i=a.map(function(e){return e.props.dataKey});return e.reduce(function(e,t){var r=ct(t,n,0),o=Array.isArray(r)?[lx()(r),lS()(r)]:[r,r],a=i.reduce(function(e,n){var r=ct(t,n,0),a=o[0]-Math.abs(Array.isArray(r)?r[0]:r),i=o[1]+Math.abs(Array.isArray(r)?r[1]:r);return[Math.min(a,e[0]),Math.max(i,e[1])]},[1/0,-1/0]);return[Math.min(a[0],e[0]),Math.max(a[1],e[1])]},[1/0,-1/0])}return null},cc=function(e,t,n,r,o){var a=t.map(function(t){return cl(e,t,n,o,r)}).filter(function(e){return!en()(e)});return a&&a.length?a.reduce(function(e,t){return[Math.min(e[0],t[0]),Math.max(e[1],t[1])]},[1/0,-1/0]):null},cu=function(e,t,n,r,o){var a=t.map(function(t){var a=t.props.dataKey;return"number"===n&&a&&cl(e,t,a,r)||cn(e,a,n,o)});if("number"===n)return a.reduce(function(e,t){return[Math.min(e[0],t[0]),Math.max(e[1],t[1])]},[1/0,-1/0]);var i={};return a.reduce(function(e,t){for(var n=0,r=t.length;n=2?2*H(i[0]-i[1])*l:l,t&&(e.ticks||e.niceTicks))?(e.ticks||e.niceTicks).map(function(e){return{coordinate:r(o?o.indexOf(e):e)+l,value:e,offset:l}}).filter(function(e){return!F()(e.coordinate)}):e.isCategorical&&e.categoricalDomain?e.categoricalDomain.map(function(e,t){return{coordinate:r(e)+l,value:e,index:t,offset:l}}):r.ticks&&!n?r.ticks(e.tickCount).map(function(e){return{coordinate:r(e)+l,value:e,offset:l}}):r.domain().map(function(e,t){return{coordinate:r(e)+l,value:o?o[e]:e,index:t,offset:l}})},cm=new WeakMap,cg=function(e,t){if("function"!=typeof t)return e;cm.has(e)||cm.set(e,new WeakMap);var n=cm.get(e);if(n.has(t))return n.get(t);var r=function(){e.apply(void 0,arguments),t.apply(void 0,arguments)};return n.set(t,r),r},ch=function(e,t,n){var r=e.scale,o=e.type,a=e.layout,i=e.axisType;if("auto"===r)return"radial"===a&&"radiusAxis"===i?{scale:ou(),realScaleType:"band"}:"radial"===a&&"angleAxis"===i?{scale:a6(),realScaleType:"linear"}:"category"===o&&t&&(t.indexOf("LineChart")>=0||t.indexOf("AreaChart")>=0||t.indexOf("ComposedChart")>=0&&!n)?{scale:od(),realScaleType:"point"}:"category"===o?{scale:ou(),realScaleType:"band"}:{scale:a6(),realScaleType:"linear"};if(D()(r)){var s="scale".concat(nQ()(r));return{scale:(O[s]||od)(),realScaleType:O[s]?s:"point"}}return eo()(r)?{scale:r}:{scale:od(),realScaleType:"point"}},cb=function(e){var t=e.domain();if(t&&!(t.length<=2)){var n=t.length,r=e.range(),o=Math.min(r[0],r[1])-1e-4,a=Math.max(r[0],r[1])+1e-4,i=e(t[0]),s=e(t[n-1]);(ia||sa)&&e.domain([t[0],t[n-1]])}},cy=function(e,t){if(!e)return null;for(var n=0,r=e.length;nr)&&(o[1]=r),o[0]>r&&(o[0]=r),o[1]=0?(e[i][n][0]=o,e[i][n][1]=o+s,o=e[i][n][1]):(e[i][n][0]=a,e[i][n][1]=a+s,a=e[i][n][1])}},expand:function(e,t){if((r=e.length)>0){for(var n,r,o,a=0,i=e[0].length;a0){for(var n,r=0,o=e[t[0]],a=o.length;r0&&(r=(n=e[t[0]]).length)>0){for(var n,r,o,a=0,i=1;i=0?(e[a][n][0]=o,e[a][n][1]=o+i,o=e[a][n][1]):(e[a][n][0]=0,e[a][n][1]=0)}}},cS=function(e,t,n){var r=t.map(function(e){return e.props.dataKey}),o=cE[n];return(function(){var e=ro([]),t=lb,n=lg,r=ly;function o(o){var a,i,s=Array.from(e.apply(this,arguments),lv),l=s.length,c=-1;for(let e of o)for(a=0,++c;a=0?0:o<0?o:r}return n[0]},cT=function(e,t){var n=e.props.stackId;if(W(n)){var r=t[n];if(r){var o=r.items.indexOf(e);return o>=0?r.stackedData[o]:null}}return null},cC=function(e,t,n){return Object.keys(e).reduce(function(r,o){var a=e[o].stackedData.reduce(function(e,r){var o=r.slice(t,n+1).reduce(function(e,t){return[lx()(t.concat([e[0]]).filter($)),lS()(t.concat([e[1]]).filter($))]},[1/0,-1/0]);return[Math.min(e[0],o[0]),Math.max(e[1],o[1])]},[1/0,-1/0]);return[Math.min(a[0],r[0]),Math.max(a[1],r[1])]},[1/0,-1/0]).map(function(e){return e===1/0||e===-1/0?0:e})},ck=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,cI=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,cN=function(e,t,n){if(eo()(e))return e(t,n);if(!Array.isArray(e))return t;var r=[];if($(e[0]))r[0]=n?e[0]:Math.min(e[0],t[0]);else if(ck.test(e[0])){var o=+ck.exec(e[0])[1];r[0]=t[0]-o}else eo()(e[0])?r[0]=e[0](t[0]):r[0]=t[0];if($(e[1]))r[1]=n?e[1]:Math.max(e[1],t[1]);else if(cI.test(e[1])){var a=+cI.exec(e[1])[1];r[1]=t[1]+a}else eo()(e[1])?r[1]=e[1](t[1]):r[1]=t[1];return r},c_=function(e,t,n){if(e&&e.scale&&e.scale.bandwidth){var r=e.scale.bandwidth();if(!n||r>0)return r}if(e&&t&&t.length>=2){for(var o=eZ()(t,function(e){return e.coordinate}),a=1/0,i=1,s=o.length;i0&&t.handleDrag(e.changedTouches[0])}),cq(cW(t),"handleDragEnd",function(){t.setState({isTravellerMoving:!1,isSlideMoving:!1},function(){var e=t.props,n=e.endIndex,r=e.onDragEnd,o=e.startIndex;null==r||r({endIndex:n,startIndex:o})}),t.detachDragEndListener()}),cq(cW(t),"handleLeaveWrapper",function(){(t.state.isTravellerMoving||t.state.isSlideMoving)&&(t.leaveTimer=window.setTimeout(t.handleDragEnd,t.props.leaveTimeOut))}),cq(cW(t),"handleEnterSlideOrTraveller",function(){t.setState({isTextActive:!0})}),cq(cW(t),"handleLeaveSlideOrTraveller",function(){t.setState({isTextActive:!1})}),cq(cW(t),"handleSlideDragStart",function(e){var n=cX(e)?e.changedTouches[0]:e;t.setState({isTravellerMoving:!1,isSlideMoving:!0,slideMoveStartX:n.pageX}),t.attachDragEndListener()}),t.travellerDragStartHandlers={startX:t.handleTravellerDragStart.bind(cW(t),"startX"),endX:t.handleTravellerDragStart.bind(cW(t),"endX")},t.state={},t}return n=[{key:"componentWillUnmount",value:function(){this.leaveTimer&&(clearTimeout(this.leaveTimer),this.leaveTimer=null),this.detachDragEndListener()}},{key:"getIndex",value:function(e){var t=e.startX,n=e.endX,r=this.state.scaleValues,o=this.props,i=o.gap,s=o.data.length-1,l=a.getIndexInRange(r,Math.min(t,n)),c=a.getIndexInRange(r,Math.max(t,n));return{startIndex:l-l%i,endIndex:c===s?s:c-c%i}}},{key:"getTextOfTick",value:function(e){var t=this.props,n=t.data,r=t.tickFormatter,o=t.dataKey,a=ct(n[e],o,e);return eo()(r)?r(a,e):a}},{key:"attachDragEndListener",value:function(){window.addEventListener("mouseup",this.handleDragEnd,!0),window.addEventListener("touchend",this.handleDragEnd,!0),window.addEventListener("mousemove",this.handleDrag,!0)}},{key:"detachDragEndListener",value:function(){window.removeEventListener("mouseup",this.handleDragEnd,!0),window.removeEventListener("touchend",this.handleDragEnd,!0),window.removeEventListener("mousemove",this.handleDrag,!0)}},{key:"handleSlideDrag",value:function(e){var t=this.state,n=t.slideMoveStartX,r=t.startX,o=t.endX,a=this.props,i=a.x,s=a.width,l=a.travellerWidth,c=a.startIndex,u=a.endIndex,d=a.onChange,p=e.pageX-n;p>0?p=Math.min(p,i+s-l-o,i+s-l-r):p<0&&(p=Math.max(p,i-r,i-o));var f=this.getIndex({startX:r+p,endX:o+p});(f.startIndex!==c||f.endIndex!==u)&&d&&d(f),this.setState({startX:r+p,endX:o+p,slideMoveStartX:e.pageX})}},{key:"handleTravellerDragStart",value:function(e,t){var n=cX(t)?t.changedTouches[0]:t;this.setState({isSlideMoving:!1,isTravellerMoving:!0,movingTravellerId:e,brushMoveStartX:n.pageX}),this.attachDragEndListener()}},{key:"handleTravellerMove",value:function(e){var t,n=this.state,r=n.brushMoveStartX,o=n.movingTravellerId,a=n.endX,i=n.startX,s=this.state[o],l=this.props,c=l.x,u=l.width,d=l.travellerWidth,p=l.onChange,f=l.gap,m=l.data,g={startX:this.state.startX,endX:this.state.endX},h=e.pageX-r;h>0?h=Math.min(h,c+u-d-s):h<0&&(h=Math.max(h,c-s)),g[o]=s+h;var b=this.getIndex(g),y=b.startIndex,v=b.endIndex,E=function(){var e=m.length-1;return"startX"===o&&(a>i?y%f==0:v%f==0)||ai?v%f==0:y%f==0)||a>i&&v===e};this.setState((cq(t={},o,s+h),cq(t,"brushMoveStartX",e.pageX),t),function(){p&&E()&&p(b)})}},{key:"handleTravellerMoveKeyboard",value:function(e,t){var n=this,r=this.state,o=r.scaleValues,a=r.startX,i=r.endX,s=this.state[t],l=o.indexOf(s);if(-1!==l){var c=l+e;if(-1!==c&&!(c>=o.length)){var u=o[c];"startX"===t&&u>=i||"endX"===t&&u<=a||this.setState(cq({},t,u),function(){n.props.onChange(n.getIndex({startX:n.state.startX,endX:n.state.endX}))})}}}},{key:"renderBackground",value:function(){var e=this.props,t=e.x,n=e.y,r=e.width,o=e.height,a=e.fill,i=e.stroke;return N.createElement("rect",{stroke:i,fill:a,x:t,y:n,width:r,height:o})}},{key:"renderPanorama",value:function(){var e=this.props,t=e.x,n=e.y,r=e.width,o=e.height,a=e.data,i=e.children,s=e.padding,l=N.Children.only(i);return l?N.cloneElement(l,{x:t,y:n,width:r,height:o,margin:s,compact:!0,data:a}):null}},{key:"renderTravellerLayer",value:function(e,t){var n=this,r=this.props,o=r.y,i=r.travellerWidth,s=r.height,l=r.traveller,c=r.ariaLabel,u=r.data,d=r.startIndex,p=r.endIndex,f=Math.max(e,this.props.x),m=cH(cH({},ek(this.props,!1)),{},{x:f,y:o,width:i,height:s}),g=c||"Min value: ".concat(u[d].name,", Max value: ").concat(u[p].name);return N.createElement(eQ,{tabIndex:0,role:"slider","aria-label":g,"aria-valuenow":e,className:"recharts-brush-traveller",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.travellerDragStartHandlers[t],onTouchStart:this.travellerDragStartHandlers[t],onKeyDown:function(e){["ArrowLeft","ArrowRight"].includes(e.key)&&(e.preventDefault(),e.stopPropagation(),n.handleTravellerMoveKeyboard("ArrowRight"===e.key?1:-1,t))},onFocus:function(){n.setState({isTravellerFocused:!0})},onBlur:function(){n.setState({isTravellerFocused:!1})},style:{cursor:"col-resize"}},a.renderTraveller(l,m))}},{key:"renderSlide",value:function(e,t){var n=this.props,r=n.y,o=n.height,a=n.stroke,i=n.travellerWidth;return N.createElement("rect",{className:"recharts-brush-slide",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.handleSlideDragStart,onTouchStart:this.handleSlideDragStart,style:{cursor:"move"},stroke:"none",fill:a,fillOpacity:.2,x:Math.min(e,t)+i,y:r,width:Math.max(Math.abs(t-e)-i,0),height:o})}},{key:"renderText",value:function(){var e=this.props,t=e.startIndex,n=e.endIndex,r=e.y,o=e.height,a=e.travellerWidth,i=e.stroke,s=this.state,l=s.startX,c=s.endX,u={pointerEvents:"none",fill:i};return N.createElement(eQ,{className:"recharts-brush-texts"},N.createElement(o$,cZ({textAnchor:"end",verticalAnchor:"middle",x:Math.min(l,c)-5,y:r+o/2},u),this.getTextOfTick(t)),N.createElement(o$,cZ({textAnchor:"start",verticalAnchor:"middle",x:Math.max(l,c)+a+5,y:r+o/2},u),this.getTextOfTick(n)))}},{key:"render",value:function(){var e=this.props,t=e.data,n=e.className,r=e.children,o=e.x,a=e.y,i=e.width,s=e.height,l=e.alwaysShowText,c=this.state,u=c.startX,d=c.endX,p=c.isTextActive,f=c.isSlideMoving,m=c.isTravellerMoving,g=c.isTravellerFocused;if(!t||!t.length||!$(o)||!$(a)||!$(i)||!$(s)||i<=0||s<=0)return null;var h=_("recharts-brush",n),b=1===N.Children.count(r),y=cB("userSelect","none");return N.createElement(eQ,{className:h,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:y},this.renderBackground(),b&&this.renderPanorama(),this.renderSlide(u,d),this.renderTravellerLayer(u,"startX"),this.renderTravellerLayer(d,"endX"),(p||f||m||g||l)&&this.renderText())}}],r=[{key:"renderDefaultTraveller",value:function(e){var t=e.x,n=e.y,r=e.width,o=e.height,a=e.stroke,i=Math.floor(n+o/2)-1;return N.createElement(N.Fragment,null,N.createElement("rect",{x:t,y:n,width:r,height:o,fill:a,stroke:"none"}),N.createElement("line",{x1:t+1,y1:i,x2:t+r-1,y2:i,fill:"none",stroke:"#fff"}),N.createElement("line",{x1:t+1,y1:i+2,x2:t+r-1,y2:i+2,fill:"none",stroke:"#fff"}))}},{key:"renderTraveller",value:function(e,t){return N.isValidElement(e)?N.cloneElement(e,t):eo()(e)?e(t):a.renderDefaultTraveller(t)}},{key:"getDerivedStateFromProps",value:function(e,t){var n=e.data,r=e.width,o=e.x,a=e.travellerWidth,i=e.updateId,s=e.startIndex,l=e.endIndex;if(n!==t.prevData||i!==t.prevUpdateId)return cH({prevData:n,prevTravellerWidth:a,prevUpdateId:i,prevX:o,prevWidth:r},n&&n.length?cK({data:n,width:r,x:o,travellerWidth:a,startIndex:s,endIndex:l}):{scale:null,scaleValues:null});if(t.scale&&(r!==t.prevWidth||o!==t.prevX||a!==t.prevTravellerWidth)){t.scale.range([o,o+r-a]);var c=t.scale.domain().map(function(e){return t.scale(e)});return{prevData:n,prevTravellerWidth:a,prevUpdateId:i,prevX:o,prevWidth:r,startX:t.scale(e.startIndex),endX:t.scale(e.endIndex),scaleValues:c}}return null}},{key:"getIndexInRange",value:function(e,t){for(var n=e.length,r=0,o=n-1;o-r>1;){var a=Math.floor((r+o)/2);e[a]>t?o=a:r=a}return t>=e[o]?o:r}}],n&&cG(a.prototype,n),r&&cG(a,r),Object.defineProperty(a,"prototype",{writable:!1}),a}(N.PureComponent);function cJ(e){return(cJ="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function c0(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function c1(e){for(var t=1;ta&&(s=2*Math.PI-s),{radius:i,angle:180*s/Math.PI,angleInRadian:s}},c5=function(e){var t=e.startAngle,n=e.endAngle,r=Math.min(Math.floor(t/360),Math.floor(n/360));return{startAngle:t-360*r,endAngle:n-360*r}},c8=function(e,t){var n,r=c6({x:e.x,y:e.y},t),o=r.radius,a=r.angle,i=t.innerRadius,s=t.outerRadius;if(os)return!1;if(0===o)return!0;var l=c5(t),c=l.startAngle,u=l.endAngle,d=a;if(c<=u){for(;d>u;)d-=360;for(;d=c&&d<=u}else{for(;d>c;)d-=360;for(;d=u&&d<=c}return n?c1(c1({},t),{},{radius:o,angle:d+360*Math.min(Math.floor(t.startAngle/360),Math.floor(t.endAngle/360))}):null};function c9(e){return(c9="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var c7=["offset"];function ue(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n=0?1:-1;"insideStart"===a?(r=f+y*s,o=g):"insideEnd"===a?(r=m-y*s,o=!g):"end"===a&&(r=m+y*s,o=g),o=b<=0?o:!o;var v=c4(c,u,h,r),E=c4(c,u,h,r+(o?1:-1)*359),S="M".concat(v.x,",").concat(v.y,"\n A").concat(h,",").concat(h,",0,1,").concat(o?0:1,",\n ").concat(E.x,",").concat(E.y),w=en()(e.id)?q("recharts-radial-line-"):e.id;return N.createElement("text",ur({},n,{dominantBaseline:"central",className:_("recharts-radial-bar-label",l)}),N.createElement("defs",null,N.createElement("path",{id:w,d:S})),N.createElement("textPath",{xlinkHref:"#".concat(w)},t))},ui=function(e){var t=e.viewBox,n=e.offset,r=e.position,o=t.cx,a=t.cy,i=t.innerRadius,s=t.outerRadius,l=(t.startAngle+t.endAngle)/2;if("outside"===r){var c=c4(o,a,s+n,l),u=c.x;return{x:u,y:c.y,textAnchor:u>=o?"start":"end",verticalAnchor:"middle"}}if("center"===r)return{x:o,y:a,textAnchor:"middle",verticalAnchor:"middle"};if("centerTop"===r)return{x:o,y:a,textAnchor:"middle",verticalAnchor:"start"};if("centerBottom"===r)return{x:o,y:a,textAnchor:"middle",verticalAnchor:"end"};var d=c4(o,a,(i+s)/2,l);return{x:d.x,y:d.y,textAnchor:"middle",verticalAnchor:"middle"}},us=function(e){var t=e.viewBox,n=e.parentViewBox,r=e.offset,o=e.position,a=t.x,i=t.y,s=t.width,l=t.height,c=l>=0?1:-1,u=c*r,d=c>0?"end":"start",p=c>0?"start":"end",f=s>=0?1:-1,m=f*r,g=f>0?"end":"start",h=f>0?"start":"end";if("top"===o)return un(un({},{x:a+s/2,y:i-c*r,textAnchor:"middle",verticalAnchor:d}),n?{height:Math.max(i-n.y,0),width:s}:{});if("bottom"===o)return un(un({},{x:a+s/2,y:i+l+u,textAnchor:"middle",verticalAnchor:p}),n?{height:Math.max(n.y+n.height-(i+l),0),width:s}:{});if("left"===o){var b={x:a-m,y:i+l/2,textAnchor:g,verticalAnchor:"middle"};return un(un({},b),n?{width:Math.max(b.x-n.x,0),height:l}:{})}if("right"===o){var y={x:a+s+m,y:i+l/2,textAnchor:h,verticalAnchor:"middle"};return un(un({},y),n?{width:Math.max(n.x+n.width-y.x,0),height:l}:{})}var v=n?{width:s,height:l}:{};return"insideLeft"===o?un({x:a+m,y:i+l/2,textAnchor:h,verticalAnchor:"middle"},v):"insideRight"===o?un({x:a+s-m,y:i+l/2,textAnchor:g,verticalAnchor:"middle"},v):"insideTop"===o?un({x:a+s/2,y:i+u,textAnchor:"middle",verticalAnchor:p},v):"insideBottom"===o?un({x:a+s/2,y:i+l-u,textAnchor:"middle",verticalAnchor:d},v):"insideTopLeft"===o?un({x:a+m,y:i+u,textAnchor:h,verticalAnchor:p},v):"insideTopRight"===o?un({x:a+s-m,y:i+u,textAnchor:g,verticalAnchor:p},v):"insideBottomLeft"===o?un({x:a+m,y:i+l-u,textAnchor:h,verticalAnchor:d},v):"insideBottomRight"===o?un({x:a+s-m,y:i+l-u,textAnchor:g,verticalAnchor:d},v):ei()(o)&&($(o.x)||G(o.x))&&($(o.y)||G(o.y))?un({x:a+Y(o.x,s),y:i+Y(o.y,l),textAnchor:"end",verticalAnchor:"end"},v):un({x:a+s/2,y:i+l/2,textAnchor:"middle",verticalAnchor:"middle"},v)};function ul(e){var t,n=e.offset,r=un({offset:void 0===n?5:n},function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,c7)),o=r.viewBox,a=r.position,i=r.value,s=r.children,l=r.content,c=r.className,u=r.textBreakAll;if(!o||en()(i)&&en()(s)&&!(0,N.isValidElement)(l)&&!eo()(l))return null;if((0,N.isValidElement)(l))return(0,N.cloneElement)(l,r);if(eo()(l)){if(t=(0,N.createElement)(l,r),(0,N.isValidElement)(t))return t}else t=uo(r);var d="cx"in o&&$(o.cx),p=ek(r,!0);if(d&&("insideStart"===a||"insideEnd"===a||"end"===a))return ua(r,t,p);var f=d?ui(r):us(r);return N.createElement(o$,ur({className:_("recharts-label",void 0===c?"":c)},p,f,{breakAll:u}),t)}ul.displayName="Label";var uc=function(e){var t=e.cx,n=e.cy,r=e.angle,o=e.startAngle,a=e.endAngle,i=e.r,s=e.radius,l=e.innerRadius,c=e.outerRadius,u=e.x,d=e.y,p=e.top,f=e.left,m=e.width,g=e.height,h=e.clockWise,b=e.labelViewBox;if(b)return b;if($(m)&&$(g)){if($(u)&&$(d))return{x:u,y:d,width:m,height:g};if($(p)&&$(f))return{x:p,y:f,width:m,height:g}}return $(u)&&$(d)?{x:u,y:d,width:0,height:0}:$(t)&&$(n)?{cx:t,cy:n,startAngle:o||r||0,endAngle:a||r||0,innerRadius:l||0,outerRadius:c||s||i||0,clockWise:h}:e.viewBox?e.viewBox:{}};ul.parseViewBox=uc,ul.renderCallByParent=function(e,t){var n,r,o=!(arguments.length>2)||void 0===arguments[2]||arguments[2];if(!e||!e.children&&o&&!e.label)return null;var a=e.children,i=uc(e),s=ex(a,ul).map(function(e,n){return(0,N.cloneElement)(e,{viewBox:t||i,key:"label-".concat(n)})});return o?[(n=e.label,r=t||i,n?!0===n?N.createElement(ul,{key:"label-implicit",viewBox:r}):W(n)?N.createElement(ul,{key:"label-implicit",viewBox:r,value:n}):(0,N.isValidElement)(n)?n.type===ul?(0,N.cloneElement)(n,{key:"label-implicit",viewBox:r}):N.createElement(ul,{key:"label-implicit",content:n,viewBox:r}):eo()(n)?N.createElement(ul,{key:"label-implicit",content:n,viewBox:r}):ei()(n)?N.createElement(ul,ur({viewBox:r},n,{key:"label-implicit"})):null:null)].concat(function(e){if(Array.isArray(e))return ue(e)}(s)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(s)||function(e,t){if(e){if("string"==typeof e)return ue(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ue(e,t)}}(s)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()):s};var uu=function(e,t){var n=e.alwaysShow,r=e.ifOverflow;return n&&(r="extendDomain"),r===t},ud=n(50924),up=n.n(ud),uf=function(e){return null};uf.displayName="Cell";var um=n(36887),ug=n.n(um);function uh(e){return(uh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var ub=["valueAccessor"],uy=["data","dataKey","clockWise","id","textBreakAll"];function uv(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var uO=function(e){return Array.isArray(e.value)?ug()(e.value):e.value};function uA(e){var t=e.valueAccessor,n=void 0===t?uO:t,r=ux(e,ub),o=r.data,a=r.dataKey,i=r.clockWise,s=r.id,l=r.textBreakAll,c=ux(r,uy);return o&&o.length?N.createElement(eQ,{className:"recharts-label-list"},o.map(function(e,t){var r=en()(a)?n(e,t):ct(e&&e.payload,a),o=en()(s)?{}:{id:"".concat(s,"-").concat(t)};return N.createElement(ul,uE({},ek(e,!0),c,o,{parentViewBox:e.parentViewBox,value:r,textBreakAll:l,viewBox:ul.parseViewBox(en()(i)?e:uw(uw({},e),{},{clockWise:i})),key:"label-".concat(t),index:t}))})):null}uA.displayName="LabelList",uA.renderCallByParent=function(e,t){var n,r=!(arguments.length>2)||void 0===arguments[2]||arguments[2];if(!e||!e.children&&r&&!e.label)return null;var o=ex(e.children,uA).map(function(e,n){return(0,N.cloneElement)(e,{data:t,key:"labelList-".concat(n)})});return r?[(n=e.label)?!0===n?N.createElement(uA,{key:"labelList-implicit",data:t}):N.isValidElement(n)||eo()(n)?N.createElement(uA,{key:"labelList-implicit",data:t,content:n}):ei()(n)?N.createElement(uA,uE({data:t},n,{key:"labelList-implicit"})):null:null].concat(function(e){if(Array.isArray(e))return uv(e)}(o)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(o)||function(e,t){if(e){if("string"==typeof e)return uv(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return uv(e,t)}}(o)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()):o};var uT=n(23393),uC=n.n(uT),uk=n(90849),uI=n.n(uk);function uN(e){return(uN="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function u_(){return(u_=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=Array(t);n0,from:{upperWidth:0,lowerWidth:0,height:d,x:s,y:l},to:{upperWidth:c,lowerWidth:u,height:d,x:s,y:l},duration:m,animationEasing:f,isActive:h},function(e){var t=e.upperWidth,o=e.lowerWidth,i=e.height,s=e.x,l=e.y;return N.createElement(ni,{canBegin:a>0,from:"0px ".concat(-1===a?1:a,"px"),to:"".concat(a,"px 0px"),attributeName:"strokeDasharray",begin:g,duration:m,easing:f},N.createElement("path",u_({},ek(n,!0),{className:b,d:uL(s,l,t,o,i),ref:r})))}):N.createElement("g",null,N.createElement("path",u_({},ek(n,!0),{className:b,d:uL(s,l,c,u,d)})))};function uF(e){return(uF="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function uB(){return(uB=Object.assign?Object.assign.bind():function(e){for(var t=1;t180),",").concat(+(i>l),",\n ").concat(u.x,",").concat(u.y,"\n ");if(o>0){var p=c4(n,r,o,i),f=c4(n,r,o,l);d+="L ".concat(f.x,",").concat(f.y,"\n A ").concat(o,",").concat(o,",0,\n ").concat(+(Math.abs(s)>180),",").concat(+(i<=l),",\n ").concat(p.x,",").concat(p.y," Z")}else d+="L ".concat(n,",").concat(r," Z");return d},uG=function(e){var t=e.cx,n=e.cy,r=e.innerRadius,o=e.outerRadius,a=e.cornerRadius,i=e.forceCornerRadius,s=e.cornerIsExternal,l=e.startAngle,c=e.endAngle,u=H(c-l),d=uz({cx:t,cy:n,radius:o,angle:l,sign:u,cornerRadius:a,cornerIsExternal:s}),p=d.circleTangency,f=d.lineTangency,m=d.theta,g=uz({cx:t,cy:n,radius:o,angle:c,sign:-u,cornerRadius:a,cornerIsExternal:s}),h=g.circleTangency,b=g.lineTangency,y=g.theta,v=s?Math.abs(l-c):Math.abs(l-c)-m-y;if(v<0)return i?"M ".concat(f.x,",").concat(f.y,"\n a").concat(a,",").concat(a,",0,0,1,").concat(2*a,",0\n a").concat(a,",").concat(a,",0,0,1,").concat(-(2*a),",0\n "):uH({cx:t,cy:n,innerRadius:r,outerRadius:o,startAngle:l,endAngle:c});var E="M ".concat(f.x,",").concat(f.y,"\n A").concat(a,",").concat(a,",0,0,").concat(+(u<0),",").concat(p.x,",").concat(p.y,"\n A").concat(o,",").concat(o,",0,").concat(+(v>180),",").concat(+(u<0),",").concat(h.x,",").concat(h.y,"\n A").concat(a,",").concat(a,",0,0,").concat(+(u<0),",").concat(b.x,",").concat(b.y,"\n ");if(r>0){var S=uz({cx:t,cy:n,radius:r,angle:l,sign:u,isExternal:!0,cornerRadius:a,cornerIsExternal:s}),w=S.circleTangency,x=S.lineTangency,O=S.theta,A=uz({cx:t,cy:n,radius:r,angle:c,sign:-u,isExternal:!0,cornerRadius:a,cornerIsExternal:s}),T=A.circleTangency,C=A.lineTangency,k=A.theta,I=s?Math.abs(l-c):Math.abs(l-c)-O-k;if(I<0&&0===a)return"".concat(E,"L").concat(t,",").concat(n,"Z");E+="L".concat(C.x,",").concat(C.y,"\n A").concat(a,",").concat(a,",0,0,").concat(+(u<0),",").concat(T.x,",").concat(T.y,"\n A").concat(r,",").concat(r,",0,").concat(+(I>180),",").concat(+(u>0),",").concat(w.x,",").concat(w.y,"\n A").concat(a,",").concat(a,",0,0,").concat(+(u<0),",").concat(x.x,",").concat(x.y,"Z")}else E+="L".concat(t,",").concat(n,"Z");return E},u$={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},uW=function(e){var t,n=uZ(uZ({},u$),e),r=n.cx,o=n.cy,a=n.innerRadius,i=n.outerRadius,s=n.cornerRadius,l=n.forceCornerRadius,c=n.cornerIsExternal,u=n.startAngle,d=n.endAngle,p=n.className;if(i0&&360>Math.abs(u-d)?uG({cx:r,cy:o,innerRadius:a,outerRadius:i,cornerRadius:Math.min(g,m/2),forceCornerRadius:l,cornerIsExternal:c,startAngle:u,endAngle:d}):uH({cx:r,cy:o,innerRadius:a,outerRadius:i,startAngle:u,endAngle:d}),N.createElement("path",uB({},ek(n,!0),{className:f,d:t,role:"img"}))},uV=["option","shapeType","propTransformer","activeClassName","isActive"];function uq(e){return(uq="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function uY(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function uK(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,uV);if((0,N.isValidElement)(n))t=(0,N.cloneElement)(n,uK(uK({},s),(0,N.isValidElement)(n)?n.props:n));else if(eo()(n))t=n(s);else if(uC()(n)&&!uI()(n)){var l=(void 0===o?function(e,t){return uK(uK({},t),e)}:o)(n,s);t=N.createElement(uX,{shapeType:r,elementProps:l})}else t=N.createElement(uX,{shapeType:r,elementProps:s});return i?N.createElement(eQ,{className:void 0===a?"recharts-active-shape":a},t):t}function uJ(e,t){return null!=t&&"trapezoids"in e.props}function u0(e,t){return null!=t&&"sectors"in e.props}function u1(e,t){return null!=t&&"points"in e.props}function u2(e,t){var n,r,o=e.x===(null==t||null===(n=t.labelViewBox)||void 0===n?void 0:n.x)||e.x===t.x,a=e.y===(null==t||null===(r=t.labelViewBox)||void 0===r?void 0:r.y)||e.y===t.y;return o&&a}function u4(e,t){var n=e.endAngle===t.endAngle,r=e.startAngle===t.startAngle;return n&&r}function u3(e,t){var n=e.x===t.x,r=e.y===t.y,o=e.z===t.z;return n&&r&&o}function u6(e){return(u6="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var u5=["x","y"];function u8(){return(u8=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,u5),a=parseInt("".concat(n),10),i=parseInt("".concat(r),10),s=parseInt("".concat(t.height||o.height),10),l=parseInt("".concat(t.width||o.width),10);return u7(u7(u7(u7(u7({},t),o),a?{x:a}:{}),i?{y:i}:{}),{},{height:s,width:l,name:t.name,radius:t.radius})}function dt(e){return N.createElement(uQ,u8({shapeType:"rectangle",propTransformer:de,activeClassName:"recharts-active-bar"},e))}var dn=["value","background"];function dr(e){return(dr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function da(){return(da=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(t,dn);if(!i)return null;var l=ds(ds(ds(ds(ds({},s),{},{fill:"#eee"},i),a),em(e.props,t,n)),{},{onAnimationStart:e.handleAnimationStart,onAnimationEnd:e.handleAnimationEnd,dataKey:r,index:n,key:"background-bar-".concat(n),className:"recharts-bar-background-rectangle"});return N.createElement(dt,da({option:e.props.background,isActive:n===o},l))})}},{key:"renderErrorBar",value:function(e,t){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var n=this.props,r=n.data,o=n.xAxis,a=n.yAxis,i=n.layout,s=ex(n.children,l0);if(!s)return null;var l="vertical"===i?r[0].height/2:r[0].width/2,c=function(e,t){var n=Array.isArray(e.value)?e.value[1]:e.value;return{x:e.x,y:e.y,value:n,errorVal:ct(e,t)}};return N.createElement(eQ,{clipPath:e?"url(#clipPath-".concat(t,")"):null},s.map(function(e){return N.cloneElement(e,{key:"error-bar-".concat(t,"-").concat(e.props.dataKey),data:r,xAxis:o,yAxis:a,layout:i,offset:l,dataPointFormatter:c})}))}},{key:"render",value:function(){var e=this.props,t=e.hide,n=e.data,r=e.className,o=e.xAxis,a=e.yAxis,i=e.left,s=e.top,l=e.width,c=e.height,u=e.isAnimationActive,d=e.background,p=e.id;if(t||!n||!n.length)return null;var f=this.state.isAnimationFinished,m=_("recharts-bar",r),g=o&&o.allowDataOverflow,h=a&&a.allowDataOverflow,b=g||h,y=en()(p)?this.id:p;return N.createElement(eQ,{className:m},g||h?N.createElement("defs",null,N.createElement("clipPath",{id:"clipPath-".concat(y)},N.createElement("rect",{x:g?i:i-l/2,y:h?s:s-c/2,width:g?l:2*l,height:h?c:2*c}))):null,N.createElement(eQ,{className:"recharts-bar-rectangles",clipPath:b?"url(#clipPath-".concat(y,")"):null},d?this.renderBackground():null,this.renderRectangles()),this.renderErrorBar(b,y),(!u||f)&&uA.renderCallByParent(this.props,n))}}],r=[{key:"getDerivedStateFromProps",value:function(e,t){return e.animationId!==t.prevAnimationId?{prevAnimationId:e.animationId,curData:e.data,prevData:t.curData}:e.data!==t.curData?{curData:e.data}:null}}],n&&dl(a.prototype,n),r&&dl(a,r),Object.defineProperty(a,"prototype",{writable:!1}),a}(N.PureComponent);function dg(e){return(dg="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function dh(e,t){for(var n=0;n0&&Math.abs(b)0&&Math.abs(g)1&&void 0!==arguments[1]?arguments[1]:{},n=t.bandAware,r=t.position;if(void 0!==e){if(r)switch(r){case"start":default:return this.scale(e);case"middle":var o=this.bandwidth?this.bandwidth()/2:0;return this.scale(e)+o;case"end":var a=this.bandwidth?this.bandwidth():0;return this.scale(e)+a}if(n){var i=this.bandwidth?this.bandwidth()/2:0;return this.scale(e)+i}return this.scale(e)}}},{key:"isInRange",value:function(e){var t=this.range(),n=t[0],r=t[t.length-1];return n<=r?e>=n&&e<=r:e>=r&&e<=n}}],t=[{key:"create",value:function(e){return new n(e)}}],e&&dh(n.prototype,e),t&&dh(n,t),Object.defineProperty(n,"prototype",{writable:!1}),n}();dv(dw,"EPS",1e-4);var dx=function(e){var t=Object.keys(e).reduce(function(t,n){return dy(dy({},t),{},dv({},n,dw.create(e[n])))},{});return dy(dy({},t),{},{apply:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.bandAware,o=n.position;return up()(e,function(e,n){return t[n].apply(e,{bandAware:r,position:o})})},isInRange:function(e){return e$()(e,function(e,n){return t[n].isInRange(e)})}})},dO=function(e){var t=e.width,n=e.height,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=(r%180+180)%180*Math.PI/180,a=Math.atan(n/t);return Math.abs(o>a&&oe.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);n=0;--t)o[t]=(i[t]-o[t+1])/a[t];for(t=0,a[r-1]=(e[r]+o[r-1])/2;t=d;--p)s.point(b[p],y[p]);s.lineEnd(),s.areaEnd()}}h&&(b[u]=+e(f,u,c),y[u]=+t(f,u,c),s.point(r?+r(f,u,c):b[u],n?+n(f,u,c):y[u]))}if(m)return s=null,m+""||null}function u(){return pC().defined(o).curve(i).context(a)}return e="function"==typeof e?e:void 0===e?pA:ro(+e),t="function"==typeof t?t:void 0===t?ro(0):ro(+t),n="function"==typeof n?n:void 0===n?pT:ro(+n),c.x=function(t){return arguments.length?(e="function"==typeof t?t:ro(+t),r=null,c):e},c.x0=function(t){return arguments.length?(e="function"==typeof t?t:ro(+t),c):e},c.x1=function(e){return arguments.length?(r=null==e?null:"function"==typeof e?e:ro(+e),c):r},c.y=function(e){return arguments.length?(t="function"==typeof e?e:ro(+e),n=null,c):t},c.y0=function(e){return arguments.length?(t="function"==typeof e?e:ro(+e),c):t},c.y1=function(e){return arguments.length?(n=null==e?null:"function"==typeof e?e:ro(+e),c):n},c.lineX0=c.lineY0=function(){return u().x(e).y(t)},c.lineY1=function(){return u().x(e).y(n)},c.lineX1=function(){return u().x(r).y(t)},c.defined=function(e){return arguments.length?(o="function"==typeof e?e:ro(!!e),c):o},c.curve=function(e){return arguments.length?(i=e,null!=a&&(s=i(a)),c):i},c.context=function(e){return arguments.length?(null==e?a=s=null:s=i(a=e),c):a},c}function pI(e){return(pI="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function pN(){return(pN=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}}this._x=e,this._y=t}};var pP={curveBasisClosed:function(e){return new pu(e)},curveBasisOpen:function(e){return new pd(e)},curveBasis:function(e){return new pc(e)},curveBumpX:function(e){return new pp(e,!0)},curveBumpY:function(e){return new pp(e,!1)},curveLinearClosed:function(e){return new pf(e)},curveLinear:pg,curveMonotoneX:function(e){return new pv(e)},curveMonotoneY:function(e){return new pE(e)},curveNatural:function(e){return new pw(e)},curveStep:function(e){return new pO(e,.5)},curveStepAfter:function(e){return new pO(e,1)},curveStepBefore:function(e){return new pO(e,0)}},pM=function(e){return e.x===+e.x&&e.y===+e.y},pL=function(e){return e.x},pD=function(e){return e.y},pj=function(e,t){if(eo()(e))return e;var n="curve".concat(nQ()(e));return("curveMonotone"===n||"curveBump"===n)&&t?pP["".concat(n).concat("vertical"===t?"Y":"X")]:pP[n]||pg},pF=function(e){var t,n=e.type,r=e.points,o=void 0===r?[]:r,a=e.baseLine,i=e.layout,s=e.connectNulls,l=void 0!==s&&s,c=pj(void 0===n?"linear":n,i),u=l?o.filter(function(e){return pM(e)}):o;if(Array.isArray(a)){var d=l?a.filter(function(e){return pM(e)}):a,p=u.map(function(e,t){return pR(pR({},e),{},{base:d[t]})});return(t="vertical"===i?pk().y(pD).x1(pL).x0(function(e){return e.base.x}):pk().x(pL).y1(pD).y0(function(e){return e.base.y})).defined(pM).curve(c),t(p)}return(t="vertical"===i&&$(a)?pk().y(pD).x1(pL).x0(a):$(a)?pk().x(pL).y1(pD).y0(a):pC().x(pL).y(pD)).defined(pM).curve(c),t(u)},pB=function(e){var t=e.className,n=e.points,r=e.path,o=e.pathRef;if((!n||!n.length)&&!r)return null;var a=n&&n.length?pF(e):r;return N.createElement("path",pN({},ek(e,!1),ef(e),{className:_("recharts-curve",t),d:a,ref:o}))};function pU(e){return(pU="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var pZ=["x","y","top","left","width","height","className"];function pz(){return(pz=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,pZ));return $(n)&&$(o)&&$(u)&&$(p)&&$(i)&&$(l)?N.createElement("path",pz({},ek(m,!0),{className:_("recharts-cross",f),d:"M".concat(n,",").concat(i,"v").concat(p,"M").concat(l,",").concat(o,"h").concat(u)})):null};function p$(e){var t=e.cx,n=e.cy,r=e.radius,o=e.startAngle,a=e.endAngle;return{points:[c4(t,n,r,o),c4(t,n,r,a)],cx:t,cy:n,radius:r,startAngle:o,endAngle:a}}function pW(e){return(pW="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function pV(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function pq(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function p2(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=Array(t);n0?a:e&&e.length&&$(r)&&$(o)?e.slice(r,o+1):[]};function fc(e){return"number"===e?[0,"auto"]:void 0}var fu=function(e,t,n,r){var o=e.graphicalItems,a=e.tooltipAxis,i=fl(t,e);return n<0||!o||!o.length||n>=i.length?null:o.reduce(function(o,s){var l,c,u=null!==(l=s.props.data)&&void 0!==l?l:t;return(u&&e.dataStartIndex+e.dataEndIndex!==0&&(u=u.slice(e.dataStartIndex,e.dataEndIndex+1)),c=a.dataKey&&!a.allowDuplicatedCategory?J(void 0===u?i:u,a.dataKey,r):u&&u[n]||i[n])?[].concat(p5(o),[cP(s,c)]):o},[])},fd=function(e,t,n,r){var o=r||{x:e.chartX,y:e.chartY},a="horizontal"===n?o.x:"vertical"===n?o.y:"centric"===n?o.angle:o.radius,i=e.orderedTooltipTicks,s=e.tooltipAxis,l=e.tooltipTicks,c=cr(a,i,l,s);if(c>=0&&l){var u=l[c]&&l[c].value,d=fu(e,t,c,u),p=fs(n,i,c,o);return{activeTooltipIndex:c,activeLabel:u,activePayload:d,activeCoordinate:p}}return null},fp=function(e,t){var n=t.axes,r=t.graphicalItems,o=t.axisType,a=t.axisIdKey,i=t.stackGroups,s=t.dataStartIndex,l=t.dataEndIndex,c=e.layout,u=e.children,d=e.stackOffset,p=cd(c,o);return n.reduce(function(t,n){var f=n.props,m=f.type,g=f.dataKey,h=f.allowDataOverflow,b=f.allowDuplicatedCategory,y=f.scale,v=f.ticks,E=f.includeHidden,S=n.props[a];if(t[S])return t;var w=fl(e.data,{graphicalItems:r.filter(function(e){return e.props[a]===S}),dataStartIndex:s,dataEndIndex:l}),x=w.length;(function(e,t,n){if("number"===n&&!0===t&&Array.isArray(e)){var r=null==e?void 0:e[0],o=null==e?void 0:e[1];if(r&&o&&$(r)&&$(o))return!0}return!1})(n.props.domain,h,m)&&(T=cN(n.props.domain,null,h),p&&("number"===m||"auto"!==y)&&(k=cn(w,g,"category")));var O=fc(m);if(!T||0===T.length){var A,T,C,k,I,N=null!==(I=n.props.domain)&&void 0!==I?I:O;if(g){if(T=cn(w,g,m),"category"===m&&p){var _=X(T);b&&_?(C=T,T=eB()(0,x)):b||(T=cR(N,T,n).reduce(function(e,t){return e.indexOf(t)>=0?e:[].concat(p5(e),[t])},[]))}else if("category"===m)T=b?T.filter(function(e){return""!==e&&!en()(e)}):cR(N,T,n).reduce(function(e,t){return e.indexOf(t)>=0||""===t||en()(t)?e:[].concat(p5(e),[t])},[]);else if("number"===m){var R=cc(w,r.filter(function(e){return e.props[a]===S&&(E||!e.props.hide)}),g,o,c);R&&(T=R)}p&&("number"===m||"auto"!==y)&&(k=cn(w,g,"category"))}else T=p?eB()(0,x):i&&i[S]&&i[S].hasStack&&"number"===m?"expand"===d?[0,1]:cC(i[S].stackGroups,s,l):cu(w,r.filter(function(e){return e.props[a]===S&&(E||!e.props.hide)}),m,c,!0);"number"===m?(T=d9(u,T,S,o,v),N&&(T=cN(N,T,h))):"category"===m&&N&&T.every(function(e){return N.indexOf(e)>=0})&&(T=N)}return fe(fe({},t),{},ft({},S,fe(fe({},n.props),{},{axisType:o,domain:T,categoricalDomain:k,duplicateDomain:C,originalDomain:null!==(A=n.props.domain)&&void 0!==A?A:O,isCategorical:p,layout:c})))},{})},ff=function(e,t){var n=t.graphicalItems,r=t.Axis,o=t.axisType,a=t.axisIdKey,i=t.stackGroups,s=t.dataStartIndex,l=t.dataEndIndex,c=e.layout,u=e.children,d=fl(e.data,{graphicalItems:n,dataStartIndex:s,dataEndIndex:l}),p=d.length,f=cd(c,o),m=-1;return n.reduce(function(e,t){var g,h=t.props[a],b=fc("number");return e[h]?e:(m++,g=f?eB()(0,p):i&&i[h]&&i[h].hasStack?d9(u,g=cC(i[h].stackGroups,s,l),h,o):d9(u,g=cN(b,cu(d,n.filter(function(e){return e.props[a]===h&&!e.props.hide}),"number",c),r.defaultProps.allowDataOverflow),h,o),fe(fe({},e),{},ft({},h,fe(fe({axisType:o},r.defaultProps),{},{hide:!0,orientation:U()(fr,"".concat(o,".").concat(m%2),null),domain:g,originalDomain:b,isCategorical:f,layout:c}))))},{})},fm=function(e,t){var n=t.axisType,r=void 0===n?"xAxis":n,o=t.AxisComp,a=t.graphicalItems,i=t.stackGroups,s=t.dataStartIndex,l=t.dataEndIndex,c=e.children,u="".concat(r,"Id"),d=ex(c,o),p={};return d&&d.length?p=fp(e,{axes:d,graphicalItems:a,axisType:r,axisIdKey:u,stackGroups:i,dataStartIndex:s,dataEndIndex:l}):a&&a.length&&(p=ff(e,{Axis:o,graphicalItems:a,axisType:r,axisIdKey:u,stackGroups:i,dataStartIndex:s,dataEndIndex:l})),p},fg=function(e){var t=K(e),n=cf(t,!1,!0);return{tooltipTicks:n,orderedTooltipTicks:eZ()(n,function(e){return e.coordinate}),tooltipAxis:t,tooltipAxisBandSize:c_(t,n)}},fh=function(e){var t=e.children,n=e.defaultShowTooltip,r=eO(t,cQ),o=0,a=0;return e.data&&0!==e.data.length&&(a=e.data.length-1),r&&r.props&&(r.props.startIndex>=0&&(o=r.props.startIndex),r.props.endIndex>=0&&(a=r.props.endIndex)),{chartX:0,chartY:0,dataStartIndex:o,dataEndIndex:a,activeTooltipIndex:-1,isTooltipActive:!!n}},fb=function(e){return"horizontal"===e?{numericAxisName:"yAxis",cateAxisName:"xAxis"}:"vertical"===e?{numericAxisName:"xAxis",cateAxisName:"yAxis"}:"centric"===e?{numericAxisName:"radiusAxis",cateAxisName:"angleAxis"}:{numericAxisName:"angleAxis",cateAxisName:"radiusAxis"}},fy=function(e,t){var n=e.props,r=e.graphicalItems,o=e.xAxisMap,a=void 0===o?{}:o,i=e.yAxisMap,s=void 0===i?{}:i,l=n.width,c=n.height,u=n.children,d=n.margin||{},p=eO(u,cQ),f=eO(u,r1),m=Object.keys(s).reduce(function(e,t){var n=s[t],r=n.orientation;return n.mirror||n.hide?e:fe(fe({},e),{},ft({},r,e[r]+n.width))},{left:d.left||0,right:d.right||0}),g=Object.keys(a).reduce(function(e,t){var n=a[t],r=n.orientation;return n.mirror||n.hide?e:fe(fe({},e),{},ft({},r,U()(e,"".concat(r))+n.height))},{top:d.top||0,bottom:d.bottom||0}),h=fe(fe({},g),m),b=h.bottom;p&&(h.bottom+=p.props.height||cQ.defaultProps.height),f&&t&&(h=cs(h,r,n,t));var y=l-h.left-h.right,v=c-h.top-h.bottom;return fe(fe({brushBottom:b},h),{},{width:Math.max(y,0),height:Math.max(v,0)})};function fv(e,t,n){if(t<1)return[];if(1===t&&void 0===n)return e;for(var r=[],o=0;oe*o)return!1;var a=n();return e*(t-e*a/2-r)>=0&&e*(t+e*a/2-o)<=0}function fS(e){return(fS="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function fw(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function fx(e){for(var t=1;t=2?H(c[1].coordinate-c[0].coordinate):1,S=(r="width"===b,o=u.x,a=u.y,i=u.width,s=u.height,1===E?{start:r?o:a,end:r?o+i:a+s}:{start:r?o+i:a+s,end:r?o:a});return"equidistantPreserveStart"===f?function(e,t,n,r,o){for(var a,i=(r||[]).slice(),s=t.start,l=t.end,c=0,u=1,d=s;u<=i.length;)if(a=function(){var t,a=null==r?void 0:r[c];if(void 0===a)return{v:fv(r,u)};var i=c,p=function(){return void 0===t&&(t=n(a,i)),t},f=a.coordinate,m=0===c||fE(e,f,p,d,l);m||(c=0,d=s,u+=1),m&&(d=f+e*(p()/2+o),c+=u)}())return a.v;return[]}(E,S,v,c,d):("preserveStart"===f||"preserveStartEnd"===f?function(e,t,n,r,o,a){var i=(r||[]).slice(),s=i.length,l=t.start,c=t.end;if(a){var u=r[s-1],d=n(u,s-1),p=e*(u.coordinate+e*d/2-c);i[s-1]=u=fx(fx({},u),{},{tickCoord:p>0?u.coordinate-p*e:u.coordinate}),fE(e,u.tickCoord,function(){return d},l,c)&&(c=u.tickCoord-e*(d/2+o),i[s-1]=fx(fx({},u),{},{isShow:!0}))}for(var f=a?s-1:s,m=function(t){var r,a=i[t],s=function(){return void 0===r&&(r=n(a,t)),r};if(0===t){var u=e*(a.coordinate-e*s()/2-l);i[t]=a=fx(fx({},a),{},{tickCoord:u<0?a.coordinate-u*e:a.coordinate})}else i[t]=a=fx(fx({},a),{},{tickCoord:a.coordinate});fE(e,a.tickCoord,s,l,c)&&(l=a.tickCoord+e*(s()/2+o),i[t]=fx(fx({},a),{},{isShow:!0}))},g=0;g0?c.coordinate-d*e:c.coordinate})}else a[t]=c=fx(fx({},c),{},{tickCoord:c.coordinate});fE(e,c.tickCoord,u,s,l)&&(l=c.tickCoord-e*(u()/2+o),a[t]=fx(fx({},c),{},{isShow:!0}))},u=i-1;u>=0;u--)c(u);return a}(E,S,v,c,d)).filter(function(e){return e.isShow})}var fA=["viewBox"],fT=["viewBox"],fC=["ticks"];function fk(e){return(fk="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function fI(){return(fI=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function fP(e,t){for(var n=0;n0?this.props:c)),r<=0||o<=0||!u||!u.length)?null:N.createElement(eQ,{className:_("recharts-cartesian-axis",i),ref:function(t){e.layerReference=t}},n&&this.renderAxisLine(),this.renderTicks(u,this.state.fontSize,this.state.letterSpacing),ul.renderCallByParent(this.props))}}],r=[{key:"renderTickItem",value:function(e,t,n){return N.isValidElement(e)?N.cloneElement(e,t):eo()(e)?e(t):N.createElement(o$,fI({},t,{className:"recharts-cartesian-axis-tick-value"}),n)}}],n&&fP(a.prototype,n),r&&fP(a,r),Object.defineProperty(a,"prototype",{writable:!1}),a}(N.Component);function fB(){return(fB=Object.assign?Object.assign.bind():function(e){for(var t=1;t0&&(O=Math.min((e||0)-(A[t-1]||0),O))});var T=O/x,C="vertical"===g.layout?n.height:n.width;if("gap"===g.padding&&(l=T*C/2),"no-gap"===g.padding){var k=Y(e.barCategoryGap,T*C),I=T*C/2;l=I-k-(I-k)/C*k}}c="xAxis"===r?[n.left+(v.left||0)+(l||0),n.left+n.width-(v.right||0)-(l||0)]:"yAxis"===r?"horizontal"===s?[n.top+n.height-(v.bottom||0),n.top+(v.top||0)]:[n.top+(v.top||0)+(l||0),n.top+n.height-(v.bottom||0)-(l||0)]:g.range,S&&(c=[c[1],c[0]]);var N=ch(g,o,d),_=N.scale,R=N.realScaleType;_.domain(b).range(c),cb(_);var P=cx(_,dy(dy({},g),{},{realScaleType:R}));"xAxis"===r?(m="top"===h&&!E||"bottom"===h&&E,p=n.left,f=u[w]-m*g.height):"yAxis"===r&&(m="left"===h&&!E||"right"===h&&E,p=u[w]-m*g.width,f=n.top);var M=dy(dy(dy({},g),P),{},{realScaleType:R,x:p,y:f,scale:_,width:"xAxis"===r?n.width:g.width,height:"yAxis"===r?n.height:g.height});return M.bandSize=c_(M,P),g.hide||"xAxis"!==r?g.hide||(u[w]+=(m?-1:1)*M.width):u[w]+=(m?-1:1)*M.height,dy(dy({},a),{},dv({},i,M))},{})}}).chartName,i=r.GraphicalChild,l=void 0===(s=r.defaultTooltipEventType)?"axis":s,u=void 0===(c=r.validateTooltipEventTypes)?["axis"]:c,d=r.axisComponents,p=r.legendContent,f=r.formatAxisMap,m=r.defaultProps,g=function(e,t){var n=t.graphicalItems,r=t.stackGroups,o=t.offset,a=t.updateId,i=t.dataStartIndex,s=t.dataEndIndex,l=e.barSize,c=e.layout,u=e.barGap,p=e.barCategoryGap,f=e.maxBarSize,m=fb(c),g=m.numericAxisName,h=m.cateAxisName,b=!!n&&!!n.length&&n.some(function(e){var t=ev(e&&e.type);return t&&t.indexOf("Bar")>=0})&&ca({barSize:l,stackGroups:r}),y=[];return n.forEach(function(n,l){var m,v=fl(e.data,{graphicalItems:[n],dataStartIndex:i,dataEndIndex:s}),E=n.props,S=E.dataKey,w=E.maxBarSize,x=n.props["".concat(g,"Id")],O=n.props["".concat(h,"Id")],A=d.reduce(function(e,r){var o,a=t["".concat(r.axisType,"Map")],i=n.props["".concat(r.axisType,"Id")];a&&a[i]||"zAxis"===r.axisType||eW(!1);var s=a[i];return fe(fe({},e),{},(ft(o={},r.axisType,s),ft(o,"".concat(r.axisType,"Ticks"),cf(s)),o))},{}),T=A[h],C=A["".concat(h,"Ticks")],k=r&&r[x]&&r[x].hasStack&&cT(n,r[x].stackGroups),I=ev(n.type).indexOf("Bar")>=0,N=c_(T,C),_=[];if(I){var R,P,M=en()(w)?f:w,L=null!==(R=null!==(P=c_(T,C,!0))&&void 0!==P?P:M)&&void 0!==R?R:0;_=ci({barGap:u,barCategoryGap:p,bandSize:L!==N?L:N,sizeList:b[O],maxBarSize:M}),L!==N&&(_=_.map(function(e){return fe(fe({},e),{},{position:fe(fe({},e.position),{},{offset:e.position.offset-L/2})})}))}var D=n&&n.type&&n.type.getComposedData;D&&y.push({props:fe(fe({},D(fe(fe({},A),{},{displayedData:v,props:e,dataKey:S,item:n,bandSize:N,barPosition:_,offset:o,stackedData:k,layout:c,dataStartIndex:i,dataEndIndex:s}))),{},(ft(m={key:n.key||"item-".concat(l)},g,A[g]),ft(m,h,A[h]),ft(m,"animationId",a),m)),childIndex:ew(e.children).indexOf(n),item:n})}),y},h=function(e,t){var n=e.props,r=e.dataStartIndex,o=e.dataEndIndex,s=e.updateId;if(!eA({props:n}))return null;var l=n.children,c=n.layout,u=n.stackOffset,p=n.data,m=n.reverseStackOrder,h=fb(c),b=h.numericAxisName,y=h.cateAxisName,v=ex(l,i),E=cw(p,v,"".concat(b,"Id"),"".concat(y,"Id"),u,m),S=d.reduce(function(e,t){var a="".concat(t.axisType,"Map");return fe(fe({},e),{},ft({},a,fm(n,fe(fe({},t),{},{graphicalItems:v,stackGroups:t.axisType===b&&E,dataStartIndex:r,dataEndIndex:o}))))},{}),w=fy(fe(fe({},S),{},{props:n,graphicalItems:v}),null==t?void 0:t.legendBBox);Object.keys(S).forEach(function(e){S[e]=f(n,S[e],w,e.replace("Map",""),a)});var x=fg(S["".concat(y,"Map")]),O=g(n,fe(fe({},S),{},{dataStartIndex:r,dataEndIndex:o,updateId:s,graphicalItems:v,stackGroups:E,offset:w}));return fe(fe({formattedGraphicalItems:O,graphicalItems:v,offset:w,stackGroups:E},x),S)},o=function(e){(function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&p4(e,t)})(i,e);var t,n,r,o=(t=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}(),function(){var e,n=p6(i);if(t){var r=p6(this).constructor;e=Reflect.construct(n,arguments,r)}else e=n.apply(this,arguments);return function(e,t){if(t&&("object"===pQ(t)||"function"==typeof t))return t;if(void 0!==t)throw TypeError("Derived constructors may only return object or undefined");return p3(e)}(this,e)});function i(e){var t,n,r;return function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,i),ft(p3(r=o.call(this,e)),"eventEmitterSymbol",Symbol("rechartsEventEmitter")),ft(p3(r),"accessibilityManager",new pi),ft(p3(r),"handleLegendBBoxUpdate",function(e){if(e){var t=r.state,n=t.dataStartIndex,o=t.dataEndIndex,a=t.updateId;r.setState(fe({legendBBox:e},h({props:r.props,dataStartIndex:n,dataEndIndex:o,updateId:a},fe(fe({},r.state),{},{legendBBox:e}))))}}),ft(p3(r),"handleReceiveSyncEvent",function(e,t,n){r.props.syncId===e&&(n!==r.eventEmitterSymbol||"function"==typeof r.props.syncMethod)&&r.applySyncEvent(t)}),ft(p3(r),"handleBrushChange",function(e){var t=e.startIndex,n=e.endIndex;if(t!==r.state.dataStartIndex||n!==r.state.dataEndIndex){var o=r.state.updateId;r.setState(function(){return fe({dataStartIndex:t,dataEndIndex:n},h({props:r.props,dataStartIndex:t,dataEndIndex:n,updateId:o},r.state))}),r.triggerSyncEvent({dataStartIndex:t,dataEndIndex:n})}}),ft(p3(r),"handleMouseEnter",function(e){var t=r.getMouseInfo(e);if(t){var n=fe(fe({},t),{},{isTooltipActive:!0});r.setState(n),r.triggerSyncEvent(n);var o=r.props.onMouseEnter;eo()(o)&&o(n,e)}}),ft(p3(r),"triggeredAfterMouseMove",function(e){var t=r.getMouseInfo(e),n=t?fe(fe({},t),{},{isTooltipActive:!0}):{isTooltipActive:!1};r.setState(n),r.triggerSyncEvent(n);var o=r.props.onMouseMove;eo()(o)&&o(n,e)}),ft(p3(r),"handleItemMouseEnter",function(e){r.setState(function(){return{isTooltipActive:!0,activeItem:e,activePayload:e.tooltipPayload,activeCoordinate:e.tooltipPosition||{x:e.cx,y:e.cy}}})}),ft(p3(r),"handleItemMouseLeave",function(){r.setState(function(){return{isTooltipActive:!1}})}),ft(p3(r),"handleMouseMove",function(e){e.persist(),r.throttleTriggeredAfterMouseMove(e)}),ft(p3(r),"handleMouseLeave",function(e){var t={isTooltipActive:!1};r.setState(t),r.triggerSyncEvent(t);var n=r.props.onMouseLeave;eo()(n)&&n(t,e)}),ft(p3(r),"handleOuterEvent",function(e){var t,n=eR(e),o=U()(r.props,"".concat(n));n&&eo()(o)&&o(null!==(t=/.*touch.*/i.test(n)?r.getMouseInfo(e.changedTouches[0]):r.getMouseInfo(e))&&void 0!==t?t:{},e)}),ft(p3(r),"handleClick",function(e){var t=r.getMouseInfo(e);if(t){var n=fe(fe({},t),{},{isTooltipActive:!0});r.setState(n),r.triggerSyncEvent(n);var o=r.props.onClick;eo()(o)&&o(n,e)}}),ft(p3(r),"handleMouseDown",function(e){var t=r.props.onMouseDown;eo()(t)&&t(r.getMouseInfo(e),e)}),ft(p3(r),"handleMouseUp",function(e){var t=r.props.onMouseUp;eo()(t)&&t(r.getMouseInfo(e),e)}),ft(p3(r),"handleTouchMove",function(e){null!=e.changedTouches&&e.changedTouches.length>0&&r.throttleTriggeredAfterMouseMove(e.changedTouches[0])}),ft(p3(r),"handleTouchStart",function(e){null!=e.changedTouches&&e.changedTouches.length>0&&r.handleMouseDown(e.changedTouches[0])}),ft(p3(r),"handleTouchEnd",function(e){null!=e.changedTouches&&e.changedTouches.length>0&&r.handleMouseUp(e.changedTouches[0])}),ft(p3(r),"triggerSyncEvent",function(e){void 0!==r.props.syncId&&pe.emit(pt,r.props.syncId,e,r.eventEmitterSymbol)}),ft(p3(r),"applySyncEvent",function(e){var t=r.props,n=t.layout,o=t.syncMethod,a=r.state.updateId,i=e.dataStartIndex,s=e.dataEndIndex;if(void 0!==e.dataStartIndex||void 0!==e.dataEndIndex)r.setState(fe({dataStartIndex:i,dataEndIndex:s},h({props:r.props,dataStartIndex:i,dataEndIndex:s,updateId:a},r.state)));else if(void 0!==e.activeTooltipIndex){var l=e.chartX,c=e.chartY,u=e.activeTooltipIndex,d=r.state,p=d.offset,f=d.tooltipTicks;if(!p)return;if("function"==typeof o)u=o(f,e);else if("value"===o){u=-1;for(var m=0;m=0){if(l.dataKey&&!l.allowDuplicatedCategory){var x="function"==typeof l.dataKey?function(e){return"function"==typeof l.dataKey?l.dataKey(e.payload):null}:"payload.".concat(l.dataKey.toString());A=J(f,x,u),T=m&&g&&J(g,x,u)}else A=null==f?void 0:f[c],T=m&&g&&g[c];if(E||v){var O=void 0!==e.props.activeIndex?e.props.activeIndex:c;return[(0,N.cloneElement)(e,fe(fe(fe({},o.props),S),{},{activeIndex:O})),null,null]}if(!en()(A))return[w].concat(p5(r.renderActivePoints({item:o,activePoint:A,basePoint:T,childIndex:c,isRange:m})))}else{var A,T,C,k=(null!==(C=r.getItemByXY(r.state.activeCoordinate))&&void 0!==C?C:{graphicalItem:w}).graphicalItem,I=k.item,_=void 0===I?e:I,R=k.childIndex,P=fe(fe(fe({},o.props),S),{},{activeIndex:R});return[(0,N.cloneElement)(_,P),null,null]}}return m?[w,null,null]:[w,null]}),ft(p3(r),"renderCustomized",function(e,t,n){return(0,N.cloneElement)(e,fe(fe({key:"recharts-customized-".concat(n)},r.props),r.state))}),ft(p3(r),"renderMap",{CartesianGrid:{handler:r.renderGrid,once:!0},ReferenceArea:{handler:r.renderReferenceElement},ReferenceLine:{handler:fi},ReferenceDot:{handler:r.renderReferenceElement},XAxis:{handler:fi},YAxis:{handler:fi},Brush:{handler:r.renderBrush,once:!0},Bar:{handler:r.renderGraphicChild},Line:{handler:r.renderGraphicChild},Area:{handler:r.renderGraphicChild},Radar:{handler:r.renderGraphicChild},RadialBar:{handler:r.renderGraphicChild},Scatter:{handler:r.renderGraphicChild},Pie:{handler:r.renderGraphicChild},Funnel:{handler:r.renderGraphicChild},Tooltip:{handler:r.renderCursor,once:!0},PolarGrid:{handler:r.renderPolarGrid,once:!0},PolarAngleAxis:{handler:r.renderPolarAxis},PolarRadiusAxis:{handler:r.renderPolarAxis},Customized:{handler:r.renderCustomized}}),r.clipPathId="".concat(null!==(t=e.id)&&void 0!==t?t:q("recharts"),"-clip"),r.throttleTriggeredAfterMouseMove=P()(r.triggeredAfterMouseMove,null!==(n=e.throttleDelay)&&void 0!==n?n:1e3/60),r.state={},r}return n=[{key:"componentDidMount",value:function(){var e,t;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:null!==(e=this.props.margin.left)&&void 0!==e?e:0,top:null!==(t=this.props.margin.top)&&void 0!==t?t:0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout}),this.displayDefaultTooltip()}},{key:"displayDefaultTooltip",value:function(){var e=this.props,t=e.children,n=e.data,r=e.height,o=e.layout,a=eO(t,nK);if(a){var i=a.props.defaultIndex;if("number"==typeof i&&!(i<0)&&!(i>this.state.tooltipTicks.length)){var s=this.state.tooltipTicks[i]&&this.state.tooltipTicks[i].value,l=fu(this.state,n,i,s),c=this.state.tooltipTicks[i].coordinate,u=(this.state.offset.top+r)/2,d="horizontal"===o?{x:c,y:u}:{y:c,x:u},p=this.state.formattedGraphicalItems.find(function(e){return"Scatter"===e.item.type.name});p&&(d=fe(fe({},d),p.props.points[i].tooltipPosition),l=p.props.points[i].tooltipPayload);var f={activeTooltipIndex:i,isTooltipActive:!0,activeLabel:s,activePayload:l,activeCoordinate:d};this.setState(f),this.renderCursor(a),this.accessibilityManager.setIndex(i)}}}},{key:"getSnapshotBeforeUpdate",value:function(e,t){if(!this.props.accessibilityLayer)return null;if(this.state.tooltipTicks!==t.tooltipTicks&&this.accessibilityManager.setDetails({coordinateList:this.state.tooltipTicks}),this.props.layout!==e.layout&&this.accessibilityManager.setDetails({layout:this.props.layout}),this.props.margin!==e.margin){var n,r;this.accessibilityManager.setDetails({offset:{left:null!==(n=this.props.margin.left)&&void 0!==n?n:0,top:null!==(r=this.props.margin.top)&&void 0!==r?r:0}})}return null}},{key:"componentDidUpdate",value:function(e){eI([eO(e.children,nK)],[eO(this.props.children,nK)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var e=eO(this.props.children,nK);if(e&&"boolean"==typeof e.props.shared){var t=e.props.shared?"axis":"item";return u.indexOf(t)>=0?t:l}return l}},{key:"getMouseInfo",value:function(e){if(!this.container)return null;var t=this.container,n=t.getBoundingClientRect(),r={top:n.top+window.scrollY-document.documentElement.clientTop,left:n.left+window.scrollX-document.documentElement.clientLeft},o={chartX:Math.round(e.pageX-r.left),chartY:Math.round(e.pageY-r.top)},a=n.width/t.offsetWidth||1,i=this.inRange(o.chartX,o.chartY,a);if(!i)return null;var s=this.state,l=s.xAxisMap,c=s.yAxisMap;if("axis"!==this.getTooltipEventType()&&l&&c){var u=K(l).scale,d=K(c).scale,p=u&&u.invert?u.invert(o.chartX):null,f=d&&d.invert?d.invert(o.chartY):null;return fe(fe({},o),{},{xValue:p,yValue:f})}var m=fd(this.state,this.props.data,this.props.layout,i);return m?fe(fe({},o),m):null}},{key:"inRange",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=this.props.layout,o=e/n,a=t/n;if("horizontal"===r||"vertical"===r){var i=this.state.offset;return o>=i.left&&o<=i.left+i.width&&a>=i.top&&a<=i.top+i.height?{x:o,y:a}:null}var s=this.state,l=s.angleAxisMap,c=s.radiusAxisMap;return l&&c?c8({x:o,y:a},K(l)):null}},{key:"parseEventsOfWrapper",value:function(){var e=this.props.children,t=this.getTooltipEventType(),n=eO(e,nK),r={};return n&&"axis"===t&&(r="click"===n.props.trigger?{onClick:this.handleClick}:{onMouseEnter:this.handleMouseEnter,onMouseMove:this.handleMouseMove,onMouseLeave:this.handleMouseLeave,onTouchMove:this.handleTouchMove,onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd}),fe(fe({},ef(this.props,this.handleOuterEvent)),r)}},{key:"addListener",value:function(){pe.on(pt,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){pe.removeListener(pt,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(e,t,n){for(var r=this.state.formattedGraphicalItems,o=0,a=r.length;o=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var fX=function(e){var t=e.fill;if(!t||"none"===t)return null;var n=e.fillOpacity,r=e.x,o=e.y,a=e.width,i=e.height;return N.createElement("rect",{x:r,y:o,width:a,height:i,stroke:"none",fill:t,fillOpacity:n,className:"recharts-cartesian-grid-bg"})};function fQ(e,t){var n;if(N.isValidElement(e))n=N.cloneElement(e,t);else if(eo()(e))n=e(t);else{var r=t.x1,o=t.y1,a=t.x2,i=t.y2,s=t.key,l=ek(fK(t,fG),!1),c=(l.offset,fK(l,f$));n=N.createElement("line",fY({},c,{x1:r,y1:o,x2:a,y2:i,fill:"none",key:s}))}return n}function fJ(e){var t=e.x,n=e.width,r=e.horizontal,o=void 0===r||r,a=e.horizontalPoints;if(!o||!a||!a.length)return null;var i=a.map(function(r,a){return fQ(o,fq(fq({},e),{},{x1:t,y1:r,x2:t+n,y2:r,key:"line-".concat(a),index:a}))});return N.createElement("g",{className:"recharts-cartesian-grid-horizontal"},i)}function f0(e){var t=e.y,n=e.height,r=e.vertical,o=void 0===r||r,a=e.verticalPoints;if(!o||!a||!a.length)return null;var i=a.map(function(r,a){return fQ(o,fq(fq({},e),{},{x1:r,y1:t,x2:r,y2:t+n,key:"line-".concat(a),index:a}))});return N.createElement("g",{className:"recharts-cartesian-grid-vertical"},i)}function f1(e){var t=e.horizontalFill,n=e.fillOpacity,r=e.x,o=e.y,a=e.width,i=e.height,s=e.horizontalPoints,l=e.horizontal;if(!(void 0===l||l)||!t||!t.length)return null;var c=s.map(function(e){return Math.round(e+o-o)}).sort(function(e,t){return e-t});o!==c[0]&&c.unshift(0);var u=c.map(function(e,s){var l=c[s+1]?c[s+1]-e:o+i-e;if(l<=0)return null;var u=s%t.length;return N.createElement("rect",{key:"react-".concat(s),y:e,x:r,height:l,width:a,stroke:"none",fill:t[u],fillOpacity:n,className:"recharts-cartesian-grid-bg"})});return N.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},u)}function f2(e){var t=e.vertical,n=e.verticalFill,r=e.fillOpacity,o=e.x,a=e.y,i=e.width,s=e.height,l=e.verticalPoints;if(!(void 0===t||t)||!n||!n.length)return null;var c=l.map(function(e){return Math.round(e+o-o)}).sort(function(e,t){return e-t});o!==c[0]&&c.unshift(0);var u=c.map(function(e,t){var l=c[t+1]?c[t+1]-e:o+i-e;if(l<=0)return null;var u=t%n.length;return N.createElement("rect",{key:"react-".concat(t),x:e,y:a,width:l,height:s,stroke:"none",fill:n[u],fillOpacity:r,className:"recharts-cartesian-grid-bg"})});return N.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},u)}var f4=function(e,t){var n=e.xAxis,r=e.width,o=e.height,a=e.offset;return cp(fO(fq(fq(fq({},fF.defaultProps),n),{},{ticks:cf(n,!0),viewBox:{x:0,y:0,width:r,height:o}})),a.left,a.left+a.width,t)},f3=function(e,t){var n=e.yAxis,r=e.width,o=e.height,a=e.offset;return cp(fO(fq(fq(fq({},fF.defaultProps),n),{},{ticks:cf(n,!0),viewBox:{x:0,y:0,width:r,height:o}})),a.top,a.top+a.height,t)},f6={horizontal:!0,vertical:!0,stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[]};function f5(e){var t,n,r,o,a,i,s=d$(),l=dW(),c=(0,N.useContext)(dF),u=fq(fq({},e),{},{stroke:null!==(t=e.stroke)&&void 0!==t?t:f6.stroke,fill:null!==(n=e.fill)&&void 0!==n?n:f6.fill,horizontal:null!==(r=e.horizontal)&&void 0!==r?r:f6.horizontal,horizontalFill:null!==(o=e.horizontalFill)&&void 0!==o?o:f6.horizontalFill,vertical:null!==(a=e.vertical)&&void 0!==a?a:f6.vertical,verticalFill:null!==(i=e.verticalFill)&&void 0!==i?i:f6.verticalFill}),d=u.x,p=u.y,f=u.width,m=u.height,g=u.xAxis,h=u.yAxis,b=u.syncWithTicks,y=u.horizontalValues,v=u.verticalValues;if(!$(f)||f<=0||!$(m)||m<=0||!$(d)||d!==+d||!$(p)||p!==+p)return null;var E=u.verticalCoordinatesGenerator||f4,S=u.horizontalCoordinatesGenerator||f3,w=u.horizontalPoints,x=u.verticalPoints;if((!w||!w.length)&&eo()(S)){var O=y&&y.length,A=S({yAxis:h?fq(fq({},h),{},{ticks:O?y:h.ticks}):void 0,width:s,height:l,offset:c},!!O||b);ee(Array.isArray(A),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(fW(A),"]")),Array.isArray(A)&&(w=A)}if((!x||!x.length)&&eo()(E)){var T=v&&v.length,C=E({xAxis:g?fq(fq({},g),{},{ticks:T?v:g.ticks}):void 0,width:s,height:l,offset:c},!!T||b);ee(Array.isArray(C),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(fW(C),"]")),Array.isArray(C)&&(x=C)}return N.createElement("g",{className:"recharts-cartesian-grid"},N.createElement(fX,{fill:u.fill,fillOpacity:u.fillOpacity,x:u.x,y:u.y,width:u.width,height:u.height}),N.createElement(fJ,fY({},u,{offset:c,horizontalPoints:w})),N.createElement(f0,fY({},u,{offset:c,verticalPoints:x})),N.createElement(f1,fY({},u,{horizontalPoints:w})),N.createElement(f2,fY({},u,{verticalPoints:x})))}f5.displayName="CartesianGrid";let f8=(e,t)=>{let[n,r]=(0,N.useState)(t);(0,N.useEffect)(()=>{let t=()=>{r(window.innerWidth),e()};return t(),window.addEventListener("resize",t),()=>window.removeEventListener("resize",t)},[e,n])},f9=e=>{var t=(0,A._T)(e,[]);return N.createElement("svg",Object.assign({},t,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"}),N.createElement("path",{d:"M8 12L14 6V18L8 12Z"}))},f7=e=>{var t=(0,A._T)(e,[]);return N.createElement("svg",Object.assign({},t,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"}),N.createElement("path",{d:"M16 12L10 18V6L16 12Z"}))},me=(0,I.fn)("Legend"),mt=e=>{let{name:t,color:n,onClick:r,activeLegend:o}=e,a=!!r;return N.createElement("li",{className:(0,k.q)(me("legendItem"),"group inline-flex items-center px-2 py-0.5 rounded-tremor-small transition whitespace-nowrap",a?"cursor-pointer":"cursor-default","text-tremor-content",a?"hover:bg-tremor-background-subtle":"","dark:text-dark-tremor-content",a?"dark:hover:bg-dark-tremor-background-subtle":""),onClick:e=>{e.stopPropagation(),null==r||r(t,n)}},N.createElement("svg",{className:(0,k.q)("flex-none h-2 w-2 mr-1.5",(0,I.bM)(n,C.K.text).textColor,o&&o!==t?"opacity-40":"opacity-100"),fill:"currentColor",viewBox:"0 0 8 8"},N.createElement("circle",{cx:4,cy:4,r:4})),N.createElement("p",{className:(0,k.q)("whitespace-nowrap truncate text-tremor-default","text-tremor-content",a?"group-hover:text-tremor-content-emphasis":"","dark:text-dark-tremor-content",o&&o!==t?"opacity-40":"opacity-100",a?"dark:group-hover:text-dark-tremor-content-emphasis":"")},t))},mn=e=>{let{icon:t,onClick:n,disabled:r}=e,[o,a]=N.useState(!1),i=N.useRef(null);return N.useEffect(()=>(o?i.current=setInterval(()=>{null==n||n()},300):clearInterval(i.current),()=>clearInterval(i.current)),[o,n]),(0,N.useEffect)(()=>{r&&(clearInterval(i.current),a(!1))},[r]),N.createElement("button",{type:"button",className:(0,k.q)(me("legendSliderButton"),"w-5 group inline-flex items-center truncate rounded-tremor-small transition",r?"cursor-not-allowed":"cursor-pointer",r?"text-tremor-content-subtle":"text-tremor-content hover:text-tremor-content-emphasis hover:bg-tremor-background-subtle",r?"dark:text-dark-tremor-subtle":"dark:text-dark-tremor dark:hover:text-tremor-content-emphasis dark:hover:bg-dark-tremor-background-subtle"),disabled:r,onClick:e=>{e.stopPropagation(),null==n||n()},onMouseDown:e=>{e.stopPropagation(),a(!0)},onMouseUp:e=>{e.stopPropagation(),a(!1)}},N.createElement(t,{className:"w-full"}))},mr=N.forwardRef((e,t)=>{var n,r;let{categories:o,colors:a=C.s,className:i,onClickLegendItem:s,activeLegend:l,enableLegendSlider:c=!1}=e,u=(0,A._T)(e,["categories","colors","className","onClickLegendItem","activeLegend","enableLegendSlider"]),d=N.useRef(null),[p,f]=N.useState(null),[m,g]=N.useState(null),h=N.useRef(null),b=(0,N.useCallback)(()=>{let e=null==d?void 0:d.current;e&&f({left:e.scrollLeft>0,right:e.scrollWidth-e.clientWidth>e.scrollLeft})},[f]),y=(0,N.useCallback)(e=>{var t;let n=null==d?void 0:d.current,r=null!==(t=null==n?void 0:n.clientWidth)&&void 0!==t?t:0;n&&c&&(n.scrollTo({left:"left"===e?n.scrollLeft-r:n.scrollLeft+r,behavior:"smooth"}),setTimeout(()=>{b()},400))},[c,b]);N.useEffect(()=>{let e=e=>{"ArrowLeft"===e?y("left"):"ArrowRight"===e&&y("right")};return m?(e(m),h.current=setInterval(()=>{e(m)},300)):clearInterval(h.current),()=>clearInterval(h.current)},[m,y]);let v=e=>{e.stopPropagation(),"ArrowLeft"!==e.key&&"ArrowRight"!==e.key||(e.preventDefault(),g(e.key))},E=e=>{e.stopPropagation(),g(null)};return N.useEffect(()=>{let e=null==d?void 0:d.current;return c&&(b(),null==e||e.addEventListener("keydown",v),null==e||e.addEventListener("keyup",E)),()=>{null==e||e.removeEventListener("keydown",v),null==e||e.removeEventListener("keyup",E)}},[b,c]),N.createElement("ol",Object.assign({ref:t,className:(0,k.q)(me("root"),"relative overflow-hidden",i)},u),N.createElement("div",{ref:d,tabIndex:0,className:(0,k.q)("h-full flex",c?(null==p?void 0:p.right)||(null==p?void 0:p.left)?"pl-4 pr-12 items-center overflow-auto snap-mandatory [&::-webkit-scrollbar]:hidden [scrollbar-width:none]":"":"flex-wrap")},o.map((e,t)=>N.createElement(mt,{key:"item-".concat(t),name:e,color:a[t],onClick:s,activeLegend:l}))),c&&((null==p?void 0:p.right)||(null==p?void 0:p.left))?N.createElement(N.Fragment,null,N.createElement("div",{className:(0,k.q)("from-tremor-background","dark:from-dark-tremor-background","absolute top-0 bottom-0 left-0 w-4 bg-gradient-to-r to-transparent pointer-events-none")}),N.createElement("div",{className:(0,k.q)("to-tremor-background","dark:to-dark-tremor-background","absolute top-0 bottom-0 right-10 w-4 bg-gradient-to-r from-transparent pointer-events-none")}),N.createElement("div",{className:(0,k.q)("bg-tremor-background","dark:bg-dark-tremor-background","absolute flex top-0 pr-1 bottom-0 right-0 items-center justify-center h-full")},N.createElement(mn,{icon:f9,onClick:()=>{g(null),y("left")},disabled:!(null==p?void 0:p.left)}),N.createElement(mn,{icon:f7,onClick:()=>{g(null),y("right")},disabled:!(null==p?void 0:p.right)}))):null)});mr.displayName="Legend";let mo=(e,t,n,r,o,a)=>{let{payload:i}=e,s=(0,N.useRef)(null);f8(()=>{var e,t;n((t=null===(e=s.current)||void 0===e?void 0:e.clientHeight)?Number(t)+20:60)});let l=i.filter(e=>"none"!==e.type);return N.createElement("div",{ref:s,className:"flex items-center justify-end"},N.createElement(mr,{categories:l.map(e=>e.value),colors:l.map(e=>t.get(e.value)),onClickLegendItem:o,activeLegend:r,enableLegendSlider:a}))},ma=e=>{let{children:t}=e;return N.createElement("div",{className:(0,k.q)("rounded-tremor-default text-tremor-default border","bg-tremor-background shadow-tremor-dropdown border-tremor-border","dark:bg-dark-tremor-background dark:shadow-dark-tremor-dropdown dark:border-dark-tremor-border")},t)},mi=e=>{let{value:t,name:n,color:r}=e;return N.createElement("div",{className:"flex items-center justify-between space-x-8"},N.createElement("div",{className:"flex items-center space-x-2"},N.createElement("span",{className:(0,k.q)("shrink-0 rounded-tremor-full border-2 h-3 w-3","border-tremor-background shadow-tremor-card","dark:border-dark-tremor-background dark:shadow-dark-tremor-card",(0,I.bM)(r,C.K.background).bgColor)}),N.createElement("p",{className:(0,k.q)("text-right whitespace-nowrap","text-tremor-content","dark:text-dark-tremor-content")},n)),N.createElement("p",{className:(0,k.q)("font-medium tabular-nums text-right whitespace-nowrap","text-tremor-content-emphasis","dark:text-dark-tremor-content-emphasis")},t))},ms=e=>{let{active:t,payload:n,label:r,categoryColors:o,valueFormatter:a}=e;if(t&&n){let e=n.filter(e=>"none"!==e.type);return N.createElement(ma,null,N.createElement("div",{className:(0,k.q)("border-tremor-border border-b px-4 py-2","dark:border-dark-tremor-border")},N.createElement("p",{className:(0,k.q)("font-medium","text-tremor-content-emphasis","dark:text-dark-tremor-content-emphasis")},r)),N.createElement("div",{className:(0,k.q)("px-4 py-2 space-y-1")},e.map((e,t)=>{var n;let{value:r,name:i}=e;return N.createElement(mi,{key:"id-".concat(t),value:a(r),name:i,color:null!==(n=o.get(i))&&void 0!==n?n:T.fr.Blue})})))}return null},ml=(0,I.fn)("Flex"),mc={start:"justify-start",end:"justify-end",center:"justify-center",between:"justify-between",around:"justify-around",evenly:"justify-evenly"},mu={start:"items-start",end:"items-end",center:"items-center",baseline:"items-baseline",stretch:"items-stretch"},md={row:"flex-row",col:"flex-col","row-reverse":"flex-row-reverse","col-reverse":"flex-col-reverse"},mp=N.forwardRef((e,t)=>{let{flexDirection:n="row",justifyContent:r="between",alignItems:o="center",children:a,className:i}=e,s=(0,A._T)(e,["flexDirection","justifyContent","alignItems","children","className"]);return N.createElement("div",Object.assign({ref:t,className:(0,k.q)(ml("root"),"flex w-full",md[n],mc[r],mu[o],i)},s),a)});mp.displayName="Flex";var mf=n(71801);let mm=e=>{let{noDataText:t="No data"}=e;return N.createElement(mp,{alignItems:"center",justifyContent:"center",className:(0,k.q)("w-full h-full border border-dashed rounded-tremor-default","border-tremor-border","dark:border-dark-tremor-border")},N.createElement(mf.Z,{className:(0,k.q)("text-tremor-content","dark:text-dark-tremor-content")},t))},mg=(e,t)=>{let n=new Map;return e.forEach((e,r)=>{n.set(e,t[r])}),n},mh=(e,t,n)=>[e?"auto":null!=t?t:0,null!=n?n:"auto"];function mb(e,t){if(e===t)return!0;if("object"!=typeof e||"object"!=typeof t||null===e||null===t)return!1;let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let o of n)if(!r.includes(o)||!mb(e[o],t[o]))return!1;return!0}let my=N.forwardRef((e,t)=>{let{data:n=[],categories:r=[],index:o,colors:a=C.s,valueFormatter:i=I.Cj,layout:s="horizontal",stack:l=!1,relative:c=!1,startEndOnly:u=!1,animationDuration:d=900,showAnimation:p=!1,showXAxis:f=!0,showYAxis:m=!0,yAxisWidth:g=56,intervalType:h="equidistantPreserveStart",showTooltip:b=!0,showLegend:y=!0,showGridLines:v=!0,autoMinValue:E=!1,minValue:S,maxValue:w,allowDecimals:x=!0,noDataText:O,onValueChange:_,enableLegendSlider:R=!1,customTooltip:P,rotateLabelX:M,tickGap:L=5,className:D}=e,j=(0,A._T)(e,["data","categories","index","colors","valueFormatter","layout","stack","relative","startEndOnly","animationDuration","showAnimation","showXAxis","showYAxis","yAxisWidth","intervalType","showTooltip","showLegend","showGridLines","autoMinValue","minValue","maxValue","allowDecimals","noDataText","onValueChange","enableLegendSlider","customTooltip","rotateLabelX","tickGap","className"]),F=f||m?20:0,[B,U]=(0,N.useState)(60),Z=mg(r,a),[z,H]=N.useState(void 0),[G,$]=(0,N.useState)(void 0),W=!!_;function V(e,t,n){var r,o,a,i;n.stopPropagation(),_&&(mb(z,Object.assign(Object.assign({},e.payload),{value:e.value}))?($(void 0),H(void 0),null==_||_(null)):($(null===(o=null===(r=e.tooltipPayload)||void 0===r?void 0:r[0])||void 0===o?void 0:o.dataKey),H(Object.assign(Object.assign({},e.payload),{value:e.value})),null==_||_(Object.assign({eventType:"bar",categoryClicked:null===(i=null===(a=e.tooltipPayload)||void 0===a?void 0:a[0])||void 0===i?void 0:i.dataKey},e.payload))))}let q=mh(E,S,w);return N.createElement("div",Object.assign({ref:t,className:(0,k.q)("w-full h-80",D)},j),N.createElement(ej,{className:"h-full w-full"},(null==n?void 0:n.length)?N.createElement(fH,{data:n,stackOffset:l?"sign":c?"expand":"none",layout:"vertical"===s?"vertical":"horizontal",onClick:W&&(G||z)?()=>{H(void 0),$(void 0),null==_||_(null)}:void 0},v?N.createElement(f5,{className:(0,k.q)("stroke-1","stroke-tremor-border","dark:stroke-dark-tremor-border"),horizontal:"vertical"!==s,vertical:"vertical"===s}):null,"vertical"!==s?N.createElement(fU,{padding:{left:F,right:F},hide:!f,dataKey:o,interval:u?"preserveStartEnd":h,tick:{transform:"translate(0, 6)"},ticks:u?[n[0][o],n[n.length-1][o]]:void 0,fill:"",stroke:"",className:(0,k.q)("mt-4 text-tremor-label","fill-tremor-content","dark:fill-dark-tremor-content"),tickLine:!1,axisLine:!1,angle:null==M?void 0:M.angle,dy:null==M?void 0:M.verticalShift,height:null==M?void 0:M.xAxisHeight,minTickGap:L}):N.createElement(fU,{hide:!f,type:"number",tick:{transform:"translate(-3, 0)"},domain:q,fill:"",stroke:"",className:(0,k.q)("text-tremor-label","fill-tremor-content","dark:fill-dark-tremor-content"),tickLine:!1,axisLine:!1,tickFormatter:i,minTickGap:L,allowDecimals:x,angle:null==M?void 0:M.angle,dy:null==M?void 0:M.verticalShift,height:null==M?void 0:M.xAxisHeight}),"vertical"!==s?N.createElement(fz,{width:g,hide:!m,axisLine:!1,tickLine:!1,type:"number",domain:q,tick:{transform:"translate(-3, 0)"},fill:"",stroke:"",className:(0,k.q)("text-tremor-label","fill-tremor-content","dark:fill-dark-tremor-content"),tickFormatter:c?e=>"".concat((100*e).toString()," %"):i,allowDecimals:x}):N.createElement(fz,{width:g,hide:!m,dataKey:o,axisLine:!1,tickLine:!1,ticks:u?[n[0][o],n[n.length-1][o]]:void 0,type:"category",interval:"preserveStartEnd",tick:{transform:"translate(0, 6)"},fill:"",stroke:"",className:(0,k.q)("text-tremor-label","fill-tremor-content","dark:fill-dark-tremor-content")}),N.createElement(nK,{wrapperStyle:{outline:"none"},isAnimationActive:!1,cursor:{fill:"#d1d5db",opacity:"0.15"},content:b?e=>{let{active:t,payload:n,label:r}=e;return P?N.createElement(P,{payload:null==n?void 0:n.map(e=>{var t;return Object.assign(Object.assign({},e),{color:null!==(t=Z.get(e.dataKey))&&void 0!==t?t:T.fr.Gray})}),active:t,label:r}):N.createElement(ms,{active:t,payload:n,label:r,valueFormatter:i,categoryColors:Z})}:N.createElement(N.Fragment,null),position:{y:0}}),y?N.createElement(r1,{verticalAlign:"top",height:B,content:e=>{let{payload:t}=e;return mo({payload:t},Z,U,G,W?e=>{W&&(e!==G||z?($(e),null==_||_({eventType:"category",categoryClicked:e})):($(void 0),null==_||_(null)),H(void 0))}:void 0,R)}}):null,r.map(e=>{var t;return N.createElement(dm,{className:(0,k.q)((0,I.bM)(null!==(t=Z.get(e))&&void 0!==t?t:T.fr.Gray,C.K.background).fillColor,_?"cursor-pointer":""),key:e,name:e,type:"linear",stackId:l||c?"a":void 0,dataKey:e,fill:"",isAnimationActive:p,animationDuration:d,shape:e=>((e,t,n,r)=>{let{fillOpacity:o,name:a,payload:i,value:s}=e,{x:l,width:c,y:u,height:d}=e;return"horizontal"===r&&d<0?(u+=d,d=Math.abs(d)):"vertical"===r&&c<0&&(l+=c,c=Math.abs(c)),N.createElement("rect",{x:l,y:u,width:c,height:d,opacity:t||n&&n!==a?mb(t,Object.assign(Object.assign({},i),{value:s}))?o:.3:o})})(e,z,G,s),onClick:V})})):N.createElement(mm,{noDataText:O})))});my.displayName="BarChart"},5:function(e,t,n){n.d(t,{Z:function(){return f}});var r=n(69703),o=n(64090),a=n(58437),i=n(54942),s=n(2898),l=n(99250),c=n(65492);let u={xs:{paddingX:"px-2",paddingY:"py-0.5",fontSize:"text-xs"},sm:{paddingX:"px-2.5",paddingY:"py-0.5",fontSize:"text-sm"},md:{paddingX:"px-3",paddingY:"py-0.5",fontSize:"text-md"},lg:{paddingX:"px-3.5",paddingY:"py-0.5",fontSize:"text-lg"},xl:{paddingX:"px-4",paddingY:"py-1",fontSize:"text-xl"}},d={xs:{height:"h-4",width:"w-4"},sm:{height:"h-4",width:"w-4"},md:{height:"h-4",width:"w-4"},lg:{height:"h-5",width:"w-5"},xl:{height:"h-6",width:"w-6"}},p=(0,c.fn)("Badge"),f=o.forwardRef((e,t)=>{let{color:n,icon:f,size:m=i.u8.SM,tooltip:g,className:h,children:b}=e,y=(0,r._T)(e,["color","icon","size","tooltip","className","children"]),v=f||null,{tooltipProps:E,getReferenceProps:S}=(0,a.l)();return o.createElement("span",Object.assign({ref:(0,c.lq)([t,E.refs.setReference]),className:(0,l.q)(p("root"),"w-max flex-shrink-0 inline-flex justify-center items-center cursor-default rounded-tremor-full",n?(0,l.q)((0,c.bM)(n,s.K.background).bgColor,(0,c.bM)(n,s.K.text).textColor,"bg-opacity-20 dark:bg-opacity-25"):(0,l.q)("bg-tremor-brand-muted text-tremor-brand-emphasis","dark:bg-dark-tremor-brand-muted dark:text-dark-tremor-brand-emphasis"),u[m].paddingX,u[m].paddingY,u[m].fontSize,h)},S,y),o.createElement(a.Z,Object.assign({text:g},E)),v?o.createElement(v,{className:(0,l.q)(p("icon"),"shrink-0 -ml-1 mr-1.5",d[m].height,d[m].width)}):null,o.createElement("p",{className:(0,l.q)(p("text"),"text-sm whitespace-nowrap")},b))});f.displayName="Badge"},61244:function(e,t,n){n.d(t,{Z:function(){return g}});var r=n(69703),o=n(64090),a=n(58437),i=n(54942),s=n(99250),l=n(65492),c=n(2898);let u={xs:{paddingX:"px-1.5",paddingY:"py-1.5"},sm:{paddingX:"px-1.5",paddingY:"py-1.5"},md:{paddingX:"px-2",paddingY:"py-2"},lg:{paddingX:"px-2",paddingY:"py-2"},xl:{paddingX:"px-2.5",paddingY:"py-2.5"}},d={xs:{height:"h-3",width:"w-3"},sm:{height:"h-5",width:"w-5"},md:{height:"h-5",width:"w-5"},lg:{height:"h-7",width:"w-7"},xl:{height:"h-9",width:"w-9"}},p={simple:{rounded:"",border:"",ring:"",shadow:""},light:{rounded:"rounded-tremor-default",border:"",ring:"",shadow:""},shadow:{rounded:"rounded-tremor-default",border:"border",ring:"",shadow:"shadow-tremor-card dark:shadow-dark-tremor-card"},solid:{rounded:"rounded-tremor-default",border:"border-2",ring:"ring-1",shadow:""},outlined:{rounded:"rounded-tremor-default",border:"border",ring:"ring-2",shadow:""}},f=(e,t)=>{switch(e){case"simple":return{textColor:t?(0,l.bM)(t,c.K.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:"",borderColor:"",ringColor:""};case"light":return{textColor:t?(0,l.bM)(t,c.K.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:t?(0,s.q)((0,l.bM)(t,c.K.background).bgColor,"bg-opacity-20"):"bg-tremor-brand-muted dark:bg-dark-tremor-brand-muted",borderColor:"",ringColor:""};case"shadow":return{textColor:t?(0,l.bM)(t,c.K.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:t?(0,s.q)((0,l.bM)(t,c.K.background).bgColor,"bg-opacity-20"):"bg-tremor-background dark:bg-dark-tremor-background",borderColor:"border-tremor-border dark:border-dark-tremor-border",ringColor:""};case"solid":return{textColor:t?(0,l.bM)(t,c.K.text).textColor:"text-tremor-brand-inverted dark:text-dark-tremor-brand-inverted",bgColor:t?(0,s.q)((0,l.bM)(t,c.K.background).bgColor,"bg-opacity-20"):"bg-tremor-brand dark:bg-dark-tremor-brand",borderColor:"border-tremor-brand-inverted dark:border-dark-tremor-brand-inverted",ringColor:"ring-tremor-ring dark:ring-dark-tremor-ring"};case"outlined":return{textColor:t?(0,l.bM)(t,c.K.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:t?(0,s.q)((0,l.bM)(t,c.K.background).bgColor,"bg-opacity-20"):"bg-tremor-background dark:bg-dark-tremor-background",borderColor:t?(0,l.bM)(t,c.K.ring).borderColor:"border-tremor-brand-subtle dark:border-dark-tremor-brand-subtle",ringColor:t?(0,s.q)((0,l.bM)(t,c.K.ring).ringColor,"ring-opacity-40"):"ring-tremor-brand-muted dark:ring-dark-tremor-brand-muted"}}},m=(0,l.fn)("Icon"),g=o.forwardRef((e,t)=>{let{icon:n,variant:c="simple",tooltip:g,size:h=i.u8.SM,color:b,className:y}=e,v=(0,r._T)(e,["icon","variant","tooltip","size","color","className"]),E=f(c,b),{tooltipProps:S,getReferenceProps:w}=(0,a.l)();return o.createElement("span",Object.assign({ref:(0,l.lq)([t,S.refs.setReference]),className:(0,s.q)(m("root"),"inline-flex flex-shrink-0 items-center",E.bgColor,E.textColor,E.borderColor,E.ringColor,p[c].rounded,p[c].border,p[c].shadow,p[c].ring,u[h].paddingX,u[h].paddingY,y)},w,v),o.createElement(a.Z,Object.assign({text:g},S)),o.createElement(n,{className:(0,s.q)(m("icon"),"shrink-0",d[h].height,d[h].width)}))});g.displayName="Icon"},2179:function(e,t,n){n.d(t,{Z:function(){return O}});var r=n(69703),o=n(58437),a=n(64090);let i=["preEnter","entering","entered","preExit","exiting","exited","unmounted"],s=e=>({_s:e,status:i[e],isEnter:e<3,isMounted:6!==e,isResolved:2===e||e>4}),l=e=>e?6:5,c=(e,t)=>{switch(e){case 1:case 0:return 2;case 4:case 3:return l(t)}},u=e=>"object"==typeof e?[e.enter,e.exit]:[e,e],d=(e,t)=>setTimeout(()=>{isNaN(document.body.offsetTop)||e(t+1)},0),p=(e,t,n,r,o)=>{clearTimeout(r.current);let a=s(e);t(a),n.current=a,o&&o({current:a})},f=function(){let{enter:e=!0,exit:t=!0,preEnter:n,preExit:r,timeout:o,initialEntered:i,mountOnEnter:f,unmountOnExit:m,onStateChange:g}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},[h,b]=(0,a.useState)(()=>s(i?2:l(f))),y=(0,a.useRef)(h),v=(0,a.useRef)(),[E,S]=u(o),w=(0,a.useCallback)(()=>{let e=c(y.current._s,m);e&&p(e,b,y,v,g)},[g,m]),x=(0,a.useCallback)(o=>{let a=e=>{switch(p(e,b,y,v,g),e){case 1:E>=0&&(v.current=setTimeout(w,E));break;case 4:S>=0&&(v.current=setTimeout(w,S));break;case 0:case 3:v.current=d(a,e)}},i=y.current.isEnter;"boolean"!=typeof o&&(o=!i),o?i||a(e?n?0:1:2):i&&a(t?r?3:4:l(m))},[w,g,e,t,n,r,E,S,m]);return(0,a.useEffect)(()=>()=>clearTimeout(v.current),[]),[h,x,w]};var m=n(54942),g=n(99250),h=n(65492);let b=e=>{var t=(0,r._T)(e,[]);return a.createElement("svg",Object.assign({},t,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"}),a.createElement("path",{fill:"none",d:"M0 0h24v24H0z"}),a.createElement("path",{d:"M18.364 5.636L16.95 7.05A7 7 0 1 0 19 12h2a9 9 0 1 1-2.636-6.364z"}))};var y=n(2898);let v={xs:{height:"h-4",width:"w-4"},sm:{height:"h-5",width:"w-5"},md:{height:"h-5",width:"w-5"},lg:{height:"h-6",width:"w-6"},xl:{height:"h-6",width:"w-6"}},E=e=>"light"!==e?{xs:{paddingX:"px-2.5",paddingY:"py-1.5",fontSize:"text-xs"},sm:{paddingX:"px-4",paddingY:"py-2",fontSize:"text-sm"},md:{paddingX:"px-4",paddingY:"py-2",fontSize:"text-md"},lg:{paddingX:"px-4",paddingY:"py-2.5",fontSize:"text-lg"},xl:{paddingX:"px-4",paddingY:"py-3",fontSize:"text-xl"}}:{xs:{paddingX:"",paddingY:"",fontSize:"text-xs"},sm:{paddingX:"",paddingY:"",fontSize:"text-sm"},md:{paddingX:"",paddingY:"",fontSize:"text-md"},lg:{paddingX:"",paddingY:"",fontSize:"text-lg"},xl:{paddingX:"",paddingY:"",fontSize:"text-xl"}},S=(e,t)=>{switch(e){case"primary":return{textColor:t?(0,h.bM)("white").textColor:"text-tremor-brand-inverted dark:text-dark-tremor-brand-inverted",hoverTextColor:t?(0,h.bM)("white").textColor:"text-tremor-brand-inverted dark:text-dark-tremor-brand-inverted",bgColor:t?(0,h.bM)(t,y.K.background).bgColor:"bg-tremor-brand dark:bg-dark-tremor-brand",hoverBgColor:t?(0,h.bM)(t,y.K.darkBackground).hoverBgColor:"hover:bg-tremor-brand-emphasis dark:hover:bg-dark-tremor-brand-emphasis",borderColor:t?(0,h.bM)(t,y.K.border).borderColor:"border-tremor-brand dark:border-dark-tremor-brand",hoverBorderColor:t?(0,h.bM)(t,y.K.darkBorder).hoverBorderColor:"hover:border-tremor-brand-emphasis dark:hover:border-dark-tremor-brand-emphasis"};case"secondary":return{textColor:t?(0,h.bM)(t,y.K.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",hoverTextColor:t?(0,h.bM)(t,y.K.text).textColor:"hover:text-tremor-brand-emphasis dark:hover:text-dark-tremor-brand-emphasis",bgColor:(0,h.bM)("transparent").bgColor,hoverBgColor:t?(0,g.q)((0,h.bM)(t,y.K.background).hoverBgColor,"hover:bg-opacity-20 dark:hover:bg-opacity-20"):"hover:bg-tremor-brand-faint dark:hover:bg-dark-tremor-brand-faint",borderColor:t?(0,h.bM)(t,y.K.border).borderColor:"border-tremor-brand dark:border-dark-tremor-brand"};case"light":return{textColor:t?(0,h.bM)(t,y.K.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",hoverTextColor:t?(0,h.bM)(t,y.K.darkText).hoverTextColor:"hover:text-tremor-brand-emphasis dark:hover:text-dark-tremor-brand-emphasis",bgColor:(0,h.bM)("transparent").bgColor,borderColor:"",hoverBorderColor:""}}},w=(0,h.fn)("Button"),x=e=>{let{loading:t,iconSize:n,iconPosition:r,Icon:o,needMargin:i,transitionStatus:s}=e,l=i?r===m.zS.Left?(0,g.q)("-ml-1","mr-1.5"):(0,g.q)("-mr-1","ml-1.5"):"",c=(0,g.q)("w-0 h-0"),u={default:c,entering:c,entered:n,exiting:n,exited:c};return t?a.createElement(b,{className:(0,g.q)(w("icon"),"animate-spin shrink-0",l,u.default,u[s]),style:{transition:"width 150ms"}}):a.createElement(o,{className:(0,g.q)(w("icon"),"shrink-0",n,l)})},O=a.forwardRef((e,t)=>{let{icon:n,iconPosition:i=m.zS.Left,size:s=m.u8.SM,color:l,variant:c="primary",disabled:u,loading:d=!1,loadingText:p,children:b,tooltip:y,className:O}=e,A=(0,r._T)(e,["icon","iconPosition","size","color","variant","disabled","loading","loadingText","children","tooltip","className"]),T=d||u,C=void 0!==n||d,k=d&&p,I=!(!b&&!k),N=(0,g.q)(v[s].height,v[s].width),_="light"!==c?(0,g.q)("rounded-tremor-default border","shadow-tremor-input","dark:shadow-dark-tremor-input"):"",R=S(c,l),P=E(c)[s],{tooltipProps:M,getReferenceProps:L}=(0,o.l)(300),[D,j]=f({timeout:50});return(0,a.useEffect)(()=>{j(d)},[d]),a.createElement("button",Object.assign({ref:(0,h.lq)([t,M.refs.setReference]),className:(0,g.q)(w("root"),"flex-shrink-0 inline-flex justify-center items-center group font-medium outline-none",_,P.paddingX,P.paddingY,P.fontSize,R.textColor,R.bgColor,R.borderColor,R.hoverBorderColor,T?"opacity-50 cursor-not-allowed":(0,g.q)(S(c,l).hoverTextColor,S(c,l).hoverBgColor,S(c,l).hoverBorderColor),O),disabled:T},L,A),a.createElement(o.Z,Object.assign({text:y},M)),C&&i!==m.zS.Right?a.createElement(x,{loading:d,iconSize:N,iconPosition:i,Icon:n,transitionStatus:D.status,needMargin:I}):null,k||b?a.createElement("span",{className:(0,g.q)(w("text"),"text-tremor-default whitespace-nowrap")},k?p:b):null,C&&i===m.zS.Right?a.createElement(x,{loading:d,iconSize:N,iconPosition:i,Icon:n,transitionStatus:D.status,needMargin:I}):null)});O.displayName="Button"},92836:function(e,t,n){n.d(t,{Z:function(){return p}});var r=n(69703),o=n(69804),a=n(2898),i=n(99250),s=n(65492),l=n(64090),c=n(41608),u=n(50027);n(18174),n(21871),n(41213);let d=(0,s.fn)("Tab"),p=l.forwardRef((e,t)=>{let{icon:n,className:p,children:f}=e,m=(0,r._T)(e,["icon","className","children"]),g=(0,l.useContext)(c.O),h=(0,l.useContext)(u.Z);return l.createElement(o.O,Object.assign({ref:t,className:(0,i.q)(d("root"),"flex whitespace-nowrap truncate max-w-xs outline-none focus:ring-0 text-tremor-default transition duration-100",h?(0,s.bM)(h,a.K.text).selectTextColor:"solid"===g?"ui-selected:text-tremor-content-emphasis dark:ui-selected:text-dark-tremor-content-emphasis":"ui-selected:text-tremor-brand dark:ui-selected:text-dark-tremor-brand",function(e,t){switch(e){case"line":return(0,i.q)("ui-selected:border-b-2 hover:border-b-2 border-transparent transition duration-100 -mb-px px-2 py-2","hover:border-tremor-content hover:text-tremor-content-emphasis text-tremor-content","dark:hover:border-dark-tremor-content-emphasis dark:hover:text-dark-tremor-content-emphasis dark:text-dark-tremor-content",t?(0,s.bM)(t,a.K.border).selectBorderColor:"ui-selected:border-tremor-brand dark:ui-selected:border-dark-tremor-brand");case"solid":return(0,i.q)("border-transparent border rounded-tremor-small px-2.5 py-1","ui-selected:border-tremor-border ui-selected:bg-tremor-background ui-selected:shadow-tremor-input hover:text-tremor-content-emphasis ui-selected:text-tremor-brand","dark:ui-selected:border-dark-tremor-border dark:ui-selected:bg-dark-tremor-background dark:ui-selected:shadow-dark-tremor-input dark:hover:text-dark-tremor-content-emphasis dark:ui-selected:text-dark-tremor-brand",t?(0,s.bM)(t,a.K.text).selectTextColor:"text-tremor-content dark:text-dark-tremor-content")}}(g,h),p)},m),n?l.createElement(n,{className:(0,i.q)(d("icon"),"flex-none h-5 w-5",f?"mr-2":"")}):null,f?l.createElement("span",null,f):null)});p.displayName="Tab"},26734:function(e,t,n){n.d(t,{Z:function(){return c}});var r=n(69703),o=n(69804),a=n(99250),i=n(65492),s=n(64090);let l=(0,i.fn)("TabGroup"),c=s.forwardRef((e,t)=>{let{defaultIndex:n,index:i,onIndexChange:c,children:u,className:d}=e,p=(0,r._T)(e,["defaultIndex","index","onIndexChange","children","className"]);return s.createElement(o.O.Group,Object.assign({as:"div",ref:t,defaultIndex:n,selectedIndex:i,onChange:c,className:(0,a.q)(l("root"),"w-full",d)},p),u)});c.displayName="TabGroup"},41608:function(e,t,n){n.d(t,{O:function(){return c},Z:function(){return d}});var r=n(69703),o=n(64090),a=n(50027);n(18174),n(21871),n(41213);var i=n(69804),s=n(99250);let l=(0,n(65492).fn)("TabList"),c=(0,o.createContext)("line"),u={line:(0,s.q)("flex border-b space-x-4","border-tremor-border","dark:border-dark-tremor-border"),solid:(0,s.q)("inline-flex p-0.5 rounded-tremor-default space-x-1.5","bg-tremor-background-subtle","dark:bg-dark-tremor-background-subtle")},d=o.forwardRef((e,t)=>{let{color:n,variant:d="line",children:p,className:f}=e,m=(0,r._T)(e,["color","variant","children","className"]);return o.createElement(i.O.List,Object.assign({ref:t,className:(0,s.q)(l("root"),"justify-start overflow-x-clip",u[d],f)},m),o.createElement(c.Provider,{value:d},o.createElement(a.Z.Provider,{value:n},p)))});d.displayName="TabList"},32126:function(e,t,n){n.d(t,{Z:function(){return u}});var r=n(69703);n(50027);var o=n(18174);n(21871);var a=n(41213),i=n(99250),s=n(65492),l=n(64090);let c=(0,s.fn)("TabPanel"),u=l.forwardRef((e,t)=>{let{children:n,className:s}=e,u=(0,r._T)(e,["children","className"]),{selectedValue:d}=(0,l.useContext)(a.Z),p=d===(0,l.useContext)(o.Z);return l.createElement("div",Object.assign({ref:t,className:(0,i.q)(c("root"),"w-full mt-2",p?"":"hidden",s),"aria-selected":p?"true":"false"},u),n)});u.displayName="TabPanel"},23682:function(e,t,n){n.d(t,{Z:function(){return d}});var r=n(69703),o=n(69804);n(50027);var a=n(18174);n(21871);var i=n(41213),s=n(99250),l=n(65492),c=n(64090);let u=(0,l.fn)("TabPanels"),d=c.forwardRef((e,t)=>{let{children:n,className:l}=e,d=(0,r._T)(e,["children","className"]);return c.createElement(o.O.Panels,Object.assign({as:"div",ref:t,className:(0,s.q)(u("root"),"w-full",l)},d),e=>{let{selectedIndex:t}=e;return c.createElement(i.Z.Provider,{value:{selectedValue:t}},c.Children.map(n,(e,t)=>c.createElement(a.Z.Provider,{value:t},e)))})});d.displayName="TabPanels"},13810:function(e,t,n){n.d(t,{Z:function(){return d}});var r=n(69703),o=n(64090),a=n(54942),i=n(2898),s=n(99250),l=n(65492);let c=(0,l.fn)("Card"),u=e=>{if(!e)return"";switch(e){case a.zS.Left:return"border-l-4";case a.m.Top:return"border-t-4";case a.zS.Right:return"border-r-4";case a.m.Bottom:return"border-b-4";default:return""}},d=o.forwardRef((e,t)=>{let{decoration:n="",decorationColor:a,children:d,className:p}=e,f=(0,r._T)(e,["decoration","decorationColor","children","className"]);return o.createElement("div",Object.assign({ref:t,className:(0,s.q)(c("root"),"relative w-full text-left ring-1 rounded-tremor-default p-6","bg-tremor-background ring-tremor-ring shadow-tremor-card","dark:bg-dark-tremor-background dark:ring-dark-tremor-ring dark:shadow-dark-tremor-card",a?(0,l.bM)(a,i.K.border).borderColor:"border-tremor-brand dark:border-dark-tremor-brand",u(n),p)},f),d)});d.displayName="Card"},10384:function(e,t,n){n.d(t,{Z:function(){return c}});var r=n(69703),o=n(99250),a=n(65492),i=n(64090),s=n(50217);let l=(0,a.fn)("Col"),c=i.forwardRef((e,t)=>{let{numColSpan:n=1,numColSpanSm:a,numColSpanMd:c,numColSpanLg:u,children:d,className:p}=e,f=(0,r._T)(e,["numColSpan","numColSpanSm","numColSpanMd","numColSpanLg","children","className"]),m=(e,t)=>e&&Object.keys(t).includes(String(e))?t[e]:"";return i.createElement("div",Object.assign({ref:t,className:(0,o.q)(l("root"),(()=>{let e=m(n,s.PT),t=m(a,s.SP),r=m(c,s.VS),i=m(u,s._w);return(0,o.q)(e,t,r,i)})(),p)},f),d)});c.displayName="Col"},46453:function(e,t,n){n.d(t,{Z:function(){return u}});var r=n(69703),o=n(99250),a=n(65492),i=n(64090),s=n(50217);let l=(0,a.fn)("Grid"),c=(e,t)=>e&&Object.keys(t).includes(String(e))?t[e]:"",u=i.forwardRef((e,t)=>{let{numItems:n=1,numItemsSm:a,numItemsMd:u,numItemsLg:d,children:p,className:f}=e,m=(0,r._T)(e,["numItems","numItemsSm","numItemsMd","numItemsLg","children","className"]),g=c(n,s._m),h=c(a,s.LH),b=c(u,s.l5),y=c(d,s.N4),v=(0,o.q)(g,h,b,y);return i.createElement("div",Object.assign({ref:t,className:(0,o.q)(l("root"),"grid",v,f)},m),p)});u.displayName="Grid"},50217:function(e,t,n){n.d(t,{LH:function(){return o},N4:function(){return i},PT:function(){return s},SP:function(){return l},VS:function(){return c},_m:function(){return r},_w:function(){return u},l5:function(){return a}});let r={0:"grid-cols-none",1:"grid-cols-1",2:"grid-cols-2",3:"grid-cols-3",4:"grid-cols-4",5:"grid-cols-5",6:"grid-cols-6",7:"grid-cols-7",8:"grid-cols-8",9:"grid-cols-9",10:"grid-cols-10",11:"grid-cols-11",12:"grid-cols-12"},o={0:"sm:grid-cols-none",1:"sm:grid-cols-1",2:"sm:grid-cols-2",3:"sm:grid-cols-3",4:"sm:grid-cols-4",5:"sm:grid-cols-5",6:"sm:grid-cols-6",7:"sm:grid-cols-7",8:"sm:grid-cols-8",9:"sm:grid-cols-9",10:"sm:grid-cols-10",11:"sm:grid-cols-11",12:"sm:grid-cols-12"},a={0:"md:grid-cols-none",1:"md:grid-cols-1",2:"md:grid-cols-2",3:"md:grid-cols-3",4:"md:grid-cols-4",5:"md:grid-cols-5",6:"md:grid-cols-6",7:"md:grid-cols-7",8:"md:grid-cols-8",9:"md:grid-cols-9",10:"md:grid-cols-10",11:"md:grid-cols-11",12:"md:grid-cols-12"},i={0:"lg:grid-cols-none",1:"lg:grid-cols-1",2:"lg:grid-cols-2",3:"lg:grid-cols-3",4:"lg:grid-cols-4",5:"lg:grid-cols-5",6:"lg:grid-cols-6",7:"lg:grid-cols-7",8:"lg:grid-cols-8",9:"lg:grid-cols-9",10:"lg:grid-cols-10",11:"lg:grid-cols-11",12:"lg:grid-cols-12"},s={1:"col-span-1",2:"col-span-2",3:"col-span-3",4:"col-span-4",5:"col-span-5",6:"col-span-6",7:"col-span-7",8:"col-span-8",9:"col-span-9",10:"col-span-10",11:"col-span-11",12:"col-span-12",13:"col-span-13"},l={1:"sm:col-span-1",2:"sm:col-span-2",3:"sm:col-span-3",4:"sm:col-span-4",5:"sm:col-span-5",6:"sm:col-span-6",7:"sm:col-span-7",8:"sm:col-span-8",9:"sm:col-span-9",10:"sm:col-span-10",11:"sm:col-span-11",12:"sm:col-span-12",13:"sm:col-span-13"},c={1:"md:col-span-1",2:"md:col-span-2",3:"md:col-span-3",4:"md:col-span-4",5:"md:col-span-5",6:"md:col-span-6",7:"md:col-span-7",8:"md:col-span-8",9:"md:col-span-9",10:"md:col-span-10",11:"md:col-span-11",12:"md:col-span-12",13:"md:col-span-13"},u={1:"lg:col-span-1",2:"lg:col-span-2",3:"lg:col-span-3",4:"lg:col-span-4",5:"lg:col-span-5",6:"lg:col-span-6",7:"lg:col-span-7",8:"lg:col-span-8",9:"lg:col-span-9",10:"lg:col-span-10",11:"lg:col-span-11",12:"lg:col-span-12",13:"lg:col-span-13"}},10827:function(e,t,n){n.d(t,{Z:function(){return s}});var r=n(69703),o=n(64090),a=n(99250);let i=(0,n(65492).fn)("Table"),s=o.forwardRef((e,t)=>{let{children:n,className:s}=e,l=(0,r._T)(e,["children","className"]);return o.createElement("div",{className:(0,a.q)(i("root"),"overflow-auto",s)},o.createElement("table",Object.assign({ref:t,className:(0,a.q)(i("table"),"w-full text-tremor-default","text-tremor-content","dark:text-dark-tremor-content")},l),n))});s.displayName="Table"},3851:function(e,t,n){n.d(t,{Z:function(){return s}});var r=n(69703),o=n(64090),a=n(99250);let i=(0,n(65492).fn)("TableBody"),s=o.forwardRef((e,t)=>{let{children:n,className:s}=e,l=(0,r._T)(e,["children","className"]);return o.createElement(o.Fragment,null,o.createElement("tbody",Object.assign({ref:t,className:(0,a.q)(i("root"),"align-top divide-y","divide-tremor-border","dark:divide-dark-tremor-border",s)},l),n))});s.displayName="TableBody"},2044:function(e,t,n){n.d(t,{Z:function(){return s}});var r=n(69703),o=n(64090),a=n(99250);let i=(0,n(65492).fn)("TableCell"),s=o.forwardRef((e,t)=>{let{children:n,className:s}=e,l=(0,r._T)(e,["children","className"]);return o.createElement(o.Fragment,null,o.createElement("td",Object.assign({ref:t,className:(0,a.q)(i("root"),"align-middle whitespace-nowrap text-left p-4",s)},l),n))});s.displayName="TableCell"},64167:function(e,t,n){n.d(t,{Z:function(){return s}});var r=n(69703),o=n(64090),a=n(99250);let i=(0,n(65492).fn)("TableHead"),s=o.forwardRef((e,t)=>{let{children:n,className:s}=e,l=(0,r._T)(e,["children","className"]);return o.createElement(o.Fragment,null,o.createElement("thead",Object.assign({ref:t,className:(0,a.q)(i("root"),"text-left","text-tremor-content","dark:text-dark-tremor-content",s)},l),n))});s.displayName="TableHead"},74480:function(e,t,n){n.d(t,{Z:function(){return s}});var r=n(69703),o=n(64090),a=n(99250);let i=(0,n(65492).fn)("TableHeaderCell"),s=o.forwardRef((e,t)=>{let{children:n,className:s}=e,l=(0,r._T)(e,["children","className"]);return o.createElement(o.Fragment,null,o.createElement("th",Object.assign({ref:t,className:(0,a.q)(i("root"),"whitespace-nowrap text-left font-semibold top-0 px-4 py-3.5","text-tremor-content","dark:text-dark-tremor-content",s)},l),n))});s.displayName="TableHeaderCell"},7178:function(e,t,n){n.d(t,{Z:function(){return s}});var r=n(69703),o=n(64090),a=n(99250);let i=(0,n(65492).fn)("TableRow"),s=o.forwardRef((e,t)=>{let{children:n,className:s}=e,l=(0,r._T)(e,["children","className"]);return o.createElement(o.Fragment,null,o.createElement("tr",Object.assign({ref:t,className:(0,a.q)(i("row"),s)},l),n))});s.displayName="TableRow"},56863:function(e,t,n){n.d(t,{Z:function(){return l}});var r=n(69703),o=n(2898),a=n(99250),i=n(65492),s=n(64090);let l=s.forwardRef((e,t)=>{let{color:n,children:l,className:c}=e,u=(0,r._T)(e,["color","children","className"]);return s.createElement("p",Object.assign({ref:t,className:(0,a.q)("font-semibold text-tremor-metric",n?(0,i.bM)(n,o.K.darkText).textColor:"text-tremor-content-emphasis dark:text-dark-tremor-content-emphasis",c)},u),l)});l.displayName="Metric"},71801:function(e,t,n){n.d(t,{Z:function(){return s}});var r=n(2898),o=n(99250),a=n(65492),i=n(64090);let s=i.forwardRef((e,t)=>{let{color:n,className:s,children:l}=e;return i.createElement("p",{ref:t,className:(0,o.q)("text-tremor-default",n?(0,a.bM)(n,r.K.text).textColor:(0,o.q)("text-tremor-content","dark:text-dark-tremor-content"),s)},l)});s.displayName="Text"},42440:function(e,t,n){n.d(t,{Z:function(){return l}});var r=n(69703),o=n(2898),a=n(99250),i=n(65492),s=n(64090);let l=s.forwardRef((e,t)=>{let{color:n,children:l,className:c}=e,u=(0,r._T)(e,["color","children","className"]);return s.createElement("p",Object.assign({ref:t,className:(0,a.q)("font-medium text-tremor-title",n?(0,i.bM)(n,o.K.darkText).textColor:"text-tremor-content-emphasis dark:text-dark-tremor-content-emphasis",c)},u),l)});l.displayName="Title"},58437:function(e,t,n){n.d(t,{Z:function(){return eU},l:function(){return eB}});var r=n(64090),o=n.t(r,2),a=n(89542);function i(e){return c(e)?(e.nodeName||"").toLowerCase():"#document"}function s(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function l(e){var t;return null==(t=(c(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function c(e){return e instanceof Node||e instanceof s(e).Node}function u(e){return e instanceof Element||e instanceof s(e).Element}function d(e){return e instanceof HTMLElement||e instanceof s(e).HTMLElement}function p(e){return"undefined"!=typeof ShadowRoot&&(e instanceof ShadowRoot||e instanceof s(e).ShadowRoot)}function f(e){let{overflow:t,overflowX:n,overflowY:r,display:o}=y(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function m(e){let t=h(),n=y(e);return"none"!==n.transform||"none"!==n.perspective||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||["transform","perspective","filter"].some(e=>(n.willChange||"").includes(e))||["paint","layout","strict","content"].some(e=>(n.contain||"").includes(e))}function g(e){let t=E(e);for(;d(t)&&!b(t);){if(m(t))return t;t=E(t)}return null}function h(){return"undefined"!=typeof CSS&&!!CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")}function b(e){return["html","body","#document"].includes(i(e))}function y(e){return s(e).getComputedStyle(e)}function v(e){return u(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function E(e){if("html"===i(e))return e;let t=e.assignedSlot||e.parentNode||p(e)&&e.host||l(e);return p(t)?t.host:t}function S(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);let o=function e(t){let n=E(t);return b(n)?t.ownerDocument?t.ownerDocument.body:t.body:d(n)&&f(n)?n:e(n)}(e),a=o===(null==(r=e.ownerDocument)?void 0:r.body),i=s(o);return a?t.concat(i,i.visualViewport||[],f(o)?o:[],i.frameElement&&n?S(i.frameElement):[]):t.concat(o,S(o,[],n))}let w=Math.min,x=Math.max,O=Math.round,A=Math.floor,T=e=>({x:e,y:e}),C={left:"right",right:"left",bottom:"top",top:"bottom"},k={start:"end",end:"start"};function I(e,t){return"function"==typeof e?e(t):e}function N(e){return e.split("-")[0]}function _(e){return e.split("-")[1]}function R(e){return"x"===e?"y":"x"}function P(e){return"y"===e?"height":"width"}function M(e){return["top","bottom"].includes(N(e))?"y":"x"}function L(e){return e.replace(/start|end/g,e=>k[e])}function D(e){return e.replace(/left|right|bottom|top/g,e=>C[e])}function j(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}function F(e,t,n){let r,{reference:o,floating:a}=e,i=M(t),s=R(M(t)),l=P(s),c=N(t),u="y"===i,d=o.x+o.width/2-a.width/2,p=o.y+o.height/2-a.height/2,f=o[l]/2-a[l]/2;switch(c){case"top":r={x:d,y:o.y-a.height};break;case"bottom":r={x:d,y:o.y+o.height};break;case"right":r={x:o.x+o.width,y:p};break;case"left":r={x:o.x-a.width,y:p};break;default:r={x:o.x,y:o.y}}switch(_(t)){case"start":r[s]-=f*(n&&u?-1:1);break;case"end":r[s]+=f*(n&&u?-1:1)}return r}let B=async(e,t,n)=>{let{placement:r="bottom",strategy:o="absolute",middleware:a=[],platform:i}=n,s=a.filter(Boolean),l=await (null==i.isRTL?void 0:i.isRTL(t)),c=await i.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:d}=F(c,r,l),p=r,f={},m=0;for(let n=0;n{!function(n){try{t=t||e.matches(n)}catch(e){}}(n)});let o=g(e);if(t&&o){let e=o.getBoundingClientRect();n=e.x,r=e.y}return[t,n,r]}function K(e){return V(l(e)).left+v(e).scrollLeft}function X(e,t,n){let r;if("viewport"===t)r=function(e,t){let n=s(e),r=l(e),o=n.visualViewport,a=r.clientWidth,i=r.clientHeight,c=0,u=0;if(o){a=o.width,i=o.height;let e=h();(!e||e&&"fixed"===t)&&(c=o.offsetLeft,u=o.offsetTop)}return{width:a,height:i,x:c,y:u}}(e,n);else if("document"===t)r=function(e){let t=l(e),n=v(e),r=e.ownerDocument.body,o=x(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=x(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),i=-n.scrollLeft+K(e),s=-n.scrollTop;return"rtl"===y(r).direction&&(i+=x(t.clientWidth,r.clientWidth)-o),{width:o,height:a,x:i,y:s}}(l(e));else if(u(t))r=function(e,t){let n=V(e,!0,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft,a=d(e)?G(e):T(1),i=e.clientWidth*a.x;return{width:i,height:e.clientHeight*a.y,x:o*a.x,y:r*a.y}}(t,n);else{let n=W(e);r={...t,x:t.x-n.x,y:t.y-n.y}}return j(r)}function Q(e,t){return d(e)&&"fixed"!==y(e).position?t?t(e):e.offsetParent:null}function J(e,t){let n=s(e);if(!d(e))return n;let r=Q(e,t);for(;r&&["table","td","th"].includes(i(r))&&"static"===y(r).position;)r=Q(r,t);return r&&("html"===i(r)||"body"===i(r)&&"static"===y(r).position&&!m(r))?n:r||g(e)||n}let ee=async function(e){let t=this.getOffsetParent||J,n=this.getDimensions;return{reference:function(e,t,n,r){let o=d(t),a=l(t),s="fixed"===n,c=V(e,!0,s,t),u={scrollLeft:0,scrollTop:0},p=T(0);if(o||!o&&!s){if(("body"!==i(t)||f(a))&&(u=v(t)),o){let e=V(t,!0,s,t);p.x=e.x+t.clientLeft,p.y=e.y+t.clientTop}else a&&(p.x=K(a))}let m=c.left+u.scrollLeft-p.x,g=c.top+u.scrollTop-p.y,[h,b,y]=Y(r);return h&&(m+=b,g+=y,o&&(m+=t.clientLeft,g+=t.clientTop)),{x:m,y:g,width:c.width,height:c.height}}(e.reference,await t(e.floating),e.strategy,e.floating),floating:{x:0,y:0,...await n(e.floating)}}},et={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e,a=l(r),[s]=t?Y(t.floating):[!1];if(r===a||s)return n;let c={scrollLeft:0,scrollTop:0},u=T(1),p=T(0),m=d(r);if((m||!m&&"fixed"!==o)&&(("body"!==i(r)||f(a))&&(c=v(r)),d(r))){let e=V(r);u=G(r),p.x=e.x+r.clientLeft,p.y=e.y+r.clientTop}return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-c.scrollLeft*u.x+p.x,y:n.y*u.y-c.scrollTop*u.y+p.y}},getDocumentElement:l,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e,a=[..."clippingAncestors"===n?function(e,t){let n=t.get(e);if(n)return n;let r=S(e,[],!1).filter(e=>u(e)&&"body"!==i(e)),o=null,a="fixed"===y(e).position,s=a?E(e):e;for(;u(s)&&!b(s);){let t=y(s),n=m(s);n||"fixed"!==t.position||(o=null),(a?!n&&!o:!n&&"static"===t.position&&!!o&&["absolute","fixed"].includes(o.position)||f(s)&&!n&&function e(t,n){let r=E(t);return!(r===n||!u(r)||b(r))&&("fixed"===y(r).position||e(r,n))}(e,s))?r=r.filter(e=>e!==s):o=t,s=E(s)}return t.set(e,r),r}(t,this._c):[].concat(n),r],s=a[0],l=a.reduce((e,n)=>{let r=X(t,n,o);return e.top=x(r.top,e.top),e.right=w(r.right,e.right),e.bottom=w(r.bottom,e.bottom),e.left=x(r.left,e.left),e},X(t,s,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}},getOffsetParent:J,getElementRects:ee,getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){let{width:t,height:n}=z(e);return{width:t,height:n}},getScale:G,isElement:u,isRTL:function(e){return"rtl"===y(e).direction}};function en(e,t,n,r){let o;void 0===r&&(r={});let{ancestorScroll:a=!0,ancestorResize:i=!0,elementResize:s="function"==typeof ResizeObserver,layoutShift:c="function"==typeof IntersectionObserver,animationFrame:u=!1}=r,d=H(e),p=a||i?[...d?S(d):[],...S(t)]:[];p.forEach(e=>{a&&e.addEventListener("scroll",n,{passive:!0}),i&&e.addEventListener("resize",n)});let f=d&&c?function(e,t){let n,r=null,o=l(e);function a(){var e;clearTimeout(n),null==(e=r)||e.disconnect(),r=null}return!function i(s,l){void 0===s&&(s=!1),void 0===l&&(l=1),a();let{left:c,top:u,width:d,height:p}=e.getBoundingClientRect();if(s||t(),!d||!p)return;let f=A(u),m=A(o.clientWidth-(c+d)),g={rootMargin:-f+"px "+-m+"px "+-A(o.clientHeight-(u+p))+"px "+-A(c)+"px",threshold:x(0,w(1,l))||1},h=!0;function b(e){let t=e[0].intersectionRatio;if(t!==l){if(!h)return i();t?i(!1,t):n=setTimeout(()=>{i(!1,1e-7)},100)}h=!1}try{r=new IntersectionObserver(b,{...g,root:o.ownerDocument})}catch(e){r=new IntersectionObserver(b,g)}r.observe(e)}(!0),a}(d,n):null,m=-1,g=null;s&&(g=new ResizeObserver(e=>{let[r]=e;r&&r.target===d&&g&&(g.unobserve(t),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var e;null==(e=g)||e.observe(t)})),n()}),d&&!u&&g.observe(d),g.observe(t));let h=u?V(e):null;return u&&function t(){let r=V(e);h&&(r.x!==h.x||r.y!==h.y||r.width!==h.width||r.height!==h.height)&&n(),h=r,o=requestAnimationFrame(t)}(),n(),()=>{var e;p.forEach(e=>{a&&e.removeEventListener("scroll",n),i&&e.removeEventListener("resize",n)}),null==f||f(),null==(e=g)||e.disconnect(),g=null,u&&cancelAnimationFrame(o)}}let er=(e,t,n)=>{let r=new Map,o={platform:et,...n},a={...o.platform,_c:r};return B(e,t,{...o,platform:a})};var eo="undefined"!=typeof document?r.useLayoutEffect:r.useEffect;function ea(e,t){let n,r,o;if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if((n=e.length)!=t.length)return!1;for(r=n;0!=r--;)if(!ea(e[r],t[r]))return!1;return!0}if((n=(o=Object.keys(e)).length)!==Object.keys(t).length)return!1;for(r=n;0!=r--;)if(!Object.prototype.hasOwnProperty.call(t,o[r]))return!1;for(r=n;0!=r--;){let n=o[r];if(("_owner"!==n||!e.$$typeof)&&!ea(e[n],t[n]))return!1}return!0}return e!=e&&t!=t}function ei(e){let t=r.useRef(e);return eo(()=>{t.current=e}),t}var es="undefined"!=typeof document?r.useLayoutEffect:r.useEffect;let el=!1,ec=0,eu=()=>"floating-ui-"+ec++,ed=o["useId".toString()]||function(){let[e,t]=r.useState(()=>el?eu():void 0);return es(()=>{null==e&&t(eu())},[]),r.useEffect(()=>{el||(el=!0)},[]),e},ep=r.createContext(null),ef=r.createContext(null),em=()=>{var e;return(null==(e=r.useContext(ep))?void 0:e.id)||null},eg=()=>r.useContext(ef);function eh(e){return(null==e?void 0:e.ownerDocument)||document}function eb(e){return eh(e).defaultView||window}function ey(e){return!!e&&e instanceof eb(e).Element}function ev(e){return!!e&&e instanceof eb(e).HTMLElement}function eE(e,t){let n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function eS(e){let t=(0,r.useRef)(e);return es(()=>{t.current=e}),t}let ew="data-floating-ui-safe-polygon";function ex(e,t,n){return n&&!eE(n)?0:"number"==typeof e?e:null==e?void 0:e[t]}let eO=function(e,t){let{enabled:n=!0,delay:o=0,handleClose:a=null,mouseOnly:i=!1,restMs:s=0,move:l=!0}=void 0===t?{}:t,{open:c,onOpenChange:u,dataRef:d,events:p,elements:{domReference:f,floating:m},refs:g}=e,h=eg(),b=em(),y=eS(a),v=eS(o),E=r.useRef(),S=r.useRef(),w=r.useRef(),x=r.useRef(),O=r.useRef(!0),A=r.useRef(!1),T=r.useRef(()=>{}),C=r.useCallback(()=>{var e;let t=null==(e=d.current.openEvent)?void 0:e.type;return(null==t?void 0:t.includes("mouse"))&&"mousedown"!==t},[d]);r.useEffect(()=>{if(n)return p.on("dismiss",e),()=>{p.off("dismiss",e)};function e(){clearTimeout(S.current),clearTimeout(x.current),O.current=!0}},[n,p]),r.useEffect(()=>{if(!n||!y.current||!c)return;function e(){C()&&u(!1)}let t=eh(m).documentElement;return t.addEventListener("mouseleave",e),()=>{t.removeEventListener("mouseleave",e)}},[m,c,u,n,y,d,C]);let k=r.useCallback(function(e){void 0===e&&(e=!0);let t=ex(v.current,"close",E.current);t&&!w.current?(clearTimeout(S.current),S.current=setTimeout(()=>u(!1),t)):e&&(clearTimeout(S.current),u(!1))},[v,u]),I=r.useCallback(()=>{T.current(),w.current=void 0},[]),N=r.useCallback(()=>{if(A.current){let e=eh(g.floating.current).body;e.style.pointerEvents="",e.removeAttribute(ew),A.current=!1}},[g]);return r.useEffect(()=>{if(n&&ey(f))return c&&f.addEventListener("mouseleave",a),null==m||m.addEventListener("mouseleave",a),l&&f.addEventListener("mousemove",r,{once:!0}),f.addEventListener("mouseenter",r),f.addEventListener("mouseleave",o),()=>{c&&f.removeEventListener("mouseleave",a),null==m||m.removeEventListener("mouseleave",a),l&&f.removeEventListener("mousemove",r),f.removeEventListener("mouseenter",r),f.removeEventListener("mouseleave",o)};function t(){return!!d.current.openEvent&&["click","mousedown"].includes(d.current.openEvent.type)}function r(e){if(clearTimeout(S.current),O.current=!1,i&&!eE(E.current)||s>0&&0===ex(v.current,"open"))return;d.current.openEvent=e;let t=ex(v.current,"open",E.current);t?S.current=setTimeout(()=>{u(!0)},t):u(!0)}function o(n){if(t())return;T.current();let r=eh(m);if(clearTimeout(x.current),y.current){c||clearTimeout(S.current),w.current=y.current({...e,tree:h,x:n.clientX,y:n.clientY,onClose(){N(),I(),k()}});let t=w.current;r.addEventListener("mousemove",t),T.current=()=>{r.removeEventListener("mousemove",t)};return}k()}function a(n){t()||null==y.current||y.current({...e,tree:h,x:n.clientX,y:n.clientY,onClose(){N(),I(),k()}})(n)}},[f,m,n,e,i,s,l,k,I,N,u,c,h,v,y,d]),es(()=>{var e,t,r;if(n&&c&&null!=(e=y.current)&&e.__options.blockPointerEvents&&C()){let e=eh(m).body;if(e.setAttribute(ew,""),e.style.pointerEvents="none",A.current=!0,ey(f)&&m){let e=null==h?void 0:null==(t=h.nodesRef.current.find(e=>e.id===b))?void 0:null==(r=t.context)?void 0:r.elements.floating;return e&&(e.style.pointerEvents=""),f.style.pointerEvents="auto",m.style.pointerEvents="auto",()=>{f.style.pointerEvents="",m.style.pointerEvents=""}}}},[n,c,b,m,f,h,y,d,C]),es(()=>{c||(E.current=void 0,I(),N())},[c,I,N]),r.useEffect(()=>()=>{I(),clearTimeout(S.current),clearTimeout(x.current),N()},[n,I,N]),r.useMemo(()=>{if(!n)return{};function e(e){E.current=e.pointerType}return{reference:{onPointerDown:e,onPointerEnter:e,onMouseMove(){c||0===s||(clearTimeout(x.current),x.current=setTimeout(()=>{O.current||u(!0)},s))}},floating:{onMouseEnter(){clearTimeout(S.current)},onMouseLeave(){p.emit("dismiss",{type:"mouseLeave",data:{returnFocus:!1}}),k(!1)}}}},[p,n,s,c,u,k])};function eA(e,t){if(!e||!t)return!1;let n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&function(e){if("undefined"==typeof ShadowRoot)return!1;let t=eb(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}(n)){let n=t;do{if(n&&e===n)return!0;n=n.parentNode||n.host}while(n)}return!1}function eT(e,t){let n=e.filter(e=>{var n;return e.parentId===t&&(null==(n=e.context)?void 0:n.open)})||[],r=n;for(;r.length;)r=e.filter(e=>{var t;return null==(t=r)?void 0:t.some(t=>{var n;return e.parentId===t.id&&(null==(n=e.context)?void 0:n.open)})})||[],n=n.concat(r);return n}let eC=o["useInsertionEffect".toString()]||(e=>e());function ek(e){let t=r.useRef(()=>{});return eC(()=>{t.current=e}),r.useCallback(function(){for(var e=arguments.length,n=Array(e),r=0;r!1),x="function"==typeof f?w:f,O=r.useRef(!1),{escapeKeyBubbles:A,outsidePressBubbles:T}=eR(y);return r.useEffect(()=>{if(!n||!d)return;function e(e){if("Escape"===e.key){let e=v?eT(v.nodesRef.current,i):[];if(e.length>0){let t=!0;if(e.forEach(e=>{var n;if(null!=(n=e.context)&&n.open&&!e.context.dataRef.current.__escapeKeyBubbles){t=!1;return}}),!t)return}a.emit("dismiss",{type:"escapeKey",data:{returnFocus:{preventScroll:!1}}}),o(!1)}}function t(e){var t;let n=O.current;if(O.current=!1,n||"function"==typeof x&&!x(e))return;let r="composedPath"in e?e.composedPath()[0]:e.target;if(ev(r)&&c){let t=c.ownerDocument.defaultView||window,n=r.scrollWidth>r.clientWidth,o=r.scrollHeight>r.clientHeight,a=o&&e.offsetX>r.clientWidth;if(o&&"rtl"===t.getComputedStyle(r).direction&&(a=e.offsetX<=r.offsetWidth-r.clientWidth),a||n&&e.offsetY>r.clientHeight)return}let s=v&&eT(v.nodesRef.current,i).some(t=>{var n;return eI(e,null==(n=t.context)?void 0:n.elements.floating)});if(eI(e,c)||eI(e,l)||s)return;let u=v?eT(v.nodesRef.current,i):[];if(u.length>0){let e=!0;if(u.forEach(t=>{var n;if(null!=(n=t.context)&&n.open&&!t.context.dataRef.current.__outsidePressBubbles){e=!1;return}}),!e)return}a.emit("dismiss",{type:"outsidePress",data:{returnFocus:E?{preventScroll:!0}:function(e){if(0===e.mozInputSource&&e.isTrusted)return!0;let t=/Android/i;return(t.test(function(){let e=navigator.userAgentData;return null!=e&&e.platform?e.platform:navigator.platform}())||t.test(function(){let e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(e=>{let{brand:t,version:n}=e;return t+"/"+n}).join(" "):navigator.userAgent}()))&&e.pointerType?"click"===e.type&&1===e.buttons:0===e.detail&&!e.pointerType}(e)||0===(t=e).width&&0===t.height||1===t.width&&1===t.height&&0===t.pressure&&0===t.detail&&"mouse"!==t.pointerType||t.width<1&&t.height<1&&0===t.pressure&&0===t.detail}}),o(!1)}function r(){o(!1)}u.current.__escapeKeyBubbles=A,u.current.__outsidePressBubbles=T;let f=eh(c);p&&f.addEventListener("keydown",e),x&&f.addEventListener(m,t);let g=[];return b&&(ey(l)&&(g=S(l)),ey(c)&&(g=g.concat(S(c))),!ey(s)&&s&&s.contextElement&&(g=g.concat(S(s.contextElement)))),(g=g.filter(e=>{var t;return e!==(null==(t=f.defaultView)?void 0:t.visualViewport)})).forEach(e=>{e.addEventListener("scroll",r,{passive:!0})}),()=>{p&&f.removeEventListener("keydown",e),x&&f.removeEventListener(m,t),g.forEach(e=>{e.removeEventListener("scroll",r)})}},[u,c,l,s,p,x,m,a,v,i,n,o,b,d,A,T,E]),r.useEffect(()=>{O.current=!1},[x,m]),r.useMemo(()=>d?{reference:{[eN[h]]:()=>{g&&(a.emit("dismiss",{type:"referencePress",data:{returnFocus:!1}}),o(!1))}},floating:{[e_[m]]:()=>{O.current=!0}}}:{},[d,a,g,m,h,o])},eM=function(e,t){let{open:n,onOpenChange:o,dataRef:a,events:i,refs:s,elements:{floating:l,domReference:c}}=e,{enabled:u=!0,keyboardOnly:d=!0}=void 0===t?{}:t,p=r.useRef(""),f=r.useRef(!1),m=r.useRef();return r.useEffect(()=>{if(!u)return;let e=eh(l).defaultView||window;function t(){!n&&ev(c)&&c===function(e){let t=e.activeElement;for(;(null==(n=t)?void 0:null==(r=n.shadowRoot)?void 0:r.activeElement)!=null;){var n,r;t=t.shadowRoot.activeElement}return t}(eh(c))&&(f.current=!0)}return e.addEventListener("blur",t),()=>{e.removeEventListener("blur",t)}},[l,c,n,u]),r.useEffect(()=>{if(u)return i.on("dismiss",e),()=>{i.off("dismiss",e)};function e(e){("referencePress"===e.type||"escapeKey"===e.type)&&(f.current=!0)}},[i,u]),r.useEffect(()=>()=>{clearTimeout(m.current)},[]),r.useMemo(()=>u?{reference:{onPointerDown(e){let{pointerType:t}=e;p.current=t,f.current=!!(t&&d)},onMouseLeave(){f.current=!1},onFocus(e){var t;f.current||"focus"===e.type&&(null==(t=a.current.openEvent)?void 0:t.type)==="mousedown"&&a.current.openEvent&&eI(a.current.openEvent,c)||(a.current.openEvent=e.nativeEvent,o(!0))},onBlur(e){f.current=!1;let t=e.relatedTarget,n=ey(t)&&t.hasAttribute("data-floating-ui-focus-guard")&&"outside"===t.getAttribute("data-type");m.current=setTimeout(()=>{eA(s.floating.current,t)||eA(c,t)||n||o(!1)})}}}:{},[u,d,c,s,a,o])},eL=function(e,t){let{open:n}=e,{enabled:o=!0,role:a="dialog"}=void 0===t?{}:t,i=ed(),s=ed();return r.useMemo(()=>{let e={id:i,role:a};return o?"tooltip"===a?{reference:{"aria-describedby":n?i:void 0},floating:e}:{reference:{"aria-expanded":n?"true":"false","aria-haspopup":"alertdialog"===a?"dialog":a,"aria-controls":n?i:void 0,..."listbox"===a&&{role:"combobox"},..."menu"===a&&{id:s}},floating:{...e,..."menu"===a&&{"aria-labelledby":s}}}:{}},[o,a,n,i,s])};function eD(e,t,n){let r=new Map;return{..."floating"===n&&{tabIndex:-1},...e,...t.map(e=>e?e[n]:null).concat(e).reduce((e,t)=>(t&&Object.entries(t).forEach(t=>{let[n,o]=t;if(0===n.indexOf("on")){if(r.has(n)||r.set(n,[]),"function"==typeof o){var a;null==(a=r.get(n))||a.push(o),e[n]=function(){for(var e,t=arguments.length,o=Array(t),a=0;ae(...o))}}}else e[n]=o}),e),{})}}let ej=function(e){void 0===e&&(e=[]);let t=e,n=r.useCallback(t=>eD(t,e,"reference"),t),o=r.useCallback(t=>eD(t,e,"floating"),t),a=r.useCallback(t=>eD(t,e,"item"),e.map(e=>null==e?void 0:e.item));return r.useMemo(()=>({getReferenceProps:n,getFloatingProps:o,getItemProps:a}),[n,o,a])};var eF=n(99250);let eB=e=>{var t,n;let[o,i]=(0,r.useState)(!1),[s,l]=(0,r.useState)(),{x:c,y:u,refs:d,strategy:p,context:f}=function(e){void 0===e&&(e={});let{open:t=!1,onOpenChange:n,nodeId:o}=e,i=function(e){void 0===e&&(e={});let{placement:t="bottom",strategy:n="absolute",middleware:o=[],platform:i,whileElementsMounted:s,open:l}=e,[c,u]=r.useState({x:null,y:null,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[d,p]=r.useState(o);ea(d,o)||p(o);let f=r.useRef(null),m=r.useRef(null),g=r.useRef(c),h=ei(s),b=ei(i),[y,v]=r.useState(null),[E,S]=r.useState(null),w=r.useCallback(e=>{f.current!==e&&(f.current=e,v(e))},[]),x=r.useCallback(e=>{m.current!==e&&(m.current=e,S(e))},[]),O=r.useCallback(()=>{if(!f.current||!m.current)return;let e={placement:t,strategy:n,middleware:d};b.current&&(e.platform=b.current),er(f.current,m.current,e).then(e=>{let t={...e,isPositioned:!0};A.current&&!ea(g.current,t)&&(g.current=t,a.flushSync(()=>{u(t)}))})},[d,t,n,b]);eo(()=>{!1===l&&g.current.isPositioned&&(g.current.isPositioned=!1,u(e=>({...e,isPositioned:!1})))},[l]);let A=r.useRef(!1);eo(()=>(A.current=!0,()=>{A.current=!1}),[]),eo(()=>{if(y&&E){if(h.current)return h.current(y,E,O);O()}},[y,E,O,h]);let T=r.useMemo(()=>({reference:f,floating:m,setReference:w,setFloating:x}),[w,x]),C=r.useMemo(()=>({reference:y,floating:E}),[y,E]);return r.useMemo(()=>({...c,update:O,refs:T,elements:C,reference:w,floating:x}),[c,O,T,C,w,x])}(e),s=eg(),l=r.useRef(null),c=r.useRef({}),u=r.useState(()=>(function(){let e=new Map;return{emit(t,n){var r;null==(r=e.get(t))||r.forEach(e=>e(n))},on(t,n){e.set(t,[...e.get(t)||[],n])},off(t,n){e.set(t,(e.get(t)||[]).filter(e=>e!==n))}}})())[0],[d,p]=r.useState(null),f=r.useCallback(e=>{let t=ey(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),contextElement:e}:e;i.refs.setReference(t)},[i.refs]),m=r.useCallback(e=>{(ey(e)||null===e)&&(l.current=e,p(e)),(ey(i.refs.reference.current)||null===i.refs.reference.current||null!==e&&!ey(e))&&i.refs.setReference(e)},[i.refs]),g=r.useMemo(()=>({...i.refs,setReference:m,setPositionReference:f,domReference:l}),[i.refs,m,f]),h=r.useMemo(()=>({...i.elements,domReference:d}),[i.elements,d]),b=ek(n),y=r.useMemo(()=>({...i,refs:g,elements:h,dataRef:c,nodeId:o,events:u,open:t,onOpenChange:b}),[i,o,u,t,b,g,h]);return es(()=>{let e=null==s?void 0:s.nodesRef.current.find(e=>e.id===o);e&&(e.context=y)}),r.useMemo(()=>({...i,context:y,refs:g,reference:m,positionReference:f}),[i,g,y,m,f])}({open:o,onOpenChange:t=>{t&&e?l(setTimeout(()=>{i(t)},e)):(clearTimeout(s),i(t))},placement:"top",whileElementsMounted:en,middleware:[{name:"offset",options:5,async fn(e){var t,n;let{x:r,y:o,placement:a,middlewareData:i}=e,s=await Z(e,5);return a===(null==(t=i.offset)?void 0:t.placement)&&null!=(n=i.arrow)&&n.alignmentOffset?{}:{x:r+s.x,y:o+s.y,data:{...s,placement:a}}}},{name:"flip",options:t={fallbackAxisSideDirection:"start"},async fn(e){var n,r,o,a,i;let{placement:s,middlewareData:l,rects:c,initialPlacement:u,platform:d,elements:p}=e,{mainAxis:f=!0,crossAxis:m=!0,fallbackPlacements:g,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:b="none",flipAlignment:y=!0,...v}=I(t,e);if(null!=(n=l.arrow)&&n.alignmentOffset)return{};let E=N(s),S=N(u)===u,w=await (null==d.isRTL?void 0:d.isRTL(p.floating)),x=g||(S||!y?[D(u)]:function(e){let t=D(e);return[L(e),t,L(t)]}(u));g||"none"===b||x.push(...function(e,t,n,r){let o=_(e),a=function(e,t,n){let r=["left","right"],o=["right","left"];switch(e){case"top":case"bottom":if(n)return t?o:r;return t?r:o;case"left":case"right":return t?["top","bottom"]:["bottom","top"];default:return[]}}(N(e),"start"===n,r);return o&&(a=a.map(e=>e+"-"+o),t&&(a=a.concat(a.map(L)))),a}(u,y,b,w));let O=[u,...x],A=await U(e,v),T=[],C=(null==(r=l.flip)?void 0:r.overflows)||[];if(f&&T.push(A[E]),m){let e=function(e,t,n){void 0===n&&(n=!1);let r=_(e),o=R(M(e)),a=P(o),i="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[a]>t.floating[a]&&(i=D(i)),[i,D(i)]}(s,c,w);T.push(A[e[0]],A[e[1]])}if(C=[...C,{placement:s,overflows:T}],!T.every(e=>e<=0)){let e=((null==(o=l.flip)?void 0:o.index)||0)+1,t=O[e];if(t)return{data:{index:e,overflows:C},reset:{placement:t}};let n=null==(a=C.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:a.placement;if(!n)switch(h){case"bestFit":{let e=null==(i=C.map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0])?void 0:i[0];e&&(n=e);break}case"initialPlacement":n=u}if(s!==n)return{reset:{placement:n}}}return{}}},(void 0===n&&(n={}),{name:"shift",options:n,async fn(e){let{x:t,y:r,placement:o}=e,{mainAxis:a=!0,crossAxis:i=!1,limiter:s={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=I(n,e),c={x:t,y:r},u=await U(e,l),d=M(N(o)),p=R(d),f=c[p],m=c[d];if(a){let e="y"===p?"top":"left",t="y"===p?"bottom":"right",n=f+u[e],r=f-u[t];f=x(n,w(f,r))}if(i){let e="y"===d?"top":"left",t="y"===d?"bottom":"right",n=m+u[e],r=m-u[t];m=x(n,w(m,r))}let g=s.fn({...e,[p]:f,[d]:m});return{...g,data:{x:g.x-t,y:g.y-r}}}})]}),m=eO(f,{move:!1}),{getReferenceProps:g,getFloatingProps:h}=ej([m,eM(f),eP(f),eL(f,{role:"tooltip"})]);return{tooltipProps:{open:o,x:c,y:u,refs:d,strategy:p,getFloatingProps:h},getReferenceProps:g}},eU=e=>{let{text:t,open:n,x:o,y:a,refs:i,strategy:s,getFloatingProps:l}=e;return n&&t?r.createElement("div",Object.assign({className:(0,eF.q)("max-w-xs text-sm z-20 rounded-tremor-default opacity-100 px-2.5 py-1","text-white bg-tremor-background-emphasis","text-white dark:bg-dark-tremor-background-subtle"),ref:i.setFloating,style:{position:s,top:null!=a?a:0,left:null!=o?o:0}},l()),t):null};eU.displayName="Tooltip"},67989:function(e,t,n){n.d(t,{Z:function(){return c}});var r=n(69703),o=n(64090),a=n(2898),i=n(99250),s=n(65492);let l=(0,s.fn)("BarList"),c=o.forwardRef((e,t)=>{var n;let c;let{data:u=[],color:d,valueFormatter:p=s.Cj,showAnimation:f=!1,className:m}=e,g=(0,r._T)(e,["data","color","valueFormatter","showAnimation","className"]),h=(n=u.map(e=>e.value),c=-1/0,n.forEach(e=>{c=Math.max(c,e)}),n.map(e=>0===e?0:Math.max(e/c*100,1)));return o.createElement("div",Object.assign({ref:t,className:(0,i.q)(l("root"),"flex justify-between space-x-6",m)},g),o.createElement("div",{className:(0,i.q)(l("bars"),"relative w-full")},u.map((e,t)=>{var n,r,c;let p=e.icon;return o.createElement("div",{key:null!==(n=e.key)&&void 0!==n?n:e.name,className:(0,i.q)(l("bar"),"flex items-center rounded-tremor-small bg-opacity-30","h-9",e.color||d?(0,s.bM)(null!==(r=e.color)&&void 0!==r?r:d,a.K.background).bgColor:"bg-tremor-brand-subtle dark:bg-dark-tremor-brand-subtle dark:bg-opacity-30",t===u.length-1?"mb-0":"mb-2"),style:{width:"".concat(h[t],"%"),transition:f?"all 1s":""}},o.createElement("div",{className:(0,i.q)("absolute max-w-full flex left-2")},p?o.createElement(p,{className:(0,i.q)(l("barIcon"),"flex-none h-5 w-5 mr-2","text-tremor-content","dark:text-dark-tremor-content")}):null,e.href?o.createElement("a",{href:e.href,target:null!==(c=e.target)&&void 0!==c?c:"_blank",rel:"noreferrer",className:(0,i.q)(l("barLink"),"whitespace-nowrap hover:underline truncate text-tremor-default","text-tremor-content-emphasis","dark:text-dark-tremor-content-emphasis")},e.name):o.createElement("p",{className:(0,i.q)(l("barText"),"whitespace-nowrap truncate text-tremor-default","text-tremor-content-emphasis","dark:text-dark-tremor-content-emphasis")},e.name)))})),o.createElement("div",{className:"text-right min-w-min"},u.map((e,t)=>{var n;return o.createElement("div",{key:null!==(n=e.key)&&void 0!==n?n:e.name,className:(0,i.q)(l("labelWrapper"),"flex justify-end items-center","h-9",t===u.length-1?"mb-0":"mb-2")},o.createElement("p",{className:(0,i.q)(l("labelText"),"whitespace-nowrap truncate text-tremor-default","text-tremor-content-emphasis","dark:text-dark-tremor-content-emphasis")},p(e.value)))})))});c.displayName="BarList"},50027:function(e,t,n){n.d(t,{Z:function(){return a}});var r=n(64090),o=n(54942);n(99250);let a=(0,r.createContext)(o.fr.Blue)},18174:function(e,t,n){n.d(t,{Z:function(){return r}});let r=(0,n(64090).createContext)(0)},21871:function(e,t,n){n(64090)},41213:function(e,t,n){n.d(t,{Z:function(){return r}});let r=(0,n(64090).createContext)({selectedValue:void 0,handleValueChange:void 0})},54942:function(e,t,n){n.d(t,{fr:function(){return r},m:function(){return i},u8:function(){return o},zS:function(){return a}});let r={Slate:"slate",Gray:"gray",Zinc:"zinc",Neutral:"neutral",Stone:"stone",Red:"red",Orange:"orange",Amber:"amber",Yellow:"yellow",Lime:"lime",Green:"green",Emerald:"emerald",Teal:"teal",Cyan:"cyan",Sky:"sky",Blue:"blue",Indigo:"indigo",Violet:"violet",Purple:"purple",Fuchsia:"fuchsia",Pink:"pink",Rose:"rose"},o={XS:"xs",SM:"sm",MD:"md",LG:"lg",XL:"xl"},a={Left:"left",Right:"right"},i={Top:"top",Bottom:"bottom"}},2898:function(e,t,n){n.d(t,{K:function(){return o},s:function(){return a}});var r=n(54942);let o={canvasBackground:50,lightBackground:100,background:500,darkBackground:600,darkestBackground:800,lightBorder:200,border:500,darkBorder:700,lightRing:200,ring:300,lightText:400,text:500,darkText:700,darkestText:900,icon:500},a=[r.fr.Blue,r.fr.Cyan,r.fr.Sky,r.fr.Indigo,r.fr.Violet,r.fr.Purple,r.fr.Fuchsia,r.fr.Slate,r.fr.Gray,r.fr.Zinc,r.fr.Neutral,r.fr.Stone,r.fr.Red,r.fr.Orange,r.fr.Amber,r.fr.Yellow,r.fr.Lime,r.fr.Green,r.fr.Emerald,r.fr.Teal,r.fr.Pink,r.fr.Rose]},99250:function(e,t,n){n.d(t,{q:function(){return j}});var r=/^\[(.+)\]$/;function o(e,t){var n=e;return t.split("-").forEach(function(e){n.nextPart.has(e)||n.nextPart.set(e,{nextPart:new Map,validators:[]}),n=n.nextPart.get(e)}),n}var a=/\s+/;function i(){for(var e,t,n=0,r="";ne&&(t=0,r=n,n=new Map)}return{get:function(e){var t=n.get(e);return void 0!==t?t:void 0!==(t=r.get(e))?(o(e,t),t):void 0},set:function(e,t){n.has(e)?n.set(e,t):o(e,t)}}}(e.cacheSize),splitModifiers:(n=1===(t=e.separator||":").length,a=t[0],i=t.length,function(e){for(var r,o=[],s=0,l=0,c=0;cl?r-l:void 0}}),...(u=e.theme,d=e.prefix,p={nextPart:new Map,validators:[]},(f=Object.entries(e.classGroups),d?f.map(function(e){return[e[0],e[1].map(function(e){return"string"==typeof e?d+e:"object"==typeof e?Object.fromEntries(Object.entries(e).map(function(e){return[d+e[0],e[1]]})):e})]}):f).forEach(function(e){var t=e[0];(function e(t,n,r,a){t.forEach(function(t){if("string"==typeof t){(""===t?n:o(n,t)).classGroupId=r;return}if("function"==typeof t){if(t.isThemeGetter){e(t(a),n,r,a);return}n.validators.push({validator:t,classGroupId:r});return}Object.entries(t).forEach(function(t){var i=t[0];e(t[1],o(n,i),r,a)})})})(e[1],p,t,u)}),s=e.conflictingClassGroups,c=void 0===(l=e.conflictingClassGroupModifiers)?{}:l,{getClassGroupId:function(e){var t=e.split("-");return""===t[0]&&1!==t.length&&t.shift(),function e(t,n){if(0===t.length)return n.classGroupId;var r,o=t[0],a=n.nextPart.get(o),i=a?e(t.slice(1),a):void 0;if(i)return i;if(0!==n.validators.length){var s=t.join("-");return null===(r=n.validators.find(function(e){return(0,e.validator)(s)}))||void 0===r?void 0:r.classGroupId}}(t,p)||function(e){if(r.test(e)){var t=r.exec(e)[1],n=null==t?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}}(e)},getConflictingClassGroupIds:function(e,t){var n=s[e]||[];return t&&c[e]?[].concat(n,c[e]):n}})}}(l.slice(1).reduce(function(e,t){return t(e)},i()))).cache.get,n=e.cache.set,u=d,d(a)};function d(r){var o,i,s,l,c,u=t(r);if(u)return u;var d=(i=(o=e).splitModifiers,s=o.getClassGroupId,l=o.getConflictingClassGroupIds,c=new Set,r.trim().split(a).map(function(e){var t=i(e),n=t.modifiers,r=t.hasImportantModifier,o=t.baseClassName,a=t.maybePostfixModifierPosition,l=s(a?o.substring(0,a):o),c=!!a;if(!l){if(!a||!(l=s(o)))return{isTailwindClass:!1,originalClassName:e};c=!1}var u=(function(e){if(e.length<=1)return e;var t=[],n=[];return e.forEach(function(e){"["===e[0]?(t.push.apply(t,n.sort().concat([e])),n=[]):n.push(e)}),t.push.apply(t,n.sort()),t})(n).join(":");return{isTailwindClass:!0,modifierId:r?u+"!":u,classGroupId:l,originalClassName:e,hasPostfixModifier:c}}).reverse().filter(function(e){if(!e.isTailwindClass)return!0;var t=e.modifierId,n=e.classGroupId,r=e.hasPostfixModifier,o=t+n;return!c.has(o)&&(c.add(o),l(n,r).forEach(function(e){return c.add(t+e)}),!0)}).reverse().map(function(e){return e.originalClassName}).join(" "));return n(r,d),d}return function(){return u(i.apply(null,arguments))}}function l(e){var t=function(t){return t[e]||[]};return t.isThemeGetter=!0,t}var c=/^\[(?:([a-z-]+):)?(.+)\]$/i,u=/^\d+\/\d+$/,d=new Set(["px","full","screen"]),p=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,f=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,m=/^-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/;function g(e){return S(e)||d.has(e)||u.test(e)||h(e)}function h(e){return k(e,"length",I)}function b(e){return k(e,"size",N)}function y(e){return k(e,"position",N)}function v(e){return k(e,"url",_)}function E(e){return k(e,"number",S)}function S(e){return!Number.isNaN(Number(e))}function w(e){return e.endsWith("%")&&S(e.slice(0,-1))}function x(e){return R(e)||k(e,"number",R)}function O(e){return c.test(e)}function A(){return!0}function T(e){return p.test(e)}function C(e){return k(e,"",P)}function k(e,t,n){var r=c.exec(e);return!!r&&(r[1]?r[1]===t:n(r[2]))}function I(e){return f.test(e)}function N(){return!1}function _(e){return e.startsWith("url(")}function R(e){return Number.isInteger(Number(e))}function P(e){return m.test(e)}function M(){var e=l("colors"),t=l("spacing"),n=l("blur"),r=l("brightness"),o=l("borderColor"),a=l("borderRadius"),i=l("borderSpacing"),s=l("borderWidth"),c=l("contrast"),u=l("grayscale"),d=l("hueRotate"),p=l("invert"),f=l("gap"),m=l("gradientColorStops"),k=l("gradientColorStopPositions"),I=l("inset"),N=l("margin"),_=l("opacity"),R=l("padding"),P=l("saturate"),M=l("scale"),L=l("sepia"),D=l("skew"),j=l("space"),F=l("translate"),B=function(){return["auto","contain","none"]},U=function(){return["auto","hidden","clip","visible","scroll"]},Z=function(){return["auto",O,t]},z=function(){return[O,t]},H=function(){return["",g]},G=function(){return["auto",S,O]},$=function(){return["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"]},W=function(){return["solid","dashed","dotted","double","none"]},V=function(){return["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity","plus-lighter"]},q=function(){return["start","end","center","between","around","evenly","stretch"]},Y=function(){return["","0",O]},K=function(){return["auto","avoid","all","avoid-page","page","left","right","column"]},X=function(){return[S,E]},Q=function(){return[S,O]};return{cacheSize:500,theme:{colors:[A],spacing:[g],blur:["none","",T,O],brightness:X(),borderColor:[e],borderRadius:["none","","full",T,O],borderSpacing:z(),borderWidth:H(),contrast:X(),grayscale:Y(),hueRotate:Q(),invert:Y(),gap:z(),gradientColorStops:[e],gradientColorStopPositions:[w,h],inset:Z(),margin:Z(),opacity:X(),padding:z(),saturate:X(),scale:X(),sepia:Y(),skew:Q(),space:z(),translate:z()},classGroups:{aspect:[{aspect:["auto","square","video",O]}],container:["container"],columns:[{columns:[T]}],"break-after":[{"break-after":K()}],"break-before":[{"break-before":K()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none"]}],clear:[{clear:["left","right","both","none"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[].concat($(),[O])}],overflow:[{overflow:U()}],"overflow-x":[{"overflow-x":U()}],"overflow-y":[{"overflow-y":U()}],overscroll:[{overscroll:B()}],"overscroll-x":[{"overscroll-x":B()}],"overscroll-y":[{"overscroll-y":B()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[I]}],"inset-x":[{"inset-x":[I]}],"inset-y":[{"inset-y":[I]}],start:[{start:[I]}],end:[{end:[I]}],top:[{top:[I]}],right:[{right:[I]}],bottom:[{bottom:[I]}],left:[{left:[I]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",x]}],basis:[{basis:Z()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",O]}],grow:[{grow:Y()}],shrink:[{shrink:Y()}],order:[{order:["first","last","none",x]}],"grid-cols":[{"grid-cols":[A]}],"col-start-end":[{col:["auto",{span:["full",x]},O]}],"col-start":[{"col-start":G()}],"col-end":[{"col-end":G()}],"grid-rows":[{"grid-rows":[A]}],"row-start-end":[{row:["auto",{span:[x]},O]}],"row-start":[{"row-start":G()}],"row-end":[{"row-end":G()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",O]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",O]}],gap:[{gap:[f]}],"gap-x":[{"gap-x":[f]}],"gap-y":[{"gap-y":[f]}],"justify-content":[{justify:["normal"].concat(q())}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal"].concat(q(),["baseline"])}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[].concat(q(),["baseline"])}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[R]}],px:[{px:[R]}],py:[{py:[R]}],ps:[{ps:[R]}],pe:[{pe:[R]}],pt:[{pt:[R]}],pr:[{pr:[R]}],pb:[{pb:[R]}],pl:[{pl:[R]}],m:[{m:[N]}],mx:[{mx:[N]}],my:[{my:[N]}],ms:[{ms:[N]}],me:[{me:[N]}],mt:[{mt:[N]}],mr:[{mr:[N]}],mb:[{mb:[N]}],ml:[{ml:[N]}],"space-x":[{"space-x":[j]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[j]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit",O,t]}],"min-w":[{"min-w":["min","max","fit",O,g]}],"max-w":[{"max-w":["0","none","full","min","max","fit","prose",{screen:[T]},T,O]}],h:[{h:[O,t,"auto","min","max","fit"]}],"min-h":[{"min-h":["min","max","fit",O,g]}],"max-h":[{"max-h":[O,t,"min","max","fit"]}],"font-size":[{text:["base",T,h]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",E]}],"font-family":[{font:[A]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractons"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",O]}],"line-clamp":[{"line-clamp":["none",S,E]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",O,g]}],"list-image":[{"list-image":["none",O]}],"list-style-type":[{list:["none","disc","decimal",O]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[_]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[_]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[].concat(W(),["wavy"])}],"text-decoration-thickness":[{decoration:["auto","from-font",g]}],"underline-offset":[{"underline-offset":["auto",O,g]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],indent:[{indent:z()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",O]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",O]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[_]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[].concat($(),[y])}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",b]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},v]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[k]}],"gradient-via-pos":[{via:[k]}],"gradient-to-pos":[{to:[k]}],"gradient-from":[{from:[m]}],"gradient-via":[{via:[m]}],"gradient-to":[{to:[m]}],rounded:[{rounded:[a]}],"rounded-s":[{"rounded-s":[a]}],"rounded-e":[{"rounded-e":[a]}],"rounded-t":[{"rounded-t":[a]}],"rounded-r":[{"rounded-r":[a]}],"rounded-b":[{"rounded-b":[a]}],"rounded-l":[{"rounded-l":[a]}],"rounded-ss":[{"rounded-ss":[a]}],"rounded-se":[{"rounded-se":[a]}],"rounded-ee":[{"rounded-ee":[a]}],"rounded-es":[{"rounded-es":[a]}],"rounded-tl":[{"rounded-tl":[a]}],"rounded-tr":[{"rounded-tr":[a]}],"rounded-br":[{"rounded-br":[a]}],"rounded-bl":[{"rounded-bl":[a]}],"border-w":[{border:[s]}],"border-w-x":[{"border-x":[s]}],"border-w-y":[{"border-y":[s]}],"border-w-s":[{"border-s":[s]}],"border-w-e":[{"border-e":[s]}],"border-w-t":[{"border-t":[s]}],"border-w-r":[{"border-r":[s]}],"border-w-b":[{"border-b":[s]}],"border-w-l":[{"border-l":[s]}],"border-opacity":[{"border-opacity":[_]}],"border-style":[{border:[].concat(W(),["hidden"])}],"divide-x":[{"divide-x":[s]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[s]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[_]}],"divide-style":[{divide:W()}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-r":[{"border-r":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:[""].concat(W())}],"outline-offset":[{"outline-offset":[O,g]}],"outline-w":[{outline:[g]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:H()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[_]}],"ring-offset-w":[{"ring-offset":[g]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",T,C]}],"shadow-color":[{shadow:[A]}],opacity:[{opacity:[_]}],"mix-blend":[{"mix-blend":V()}],"bg-blend":[{"bg-blend":V()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[c]}],"drop-shadow":[{"drop-shadow":["","none",T,O]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[d]}],invert:[{invert:[p]}],saturate:[{saturate:[P]}],sepia:[{sepia:[L]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[c]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[d]}],"backdrop-invert":[{"backdrop-invert":[p]}],"backdrop-opacity":[{"backdrop-opacity":[_]}],"backdrop-saturate":[{"backdrop-saturate":[P]}],"backdrop-sepia":[{"backdrop-sepia":[L]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[i]}],"border-spacing-x":[{"border-spacing-x":[i]}],"border-spacing-y":[{"border-spacing-y":[i]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",O]}],duration:[{duration:Q()}],ease:[{ease:["linear","in","out","in-out",O]}],delay:[{delay:Q()}],animate:[{animate:["none","spin","ping","pulse","bounce",O]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[M]}],"scale-x":[{"scale-x":[M]}],"scale-y":[{"scale-y":[M]}],rotate:[{rotate:[x,O]}],"translate-x":[{"translate-x":[F]}],"translate-y":[{"translate-y":[F]}],"skew-x":[{"skew-x":[D]}],"skew-y":[{"skew-y":[D]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",O]}],accent:[{accent:["auto",e]}],appearance:["appearance-none"],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",O]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":z()}],"scroll-mx":[{"scroll-mx":z()}],"scroll-my":[{"scroll-my":z()}],"scroll-ms":[{"scroll-ms":z()}],"scroll-me":[{"scroll-me":z()}],"scroll-mt":[{"scroll-mt":z()}],"scroll-mr":[{"scroll-mr":z()}],"scroll-mb":[{"scroll-mb":z()}],"scroll-ml":[{"scroll-ml":z()}],"scroll-p":[{"scroll-p":z()}],"scroll-px":[{"scroll-px":z()}],"scroll-py":[{"scroll-py":z()}],"scroll-ps":[{"scroll-ps":z()}],"scroll-pe":[{"scroll-pe":z()}],"scroll-pt":[{"scroll-pt":z()}],"scroll-pr":[{"scroll-pr":z()}],"scroll-pb":[{"scroll-pb":z()}],"scroll-pl":[{"scroll-pl":z()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","pinch-zoom","manipulation",{pan:["x","left","right","y","up","down"]}]}],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",O]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[g,E]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}}var L=Object.prototype.hasOwnProperty,D=new Set(["string","number","boolean"]);let j=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;rr.includes(e),a=e=>e.toString();function i(e){return t=>{e.forEach(e=>{"function"==typeof e?e(t):null!=e&&(e.current=t)})}}function s(e){return t=>"tremor-".concat(e,"-").concat(t)}function l(e,t){let n=o(e);if("white"===e||"black"===e||"transparent"===e||!t||!n){let t=e.includes("#")||e.includes("--")||e.includes("rgb")?"[".concat(e,"]"):e;return{bgColor:"bg-".concat(t),hoverBgColor:"hover:bg-".concat(t),selectBgColor:"ui-selected:bg-".concat(t),textColor:"text-".concat(t),selectTextColor:"ui-selected:text-".concat(t),hoverTextColor:"hover:text-".concat(t),borderColor:"border-".concat(t),selectBorderColor:"ui-selected:border-".concat(t),hoverBorderColor:"hover:border-".concat(t),ringColor:"ring-".concat(t),strokeColor:"stroke-".concat(t),fillColor:"fill-".concat(t)}}return{bgColor:"bg-".concat(e,"-").concat(t),selectBgColor:"ui-selected:bg-".concat(e,"-").concat(t),hoverBgColor:"hover:bg-".concat(e,"-").concat(t),textColor:"text-".concat(e,"-").concat(t),selectTextColor:"ui-selected:text-".concat(e,"-").concat(t),hoverTextColor:"hover:text-".concat(e,"-").concat(t),borderColor:"border-".concat(e,"-").concat(t),selectBorderColor:"ui-selected:border-".concat(e,"-").concat(t),hoverBorderColor:"hover:border-".concat(e,"-").concat(t),ringColor:"ring-".concat(e,"-").concat(t),strokeColor:"stroke-".concat(e,"-").concat(t),fillColor:"fill-".concat(e,"-").concat(t)}}},21467:function(e,t,n){n.d(t,{i:function(){return s}});var r=n(64090),o=n(44329),a=n(54165),i=n(57499);function s(e){return t=>r.createElement(a.ZP,{theme:{token:{motion:!1,zIndexPopupBase:0}}},r.createElement(e,Object.assign({},t)))}t.Z=(e,t,n,a)=>s(s=>{let{prefixCls:l,style:c}=s,u=r.useRef(null),[d,p]=r.useState(0),[f,m]=r.useState(0),[g,h]=(0,o.Z)(!1,{value:s.open}),{getPrefixCls:b}=r.useContext(i.E_),y=b(t||"select",l);r.useEffect(()=>{if(h(!0),"undefined"!=typeof ResizeObserver){let e=new ResizeObserver(e=>{let t=e[0].target;p(t.offsetHeight+8),m(t.offsetWidth)}),t=setInterval(()=>{var r;let o=n?".".concat(n(y)):".".concat(y,"-dropdown"),a=null===(r=u.current)||void 0===r?void 0:r.querySelector(o);a&&(clearInterval(t),e.observe(a))},10);return()=>{clearInterval(t),e.disconnect()}}},[]);let v=Object.assign(Object.assign({},s),{style:Object.assign(Object.assign({},c),{margin:0}),open:g,visible:g,getPopupContainer:()=>u.current});return a&&(v=a(v)),r.createElement("div",{ref:u,style:{paddingBottom:d,position:"relative",minWidth:f}},r.createElement(e,Object.assign({},v)))})},51761:function(e,t,n){n.d(t,{Cn:function(){return c},u6:function(){return i}});var r=n(64090),o=n(24750),a=n(86718);let i=1e3,s={Modal:100,Drawer:100,Popover:100,Popconfirm:100,Tooltip:100,Tour:100},l={SelectLike:50,Dropdown:50,DatePicker:50,Menu:50,ImagePreview:1};function c(e,t){let[,n]=(0,o.ZP)(),c=r.useContext(a.Z);if(void 0!==t)return[t,t];let u=null!=c?c:0;return e in s?(u+=(c?0:n.zIndexPopupBase)+s[e],u=Math.min(u,n.zIndexPopupBase+i)):u+=l[e],[void 0===c?t:u,u]}},47387:function(e,t,n){n.d(t,{m:function(){return s}});let r=()=>({height:0,opacity:0}),o=e=>{let{scrollHeight:t}=e;return{height:t,opacity:1}},a=e=>({height:e?e.offsetHeight:0}),i=(e,t)=>(null==t?void 0:t.deadline)===!0||"height"===t.propertyName,s=(e,t,n)=>void 0!==n?n:"".concat(e,"-").concat(t);t.Z=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"ant";return{motionName:"".concat(e,"-motion-collapse"),onAppearStart:r,onEnterStart:r,onAppearActive:o,onEnterActive:o,onLeaveStart:a,onLeaveActive:r,onAppearEnd:i,onEnterEnd:i,onLeaveEnd:i,motionDeadline:500}}},65823:function(e,t,n){n.d(t,{M2:function(){return i},Tm:function(){return s},l$:function(){return a}});var r,o=n(64090);let{isValidElement:a}=r||(r=n.t(o,2));function i(e){return e&&a(e)&&e.type===o.Fragment}function s(e,t){return a(e)?o.cloneElement(e,"function"==typeof t?t(e.props||{}):t):e}},47794:function(e,t,n){n.d(t,{F:function(){return i},Z:function(){return a}});var r=n(16480),o=n.n(r);function a(e,t,n){return o()({["".concat(e,"-status-success")]:"success"===t,["".concat(e,"-status-warning")]:"warning"===t,["".concat(e,"-status-error")]:"error"===t,["".concat(e,"-status-validating")]:"validating"===t,["".concat(e,"-has-feedback")]:n})}let i=(e,t)=>t||e},76564:function(e,t,n){n.d(t,{G8:function(){return a},ln:function(){return i}});var r=n(64090);function o(){}n(53850);let a=r.createContext({}),i=()=>{let e=()=>{};return e.deprecated=o,e}},86718:function(e,t,n){let r=n(64090).createContext(void 0);t.Z=r},51350:function(e,t,n){n.d(t,{Te:function(){return c},aG:function(){return i},hU:function(){return u},nx:function(){return s}});var r=n(64090),o=n(65823);let a=/^[\u4e00-\u9fa5]{2}$/,i=a.test.bind(a);function s(e){return"danger"===e?{danger:!0}:{type:e}}function l(e){return"string"==typeof e}function c(e){return"text"===e||"link"===e}function u(e,t){let n=!1,a=[];return r.Children.forEach(e,e=>{let t=typeof e,r="string"===t||"number"===t;if(n&&r){let t=a.length-1,n=a[t];a[t]="".concat(n).concat(e)}else a.push(e);n=r}),r.Children.map(a,e=>(function(e,t){if(null==e)return;let n=t?" ":"";return"string"!=typeof e&&"number"!=typeof e&&l(e.type)&&i(e.props.children)?(0,o.Tm)(e,{children:e.props.children.split("").join(n)}):l(e)?i(e)?r.createElement("span",null,e.split("").join(n)):r.createElement("span",null,e):(0,o.M2)(e)?r.createElement("span",null,e):e})(e,t))}},1861:function(e,t,n){n.d(t,{ZP:function(){return eb}});var r=n(64090),o=n(16480),a=n.n(o),i=n(35704),s=n(74084),l=n(73193),c=n(57499),u=n(65823),d=n(76585);let p=e=>{let{componentCls:t,colorPrimary:n}=e;return{[t]:{position:"absolute",background:"transparent",pointerEvents:"none",boxSizing:"border-box",color:"var(--wave-color, ".concat(n,")"),boxShadow:"0 0 0 0 currentcolor",opacity:.2,"&.wave-motion-appear":{transition:["box-shadow 0.4s ".concat(e.motionEaseOutCirc),"opacity 2s ".concat(e.motionEaseOutCirc)].join(","),"&-active":{boxShadow:"0 0 0 6px currentcolor",opacity:0},"&.wave-quick":{transition:["box-shadow 0.3s ".concat(e.motionEaseInOut),"opacity 0.35s ".concat(e.motionEaseInOut)].join(",")}}}}};var f=(0,d.ZP)("Wave",e=>[p(e)]),m=n(48563),g=n(19223),h=n(49367),b=n(37274);function y(e){return e&&"#fff"!==e&&"#ffffff"!==e&&"rgb(255, 255, 255)"!==e&&"rgba(255, 255, 255, 1)"!==e&&function(e){let t=(e||"").match(/rgba?\((\d*), (\d*), (\d*)(, [\d.]*)?\)/);return!t||!t[1]||!t[2]||!t[3]||!(t[1]===t[2]&&t[2]===t[3])}(e)&&!/rgba\((?:\d*, ){3}0\)/.test(e)&&"transparent"!==e}let v="ant-wave-target";function E(e){return Number.isNaN(e)?0:e}let S=e=>{let{className:t,target:n,component:o}=e,i=r.useRef(null),[s,l]=r.useState(null),[c,u]=r.useState([]),[d,p]=r.useState(0),[f,m]=r.useState(0),[S,w]=r.useState(0),[x,O]=r.useState(0),[A,T]=r.useState(!1),C={left:d,top:f,width:S,height:x,borderRadius:c.map(e=>"".concat(e,"px")).join(" ")};function k(){let e=getComputedStyle(n);l(function(e){let{borderTopColor:t,borderColor:n,backgroundColor:r}=getComputedStyle(e);return y(t)?t:y(n)?n:y(r)?r:null}(n));let t="static"===e.position,{borderLeftWidth:r,borderTopWidth:o}=e;p(t?n.offsetLeft:E(-parseFloat(r))),m(t?n.offsetTop:E(-parseFloat(o))),w(n.offsetWidth),O(n.offsetHeight);let{borderTopLeftRadius:a,borderTopRightRadius:i,borderBottomLeftRadius:s,borderBottomRightRadius:c}=e;u([a,i,c,s].map(e=>E(parseFloat(e))))}if(s&&(C["--wave-color"]=s),r.useEffect(()=>{if(n){let e;let t=(0,g.Z)(()=>{k(),T(!0)});return"undefined"!=typeof ResizeObserver&&(e=new ResizeObserver(k)).observe(n),()=>{g.Z.cancel(t),null==e||e.disconnect()}}},[]),!A)return null;let I=("Checkbox"===o||"Radio"===o)&&(null==n?void 0:n.classList.contains(v));return r.createElement(h.ZP,{visible:!0,motionAppear:!0,motionName:"wave-motion",motionDeadline:5e3,onAppearEnd:(e,t)=>{var n;if(t.deadline||"opacity"===t.propertyName){let e=null===(n=i.current)||void 0===n?void 0:n.parentElement;(0,b.v)(e).then(()=>{null==e||e.remove()})}return!1}},e=>{let{className:n}=e;return r.createElement("div",{ref:i,className:a()(t,{"wave-quick":I},n),style:C})})};var w=(e,t)=>{var n;let{component:o}=t;if("Checkbox"===o&&!(null===(n=e.querySelector("input"))||void 0===n?void 0:n.checked))return;let a=document.createElement("div");a.style.position="absolute",a.style.left="0px",a.style.top="0px",null==e||e.insertBefore(a,null==e?void 0:e.firstChild),(0,b.s)(r.createElement(S,Object.assign({},t,{target:e})),a)},x=n(24750),O=e=>{let{children:t,disabled:n,component:o}=e,{getPrefixCls:i}=(0,r.useContext)(c.E_),d=(0,r.useRef)(null),p=i("wave"),[,h]=f(p),b=function(e,t,n){let{wave:o}=r.useContext(c.E_),[,a,i]=(0,x.ZP)(),s=(0,m.zX)(r=>{let s=e.current;if((null==o?void 0:o.disabled)||!s)return;let l=s.querySelector(".".concat(v))||s,{showEffect:c}=o||{};(c||w)(l,{className:t,token:a,component:n,event:r,hashId:i})}),l=r.useRef();return e=>{g.Z.cancel(l.current),l.current=(0,g.Z)(()=>{s(e)})}}(d,a()(p,h),o);if(r.useEffect(()=>{let e=d.current;if(!e||1!==e.nodeType||n)return;let t=t=>{!(0,l.Z)(t.target)||!e.getAttribute||e.getAttribute("disabled")||e.disabled||e.className.includes("disabled")||e.className.includes("-leave")||b(t)};return e.addEventListener("click",t,!0),()=>{e.removeEventListener("click",t,!0)}},[n]),!r.isValidElement(t))return null!=t?t:null;let y=(0,s.Yr)(t)?(0,s.sQ)(t.ref,d):d;return(0,u.Tm)(t,{ref:y})},A=n(17094),T=n(10693),C=n(92801),k=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);ot.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};let I=r.createContext(void 0);var N=n(51350);let _=(0,r.forwardRef)((e,t)=>{let{className:n,style:o,children:i,prefixCls:s}=e,l=a()("".concat(s,"-icon"),n);return r.createElement("span",{ref:t,className:l,style:o},i)});var R=n(66155);let P=(0,r.forwardRef)((e,t)=>{let{prefixCls:n,className:o,style:i,iconClassName:s}=e,l=a()("".concat(n,"-loading-icon"),o);return r.createElement(_,{prefixCls:n,className:l,style:i,ref:t},r.createElement(R.Z,{className:s}))}),M=()=>({width:0,opacity:0,transform:"scale(0)"}),L=e=>({width:e.scrollWidth,opacity:1,transform:"scale(1)"});var D=e=>{let{prefixCls:t,loading:n,existIcon:o,className:a,style:i}=e,s=!!n;return o?r.createElement(P,{prefixCls:t,className:a,style:i}):r.createElement(h.ZP,{visible:s,motionName:"".concat(t,"-loading-icon-motion"),motionLeave:s,removeOnLeave:!0,onAppearStart:M,onAppearActive:L,onEnterStart:M,onEnterActive:L,onLeaveStart:L,onLeaveActive:M},(e,n)=>{let{className:o,style:s}=e;return r.createElement(P,{prefixCls:t,className:a,style:Object.assign(Object.assign({},i),s),ref:n,iconClassName:o})})},j=n(8985),F=n(11303),B=n(80316);let U=(e,t)=>({["> span, > ".concat(e)]:{"&:not(:last-child)":{["&, & > ".concat(e)]:{"&:not(:disabled)":{borderInlineEndColor:t}}},"&:not(:first-child)":{["&, & > ".concat(e)]:{"&:not(:disabled)":{borderInlineStartColor:t}}}}});var Z=e=>{let{componentCls:t,fontSize:n,lineWidth:r,groupBorderColor:o,colorErrorHover:a}=e;return{["".concat(t,"-group")]:[{position:"relative",display:"inline-flex",["> span, > ".concat(t)]:{"&:not(:last-child)":{["&, & > ".concat(t)]:{borderStartEndRadius:0,borderEndEndRadius:0}},"&:not(:first-child)":{marginInlineStart:e.calc(r).mul(-1).equal(),["&, & > ".concat(t)]:{borderStartStartRadius:0,borderEndStartRadius:0}}},[t]:{position:"relative",zIndex:1,"&:hover,\n &:focus,\n &:active":{zIndex:2},"&[disabled]":{zIndex:0}},["".concat(t,"-icon-only")]:{fontSize:n}},U("".concat(t,"-primary"),o),U("".concat(t,"-danger"),a)]}},z=n(49202);let H=e=>{let{paddingInline:t,onlyIconSize:n,paddingBlock:r}=e;return(0,B.TS)(e,{buttonPaddingHorizontal:t,buttonPaddingVertical:r,buttonIconOnlyFontSize:n})},G=e=>{var t,n,r,o,a,i;let s=null!==(t=e.contentFontSize)&&void 0!==t?t:e.fontSize,l=null!==(n=e.contentFontSizeSM)&&void 0!==n?n:e.fontSize,c=null!==(r=e.contentFontSizeLG)&&void 0!==r?r:e.fontSizeLG,u=null!==(o=e.contentLineHeight)&&void 0!==o?o:(0,z.D)(s),d=null!==(a=e.contentLineHeightSM)&&void 0!==a?a:(0,z.D)(l),p=null!==(i=e.contentLineHeightLG)&&void 0!==i?i:(0,z.D)(c);return{fontWeight:400,defaultShadow:"0 ".concat(e.controlOutlineWidth,"px 0 ").concat(e.controlTmpOutline),primaryShadow:"0 ".concat(e.controlOutlineWidth,"px 0 ").concat(e.controlOutline),dangerShadow:"0 ".concat(e.controlOutlineWidth,"px 0 ").concat(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:e.fontSizeLG,onlyIconSizeSM:e.fontSizeLG-2,onlyIconSizeLG:e.fontSizeLG+2,groupBorderColor:e.colorPrimaryHover,linkHoverBg:"transparent",textHoverBg:e.colorBgTextHover,defaultColor:e.colorText,defaultBg:e.colorBgContainer,defaultBorderColor:e.colorBorder,defaultBorderColorDisabled:e.colorBorder,contentFontSize:s,contentFontSizeSM:l,contentFontSizeLG:c,contentLineHeight:u,contentLineHeightSM:d,contentLineHeightLG:p,paddingBlock:Math.max((e.controlHeight-s*u)/2-e.lineWidth,0),paddingBlockSM:Math.max((e.controlHeightSM-l*d)/2-e.lineWidth,0),paddingBlockLG:Math.max((e.controlHeightLG-c*p)/2-e.lineWidth,0)}},$=e=>{let{componentCls:t,iconCls:n,fontWeight:r}=e;return{[t]:{outline:"none",position:"relative",display:"inline-block",fontWeight:r,whiteSpace:"nowrap",textAlign:"center",backgroundImage:"none",background:"transparent",border:"".concat((0,j.bf)(e.lineWidth)," ").concat(e.lineType," transparent"),cursor:"pointer",transition:"all ".concat(e.motionDurationMid," ").concat(e.motionEaseInOut),userSelect:"none",touchAction:"manipulation",color:e.colorText,"&:disabled > *":{pointerEvents:"none"},"> span":{display:"inline-block"},["".concat(t,"-icon")]:{lineHeight:0},["> ".concat(n," + span, > span + ").concat(n)]:{marginInlineStart:e.marginXS},["&:not(".concat(t,"-icon-only) > ").concat(t,"-icon")]:{["&".concat(t,"-loading-icon, &:not(:last-child)")]:{marginInlineEnd:e.marginXS}},"> a":{color:"currentColor"},"&:not(:disabled)":Object.assign({},(0,F.Qy)(e)),["&".concat(t,"-two-chinese-chars::first-letter")]:{letterSpacing:"0.34em"},["&".concat(t,"-two-chinese-chars > *:not(").concat(n,")")]:{marginInlineEnd:"-0.34em",letterSpacing:"0.34em"},["&-icon-only".concat(t,"-compact-item")]:{flex:"none"}}}},W=(e,t,n)=>({["&:not(:disabled):not(".concat(e,"-disabled)")]:{"&:hover":t,"&:active":n}}),V=e=>({minWidth:e.controlHeight,paddingInlineStart:0,paddingInlineEnd:0,borderRadius:"50%"}),q=e=>({borderRadius:e.controlHeight,paddingInlineStart:e.calc(e.controlHeight).div(2).equal(),paddingInlineEnd:e.calc(e.controlHeight).div(2).equal()}),Y=e=>({cursor:"not-allowed",borderColor:e.borderColorDisabled,color:e.colorTextDisabled,background:e.colorBgContainerDisabled,boxShadow:"none"}),K=(e,t,n,r,o,a,i,s)=>({["&".concat(e,"-background-ghost")]:Object.assign(Object.assign({color:n||void 0,background:t,borderColor:r||void 0,boxShadow:"none"},W(e,Object.assign({background:t},i),Object.assign({background:t},s))),{"&:disabled":{cursor:"not-allowed",color:o||void 0,borderColor:a||void 0}})}),X=e=>({["&:disabled, &".concat(e.componentCls,"-disabled")]:Object.assign({},Y(e))}),Q=e=>Object.assign({},X(e)),J=e=>({["&:disabled, &".concat(e.componentCls,"-disabled")]:{cursor:"not-allowed",color:e.colorTextDisabled}}),ee=e=>Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},Q(e)),{background:e.defaultBg,borderColor:e.defaultBorderColor,color:e.defaultColor,boxShadow:e.defaultShadow}),W(e.componentCls,{color:e.colorPrimaryHover,borderColor:e.colorPrimaryHover},{color:e.colorPrimaryActive,borderColor:e.colorPrimaryActive})),K(e.componentCls,e.ghostBg,e.defaultGhostColor,e.defaultGhostBorderColor,e.colorTextDisabled,e.colorBorder)),{["&".concat(e.componentCls,"-dangerous")]:Object.assign(Object.assign(Object.assign({color:e.colorError,borderColor:e.colorError},W(e.componentCls,{color:e.colorErrorHover,borderColor:e.colorErrorBorderHover},{color:e.colorErrorActive,borderColor:e.colorErrorActive})),K(e.componentCls,e.ghostBg,e.colorError,e.colorError,e.colorTextDisabled,e.colorBorder)),X(e))}),et=e=>Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},Q(e)),{color:e.primaryColor,background:e.colorPrimary,boxShadow:e.primaryShadow}),W(e.componentCls,{color:e.colorTextLightSolid,background:e.colorPrimaryHover},{color:e.colorTextLightSolid,background:e.colorPrimaryActive})),K(e.componentCls,e.ghostBg,e.colorPrimary,e.colorPrimary,e.colorTextDisabled,e.colorBorder,{color:e.colorPrimaryHover,borderColor:e.colorPrimaryHover},{color:e.colorPrimaryActive,borderColor:e.colorPrimaryActive})),{["&".concat(e.componentCls,"-dangerous")]:Object.assign(Object.assign(Object.assign({background:e.colorError,boxShadow:e.dangerShadow,color:e.dangerColor},W(e.componentCls,{background:e.colorErrorHover},{background:e.colorErrorActive})),K(e.componentCls,e.ghostBg,e.colorError,e.colorError,e.colorTextDisabled,e.colorBorder,{color:e.colorErrorHover,borderColor:e.colorErrorHover},{color:e.colorErrorActive,borderColor:e.colorErrorActive})),X(e))}),en=e=>Object.assign(Object.assign({},ee(e)),{borderStyle:"dashed"}),er=e=>Object.assign(Object.assign(Object.assign({color:e.colorLink},W(e.componentCls,{color:e.colorLinkHover,background:e.linkHoverBg},{color:e.colorLinkActive})),J(e)),{["&".concat(e.componentCls,"-dangerous")]:Object.assign(Object.assign({color:e.colorError},W(e.componentCls,{color:e.colorErrorHover},{color:e.colorErrorActive})),J(e))}),eo=e=>Object.assign(Object.assign(Object.assign({},W(e.componentCls,{color:e.colorText,background:e.textHoverBg},{color:e.colorText,background:e.colorBgTextActive})),J(e)),{["&".concat(e.componentCls,"-dangerous")]:Object.assign(Object.assign({color:e.colorError},J(e)),W(e.componentCls,{color:e.colorErrorHover,background:e.colorErrorBg},{color:e.colorErrorHover,background:e.colorErrorBg}))}),ea=e=>{let{componentCls:t}=e;return{["".concat(t,"-default")]:ee(e),["".concat(t,"-primary")]:et(e),["".concat(t,"-dashed")]:en(e),["".concat(t,"-link")]:er(e),["".concat(t,"-text")]:eo(e),["".concat(t,"-ghost")]:K(e.componentCls,e.ghostBg,e.colorBgContainer,e.colorBgContainer,e.colorTextDisabled,e.colorBorder)}},ei=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",{componentCls:n,controlHeight:r,fontSize:o,lineHeight:a,borderRadius:i,buttonPaddingHorizontal:s,iconCls:l,buttonPaddingVertical:c}=e,u="".concat(n,"-icon-only");return[{["".concat(n).concat(t)]:{fontSize:o,lineHeight:a,height:r,padding:"".concat((0,j.bf)(c)," ").concat((0,j.bf)(s)),borderRadius:i,["&".concat(u)]:{width:r,paddingInlineStart:0,paddingInlineEnd:0,["&".concat(n,"-round")]:{width:"auto"},[l]:{fontSize:e.buttonIconOnlyFontSize}},["&".concat(n,"-loading")]:{opacity:e.opacityLoading,cursor:"default"},["".concat(n,"-loading-icon")]:{transition:"width ".concat(e.motionDurationSlow," ").concat(e.motionEaseInOut,", opacity ").concat(e.motionDurationSlow," ").concat(e.motionEaseInOut)}}},{["".concat(n).concat(n,"-circle").concat(t)]:V(e)},{["".concat(n).concat(n,"-round").concat(t)]:q(e)}]},es=e=>ei((0,B.TS)(e,{fontSize:e.contentFontSize,lineHeight:e.contentLineHeight})),el=e=>ei((0,B.TS)(e,{controlHeight:e.controlHeightSM,fontSize:e.contentFontSizeSM,lineHeight:e.contentLineHeightSM,padding:e.paddingXS,buttonPaddingHorizontal:e.paddingInlineSM,buttonPaddingVertical:e.paddingBlockSM,borderRadius:e.borderRadiusSM,buttonIconOnlyFontSize:e.onlyIconSizeSM}),"".concat(e.componentCls,"-sm")),ec=e=>ei((0,B.TS)(e,{controlHeight:e.controlHeightLG,fontSize:e.contentFontSizeLG,lineHeight:e.contentLineHeightLG,buttonPaddingHorizontal:e.paddingInlineLG,buttonPaddingVertical:e.paddingBlockLG,borderRadius:e.borderRadiusLG,buttonIconOnlyFontSize:e.onlyIconSizeLG}),"".concat(e.componentCls,"-lg")),eu=e=>{let{componentCls:t}=e;return{[t]:{["&".concat(t,"-block")]:{width:"100%"}}}};var ed=(0,d.I$)("Button",e=>{let t=H(e);return[$(t),el(t),es(t),ec(t),eu(t),ea(t),Z(t)]},G,{unitless:{fontWeight:!0,contentLineHeight:!0,contentLineHeightSM:!0,contentLineHeightLG:!0}}),ep=n(12288);let ef=e=>{let{componentCls:t,calc:n}=e;return{[t]:{["&-compact-item".concat(t,"-primary")]:{["&:not([disabled]) + ".concat(t,"-compact-item").concat(t,"-primary:not([disabled])")]:{position:"relative","&:before":{position:"absolute",top:n(e.lineWidth).mul(-1).equal(),insetInlineStart:n(e.lineWidth).mul(-1).equal(),display:"inline-block",width:e.lineWidth,height:"calc(100% + ".concat((0,j.bf)(e.lineWidth)," * 2)"),backgroundColor:e.colorPrimaryHover,content:'""'}}},"&-compact-vertical-item":{["&".concat(t,"-primary")]:{["&:not([disabled]) + ".concat(t,"-compact-vertical-item").concat(t,"-primary:not([disabled])")]:{position:"relative","&:before":{position:"absolute",top:n(e.lineWidth).mul(-1).equal(),insetInlineStart:n(e.lineWidth).mul(-1).equal(),display:"inline-block",width:"calc(100% + ".concat((0,j.bf)(e.lineWidth)," * 2)"),height:e.lineWidth,backgroundColor:e.colorPrimaryHover,content:'""'}}}}}}};var em=(0,d.bk)(["Button","compact"],e=>{let t=H(e);return[(0,ep.c)(t),function(e){var t;let n="".concat(e.componentCls,"-compact-vertical");return{[n]:Object.assign(Object.assign({},{["&-item:not(".concat(n,"-last-item)")]:{marginBottom:e.calc(e.lineWidth).mul(-1).equal()},"&-item":{"&:hover,&:focus,&:active":{zIndex:2},"&[disabled]":{zIndex:0}}}),(t=e.componentCls,{["&-item:not(".concat(n,"-first-item):not(").concat(n,"-last-item)")]:{borderRadius:0},["&-item".concat(n,"-first-item:not(").concat(n,"-last-item)")]:{["&, &".concat(t,"-sm, &").concat(t,"-lg")]:{borderEndEndRadius:0,borderEndStartRadius:0}},["&-item".concat(n,"-last-item:not(").concat(n,"-first-item)")]:{["&, &".concat(t,"-sm, &").concat(t,"-lg")]:{borderStartStartRadius:0,borderStartEndRadius:0}}}))}}(t),ef(t)]},G),eg=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);ot.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};let eh=(0,r.forwardRef)((e,t)=>{var n,o;let{loading:l=!1,prefixCls:u,type:d="default",danger:p,shape:f="default",size:m,styles:g,disabled:h,className:b,rootClassName:y,children:v,icon:E,ghost:S=!1,block:w=!1,htmlType:x="button",classNames:k,style:R={}}=e,P=eg(e,["loading","prefixCls","type","danger","shape","size","styles","disabled","className","rootClassName","children","icon","ghost","block","htmlType","classNames","style"]),{getPrefixCls:M,autoInsertSpaceInButton:L,direction:j,button:F}=(0,r.useContext)(c.E_),B=M("btn",u),[U,Z,z]=ed(B),H=(0,r.useContext)(A.Z),G=null!=h?h:H,$=(0,r.useContext)(I),W=(0,r.useMemo)(()=>(function(e){if("object"==typeof e&&e){let t=null==e?void 0:e.delay;return{loading:(t=Number.isNaN(t)||"number"!=typeof t?0:t)<=0,delay:t}}return{loading:!!e,delay:0}})(l),[l]),[V,q]=(0,r.useState)(W.loading),[Y,K]=(0,r.useState)(!1),X=(0,r.createRef)(),Q=(0,s.sQ)(t,X),J=1===r.Children.count(v)&&!E&&!(0,N.Te)(d);(0,r.useEffect)(()=>{let e=null;return W.delay>0?e=setTimeout(()=>{e=null,q(!0)},W.delay):q(W.loading),function(){e&&(clearTimeout(e),e=null)}},[W]),(0,r.useEffect)(()=>{if(!Q||!Q.current||!1===L)return;let e=Q.current.textContent;J&&(0,N.aG)(e)?Y||K(!0):Y&&K(!1)},[Q]);let ee=t=>{let{onClick:n}=e;if(V||G){t.preventDefault();return}null==n||n(t)},et=!1!==L,{compactSize:en,compactItemClassnames:er}=(0,C.ri)(B,j),eo=(0,T.Z)(e=>{var t,n;return null!==(n=null!==(t=null!=m?m:en)&&void 0!==t?t:$)&&void 0!==n?n:e}),ea=eo&&({large:"lg",small:"sm",middle:void 0})[eo]||"",ei=V?"loading":E,es=(0,i.Z)(P,["navigate"]),el=a()(B,Z,z,{["".concat(B,"-").concat(f)]:"default"!==f&&f,["".concat(B,"-").concat(d)]:d,["".concat(B,"-").concat(ea)]:ea,["".concat(B,"-icon-only")]:!v&&0!==v&&!!ei,["".concat(B,"-background-ghost")]:S&&!(0,N.Te)(d),["".concat(B,"-loading")]:V,["".concat(B,"-two-chinese-chars")]:Y&&et&&!V,["".concat(B,"-block")]:w,["".concat(B,"-dangerous")]:!!p,["".concat(B,"-rtl")]:"rtl"===j},er,b,y,null==F?void 0:F.className),ec=Object.assign(Object.assign({},null==F?void 0:F.style),R),eu=a()(null==k?void 0:k.icon,null===(n=null==F?void 0:F.classNames)||void 0===n?void 0:n.icon),ep=Object.assign(Object.assign({},(null==g?void 0:g.icon)||{}),(null===(o=null==F?void 0:F.styles)||void 0===o?void 0:o.icon)||{}),ef=E&&!V?r.createElement(_,{prefixCls:B,className:eu,style:ep},E):r.createElement(D,{existIcon:!!E,prefixCls:B,loading:!!V}),eh=v||0===v?(0,N.hU)(v,J&&et):null;if(void 0!==es.href)return U(r.createElement("a",Object.assign({},es,{className:a()(el,{["".concat(B,"-disabled")]:G}),href:G?void 0:es.href,style:ec,onClick:ee,ref:Q,tabIndex:G?-1:0}),ef,eh));let eb=r.createElement("button",Object.assign({},P,{type:x,className:el,style:ec,onClick:ee,disabled:G,ref:Q}),ef,eh,!!er&&r.createElement(em,{key:"compact",prefixCls:B}));return(0,N.Te)(d)||(eb=r.createElement(O,{component:"Button",disabled:!!V},eb)),U(eb)});eh.Group=e=>{let{getPrefixCls:t,direction:n}=r.useContext(c.E_),{prefixCls:o,size:i,className:s}=e,l=k(e,["prefixCls","size","className"]),u=t("btn-group",o),[,,d]=(0,x.ZP)(),p="";switch(i){case"large":p="lg";break;case"small":p="sm"}let f=a()(u,{["".concat(u,"-").concat(p)]:p,["".concat(u,"-rtl")]:"rtl"===n},s,d);return r.createElement(I.Provider,{value:i},r.createElement("div",Object.assign({},l,{className:f})))},eh.__ANT_BUTTON=!0;var eb=eh},17094:function(e,t,n){n.d(t,{n:function(){return a}});var r=n(64090);let o=r.createContext(!1),a=e=>{let{children:t,disabled:n}=e,a=r.useContext(o);return r.createElement(o.Provider,{value:null!=n?n:a},t)};t.Z=o},97303:function(e,t,n){n.d(t,{q:function(){return a}});var r=n(64090);let o=r.createContext(void 0),a=e=>{let{children:t,size:n}=e,a=r.useContext(o);return r.createElement(o.Provider,{value:n||a},t)};t.Z=o},57499:function(e,t,n){n.d(t,{E_:function(){return a},oR:function(){return o}});var r=n(64090);let o="anticon",a=r.createContext({getPrefixCls:(e,t)=>t||(e?"ant-".concat(e):"ant"),iconPrefixCls:o}),{Consumer:i}=a},92935:function(e,t,n){var r=n(24750);t.Z=e=>{let[,,,,t]=(0,r.ZP)();return t?"".concat(e,"-css-var"):""}},10693:function(e,t,n){var r=n(64090),o=n(97303);t.Z=e=>{let t=r.useContext(o.Z);return r.useMemo(()=>e?"string"==typeof e?null!=e?e:t:e instanceof Function?e(t):t:t,[e,t])}},54165:function(e,t,n){let r,o,a,i;n.d(t,{ZP:function(){return G},w6:function(){return Z}});var s=n(64090),l=n.t(s,2),c=n(8985),u=n(67689),d=n(61475),p=n(36597),f=n(76564),m=n(12519),g=n(4678),h=n(33302),b=e=>{let{locale:t={},children:n,_ANT_MARK__:r}=e;s.useEffect(()=>(0,g.f)(t&&t.Modal),[t]);let o=s.useMemo(()=>Object.assign(Object.assign({},t),{exist:!0}),[t]);return s.createElement(h.Z.Provider,{value:o},n)},y=n(79474),v=n(43345),E=n(46864),S=n(57499),w=n(12215),x=n(6336),O=n(22127),A=n(24050);let T="-ant-".concat(Date.now(),"-").concat(Math.random());var C=n(17094),k=n(97303),I=n(92536);let{useId:N}=Object.assign({},l);var _=void 0===N?()=>"":N,R=n(49367),P=n(24750);function M(e){let{children:t}=e,[,n]=(0,P.ZP)(),{motion:r}=n,o=s.useRef(!1);return(o.current=o.current||!1===r,o.current)?s.createElement(R.zt,{motion:r},t):t}var L=()=>null,D=n(28030),j=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);ot.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};let F=["getTargetContainer","getPopupContainer","renderEmpty","pageHeader","input","pagination","form","select","button"];function B(){return r||"ant"}function U(){return o||S.oR}let Z=()=>({getPrefixCls:(e,t)=>t||(e?"".concat(B(),"-").concat(e):B()),getIconPrefixCls:U,getRootPrefixCls:()=>r||B(),getTheme:()=>a,holderRender:i}),z=e=>{let{children:t,csp:n,autoInsertSpaceInButton:r,alert:o,anchor:a,form:i,locale:l,componentSize:g,direction:h,space:w,virtual:x,dropdownMatchSelectWidth:O,popupMatchSelectWidth:A,popupOverflow:T,legacyLocale:N,parentContext:R,iconPrefixCls:P,theme:B,componentDisabled:U,segmented:Z,statistic:z,spin:H,calendar:G,carousel:$,cascader:W,collapse:V,typography:q,checkbox:Y,descriptions:K,divider:X,drawer:Q,skeleton:J,steps:ee,image:et,layout:en,list:er,mentions:eo,modal:ea,progress:ei,result:es,slider:el,breadcrumb:ec,menu:eu,pagination:ed,input:ep,empty:ef,badge:em,radio:eg,rate:eh,switch:eb,transfer:ey,avatar:ev,message:eE,tag:eS,table:ew,card:ex,tabs:eO,timeline:eA,timePicker:eT,upload:eC,notification:ek,tree:eI,colorPicker:eN,datePicker:e_,rangePicker:eR,flex:eP,wave:eM,dropdown:eL,warning:eD}=e,ej=s.useCallback((t,n)=>{let{prefixCls:r}=e;if(n)return n;let o=r||R.getPrefixCls("");return t?"".concat(o,"-").concat(t):o},[R.getPrefixCls,e.prefixCls]),eF=P||R.iconPrefixCls||S.oR,eB=n||R.csp;(0,D.Z)(eF,eB);let eU=function(e,t){(0,f.ln)("ConfigProvider");let n=e||{},r=!1!==n.inherit&&t?t:v.u_,o=_();return(0,d.Z)(()=>{var a,i;if(!e)return t;let s=Object.assign({},r.components);Object.keys(e.components||{}).forEach(t=>{s[t]=Object.assign(Object.assign({},s[t]),e.components[t])});let l="css-var-".concat(o.replace(/:/g,"")),c=(null!==(a=n.cssVar)&&void 0!==a?a:r.cssVar)&&Object.assign(Object.assign(Object.assign({prefix:"ant"},"object"==typeof r.cssVar?r.cssVar:{}),"object"==typeof n.cssVar?n.cssVar:{}),{key:"object"==typeof n.cssVar&&(null===(i=n.cssVar)||void 0===i?void 0:i.key)||l});return Object.assign(Object.assign(Object.assign({},r),n),{token:Object.assign(Object.assign({},r.token),n.token),components:s,cssVar:c})},[n,r],(e,t)=>e.some((e,n)=>{let r=t[n];return!(0,I.Z)(e,r,!0)}))}(B,R.theme),eZ={csp:eB,autoInsertSpaceInButton:r,alert:o,anchor:a,locale:l||N,direction:h,space:w,virtual:x,popupMatchSelectWidth:null!=A?A:O,popupOverflow:T,getPrefixCls:ej,iconPrefixCls:eF,theme:eU,segmented:Z,statistic:z,spin:H,calendar:G,carousel:$,cascader:W,collapse:V,typography:q,checkbox:Y,descriptions:K,divider:X,drawer:Q,skeleton:J,steps:ee,image:et,input:ep,layout:en,list:er,mentions:eo,modal:ea,progress:ei,result:es,slider:el,breadcrumb:ec,menu:eu,pagination:ed,empty:ef,badge:em,radio:eg,rate:eh,switch:eb,transfer:ey,avatar:ev,message:eE,tag:eS,table:ew,card:ex,tabs:eO,timeline:eA,timePicker:eT,upload:eC,notification:ek,tree:eI,colorPicker:eN,datePicker:e_,rangePicker:eR,flex:eP,wave:eM,dropdown:eL,warning:eD},ez=Object.assign({},R);Object.keys(eZ).forEach(e=>{void 0!==eZ[e]&&(ez[e]=eZ[e])}),F.forEach(t=>{let n=e[t];n&&(ez[t]=n)});let eH=(0,d.Z)(()=>ez,ez,(e,t)=>{let n=Object.keys(e),r=Object.keys(t);return n.length!==r.length||n.some(n=>e[n]!==t[n])}),eG=s.useMemo(()=>({prefixCls:eF,csp:eB}),[eF,eB]),e$=s.createElement(s.Fragment,null,s.createElement(L,{dropdownMatchSelectWidth:O}),t),eW=s.useMemo(()=>{var e,t,n,r;return(0,p.T)((null===(e=y.Z.Form)||void 0===e?void 0:e.defaultValidateMessages)||{},(null===(n=null===(t=eH.locale)||void 0===t?void 0:t.Form)||void 0===n?void 0:n.defaultValidateMessages)||{},(null===(r=eH.form)||void 0===r?void 0:r.validateMessages)||{},(null==i?void 0:i.validateMessages)||{})},[eH,null==i?void 0:i.validateMessages]);Object.keys(eW).length>0&&(e$=s.createElement(m.Z.Provider,{value:eW},e$)),l&&(e$=s.createElement(b,{locale:l,_ANT_MARK__:"internalMark"},e$)),(eF||eB)&&(e$=s.createElement(u.Z.Provider,{value:eG},e$)),g&&(e$=s.createElement(k.q,{size:g},e$)),e$=s.createElement(M,null,e$);let eV=s.useMemo(()=>{let e=eU||{},{algorithm:t,token:n,components:r,cssVar:o}=e,a=j(e,["algorithm","token","components","cssVar"]),i=t&&(!Array.isArray(t)||t.length>0)?(0,c.jG)(t):v.uH,s={};Object.entries(r||{}).forEach(e=>{let[t,n]=e,r=Object.assign({},n);"algorithm"in r&&(!0===r.algorithm?r.theme=i:(Array.isArray(r.algorithm)||"function"==typeof r.algorithm)&&(r.theme=(0,c.jG)(r.algorithm)),delete r.algorithm),s[t]=r});let l=Object.assign(Object.assign({},E.Z),n);return Object.assign(Object.assign({},a),{theme:i,token:l,components:s,override:Object.assign({override:l},s),cssVar:o})},[eU]);return B&&(e$=s.createElement(v.Mj.Provider,{value:eV},e$)),eH.warning&&(e$=s.createElement(f.G8.Provider,{value:eH.warning},e$)),void 0!==U&&(e$=s.createElement(C.n,{disabled:U},e$)),s.createElement(S.E_.Provider,{value:eH},e$)},H=e=>{let t=s.useContext(S.E_),n=s.useContext(h.Z);return s.createElement(z,Object.assign({parentContext:t,legacyLocale:n},e))};H.ConfigContext=S.E_,H.SizeContext=k.Z,H.config=e=>{let{prefixCls:t,iconPrefixCls:n,theme:s,holderRender:l}=e;void 0!==t&&(r=t),void 0!==n&&(o=n),"holderRender"in e&&(i=l),s&&(Object.keys(s).some(e=>e.endsWith("Color"))?function(e,t){let n=function(e,t){let n={},r=(e,t)=>{let n=e.clone();return(n=(null==t?void 0:t(n))||n).toRgbString()},o=(e,t)=>{let o=new x.C(e),a=(0,w.R_)(o.toRgbString());n["".concat(t,"-color")]=r(o),n["".concat(t,"-color-disabled")]=a[1],n["".concat(t,"-color-hover")]=a[4],n["".concat(t,"-color-active")]=a[6],n["".concat(t,"-color-outline")]=o.clone().setAlpha(.2).toRgbString(),n["".concat(t,"-color-deprecated-bg")]=a[0],n["".concat(t,"-color-deprecated-border")]=a[2]};if(t.primaryColor){o(t.primaryColor,"primary");let e=new x.C(t.primaryColor),a=(0,w.R_)(e.toRgbString());a.forEach((e,t)=>{n["primary-".concat(t+1)]=e}),n["primary-color-deprecated-l-35"]=r(e,e=>e.lighten(35)),n["primary-color-deprecated-l-20"]=r(e,e=>e.lighten(20)),n["primary-color-deprecated-t-20"]=r(e,e=>e.tint(20)),n["primary-color-deprecated-t-50"]=r(e,e=>e.tint(50)),n["primary-color-deprecated-f-12"]=r(e,e=>e.setAlpha(.12*e.getAlpha()));let i=new x.C(a[0]);n["primary-color-active-deprecated-f-30"]=r(i,e=>e.setAlpha(.3*e.getAlpha())),n["primary-color-active-deprecated-d-02"]=r(i,e=>e.darken(2))}t.successColor&&o(t.successColor,"success"),t.warningColor&&o(t.warningColor,"warning"),t.errorColor&&o(t.errorColor,"error"),t.infoColor&&o(t.infoColor,"info");let a=Object.keys(n).map(t=>"--".concat(e,"-").concat(t,": ").concat(n[t],";"));return"\n :root {\n ".concat(a.join("\n"),"\n }\n ").trim()}(e,t);(0,O.Z)()&&(0,A.hq)(n,"".concat(T,"-dynamic-theme"))}(B(),s):a=s)},H.useConfig=function(){return{componentDisabled:(0,s.useContext)(C.Z),componentSize:(0,s.useContext)(k.Z)}},Object.defineProperty(H,"SizeContext",{get:()=>k.Z});var G=H},47137:function(e,t,n){n.d(t,{RV:function(){return l},Rk:function(){return c},Ux:function(){return d},aM:function(){return u},pg:function(){return p},q3:function(){return i},qI:function(){return s}});var r=n(64090),o=n(76570),a=n(35704);let i=r.createContext({labelAlign:"right",vertical:!1,itemRef:()=>{}}),s=r.createContext(null),l=e=>{let t=(0,a.Z)(e,["prefixCls"]);return r.createElement(o.RV,Object.assign({},t))},c=r.createContext({prefixCls:""}),u=r.createContext({}),d=e=>{let{children:t,status:n,override:o}=e,a=(0,r.useContext)(u),i=(0,r.useMemo)(()=>{let e=Object.assign({},a);return o&&delete e.isFormItemInput,n&&(delete e.status,delete e.hasFeedback,delete e.feedbackIcon),e},[n,o,a]);return r.createElement(u.Provider,{value:i},t)},p=(0,r.createContext)(void 0)},8443:function(e,t,n){var r=n(64090),o=n(47137);let a=["outlined","borderless","filled"];t.Z=function(e){let t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,i=(0,r.useContext)(o.pg);t=void 0!==e?e:!1===n?"borderless":null!=i?i:"outlined";let s=a.includes(t);return[t,s]}},12143:function(e,t,n){n.d(t,{Z:function(){return eX}});var r=n(63787),o=n(16480),a=n.n(o),i=n(49367),s=n(64090),l=n(47387),c=n(47137);function u(e){let[t,n]=s.useState(e);return s.useEffect(()=>{let t=setTimeout(()=>{n(e)},e.length?0:10);return()=>{clearTimeout(t)}},[e]),t}var d=n(8985),p=n(11303),f=n(58854),m=n(46154),g=n(80316),h=n(76585),b=e=>{let{componentCls:t}=e,n="".concat(t,"-show-help"),r="".concat(t,"-show-help-item");return{[n]:{transition:"opacity ".concat(e.motionDurationSlow," ").concat(e.motionEaseInOut),"&-appear, &-enter":{opacity:0,"&-active":{opacity:1}},"&-leave":{opacity:1,"&-active":{opacity:0}},[r]:{overflow:"hidden",transition:"height ".concat(e.motionDurationSlow," ").concat(e.motionEaseInOut,",\n opacity ").concat(e.motionDurationSlow," ").concat(e.motionEaseInOut,",\n transform ").concat(e.motionDurationSlow," ").concat(e.motionEaseInOut," !important"),["&".concat(r,"-appear, &").concat(r,"-enter")]:{transform:"translateY(-5px)",opacity:0,"&-active":{transform:"translateY(0)",opacity:1}},["&".concat(r,"-leave-active")]:{transform:"translateY(-5px)"}}}}};let y=e=>({legend:{display:"block",width:"100%",marginBottom:e.marginLG,padding:0,color:e.colorTextDescription,fontSize:e.fontSizeLG,lineHeight:"inherit",border:0,borderBottom:"".concat((0,d.bf)(e.lineWidth)," ").concat(e.lineType," ").concat(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 ".concat((0,d.bf)(e.controlOutlineWidth)," ").concat(e.controlOutline)},output:{display:"block",paddingTop:15,color:e.colorText,fontSize:e.fontSize,lineHeight:e.lineHeight}}),v=(e,t)=>{let{formItemCls:n}=e;return{[n]:{["".concat(n,"-label > label")]:{height:t},["".concat(n,"-control-input")]:{minHeight:t}}}},E=e=>{let{componentCls:t}=e;return{[e.componentCls]:Object.assign(Object.assign(Object.assign({},(0,p.Wf)(e)),y(e)),{["".concat(t,"-text")]:{display:"inline-block",paddingInlineEnd:e.paddingSM},"&-small":Object.assign({},v(e,e.controlHeightSM)),"&-large":Object.assign({},v(e,e.controlHeightLG))})}},S=e=>{let{formItemCls:t,iconCls:n,componentCls:r,rootPrefixCls:o,labelRequiredMarkColor:a,labelColor:i,labelFontSize:s,labelHeight:l,labelColonMarginInlineStart:c,labelColonMarginInlineEnd:u,itemMarginBottom:d}=e;return{[t]:Object.assign(Object.assign({},(0,p.Wf)(e)),{marginBottom:d,verticalAlign:"top","&-with-help":{transition:"none"},["&-hidden,\n &-hidden.".concat(o,"-row")]:{display:"none"},"&-has-warning":{["".concat(t,"-split")]:{color:e.colorError}},"&-has-error":{["".concat(t,"-split")]:{color:e.colorWarning}},["".concat(t,"-label")]:{flexGrow:0,overflow:"hidden",whiteSpace:"nowrap",textAlign:"end",verticalAlign:"middle","&-left":{textAlign:"start"},"&-wrap":{overflow:"unset",lineHeight:e.lineHeight,whiteSpace:"unset"},"> label":{position:"relative",display:"inline-flex",alignItems:"center",maxWidth:"100%",height:l,color:i,fontSize:s,["> ".concat(n)]:{fontSize:e.fontSize,verticalAlign:"top"},["&".concat(t,"-required:not(").concat(t,"-required-mark-optional)::before")]:{display:"inline-block",marginInlineEnd:e.marginXXS,color:a,fontSize:e.fontSize,fontFamily:"SimSun, sans-serif",lineHeight:1,content:'"*"',["".concat(r,"-hide-required-mark &")]:{display:"none"}},["".concat(t,"-optional")]:{display:"inline-block",marginInlineStart:e.marginXXS,color:e.colorTextDescription,["".concat(r,"-hide-required-mark &")]:{display:"none"}},["".concat(t,"-tooltip")]:{color:e.colorTextDescription,cursor:"help",writingMode:"horizontal-tb",marginInlineStart:e.marginXXS},"&::after":{content:'":"',position:"relative",marginBlock:0,marginInlineStart:c,marginInlineEnd:u},["&".concat(t,"-no-colon::after")]:{content:'"\\a0"'}}},["".concat(t,"-control")]:{"--ant-display":"flex",flexDirection:"column",flexGrow:1,["&:first-child:not([class^=\"'".concat(o,"-col-'\"]):not([class*=\"' ").concat(o,"-col-'\"])")]:{width:"100%"},"&-input":{position:"relative",display:"flex",alignItems:"center",minHeight:e.controlHeight,"&-content":{flex:"auto",maxWidth:"100%"}}},[t]:{"&-explain, &-extra":{clear:"both",color:e.colorTextDescription,fontSize:e.fontSize,lineHeight:e.lineHeight},"&-explain-connected":{width:"100%"},"&-extra":{minHeight:e.controlHeightSM,transition:"color ".concat(e.motionDurationMid," ").concat(e.motionEaseOut)},"&-explain":{"&-error":{color:e.colorError},"&-warning":{color:e.colorWarning}}},["&-with-help ".concat(t,"-explain")]:{height:"auto",opacity:1},["".concat(t,"-feedback-icon")]:{fontSize:e.fontSize,textAlign:"center",visibility:"visible",animationName:f.kr,animationDuration:e.motionDurationMid,animationTimingFunction:e.motionEaseOutBack,pointerEvents:"none","&-success":{color:e.colorSuccess},"&-error":{color:e.colorError},"&-warning":{color:e.colorWarning},"&-validating":{color:e.colorPrimary}}})}},w=e=>{let{componentCls:t,formItemCls:n}=e;return{["".concat(t,"-horizontal")]:{["".concat(n,"-label")]:{flexGrow:0},["".concat(n,"-control")]:{flex:"1 1 0",minWidth:0},["".concat(n,"-label[class$='-24'], ").concat(n,"-label[class*='-24 ']")]:{["& + ".concat(n,"-control")]:{minWidth:"unset"}}}}},x=e=>{let{componentCls:t,formItemCls:n}=e;return{["".concat(t,"-inline")]:{display:"flex",flexWrap:"wrap",[n]:{flex:"none",marginInlineEnd:e.margin,marginBottom:0,"&-row":{flexWrap:"nowrap"},["> ".concat(n,"-label,\n > ").concat(n,"-control")]:{display:"inline-block",verticalAlign:"top"},["> ".concat(n,"-label")]:{flex:"none"},["".concat(t,"-text")]:{display:"inline-block"},["".concat(n,"-has-feedback")]:{display:"inline-block"}}}}},O=e=>({padding:e.verticalLabelPadding,margin:e.verticalLabelMargin,whiteSpace:"initial",textAlign:"start","> label":{margin:0,"&::after":{visibility:"hidden"}}}),A=e=>{let{componentCls:t,formItemCls:n,rootPrefixCls:r}=e;return{["".concat(n," ").concat(n,"-label")]:O(e),["".concat(t,":not(").concat(t,"-inline)")]:{[n]:{flexWrap:"wrap",["".concat(n,"-label, ").concat(n,"-control")]:{['&:not([class*=" '.concat(r,'-col-xs"])')]:{flex:"0 0 100%",maxWidth:"100%"}}}}}},T=e=>{let{componentCls:t,formItemCls:n,rootPrefixCls:r}=e;return{["".concat(t,"-vertical")]:{[n]:{"&-row":{flexDirection:"column"},"&-label > label":{height:"auto"},["".concat(t,"-item-control")]:{width:"100%"}}},["".concat(t,"-vertical ").concat(n,"-label,\n .").concat(r,"-col-24").concat(n,"-label,\n .").concat(r,"-col-xl-24").concat(n,"-label")]:O(e),["@media (max-width: ".concat((0,d.bf)(e.screenXSMax),")")]:[A(e),{[t]:{[".".concat(r,"-col-xs-24").concat(n,"-label")]:O(e)}}],["@media (max-width: ".concat((0,d.bf)(e.screenSMMax),")")]:{[t]:{[".".concat(r,"-col-sm-24").concat(n,"-label")]:O(e)}},["@media (max-width: ".concat((0,d.bf)(e.screenMDMax),")")]:{[t]:{[".".concat(r,"-col-md-24").concat(n,"-label")]:O(e)}},["@media (max-width: ".concat((0,d.bf)(e.screenLGMax),")")]:{[t]:{[".".concat(r,"-col-lg-24").concat(n,"-label")]:O(e)}}}},C=(e,t)=>(0,g.TS)(e,{formItemCls:"".concat(e.componentCls,"-item"),rootPrefixCls:t});var k=(0,h.I$)("Form",(e,t)=>{let{rootPrefixCls:n}=t,r=C(e,n);return[E(r),S(r),b(r),w(r),x(r),T(r),(0,m.Z)(r),f.kr]},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 ".concat(e.paddingXS,"px"),verticalLabelMargin:0}),{order:-1e3}),I=n(92935);let N=[];function _(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;return{key:"string"==typeof e?e:"".concat(t,"-").concat(r),error:e,errorStatus:n}}var R=e=>{let{help:t,helpStatus:n,errors:o=N,warnings:d=N,className:p,fieldId:f,onVisibleChanged:m}=e,{prefixCls:g}=s.useContext(c.Rk),h="".concat(g,"-item-explain"),b=(0,I.Z)(g),[y,v,E]=k(g,b),S=(0,s.useMemo)(()=>(0,l.Z)(g),[g]),w=u(o),x=u(d),O=s.useMemo(()=>null!=t?[_(t,"help",n)]:[].concat((0,r.Z)(w.map((e,t)=>_(e,"error","error",t))),(0,r.Z)(x.map((e,t)=>_(e,"warning","warning",t)))),[t,n,w,x]),A={};return f&&(A.id="".concat(f,"_help")),y(s.createElement(i.ZP,{motionDeadline:S.motionDeadline,motionName:"".concat(g,"-show-help"),visible:!!O.length,onVisibleChanged:m},e=>{let{className:t,style:n}=e;return s.createElement("div",Object.assign({},A,{className:a()(h,t,E,b,p,v),style:n,role:"alert"}),s.createElement(i.V4,Object.assign({keys:O},(0,l.Z)(g),{motionName:"".concat(g,"-show-help-item"),component:!1}),e=>{let{key:t,error:n,errorStatus:r,className:o,style:i}=e;return s.createElement("div",{key:t,className:a()(o,{["".concat(h,"-").concat(r)]:r}),style:i},n)}))}))},P=n(76570),M=n(57499),L=n(17094),D=n(10693),j=n(97303);let F=e=>"object"==typeof e&&null!=e&&1===e.nodeType,B=(e,t)=>(!t||"hidden"!==e)&&"visible"!==e&&"clip"!==e,U=(e,t)=>{if(e.clientHeight{let t=(e=>{if(!e.ownerDocument||!e.ownerDocument.defaultView)return null;try{return e.ownerDocument.defaultView.frameElement}catch(e){return null}})(e);return!!t&&(t.clientHeightat||a>e&&i=t&&s>=n?a-e-r:i>t&&sn?i-t+o:0,z=e=>{let t=e.parentElement;return null==t?e.getRootNode().host||null:t},H=(e,t)=>{var n,r,o,a;if("undefined"==typeof document)return[];let{scrollMode:i,block:s,inline:l,boundary:c,skipOverflowHiddenElements:u}=t,d="function"==typeof c?c:e=>e!==c;if(!F(e))throw TypeError("Invalid target");let p=document.scrollingElement||document.documentElement,f=[],m=e;for(;F(m)&&d(m);){if((m=z(m))===p){f.push(m);break}null!=m&&m===document.body&&U(m)&&!U(document.documentElement)||null!=m&&U(m,u)&&f.push(m)}let g=null!=(r=null==(n=window.visualViewport)?void 0:n.width)?r:innerWidth,h=null!=(a=null==(o=window.visualViewport)?void 0:o.height)?a:innerHeight,{scrollX:b,scrollY:y}=window,{height:v,width:E,top:S,right:w,bottom:x,left:O}=e.getBoundingClientRect(),{top:A,right:T,bottom:C,left:k}=(e=>{let t=window.getComputedStyle(e);return{top:parseFloat(t.scrollMarginTop)||0,right:parseFloat(t.scrollMarginRight)||0,bottom:parseFloat(t.scrollMarginBottom)||0,left:parseFloat(t.scrollMarginLeft)||0}})(e),I="start"===s||"nearest"===s?S-A:"end"===s?x+C:S+v/2-A+C,N="center"===l?O+E/2-k+T:"end"===l?w+T:O-k,_=[];for(let e=0;e=0&&O>=0&&x<=h&&w<=g&&S>=o&&x<=c&&O>=u&&w<=a)break;let d=getComputedStyle(t),m=parseInt(d.borderLeftWidth,10),A=parseInt(d.borderTopWidth,10),T=parseInt(d.borderRightWidth,10),C=parseInt(d.borderBottomWidth,10),k=0,R=0,P="offsetWidth"in t?t.offsetWidth-t.clientWidth-m-T:0,M="offsetHeight"in t?t.offsetHeight-t.clientHeight-A-C:0,L="offsetWidth"in t?0===t.offsetWidth?0:r/t.offsetWidth:0,D="offsetHeight"in t?0===t.offsetHeight?0:n/t.offsetHeight:0;if(p===t)k="start"===s?I:"end"===s?I-h:"nearest"===s?Z(y,y+h,h,A,C,y+I,y+I+v,v):I-h/2,R="start"===l?N:"center"===l?N-g/2:"end"===l?N-g:Z(b,b+g,g,m,T,b+N,b+N+E,E),k=Math.max(0,k+y),R=Math.max(0,R+b);else{k="start"===s?I-o-A:"end"===s?I-c+C+M:"nearest"===s?Z(o,c,n,A,C+M,I,I+v,v):I-(o+n/2)+M/2,R="start"===l?N-u-m:"center"===l?N-(u+r/2)+P/2:"end"===l?N-a+T+P:Z(u,a,r,m,T+P,N,N+E,E);let{scrollLeft:e,scrollTop:i}=t;k=0===D?0:Math.max(0,Math.min(i+k/D,t.scrollHeight-n/D+M)),R=0===L?0:Math.max(0,Math.min(e+R/L,t.scrollWidth-r/L+P)),I+=i-k,N+=e-R}_.push({el:t,top:k,left:R})}return _},G=e=>!1===e?{block:"end",inline:"nearest"}:e===Object(e)&&0!==Object.keys(e).length?e:{block:"start",inline:"nearest"},$=["parentNode"];function W(e){return void 0===e||!1===e?[]:Array.isArray(e)?e:[e]}function V(e,t){if(!e.length)return;let n=e.join("_");return t?"".concat(t,"_").concat(n):$.includes(n)?"".concat("form_item","_").concat(n):n}function q(e,t,n,r,o,a){let i=r;return void 0!==a?i=a:n.validating?i="validating":e.length?i="error":t.length?i="warning":(n.touched||o&&n.validated)&&(i="success"),i}function Y(e){return W(e).join("_")}function K(e){let[t]=(0,P.cI)(),n=s.useRef({}),r=s.useMemo(()=>null!=e?e:Object.assign(Object.assign({},t),{__INTERNAL__:{itemRef:e=>t=>{let r=Y(e);t?n.current[r]=t:delete n.current[r]}},scrollToField:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=V(W(e),r.__INTERNAL__.name),o=n?document.getElementById(n):null;o&&function(e,t){if(!e.isConnected||!(e=>{let t=e;for(;t&&t.parentNode;){if(t.parentNode===document)return!0;t=t.parentNode instanceof ShadowRoot?t.parentNode.host:t.parentNode}return!1})(e))return;let n=(e=>{let t=window.getComputedStyle(e);return{top:parseFloat(t.scrollMarginTop)||0,right:parseFloat(t.scrollMarginRight)||0,bottom:parseFloat(t.scrollMarginBottom)||0,left:parseFloat(t.scrollMarginLeft)||0}})(e);if("object"==typeof t&&"function"==typeof t.behavior)return t.behavior(H(e,t));let r="boolean"==typeof t||null==t?void 0:t.behavior;for(let{el:o,top:a,left:i}of H(e,G(t))){let e=a-n.top+n.bottom,t=i-n.left+n.right;o.scroll({top:e,left:t,behavior:r})}}(o,Object.assign({scrollMode:"if-needed",block:"nearest"},t))},getFieldInstance:e=>{let t=Y(e);return n.current[t]}}),[e,t]);return[r]}var X=n(12519),Q=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);ot.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};let J=s.forwardRef((e,t)=>{let n=s.useContext(L.Z),{getPrefixCls:r,direction:o,form:i}=s.useContext(M.E_),{prefixCls:l,className:u,rootClassName:d,size:p,disabled:f=n,form:m,colon:g,labelAlign:h,labelWrap:b,labelCol:y,wrapperCol:v,hideRequiredMark:E,layout:S="horizontal",scrollToFirstError:w,requiredMark:x,onFinishFailed:O,name:A,style:T,feedbackIcons:C,variant:N}=e,_=Q(e,["prefixCls","className","rootClassName","size","disabled","form","colon","labelAlign","labelWrap","labelCol","wrapperCol","hideRequiredMark","layout","scrollToFirstError","requiredMark","onFinishFailed","name","style","feedbackIcons","variant"]),R=(0,D.Z)(p),F=s.useContext(X.Z),B=(0,s.useMemo)(()=>void 0!==x?x:!E&&(!i||void 0===i.requiredMark||i.requiredMark),[E,x,i]),U=null!=g?g:null==i?void 0:i.colon,Z=r("form",l),z=(0,I.Z)(Z),[H,G,$]=k(Z,z),W=a()(Z,"".concat(Z,"-").concat(S),{["".concat(Z,"-hide-required-mark")]:!1===B,["".concat(Z,"-rtl")]:"rtl"===o,["".concat(Z,"-").concat(R)]:R},$,z,G,null==i?void 0:i.className,u,d),[V]=K(m),{__INTERNAL__:q}=V;q.name=A;let Y=(0,s.useMemo)(()=>({name:A,labelAlign:h,labelCol:y,labelWrap:b,wrapperCol:v,vertical:"vertical"===S,colon:U,requiredMark:B,itemRef:q.itemRef,form:V,feedbackIcons:C}),[A,h,y,v,S,U,B,V,C]);s.useImperativeHandle(t,()=>V);let J=(e,t)=>{if(e){let n={block:"nearest"};"object"==typeof e&&(n=e),V.scrollToField(t,n)}};return H(s.createElement(c.pg.Provider,{value:N},s.createElement(L.n,{disabled:f},s.createElement(j.Z.Provider,{value:R},s.createElement(c.RV,{validateMessages:F},s.createElement(c.q3.Provider,{value:Y},s.createElement(P.ZP,Object.assign({id:A},_,{name:A,onFinishFailed:e=>{if(null==O||O(e),e.errorFields.length){let t=e.errorFields[0].name;if(void 0!==w){J(w,t);return}i&&void 0!==i.scrollToFirstError&&J(i.scrollToFirstError,t)}},form:V,style:Object.assign(Object.assign({},null==i?void 0:i.style),T),className:W}))))))))});var ee=n(89211),et=n(74084),en=n(65823),er=n(76564),eo=n(33054);let ea=()=>{let{status:e,errors:t=[],warnings:n=[]}=(0,s.useContext)(c.aM);return{status:e,errors:t,warnings:n}};ea.Context=c.aM;var ei=n(19223),es=n(73193),el=n(24800),ec=n(35704),eu=n(24750);let ed=["xxl","xl","lg","md","sm","xs"],ep=e=>({xs:"(max-width: ".concat(e.screenXSMax,"px)"),sm:"(min-width: ".concat(e.screenSM,"px)"),md:"(min-width: ".concat(e.screenMD,"px)"),lg:"(min-width: ".concat(e.screenLG,"px)"),xl:"(min-width: ".concat(e.screenXL,"px)"),xxl:"(min-width: ".concat(e.screenXXL,"px)")}),ef=e=>{let t=[].concat(ed).reverse();return t.forEach((n,r)=>{let o=n.toUpperCase(),a="screen".concat(o,"Min"),i="screen".concat(o);if(!(e[a]<=e[i]))throw Error("".concat(a,"<=").concat(i," fails : !(").concat(e[a],"<=").concat(e[i],")"));if(r{let{componentCls:t}=e;return{[t]:{position:"relative",maxWidth:"100%",minHeight:1}}},eh=(e,t)=>{let{componentCls:n,gridColumns:r}=e,o={};for(let e=r;e>=0;e--)0===e?(o["".concat(n).concat(t,"-").concat(e)]={display:"none"},o["".concat(n,"-push-").concat(e)]={insetInlineStart:"auto"},o["".concat(n,"-pull-").concat(e)]={insetInlineEnd:"auto"},o["".concat(n).concat(t,"-push-").concat(e)]={insetInlineStart:"auto"},o["".concat(n).concat(t,"-pull-").concat(e)]={insetInlineEnd:"auto"},o["".concat(n).concat(t,"-offset-").concat(e)]={marginInlineStart:0},o["".concat(n).concat(t,"-order-").concat(e)]={order:0}):(o["".concat(n).concat(t,"-").concat(e)]=[{"--ant-display":"block",display:"block"},{display:"var(--ant-display)",flex:"0 0 ".concat(e/r*100,"%"),maxWidth:"".concat(e/r*100,"%")}],o["".concat(n).concat(t,"-push-").concat(e)]={insetInlineStart:"".concat(e/r*100,"%")},o["".concat(n).concat(t,"-pull-").concat(e)]={insetInlineEnd:"".concat(e/r*100,"%")},o["".concat(n).concat(t,"-offset-").concat(e)]={marginInlineStart:"".concat(e/r*100,"%")},o["".concat(n).concat(t,"-order-").concat(e)]={order:e});return o},eb=(e,t)=>eh(e,t),ey=(e,t,n)=>({["@media (min-width: ".concat((0,d.bf)(t),")")]:Object.assign({},eb(e,n))}),ev=(0,h.I$)("Grid",e=>{let{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"}}}},()=>({})),eE=(0,h.I$)("Grid",e=>{let t=(0,g.TS)(e,{gridColumns:24}),n={"-sm":t.screenSMMin,"-md":t.screenMDMin,"-lg":t.screenLGMin,"-xl":t.screenXLMin,"-xxl":t.screenXXLMin};return[eg(t),eb(t,""),eb(t,"-xs"),Object.keys(n).map(e=>ey(t,n[e],e)).reduce((e,t)=>Object.assign(Object.assign({},e),t),{})]},()=>({}));var eS=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);ot.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};function ew(e,t){let[n,r]=s.useState("string"==typeof e?e:""),o=()=>{if("string"==typeof e&&r(e),"object"==typeof e)for(let n=0;n{o()},[JSON.stringify(e),t]),n}let ex=s.forwardRef((e,t)=>{let{prefixCls:n,justify:r,align:o,className:i,style:l,children:c,gutter:u=0,wrap:d}=e,p=eS(e,["prefixCls","justify","align","className","style","children","gutter","wrap"]),{getPrefixCls:f,direction:m}=s.useContext(M.E_),[g,h]=s.useState({xs:!0,sm:!0,md:!0,lg:!0,xl:!0,xxl:!0}),[b,y]=s.useState({xs:!1,sm:!1,md:!1,lg:!1,xl:!1,xxl:!1}),v=ew(o,b),E=ew(r,b),S=s.useRef(u),w=function(){let[,e]=(0,eu.ZP)(),t=ep(ef(e));return s.useMemo(()=>{let e=new Map,n=-1,r={};return{matchHandlers:{},dispatch:t=>(r=t,e.forEach(e=>e(r)),e.size>=1),subscribe(t){return e.size||this.register(),n+=1,e.set(n,t),t(r),n},unsubscribe(t){e.delete(t),e.size||this.unregister()},unregister(){Object.keys(t).forEach(e=>{let n=t[e],r=this.matchHandlers[n];null==r||r.mql.removeListener(null==r?void 0:r.listener)}),e.clear()},register(){Object.keys(t).forEach(e=>{let n=t[e],o=t=>{let{matches:n}=t;this.dispatch(Object.assign(Object.assign({},r),{[e]:n}))},a=window.matchMedia(n);a.addListener(o),this.matchHandlers[n]={mql:a,listener:o},o(a)})},responsiveMap:t}},[e])}();s.useEffect(()=>{let e=w.subscribe(e=>{y(e);let t=S.current||0;(!Array.isArray(t)&&"object"==typeof t||Array.isArray(t)&&("object"==typeof t[0]||"object"==typeof t[1]))&&h(e)});return()=>w.unsubscribe(e)},[]);let x=f("row",n),[O,A,T]=ev(x),C=(()=>{let e=[void 0,void 0];return(Array.isArray(u)?u:[u,void 0]).forEach((t,n)=>{if("object"==typeof t)for(let r=0;r0?-(C[0]/2):void 0;N&&(I.marginLeft=N,I.marginRight=N),[,I.rowGap]=C;let[_,R]=C,P=s.useMemo(()=>({gutter:[_,R],wrap:d}),[_,R,d]);return O(s.createElement(em.Provider,{value:P},s.createElement("div",Object.assign({},p,{className:k,style:Object.assign(Object.assign({},I),l),ref:t}),c)))});var eO=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);ot.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};let eA=["xs","sm","md","lg","xl","xxl"],eT=s.forwardRef((e,t)=>{let{getPrefixCls:n,direction:r}=s.useContext(M.E_),{gutter:o,wrap:i}=s.useContext(em),{prefixCls:l,span:c,order:u,offset:d,push:p,pull:f,className:m,children:g,flex:h,style:b}=e,y=eO(e,["prefixCls","span","order","offset","push","pull","className","children","flex","style"]),v=n("col",l),[E,S,w]=eE(v),x={};eA.forEach(t=>{let n={},o=e[t];"number"==typeof o?n.span=o:"object"==typeof o&&(n=o||{}),delete y[t],x=Object.assign(Object.assign({},x),{["".concat(v,"-").concat(t,"-").concat(n.span)]:void 0!==n.span,["".concat(v,"-").concat(t,"-order-").concat(n.order)]:n.order||0===n.order,["".concat(v,"-").concat(t,"-offset-").concat(n.offset)]:n.offset||0===n.offset,["".concat(v,"-").concat(t,"-push-").concat(n.push)]:n.push||0===n.push,["".concat(v,"-").concat(t,"-pull-").concat(n.pull)]:n.pull||0===n.pull,["".concat(v,"-").concat(t,"-flex-").concat(n.flex)]:n.flex||"auto"===n.flex,["".concat(v,"-rtl")]:"rtl"===r})});let O=a()(v,{["".concat(v,"-").concat(c)]:void 0!==c,["".concat(v,"-order-").concat(u)]:u,["".concat(v,"-offset-").concat(d)]:d,["".concat(v,"-push-").concat(p)]:p,["".concat(v,"-pull-").concat(f)]:f},m,x,S,w),A={};if(o&&o[0]>0){let e=o[0]/2;A.paddingLeft=e,A.paddingRight=e}return h&&(A.flex="number"==typeof h?"".concat(h," ").concat(h," auto"):/^\d+(\.\d+)?(px|em|rem|%)$/.test(h)?"0 0 ".concat(h):h,!1!==i||A.minWidth||(A.minWidth=0)),E(s.createElement("div",Object.assign({},y,{style:Object.assign(Object.assign({},A),b),className:O,ref:t}),g))}),eC=e=>{let{formItemCls:t}=e;return{"@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none)":{["".concat(t,"-control")]:{display:"flex"}}}};var ek=(0,h.bk)(["Form","item-item"],(e,t)=>{let{rootPrefixCls:n}=t;return[eC(C(e,n))]}),eI=e=>{let{prefixCls:t,status:n,wrapperCol:r,children:o,errors:i,warnings:l,_internalItemRender:u,extra:d,help:p,fieldId:f,marginBottom:m,onErrorVisibleChanged:g}=e,h="".concat(t,"-item"),b=s.useContext(c.q3),y=r||b.wrapperCol||{},v=a()("".concat(h,"-control"),y.className),E=s.useMemo(()=>Object.assign({},b),[b]);delete E.labelCol,delete E.wrapperCol;let S=s.createElement("div",{className:"".concat(h,"-control-input")},s.createElement("div",{className:"".concat(h,"-control-input-content")},o)),w=s.useMemo(()=>({prefixCls:t,status:n}),[t,n]),x=null!==m||i.length||l.length?s.createElement("div",{style:{display:"flex",flexWrap:"nowrap"}},s.createElement(c.Rk.Provider,{value:w},s.createElement(R,{fieldId:f,errors:i,warnings:l,help:p,helpStatus:n,className:"".concat(h,"-explain-connected"),onVisibleChanged:g})),!!m&&s.createElement("div",{style:{width:0,height:m}})):null,O={};f&&(O.id="".concat(f,"_extra"));let A=d?s.createElement("div",Object.assign({},O,{className:"".concat(h,"-extra")}),d):null,T=u&&"pro_table_render"===u.mark&&u.render?u.render(e,{input:S,errorList:x,extra:A}):s.createElement(s.Fragment,null,S,x,A);return s.createElement(c.q3.Provider,{value:E},s.createElement(eT,Object.assign({},y,{className:v}),T),s.createElement(ek,{prefixCls:t}))},eN=n(14749),e_={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"},eR=n(60688),eP=s.forwardRef(function(e,t){return s.createElement(eR.Z,(0,eN.Z)({},e,{ref:t,icon:e_}))}),eM=n(79474),eL=n(70595),eD=n(47104),ej=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);ot.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n},eF=e=>{var t;let{prefixCls:n,label:r,htmlFor:o,labelCol:i,labelAlign:l,colon:u,required:d,requiredMark:p,tooltip:f}=e,[m]=(0,eL.Z)("Form"),{vertical:g,labelAlign:h,labelCol:b,labelWrap:y,colon:v}=s.useContext(c.q3);if(!r)return null;let E=i||b||{},S="".concat(n,"-item-label"),w=a()(S,"left"===(l||h)&&"".concat(S,"-left"),E.className,{["".concat(S,"-wrap")]:!!y}),x=r,O=!0===u||!1!==v&&!1!==u;O&&!g&&"string"==typeof r&&""!==r.trim()&&(x=r.replace(/[:|:]\s*$/,""));let A=f?"object"!=typeof f||s.isValidElement(f)?{title:f}:f:null;if(A){let{icon:e=s.createElement(eP,null)}=A,t=ej(A,["icon"]),r=s.createElement(eD.Z,Object.assign({},t),s.cloneElement(e,{className:"".concat(n,"-item-tooltip"),title:"",onClick:e=>{e.preventDefault()},tabIndex:null}));x=s.createElement(s.Fragment,null,x,r)}let T="optional"===p,C="function"==typeof p;C?x=p(x,{required:!!d}):T&&!d&&(x=s.createElement(s.Fragment,null,x,s.createElement("span",{className:"".concat(n,"-item-optional"),title:""},(null==m?void 0:m.optional)||(null===(t=eM.Z.Form)||void 0===t?void 0:t.optional))));let k=a()({["".concat(n,"-item-required")]:d,["".concat(n,"-item-required-mark-optional")]:T||C,["".concat(n,"-item-no-colon")]:!O});return s.createElement(eT,Object.assign({},E,{className:w}),s.createElement("label",{htmlFor:o,className:k,title:"string"==typeof r?r:""},x))},eB=n(99537),eU=n(77136),eZ=n(20653),ez=n(66155);let eH={success:eB.Z,warning:eZ.Z,error:eU.Z,validating:ez.Z};function eG(e){let{children:t,errors:n,warnings:r,hasFeedback:o,validateStatus:i,prefixCls:l,meta:u,noStyle:d}=e,p="".concat(l,"-item"),{feedbackIcons:f}=s.useContext(c.q3),m=q(n,r,u,null,!!o,i),{isFormItemInput:g,status:h,hasFeedback:b,feedbackIcon:y}=s.useContext(c.aM),v=s.useMemo(()=>{var e;let t;if(o){let i=!0!==o&&o.icons||f,l=m&&(null===(e=null==i?void 0:i({status:m,errors:n,warnings:r}))||void 0===e?void 0:e[m]),c=m&&eH[m];t=!1!==l&&c?s.createElement("span",{className:a()("".concat(p,"-feedback-icon"),"".concat(p,"-feedback-icon-").concat(m))},l||s.createElement(c,null)):null}let i={status:m||"",errors:n,warnings:r,hasFeedback:!!o,feedbackIcon:t,isFormItemInput:!0};return d&&(i.status=(null!=m?m:h)||"",i.isFormItemInput=g,i.hasFeedback=!!(null!=o?o:b),i.feedbackIcon=void 0!==o?i.feedbackIcon:y),i},[m,o,d,g,h]);return s.createElement(c.aM.Provider,{value:v},t)}var e$=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);ot.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};function eW(e){let{prefixCls:t,className:n,rootClassName:r,style:o,help:i,errors:l,warnings:d,validateStatus:p,meta:f,hasFeedback:m,hidden:g,children:h,fieldId:b,required:y,isRequired:v,onSubItemMetaChange:E}=e,S=e$(e,["prefixCls","className","rootClassName","style","help","errors","warnings","validateStatus","meta","hasFeedback","hidden","children","fieldId","required","isRequired","onSubItemMetaChange"]),w="".concat(t,"-item"),{requiredMark:x}=s.useContext(c.q3),O=s.useRef(null),A=u(l),T=u(d),C=null!=i,k=!!(C||l.length||d.length),I=!!O.current&&(0,es.Z)(O.current),[N,_]=s.useState(null);(0,el.Z)(()=>{k&&O.current&&_(parseInt(getComputedStyle(O.current).marginBottom,10))},[k,I]);let R=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return q(e?A:f.errors,e?T:f.warnings,f,"",!!m,p)}(),P=a()(w,n,r,{["".concat(w,"-with-help")]:C||A.length||T.length,["".concat(w,"-has-feedback")]:R&&m,["".concat(w,"-has-success")]:"success"===R,["".concat(w,"-has-warning")]:"warning"===R,["".concat(w,"-has-error")]:"error"===R,["".concat(w,"-is-validating")]:"validating"===R,["".concat(w,"-hidden")]:g});return s.createElement("div",{className:P,style:o,ref:O},s.createElement(ex,Object.assign({className:"".concat(w,"-row")},(0,ec.Z)(S,["_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(eF,Object.assign({htmlFor:b},e,{requiredMark:x,required:null!=y?y:v,prefixCls:t})),s.createElement(eI,Object.assign({},e,f,{errors:A,warnings:T,prefixCls:t,status:R,help:i,marginBottom:N,onErrorVisibleChanged:e=>{e||_(null)}}),s.createElement(c.qI.Provider,{value:E},s.createElement(eG,{prefixCls:t,meta:f,errors:f.errors,warnings:f.warnings,hasFeedback:m,validateStatus:R},h)))),!!N&&s.createElement("div",{className:"".concat(w,"-margin-offset"),style:{marginBottom:-N}}))}let eV=s.memo(e=>{let{children:t}=e;return t},(e,t)=>(function(e,t){let n=Object.keys(e),r=Object.keys(t);return n.length===r.length&&n.every(n=>{let r=e[n],o=t[n];return r===o||"function"==typeof r||"function"==typeof o})})(e.control,t.control)&&e.update===t.update&&e.childProps.length===t.childProps.length&&e.childProps.every((e,n)=>e===t.childProps[n]));function eq(){return{errors:[],warnings:[],touched:!1,validating:!1,name:[],validated:!1}}let eY=function(e){let{name:t,noStyle:n,className:o,dependencies:i,prefixCls:l,shouldUpdate:u,rules:d,children:p,required:f,label:m,messageVariables:g,trigger:h="onChange",validateTrigger:b,hidden:y,help:v}=e,{getPrefixCls:E}=s.useContext(M.E_),{name:S}=s.useContext(c.q3),w=function(e){if("function"==typeof e)return e;let t=(0,eo.Z)(e);return t.length<=1?t[0]:t}(p),x="function"==typeof w,O=s.useContext(c.qI),{validateTrigger:A}=s.useContext(P.zb),T=void 0!==b?b:A,C=null!=t,N=E("form",l),_=(0,I.Z)(N),[R,L,D]=k(N,_);(0,er.ln)("Form.Item");let j=s.useContext(P.ZM),F=s.useRef(),[B,U]=function(e){let[t,n]=s.useState(e),r=(0,s.useRef)(null),o=(0,s.useRef)([]),a=(0,s.useRef)(!1);return s.useEffect(()=>(a.current=!1,()=>{a.current=!0,ei.Z.cancel(r.current),r.current=null}),[]),[t,function(e){a.current||(null===r.current&&(o.current=[],r.current=(0,ei.Z)(()=>{r.current=null,n(e=>{let t=e;return o.current.forEach(e=>{t=e(t)}),t})})),o.current.push(e))}]}({}),[Z,z]=(0,ee.Z)(()=>eq()),H=(e,t)=>{U(n=>{let o=Object.assign({},n),a=[].concat((0,r.Z)(e.name.slice(0,-1)),(0,r.Z)(t)).join("__SPLIT__");return e.destroy?delete o[a]:o[a]=e,o})},[G,$]=s.useMemo(()=>{let e=(0,r.Z)(Z.errors),t=(0,r.Z)(Z.warnings);return Object.values(B).forEach(n=>{e.push.apply(e,(0,r.Z)(n.errors||[])),t.push.apply(t,(0,r.Z)(n.warnings||[]))}),[e,t]},[B,Z.errors,Z.warnings]),q=function(){let{itemRef:e}=s.useContext(c.q3),t=s.useRef({});return function(n,r){let o=r&&"object"==typeof r&&r.ref,a=n.join("_");return(t.current.name!==a||t.current.originRef!==o)&&(t.current.name=a,t.current.originRef=o,t.current.ref=(0,et.sQ)(e(n),o)),t.current.ref}}();function Y(t,r,i){return n&&!y?s.createElement(eG,{prefixCls:N,hasFeedback:e.hasFeedback,validateStatus:e.validateStatus,meta:Z,errors:G,warnings:$,noStyle:!0},t):s.createElement(eW,Object.assign({key:"row"},e,{className:a()(o,D,_,L),prefixCls:N,fieldId:r,isRequired:i,errors:G,warnings:$,meta:Z,onSubItemMetaChange:H}),t)}if(!C&&!x&&!i)return R(Y(w));let K={};return"string"==typeof m?K.label=m:t&&(K.label=String(t)),g&&(K=Object.assign(Object.assign({},K),g)),R(s.createElement(P.gN,Object.assign({},e,{messageVariables:K,trigger:h,validateTrigger:T,onMetaChange:e=>{let t=null==j?void 0:j.getKey(e.name);if(z(e.destroy?eq():e,!0),n&&!1!==v&&O){let n=e.name;if(e.destroy)n=F.current||n;else if(void 0!==t){let[e,o]=t;n=[e].concat((0,r.Z)(o)),F.current=n}O(e,n)}}}),(n,o,a)=>{let l=W(t).length&&o?o.name:[],c=V(l,S),p=void 0!==f?f:!!(d&&d.some(e=>{if(e&&"object"==typeof e&&e.required&&!e.warningOnly)return!0;if("function"==typeof e){let t=e(a);return t&&t.required&&!t.warningOnly}return!1})),m=Object.assign({},n),g=null;if(Array.isArray(w)&&C)g=w;else if(x&&(!(u||i)||C));else if(!i||x||C){if((0,en.l$)(w)){let t=Object.assign(Object.assign({},w.props),m);if(t.id||(t.id=c),v||G.length>0||$.length>0||e.extra){let n=[];(v||G.length>0)&&n.push("".concat(c,"_help")),e.extra&&n.push("".concat(c,"_extra")),t["aria-describedby"]=n.join(" ")}G.length>0&&(t["aria-invalid"]="true"),p&&(t["aria-required"]="true"),(0,et.Yr)(w)&&(t.ref=q(l,w)),new Set([].concat((0,r.Z)(W(h)),(0,r.Z)(W(T)))).forEach(e=>{t[e]=function(){for(var t,n,r,o=arguments.length,a=Array(o),i=0;it.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);ot.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};J.Item=eY,J.List=e=>{var{prefixCls:t,children:n}=e,r=eK(e,["prefixCls","children"]);let{getPrefixCls:o}=s.useContext(M.E_),a=o("form",t),i=s.useMemo(()=>({prefixCls:a,status:"error"}),[a]);return s.createElement(P.aV,Object.assign({},r),(e,t,r)=>s.createElement(c.Rk.Provider,{value:i},n(e.map(e=>Object.assign(Object.assign({},e),{fieldKey:e.key})),t,{errors:r.errors,warnings:r.warnings})))},J.ErrorList=R,J.useForm=K,J.useFormInstance=function(){let{form:e}=(0,s.useContext)(c.q3);return e},J.useWatch=P.qo,J.Provider=c.RV,J.create=()=>{};var eX=J},12519:function(e,t,n){var r=n(64090);t.Z=(0,r.createContext)(void 0)},88707:function(e,t,n){n.d(t,{Z:function(){return em}});var r=n(64090),o=n(20383),a=n(14749),i={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"},s=n(60688),l=r.forwardRef(function(e,t){return r.createElement(s.Z,(0,a.Z)({},e,{ref:t,icon:i}))}),c=n(16480),u=n.n(c),d=n(50833),p=n(6976),f=n(80406),m=n(6787),g=n(47365),h=n(65127);function b(){return"function"==typeof BigInt}function y(e){return!e&&0!==e&&!Number.isNaN(e)||!String(e).trim()}function v(e){var t=e.trim(),n=t.startsWith("-");n&&(t=t.slice(1)),(t=t.replace(/(\.\d*[^0])0*$/,"$1").replace(/\.0*$/,"").replace(/^0+/,"")).startsWith(".")&&(t="0".concat(t));var r=t||"0",o=r.split("."),a=o[0]||"0",i=o[1]||"0";"0"===a&&"0"===i&&(n=!1);var s=n?"-":"";return{negative:n,negativeStr:s,trimStr:r,integerStr:a,decimalStr:i,fullStr:"".concat(s).concat(r)}}function E(e){var t=String(e);return!Number.isNaN(Number(t))&&t.includes("e")}function S(e){var t=String(e);if(E(e)){var n=Number(t.slice(t.indexOf("e-")+2)),r=t.match(/\.(\d+)/);return null!=r&&r[1]&&(n+=r[1].length),n}return t.includes(".")&&x(t)?t.length-t.indexOf(".")-1:0}function w(e){var t=String(e);if(E(e)){if(e>Number.MAX_SAFE_INTEGER)return String(b()?BigInt(e).toString():Number.MAX_SAFE_INTEGER);if(e=this.add(e.negate().toString()).toNumber()}},{key:"toNumber",value:function(){return this.isNaN()?NaN:Number(this.toString())}},{key:"toString",value:function(){var e=!(arguments.length>0)||void 0===arguments[0]||arguments[0];return e?this.isInvalidate()?"":v("".concat(this.getMark()).concat(this.getIntegerStr(),".").concat(this.getDecimalStr())).fullStr:this.origin}}]),e}(),A=function(){function e(t){if((0,g.Z)(this,e),(0,d.Z)(this,"origin",""),(0,d.Z)(this,"number",void 0),(0,d.Z)(this,"empty",void 0),y(t)){this.empty=!0;return}this.origin=String(t),this.number=Number(t)}return(0,h.Z)(e,[{key:"negate",value:function(){return new e(-this.toNumber())}},{key:"add",value:function(t){if(this.isInvalidate())return new e(t);var n=Number(t);if(Number.isNaN(n))return this;var r=this.number+n;if(r>Number.MAX_SAFE_INTEGER)return new e(Number.MAX_SAFE_INTEGER);if(rNumber.MAX_SAFE_INTEGER)return new e(Number.MAX_SAFE_INTEGER);if(r=this.add(e.negate().toString()).toNumber()}},{key:"toNumber",value:function(){return this.number}},{key:"toString",value:function(){var e=!(arguments.length>0)||void 0===arguments[0]||arguments[0];return e?this.isInvalidate()?"":w(this.number):this.origin}}]),e}();function T(e){return b()?new O(e):new A(e)}function C(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(""===e)return"";var o=v(e),a=o.negativeStr,i=o.integerStr,s=o.decimalStr,l="".concat(t).concat(s),c="".concat(a).concat(i);if(n>=0){var u=Number(s[n]);return u>=5&&!r?C(T(e).add("".concat(a,"0.").concat("0".repeat(n)).concat(10-u)).toString(),t,n,r):0===n?c:"".concat(c).concat(t).concat(s.padEnd(n,"0").slice(0,n))}return".0"===l?c:"".concat(c).concat(l)}var k=n(90089),I=n(24800),N=n(74084),_=n(53850),R=n(76158),P=function(){var e=(0,r.useState)(!1),t=(0,f.Z)(e,2),n=t[0],o=t[1];return(0,I.Z)(function(){o((0,R.Z)())},[]),n},M=n(19223);function L(e){var t=e.prefixCls,n=e.upNode,o=e.downNode,i=e.upDisabled,s=e.downDisabled,l=e.onStep,c=r.useRef(),p=r.useRef([]),f=r.useRef();f.current=l;var m=function(){clearTimeout(c.current)},g=function(e,t){e.preventDefault(),m(),f.current(t),c.current=setTimeout(function e(){f.current(t),c.current=setTimeout(e,200)},600)};if(r.useEffect(function(){return function(){m(),p.current.forEach(function(e){return M.Z.cancel(e)})}},[]),P())return null;var h="".concat(t,"-handler"),b=u()(h,"".concat(h,"-up"),(0,d.Z)({},"".concat(h,"-up-disabled"),i)),y=u()(h,"".concat(h,"-down"),(0,d.Z)({},"".concat(h,"-down-disabled"),s)),v=function(){return p.current.push((0,M.Z)(m))},E={unselectable:"on",role:"button",onMouseUp:v,onMouseLeave:v};return r.createElement("div",{className:"".concat(h,"-wrap")},r.createElement("span",(0,a.Z)({},E,{onMouseDown:function(e){g(e,!0)},"aria-label":"Increase Value","aria-disabled":i,className:b}),n||r.createElement("span",{unselectable:"on",className:"".concat(t,"-handler-up-inner")})),r.createElement("span",(0,a.Z)({},E,{onMouseDown:function(e){g(e,!1)},"aria-label":"Decrease Value","aria-disabled":s,className:y}),o||r.createElement("span",{unselectable:"on",className:"".concat(t,"-handler-down-inner")})))}function D(e){var t="number"==typeof e?w(e):v(e).fullStr;return t.includes(".")?v(t.replace(/(\d)\.(\d)/g,"$1$2.")).fullStr:e+"0"}var j=n(8002),F=["prefixCls","className","style","min","max","step","defaultValue","value","disabled","readOnly","upHandler","downHandler","keyboard","wheel","controls","classNames","stringMode","parser","formatter","precision","decimalSeparator","onChange","onInput","onPressEnter","onStep","changeOnBlur"],B=["disabled","style","prefixCls","value","prefix","suffix","addonBefore","addonAfter","className","classNames"],U=function(e,t){return e||t.isEmpty()?t.toString():t.toNumber()},Z=function(e){var t=T(e);return t.isInvalidate()?null:t},z=r.forwardRef(function(e,t){var n,o,i,s,l,c=e.prefixCls,g=void 0===c?"rc-input-number":c,h=e.className,b=e.style,y=e.min,v=e.max,E=e.step,O=void 0===E?1:E,A=e.defaultValue,k=e.value,R=e.disabled,P=e.readOnly,j=e.upHandler,B=e.downHandler,z=e.keyboard,H=e.wheel,G=e.controls,$=(e.classNames,e.stringMode),W=e.parser,V=e.formatter,q=e.precision,Y=e.decimalSeparator,K=e.onChange,X=e.onInput,Q=e.onPressEnter,J=e.onStep,ee=e.changeOnBlur,et=void 0===ee||ee,en=(0,m.Z)(e,F),er="".concat(g,"-input"),eo=r.useRef(null),ea=r.useState(!1),ei=(0,f.Z)(ea,2),es=ei[0],el=ei[1],ec=r.useRef(!1),eu=r.useRef(!1),ed=r.useRef(!1),ep=r.useState(function(){return T(null!=k?k:A)}),ef=(0,f.Z)(ep,2),em=ef[0],eg=ef[1],eh=r.useCallback(function(e,t){return t?void 0:q>=0?q:Math.max(S(e),S(O))},[q,O]),eb=r.useCallback(function(e){var t=String(e);if(W)return W(t);var n=t;return Y&&(n=n.replace(Y,".")),n.replace(/[^\w.-]+/g,"")},[W,Y]),ey=r.useRef(""),ev=r.useCallback(function(e,t){if(V)return V(e,{userTyping:t,input:String(ey.current)});var n="number"==typeof e?w(e):e;if(!t){var r=eh(n,t);x(n)&&(Y||r>=0)&&(n=C(n,Y||".",r))}return n},[V,eh,Y]),eE=r.useState(function(){var e=null!=A?A:k;return em.isInvalidate()&&["string","number"].includes((0,p.Z)(e))?Number.isNaN(e)?"":e:ev(em.toString(),!1)}),eS=(0,f.Z)(eE,2),ew=eS[0],ex=eS[1];function eO(e,t){ex(ev(e.isInvalidate()?e.toString(!1):e.toString(!t),t))}ey.current=ew;var eA=r.useMemo(function(){return Z(v)},[v,q]),eT=r.useMemo(function(){return Z(y)},[y,q]),eC=r.useMemo(function(){return!(!eA||!em||em.isInvalidate())&&eA.lessEquals(em)},[eA,em]),ek=r.useMemo(function(){return!(!eT||!em||em.isInvalidate())&&em.lessEquals(eT)},[eT,em]),eI=(n=eo.current,o=(0,r.useRef)(null),[function(){try{var e=n.selectionStart,t=n.selectionEnd,r=n.value,a=r.substring(0,e),i=r.substring(t);o.current={start:e,end:t,value:r,beforeTxt:a,afterTxt:i}}catch(e){}},function(){if(n&&o.current&&es)try{var e=n.value,t=o.current,r=t.beforeTxt,a=t.afterTxt,i=t.start,s=e.length;if(e.endsWith(a))s=e.length-o.current.afterTxt.length;else if(e.startsWith(r))s=r.length;else{var l=r[i-1],c=e.indexOf(l,i-1);-1!==c&&(s=c+1)}n.setSelectionRange(s,s)}catch(e){(0,_.ZP)(!1,"Something warning of cursor restore. Please fire issue about this: ".concat(e.message))}}]),eN=(0,f.Z)(eI,2),e_=eN[0],eR=eN[1],eP=function(e){return eA&&!e.lessEquals(eA)?eA:eT&&!eT.lessEquals(e)?eT:null},eM=function(e){return!eP(e)},eL=function(e,t){var n=e,r=eM(n)||n.isEmpty();if(n.isEmpty()||t||(n=eP(n)||n,r=!0),!P&&!R&&r){var o,a=n.toString(),i=eh(a,t);return i>=0&&!eM(n=T(C(a,".",i)))&&(n=T(C(a,".",i,!0))),n.equals(em)||(o=n,void 0===k&&eg(o),null==K||K(n.isEmpty()?null:U($,n)),void 0===k&&eO(n,t)),n}return em},eD=(i=(0,r.useRef)(0),s=function(){M.Z.cancel(i.current)},(0,r.useEffect)(function(){return s},[]),function(e){s(),i.current=(0,M.Z)(function(){e()})}),ej=function e(t){if(e_(),ey.current=t,ex(t),!eu.current){var n=T(eb(t));n.isNaN()||eL(n,!0)}null==X||X(t),eD(function(){var n=t;W||(n=t.replace(/。/g,".")),n!==t&&e(n)})},eF=function(e){if((!e||!eC)&&(e||!ek)){ec.current=!1;var t,n=T(ed.current?D(O):O);e||(n=n.negate());var r=eL((em||T(0)).add(n.toString()),!1);null==J||J(U($,r),{offset:ed.current?D(O):O,type:e?"up":"down"}),null===(t=eo.current)||void 0===t||t.focus()}},eB=function(e){var t=T(eb(ew)),n=t;n=t.isNaN()?eL(em,e):eL(t,e),void 0!==k?eO(em,!1):n.isNaN()||eO(n,!1)};return r.useEffect(function(){var e=function(e){!1!==H&&(eF(e.deltaY<0),e.preventDefault())},t=eo.current;if(t)return t.addEventListener("wheel",e),function(){return t.removeEventListener("wheel",e)}},[eF]),(0,I.o)(function(){em.isInvalidate()||eO(em,!1)},[q,V]),(0,I.o)(function(){var e=T(k);eg(e);var t=T(eb(ew));e.equals(t)&&ec.current&&!V||eO(e,ec.current)},[k]),(0,I.o)(function(){V&&eR()},[ew]),r.createElement("div",{className:u()(g,h,(l={},(0,d.Z)(l,"".concat(g,"-focused"),es),(0,d.Z)(l,"".concat(g,"-disabled"),R),(0,d.Z)(l,"".concat(g,"-readonly"),P),(0,d.Z)(l,"".concat(g,"-not-a-number"),em.isNaN()),(0,d.Z)(l,"".concat(g,"-out-of-range"),!em.isInvalidate()&&!eM(em)),l)),style:b,onFocus:function(){el(!0)},onBlur:function(){et&&eB(!1),el(!1),ec.current=!1},onKeyDown:function(e){var t=e.key,n=e.shiftKey;ec.current=!0,ed.current=n,"Enter"===t&&(eu.current||(ec.current=!1),eB(!1),null==Q||Q(e)),!1!==z&&!eu.current&&["Up","ArrowUp","Down","ArrowDown"].includes(t)&&(eF("Up"===t||"ArrowUp"===t),e.preventDefault())},onKeyUp:function(){ec.current=!1,ed.current=!1},onCompositionStart:function(){eu.current=!0},onCompositionEnd:function(){eu.current=!1,ej(eo.current.value)},onBeforeInput:function(){ec.current=!0}},(void 0===G||G)&&r.createElement(L,{prefixCls:g,upNode:j,downNode:B,upDisabled:eC,downDisabled:ek,onStep:eF}),r.createElement("div",{className:"".concat(er,"-wrap")},r.createElement("input",(0,a.Z)({autoComplete:"off",role:"spinbutton","aria-valuemin":y,"aria-valuemax":v,"aria-valuenow":em.isInvalidate()?null:em.toString(),step:O},en,{ref:(0,N.sQ)(eo,t),className:er,value:ew,onChange:function(e){ej(e.target.value)},disabled:R,readOnly:P}))))}),H=r.forwardRef(function(e,t){var n=e.disabled,o=e.style,i=e.prefixCls,s=e.value,l=e.prefix,c=e.suffix,u=e.addonBefore,d=e.addonAfter,p=e.className,f=e.classNames,g=(0,m.Z)(e,B),h=r.useRef(null);return r.createElement(k.Q,{className:p,triggerFocus:function(e){h.current&&(0,j.nH)(h.current,e)},prefixCls:i,value:s,disabled:n,style:o,prefix:l,suffix:c,addonAfter:d,addonBefore:u,classNames:f,components:{affixWrapper:"div",groupWrapper:"div",wrapper:"div",groupAddon:"div"}},r.createElement(z,(0,a.Z)({prefixCls:i,disabled:n,ref:(0,N.sQ)(h,t),className:null==f?void 0:f.input},g)))});H.displayName="InputNumber";var G=n(47794),$=n(57499),W=n(54165),V=n(17094),q=n(92935),Y=n(10693),K=n(47137),X=n(8443),Q=n(92801),J=n(8985),ee=n(94759),et=n(85980),en=n(61892),er=n(11303),eo=n(12288),ea=n(76585),ei=n(80316),es=n(6336);let el=(e,t)=>{let{componentCls:n,borderRadiusSM:r,borderRadiusLG:o}=e,a="lg"===t?o:r;return{["&-".concat(t)]:{["".concat(n,"-handler-wrap")]:{borderStartEndRadius:a,borderEndEndRadius:a},["".concat(n,"-handler-up")]:{borderStartEndRadius:a},["".concat(n,"-handler-down")]:{borderEndEndRadius:a}}}},ec=e=>{let{componentCls:t,lineWidth:n,lineType:r,borderRadius:o,fontSizeLG:a,controlHeightLG:i,controlHeightSM:s,colorError:l,paddingInlineSM:c,paddingBlockSM:u,paddingBlockLG:d,paddingInlineLG:p,colorTextDescription:f,motionDurationMid:m,handleHoverColor:g,paddingInline:h,paddingBlock:b,handleBg:y,handleActiveBg:v,colorTextDisabled:E,borderRadiusSM:S,borderRadiusLG:w,controlWidth:x,handleOpacity:O,handleBorderColor:A,filledHandleBg:T,lineHeightLG:C,calc:k}=e;return[{[t]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},(0,er.Wf)(e)),(0,ee.ik)(e)),{display:"inline-block",width:x,margin:0,padding:0,borderRadius:o}),(0,en.qG)(e,{["".concat(t,"-handler-wrap")]:{background:y,["".concat(t,"-handler-down")]:{borderBlockStart:"".concat((0,J.bf)(n)," ").concat(r," ").concat(A)}}})),(0,en.H8)(e,{["".concat(t,"-handler-wrap")]:{background:T,["".concat(t,"-handler-down")]:{borderBlockStart:"".concat((0,J.bf)(n)," ").concat(r," ").concat(A)}},"&:focus-within":{["".concat(t,"-handler-wrap")]:{background:y}}})),(0,en.Mu)(e)),{"&-rtl":{direction:"rtl",["".concat(t,"-input")]:{direction:"rtl"}},"&-lg":{padding:0,fontSize:a,lineHeight:C,borderRadius:w,["input".concat(t,"-input")]:{height:k(i).sub(k(n).mul(2)).equal(),padding:"".concat((0,J.bf)(d)," ").concat((0,J.bf)(p))}},"&-sm":{padding:0,borderRadius:S,["input".concat(t,"-input")]:{height:k(s).sub(k(n).mul(2)).equal(),padding:"".concat((0,J.bf)(u)," ").concat((0,J.bf)(c))}},"&-out-of-range":{["".concat(t,"-input-wrap")]:{input:{color:l}}},"&-group":Object.assign(Object.assign(Object.assign({},(0,er.Wf)(e)),(0,ee.s7)(e)),{"&-wrapper":Object.assign(Object.assign(Object.assign({display:"inline-block",textAlign:"start",verticalAlign:"top",["".concat(t,"-affix-wrapper")]:{width:"100%"},"&-lg":{["".concat(t,"-group-addon")]:{borderRadius:w,fontSize:e.fontSizeLG}},"&-sm":{["".concat(t,"-group-addon")]:{borderRadius:S}}},(0,en.ir)(e)),(0,en.S5)(e)),{["&:not(".concat(t,"-compact-first-item):not(").concat(t,"-compact-last-item)").concat(t,"-compact-item")]:{["".concat(t,", ").concat(t,"-group-addon")]:{borderRadius:0}},["&:not(".concat(t,"-compact-last-item)").concat(t,"-compact-first-item")]:{["".concat(t,", ").concat(t,"-group-addon")]:{borderStartEndRadius:0,borderEndEndRadius:0}},["&:not(".concat(t,"-compact-first-item)").concat(t,"-compact-last-item")]:{["".concat(t,", ").concat(t,"-group-addon")]:{borderStartStartRadius:0,borderEndStartRadius:0}}})}),["&-disabled ".concat(t,"-input")]:{cursor:"not-allowed"},[t]:{"&-input":Object.assign(Object.assign(Object.assign(Object.assign({},(0,er.Wf)(e)),{width:"100%",padding:"".concat((0,J.bf)(b)," ").concat((0,J.bf)(h)),textAlign:"start",backgroundColor:"transparent",border:0,borderRadius:o,outline:0,transition:"all ".concat(m," linear"),appearance:"textfield",fontSize:"inherit"}),(0,ee.nz)(e.colorTextPlaceholder)),{'&[type="number"]::-webkit-inner-spin-button, &[type="number"]::-webkit-outer-spin-button':{margin:0,webkitAppearance:"none",appearance:"none"}})}})},{[t]:Object.assign(Object.assign(Object.assign({["&:hover ".concat(t,"-handler-wrap, &-focused ").concat(t,"-handler-wrap")]:{opacity:1},["".concat(t,"-handler-wrap")]:{position:"absolute",insetBlockStart:0,insetInlineEnd:0,width:e.handleWidth,height:"100%",borderStartStartRadius:0,borderStartEndRadius:o,borderEndEndRadius:o,borderEndStartRadius:0,opacity:O,display:"flex",flexDirection:"column",alignItems:"stretch",transition:"opacity ".concat(m," linear ").concat(m),["".concat(t,"-handler")]:{display:"flex",alignItems:"center",justifyContent:"center",flex:"auto",height:"40%",["\n ".concat(t,"-handler-up-inner,\n ").concat(t,"-handler-down-inner\n ")]:{marginInlineEnd:0,fontSize:e.handleFontSize}}},["".concat(t,"-handler")]:{height:"50%",overflow:"hidden",color:f,fontWeight:"bold",lineHeight:0,textAlign:"center",cursor:"pointer",borderInlineStart:"".concat((0,J.bf)(n)," ").concat(r," ").concat(A),transition:"all ".concat(m," linear"),"&:active":{background:v},"&:hover":{height:"60%",["\n ".concat(t,"-handler-up-inner,\n ").concat(t,"-handler-down-inner\n ")]:{color:g}},"&-up-inner, &-down-inner":Object.assign(Object.assign({},(0,er.Ro)()),{color:f,transition:"all ".concat(m," linear"),userSelect:"none"})},["".concat(t,"-handler-up")]:{borderStartEndRadius:o},["".concat(t,"-handler-down")]:{borderEndEndRadius:o}},el(e,"lg")),el(e,"sm")),{"&-disabled, &-readonly":{["".concat(t,"-handler-wrap")]:{display:"none"},["".concat(t,"-input")]:{color:"inherit"}},["\n ".concat(t,"-handler-up-disabled,\n ").concat(t,"-handler-down-disabled\n ")]:{cursor:"not-allowed"},["\n ".concat(t,"-handler-up-disabled:hover &-handler-up-inner,\n ").concat(t,"-handler-down-disabled:hover &-handler-down-inner\n ")]:{color:E}})}]},eu=e=>{let{componentCls:t,paddingBlock:n,paddingInline:r,inputAffixPadding:o,controlWidth:a,borderRadiusLG:i,borderRadiusSM:s,paddingInlineLG:l,paddingInlineSM:c,paddingBlockLG:u,paddingBlockSM:d}=e;return{["".concat(t,"-affix-wrapper")]:Object.assign(Object.assign({["input".concat(t,"-input")]:{padding:"".concat((0,J.bf)(n)," 0")}},(0,ee.ik)(e)),{position:"relative",display:"inline-flex",width:a,padding:0,paddingInlineStart:r,"&-lg":{borderRadius:i,paddingInlineStart:l,["input".concat(t,"-input")]:{padding:"".concat((0,J.bf)(u)," 0")}},"&-sm":{borderRadius:s,paddingInlineStart:c,["input".concat(t,"-input")]:{padding:"".concat((0,J.bf)(d)," 0")}},["&:not(".concat(t,"-disabled):hover")]:{zIndex:1},"&-focused, &:focus":{zIndex:1},["&-disabled > ".concat(t,"-disabled")]:{background:"transparent"},["> div".concat(t)]:{width:"100%",border:"none",outline:"none",["&".concat(t,"-focused")]:{boxShadow:"none !important"}},"&::before":{display:"inline-block",width:0,visibility:"hidden",content:'"\\a0"'},["".concat(t,"-handler-wrap")]:{zIndex:2},[t]:{color:"inherit","&-prefix, &-suffix":{display:"flex",flex:"none",alignItems:"center",pointerEvents:"none"},"&-prefix":{marginInlineEnd:o},"&-suffix":{position:"absolute",insetBlockStart:0,insetInlineEnd:0,zIndex:1,height:"100%",marginInlineEnd:r,marginInlineStart:o}}})}};var ed=(0,ea.I$)("InputNumber",e=>{let t=(0,ei.TS)(e,(0,et.e)(e));return[ec(t),eu(t),(0,eo.c)(t)]},e=>{var t;let n=null!==(t=e.handleVisible)&&void 0!==t?t:"auto";return Object.assign(Object.assign({},(0,et.T)(e)),{controlWidth:90,handleWidth:e.controlHeightSM-2*e.lineWidth,handleFontSize:e.fontSize/2,handleVisible:n,handleActiveBg:e.colorFillAlter,handleBg:e.colorBgContainer,filledHandleBg:new es.C(e.colorFillSecondary).onBackground(e.colorBgContainer).toHexString(),handleHoverColor:e.colorPrimary,handleBorderColor:e.colorBorder,handleOpacity:!0===n?1:0})},{unitless:{handleOpacity:!0}}),ep=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);ot.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};let ef=r.forwardRef((e,t)=>{let{getPrefixCls:n,direction:a}=r.useContext($.E_),i=r.useRef(null);r.useImperativeHandle(t,()=>i.current);let{className:s,rootClassName:c,size:d,disabled:p,prefixCls:f,addonBefore:m,addonAfter:g,prefix:h,bordered:b,readOnly:y,status:v,controls:E,variant:S}=e,w=ep(e,["className","rootClassName","size","disabled","prefixCls","addonBefore","addonAfter","prefix","bordered","readOnly","status","controls","variant"]),x=n("input-number",f),O=(0,q.Z)(x),[A,T,C]=ed(x,O),{compactSize:k,compactItemClassnames:I}=(0,Q.ri)(x,a),N=r.createElement(l,{className:"".concat(x,"-handler-up-inner")}),_=r.createElement(o.Z,{className:"".concat(x,"-handler-down-inner")});"object"==typeof E&&(N=void 0===E.upIcon?N:r.createElement("span",{className:"".concat(x,"-handler-up-inner")},E.upIcon),_=void 0===E.downIcon?_:r.createElement("span",{className:"".concat(x,"-handler-down-inner")},E.downIcon));let{hasFeedback:R,status:P,isFormItemInput:M,feedbackIcon:L}=r.useContext(K.aM),D=(0,G.F)(P,v),j=(0,Y.Z)(e=>{var t;return null!==(t=null!=d?d:k)&&void 0!==t?t:e}),F=r.useContext(V.Z),[B,U]=(0,X.Z)(S,b),Z=R&&r.createElement(r.Fragment,null,L),z=u()({["".concat(x,"-lg")]:"large"===j,["".concat(x,"-sm")]:"small"===j,["".concat(x,"-rtl")]:"rtl"===a,["".concat(x,"-in-form-item")]:M},T),W="".concat(x,"-group");return A(r.createElement(H,Object.assign({ref:i,disabled:null!=p?p:F,className:u()(C,O,s,c,I),upHandler:N,downHandler:_,prefixCls:x,readOnly:y,controls:"boolean"==typeof E?E:void 0,prefix:h,suffix:Z,addonAfter:g&&r.createElement(Q.BR,null,r.createElement(K.Ux,{override:!0,status:!0},g)),addonBefore:m&&r.createElement(Q.BR,null,r.createElement(K.Ux,{override:!0,status:!0},m)),classNames:{input:z,variant:u()({["".concat(x,"-").concat(B)]:U},(0,G.Z)(x,D,R)),affixWrapper:u()({["".concat(x,"-affix-wrapper-sm")]:"small"===j,["".concat(x,"-affix-wrapper-lg")]:"large"===j,["".concat(x,"-affix-wrapper-rtl")]:"rtl"===a},T),wrapper:u()({["".concat(W,"-rtl")]:"rtl"===a},T),groupWrapper:u()({["".concat(x,"-group-wrapper-sm")]:"small"===j,["".concat(x,"-group-wrapper-lg")]:"large"===j,["".concat(x,"-group-wrapper-rtl")]:"rtl"===a,["".concat(x,"-group-wrapper-").concat(B)]:U},(0,G.Z)("".concat(x,"-group-wrapper"),D,R),T)}},w)))});ef._InternalPanelDoNotUseOrYouWillBeFired=e=>r.createElement(W.ZP,{theme:{components:{InputNumber:{handleVisible:!0}}}},r.createElement(ef,Object.assign({},e)));var em=ef},29714:function(e,t,n){n.d(t,{Z:function(){return ea}});var r,o=n(64090),a=n(16480),i=n.n(a),s=n(57499),l=n(47137),c=n(94759),u=n(90089),d=n(74084),p=n(47794),f=n(17094),m=n(10693),g=n(92801);function h(e,t){let n=(0,o.useRef)([]),r=()=>{n.current.push(setTimeout(()=>{var t,n,r,o;(null===(t=e.current)||void 0===t?void 0:t.input)&&(null===(n=e.current)||void 0===n?void 0:n.input.getAttribute("type"))==="password"&&(null===(r=e.current)||void 0===r?void 0:r.input.hasAttribute("value"))&&(null===(o=e.current)||void 0===o||o.input.removeAttribute("value"))}))};return(0,o.useEffect)(()=>(t&&r(),()=>n.current.forEach(e=>{e&&clearTimeout(e)})),[]),r}var b=n(92935),y=n(8443),v=n(77136),E=e=>{let t;return"object"==typeof e&&(null==e?void 0:e.clearIcon)?t=e:e&&(t={clearIcon:o.createElement(v.Z,null)}),t},S=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);ot.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};let w=(0,o.forwardRef)((e,t)=>{var n;let{prefixCls:r,bordered:a=!0,status:v,size:w,disabled:x,onBlur:O,onFocus:A,suffix:T,allowClear:C,addonAfter:k,addonBefore:I,className:N,style:_,styles:R,rootClassName:P,onChange:M,classNames:L,variant:D}=e,j=S(e,["prefixCls","bordered","status","size","disabled","onBlur","onFocus","suffix","allowClear","addonAfter","addonBefore","className","style","styles","rootClassName","onChange","classNames","variant"]),{getPrefixCls:F,direction:B,input:U}=o.useContext(s.E_),Z=F("input",r),z=(0,o.useRef)(null),H=(0,b.Z)(Z),[G,$,W]=(0,c.ZP)(Z,H),{compactSize:V,compactItemClassnames:q}=(0,g.ri)(Z,B),Y=(0,m.Z)(e=>{var t;return null!==(t=null!=w?w:V)&&void 0!==t?t:e}),K=o.useContext(f.Z),{status:X,hasFeedback:Q,feedbackIcon:J}=(0,o.useContext)(l.aM),ee=(0,p.F)(X,v),et=!!(e.prefix||e.suffix||e.allowClear||e.showCount)||!!Q;(0,o.useRef)(et);let en=h(z,!0),er=(Q||T)&&o.createElement(o.Fragment,null,T,Q&&J),eo=E(C),[ea,ei]=(0,y.Z)(D,a);return G(o.createElement(u.Z,Object.assign({ref:(0,d.sQ)(t,z),prefixCls:Z,autoComplete:null==U?void 0:U.autoComplete},j,{disabled:null!=x?x:K,onBlur:e=>{en(),null==O||O(e)},onFocus:e=>{en(),null==A||A(e)},style:Object.assign(Object.assign({},null==U?void 0:U.style),_),styles:Object.assign(Object.assign({},null==U?void 0:U.styles),R),suffix:er,allowClear:eo,className:i()(N,P,W,H,q,null==U?void 0:U.className),onChange:e=>{en(),null==M||M(e)},addonAfter:k&&o.createElement(g.BR,null,o.createElement(l.Ux,{override:!0,status:!0},k)),addonBefore:I&&o.createElement(g.BR,null,o.createElement(l.Ux,{override:!0,status:!0},I)),classNames:Object.assign(Object.assign(Object.assign({},L),null==U?void 0:U.classNames),{input:i()({["".concat(Z,"-sm")]:"small"===Y,["".concat(Z,"-lg")]:"large"===Y,["".concat(Z,"-rtl")]:"rtl"===B},null==L?void 0:L.input,null===(n=null==U?void 0:U.classNames)||void 0===n?void 0:n.input,$),variant:i()({["".concat(Z,"-").concat(ea)]:ei},(0,p.Z)(Z,ee)),affixWrapper:i()({["".concat(Z,"-affix-wrapper-sm")]:"small"===Y,["".concat(Z,"-affix-wrapper-lg")]:"large"===Y,["".concat(Z,"-affix-wrapper-rtl")]:"rtl"===B},$),wrapper:i()({["".concat(Z,"-group-rtl")]:"rtl"===B},$),groupWrapper:i()({["".concat(Z,"-group-wrapper-sm")]:"small"===Y,["".concat(Z,"-group-wrapper-lg")]:"large"===Y,["".concat(Z,"-group-wrapper-rtl")]:"rtl"===B,["".concat(Z,"-group-wrapper-").concat(ea)]:ei},(0,p.Z)("".concat(Z,"-group-wrapper"),ee,Q),$)})})))});var x=n(14749),O={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M942.2 486.2Q889.47 375.11 816.7 305l-50.88 50.88C807.31 395.53 843.45 447.4 874.7 512 791.5 684.2 673.4 766 512 766q-72.67 0-133.87-22.38L323 798.75Q408 838 512 838q288.3 0 430.2-300.3a60.29 60.29 0 000-51.5zm-63.57-320.64L836 122.88a8 8 0 00-11.32 0L715.31 232.2Q624.86 186 512 186q-288.3 0-430.2 300.3a60.3 60.3 0 000 51.5q56.69 119.4 136.5 191.41L112.48 835a8 8 0 000 11.31L155.17 889a8 8 0 0011.31 0l712.15-712.12a8 8 0 000-11.32zM149.3 512C232.6 339.8 350.7 258 512 258c54.54 0 104.13 9.36 149.12 28.39l-70.3 70.3a176 176 0 00-238.13 238.13l-83.42 83.42C223.1 637.49 183.3 582.28 149.3 512zm246.7 0a112.11 112.11 0 01146.2-106.69L401.31 546.2A112 112 0 01396 512z"}},{tag:"path",attrs:{d:"M508 624c-3.46 0-6.87-.16-10.25-.47l-52.82 52.82a176.09 176.09 0 00227.42-227.42l-52.82 52.82c.31 3.38.47 6.79.47 10.25a111.94 111.94 0 01-112 112z"}}]},name:"eye-invisible",theme:"outlined"},A=n(60688),T=o.forwardRef(function(e,t){return o.createElement(A.Z,(0,x.Z)({},e,{ref:t,icon:O}))}),C={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"},k=o.forwardRef(function(e,t){return o.createElement(A.Z,(0,x.Z)({},e,{ref:t,icon:C}))}),I=n(35704),N=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);ot.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};let _=e=>e?o.createElement(k,null):o.createElement(T,null),R={click:"onClick",hover:"onMouseOver"},P=o.forwardRef((e,t)=>{let{visibilityToggle:n=!0}=e,r="object"==typeof n&&void 0!==n.visible,[a,l]=(0,o.useState)(()=>!!r&&n.visible),c=(0,o.useRef)(null);o.useEffect(()=>{r&&l(n.visible)},[r,n]);let u=h(c),p=()=>{let{disabled:t}=e;t||(a&&u(),l(e=>{var t;let r=!e;return"object"==typeof n&&(null===(t=n.onVisibleChange)||void 0===t||t.call(n,r)),r}))},{className:f,prefixCls:m,inputPrefixCls:g,size:b}=e,y=N(e,["className","prefixCls","inputPrefixCls","size"]),{getPrefixCls:v}=o.useContext(s.E_),E=v("input",g),S=v("input-password",m),x=n&&(t=>{let{action:n="click",iconRender:r=_}=e,i=R[n]||"",s=r(a);return o.cloneElement(o.isValidElement(s)?s:o.createElement("span",null,s),{[i]:p,className:"".concat(t,"-icon"),key:"passwordIcon",onMouseDown:e=>{e.preventDefault()},onMouseUp:e=>{e.preventDefault()}})})(S),O=i()(S,f,{["".concat(S,"-").concat(b)]:!!b}),A=Object.assign(Object.assign({},(0,I.Z)(y,["suffix","iconRender","visibilityToggle"])),{type:a?"text":"password",className:O,prefixCls:E,suffix:x});return b&&(A.size=b),o.createElement(w,Object.assign({ref:(0,d.sQ)(t,c)},A))});var M=n(96871),L=n(65823),D=n(1861),j=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);ot.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};let F=o.forwardRef((e,t)=>{let n;let{prefixCls:r,inputPrefixCls:a,className:l,size:c,suffix:u,enterButton:p=!1,addonAfter:f,loading:h,disabled:b,onSearch:y,onChange:v,onCompositionStart:E,onCompositionEnd:S}=e,x=j(e,["prefixCls","inputPrefixCls","className","size","suffix","enterButton","addonAfter","loading","disabled","onSearch","onChange","onCompositionStart","onCompositionEnd"]),{getPrefixCls:O,direction:A}=o.useContext(s.E_),T=o.useRef(!1),C=O("input-search",r),k=O("input",a),{compactSize:I}=(0,g.ri)(C,A),N=(0,m.Z)(e=>{var t;return null!==(t=null!=c?c:I)&&void 0!==t?t:e}),_=o.useRef(null),R=e=>{var t;document.activeElement===(null===(t=_.current)||void 0===t?void 0:t.input)&&e.preventDefault()},P=e=>{var t,n;y&&y(null===(n=null===(t=_.current)||void 0===t?void 0:t.input)||void 0===n?void 0:n.value,e,{source:"input"})},F="boolean"==typeof p?o.createElement(M.Z,null):null,B="".concat(C,"-button"),U=p||{},Z=U.type&&!0===U.type.__ANT_BUTTON;n=Z||"button"===U.type?(0,L.Tm)(U,Object.assign({onMouseDown:R,onClick:e=>{var t,n;null===(n=null===(t=null==U?void 0:U.props)||void 0===t?void 0:t.onClick)||void 0===n||n.call(t,e),P(e)},key:"enterButton"},Z?{className:B,size:N}:{})):o.createElement(D.ZP,{className:B,type:p?"primary":void 0,size:N,disabled:b,key:"enterButton",onMouseDown:R,onClick:P,loading:h,icon:F},p),f&&(n=[n,(0,L.Tm)(f,{key:"addonAfter"})]);let z=i()(C,{["".concat(C,"-rtl")]:"rtl"===A,["".concat(C,"-").concat(N)]:!!N,["".concat(C,"-with-button")]:!!p},l);return o.createElement(w,Object.assign({ref:(0,d.sQ)(_,t),onPressEnter:e=>{T.current||h||P(e)}},x,{size:N,onCompositionStart:e=>{T.current=!0,null==E||E(e)},onCompositionEnd:e=>{T.current=!1,null==S||S(e)},prefixCls:k,addonAfter:n,suffix:u,onChange:e=>{e&&e.target&&"click"===e.type&&y&&y(e.target.value,e,{source:"clear"}),v&&v(e)},className:z,disabled:b}))});var B=n(50833),U=n(5239),Z=n(63787),z=n(80406),H=n(6787),G=n(44607),$=n(8002),W=n(44329),V=n(6976),q=n(46505),Y=n(24800),K=n(19223),X=["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"],Q={},J=["prefixCls","onPressEnter","defaultValue","value","autoSize","onResize","className","style","disabled","onChange","onInternalAutoSize"],ee=o.forwardRef(function(e,t){var n=e.prefixCls,a=(e.onPressEnter,e.defaultValue),s=e.value,l=e.autoSize,c=e.onResize,u=e.className,d=e.style,p=e.disabled,f=e.onChange,m=(e.onInternalAutoSize,(0,H.Z)(e,J)),g=(0,W.Z)(a,{value:s,postState:function(e){return null!=e?e:""}}),h=(0,z.Z)(g,2),b=h[0],y=h[1],v=o.useRef();o.useImperativeHandle(t,function(){return{textArea:v.current}});var E=o.useMemo(function(){return l&&"object"===(0,V.Z)(l)?[l.minRows,l.maxRows]:[]},[l]),S=(0,z.Z)(E,2),w=S[0],O=S[1],A=!!l,T=function(){try{if(document.activeElement===v.current){var e=v.current,t=e.selectionStart,n=e.selectionEnd,r=e.scrollTop;v.current.setSelectionRange(t,n),v.current.scrollTop=r}}catch(e){}},C=o.useState(2),k=(0,z.Z)(C,2),I=k[0],N=k[1],_=o.useState(),R=(0,z.Z)(_,2),P=R[0],M=R[1],L=function(){N(0)};(0,Y.Z)(function(){A&&L()},[s,w,O,A]),(0,Y.Z)(function(){if(0===I)N(1);else if(1===I){var e=function(e){var t,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;r||((r=document.createElement("textarea")).setAttribute("tab-index","-1"),r.setAttribute("aria-hidden","true"),document.body.appendChild(r)),e.getAttribute("wrap")?r.setAttribute("wrap",e.getAttribute("wrap")):r.removeAttribute("wrap");var i=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=e.getAttribute("id")||e.getAttribute("data-reactid")||e.getAttribute("name");if(t&&Q[n])return Q[n];var r=window.getComputedStyle(e),o=r.getPropertyValue("box-sizing")||r.getPropertyValue("-moz-box-sizing")||r.getPropertyValue("-webkit-box-sizing"),a=parseFloat(r.getPropertyValue("padding-bottom"))+parseFloat(r.getPropertyValue("padding-top")),i=parseFloat(r.getPropertyValue("border-bottom-width"))+parseFloat(r.getPropertyValue("border-top-width")),s={sizingStyle:X.map(function(e){return"".concat(e,":").concat(r.getPropertyValue(e))}).join(";"),paddingSize:a,borderSize:i,boxSizing:o};return t&&n&&(Q[n]=s),s}(e,n),s=i.paddingSize,l=i.borderSize,c=i.boxSizing,u=i.sizingStyle;r.setAttribute("style","".concat(u,";").concat("\n min-height:0 !important;\n max-height:none !important;\n height:0 !important;\n visibility:hidden !important;\n overflow:hidden !important;\n position:absolute !important;\n z-index:-1000 !important;\n top:0 !important;\n right:0 !important;\n pointer-events: none !important;\n")),r.value=e.value||e.placeholder||"";var d=void 0,p=void 0,f=r.scrollHeight;if("border-box"===c?f+=l:"content-box"===c&&(f-=s),null!==o||null!==a){r.value=" ";var m=r.scrollHeight-s;null!==o&&(d=m*o,"border-box"===c&&(d=d+s+l),f=Math.max(d,f)),null!==a&&(p=m*a,"border-box"===c&&(p=p+s+l),t=f>p?"":"hidden",f=Math.min(p,f))}var g={height:f,overflowY:t,resize:"none"};return d&&(g.minHeight=d),p&&(g.maxHeight=p),g}(v.current,!1,w,O);N(2),M(e)}else T()},[I]);var D=o.useRef(),j=function(){K.Z.cancel(D.current)};o.useEffect(function(){return j},[]);var F=(0,U.Z)((0,U.Z)({},d),A?P:null);return(0===I||1===I)&&(F.overflowY="hidden",F.overflowX="hidden"),o.createElement(q.Z,{onResize:function(e){2===I&&(null==c||c(e),l&&(j(),D.current=(0,K.Z)(function(){L()})))},disabled:!(l||c)},o.createElement("textarea",(0,x.Z)({},m,{ref:v,style:F,className:i()(n,u,(0,B.Z)({},"".concat(n,"-disabled"),p)),disabled:p,value:b,onChange:function(e){y(e.target.value),null==f||f(e)}})))}),et=["defaultValue","value","onFocus","onBlur","onChange","allowClear","maxLength","onCompositionStart","onCompositionEnd","suffix","prefixCls","showCount","count","className","style","disabled","hidden","classNames","styles","onResize"],en=o.forwardRef(function(e,t){var n,r,a,s=e.defaultValue,l=e.value,c=e.onFocus,d=e.onBlur,p=e.onChange,f=e.allowClear,m=e.maxLength,g=e.onCompositionStart,h=e.onCompositionEnd,b=e.suffix,y=e.prefixCls,v=void 0===y?"rc-textarea":y,E=e.showCount,S=e.count,w=e.className,O=e.style,A=e.disabled,T=e.hidden,C=e.classNames,k=e.styles,I=e.onResize,N=(0,H.Z)(e,et),_=(0,W.Z)(s,{value:l,defaultValue:s}),R=(0,z.Z)(_,2),P=R[0],M=R[1],L=null==P?"":String(P),D=o.useState(!1),j=(0,z.Z)(D,2),F=j[0],V=j[1],q=o.useRef(!1),Y=o.useState(null),K=(0,z.Z)(Y,2),X=K[0],Q=K[1],J=(0,o.useRef)(null),en=function(){var e;return null===(e=J.current)||void 0===e?void 0:e.textArea},er=function(){en().focus()};(0,o.useImperativeHandle)(t,function(){return{resizableTextArea:J.current,focus:er,blur:function(){en().blur()}}}),(0,o.useEffect)(function(){V(function(e){return!A&&e})},[A]);var eo=o.useState(null),ea=(0,z.Z)(eo,2),ei=ea[0],es=ea[1];o.useEffect(function(){if(ei){var e;(e=en()).setSelectionRange.apply(e,(0,Z.Z)(ei))}},[ei]);var el=(0,G.Z)(S,E),ec=null!==(n=el.max)&&void 0!==n?n:m,eu=Number(ec)>0,ed=el.strategy(L),ep=!!ec&&ed>ec,ef=function(e,t){var n=t;!q.current&&el.exceedFormatter&&el.max&&el.strategy(t)>el.max&&(n=el.exceedFormatter(t,{max:el.max}),t!==n&&es([en().selectionStart||0,en().selectionEnd||0])),M(n),(0,$.rJ)(e.currentTarget,e,p,n)},em=b;el.show&&(a=el.showFormatter?el.showFormatter({value:L,count:ed,maxLength:ec}):"".concat(ed).concat(eu?" / ".concat(ec):""),em=o.createElement(o.Fragment,null,em,o.createElement("span",{className:i()("".concat(v,"-data-count"),null==C?void 0:C.count),style:null==k?void 0:k.count},a)));var eg=!N.autoSize&&!E&&!f;return o.createElement(u.Q,{value:L,allowClear:f,handleReset:function(e){M(""),er(),(0,$.rJ)(en(),e,p)},suffix:em,prefixCls:v,classNames:(0,U.Z)((0,U.Z)({},C),{},{affixWrapper:i()(null==C?void 0:C.affixWrapper,(r={},(0,B.Z)(r,"".concat(v,"-show-count"),E),(0,B.Z)(r,"".concat(v,"-textarea-allow-clear"),f),r))}),disabled:A,focused:F,className:i()(w,ep&&"".concat(v,"-out-of-range")),style:(0,U.Z)((0,U.Z)({},O),X&&!eg?{height:"auto"}:{}),dataAttrs:{affixWrapper:{"data-count":"string"==typeof a?a:void 0}},hidden:T},o.createElement(ee,(0,x.Z)({},N,{maxLength:m,onKeyDown:function(e){var t=N.onPressEnter,n=N.onKeyDown;"Enter"===e.key&&t&&t(e),null==n||n(e)},onChange:function(e){ef(e,e.target.value)},onFocus:function(e){V(!0),null==c||c(e)},onBlur:function(e){V(!1),null==d||d(e)},onCompositionStart:function(e){q.current=!0,null==g||g(e)},onCompositionEnd:function(e){q.current=!1,ef(e,e.currentTarget.value),null==h||h(e)},className:i()(null==C?void 0:C.textarea),style:(0,U.Z)((0,U.Z)({},null==k?void 0:k.textarea),{},{resize:null==O?void 0:O.resize}),disabled:A,prefixCls:v,onResize:function(e){var t;null==I||I(e),null!==(t=en())&&void 0!==t&&t.style.height&&Q(!0)},ref:J})))}),er=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);ot.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};let eo=(0,o.forwardRef)((e,t)=>{var n;let r;let{prefixCls:a,bordered:u=!0,size:d,disabled:g,status:h,allowClear:E,classNames:S,rootClassName:w,className:x,variant:O}=e,A=er(e,["prefixCls","bordered","size","disabled","status","allowClear","classNames","rootClassName","className","variant"]),{getPrefixCls:T,direction:C}=o.useContext(s.E_),k=(0,m.Z)(d),I=o.useContext(f.Z),{status:N,hasFeedback:_,feedbackIcon:R}=o.useContext(l.aM),P=(0,p.F)(N,h),M=o.useRef(null);o.useImperativeHandle(t,()=>{var e;return{resizableTextArea:null===(e=M.current)||void 0===e?void 0:e.resizableTextArea,focus:e=>{var t,n;!function(e,t){if(!e)return;e.focus(t);let{cursor:n}=t||{};if(n){let t=e.value.length;switch(n){case"start":e.setSelectionRange(0,0);break;case"end":e.setSelectionRange(t,t);break;default:e.setSelectionRange(0,t)}}}(null===(n=null===(t=M.current)||void 0===t?void 0:t.resizableTextArea)||void 0===n?void 0:n.textArea,e)},blur:()=>{var e;return null===(e=M.current)||void 0===e?void 0:e.blur()}}});let L=T("input",a);"object"==typeof E&&(null==E?void 0:E.clearIcon)?r=E:E&&(r={clearIcon:o.createElement(v.Z,null)});let D=(0,b.Z)(L),[j,F,B]=(0,c.ZP)(L,D),[U,Z]=(0,y.Z)(O,u);return j(o.createElement(en,Object.assign({},A,{disabled:null!=g?g:I,allowClear:r,className:i()(B,D,x,w),classNames:Object.assign(Object.assign({},S),{textarea:i()({["".concat(L,"-sm")]:"small"===k,["".concat(L,"-lg")]:"large"===k},F,null==S?void 0:S.textarea),variant:i()({["".concat(L,"-").concat(U)]:Z},(0,p.Z)(L,P)),affixWrapper:i()("".concat(L,"-textarea-affix-wrapper"),{["".concat(L,"-affix-wrapper-rtl")]:"rtl"===C,["".concat(L,"-affix-wrapper-sm")]:"small"===k,["".concat(L,"-affix-wrapper-lg")]:"large"===k,["".concat(L,"-textarea-show-count")]:e.showCount||(null===(n=e.count)||void 0===n?void 0:n.show)},F)}),prefixCls:L,suffix:_&&o.createElement("span",{className:"".concat(L,"-textarea-suffix")},R),ref:M})))});w.Group=e=>{let{getPrefixCls:t,direction:n}=(0,o.useContext)(s.E_),{prefixCls:r,className:a}=e,u=t("input-group",r),d=t("input"),[p,f]=(0,c.ZP)(d),m=i()(u,{["".concat(u,"-lg")]:"large"===e.size,["".concat(u,"-sm")]:"small"===e.size,["".concat(u,"-compact")]:e.compact,["".concat(u,"-rtl")]:"rtl"===n},f,a),g=(0,o.useContext)(l.aM),h=(0,o.useMemo)(()=>Object.assign(Object.assign({},g),{isFormItemInput:!1}),[g]);return p(o.createElement("span",{className:m,style:e.style,onMouseEnter:e.onMouseEnter,onMouseLeave:e.onMouseLeave,onFocus:e.onFocus,onBlur:e.onBlur},o.createElement(l.aM.Provider,{value:h},e.children)))},w.Search=F,w.TextArea=eo,w.Password=P;var ea=w},94759:function(e,t,n){n.d(t,{ik:function(){return f},nz:function(){return u},s7:function(){return m}});var r=n(8985),o=n(11303),a=n(12288),i=n(76585),s=n(80316),l=n(85980),c=n(61892);let u=e=>({"&::-moz-placeholder":{opacity:1},"&::placeholder":{color:e,userSelect:"none"},"&:placeholder-shown":{textOverflow:"ellipsis"}}),d=e=>{let{paddingBlockLG:t,lineHeightLG:n,borderRadiusLG:o,paddingInlineLG:a}=e;return{padding:"".concat((0,r.bf)(t)," ").concat((0,r.bf)(a)),fontSize:e.inputFontSizeLG,lineHeight:n,borderRadius:o}},p=e=>({padding:"".concat((0,r.bf)(e.paddingBlockSM)," ").concat((0,r.bf)(e.paddingInlineSM)),fontSize:e.inputFontSizeSM,borderRadius:e.borderRadiusSM}),f=e=>Object.assign(Object.assign({position:"relative",display:"inline-block",width:"100%",minWidth:0,padding:"".concat((0,r.bf)(e.paddingBlock)," ").concat((0,r.bf)(e.paddingInline)),color:e.colorText,fontSize:e.inputFontSize,lineHeight:e.lineHeight,borderRadius:e.borderRadius,transition:"all ".concat(e.motionDurationMid)},u(e.colorTextPlaceholder)),{"textarea&":{maxWidth:"100%",height:"auto",minHeight:e.controlHeight,lineHeight:e.lineHeight,verticalAlign:"bottom",transition:"all ".concat(e.motionDurationSlow,", height 0s"),resize:"vertical"},"&-lg":Object.assign({},d(e)),"&-sm":Object.assign({},p(e)),"&-rtl":{direction:"rtl"},"&-textarea-rtl":{direction:"rtl"}}),m=e=>{let{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 ".concat(t,", &-lg > ").concat(t,"-group-addon")]:Object.assign({},d(e)),["&-sm ".concat(t,", &-sm > ").concat(t,"-group-addon")]:Object.assign({},p(e)),["&-lg ".concat(n,"-select-single ").concat(n,"-select-selector")]:{height:e.controlHeightLG},["&-sm ".concat(n,"-select-single ").concat(n,"-select-selector")]:{height:e.controlHeightSM},["> ".concat(t)]:{display:"table-cell","&:not(:first-child):not(:last-child)":{borderRadius:0}},["".concat(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 ".concat((0,r.bf)(e.paddingInline)),color:e.colorText,fontWeight:"normal",fontSize:e.inputFontSize,textAlign:"center",borderRadius:e.borderRadius,transition:"all ".concat(e.motionDurationSlow),lineHeight:1,["".concat(n,"-select")]:{margin:"".concat((0,r.bf)(e.calc(e.paddingBlock).add(1).mul(-1).equal())," ").concat((0,r.bf)(e.calc(e.paddingInline).mul(-1).equal())),["&".concat(n,"-select-single:not(").concat(n,"-select-customize-input):not(").concat(n,"-pagination-size-changer)")]:{["".concat(n,"-select-selector")]:{backgroundColor:"inherit",border:"".concat((0,r.bf)(e.lineWidth)," ").concat(e.lineType," transparent"),boxShadow:"none"}},"&-open, &-focused":{["".concat(n,"-select-selector")]:{color:e.colorPrimary}}},["".concat(n,"-cascader-picker")]:{margin:"-9px ".concat((0,r.bf)(e.calc(e.paddingInline).mul(-1).equal())),backgroundColor:"transparent",["".concat(n,"-cascader-input")]:{textAlign:"start",border:0,boxShadow:"none"}}}},["".concat(t)]:{width:"100%",marginBottom:0,textAlign:"inherit","&:focus":{zIndex:1,borderInlineEndWidth:1},"&:hover":{zIndex:1,borderInlineEndWidth:1,["".concat(t,"-search-with-button &")]:{zIndex:0}}},["> ".concat(t,":first-child, ").concat(t,"-group-addon:first-child")]:{borderStartEndRadius:0,borderEndEndRadius:0,["".concat(n,"-select ").concat(n,"-select-selector")]:{borderStartEndRadius:0,borderEndEndRadius:0}},["> ".concat(t,"-affix-wrapper")]:{["&:not(:first-child) ".concat(t)]:{borderStartStartRadius:0,borderEndStartRadius:0},["&:not(:last-child) ".concat(t)]:{borderStartEndRadius:0,borderEndEndRadius:0}},["> ".concat(t,":last-child, ").concat(t,"-group-addon:last-child")]:{borderStartStartRadius:0,borderEndStartRadius:0,["".concat(n,"-select ").concat(n,"-select-selector")]:{borderStartStartRadius:0,borderEndStartRadius:0}},["".concat(t,"-affix-wrapper")]:{"&:not(:last-child)":{borderStartEndRadius:0,borderEndEndRadius:0,["".concat(t,"-search &")]:{borderStartStartRadius:e.borderRadius,borderEndStartRadius:e.borderRadius}},["&:not(:first-child), ".concat(t,"-search &:not(:first-child)")]:{borderStartStartRadius:0,borderEndStartRadius:0}},["&".concat(t,"-group-compact")]:Object.assign(Object.assign({display:"block"},(0,o.dF)()),{["".concat(t,"-group-addon, ").concat(t,"-group-wrap, > ").concat(t)]:{"&:not(:first-child):not(:last-child)":{borderInlineEndWidth:e.lineWidth,"&:hover":{zIndex:1},"&:focus":{zIndex:1}}},"& > *":{display:"inline-block",float:"none",verticalAlign:"top",borderRadius:0},["\n & > ".concat(t,"-affix-wrapper,\n & > ").concat(t,"-number-affix-wrapper,\n & > ").concat(n,"-picker-range\n ")]:{display:"inline-flex"},"& > *:not(:last-child)":{marginInlineEnd:e.calc(e.lineWidth).mul(-1).equal(),borderInlineEndWidth:e.lineWidth},["".concat(t)]:{float:"none"},["& > ".concat(n,"-select > ").concat(n,"-select-selector,\n & > ").concat(n,"-select-auto-complete ").concat(t,",\n & > ").concat(n,"-cascader-picker ").concat(t,",\n & > ").concat(t,"-group-wrapper ").concat(t)]:{borderInlineEndWidth:e.lineWidth,borderRadius:0,"&:hover":{zIndex:1},"&:focus":{zIndex:1}},["& > ".concat(n,"-select-focused")]:{zIndex:1},["& > ".concat(n,"-select > ").concat(n,"-select-arrow")]:{zIndex:1},["& > *:first-child,\n & > ".concat(n,"-select:first-child > ").concat(n,"-select-selector,\n & > ").concat(n,"-select-auto-complete:first-child ").concat(t,",\n & > ").concat(n,"-cascader-picker:first-child ").concat(t)]:{borderStartStartRadius:e.borderRadius,borderEndStartRadius:e.borderRadius},["& > *:last-child,\n & > ".concat(n,"-select:last-child > ").concat(n,"-select-selector,\n & > ").concat(n,"-cascader-picker:last-child ").concat(t,",\n & > ").concat(n,"-cascader-picker-focused:last-child ").concat(t)]:{borderInlineEndWidth:e.lineWidth,borderStartEndRadius:e.borderRadius,borderEndEndRadius:e.borderRadius},["& > ".concat(n,"-select-auto-complete ").concat(t)]:{verticalAlign:"top"},["".concat(t,"-group-wrapper + ").concat(t,"-group-wrapper")]:{marginInlineStart:e.calc(e.lineWidth).mul(-1).equal(),["".concat(t,"-affix-wrapper")]:{borderRadius:0}},["".concat(t,"-group-wrapper:not(:last-child)")]:{["&".concat(t,"-search > ").concat(t,"-group")]:{["& > ".concat(t,"-group-addon > ").concat(t,"-search-button")]:{borderRadius:0},["& > ".concat(t)]:{borderStartStartRadius:e.borderRadius,borderStartEndRadius:0,borderEndEndRadius:0,borderEndStartRadius:e.borderRadius}}}})}},g=e=>{let{componentCls:t,controlHeightSM:n,lineWidth:r,calc:a}=e,i=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({},(0,o.Wf)(e)),f(e)),(0,c.qG)(e)),(0,c.H8)(e)),(0,c.Mu)(e)),{'&[type="color"]':{height:e.controlHeight,["&".concat(t,"-lg")]:{height:e.controlHeightLG},["&".concat(t,"-sm")]:{height:n,paddingTop:i,paddingBottom:i}},'&[type="search"]::-webkit-search-cancel-button, &[type="search"]::-webkit-search-decoration':{"-webkit-appearance":"none"}})}},h=e=>{let{componentCls:t}=e;return{["".concat(t,"-clear-icon")]:{margin:0,color:e.colorTextQuaternary,fontSize:e.fontSizeIcon,verticalAlign:-1,cursor:"pointer",transition:"color ".concat(e.motionDurationSlow),"&:hover":{color:e.colorTextTertiary},"&:active":{color:e.colorText},"&-hidden":{visibility:"hidden"},"&-has-suffix":{margin:"0 ".concat((0,r.bf)(e.inputAffixPadding))}}}},b=e=>{let{componentCls:t,inputAffixPadding:n,colorTextDescription:r,motionDurationSlow:o,colorIcon:a,colorIconHover:i,iconCls:s}=e;return{["".concat(t,"-affix-wrapper")]:Object.assign(Object.assign(Object.assign(Object.assign({},f(e)),{display:"inline-flex",["&:not(".concat(t,"-disabled):hover")]:{zIndex:1,["".concat(t,"-search-with-button &")]:{zIndex:0}},"&-focused, &:focus":{zIndex:1},["> input".concat(t)]:{padding:0,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"'},["".concat(t)]:{"&-prefix, &-suffix":{display:"flex",flex:"none",alignItems:"center","> *:not(:last-child)":{marginInlineEnd:e.paddingXS}},"&-show-count-suffix":{color:r},"&-show-count-has-suffix":{marginInlineEnd:e.paddingXXS},"&-prefix":{marginInlineEnd:n},"&-suffix":{marginInlineStart:n}}}),h(e)),{["".concat(s).concat(t,"-password-icon")]:{color:a,cursor:"pointer",transition:"all ".concat(o),"&:hover":{color:i}}})}},y=e=>{let{componentCls:t,borderRadiusLG:n,borderRadiusSM:r}=e;return{["".concat(t,"-group")]:Object.assign(Object.assign(Object.assign({},(0,o.Wf)(e)),m(e)),{"&-rtl":{direction:"rtl"},"&-wrapper":Object.assign(Object.assign(Object.assign({display:"inline-block",width:"100%",textAlign:"start",verticalAlign:"top","&-rtl":{direction:"rtl"},"&-lg":{["".concat(t,"-group-addon")]:{borderRadius:n,fontSize:e.inputFontSizeLG}},"&-sm":{["".concat(t,"-group-addon")]:{borderRadius:r}}},(0,c.ir)(e)),(0,c.S5)(e)),{["&:not(".concat(t,"-compact-first-item):not(").concat(t,"-compact-last-item)").concat(t,"-compact-item")]:{["".concat(t,", ").concat(t,"-group-addon")]:{borderRadius:0}},["&:not(".concat(t,"-compact-last-item)").concat(t,"-compact-first-item")]:{["".concat(t,", ").concat(t,"-group-addon")]:{borderStartEndRadius:0,borderEndEndRadius:0}},["&:not(".concat(t,"-compact-first-item)").concat(t,"-compact-last-item")]:{["".concat(t,", ").concat(t,"-group-addon")]:{borderStartStartRadius:0,borderEndStartRadius:0}}})})}},v=e=>{let{componentCls:t,antCls:n}=e,r="".concat(t,"-search");return{[r]:{["".concat(t)]:{"&:hover, &:focus":{borderColor:e.colorPrimaryHover,["+ ".concat(t,"-group-addon ").concat(r,"-button:not(").concat(n,"-btn-primary)")]:{borderInlineStartColor:e.colorPrimaryHover}}},["".concat(t,"-affix-wrapper")]:{borderRadius:0},["".concat(t,"-lg")]:{lineHeight:e.calc(e.lineHeightLG).sub(2e-4).equal({unit:!1})},["> ".concat(t,"-group")]:{["> ".concat(t,"-group-addon:last-child")]:{insetInlineStart:-1,padding:0,border:0,["".concat(r,"-button")]:{paddingTop:0,paddingBottom:0,borderStartStartRadius:0,borderStartEndRadius:e.borderRadius,borderEndEndRadius:e.borderRadius,borderEndStartRadius:0,boxShadow:"none"},["".concat(r,"-button:not(").concat(n,"-btn-primary)")]:{color:e.colorTextDescription,"&:hover":{color:e.colorPrimaryHover},"&:active":{color:e.colorPrimaryActive},["&".concat(n,"-btn-loading::before")]:{insetInlineStart:0,insetInlineEnd:0,insetBlockStart:0,insetBlockEnd:0}}}},["".concat(r,"-button")]:{height:e.controlHeight,"&:hover, &:focus":{zIndex:1}},["&-large ".concat(r,"-button")]:{height:e.controlHeightLG},["&-small ".concat(r,"-button")]:{height:e.controlHeightSM},"&-rtl":{direction:"rtl"},["&".concat(t,"-compact-item")]:{["&:not(".concat(t,"-compact-last-item)")]:{["".concat(t,"-group-addon")]:{["".concat(t,"-search-button")]:{marginInlineEnd:e.calc(e.lineWidth).mul(-1).equal(),borderRadius:0}}},["&:not(".concat(t,"-compact-first-item)")]:{["".concat(t,",").concat(t,"-affix-wrapper")]:{borderRadius:0}},["> ".concat(t,"-group-addon ").concat(t,"-search-button,\n > ").concat(t,",\n ").concat(t,"-affix-wrapper")]:{"&:hover,&:focus,&:active":{zIndex:2}},["> ".concat(t,"-affix-wrapper-focused")]:{zIndex:2}}}}},E=e=>{let{componentCls:t,paddingLG:n}=e,r="".concat(t,"-textarea");return{[r]:{position:"relative","&-show-count":{["> ".concat(t)]:{height:"100%"},["".concat(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":{["> ".concat(t)]:{paddingInlineEnd:n}},["&-affix-wrapper".concat(r,"-has-feedback")]:{["".concat(t)]:{paddingInlineEnd:n}},["&-affix-wrapper".concat(t,"-affix-wrapper")]:{padding:0,["> textarea".concat(t)]:{fontSize:"inherit",border:"none",outline:"none",background:"transparent","&:focus":{boxShadow:"none !important"}},["".concat(t,"-suffix")]:{margin:0,"> *:not(:last-child)":{marginInline:0},["".concat(t,"-clear-icon")]:{position:"absolute",insetInlineEnd:e.paddingXS,insetBlockStart:e.paddingXS},["".concat(r,"-suffix")]:{position:"absolute",top:0,insetInlineEnd:e.paddingInline,bottom:0,zIndex:1,display:"inline-flex",alignItems:"center",margin:"auto",pointerEvents:"none"}}}}}},S=e=>{let{componentCls:t}=e;return{["".concat(t,"-out-of-range")]:{["&, & input, & textarea, ".concat(t,"-show-count-suffix, ").concat(t,"-data-count")]:{color:e.colorError}}}};t.ZP=(0,i.I$)("Input",e=>{let t=(0,s.TS)(e,(0,l.e)(e));return[g(t),E(t),b(t),y(t),v(t),S(t),(0,a.c)(t)]},l.T)},85980:function(e,t,n){n.d(t,{T:function(){return a},e:function(){return o}});var r=n(80316);function o(e){return(0,r.TS)(e,{inputAffixPadding:e.paddingXXS})}let a=e=>{let{controlHeight:t,fontSize:n,lineHeight:r,lineWidth:o,controlHeightSM:a,controlHeightLG:i,fontSizeLG:s,lineHeightLG:l,paddingSM:c,controlPaddingHorizontalSM:u,controlPaddingHorizontal:d,colorFillAlter:p,colorPrimaryHover:f,colorPrimary:m,controlOutlineWidth:g,controlOutline:h,colorErrorOutline:b,colorWarningOutline:y,colorBgContainer:v}=e;return{paddingBlock:Math.max(Math.round((t-n*r)/2*10)/10-o,0),paddingBlockSM:Math.max(Math.round((a-n*r)/2*10)/10-o,0),paddingBlockLG:Math.ceil((i-s*l)/2*10)/10-o,paddingInline:c-o,paddingInlineSM:u-o,paddingInlineLG:d-o,addonBg:p,activeBorderColor:m,hoverBorderColor:f,activeShadow:"0 0 0 ".concat(g,"px ").concat(h),errorActiveShadow:"0 0 0 ".concat(g,"px ").concat(b),warningActiveShadow:"0 0 0 ".concat(g,"px ").concat(y),hoverBg:v,activeBg:v,inputFontSize:n,inputFontSizeLG:s,inputFontSizeSM:n}}},61892:function(e,t,n){n.d(t,{H8:function(){return g},Mu:function(){return p},S5:function(){return b},ir:function(){return d},qG:function(){return c}});var r=n(8985),o=n(80316);let a=e=>({borderColor:e.hoverBorderColor,backgroundColor:e.hoverBg}),i=e=>({color:e.colorTextDisabled,backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder,boxShadow:"none",cursor:"not-allowed",opacity:1,"&:hover:not([disabled])":Object.assign({},a((0,o.TS)(e,{hoverBorderColor:e.colorBorder,hoverBg:e.colorBgContainerDisabled})))}),s=(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}}),l=(e,t)=>({["&".concat(e.componentCls,"-status-").concat(t.status,":not(").concat(e.componentCls,"-disabled)")]:Object.assign(Object.assign({},s(e,t)),{["".concat(e.componentCls,"-prefix, ").concat(e.componentCls,"-suffix")]:{color:t.affixColor}})}),c=(e,t)=>({"&-outlined":Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},s(e,{borderColor:e.colorBorder,hoverBorderColor:e.colorPrimaryHover,activeBorderColor:e.colorPrimary,activeShadow:e.activeShadow})),{["&".concat(e.componentCls,"-disabled, &[disabled]")]:Object.assign({},i(e))}),l(e,{status:"error",borderColor:e.colorError,hoverBorderColor:e.colorErrorBorderHover,activeBorderColor:e.colorError,activeShadow:e.errorActiveShadow,affixColor:e.colorError})),l(e,{status:"warning",borderColor:e.colorWarning,hoverBorderColor:e.colorWarningBorderHover,activeBorderColor:e.colorWarning,activeShadow:e.warningActiveShadow,affixColor:e.colorWarning})),t)}),u=(e,t)=>({["&".concat(e.componentCls,"-group-wrapper-status-").concat(t.status)]:{["".concat(e.componentCls,"-group-addon")]:{borderColor:t.addonBorderColor,color:t.addonColor}}}),d=e=>({"&-outlined":Object.assign(Object.assign(Object.assign({["".concat(e.componentCls,"-group")]:{"&-addon":{background:e.addonBg,border:"".concat((0,r.bf)(e.lineWidth)," ").concat(e.lineType," ").concat(e.colorBorder)},"&-addon:first-child":{borderInlineEnd:0},"&-addon:last-child":{borderInlineStart:0}}},u(e,{status:"error",addonBorderColor:e.colorError,addonColor:e.colorErrorText})),u(e,{status:"warning",addonBorderColor:e.colorWarning,addonColor:e.colorWarningText})),{["&".concat(e.componentCls,"-group-wrapper-disabled")]:{["".concat(e.componentCls,"-group-addon")]:Object.assign({},i(e))}})}),p=(e,t)=>({"&-borderless":Object.assign({background:"transparent",border:"none","&:focus, &:focus-within":{outline:"none"},["&".concat(e.componentCls,"-disabled, &[disabled]")]:{color:e.colorTextDisabled}},t)}),f=(e,t)=>({background:t.bg,borderWidth:e.lineWidth,borderStyle:e.lineType,borderColor:"transparent","input&, & input, textarea&, & textarea":{color:null==t?void 0:t.inputColor},"&:hover":{background:t.hoverBg},"&:focus, &:focus-within":{outline:0,borderColor:t.activeBorderColor,backgroundColor:e.activeBg}}),m=(e,t)=>({["&".concat(e.componentCls,"-status-").concat(t.status,":not(").concat(e.componentCls,"-disabled)")]:Object.assign(Object.assign({},f(e,t)),{["".concat(e.componentCls,"-prefix, ").concat(e.componentCls,"-suffix")]:{color:t.affixColor}})}),g=(e,t)=>({"&-filled":Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},f(e,{bg:e.colorFillTertiary,hoverBg:e.colorFillSecondary,activeBorderColor:e.colorPrimary})),{["&".concat(e.componentCls,"-disabled, &[disabled]")]:Object.assign({},i(e))}),m(e,{status:"error",bg:e.colorErrorBg,hoverBg:e.colorErrorBgHover,activeBorderColor:e.colorError,inputColor:e.colorErrorText,affixColor:e.colorError})),m(e,{status:"warning",bg:e.colorWarningBg,hoverBg:e.colorWarningBgHover,activeBorderColor:e.colorWarning,inputColor:e.colorWarningText,affixColor:e.colorWarning})),t)}),h=(e,t)=>({["&".concat(e.componentCls,"-group-wrapper-status-").concat(t.status)]:{["".concat(e.componentCls,"-group-addon")]:{background:t.addonBg,color:t.addonColor}}}),b=e=>({"&-filled":Object.assign(Object.assign(Object.assign({["".concat(e.componentCls,"-group")]:{"&-addon":{background:e.colorFillTertiary},["".concat(e.componentCls,"-filled:not(:focus):not(:focus-within)")]:{"&:not(:first-child)":{borderInlineStart:"".concat((0,r.bf)(e.lineWidth)," ").concat(e.lineType," ").concat(e.colorSplit)},"&:not(:last-child)":{borderInlineEnd:"".concat((0,r.bf)(e.lineWidth)," ").concat(e.lineType," ").concat(e.colorSplit)}}}},h(e,{status:"error",addonBg:e.colorErrorBg,addonColor:e.colorErrorText})),h(e,{status:"warning",addonBg:e.colorWarningBg,addonColor:e.colorWarningText})),{["&".concat(e.componentCls,"-group-wrapper-disabled")]:{["".concat(e.componentCls,"-group")]:{"&-addon":{background:e.colorFillTertiary,color:e.colorTextDisabled},"&-addon:first-child":{borderInlineStart:"".concat((0,r.bf)(e.lineWidth)," ").concat(e.lineType," ").concat(e.colorBorder),borderTop:"".concat((0,r.bf)(e.lineWidth)," ").concat(e.lineType," ").concat(e.colorBorder),borderBottom:"".concat((0,r.bf)(e.lineWidth)," ").concat(e.lineType," ").concat(e.colorBorder)},"&-addon:last-child":{borderInlineEnd:"".concat((0,r.bf)(e.lineWidth)," ").concat(e.lineType," ").concat(e.colorBorder),borderTop:"".concat((0,r.bf)(e.lineWidth)," ").concat(e.lineType," ").concat(e.colorBorder),borderBottom:"".concat((0,r.bf)(e.lineWidth)," ").concat(e.lineType," ").concat(e.colorBorder)}}}})})},25839:function(e,t,n){let r;n.d(t,{D:function(){return S},Z:function(){return x}});var o=n(64090),a=n(14749),i={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"},s=n(60688),l=o.forwardRef(function(e,t){return o.createElement(s.Z,(0,a.Z)({},e,{ref:t,icon:i}))}),c={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"},u=o.forwardRef(function(e,t){return o.createElement(s.Z,(0,a.Z)({},e,{ref:t,icon:c}))}),d={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"},p=o.forwardRef(function(e,t){return o.createElement(s.Z,(0,a.Z)({},e,{ref:t,icon:d}))}),f=n(16480),m=n.n(f),g=n(35704),h=e=>!isNaN(parseFloat(e))&&isFinite(e),b=n(57499),y=n(31747),v=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);ot.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};let E={xs:"479.98px",sm:"575.98px",md:"767.98px",lg:"991.98px",xl:"1199.98px",xxl:"1599.98px"},S=o.createContext({}),w=(r=0,function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return r+=1,"".concat(e).concat(r)});var x=o.forwardRef((e,t)=>{let{prefixCls:n,className:r,trigger:a,children:i,defaultCollapsed:s=!1,theme:c="dark",style:d={},collapsible:f=!1,reverseArrow:x=!1,width:O=200,collapsedWidth:A=80,zeroWidthTriggerStyle:T,breakpoint:C,onCollapse:k,onBreakpoint:I}=e,N=v(e,["prefixCls","className","trigger","children","defaultCollapsed","theme","style","collapsible","reverseArrow","width","collapsedWidth","zeroWidthTriggerStyle","breakpoint","onCollapse","onBreakpoint"]),{siderHook:_}=(0,o.useContext)(y.V),[R,P]=(0,o.useState)("collapsed"in e?e.collapsed:s),[M,L]=(0,o.useState)(!1);(0,o.useEffect)(()=>{"collapsed"in e&&P(e.collapsed)},[e.collapsed]);let D=(t,n)=>{"collapsed"in e||P(t),null==k||k(t,n)},j=(0,o.useRef)();j.current=e=>{L(e.matches),null==I||I(e.matches),R!==e.matches&&D(e.matches,"responsive")},(0,o.useEffect)(()=>{let e;function t(e){return j.current(e)}{let{matchMedia:n}=window;if(n&&C&&C in E){e=n("screen and (max-width: ".concat(E[C],")"));try{e.addEventListener("change",t)}catch(n){e.addListener(t)}t(e)}}return()=>{try{null==e||e.removeEventListener("change",t)}catch(n){null==e||e.removeListener(t)}}},[C]),(0,o.useEffect)(()=>{let e=w("ant-sider-");return _.addSider(e),()=>_.removeSider(e)},[]);let F=()=>{D(!R,"clickTrigger")},{getPrefixCls:B}=(0,o.useContext)(b.E_),U=o.useMemo(()=>({siderCollapsed:R}),[R]);return o.createElement(S.Provider,{value:U},(()=>{let e=B("layout-sider",n),s=(0,g.Z)(N,["collapsed"]),b=R?A:O,y=h(b)?"".concat(b,"px"):String(b),v=0===parseFloat(String(A||0))?o.createElement("span",{onClick:F,className:m()("".concat(e,"-zero-width-trigger"),"".concat(e,"-zero-width-trigger-").concat(x?"right":"left")),style:T},a||o.createElement(l,null)):null,E={expanded:x?o.createElement(p,null):o.createElement(u,null),collapsed:x?o.createElement(u,null):o.createElement(p,null)}[R?"collapsed":"expanded"],S=null!==a?v||o.createElement("div",{className:"".concat(e,"-trigger"),onClick:F,style:{width:y}},a||E):null,w=Object.assign(Object.assign({},d),{flex:"0 0 ".concat(y),maxWidth:y,minWidth:y,width:y}),C=m()(e,"".concat(e,"-").concat(c),{["".concat(e,"-collapsed")]:!!R,["".concat(e,"-has-trigger")]:f&&null!==a&&!v,["".concat(e,"-below")]:!!M,["".concat(e,"-zero-width")]:0===parseFloat(y)},r);return o.createElement("aside",Object.assign({className:C},s,{style:w,ref:t}),o.createElement("div",{className:"".concat(e,"-children")},i),f||M&&v?S:null)})())})},31747:function(e,t,n){n.d(t,{V:function(){return r}});let r=n(64090).createContext({siderHook:{addSider:()=>null,removeSider:()=>null}})},33509:function(e,t,n){n.d(t,{default:function(){return A}});var r=n(63787),o=n(64090),a=n(16480),i=n.n(a),s=n(35704),l=n(57499),c=n(31747),u=n(33054),d=n(25839),p=n(8985),f=n(76585),m=e=>{let{componentCls:t,bodyBg:n,lightSiderBg:r,lightTriggerBg:o,lightTriggerColor:a}=e;return{["".concat(t,"-sider-light")]:{background:r,["".concat(t,"-sider-trigger")]:{color:a,background:o},["".concat(t,"-sider-zero-width-trigger")]:{color:a,background:o,border:"1px solid ".concat(n),borderInlineStart:0}}}};let g=e=>{let{antCls:t,componentCls:n,colorText:r,triggerColor:o,footerBg:a,triggerBg:i,headerHeight:s,headerPadding:l,headerColor:c,footerPadding:u,triggerHeight:d,zeroTriggerHeight:f,zeroTriggerWidth:g,motionDurationMid:h,motionDurationSlow:b,fontSize:y,borderRadius:v,bodyBg:E,headerBg:S,siderBg:w}=e;return{[n]:Object.assign(Object.assign({display:"flex",flex:"auto",flexDirection:"column",minHeight:0,background:E,"&, *":{boxSizing:"border-box"},["&".concat(n,"-has-sider")]:{flexDirection:"row",["> ".concat(n,", > ").concat(n,"-content")]:{width:0}},["".concat(n,"-header, &").concat(n,"-footer")]:{flex:"0 0 auto"},["".concat(n,"-sider")]:{position:"relative",minWidth:0,background:w,transition:"all ".concat(h,", background 0s"),"&-children":{height:"100%",marginTop:-.1,paddingTop:.1,["".concat(t,"-menu").concat(t,"-menu-inline-collapsed")]:{width:"auto"}},"&-has-trigger":{paddingBottom:d},"&-right":{order:1},"&-trigger":{position:"fixed",bottom:0,zIndex:1,height:d,color:o,lineHeight:(0,p.bf)(d),textAlign:"center",background:i,cursor:"pointer",transition:"all ".concat(h)},"&-zero-width":{"> *":{overflow:"hidden"},"&-trigger":{position:"absolute",top:s,insetInlineEnd:e.calc(g).mul(-1).equal(),zIndex:1,width:g,height:f,color:o,fontSize:e.fontSizeXL,display:"flex",alignItems:"center",justifyContent:"center",background:w,borderStartStartRadius:0,borderStartEndRadius:v,borderEndEndRadius:v,borderEndStartRadius:0,cursor:"pointer",transition:"background ".concat(b," ease"),"&::after":{position:"absolute",inset:0,background:"transparent",transition:"all ".concat(b),content:'""'},"&:hover::after":{background:"rgba(255, 255, 255, 0.2)"},"&-right":{insetInlineStart:e.calc(g).mul(-1).equal(),borderStartStartRadius:v,borderStartEndRadius:0,borderEndEndRadius:0,borderEndStartRadius:v}}}}},m(e)),{"&-rtl":{direction:"rtl"}}),["".concat(n,"-header")]:{height:s,padding:l,color:c,lineHeight:(0,p.bf)(s),background:S,["".concat(t,"-menu")]:{lineHeight:"inherit"}},["".concat(n,"-footer")]:{padding:u,color:r,fontSize:y,background:a},["".concat(n,"-content")]:{flex:"auto",minHeight:0}}};var h=(0,f.I$)("Layout",e=>[g(e)],e=>{let{colorBgLayout:t,controlHeight:n,controlHeightLG:r,colorText:o,controlHeightSM:a,marginXXS:i,colorTextLightSolid:s,colorBgContainer:l}=e,c=1.25*r;return{colorBgHeader:"#001529",colorBgBody:t,colorBgTrigger:"#002140",bodyBg:t,headerBg:"#001529",headerHeight:2*n,headerPadding:"0 ".concat(c,"px"),headerColor:o,footerPadding:"".concat(a,"px ").concat(c,"px"),footerBg:t,siderBg:"#001529",triggerHeight:r+2*i,triggerBg:"#002140",triggerColor:s,zeroTriggerWidth:r,zeroTriggerHeight:r,lightSiderBg:l,lightTriggerBg:l,lightTriggerColor:o}},{deprecatedTokens:[["colorBgBody","bodyBg"],["colorBgHeader","headerBg"],["colorBgTrigger","triggerBg"]]}),b=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);ot.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};function y(e){let{suffixCls:t,tagName:n,displayName:r}=e;return e=>o.forwardRef((r,a)=>o.createElement(e,Object.assign({ref:a,suffixCls:t,tagName:n},r)))}let v=o.forwardRef((e,t)=>{let{prefixCls:n,suffixCls:r,className:a,tagName:s}=e,c=b(e,["prefixCls","suffixCls","className","tagName"]),{getPrefixCls:u}=o.useContext(l.E_),d=u("layout",n),[p,f,m]=h(d),g=r?"".concat(d,"-").concat(r):d;return p(o.createElement(s,Object.assign({className:i()(n||g,a,f,m),ref:t},c)))}),E=o.forwardRef((e,t)=>{let{direction:n}=o.useContext(l.E_),[a,p]=o.useState([]),{prefixCls:f,className:m,rootClassName:g,children:y,hasSider:v,tagName:E,style:S}=e,w=b(e,["prefixCls","className","rootClassName","children","hasSider","tagName","style"]),x=(0,s.Z)(w,["suffixCls"]),{getPrefixCls:O,layout:A}=o.useContext(l.E_),T=O("layout",f),C="boolean"==typeof v?v:!!a.length||(0,u.Z)(y).some(e=>e.type===d.Z),[k,I,N]=h(T),_=i()(T,{["".concat(T,"-has-sider")]:C,["".concat(T,"-rtl")]:"rtl"===n},null==A?void 0:A.className,m,g,I,N),R=o.useMemo(()=>({siderHook:{addSider:e=>{p(t=>[].concat((0,r.Z)(t),[e]))},removeSider:e=>{p(t=>t.filter(t=>t!==e))}}}),[]);return k(o.createElement(c.V.Provider,{value:R},o.createElement(E,Object.assign({ref:t,className:_,style:Object.assign(Object.assign({},null==A?void 0:A.style),S)},x),y)))}),S=y({tagName:"div",displayName:"Layout"})(E),w=y({suffixCls:"header",tagName:"header",displayName:"Header"})(v),x=y({suffixCls:"footer",tagName:"footer",displayName:"Footer"})(v),O=y({suffixCls:"content",tagName:"main",displayName:"Content"})(v);S.Header=w,S.Footer=x,S.Content=O,S.Sider=d.Z,S._InternalSiderContext=d.D;var A=S},33302:function(e,t,n){let r=(0,n(64090).createContext)(void 0);t.Z=r},79474:function(e,t,n){n.d(t,{Z:function(){return i}});var r={placeholder:"Select time",rangePlaceholder:["Start time","End time"]};let o={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"]},{locale:"en_US",today:"Today",now:"Now",backToToday:"Back to today",ok:"OK",clear:"Clear",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",yearFormat:"YYYY",dateFormat:"M/D/YYYY",dayFormat:"D",dateTimeFormat:"M/D/YYYY HH:mm:ss",monthBeforeYear:!0,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"}),timePickerLocale:Object.assign({},r)},a="${label} is not a valid ${type}";var i={locale:"en",Pagination:{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"},DatePicker:o,TimePicker:r,Calendar:o,global:{placeholder:"Please select"},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",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"},PageHeader:{back:"Back"},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:a,method:a,array:a,object:a,number:a,date:a,boolean:a,integer:a,float:a,regexp:a,email:a,url:a,hex:a},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"}}},70595:function(e,t,n){var r=n(64090),o=n(33302),a=n(79474);t.Z=(e,t)=>{let n=r.useContext(o.Z);return[r.useMemo(()=>{var r;let o=t||a.Z[e],i=null!==(r=null==n?void 0:n[e])&&void 0!==r?r:{};return Object.assign(Object.assign({},"function"==typeof o?o():o),i||{})},[e,t,n]),r.useMemo(()=>{let e=null==n?void 0:n.locale;return(null==n?void 0:n.exist)&&!e?a.Z.locale:e},[n])]}},30569:function(e,t,n){n.d(t,{Z:function(){return tb}});var r=n(64090),o=n(14749),a=n(50833),i=n(5239),s=n(63787),l=n(80406),c=n(6787),u=n(16480),d=n.n(u),p=n(54739),f=n(44329),m=n(92536),g=n(53850),h=n(89542),b=r.createContext(null);function y(e,t){return void 0===e?null:"".concat(e,"-").concat(t)}function v(e){return y(r.useContext(b),e)}var E=n(61475),S=["children","locked"],w=r.createContext(null);function x(e){var t=e.children,n=e.locked,o=(0,c.Z)(e,S),a=r.useContext(w),s=(0,E.Z)(function(){var e;return e=(0,i.Z)({},a),Object.keys(o).forEach(function(t){var n=o[t];void 0!==n&&(e[t]=n)}),e},[a,o],function(e,t){return!n&&(e[0]!==t[0]||!(0,m.Z)(e[1],t[1],!0))});return r.createElement(w.Provider,{value:s},t)}var O=r.createContext(null);function A(){return r.useContext(O)}var T=r.createContext([]);function C(e){var t=r.useContext(T);return r.useMemo(function(){return void 0!==e?[].concat((0,s.Z)(t),[e]):t},[t,e])}var k=r.createContext(null),I=r.createContext({}),N=n(73193);function _(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if((0,N.Z)(e)){var n=e.nodeName.toLowerCase(),r=["input","select","textarea","button"].includes(n)||e.isContentEditable||"a"===n&&!!e.getAttribute("href"),o=e.getAttribute("tabindex"),a=Number(o),i=null;return o&&!Number.isNaN(a)?i=a:r&&null===i&&(i=0),r&&e.disabled&&(i=null),null!==i&&(i>=0||t&&i<0)}return!1}var R=n(4295),P=n(19223),M=R.Z.LEFT,L=R.Z.RIGHT,D=R.Z.UP,j=R.Z.DOWN,F=R.Z.ENTER,B=R.Z.ESC,U=R.Z.HOME,Z=R.Z.END,z=[D,j,M,L];function H(e,t){return(function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=(0,s.Z)(e.querySelectorAll("*")).filter(function(e){return _(e,t)});return _(e,t)&&n.unshift(e),n})(e,!0).filter(function(e){return t.has(e)})}function G(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;if(!e)return null;var o=H(e,t),a=o.length,i=o.findIndex(function(e){return n===e});return r<0?-1===i?i=a-1:i-=1:r>0&&(i+=1),o[i=(i+a)%a]}var $=function(e,t){var n=new Set,r=new Map,o=new Map;return e.forEach(function(e){var a=document.querySelector("[data-menu-id='".concat(y(t,e),"']"));a&&(n.add(a),o.set(a,e),r.set(e,a))}),{elements:n,key2element:r,element2key:o}},W="__RC_UTIL_PATH_SPLIT__",V=function(e){return e.join(W)},q="rc-menu-more";function Y(e){var t=r.useRef(e);t.current=e;var n=r.useCallback(function(){for(var e,n=arguments.length,r=Array(n),o=0;o1&&(O.motionAppear=!1);var A=O.onVisibleChanged;return(O.onVisibleChanged=function(e){return h.current||e||E(!0),null==A?void 0:A(e)},v)?null:r.createElement(x,{mode:c,locked:!h.current},r.createElement(eT.ZP,(0,o.Z)({visible:S},O,{forceRender:p,removeOnLeave:!1,leavedClassName:"".concat(d,"-hidden")}),function(e){var n=e.className,o=e.style;return r.createElement(eh,{id:t,className:n,style:o},s)}))}var ek=["style","className","title","eventKey","warnKey","disabled","internalPopupClose","children","itemIcon","expandIcon","popupClassName","popupOffset","popupStyle","onClick","onMouseEnter","onMouseLeave","onTitleClick","onTitleMouseEnter","onTitleMouseLeave"],eI=["active"],eN=function(e){var t,n=e.style,s=e.className,u=e.title,f=e.eventKey,m=(e.warnKey,e.disabled),g=e.internalPopupClose,h=e.children,b=e.itemIcon,y=e.expandIcon,E=e.popupClassName,S=e.popupOffset,O=e.popupStyle,A=e.onClick,T=e.onMouseEnter,N=e.onMouseLeave,_=e.onTitleClick,R=e.onTitleMouseEnter,P=e.onTitleMouseLeave,M=(0,c.Z)(e,ek),L=v(f),D=r.useContext(w),j=D.prefixCls,F=D.mode,B=D.openKeys,U=D.disabled,Z=D.overflowDisabled,z=D.activeKey,H=D.selectedKeys,G=D.itemIcon,$=D.expandIcon,W=D.onItemClick,V=D.onOpenChange,q=D.onActive,K=r.useContext(I)._internalRenderSubMenuItem,X=r.useContext(k).isSubPathKey,Q=C(),J="".concat(j,"-submenu"),ee=U||m,et=r.useRef(),en=r.useRef(),er=null!=y?y:$,es=B.includes(f),ec=!Z&&es,eu=X(H,f),ed=eo(f,ee,R,P),ep=ed.active,ef=(0,c.Z)(ed,eI),em=r.useState(!1),eg=(0,l.Z)(em,2),eb=eg[0],ey=eg[1],ev=function(e){ee||ey(e)},eE=r.useMemo(function(){return ep||"inline"!==F&&(eb||X([z],f))},[F,ep,z,eb,f,X]),eS=ea(Q.length),ew=Y(function(e){null==A||A(el(e)),W(e)}),ex=L&&"".concat(L,"-popup"),eO=r.createElement("div",(0,o.Z)({role:"menuitem",style:eS,className:"".concat(J,"-title"),tabIndex:ee?null:-1,ref:et,title:"string"==typeof u?u:null,"data-menu-id":Z&&L?null:L,"aria-expanded":ec,"aria-haspopup":!0,"aria-controls":ex,"aria-disabled":ee,onClick:function(e){ee||(null==_||_({key:f,domEvent:e}),"inline"===F&&V(f,!es))},onFocus:function(){q(f)}},ef),u,r.createElement(ei,{icon:"horizontal"!==F?er:void 0,props:(0,i.Z)((0,i.Z)({},e),{},{isOpen:ec,isSubMenu:!0})},r.createElement("i",{className:"".concat(J,"-arrow")}))),eT=r.useRef(F);if("inline"!==F&&Q.length>1?eT.current="vertical":eT.current=F,!Z){var eN=eT.current;eO=r.createElement(eA,{mode:eN,prefixCls:J,visible:!g&&ec&&"inline"!==F,popupClassName:E,popupOffset:S,popupStyle:O,popup:r.createElement(x,{mode:"horizontal"===eN?"vertical":eN},r.createElement(eh,{id:ex,ref:en},h)),disabled:ee,onVisibleChange:function(e){"inline"!==F&&V(f,e)}},eO)}var e_=r.createElement(p.Z.Item,(0,o.Z)({role:"none"},M,{component:"li",style:n,className:d()(J,"".concat(J,"-").concat(F),s,(t={},(0,a.Z)(t,"".concat(J,"-open"),ec),(0,a.Z)(t,"".concat(J,"-active"),eE),(0,a.Z)(t,"".concat(J,"-selected"),eu),(0,a.Z)(t,"".concat(J,"-disabled"),ee),t)),onMouseEnter:function(e){ev(!0),null==T||T({key:f,domEvent:e})},onMouseLeave:function(e){ev(!1),null==N||N({key:f,domEvent:e})}}),eO,!Z&&r.createElement(eC,{id:ex,open:ec,keyPath:Q},h));return K&&(e_=K(e_,e,{selected:eu,active:eE,open:ec,disabled:ee})),r.createElement(x,{onItemClick:ew,mode:"horizontal"===F?"vertical":F,itemIcon:null!=b?b:G,expandIcon:er},e_)};function e_(e){var t,n=e.eventKey,o=e.children,a=C(n),i=ey(o,a),s=A();return r.useEffect(function(){if(s)return s.registerPath(n,a),function(){s.unregisterPath(n,a)}},[a]),t=s?i:r.createElement(eN,e,i),r.createElement(T.Provider,{value:a},t)}var eR=n(6976),eP=["className","title","eventKey","children"],eM=["children"],eL=function(e){var t=e.className,n=e.title,a=(e.eventKey,e.children),i=(0,c.Z)(e,eP),s=r.useContext(w).prefixCls,l="".concat(s,"-item-group");return r.createElement("li",(0,o.Z)({role:"presentation"},i,{onClick:function(e){return e.stopPropagation()},className:d()(l,t)}),r.createElement("div",{role:"presentation",className:"".concat(l,"-title"),title:"string"==typeof n?n:void 0},n),r.createElement("ul",{role:"group",className:"".concat(l,"-list")},a))};function eD(e){var t=e.children,n=(0,c.Z)(e,eM),o=ey(t,C(n.eventKey));return A()?o:r.createElement(eL,(0,en.Z)(n,["warnKey"]),o)}function ej(e){var t=e.className,n=e.style,o=r.useContext(w).prefixCls;return A()?null:r.createElement("li",{role:"separator",className:d()("".concat(o,"-item-divider"),t),style:n})}var eF=["label","children","key","type"],eB=["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"],eU=[],eZ=r.forwardRef(function(e,t){var n,u,g,y,v,E,S,w,A,T,C,N,_,R,Q,J,ee,et,en,er,eo,ea,ei,es,ec,eu,ed,ep=e.prefixCls,ef=void 0===ep?"rc-menu":ep,eg=e.rootClassName,eh=e.style,eb=e.className,ev=e.tabIndex,eE=e.items,eS=e.children,ew=e.direction,ex=e.id,eO=e.mode,eA=void 0===eO?"vertical":eO,eT=e.inlineCollapsed,eC=e.disabled,ek=e.disabledOverflow,eI=e.subMenuOpenDelay,eN=e.subMenuCloseDelay,eP=e.forceSubMenuRender,eM=e.defaultOpenKeys,eL=e.openKeys,eZ=e.activeKey,ez=e.defaultActiveFirst,eH=e.selectable,eG=void 0===eH||eH,e$=e.multiple,eW=void 0!==e$&&e$,eV=e.defaultSelectedKeys,eq=e.selectedKeys,eY=e.onSelect,eK=e.onDeselect,eX=e.inlineIndent,eQ=e.motion,eJ=e.defaultMotions,e0=e.triggerSubMenuAction,e1=e.builtinPlacements,e2=e.itemIcon,e4=e.expandIcon,e3=e.overflowedIndicator,e6=void 0===e3?"...":e3,e5=e.overflowedIndicatorPopupClassName,e8=e.getPopupContainer,e9=e.onClick,e7=e.onOpenChange,te=e.onKeyDown,tt=(e.openAnimation,e.openTransitionName,e._internalRenderMenuItem),tn=e._internalRenderSubMenuItem,tr=(0,c.Z)(e,eB),to=r.useMemo(function(){var e;return e=eS,eE&&(e=function e(t){return(t||[]).map(function(t,n){if(t&&"object"===(0,eR.Z)(t)){var a=t.label,i=t.children,s=t.key,l=t.type,u=(0,c.Z)(t,eF),d=null!=s?s:"tmp-".concat(n);return i||"group"===l?"group"===l?r.createElement(eD,(0,o.Z)({key:d},u,{title:a}),e(i)):r.createElement(e_,(0,o.Z)({key:d},u,{title:a}),e(i)):"divider"===l?r.createElement(ej,(0,o.Z)({key:d},u)):r.createElement(em,(0,o.Z)({key:d},u),a)}return null}).filter(function(e){return e})}(eE)),ey(e,eU)},[eS,eE]),ta=r.useState(!1),ti=(0,l.Z)(ta,2),ts=ti[0],tl=ti[1],tc=r.useRef(),tu=(n=(0,f.Z)(ex,{value:ex}),g=(u=(0,l.Z)(n,2))[0],y=u[1],r.useEffect(function(){X+=1;var e="".concat(K,"-").concat(X);y("rc-menu-uuid-".concat(e))},[]),g),td="rtl"===ew,tp=(0,f.Z)(eM,{value:eL,postState:function(e){return e||eU}}),tf=(0,l.Z)(tp,2),tm=tf[0],tg=tf[1],th=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];function n(){tg(e),null==e7||e7(e)}t?(0,h.flushSync)(n):n()},tb=r.useState(tm),ty=(0,l.Z)(tb,2),tv=ty[0],tE=ty[1],tS=r.useRef(!1),tw=r.useMemo(function(){return("inline"===eA||"vertical"===eA)&&eT?["vertical",eT]:[eA,!1]},[eA,eT]),tx=(0,l.Z)(tw,2),tO=tx[0],tA=tx[1],tT="inline"===tO,tC=r.useState(tO),tk=(0,l.Z)(tC,2),tI=tk[0],tN=tk[1],t_=r.useState(tA),tR=(0,l.Z)(t_,2),tP=tR[0],tM=tR[1];r.useEffect(function(){tN(tO),tM(tA),tS.current&&(tT?tg(tv):th(eU))},[tO,tA]);var tL=r.useState(0),tD=(0,l.Z)(tL,2),tj=tD[0],tF=tD[1],tB=tj>=to.length-1||"horizontal"!==tI||ek;r.useEffect(function(){tT&&tE(tm)},[tm]),r.useEffect(function(){return tS.current=!0,function(){tS.current=!1}},[]);var tU=(v=r.useState({}),E=(0,l.Z)(v,2)[1],S=(0,r.useRef)(new Map),w=(0,r.useRef)(new Map),A=r.useState([]),C=(T=(0,l.Z)(A,2))[0],N=T[1],_=(0,r.useRef)(0),R=(0,r.useRef)(!1),Q=function(){R.current||E({})},J=(0,r.useCallback)(function(e,t){var n=V(t);w.current.set(n,e),S.current.set(e,n),_.current+=1;var r=_.current;Promise.resolve().then(function(){r===_.current&&Q()})},[]),ee=(0,r.useCallback)(function(e,t){var n=V(t);w.current.delete(n),S.current.delete(e)},[]),et=(0,r.useCallback)(function(e){N(e)},[]),en=(0,r.useCallback)(function(e,t){var n=(S.current.get(e)||"").split(W);return t&&C.includes(n[0])&&n.unshift(q),n},[C]),er=(0,r.useCallback)(function(e,t){return e.some(function(e){return en(e,!0).includes(t)})},[en]),eo=(0,r.useCallback)(function(e){var t="".concat(S.current.get(e)).concat(W),n=new Set;return(0,s.Z)(w.current.keys()).forEach(function(e){e.startsWith(t)&&n.add(w.current.get(e))}),n},[]),r.useEffect(function(){return function(){R.current=!0}},[]),{registerPath:J,unregisterPath:ee,refreshOverflowKeys:et,isSubPathKey:er,getKeyPath:en,getKeys:function(){var e=(0,s.Z)(S.current.keys());return C.length&&e.push(q),e},getSubPathKeys:eo}),tZ=tU.registerPath,tz=tU.unregisterPath,tH=tU.refreshOverflowKeys,tG=tU.isSubPathKey,t$=tU.getKeyPath,tW=tU.getKeys,tV=tU.getSubPathKeys,tq=r.useMemo(function(){return{registerPath:tZ,unregisterPath:tz}},[tZ,tz]),tY=r.useMemo(function(){return{isSubPathKey:tG}},[tG]);r.useEffect(function(){tH(tB?eU:to.slice(tj+1).map(function(e){return e.key}))},[tj,tB]);var tK=(0,f.Z)(eZ||ez&&(null===(eu=to[0])||void 0===eu?void 0:eu.key),{value:eZ}),tX=(0,l.Z)(tK,2),tQ=tX[0],tJ=tX[1],t0=Y(function(e){tJ(e)}),t1=Y(function(){tJ(void 0)});(0,r.useImperativeHandle)(t,function(){return{list:tc.current,focus:function(e){var t,n,r=$(tW(),tu),o=r.elements,a=r.key2element,i=r.element2key,s=H(tc.current,o),l=null!=tQ?tQ:s[0]?i.get(s[0]):null===(t=to.find(function(e){return!e.props.disabled}))||void 0===t?void 0:t.key,c=a.get(l);l&&c&&(null==c||null===(n=c.focus)||void 0===n||n.call(c,e))}}});var t2=(0,f.Z)(eV||[],{value:eq,postState:function(e){return Array.isArray(e)?e:null==e?eU:[e]}}),t4=(0,l.Z)(t2,2),t3=t4[0],t6=t4[1],t5=function(e){if(eG){var t,n=e.key,r=t3.includes(n);t6(t=eW?r?t3.filter(function(e){return e!==n}):[].concat((0,s.Z)(t3),[n]):[n]);var o=(0,i.Z)((0,i.Z)({},e),{},{selectedKeys:t});r?null==eK||eK(o):null==eY||eY(o)}!eW&&tm.length&&"inline"!==tI&&th(eU)},t8=Y(function(e){null==e9||e9(el(e)),t5(e)}),t9=Y(function(e,t){var n=tm.filter(function(t){return t!==e});if(t)n.push(e);else if("inline"!==tI){var r=tV(e);n=n.filter(function(e){return!r.has(e)})}(0,m.Z)(tm,n,!0)||th(n,!0)}),t7=(ea=function(e,t){var n=null!=t?t:!tm.includes(e);t9(e,n)},ei=r.useRef(),(es=r.useRef()).current=tQ,ec=function(){P.Z.cancel(ei.current)},r.useEffect(function(){return function(){ec()}},[]),function(e){var t=e.which;if([].concat(z,[F,B,U,Z]).includes(t)){var n=tW(),r=$(n,tu),o=r,i=o.elements,s=o.key2element,l=o.element2key,c=function(e,t){for(var n=e||document.activeElement;n;){if(t.has(n))return n;n=n.parentElement}return null}(s.get(tQ),i),u=l.get(c),d=function(e,t,n,r){var o,i,s,l,c="prev",u="next",d="children",p="parent";if("inline"===e&&r===F)return{inlineTrigger:!0};var f=(o={},(0,a.Z)(o,D,c),(0,a.Z)(o,j,u),o),m=(i={},(0,a.Z)(i,M,n?u:c),(0,a.Z)(i,L,n?c:u),(0,a.Z)(i,j,d),(0,a.Z)(i,F,d),i),g=(s={},(0,a.Z)(s,D,c),(0,a.Z)(s,j,u),(0,a.Z)(s,F,d),(0,a.Z)(s,B,p),(0,a.Z)(s,M,n?d:p),(0,a.Z)(s,L,n?p:d),s);switch(null===(l=({inline:f,horizontal:m,vertical:g,inlineSub:f,horizontalSub:g,verticalSub:g})["".concat(e).concat(t?"":"Sub")])||void 0===l?void 0:l[r]){case c:return{offset:-1,sibling:!0};case u:return{offset:1,sibling:!0};case p:return{offset:-1,sibling:!1};case d:return{offset:1,sibling:!1};default:return null}}(tI,1===t$(u,!0).length,td,t);if(!d&&t!==U&&t!==Z)return;(z.includes(t)||[U,Z].includes(t))&&e.preventDefault();var p=function(e){if(e){var t=e,n=e.querySelector("a");null!=n&&n.getAttribute("href")&&(t=n);var r=l.get(e);tJ(r),ec(),ei.current=(0,P.Z)(function(){es.current===r&&t.focus()})}};if([U,Z].includes(t)||d.sibling||!c){var f,m=H(f=c&&"inline"!==tI?function(e){for(var t=e;t;){if(t.getAttribute("data-menu-list"))return t;t=t.parentElement}return null}(c):tc.current,i);p(t===U?m[0]:t===Z?m[m.length-1]:G(f,i,c,d.offset))}else if(d.inlineTrigger)ea(u);else if(d.offset>0)ea(u,!0),ec(),ei.current=(0,P.Z)(function(){r=$(n,tu);var e=c.getAttribute("aria-controls");p(G(document.getElementById(e),r.elements))},5);else if(d.offset<0){var g=t$(u,!0),h=g[g.length-2],b=s.get(h);ea(h,!1),p(b)}}null==te||te(e)});r.useEffect(function(){tl(!0)},[]);var ne=r.useMemo(function(){return{_internalRenderMenuItem:tt,_internalRenderSubMenuItem:tn}},[tt,tn]),nt="horizontal"!==tI||ek?to:to.map(function(e,t){return r.createElement(x,{key:e.key,overflowDisabled:t>tj},e)}),nn=r.createElement(p.Z,(0,o.Z)({id:ex,ref:tc,prefixCls:"".concat(ef,"-overflow"),component:"ul",itemComponent:em,className:d()(ef,"".concat(ef,"-root"),"".concat(ef,"-").concat(tI),eb,(ed={},(0,a.Z)(ed,"".concat(ef,"-inline-collapsed"),tP),(0,a.Z)(ed,"".concat(ef,"-rtl"),td),ed),eg),dir:ew,style:eh,role:"menu",tabIndex:void 0===ev?0:ev,data:nt,renderRawItem:function(e){return e},renderRawRest:function(e){var t=e.length,n=t?to.slice(-t):null;return r.createElement(e_,{eventKey:q,title:e6,disabled:tB,internalPopupClose:0===t,popupClassName:e5},n)},maxCount:"horizontal"!==tI||ek?p.Z.INVALIDATE:p.Z.RESPONSIVE,ssr:"full","data-menu-list":!0,onVisibleChange:function(e){tF(e)},onKeyDown:t7},tr));return r.createElement(I.Provider,{value:ne},r.createElement(b.Provider,{value:tu},r.createElement(x,{prefixCls:ef,rootClassName:eg,mode:tI,openKeys:tm,rtl:td,disabled:eC,motion:ts?eQ:null,defaultMotions:ts?eJ:null,activeKey:tQ,onActive:t0,onInactive:t1,selectedKeys:t3,inlineIndent:void 0===eX?24:eX,subMenuOpenDelay:void 0===eI?.1:eI,subMenuCloseDelay:void 0===eN?.1:eN,forceSubMenuRender:eP,builtinPlacements:e1,triggerSubMenuAction:void 0===e0?"hover":e0,getPopupContainer:e8,itemIcon:e2,expandIcon:e4,onItemClick:t8,onOpenChange:t9},r.createElement(k.Provider,{value:tY},nn),r.createElement("div",{style:{display:"none"},"aria-hidden":!0},r.createElement(O.Provider,{value:tq},to)))))});eZ.Item=em,eZ.SubMenu=e_,eZ.ItemGroup=eD,eZ.Divider=ej;var ez=n(25839),eH={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"},eG=n(60688),e$=r.forwardRef(function(e,t){return r.createElement(eG.Z,(0,o.Z)({},e,{ref:t,icon:eH}))}),eW=n(48563),eV=n(47387),eq=n(65823),eY=n(57499),eK=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);ot.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n},eX=e=>{let{prefixCls:t,className:n,dashed:o}=e,a=eK(e,["prefixCls","className","dashed"]),{getPrefixCls:i}=r.useContext(eY.E_),s=i("menu",t),l=d()({["".concat(s,"-item-divider-dashed")]:!!o},n);return r.createElement(ej,Object.assign({className:l},a))},eQ=n(47104);let eJ=(0,r.createContext)({prefixCls:"",firstLevel:!0,inlineCollapsed:!1});var e0=e=>{var t;let{className:n,children:o,icon:a,title:i,danger:s}=e,{prefixCls:l,firstLevel:c,direction:u,disableMenuItemTitleTooltip:p,inlineCollapsed:f}=r.useContext(eJ),{siderCollapsed:m}=r.useContext(ez.D),g=i;void 0===i?g=c?o:"":!1===i&&(g="");let h={title:g};m||f||(h.title=null,h.open=!1);let b=(0,eb.Z)(o).length,y=r.createElement(em,Object.assign({},(0,en.Z)(e,["title","icon","danger"]),{className:d()({["".concat(l,"-item-danger")]:s,["".concat(l,"-item-only-child")]:(a?b+1:b)===1},n),title:"string"==typeof i?i:void 0}),(0,eq.Tm)(a,{className:d()((0,eq.l$)(a)?null===(t=a.props)||void 0===t?void 0:t.className:"","".concat(l,"-item-icon"))}),(e=>{let t=r.createElement("span",{className:"".concat(l,"-title-content")},o);return(!a||(0,eq.l$)(o)&&"span"===o.type)&&o&&e&&c&&"string"==typeof o?r.createElement("div",{className:"".concat(l,"-inline-collapsed-noicon")},o.charAt(0)):t})(f));return p||(y=r.createElement(eQ.Z,Object.assign({},h,{placement:"rtl"===u?"left":"right",overlayClassName:"".concat(l,"-inline-collapsed-tooltip")}),y)),y},e1=n(51761),e2=e=>{var t;let n;let{popupClassName:o,icon:a,title:i,theme:s}=e,l=r.useContext(eJ),{prefixCls:c,inlineCollapsed:u,theme:p}=l,f=C();if(a){let e=(0,eq.l$)(i)&&"span"===i.type;n=r.createElement(r.Fragment,null,(0,eq.Tm)(a,{className:d()((0,eq.l$)(a)?null===(t=a.props)||void 0===t?void 0:t.className:"","".concat(c,"-item-icon"))}),e?i:r.createElement("span",{className:"".concat(c,"-title-content")},i))}else n=u&&!f.length&&i&&"string"==typeof i?r.createElement("div",{className:"".concat(c,"-inline-collapsed-noicon")},i.charAt(0)):r.createElement("span",{className:"".concat(c,"-title-content")},i);let m=r.useMemo(()=>Object.assign(Object.assign({},l),{firstLevel:!1}),[l]),[g]=(0,e1.Cn)("Menu");return r.createElement(eJ.Provider,{value:m},r.createElement(e_,Object.assign({},(0,en.Z)(e,["icon"]),{title:n,popupClassName:d()(c,o,"".concat(c,"-").concat(s||p)),popupStyle:{zIndex:g}})))},e4=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);ot.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};let e3=r.createContext(null);var e6=n(8985),e5=n(6336),e8=n(11303),e9=n(46154),e7=n(202),te=n(58854),tt=n(76585),tn=n(80316),tr=e=>{let{componentCls:t,motionDurationSlow:n,horizontalLineHeight:r,colorSplit:o,lineWidth:a,lineType:i,itemPaddingInline:s}=e;return{["".concat(t,"-horizontal")]:{lineHeight:r,border:0,borderBottom:"".concat((0,e6.bf)(a)," ").concat(i," ").concat(o),boxShadow:"none","&::after":{display:"block",clear:"both",height:0,content:'"\\20"'},["".concat(t,"-item, ").concat(t,"-submenu")]:{position:"relative",display:"inline-block",verticalAlign:"bottom",paddingInline:s},["> ".concat(t,"-item:hover,\n > ").concat(t,"-item-active,\n > ").concat(t,"-submenu ").concat(t,"-submenu-title:hover")]:{backgroundColor:"transparent"},["".concat(t,"-item, ").concat(t,"-submenu-title")]:{transition:["border-color ".concat(n),"background ".concat(n)].join(",")},["".concat(t,"-submenu-arrow")]:{display:"none"}}}},to=e=>{let{componentCls:t,menuArrowOffset:n,calc:r}=e;return{["".concat(t,"-rtl")]:{direction:"rtl"},["".concat(t,"-submenu-rtl")]:{transformOrigin:"100% 0"},["".concat(t,"-rtl").concat(t,"-vertical,\n ").concat(t,"-submenu-rtl ").concat(t,"-vertical")]:{["".concat(t,"-submenu-arrow")]:{"&::before":{transform:"rotate(-45deg) translateY(".concat((0,e6.bf)(r(n).mul(-1).equal()),")")},"&::after":{transform:"rotate(45deg) translateY(".concat((0,e6.bf)(n),")")}}}}};let ta=e=>Object.assign({},(0,e8.oN)(e));var ti=(e,t)=>{let{componentCls:n,itemColor:r,itemSelectedColor:o,groupTitleColor:a,itemBg:i,subMenuItemBg:s,itemSelectedBg:l,activeBarHeight:c,activeBarWidth:u,activeBarBorderWidth:d,motionDurationSlow:p,motionEaseInOut:f,motionEaseOut:m,itemPaddingInline:g,motionDurationMid:h,itemHoverColor:b,lineType:y,colorSplit:v,itemDisabledColor:E,dangerItemColor:S,dangerItemHoverColor:w,dangerItemSelectedColor:x,dangerItemActiveBg:O,dangerItemSelectedBg:A,popupBg:T,itemHoverBg:C,itemActiveBg:k,menuSubMenuBg:I,horizontalItemSelectedColor:N,horizontalItemSelectedBg:_,horizontalItemBorderRadius:R,horizontalItemHoverBg:P}=e;return{["".concat(n,"-").concat(t,", ").concat(n,"-").concat(t," > ").concat(n)]:{color:r,background:i,["&".concat(n,"-root:focus-visible")]:Object.assign({},ta(e)),["".concat(n,"-item-group-title")]:{color:a},["".concat(n,"-submenu-selected")]:{["> ".concat(n,"-submenu-title")]:{color:o}},["".concat(n,"-item-disabled, ").concat(n,"-submenu-disabled")]:{color:"".concat(E," !important")},["".concat(n,"-item:not(").concat(n,"-item-selected):not(").concat(n,"-submenu-selected)")]:{["&:hover, > ".concat(n,"-submenu-title:hover")]:{color:b}},["&:not(".concat(n,"-horizontal)")]:{["".concat(n,"-item:not(").concat(n,"-item-selected)")]:{"&:hover":{backgroundColor:C},"&:active":{backgroundColor:k}},["".concat(n,"-submenu-title")]:{"&:hover":{backgroundColor:C},"&:active":{backgroundColor:k}}},["".concat(n,"-item-danger")]:{color:S,["&".concat(n,"-item:hover")]:{["&:not(".concat(n,"-item-selected):not(").concat(n,"-submenu-selected)")]:{color:w}},["&".concat(n,"-item:active")]:{background:O}},["".concat(n,"-item a")]:{"&, &:hover":{color:"inherit"}},["".concat(n,"-item-selected")]:{color:o,["&".concat(n,"-item-danger")]:{color:x},"a, a:hover":{color:"inherit"}},["& ".concat(n,"-item-selected")]:{backgroundColor:l,["&".concat(n,"-item-danger")]:{backgroundColor:A}},["".concat(n,"-item, ").concat(n,"-submenu-title")]:{["&:not(".concat(n,"-item-disabled):focus-visible")]:Object.assign({},ta(e))},["&".concat(n,"-submenu > ").concat(n)]:{backgroundColor:I},["&".concat(n,"-popup > ").concat(n)]:{backgroundColor:T},["&".concat(n,"-submenu-popup > ").concat(n)]:{backgroundColor:T},["&".concat(n,"-horizontal")]:Object.assign(Object.assign({},"dark"===t?{borderBottom:0}:{}),{["> ".concat(n,"-item, > ").concat(n,"-submenu")]:{top:d,marginTop:e.calc(d).mul(-1).equal(),marginBottom:0,borderRadius:R,"&::after":{position:"absolute",insetInline:g,bottom:0,borderBottom:"".concat((0,e6.bf)(c)," solid transparent"),transition:"border-color ".concat(p," ").concat(f),content:'""'},"&:hover, &-active, &-open":{background:P,"&::after":{borderBottomWidth:c,borderBottomColor:N}},"&-selected":{color:N,backgroundColor:_,"&:hover":{backgroundColor:_},"&::after":{borderBottomWidth:c,borderBottomColor:N}}}}),["&".concat(n,"-root")]:{["&".concat(n,"-inline, &").concat(n,"-vertical")]:{borderInlineEnd:"".concat((0,e6.bf)(d)," ").concat(y," ").concat(v)}},["&".concat(n,"-inline")]:{["".concat(n,"-sub").concat(n,"-inline")]:{background:s},["".concat(n,"-item")]:{position:"relative","&::after":{position:"absolute",insetBlock:0,insetInlineEnd:0,borderInlineEnd:"".concat((0,e6.bf)(u)," solid ").concat(o),transform:"scaleY(0.0001)",opacity:0,transition:["transform ".concat(h," ").concat(m),"opacity ".concat(h," ").concat(m)].join(","),content:'""'},["&".concat(n,"-item-danger")]:{"&::after":{borderInlineEndColor:x}}},["".concat(n,"-selected, ").concat(n,"-item-selected")]:{"&::after":{transform:"scaleY(1)",opacity:1,transition:["transform ".concat(h," ").concat(f),"opacity ".concat(h," ").concat(f)].join(",")}}}}}};let ts=e=>{let{componentCls:t,itemHeight:n,itemMarginInline:r,padding:o,menuArrowSize:a,marginXS:i,itemMarginBlock:s,itemWidth:l}=e,c=e.calc(a).add(o).add(i).equal();return{["".concat(t,"-item")]:{position:"relative",overflow:"hidden"},["".concat(t,"-item, ").concat(t,"-submenu-title")]:{height:n,lineHeight:(0,e6.bf)(n),paddingInline:o,overflow:"hidden",textOverflow:"ellipsis",marginInline:r,marginBlock:s,width:l},["> ".concat(t,"-item,\n > ").concat(t,"-submenu > ").concat(t,"-submenu-title")]:{height:n,lineHeight:(0,e6.bf)(n)},["".concat(t,"-item-group-list ").concat(t,"-submenu-title,\n ").concat(t,"-submenu-title")]:{paddingInlineEnd:c}}};var tl=e=>{let{componentCls:t,iconCls:n,itemHeight:r,colorTextLightSolid:o,dropdownWidth:a,controlHeightLG:i,motionDurationMid:s,motionEaseOut:l,paddingXL:c,itemMarginInline:u,fontSizeLG:d,motionDurationSlow:p,paddingXS:f,boxShadowSecondary:m,collapsedWidth:g,collapsedIconSize:h}=e,b={height:r,lineHeight:(0,e6.bf)(r),listStylePosition:"inside",listStyleType:"disc"};return[{[t]:{"&-inline, &-vertical":Object.assign({["&".concat(t,"-root")]:{boxShadow:"none"}},ts(e))},["".concat(t,"-submenu-popup")]:{["".concat(t,"-vertical")]:Object.assign(Object.assign({},ts(e)),{boxShadow:m})}},{["".concat(t,"-submenu-popup ").concat(t,"-vertical").concat(t,"-sub")]:{minWidth:a,maxHeight:"calc(100vh - ".concat((0,e6.bf)(e.calc(i).mul(2.5).equal()),")"),padding:"0",overflow:"hidden",borderInlineEnd:0,"&:not([class*='-active'])":{overflowX:"hidden",overflowY:"auto"}}},{["".concat(t,"-inline")]:{width:"100%",["&".concat(t,"-root")]:{["".concat(t,"-item, ").concat(t,"-submenu-title")]:{display:"flex",alignItems:"center",transition:["border-color ".concat(p),"background ".concat(p),"padding ".concat(s," ").concat(l)].join(","),["> ".concat(t,"-title-content")]:{flex:"auto",minWidth:0,overflow:"hidden",textOverflow:"ellipsis"},"> *":{flex:"none"}}},["".concat(t,"-sub").concat(t,"-inline")]:{padding:0,border:0,borderRadius:0,boxShadow:"none",["& > ".concat(t,"-submenu > ").concat(t,"-submenu-title")]:b,["& ".concat(t,"-item-group-title")]:{paddingInlineStart:c}},["".concat(t,"-item")]:b}},{["".concat(t,"-inline-collapsed")]:{width:g,["&".concat(t,"-root")]:{["".concat(t,"-item, ").concat(t,"-submenu ").concat(t,"-submenu-title")]:{["> ".concat(t,"-inline-collapsed-noicon")]:{fontSize:d,textAlign:"center"}}},["> ".concat(t,"-item,\n > ").concat(t,"-item-group > ").concat(t,"-item-group-list > ").concat(t,"-item,\n > ").concat(t,"-item-group > ").concat(t,"-item-group-list > ").concat(t,"-submenu > ").concat(t,"-submenu-title,\n > ").concat(t,"-submenu > ").concat(t,"-submenu-title")]:{insetInlineStart:0,paddingInline:"calc(50% - ".concat((0,e6.bf)(e.calc(d).div(2).equal())," - ").concat((0,e6.bf)(u),")"),textOverflow:"clip",["\n ".concat(t,"-submenu-arrow,\n ").concat(t,"-submenu-expand-icon\n ")]:{opacity:0},["".concat(t,"-item-icon, ").concat(n)]:{margin:0,fontSize:h,lineHeight:(0,e6.bf)(r),"+ span":{display:"inline-block",opacity:0}}},["".concat(t,"-item-icon, ").concat(n)]:{display:"inline-block"},"&-tooltip":{pointerEvents:"none",["".concat(t,"-item-icon, ").concat(n)]:{display:"none"},"a, a:hover":{color:o}},["".concat(t,"-item-group-title")]:Object.assign(Object.assign({},e8.vS),{paddingInline:f})}}]};let tc=e=>{let{componentCls:t,motionDurationSlow:n,motionDurationMid:r,motionEaseInOut:o,motionEaseOut:a,iconCls:i,iconSize:s,iconMarginInlineEnd:l}=e;return{["".concat(t,"-item, ").concat(t,"-submenu-title")]:{position:"relative",display:"block",margin:0,whiteSpace:"nowrap",cursor:"pointer",transition:["border-color ".concat(n),"background ".concat(n),"padding ".concat(n," ").concat(o)].join(","),["".concat(t,"-item-icon, ").concat(i)]:{minWidth:s,fontSize:s,transition:["font-size ".concat(r," ").concat(a),"margin ".concat(n," ").concat(o),"color ".concat(n)].join(","),"+ span":{marginInlineStart:l,opacity:1,transition:["opacity ".concat(n," ").concat(o),"margin ".concat(n),"color ".concat(n)].join(",")}},["".concat(t,"-item-icon")]:Object.assign({},(0,e8.Ro)()),["&".concat(t,"-item-only-child")]:{["> ".concat(i,", > ").concat(t,"-item-icon")]:{marginInlineEnd:0}}},["".concat(t,"-item-disabled, ").concat(t,"-submenu-disabled")]:{background:"none !important",cursor:"not-allowed","&::after":{borderColor:"transparent !important"},a:{color:"inherit !important"},["> ".concat(t,"-submenu-title")]:{color:"inherit !important",cursor:"not-allowed"}}}},tu=e=>{let{componentCls:t,motionDurationSlow:n,motionEaseInOut:r,borderRadius:o,menuArrowSize:a,menuArrowOffset:i}=e;return{["".concat(t,"-submenu")]:{"&-expand-icon, &-arrow":{position:"absolute",top:"50%",insetInlineEnd:e.margin,width:a,color:"currentcolor",transform:"translateY(-50%)",transition:"transform ".concat(n," ").concat(r,", opacity ").concat(n)},"&-arrow":{"&::before, &::after":{position:"absolute",width:e.calc(a).mul(.6).equal(),height:e.calc(a).mul(.15).equal(),backgroundColor:"currentcolor",borderRadius:o,transition:["background ".concat(n," ").concat(r),"transform ".concat(n," ").concat(r),"top ".concat(n," ").concat(r),"color ".concat(n," ").concat(r)].join(","),content:'""'},"&::before":{transform:"rotate(45deg) translateY(".concat((0,e6.bf)(e.calc(i).mul(-1).equal()),")")},"&::after":{transform:"rotate(-45deg) translateY(".concat((0,e6.bf)(i),")")}}}}},td=e=>{let{antCls:t,componentCls:n,fontSize:r,motionDurationSlow:o,motionDurationMid:a,motionEaseInOut:i,paddingXS:s,padding:l,colorSplit:c,lineWidth:u,zIndexPopup:d,borderRadiusLG:p,subMenuItemBorderRadius:f,menuArrowSize:m,menuArrowOffset:g,lineType:h,menuPanelMaskInset:b,groupTitleLineHeight:y,groupTitleFontSize:v}=e;return[{"":{["".concat(n)]:Object.assign(Object.assign({},(0,e8.dF)()),{"&-hidden":{display:"none"}})},["".concat(n,"-submenu-hidden")]:{display:"none"}},{[n]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},(0,e8.Wf)(e)),(0,e8.dF)()),{marginBottom:0,paddingInlineStart:0,fontSize:r,lineHeight:0,listStyle:"none",outline:"none",transition:"width ".concat(o," cubic-bezier(0.2, 0, 0, 1) 0s"),"ul, ol":{margin:0,padding:0,listStyle:"none"},"&-overflow":{display:"flex",["".concat(n,"-item")]:{flex:"none"}},["".concat(n,"-item, ").concat(n,"-submenu, ").concat(n,"-submenu-title")]:{borderRadius:e.itemBorderRadius},["".concat(n,"-item-group-title")]:{padding:"".concat((0,e6.bf)(s)," ").concat((0,e6.bf)(l)),fontSize:v,lineHeight:y,transition:"all ".concat(o)},["&-horizontal ".concat(n,"-submenu")]:{transition:["border-color ".concat(o," ").concat(i),"background ".concat(o," ").concat(i)].join(",")},["".concat(n,"-submenu, ").concat(n,"-submenu-inline")]:{transition:["border-color ".concat(o," ").concat(i),"background ".concat(o," ").concat(i),"padding ".concat(a," ").concat(i)].join(",")},["".concat(n,"-submenu ").concat(n,"-sub")]:{cursor:"initial",transition:["background ".concat(o," ").concat(i),"padding ".concat(o," ").concat(i)].join(",")},["".concat(n,"-title-content")]:{transition:"color ".concat(o),["> ".concat(t,"-typography-ellipsis-single-line")]:{display:"inline",verticalAlign:"unset"}},["".concat(n,"-item a")]:{"&::before":{position:"absolute",inset:0,backgroundColor:"transparent",content:'""'}},["".concat(n,"-item-divider")]:{overflow:"hidden",lineHeight:0,borderColor:c,borderStyle:h,borderWidth:0,borderTopWidth:u,marginBlock:u,padding:0,"&-dashed":{borderStyle:"dashed"}}}),tc(e)),{["".concat(n,"-item-group")]:{["".concat(n,"-item-group-list")]:{margin:0,padding:0,["".concat(n,"-item, ").concat(n,"-submenu-title")]:{paddingInline:"".concat((0,e6.bf)(e.calc(r).mul(2).equal())," ").concat((0,e6.bf)(l))}}},"&-submenu":{"&-popup":{position:"absolute",zIndex:d,borderRadius:p,boxShadow:"none",transformOrigin:"0 0",["&".concat(n,"-submenu")]:{background:"transparent"},"&::before":{position:"absolute",inset:"".concat((0,e6.bf)(b)," 0 0"),zIndex:-1,width:"100%",height:"100%",opacity:0,content:'""'}},"&-placement-rightTop::before":{top:0,insetInlineStart:b},"\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},["> ".concat(n)]:Object.assign(Object.assign(Object.assign({borderRadius:p},tc(e)),tu(e)),{["".concat(n,"-item, ").concat(n,"-submenu > ").concat(n,"-submenu-title")]:{borderRadius:f},["".concat(n,"-submenu-title::after")]:{transition:"transform ".concat(o," ").concat(i)}})}}),tu(e)),{["&-inline-collapsed ".concat(n,"-submenu-arrow,\n &-inline ").concat(n,"-submenu-arrow")]:{"&::before":{transform:"rotate(-45deg) translateX(".concat((0,e6.bf)(g),")")},"&::after":{transform:"rotate(45deg) translateX(".concat((0,e6.bf)(e.calc(g).mul(-1).equal()),")")}},["".concat(n,"-submenu-open").concat(n,"-submenu-inline > ").concat(n,"-submenu-title > ").concat(n,"-submenu-arrow")]:{transform:"translateY(".concat((0,e6.bf)(e.calc(m).mul(.2).mul(-1).equal()),")"),"&::after":{transform:"rotate(-45deg) translateX(".concat((0,e6.bf)(e.calc(g).mul(-1).equal()),")")},"&::before":{transform:"rotate(45deg) translateX(".concat((0,e6.bf)(g),")")}}})},{["".concat(t,"-layout-header")]:{[n]:{lineHeight:"inherit"}}}]},tp=e=>{var t,n,r;let{colorPrimary:o,colorError:a,colorTextDisabled:i,colorErrorBg:s,colorText:l,colorTextDescription:c,colorBgContainer:u,colorFillAlter:d,colorFillContent:p,lineWidth:f,lineWidthBold:m,controlItemBgActive:g,colorBgTextHover:h,controlHeightLG:b,lineHeight:y,colorBgElevated:v,marginXXS:E,padding:S,fontSize:w,controlHeightSM:x,fontSizeLG:O,colorTextLightSolid:A,colorErrorHover:T}=e,C=null!==(t=e.activeBarWidth)&&void 0!==t?t:0,k=null!==(n=e.activeBarBorderWidth)&&void 0!==n?n:f,I=null!==(r=e.itemMarginInline)&&void 0!==r?r:e.marginXXS,N=new e5.C(A).setAlpha(.65).toRgbString();return{dropdownWidth:160,zIndexPopup:e.zIndexPopupBase+50,radiusItem:e.borderRadiusLG,itemBorderRadius:e.borderRadiusLG,radiusSubMenuItem:e.borderRadiusSM,subMenuItemBorderRadius:e.borderRadiusSM,colorItemText:l,itemColor:l,colorItemTextHover:l,itemHoverColor:l,colorItemTextHoverHorizontal:o,horizontalItemHoverColor:o,colorGroupTitle:c,groupTitleColor:c,colorItemTextSelected:o,itemSelectedColor:o,colorItemTextSelectedHorizontal:o,horizontalItemSelectedColor:o,colorItemBg:u,itemBg:u,colorItemBgHover:h,itemHoverBg:h,colorItemBgActive:p,itemActiveBg:g,colorSubItemBg:d,subMenuItemBg:d,colorItemBgSelected:g,itemSelectedBg:g,colorItemBgSelectedHorizontal:"transparent",horizontalItemSelectedBg:"transparent",colorActiveBarWidth:0,activeBarWidth:C,colorActiveBarHeight:m,activeBarHeight:m,colorActiveBarBorderSize:f,activeBarBorderWidth:k,colorItemTextDisabled:i,itemDisabledColor:i,colorDangerItemText:a,dangerItemColor:a,colorDangerItemTextHover:a,dangerItemHoverColor:a,colorDangerItemTextSelected:a,dangerItemSelectedColor:a,colorDangerItemBgActive:s,dangerItemActiveBg:s,colorDangerItemBgSelected:s,dangerItemSelectedBg:s,itemMarginInline:I,horizontalItemBorderRadius:0,horizontalItemHoverBg:"transparent",itemHeight:b,groupTitleLineHeight:y,collapsedWidth:2*b,popupBg:v,itemMarginBlock:E,itemPaddingInline:S,horizontalLineHeight:"".concat(1.15*b,"px"),iconSize:w,iconMarginInlineEnd:x-w,collapsedIconSize:O,groupTitleFontSize:w,darkItemDisabledColor:new e5.C(A).setAlpha(.25).toRgbString(),darkItemColor:N,darkDangerItemColor:a,darkItemBg:"#001529",darkPopupBg:"#001529",darkSubMenuItemBg:"#000c17",darkItemSelectedColor:A,darkItemSelectedBg:o,darkDangerItemSelectedBg:a,darkItemHoverBg:"transparent",darkGroupTitleColor:N,darkItemHoverColor:A,darkDangerItemHoverColor:T,darkDangerItemSelectedColor:A,darkDangerItemActiveBg:a,itemWidth:C?"calc(100% + ".concat(k,"px)"):"calc(100% - ".concat(2*I,"px)")}};var tf=n(92935),tm=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);ot.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};let tg=(0,r.forwardRef)((e,t)=>{var n,o;let a;let i=r.useContext(e3),s=i||{},{getPrefixCls:l,getPopupContainer:c,direction:u,menu:p}=r.useContext(eY.E_),f=l(),{prefixCls:m,className:g,style:h,theme:b="light",expandIcon:y,_internalDisableMenuItemTitleTooltip:v,inlineCollapsed:E,siderCollapsed:S,items:w,children:x,rootClassName:O,mode:A,selectable:T,onClick:C,overflowedIndicatorPopupClassName:k}=e,I=tm(e,["prefixCls","className","style","theme","expandIcon","_internalDisableMenuItemTitleTooltip","inlineCollapsed","siderCollapsed","items","children","rootClassName","mode","selectable","onClick","overflowedIndicatorPopupClassName"]),N=(0,en.Z)(I,["collapsedWidth"]),_=r.useMemo(()=>w?function e(t){return(t||[]).map((t,n)=>{if(t&&"object"==typeof t){let{label:o,children:a,key:i,type:s}=t,l=e4(t,["label","children","key","type"]),c=null!=i?i:"tmp-".concat(n);return a||"group"===s?"group"===s?r.createElement(eD,Object.assign({key:c},l,{title:o}),e(a)):r.createElement(e2,Object.assign({key:c},l,{title:o}),e(a)):"divider"===s?r.createElement(eX,Object.assign({key:c},l)):r.createElement(e0,Object.assign({key:c},l),o)}return null}).filter(e=>e)}(w):w,[w])||x;null===(n=s.validator)||void 0===n||n.call(s,{mode:A});let R=(0,eW.zX)(function(){var e;null==C||C.apply(void 0,arguments),null===(e=s.onClick)||void 0===e||e.call(s)}),P=s.mode||A,M=null!=T?T:s.selectable,L=r.useMemo(()=>void 0!==S?S:E,[E,S]),D={horizontal:{motionName:"".concat(f,"-slide-up")},inline:(0,eV.Z)(f),other:{motionName:"".concat(f,"-zoom-big")}},j=l("menu",m||s.prefixCls),F=(0,tf.Z)(j),[B,U,Z]=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,n=!(arguments.length>2)||void 0===arguments[2]||arguments[2];return(0,tt.I$)("Menu",e=>{let{colorBgElevated:t,colorPrimary:n,colorTextLightSolid:r,controlHeightLG:o,fontSize:a,darkItemColor:i,darkDangerItemColor:s,darkItemBg:l,darkSubMenuItemBg:c,darkItemSelectedColor:u,darkItemSelectedBg:d,darkDangerItemSelectedBg:p,darkItemHoverBg:f,darkGroupTitleColor:m,darkItemHoverColor:g,darkItemDisabledColor:h,darkDangerItemHoverColor:b,darkDangerItemSelectedColor:y,darkDangerItemActiveBg:v,popupBg:E,darkPopupBg:S}=e,w=e.calc(a).div(7).mul(5).equal(),x=(0,tn.TS)(e,{menuArrowSize:w,menuHorizontalHeight:e.calc(o).mul(1.15).equal(),menuArrowOffset:e.calc(w).mul(.25).equal(),menuPanelMaskInset:-7,menuSubMenuBg:t,calc:e.calc,popupBg:E}),O=(0,tn.TS)(x,{itemColor:i,itemHoverColor:g,groupTitleColor:m,itemSelectedColor:u,itemBg:l,popupBg:S,subMenuItemBg:c,itemActiveBg:"transparent",itemSelectedBg:d,activeBarHeight:0,activeBarBorderWidth:0,itemHoverBg:f,itemDisabledColor:h,dangerItemColor:s,dangerItemHoverColor:b,dangerItemSelectedColor:y,dangerItemActiveBg:v,dangerItemSelectedBg:p,menuSubMenuBg:c,horizontalItemSelectedColor:r,horizontalItemSelectedBg:n});return[td(x),tr(x),tl(x),ti(x,"light"),ti(O,"dark"),to(x),(0,e9.Z)(x),(0,e7.oN)(x,"slide-up"),(0,e7.oN)(x,"slide-down"),(0,te._y)(x,"zoom-big")]},tp,{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,F,!i),z=d()("".concat(j,"-").concat(b),null==p?void 0:p.className,g);if("function"==typeof y)a=y;else if(null===y||!1===y)a=null;else if(null===s.expandIcon||!1===s.expandIcon)a=null;else{let e=null!=y?y:s.expandIcon;a=(0,eq.Tm)(e,{className:d()("".concat(j,"-submenu-expand-icon"),(0,eq.l$)(e)?null===(o=e.props)||void 0===o?void 0:o.className:"")})}let H=r.useMemo(()=>({prefixCls:j,inlineCollapsed:L||!1,direction:u,firstLevel:!0,theme:b,mode:P,disableMenuItemTitleTooltip:v}),[j,L,u,v,b]);return B(r.createElement(e3.Provider,{value:null},r.createElement(eJ.Provider,{value:H},r.createElement(eZ,Object.assign({getPopupContainer:c,overflowedIndicator:r.createElement(e$,null),overflowedIndicatorPopupClassName:d()(j,"".concat(j,"-").concat(b),k),mode:P,selectable:M,onClick:R},N,{inlineCollapsed:L,style:Object.assign(Object.assign({},null==p?void 0:p.style),h),className:z,prefixCls:j,direction:u,defaultMotions:D,expandIcon:a,ref:t,rootClassName:d()(O,U,s.rootClassName,Z,F)}),_))))}),th=(0,r.forwardRef)((e,t)=>{let n=(0,r.useRef)(null),o=r.useContext(ez.D);return(0,r.useImperativeHandle)(t,()=>({menu:n.current,focus:e=>{var t;null===(t=n.current)||void 0===t||t.focus(e)}})),r.createElement(tg,Object.assign({ref:n},e,o))});th.Item=e0,th.SubMenu=e2,th.Divider=eX,th.ItemGroup=eD;var tb=th},80588:function(e,t,n){n.d(t,{ZP:function(){return eu}});var r=n(63787),o=n(64090),a=n(37274);let i=o.createContext({});var s=n(57499),l=n(54165),c=n(99537),u=n(77136),d=n(20653),p=n(40388),f=n(66155),m=n(16480),g=n.n(m),h=n(80406),b=n(6787),y=n(5239),v=n(89542),E=n(14749),S=n(50833),w=n(49367),x=n(4295),O=o.forwardRef(function(e,t){var n=e.prefixCls,r=e.style,a=e.className,i=e.duration,s=void 0===i?4.5:i,l=e.eventKey,c=e.content,u=e.closable,d=e.closeIcon,p=e.props,f=e.onClick,m=e.onNoticeClose,b=e.times,y=e.hovering,v=o.useState(!1),w=(0,h.Z)(v,2),O=w[0],A=w[1],T=y||O,C=function(){m(l)};o.useEffect(function(){if(!T&&s>0){var e=setTimeout(function(){C()},1e3*s);return function(){clearTimeout(e)}}},[s,T,b]);var k="".concat(n,"-notice");return o.createElement("div",(0,E.Z)({},p,{ref:t,className:g()(k,a,(0,S.Z)({},"".concat(k,"-closable"),u)),style:r,onMouseEnter:function(e){var t;A(!0),null==p||null===(t=p.onMouseEnter)||void 0===t||t.call(p,e)},onMouseLeave:function(e){var t;A(!1),null==p||null===(t=p.onMouseLeave)||void 0===t||t.call(p,e)},onClick:f}),o.createElement("div",{className:"".concat(k,"-content")},c),u&&o.createElement("a",{tabIndex:0,className:"".concat(k,"-close"),onKeyDown:function(e){("Enter"===e.key||"Enter"===e.code||e.keyCode===x.Z.ENTER)&&C()},onClick:function(e){e.preventDefault(),e.stopPropagation(),C()}},void 0===d?"x":d))}),A=o.createContext({}),T=function(e){var t=e.children,n=e.classNames;return o.createElement(A.Provider,{value:{classNames:n}},t)},C=n(6976),k=function(e){var t,n,r,o={offset:8,threshold:3,gap:16};return e&&"object"===(0,C.Z)(e)&&(o.offset=null!==(t=e.offset)&&void 0!==t?t:8,o.threshold=null!==(n=e.threshold)&&void 0!==n?n:3,o.gap=null!==(r=e.gap)&&void 0!==r?r:16),[!!e,o]},I=["className","style","classNames","styles"],N=function(e){var t,n=e.configList,a=e.placement,i=e.prefixCls,s=e.className,l=e.style,c=e.motion,u=e.onAllNoticeRemoved,d=e.onNoticeClose,p=e.stack,f=(0,o.useContext)(A).classNames,m=(0,o.useRef)({}),v=(0,o.useState)(null),x=(0,h.Z)(v,2),T=x[0],C=x[1],N=(0,o.useState)([]),_=(0,h.Z)(N,2),R=_[0],P=_[1],M=n.map(function(e){return{config:e,key:String(e.key)}}),L=k(p),D=(0,h.Z)(L,2),j=D[0],F=D[1],B=F.offset,U=F.threshold,Z=F.gap,z=j&&(R.length>0||M.length<=U),H="function"==typeof c?c(a):c;return(0,o.useEffect)(function(){j&&R.length>1&&P(function(e){return e.filter(function(e){return M.some(function(t){return e===t.key})})})},[R,M,j]),(0,o.useEffect)(function(){var e,t;j&&m.current[null===(e=M[M.length-1])||void 0===e?void 0:e.key]&&C(m.current[null===(t=M[M.length-1])||void 0===t?void 0:t.key])},[M,j]),o.createElement(w.V4,(0,E.Z)({key:a,className:g()(i,"".concat(i,"-").concat(a),null==f?void 0:f.list,s,(t={},(0,S.Z)(t,"".concat(i,"-stack"),!!j),(0,S.Z)(t,"".concat(i,"-stack-expanded"),z),t)),style:l,keys:M,motionAppear:!0},H,{onAllRemoved:function(){u(a)}}),function(e,t){var n=e.config,s=e.className,l=e.style,c=e.index,u=n.key,p=n.times,h=String(u),v=n.className,S=n.style,w=n.classNames,x=n.styles,A=(0,b.Z)(n,I),C=M.findIndex(function(e){return e.key===h}),k={};if(j){var N=M.length-1-(C>-1?C:c-1),_="top"===a||"bottom"===a?"-50%":"0";if(N>0){k.height=z?null===(L=m.current[h])||void 0===L?void 0:L.offsetHeight:null==T?void 0:T.offsetHeight;for(var L,D,F,U,H=0,G=0;G-1?m.current[h]=e:delete m.current[h]},prefixCls:i,classNames:w,styles:x,className:g()(v,null==f?void 0:f.notice),style:S,times:p,key:u,eventKey:u,onNoticeClose:d,hovering:j&&R.length>0})))})},_=o.forwardRef(function(e,t){var n=e.prefixCls,a=void 0===n?"rc-notification":n,i=e.container,s=e.motion,l=e.maxCount,c=e.className,u=e.style,d=e.onAllRemoved,p=e.stack,f=e.renderNotifications,m=o.useState([]),g=(0,h.Z)(m,2),b=g[0],E=g[1],S=function(e){var t,n=b.find(function(t){return t.key===e});null==n||null===(t=n.onClose)||void 0===t||t.call(n),E(function(t){return t.filter(function(t){return t.key!==e})})};o.useImperativeHandle(t,function(){return{open:function(e){E(function(t){var n,o=(0,r.Z)(t),a=o.findIndex(function(t){return t.key===e.key}),i=(0,y.Z)({},e);return a>=0?(i.times=((null===(n=t[a])||void 0===n?void 0:n.times)||0)+1,o[a]=i):(i.times=0,o.push(i)),l>0&&o.length>l&&(o=o.slice(-l)),o})},close:function(e){S(e)},destroy:function(){E([])}}});var w=o.useState({}),x=(0,h.Z)(w,2),O=x[0],A=x[1];o.useEffect(function(){var e={};b.forEach(function(t){var n=t.placement,r=void 0===n?"topRight":n;r&&(e[r]=e[r]||[],e[r].push(t))}),Object.keys(O).forEach(function(t){e[t]=e[t]||[]}),A(e)},[b]);var T=function(e){A(function(t){var n=(0,y.Z)({},t);return(n[e]||[]).length||delete n[e],n})},C=o.useRef(!1);if(o.useEffect(function(){Object.keys(O).length>0?C.current=!0:C.current&&(null==d||d(),C.current=!1)},[O]),!i)return null;var k=Object.keys(O);return(0,v.createPortal)(o.createElement(o.Fragment,null,k.map(function(e){var t=O[e],n=o.createElement(N,{key:e,configList:t,placement:e,prefixCls:a,className:null==c?void 0:c(e),style:null==u?void 0:u(e),motion:s,onNoticeClose:S,onAllNoticeRemoved:T,stack:p});return f?f(n,{prefixCls:a,key:e}):n})),i)}),R=["getContainer","motion","prefixCls","maxCount","className","style","onAllRemoved","stack","renderNotifications"],P=function(){return document.body},M=0,L=n(8985),D=n(51761),j=n(11303),F=n(76585),B=n(80316);let U=e=>{let{componentCls:t,iconCls:n,boxShadow:r,colorText:o,colorSuccess:a,colorError:i,colorWarning:s,colorInfo:l,fontSizeLG:c,motionEaseInOutCirc:u,motionDurationSlow:d,marginXS:p,paddingXS:f,borderRadiusLG:m,zIndexPopup:g,contentPadding:h,contentBg:b}=e,y="".concat(t,"-notice"),v=new L.E4("MessageMoveIn",{"0%":{padding:0,transform:"translateY(-100%)",opacity:0},"100%":{padding:f,transform:"translateY(0)",opacity:1}}),E=new L.E4("MessageMoveOut",{"0%":{maxHeight:e.height,padding:f,opacity:1},"100%":{maxHeight:0,padding:0,opacity:0}}),S={padding:f,textAlign:"center",["".concat(t,"-custom-content > ").concat(n)]:{verticalAlign:"text-bottom",marginInlineEnd:p,fontSize:c},["".concat(y,"-content")]:{display:"inline-block",padding:h,background:b,borderRadius:m,boxShadow:r,pointerEvents:"all"},["".concat(t,"-success > ").concat(n)]:{color:a},["".concat(t,"-error > ").concat(n)]:{color:i},["".concat(t,"-warning > ").concat(n)]:{color:s},["".concat(t,"-info > ").concat(n,",\n ").concat(t,"-loading > ").concat(n)]:{color:l}};return[{[t]:Object.assign(Object.assign({},(0,j.Wf)(e)),{color:o,position:"fixed",top:p,width:"100%",pointerEvents:"none",zIndex:g,["".concat(t,"-move-up")]:{animationFillMode:"forwards"},["\n ".concat(t,"-move-up-appear,\n ").concat(t,"-move-up-enter\n ")]:{animationName:v,animationDuration:d,animationPlayState:"paused",animationTimingFunction:u},["\n ".concat(t,"-move-up-appear").concat(t,"-move-up-appear-active,\n ").concat(t,"-move-up-enter").concat(t,"-move-up-enter-active\n ")]:{animationPlayState:"running"},["".concat(t,"-move-up-leave")]:{animationName:E,animationDuration:d,animationPlayState:"paused",animationTimingFunction:u},["".concat(t,"-move-up-leave").concat(t,"-move-up-leave-active")]:{animationPlayState:"running"},"&-rtl":{direction:"rtl",span:{direction:"rtl"}}})},{[t]:{["".concat(y,"-wrapper")]:Object.assign({},S)}},{["".concat(t,"-notice-pure-panel")]:Object.assign(Object.assign({},S),{padding:0,textAlign:"start"})}]};var Z=(0,F.I$)("Message",e=>[U((0,B.TS)(e,{height:150}))],e=>({zIndexPopup:e.zIndexPopupBase+D.u6+10,contentBg:e.colorBgElevated,contentPadding:"".concat((e.controlHeightLG-e.fontSize*e.lineHeight)/2,"px ").concat(e.paddingSM,"px")})),z=n(92935),H=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);ot.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};let G={info:o.createElement(p.Z,null),success:o.createElement(c.Z,null),error:o.createElement(u.Z,null),warning:o.createElement(d.Z,null),loading:o.createElement(f.Z,null)},$=e=>{let{prefixCls:t,type:n,icon:r,children:a}=e;return o.createElement("div",{className:g()("".concat(t,"-custom-content"),"".concat(t,"-").concat(n))},r||G[n],o.createElement("span",null,a))};var W=n(81303),V=n(76564);function q(e){let t;let n=new Promise(n=>{t=e(()=>{n(!0)})}),r=()=>{null==t||t()};return r.then=(e,t)=>n.then(e,t),r.promise=n,r}var Y=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);ot.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};let K=e=>{let{children:t,prefixCls:n}=e,r=(0,z.Z)(n),[a,i,s]=Z(n,r);return a(o.createElement(T,{classNames:{list:g()(i,s,r)}},t))},X=(e,t)=>{let{prefixCls:n,key:r}=t;return o.createElement(K,{prefixCls:n,key:r},e)},Q=o.forwardRef((e,t)=>{let{top:n,prefixCls:a,getContainer:i,maxCount:l,duration:c=3,rtl:u,transitionName:d,onAllRemoved:p}=e,{getPrefixCls:f,getPopupContainer:m,message:y,direction:v}=o.useContext(s.E_),E=a||f("message"),S=o.createElement("span",{className:"".concat(E,"-close-x")},o.createElement(W.Z,{className:"".concat(E,"-close-icon")})),[w,x]=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.getContainer,n=void 0===t?P:t,a=e.motion,i=e.prefixCls,s=e.maxCount,l=e.className,c=e.style,u=e.onAllRemoved,d=e.stack,p=e.renderNotifications,f=(0,b.Z)(e,R),m=o.useState(),g=(0,h.Z)(m,2),y=g[0],v=g[1],E=o.useRef(),S=o.createElement(_,{container:y,ref:E,prefixCls:i,motion:a,maxCount:s,className:l,style:c,onAllRemoved:u,stack:d,renderNotifications:p}),w=o.useState([]),x=(0,h.Z)(w,2),O=x[0],A=x[1],T=o.useMemo(function(){return{open:function(e){var t=function(){for(var e={},t=arguments.length,n=Array(t),r=0;r({left:"50%",transform:"translateX(-50%)",top:null!=n?n:8}),className:()=>g()({["".concat(E,"-rtl")]:null!=u?u:"rtl"===v}),motion:()=>({motionName:null!=d?d:"".concat(E,"-move-up")}),closable:!1,closeIcon:S,duration:c,getContainer:()=>(null==i?void 0:i())||(null==m?void 0:m())||document.body,maxCount:l,onAllRemoved:p,renderNotifications:X});return o.useImperativeHandle(t,()=>Object.assign(Object.assign({},w),{prefixCls:E,message:y})),x}),J=0;function ee(e){let t=o.useRef(null);return(0,V.ln)("Message"),[o.useMemo(()=>{let e=e=>{var n;null===(n=t.current)||void 0===n||n.close(e)},n=n=>{if(!t.current){let e=()=>{};return e.then=()=>{},e}let{open:r,prefixCls:a,message:i}=t.current,s="".concat(a,"-notice"),{content:l,icon:c,type:u,key:d,className:p,style:f,onClose:m}=n,h=Y(n,["content","icon","type","key","className","style","onClose"]),b=d;return null==b&&(J+=1,b="antd-message-".concat(J)),q(t=>(r(Object.assign(Object.assign({},h),{key:b,content:o.createElement($,{prefixCls:a,type:u,icon:c},l),placement:"top",className:g()(u&&"".concat(s,"-").concat(u),p,null==i?void 0:i.className),style:Object.assign(Object.assign({},null==i?void 0:i.style),f),onClose:()=>{null==m||m(),t()}})),()=>{e(b)}))},r={open:n,destroy:n=>{var r;void 0!==n?e(n):null===(r=t.current)||void 0===r||r.destroy()}};return["info","success","warning","error","loading"].forEach(e=>{r[e]=(t,r,o)=>{let a,i;return"function"==typeof r?i=r:(a=r,i=o),n(Object.assign(Object.assign({onClose:i,duration:a},t&&"object"==typeof t&&"content"in t?t:{content:t}),{type:e}))}}),r},[]),o.createElement(Q,Object.assign({key:"message-holder"},e,{ref:t}))]}let et=null,en=e=>e(),er=[],eo={};function ea(){let{getContainer:e,duration:t,rtl:n,maxCount:r,top:o}=eo,a=(null==e?void 0:e())||document.body;return{getContainer:()=>a,duration:t,rtl:n,maxCount:r,top:o}}let ei=o.forwardRef((e,t)=>{let{messageConfig:n,sync:r}=e,{getPrefixCls:a}=(0,o.useContext)(s.E_),l=eo.prefixCls||a("message"),c=(0,o.useContext)(i),[u,d]=ee(Object.assign(Object.assign(Object.assign({},n),{prefixCls:l}),c.message));return o.useImperativeHandle(t,()=>{let e=Object.assign({},u);return Object.keys(e).forEach(t=>{e[t]=function(){return r(),u[t].apply(u,arguments)}}),{instance:e,sync:r}}),d}),es=o.forwardRef((e,t)=>{let[n,r]=o.useState(ea),a=()=>{r(ea)};o.useEffect(a,[]);let i=(0,l.w6)(),s=i.getRootPrefixCls(),c=i.getIconPrefixCls(),u=i.getTheme(),d=o.createElement(ei,{ref:t,sync:a,messageConfig:n});return o.createElement(l.ZP,{prefixCls:s,iconPrefixCls:c,theme:u},i.holderRender?i.holderRender(d):d)});function el(){if(!et){let e=document.createDocumentFragment(),t={fragment:e};et=t,en(()=>{(0,a.s)(o.createElement(es,{ref:e=>{let{instance:n,sync:r}=e||{};Promise.resolve().then(()=>{!t.instance&&n&&(t.instance=n,t.sync=r,el())})}}),e)});return}et.instance&&(er.forEach(e=>{let{type:t,skipped:n}=e;if(!n)switch(t){case"open":en(()=>{let t=et.instance.open(Object.assign(Object.assign({},eo),e.config));null==t||t.then(e.resolve),e.setCloseFn(t)});break;case"destroy":en(()=>{null==et||et.instance.destroy(e.key)});break;default:en(()=>{var n;let o=(n=et.instance)[t].apply(n,(0,r.Z)(e.args));null==o||o.then(e.resolve),e.setCloseFn(o)})}}),er=[])}let ec={open:function(e){let t=q(t=>{let n;let r={type:"open",config:e,resolve:t,setCloseFn:e=>{n=e}};return er.push(r),()=>{n?en(()=>{n()}):r.skipped=!0}});return el(),t},destroy:function(e){er.push({type:"destroy",key:e}),el()},config:function(e){eo=Object.assign(Object.assign({},eo),e),en(()=>{var e;null===(e=null==et?void 0:et.sync)||void 0===e||e.call(et)})},useMessage:function(e){return ee(e)},_InternalPanelDoNotUseOrYouWillBeFired:e=>{let{prefixCls:t,className:n,type:r,icon:a,content:i}=e,l=H(e,["prefixCls","className","type","icon","content"]),{getPrefixCls:c}=o.useContext(s.E_),u=t||c("message"),d=(0,z.Z)(u),[p,f,m]=Z(u,d);return p(o.createElement(O,Object.assign({},l,{prefixCls:u,className:g()(n,f,"".concat(u,"-notice-pure-panel"),m,d),eventKey:"pure",duration:null,content:o.createElement($,{prefixCls:u,type:r,icon:a},i)})))}};["success","info","warning","error","loading"].forEach(e=>{ec[e]=function(){for(var t=arguments.length,n=Array(t),r=0;r{let r;let o={type:e,args:t,resolve:n,setCloseFn:e=>{r=e}};return er.push(o),()=>{r?en(()=>{r()}):o.skipped=!0}});return el(),n}(e,n)}});var eu=ec},77171:function(e,t,n){let r;n.d(t,{Z:function(){return eX}});var o=n(63787),a=n(64090),i=n(37274),s=n(57499),l=n(54165),c=n(99537),u=n(77136),d=n(20653),p=n(40388),f=n(16480),m=n.n(f),g=n(51761),h=n(47387),b=n(70595),y=n(24750),v=n(89211),E=n(1861),S=n(51350),w=e=>{let{type:t,children:n,prefixCls:r,buttonProps:o,close:i,autoFocus:s,emitEvent:l,isSilent:c,quitOnNullishReturnValue:u,actionFn:d}=e,p=a.useRef(!1),f=a.useRef(null),[m,g]=(0,v.Z)(!1),h=function(){null==i||i.apply(void 0,arguments)};a.useEffect(()=>{let e=null;return s&&(e=setTimeout(()=>{var e;null===(e=f.current)||void 0===e||e.focus()})),()=>{e&&clearTimeout(e)}},[]);let b=e=>{e&&e.then&&(g(!0),e.then(function(){g(!1,!0),h.apply(void 0,arguments),p.current=!1},e=>{if(g(!1,!0),p.current=!1,null==c||!c())return Promise.reject(e)}))};return a.createElement(E.ZP,Object.assign({},(0,S.nx)(t),{onClick:e=>{let t;if(!p.current){if(p.current=!0,!d){h();return}if(l){var n;if(t=d(e),u&&!((n=t)&&n.then)){p.current=!1,h(e);return}}else if(d.length)t=d(i),p.current=!1;else if(!(t=d())){h();return}b(t)}},loading:m,prefixCls:r},o,{ref:f}),n)};let x=a.createContext({}),{Provider:O}=x;var A=()=>{let{autoFocusButton:e,cancelButtonProps:t,cancelTextLocale:n,isSilent:r,mergedOkCancel:o,rootPrefixCls:i,close:s,onCancel:l,onConfirm:c}=(0,a.useContext)(x);return o?a.createElement(w,{isSilent:r,actionFn:l,close:function(){null==s||s.apply(void 0,arguments),null==c||c(!1)},autoFocus:"cancel"===e,buttonProps:t,prefixCls:"".concat(i,"-btn")},n):null},T=()=>{let{autoFocusButton:e,close:t,isSilent:n,okButtonProps:r,rootPrefixCls:o,okTextLocale:i,okType:s,onConfirm:l,onOk:c}=(0,a.useContext)(x);return a.createElement(w,{isSilent:n,type:s||"primary",actionFn:c,close:function(){null==t||t.apply(void 0,arguments),null==l||l(!0)},autoFocus:"ok"===e,buttonProps:r,prefixCls:"".concat(o,"-btn")},i)},C=n(81303),k=n(14749),I=n(80406),N=n(88804),_=a.createContext({}),R=n(5239),P=n(31506),M=n(91010),L=n(4295),D=n(72480);function j(e,t,n){var r=t;return!r&&n&&(r="".concat(e,"-").concat(n)),r}function F(e,t){var n=e["page".concat(t?"Y":"X","Offset")],r="scroll".concat(t?"Top":"Left");if("number"!=typeof n){var o=e.document;"number"!=typeof(n=o.documentElement[r])&&(n=o.body[r])}return n}var B=n(49367),U=n(74084),Z=a.memo(function(e){return e.children},function(e,t){return!t.shouldUpdate}),z={width:0,height:0,overflow:"hidden",outline:"none"},H=a.forwardRef(function(e,t){var n,r,o,i=e.prefixCls,s=e.className,l=e.style,c=e.title,u=e.ariaId,d=e.footer,p=e.closable,f=e.closeIcon,g=e.onClose,h=e.children,b=e.bodyStyle,y=e.bodyProps,v=e.modalRender,E=e.onMouseDown,S=e.onMouseUp,w=e.holderRef,x=e.visible,O=e.forceRender,A=e.width,T=e.height,C=e.classNames,I=e.styles,N=a.useContext(_).panel,P=(0,U.x1)(w,N),M=(0,a.useRef)(),L=(0,a.useRef)();a.useImperativeHandle(t,function(){return{focus:function(){var e;null===(e=M.current)||void 0===e||e.focus()},changeActive:function(e){var t=document.activeElement;e&&t===L.current?M.current.focus():e||t!==M.current||L.current.focus()}}});var D={};void 0!==A&&(D.width=A),void 0!==T&&(D.height=T),d&&(n=a.createElement("div",{className:m()("".concat(i,"-footer"),null==C?void 0:C.footer),style:(0,R.Z)({},null==I?void 0:I.footer)},d)),c&&(r=a.createElement("div",{className:m()("".concat(i,"-header"),null==C?void 0:C.header),style:(0,R.Z)({},null==I?void 0:I.header)},a.createElement("div",{className:"".concat(i,"-title"),id:u},c))),p&&(o=a.createElement("button",{type:"button",onClick:g,"aria-label":"Close",className:"".concat(i,"-close")},f||a.createElement("span",{className:"".concat(i,"-close-x")})));var j=a.createElement("div",{className:m()("".concat(i,"-content"),null==C?void 0:C.content),style:null==I?void 0:I.content},o,r,a.createElement("div",(0,k.Z)({className:m()("".concat(i,"-body"),null==C?void 0:C.body),style:(0,R.Z)((0,R.Z)({},b),null==I?void 0:I.body)},y),h),n);return a.createElement("div",{key:"dialog-element",role:"dialog","aria-labelledby":c?u:null,"aria-modal":"true",ref:P,style:(0,R.Z)((0,R.Z)({},l),D),className:m()(i,s),onMouseDown:E,onMouseUp:S},a.createElement("div",{tabIndex:0,ref:M,style:z,"aria-hidden":"true"}),a.createElement(Z,{shouldUpdate:x||O},v?v(j):j),a.createElement("div",{tabIndex:0,ref:L,style:z,"aria-hidden":"true"}))}),G=a.forwardRef(function(e,t){var n=e.prefixCls,r=e.title,o=e.style,i=e.className,s=e.visible,l=e.forceRender,c=e.destroyOnClose,u=e.motionName,d=e.ariaId,p=e.onVisibleChanged,f=e.mousePosition,g=(0,a.useRef)(),h=a.useState(),b=(0,I.Z)(h,2),y=b[0],v=b[1],E={};function S(){var e,t,n,r,o,a=(n={left:(t=(e=g.current).getBoundingClientRect()).left,top:t.top},o=(r=e.ownerDocument).defaultView||r.parentWindow,n.left+=F(o),n.top+=F(o,!0),n);v(f?"".concat(f.x-a.left,"px ").concat(f.y-a.top,"px"):"")}return y&&(E.transformOrigin=y),a.createElement(B.ZP,{visible:s,onVisibleChanged:p,onAppearPrepare:S,onEnterPrepare:S,forceRender:l,motionName:u,removeOnLeave:c,ref:g},function(s,l){var c=s.className,u=s.style;return a.createElement(H,(0,k.Z)({},e,{ref:t,title:r,ariaId:d,prefixCls:n,holderRef:l,style:(0,R.Z)((0,R.Z)((0,R.Z)({},u),o),E),className:m()(i,c)}))})});function $(e){var t=e.prefixCls,n=e.style,r=e.visible,o=e.maskProps,i=e.motionName,s=e.className;return a.createElement(B.ZP,{key:"mask",visible:r,motionName:i,leavedClassName:"".concat(t,"-mask-hidden")},function(e,r){var i=e.className,l=e.style;return a.createElement("div",(0,k.Z)({ref:r,style:(0,R.Z)((0,R.Z)({},l),n),className:m()("".concat(t,"-mask"),i,s)},o))})}function W(e){var t=e.prefixCls,n=void 0===t?"rc-dialog":t,r=e.zIndex,o=e.visible,i=void 0!==o&&o,s=e.keyboard,l=void 0===s||s,c=e.focusTriggerAfterClose,u=void 0===c||c,d=e.wrapStyle,p=e.wrapClassName,f=e.wrapProps,g=e.onClose,h=e.afterOpenChange,b=e.afterClose,y=e.transitionName,v=e.animation,E=e.closable,S=e.mask,w=void 0===S||S,x=e.maskTransitionName,O=e.maskAnimation,A=e.maskClosable,T=e.maskStyle,C=e.maskProps,N=e.rootClassName,_=e.classNames,F=e.styles,B=(0,a.useRef)(),U=(0,a.useRef)(),Z=(0,a.useRef)(),z=a.useState(i),H=(0,I.Z)(z,2),W=H[0],V=H[1],q=(0,M.Z)();function Y(e){null==g||g(e)}var K=(0,a.useRef)(!1),X=(0,a.useRef)(),Q=null;return(void 0===A||A)&&(Q=function(e){K.current?K.current=!1:U.current===e.target&&Y(e)}),(0,a.useEffect)(function(){i&&(V(!0),(0,P.Z)(U.current,document.activeElement)||(B.current=document.activeElement))},[i]),(0,a.useEffect)(function(){return function(){clearTimeout(X.current)}},[]),a.createElement("div",(0,k.Z)({className:m()("".concat(n,"-root"),N)},(0,D.Z)(e,{data:!0})),a.createElement($,{prefixCls:n,visible:w&&i,motionName:j(n,x,O),style:(0,R.Z)((0,R.Z)({zIndex:r},T),null==F?void 0:F.mask),maskProps:C,className:null==_?void 0:_.mask}),a.createElement("div",(0,k.Z)({tabIndex:-1,onKeyDown:function(e){if(l&&e.keyCode===L.Z.ESC){e.stopPropagation(),Y(e);return}i&&e.keyCode===L.Z.TAB&&Z.current.changeActive(!e.shiftKey)},className:m()("".concat(n,"-wrap"),p,null==_?void 0:_.wrapper),ref:U,onClick:Q,style:(0,R.Z)((0,R.Z)((0,R.Z)({zIndex:r},d),null==F?void 0:F.wrapper),{},{display:W?null:"none"})},f),a.createElement(G,(0,k.Z)({},e,{onMouseDown:function(){clearTimeout(X.current),K.current=!0},onMouseUp:function(){X.current=setTimeout(function(){K.current=!1})},ref:Z,closable:void 0===E||E,ariaId:q,prefixCls:n,visible:i&&W,onClose:Y,onVisibleChanged:function(e){if(e)!function(){if(!(0,P.Z)(U.current,document.activeElement)){var e;null===(e=Z.current)||void 0===e||e.focus()}}();else{if(V(!1),w&&B.current&&u){try{B.current.focus({preventScroll:!0})}catch(e){}B.current=null}W&&(null==b||b())}null==h||h(e)},motionName:j(n,y,v)}))))}G.displayName="Content",n(53850);var V=function(e){var t=e.visible,n=e.getContainer,r=e.forceRender,o=e.destroyOnClose,i=void 0!==o&&o,s=e.afterClose,l=e.panelRef,c=a.useState(t),u=(0,I.Z)(c,2),d=u[0],p=u[1],f=a.useMemo(function(){return{panel:l}},[l]);return(a.useEffect(function(){t&&p(!0)},[t]),r||!i||d)?a.createElement(_.Provider,{value:f},a.createElement(N.Z,{open:t||r||d,autoDestroy:!1,getContainer:n,autoLock:t||d},a.createElement(W,(0,k.Z)({},e,{destroyOnClose:i,afterClose:function(){null==s||s(),p(!1)}})))):null};V.displayName="Dialog";var q=function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:a.createElement(C.Z,null),o=arguments.length>4&&void 0!==arguments[4]&&arguments[4];if("boolean"==typeof e?!e:void 0===t?!o:!1===t||null===t)return[!1,null];let i="boolean"==typeof t||null==t?r:t;return[!0,n?n(i):i]},Y=n(22127),K=n(86718),X=n(47137),Q=n(92801),J=n(48563);function ee(){}let et=a.createContext({add:ee,remove:ee});var en=n(17094),er=()=>{let{cancelButtonProps:e,cancelTextLocale:t,onCancel:n}=(0,a.useContext)(x);return a.createElement(E.ZP,Object.assign({onClick:n},e),t)},eo=()=>{let{confirmLoading:e,okButtonProps:t,okType:n,okTextLocale:r,onOk:o}=(0,a.useContext)(x);return a.createElement(E.ZP,Object.assign({},(0,S.nx)(n),{loading:e,onClick:o},t),r)},ea=n(4678);function ei(e,t){return a.createElement("span",{className:"".concat(e,"-close-x")},t||a.createElement(C.Z,{className:"".concat(e,"-close-icon")}))}let es=e=>{let t;let{okText:n,okType:r="primary",cancelText:i,confirmLoading:s,onOk:l,onCancel:c,okButtonProps:u,cancelButtonProps:d,footer:p}=e,[f]=(0,b.Z)("Modal",(0,ea.A)()),m={confirmLoading:s,okButtonProps:u,cancelButtonProps:d,okTextLocale:n||(null==f?void 0:f.okText),cancelTextLocale:i||(null==f?void 0:f.cancelText),okType:r,onOk:l,onCancel:c},g=a.useMemo(()=>m,(0,o.Z)(Object.values(m)));return"function"==typeof p||void 0===p?(t=a.createElement(a.Fragment,null,a.createElement(er,null),a.createElement(eo,null)),"function"==typeof p&&(t=p(t,{OkBtn:eo,CancelBtn:er})),t=a.createElement(O,{value:g},t)):t=p,a.createElement(en.n,{disabled:!1},t)};var el=n(11303),ec=n(8985),eu=n(59353);let ed=new ec.E4("antFadeIn",{"0%":{opacity:0},"100%":{opacity:1}}),ep=new ec.E4("antFadeOut",{"0%":{opacity:1},"100%":{opacity:0}}),ef=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],{antCls:n}=e,r="".concat(n,"-fade"),o=t?"&":"";return[(0,eu.R)(r,ed,ep,e.motionDurationMid,t),{["\n ".concat(o).concat(r,"-enter,\n ").concat(o).concat(r,"-appear\n ")]:{opacity:0,animationTimingFunction:"linear"},["".concat(o).concat(r,"-leave")]:{animationTimingFunction:"linear"}}]};var em=n(58854),eg=n(80316),eh=n(76585);function eb(e){return{position:e,inset:0}}let ey=e=>{let{componentCls:t,antCls:n}=e;return[{["".concat(t,"-root")]:{["".concat(t).concat(n,"-zoom-enter, ").concat(t).concat(n,"-zoom-appear")]:{transform:"none",opacity:0,animationDuration:e.motionDurationSlow,userSelect:"none"},["".concat(t).concat(n,"-zoom-leave ").concat(t,"-content")]:{pointerEvents:"none"},["".concat(t,"-mask")]:Object.assign(Object.assign({},eb("fixed")),{zIndex:e.zIndexPopupBase,height:"100%",backgroundColor:e.colorBgMask,pointerEvents:"none",["".concat(t,"-hidden")]:{display:"none"}}),["".concat(t,"-wrap")]:Object.assign(Object.assign({},eb("fixed")),{zIndex:e.zIndexPopupBase,overflow:"auto",outline:0,WebkitOverflowScrolling:"touch",["&:has(".concat(t).concat(n,"-zoom-enter), &:has(").concat(t).concat(n,"-zoom-appear)")]:{pointerEvents:"none"}})}},{["".concat(t,"-root")]:ef(e)}]},ev=e=>{let{componentCls:t}=e;return[{["".concat(t,"-root")]:{["".concat(t,"-wrap-rtl")]:{direction:"rtl"},["".concat(t,"-centered")]:{textAlign:"center","&::before":{display:"inline-block",width:0,height:"100%",verticalAlign:"middle",content:'""'},[t]:{top:0,display:"inline-block",paddingBottom:0,textAlign:"start",verticalAlign:"middle"}},["@media (max-width: ".concat(e.screenSMMax,"px)")]:{[t]:{maxWidth:"calc(100vw - 16px)",margin:"".concat((0,ec.bf)(e.marginXS)," auto")},["".concat(t,"-centered")]:{[t]:{flex:1}}}}},{[t]:Object.assign(Object.assign({},(0,el.Wf)(e)),{pointerEvents:"none",position:"relative",top:100,width:"auto",maxWidth:"calc(100vw - ".concat((0,ec.bf)(e.calc(e.margin).mul(2).equal()),")"),margin:"0 auto",paddingBottom:e.paddingLG,["".concat(t,"-title")]:{margin:0,color:e.titleColor,fontWeight:e.fontWeightStrong,fontSize:e.titleFontSize,lineHeight:e.titleLineHeight,wordWrap:"break-word"},["".concat(t,"-content")]:{position:"relative",backgroundColor:e.contentBg,backgroundClip:"padding-box",border:0,borderRadius:e.borderRadiusLG,boxShadow:e.boxShadow,pointerEvents:"auto",padding:e.contentPadding},["".concat(t,"-close")]:Object.assign({position:"absolute",top:e.calc(e.modalHeaderHeight).sub(e.modalCloseBtnSize).div(2).equal(),insetInlineEnd:e.calc(e.modalHeaderHeight).sub(e.modalCloseBtnSize).div(2).equal(),zIndex:e.calc(e.zIndexPopupBase).add(10).equal(),padding:0,color:e.modalCloseIconColor,fontWeight:e.fontWeightStrong,lineHeight:1,textDecoration:"none",background:"transparent",borderRadius:e.borderRadiusSM,width:e.modalCloseBtnSize,height:e.modalCloseBtnSize,border:0,outline:0,cursor:"pointer",transition:"color ".concat(e.motionDurationMid,", background-color ").concat(e.motionDurationMid),"&-x":{display:"flex",fontSize:e.fontSizeLG,fontStyle:"normal",lineHeight:"".concat((0,ec.bf)(e.modalCloseBtnSize)),justifyContent:"center",textTransform:"none",textRendering:"auto"},"&:hover":{color:e.modalIconHoverColor,backgroundColor:e.closeBtnHoverBg,textDecoration:"none"},"&:active":{backgroundColor:e.closeBtnActiveBg}},(0,el.Qy)(e)),["".concat(t,"-header")]:{color:e.colorText,background:e.headerBg,borderRadius:"".concat((0,ec.bf)(e.borderRadiusLG)," ").concat((0,ec.bf)(e.borderRadiusLG)," 0 0"),marginBottom:e.headerMarginBottom,padding:e.headerPadding,borderBottom:e.headerBorderBottom},["".concat(t,"-body")]:{fontSize:e.fontSize,lineHeight:e.lineHeight,wordWrap:"break-word",padding:e.bodyPadding},["".concat(t,"-footer")]:{textAlign:"end",background:e.footerBg,marginTop:e.footerMarginTop,padding:e.footerPadding,borderTop:e.footerBorderTop,borderRadius:e.footerBorderRadius,["> ".concat(e.antCls,"-btn + ").concat(e.antCls,"-btn")]:{marginInlineStart:e.marginXS}},["".concat(t,"-open")]:{overflow:"hidden"}})},{["".concat(t,"-pure-panel")]:{top:"auto",padding:0,display:"flex",flexDirection:"column",["".concat(t,"-content,\n ").concat(t,"-body,\n ").concat(t,"-confirm-body-wrapper")]:{display:"flex",flexDirection:"column",flex:"auto"},["".concat(t,"-confirm-body")]:{marginBottom:"auto"}}}]},eE=e=>{let{componentCls:t}=e;return{["".concat(t,"-root")]:{["".concat(t,"-wrap-rtl")]:{direction:"rtl",["".concat(t,"-confirm-body")]:{direction:"rtl"}}}}},eS=e=>{let t=e.padding,n=e.fontSizeHeading5,r=e.lineHeightHeading5;return(0,eg.TS)(e,{modalHeaderHeight:e.calc(e.calc(r).mul(n).equal()).add(e.calc(t).mul(2).equal()).equal(),modalFooterBorderColorSplit:e.colorSplit,modalFooterBorderStyle:e.lineType,modalFooterBorderWidth:e.lineWidth,modalIconHoverColor:e.colorIconHover,modalCloseIconColor:e.colorIcon,modalCloseBtnSize:e.fontHeight,modalConfirmIconSize:e.fontHeight,modalTitleHeight:e.calc(e.titleFontSize).mul(e.titleLineHeight).equal()})},ew=e=>({footerBg:"transparent",headerBg:e.colorBgElevated,titleLineHeight:e.lineHeightHeading5,titleFontSize:e.fontSizeHeading5,contentBg:e.colorBgElevated,titleColor:e.colorTextHeading,closeBtnHoverBg:e.wireframe?"transparent":e.colorFillContent,closeBtnActiveBg:e.wireframe?"transparent":e.colorFillContentHover,contentPadding:e.wireframe?0:"".concat((0,ec.bf)(e.paddingMD)," ").concat((0,ec.bf)(e.paddingContentHorizontalLG)),headerPadding:e.wireframe?"".concat((0,ec.bf)(e.padding)," ").concat((0,ec.bf)(e.paddingLG)):0,headerBorderBottom:e.wireframe?"".concat((0,ec.bf)(e.lineWidth)," ").concat(e.lineType," ").concat(e.colorSplit):"none",headerMarginBottom:e.wireframe?0:e.marginXS,bodyPadding:e.wireframe?e.paddingLG:0,footerPadding:e.wireframe?"".concat((0,ec.bf)(e.paddingXS)," ").concat((0,ec.bf)(e.padding)):0,footerBorderTop:e.wireframe?"".concat((0,ec.bf)(e.lineWidth)," ").concat(e.lineType," ").concat(e.colorSplit):"none",footerBorderRadius:e.wireframe?"0 0 ".concat((0,ec.bf)(e.borderRadiusLG)," ").concat((0,ec.bf)(e.borderRadiusLG)):0,footerMarginTop:e.wireframe?0:e.marginSM,confirmBodyPadding:e.wireframe?"".concat((0,ec.bf)(2*e.padding)," ").concat((0,ec.bf)(2*e.padding)," ").concat((0,ec.bf)(e.paddingLG)):0,confirmIconMarginInlineEnd:e.wireframe?e.margin:e.marginSM,confirmBtnsMarginTop:e.wireframe?e.marginLG:e.marginSM});var ex=(0,eh.I$)("Modal",e=>{let t=eS(e);return[ev(t),eE(t),ey(t),(0,em._y)(t,"zoom")]},ew,{unitless:{titleLineHeight:!0}}),eO=n(92935),eA=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);ot.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};(0,Y.Z)()&&window.document.documentElement&&document.documentElement.addEventListener("click",e=>{r={x:e.pageX,y:e.pageY},setTimeout(()=>{r=null},100)},!0);var eT=e=>{var t;let{getPopupContainer:n,getPrefixCls:o,direction:i,modal:l}=a.useContext(s.E_),c=t=>{let{onCancel:n}=e;null==n||n(t)},{prefixCls:u,className:d,rootClassName:p,open:f,wrapClassName:b,centered:y,getContainer:v,closeIcon:E,closable:S,focusTriggerAfterClose:w=!0,style:x,visible:O,width:A=520,footer:T,classNames:k,styles:I}=e,N=eA(e,["prefixCls","className","rootClassName","open","wrapClassName","centered","getContainer","closeIcon","closable","focusTriggerAfterClose","style","visible","width","footer","classNames","styles"]),_=o("modal",u),R=o(),P=(0,eO.Z)(_),[M,L,D]=ex(_,P),j=m()(b,{["".concat(_,"-centered")]:!!y,["".concat(_,"-wrap-rtl")]:"rtl"===i}),F=null!==T&&a.createElement(es,Object.assign({},e,{onOk:t=>{let{onOk:n}=e;null==n||n(t)},onCancel:c})),[B,U]=q(S,E,e=>ei(_,e),a.createElement(C.Z,{className:"".concat(_,"-close-icon")}),!0),Z=function(e){let t=a.useContext(et),n=a.useRef();return(0,J.zX)(r=>{if(r){let o=e?r.querySelector(e):r;t.add(o),n.current=o}else t.remove(n.current)})}(".".concat(_,"-content")),[z,H]=(0,g.Cn)("Modal",N.zIndex);return M(a.createElement(Q.BR,null,a.createElement(X.Ux,{status:!0,override:!0},a.createElement(K.Z.Provider,{value:H},a.createElement(V,Object.assign({width:A},N,{zIndex:z,getContainer:void 0===v?n:v,prefixCls:_,rootClassName:m()(L,p,D,P),footer:F,visible:null!=f?f:O,mousePosition:null!==(t=N.mousePosition)&&void 0!==t?t:r,onClose:c,closable:B,closeIcon:U,focusTriggerAfterClose:w,transitionName:(0,h.m)(R,"zoom",e.transitionName),maskTransitionName:(0,h.m)(R,"fade",e.maskTransitionName),className:m()(L,d,null==l?void 0:l.className),style:Object.assign(Object.assign({},null==l?void 0:l.style),x),classNames:Object.assign(Object.assign({wrapper:j},null==l?void 0:l.classNames),k),styles:Object.assign(Object.assign({},null==l?void 0:l.styles),I),panelRef:Z}))))))};let eC=e=>{let{componentCls:t,titleFontSize:n,titleLineHeight:r,modalConfirmIconSize:o,fontSize:a,lineHeight:i,modalTitleHeight:s,fontHeight:l,confirmBodyPadding:c}=e,u="".concat(t,"-confirm");return{[u]:{"&-rtl":{direction:"rtl"},["".concat(e.antCls,"-modal-header")]:{display:"none"},["".concat(u,"-body-wrapper")]:Object.assign({},(0,el.dF)()),["&".concat(t," ").concat(t,"-body")]:{padding:c},["".concat(u,"-body")]:{display:"flex",flexWrap:"nowrap",alignItems:"start",["> ".concat(e.iconCls)]:{flex:"none",fontSize:o,marginInlineEnd:e.confirmIconMarginInlineEnd,marginTop:e.calc(e.calc(l).sub(o).equal()).div(2).equal()},["&-has-title > ".concat(e.iconCls)]:{marginTop:e.calc(e.calc(s).sub(o).equal()).div(2).equal()}},["".concat(u,"-paragraph")]:{display:"flex",flexDirection:"column",flex:"auto",rowGap:e.marginXS,maxWidth:"calc(100% - ".concat((0,ec.bf)(e.calc(e.modalConfirmIconSize).add(e.marginSM).equal()),")")},["".concat(u,"-title")]:{color:e.colorTextHeading,fontWeight:e.fontWeightStrong,fontSize:n,lineHeight:r},["".concat(u,"-content")]:{color:e.colorText,fontSize:a,lineHeight:i},["".concat(u,"-btns")]:{textAlign:"end",marginTop:e.confirmBtnsMarginTop,["".concat(e.antCls,"-btn + ").concat(e.antCls,"-btn")]:{marginBottom:0,marginInlineStart:e.marginXS}}},["".concat(u,"-error ").concat(u,"-body > ").concat(e.iconCls)]:{color:e.colorError},["".concat(u,"-warning ").concat(u,"-body > ").concat(e.iconCls,",\n ").concat(u,"-confirm ").concat(u,"-body > ").concat(e.iconCls)]:{color:e.colorWarning},["".concat(u,"-info ").concat(u,"-body > ").concat(e.iconCls)]:{color:e.colorInfo},["".concat(u,"-success ").concat(u,"-body > ").concat(e.iconCls)]:{color:e.colorSuccess}}};var ek=(0,eh.bk)(["Modal","confirm"],e=>[eC(eS(e))],ew,{order:-1e3}),eI=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);ot.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};function eN(e){let{prefixCls:t,icon:n,okText:r,cancelText:i,confirmPrefixCls:s,type:l,okCancel:f,footer:g,locale:h}=e,y=eI(e,["prefixCls","icon","okText","cancelText","confirmPrefixCls","type","okCancel","footer","locale"]),v=n;if(!n&&null!==n)switch(l){case"info":v=a.createElement(p.Z,null);break;case"success":v=a.createElement(c.Z,null);break;case"error":v=a.createElement(u.Z,null);break;default:v=a.createElement(d.Z,null)}let E=null!=f?f:"confirm"===l,S=null!==e.autoFocusButton&&(e.autoFocusButton||"ok"),[w]=(0,b.Z)("Modal"),x=h||w,C=r||(E?null==x?void 0:x.okText:null==x?void 0:x.justOkText),k=Object.assign({autoFocusButton:S,cancelTextLocale:i||(null==x?void 0:x.cancelText),okTextLocale:C,mergedOkCancel:E},y),I=a.useMemo(()=>k,(0,o.Z)(Object.values(k))),N=a.createElement(a.Fragment,null,a.createElement(A,null),a.createElement(T,null)),_=void 0!==e.title&&null!==e.title,R="".concat(s,"-body");return a.createElement("div",{className:"".concat(s,"-body-wrapper")},a.createElement("div",{className:m()(R,{["".concat(R,"-has-title")]:_})},v,a.createElement("div",{className:"".concat(s,"-paragraph")},_&&a.createElement("span",{className:"".concat(s,"-title")},e.title),a.createElement("div",{className:"".concat(s,"-content")},e.content))),void 0===g||"function"==typeof g?a.createElement(O,{value:I},a.createElement("div",{className:"".concat(s,"-btns")},"function"==typeof g?g(N,{OkBtn:T,CancelBtn:A}):N)):g,a.createElement(ek,{prefixCls:t}))}let e_=e=>{let{close:t,zIndex:n,afterClose:r,open:o,keyboard:i,centered:s,getContainer:l,maskStyle:c,direction:u,prefixCls:d,wrapClassName:p,rootPrefixCls:f,bodyStyle:b,closable:v=!1,closeIcon:E,modalRender:S,focusTriggerAfterClose:w,onConfirm:x,styles:O}=e,A="".concat(d,"-confirm"),T=e.width||416,C=e.style||{},k=void 0===e.mask||e.mask,I=void 0!==e.maskClosable&&e.maskClosable,N=m()(A,"".concat(A,"-").concat(e.type),{["".concat(A,"-rtl")]:"rtl"===u},e.className),[,_]=(0,y.ZP)(),R=a.useMemo(()=>void 0!==n?n:_.zIndexPopupBase+g.u6,[n,_]);return a.createElement(eT,{prefixCls:d,className:N,wrapClassName:m()({["".concat(A,"-centered")]:!!e.centered},p),onCancel:()=>{null==t||t({triggerCancel:!0}),null==x||x(!1)},open:o,title:"",footer:null,transitionName:(0,h.m)(f||"","zoom",e.transitionName),maskTransitionName:(0,h.m)(f||"","fade",e.maskTransitionName),mask:k,maskClosable:I,style:C,styles:Object.assign({body:b,mask:c},O),width:T,zIndex:R,afterClose:r,keyboard:i,centered:s,getContainer:l,closable:v,closeIcon:E,modalRender:S,focusTriggerAfterClose:w},a.createElement(eN,Object.assign({},e,{confirmPrefixCls:A})))};var eR=e=>{let{rootPrefixCls:t,iconPrefixCls:n,direction:r,theme:o}=e;return a.createElement(l.ZP,{prefixCls:t,iconPrefixCls:n,direction:r,theme:o},a.createElement(e_,Object.assign({},e)))},eP=[];let eM="",eL=e=>{var t,n;let{prefixCls:r,getContainer:o,direction:i}=e,l=(0,ea.A)(),c=(0,a.useContext)(s.E_),u=eM||c.getPrefixCls(),d=r||"".concat(u,"-modal"),p=o;return!1===p&&(p=void 0),a.createElement(eR,Object.assign({},e,{rootPrefixCls:u,prefixCls:d,iconPrefixCls:c.iconPrefixCls,theme:c.theme,direction:null!=i?i:c.direction,locale:null!==(n=null===(t=c.locale)||void 0===t?void 0:t.Modal)&&void 0!==n?n:l,getContainer:p}))};function eD(e){let t;let n=(0,l.w6)(),r=document.createDocumentFragment(),s=Object.assign(Object.assign({},e),{close:d,open:!0});function c(){for(var t=arguments.length,n=Array(t),a=0;ae&&e.triggerCancel);e.onCancel&&s&&e.onCancel.apply(e,[()=>{}].concat((0,o.Z)(n.slice(1))));for(let e=0;e{let t=n.getPrefixCls(void 0,eM),o=n.getIconPrefixCls(),s=n.getTheme(),c=a.createElement(eL,Object.assign({},e));(0,i.s)(a.createElement(l.ZP,{prefixCls:t,iconPrefixCls:o,theme:s},n.holderRender?n.holderRender(c):c),r)})}function d(){for(var t=arguments.length,n=Array(t),r=0;r{"function"==typeof e.afterClose&&e.afterClose(),c.apply(this,n)}})).visible&&delete s.visible,u(s)}return u(s),eP.push(d),{destroy:d,update:function(e){u(s="function"==typeof e?e(s):Object.assign(Object.assign({},s),e))}}}function ej(e){return Object.assign(Object.assign({},e),{type:"warning"})}function eF(e){return Object.assign(Object.assign({},e),{type:"info"})}function eB(e){return Object.assign(Object.assign({},e),{type:"success"})}function eU(e){return Object.assign(Object.assign({},e),{type:"error"})}function eZ(e){return Object.assign(Object.assign({},e),{type:"confirm"})}var ez=n(21467),eH=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);ot.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n},eG=(0,ez.i)(e=>{let{prefixCls:t,className:n,closeIcon:r,closable:o,type:i,title:l,children:c,footer:u}=e,d=eH(e,["prefixCls","className","closeIcon","closable","type","title","children","footer"]),{getPrefixCls:p}=a.useContext(s.E_),f=p(),g=t||p("modal"),h=(0,eO.Z)(f),[b,y,v]=ex(g,h),E="".concat(g,"-confirm"),S={};return S=i?{closable:null!=o&&o,title:"",footer:"",children:a.createElement(eN,Object.assign({},e,{prefixCls:g,confirmPrefixCls:E,rootPrefixCls:f,content:c}))}:{closable:null==o||o,title:l,footer:null!==u&&a.createElement(es,Object.assign({},e)),children:c},b(a.createElement(H,Object.assign({prefixCls:g,className:m()(y,"".concat(g,"-pure-panel"),i&&E,i&&"".concat(E,"-").concat(i),n,v,h)},d,{closeIcon:ei(g,r),closable:o},S)))}),e$=n(79474),eW=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);ot.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n},eV=a.forwardRef((e,t)=>{var n,{afterClose:r,config:i}=e,l=eW(e,["afterClose","config"]);let[c,u]=a.useState(!0),[d,p]=a.useState(i),{direction:f,getPrefixCls:m}=a.useContext(s.E_),g=m("modal"),h=m(),y=function(){u(!1);for(var e=arguments.length,t=Array(e),n=0;ne&&e.triggerCancel);d.onCancel&&r&&d.onCancel.apply(d,[()=>{}].concat((0,o.Z)(t.slice(1))))};a.useImperativeHandle(t,()=>({destroy:y,update:e=>{p(t=>Object.assign(Object.assign({},t),e))}}));let v=null!==(n=d.okCancel)&&void 0!==n?n:"confirm"===d.type,[E]=(0,b.Z)("Modal",e$.Z.Modal);return a.createElement(eR,Object.assign({prefixCls:g,rootPrefixCls:h},d,{close:y,open:c,afterClose:()=>{var e;r(),null===(e=d.afterClose)||void 0===e||e.call(d)},okText:d.okText||(v?null==E?void 0:E.okText:null==E?void 0:E.justOkText),direction:d.direction||f,cancelText:d.cancelText||(null==E?void 0:E.cancelText)},l))});let eq=0,eY=a.memo(a.forwardRef((e,t)=>{let[n,r]=function(){let[e,t]=a.useState([]);return[e,a.useCallback(e=>(t(t=>[].concat((0,o.Z)(t),[e])),()=>{t(t=>t.filter(t=>t!==e))}),[])]}();return a.useImperativeHandle(t,()=>({patchElement:r}),[]),a.createElement(a.Fragment,null,n)}));function eK(e){return eD(ej(e))}eT.useModal=function(){let e=a.useRef(null),[t,n]=a.useState([]);a.useEffect(()=>{t.length&&((0,o.Z)(t).forEach(e=>{e()}),n([]))},[t]);let r=a.useCallback(t=>function(r){var i;let s,l;eq+=1;let c=a.createRef(),u=new Promise(e=>{s=e}),d=!1,p=a.createElement(eV,{key:"modal-".concat(eq),config:t(r),ref:c,afterClose:()=>{null==l||l()},isSilent:()=>d,onConfirm:e=>{s(e)}});return(l=null===(i=e.current)||void 0===i?void 0:i.patchElement(p))&&eP.push(l),{destroy:()=>{function e(){var e;null===(e=c.current)||void 0===e||e.destroy()}c.current?e():n(t=>[].concat((0,o.Z)(t),[e]))},update:e=>{function t(){var t;null===(t=c.current)||void 0===t||t.update(e)}c.current?t():n(e=>[].concat((0,o.Z)(e),[t]))},then:e=>(d=!0,u.then(e))}},[]);return[a.useMemo(()=>({info:r(eF),success:r(eB),error:r(eU),warning:r(ej),confirm:r(eZ)}),[]),a.createElement(eY,{key:"modal-holder",ref:e})]},eT.info=function(e){return eD(eF(e))},eT.success=function(e){return eD(eB(e))},eT.error=function(e){return eD(eU(e))},eT.warning=eK,eT.warn=eK,eT.confirm=function(e){return eD(eZ(e))},eT.destroyAll=function(){for(;eP.length;){let e=eP.pop();e&&e()}},eT.config=function(e){let{rootPrefixCls:t}=e;eM=t},eT._InternalPanelDoNotUseOrYouWillBeFired=eG;var eX=eT},4678:function(e,t,n){n.d(t,{A:function(){return l},f:function(){return s}});var r=n(79474);let o=Object.assign({},r.Z.Modal),a=[],i=()=>a.reduce((e,t)=>Object.assign(Object.assign({},e),t),r.Z.Modal);function s(e){if(e){let t=Object.assign({},e);return a.push(t),o=i(),()=>{a=a.filter(e=>e!==t),o=i()}}o=Object.assign({},r.Z.Modal)}function l(){return o}},13969:function(e,t,n){n.d(t,{default:function(){return tj}});var r=n(64090),o=n(16480),a=n.n(o),i=n(14749),s=n(63787),l=n(50833),c=n(5239),u=n(80406),d=n(6787),p=n(6976),f=n(44329),m=n(53850),g=n(24800),h=n(76158),b=n(4295),y=n(74084),v=function(e){var t=e.className,n=e.customizeIcon,o=e.customizeIconProps,i=e.children,s=e.onMouseDown,l=e.onClick,c="function"==typeof n?n(o):n;return r.createElement("span",{className:t,onMouseDown:function(e){e.preventDefault(),null==s||s(e)},style:{userSelect:"none",WebkitUserSelect:"none"},unselectable:"on",onClick:l,"aria-hidden":!0},void 0!==c?c:r.createElement("span",{className:a()(t.split(/\s+/).map(function(e){return"".concat(e,"-icon")}))},i))},E=function(e,t,n,o,a){var i=arguments.length>5&&void 0!==arguments[5]&&arguments[5],s=arguments.length>6?arguments[6]:void 0,l=arguments.length>7?arguments[7]:void 0,c=r.useMemo(function(){return"object"===(0,p.Z)(o)?o.clearIcon:a||void 0},[o,a]);return{allowClear:r.useMemo(function(){return!i&&!!o&&(!!n.length||!!s)&&!("combobox"===l&&""===s)},[o,i,n.length,s,l]),clearIcon:r.createElement(v,{className:"".concat(e,"-clear"),onMouseDown:t,customizeIcon:c},"\xd7")}},S=r.createContext(null);function w(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:250,t=r.useRef(null),n=r.useRef(null);return r.useEffect(function(){return function(){window.clearTimeout(n.current)}},[]),[function(){return t.current},function(r){(r||null===t.current)&&(t.current=r),window.clearTimeout(n.current),n.current=window.setTimeout(function(){t.current=null},e)}]}var x=n(72480),O=n(54739),A=r.forwardRef(function(e,t){var n,o=e.prefixCls,i=e.id,s=e.inputElement,l=e.disabled,u=e.tabIndex,d=e.autoFocus,p=e.autoComplete,f=e.editable,g=e.activeDescendantId,h=e.value,b=e.maxLength,v=e.onKeyDown,E=e.onMouseDown,S=e.onChange,w=e.onPaste,x=e.onCompositionStart,O=e.onCompositionEnd,A=e.open,T=e.attrs,C=s||r.createElement("input",null),k=C,I=k.ref,N=k.props,_=N.onKeyDown,R=N.onChange,P=N.onMouseDown,M=N.onCompositionStart,L=N.onCompositionEnd,D=N.style;return(0,m.Kp)(!("maxLength"in C.props),"Passing 'maxLength' to input element directly may not work because input in BaseSelect is controlled."),C=r.cloneElement(C,(0,c.Z)((0,c.Z)((0,c.Z)({type:"search"},N),{},{id:i,ref:(0,y.sQ)(t,I),disabled:l,tabIndex:u,autoComplete:p||"off",autoFocus:d,className:a()("".concat(o,"-selection-search-input"),null===(n=C)||void 0===n||null===(n=n.props)||void 0===n?void 0:n.className),role:"combobox","aria-expanded":A||!1,"aria-haspopup":"listbox","aria-owns":"".concat(i,"_list"),"aria-autocomplete":"list","aria-controls":"".concat(i,"_list"),"aria-activedescendant":A?g:void 0},T),{},{value:f?h:"",maxLength:b,readOnly:!f,unselectable:f?null:"on",style:(0,c.Z)((0,c.Z)({},D),{},{opacity:f?null:0}),onKeyDown:function(e){v(e),_&&_(e)},onMouseDown:function(e){E(e),P&&P(e)},onChange:function(e){S(e),R&&R(e)},onCompositionStart:function(e){x(e),M&&M(e)},onCompositionEnd:function(e){O(e),L&&L(e)},onPaste:w}))});function T(e){return Array.isArray(e)?e:void 0!==e?[e]:[]}var C=window.document&&window.document.documentElement;function k(e){return["string","number"].includes((0,p.Z)(e))}function I(e){var t=void 0;return e&&(k(e.title)?t=e.title.toString():k(e.label)&&(t=e.label.toString())),t}function N(e){var t;return null!==(t=e.key)&&void 0!==t?t:e.value}var _=function(e){e.preventDefault(),e.stopPropagation()},R=function(e){var t,n,o=e.id,i=e.prefixCls,s=e.values,c=e.open,d=e.searchValue,p=e.autoClearSearchValue,f=e.inputRef,m=e.placeholder,g=e.disabled,h=e.mode,b=e.showSearch,y=e.autoFocus,E=e.autoComplete,S=e.activeDescendantId,w=e.tabIndex,T=e.removeIcon,k=e.maxTagCount,R=e.maxTagTextLength,P=e.maxTagPlaceholder,M=void 0===P?function(e){return"+ ".concat(e.length," ...")}:P,L=e.tagRender,D=e.onToggleOpen,j=e.onRemove,F=e.onInputChange,B=e.onInputPaste,U=e.onInputKeyDown,Z=e.onInputMouseDown,z=e.onInputCompositionStart,H=e.onInputCompositionEnd,G=r.useRef(null),$=(0,r.useState)(0),W=(0,u.Z)($,2),V=W[0],q=W[1],Y=(0,r.useState)(!1),K=(0,u.Z)(Y,2),X=K[0],Q=K[1],J="".concat(i,"-selection"),ee=c||"multiple"===h&&!1===p||"tags"===h?d:"",et="tags"===h||"multiple"===h&&!1===p||b&&(c||X);t=function(){q(G.current.scrollWidth)},n=[ee],C?r.useLayoutEffect(t,n):r.useEffect(t,n);var en=function(e,t,n,o,i){return r.createElement("span",{title:I(e),className:a()("".concat(J,"-item"),(0,l.Z)({},"".concat(J,"-item-disabled"),n))},r.createElement("span",{className:"".concat(J,"-item-content")},t),o&&r.createElement(v,{className:"".concat(J,"-item-remove"),onMouseDown:_,onClick:i,customizeIcon:T},"\xd7"))},er=r.createElement("div",{className:"".concat(J,"-search"),style:{width:V},onFocus:function(){Q(!0)},onBlur:function(){Q(!1)}},r.createElement(A,{ref:f,open:c,prefixCls:i,id:o,inputElement:null,disabled:g,autoFocus:y,autoComplete:E,editable:et,activeDescendantId:S,value:ee,onKeyDown:U,onMouseDown:Z,onChange:F,onPaste:B,onCompositionStart:z,onCompositionEnd:H,tabIndex:w,attrs:(0,x.Z)(e,!0)}),r.createElement("span",{ref:G,className:"".concat(J,"-search-mirror"),"aria-hidden":!0},ee,"\xa0")),eo=r.createElement(O.Z,{prefixCls:"".concat(J,"-overflow"),data:s,renderItem:function(e){var t,n=e.disabled,o=e.label,a=e.value,i=!g&&!n,s=o;if("number"==typeof R&&("string"==typeof o||"number"==typeof o)){var l=String(s);l.length>R&&(s="".concat(l.slice(0,R),"..."))}var u=function(t){t&&t.stopPropagation(),j(e)};return"function"==typeof L?(t=s,r.createElement("span",{onMouseDown:function(e){_(e),D(!c)}},L({label:t,value:a,disabled:n,closable:i,onClose:u}))):en(e,s,n,i,u)},renderRest:function(e){var t="function"==typeof M?M(e):M;return en({title:t},t,!1)},suffix:er,itemKey:N,maxCount:k});return r.createElement(r.Fragment,null,eo,!s.length&&!ee&&r.createElement("span",{className:"".concat(J,"-placeholder")},m))},P=function(e){var t=e.inputElement,n=e.prefixCls,o=e.id,a=e.inputRef,i=e.disabled,s=e.autoFocus,l=e.autoComplete,c=e.activeDescendantId,d=e.mode,p=e.open,f=e.values,m=e.placeholder,g=e.tabIndex,h=e.showSearch,b=e.searchValue,y=e.activeValue,v=e.maxLength,E=e.onInputKeyDown,S=e.onInputMouseDown,w=e.onInputChange,O=e.onInputPaste,T=e.onInputCompositionStart,C=e.onInputCompositionEnd,k=e.title,N=r.useState(!1),_=(0,u.Z)(N,2),R=_[0],P=_[1],M="combobox"===d,L=M||h,D=f[0],j=b||"";M&&y&&!R&&(j=y),r.useEffect(function(){M&&P(!1)},[M,y]);var F=("combobox"===d||!!p||!!h)&&!!j,B=void 0===k?I(D):k,U=r.useMemo(function(){return D?null:r.createElement("span",{className:"".concat(n,"-selection-placeholder"),style:F?{visibility:"hidden"}:void 0},m)},[D,F,m,n]);return r.createElement(r.Fragment,null,r.createElement("span",{className:"".concat(n,"-selection-search")},r.createElement(A,{ref:a,prefixCls:n,id:o,open:p,inputElement:t,disabled:i,autoFocus:s,autoComplete:l,editable:L,activeDescendantId:c,value:j,onKeyDown:E,onMouseDown:S,onChange:function(e){P(!0),w(e)},onPaste:O,onCompositionStart:T,onCompositionEnd:C,tabIndex:g,attrs:(0,x.Z)(e,!0),maxLength:M?v:void 0})),!M&&D?r.createElement("span",{className:"".concat(n,"-selection-item"),title:B,style:F?{visibility:"hidden"}:void 0},D.label):null,U)},M=r.forwardRef(function(e,t){var n=(0,r.useRef)(null),o=(0,r.useRef)(!1),a=e.prefixCls,s=e.open,l=e.mode,c=e.showSearch,d=e.tokenWithEnter,p=e.autoClearSearchValue,f=e.onSearch,m=e.onSearchSubmit,g=e.onToggleOpen,h=e.onInputKeyDown,y=e.domRef;r.useImperativeHandle(t,function(){return{focus:function(){n.current.focus()},blur:function(){n.current.blur()}}});var v=w(0),E=(0,u.Z)(v,2),S=E[0],x=E[1],O=(0,r.useRef)(null),A=function(e){!1!==f(e,!0,o.current)&&g(!0)},T={inputRef:n,onInputKeyDown:function(e){var t=e.which;(t===b.Z.UP||t===b.Z.DOWN)&&e.preventDefault(),h&&h(e),t!==b.Z.ENTER||"tags"!==l||o.current||s||null==m||m(e.target.value),[b.Z.ESC,b.Z.SHIFT,b.Z.BACKSPACE,b.Z.TAB,b.Z.WIN_KEY,b.Z.ALT,b.Z.META,b.Z.WIN_KEY_RIGHT,b.Z.CTRL,b.Z.SEMICOLON,b.Z.EQUALS,b.Z.CAPS_LOCK,b.Z.CONTEXT_MENU,b.Z.F1,b.Z.F2,b.Z.F3,b.Z.F4,b.Z.F5,b.Z.F6,b.Z.F7,b.Z.F8,b.Z.F9,b.Z.F10,b.Z.F11,b.Z.F12].includes(t)||g(!0)},onInputMouseDown:function(){x(!0)},onInputChange:function(e){var t=e.target.value;if(d&&O.current&&/[\r\n]/.test(O.current)){var n=O.current.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");t=t.replace(n,O.current)}O.current=null,A(t)},onInputPaste:function(e){var t=e.clipboardData,n=null==t?void 0:t.getData("text");O.current=n||""},onInputCompositionStart:function(){o.current=!0},onInputCompositionEnd:function(e){o.current=!1,"combobox"!==l&&A(e.target.value)}},C="multiple"===l||"tags"===l?r.createElement(R,(0,i.Z)({},e,T)):r.createElement(P,(0,i.Z)({},e,T));return r.createElement("div",{ref:y,className:"".concat(a,"-selector"),onClick:function(e){e.target!==n.current&&(void 0!==document.body.style.msTouchAction?setTimeout(function(){n.current.focus()}):n.current.focus())},onMouseDown:function(e){var t=S();e.target===n.current||t||"combobox"===l||e.preventDefault(),("combobox"===l||c&&t)&&s||(s&&!1!==p&&f("",!0,!1),g())}},C)}),L=n(44101),D=["prefixCls","disabled","visible","children","popupElement","animation","transitionName","dropdownStyle","dropdownClassName","direction","placement","builtinPlacements","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","getPopupContainer","empty","getTriggerDOMNode","onPopupVisibleChange","onPopupMouseEnter"],j=function(e){var t=!0===e?0:1;return{bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:t,adjustY:1},htmlRegion:"scroll"},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:t,adjustY:1},htmlRegion:"scroll"},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:t,adjustY:1},htmlRegion:"scroll"},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:t,adjustY:1},htmlRegion:"scroll"}}},F=r.forwardRef(function(e,t){var n=e.prefixCls,o=(e.disabled,e.visible),s=e.children,u=e.popupElement,p=e.animation,f=e.transitionName,m=e.dropdownStyle,g=e.dropdownClassName,h=e.direction,b=e.placement,y=e.builtinPlacements,v=e.dropdownMatchSelectWidth,E=e.dropdownRender,S=e.dropdownAlign,w=e.getPopupContainer,x=e.empty,O=e.getTriggerDOMNode,A=e.onPopupVisibleChange,T=e.onPopupMouseEnter,C=(0,d.Z)(e,D),k="".concat(n,"-dropdown"),I=u;E&&(I=E(u));var N=r.useMemo(function(){return y||j(v)},[y,v]),_=p?"".concat(k,"-").concat(p):f,R="number"==typeof v,P=r.useMemo(function(){return R?null:!1===v?"minWidth":"width"},[v,R]),M=m;R&&(M=(0,c.Z)((0,c.Z)({},M),{},{width:v}));var F=r.useRef(null);return r.useImperativeHandle(t,function(){return{getPopupElement:function(){return F.current}}}),r.createElement(L.Z,(0,i.Z)({},C,{showAction:A?["click"]:[],hideAction:A?["click"]:[],popupPlacement:b||("rtl"===(void 0===h?"ltr":h)?"bottomRight":"bottomLeft"),builtinPlacements:N,prefixCls:k,popupTransitionName:_,popup:r.createElement("div",{ref:F,onMouseEnter:T},I),stretch:P,popupAlign:S,popupVisible:o,getPopupContainer:w,popupClassName:a()(g,(0,l.Z)({},"".concat(k,"-empty"),x)),popupStyle:M,getTriggerDOMNode:O,onPopupVisibleChange:A}),s)}),B=n(56721);function U(e,t){var n,r=e.key;return("value"in e&&(n=e.value),null!=r)?r:void 0!==n?n:"rc-index-key-".concat(t)}function Z(e,t){var n=e||{},r=n.label,o=n.value,a=n.options,i=n.groupLabel,s=r||(t?"children":"label");return{label:s,value:o||"value",options:a||"options",groupLabel:i||s}}function z(e){var t=(0,c.Z)({},e);return"props"in t||Object.defineProperty(t,"props",{get:function(){return(0,m.ZP)(!1,"Return type is option instead of Option instance. Please read value directly instead of reading from `props`."),t}}),t}var H=function(e,t,n){if(!t||!t.length)return null;var r=!1,o=function e(t,n){var o=(0,B.Z)(n),a=o[0],i=o.slice(1);if(!a)return[t];var l=t.split(a);return r=r||l.length>1,l.reduce(function(t,n){return[].concat((0,s.Z)(t),(0,s.Z)(e(n,i)))},[]).filter(Boolean)}(e,t);return r?void 0!==n?o.slice(0,n):o:null},G=r.createContext(null),$=["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","suffixIcon","clearIcon","OptionList","animation","transitionName","dropdownStyle","dropdownClassName","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","placement","builtinPlacements","getPopupContainer","showAction","onFocus","onBlur","onKeyUp","onKeyDown","onMouseDown"],W=["value","onChange","removeIcon","placeholder","autoFocus","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown","onPopupScroll","tabIndex"],V=function(e){return"tags"===e||"multiple"===e},q=r.forwardRef(function(e,t){var n,o,m,x,O,A,T,C,k=e.id,I=e.prefixCls,N=e.className,_=e.showSearch,R=e.tagRender,P=e.direction,L=e.omitDomProps,D=e.displayValues,j=e.onDisplayValuesChange,B=e.emptyOptions,U=e.notFoundContent,Z=void 0===U?"Not Found":U,z=e.onClear,q=e.mode,Y=e.disabled,K=e.loading,X=e.getInputElement,Q=e.getRawInputElement,J=e.open,ee=e.defaultOpen,et=e.onDropdownVisibleChange,en=e.activeValue,er=e.onActiveValueChange,eo=e.activeDescendantId,ea=e.searchValue,ei=e.autoClearSearchValue,es=e.onSearch,el=e.onSearchSplit,ec=e.tokenSeparators,eu=e.allowClear,ed=e.suffixIcon,ep=e.clearIcon,ef=e.OptionList,em=e.animation,eg=e.transitionName,eh=e.dropdownStyle,eb=e.dropdownClassName,ey=e.dropdownMatchSelectWidth,ev=e.dropdownRender,eE=e.dropdownAlign,eS=e.placement,ew=e.builtinPlacements,ex=e.getPopupContainer,eO=e.showAction,eA=void 0===eO?[]:eO,eT=e.onFocus,eC=e.onBlur,ek=e.onKeyUp,eI=e.onKeyDown,eN=e.onMouseDown,e_=(0,d.Z)(e,$),eR=V(q),eP=(void 0!==_?_:eR)||"combobox"===q,eM=(0,c.Z)({},e_);W.forEach(function(e){delete eM[e]}),null==L||L.forEach(function(e){delete eM[e]});var eL=r.useState(!1),eD=(0,u.Z)(eL,2),ej=eD[0],eF=eD[1];r.useEffect(function(){eF((0,h.Z)())},[]);var eB=r.useRef(null),eU=r.useRef(null),eZ=r.useRef(null),ez=r.useRef(null),eH=r.useRef(null),eG=r.useRef(!1),e$=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:10,t=r.useState(!1),n=(0,u.Z)(t,2),o=n[0],a=n[1],i=r.useRef(null),s=function(){window.clearTimeout(i.current)};return r.useEffect(function(){return s},[]),[o,function(t,n){s(),i.current=window.setTimeout(function(){a(t),n&&n()},e)},s]}(),eW=(0,u.Z)(e$,3),eV=eW[0],eq=eW[1],eY=eW[2];r.useImperativeHandle(t,function(){var e,t;return{focus:null===(e=ez.current)||void 0===e?void 0:e.focus,blur:null===(t=ez.current)||void 0===t?void 0:t.blur,scrollTo:function(e){var t;return null===(t=eH.current)||void 0===t?void 0:t.scrollTo(e)}}});var eK=r.useMemo(function(){if("combobox"!==q)return ea;var e,t=null===(e=D[0])||void 0===e?void 0:e.value;return"string"==typeof t||"number"==typeof t?String(t):""},[ea,q,D]),eX="combobox"===q&&"function"==typeof X&&X()||null,eQ="function"==typeof Q&&Q(),eJ=(0,y.x1)(eU,null==eQ||null===(x=eQ.props)||void 0===x?void 0:x.ref),e0=r.useState(!1),e1=(0,u.Z)(e0,2),e2=e1[0],e4=e1[1];(0,g.Z)(function(){e4(!0)},[]);var e3=(0,f.Z)(!1,{defaultValue:ee,value:J}),e6=(0,u.Z)(e3,2),e5=e6[0],e8=e6[1],e9=!!e2&&e5,e7=!Z&&B;(Y||e7&&e9&&"combobox"===q)&&(e9=!1);var te=!e7&&e9,tt=r.useCallback(function(e){var t=void 0!==e?e:!e9;Y||(e8(t),e9!==t&&(null==et||et(t)))},[Y,e9,e8,et]),tn=r.useMemo(function(){return(ec||[]).some(function(e){return["\n","\r\n"].includes(e)})},[ec]),tr=r.useContext(G)||{},to=tr.maxCount,ta=tr.rawValues,ti=function(e,t,n){if(!((null==ta?void 0:ta.size)>=to)){var r=!0,o=e;null==er||er(null);var a=H(e,ec,to&&to-ta.size),i=n?null:a;return"combobox"!==q&&i&&(o="",null==el||el(i),tt(!1),r=!1),es&&eK!==o&&es(o,{source:t?"typing":"effect"}),r}};r.useEffect(function(){e9||eR||"combobox"===q||ti("",!1,!1)},[e9]),r.useEffect(function(){e5&&Y&&e8(!1),Y&&!eG.current&&eq(!1)},[Y]);var ts=w(),tl=(0,u.Z)(ts,2),tc=tl[0],tu=tl[1],td=r.useRef(!1),tp=[];r.useEffect(function(){return function(){tp.forEach(function(e){return clearTimeout(e)}),tp.splice(0,tp.length)}},[]);var tf=r.useState({}),tm=(0,u.Z)(tf,2)[1];eQ&&(A=function(e){tt(e)}),n=function(){var e;return[eB.current,null===(e=eZ.current)||void 0===e?void 0:e.getPopupElement()]},o=!!eQ,(m=r.useRef(null)).current={open:te,triggerOpen:tt,customizedTrigger:o},r.useEffect(function(){function e(e){if(null===(t=m.current)||void 0===t||!t.customizedTrigger){var t,r=e.target;r.shadowRoot&&e.composed&&(r=e.composedPath()[0]||r),m.current.open&&n().filter(function(e){return e}).every(function(e){return!e.contains(r)&&e!==r})&&m.current.triggerOpen(!1)}}return window.addEventListener("mousedown",e),function(){return window.removeEventListener("mousedown",e)}},[]);var tg=r.useMemo(function(){return(0,c.Z)((0,c.Z)({},e),{},{notFoundContent:Z,open:e9,triggerOpen:te,id:k,showSearch:eP,multiple:eR,toggleOpen:tt})},[e,Z,te,e9,k,eP,eR,tt]),th=!!ed||K;th&&(T=r.createElement(v,{className:a()("".concat(I,"-arrow"),(0,l.Z)({},"".concat(I,"-arrow-loading"),K)),customizeIcon:ed,customizeIconProps:{loading:K,searchValue:eK,open:e9,focused:eV,showSearch:eP}}));var tb=E(I,function(){var e;null==z||z(),null===(e=ez.current)||void 0===e||e.focus(),j([],{type:"clear",values:D}),ti("",!1,!1)},D,eu,ep,Y,eK,q),ty=tb.allowClear,tv=tb.clearIcon,tE=r.createElement(ef,{ref:eH}),tS=a()(I,N,(O={},(0,l.Z)(O,"".concat(I,"-focused"),eV),(0,l.Z)(O,"".concat(I,"-multiple"),eR),(0,l.Z)(O,"".concat(I,"-single"),!eR),(0,l.Z)(O,"".concat(I,"-allow-clear"),eu),(0,l.Z)(O,"".concat(I,"-show-arrow"),th),(0,l.Z)(O,"".concat(I,"-disabled"),Y),(0,l.Z)(O,"".concat(I,"-loading"),K),(0,l.Z)(O,"".concat(I,"-open"),e9),(0,l.Z)(O,"".concat(I,"-customize-input"),eX),(0,l.Z)(O,"".concat(I,"-show-search"),eP),O)),tw=r.createElement(F,{ref:eZ,disabled:Y,prefixCls:I,visible:te,popupElement:tE,animation:em,transitionName:eg,dropdownStyle:eh,dropdownClassName:eb,direction:P,dropdownMatchSelectWidth:ey,dropdownRender:ev,dropdownAlign:eE,placement:eS,builtinPlacements:ew,getPopupContainer:ex,empty:B,getTriggerDOMNode:function(){return eU.current},onPopupVisibleChange:A,onPopupMouseEnter:function(){tm({})}},eQ?r.cloneElement(eQ,{ref:eJ}):r.createElement(M,(0,i.Z)({},e,{domRef:eU,prefixCls:I,inputElement:eX,ref:ez,id:k,showSearch:eP,autoClearSearchValue:ei,mode:q,activeDescendantId:eo,tagRender:R,values:D,open:e9,onToggleOpen:tt,activeValue:en,searchValue:eK,onSearch:ti,onSearchSubmit:function(e){e&&e.trim()&&es(e,{source:"submit"})},onRemove:function(e){j(D.filter(function(t){return t!==e}),{type:"remove",values:[e]})},tokenWithEnter:tn})));return C=eQ?tw:r.createElement("div",(0,i.Z)({className:tS},eM,{ref:eB,onMouseDown:function(e){var t,n=e.target,r=null===(t=eZ.current)||void 0===t?void 0:t.getPopupElement();if(r&&r.contains(n)){var o=setTimeout(function(){var e,t=tp.indexOf(o);-1!==t&&tp.splice(t,1),eY(),ej||r.contains(document.activeElement)||null===(e=ez.current)||void 0===e||e.focus()});tp.push(o)}for(var a=arguments.length,i=Array(a>1?a-1:0),s=1;s=0;i-=1){var l=o[i];if(!l.disabled){o.splice(i,1),a=l;break}}a&&j(o,{type:"remove",values:[a]})}for(var c=arguments.length,u=Array(c>1?c-1:0),d=1;d1?n-1:0),o=1;o0?null:"hidden"},K={position:"absolute",background:"rgba(0, 0, 0, 0.5)",borderRadius:99,cursor:"pointer",userSelect:"none"};return g?(Y.height=8,Y.left=0,Y.right=0,Y.bottom=0,K.height="100%",K.width=h,R?K.left=H:K.right=H):(Y.width=8,Y.top=0,Y.bottom=0,R?Y.right=0:Y.left=0,K.width="100%",K.height=h,K.top=H),r.createElement("div",{ref:P,className:a()(q,(n={},(0,l.Z)(n,"".concat(q,"-horizontal"),g),(0,l.Z)(n,"".concat(q,"-vertical"),!g),(0,l.Z)(n,"".concat(q,"-visible"),j),n)),style:(0,c.Z)((0,c.Z)({},Y),y),onMouseDown:function(e){e.stopPropagation(),e.preventDefault()},onMouseMove:U},r.createElement("div",{ref:M,className:a()("".concat(q,"-thumb"),(0,l.Z)({},"".concat(q,"-thumb-moving"),w)),style:(0,c.Z)((0,c.Z)({},K),v),onMouseDown:$}))});function ea(e){var t=e.children,n=e.setRef,o=r.useCallback(function(e){n(e)},[]);return r.cloneElement(t,{ref:o})}var ei=n(97472),es=n(47365),el=n(65127),ec=function(){function e(){(0,es.Z)(this,e),this.maps=void 0,this.id=0,this.maps=Object.create(null)}return(0,el.Z)(e,[{key:"set",value:function(e,t){this.maps[e]=t,this.id+=1}},{key:"get",value:function(e){return this.maps[e]}}]),e}(),eu=n(48563),ed=("undefined"==typeof navigator?"undefined":(0,p.Z)(navigator))==="object"&&/Firefox/i.test(navigator.userAgent);function ep(e,t){var n=(0,r.useRef)(!1),o=(0,r.useRef)(null),a=(0,r.useRef)({top:e,bottom:t});return a.current.top=e,a.current.bottom=t,function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=e<0&&a.current.top||e>0&&a.current.bottom;return t&&r?(clearTimeout(o.current),n.current=!1):(!r||n.current)&&(clearTimeout(o.current),n.current=!0,o.current=setTimeout(function(){n.current=!1},50)),!n.current&&r}}var ef=14/15;function em(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=e/t*100;return isNaN(n)&&(n=0),Math.floor(n=Math.min(n=Math.max(n,20),e/2))}var eg=["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","direction","scrollWidth","component","onScroll","onVirtualScroll","onVisibleChange","innerProps","extraRender","styles"],eh=[],eb={overflowY:"auto",overflowAnchor:"none"},ey=r.forwardRef(function(e,t){var n,o,s,f,m,h,b,y,v,E,S,w,x,O,A,T,C,k,I,N,_,R,P,M,L,D,j,F,B,U,Z,z,H,G,$,W=e.prefixCls,V=void 0===W?"rc-virtual-list":W,q=e.className,Y=e.height,K=e.itemHeight,X=e.fullHeight,Q=e.style,er=e.data,es=e.children,el=e.itemKey,ey=e.virtual,ev=e.direction,eE=e.scrollWidth,eS=e.component,ew=e.onScroll,ex=e.onVirtualScroll,eO=e.onVisibleChange,eA=e.innerProps,eT=e.extraRender,eC=e.styles,ek=(0,d.Z)(e,eg),eI=!!(!1!==ey&&Y&&K),eN=eI&&er&&(K*er.length>Y||!!eE),e_="rtl"===ev,eR=a()(V,(0,l.Z)({},"".concat(V,"-rtl"),e_),q),eP=er||eh,eM=(0,r.useRef)(),eL=(0,r.useRef)(),eD=(0,r.useState)(0),ej=(0,u.Z)(eD,2),eF=ej[0],eB=ej[1],eU=(0,r.useState)(0),eZ=(0,u.Z)(eU,2),ez=eZ[0],eH=eZ[1],eG=(0,r.useState)(!1),e$=(0,u.Z)(eG,2),eW=e$[0],eV=e$[1],eq=function(){eV(!0)},eY=function(){eV(!1)},eK=r.useCallback(function(e){return"function"==typeof el?el(e):null==e?void 0:e[el]},[el]);function eX(e){eB(function(t){var n,r=(n="function"==typeof e?e(t):e,Number.isNaN(tp.current)||(n=Math.min(n,tp.current)),n=Math.max(n,0));return eM.current.scrollTop=r,r})}var eQ=(0,r.useRef)({start:0,end:eP.length}),eJ=(0,r.useRef)(),e0=(o=r.useState(eP),f=(s=(0,u.Z)(o,2))[0],m=s[1],h=r.useState(null),y=(b=(0,u.Z)(h,2))[0],v=b[1],r.useEffect(function(){var e=function(e,t,n){var r,o,a=e.length,i=t.length;if(0===a&&0===i)return null;a0&&void 0!==arguments[0]&&arguments[0];p();var t=function(){l.current.forEach(function(e,t){if(e&&e.offsetParent){var n=(0,ei.Z)(e),r=n.offsetHeight;c.current.get(t)!==r&&c.current.set(t,n.offsetHeight)}}),s(function(e){return e+1})};e?t():d.current=(0,en.Z)(t)}return(0,r.useEffect)(function(){return p},[]),[function(r,o){var a=e(r),i=l.current.get(a);o?(l.current.set(a,o),f()):l.current.delete(a),!i!=!o&&(o?null==t||t(r):null==n||n(r))},f,c.current,i]}(eK,null,null),e4=(0,u.Z)(e2,4),e3=e4[0],e6=e4[1],e5=e4[2],e8=e4[3],e9=r.useMemo(function(){if(!eI)return{scrollHeight:void 0,start:0,end:eP.length-1,offset:void 0};if(!eN)return{scrollHeight:(null===(e=eL.current)||void 0===e?void 0:e.offsetHeight)||0,start:0,end:eP.length-1,offset:void 0};for(var e,t,n,r,o=0,a=eP.length,i=0;i=eF&&void 0===t&&(t=i,n=o),c>eF+Y&&void 0===r&&(r=i),o=c}return void 0===t&&(t=0,n=0,r=Math.ceil(Y/K)),void 0===r&&(r=eP.length-1),{scrollHeight:o,start:t,end:r=Math.min(r+1,eP.length-1),offset:n}},[eN,eI,eF,eP,e8,Y]),e7=e9.scrollHeight,te=e9.start,tt=e9.end,tn=e9.offset;eQ.current.start=te,eQ.current.end=tt;var tr=r.useState({width:0,height:Y}),to=(0,u.Z)(tr,2),ta=to[0],ti=to[1],ts=(0,r.useRef)(),tl=(0,r.useRef)(),tc=r.useMemo(function(){return em(ta.width,eE)},[ta.width,eE]),tu=r.useMemo(function(){return em(ta.height,e7)},[ta.height,e7]),td=e7-Y,tp=(0,r.useRef)(td);tp.current=td;var tf=eF<=0,tm=eF>=td,tg=ep(tf,tm),th=function(){return{x:e_?-ez:ez,y:eF}},tb=(0,r.useRef)(th()),ty=(0,eu.zX)(function(){if(ex){var e=th();(tb.current.x!==e.x||tb.current.y!==e.y)&&(ex(e),tb.current=e)}});function tv(e,t){t?((0,J.flushSync)(function(){eH(e)}),ty()):eX(e)}var tE=function(e){var t=e,n=eE-ta.width;return Math.min(t=Math.max(t,0),n)},tS=(0,eu.zX)(function(e,t){t?((0,J.flushSync)(function(){eH(function(t){return tE(t+(e_?-e:e))})}),ty()):eX(function(t){return t+e})}),tw=(E=!!eE,S=(0,r.useRef)(0),w=(0,r.useRef)(null),x=(0,r.useRef)(null),O=(0,r.useRef)(!1),A=ep(tf,tm),T=(0,r.useRef)(null),C=(0,r.useRef)(null),[function(e){if(eI){en.Z.cancel(C.current),C.current=(0,en.Z)(function(){T.current=null},2);var t,n=e.deltaX,r=e.deltaY,o=e.shiftKey,a=n,i=r;("sx"===T.current||!T.current&&o&&r&&!n)&&(a=r,i=0,T.current="sx");var s=Math.abs(a),l=Math.abs(i);(null===T.current&&(T.current=E&&s>l?"x":"y"),"y"===T.current)?(t=i,en.Z.cancel(w.current),S.current+=t,x.current=t,A(t)||(ed||e.preventDefault(),w.current=(0,en.Z)(function(){var e=O.current?10:1;tS(S.current*e),S.current=0}))):(tS(a,!0),ed||e.preventDefault())}},function(e){eI&&(O.current=e.detail===x.current)}]),tx=(0,u.Z)(tw,2),tO=tx[0],tA=tx[1];k=function(e,t){return!tg(e,t)&&(tO({preventDefault:function(){},deltaY:e}),!0)},N=(0,r.useRef)(!1),_=(0,r.useRef)(0),R=(0,r.useRef)(null),P=(0,r.useRef)(null),M=function(e){if(N.current){var t=Math.ceil(e.touches[0].pageY),n=_.current-t;_.current=t,k(n)&&e.preventDefault(),clearInterval(P.current),P.current=setInterval(function(){(!k(n*=ef,!0)||.1>=Math.abs(n))&&clearInterval(P.current)},16)}},L=function(){N.current=!1,I()},D=function(e){I(),1!==e.touches.length||N.current||(N.current=!0,_.current=Math.ceil(e.touches[0].pageY),R.current=e.target,R.current.addEventListener("touchmove",M),R.current.addEventListener("touchend",L))},I=function(){R.current&&(R.current.removeEventListener("touchmove",M),R.current.removeEventListener("touchend",L))},(0,g.Z)(function(){return eI&&eM.current.addEventListener("touchstart",D),function(){var e;null===(e=eM.current)||void 0===e||e.removeEventListener("touchstart",D),I(),clearInterval(P.current)}},[eI]),(0,g.Z)(function(){function e(e){eI&&e.preventDefault()}var t=eM.current;return t.addEventListener("wheel",tO),t.addEventListener("DOMMouseScroll",tA),t.addEventListener("MozMousePixelScroll",e),function(){t.removeEventListener("wheel",tO),t.removeEventListener("DOMMouseScroll",tA),t.removeEventListener("MozMousePixelScroll",e)}},[eI]),(0,g.Z)(function(){eE&&eH(function(e){return tE(e)})},[ta.width,eE]);var tT=function(){var e,t;null===(e=ts.current)||void 0===e||e.delayHidden(),null===(t=tl.current)||void 0===t||t.delayHidden()},tC=(j=r.useRef(),F=r.useState(null),U=(B=(0,u.Z)(F,2))[0],Z=B[1],(0,g.Z)(function(){if(U&&U.times<10){if(!eM.current){Z(function(e){return(0,c.Z)({},e)});return}e6(!0);var e=U.targetAlign,t=U.originAlign,n=U.index,r=U.offset,o=eM.current.clientHeight,a=!1,i=e,s=null;if(o){for(var l=e||t,u=0,d=0,p=0,f=Math.min(eP.length-1,n),m=0;m<=f;m+=1){var g=eK(eP[m]);d=u;var h=e5.get(g);u=p=d+(void 0===h?K:h)}for(var b="top"===l?r:o-r,y=f;y>=0;y-=1){var v=eK(eP[y]),E=e5.get(v);if(void 0===E){a=!0;break}if((b-=E)<=0)break}switch(l){case"top":s=d-r;break;case"bottom":s=p-o+r;break;default:var S=eM.current.scrollTop;dS+o&&(i="bottom")}null!==s&&eX(s),s!==U.lastTop&&(a=!0)}a&&Z((0,c.Z)((0,c.Z)({},U),{},{times:U.times+1,targetAlign:i,lastTop:s}))}},[U,eM.current]),function(e){if(null==e){tT();return}if(en.Z.cancel(j.current),"number"==typeof e)eX(e);else if(e&&"object"===(0,p.Z)(e)){var t,n=e.align;t="index"in e?e.index:eP.findIndex(function(t){return eK(t)===e.key});var r=e.offset;Z({times:0,index:t,offset:void 0===r?0:r,originAlign:n})}});r.useImperativeHandle(t,function(){return{getScrollInfo:th,scrollTo:function(e){e&&"object"===(0,p.Z)(e)&&("left"in e||"top"in e)?(void 0!==e.left&&eH(tE(e.left)),tC(e.top)):tC(e)}}}),(0,g.Z)(function(){eO&&eO(eP.slice(te,tt+1),eP)},[te,tt,eP]);var tk=(z=r.useMemo(function(){return[new Map,[]]},[eP,e5.id,K]),G=(H=(0,u.Z)(z,2))[0],$=H[1],function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,n=G.get(e),r=G.get(t);if(void 0===n||void 0===r)for(var o=eP.length,a=$.length;aY&&r.createElement(eo,{ref:ts,prefixCls:V,scrollOffset:eF,scrollRange:e7,rtl:e_,onScroll:tv,onStartMove:eq,onStopMove:eY,spinSize:tu,containerSize:ta.height,style:null==eC?void 0:eC.verticalScrollBar,thumbStyle:null==eC?void 0:eC.verticalScrollBarThumb}),eN&&eE&&r.createElement(eo,{ref:tl,prefixCls:V,scrollOffset:ez,scrollRange:eE,rtl:e_,onScroll:tv,onStartMove:eq,onStopMove:eY,spinSize:tc,containerSize:ta.width,horizontal:!0,style:null==eC?void 0:eC.horizontalScrollBar,thumbStyle:null==eC?void 0:eC.horizontalScrollBarThumb}))});ey.displayName="List";var ev=["disabled","title","children","style","className"];function eE(e){return"string"==typeof e||"number"==typeof e}var eS=r.forwardRef(function(e,t){var n=r.useContext(S),o=n.prefixCls,c=n.id,p=n.open,f=n.multiple,m=n.mode,g=n.searchValue,h=n.toggleOpen,y=n.notFoundContent,E=n.onPopupScroll,w=r.useContext(G),O=w.maxCount,A=w.flattenOptions,T=w.onActiveValue,C=w.defaultActiveFirstOption,k=w.onSelect,I=w.menuItemSelectedIcon,N=w.rawValues,_=w.fieldNames,R=w.virtual,P=w.direction,M=w.listHeight,L=w.listItemHeight,D=w.optionRender,j="".concat(o,"-item"),F=(0,X.Z)(function(){return A},[p,A],function(e,t){return t[0]&&e[1]!==t[1]}),B=r.useRef(null),U=r.useMemo(function(){return f&&void 0!==O&&(null==N?void 0:N.size)>=O},[f,O,null==N?void 0:N.size]),Z=function(e){e.preventDefault()},z=function(e){var t;null===(t=B.current)||void 0===t||t.scrollTo("number"==typeof e?{index:e}:e)},H=function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=F.length,r=0;r1&&void 0!==arguments[1]&&arguments[1];q(e);var n={source:t?"keyboard":"mouse"},r=F[e];if(!r){T(null,-1,n);return}T(r.value,e,n)};(0,r.useEffect)(function(){Y(!1!==C?H(0):-1)},[F.length,g]);var K=r.useCallback(function(e){return N.has(e)&&"combobox"!==m},[m,(0,s.Z)(N).toString(),N.size]);(0,r.useEffect)(function(){var e,t=setTimeout(function(){if(!f&&p&&1===N.size){var e=Array.from(N)[0],t=F.findIndex(function(t){return t.data.value===e});-1!==t&&(Y(t),z(t))}});return p&&(null===(e=B.current)||void 0===e||e.scrollTo(void 0)),function(){return clearTimeout(t)}},[p,g]);var J=function(e){void 0!==e&&k(e,{selected:!N.has(e)}),f||h(!1)};if(r.useImperativeHandle(t,function(){return{onKeyDown:function(e){var t=e.which,n=e.ctrlKey;switch(t){case b.Z.N:case b.Z.P:case b.Z.UP:case b.Z.DOWN:var r=0;if(t===b.Z.UP?r=-1:t===b.Z.DOWN?r=1:/(mac\sos|macintosh)/i.test(navigator.appVersion)&&n&&(t===b.Z.N?r=1:t===b.Z.P&&(r=-1)),0!==r){var o=H(V+r,r);z(o),Y(o,!0)}break;case b.Z.ENTER:var a,i=F[V];!i||null!=i&&null!==(a=i.data)&&void 0!==a&&a.disabled||U?J(void 0):J(i.value),p&&e.preventDefault();break;case b.Z.ESC:h(!1),p&&e.stopPropagation()}},onKeyUp:function(){},scrollTo:function(e){z(e)}}}),0===F.length)return r.createElement("div",{role:"listbox",id:"".concat(c,"_list"),className:"".concat(j,"-empty"),onMouseDown:Z},y);var ee=Object.keys(_).map(function(e){return _[e]}),et=function(e){return e.label};function en(e,t){return{role:e.group?"presentation":"option",id:"".concat(c,"_list_").concat(t)}}var er=function(e){var t=F[e];if(!t)return null;var n=t.data||{},o=n.value,a=t.group,s=(0,x.Z)(n,!0),l=et(t);return t?r.createElement("div",(0,i.Z)({"aria-label":"string"!=typeof l||a?null:l},s,{key:e},en(t,e),{"aria-selected":K(o)}),o):null},eo={role:"listbox",id:"".concat(c,"_list")};return r.createElement(r.Fragment,null,R&&r.createElement("div",(0,i.Z)({},eo,{style:{height:0,width:0,overflow:"hidden"}}),er(V-1),er(V),er(V+1)),r.createElement(ey,{itemKey:"key",ref:B,data:F,height:M,itemHeight:L,fullHeight:!1,onMouseDown:Z,onScroll:E,virtual:R,direction:P,innerProps:R?null:eo},function(e,t){var n=e.group,o=e.groupOption,s=e.data,c=e.label,u=e.value,p=s.key;if(n){var f,m,g=null!==(m=s.title)&&void 0!==m?m:eE(c)?c.toString():void 0;return r.createElement("div",{className:a()(j,"".concat(j,"-group")),title:g},void 0!==c?c:p)}var h=s.disabled,b=s.title,y=(s.children,s.style),E=s.className,S=(0,d.Z)(s,ev),w=(0,Q.Z)(S,ee),O=K(u),A=h||!O&&U,T="".concat(j,"-option"),C=a()(j,T,E,(f={},(0,l.Z)(f,"".concat(T,"-grouped"),o),(0,l.Z)(f,"".concat(T,"-active"),V===t&&!A),(0,l.Z)(f,"".concat(T,"-disabled"),A),(0,l.Z)(f,"".concat(T,"-selected"),O),f)),k=et(e),N=!I||"function"==typeof I||O,_="number"==typeof k?k:k||u,P=eE(_)?_.toString():void 0;return void 0!==b&&(P=b),r.createElement("div",(0,i.Z)({},(0,x.Z)(w),R?{}:en(e,t),{"aria-selected":O,className:C,title:P,onMouseMove:function(){V===t||A||Y(t)},onClick:function(){A||J(u)},style:y}),r.createElement("div",{className:"".concat(T,"-content")},"function"==typeof D?D(e,{index:t}):_),r.isValidElement(I)||O,N&&r.createElement(v,{className:"".concat(j,"-option-state"),customizeIcon:I,customizeIconProps:{value:u,disabled:A,isSelected:O}},O?"✓":null))}))});function ew(e,t){return T(e).join("").toUpperCase().includes(t)}var ex=n(22127),eO=0,eA=(0,ex.Z)(),eT=n(33054),eC=["children","value"],ek=["children"];function eI(e){var t=r.useRef();return t.current=e,r.useCallback(function(){return t.current.apply(t,arguments)},[])}var eN=["id","mode","prefixCls","backfill","fieldNames","inputValue","searchValue","onSearch","autoClearSearchValue","onSelect","onDeselect","dropdownMatchSelectWidth","filterOption","filterSort","optionFilterProp","optionLabelProp","options","optionRender","children","defaultActiveFirstOption","menuItemSelectedIcon","virtual","direction","listHeight","listItemHeight","value","defaultValue","labelInValue","onChange","maxCount"],e_=["inputValue"],eR=r.forwardRef(function(e,t){var n,o,a,m,g,h,b,y=e.id,v=e.mode,E=e.prefixCls,S=e.backfill,w=e.fieldNames,x=e.inputValue,O=e.searchValue,A=e.onSearch,C=e.autoClearSearchValue,k=void 0===C||C,I=e.onSelect,N=e.onDeselect,_=e.dropdownMatchSelectWidth,R=void 0===_||_,P=e.filterOption,M=e.filterSort,L=e.optionFilterProp,D=e.optionLabelProp,j=e.options,F=e.optionRender,B=e.children,H=e.defaultActiveFirstOption,$=e.menuItemSelectedIcon,W=e.virtual,Y=e.direction,K=e.listHeight,X=void 0===K?200:K,Q=e.listItemHeight,J=void 0===Q?20:Q,ee=e.value,et=e.defaultValue,en=e.labelInValue,er=e.onChange,eo=e.maxCount,ea=(0,d.Z)(e,eN),ei=(n=r.useState(),a=(o=(0,u.Z)(n,2))[0],m=o[1],r.useEffect(function(){var e;m("rc_select_".concat((eA?(e=eO,eO+=1):e="TEST_OR_SSR",e)))},[]),y||a),es=V(v),el=!!(!j&&B),ec=r.useMemo(function(){return(void 0!==P||"combobox"!==v)&&P},[P,v]),eu=r.useMemo(function(){return Z(w,el)},[JSON.stringify(w),el]),ed=(0,f.Z)("",{value:void 0!==O?O:x,postState:function(e){return e||""}}),ep=(0,u.Z)(ed,2),ef=ep[0],em=ep[1],eg=r.useMemo(function(){var e=j;j||(e=function e(t){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return(0,eT.Z)(t).map(function(t,o){if(!r.isValidElement(t)||!t.type)return null;var a,i,s,l,u,p=t.type.isSelectOptGroup,f=t.key,m=t.props,g=m.children,h=(0,d.Z)(m,ek);return n||!p?(a=t.key,s=(i=t.props).children,l=i.value,u=(0,d.Z)(i,eC),(0,c.Z)({key:a,value:void 0!==l?l:a,children:s},u)):(0,c.Z)((0,c.Z)({key:"__RC_SELECT_GRP__".concat(null===f?o:f,"__"),label:f},h),{},{options:e(g)})}).filter(function(e){return e})}(B));var t=new Map,n=new Map,o=function(e,t,n){n&&"string"==typeof n&&e.set(t[n],t)};return function e(r){for(var a=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=0;i1&&void 0!==arguments[1]?arguments[1]:{},n=t.fieldNames,r=t.childrenAsData,o=[],a=Z(n,!1),i=a.label,s=a.value,l=a.options,c=a.groupLabel;return!function e(t,n){Array.isArray(t)&&t.forEach(function(t){if(!n&&l in t){var a=t[c];void 0===a&&r&&(a=t.label),o.push({key:U(t,o.length),group:!0,data:t,label:a}),e(t[l],!0)}else{var u=t[s];o.push({key:U(t,o.length),groupOption:n,data:t,label:t[i],value:u})}})}(e,!1),o}(eH,{fieldNames:eu,childrenAsData:el})},[eH,eu,el]),e$=function(e){var t=ev(e);if(eP(t),er&&(t.length!==eD.length||t.some(function(e,t){var n;return(null===(n=eD[t])||void 0===n?void 0:n.value)!==(null==e?void 0:e.value)}))){var n=en?t:t.map(function(e){return e.value}),r=t.map(function(e){return z(ej(e.value))});er(es?n:n[0],es?r:r[0])}},eW=r.useState(null),eV=(0,u.Z)(eW,2),eq=eV[0],eY=eV[1],eK=r.useState(0),eX=(0,u.Z)(eK,2),eQ=eX[0],eJ=eX[1],e0=void 0!==H?H:"combobox"!==v,e1=r.useCallback(function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.source;eJ(t),S&&"combobox"===v&&null!==e&&"keyboard"===(void 0===r?"keyboard":r)&&eY(String(e))},[S,v]),e2=function(e,t,n){var r=function(){var t,n=ej(e);return[en?{label:null==n?void 0:n[eu.label],value:e,key:null!==(t=null==n?void 0:n.key)&&void 0!==t?t:e}:e,z(n)]};if(t&&I){var o=r(),a=(0,u.Z)(o,2);I(a[0],a[1])}else if(!t&&N&&"clear"!==n){var i=r(),s=(0,u.Z)(i,2);N(s[0],s[1])}},e4=eI(function(e,t){var n=!es||t.selected;e$(n?es?[].concat((0,s.Z)(eD),[e]):[e]:eD.filter(function(t){return t.value!==e})),e2(e,n),"combobox"===v?eY(""):(!V||k)&&(em(""),eY(""))}),e3=r.useMemo(function(){var e=!1!==W&&!1!==R;return(0,c.Z)((0,c.Z)({},eg),{},{flattenOptions:eG,onActiveValue:e1,defaultActiveFirstOption:e0,onSelect:e4,menuItemSelectedIcon:$,rawValues:eB,fieldNames:eu,virtual:e,direction:Y,listHeight:X,listItemHeight:J,childrenAsData:el,maxCount:eo,optionRender:F})},[eo,eg,eG,e1,e0,e4,$,eB,eu,W,R,Y,X,J,el,F]);return r.createElement(G.Provider,{value:e3},r.createElement(q,(0,i.Z)({},ea,{id:ei,prefixCls:void 0===E?"rc-select":E,ref:t,omitDomProps:e_,mode:v,displayValues:eF,onDisplayValuesChange:function(e,t){e$(e);var n=t.type,r=t.values;("remove"===n||"clear"===n)&&r.forEach(function(e){e2(e.value,!1,n)})},direction:Y,searchValue:ef,onSearch:function(e,t){if(em(e),eY(null),"submit"===t.source){var n=(e||"").trim();n&&(e$(Array.from(new Set([].concat((0,s.Z)(eB),[n])))),e2(n,!0),em(""));return}"blur"!==t.source&&("combobox"===v&&e$(e),null==A||A(e))},autoClearSearchValue:k,onSearchSplit:function(e){var t=e;"tags"!==v&&(t=e.map(function(e){var t=eb.get(e);return null==t?void 0:t.value}).filter(function(e){return void 0!==e}));var n=Array.from(new Set([].concat((0,s.Z)(eB),(0,s.Z)(t))));e$(n),n.forEach(function(e){e2(e,!0)})},dropdownMatchSelectWidth:R,OptionList:eS,emptyOptions:!eG.length,activeValue:eq,activeDescendantId:"".concat(ei,"_list_").concat(eQ)})))});eR.Option=K,eR.OptGroup=Y;var eP=n(51761),eM=n(47387),eL=n(21467),eD=n(47794),ej=n(57499),eF=n(70595),eB=n(6336),eU=n(24750),eZ=n(76585),ez=n(80316);let eH=e=>{let{componentCls:t,margin:n,marginXS:r,marginXL:o,fontSize:a,lineHeight:i}=e;return{[t]:{marginInline:r,fontSize:a,lineHeight:i,textAlign:"center",["".concat(t,"-image")]:{height:e.emptyImgHeight,marginBottom:r,opacity:e.opacityImage,img:{height:"100%"},svg:{maxWidth:"100%",height:"100%",margin:"auto"}},["".concat(t,"-description")]:{color:e.colorText},["".concat(t,"-footer")]:{marginTop:n},"&-normal":{marginBlock:o,color:e.colorTextDisabled,["".concat(t,"-description")]:{color:e.colorTextDisabled},["".concat(t,"-image")]:{height:e.emptyImgHeightMD}},"&-small":{marginBlock:r,color:e.colorTextDisabled,["".concat(t,"-image")]:{height:e.emptyImgHeightSM}}}}};var eG=(0,eZ.I$)("Empty",e=>{let{componentCls:t,controlHeightLG:n,calc:r}=e;return[eH((0,ez.TS)(e,{emptyImgCls:"".concat(t,"-img"),emptyImgHeight:r(n).mul(2.5).equal(),emptyImgHeightMD:n,emptyImgHeightSM:r(n).mul(.875).equal()}))]}),e$=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);ot.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};let eW=r.createElement(()=>{let[,e]=(0,eU.ZP)(),t=new eB.C(e.colorBgBase).toHsl().l<.5?{opacity:.65}:{};return r.createElement("svg",{style:t,width:"184",height:"152",viewBox:"0 0 184 152",xmlns:"http://www.w3.org/2000/svg"},r.createElement("g",{fill:"none",fillRule:"evenodd"},r.createElement("g",{transform:"translate(24 31.67)"},r.createElement("ellipse",{fillOpacity:".8",fill:"#F5F5F7",cx:"67.797",cy:"106.89",rx:"67.797",ry:"12.668"}),r.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"}),r.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)"}),r.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"}),r.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"})),r.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"}),r.createElement("g",{transform:"translate(149.65 15.383)",fill:"#FFF"},r.createElement("ellipse",{cx:"20.654",cy:"3.167",rx:"2.849",ry:"2.815"}),r.createElement("path",{d:"M5.698 5.63H0L2.898.704zM9.259.704h4.985V5.63H9.259z"}))))},null),eV=r.createElement(()=>{let[,e]=(0,eU.ZP)(),{colorFill:t,colorFillTertiary:n,colorFillQuaternary:o,colorBgContainer:a}=e,{borderColor:i,shadowColor:s,contentColor:l}=(0,r.useMemo)(()=>({borderColor:new eB.C(t).onBackground(a).toHexShortString(),shadowColor:new eB.C(n).onBackground(a).toHexShortString(),contentColor:new eB.C(o).onBackground(a).toHexShortString()}),[t,n,o,a]);return r.createElement("svg",{width:"64",height:"41",viewBox:"0 0 64 41",xmlns:"http://www.w3.org/2000/svg"},r.createElement("g",{transform:"translate(0 1)",fill:"none",fillRule:"evenodd"},r.createElement("ellipse",{fill:s,cx:"32",cy:"33",rx:"32",ry:"7"}),r.createElement("g",{fillRule:"nonzero",stroke:i},r.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"}),r.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:l}))))},null),eq=e=>{var{className:t,rootClassName:n,prefixCls:o,image:i=eW,description:s,children:l,imageStyle:c,style:u}=e,d=e$(e,["className","rootClassName","prefixCls","image","description","children","imageStyle","style"]);let{getPrefixCls:p,direction:f,empty:m}=r.useContext(ej.E_),g=p("empty",o),[h,b,y]=eG(g),[v]=(0,eF.Z)("Empty"),E=void 0!==s?s:null==v?void 0:v.description,S=null;return S="string"==typeof i?r.createElement("img",{alt:"string"==typeof E?E:"empty",src:i}):i,h(r.createElement("div",Object.assign({className:a()(b,y,g,null==m?void 0:m.className,{["".concat(g,"-normal")]:i===eV,["".concat(g,"-rtl")]:"rtl"===f},t,n),style:Object.assign(Object.assign({},null==m?void 0:m.style),u)},d),r.createElement("div",{className:"".concat(g,"-image"),style:c},S),E&&r.createElement("div",{className:"".concat(g,"-description")},E),l&&r.createElement("div",{className:"".concat(g,"-footer")},l)))};eq.PRESENTED_IMAGE_DEFAULT=eW,eq.PRESENTED_IMAGE_SIMPLE=eV;var eY=e=>{let{componentName:t}=e,{getPrefixCls:n}=(0,r.useContext)(ej.E_),o=n("empty");switch(t){case"Table":case"List":return r.createElement(eq,{image:eq.PRESENTED_IMAGE_SIMPLE});case"Select":case"TreeSelect":case"Cascader":case"Transfer":case"Mentions":return r.createElement(eq,{image:eq.PRESENTED_IMAGE_SIMPLE,className:"".concat(o,"-small")});default:return r.createElement(eq,null)}},eK=n(17094),eX=n(92935),eQ=n(10693),eJ=n(47137),e0=n(8443),e1=n(92801);let e2=e=>{let t={overflow:{adjustX:!0,adjustY:!0,shiftY:!0},htmlRegion:"scroll"===e?"scroll":"visible",dynamicInset:!0};return{bottomLeft:Object.assign(Object.assign({},t),{points:["tl","bl"],offset:[0,4]}),bottomRight:Object.assign(Object.assign({},t),{points:["tr","br"],offset:[0,4]}),topLeft:Object.assign(Object.assign({},t),{points:["bl","tl"],offset:[0,-4]}),topRight:Object.assign(Object.assign({},t),{points:["br","tr"],offset:[0,-4]})}};var e4=n(11303),e3=n(12288),e6=n(202),e5=n(8985),e8=n(59353);let e9=new e5.E4("antMoveDownIn",{"0%":{transform:"translate3d(0, 100%, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),e7=new e5.E4("antMoveDownOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(0, 100%, 0)",transformOrigin:"0 0",opacity:0}}),te=new e5.E4("antMoveLeftIn",{"0%":{transform:"translate3d(-100%, 0, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),tt=new e5.E4("antMoveLeftOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(-100%, 0, 0)",transformOrigin:"0 0",opacity:0}}),tn=new e5.E4("antMoveRightIn",{"0%":{transform:"translate3d(100%, 0, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),tr=new e5.E4("antMoveRightOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(100%, 0, 0)",transformOrigin:"0 0",opacity:0}}),to={"move-up":{inKeyframes:new e5.E4("antMoveUpIn",{"0%":{transform:"translate3d(0, -100%, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),outKeyframes:new e5.E4("antMoveUpOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(0, -100%, 0)",transformOrigin:"0 0",opacity:0}})},"move-down":{inKeyframes:e9,outKeyframes:e7},"move-left":{inKeyframes:te,outKeyframes:tt},"move-right":{inKeyframes:tn,outKeyframes:tr}},ta=(e,t)=>{let{antCls:n}=e,r="".concat(n,"-").concat(t),{inKeyframes:o,outKeyframes:a}=to[t];return[(0,e8.R)(r,o,a,e.motionDurationMid),{["\n ".concat(r,"-enter,\n ").concat(r,"-appear\n ")]:{opacity:0,animationTimingFunction:e.motionEaseOutCirc},["".concat(r,"-leave")]:{animationTimingFunction:e.motionEaseInOutCirc}}]},ti=e=>{let{optionHeight:t,optionFontSize:n,optionLineHeight:r,optionPadding:o}=e;return{position:"relative",display:"block",minHeight:t,padding:o,color:e.colorText,fontWeight:"normal",fontSize:n,lineHeight:r,boxSizing:"border-box"}};var ts=e=>{let{antCls:t,componentCls:n}=e,r="".concat(n,"-item"),o="&".concat(t,"-slide-up-enter").concat(t,"-slide-up-enter-active"),a="&".concat(t,"-slide-up-appear").concat(t,"-slide-up-appear-active"),i="&".concat(t,"-slide-up-leave").concat(t,"-slide-up-leave-active"),s="".concat(n,"-dropdown-placement-");return[{["".concat(n,"-dropdown")]:Object.assign(Object.assign({},(0,e4.Wf)(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,["\n ".concat(o).concat(s,"bottomLeft,\n ").concat(a).concat(s,"bottomLeft\n ")]:{animationName:e6.fJ},["\n ".concat(o).concat(s,"topLeft,\n ").concat(a).concat(s,"topLeft,\n ").concat(o).concat(s,"topRight,\n ").concat(a).concat(s,"topRight\n ")]:{animationName:e6.Qt},["".concat(i).concat(s,"bottomLeft")]:{animationName:e6.Uw},["\n ".concat(i).concat(s,"topLeft,\n ").concat(i).concat(s,"topRight\n ")]:{animationName:e6.ly},"&-hidden":{display:"none"},["".concat(r)]:Object.assign(Object.assign({},ti(e)),{cursor:"pointer",transition:"background ".concat(e.motionDurationSlow," ease"),borderRadius:e.borderRadiusSM,"&-group":{color:e.colorTextDescription,fontSize:e.fontSizeSM,cursor:"default"},"&-option":{display:"flex","&-content":Object.assign({flex:"auto"},e4.vS),"&-state":{flex:"none",display:"flex",alignItems:"center"},["&-active:not(".concat(r,"-option-disabled)")]:{backgroundColor:e.optionActiveBg},["&-selected:not(".concat(r,"-option-disabled)")]:{color:e.optionSelectedColor,fontWeight:e.optionSelectedFontWeight,backgroundColor:e.optionSelectedBg,["".concat(r,"-option-state")]:{color:e.colorPrimary},["&:has(+ ".concat(r,"-option-selected:not(").concat(r,"-option-disabled))")]:{borderEndStartRadius:0,borderEndEndRadius:0,["& + ".concat(r,"-option-selected:not(").concat(r,"-option-disabled)")]:{borderStartStartRadius:0,borderStartEndRadius:0}}},"&-disabled":{["&".concat(r,"-option-selected")]:{backgroundColor:e.colorBgContainerDisabled},color:e.colorTextDisabled,cursor:"not-allowed"},"&-grouped":{paddingInlineStart:e.calc(e.controlPaddingHorizontal).mul(2).equal()}}}),"&-rtl":{direction:"rtl"}})},(0,e6.oN)(e,"slide-up"),(0,e6.oN)(e,"slide-down"),ta(e,"move-up"),ta(e,"move-down")]};let tl=e=>{let{multipleSelectItemHeight:t,selectHeight:n,lineWidth:r}=e;return e.calc(n).sub(t).div(2).sub(r).equal()};function tc(e,t){let{componentCls:n,iconCls:r}=e,o="".concat(n,"-selection-overflow"),a=e.multipleSelectItemHeight,i=tl(e),s=t?"".concat(n,"-").concat(t):"";return{["".concat(n,"-multiple").concat(s)]:{fontSize:e.fontSize,[o]:{position:"relative",display:"flex",flex:"auto",flexWrap:"wrap",maxWidth:"100%","&-item":{flex:"none",alignSelf:"center",maxWidth:"100%",display:"inline-flex"}},["".concat(n,"-selector")]:{display:"flex",flexWrap:"wrap",alignItems:"center",height:"100%",paddingInline:e.calc(2).mul(2).equal(),paddingBlock:e.calc(i).sub(2).equal(),borderRadius:e.borderRadius,["".concat(n,"-show-search&")]:{cursor:"text"},["".concat(n,"-disabled&")]:{background:e.multipleSelectorBgDisabled,cursor:"not-allowed"},"&:after":{display:"inline-block",width:0,margin:"".concat((0,e5.bf)(2)," 0"),lineHeight:(0,e5.bf)(a),visibility:"hidden",content:'"\\a0"'}},["\n &".concat(n,"-show-arrow ").concat(n,"-selector,\n &").concat(n,"-allow-clear ").concat(n,"-selector\n ")]:{paddingInlineEnd:e.calc(e.fontSizeIcon).add(e.controlPaddingHorizontal).equal()},["".concat(n,"-selection-item")]:{display:"flex",alignSelf:"center",flex:"none",boxSizing:"border-box",maxWidth:"100%",height:a,marginTop:2,marginBottom:2,lineHeight:(0,e5.bf)(e.calc(a).sub(e.calc(e.lineWidth).mul(2)).equal()),borderRadius:e.borderRadiusSM,cursor:"default",transition:"font-size ".concat(e.motionDurationSlow,", line-height ").concat(e.motionDurationSlow,", height ").concat(e.motionDurationSlow),marginInlineEnd:e.calc(2).mul(2).equal(),paddingInlineStart:e.paddingXS,paddingInlineEnd:e.calc(e.paddingXS).div(2).equal(),["".concat(n,"-disabled&")]:{color:e.multipleItemColorDisabled,borderColor:e.multipleItemBorderColorDisabled,cursor:"not-allowed"},"&-content":{display:"inline-block",marginInlineEnd:e.calc(e.paddingXS).div(2).equal(),overflow:"hidden",whiteSpace:"pre",textOverflow:"ellipsis"},"&-remove":Object.assign(Object.assign({},(0,e4.Ro)()),{display:"inline-flex",alignItems:"center",color:e.colorIcon,fontWeight:"bold",fontSize:10,lineHeight:"inherit",cursor:"pointer",["> ".concat(r)]:{verticalAlign:"-0.2em"},"&:hover":{color:e.colorIconHover}})},["".concat(o,"-item + ").concat(o,"-item")]:{["".concat(n,"-selection-search")]:{marginInlineStart:0}},["".concat(o,"-item-suffix")]:{height:"100%"},["".concat(n,"-selection-search")]:{display:"inline-flex",position:"relative",maxWidth:"100%",marginInlineStart:e.calc(e.inputPaddingHorizontalBase).sub(i).equal(),"\n &-input,\n &-mirror\n ":{height:a,fontFamily:e.fontFamily,lineHeight:(0,e5.bf)(a),transition:"all ".concat(e.motionDurationSlow)},"&-input":{width:"100%",minWidth:4.1},"&-mirror":{position:"absolute",top:0,insetInlineStart:0,insetInlineEnd:"auto",zIndex:999,whiteSpace:"pre",visibility:"hidden"}},["".concat(n,"-selection-placeholder")]:{position:"absolute",top:"50%",insetInlineStart:e.inputPaddingHorizontalBase,insetInlineEnd:e.inputPaddingHorizontalBase,transform:"translateY(-50%)",transition:"all ".concat(e.motionDurationSlow)}}}}var tu=e=>{let{componentCls:t}=e,n=(0,ez.TS)(e,{selectHeight:e.controlHeightSM,multipleSelectItemHeight:e.controlHeightXS,borderRadius:e.borderRadiusSM,borderRadiusSM:e.borderRadiusXS}),r=(0,ez.TS)(e,{fontSize:e.fontSizeLG,selectHeight:e.controlHeightLG,multipleSelectItemHeight:e.multipleItemHeightLG,borderRadius:e.borderRadiusLG,borderRadiusSM:e.borderRadius});return[tc(e),tc(n,"sm"),{["".concat(t,"-multiple").concat(t,"-sm")]:{["".concat(t,"-selection-placeholder")]:{insetInline:e.calc(e.controlPaddingHorizontalSM).sub(e.lineWidth).equal()},["".concat(t,"-selection-search")]:{marginInlineStart:2}}},tc(r,"lg")]};function td(e,t){let{componentCls:n,inputPaddingHorizontalBase:r,borderRadius:o}=e,a=e.calc(e.controlHeight).sub(e.calc(e.lineWidth).mul(2)).equal(),i=t?"".concat(n,"-").concat(t):"";return{["".concat(n,"-single").concat(i)]:{fontSize:e.fontSize,height:e.controlHeight,["".concat(n,"-selector")]:Object.assign(Object.assign({},(0,e4.Wf)(e,!0)),{display:"flex",borderRadius:o,["".concat(n,"-selection-search")]:{position:"absolute",top:0,insetInlineStart:r,insetInlineEnd:r,bottom:0,"&-input":{width:"100%",WebkitAppearance:"textfield"}},["\n ".concat(n,"-selection-item,\n ").concat(n,"-selection-placeholder\n ")]:{padding:0,lineHeight:(0,e5.bf)(a),transition:"all ".concat(e.motionDurationSlow,", visibility 0s"),alignSelf:"center"},["".concat(n,"-selection-placeholder")]:{transition:"none",pointerEvents:"none"},[["&:after","".concat(n,"-selection-item:empty:after"),"".concat(n,"-selection-placeholder:empty:after")].join(",")]:{display:"inline-block",width:0,visibility:"hidden",content:'"\\a0"'}}),["\n &".concat(n,"-show-arrow ").concat(n,"-selection-item,\n &").concat(n,"-show-arrow ").concat(n,"-selection-placeholder\n ")]:{paddingInlineEnd:e.showArrowPaddingInlineEnd},["&".concat(n,"-open ").concat(n,"-selection-item")]:{color:e.colorTextPlaceholder},["&:not(".concat(n,"-customize-input)")]:{["".concat(n,"-selector")]:{width:"100%",height:"100%",padding:"0 ".concat((0,e5.bf)(r)),["".concat(n,"-selection-search-input")]:{height:a},"&:after":{lineHeight:(0,e5.bf)(a)}}},["&".concat(n,"-customize-input")]:{["".concat(n,"-selector")]:{"&:after":{display:"none"},["".concat(n,"-selection-search")]:{position:"static",width:"100%"},["".concat(n,"-selection-placeholder")]:{position:"absolute",insetInlineStart:0,insetInlineEnd:0,padding:"0 ".concat((0,e5.bf)(r)),"&:after":{display:"none"}}}}}}}let tp=(e,t)=>{let{componentCls:n,antCls:r,controlOutlineWidth:o}=e;return{["&:not(".concat(n,"-customize-input) ").concat(n,"-selector")]:{border:"".concat((0,e5.bf)(e.lineWidth)," ").concat(e.lineType," ").concat(t.borderColor),background:e.selectorBg},["&:not(".concat(n,"-disabled):not(").concat(n,"-customize-input):not(").concat(r,"-pagination-size-changer)")]:{["&:hover ".concat(n,"-selector")]:{borderColor:t.hoverBorderHover},["".concat(n,"-focused& ").concat(n,"-selector")]:{borderColor:t.activeBorderColor,boxShadow:"0 0 0 ".concat((0,e5.bf)(o)," ").concat(t.activeShadowColor),outline:0}}}},tf=(e,t)=>({["&".concat(e.componentCls,"-status-").concat(t.status)]:Object.assign({},tp(e,t))}),tm=e=>({"&-outlined":Object.assign(Object.assign(Object.assign(Object.assign({},tp(e,{borderColor:e.colorBorder,hoverBorderHover:e.colorPrimaryHover,activeBorderColor:e.colorPrimary,activeShadowColor:e.controlOutline})),tf(e,{status:"error",borderColor:e.colorError,hoverBorderHover:e.colorErrorHover,activeBorderColor:e.colorError,activeShadowColor:e.colorErrorOutline})),tf(e,{status:"warning",borderColor:e.colorWarning,hoverBorderHover:e.colorWarningHover,activeBorderColor:e.colorWarning,activeShadowColor:e.colorWarningOutline})),{["&".concat(e.componentCls,"-disabled")]:{["&:not(".concat(e.componentCls,"-customize-input) ").concat(e.componentCls,"-selector")]:{background:e.colorBgContainerDisabled,color:e.colorTextDisabled}},["&".concat(e.componentCls,"-multiple ").concat(e.componentCls,"-selection-item")]:{background:e.multipleItemBg,border:"".concat((0,e5.bf)(e.lineWidth)," ").concat(e.lineType," ").concat(e.multipleItemBorderColor)}})}),tg=(e,t)=>{let{componentCls:n,antCls:r}=e;return{["&:not(".concat(n,"-customize-input) ").concat(n,"-selector")]:{background:t.bg,border:"".concat((0,e5.bf)(e.lineWidth)," ").concat(e.lineType," transparent"),color:t.color},["&:not(".concat(n,"-disabled):not(").concat(n,"-customize-input):not(").concat(r,"-pagination-size-changer)")]:{["&:hover ".concat(n,"-selector")]:{background:t.hoverBg},["".concat(n,"-focused& ").concat(n,"-selector")]:{background:e.selectorBg,borderColor:t.activeBorderColor,outline:0}}}},th=(e,t)=>({["&".concat(e.componentCls,"-status-").concat(t.status)]:Object.assign({},tg(e,t))}),tb=e=>({"&-filled":Object.assign(Object.assign(Object.assign(Object.assign({},tg(e,{bg:e.colorFillTertiary,hoverBg:e.colorFillSecondary,activeBorderColor:e.colorPrimary,color:e.colorText})),th(e,{status:"error",bg:e.colorErrorBg,hoverBg:e.colorErrorBgHover,activeBorderColor:e.colorError,color:e.colorError})),th(e,{status:"warning",bg:e.colorWarningBg,hoverBg:e.colorWarningBgHover,activeBorderColor:e.colorWarning,color:e.colorWarning})),{["&".concat(e.componentCls,"-disabled")]:{["&:not(".concat(e.componentCls,"-customize-input) ").concat(e.componentCls,"-selector")]:{borderColor:e.colorBorder,background:e.colorBgContainerDisabled,color:e.colorTextDisabled}},["&".concat(e.componentCls,"-multiple ").concat(e.componentCls,"-selection-item")]:{background:e.colorBgContainer,border:"".concat((0,e5.bf)(e.lineWidth)," ").concat(e.lineType," ").concat(e.colorSplit)}})}),ty=e=>({"&-borderless":{["".concat(e.componentCls,"-selector")]:{background:"transparent",borderColor:"transparent"},["&".concat(e.componentCls,"-disabled")]:{["&:not(".concat(e.componentCls,"-customize-input) ").concat(e.componentCls,"-selector")]:{color:e.colorTextDisabled}},["&".concat(e.componentCls,"-multiple ").concat(e.componentCls,"-selection-item")]:{background:e.multipleItemBg,border:"".concat((0,e5.bf)(e.lineWidth)," ").concat(e.lineType," ").concat(e.multipleItemBorderColor)}}});var tv=e=>({[e.componentCls]:Object.assign(Object.assign(Object.assign({},tm(e)),tb(e)),ty(e))});let tE=e=>{let{componentCls:t}=e;return{position:"relative",transition:"all ".concat(e.motionDurationMid," ").concat(e.motionEaseInOut),input:{cursor:"pointer"},["".concat(t,"-show-search&")]:{cursor:"text",input:{cursor:"auto",color:"inherit",height:"100%"}},["".concat(t,"-disabled&")]:{cursor:"not-allowed",input:{cursor:"not-allowed"}}}},tS=e=>{let{componentCls:t}=e;return{["".concat(t,"-selection-search-input")]:{margin:0,padding:0,background:"transparent",border:"none",outline:"none",appearance:"none",fontFamily:"inherit","&::-webkit-search-cancel-button":{display:"none","-webkit-appearance":"none"}}}},tw=e=>{let{antCls:t,componentCls:n,inputPaddingHorizontalBase:r,iconCls:o}=e;return{[n]:Object.assign(Object.assign({},(0,e4.Wf)(e)),{position:"relative",display:"inline-block",cursor:"pointer",["&:not(".concat(n,"-customize-input) ").concat(n,"-selector")]:Object.assign(Object.assign({},tE(e)),tS(e)),["".concat(n,"-selection-item")]:Object.assign(Object.assign({flex:1,fontWeight:"normal",position:"relative",userSelect:"none"},e4.vS),{["> ".concat(t,"-typography")]:{display:"inline"}}),["".concat(n,"-selection-placeholder")]:Object.assign(Object.assign({},e4.vS),{flex:1,color:e.colorTextPlaceholder,pointerEvents:"none"}),["".concat(n,"-arrow")]:Object.assign(Object.assign({},(0,e4.Ro)()),{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 ".concat(e.motionDurationSlow," ease"),[o]:{verticalAlign:"top",transition:"transform ".concat(e.motionDurationSlow),"> svg":{verticalAlign:"top"},["&:not(".concat(n,"-suffix)")]:{pointerEvents:"auto"}},["".concat(n,"-disabled &")]:{cursor:"not-allowed"},"> *:not(:last-child)":{marginInlineEnd:8}}),["".concat(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 ".concat(e.motionDurationMid," ease, opacity ").concat(e.motionDurationSlow," ease"),textRendering:"auto","&:before":{display:"block"},"&:hover":{color:e.colorTextTertiary}},"&:hover":{["".concat(n,"-clear")]:{opacity:1},["".concat(n,"-arrow:not(:last-child)")]:{opacity:0}}}),["".concat(n,"-has-feedback")]:{["".concat(n,"-clear")]:{insetInlineEnd:e.calc(r).add(e.fontSize).add(e.paddingXS).equal()}}}},tx=e=>{let{componentCls:t}=e;return[{[t]:{["&".concat(t,"-in-form-item")]:{width:"100%"}}},tw(e),function(e){let{componentCls:t}=e,n=e.calc(e.controlPaddingHorizontalSM).sub(e.lineWidth).equal();return[td(e),td((0,ez.TS)(e,{controlHeight:e.controlHeightSM,borderRadius:e.borderRadiusSM}),"sm"),{["".concat(t,"-single").concat(t,"-sm")]:{["&:not(".concat(t,"-customize-input)")]:{["".concat(t,"-selection-search")]:{insetInlineStart:n,insetInlineEnd:n},["".concat(t,"-selector")]:{padding:"0 ".concat((0,e5.bf)(n))},["&".concat(t,"-show-arrow ").concat(t,"-selection-search")]:{insetInlineEnd:e.calc(n).add(e.calc(e.fontSize).mul(1.5)).equal()},["\n &".concat(t,"-show-arrow ").concat(t,"-selection-item,\n &").concat(t,"-show-arrow ").concat(t,"-selection-placeholder\n ")]:{paddingInlineEnd:e.calc(e.fontSize).mul(1.5).equal()}}}},td((0,ez.TS)(e,{controlHeight:e.singleItemHeightLG,fontSize:e.fontSizeLG,borderRadius:e.borderRadiusLG}),"lg")]}(e),tu(e),ts(e),{["".concat(t,"-rtl")]:{direction:"rtl"}},(0,e3.c)(e,{borderElCls:"".concat(t,"-selector"),focusElCls:"".concat(t,"-focused")})]};var tO=(0,eZ.I$)("Select",(e,t)=>{let{rootPrefixCls:n}=t,r=(0,ez.TS)(e,{rootPrefixCls:n,inputPaddingHorizontalBase:e.calc(e.paddingSM).sub(1).equal(),multipleSelectItemHeight:e.multipleItemHeight,selectHeight:e.controlHeight});return[tx(r),tv(r)]},e=>{let{fontSize:t,lineHeight:n,controlHeight:r,controlPaddingHorizontal:o,zIndexPopupBase:a,colorText:i,fontWeightStrong:s,controlItemBgActive:l,controlItemBgHover:c,colorBgContainer:u,colorFillSecondary:d,controlHeightLG:p,controlHeightSM:f,colorBgContainerDisabled:m,colorTextDisabled:g}=e;return{zIndexPopup:a+50,optionSelectedColor:i,optionSelectedFontWeight:s,optionSelectedBg:l,optionActiveBg:c,optionPadding:"".concat((r-t*n)/2,"px ").concat(o,"px"),optionFontSize:t,optionLineHeight:n,optionHeight:r,selectorBg:u,clearBg:u,singleItemHeightLG:p,multipleItemBg:d,multipleItemBorderColor:"transparent",multipleItemHeight:f,multipleItemHeightLG:r,multipleSelectorBgDisabled:m,multipleItemColorDisabled:g,multipleItemBorderColorDisabled:"transparent",showArrowPaddingInlineEnd:Math.ceil(1.25*e.fontSize)}},{unitless:{optionLineHeight:!0,optionSelectedFontWeight:!0}}),tA={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"},tT=n(60688),tC=r.forwardRef(function(e,t){return r.createElement(tT.Z,(0,i.Z)({},e,{ref:t,icon:tA}))}),tk=n(77136),tI=n(81303),tN=n(20383),t_=n(66155),tR=n(96871),tP=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);ot.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};let tM="SECRET_COMBOBOX_MODE_DO_NOT_USE",tL=r.forwardRef((e,t)=>{var n,o,i;let s;let{prefixCls:l,bordered:c,className:u,rootClassName:d,getPopupContainer:p,popupClassName:f,dropdownClassName:m,listHeight:g=256,placement:h,listItemHeight:b,size:y,disabled:v,notFoundContent:E,status:S,builtinPlacements:w,dropdownMatchSelectWidth:x,popupMatchSelectWidth:O,direction:A,style:T,allowClear:C,variant:k,dropdownStyle:I,transitionName:N,tagRender:_,maxCount:R}=e,P=tP(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"]),{getPopupContainer:M,getPrefixCls:L,renderEmpty:D,direction:j,virtual:F,popupMatchSelectWidth:B,popupOverflow:U,select:Z}=r.useContext(ej.E_),[,z]=(0,eU.ZP)(),H=null!=b?b:null==z?void 0:z.controlHeight,G=L("select",l),$=L(),W=null!=A?A:j,{compactSize:V,compactItemClassnames:q}=(0,e1.ri)(G,W),[Y,K]=(0,e0.Z)(k,c),X=(0,eX.Z)(G),[J,ee,et]=tO(G,X),en=r.useMemo(()=>{let{mode:t}=e;return"combobox"===t?void 0:t===tM?"combobox":t},[e.mode]),er="multiple"===en||"tags"===en,eo=(o=e.suffixIcon,void 0!==(i=e.showArrow)?i:null!==o),ea=null!==(n=null!=O?O:x)&&void 0!==n?n:B,{status:ei,hasFeedback:es,isFormItemInput:el,feedbackIcon:ec}=r.useContext(eJ.aM),eu=(0,eD.F)(ei,S);s=void 0!==E?E:"combobox"===en?null:(null==D?void 0:D("Select"))||r.createElement(eY,{componentName:"Select"});let{suffixIcon:ed,itemIcon:ep,removeIcon:ef,clearIcon:em}=function(e){let{suffixIcon:t,clearIcon:n,menuItemSelectedIcon:o,removeIcon:a,loading:i,multiple:s,hasFeedback:l,prefixCls:c,showSuffixIcon:u,feedbackIcon:d,showArrow:p,componentName:f}=e,m=null!=n?n:r.createElement(tk.Z,null),g=e=>null!==t||l||p?r.createElement(r.Fragment,null,!1!==u&&e,l&&d):null,h=null;if(void 0!==t)h=g(t);else if(i)h=g(r.createElement(t_.Z,{spin:!0}));else{let e="".concat(c,"-suffix");h=t=>{let{open:n,showSearch:o}=t;return n&&o?g(r.createElement(tR.Z,{className:e})):g(r.createElement(tN.Z,{className:e}))}}let b=null;return b=void 0!==o?o:s?r.createElement(tC,null):null,{clearIcon:m,suffixIcon:h,itemIcon:b,removeIcon:void 0!==a?a:r.createElement(tI.Z,null)}}(Object.assign(Object.assign({},P),{multiple:er,hasFeedback:es,feedbackIcon:ec,showSuffixIcon:eo,prefixCls:G,componentName:"Select"})),eg=(0,Q.Z)(P,["suffixIcon","itemIcon"]),eh=a()(f||m,{["".concat(G,"-dropdown-").concat(W)]:"rtl"===W},d,et,X,ee),eb=(0,eQ.Z)(e=>{var t;return null!==(t=null!=y?y:V)&&void 0!==t?t:e}),ey=r.useContext(eK.Z),ev=a()({["".concat(G,"-lg")]:"large"===eb,["".concat(G,"-sm")]:"small"===eb,["".concat(G,"-rtl")]:"rtl"===W,["".concat(G,"-").concat(Y)]:K,["".concat(G,"-in-form-item")]:el},(0,eD.Z)(G,eu,es),q,null==Z?void 0:Z.className,u,d,et,X,ee),eE=r.useMemo(()=>void 0!==h?h:"rtl"===W?"bottomRight":"bottomLeft",[h,W]),[eS]=(0,eP.Cn)("SelectLike",null==I?void 0:I.zIndex);return J(r.createElement(eR,Object.assign({ref:t,virtual:F,showSearch:null==Z?void 0:Z.showSearch},eg,{style:Object.assign(Object.assign({},null==Z?void 0:Z.style),T),dropdownMatchSelectWidth:ea,transitionName:(0,eM.m)($,"slide-up",N),builtinPlacements:w||e2(U),listHeight:g,listItemHeight:H,mode:en,prefixCls:G,placement:eE,direction:W,suffixIcon:ed,menuItemSelectedIcon:ep,removeIcon:ef,allowClear:!0===C?{clearIcon:em}:C,notFoundContent:s,className:ev,getPopupContainer:p||M,dropdownClassName:eh,disabled:null!=v?v:ey,dropdownStyle:Object.assign(Object.assign({},I),{zIndex:eS}),maxCount:er?R:void 0,tagRender:er?_:void 0})))}),tD=(0,eL.Z)(tL);tL.SECRET_COMBOBOX_MODE_DO_NOT_USE=tM,tL.Option=K,tL.OptGroup=Y,tL._InternalPanelDoNotUseOrYouWillBeFired=tD;var tj=tL},92801:function(e,t,n){n.d(t,{BR:function(){return l},ri:function(){return s}});var r=n(16480),o=n.n(r);n(33054);var a=n(64090);let i=a.createContext(null),s=(e,t)=>{let n=a.useContext(i),r=a.useMemo(()=>{if(!n)return"";let{compactDirection:r,isFirstItem:a,isLastItem:i}=n,s="vertical"===r?"-vertical-":"-";return o()("".concat(e,"-compact").concat(s,"item"),{["".concat(e,"-compact").concat(s,"first-item")]:a,["".concat(e,"-compact").concat(s,"last-item")]:i,["".concat(e,"-compact").concat(s,"item-rtl")]:"rtl"===t})},[e,t,n]);return{compactSize:null==n?void 0:n.compactSize,compactDirection:null==n?void 0:n.compactDirection,compactItemClassnames:r}},l=e=>{let{children:t}=e;return a.createElement(i.Provider,{value:null},t)}},12288:function(e,t,n){n.d(t,{c:function(){return r}});function r(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{focus:!0},{componentCls:n}=e,r="".concat(n,"-compact");return{[r]:Object.assign(Object.assign({},function(e,t,n){let{focusElCls:r,focus:o,borderElCls:a}=n,i=a?"> *":"",s=["hover",o?"focus":null,"active"].filter(Boolean).map(e=>"&:".concat(e," ").concat(i)).join(",");return{["&-item:not(".concat(t,"-last-item)")]:{marginInlineEnd:e.calc(e.lineWidth).mul(-1).equal()},"&-item":Object.assign(Object.assign({[s]:{zIndex:2}},r?{["&".concat(r)]:{zIndex:2}}:{}),{["&[disabled] ".concat(i)]:{zIndex:0}})}}(e,r,t)),function(e,t,n){let{borderElCls:r}=n,o=r?"> ".concat(r):"";return{["&-item:not(".concat(t,"-first-item):not(").concat(t,"-last-item) ").concat(o)]:{borderRadius:0},["&-item:not(".concat(t,"-last-item)").concat(t,"-first-item")]:{["& ".concat(o,", &").concat(e,"-sm ").concat(o,", &").concat(e,"-lg ").concat(o)]:{borderStartEndRadius:0,borderEndEndRadius:0}},["&-item:not(".concat(t,"-first-item)").concat(t,"-last-item")]:{["& ".concat(o,", &").concat(e,"-sm ").concat(o,", &").concat(e,"-lg ").concat(o)]:{borderStartStartRadius:0,borderEndStartRadius:0}}}}(n,r,t))}}},11303:function(e,t,n){n.d(t,{Lx:function(){return l},Qy:function(){return d},Ro:function(){return i},Wf:function(){return a},dF:function(){return s},du:function(){return c},oN:function(){return u},vS:function(){return o}});var r=n(8985);let o={overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"},a=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return{boxSizing:"border-box",margin:0,padding:0,color:e.colorText,fontSize:e.fontSize,lineHeight:e.lineHeight,listStyle:"none",fontFamily:t?"inherit":e.fontFamily}},i=()=>({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"}}),s=()=>({"&::before":{display:"table",content:'""'},"&::after":{display:"table",clear:"both",content:'""'}}),l=e=>({a:{color:e.colorLink,textDecoration:e.linkDecoration,backgroundColor:"transparent",outline:"none",cursor:"pointer",transition:"color ".concat(e.motionDurationSlow),"-webkit-text-decoration-skip":"objects","&:hover":{color:e.colorLinkHover},"&:active":{color:e.colorLinkActive},"&:active,\n &:hover":{textDecoration:e.linkHoverDecoration,outline:0},"&:focus":{textDecoration:e.linkFocusDecoration,outline:0},"&[disabled]":{color:e.colorTextDisabled,cursor:"not-allowed"}}}),c=(e,t)=>{let{fontFamily:n,fontSize:r}=e,o='[class^="'.concat(t,'"], [class*=" ').concat(t,'"]');return{[o]:{fontFamily:n,fontSize:r,boxSizing:"border-box","&::before, &::after":{boxSizing:"border-box"},[o]:{boxSizing:"border-box","&::before, &::after":{boxSizing:"border-box"}}}}},u=e=>({outline:"".concat((0,r.bf)(e.lineWidthFocus)," solid ").concat(e.colorPrimaryBorder),outlineOffset:1,transition:"outline-offset 0s, outline 0s"}),d=e=>({"&:focus-visible":Object.assign({},u(e))})},46154:function(e,t){t.Z=e=>({[e.componentCls]:{["".concat(e.antCls,"-motion-collapse-legacy")]:{overflow:"hidden","&-active":{transition:"height ".concat(e.motionDurationMid," ").concat(e.motionEaseInOut,",\n opacity ").concat(e.motionDurationMid," ").concat(e.motionEaseInOut," !important")}},["".concat(e.antCls,"-motion-collapse")]:{overflow:"hidden",transition:"height ".concat(e.motionDurationMid," ").concat(e.motionEaseInOut,",\n opacity ").concat(e.motionDurationMid," ").concat(e.motionEaseInOut," !important")}}})},59353:function(e,t,n){n.d(t,{R:function(){return a}});let r=e=>({animationDuration:e,animationFillMode:"both"}),o=e=>({animationDuration:e,animationFillMode:"both"}),a=function(e,t,n,a){let i=arguments.length>4&&void 0!==arguments[4]&&arguments[4],s=i?"&":"";return{["\n ".concat(s).concat(e,"-enter,\n ").concat(s).concat(e,"-appear\n ")]:Object.assign(Object.assign({},r(a)),{animationPlayState:"paused"}),["".concat(s).concat(e,"-leave")]:Object.assign(Object.assign({},o(a)),{animationPlayState:"paused"}),["\n ".concat(s).concat(e,"-enter").concat(e,"-enter-active,\n ").concat(s).concat(e,"-appear").concat(e,"-appear-active\n ")]:{animationName:t,animationPlayState:"running"},["".concat(s).concat(e,"-leave").concat(e,"-leave-active")]:{animationName:n,animationPlayState:"running",pointerEvents:"none"}}}},202:function(e,t,n){n.d(t,{Qt:function(){return s},Uw:function(){return i},fJ:function(){return a},ly:function(){return l},oN:function(){return d}});var r=n(8985),o=n(59353);let a=new r.E4("antSlideUpIn",{"0%":{transform:"scaleY(0.8)",transformOrigin:"0% 0%",opacity:0},"100%":{transform:"scaleY(1)",transformOrigin:"0% 0%",opacity:1}}),i=new r.E4("antSlideUpOut",{"0%":{transform:"scaleY(1)",transformOrigin:"0% 0%",opacity:1},"100%":{transform:"scaleY(0.8)",transformOrigin:"0% 0%",opacity:0}}),s=new r.E4("antSlideDownIn",{"0%":{transform:"scaleY(0.8)",transformOrigin:"100% 100%",opacity:0},"100%":{transform:"scaleY(1)",transformOrigin:"100% 100%",opacity:1}}),l=new r.E4("antSlideDownOut",{"0%":{transform:"scaleY(1)",transformOrigin:"100% 100%",opacity:1},"100%":{transform:"scaleY(0.8)",transformOrigin:"100% 100%",opacity:0}}),c=new r.E4("antSlideLeftIn",{"0%":{transform:"scaleX(0.8)",transformOrigin:"0% 0%",opacity:0},"100%":{transform:"scaleX(1)",transformOrigin:"0% 0%",opacity:1}}),u={"slide-up":{inKeyframes:a,outKeyframes:i},"slide-down":{inKeyframes:s,outKeyframes:l},"slide-left":{inKeyframes:c,outKeyframes:new r.E4("antSlideLeftOut",{"0%":{transform:"scaleX(1)",transformOrigin:"0% 0%",opacity:1},"100%":{transform:"scaleX(0.8)",transformOrigin:"0% 0%",opacity:0}})},"slide-right":{inKeyframes:new r.E4("antSlideRightIn",{"0%":{transform:"scaleX(0.8)",transformOrigin:"100% 0%",opacity:0},"100%":{transform:"scaleX(1)",transformOrigin:"100% 0%",opacity:1}}),outKeyframes:new r.E4("antSlideRightOut",{"0%":{transform:"scaleX(1)",transformOrigin:"100% 0%",opacity:1},"100%":{transform:"scaleX(0.8)",transformOrigin:"100% 0%",opacity:0}})}},d=(e,t)=>{let{antCls:n}=e,r="".concat(n,"-").concat(t),{inKeyframes:a,outKeyframes:i}=u[t];return[(0,o.R)(r,a,i,e.motionDurationMid),{["\n ".concat(r,"-enter,\n ").concat(r,"-appear\n ")]:{transform:"scale(0)",transformOrigin:"0% 0%",opacity:0,animationTimingFunction:e.motionEaseOutQuint,"&-prepare":{transform:"scale(1)"}},["".concat(r,"-leave")]:{animationTimingFunction:e.motionEaseInQuint}}]}},58854:function(e,t,n){n.d(t,{_y:function(){return g},kr:function(){return a}});var r=n(8985),o=n(59353);let a=new r.E4("antZoomIn",{"0%":{transform:"scale(0.2)",opacity:0},"100%":{transform:"scale(1)",opacity:1}}),i=new r.E4("antZoomOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0.2)",opacity:0}}),s=new r.E4("antZoomBigIn",{"0%":{transform:"scale(0.8)",opacity:0},"100%":{transform:"scale(1)",opacity:1}}),l=new r.E4("antZoomBigOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0.8)",opacity:0}}),c=new r.E4("antZoomUpIn",{"0%":{transform:"scale(0.8)",transformOrigin:"50% 0%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"50% 0%"}}),u=new r.E4("antZoomUpOut",{"0%":{transform:"scale(1)",transformOrigin:"50% 0%"},"100%":{transform:"scale(0.8)",transformOrigin:"50% 0%",opacity:0}}),d=new r.E4("antZoomLeftIn",{"0%":{transform:"scale(0.8)",transformOrigin:"0% 50%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"0% 50%"}}),p=new r.E4("antZoomLeftOut",{"0%":{transform:"scale(1)",transformOrigin:"0% 50%"},"100%":{transform:"scale(0.8)",transformOrigin:"0% 50%",opacity:0}}),f=new r.E4("antZoomRightIn",{"0%":{transform:"scale(0.8)",transformOrigin:"100% 50%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"100% 50%"}}),m={zoom:{inKeyframes:a,outKeyframes:i},"zoom-big":{inKeyframes:s,outKeyframes:l},"zoom-big-fast":{inKeyframes:s,outKeyframes:l},"zoom-left":{inKeyframes:d,outKeyframes:p},"zoom-right":{inKeyframes:f,outKeyframes:new r.E4("antZoomRightOut",{"0%":{transform:"scale(1)",transformOrigin:"100% 50%"},"100%":{transform:"scale(0.8)",transformOrigin:"100% 50%",opacity:0}})},"zoom-up":{inKeyframes:c,outKeyframes:u},"zoom-down":{inKeyframes:new r.E4("antZoomDownIn",{"0%":{transform:"scale(0.8)",transformOrigin:"50% 100%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"50% 100%"}}),outKeyframes:new r.E4("antZoomDownOut",{"0%":{transform:"scale(1)",transformOrigin:"50% 100%"},"100%":{transform:"scale(0.8)",transformOrigin:"50% 100%",opacity:0}})}},g=(e,t)=>{let{antCls:n}=e,r="".concat(n,"-").concat(t),{inKeyframes:a,outKeyframes:i}=m[t];return[(0,o.R)(r,a,i,"zoom-big-fast"===t?e.motionDurationFast:e.motionDurationMid),{["\n ".concat(r,"-enter,\n ").concat(r,"-appear\n ")]:{transform:"scale(0)",opacity:0,animationTimingFunction:e.motionEaseOutCirc,"&-prepare":{transform:"none"}},["".concat(r,"-leave")]:{animationTimingFunction:e.motionEaseInOutCirc}}]}},43345:function(e,t,n){n.d(t,{Mj:function(){return y},u_:function(){return b},uH:function(){return h}});var r=n(64090),o=n(8985),a=n(12215),i=e=>{let{controlHeight:t}=e;return{controlHeightSM:.75*t,controlHeightXS:.5*t,controlHeightLG:1.25*t}},s=n(46864),l=n(6336),c=e=>{let t=e,n=e,r=e,o=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?o=4:e>=8&&(o=6),{borderRadius:e,borderRadiusXS:r,borderRadiusSM:n,borderRadiusLG:t,borderRadiusOuter:o}};let u=(e,t)=>new l.C(e).setAlpha(t).toRgbString(),d=(e,t)=>new l.C(e).darken(t).toHexString(),p=e=>{let t=(0,a.R_)(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]}},f=(e,t)=>{let n=e||"#fff",r=t||"#000";return{colorBgBase:n,colorTextBase:r,colorText:u(r,.88),colorTextSecondary:u(r,.65),colorTextTertiary:u(r,.45),colorTextQuaternary:u(r,.25),colorFill:u(r,.15),colorFillSecondary:u(r,.06),colorFillTertiary:u(r,.04),colorFillQuaternary:u(r,.02),colorBgLayout:d(n,4),colorBgContainer:d(n,0),colorBgElevated:d(n,0),colorBgSpotlight:u(r,.85),colorBgBlur:"transparent",colorBorder:d(n,15),colorBorderSecondary:d(n,6)}};var m=n(49202),g=e=>{let t=(0,m.Z)(e),n=t.map(e=>e.size),r=t.map(e=>e.lineHeight),o=n[1],a=n[0],i=n[2],s=r[1],l=r[0],c=r[2];return{fontSizeSM:a,fontSize:o,fontSizeLG:i,fontSizeXL:n[3],fontSizeHeading1:n[6],fontSizeHeading2:n[5],fontSizeHeading3:n[4],fontSizeHeading4:n[3],fontSizeHeading5:n[2],lineHeight:s,lineHeightLG:c,lineHeightSM:l,fontHeight:Math.round(s*o),fontHeightLG:Math.round(c*i),fontHeightSM:Math.round(l*a),lineHeightHeading1:r[6],lineHeightHeading2:r[5],lineHeightHeading3:r[4],lineHeightHeading4:r[3],lineHeightHeading5:r[2]}};let h=(0,o.jG)(function(e){let t=Object.keys(s.M).map(t=>{let n=(0,a.R_)(e[t]);return Array(10).fill(1).reduce((e,r,o)=>(e["".concat(t,"-").concat(o+1)]=n[o],e["".concat(t).concat(o+1)]=n[o],e),{})}).reduce((e,t)=>e=Object.assign(Object.assign({},e),t),{});return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},e),t),function(e,t){let{generateColorPalettes:n,generateNeutralColorPalettes:r}=t,{colorSuccess:o,colorWarning:a,colorError:i,colorInfo:s,colorPrimary:c,colorBgBase:u,colorTextBase:d}=e,p=n(c),f=n(o),m=n(a),g=n(i),h=n(s),b=r(u,d),y=n(e.colorLink||e.colorInfo);return Object.assign(Object.assign({},b),{colorPrimaryBg:p[1],colorPrimaryBgHover:p[2],colorPrimaryBorder:p[3],colorPrimaryBorderHover:p[4],colorPrimaryHover:p[5],colorPrimary:p[6],colorPrimaryActive:p[7],colorPrimaryTextHover:p[8],colorPrimaryText:p[9],colorPrimaryTextActive:p[10],colorSuccessBg:f[1],colorSuccessBgHover:f[2],colorSuccessBorder:f[3],colorSuccessBorderHover:f[4],colorSuccessHover:f[4],colorSuccess:f[6],colorSuccessActive:f[7],colorSuccessTextHover:f[8],colorSuccessText:f[9],colorSuccessTextActive:f[10],colorErrorBg:g[1],colorErrorBgHover:g[2],colorErrorBorder:g[3],colorErrorBorderHover:g[4],colorErrorHover:g[5],colorError:g[6],colorErrorActive:g[7],colorErrorTextHover:g[8],colorErrorText:g[9],colorErrorTextActive:g[10],colorWarningBg:m[1],colorWarningBgHover:m[2],colorWarningBorder:m[3],colorWarningBorderHover:m[4],colorWarningHover:m[4],colorWarning:m[6],colorWarningActive:m[7],colorWarningTextHover:m[8],colorWarningText:m[9],colorWarningTextActive:m[10],colorInfoBg:h[1],colorInfoBgHover:h[2],colorInfoBorder:h[3],colorInfoBorderHover:h[4],colorInfoHover:h[4],colorInfo:h[6],colorInfoActive:h[7],colorInfoTextHover:h[8],colorInfoText:h[9],colorInfoTextActive:h[10],colorLinkHover:y[4],colorLink:y[6],colorLinkActive:y[7],colorBgMask:new l.C("#000").setAlpha(.45).toRgbString(),colorWhite:"#fff"})}(e,{generateColorPalettes:p,generateNeutralColorPalettes:f})),g(e.fontSize)),function(e){let{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)}}(e)),i(e)),function(e){let{motionUnit:t,motionBase:n,borderRadius:r,lineWidth:o}=e;return Object.assign({motionDurationFast:"".concat((n+t).toFixed(1),"s"),motionDurationMid:"".concat((n+2*t).toFixed(1),"s"),motionDurationSlow:"".concat((n+3*t).toFixed(1),"s"),lineWidthBold:o+1},c(r))}(e))}),b={token:s.Z,override:{override:s.Z},hashed:!0},y=r.createContext(b)},46864:function(e,t,n){n.d(t,{M:function(){return r}});let r={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"},o=Object.assign(Object.assign({},r),{colorPrimary:"#1677ff",colorSuccess:"#52c41a",colorWarning:"#faad14",colorError:"#ff4d4f",colorInfo:"#1677ff",colorLink:"",colorTextBase:"",colorBgBase:"",fontFamily:"-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,\n'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol',\n'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});t.Z=o},49202:function(e,t,n){function r(e){return(e+8)/e}function o(e){let t=Array(10).fill(null).map((t,n)=>{let r=e*Math.pow(2.71828,(n-1)/5);return 2*Math.floor((n>1?Math.floor(r):Math.ceil(r))/2)});return t[1]=e,t.map(e=>({size:e,lineHeight:r(e)}))}n.d(t,{D:function(){return r},Z:function(){return o}})},24750:function(e,t,n){n.d(t,{ZP:function(){return b},ID:function(){return m},NJ:function(){return f}});var r=n(64090),o=n(8985),a=n(43345),i=n(46864),s=n(6336);function l(e){return e>=0&&e<=255}var c=function(e,t){let{r:n,g:r,b:o,a:a}=new s.C(e).toRgb();if(a<1)return e;let{r:i,g:c,b:u}=new s.C(t).toRgb();for(let e=.01;e<=1;e+=.01){let t=Math.round((n-i*(1-e))/e),a=Math.round((r-c*(1-e))/e),d=Math.round((o-u*(1-e))/e);if(l(t)&&l(a)&&l(d))return new s.C({r:t,g:a,b:d,a:Math.round(100*e)/100}).toRgbString()}return new s.C({r:n,g:r,b:o,a:1}).toRgbString()},u=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);ot.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};function d(e){let{override:t}=e,n=u(e,["override"]),r=Object.assign({},t);Object.keys(i.Z).forEach(e=>{delete r[e]});let o=Object.assign(Object.assign({},n),r);return!1===o.motion&&(o.motionDurationFast="0s",o.motionDurationMid="0s",o.motionDurationSlow="0s"),Object.assign(Object.assign(Object.assign({},o),{colorFillContent:o.colorFillSecondary,colorFillContentHover:o.colorFill,colorFillAlter:o.colorFillQuaternary,colorBgContainerDisabled:o.colorFillTertiary,colorBorderBg:o.colorBgContainer,colorSplit:c(o.colorBorderSecondary,o.colorBgContainer),colorTextPlaceholder:o.colorTextQuaternary,colorTextDisabled:o.colorTextQuaternary,colorTextHeading:o.colorText,colorTextLabel:o.colorTextSecondary,colorTextDescription:o.colorTextTertiary,colorTextLightSolid:o.colorWhite,colorHighlight:o.colorError,colorBgTextHover:o.colorFillSecondary,colorBgTextActive:o.colorFill,colorIcon:o.colorTextTertiary,colorIconHover:o.colorText,colorErrorOutline:c(o.colorErrorBg,o.colorBgContainer),colorWarningOutline:c(o.colorWarningBg,o.colorBgContainer),fontSizeIcon:o.fontSizeSM,lineWidthFocus:4*o.lineWidth,lineWidth:o.lineWidth,controlOutlineWidth:2*o.lineWidth,controlInteractiveSize:o.controlHeight/2,controlItemBgHover:o.colorFillTertiary,controlItemBgActive:o.colorPrimaryBg,controlItemBgActiveHover:o.colorPrimaryBgHover,controlItemBgActiveDisabled:o.colorFill,controlTmpOutline:o.colorFillQuaternary,controlOutline:c(o.colorPrimaryBg,o.colorBgContainer),lineType:o.lineType,borderRadius:o.borderRadius,borderRadiusXS:o.borderRadiusXS,borderRadiusSM:o.borderRadiusSM,borderRadiusLG:o.borderRadiusLG,fontWeightStrong:600,opacityLoading:.65,linkDecoration:"none",linkHoverDecoration:"none",linkFocusDecoration:"none",controlPaddingHorizontal:12,controlPaddingHorizontalSM:8,paddingXXS:o.sizeXXS,paddingXS:o.sizeXS,paddingSM:o.sizeSM,padding:o.size,paddingMD:o.sizeMD,paddingLG:o.sizeLG,paddingXL:o.sizeXL,paddingContentHorizontalLG:o.sizeLG,paddingContentVerticalLG:o.sizeMS,paddingContentHorizontal:o.sizeMS,paddingContentVertical:o.sizeSM,paddingContentHorizontalSM:o.size,paddingContentVerticalSM:o.sizeXS,marginXXS:o.sizeXXS,marginXS:o.sizeXS,marginSM:o.sizeSM,margin:o.size,marginMD:o.sizeMD,marginLG:o.sizeLG,marginXL:o.sizeXL,marginXXL:o.sizeXXL,boxShadow:"\n 0 6px 16px 0 rgba(0, 0, 0, 0.08),\n 0 3px 6px -4px rgba(0, 0, 0, 0.12),\n 0 9px 28px 8px rgba(0, 0, 0, 0.05)\n ",boxShadowSecondary:"\n 0 6px 16px 0 rgba(0, 0, 0, 0.08),\n 0 3px 6px -4px rgba(0, 0, 0, 0.12),\n 0 9px 28px 8px rgba(0, 0, 0, 0.05)\n ",boxShadowTertiary:"\n 0 1px 2px 0 rgba(0, 0, 0, 0.03),\n 0 1px 6px -1px rgba(0, 0, 0, 0.02),\n 0 2px 4px 0 rgba(0, 0, 0, 0.02)\n ",screenXS:480,screenXSMin:480,screenXSMax:575,screenSM:576,screenSMMin:576,screenSMMax:767,screenMD:768,screenMDMin:768,screenMDMax:991,screenLG:992,screenLGMin:992,screenLGMax:1199,screenXL:1200,screenXLMin:1200,screenXLMax:1599,screenXXL:1600,screenXXLMin:1600,boxShadowPopoverArrow:"2px 2px 5px rgba(0, 0, 0, 0.05)",boxShadowCard:"\n 0 1px 2px -2px ".concat(new s.C("rgba(0, 0, 0, 0.16)").toRgbString(),",\n 0 3px 6px 0 ").concat(new s.C("rgba(0, 0, 0, 0.12)").toRgbString(),",\n 0 5px 12px 4px ").concat(new s.C("rgba(0, 0, 0, 0.09)").toRgbString(),"\n "),boxShadowDrawerRight:"\n -6px 0 16px 0 rgba(0, 0, 0, 0.08),\n -3px 0 6px -4px rgba(0, 0, 0, 0.12),\n -9px 0 28px 8px rgba(0, 0, 0, 0.05)\n ",boxShadowDrawerLeft:"\n 6px 0 16px 0 rgba(0, 0, 0, 0.08),\n 3px 0 6px -4px rgba(0, 0, 0, 0.12),\n 9px 0 28px 8px rgba(0, 0, 0, 0.05)\n ",boxShadowDrawerUp:"\n 0 6px 16px 0 rgba(0, 0, 0, 0.08),\n 0 3px 6px -4px rgba(0, 0, 0, 0.12),\n 0 9px 28px 8px rgba(0, 0, 0, 0.05)\n ",boxShadowDrawerDown:"\n 0 -6px 16px 0 rgba(0, 0, 0, 0.08),\n 0 -3px 6px -4px rgba(0, 0, 0, 0.12),\n 0 -9px 28px 8px rgba(0, 0, 0, 0.05)\n ",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 p=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);ot.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};let f={lineHeight:!0,lineHeightSM:!0,lineHeightLG:!0,lineHeightHeading1:!0,lineHeightHeading2:!0,lineHeightHeading3:!0,lineHeightHeading4:!0,lineHeightHeading5:!0,opacityLoading:!0,fontWeightStrong:!0,zIndexPopupBase:!0,zIndexBase:!0},m={size:!0,sizeSM:!0,sizeLG:!0,sizeMD:!0,sizeXS:!0,sizeXXS:!0,sizeMS:!0,sizeXL:!0,sizeXXL:!0,sizeUnit:!0,sizeStep:!0,motionBase:!0,motionUnit:!0},g={screenXS:!0,screenXSMin:!0,screenXSMax:!0,screenSM:!0,screenSMMin:!0,screenSMMax:!0,screenMD:!0,screenMDMin:!0,screenMDMax:!0,screenLG:!0,screenLGMin:!0,screenLGMax:!0,screenXL:!0,screenXLMin:!0,screenXLMax:!0,screenXXL:!0,screenXXLMin:!0},h=(e,t,n)=>{let r=n.getDerivativeToken(e),{override:o}=t,a=p(t,["override"]),i=Object.assign(Object.assign({},r),{override:o});return i=d(i),a&&Object.entries(a).forEach(e=>{let[t,n]=e,{theme:r}=n,o=p(n,["theme"]),a=o;r&&(a=h(Object.assign(Object.assign({},i),o),{override:o},r)),i[t]=a}),i};function b(){let{token:e,hashed:t,theme:n,override:s,cssVar:l}=r.useContext(a.Mj),c="".concat("5.13.2","-").concat(t||""),u=n||a.uH,[p,b,y]=(0,o.fp)(u,[i.Z,e],{salt:c,override:s,getComputedToken:h,formatToken:d,cssVar:l&&{prefix:l.prefix,key:l.key,unitless:f,ignore:m,preserve:g}});return[u,y,t?b:"",p,l]}},76585:function(e,t,n){n.d(t,{ZP:function(){return A},I$:function(){return k},bk:function(){return T}});var r=n(64090),o=n(8985);n(48563);var a=n(57499),i=n(11303),s=n(24750),l=n(47365),c=n(65127),u=n(72784),d=n(29676),p=n(68605),f=n(27478);let m=(0,c.Z)(function e(){(0,l.Z)(this,e)}),g=function(e){function t(e){var n,r,o;return(0,l.Z)(this,t),r=t,r=(0,p.Z)(r),(n=(0,u.Z)(this,(0,d.Z)()?Reflect.construct(r,o||[],(0,p.Z)(this).constructor):r.apply(this,o))).result=0,e instanceof t?n.result=e.result:"number"==typeof e&&(n.result=e),n}return(0,f.Z)(t,e),(0,c.Z)(t,[{key:"add",value:function(e){return e instanceof t?this.result+=e.result:"number"==typeof e&&(this.result+=e),this}},{key:"sub",value:function(e){return e instanceof t?this.result-=e.result:"number"==typeof e&&(this.result-=e),this}},{key:"mul",value:function(e){return e instanceof t?this.result*=e.result:"number"==typeof e&&(this.result*=e),this}},{key:"div",value:function(e){return e instanceof t?this.result/=e.result:"number"==typeof e&&(this.result/=e),this}},{key:"equal",value:function(){return this.result}}]),t}(m),h="CALC_UNIT";function b(e){return"number"==typeof e?"".concat(e).concat(h):e}let y=function(e){function t(e){var n,r,o;return(0,l.Z)(this,t),r=t,r=(0,p.Z)(r),(n=(0,u.Z)(this,(0,d.Z)()?Reflect.construct(r,o||[],(0,p.Z)(this).constructor):r.apply(this,o))).result="",e instanceof t?n.result="(".concat(e.result,")"):"number"==typeof e?n.result=b(e):"string"==typeof e&&(n.result=e),n}return(0,f.Z)(t,e),(0,c.Z)(t,[{key:"add",value:function(e){return e instanceof t?this.result="".concat(this.result," + ").concat(e.getResult()):("number"==typeof e||"string"==typeof e)&&(this.result="".concat(this.result," + ").concat(b(e))),this.lowPriority=!0,this}},{key:"sub",value:function(e){return e instanceof t?this.result="".concat(this.result," - ").concat(e.getResult()):("number"==typeof e||"string"==typeof e)&&(this.result="".concat(this.result," - ").concat(b(e))),this.lowPriority=!0,this}},{key:"mul",value:function(e){return this.lowPriority&&(this.result="(".concat(this.result,")")),e instanceof t?this.result="".concat(this.result," * ").concat(e.getResult(!0)):("number"==typeof e||"string"==typeof e)&&(this.result="".concat(this.result," * ").concat(e)),this.lowPriority=!1,this}},{key:"div",value:function(e){return this.lowPriority&&(this.result="(".concat(this.result,")")),e instanceof t?this.result="".concat(this.result," / ").concat(e.getResult(!0)):("number"==typeof e||"string"==typeof e)&&(this.result="".concat(this.result," / ").concat(e)),this.lowPriority=!1,this}},{key:"getResult",value:function(e){return this.lowPriority||e?"(".concat(this.result,")"):this.result}},{key:"equal",value:function(e){let{unit:t=!0}=e||{},n=RegExp("".concat(h),"g");return(this.result=this.result.replace(n,t?"px":""),void 0!==this.lowPriority)?"calc(".concat(this.result,")"):this.result}}]),t}(m);var v=e=>{let t="css"===e?y:g;return e=>new t(e)},E=n(80316),S=n(28030);let w=(e,t,n)=>{var r;return"function"==typeof n?n((0,E.TS)(t,null!==(r=t[e])&&void 0!==r?r:{})):null!=n?n:{}},x=(e,t,n,r)=>{let o=Object.assign({},t[e]);if(null==r?void 0:r.deprecatedTokens){let{deprecatedTokens:e}=r;e.forEach(e=>{var t;let[n,r]=e;((null==o?void 0:o[n])||(null==o?void 0:o[r]))&&(null!==(t=o[r])&&void 0!==t||(o[r]=null==o?void 0:o[n]))})}let a=Object.assign(Object.assign({},n),o);return Object.keys(a).forEach(e=>{a[e]===t[e]&&delete a[e]}),a},O=(e,t)=>"".concat([t,e.replace(/([A-Z]+)([A-Z][a-z]+)/g,"$1-$2").replace(/([a-z])([A-Z])/g,"$1-$2")].filter(Boolean).join("-"));function A(e,t,n){let l=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},c=Array.isArray(e)?e:[e,e],[u]=c,d=c.join("-");return e=>{let[c,p,f,m,g]=(0,s.ZP)(),{getPrefixCls:h,iconPrefixCls:b,csp:y}=(0,r.useContext)(a.E_),A=h(),T=g?"css":"js",C=v(T),{max:k,min:I}="js"===T?{max:Math.max,min:Math.min}:{max:function(){for(var e=arguments.length,t=Array(e),n=0;n(0,o.bf)(e)).join(","),")")},min:function(){for(var e=arguments.length,t=Array(e),n=0;n(0,o.bf)(e)).join(","),")")}},N={theme:c,token:m,hashId:f,nonce:()=>null==y?void 0:y.nonce,clientOnly:l.clientOnly,order:l.order||-999};return(0,o.xy)(Object.assign(Object.assign({},N),{clientOnly:!1,path:["Shared",A]}),()=>[{"&":(0,i.Lx)(m)}]),(0,S.Z)(b,y),[(0,o.xy)(Object.assign(Object.assign({},N),{path:[d,e,b]}),()=>{if(!1===l.injectStyle)return[];let{token:r,flush:a}=(0,E.ZP)(m),s=w(u,p,n),c=".".concat(e),d=x(u,p,s,{deprecatedTokens:l.deprecatedTokens});g&&Object.keys(s).forEach(e=>{s[e]="var(".concat((0,o.ks)(e,O(u,g.prefix)),")")});let h=(0,E.TS)(r,{componentCls:c,prefixCls:e,iconCls:".".concat(b),antCls:".".concat(A),calc:C,max:k,min:I},g?s:d),y=t(h,{hashId:f,prefixCls:e,rootPrefixCls:A,iconPrefixCls:b});return a(u,d),[!1===l.resetStyle?null:(0,i.du)(h,e),y]}),f]}}let T=(e,t,n,r)=>{let o=A(e,t,n,Object.assign({resetStyle:!1,order:-998},r));return e=>{let{prefixCls:t}=e;return o(t),null}},C=(e,t,n)=>{function a(t){return"".concat(e).concat(t.slice(0,1).toUpperCase()).concat(t.slice(1))}let{unitless:i={},injectStyle:l=!0}=null!=n?n:{},c={[a("zIndexPopup")]:!0};Object.keys(i).forEach(e=>{c[a(e)]=i[e]});let u=r=>{let{rootCls:i,cssVar:l}=r,[,u]=(0,s.ZP)();return(0,o.CI)({path:[e],prefix:l.prefix,key:null==l?void 0:l.key,unitless:Object.assign(Object.assign({},s.NJ),c),ignore:s.ID,token:u,scope:i},()=>{let r=w(e,u,t),o=x(e,u,r,{deprecatedTokens:null==n?void 0:n.deprecatedTokens});return Object.keys(r).forEach(e=>{o[a(e)]=o[e],delete o[e]}),o}),null};return t=>{let[,,,,n]=(0,s.ZP)();return[o=>l&&n?r.createElement(r.Fragment,null,r.createElement(u,{rootCls:t,cssVar:n,component:e}),o):o,null==n?void 0:n.key]}},k=(e,t,n,r)=>{let o=A(e,t,n,r),a=C(Array.isArray(e)?e[0]:e,n,r);return function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,[,n]=o(e),[r,i]=a(t);return[r,n,i]}}},80316:function(e,t,n){n.d(t,{TS:function(){return a}});let r="undefined"!=typeof CSSINJS_STATISTIC,o=!0;function a(){for(var e=arguments.length,t=Array(e),n=0;n{Object.keys(e).forEach(t=>{Object.defineProperty(a,t,{configurable:!0,enumerable:!0,get:()=>e[t]})})}),o=!0,a}let i={};function s(){}t.ZP=e=>{let t;let n=e,a=s;return r&&"undefined"!=typeof Proxy&&(t=new Set,n=new Proxy(e,{get:(e,n)=>(o&&t.add(n),e[n])}),a=(e,n)=>{var r;i[e]={global:Array.from(t),component:Object.assign(Object.assign({},null===(r=i[e])||void 0===r?void 0:r.component),n)}}),{token:n,keys:t,flush:a}}},28030:function(e,t,n){var r=n(8985),o=n(11303),a=n(24750);t.Z=(e,t)=>{let[n,i]=(0,a.ZP)();return(0,r.xy)({theme:n,token:i,hashId:"",path:["ant-design-icons",e],nonce:()=>null==t?void 0:t.nonce},()=>[{[".".concat(e)]:Object.assign(Object.assign({},(0,o.Ro)()),{[".".concat(e," .").concat(e,"-icon")]:{display:"block"}})}])}},47104:function(e,t,n){n.d(t,{Z:function(){return $}});var r=n(64090),o=n(16480),a=n.n(o);function i(e){var t=e.children,n=e.prefixCls,o=e.id,i=e.overlayInnerStyle,s=e.className,l=e.style;return r.createElement("div",{className:a()("".concat(n,"-content"),s),style:l},r.createElement("div",{className:"".concat(n,"-inner"),id:o,role:"tooltip",style:i},"function"==typeof t?t():t))}var s=n(14749),l=n(5239),c=n(6787),u=n(44101),d={shiftX:64,adjustY:1},p={adjustX:1,shiftY:!0},f=[0,0],m={left:{points:["cr","cl"],overflow:p,offset:[-4,0],targetOffset:f},right:{points:["cl","cr"],overflow:p,offset:[4,0],targetOffset:f},top:{points:["bc","tc"],overflow:d,offset:[0,-4],targetOffset:f},bottom:{points:["tc","bc"],overflow:d,offset:[0,4],targetOffset:f},topLeft:{points:["bl","tl"],overflow:d,offset:[0,-4],targetOffset:f},leftTop:{points:["tr","tl"],overflow:p,offset:[-4,0],targetOffset:f},topRight:{points:["br","tr"],overflow:d,offset:[0,-4],targetOffset:f},rightTop:{points:["tl","tr"],overflow:p,offset:[4,0],targetOffset:f},bottomRight:{points:["tr","br"],overflow:d,offset:[0,4],targetOffset:f},rightBottom:{points:["bl","br"],overflow:p,offset:[4,0],targetOffset:f},bottomLeft:{points:["tl","bl"],overflow:d,offset:[0,4],targetOffset:f},leftBottom:{points:["br","bl"],overflow:p,offset:[-4,0],targetOffset:f}},g=["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","children","onVisibleChange","afterVisibleChange","transitionName","animation","motion","placement","align","destroyTooltipOnHide","defaultVisible","getTooltipContainer","overlayInnerStyle","arrowContent","overlay","id","showArrow"],h=(0,r.forwardRef)(function(e,t){var n=e.overlayClassName,o=e.trigger,a=e.mouseEnterDelay,d=e.mouseLeaveDelay,p=e.overlayStyle,f=e.prefixCls,h=void 0===f?"rc-tooltip":f,b=e.children,y=e.onVisibleChange,v=e.afterVisibleChange,E=e.transitionName,S=e.animation,w=e.motion,x=e.placement,O=e.align,A=e.destroyTooltipOnHide,T=e.defaultVisible,C=e.getTooltipContainer,k=e.overlayInnerStyle,I=(e.arrowContent,e.overlay),N=e.id,_=e.showArrow,R=(0,c.Z)(e,g),P=(0,r.useRef)(null);(0,r.useImperativeHandle)(t,function(){return P.current});var M=(0,l.Z)({},R);return"visible"in e&&(M.popupVisible=e.visible),r.createElement(u.Z,(0,s.Z)({popupClassName:n,prefixCls:h,popup:function(){return r.createElement(i,{key:"content",prefixCls:h,id:N,overlayInnerStyle:k},I)},action:void 0===o?["hover"]:o,builtinPlacements:m,popupPlacement:void 0===x?"right":x,ref:P,popupAlign:void 0===O?{}:O,getPopupContainer:C,onPopupVisibleChange:y,afterPopupVisibleChange:v,popupTransitionName:E,popupAnimation:S,popupMotion:w,defaultPopupVisible:T,autoDestroy:void 0!==A&&A,mouseLeaveDelay:void 0===d?.1:d,popupStyle:p,mouseEnterDelay:void 0===a?0:a,arrow:void 0===_||_},M),b)}),b=n(44329),y=n(51761),v=n(47387),E=n(8985);let S=(e,t,n)=>{let{sizePopupArrow:r,arrowPolygon:o,arrowPath:a,arrowShadowWidth:i,borderRadiusXS:s,calc:l}=e;return{pointerEvents:"none",width:r,height:r,overflow:"hidden","&::before":{position:"absolute",bottom:0,insetInlineStart:0,width:r,height:l(r).div(2).equal(),background:t,clipPath:{_multi_value_:!0,value:[o,a]},content:'""'},"&::after":{content:'""',position:"absolute",width:i,height:i,bottom:0,insetInline:0,margin:"auto",borderRadius:{_skip_check_:!0,value:"0 0 ".concat((0,E.bf)(s)," 0")},transform:"translateY(50%) rotate(-135deg)",boxShadow:n,zIndex:0,background:"transparent"}}};function w(e){let{contentRadius:t,limitVerticalRadius:n}=e,r=t>12?t+2:12;return{arrowOffsetHorizontal:r,arrowOffsetVertical:n?8:r}}let x={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"]}},O={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"]}},A=new Set(["topLeft","topRight","bottomLeft","bottomRight","leftTop","leftBottom","rightTop","rightBottom"]);var T=n(65823),C=n(76564),k=n(86718),I=n(57499),N=n(92801),_=n(24750),R=n(11303),P=n(58854);let M=["blue","purple","cyan","green","magenta","pink","red","orange","yellow","volcano","geekblue","lime","gold"];var L=n(80316),D=n(76585);let j=e=>{var t;let{componentCls:n,tooltipMaxWidth:r,tooltipColor:o,tooltipBg:a,tooltipBorderRadius:i,zIndexPopup:s,controlHeight:l,boxShadowSecondary:c,paddingSM:u,paddingXS:d}=e;return[{[n]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,R.Wf)(e)),{position:"absolute",zIndex:s,display:"block",width:"max-content",maxWidth:r,visibility:"visible",transformOrigin:"var(--arrow-x, 50%) var(--arrow-y, 50%)","&-hidden":{display:"none"},"--antd-arrow-background-color":a,["".concat(n,"-inner")]:{minWidth:l,minHeight:l,padding:"".concat((0,E.bf)(e.calc(u).div(2).equal())," ").concat((0,E.bf)(d)),color:o,textAlign:"start",textDecoration:"none",wordWrap:"break-word",backgroundColor:a,borderRadius:i,boxShadow:c,boxSizing:"border-box"},"&-placement-left,&-placement-leftTop,&-placement-leftBottom,&-placement-right,&-placement-rightTop,&-placement-rightBottom":{["".concat(n,"-inner")]:{borderRadius:e.min(i,8)}},["".concat(n,"-content")]:{position:"relative"}}),(t=(e,t)=>{let{darkColor:r}=t;return{["&".concat(n,"-").concat(e)]:{["".concat(n,"-inner")]:{backgroundColor:r},["".concat(n,"-arrow")]:{"--antd-arrow-background-color":r}}}},M.reduce((n,r)=>{let o=e["".concat(r,"1")],a=e["".concat(r,"3")],i=e["".concat(r,"6")],s=e["".concat(r,"7")];return Object.assign(Object.assign({},n),t(r,{lightColor:o,lightBorderColor:a,darkColor:i,textColor:s}))},{}))),{"&-rtl":{direction:"rtl"}})},function(e,t,n){var r,o,a,i,s,l,c,u;let{componentCls:d,boxShadowPopoverArrow:p,arrowOffsetVertical:f,arrowOffsetHorizontal:m}=e,{arrowDistance:g=0,arrowPlacement:h={left:!0,right:!0,top:!0,bottom:!0}}={};return{[d]:Object.assign(Object.assign(Object.assign(Object.assign({["".concat(d,"-arrow")]:[Object.assign(Object.assign({position:"absolute",zIndex:1,display:"block"},S(e,t,p)),{"&:before":{background:t}})]},(r=!!h.top,o={[["&-placement-top > ".concat(d,"-arrow"),"&-placement-topLeft > ".concat(d,"-arrow"),"&-placement-topRight > ".concat(d,"-arrow")].join(",")]:{bottom:g,transform:"translateY(100%) rotate(180deg)"},["&-placement-top > ".concat(d,"-arrow")]:{left:{_skip_check_:!0,value:"50%"},transform:"translateX(-50%) translateY(100%) rotate(180deg)"},["&-placement-topLeft > ".concat(d,"-arrow")]:{left:{_skip_check_:!0,value:m}},["&-placement-topRight > ".concat(d,"-arrow")]:{right:{_skip_check_:!0,value:m}}},r?o:{})),(a=!!h.bottom,i={[["&-placement-bottom > ".concat(d,"-arrow"),"&-placement-bottomLeft > ".concat(d,"-arrow"),"&-placement-bottomRight > ".concat(d,"-arrow")].join(",")]:{top:g,transform:"translateY(-100%)"},["&-placement-bottom > ".concat(d,"-arrow")]:{left:{_skip_check_:!0,value:"50%"},transform:"translateX(-50%) translateY(-100%)"},["&-placement-bottomLeft > ".concat(d,"-arrow")]:{left:{_skip_check_:!0,value:m}},["&-placement-bottomRight > ".concat(d,"-arrow")]:{right:{_skip_check_:!0,value:m}}},a?i:{})),(s=!!h.left,l={[["&-placement-left > ".concat(d,"-arrow"),"&-placement-leftTop > ".concat(d,"-arrow"),"&-placement-leftBottom > ".concat(d,"-arrow")].join(",")]:{right:{_skip_check_:!0,value:g},transform:"translateX(100%) rotate(90deg)"},["&-placement-left > ".concat(d,"-arrow")]:{top:{_skip_check_:!0,value:"50%"},transform:"translateY(-50%) translateX(100%) rotate(90deg)"},["&-placement-leftTop > ".concat(d,"-arrow")]:{top:f},["&-placement-leftBottom > ".concat(d,"-arrow")]:{bottom:f}},s?l:{})),(c=!!h.right,u={[["&-placement-right > ".concat(d,"-arrow"),"&-placement-rightTop > ".concat(d,"-arrow"),"&-placement-rightBottom > ".concat(d,"-arrow")].join(",")]:{left:{_skip_check_:!0,value:g},transform:"translateX(-100%) rotate(-90deg)"},["&-placement-right > ".concat(d,"-arrow")]:{top:{_skip_check_:!0,value:"50%"},transform:"translateY(-50%) translateX(-100%) rotate(-90deg)"},["&-placement-rightTop > ".concat(d,"-arrow")]:{top:f},["&-placement-rightBottom > ".concat(d,"-arrow")]:{bottom:f}},c?u:{}))}}(e,"var(--antd-arrow-background-color)"),{["".concat(n,"-pure")]:{position:"relative",maxWidth:"none",margin:e.sizePopupArrow}}]},F=e=>Object.assign(Object.assign({zIndexPopup:e.zIndexPopupBase+70},w({contentRadius:e.borderRadius,limitVerticalRadius:!0})),function(e){let{sizePopupArrow:t,borderRadiusXS:n,borderRadiusOuter:r}=e,o=t/2,a=1*r/Math.sqrt(2),i=o-r*(1-1/Math.sqrt(2)),s=o-1/Math.sqrt(2)*n,l=r*(Math.sqrt(2)-1)+1/Math.sqrt(2)*n,c=2*o-s,u=2*o-a,d=2*o-0,p=o*Math.sqrt(2)+r*(Math.sqrt(2)-2),f=r*(Math.sqrt(2)-1),m="polygon(".concat(f,"px 100%, 50% ").concat(f,"px, ").concat(2*o-f,"px 100%, ").concat(f,"px 100%)");return{arrowShadowWidth:p,arrowPath:"path('M ".concat(0," ").concat(o," A ").concat(r," ").concat(r," 0 0 0 ").concat(a," ").concat(i," L ").concat(s," ").concat(l," A ").concat(n," ").concat(n," 0 0 1 ").concat(c," ").concat(l," L ").concat(u," ").concat(i," A ").concat(r," ").concat(r," 0 0 0 ").concat(d," ").concat(o," Z')"),arrowPolygon:m}}((0,L.TS)(e,{borderRadiusOuter:Math.min(e.borderRadiusOuter,4)})));function B(e){let t=!(arguments.length>1)||void 0===arguments[1]||arguments[1];return(0,D.I$)("Tooltip",e=>{let{borderRadius:t,colorTextLightSolid:n,colorBgSpotlight:r}=e;return[j((0,L.TS)(e,{tooltipMaxWidth:250,tooltipColor:n,tooltipBorderRadius:t,tooltipBg:r})),(0,P._y)(e,"zoom-big-fast")]},F,{resetStyle:!1,injectStyle:t})(e)}var U=n(63787);let Z=M.map(e=>"".concat(e,"-inverse"));function z(e,t){let n=function(e){let t=!(arguments.length>1)||void 0===arguments[1]||arguments[1];return t?[].concat((0,U.Z)(Z),(0,U.Z)(M)).includes(e):M.includes(e)}(t),r=a()({["".concat(e,"-").concat(t)]:t&&n}),o={},i={};return t&&!n&&(o.background=t,i["--antd-arrow-background-color"]=t),{className:r,overlayStyle:o,arrowStyle:i}}var H=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);ot.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};let G=r.forwardRef((e,t)=>{var n,o;let{prefixCls:i,openClassName:s,getTooltipContainer:l,overlayClassName:c,color:u,overlayInnerStyle:d,children:p,afterOpenChange:f,afterVisibleChange:m,destroyTooltipOnHide:g,arrow:E=!0,title:S,overlay:R,builtinPlacements:P,arrowPointAtCenter:M=!1,autoAdjustOverflow:L=!0}=e,D=!!E,[,j]=(0,_.ZP)(),{getPopupContainer:F,getPrefixCls:U,direction:Z}=r.useContext(I.E_),G=(0,C.ln)("Tooltip"),$=r.useRef(null),W=()=>{var e;null===(e=$.current)||void 0===e||e.forceAlign()};r.useImperativeHandle(t,()=>({forceAlign:W,forcePopupAlign:()=>{G.deprecated(!1,"forcePopupAlign","forceAlign"),W()}}));let[V,q]=(0,b.Z)(!1,{value:null!==(n=e.open)&&void 0!==n?n:e.visible,defaultValue:null!==(o=e.defaultOpen)&&void 0!==o?o:e.defaultVisible}),Y=!S&&!R&&0!==S,K=r.useMemo(()=>{var e,t;let n=M;return"object"==typeof E&&(n=null!==(t=null!==(e=E.pointAtCenter)&&void 0!==e?e:E.arrowPointAtCenter)&&void 0!==t?t:M),P||function(e){let{arrowWidth:t,autoAdjustOverflow:n,arrowPointAtCenter:r,offset:o,borderRadius:a,visibleFirst:i}=e,s=t/2,l={};return Object.keys(x).forEach(e=>{let c=Object.assign(Object.assign({},r&&O[e]||x[e]),{offset:[0,0],dynamicInset:!0});switch(l[e]=c,A.has(e)&&(c.autoArrow=!1),e){case"top":case"topLeft":case"topRight":c.offset[1]=-s-o;break;case"bottom":case"bottomLeft":case"bottomRight":c.offset[1]=s+o;break;case"left":case"leftTop":case"leftBottom":c.offset[0]=-s-o;break;case"right":case"rightTop":case"rightBottom":c.offset[0]=s+o}let u=w({contentRadius:a,limitVerticalRadius:!0});if(r)switch(e){case"topLeft":case"bottomLeft":c.offset[0]=-u.arrowOffsetHorizontal-s;break;case"topRight":case"bottomRight":c.offset[0]=u.arrowOffsetHorizontal+s;break;case"leftTop":case"rightTop":c.offset[1]=-u.arrowOffsetHorizontal-s;break;case"leftBottom":case"rightBottom":c.offset[1]=u.arrowOffsetHorizontal+s}c.overflow=function(e,t,n,r){if(!1===r)return{adjustX:!1,adjustY:!1};let o={};switch(e){case"top":case"bottom":o.shiftX=2*t.arrowOffsetHorizontal+n,o.shiftY=!0,o.adjustY=!0;break;case"left":case"right":o.shiftY=2*t.arrowOffsetVertical+n,o.shiftX=!0,o.adjustX=!0}let a=Object.assign(Object.assign({},o),r&&"object"==typeof r?r:{});return a.shiftX||(a.adjustX=!0),a.shiftY||(a.adjustY=!0),a}(e,u,t,n),i&&(c.htmlRegion="visibleFirst")}),l}({arrowPointAtCenter:n,autoAdjustOverflow:L,arrowWidth:D?j.sizePopupArrow:0,borderRadius:j.borderRadius,offset:j.marginXXS,visibleFirst:!0})},[M,E,P,j]),X=r.useMemo(()=>0===S?S:R||S||"",[R,S]),Q=r.createElement(N.BR,null,"function"==typeof X?X():X),{getPopupContainer:J,placement:ee="top",mouseEnterDelay:et=.1,mouseLeaveDelay:en=.1,overlayStyle:er,rootClassName:eo}=e,ea=H(e,["getPopupContainer","placement","mouseEnterDelay","mouseLeaveDelay","overlayStyle","rootClassName"]),ei=U("tooltip",i),es=U(),el=e["data-popover-inject"],ec=V;"open"in e||"visible"in e||!Y||(ec=!1);let eu=(0,T.l$)(p)&&!(0,T.M2)(p)?p:r.createElement("span",null,p),ed=eu.props,ep=ed.className&&"string"!=typeof ed.className?ed.className:a()(ed.className,s||"".concat(ei,"-open")),[ef,em,eg]=B(ei,!el),eh=z(ei,u),eb=eh.arrowStyle,ey=Object.assign(Object.assign({},d),eh.overlayStyle),ev=a()(c,{["".concat(ei,"-rtl")]:"rtl"===Z},eh.className,eo,em,eg),[eE,eS]=(0,y.Cn)("Tooltip",ea.zIndex),ew=r.createElement(h,Object.assign({},ea,{zIndex:eE,showArrow:D,placement:ee,mouseEnterDelay:et,mouseLeaveDelay:en,prefixCls:ei,overlayClassName:ev,overlayStyle:Object.assign(Object.assign({},eb),er),getTooltipContainer:J||l||F,ref:$,builtinPlacements:K,overlay:Q,visible:ec,onVisibleChange:t=>{var n,r;q(!Y&&t),Y||(null===(n=e.onOpenChange)||void 0===n||n.call(e,t),null===(r=e.onVisibleChange)||void 0===r||r.call(e,t))},afterVisibleChange:null!=f?f:m,overlayInnerStyle:ey,arrowContent:r.createElement("span",{className:"".concat(ei,"-arrow-content")}),motion:{motionName:(0,v.m)(es,"zoom-big-fast",e.transitionName),motionDeadline:1e3},destroyTooltipOnHide:!!g}),ec?(0,T.Tm)(eu,{className:ep}):eu);return ef(r.createElement(k.Z.Provider,{value:eS},ew))});G._InternalPanelDoNotUseOrYouWillBeFired=e=>{let{prefixCls:t,className:n,placement:o="top",title:s,color:l,overlayInnerStyle:c}=e,{getPrefixCls:u}=r.useContext(I.E_),d=u("tooltip",t),[p,f,m]=B(d),g=z(d,l),h=g.arrowStyle,b=Object.assign(Object.assign({},c),g.overlayStyle),y=a()(f,m,d,"".concat(d,"-pure"),"".concat(d,"-placement-").concat(o),n,g.className);return p(r.createElement("div",{className:y,style:h},r.createElement("div",{className:"".concat(d,"-arrow")}),r.createElement(i,Object.assign({},e,{className:f,prefixCls:d,overlayInnerStyle:b}),s)))};var $=G},6122:function(e,t,n){var r;!function(o){var a,i={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},s=!0,l="[DecimalError] ",c=l+"Invalid argument: ",u=l+"Exponent out of range: ",d=Math.floor,p=Math.pow,f=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,m=d(1286742750677284.5),g={};function h(e,t){var n,r,o,a,i,l,c,u,d=e.constructor,p=d.precision;if(!e.s||!t.s)return t.s||(t=new d(e)),s?T(t,p):t;if(c=e.d,u=t.d,i=e.e,o=t.e,c=c.slice(),a=i-o){for(a<0?(r=c,a=-a,l=u.length):(r=u,o=i,l=c.length),a>(l=(i=Math.ceil(p/7))>l?i+1:l+1)&&(a=l,r.length=1),r.reverse();a--;)r.push(0);r.reverse()}for((l=c.length)-(a=u.length)<0&&(a=l,r=u,u=c,c=r),n=0;a;)n=(c[--a]=c[a]+u[a]+n)/1e7|0,c[a]%=1e7;for(n&&(c.unshift(n),++o),l=c.length;0==c[--l];)c.pop();return t.d=c,t.e=o,s?T(t,p):t}function b(e,t,n){if(e!==~~e||en)throw Error(c+e)}function y(e){var t,n,r,o=e.length-1,a="",i=e[0];if(o>0){for(a+=i,t=1;te.e^this.s<0?1:-1;for(t=0,n=(r=this.d.length)<(o=e.d.length)?r:o;te.d[t]^this.s<0?1:-1;return r===o?0:r>o^this.s<0?1:-1},g.decimalPlaces=g.dp=function(){var e=this.d.length-1,t=(e-this.e)*7;if(e=this.d[e])for(;e%10==0;e/=10)t--;return t<0?0:t},g.dividedBy=g.div=function(e){return v(this,new this.constructor(e))},g.dividedToIntegerBy=g.idiv=function(e){var t=this.constructor;return T(v(this,new t(e),0,1),t.precision)},g.equals=g.eq=function(e){return!this.cmp(e)},g.exponent=function(){return S(this)},g.greaterThan=g.gt=function(e){return this.cmp(e)>0},g.greaterThanOrEqualTo=g.gte=function(e){return this.cmp(e)>=0},g.isInteger=g.isint=function(){return this.e>this.d.length-2},g.isNegative=g.isneg=function(){return this.s<0},g.isPositive=g.ispos=function(){return this.s>0},g.isZero=function(){return 0===this.s},g.lessThan=g.lt=function(e){return 0>this.cmp(e)},g.lessThanOrEqualTo=g.lte=function(e){return 1>this.cmp(e)},g.logarithm=g.log=function(e){var t,n=this.constructor,r=n.precision,o=r+5;if(void 0===e)e=new n(10);else if((e=new n(e)).s<1||e.eq(a))throw Error(l+"NaN");if(this.s<1)throw Error(l+(this.s?"NaN":"-Infinity"));return this.eq(a)?new n(0):(s=!1,t=v(O(this,o),O(e,o),o),s=!0,T(t,r))},g.minus=g.sub=function(e){return e=new this.constructor(e),this.s==e.s?C(this,e):h(this,(e.s=-e.s,e))},g.modulo=g.mod=function(e){var t,n=this.constructor,r=n.precision;if(!(e=new n(e)).s)throw Error(l+"NaN");return this.s?(s=!1,t=v(this,e,0,1).times(e),s=!0,this.minus(t)):T(new n(this),r)},g.naturalExponential=g.exp=function(){return E(this)},g.naturalLogarithm=g.ln=function(){return O(this)},g.negated=g.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e},g.plus=g.add=function(e){return e=new this.constructor(e),this.s==e.s?h(this,e):C(this,(e.s=-e.s,e))},g.precision=g.sd=function(e){var t,n,r;if(void 0!==e&&!!e!==e&&1!==e&&0!==e)throw Error(c+e);if(t=S(this)+1,n=7*(r=this.d.length-1)+1,r=this.d[r]){for(;r%10==0;r/=10)n--;for(r=this.d[0];r>=10;r/=10)n++}return e&&t>n?t:n},g.squareRoot=g.sqrt=function(){var e,t,n,r,o,a,i,c=this.constructor;if(this.s<1){if(!this.s)return new c(0);throw Error(l+"NaN")}for(e=S(this),s=!1,0==(o=Math.sqrt(+this))||o==1/0?(((t=y(this.d)).length+e)%2==0&&(t+="0"),o=Math.sqrt(t),e=d((e+1)/2)-(e<0||e%2),r=new c(t=o==1/0?"5e"+e:(t=o.toExponential()).slice(0,t.indexOf("e")+1)+e)):r=new c(o.toString()),o=i=(n=c.precision)+3;;)if(r=(a=r).plus(v(this,a,i+2)).times(.5),y(a.d).slice(0,i)===(t=y(r.d)).slice(0,i)){if(t=t.slice(i-3,i+1),o==i&&"4999"==t){if(T(a,n+1,0),a.times(a).eq(this)){r=a;break}}else if("9999"!=t)break;i+=4}return s=!0,T(r,n)},g.times=g.mul=function(e){var t,n,r,o,a,i,l,c,u,d=this.constructor,p=this.d,f=(e=new d(e)).d;if(!this.s||!e.s)return new d(0);for(e.s*=this.s,n=this.e+e.e,(c=p.length)<(u=f.length)&&(a=p,p=f,f=a,i=c,c=u,u=i),a=[],r=i=c+u;r--;)a.push(0);for(r=u;--r>=0;){for(t=0,o=c+r;o>r;)l=a[o]+f[r]*p[o-r-1]+t,a[o--]=l%1e7|0,t=l/1e7|0;a[o]=(a[o]+t)%1e7|0}for(;!a[--i];)a.pop();return t?++n:a.shift(),e.d=a,e.e=n,s?T(e,d.precision):e},g.toDecimalPlaces=g.todp=function(e,t){var n=this,r=n.constructor;return(n=new r(n),void 0===e)?n:(b(e,0,1e9),void 0===t?t=r.rounding:b(t,0,8),T(n,e+S(n)+1,t))},g.toExponential=function(e,t){var n,r=this,o=r.constructor;return void 0===e?n=k(r,!0):(b(e,0,1e9),void 0===t?t=o.rounding:b(t,0,8),n=k(r=T(new o(r),e+1,t),!0,e+1)),n},g.toFixed=function(e,t){var n,r,o=this.constructor;return void 0===e?k(this):(b(e,0,1e9),void 0===t?t=o.rounding:b(t,0,8),n=k((r=T(new o(this),e+S(this)+1,t)).abs(),!1,e+S(r)+1),this.isneg()&&!this.isZero()?"-"+n:n)},g.toInteger=g.toint=function(){var e=this.constructor;return T(new e(this),S(this)+1,e.rounding)},g.toNumber=function(){return+this},g.toPower=g.pow=function(e){var t,n,r,o,i,c,u=this,p=u.constructor,f=+(e=new p(e));if(!e.s)return new p(a);if(!(u=new p(u)).s){if(e.s<1)throw Error(l+"Infinity");return u}if(u.eq(a))return u;if(r=p.precision,e.eq(a))return T(u,r);if(c=(t=e.e)>=(n=e.d.length-1),i=u.s,c){if((n=f<0?-f:f)<=9007199254740991){for(o=new p(a),t=Math.ceil(r/7+4),s=!1;n%2&&I((o=o.times(u)).d,t),0!==(n=d(n/2));)I((u=u.times(u)).d,t);return s=!0,e.s<0?new p(a).div(o):T(o,r)}}else if(i<0)throw Error(l+"NaN");return i=i<0&&1&e.d[Math.max(t,n)]?-1:1,u.s=1,s=!1,o=e.times(O(u,r+12)),s=!0,(o=E(o)).s=i,o},g.toPrecision=function(e,t){var n,r,o=this,a=o.constructor;return void 0===e?(n=S(o),r=k(o,n<=a.toExpNeg||n>=a.toExpPos)):(b(e,1,1e9),void 0===t?t=a.rounding:b(t,0,8),n=S(o=T(new a(o),e,t)),r=k(o,e<=n||n<=a.toExpNeg,e)),r},g.toSignificantDigits=g.tosd=function(e,t){var n=this.constructor;return void 0===e?(e=n.precision,t=n.rounding):(b(e,1,1e9),void 0===t?t=n.rounding:b(t,0,8)),T(new n(this),e,t)},g.toString=g.valueOf=g.val=g.toJSON=function(){var e=S(this),t=this.constructor;return k(this,e<=t.toExpNeg||e>=t.toExpPos)};var v=function(){function e(e,t){var n,r=0,o=e.length;for(e=e.slice();o--;)n=e[o]*t+r,e[o]=n%1e7|0,r=n/1e7|0;return r&&e.unshift(r),e}function t(e,t,n,r){var o,a;if(n!=r)a=n>r?1:-1;else for(o=a=0;ot[o]?1:-1;break}return a}function n(e,t,n){for(var r=0;n--;)e[n]-=r,r=e[n]1;)e.shift()}return function(r,o,a,i){var s,c,u,d,p,f,m,g,h,b,y,v,E,w,x,O,A,C,k=r.constructor,I=r.s==o.s?1:-1,N=r.d,_=o.d;if(!r.s)return new k(r);if(!o.s)throw Error(l+"Division by zero");for(u=0,c=r.e-o.e,A=_.length,x=N.length,g=(m=new k(I)).d=[];_[u]==(N[u]||0);)++u;if(_[u]>(N[u]||0)&&--c,(v=null==a?a=k.precision:i?a+(S(r)-S(o))+1:a)<0)return new k(0);if(v=v/7+2|0,u=0,1==A)for(d=0,_=_[0],v++;(u1&&(_=e(_,d),N=e(N,d),A=_.length,x=N.length),w=A,b=(h=N.slice(0,A)).length;b=1e7/2&&++O;do d=0,(s=t(_,h,A,b))<0?(y=h[0],A!=b&&(y=1e7*y+(h[1]||0)),(d=y/O|0)>1?(d>=1e7&&(d=1e7-1),f=(p=e(_,d)).length,b=h.length,1==(s=t(p,h,f,b))&&(d--,n(p,A16)throw Error(u+S(e));if(!e.s)return new f(a);for(null==t?(s=!1,l=m):l=t,i=new f(.03125);e.abs().gte(.1);)e=e.times(i),d+=5;for(l+=Math.log(p(2,d))/Math.LN10*2+5|0,n=r=o=new f(a),f.precision=l;;){if(r=T(r.times(e),l),n=n.times(++c),y((i=o.plus(v(r,n,l))).d).slice(0,l)===y(o.d).slice(0,l)){for(;d--;)o=T(o.times(o),l);return f.precision=m,null==t?(s=!0,T(o,m)):o}o=i}}function S(e){for(var t=7*e.e,n=e.d[0];n>=10;n/=10)t++;return t}function w(e,t,n){if(t>e.LN10.sd())throw s=!0,n&&(e.precision=n),Error(l+"LN10 precision limit exceeded");return T(new e(e.LN10),t)}function x(e){for(var t="";e--;)t+="0";return t}function O(e,t){var n,r,o,i,c,u,d,p,f,m=1,g=e,h=g.d,b=g.constructor,E=b.precision;if(g.s<1)throw Error(l+(g.s?"NaN":"-Infinity"));if(g.eq(a))return new b(0);if(null==t?(s=!1,p=E):p=t,g.eq(10))return null==t&&(s=!0),w(b,p);if(p+=10,b.precision=p,r=(n=y(h)).charAt(0),!(15e14>Math.abs(i=S(g))))return d=w(b,p+2,E).times(i+""),g=O(new b(r+"."+n.slice(1)),p-10).plus(d),b.precision=E,null==t?(s=!0,T(g,E)):g;for(;r<7&&1!=r||1==r&&n.charAt(1)>3;)r=(n=y((g=g.times(e)).d)).charAt(0),m++;for(i=S(g),r>1?(g=new b("0."+n),i++):g=new b(r+"."+n.slice(1)),u=c=g=v(g.minus(a),g.plus(a),p),f=T(g.times(g),p),o=3;;){if(c=T(c.times(f),p),y((d=u.plus(v(c,new b(o),p))).d).slice(0,p)===y(u.d).slice(0,p))return u=u.times(2),0!==i&&(u=u.plus(w(b,p+2,E).times(i+""))),u=v(u,new b(m),p),b.precision=E,null==t?(s=!0,T(u,E)):u;u=d,o+=2}}function A(e,t){var n,r,o;for((n=t.indexOf("."))>-1&&(t=t.replace(".","")),(r=t.search(/e/i))>0?(n<0&&(n=r),n+=+t.slice(r+1),t=t.substring(0,r)):n<0&&(n=t.length),r=0;48===t.charCodeAt(r);)++r;for(o=t.length;48===t.charCodeAt(o-1);)--o;if(t=t.slice(r,o)){if(o-=r,n=n-r-1,e.e=d(n/7),e.d=[],r=(n+1)%7,n<0&&(r+=7),rm||e.e<-m))throw Error(u+n)}else e.s=0,e.e=0,e.d=[0];return e}function T(e,t,n){var r,o,a,i,l,c,f,g,h=e.d;for(i=1,a=h[0];a>=10;a/=10)i++;if((r=t-i)<0)r+=7,o=t,f=h[g=0];else{if((g=Math.ceil((r+1)/7))>=(a=h.length))return e;for(i=1,f=a=h[g];a>=10;a/=10)i++;r%=7,o=r-7+i}if(void 0!==n&&(l=f/(a=p(10,i-o-1))%10|0,c=t<0||void 0!==h[g+1]||f%a,c=n<4?(l||c)&&(0==n||n==(e.s<0?3:2)):l>5||5==l&&(4==n||c||6==n&&(r>0?o>0?f/p(10,i-o):0:h[g-1])%10&1||n==(e.s<0?8:7))),t<1||!h[0])return c?(a=S(e),h.length=1,t=t-a-1,h[0]=p(10,(7-t%7)%7),e.e=d(-t/7)||0):(h.length=1,h[0]=e.e=e.s=0),e;if(0==r?(h.length=g,a=1,g--):(h.length=g+1,a=p(10,7-r),h[g]=o>0?(f/p(10,i-o)%p(10,o)|0)*a:0),c)for(;;){if(0==g){1e7==(h[0]+=a)&&(h[0]=1,++e.e);break}if(h[g]+=a,1e7!=h[g])break;h[g--]=0,a=1}for(r=h.length;0===h[--r];)h.pop();if(s&&(e.e>m||e.e<-m))throw Error(u+S(e));return e}function C(e,t){var n,r,o,a,i,l,c,u,d,p,f=e.constructor,m=f.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new f(e),s?T(t,m):t;if(c=e.d,p=t.d,r=t.e,u=e.e,c=c.slice(),i=u-r){for((d=i<0)?(n=c,i=-i,l=p.length):(n=p,r=u,l=c.length),i>(o=Math.max(Math.ceil(m/7),l)+2)&&(i=o,n.length=1),n.reverse(),o=i;o--;)n.push(0);n.reverse()}else{for((d=(o=c.length)<(l=p.length))&&(l=o),o=0;o0;--o)c[l++]=0;for(o=p.length;o>i;){if(c[--o]0?a=a.charAt(0)+"."+a.slice(1)+x(r):i>1&&(a=a.charAt(0)+"."+a.slice(1)),a=a+(o<0?"e":"e+")+o):o<0?(a="0."+x(-o-1)+a,n&&(r=n-i)>0&&(a+=x(r))):o>=i?(a+=x(o+1-i),n&&(r=n-o-1)>0&&(a=a+"."+x(r))):((r=o+1)0&&(o+1===i&&(a+="."),a+=x(r))),e.s<0?"-"+a:a}function I(e,t){if(e.length>t)return e.length=t,!0}function N(e){if(!e||"object"!=typeof e)throw Error(l+"Object expected");var t,n,r,o=["precision",1,1e9,"rounding",0,8,"toExpNeg",-1/0,0,"toExpPos",0,1/0];for(t=0;t=o[t+1]&&r<=o[t+2])this[n]=r;else throw Error(c+n+": "+r)}if(void 0!==(r=e[n="LN10"])){if(r==Math.LN10)this[n]=new this(r);else throw Error(c+n+": "+r)}return this}(i=function e(t){var n,r,o;function a(e){if(!(this instanceof a))return new a(e);if(this.constructor=a,e instanceof a){this.s=e.s,this.e=e.e,this.d=(e=e.d)?e.slice():e;return}if("number"==typeof e){if(0*e!=0)throw Error(c+e);if(e>0)this.s=1;else if(e<0)e=-e,this.s=-1;else{this.s=0,this.e=0,this.d=[0];return}if(e===~~e&&e<1e7){this.e=0,this.d=[e];return}return A(this,e.toString())}if("string"!=typeof e)throw Error(c+e);if(45===e.charCodeAt(0)?(e=e.slice(1),this.s=-1):this.s=1,f.test(e))A(this,e);else throw Error(c+e)}if(a.prototype=g,a.ROUND_UP=0,a.ROUND_DOWN=1,a.ROUND_CEIL=2,a.ROUND_FLOOR=3,a.ROUND_HALF_UP=4,a.ROUND_HALF_DOWN=5,a.ROUND_HALF_EVEN=6,a.ROUND_HALF_CEIL=7,a.ROUND_HALF_FLOOR=8,a.clone=e,a.config=a.set=N,void 0===t&&(t={}),t)for(n=0,o=["precision","rounding","toExpNeg","toExpPos","LN10"];n4&&m.slice(0,4)===i&&s.test(t)&&("-"===t.charAt(4)?g=i+(n=t.slice(5).replace(l,d)).charAt(0).toUpperCase()+n.slice(1):(f=(p=t).slice(4),t=l.test(f)?p:("-"!==(f=f.replace(c,u)).charAt(0)&&(f="-"+f),i+f)),h=o),new h(g,t))};var s=/^data[-\w.:]+$/i,l=/-[a-z]/g,c=/[A-Z]/g;function u(e){return"-"+e.toLowerCase()}function d(e){return e.charAt(1).toUpperCase()}},31872:function(e,t,n){var r=n(96130),o=n(64730),a=n(61861),i=n(46982),s=n(83671),l=n(53618);e.exports=r([a,o,i,s,l])},83671:function(e,t,n){var r=n(7667),o=n(13585),a=r.booleanish,i=r.number,s=r.spaceSeparated;e.exports=o({transform:function(e,t){return"role"===t?t:"aria-"+t.slice(4).toLowerCase()},properties:{ariaActiveDescendant:null,ariaAtomic:a,ariaAutoComplete:null,ariaBusy:a,ariaChecked:a,ariaColCount:i,ariaColIndex:i,ariaColSpan:i,ariaControls:s,ariaCurrent:null,ariaDescribedBy:s,ariaDetails:null,ariaDisabled:a,ariaDropEffect:s,ariaErrorMessage:null,ariaExpanded:a,ariaFlowTo:s,ariaGrabbed:a,ariaHasPopup:null,ariaHidden:a,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:s,ariaLevel:i,ariaLive:null,ariaModal:a,ariaMultiLine:a,ariaMultiSelectable:a,ariaOrientation:null,ariaOwns:s,ariaPlaceholder:null,ariaPosInSet:i,ariaPressed:a,ariaReadOnly:a,ariaRelevant:null,ariaRequired:a,ariaRoleDescription:s,ariaRowCount:i,ariaRowIndex:i,ariaRowSpan:i,ariaSelected:a,ariaSetSize:i,ariaSort:null,ariaValueMax:i,ariaValueMin:i,ariaValueNow:i,ariaValueText:null,role:null}})},53618:function(e,t,n){var r=n(7667),o=n(13585),a=n(46640),i=r.boolean,s=r.overloadedBoolean,l=r.booleanish,c=r.number,u=r.spaceSeparated,d=r.commaSeparated;e.exports=o({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:a,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:d,acceptCharset:u,accessKey:u,action:null,allow:null,allowFullScreen:i,allowPaymentRequest:i,allowUserMedia:i,alt:null,as:null,async:i,autoCapitalize:null,autoComplete:u,autoFocus:i,autoPlay:i,capture:i,charSet:null,checked:i,cite:null,className:u,cols:c,colSpan:null,content:null,contentEditable:l,controls:i,controlsList:u,coords:c|d,crossOrigin:null,data:null,dateTime:null,decoding:null,default:i,defer:i,dir:null,dirName:null,disabled:i,download:s,draggable:l,encType:null,enterKeyHint:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:i,formTarget:null,headers:u,height:c,hidden:i,high:c,href:null,hrefLang:null,htmlFor:u,httpEquiv:u,id:null,imageSizes:null,imageSrcSet:d,inputMode:null,integrity:null,is:null,isMap:i,itemId:null,itemProp:u,itemRef:u,itemScope:i,itemType:u,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:i,low:c,manifest:null,max:null,maxLength:c,media:null,method:null,min:null,minLength:c,multiple:i,muted:i,name:null,nonce:null,noModule:i,noValidate:i,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforePrint:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextMenu:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:i,optimum:c,pattern:null,ping:u,placeholder:null,playsInline:i,poster:null,preload:null,readOnly:i,referrerPolicy:null,rel:u,required:i,reversed:i,rows:c,rowSpan:c,sandbox:u,scope:null,scoped:i,seamless:i,selected:i,shape:null,size:c,sizes:null,slot:null,span:c,spellCheck:l,src:null,srcDoc:null,srcLang:null,srcSet:d,start:c,step:null,style:null,tabIndex:c,target:null,title:null,translate:null,type:null,typeMustMatch:i,useMap:null,value:l,width:c,wrap:null,align:null,aLink:null,archive:u,axis:null,background:null,bgColor:null,border:c,borderColor:null,bottomMargin:c,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:i,declare:i,event:null,face:null,frame:null,frameBorder:null,hSpace:c,leftMargin:c,link:null,longDesc:null,lowSrc:null,marginHeight:c,marginWidth:c,noResize:i,noHref:i,noShade:i,noWrap:i,object:null,profile:null,prompt:null,rev:null,rightMargin:c,rules:null,scheme:null,scrolling:l,standby:null,summary:null,text:null,topMargin:c,valueType:null,version:null,vAlign:null,vLink:null,vSpace:c,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:i,disableRemotePlayback:i,prefix:null,property:null,results:c,security:null,unselectable:null}})},46640:function(e,t,n){var r=n(25852);e.exports=function(e,t){return r(e,t.toLowerCase())}},25852:function(e){e.exports=function(e,t){return t in e?e[t]:t}},13585:function(e,t,n){var r=n(39900),o=n(94949),a=n(7478);e.exports=function(e){var t,n,i=e.space,s=e.mustUseProperty||[],l=e.attributes||{},c=e.properties,u=e.transform,d={},p={};for(t in c)n=new a(t,u(l,t),c[t],i),-1!==s.indexOf(t)&&(n.mustUseProperty=!0),d[t]=n,p[r(t)]=t,p[r(n.attribute)]=t;return new o(d,p,i)}},7478:function(e,t,n){var r=n(74108),o=n(7667);e.exports=s,s.prototype=new r,s.prototype.defined=!0;var a=["boolean","booleanish","overloadedBoolean","number","commaSeparated","spaceSeparated","commaOrSpaceSeparated"],i=a.length;function s(e,t,n,s){var l,c,u,d=-1;for(s&&(this.space=s),r.call(this,e,t);++d-1}},64797:function(e){e.exports=function(e,t,n){for(var r=-1,o=null==e?0:e.length;++r0&&a(u)?n>1?e(u,n-1,a,i,s):r(s,u):i||(s[s.length]=u)}return s}},94410:function(e,t,n){var r=n(320)();e.exports=r},77458:function(e,t,n){var r=n(94410),o=n(39406);e.exports=function(e,t){return e&&r(e,t,o)}},38824:function(e,t,n){var r=n(53066),o=n(217);e.exports=function(e,t){t=r(t,e);for(var n=0,a=t.length;null!=e&&nt}},69959:function(e){e.exports=function(e,t){return null!=e&&t in Object(e)}},77095:function(e,t,n){var r=n(47495),o=n(77562),a=n(48150);e.exports=function(e,t,n){return t==t?a(e,t,n):r(e,o,n)}},63686:function(e,t,n){var r=n(7976),o=n(19340);e.exports=function(e){return o(e)&&"[object Arguments]"==r(e)}},29759:function(e,t,n){var r=n(28685),o=n(19340);e.exports=function e(t,n,a,i,s){return t===n||(null!=t&&null!=n&&(o(t)||o(n))?r(t,n,a,i,e,s):t!=t&&n!=n)}},28685:function(e,t,n){var r=n(4380),o=n(63859),a=n(41020),i=n(10701),s=n(96770),l=n(95059),c=n(64843),u=n(30484),d="[object Arguments]",p="[object Array]",f="[object Object]",m=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,g,h,b){var y=l(e),v=l(t),E=y?p:s(e),S=v?p:s(t);E=E==d?f:E,S=S==d?f:S;var w=E==f,x=S==f,O=E==S;if(O&&c(e)){if(!c(t))return!1;y=!0,w=!1}if(O&&!w)return b||(b=new r),y||u(e)?o(e,t,n,g,h,b):a(e,t,E,n,g,h,b);if(!(1&n)){var A=w&&m.call(e,"__wrapped__"),T=x&&m.call(t,"__wrapped__");if(A||T){var C=A?e.value():e,k=T?t.value():t;return b||(b=new r),h(C,k,n,g,b)}}return!!O&&(b||(b=new r),i(e,t,n,g,h,b))}},59165:function(e,t,n){var r=n(4380),o=n(29759);e.exports=function(e,t,n,a){var i=n.length,s=i,l=!a;if(null==e)return!s;for(e=Object(e);i--;){var c=n[i];if(l&&c[2]?c[1]!==e[c[0]]:!(c[0]in e))return!1}for(;++io?0:o+t),(n=n>o?o:n)<0&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var a=Array(o);++r=200){var g=t?null:s(e);if(g)return l(g);p=!1,u=i,m=new r}else m=t?[]:f;t:for(;++c=o?e:r(e,t,n)}},9058:function(e,t,n){var r=n(62704);e.exports=function(e,t){if(e!==t){var n=void 0!==e,o=null===e,a=e==e,i=r(e),s=void 0!==t,l=null===t,c=t==t,u=r(t);if(!l&&!u&&!i&&e>t||i&&s&&c&&!l&&!u||o&&s&&c||!n&&c||!a)return 1;if(!o&&!i&&!u&&e=l)return c;return c*("desc"==n[o]?-1:1)}}return e.index-t.index}},35852:function(e,t,n){var r=n(67741)["__core-js_shared__"];e.exports=r},91502:function(e,t,n){var r=n(10187);e.exports=function(e,t){return function(n,o){if(null==n)return n;if(!r(n))return e(n,o);for(var a=n.length,i=t?a:-1,s=Object(n);(t?i--:++i-1?s[l?t[c]:c]:void 0}}},16519:function(e,t,n){var r=n(67535),o=n(45021),a=n(55038);e.exports=function(e){return function(t,n,i){return i&&"number"!=typeof i&&o(t,n,i)&&(n=i=void 0),t=a(t),void 0===n?(n=t,t=0):n=a(n),i=void 0===i?tu))return!1;var p=l.get(e),f=l.get(t);if(p&&f)return p==t&&f==e;var m=-1,g=!0,h=2&n?new r:void 0;for(l.set(e,t),l.set(t,e);++m-1&&e%1==0&&e-1}},42572:function(e,t,n){var r=n(89329);e.exports=function(e,t){var n=this.__data__,o=r(n,e);return o<0?(++this.size,n.push([e,t])):n[o][1]=t,this}},26528:function(e,t,n){var r=n(68193),o=n(5835),a=n(58246);e.exports=function(){this.size=0,this.__data__={hash:new r,map:new(a||o),string:new r}}},90972:function(e,t,n){var r=n(72080);e.exports=function(e){var t=r(this,e).delete(e);return this.size-=t?1:0,t}},55981:function(e,t,n){var r=n(72080);e.exports=function(e){return r(this,e).get(e)}},76656:function(e,t,n){var r=n(72080);e.exports=function(e){return r(this,e).has(e)}},45541:function(e,t,n){var r=n(72080);e.exports=function(e,t){var n=r(this,e),o=n.size;return n.set(e,t),this.size+=n.size==o?0:1,this}},38737:function(e){e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}},69794:function(e){e.exports=function(e,t){return function(n){return null!=n&&n[e]===t&&(void 0!==t||e in Object(n))}}},53092:function(e,t,n){var r=n(49512);e.exports=function(e){var t=r(e,function(e){return 500===n.size&&n.clear(),e}),n=t.cache;return t}},83463:function(e,t,n){var r=n(93245)(Object,"create");e.exports=r},51678:function(e,t,n){var r=n(93332)(Object.keys,Object);e.exports=r},16474:function(e,t,n){e=n.nmd(e);var r=n(58584),o=t&&!t.nodeType&&t,a=o&&e&&!e.nodeType&&e,i=a&&a.exports===o&&r.process,s=function(){try{var e=a&&a.require&&a.require("util").types;if(e)return e;return i&&i.binding&&i.binding("util")}catch(e){}}();e.exports=s},8611:function(e){var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},93332:function(e){e.exports=function(e,t){return function(n){return e(t(n))}}},7157:function(e,t,n){var r=n(24821),o=Math.max;e.exports=function(e,t,n){return t=o(void 0===t?e.length-1:t,0),function(){for(var a=arguments,i=-1,s=o(a.length-t,0),l=Array(s);++i0){if(++n>=800)return arguments[0]}else n=0;return e.apply(void 0,arguments)}}},4800:function(e,t,n){var r=n(5835);e.exports=function(){this.__data__=new r,this.size=0}},73987:function(e){e.exports=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}},59728:function(e){e.exports=function(e){return this.__data__.get(e)}},4146:function(e){e.exports=function(e){return this.__data__.has(e)}},81333:function(e,t,n){var r=n(5835),o=n(58246),a=n(93785);e.exports=function(e,t){var n=this.__data__;if(n instanceof r){var i=n.__data__;if(!o||i.length<199)return i.push([e,t]),this.size=++n.size,this;n=this.__data__=new a(i)}return n.set(e,t),this.size=n.size,this}},48150:function(e){e.exports=function(e,t,n){for(var r=n-1,o=e.length;++r=t||n<0||h&&r>=u}function E(){var e,n,r,a=o();if(v(a))return S(a);p=setTimeout(E,(e=a-f,n=a-m,r=t-e,h?s(r,u-n):r))}function S(e){return(p=void 0,b&&l)?y(e):(l=c=void 0,d)}function w(){var e,n=o(),r=v(n);if(l=arguments,c=this,f=n,r){if(void 0===p)return m=e=f,p=setTimeout(E,t),g?y(e):d;if(h)return clearTimeout(p),p=setTimeout(E,t),y(f)}return void 0===p&&(p=setTimeout(E,t)),d}return t=a(t)||0,r(n)&&(g=!!n.leading,u=(h="maxWait"in n)?i(a(n.maxWait)||0,t):u,b="trailing"in n?!!n.trailing:b),w.cancel=function(){void 0!==p&&clearTimeout(p),m=0,l=f=c=p=void 0},w.flush=function(){return void 0===p?d:S(o())},w}},61595:function(e){e.exports=function(e,t){return e===t||e!=e&&t!=t}},72986:function(e,t,n){var r=n(31917),o=n(31062),a=n(49452),i=n(95059),s=n(45021);e.exports=function(e,t,n){var l=i(e)?r:o;return n&&s(e,t,n)&&(t=void 0),l(e,a(t,3))}},209:function(e,t,n){var r=n(70493)(n(87539));e.exports=r},87539:function(e,t,n){var r=n(47495),o=n(49452),a=n(26018),i=Math.max;e.exports=function(e,t,n){var s=null==e?0:e.length;if(!s)return -1;var l=null==n?0:a(n);return l<0&&(l=i(s+l,0)),r(e,o(t,3),l)}},20734:function(e,t,n){var r=n(9677),o=n(30677);e.exports=function(e,t){return r(o(e,t),1)}},44750:function(e,t,n){var r=n(38824);e.exports=function(e,t,n){var o=null==e?void 0:r(e,t);return void 0===o?n:o}},19955:function(e,t,n){var r=n(69959),o=n(24986);e.exports=function(e,t){return null!=e&&o(e,t,r)}},39100:function(e){e.exports=function(e){return e}},99782:function(e,t,n){var r=n(63686),o=n(19340),a=Object.prototype,i=a.hasOwnProperty,s=a.propertyIsEnumerable,l=r(function(){return arguments}())?r:function(e){return o(e)&&i.call(e,"callee")&&!s.call(e,"callee")};e.exports=l},95059:function(e){var t=Array.isArray;e.exports=t},10187:function(e,t,n){var r=n(80509),o=n(54512);e.exports=function(e){return null!=e&&o(e.length)&&!r(e)}},90849:function(e,t,n){var r=n(7976),o=n(19340);e.exports=function(e){return!0===e||!1===e||o(e)&&"[object Boolean]"==r(e)}},64843:function(e,t,n){e=n.nmd(e);var r=n(67741),o=n(33879),a=t&&!t.nodeType&&t,i=a&&e&&!e.nodeType&&e,s=i&&i.exports===a?r.Buffer:void 0,l=s?s.isBuffer:void 0;e.exports=l||o},93574:function(e,t,n){var r=n(29759);e.exports=function(e,t){return r(e,t)}},80509:function(e,t,n){var r=n(7976),o=n(70816);e.exports=function(e){if(!o(e))return!1;var t=r(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},54512:function(e){e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},96240:function(e,t,n){var r=n(39018);e.exports=function(e){return r(e)&&e!=+e}},71292:function(e){e.exports=function(e){return null==e}},39018:function(e,t,n){var r=n(7976),o=n(19340);e.exports=function(e){return"number"==typeof e||o(e)&&"[object Number]"==r(e)}},70816:function(e){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},19340:function(e){e.exports=function(e){return null!=e&&"object"==typeof e}},23393:function(e,t,n){var r=n(7976),o=n(28766),a=n(19340),i=Object.prototype,s=Function.prototype.toString,l=i.hasOwnProperty,c=s.call(Object);e.exports=function(e){if(!a(e)||"[object Object]"!=r(e))return!1;var t=o(e);if(null===t)return!0;var n=l.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&s.call(n)==c}},96907:function(e,t,n){var r=n(7976),o=n(95059),a=n(19340);e.exports=function(e){return"string"==typeof e||!o(e)&&a(e)&&"[object String]"==r(e)}},62704:function(e,t,n){var r=n(7976),o=n(19340);e.exports=function(e){return"symbol"==typeof e||o(e)&&"[object Symbol]"==r(e)}},30484:function(e,t,n){var r=n(80043),o=n(43863),a=n(16474),i=a&&a.isTypedArray,s=i?o(i):r;e.exports=s},39406:function(e,t,n){var r=n(26546),o=n(92916),a=n(10187);e.exports=function(e){return a(e)?r(e):o(e)}},36887:function(e){e.exports=function(e){var t=null==e?0:e.length;return t?e[t-1]:void 0}},30677:function(e,t,n){var r=n(83690),o=n(49452),a=n(28245),i=n(95059);e.exports=function(e,t){return(i(e)?r:a)(e,o(t,3))}},50924:function(e,t,n){var r=n(30804),o=n(77458),a=n(49452);e.exports=function(e,t){var n={};return t=a(t,3),o(e,function(e,o,a){r(n,o,t(e,o,a))}),n}},5037:function(e,t,n){var r=n(41764),o=n(92262),a=n(39100);e.exports=function(e){return e&&e.length?r(e,a,o):void 0}},49512:function(e,t,n){var r=n(93785);function o(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw TypeError("Expected a function");var n=function(){var r=arguments,o=t?t.apply(this,r):r[0],a=n.cache;if(a.has(o))return a.get(o);var i=e.apply(this,r);return n.cache=a.set(o,i)||a,i};return n.cache=new(o.Cache||r),n}o.Cache=r,e.exports=o},30264:function(e,t,n){var r=n(41764),o=n(87004),a=n(39100);e.exports=function(e){return e&&e.length?r(e,a,o):void 0}},67222:function(e){e.exports=function(){}},80128:function(e,t,n){var r=n(67741);e.exports=function(){return r.Date.now()}},62973:function(e,t,n){var r=n(60411),o=n(34831),a=n(55632),i=n(217);e.exports=function(e){return a(e)?r(i(e)):o(e)}},1646:function(e,t,n){var r=n(16519)();e.exports=r},13435:function(e,t,n){var r=n(30927),o=n(49452),a=n(61700),i=n(95059),s=n(45021);e.exports=function(e,t,n){var l=i(e)?r:a;return n&&s(e,t,n)&&(t=void 0),l(e,o(t,3))}},97572:function(e,t,n){var r=n(9677),o=n(56871),a=n(70712),i=n(45021),s=a(function(e,t){if(null==e)return[];var n=t.length;return n>1&&i(e,t[0],t[1])?t=[]:n>2&&i(t[0],t[1],t[2])&&(t=[t[0]]),o(e,r(t,1),[])});e.exports=s},30786:function(e){e.exports=function(){return[]}},33879:function(e){e.exports=function(){return!1}},68417:function(e,t,n){var r=n(54525),o=n(70816);e.exports=function(e,t,n){var a=!0,i=!0;if("function"!=typeof e)throw TypeError("Expected a function");return o(n)&&(a="leading"in n?!!n.leading:a,i="trailing"in n?!!n.trailing:i),r(e,t,{leading:a,maxWait:t,trailing:i})}},55038:function(e,t,n){var r=n(89753),o=1/0;e.exports=function(e){return e?(e=r(e))===o||e===-o?(e<0?-1:1)*17976931348623157e292:e==e?e:0:0===e?e:0}},26018:function(e,t,n){var r=n(55038);e.exports=function(e){var t=r(e),n=t%1;return t==t?n?t-n:t:0}},89753:function(e,t,n){var r=n(33223),o=n(70816),a=n(62704),i=0/0,s=/^[-+]0x[0-9a-f]+$/i,l=/^0b[01]+$/i,c=/^0o[0-7]+$/i,u=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(a(e))return i;if(o(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=o(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=r(e);var n=l.test(e);return n||c.test(e)?u(e.slice(2),n?2:8):s.test(e)?i:+e}},25635:function(e,t,n){var r=n(2218);e.exports=function(e){return null==e?"":r(e)}},98116:function(e,t,n){var r=n(49452),o=n(15375);e.exports=function(e,t){return e&&e.length?o(e,r(t,2)):[]}},9332:function(e,t,n){var r=n(6551)("toUpperCase");e.exports=r},8792:function(e,t,n){n.d(t,{default:function(){return o.a}});var r=n(25250),o=n.n(r)},47907:function(e,t,n){var r=n(15313);n.o(r,"useRouter")&&n.d(t,{useRouter:function(){return r.useRouter}}),n.o(r,"useSearchParams")&&n.d(t,{useSearchParams:function(){return r.useSearchParams}})},49079:function(e,t,n){var r,o;e.exports=(null==(r=n.g.process)?void 0:r.env)&&"object"==typeof(null==(o=n.g.process)?void 0:o.env)?n.g.process:n(13127)},12956:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"addLocale",{enumerable:!0,get:function(){return r}}),n(82139);let r=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r{})}}function v(e){return"string"==typeof e?e:(0,l.formatUrl)(e)}let E=a.default.forwardRef(function(e,t){let n,r;let{href:l,as:b,children:E,prefetch:S=null,passHref:w,replace:x,shallow:O,scroll:A,locale:T,onClick:C,onMouseEnter:k,onTouchStart:I,legacyBehavior:N=!1,..._}=e;n=E,N&&("string"==typeof n||"number"==typeof n)&&(n=(0,o.jsx)("a",{children:n}));let R=a.default.useContext(d.RouterContext),P=a.default.useContext(p.AppRouterContext),M=null!=R?R:P,L=!R,D=!1!==S,j=null===S?h.PrefetchKind.AUTO:h.PrefetchKind.FULL,{href:F,as:B}=a.default.useMemo(()=>{if(!R){let e=v(l);return{href:e,as:b?v(b):e}}let[e,t]=(0,i.resolveHref)(R,l,!0);return{href:e,as:b?(0,i.resolveHref)(R,b):t||e}},[R,l,b]),U=a.default.useRef(F),Z=a.default.useRef(B);N&&(r=a.default.Children.only(n));let z=N?r&&"object"==typeof r&&r.ref:t,[H,G,$]=(0,f.useIntersection)({rootMargin:"200px"}),W=a.default.useCallback(e=>{(Z.current!==B||U.current!==F)&&($(),Z.current=B,U.current=F),H(e),z&&("function"==typeof z?z(e):"object"==typeof z&&(z.current=e))},[B,z,F,$,H]);a.default.useEffect(()=>{M&&G&&D&&y(M,F,B,{locale:T},{kind:j},L)},[B,F,G,T,D,null==R?void 0:R.locale,M,L,j]);let V={ref:W,onClick(e){N||"function"!=typeof C||C(e),N&&r.props&&"function"==typeof r.props.onClick&&r.props.onClick(e),M&&!e.defaultPrevented&&function(e,t,n,r,o,i,l,c,u){let{nodeName:d}=e.currentTarget;if("A"===d.toUpperCase()&&(function(e){let t=e.currentTarget.getAttribute("target");return t&&"_self"!==t||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey||e.nativeEvent&&2===e.nativeEvent.which}(e)||!u&&!(0,s.isLocalURL)(n)))return;e.preventDefault();let p=()=>{let e=null==l||l;"beforePopState"in t?t[o?"replace":"push"](n,r,{shallow:i,locale:c,scroll:e}):t[o?"replace":"push"](r||n,{scroll:e})};u?a.default.startTransition(p):p()}(e,M,F,B,x,O,A,T,L)},onMouseEnter(e){N||"function"!=typeof k||k(e),N&&r.props&&"function"==typeof r.props.onMouseEnter&&r.props.onMouseEnter(e),M&&(D||!L)&&y(M,F,B,{locale:T,priority:!0,bypassPrefetchedCheck:!0},{kind:j},L)},onTouchStart(e){N||"function"!=typeof I||I(e),N&&r.props&&"function"==typeof r.props.onTouchStart&&r.props.onTouchStart(e),M&&(D||!L)&&y(M,F,B,{locale:T,priority:!0,bypassPrefetchedCheck:!0},{kind:j},L)}};if((0,c.isAbsoluteUrl)(B))V.href=B;else if(!N||w||"a"===r.type&&!("href"in r.props)){let e=void 0!==T?T:null==R?void 0:R.locale,t=(null==R?void 0:R.isLocaleDomain)&&(0,m.getDomainLocale)(B,e,null==R?void 0:R.locales,null==R?void 0:R.domainLocales);V.href=t||(0,g.addBasePath)((0,u.addLocale)(B,e,null==R?void 0:R.defaultLocale))}return N?a.default.cloneElement(r,V):(0,o.jsx)("a",{..._,...V,children:n})});("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},52185:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{requestIdleCallback:function(){return n},cancelIdleCallback:function(){return r}});let n="undefined"!=typeof self&&self.requestIdleCallback&&self.requestIdleCallback.bind(window)||function(e){let t=Date.now();return self.setTimeout(function(){e({didTimeout:!1,timeRemaining:function(){return Math.max(0,50-(Date.now()-t))}})},1)},r="undefined"!=typeof self&&self.cancelIdleCallback&&self.cancelIdleCallback.bind(window)||function(e){return clearTimeout(e)};("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},14542:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"resolveHref",{enumerable:!0,get:function(){return d}});let r=n(95770),o=n(11030),a=n(24544),i=n(36874),s=n(82139),l=n(17434),c=n(22360),u=n(96735);function d(e,t,n){let d;let p="string"==typeof t?t:(0,o.formatWithValidation)(t),f=p.match(/^[a-zA-Z]{1,}:\/\//),m=f?p.slice(f[0].length):p;if((m.split("?",1)[0]||"").match(/(\/\/|\\)/)){console.error("Invalid href '"+p+"' passed to next/router in page: '"+e.pathname+"'. Repeated forward-slashes (//) or backslashes \\ are not valid in the href.");let t=(0,i.normalizeRepeatedSlashes)(m);p=(f?f[0]:"")+t}if(!(0,l.isLocalURL)(p))return n?[p]:p;try{d=new URL(p.startsWith("#")?e.asPath:e.pathname,"http://n")}catch(e){d=new URL("/","http://n")}try{let e=new URL(p,d);e.pathname=(0,s.normalizePathTrailingSlash)(e.pathname);let t="";if((0,c.isDynamicRoute)(e.pathname)&&e.searchParams&&n){let n=(0,r.searchParamsToUrlQuery)(e.searchParams),{result:i,params:s}=(0,u.interpolateAs)(e.pathname,e.pathname,n);i&&(t=(0,o.formatWithValidation)({pathname:i,hash:e.hash,query:(0,a.omit)(n,s)}))}let i=e.origin===d.origin?e.href.slice(e.origin.length):e.href;return n?[i,t||i]:i}catch(e){return n?[p]:p}}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},45291:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"useIntersection",{enumerable:!0,get:function(){return l}});let r=n(64090),o=n(52185),a="function"==typeof IntersectionObserver,i=new Map,s=[];function l(e){let{rootRef:t,rootMargin:n,disabled:l}=e,c=l||!a,[u,d]=(0,r.useState)(!1),p=(0,r.useRef)(null),f=(0,r.useCallback)(e=>{p.current=e},[]);return(0,r.useEffect)(()=>{if(a){if(c||u)return;let e=p.current;if(e&&e.tagName)return function(e,t,n){let{id:r,observer:o,elements:a}=function(e){let t;let n={root:e.root||null,margin:e.rootMargin||""},r=s.find(e=>e.root===n.root&&e.margin===n.margin);if(r&&(t=i.get(r)))return t;let o=new Map;return t={id:n,observer:new IntersectionObserver(e=>{e.forEach(e=>{let t=o.get(e.target),n=e.isIntersecting||e.intersectionRatio>0;t&&n&&t(n)})},e),elements:o},s.push(n),i.set(n,t),t}(n);return a.set(e,t),o.observe(e),function(){if(a.delete(e),o.unobserve(e),0===a.size){o.disconnect(),i.delete(r);let e=s.findIndex(e=>e.root===r.root&&e.margin===r.margin);e>-1&&s.splice(e,1)}}}(e,e=>e&&d(e),{root:null==t?void 0:t.current,rootMargin:n})}else if(!u){let e=(0,o.requestIdleCallback)(()=>d(!0));return()=>(0,o.cancelIdleCallback)(e)}},[c,n,t,u,p.current]),[f,u,(0,r.useCallback)(()=>{d(!1)},[])]}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},8620:function(e){!function(){var t={675:function(e,t){t.byteLength=function(e){var t=l(e),n=t[0],r=t[1];return(n+r)*3/4-r},t.toByteArray=function(e){var t,n,a=l(e),i=a[0],s=a[1],c=new o((i+s)*3/4-s),u=0,d=s>0?i-4:i;for(n=0;n>16&255,c[u++]=t>>8&255,c[u++]=255&t;return 2===s&&(t=r[e.charCodeAt(n)]<<2|r[e.charCodeAt(n+1)]>>4,c[u++]=255&t),1===s&&(t=r[e.charCodeAt(n)]<<10|r[e.charCodeAt(n+1)]<<4|r[e.charCodeAt(n+2)]>>2,c[u++]=t>>8&255,c[u++]=255&t),c},t.fromByteArray=function(e){for(var t,r=e.length,o=r%3,a=[],i=0,s=r-o;i>18&63]+n[o>>12&63]+n[o>>6&63]+n[63&o]);return a.join("")}(e,i,i+16383>s?s:i+16383));return 1===o?a.push(n[(t=e[r-1])>>2]+n[t<<4&63]+"=="):2===o&&a.push(n[(t=(e[r-2]<<8)+e[r-1])>>10]+n[t>>4&63]+n[t<<2&63]+"="),a.join("")};for(var n=[],r=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",i=0,s=a.length;i0)throw Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");-1===n&&(n=t);var r=n===t?0:4-n%4;return[n,r]}r["-".charCodeAt(0)]=62,r["_".charCodeAt(0)]=63},72:function(e,t,n){/*! - * The buffer module from node.js, for the browser. - * - * @author Feross Aboukhadijeh - * @license MIT - */var r=n(675),o=n(783),a="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;function i(e){if(e>2147483647)throw RangeError('The value "'+e+'" is invalid for option "size"');var t=new Uint8Array(e);return Object.setPrototypeOf(t,s.prototype),t}function s(e,t,n){if("number"==typeof e){if("string"==typeof t)throw TypeError('The "string" argument must be of type string. Received type number');return u(e)}return l(e,t,n)}function l(e,t,n){if("string"==typeof e)return function(e,t){if(("string"!=typeof t||""===t)&&(t="utf8"),!s.isEncoding(t))throw TypeError("Unknown encoding: "+t);var n=0|f(e,t),r=i(n),o=r.write(e,t);return o!==n&&(r=r.slice(0,o)),r}(e,t);if(ArrayBuffer.isView(e))return d(e);if(null==e)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(I(e,ArrayBuffer)||e&&I(e.buffer,ArrayBuffer)||"undefined"!=typeof SharedArrayBuffer&&(I(e,SharedArrayBuffer)||e&&I(e.buffer,SharedArrayBuffer)))return function(e,t,n){var r;if(t<0||e.byteLength=2147483647)throw RangeError("Attempt to allocate Buffer larger than maximum size: 0x7fffffff bytes");return 0|e}function f(e,t){if(s.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||I(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);var n=e.length,r=arguments.length>2&&!0===arguments[2];if(!r&&0===n)return 0;for(var o=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return A(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return C(e).length;default:if(o)return r?-1:A(e).length;t=(""+t).toLowerCase(),o=!0}}function m(e,t,n){var o,a,i=!1;if((void 0===t||t<0)&&(t=0),t>this.length||((void 0===n||n>this.length)&&(n=this.length),n<=0||(n>>>=0)<=(t>>>=0)))return"";for(e||(e="utf8");;)switch(e){case"hex":return function(e,t,n){var r=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>r)&&(n=r);for(var o="",a=t;a2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),(a=n=+n)!=a&&(n=o?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(o)return -1;n=e.length-1}else if(n<0){if(!o)return -1;n=0}if("string"==typeof t&&(t=s.from(t,r)),s.isBuffer(t))return 0===t.length?-1:b(e,t,n,r,o);if("number"==typeof t)return(t&=255,"function"==typeof Uint8Array.prototype.indexOf)?o?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):b(e,[t],n,r,o);throw TypeError("val must be string, number or Buffer")}function b(e,t,n,r,o){var a,i=1,s=e.length,l=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return -1;i=2,s/=2,l/=2,n/=2}function c(e,t){return 1===i?e[t]:e.readUInt16BE(t*i)}if(o){var u=-1;for(a=n;as&&(n=s-l),a=n;a>=0;a--){for(var d=!0,p=0;p239?4:c>223?3:c>191?2:1;if(o+d<=n)switch(d){case 1:c<128&&(u=c);break;case 2:(192&(a=e[o+1]))==128&&(l=(31&c)<<6|63&a)>127&&(u=l);break;case 3:a=e[o+1],i=e[o+2],(192&a)==128&&(192&i)==128&&(l=(15&c)<<12|(63&a)<<6|63&i)>2047&&(l<55296||l>57343)&&(u=l);break;case 4:a=e[o+1],i=e[o+2],s=e[o+3],(192&a)==128&&(192&i)==128&&(192&s)==128&&(l=(15&c)<<18|(63&a)<<12|(63&i)<<6|63&s)>65535&&l<1114112&&(u=l)}null===u?(u=65533,d=1):u>65535&&(u-=65536,r.push(u>>>10&1023|55296),u=56320|1023&u),r.push(u),o+=d}return function(e){var t=e.length;if(t<=4096)return String.fromCharCode.apply(String,e);for(var n="",r=0;rn)throw RangeError("Trying to access beyond buffer length")}function E(e,t,n,r,o,a){if(!s.isBuffer(e))throw TypeError('"buffer" argument must be a Buffer instance');if(t>o||te.length)throw RangeError("Index out of range")}function S(e,t,n,r,o,a){if(n+r>e.length||n<0)throw RangeError("Index out of range")}function w(e,t,n,r,a){return t=+t,n>>>=0,a||S(e,t,n,4,34028234663852886e22,-34028234663852886e22),o.write(e,t,n,r,23,4),n+4}function x(e,t,n,r,a){return t=+t,n>>>=0,a||S(e,t,n,8,17976931348623157e292,-17976931348623157e292),o.write(e,t,n,r,52,8),n+8}t.Buffer=s,t.SlowBuffer=function(e){return+e!=e&&(e=0),s.alloc(+e)},t.INSPECT_MAX_BYTES=50,t.kMaxLength=2147483647,s.TYPED_ARRAY_SUPPORT=function(){try{var e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}(),s.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(s.prototype,"parent",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.buffer}}),Object.defineProperty(s.prototype,"offset",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.byteOffset}}),s.poolSize=8192,s.from=function(e,t,n){return l(e,t,n)},Object.setPrototypeOf(s.prototype,Uint8Array.prototype),Object.setPrototypeOf(s,Uint8Array),s.alloc=function(e,t,n){return(c(e),e<=0)?i(e):void 0!==t?"string"==typeof n?i(e).fill(t,n):i(e).fill(t):i(e)},s.allocUnsafe=function(e){return u(e)},s.allocUnsafeSlow=function(e){return u(e)},s.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==s.prototype},s.compare=function(e,t){if(I(e,Uint8Array)&&(e=s.from(e,e.offset,e.byteLength)),I(t,Uint8Array)&&(t=s.from(t,t.offset,t.byteLength)),!s.isBuffer(e)||!s.isBuffer(t))throw TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;for(var n=e.length,r=t.length,o=0,a=Math.min(n,r);on&&(e+=" ... "),""},a&&(s.prototype[a]=s.prototype.inspect),s.prototype.compare=function(e,t,n,r,o){if(I(e,Uint8Array)&&(e=s.from(e,e.offset,e.byteLength)),!s.isBuffer(e))throw TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===o&&(o=this.length),t<0||n>e.length||r<0||o>this.length)throw RangeError("out of range index");if(r>=o&&t>=n)return 0;if(r>=o)return -1;if(t>=n)return 1;if(t>>>=0,n>>>=0,r>>>=0,o>>>=0,this===e)return 0;for(var a=o-r,i=n-t,l=Math.min(a,i),c=this.slice(r,o),u=e.slice(t,n),d=0;d>>=0,isFinite(n)?(n>>>=0,void 0===r&&(r="utf8")):(r=n,n=void 0);else throw Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var o,a,i,s,l,c,u,d,p,f,m,g,h=this.length-t;if((void 0===n||n>h)&&(n=h),e.length>0&&(n<0||t<0)||t>this.length)throw RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var b=!1;;)switch(r){case"hex":return function(e,t,n,r){n=Number(n)||0;var o=e.length-n;r?(r=Number(r))>o&&(r=o):r=o;var a=t.length;r>a/2&&(r=a/2);for(var i=0;i>8,o.push(n%256),o.push(r);return o}(e,this.length-m),this,m,g);default:if(b)throw TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),b=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},s.prototype.slice=function(e,t){var n=this.length;e=~~e,t=void 0===t?n:~~t,e<0?(e+=n)<0&&(e=0):e>n&&(e=n),t<0?(t+=n)<0&&(t=0):t>n&&(t=n),t>>=0,t>>>=0,n||v(e,t,this.length);for(var r=this[e],o=1,a=0;++a>>=0,t>>>=0,n||v(e,t,this.length);for(var r=this[e+--t],o=1;t>0&&(o*=256);)r+=this[e+--t]*o;return r},s.prototype.readUInt8=function(e,t){return e>>>=0,t||v(e,1,this.length),this[e]},s.prototype.readUInt16LE=function(e,t){return e>>>=0,t||v(e,2,this.length),this[e]|this[e+1]<<8},s.prototype.readUInt16BE=function(e,t){return e>>>=0,t||v(e,2,this.length),this[e]<<8|this[e+1]},s.prototype.readUInt32LE=function(e,t){return e>>>=0,t||v(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},s.prototype.readUInt32BE=function(e,t){return e>>>=0,t||v(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},s.prototype.readIntLE=function(e,t,n){e>>>=0,t>>>=0,n||v(e,t,this.length);for(var r=this[e],o=1,a=0;++a=(o*=128)&&(r-=Math.pow(2,8*t)),r},s.prototype.readIntBE=function(e,t,n){e>>>=0,t>>>=0,n||v(e,t,this.length);for(var r=t,o=1,a=this[e+--r];r>0&&(o*=256);)a+=this[e+--r]*o;return a>=(o*=128)&&(a-=Math.pow(2,8*t)),a},s.prototype.readInt8=function(e,t){return(e>>>=0,t||v(e,1,this.length),128&this[e])?-((255-this[e]+1)*1):this[e]},s.prototype.readInt16LE=function(e,t){e>>>=0,t||v(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},s.prototype.readInt16BE=function(e,t){e>>>=0,t||v(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},s.prototype.readInt32LE=function(e,t){return e>>>=0,t||v(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},s.prototype.readInt32BE=function(e,t){return e>>>=0,t||v(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},s.prototype.readFloatLE=function(e,t){return e>>>=0,t||v(e,4,this.length),o.read(this,e,!0,23,4)},s.prototype.readFloatBE=function(e,t){return e>>>=0,t||v(e,4,this.length),o.read(this,e,!1,23,4)},s.prototype.readDoubleLE=function(e,t){return e>>>=0,t||v(e,8,this.length),o.read(this,e,!0,52,8)},s.prototype.readDoubleBE=function(e,t){return e>>>=0,t||v(e,8,this.length),o.read(this,e,!1,52,8)},s.prototype.writeUIntLE=function(e,t,n,r){if(e=+e,t>>>=0,n>>>=0,!r){var o=Math.pow(2,8*n)-1;E(this,e,t,n,o,0)}var a=1,i=0;for(this[t]=255&e;++i>>=0,n>>>=0,!r){var o=Math.pow(2,8*n)-1;E(this,e,t,n,o,0)}var a=n-1,i=1;for(this[t+a]=255&e;--a>=0&&(i*=256);)this[t+a]=e/i&255;return t+n},s.prototype.writeUInt8=function(e,t,n){return e=+e,t>>>=0,n||E(this,e,t,1,255,0),this[t]=255&e,t+1},s.prototype.writeUInt16LE=function(e,t,n){return e=+e,t>>>=0,n||E(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},s.prototype.writeUInt16BE=function(e,t,n){return e=+e,t>>>=0,n||E(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},s.prototype.writeUInt32LE=function(e,t,n){return e=+e,t>>>=0,n||E(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},s.prototype.writeUInt32BE=function(e,t,n){return e=+e,t>>>=0,n||E(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},s.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t>>>=0,!r){var o=Math.pow(2,8*n-1);E(this,e,t,n,o-1,-o)}var a=0,i=1,s=0;for(this[t]=255&e;++a>0)-s&255;return t+n},s.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t>>>=0,!r){var o=Math.pow(2,8*n-1);E(this,e,t,n,o-1,-o)}var a=n-1,i=1,s=0;for(this[t+a]=255&e;--a>=0&&(i*=256);)e<0&&0===s&&0!==this[t+a+1]&&(s=1),this[t+a]=(e/i>>0)-s&255;return t+n},s.prototype.writeInt8=function(e,t,n){return e=+e,t>>>=0,n||E(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},s.prototype.writeInt16LE=function(e,t,n){return e=+e,t>>>=0,n||E(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},s.prototype.writeInt16BE=function(e,t,n){return e=+e,t>>>=0,n||E(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},s.prototype.writeInt32LE=function(e,t,n){return e=+e,t>>>=0,n||E(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},s.prototype.writeInt32BE=function(e,t,n){return e=+e,t>>>=0,n||E(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},s.prototype.writeFloatLE=function(e,t,n){return w(this,e,t,!0,n)},s.prototype.writeFloatBE=function(e,t,n){return w(this,e,t,!1,n)},s.prototype.writeDoubleLE=function(e,t,n){return x(this,e,t,!0,n)},s.prototype.writeDoubleBE=function(e,t,n){return x(this,e,t,!1,n)},s.prototype.copy=function(e,t,n,r){if(!s.isBuffer(e))throw TypeError("argument should be a Buffer");if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r=this.length)throw RangeError("Index out of range");if(r<0)throw RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t=0;--a)e[a+t]=this[a+n];else Uint8Array.prototype.set.call(e,this.subarray(n,r),t);return o},s.prototype.fill=function(e,t,n,r){if("string"==typeof e){if("string"==typeof t?(r=t,t=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),void 0!==r&&"string"!=typeof r)throw TypeError("encoding must be a string");if("string"==typeof r&&!s.isEncoding(r))throw TypeError("Unknown encoding: "+r);if(1===e.length){var o,a=e.charCodeAt(0);("utf8"===r&&a<128||"latin1"===r)&&(e=a)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(t<0||this.length>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(o=t;o55295&&n<57344){if(!o){if(n>56319||i+1===r){(t-=3)>-1&&a.push(239,191,189);continue}o=n;continue}if(n<56320){(t-=3)>-1&&a.push(239,191,189),o=n;continue}n=(o-55296<<10|n-56320)+65536}else o&&(t-=3)>-1&&a.push(239,191,189);if(o=null,n<128){if((t-=1)<0)break;a.push(n)}else if(n<2048){if((t-=2)<0)break;a.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;a.push(n>>12|224,n>>6&63|128,63&n|128)}else if(n<1114112){if((t-=4)<0)break;a.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}else throw Error("Invalid code point")}return a}function T(e){for(var t=[],n=0;n=t.length)&&!(o>=e.length);++o)t[o+n]=e[o];return o}function I(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}var N=function(){for(var e="0123456789abcdef",t=Array(256),n=0;n<16;++n)for(var r=16*n,o=0;o<16;++o)t[r+o]=e[n]+e[o];return t}()},783:function(e,t){/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */t.read=function(e,t,n,r,o){var a,i,s=8*o-r-1,l=(1<>1,u=-7,d=n?o-1:0,p=n?-1:1,f=e[t+d];for(d+=p,a=f&(1<<-u)-1,f>>=-u,u+=s;u>0;a=256*a+e[t+d],d+=p,u-=8);for(i=a&(1<<-u)-1,a>>=-u,u+=r;u>0;i=256*i+e[t+d],d+=p,u-=8);if(0===a)a=1-c;else{if(a===l)return i?NaN:1/0*(f?-1:1);i+=Math.pow(2,r),a-=c}return(f?-1:1)*i*Math.pow(2,a-r)},t.write=function(e,t,n,r,o,a){var i,s,l,c=8*a-o-1,u=(1<>1,p=23===o?5960464477539062e-23:0,f=r?0:a-1,m=r?1:-1,g=t<0||0===t&&1/t<0?1:0;for(isNaN(t=Math.abs(t))||t===1/0?(s=isNaN(t)?1:0,i=u):(i=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-i))<1&&(i--,l*=2),i+d>=1?t+=p/l:t+=p*Math.pow(2,1-d),t*l>=2&&(i++,l/=2),i+d>=u?(s=0,i=u):i+d>=1?(s=(t*l-1)*Math.pow(2,o),i+=d):(s=t*Math.pow(2,d-1)*Math.pow(2,o),i=0));o>=8;e[n+f]=255&s,f+=m,s/=256,o-=8);for(i=i<0;e[n+f]=255&i,f+=m,i/=256,c-=8);e[n+f-m]|=128*g}}},n={};function r(e){var o=n[e];if(void 0!==o)return o.exports;var a=n[e]={exports:{}},i=!0;try{t[e](a,a.exports,r),i=!1}finally{i&&delete n[e]}return a.exports}r.ab="//";var o=r(72);e.exports=o}()},13127:function(e){!function(){var t={229:function(e){var t,n,r,o=e.exports={};function a(){throw Error("setTimeout has not been defined")}function i(){throw Error("clearTimeout has not been defined")}function s(e){if(t===setTimeout)return setTimeout(e,0);if((t===a||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(n){try{return t.call(null,e,0)}catch(n){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:a}catch(e){t=a}try{n="function"==typeof clearTimeout?clearTimeout:i}catch(e){n=i}}();var l=[],c=!1,u=-1;function d(){c&&r&&(c=!1,r.length?l=r.concat(l):u=-1,l.length&&p())}function p(){if(!c){var e=s(d);c=!0;for(var t=l.length;t;){for(r=l,l=[];++u1)for(var n=1;n{let t=l[e]||"",{repeat:n,optional:r}=s[e],o="["+(n?"...":"")+e+"]";return r&&(o=(t?"":"/")+"["+o+"]"),n&&!Array.isArray(t)&&(t=[t]),(r||e in l)&&(a=a.replace(o,n?t.map(e=>encodeURIComponent(e)).join("/"):encodeURIComponent(t))||"/")})||(a=""),{params:c,result:a}}},11305:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"isDynamicRoute",{enumerable:!0,get:function(){return a}});let r=n(94749),o=/\/\[[^/]+?\](?=\/|$)/;function a(e){return(0,r.isInterceptionRouteAppPath)(e)&&(e=(0,r.extractInterceptionRouteInformation)(e).interceptedRoute),o.test(e)}},17434:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"isLocalURL",{enumerable:!0,get:function(){return a}});let r=n(36874),o=n(87379);function a(e){if(!(0,r.isAbsoluteUrl)(e))return!0;try{let t=(0,r.getLocationOrigin)(),n=new URL(e,t);return n.origin===t&&(0,o.hasBasePath)(n.pathname)}catch(e){return!1}}},24544:function(e,t){function n(e,t){let n={};return Object.keys(e).forEach(r=>{t.includes(r)||(n[r]=e[r])}),n}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"omit",{enumerable:!0,get:function(){return n}})},95770:function(e,t){function n(e){let t={};return e.forEach((e,n)=>{void 0===t[n]?t[n]=e:Array.isArray(t[n])?t[n].push(e):t[n]=[t[n],e]}),t}function r(e){return"string"!=typeof e&&("number"!=typeof e||isNaN(e))&&"boolean"!=typeof e?"":String(e)}function o(e){let t=new URLSearchParams;return Object.entries(e).forEach(e=>{let[n,o]=e;Array.isArray(o)?o.forEach(e=>t.append(n,r(e))):t.set(n,r(o))}),t}function a(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r{Array.from(t.keys()).forEach(t=>e.delete(t)),t.forEach((t,n)=>e.append(n,t))}),e}Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{searchParamsToUrlQuery:function(){return n},urlQueryToSearchParams:function(){return o},assign:function(){return a}})},2395:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getRouteMatcher",{enumerable:!0,get:function(){return o}});let r=n(36874);function o(e){let{re:t,groups:n}=e;return e=>{let o=t.exec(e);if(!o)return!1;let a=e=>{try{return decodeURIComponent(e)}catch(e){throw new r.DecodeError("failed to decode param")}},i={};return Object.keys(n).forEach(e=>{let t=n[e],r=o[t.pos];void 0!==r&&(i[e]=~r.indexOf("/")?r.split("/").map(e=>a(e)):t.repeat?[a(r)]:a(r))}),i}}},19935:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{getRouteRegex:function(){return l},getNamedRouteRegex:function(){return d},getNamedMiddlewareRegex:function(){return p}});let r=n(94749),o=n(22202),a=n(95868);function i(e){let t=e.startsWith("[")&&e.endsWith("]");t&&(e=e.slice(1,-1));let n=e.startsWith("...");return n&&(e=e.slice(3)),{key:e,repeat:n,optional:t}}function s(e){let t=(0,a.removeTrailingSlash)(e).slice(1).split("/"),n={},s=1;return{parameterizedRoute:t.map(e=>{let t=r.INTERCEPTION_ROUTE_MARKERS.find(t=>e.startsWith(t)),a=e.match(/\[((?:\[.*\])|.+)\]/);if(t&&a){let{key:e,optional:r,repeat:l}=i(a[1]);return n[e]={pos:s++,repeat:l,optional:r},"/"+(0,o.escapeStringRegexp)(t)+"([^/]+?)"}if(!a)return"/"+(0,o.escapeStringRegexp)(e);{let{key:e,repeat:t,optional:r}=i(a[1]);return n[e]={pos:s++,repeat:t,optional:r},t?r?"(?:/(.+?))?":"/(.+?)":"/([^/]+?)"}}).join(""),groups:n}}function l(e){let{parameterizedRoute:t,groups:n}=s(e);return{re:RegExp("^"+t+"(?:/)?$"),groups:n}}function c(e){let{interceptionMarker:t,getSafeRouteKey:n,segment:r,routeKeys:a,keyPrefix:s}=e,{key:l,optional:c,repeat:u}=i(r),d=l.replace(/\W/g,"");s&&(d=""+s+d);let p=!1;(0===d.length||d.length>30)&&(p=!0),isNaN(parseInt(d.slice(0,1)))||(p=!0),p&&(d=n()),s?a[d]=""+s+l:a[d]=l;let f=t?(0,o.escapeStringRegexp)(t):"";return u?c?"(?:/"+f+"(?<"+d+">.+?))?":"/"+f+"(?<"+d+">.+?)":"/"+f+"(?<"+d+">[^/]+?)"}function u(e,t){let n;let i=(0,a.removeTrailingSlash)(e).slice(1).split("/"),s=(n=0,()=>{let e="",t=++n;for(;t>0;)e+=String.fromCharCode(97+(t-1)%26),t=Math.floor((t-1)/26);return e}),l={};return{namedParameterizedRoute:i.map(e=>{let n=r.INTERCEPTION_ROUTE_MARKERS.some(t=>e.startsWith(t)),a=e.match(/\[((?:\[.*\])|.+)\]/);if(n&&a){let[n]=e.split(a[0]);return c({getSafeRouteKey:s,interceptionMarker:n,segment:a[1],routeKeys:l,keyPrefix:t?"nxtI":void 0})}return a?c({getSafeRouteKey:s,segment:a[1],routeKeys:l,keyPrefix:t?"nxtP":void 0}):"/"+(0,o.escapeStringRegexp)(e)}).join(""),routeKeys:l}}function d(e,t){let n=u(e,t);return{...l(e),namedRegex:"^"+n.namedParameterizedRoute+"(?:/)?$",routeKeys:n.routeKeys}}function p(e,t){let{parameterizedRoute:n}=s(e),{catchAll:r=!0}=t;if("/"===n)return{namedRegex:"^/"+(r?".*":"")+"$"};let{namedParameterizedRoute:o}=u(e,!1);return{namedRegex:"^"+o+(r?"(?:(/.*)?)":"")+"$"}}},97409:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getSortedRoutes",{enumerable:!0,get:function(){return r}});class n{insert(e){this._insert(e.split("/").filter(Boolean),[],!1)}smoosh(){return this._smoosh()}_smoosh(e){void 0===e&&(e="/");let t=[...this.children.keys()].sort();null!==this.slugName&&t.splice(t.indexOf("[]"),1),null!==this.restSlugName&&t.splice(t.indexOf("[...]"),1),null!==this.optionalRestSlugName&&t.splice(t.indexOf("[[...]]"),1);let n=t.map(t=>this.children.get(t)._smoosh(""+e+t+"/")).reduce((e,t)=>[...e,...t],[]);if(null!==this.slugName&&n.push(...this.children.get("[]")._smoosh(e+"["+this.slugName+"]/")),!this.placeholder){let t="/"===e?"/":e.slice(0,-1);if(null!=this.optionalRestSlugName)throw Error('You cannot define a route with the same specificity as a optional catch-all route ("'+t+'" and "'+t+"[[..."+this.optionalRestSlugName+']]").');n.unshift(t)}return null!==this.restSlugName&&n.push(...this.children.get("[...]")._smoosh(e+"[..."+this.restSlugName+"]/")),null!==this.optionalRestSlugName&&n.push(...this.children.get("[[...]]")._smoosh(e+"[[..."+this.optionalRestSlugName+"]]/")),n}_insert(e,t,r){if(0===e.length){this.placeholder=!1;return}if(r)throw Error("Catch-all must be the last part of the URL.");let o=e[0];if(o.startsWith("[")&&o.endsWith("]")){let n=o.slice(1,-1),i=!1;if(n.startsWith("[")&&n.endsWith("]")&&(n=n.slice(1,-1),i=!0),n.startsWith("...")&&(n=n.substring(3),r=!0),n.startsWith("[")||n.endsWith("]"))throw Error("Segment names may not start or end with extra brackets ('"+n+"').");if(n.startsWith("."))throw Error("Segment names may not start with erroneous periods ('"+n+"').");function a(e,n){if(null!==e&&e!==n)throw Error("You cannot use different slug names for the same dynamic path ('"+e+"' !== '"+n+"').");t.forEach(e=>{if(e===n)throw Error('You cannot have the same slug name "'+n+'" repeat within a single dynamic path');if(e.replace(/\W/g,"")===o.replace(/\W/g,""))throw Error('You cannot have the slug names "'+e+'" and "'+n+'" differ only by non-word symbols within a single dynamic path')}),t.push(n)}if(r){if(i){if(null!=this.restSlugName)throw Error('You cannot use both an required and optional catch-all route at the same level ("[...'+this.restSlugName+']" and "'+e[0]+'" ).');a(this.optionalRestSlugName,n),this.optionalRestSlugName=n,o="[[...]]"}else{if(null!=this.optionalRestSlugName)throw Error('You cannot use both an optional and required catch-all route at the same level ("[[...'+this.optionalRestSlugName+']]" and "'+e[0]+'").');a(this.restSlugName,n),this.restSlugName=n,o="[...]"}}else{if(i)throw Error('Optional route parameters are not yet supported ("'+e[0]+'").');a(this.slugName,n),this.slugName=n,o="[]"}}this.children.has(o)||this.children.set(o,new n),this.children.get(o)._insert(e.slice(1),t,r)}constructor(){this.placeholder=!0,this.children=new Map,this.slugName=null,this.restSlugName=null,this.optionalRestSlugName=null}}function r(e){let t=new n;return e.forEach(e=>t.insert(e)),t.smoosh()}},36874:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{WEB_VITALS:function(){return n},execOnce:function(){return r},isAbsoluteUrl:function(){return a},getLocationOrigin:function(){return i},getURL:function(){return s},getDisplayName:function(){return l},isResSent:function(){return c},normalizeRepeatedSlashes:function(){return u},loadGetInitialProps:function(){return d},SP:function(){return p},ST:function(){return f},DecodeError:function(){return m},NormalizeError:function(){return g},PageNotFoundError:function(){return h},MissingStaticPage:function(){return b},MiddlewareNotFoundError:function(){return y},stringifyError:function(){return v}});let n=["CLS","FCP","FID","INP","LCP","TTFB"];function r(e){let t,n=!1;return function(){for(var r=arguments.length,o=Array(r),a=0;ao.test(e);function i(){let{protocol:e,hostname:t,port:n}=window.location;return e+"//"+t+(n?":"+n:"")}function s(){let{href:e}=window.location,t=i();return e.substring(t.length)}function l(e){return"string"==typeof e?e:e.displayName||e.name||"Unknown"}function c(e){return e.finished||e.headersSent}function u(e){let t=e.split("?");return t[0].replace(/\\/g,"/").replace(/\/\/+/g,"/")+(t[1]?"?"+t.slice(1).join("?"):"")}async function d(e,t){let n=t.res||t.ctx&&t.ctx.res;if(!e.getInitialProps)return t.ctx&&t.Component?{pageProps:await d(t.Component,t.ctx)}:{};let r=await e.getInitialProps(t);if(n&&c(n))return r;if(!r)throw Error('"'+l(e)+'.getInitialProps()" should resolve to an object. But found "'+r+'" instead.');return r}let p="undefined"!=typeof performance,f=p&&["mark","measure","getEntriesByName"].every(e=>"function"==typeof performance[e]);class m extends Error{}class g extends Error{}class h extends Error{constructor(e){super(),this.code="ENOENT",this.name="PageNotFoundError",this.message="Cannot find module for page: "+e}}class b extends Error{constructor(e,t){super(),this.message="Failed to load static file for page: "+e+" "+t}}class y extends Error{constructor(){super(),this.code="ENOENT",this.message="Cannot find the middleware module"}}function v(e){return JSON.stringify({message:e.message,stack:e.stack})}},18314:function(e,t,n){var r=n(41811);function o(){}function a(){}a.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,a,i){if(i!==r){var s=Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:a,resetWarningCache:o};return n.PropTypes=n,n}},74404:function(e,t,n){e.exports=n(18314)()},41811:function(e){e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},76570:function(e,t,n){n.d(t,{gN:function(){return eh},zb:function(){return w},RV:function(){return eT},aV:function(){return eb},ZM:function(){return x},ZP:function(){return eR},cI:function(){return eO},qo:function(){return eN}});var r,o=n(64090),a=n(14749),i=n(6787),s=n(86926),l=n(74902),c=n(5239),u=n(63787),d=n(47365),p=n(65127),f=n(34951),m=n(27478),g=n(85430),h=n(50833),b=n(33054),y=n(92536),v=n(53850),E="RC_FORM_INTERNAL_HOOKS",S=function(){(0,v.ZP)(!1,"Can not find FormContext. Please make sure you wrap Field under Form.")},w=o.createContext({getFieldValue:S,getFieldsValue:S,getFieldError:S,getFieldWarning:S,getFieldsError:S,isFieldsTouched:S,isFieldTouched:S,isFieldValidating:S,isFieldsValidating:S,resetFields:S,setFields:S,setFieldValue:S,setFieldsValue:S,validateFields:S,submit:S,getInternalHooks:function(){return S(),{dispatch:S,initEntityValue:S,registerField:S,useSubscribe:S,setInitialValues:S,destroyForm:S,setCallbacks:S,registerWatch:S,getFields:S,setValidateMessages:S,setPreserve:S,getInitialValue:S}}}),x=o.createContext(null);function O(e){return null==e?[]:Array.isArray(e)?e:[e]}var A=n(49079);function T(){return(T=Object.assign?Object.assign.bind():function(e){for(var t=1;t1?t-1:0),r=1;r=a)return e;switch(e){case"%s":return String(n[o++]);case"%d":return Number(n[o++]);case"%j":try{return JSON.stringify(n[o++])}catch(e){return"[Circular]"}break;default:return e}}):e}function M(e,t){return!!(null==e||"array"===t&&Array.isArray(e)&&!e.length)||("string"===t||"url"===t||"hex"===t||"email"===t||"date"===t||"pattern"===t)&&"string"==typeof e&&!e}function L(e,t,n){var r=0,o=e.length;!function a(i){if(i&&i.length){n(i);return}var s=r;r+=1,s()\[\]\\.,;:\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},z={integer:function(e){return z.number(e)&&parseInt(e,10)===e},float:function(e){return z.number(e)&&!z.integer(e)},array:function(e){return Array.isArray(e)},regexp:function(e){if(e instanceof RegExp)return!0;try{return new RegExp(e),!0}catch(e){return!1}},date:function(e){return"function"==typeof e.getTime&&"function"==typeof e.getMonth&&"function"==typeof e.getYear&&!isNaN(e.getTime())},number:function(e){return!isNaN(e)&&"number"==typeof e},object:function(e){return"object"==typeof e&&!z.array(e)},method:function(e){return"function"==typeof e},email:function(e){return"string"==typeof e&&e.length<=320&&!!e.match(Z.email)},url:function(e){return"string"==typeof e&&e.length<=2048&&!!e.match(U())},hex:function(e){return"string"==typeof e&&!!e.match(Z.hex)}},H="enum",G={required:B,whitespace:function(e,t,n,r,o){(/^\s+$/.test(t)||""===t)&&r.push(P(o.messages.whitespace,e.fullField))},type:function(e,t,n,r,o){if(e.required&&void 0===t){B(e,t,n,r,o);return}var a=e.type;["integer","float","array","regexp","object","method","email","number","date","url","hex"].indexOf(a)>-1?z[a](t)||r.push(P(o.messages.types[a],e.fullField,e.type)):a&&typeof t!==e.type&&r.push(P(o.messages.types[a],e.fullField,e.type))},range:function(e,t,n,r,o){var a="number"==typeof e.len,i="number"==typeof e.min,s="number"==typeof e.max,l=t,c=null,u="number"==typeof t,d="string"==typeof t,p=Array.isArray(t);if(u?c="number":d?c="string":p&&(c="array"),!c)return!1;p&&(l=t.length),d&&(l=t.replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,"_").length),a?l!==e.len&&r.push(P(o.messages[c].len,e.fullField,e.len)):i&&!s&&le.max?r.push(P(o.messages[c].max,e.fullField,e.max)):i&&s&&(le.max)&&r.push(P(o.messages[c].range,e.fullField,e.min,e.max))},enum:function(e,t,n,r,o){e[H]=Array.isArray(e[H])?e[H]:[],-1===e[H].indexOf(t)&&r.push(P(o.messages[H],e.fullField,e[H].join(", ")))},pattern:function(e,t,n,r,o){!e.pattern||(e.pattern instanceof RegExp?(e.pattern.lastIndex=0,e.pattern.test(t)||r.push(P(o.messages.pattern.mismatch,e.fullField,t,e.pattern))):"string"!=typeof e.pattern||new RegExp(e.pattern).test(t)||r.push(P(o.messages.pattern.mismatch,e.fullField,t,e.pattern)))}},$=function(e,t,n,r,o){var a=e.type,i=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(M(t,a)&&!e.required)return n();G.required(e,t,r,i,o,a),M(t,a)||G.type(e,t,r,i,o)}n(i)},W={string:function(e,t,n,r,o){var a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(M(t,"string")&&!e.required)return n();G.required(e,t,r,a,o,"string"),M(t,"string")||(G.type(e,t,r,a,o),G.range(e,t,r,a,o),G.pattern(e,t,r,a,o),!0===e.whitespace&&G.whitespace(e,t,r,a,o))}n(a)},method:function(e,t,n,r,o){var a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(M(t)&&!e.required)return n();G.required(e,t,r,a,o),void 0!==t&&G.type(e,t,r,a,o)}n(a)},number:function(e,t,n,r,o){var a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(""===t&&(t=void 0),M(t)&&!e.required)return n();G.required(e,t,r,a,o),void 0!==t&&(G.type(e,t,r,a,o),G.range(e,t,r,a,o))}n(a)},boolean:function(e,t,n,r,o){var a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(M(t)&&!e.required)return n();G.required(e,t,r,a,o),void 0!==t&&G.type(e,t,r,a,o)}n(a)},regexp:function(e,t,n,r,o){var a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(M(t)&&!e.required)return n();G.required(e,t,r,a,o),M(t)||G.type(e,t,r,a,o)}n(a)},integer:function(e,t,n,r,o){var a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(M(t)&&!e.required)return n();G.required(e,t,r,a,o),void 0!==t&&(G.type(e,t,r,a,o),G.range(e,t,r,a,o))}n(a)},float:function(e,t,n,r,o){var a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(M(t)&&!e.required)return n();G.required(e,t,r,a,o),void 0!==t&&(G.type(e,t,r,a,o),G.range(e,t,r,a,o))}n(a)},array:function(e,t,n,r,o){var a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(null==t&&!e.required)return n();G.required(e,t,r,a,o,"array"),null!=t&&(G.type(e,t,r,a,o),G.range(e,t,r,a,o))}n(a)},object:function(e,t,n,r,o){var a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(M(t)&&!e.required)return n();G.required(e,t,r,a,o),void 0!==t&&G.type(e,t,r,a,o)}n(a)},enum:function(e,t,n,r,o){var a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(M(t)&&!e.required)return n();G.required(e,t,r,a,o),void 0!==t&&G.enum(e,t,r,a,o)}n(a)},pattern:function(e,t,n,r,o){var a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(M(t,"string")&&!e.required)return n();G.required(e,t,r,a,o),M(t,"string")||G.pattern(e,t,r,a,o)}n(a)},date:function(e,t,n,r,o){var a,i=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(M(t,"date")&&!e.required)return n();G.required(e,t,r,i,o),!M(t,"date")&&(a=t instanceof Date?t:new Date(t),G.type(e,a,r,i,o),a&&G.range(e,a.getTime(),r,i,o))}n(i)},url:$,hex:$,email:$,required:function(e,t,n,r,o){var a=[],i=Array.isArray(t)?"array":typeof t;G.required(e,t,r,a,o,i),n(a)},any:function(e,t,n,r,o){var a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(M(t)&&!e.required)return n();G.required(e,t,r,a,o)}n(a)}};function V(){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 e=JSON.parse(JSON.stringify(this));return e.clone=this.clone,e}}}var q=V(),Y=function(){function e(e){this.rules=null,this._messages=q,this.define(e)}var t=e.prototype;return t.define=function(e){var t=this;if(!e)throw Error("Cannot configure a schema with no rules");if("object"!=typeof e||Array.isArray(e))throw Error("Rules must be an object");this.rules={},Object.keys(e).forEach(function(n){var r=e[n];t.rules[n]=Array.isArray(r)?r:[r]})},t.messages=function(e){return e&&(this._messages=F(V(),e)),this._messages},t.validate=function(t,n,r){var o=this;void 0===n&&(n={}),void 0===r&&(r=function(){});var a=t,i=n,s=r;if("function"==typeof i&&(s=i,i={}),!this.rules||0===Object.keys(this.rules).length)return s&&s(null,a),Promise.resolve(a);if(i.messages){var l=this.messages();l===q&&(l=V()),F(l,i.messages),i.messages=l}else i.messages=this.messages();var c={};(i.keys||Object.keys(this.rules)).forEach(function(e){var n=o.rules[e],r=a[e];n.forEach(function(n){var i=n;"function"==typeof i.transform&&(a===t&&(a=T({},a)),r=a[e]=i.transform(r)),(i="function"==typeof i?{validator:i}:T({},i)).validator=o.getValidationMethod(i),i.validator&&(i.field=e,i.fullField=i.fullField||e,i.type=o.getType(i),c[e]=c[e]||[],c[e].push({rule:i,value:r,source:a,field:e}))})});var u={};return function(e,t,n,r,o){if(t.first){var a=new Promise(function(t,a){var i;L((i=[],Object.keys(e).forEach(function(t){i.push.apply(i,e[t]||[])}),i),n,function(e){return r(e),e.length?a(new D(e,R(e))):t(o)})});return a.catch(function(e){return e}),a}var i=!0===t.firstFields?Object.keys(e):t.firstFields||[],s=Object.keys(e),l=s.length,c=0,u=[],d=new Promise(function(t,a){var d=function(e){if(u.push.apply(u,e),++c===l)return r(u),u.length?a(new D(u,R(u))):t(o)};s.length||(r(u),t(o)),s.forEach(function(t){var r=e[t];-1!==i.indexOf(t)?L(r,n,d):function(e,t,n){var r=[],o=0,a=e.length;function i(e){r.push.apply(r,e||[]),++o===a&&n(r)}e.forEach(function(e){t(e,i)})}(r,n,d)})});return d.catch(function(e){return e}),d}(c,i,function(t,n){var r,o=t.rule,s=("object"===o.type||"array"===o.type)&&("object"==typeof o.fields||"object"==typeof o.defaultField);function l(e,t){return T({},t,{fullField:o.fullField+"."+e,fullFields:o.fullFields?[].concat(o.fullFields,[e]):[e]})}function c(r){void 0===r&&(r=[]);var c=Array.isArray(r)?r:[r];!i.suppressWarning&&c.length&&e.warning("async-validator:",c),c.length&&void 0!==o.message&&(c=[].concat(o.message));var d=c.map(j(o,a));if(i.first&&d.length)return u[o.field]=1,n(d);if(s){if(o.required&&!t.value)return void 0!==o.message?d=[].concat(o.message).map(j(o,a)):i.error&&(d=[i.error(o,P(i.messages.required,o.field))]),n(d);var p={};o.defaultField&&Object.keys(t.value).map(function(e){p[e]=o.defaultField});var f={};Object.keys(p=T({},p,t.rule.fields)).forEach(function(e){var t=p[e],n=Array.isArray(t)?t:[t];f[e]=n.map(l.bind(null,e))});var m=new e(f);m.messages(i.messages),t.rule.options&&(t.rule.options.messages=i.messages,t.rule.options.error=i.error),m.validate(t.value,t.rule.options||i,function(e){var t=[];d&&d.length&&t.push.apply(t,d),e&&e.length&&t.push.apply(t,e),n(t.length?t:null)})}else n(d)}if(s=s&&(o.required||!o.required&&t.value),o.field=t.field,o.asyncValidator)r=o.asyncValidator(o,t.value,c,t.source,i);else if(o.validator){try{r=o.validator(o,t.value,c,t.source,i)}catch(e){null==console.error||console.error(e),i.suppressValidatorError||setTimeout(function(){throw e},0),c(e.message)}!0===r?c():!1===r?c("function"==typeof o.message?o.message(o.fullField||o.field):o.message||(o.fullField||o.field)+" fails"):r instanceof Array?c(r):r instanceof Error&&c(r.message)}r&&r.then&&r.then(function(){return c()},function(e){return c(e)})},function(e){!function(e){for(var t=[],n={},r=0;r2&&void 0!==arguments[2]&&arguments[2];return e&&e.some(function(e){return ec(t,e,n)})}function ec(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return!!e&&!!t&&(!!n||e.length===t.length)&&t.every(function(t,n){return e[n]===t})}function eu(e){var t=arguments.length<=1?void 0:arguments[1];return t&&t.target&&"object"===(0,eo.Z)(t.target)&&e in t.target?t.target[e]:t}function ed(e,t,n){var r=e.length;if(t<0||t>=r||n<0||n>=r)return e;var o=e[t],a=t-n;return a>0?[].concat((0,u.Z)(e.slice(0,n)),[o],(0,u.Z)(e.slice(n,t)),(0,u.Z)(e.slice(t+1,r))):a<0?[].concat((0,u.Z)(e.slice(0,t)),(0,u.Z)(e.slice(t+1,n+1)),[o],(0,u.Z)(e.slice(n+1,r))):e}var ep=["name"],ef=[];function em(e,t,n,r,o,a){return"function"==typeof e?e(t,n,"source"in a?{source:a.source}:{}):r!==o}var eg=function(e){(0,m.Z)(n,e);var t=(0,g.Z)(n);function n(e){var r;return(0,d.Z)(this,n),r=t.call(this,e),(0,h.Z)((0,f.Z)(r),"state",{resetCount:0}),(0,h.Z)((0,f.Z)(r),"cancelRegisterFunc",null),(0,h.Z)((0,f.Z)(r),"mounted",!1),(0,h.Z)((0,f.Z)(r),"touched",!1),(0,h.Z)((0,f.Z)(r),"dirty",!1),(0,h.Z)((0,f.Z)(r),"validatePromise",void 0),(0,h.Z)((0,f.Z)(r),"prevValidating",void 0),(0,h.Z)((0,f.Z)(r),"errors",ef),(0,h.Z)((0,f.Z)(r),"warnings",ef),(0,h.Z)((0,f.Z)(r),"cancelRegister",function(){var e=r.props,t=e.preserve,n=e.isListField,o=e.name;r.cancelRegisterFunc&&r.cancelRegisterFunc(n,t,ei(o)),r.cancelRegisterFunc=null}),(0,h.Z)((0,f.Z)(r),"getNamePath",function(){var e=r.props,t=e.name,n=e.fieldContext.prefixName;return void 0!==t?[].concat((0,u.Z)(void 0===n?[]:n),(0,u.Z)(t)):[]}),(0,h.Z)((0,f.Z)(r),"getRules",function(){var e=r.props,t=e.rules,n=e.fieldContext;return(void 0===t?[]:t).map(function(e){return"function"==typeof e?e(n):e})}),(0,h.Z)((0,f.Z)(r),"refresh",function(){r.mounted&&r.setState(function(e){return{resetCount:e.resetCount+1}})}),(0,h.Z)((0,f.Z)(r),"metaCache",null),(0,h.Z)((0,f.Z)(r),"triggerMetaEvent",function(e){var t=r.props.onMetaChange;if(t){var n=(0,c.Z)((0,c.Z)({},r.getMeta()),{},{destroy:e});(0,y.Z)(r.metaCache,n)||t(n),r.metaCache=n}else r.metaCache=null}),(0,h.Z)((0,f.Z)(r),"onStoreChange",function(e,t,n){var o=r.props,a=o.shouldUpdate,i=o.dependencies,s=void 0===i?[]:i,l=o.onReset,c=n.store,u=r.getNamePath(),d=r.getValue(e),p=r.getValue(c),f=t&&el(t,u);switch("valueUpdate"===n.type&&"external"===n.source&&d!==p&&(r.touched=!0,r.dirty=!0,r.validatePromise=null,r.errors=ef,r.warnings=ef,r.triggerMetaEvent()),n.type){case"reset":if(!t||f){r.touched=!1,r.dirty=!1,r.validatePromise=void 0,r.errors=ef,r.warnings=ef,r.triggerMetaEvent(),null==l||l(),r.refresh();return}break;case"remove":if(a){r.reRender();return}break;case"setField":var m=n.data;if(f){"touched"in m&&(r.touched=m.touched),"validating"in m&&!("originRCField"in m)&&(r.validatePromise=m.validating?Promise.resolve([]):null),"errors"in m&&(r.errors=m.errors||ef),"warnings"in m&&(r.warnings=m.warnings||ef),r.dirty=!0,r.triggerMetaEvent(),r.reRender();return}if("value"in m&&el(t,u,!0)||a&&!u.length&&em(a,e,c,d,p,n)){r.reRender();return}break;case"dependenciesUpdate":if(s.map(ei).some(function(e){return el(n.relatedFields,e)})){r.reRender();return}break;default:if(f||(!s.length||u.length||a)&&em(a,e,c,d,p,n)){r.reRender();return}}!0===a&&r.reRender()}),(0,h.Z)((0,f.Z)(r),"validateRules",function(e){var t=r.getNamePath(),n=r.getValue(),o=e||{},a=o.triggerName,i=o.validateOnly,d=Promise.resolve().then((0,l.Z)((0,s.Z)().mark(function o(){var i,p,f,m,g,h,b;return(0,s.Z)().wrap(function(o){for(;;)switch(o.prev=o.next){case 0:if(r.mounted){o.next=2;break}return o.abrupt("return",[]);case 2:if(f=void 0!==(p=(i=r.props).validateFirst)&&p,m=i.messageVariables,g=i.validateDebounce,h=r.getRules(),a&&(h=h.filter(function(e){return e}).filter(function(e){var t=e.validateTrigger;return!t||O(t).includes(a)})),!(g&&a)){o.next=10;break}return o.next=8,new Promise(function(e){setTimeout(e,g)});case 8:if(!(r.validatePromise!==d)){o.next=10;break}return o.abrupt("return",[]);case 10:return(b=function(e,t,n,r,o,a){var i,u,d=e.join("."),p=n.map(function(e,t){var n=e.validator,r=(0,c.Z)((0,c.Z)({},e),{},{ruleIndex:t});return n&&(r.validator=function(e,t,r){var o=!1,a=n(e,t,function(){for(var e=arguments.length,t=Array(e),n=0;n0&&void 0!==arguments[0]?arguments[0]:ef;if(r.validatePromise===d){r.validatePromise=null;var t,n=[],o=[];null===(t=e.forEach)||void 0===t||t.call(e,function(e){var t=e.rule.warningOnly,r=e.errors,a=void 0===r?ef:r;t?o.push.apply(o,(0,u.Z)(a)):n.push.apply(n,(0,u.Z)(a))}),r.errors=n,r.warnings=o,r.triggerMetaEvent(),r.reRender()}}),o.abrupt("return",b);case 13:case"end":return o.stop()}},o)})));return void 0!==i&&i||(r.validatePromise=d,r.dirty=!0,r.errors=ef,r.warnings=ef,r.triggerMetaEvent(),r.reRender()),d}),(0,h.Z)((0,f.Z)(r),"isFieldValidating",function(){return!!r.validatePromise}),(0,h.Z)((0,f.Z)(r),"isFieldTouched",function(){return r.touched}),(0,h.Z)((0,f.Z)(r),"isFieldDirty",function(){return!!r.dirty||void 0!==r.props.initialValue||void 0!==(0,r.props.fieldContext.getInternalHooks(E).getInitialValue)(r.getNamePath())}),(0,h.Z)((0,f.Z)(r),"getErrors",function(){return r.errors}),(0,h.Z)((0,f.Z)(r),"getWarnings",function(){return r.warnings}),(0,h.Z)((0,f.Z)(r),"isListField",function(){return r.props.isListField}),(0,h.Z)((0,f.Z)(r),"isList",function(){return r.props.isList}),(0,h.Z)((0,f.Z)(r),"isPreserve",function(){return r.props.preserve}),(0,h.Z)((0,f.Z)(r),"getMeta",function(){return r.prevValidating=r.isFieldValidating(),{touched:r.isFieldTouched(),validating:r.prevValidating,errors:r.errors,warnings:r.warnings,name:r.getNamePath(),validated:null===r.validatePromise}}),(0,h.Z)((0,f.Z)(r),"getOnlyChild",function(e){if("function"==typeof e){var t=r.getMeta();return(0,c.Z)((0,c.Z)({},r.getOnlyChild(e(r.getControlled(),t,r.props.fieldContext))),{},{isFunction:!0})}var n=(0,b.Z)(e);return 1===n.length&&o.isValidElement(n[0])?{child:n[0],isFunction:!1}:{child:n,isFunction:!1}}),(0,h.Z)((0,f.Z)(r),"getValue",function(e){var t=r.props.fieldContext.getFieldsValue,n=r.getNamePath();return(0,ea.Z)(e||t(!0),n)}),(0,h.Z)((0,f.Z)(r),"getControlled",function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=r.props,n=t.trigger,o=t.validateTrigger,a=t.getValueFromEvent,i=t.normalize,s=t.valuePropName,l=t.getValueProps,u=t.fieldContext,d=void 0!==o?o:u.validateTrigger,p=r.getNamePath(),f=u.getInternalHooks,m=u.getFieldsValue,g=f(E).dispatch,b=r.getValue(),y=l||function(e){return(0,h.Z)({},s,e)},v=e[n],S=(0,c.Z)((0,c.Z)({},e),y(b));return S[n]=function(){r.touched=!0,r.dirty=!0,r.triggerMetaEvent();for(var e,t=arguments.length,n=Array(t),o=0;o=0&&t<=n.length?(p.keys=[].concat((0,u.Z)(p.keys.slice(0,t)),[p.id],(0,u.Z)(p.keys.slice(t))),o([].concat((0,u.Z)(n.slice(0,t)),[e],(0,u.Z)(n.slice(t))))):(p.keys=[].concat((0,u.Z)(p.keys),[p.id]),o([].concat((0,u.Z)(n),[e]))),p.id+=1},remove:function(e){var t=i(),n=new Set(Array.isArray(e)?e:[e]);n.size<=0||(p.keys=p.keys.filter(function(e,t){return!n.has(t)}),o(t.filter(function(e,t){return!n.has(t)})))},move:function(e,t){if(e!==t){var n=i();e<0||e>=n.length||t<0||t>=n.length||(p.keys=ed(p.keys,e,t),o(ed(n,e,t)))}}},t)})))},ey=n(80406),ev="__@field_split__";function eE(e){return e.map(function(e){return"".concat((0,eo.Z)(e),":").concat(e)}).join(ev)}var eS=function(){function e(){(0,d.Z)(this,e),(0,h.Z)(this,"kvs",new Map)}return(0,p.Z)(e,[{key:"set",value:function(e,t){this.kvs.set(eE(e),t)}},{key:"get",value:function(e){return this.kvs.get(eE(e))}},{key:"update",value:function(e,t){var n=t(this.get(e));n?this.set(e,n):this.delete(e)}},{key:"delete",value:function(e){this.kvs.delete(eE(e))}},{key:"map",value:function(e){return(0,u.Z)(this.kvs.entries()).map(function(t){var n=(0,ey.Z)(t,2),r=n[0],o=n[1];return e({key:r.split(ev).map(function(e){var t=e.match(/^([^:]*):(.*)$/),n=(0,ey.Z)(t,3),r=n[1],o=n[2];return"number"===r?Number(o):o}),value:o})})}},{key:"toJSON",value:function(){var e={};return this.map(function(t){var n=t.key,r=t.value;return e[n.join(".")]=r,null}),e}}]),e}(),ew=["name"],ex=(0,p.Z)(function e(t){var n=this;(0,d.Z)(this,e),(0,h.Z)(this,"formHooked",!1),(0,h.Z)(this,"forceRootUpdate",void 0),(0,h.Z)(this,"subscribable",!0),(0,h.Z)(this,"store",{}),(0,h.Z)(this,"fieldEntities",[]),(0,h.Z)(this,"initialValues",{}),(0,h.Z)(this,"callbacks",{}),(0,h.Z)(this,"validateMessages",null),(0,h.Z)(this,"preserve",null),(0,h.Z)(this,"lastValidatePromise",null),(0,h.Z)(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}}),(0,h.Z)(this,"getInternalHooks",function(e){return e===E?(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}):((0,v.ZP)(!1,"`getInternalHooks` is internal usage. Should not call directly."),null)}),(0,h.Z)(this,"useSubscribe",function(e){n.subscribable=e}),(0,h.Z)(this,"prevWithoutPreserves",null),(0,h.Z)(this,"setInitialValues",function(e,t){if(n.initialValues=e||{},t){var r,o=(0,Q.T)(e,n.store);null===(r=n.prevWithoutPreserves)||void 0===r||r.map(function(t){var n=t.key;o=(0,Q.Z)(o,n,(0,ea.Z)(e,n))}),n.prevWithoutPreserves=null,n.updateStore(o)}}),(0,h.Z)(this,"destroyForm",function(){var e=new eS;n.getFieldEntities(!0).forEach(function(t){n.isMergedPreserve(t.isPreserve())||e.set(t.getNamePath(),!0)}),n.prevWithoutPreserves=e}),(0,h.Z)(this,"getInitialValue",function(e){var t=(0,ea.Z)(n.initialValues,e);return e.length?(0,Q.T)(t):t}),(0,h.Z)(this,"setCallbacks",function(e){n.callbacks=e}),(0,h.Z)(this,"setValidateMessages",function(e){n.validateMessages=e}),(0,h.Z)(this,"setPreserve",function(e){n.preserve=e}),(0,h.Z)(this,"watchList",[]),(0,h.Z)(this,"registerWatch",function(e){return n.watchList.push(e),function(){n.watchList=n.watchList.filter(function(t){return t!==e})}}),(0,h.Z)(this,"notifyWatch",function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];if(n.watchList.length){var t=n.getFieldsValue(),r=n.getFieldsValue(!0);n.watchList.forEach(function(n){n(t,r,e)})}}),(0,h.Z)(this,"timeoutId",null),(0,h.Z)(this,"warningUnhooked",function(){}),(0,h.Z)(this,"updateStore",function(e){n.store=e}),(0,h.Z)(this,"getFieldEntities",function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return e?n.fieldEntities.filter(function(e){return e.getNamePath().length}):n.fieldEntities}),(0,h.Z)(this,"getFieldsMap",function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=new eS;return n.getFieldEntities(e).forEach(function(e){var n=e.getNamePath();t.set(n,e)}),t}),(0,h.Z)(this,"getFieldEntitiesForNamePathList",function(e){if(!e)return n.getFieldEntities(!0);var t=n.getFieldsMap(!0);return e.map(function(e){var n=ei(e);return t.get(n)||{INVALIDATE_NAME_PATH:ei(e)}})}),(0,h.Z)(this,"getFieldsValue",function(e,t){if(n.warningUnhooked(),!0===e||Array.isArray(e)?(r=e,o=t):e&&"object"===(0,eo.Z)(e)&&(a=e.strict,o=e.filter),!0===r&&!o)return n.store;var r,o,a,i=n.getFieldEntitiesForNamePathList(Array.isArray(r)?r:null),s=[];return i.forEach(function(e){var t,n,i,l="INVALIDATE_NAME_PATH"in e?e.INVALIDATE_NAME_PATH:e.getNamePath();if(a){if(null!==(i=e.isList)&&void 0!==i&&i.call(e))return}else if(!r&&null!==(t=(n=e).isListField)&&void 0!==t&&t.call(n))return;if(o){var c="getMeta"in e?e.getMeta():null;o(c)&&s.push(l)}else s.push(l)}),es(n.store,s.map(ei))}),(0,h.Z)(this,"getFieldValue",function(e){n.warningUnhooked();var t=ei(e);return(0,ea.Z)(n.store,t)}),(0,h.Z)(this,"getFieldsError",function(e){return n.warningUnhooked(),n.getFieldEntitiesForNamePathList(e).map(function(t,n){return!t||"INVALIDATE_NAME_PATH"in t?{name:ei(e[n]),errors:[],warnings:[]}:{name:t.getNamePath(),errors:t.getErrors(),warnings:t.getWarnings()}})}),(0,h.Z)(this,"getFieldError",function(e){n.warningUnhooked();var t=ei(e);return n.getFieldsError([t])[0].errors}),(0,h.Z)(this,"getFieldWarning",function(e){n.warningUnhooked();var t=ei(e);return n.getFieldsError([t])[0].warnings}),(0,h.Z)(this,"isFieldsTouched",function(){n.warningUnhooked();for(var e,t=arguments.length,r=Array(t),o=0;o0&&void 0!==arguments[0]?arguments[0]:{},r=new eS,o=n.getFieldEntities(!0);o.forEach(function(e){var t=e.props.initialValue,n=e.getNamePath();if(void 0!==t){var o=r.get(n)||new Set;o.add({entity:e,value:t}),r.set(n,o)}}),t.entities?e=t.entities:t.namePathList?(e=[],t.namePathList.forEach(function(t){var n,o=r.get(t);o&&(n=e).push.apply(n,(0,u.Z)((0,u.Z)(o).map(function(e){return e.entity})))})):e=o,function(e){e.forEach(function(e){if(void 0!==e.props.initialValue){var o=e.getNamePath();if(void 0!==n.getInitialValue(o))(0,v.ZP)(!1,"Form already set 'initialValues' with path '".concat(o.join("."),"'. Field can not overwrite it."));else{var a=r.get(o);if(a&&a.size>1)(0,v.ZP)(!1,"Multiple Field with path '".concat(o.join("."),"' set 'initialValue'. Can not decide which one to pick."));else if(a){var i=n.getFieldValue(o);e.isListField()||t.skipExist&&void 0!==i||n.updateStore((0,Q.Z)(n.store,o,(0,u.Z)(a)[0].value))}}}})}(e)}),(0,h.Z)(this,"resetFields",function(e){n.warningUnhooked();var t=n.store;if(!e){n.updateStore((0,Q.T)(n.initialValues)),n.resetWithFieldInitialValue(),n.notifyObservers(t,null,{type:"reset"}),n.notifyWatch();return}var r=e.map(ei);r.forEach(function(e){var t=n.getInitialValue(e);n.updateStore((0,Q.Z)(n.store,e,t))}),n.resetWithFieldInitialValue({namePathList:r}),n.notifyObservers(t,r,{type:"reset"}),n.notifyWatch(r)}),(0,h.Z)(this,"setFields",function(e){n.warningUnhooked();var t=n.store,r=[];e.forEach(function(e){var o=e.name,a=(0,i.Z)(e,ew),s=ei(o);r.push(s),"value"in a&&n.updateStore((0,Q.Z)(n.store,s,a.value)),n.notifyObservers(t,[s],{type:"setField",data:e})}),n.notifyWatch(r)}),(0,h.Z)(this,"getFields",function(){return n.getFieldEntities(!0).map(function(e){var t=e.getNamePath(),r=e.getMeta(),o=(0,c.Z)((0,c.Z)({},r),{},{name:t,value:n.getFieldValue(t)});return Object.defineProperty(o,"originRCField",{value:!0}),o})}),(0,h.Z)(this,"initEntityValue",function(e){var t=e.props.initialValue;if(void 0!==t){var r=e.getNamePath();void 0===(0,ea.Z)(n.store,r)&&n.updateStore((0,Q.Z)(n.store,r,t))}}),(0,h.Z)(this,"isMergedPreserve",function(e){var t=void 0!==e?e:n.preserve;return null==t||t}),(0,h.Z)(this,"registerField",function(e){n.fieldEntities.push(e);var t=e.getNamePath();if(n.notifyWatch([t]),void 0!==e.props.initialValue){var r=n.store;n.resetWithFieldInitialValue({entities:[e],skipExist:!0}),n.notifyObservers(r,[e.getNamePath()],{type:"valueUpdate",source:"internal"})}return function(r,o){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];if(n.fieldEntities=n.fieldEntities.filter(function(t){return t!==e}),!n.isMergedPreserve(o)&&(!r||a.length>1)){var i=r?void 0:n.getInitialValue(t);if(t.length&&n.getFieldValue(t)!==i&&n.fieldEntities.every(function(e){return!ec(e.getNamePath(),t)})){var s=n.store;n.updateStore((0,Q.Z)(s,t,i,!0)),n.notifyObservers(s,[t],{type:"remove"}),n.triggerDependenciesUpdate(s,t)}}n.notifyWatch([t])}}),(0,h.Z)(this,"dispatch",function(e){switch(e.type){case"updateValue":var t=e.namePath,r=e.value;n.updateValue(t,r);break;case"validateField":var o=e.namePath,a=e.triggerName;n.validateFields([o],{triggerName:a})}}),(0,h.Z)(this,"notifyObservers",function(e,t,r){if(n.subscribable){var o=(0,c.Z)((0,c.Z)({},r),{},{store:n.getFieldsValue(!0)});n.getFieldEntities().forEach(function(n){(0,n.onStoreChange)(e,t,o)})}else n.forceRootUpdate()}),(0,h.Z)(this,"triggerDependenciesUpdate",function(e,t){var r=n.getDependencyChildrenFields(t);return r.length&&n.validateFields(r),n.notifyObservers(e,r,{type:"dependenciesUpdate",relatedFields:[t].concat((0,u.Z)(r))}),r}),(0,h.Z)(this,"updateValue",function(e,t){var r=ei(e),o=n.store;n.updateStore((0,Q.Z)(n.store,r,t)),n.notifyObservers(o,[r],{type:"valueUpdate",source:"internal"}),n.notifyWatch([r]);var a=n.triggerDependenciesUpdate(o,r),i=n.callbacks.onValuesChange;i&&i(es(n.store,[r]),n.getFieldsValue()),n.triggerOnFieldsChange([r].concat((0,u.Z)(a)))}),(0,h.Z)(this,"setFieldsValue",function(e){n.warningUnhooked();var t=n.store;if(e){var r=(0,Q.T)(n.store,e);n.updateStore(r)}n.notifyObservers(t,null,{type:"valueUpdate",source:"external"}),n.notifyWatch()}),(0,h.Z)(this,"setFieldValue",function(e,t){n.setFields([{name:e,value:t}])}),(0,h.Z)(this,"getDependencyChildrenFields",function(e){var t=new Set,r=[],o=new eS;return n.getFieldEntities().forEach(function(e){(e.props.dependencies||[]).forEach(function(t){var n=ei(t);o.update(n,function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Set;return t.add(e),t})})}),function e(n){(o.get(n)||new Set).forEach(function(n){if(!t.has(n)){t.add(n);var o=n.getNamePath();n.isFieldDirty()&&o.length&&(r.push(o),e(o))}})}(e),r}),(0,h.Z)(this,"triggerOnFieldsChange",function(e,t){var r=n.callbacks.onFieldsChange;if(r){var o=n.getFields();if(t){var a=new eS;t.forEach(function(e){var t=e.name,n=e.errors;a.set(t,n)}),o.forEach(function(e){e.errors=a.get(e.name)||e.errors})}var i=o.filter(function(t){return el(e,t.name)});i.length&&r(i,o)}}),(0,h.Z)(this,"validateFields",function(e,t){n.warningUnhooked(),Array.isArray(e)||"string"==typeof e||"string"==typeof t?(i=e,s=t):s=e;var r,o,a,i,s,l=!!i,d=l?i.map(ei):[],p=[],f=String(Date.now()),m=new Set,g=s||{},h=g.recursive,b=g.dirty;n.getFieldEntities(!0).forEach(function(e){if(l||d.push(e.getNamePath()),e.props.rules&&e.props.rules.length&&(!b||e.isFieldDirty())){var t=e.getNamePath();if(m.add(t.join(f)),!l||el(d,t,h)){var r=e.validateRules((0,c.Z)({validateMessages:(0,c.Z)((0,c.Z)({},X),n.validateMessages)},s));p.push(r.then(function(){return{name:t,errors:[],warnings:[]}}).catch(function(e){var n,r=[],o=[];return(null===(n=e.forEach)||void 0===n||n.call(e,function(e){var t=e.rule.warningOnly,n=e.errors;t?o.push.apply(o,(0,u.Z)(n)):r.push.apply(r,(0,u.Z)(n))}),r.length)?Promise.reject({name:t,errors:r,warnings:o}):{name:t,errors:r,warnings:o}}))}}});var y=(r=!1,o=p.length,a=[],p.length?new Promise(function(e,t){p.forEach(function(n,i){n.catch(function(e){return r=!0,e}).then(function(n){o-=1,a[i]=n,o>0||(r&&t(a),e(a))})})}):Promise.resolve([]));n.lastValidatePromise=y,y.catch(function(e){return e}).then(function(e){var t=e.map(function(e){return e.name});n.notifyObservers(n.store,t,{type:"validateFinish"}),n.triggerOnFieldsChange(t,e)});var v=y.then(function(){return n.lastValidatePromise===y?Promise.resolve(n.getFieldsValue(d)):Promise.reject([])}).catch(function(e){var t=e.filter(function(e){return e&&e.errors.length});return Promise.reject({values:n.getFieldsValue(d),errorFields:t,outOfDate:n.lastValidatePromise!==y})});v.catch(function(e){return e});var E=d.filter(function(e){return m.has(e.join(f))});return n.triggerOnFieldsChange(E),v}),(0,h.Z)(this,"submit",function(){n.warningUnhooked(),n.validateFields().then(function(e){var t=n.callbacks.onFinish;if(t)try{t(e)}catch(e){console.error(e)}}).catch(function(e){var t=n.callbacks.onFinishFailed;t&&t(e)})}),this.forceRootUpdate=t}),eO=function(e){var t=o.useRef(),n=o.useState({}),r=(0,ey.Z)(n,2)[1];if(!t.current){if(e)t.current=e;else{var a=new ex(function(){r({})});t.current=a.getForm()}}return[t.current]},eA=o.createContext({triggerFormChange:function(){},triggerFormFinish:function(){},registerForm:function(){},unregisterForm:function(){}}),eT=function(e){var t=e.validateMessages,n=e.onFormChange,r=e.onFormFinish,a=e.children,i=o.useContext(eA),s=o.useRef({});return o.createElement(eA.Provider,{value:(0,c.Z)((0,c.Z)({},i),{},{validateMessages:(0,c.Z)((0,c.Z)({},i.validateMessages),t),triggerFormChange:function(e,t){n&&n(e,{changedFields:t,forms:s.current}),i.triggerFormChange(e,t)},triggerFormFinish:function(e,t){r&&r(e,{values:t,forms:s.current}),i.triggerFormFinish(e,t)},registerForm:function(e,t){e&&(s.current=(0,c.Z)((0,c.Z)({},s.current),{},(0,h.Z)({},e,t))),i.registerForm(e,t)},unregisterForm:function(e){var t=(0,c.Z)({},s.current);delete t[e],s.current=t,i.unregisterForm(e)}})},a)},eC=["name","initialValues","fields","form","preserve","children","component","validateMessages","validateTrigger","onValuesChange","onFieldsChange","onFinish","onFinishFailed"];function ek(e){try{return JSON.stringify(e)}catch(e){return Math.random()}}var eI=function(){},eN=function(){for(var e=arguments.length,t=Array(e),n=0;n1?t-1:0),o=1;oen;(0,c.useImperativeHandle)(t,function(){return{focus:$,blur:function(){var e;null===(e=G.current)||void 0===e||e.blur()},setSelectionRange:function(e,t,n){var r;null===(r=G.current)||void 0===r||r.setSelectionRange(e,t,n)},select:function(){var e;null===(e=G.current)||void 0===e||e.select()},input:G.current}}),(0,c.useEffect)(function(){z(function(e){return(!e||!A)&&e})},[A]);var ea=function(e,t,n){var r,o,a=t;if(!H.current&&et.exceedFormatter&&et.max&&et.strategy(t)>et.max)a=et.exceedFormatter(t,{max:et.max}),t!==a&&ee([(null===(r=G.current)||void 0===r?void 0:r.selectionStart)||0,(null===(o=G.current)||void 0===o?void 0:o.selectionEnd)||0]);else if("compositionEnd"===n.source)return;Y(a),G.current&&(0,u.rJ)(G.current,e,s,a)};(0,c.useEffect)(function(){if(J){var e;null===(e=G.current)||void 0===e||e.setSelectionRange.apply(e,(0,p.Z)(J))}},[J]);var ei=eo&&"".concat(O,"-out-of-range");return c.createElement(d,(0,o.Z)({},F,{prefixCls:O,className:l()(C,ei),handleReset:function(e){Y(""),$(),G.current&&(0,u.rJ)(G.current,e,s)},value:K,focused:Z,triggerFocus:$,suffix:function(){var e=Number(en)>0;if(I||et.show){var t=et.showFormatter?et.showFormatter({value:K,count:er,maxLength:en}):"".concat(er).concat(e?" / ".concat(en):"");return c.createElement(c.Fragment,null,et.show&&c.createElement("span",{className:l()("".concat(O,"-show-count-suffix"),(0,a.Z)({},"".concat(O,"-show-count-has-suffix"),!!I),null==M?void 0:M.count),style:(0,r.Z)({},null==L?void 0:L.count)},t),I)}return null}(),disabled:A,classes:P,classNames:M,styles:L}),(n=(0,h.Z)(e,["prefixCls","onPressEnter","addonBefore","addonAfter","prefix","suffix","allowClear","defaultValue","showCount","count","classes","htmlSize","styles","classNames"]),c.createElement("input",(0,o.Z)({autoComplete:i},n,{onChange:function(e){ea(e,e.target.value,{source:"change"})},onFocus:function(e){z(!0),null==v||v(e)},onBlur:function(e){z(!1),null==E||E(e)},onKeyDown:function(e){S&&"Enter"===e.key&&S(e),null==w||w(e)},className:l()(O,(0,a.Z)({},"".concat(O,"-disabled"),A),null==M?void 0:M.input),style:null==L?void 0:L.input,ref:G,size:T,type:void 0===R?"text":R,onCompositionStart:function(e){H.current=!0,null==D||D(e)},onCompositionEnd:function(e){H.current=!1,ea(e,e.currentTarget.value,{source:"compositionEnd"}),null==j||j(e)}}))))})},8002:function(e,t,n){function r(e){return!!(e.addonBefore||e.addonAfter)}function o(e){return!!(e.prefix||e.suffix||e.allowClear)}function a(e,t,n,r){if(n){var o=t;if("click"===t.type){var a=e.cloneNode(!0);o=Object.create(t,{target:{value:a},currentTarget:{value:a}}),a.value="",n(o);return}if("file"!==e.type&&void 0!==r){var i=e.cloneNode(!0);o=Object.create(t,{target:{value:i},currentTarget:{value:i}}),i.value=r,n(o);return}n(o)}}function i(e,t){if(e){e.focus(t);var n=(t||{}).cursor;if(n){var r=e.value.length;switch(n){case"start":e.setSelectionRange(0,0);break;case"end":e.setSelectionRange(r,r);break;default:e.setSelectionRange(0,r)}}}}n.d(t,{He:function(){return r},X3:function(){return o},nH:function(){return i},rJ:function(){return a}})},49367:function(e,t,n){n.d(t,{V4:function(){return eu},zt:function(){return E},ZP:function(){return ed}});var r,o,a,i,s,l=n(50833),c=n(5239),u=n(80406),d=n(6976),p=n(16480),f=n.n(p),m=n(97472),g=n(74084),h=n(64090),b=n(6787),y=["children"],v=h.createContext({});function E(e){var t=e.children,n=(0,b.Z)(e,y);return h.createElement(v.Provider,{value:n},t)}var S=n(47365),w=n(65127),x=n(27478),O=n(85430),A=function(e){(0,x.Z)(n,e);var t=(0,O.Z)(n);function n(){return(0,S.Z)(this,n),t.apply(this,arguments)}return(0,w.Z)(n,[{key:"render",value:function(){return this.props.children}}]),n}(h.Component),T=n(89211),C="none",k="appear",I="enter",N="leave",_="none",R="prepare",P="start",M="active",L="prepared",D=n(22127);function j(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}var F=(r=(0,D.Z)(),o=window,a={animationend:j("Animation","AnimationEnd"),transitionend:j("Transition","TransitionEnd")},!r||("AnimationEvent"in o||delete a.animationend.animation,"TransitionEvent"in o||delete a.transitionend.transition),a),B={};(0,D.Z)()&&(B=document.createElement("div").style);var U={};function Z(e){if(U[e])return U[e];var t=F[e];if(t)for(var n=Object.keys(t),r=n.length,o=0;o0&&(clearTimeout(eg.current),eg.current=setTimeout(function(){ey({deadline:!0})},O))),eT===L&&eb(),!0},a=(0,T.Z)(_),s=(i=(0,u.Z)(a,2))[0],d=i[1],p=function(){var e=h.useRef(null);function t(){Y.Z.cancel(e.current)}return h.useEffect(function(){return function(){t()}},[]),[function n(r){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2;t();var a=(0,Y.Z)(function(){o<=1?r({isCanceled:function(){return a!==e.current}}):n(r,o-1)});e.current=a},t]}(),m=(f=(0,u.Z)(p,2))[0],g=f[1],b=e?K:X,q(function(){if(s!==_&&"end"!==s){var e=b.indexOf(s),t=b[e+1],n=o(s);!1===n?d(t,!0):t&&m(function(e){function r(){e.isCanceled()||d(t,!0)}!0===n?r():Promise.resolve(n).then(r)})}},[el,s]),h.useEffect(function(){return function(){g()}},[]),[function(){d(R,!0)},s]),eO=(0,u.Z)(ex,2),eA=eO[0],eT=eO[1],eC=Q(eT);eh.current=eC,q(function(){ea(t);var n,r=em.current;em.current=!0,!r&&t&&S&&(n=k),r&&t&&v&&(n=I),(r&&!t&&x||!r&&A&&!t&&x)&&(n=N);var o=eS(n);n&&(e||o[R])?(ec(n),eA()):ec(C)},[t]),(0,h.useEffect)(function(){(el!==k||S)&&(el!==I||v)&&(el!==N||x)||ec(C)},[S,v,x]),(0,h.useEffect)(function(){return function(){em.current=!1,clearTimeout(eg.current)}},[]);var ek=h.useRef(!1);(0,h.useEffect)(function(){eo&&(ek.current=!0),void 0!==eo&&el===C&&((ek.current||eo)&&(null==et||et(eo)),ek.current=!0)},[eo,el]);var eI=ep;return ew[R]&&eT===P&&(eI=(0,c.Z)({transition:"none"},eI)),[el,eT,eI,null!=eo?eo:t]}(S,r,function(){try{return w.current instanceof HTMLElement?w.current:(0,m.Z)(x.current)}catch(e){return null}},e),D=(0,u.Z)(O,4),j=D[0],F=D[1],B=D[2],U=D[3],Z=h.useRef(U);U&&(Z.current=!0);var z=h.useCallback(function(e){w.current=e,(0,g.mH)(t,e)},[t]),H=(0,c.Z)((0,c.Z)({},y),{},{visible:r});if(d){if(j===C)G=U?d((0,c.Z)({},H),z):!a&&Z.current&&b?d((0,c.Z)((0,c.Z)({},H),{},{className:b}),z):!s&&(a||b)?null:d((0,c.Z)((0,c.Z)({},H),{},{style:{display:"none"}}),z);else{F===R?ee="prepare":Q(F)?ee="active":F===P&&(ee="start");var G,J,ee,et=V(p,"".concat(j,"-").concat(ee));G=d((0,c.Z)((0,c.Z)({},H),{},{className:f()(V(p,j),(J={},(0,l.Z)(J,et,et&&ee),(0,l.Z)(J,p,"string"==typeof p),J)),style:B}),z)}}else G=null;return h.isValidElement(G)&&(0,g.Yr)(G)&&!G.ref&&(G=h.cloneElement(G,{ref:z})),h.createElement(A,{ref:x},G)})).displayName="CSSMotion",s),ee=n(14749),et=n(34951),en="keep",er="remove",eo="removed";function ea(e){var t;return t=e&&"object"===(0,d.Z)(e)&&"key"in e?e:{key:e},(0,c.Z)((0,c.Z)({},t),{},{key:String(t.key)})}function ei(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return e.map(ea)}var es=["component","children","onVisibleChanged","onAllRemoved"],el=["status"],ec=["eventProps","visible","children","motionName","motionAppear","motionEnter","motionLeave","motionLeaveImmediately","motionDeadline","removeOnLeave","leavedClassName","onAppearPrepare","onAppearStart","onAppearActive","onAppearEnd","onEnterStart","onEnterActive","onEnterEnd","onLeaveStart","onLeaveActive","onLeaveEnd"],eu=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:J,n=function(e){(0,x.Z)(r,e);var n=(0,O.Z)(r);function r(){var e;(0,S.Z)(this,r);for(var t=arguments.length,o=Array(t),a=0;a0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=[],r=0,o=t.length,a=ei(e),i=ei(t);a.forEach(function(e){for(var t=!1,a=r;a1}).forEach(function(e){(n=n.filter(function(t){var n=t.key,r=t.status;return n!==e||r!==er})).forEach(function(t){t.key===e&&(t.status=en)})}),n})(r,ei(n)).filter(function(e){var t=r.find(function(t){var n=t.key;return e.key===n});return!t||t.status!==eo||e.status!==er})}}}]),r}(h.Component);return(0,l.Z)(n,"defaultProps",{component:"div"}),n}(G),ed=J},54739:function(e,t,n){n.d(t,{Z:function(){return I}});var r=n(14749),o=n(5239),a=n(80406),i=n(6787),s=n(64090),l=n(16480),c=n.n(l),u=n(46505),d=n(24800),p=["prefixCls","invalidate","item","renderItem","responsive","responsiveDisabled","registerSize","itemKey","className","style","children","display","order","component"],f=void 0,m=s.forwardRef(function(e,t){var n,a=e.prefixCls,l=e.invalidate,d=e.item,m=e.renderItem,g=e.responsive,h=e.responsiveDisabled,b=e.registerSize,y=e.itemKey,v=e.className,E=e.style,S=e.children,w=e.display,x=e.order,O=e.component,A=(0,i.Z)(e,p),T=g&&!w;s.useEffect(function(){return function(){b(y,null)}},[]);var C=m&&d!==f?m(d):S;l||(n={opacity:T?0:1,height:T?0:f,overflowY:T?"hidden":f,order:g?x:f,pointerEvents:T?"none":f,position:T?"absolute":f});var k={};T&&(k["aria-hidden"]=!0);var I=s.createElement(void 0===O?"div":O,(0,r.Z)({className:c()(!l&&a,v),style:(0,o.Z)((0,o.Z)({},n),E)},k,A,{ref:t}),C);return g&&(I=s.createElement(u.Z,{onResize:function(e){b(y,e.offsetWidth)},disabled:h},I)),I});m.displayName="Item";var g=n(54811),h=n(89542),b=n(19223);function y(e,t){var n=s.useState(t),r=(0,a.Z)(n,2),o=r[0],i=r[1];return[o,(0,g.Z)(function(t){e(function(){i(t)})})]}var v=s.createContext(null),E=["component"],S=["className"],w=["className"],x=s.forwardRef(function(e,t){var n=s.useContext(v);if(!n){var o=e.component,a=(0,i.Z)(e,E);return s.createElement(void 0===o?"div":o,(0,r.Z)({},a,{ref:t}))}var l=n.className,u=(0,i.Z)(n,S),d=e.className,p=(0,i.Z)(e,w);return s.createElement(v.Provider,{value:null},s.createElement(m,(0,r.Z)({ref:t,className:c()(l,d)},u,p)))});x.displayName="RawItem";var O=["prefixCls","data","renderItem","renderRawItem","itemKey","itemWidth","ssr","style","className","maxCount","renderRest","renderRawRest","suffix","component","itemComponent","onVisibleChange"],A="responsive",T="invalidate";function C(e){return"+ ".concat(e.length," ...")}var k=s.forwardRef(function(e,t){var n,l,p=e.prefixCls,f=void 0===p?"rc-overflow":p,g=e.data,E=void 0===g?[]:g,S=e.renderItem,w=e.renderRawItem,x=e.itemKey,k=e.itemWidth,I=void 0===k?10:k,N=e.ssr,_=e.style,R=e.className,P=e.maxCount,M=e.renderRest,L=e.renderRawRest,D=e.suffix,j=e.component,F=e.itemComponent,B=e.onVisibleChange,U=(0,i.Z)(e,O),Z="full"===N,z=(n=s.useRef(null),function(e){n.current||(n.current=[],function(e){if("undefined"==typeof MessageChannel)(0,b.Z)(e);else{var t=new MessageChannel;t.port1.onmessage=function(){return e()},t.port2.postMessage(void 0)}}(function(){(0,h.unstable_batchedUpdates)(function(){n.current.forEach(function(e){e()}),n.current=null})})),n.current.push(e)}),H=y(z,null),G=(0,a.Z)(H,2),$=G[0],W=G[1],V=$||0,q=y(z,new Map),Y=(0,a.Z)(q,2),K=Y[0],X=Y[1],Q=y(z,0),J=(0,a.Z)(Q,2),ee=J[0],et=J[1],en=y(z,0),er=(0,a.Z)(en,2),eo=er[0],ea=er[1],ei=y(z,0),es=(0,a.Z)(ei,2),el=es[0],ec=es[1],eu=(0,s.useState)(null),ed=(0,a.Z)(eu,2),ep=ed[0],ef=ed[1],em=(0,s.useState)(null),eg=(0,a.Z)(em,2),eh=eg[0],eb=eg[1],ey=s.useMemo(function(){return null===eh&&Z?Number.MAX_SAFE_INTEGER:eh||0},[eh,$]),ev=(0,s.useState)(!1),eE=(0,a.Z)(ev,2),eS=eE[0],ew=eE[1],ex="".concat(f,"-item"),eO=Math.max(ee,eo),eA=P===A,eT=E.length&&eA,eC=P===T,ek=eT||"number"==typeof P&&E.length>P,eI=(0,s.useMemo)(function(){var e=E;return eT?e=null===$&&Z?E:E.slice(0,Math.min(E.length,V/I)):"number"==typeof P&&(e=E.slice(0,P)),e},[E,I,$,P,eT]),eN=(0,s.useMemo)(function(){return eT?E.slice(ey+1):E.slice(eI.length)},[E,eI,eT,ey]),e_=(0,s.useCallback)(function(e,t){var n;return"function"==typeof x?x(e):null!==(n=x&&(null==e?void 0:e[x]))&&void 0!==n?n:t},[x]),eR=(0,s.useCallback)(S||function(e){return e},[S]);function eP(e,t,n){(eh!==e||void 0!==t&&t!==ep)&&(eb(e),n||(ew(eV){eP(r-1,e-o-el+eo);break}}D&&eL(0)+el>V&&ef(null)}},[V,K,eo,el,e_,eI]);var eD=eS&&!!eN.length,ej={};null!==ep&&eT&&(ej={position:"absolute",left:ep,top:0});var eF={prefixCls:ex,responsive:eT,component:F,invalidate:eC},eB=w?function(e,t){var n=e_(e,t);return s.createElement(v.Provider,{key:n,value:(0,o.Z)((0,o.Z)({},eF),{},{order:t,item:e,itemKey:n,registerSize:eM,display:t<=ey})},w(e,t))}:function(e,t){var n=e_(e,t);return s.createElement(m,(0,r.Z)({},eF,{order:t,key:n,item:e,renderItem:eR,itemKey:n,registerSize:eM,display:t<=ey}))},eU={order:eD?ey:Number.MAX_SAFE_INTEGER,className:"".concat(ex,"-rest"),registerSize:function(e,t){ea(t),et(eo)},display:eD};if(L)L&&(l=s.createElement(v.Provider,{value:(0,o.Z)((0,o.Z)({},eF),eU)},L(eN)));else{var eZ=M||C;l=s.createElement(m,(0,r.Z)({},eF,eU),"function"==typeof eZ?eZ(eN):eZ)}var ez=s.createElement(void 0===j?"div":j,(0,r.Z)({className:c()(!eC&&f,R),style:_,ref:t},U),eI.map(eB),ek?l:null,D&&s.createElement(m,(0,r.Z)({},eF,{responsive:eA,responsiveDisabled:!eT,order:ey,className:"".concat(ex,"-suffix"),registerSize:function(e,t){ec(t)},display:!0,style:ej}),D));return eA&&(ez=s.createElement(u.Z,{onResize:function(e,t){W(t.clientWidth)},disabled:!eT},ez)),ez});k.displayName="Overflow",k.Item=x,k.RESPONSIVE=A,k.INVALIDATE=T;var I=k},46505:function(e,t,n){n.d(t,{Z:function(){return U}});var r=n(14749),o=n(64090),a=n(33054);n(53850);var i=n(5239),s=n(6976),l=n(97472),c=n(74084),u=o.createContext(null),d=function(){if("undefined"!=typeof Map)return Map;function e(e,t){var n=-1;return e.some(function(e,r){return e[0]===t&&(n=r,!0)}),n}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(t){var n=e(this.__entries__,t),r=this.__entries__[n];return r&&r[1]},t.prototype.set=function(t,n){var r=e(this.__entries__,t);~r?this.__entries__[r][1]=n:this.__entries__.push([t,n])},t.prototype.delete=function(t){var n=this.__entries__,r=e(n,t);~r&&n.splice(r,1)},t.prototype.has=function(t){return!!~e(this.__entries__,t)},t.prototype.clear=function(){this.__entries__.splice(0)},t.prototype.forEach=function(e,t){void 0===t&&(t=null);for(var n=0,r=this.__entries__;n0},e.prototype.connect_=function(){p&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),h?(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(){p&&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(e){var t=e.propertyName,n=void 0===t?"":t;g.some(function(e){return!!~n.indexOf(e)})&&this.refresh()},e.getInstance=function(){return this.instance_||(this.instance_=new e),this.instance_},e.instance_=null,e}(),y=function(e,t){for(var n=0,r=Object.keys(t);n0},e}(),k="undefined"!=typeof WeakMap?new WeakMap:new d,I=function e(t){if(!(this instanceof e))throw TypeError("Cannot call a class as a function.");if(!arguments.length)throw TypeError("1 argument required, but only 0 present.");var n=new C(t,b.getInstance(),this);k.set(this,n)};["observe","unobserve","disconnect"].forEach(function(e){I.prototype[e]=function(){var t;return(t=k.get(this))[e].apply(t,arguments)}});var N=void 0!==f.ResizeObserver?f.ResizeObserver:I,_=new Map,R=new N(function(e){e.forEach(function(e){var t,n=e.target;null===(t=_.get(n))||void 0===t||t.forEach(function(e){return e(n)})})}),P=n(47365),M=n(65127),L=n(27478),D=n(85430),j=function(e){(0,L.Z)(n,e);var t=(0,D.Z)(n);function n(){return(0,P.Z)(this,n),t.apply(this,arguments)}return(0,M.Z)(n,[{key:"render",value:function(){return this.props.children}}]),n}(o.Component),F=o.forwardRef(function(e,t){var n=e.children,r=e.disabled,a=o.useRef(null),d=o.useRef(null),p=o.useContext(u),f="function"==typeof n,m=f?n(a):n,g=o.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),h=!f&&o.isValidElement(m)&&(0,c.Yr)(m),b=h?m.ref:null,y=(0,c.x1)(b,a),v=function(){var e;return(0,l.Z)(a.current)||(a.current&&"object"===(0,s.Z)(a.current)?(0,l.Z)(null===(e=a.current)||void 0===e?void 0:e.nativeElement):null)||(0,l.Z)(d.current)};o.useImperativeHandle(t,function(){return v()});var E=o.useRef(e);E.current=e;var S=o.useCallback(function(e){var t=E.current,n=t.onResize,r=t.data,o=e.getBoundingClientRect(),a=o.width,s=o.height,l=e.offsetWidth,c=e.offsetHeight,u=Math.floor(a),d=Math.floor(s);if(g.current.width!==u||g.current.height!==d||g.current.offsetWidth!==l||g.current.offsetHeight!==c){var f={width:u,height:d,offsetWidth:l,offsetHeight:c};g.current=f;var m=(0,i.Z)((0,i.Z)({},f),{},{offsetWidth:l===Math.round(a)?a:l,offsetHeight:c===Math.round(s)?s:c});null==p||p(m,e,r),n&&Promise.resolve().then(function(){n(m,e)})}},[]);return o.useEffect(function(){var e=v();return e&&!r&&(_.has(e)||(_.set(e,new Set),R.observe(e)),_.get(e).add(S)),function(){_.has(e)&&(_.get(e).delete(S),_.get(e).size||(R.unobserve(e),_.delete(e)))}},[a.current,r]),o.createElement(j,{ref:d},h?o.cloneElement(m,{ref:y}):m)}),B=o.forwardRef(function(e,t){var n=e.children;return("function"==typeof n?[n]:(0,a.Z)(n)).map(function(n,a){var i=(null==n?void 0:n.key)||"".concat("rc-observer-key","-").concat(a);return o.createElement(F,(0,r.Z)({},e,{key:i,ref:0===a?t:void 0}),n)})});B.Collection=function(e){var t=e.children,n=e.onBatchResize,r=o.useRef(0),a=o.useRef([]),i=o.useContext(u),s=o.useCallback(function(e,t,o){r.current+=1;var s=r.current;a.current.push({size:e,element:t,data:o}),Promise.resolve().then(function(){s===r.current&&(null==n||n(a.current),a.current=[])}),null==i||i(e,t,o)},[n,i]);return o.createElement(u.Provider,{value:s},t)};var U=B},33054:function(e,t,n){n.d(t,{Z:function(){return function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=[];return r.Children.forEach(t,function(t){(null!=t||n.keepEmpty)&&(Array.isArray(t)?a=a.concat(e(t)):(0,o.isFragment)(t)&&t.props?a=a.concat(e(t.props.children,n)):a.push(t))}),a}}});var r=n(64090),o=n(24185)},22127:function(e,t,n){n.d(t,{Z:function(){return r}});function r(){return!!window.document&&!!window.document.createElement}},31506:function(e,t,n){n.d(t,{Z:function(){return r}});function r(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}},24050:function(e,t,n){n.d(t,{hq:function(){return m},jL:function(){return f}});var r=n(22127),o=n(31506),a="data-rc-order",i="data-rc-priority",s=new Map;function l(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.mark;return t?t.startsWith("data-")?t:"data-".concat(t):"rc-util-key"}function c(e){return e.attachTo?e.attachTo:document.querySelector("head")||document.body}function u(e){return Array.from((s.get(e)||e).children).filter(function(e){return"STYLE"===e.tagName})}function d(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!(0,r.Z)())return null;var n=t.csp,o=t.prepend,s=t.priority,l=void 0===s?0:s,d="queue"===o?"prependQueue":o?"prepend":"append",p="prependQueue"===d,f=document.createElement("style");f.setAttribute(a,d),p&&l&&f.setAttribute(i,"".concat(l)),null!=n&&n.nonce&&(f.nonce=null==n?void 0:n.nonce),f.innerHTML=e;var m=c(t),g=m.firstChild;if(o){if(p){var h=u(m).filter(function(e){return!!["prepend","prependQueue"].includes(e.getAttribute(a))&&l>=Number(e.getAttribute(i)||0)});if(h.length)return m.insertBefore(f,h[h.length-1].nextSibling),f}m.insertBefore(f,g)}else m.appendChild(f);return f}function p(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return u(c(t)).find(function(n){return n.getAttribute(l(t))===e})}function f(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=p(e,t);n&&c(t).removeChild(n)}function m(e,t){var n,r,a,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};!function(e,t){var n=s.get(e);if(!n||!(0,o.Z)(document,n)){var r=d("",t),a=r.parentNode;s.set(e,a),e.removeChild(r)}}(c(i),i);var u=p(t,i);if(u)return null!==(n=i.csp)&&void 0!==n&&n.nonce&&u.nonce!==(null===(r=i.csp)||void 0===r?void 0:r.nonce)&&(u.nonce=null===(a=i.csp)||void 0===a?void 0:a.nonce),u.innerHTML!==e&&(u.innerHTML=e),u;var f=d(e,i);return f.setAttribute(l(i),t),f}},97472:function(e,t,n){n.d(t,{S:function(){return a},Z:function(){return i}});var r=n(64090),o=n(89542);function a(e){return e instanceof HTMLElement||e instanceof SVGElement}function i(e){return a(e)?e:e instanceof r.Component?o.findDOMNode(e):null}},73193:function(e,t,n){n.d(t,{Z:function(){return r}});function r(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 o=e.getBoundingClientRect(),a=o.width,i=o.height;if(a||i)return!0}}return!1}},74687:function(e,t,n){function r(e){var t;return null==e||null===(t=e.getRootNode)||void 0===t?void 0:t.call(e)}function o(e){return r(e) instanceof ShadowRoot?r(e):null}n.d(t,{A:function(){return o}})},4295:function(e,t){var n={MAC_ENTER:3,BACKSPACE:8,TAB:9,NUM_CENTER:12,ENTER:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PRINT_SCREEN:44,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,QUESTION_MARK:63,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,META:91,WIN_KEY_RIGHT:92,CONTEXT_MENU:93,NUM_ZERO:96,NUM_ONE:97,NUM_TWO:98,NUM_THREE:99,NUM_FOUR:100,NUM_FIVE:101,NUM_SIX:102,NUM_SEVEN:103,NUM_EIGHT:104,NUM_NINE:105,NUM_MULTIPLY:106,NUM_PLUS:107,NUM_MINUS:109,NUM_PERIOD:110,NUM_DIVISION:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,NUMLOCK:144,SEMICOLON:186,DASH:189,EQUALS:187,COMMA:188,PERIOD:190,SLASH:191,APOSTROPHE:192,SINGLE_QUOTE:222,OPEN_SQUARE_BRACKET:219,BACKSLASH:220,CLOSE_SQUARE_BRACKET:221,WIN_KEY:224,MAC_FF_META:224,WIN_IME:229,isTextModifyingKeyEvent:function(e){var t=e.keyCode;if(e.altKey&&!e.ctrlKey||e.metaKey||t>=n.F1&&t<=n.F12)return!1;switch(t){case n.ALT:case n.CAPS_LOCK:case n.CONTEXT_MENU:case n.CTRL:case n.DOWN:case n.END:case n.ESC:case n.HOME:case n.INSERT:case n.LEFT:case n.MAC_FF_META:case n.META:case n.NUMLOCK:case n.NUM_CENTER:case n.PAGE_DOWN:case n.PAGE_UP:case n.PAUSE:case n.PRINT_SCREEN:case n.RIGHT:case n.SHIFT:case n.UP:case n.WIN_KEY:case n.WIN_KEY_RIGHT:return!1;default:return!0}},isCharacterKey:function(e){if(e>=n.ZERO&&e<=n.NINE||e>=n.NUM_ZERO&&e<=n.NUM_MULTIPLY||e>=n.A&&e<=n.Z||-1!==window.navigator.userAgent.indexOf("WebKit")&&0===e)return!0;switch(e){case n.SPACE:case n.QUESTION_MARK:case n.NUM_PLUS:case n.NUM_MINUS:case n.NUM_PERIOD:case n.NUM_DIVISION:case n.SEMICOLON:case n.DASH:case n.EQUALS:case n.COMMA:case n.PERIOD:case n.SLASH:case n.APOSTROPHE:case n.SINGLE_QUOTE:case n.OPEN_SQUARE_BRACKET:case n.BACKSLASH:case n.CLOSE_SQUARE_BRACKET:return!0;default:return!1}}};t.Z=n},37274:function(e,t,n){n.d(t,{s:function(){return h},v:function(){return y}});var r,o,a=n(86926),i=n(74902),s=n(6976),l=n(5239),c=n(89542),u=(0,l.Z)({},r||(r=n.t(c,2))),d=u.version,p=u.render,f=u.unmountComponentAtNode;try{Number((d||"").split(".")[0])>=18&&(o=u.createRoot)}catch(e){}function m(e){var t=u.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;t&&"object"===(0,s.Z)(t)&&(t.usingClientEntryPoint=e)}var g="__rc_react_root__";function h(e,t){if(o){var n;m(!0),n=t[g]||o(t),m(!1),n.render(e),t[g]=n;return}p(e,t)}function b(){return(b=(0,i.Z)((0,a.Z)().mark(function e(t){return(0,a.Z)().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Promise.resolve().then(function(){var e;null===(e=t[g])||void 0===e||e.unmount(),delete t[g]}));case 1:case"end":return e.stop()}},e)}))).apply(this,arguments)}function y(e){return v.apply(this,arguments)}function v(){return(v=(0,i.Z)((0,a.Z)().mark(function e(t){return(0,a.Z)().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!(void 0!==o)){e.next=2;break}return e.abrupt("return",function(e){return b.apply(this,arguments)}(t));case 2:f(t);case 3:case"end":return e.stop()}},e)}))).apply(this,arguments)}},54811:function(e,t,n){n.d(t,{Z:function(){return o}});var r=n(64090);function o(e){var t=r.useRef();return t.current=e,r.useCallback(function(){for(var e,n=arguments.length,r=Array(n),o=0;o2&&void 0!==arguments[2]&&arguments[2],a=new Set;return function e(t,i){var s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,l=a.has(t);if((0,o.ZP)(!l,"Warning: There may be circular references"),l)return!1;if(t===i)return!0;if(n&&s>1)return!1;a.add(t);var c=s+1;if(Array.isArray(t)){if(!Array.isArray(i)||t.length!==i.length)return!1;for(var u=0;u
- +
- + {page == "api-keys" ? ( ) : page == "models" ? ( { token={token} accessToken={accessToken} /> - ) - : page == "users" ? ( + ) : page == "users" ? ( + ) : page == "teams" ? ( + - ) - : ( + ) : page == "admin-panel" ? ( + + ) : ( >; +} +import { + userUpdateUserCall, + Member, + userGetAllUsersCall, + User, +} from "./networking"; + +const AdminPanel: React.FC = ({ + searchParams, + accessToken, +}) => { + const [form] = Form.useForm(); + const [memberForm] = Form.useForm(); + const { Title, Paragraph } = Typography; + const [value, setValue] = useState(""); + const [admins, setAdmins] = useState(null); + + const [isAddMemberModalVisible, setIsAddMemberModalVisible] = useState(false); + + useEffect(() => { + // Fetch model info and set the default selected model + const fetchProxyAdminInfo = async () => { + if (accessToken != null) { + const combinedList: any[] = []; + const proxyViewers = await userGetAllUsersCall( + accessToken, + "proxy_admin_viewer" + ); + proxyViewers.forEach((viewer: User) => { + combinedList.push({ + user_role: viewer.user_role, + user_id: viewer.user_id, + user_email: viewer.user_email, + }); + }); + + console.log(`proxy viewers: ${proxyViewers}`); + + const proxyAdmins = await userGetAllUsersCall( + accessToken, + "proxy_admin" + ); + + proxyAdmins.forEach((admins: User) => { + combinedList.push({ + user_role: admins.user_role, + user_id: admins.user_id, + user_email: admins.user_email, + }); + }); + + console.log(`proxy admins: ${proxyAdmins}`); + console.log(`combinedList: ${combinedList}`); + setAdmins(combinedList); + } + }; + + fetchProxyAdminInfo(); + }, [accessToken]); + + const handleMemberOk = () => { + setIsAddMemberModalVisible(false); + memberForm.resetFields(); + }; + + const handleMemberCancel = () => { + setIsAddMemberModalVisible(false); + memberForm.resetFields(); + }; + + const handleMemberCreate = async (formValues: Record) => { + try { + if (accessToken != null && admins != null) { + message.info("Making API Call"); + const user_role: Member = { + role: "user", + user_email: formValues.user_email, + user_id: formValues.user_id, + }; + const response: any = await userUpdateUserCall(accessToken, formValues); + console.log(`response for team create call: ${response}`); + // Checking if the team exists in the list and updating or adding accordingly + const foundIndex = admins.findIndex((user) => { + console.log( + `user.user_id=${user.user_id}; response.user_id=${response.user_id}` + ); + return user.user_id === response.user_id; + }); + console.log(`foundIndex: ${foundIndex}`); + if (foundIndex == -1) { + console.log(`updates admin with new user`); + admins.push(response); + // If new user is found, update it + setAdmins(admins); // Set the new state + } + setIsAddMemberModalVisible(false); + } + } catch (error) { + console.error("Error creating the key:", error); + } + }; + console.log(`admins: ${admins?.length}`); + return ( +
+ Restricted Access + + Add other people to just view spend. They cannot create keys, teams or + grant users access to new models.{" "} + + Requires SSO Setup + + + + + + + + + Member Name + Role + Action + + + + + {admins + ? admins.map((member: any, index: number) => ( + + + {member["user_email"] + ? member["user_email"] + : member["user_id"] + ? member["user_id"] + : null} + + {member["user_role"]} + + + + + )) + : null} + +
+
+ + + + +
+ <> + + + +
OR
+ + + + +
+ Add member +
+
+
+ +
+
+ ); +}; + +export default AdminPanel; diff --git a/ui/litellm-dashboard/src/components/chat_ui.tsx b/ui/litellm-dashboard/src/components/chat_ui.tsx index edab67b2bad..b0cddbaa23e 100644 --- a/ui/litellm-dashboard/src/components/chat_ui.tsx +++ b/ui/litellm-dashboard/src/components/chat_ui.tsx @@ -1,17 +1,27 @@ import React, { useState, useEffect } from "react"; import ReactMarkdown from "react-markdown"; -import { Card, Title, Table, TableHead, TableRow, TableCell, TableBody, Grid, Tab, - TabGroup, - TabList, - TabPanel, - Metric, - Select, - SelectItem, - TabPanels, } from "@tremor/react"; -import { modelInfoCall } from "./networking"; +import { + Card, + Title, + Table, + TableHead, + TableRow, + TableCell, + TableBody, + Grid, + Tab, + TabGroup, + TabList, + TabPanel, + Metric, + Select, + SelectItem, + TabPanels, +} from "@tremor/react"; +import { modelAvailableCall } from "./networking"; import openai from "openai"; -import { Prism as SyntaxHighlighter } from 'react-syntax-highlighter'; - +import { Prism as SyntaxHighlighter } from "react-syntax-highlighter"; +import { Typography } from "antd"; interface ChatUIProps { accessToken: string | null; @@ -20,12 +30,19 @@ interface ChatUIProps { userID: string | null; } -async function generateModelResponse(inputMessage: string, updateUI: (chunk: string) => void, selectedModel: string, accessToken: string) { - // base url should be the current base_url - const isLocal = process.env.NODE_ENV === "development"; - console.log("isLocal:", isLocal); - const proxyBaseUrl = isLocal ? "http://localhost:4000" : window.location.origin; - const client = new openai.OpenAI({ +async function generateModelResponse( + inputMessage: string, + updateUI: (chunk: string) => void, + selectedModel: string, + accessToken: string +) { + // base url should be the current base_url + const isLocal = process.env.NODE_ENV === "development"; + console.log("isLocal:", isLocal); + const proxyBaseUrl = isLocal + ? "http://localhost:4000" + : window.location.origin; + const client = new openai.OpenAI({ apiKey: accessToken, // Replace with your OpenAI API key baseURL: proxyBaseUrl, // Replace with your OpenAI API base URL dangerouslyAllowBrowser: true, // using a temporary litellm proxy key @@ -36,7 +53,7 @@ async function generateModelResponse(inputMessage: string, updateUI: (chunk: str stream: true, messages: [ { - role: 'user', + role: "user", content: inputMessage, }, ], @@ -50,138 +67,176 @@ async function generateModelResponse(inputMessage: string, updateUI: (chunk: str } } -const ChatUI: React.FC = ({ accessToken, token, userRole, userID }) => { - const [inputMessage, setInputMessage] = useState(""); - const [chatHistory, setChatHistory] = useState([]); - const [selectedModel, setSelectedModel] = useState(undefined); - const [modelInfo, setModelInfo] = useState(null); // Declare modelInfo at the component level +const ChatUI: React.FC = ({ + accessToken, + token, + userRole, + userID, +}) => { + const [inputMessage, setInputMessage] = useState(""); + const [chatHistory, setChatHistory] = useState([]); + const [selectedModel, setSelectedModel] = useState( + undefined + ); + const [modelInfo, setModelInfo] = useState(null); // Declare modelInfo at the component level - useEffect(() => { - if (!accessToken || !token || !userRole || !userID) { - return; - } - // Fetch model info and set the default selected model - const fetchModelInfo = async () => { - const fetchedModelInfo = await modelInfoCall(accessToken, userID, userRole); - console.log("model_info:", fetchedModelInfo); - - if (fetchedModelInfo?.data.length > 0) { - setModelInfo(fetchedModelInfo); - setSelectedModel(fetchedModelInfo.data[0].model_name); - } - }; - - fetchModelInfo(); - }, [accessToken, userID, userRole]); - - const updateUI = (role: string, chunk: string) => { - setChatHistory((prevHistory) => { - const lastMessage = prevHistory[prevHistory.length - 1]; - - if (lastMessage && lastMessage.role === role) { - return [ - ...prevHistory.slice(0, prevHistory.length - 1), - { role, content: lastMessage.content + chunk }, - ]; - } else { - return [...prevHistory, { role, content: chunk }]; - } - }); - }; - - const handleSendMessage = async () => { - if (inputMessage.trim() === "") return; - - if (!accessToken || !token || !userRole || !userID) { - return; + useEffect(() => { + if (!accessToken || !token || !userRole || !userID) { + return; + } + // Fetch model info and set the default selected model + const fetchModelInfo = async () => { + const fetchedAvailableModels = await modelAvailableCall( + accessToken, + userID, + userRole + ); + console.log("model_info:", fetchedAvailableModels); + + if (fetchedAvailableModels?.data.length > 0) { + setModelInfo(fetchedAvailableModels.data); + setSelectedModel(fetchedAvailableModels.data[0].id); } - - setChatHistory((prevHistory) => [ - ...prevHistory, - { role: "user", content: inputMessage }, - ]); - - try { - if (selectedModel) { - await generateModelResponse(inputMessage, (chunk) => updateUI("assistant", chunk), selectedModel, accessToken); - } - } catch (error) { - console.error("Error fetching model response", error); - updateUI("assistant", "Error fetching model response"); - } - - setInputMessage(""); }; - + + fetchModelInfo(); + }, [accessToken, userID, userRole]); + + const updateUI = (role: string, chunk: string) => { + setChatHistory((prevHistory) => { + const lastMessage = prevHistory[prevHistory.length - 1]; + + if (lastMessage && lastMessage.role === role) { + return [ + ...prevHistory.slice(0, prevHistory.length - 1), + { role, content: lastMessage.content + chunk }, + ]; + } else { + return [...prevHistory, { role, content: chunk }]; + } + }); + }; + + const handleSendMessage = async () => { + if (inputMessage.trim() === "") return; + + if (!accessToken || !token || !userRole || !userID) { + return; + } + + setChatHistory((prevHistory) => [ + ...prevHistory, + { role: "user", content: inputMessage }, + ]); + + try { + if (selectedModel) { + await generateModelResponse( + inputMessage, + (chunk) => updateUI("assistant", chunk), + selectedModel, + accessToken + ); + } + } catch (error) { + console.error("Error fetching model response", error); + updateUI("assistant", "Error fetching model response"); + } + + setInputMessage(""); + }; + + if (userRole && userRole == "Admin Viewer") { + const { Title, Paragraph } = Typography; return ( -
- - +
+ Access Denied + Ask your proxy admin for access to test models +
+ ); + } + + return ( +
+ + - Chat - API Reference + Chat + API Reference - -
- - setSelectedModel(e.target.value)} + > + {/* Populate dropdown options from available models */} + {modelInfo?.map((element: { id: string }) => ( + + ))} + +
+ + + + + Chat + + + + + {chatHistory.map((message, index) => ( + + {`${message.role}: ${message.content}`} + + ))} + +
+
+
+ setInputMessage(e.target.value)} + className="flex-1 p-2 border rounded-md mr-2" + placeholder="Type your message..." + /> +
- - - - - Chat - - - - - {chatHistory.map((message, index) => ( - - {`${message.role}: ${message.content}`} - - ))} - -
-
-
- setInputMessage(e.target.value)} - className="flex-1 p-2 border rounded-md mr-2" - placeholder="Type your message..." - /> - -
-
- - - - - OpenAI Python SDK - LlamaIndex - Langchain Py - - - - - - {` + Send + +
+
+ + + + + OpenAI Python SDK + LlamaIndex + Langchain Py + + + + + {` import openai client = openai.OpenAI( api_key="your_api_key", @@ -208,12 +263,11 @@ response = client.chat.completions.create( print(response) `} - - - - - - {` + + + + + {` import os, dotenv from llama_index.llms import AzureOpenAI @@ -245,12 +299,11 @@ response = query_engine.query("What did the author do growing up?") print(response) `} - - - - - - {` + + + + + {` from langchain.chat_models import ChatOpenAI from langchain.prompts.chat import ( ChatPromptTemplate, @@ -286,20 +339,17 @@ response = chat(messages) print(response) `} - - - - - - + + + + + - -
-
-
- ); - }; + + + +
+ ); +}; - - - export default ChatUI; \ No newline at end of file +export default ChatUI; diff --git a/ui/litellm-dashboard/src/components/create_key_button.tsx b/ui/litellm-dashboard/src/components/create_key_button.tsx index 113952ea82d..fa80556b5b6 100644 --- a/ui/litellm-dashboard/src/components/create_key_button.tsx +++ b/ui/litellm-dashboard/src/components/create_key_button.tsx @@ -1,16 +1,24 @@ - "use client"; import React, { useState, useEffect, useRef } from "react"; import { Button, TextInput, Grid, Col } from "@tremor/react"; -import { Card, Metric, Text } from "@tremor/react"; -import { Button as Button2, Modal, Form, Input, InputNumber, Select, message } from "antd"; -import { keyCreateCall } from "./networking"; +import { Card, Metric, Text, Title, Subtitle } from "@tremor/react"; +import { + Button as Button2, + Modal, + Form, + Input, + InputNumber, + Select, + message, +} from "antd"; +import { keyCreateCall, slackBudgetAlertsHealthCheck } from "./networking"; const { Option } = Select; interface CreateKeyProps { userID: string; + teamID: string | null; userRole: string | null; accessToken: string; data: any[] | null; @@ -20,6 +28,7 @@ interface CreateKeyProps { const CreateKey: React.FC = ({ userID, + teamID, userRole, accessToken, data, @@ -29,7 +38,7 @@ const CreateKey: React.FC = ({ const [form] = Form.useForm(); const [isModalVisible, setIsModalVisible] = useState(false); const [apiKey, setApiKey] = useState(null); - + const [softBudget, setSoftBudget] = useState(null); const handleOk = () => { setIsModalVisible(false); form.resetFields(); @@ -46,15 +55,29 @@ const CreateKey: React.FC = ({ message.info("Making API Call"); setIsModalVisible(true); const response = await keyCreateCall(accessToken, userID, formValues); + + console.log("key create Response:", response); setData((prevData) => (prevData ? [...prevData, response] : [response])); // Check if prevData is null setApiKey(response["key"]); + setSoftBudget(response["soft_budget"]); message.success("API Key Created"); form.resetFields(); - localStorage.removeItem("userData" + userID) + localStorage.removeItem("userData" + userID); } catch (error) { console.error("Error creating the key:", error); } }; + + const sendSlackAlert = async () => { + try { + console.log("Sending Slack alert..."); + const response = await slackBudgetAlertsHealthCheck(accessToken); + console.log("slackBudgetAlertsHealthCheck Response:", response); + console.log("Testing Slack alert successful"); + } catch (error) { + console.error("Error sending Slack alert:", error); + } + }; return ( @@ -70,125 +93,124 @@ const CreateKey: React.FC = ({ onOk={handleOk} onCancel={handleCancel} > -
- {userRole === 'App Owner' || userRole === 'Admin' ? ( + + {userRole === "App Owner" || userRole === "Admin" ? ( <> - - - - - - - - - - - - - - - - - - - - - - - - - - - ) : ( - <> + + + + + + + + + + + + + + + + + + + + + - - - - - + label="Requests per minute Limit (RPM)" + name="rpm_limit" + > + + + + + + + + + + ) : ( + <> + + + + + + - - - - - ) - } -
- - Create Key - -
+ + + + + )} +
+ Create Key +
{apiKey && ( - -

- Please save this secret key somewhere safe and accessible. For - security reasons, you will not be able to view it again{" "} - through your LiteLLM account. If you lose this secret key, you will - need to generate a new one. -

- - - {apiKey != null ? ( - API Key: {apiKey} - ) : ( - Key being created, this might take 30s - )} - -
+ + Save your Key + +

+ Please save this secret key somewhere safe and accessible. For + security reasons, you will not be able to view it again{" "} + through your LiteLLM account. If you lose this secret key, you + will need to generate a new one. +

+ + + {apiKey != null ? ( +
+ API Key: {apiKey} + Budgets + Soft Limit Budget: ${softBudget} + + + (LiteLLM Docs - + + Set Up Slack Alerting) + + +
+ ) : ( + Key being created, this might take 30s + )} + +
+
)}